]> xenbits.xen.org Git - xenclient/linux-2.6.27-pq.git/commitdiff
Import changes from carbon/dom0.pq.hg (CS 522:97ed089a13c4)
authorJean Guyader <jean.guyader@eu.citrix.com>
Thu, 4 Jun 2009 16:21:09 +0000 (17:21 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Thu, 4 Jun 2009 16:21:09 +0000 (17:21 +0100)
17 files changed:
master/CA-27974-fix-shutdown-race.diff [new file with mode: 0644]
master/bridge-no-topology-change-when-no-stp.patch [new file with mode: 0644]
master/build-system-integration.patch
master/debug-dump-skb-info-when-invalid
master/forward-port-drivers-xen.patch
master/kernel-configuration
master/kexec-define-vmcore_elf_check_arch_cross.patch [new file with mode: 0644]
master/linux-2.6.18-xen.hg-847.ad4d307bf9ce [new file with mode: 0644]
master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf [new file with mode: 0644]
master/linux-2.6.18-xen.hg-849.3a4410c4504e [new file with mode: 0644]
master/linux-2.6.27.19-5.1.patch
master/netback-tcp-and-ip-in-different-fragments
master/oom-debugging
master/series
master/solarflare-sfc
master/sync-drivers-xen.patch
master/tg3-build-without-vlan-support.patch [new file with mode: 0644]

diff --git a/master/CA-27974-fix-shutdown-race.diff b/master/CA-27974-fix-shutdown-race.diff
new file mode 100644 (file)
index 0000000..655a6c5
--- /dev/null
@@ -0,0 +1,36 @@
+CA-27974: Fix blktap shutdown race due to improper event ordering.
+
+Writing shutdown-done before switching device state to closed (6)
+opens a remarkably small race window to fall through: The agent
+removes the device directory just before the write to the 'state'
+field will recreate it again. This in turn leads to xenbus failing to
+remove the device, since removal is guided by directory existence.
+
+With shutdown-done and connection state being rather independent,
+trivially fixing event ordering to write shutdown-done last appears
+safe but mandatory. Comment this tiny detail.
+
+diff -r 5013c41359c2 drivers/xen/blktap/xenbus.c
+--- a/drivers/xen/blktap/xenbus.c      Fri Apr 03 12:29:37 2009 -0700
++++ b/drivers/xen/blktap/xenbus.c      Sat Apr 04 11:54:37 2009 -0700
+@@ -309,13 +309,17 @@
+       if (be->blkif)
+               disassociate_blkif(be->blkif->domid, be->xenbus_id);
++      if (be->dev)
++              xenbus_switch_state(be->dev, XenbusStateClosed);
++
++      /* NB. shutdown-done goes last: it triggers our deletion by
++         the agent. any later write would risk recreating the
++         xenstore directory, racing against xenbus. */
++
+       err = xenbus_write(XBT_NIL, be->nodename, "shutdown-done", "");
+       if (err)
+               WPRINTK("Error writing shutdown-done for %s: %d\n", 
+                       be->nodename, err);
+-
+-      if (be->dev)
+-              xenbus_switch_state(be->dev, XenbusStateClosed);
+       be->shutdown_signalled = 1;
diff --git a/master/bridge-no-topology-change-when-no-stp.patch b/master/bridge-no-topology-change-when-no-stp.patch
new file mode 100644 (file)
index 0000000..a8ccd00
--- /dev/null
@@ -0,0 +1,13 @@
+diff -r d3e8d5dcdfba net/bridge/br_stp.c
+--- a/net/bridge/br_stp.c      Thu May 14 16:49:00 2009 +0100
++++ b/net/bridge/br_stp.c      Fri May 15 09:18:44 2009 +0100
+@@ -376,7 +376,8 @@
+       if (br->forward_delay == 0) {
+               p->state = BR_STATE_FORWARDING;
+-              br_topology_change_detection(br);
++              if (p->br->stp_enabled)
++                      br_topology_change_detection(br);
+               del_timer(&p->forward_delay_timer);
+       }
+       else if (p->br->stp_enabled)
index 706d2796473d4d7733dcf222dd3d1f5f4e983b28..c7ad7fc988371fc506af2227c984b904c0d04812 100644 (file)
@@ -6,7 +6,7 @@ diff -r 604ec80ec4ac buildconfigs/Rules.mk
 +XEN_TARGET_X86_PAE ?= y
 +
 +LINUX_SERIES = 2.6
-+LINUX_VER    = 2.6.18.8
++LINUX_VER    = 2.6.27
 +
 +EXTRAVERSION ?= xen
 +
index 73b772129e6a73b714599cc83c35c111afa418b1..1d838afd00fbf44d6cf93a9a7553e475e5c2c825 100644 (file)
@@ -1,18 +1,19 @@
-diff -r 5ba0462df748 include/linux/skbuff.h
---- a/include/linux/skbuff.h   Tue Oct 07 10:58:37 2008 +0100
-+++ b/include/linux/skbuff.h   Tue Oct 07 10:59:05 2008 +0100
-@@ -1630,5 +1630,7 @@ static inline int skb_is_gso(const struc
-       return skb_shinfo(skb)->gso_size;
- }
+diff -r 2f8aba290013 include/linux/skbuff.h
+--- a/include/linux/skbuff.h   Fri May 15 15:10:10 2009 +0100
++++ b/include/linux/skbuff.h   Fri May 15 15:11:31 2009 +0100
+@@ -1778,5 +1778,8 @@
+ static inline int skb_checksum_setup(struct sk_buff *skb) { return 0; }
+ #endif
  
 +extern void skb_dump_info(const struct sk_buff *skb);
++extern int  skb_mapping_valid(const struct sk_buff *);
 +
  #endif        /* __KERNEL__ */
  #endif        /* _LINUX_SKBUFF_H */
-diff -r 5ba0462df748 net/core/skbuff.c
---- a/net/core/skbuff.c        Tue Oct 07 10:58:37 2008 +0100
-+++ b/net/core/skbuff.c        Tue Oct 07 10:59:05 2008 +0100
-@@ -66,9 +66,73 @@
+diff -r 2f8aba290013 net/core/skbuff.c
+--- a/net/core/skbuff.c        Fri May 15 15:10:10 2009 +0100
++++ b/net/core/skbuff.c        Fri May 15 15:11:31 2009 +0100
+@@ -64,11 +64,104 @@
  
  #include <asm/uaccess.h>
  #include <asm/system.h>
@@ -74,19 +75,62 @@ diff -r 5ba0462df748 net/core/skbuff.c
 +              skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
 +              unsigned long pfn = page_to_pfn(frag->page);
 +              unsigned long mfn = pfn_to_mfn(pfn);
-+              printk(KERN_ERR "skb: %d/%d page:%p offset:%#x size:%#x virt:%p pfn:%#lx mfn:%#lx%s flags:%lx%s)\n",
++              printk(KERN_ERR "skb: %d/%d page:%p offset:%#x size:%#x virt:%p pfn:%#lx mfn:%#lx%s flags:%lx%s%s%s)\n",
 +                     i, nr, frag->page, frag->page_offset, frag->size,
 +                     phys_to_virt(page_to_phys(frag->page)), pfn, mfn,
 +                     phys_to_machine_mapping_valid(pfn) ? "" : "(BAD)",
 +                     frag->page->flags,
-+                     PageForeign(frag->page) ? "FOREIGN" : "not-foreign");
++                     PageForeign(frag->page) ? " FOREIGN" : "",
++                     PageBlkback(frag->page) ? " BLKBACK" : "",
++                     PageNetback(frag->page) ? " NETBACK" : "");
 +      }
 +#endif
 +}
 +EXPORT_SYMBOL(skb_dump_info);
 +
++#ifdef CONFIG_XEN
++int skb_mapping_valid(const struct sk_buff *skb)
++{
++      int i, nr;
++
++      if (skb == NULL)
++              return 1;
++
++      if (skb_shinfo(skb) == NULL || skb_shinfo(skb) == (void*)0xffffffff)
++              return 1;
++
++      nr = skb_shinfo(skb)->nr_frags;
++
++      for (i = 0; i < nr; i++) {
++              skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
++              unsigned long pfn = page_to_pfn(frag->page);
++              if (pfn > max_mapnr)
++                      return 0;
++              if(!phys_to_machine_mapping_valid(page_to_pfn(frag->page)))
++                      return 0;
++      }
++      return 1;
++}
++#else
++int skb_mapping_valid(const struct sk_buff *skb) { return 1; }
++#endif
++EXPORT_SYMBOL(skb_mapping_valid);
+ static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
+                                 struct pipe_buffer *buf)
+@@ -1289,6 +1382,11 @@
  
-@@ -1340,13 +1433,20 @@ unsigned int skb_copy_and_csum_bits(cons
+       if (offset > (int)skb->len - len)
+               goto fault;
++
++      if (!skb_mapping_valid(skb)) {
++              skb_dump_info(skb);
++              BUG();
++      }
+       /* Copy header. */
+       if ((copy = start - offset) > 0) {
+@@ -1717,13 +1815,20 @@
        int start = skb_headlen(skb);
        int i, copy = start - offset;
        int pos = 0;
@@ -109,7 +153,7 @@ diff -r 5ba0462df748 net/core/skbuff.c
                if ((len -= copy) == 0)
                        return csum;
                offset += copy;
-@@ -1368,10 +1468,15 @@ unsigned int skb_copy_and_csum_bits(cons
+@@ -1745,10 +1850,15 @@
                        if (copy > len)
                                copy = len;
                        vaddr = kmap_skb_frag(frag);
index 9a6c5a9d336f7278cf55a257af832cea181dfa4c..3148536a7a312671f821d6c9316511c73798e9e4 100644 (file)
@@ -1,6 +1,6 @@
-diff -r c351a20e4265 drivers/xen/Kconfig
---- a/drivers/xen/Kconfig      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/Kconfig      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/Kconfig
+--- a/drivers/xen/Kconfig      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/Kconfig      Thu Jun 04 15:13:44 2009 +0100
 @@ -72,15 +72,6 @@
          The network-device backend driver allows the kernel to export its
          network devices to other guests via a high-performance shared-memory
@@ -17,9 +17,18 @@ diff -r c351a20e4265 drivers/xen/Kconfig
  
  config XEN_NETDEV_PIPELINED_TRANSMITTER
        bool "Pipelined transmitter (DANGEROUS)"
-diff -r c351a20e4265 drivers/xen/balloon/balloon.c
---- a/drivers/xen/balloon/balloon.c    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/balloon/balloon.c    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/balloon/balloon.c
+--- a/drivers/xen/balloon/balloon.c    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/balloon/balloon.c    Thu Jun 04 15:13:44 2009 +0100
+@@ -84,7 +84,7 @@
+ /* VM /proc information for memory */
+ extern unsigned long totalram_pages;
+-#ifndef MODULE
++#if !defined(MODULE) && defined(CONFIG_HIGHMEM)
+ extern unsigned long totalhigh_pages;
+ #define inc_totalhigh_pages() (totalhigh_pages++)
+ #define dec_totalhigh_pages() (totalhigh_pages--)
 @@ -97,8 +97,8 @@
  static LIST_HEAD(ballooned_pages);
  
@@ -73,9 +82,9 @@ diff -r c351a20e4265 drivers/xen/balloon/balloon.c
  }
  
  void balloon_release_driver_page(struct page *page)
-diff -r c351a20e4265 drivers/xen/balloon/sysfs.c
---- a/drivers/xen/balloon/sysfs.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/balloon/sysfs.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/balloon/sysfs.c
+--- a/drivers/xen/balloon/sysfs.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/balloon/sysfs.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -44,6 +44,7 @@
  
  #define BALLOON_SHOW(name, format, args...)                   \
@@ -112,9 +121,9 @@ diff -r c351a20e4265 drivers/xen/balloon/sysfs.c
  };
  
  static struct sys_device balloon_sysdev;
-diff -r c351a20e4265 drivers/xen/blkback/blkback.c
---- a/drivers/xen/blkback/blkback.c    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkback/blkback.c    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkback/blkback.c
+--- a/drivers/xen/blkback/blkback.c    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkback/blkback.c    Thu Jun 04 15:13:44 2009 +0100
 @@ -37,6 +37,7 @@
  
  #include <linux/spinlock.h>
@@ -156,9 +165,9 @@ diff -r c351a20e4265 drivers/xen/blkback/blkback.c
  {
        blkif_notify_work(dev_id);
        return IRQ_HANDLED;
-diff -r c351a20e4265 drivers/xen/blkback/common.h
---- a/drivers/xen/blkback/common.h     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkback/common.h     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkback/common.h
+--- a/drivers/xen/blkback/common.h     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkback/common.h     Thu Jun 04 15:13:44 2009 +0100
 @@ -79,7 +79,7 @@
        wait_queue_head_t   wq;
        struct task_struct  *xenblkd;
@@ -177,9 +186,9 @@ diff -r c351a20e4265 drivers/xen/blkback/common.h
  int blkif_schedule(void *arg);
  
  int blkback_barrier(struct xenbus_transaction xbt,
-diff -r c351a20e4265 drivers/xen/blkback/interface.c
---- a/drivers/xen/blkback/interface.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkback/interface.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkback/interface.c
+--- a/drivers/xen/blkback/interface.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkback/interface.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -34,7 +34,7 @@
  #include <xen/evtchn.h>
  #include <linux/kthread.h>
@@ -196,9 +205,9 @@ diff -r c351a20e4265 drivers/xen/blkback/interface.c
 -                                       0, 0, NULL, NULL);
 +                                       0, 0, NULL);
  }
-diff -r c351a20e4265 drivers/xen/blkback/xenbus.c
---- a/drivers/xen/blkback/xenbus.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkback/xenbus.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkback/xenbus.c
+--- a/drivers/xen/blkback/xenbus.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkback/xenbus.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -527,7 +527,6 @@
  
  static struct xenbus_driver blkback = {
@@ -207,9 +216,9 @@ diff -r c351a20e4265 drivers/xen/blkback/xenbus.c
        .ids = blkback_ids,
        .probe = blkback_probe,
        .remove = blkback_remove,
-diff -r c351a20e4265 drivers/xen/blkfront/blkfront.c
---- a/drivers/xen/blkfront/blkfront.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkfront/blkfront.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkfront/blkfront.c
+--- a/drivers/xen/blkfront/blkfront.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkfront/blkfront.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -69,8 +69,8 @@
  
  static void kick_pending_request_queues(struct blkfront_info *);
@@ -341,9 +350,9 @@ diff -r c351a20e4265 drivers/xen/blkfront/blkfront.c
        .ids = blkfront_ids,
        .probe = blkfront_probe,
        .remove = blkfront_remove,
-diff -r c351a20e4265 drivers/xen/blkfront/block.h
---- a/drivers/xen/blkfront/block.h     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkfront/block.h     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkfront/block.h
+--- a/drivers/xen/blkfront/block.h     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkfront/block.h     Thu Jun 04 15:13:44 2009 +0100
 @@ -105,7 +105,7 @@
        blkif_front_ring_t ring;
        unsigned int irq;
@@ -362,9 +371,9 @@ diff -r c351a20e4265 drivers/xen/blkfront/block.h
  
  /* Virtual block-device subsystem. */
  /* Note that xlvbd_add doesn't call add_disk for you: you're expected
-diff -r c351a20e4265 drivers/xen/blkfront/vbd.c
---- a/drivers/xen/blkfront/vbd.c       Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blkfront/vbd.c       Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blkfront/vbd.c
+--- a/drivers/xen/blkfront/vbd.c       Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blkfront/vbd.c       Thu Jun 04 15:13:44 2009 +0100
 @@ -211,7 +211,7 @@
  static int
  xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size)
@@ -374,9 +383,9 @@ diff -r c351a20e4265 drivers/xen/blkfront/vbd.c
  
        rq = blk_init_queue(do_blkif_request, &blkif_io_lock);
        if (rq == NULL)
-diff -r c351a20e4265 drivers/xen/blktap/blktap.c
---- a/drivers/xen/blktap/blktap.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blktap/blktap.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blktap/blktap.c
+--- a/drivers/xen/blktap/blktap.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blktap/blktap.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -40,6 +40,7 @@
  
  #include <linux/spinlock.h>
@@ -484,9 +493,9 @@ diff -r c351a20e4265 drivers/xen/blktap/blktap.c
        } else {
                /* this is bad, but not fatal */
                WPRINTK("blktap: sysfs xen_class not created\n");
-diff -r c351a20e4265 drivers/xen/blktap/common.h
---- a/drivers/xen/blktap/common.h      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blktap/common.h      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blktap/common.h
+--- a/drivers/xen/blktap/common.h      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blktap/common.h      Thu Jun 04 15:13:44 2009 +0100
 @@ -68,7 +68,7 @@
        wait_queue_head_t   wq;
        struct task_struct  *xenblkd;
@@ -505,9 +514,9 @@ diff -r c351a20e4265 drivers/xen/blktap/common.h
  int tap_blkif_schedule(void *arg);
  
  int dom_to_devid(domid_t domid, int xenbus_id, blkif_t *blkif);
-diff -r c351a20e4265 drivers/xen/blktap/interface.c
---- a/drivers/xen/blktap/interface.c   Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blktap/interface.c   Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blktap/interface.c
+--- a/drivers/xen/blktap/interface.c   Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blktap/interface.c   Thu Jun 04 15:13:44 2009 +0100
 @@ -34,7 +34,7 @@
  #include "common.h"
  #include <xen/evtchn.h>
@@ -524,9 +533,9 @@ diff -r c351a20e4265 drivers/xen/blktap/interface.c
 -                                       0, 0, NULL, NULL);
 +                                       0, 0, NULL);
  }
-diff -r c351a20e4265 drivers/xen/blktap/xenbus.c
---- a/drivers/xen/blktap/xenbus.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/blktap/xenbus.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/blktap/xenbus.c
+--- a/drivers/xen/blktap/xenbus.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/blktap/xenbus.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -465,7 +465,6 @@
  
  static struct xenbus_driver blktap = {
@@ -535,9 +544,9 @@ diff -r c351a20e4265 drivers/xen/blktap/xenbus.c
        .ids = blktap_ids,
        .probe = blktap_probe,
        .remove = blktap_remove,
-diff -r c351a20e4265 drivers/xen/console/console.c
---- a/drivers/xen/console/console.c    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/console/console.c    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/console/console.c
+--- a/drivers/xen/console/console.c    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/console/console.c    Thu Jun 04 15:13:44 2009 +0100
 @@ -84,6 +84,18 @@
  /* /dev/hvc0 device number */
  #define XEN_HVC_MAJOR 229
@@ -557,9 +566,9 @@ diff -r c351a20e4265 drivers/xen/console/console.c
  
  static int __init xencons_setup(char *str)
  {
-diff -r c351a20e4265 drivers/xen/netback/accel.c
---- a/drivers/xen/netback/accel.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/accel.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/accel.c
+--- a/drivers/xen/netback/accel.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/accel.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -65,7 +65,7 @@
        
        if (IS_ERR(eth_name)) {
@@ -569,9 +578,9 @@ diff -r c351a20e4265 drivers/xen/netback/accel.c
                        __FUNCTION__, PTR_ERR(eth_name));
                return 0;
        } else {
-diff -r c351a20e4265 drivers/xen/netback/common.h
---- a/drivers/xen/netback/common.h     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/common.h     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/common.h
+--- a/drivers/xen/netback/common.h     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/common.h     Thu Jun 04 15:13:44 2009 +0100
 @@ -203,7 +203,7 @@
  
  int netif_be_start_xmit(struct sk_buff *skb, struct net_device *dev);
@@ -581,9 +590,9 @@ diff -r c351a20e4265 drivers/xen/netback/common.h
  
  static inline int netbk_can_queue(struct net_device *dev)
  {
-diff -r c351a20e4265 drivers/xen/netback/interface.c
---- a/drivers/xen/netback/interface.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/interface.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/interface.c
+--- a/drivers/xen/netback/interface.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/interface.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -120,7 +120,7 @@
                              struct ethtool_drvinfo *info)
  {
@@ -593,9 +602,9 @@ diff -r c351a20e4265 drivers/xen/netback/interface.c
  }
  
  static const struct netif_stat {
-diff -r c351a20e4265 drivers/xen/netback/loopback.c
---- a/drivers/xen/netback/loopback.c   Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/loopback.c   Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/loopback.c
+--- a/drivers/xen/netback/loopback.c   Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/loopback.c   Thu Jun 04 15:13:44 2009 +0100
 @@ -54,6 +54,7 @@
  #include <net/dst.h>
  #include <net/xfrm.h>         /* secpath_reset() */
@@ -625,9 +634,18 @@ diff -r c351a20e4265 drivers/xen/netback/loopback.c
        if (dev1 && dev2) {
                unregister_netdev(dev2);
                unregister_netdev(dev1);
-diff -r c351a20e4265 drivers/xen/netback/netback.c
---- a/drivers/xen/netback/netback.c    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/netback.c    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/netback.c
+--- a/drivers/xen/netback/netback.c    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/netback.c    Thu Jun 04 15:13:44 2009 +0100
+@@ -195,7 +195,7 @@
+               goto err;
+       skb_reserve(nskb, 16 + NET_IP_ALIGN);
+-      headlen = nskb->end - nskb->data;
++      headlen = skb_end_pointer(nskb) - nskb->data;
+       if (headlen > skb_headlen(skb))
+               headlen = skb_headlen(skb);
+       ret = skb_copy_bits(skb, 0, __skb_put(nskb, headlen), headlen);
 @@ -241,11 +241,15 @@
                len -= copy;
        }
@@ -665,9 +683,9 @@ diff -r c351a20e4265 drivers/xen/netback/netback.c
  {
        netif_t *netif = dev_id;
  
-diff -r c351a20e4265 drivers/xen/netback/xenbus.c
---- a/drivers/xen/netback/xenbus.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netback/xenbus.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netback/xenbus.c
+--- a/drivers/xen/netback/xenbus.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netback/xenbus.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -149,12 +149,10 @@
   * and vif variables to the environment, for the benefit of the vif-* hotplug
   * scripts.
@@ -708,9 +726,9 @@ diff -r c351a20e4265 drivers/xen/netback/xenbus.c
        .ids = netback_ids,
        .probe = netback_probe,
        .remove = netback_remove,
-diff -r c351a20e4265 drivers/xen/netfront/accel.c
---- a/drivers/xen/netfront/accel.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netfront/accel.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netfront/accel.c
+--- a/drivers/xen/netfront/accel.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netfront/accel.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -28,6 +28,7 @@
   * IN THE SOFTWARE.
   */
@@ -753,9 +771,9 @@ diff -r c351a20e4265 drivers/xen/netfront/accel.c
  }
  
  
-diff -r c351a20e4265 drivers/xen/netfront/netfront.c
---- a/drivers/xen/netfront/netfront.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netfront/netfront.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netfront/netfront.c
+--- a/drivers/xen/netfront/netfront.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netfront/netfront.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -136,7 +136,7 @@
  {
          return skb_is_gso(skb) &&
@@ -1044,9 +1062,9 @@ diff -r c351a20e4265 drivers/xen/netfront/netfront.c
        .ids = netfront_ids,
        .probe = netfront_probe,
        .remove = __devexit_p(netfront_remove),
-diff -r c351a20e4265 drivers/xen/netfront/netfront.h
---- a/drivers/xen/netfront/netfront.h  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/netfront/netfront.h  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/netfront/netfront.h
+--- a/drivers/xen/netfront/netfront.h  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/netfront/netfront.h  Thu Jun 04 15:13:44 2009 +0100
 @@ -157,6 +157,8 @@
        spinlock_t   tx_lock;
        spinlock_t   rx_lock;
@@ -1056,9 +1074,9 @@ diff -r c351a20e4265 drivers/xen/netfront/netfront.h
        unsigned int irq;
        unsigned int copying_receiver;
        unsigned int carrier;
-diff -r c351a20e4265 drivers/xen/pciback/conf_space_header.c
---- a/drivers/xen/pciback/conf_space_header.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/pciback/conf_space_header.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/pciback/conf_space_header.c
+--- a/drivers/xen/pciback/conf_space_header.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/pciback/conf_space_header.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -22,14 +22,14 @@
  {
        int err;
@@ -1076,9 +1094,9 @@ diff -r c351a20e4265 drivers/xen/pciback/conf_space_header.c
                if (unlikely(verbose_request))
                        printk(KERN_DEBUG "pciback: %s: disable\n",
                               pci_name(dev));
-diff -r c351a20e4265 drivers/xen/pciback/pciback.h
---- a/drivers/xen/pciback/pciback.h    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/pciback/pciback.h    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/pciback/pciback.h
+--- a/drivers/xen/pciback/pciback.h    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/pciback/pciback.h    Thu Jun 04 15:13:44 2009 +0100
 @@ -99,8 +99,8 @@
  void pciback_release_devices(struct pciback_device *pdev);
  
@@ -1090,9 +1108,9 @@ diff -r c351a20e4265 drivers/xen/pciback/pciback.h
  
  int pciback_xenbus_register(void);
  void pciback_xenbus_unregister(void);
-diff -r c351a20e4265 drivers/xen/pciback/pciback_ops.c
---- a/drivers/xen/pciback/pciback_ops.c        Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/pciback/pciback_ops.c        Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/pciback/pciback_ops.c
+--- a/drivers/xen/pciback/pciback_ops.c        Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/pciback/pciback_ops.c        Thu Jun 04 15:13:44 2009 +0100
 @@ -26,7 +26,7 @@
  
                pci_write_config_word(dev, PCI_COMMAND, 0);
@@ -1123,9 +1141,9 @@ diff -r c351a20e4265 drivers/xen/pciback/pciback_ops.c
  {
        struct pciback_device *pdev = dev_id;
  
-diff -r c351a20e4265 drivers/xen/pciback/xenbus.c
---- a/drivers/xen/pciback/xenbus.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/pciback/xenbus.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/pciback/xenbus.c
+--- a/drivers/xen/pciback/xenbus.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/pciback/xenbus.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -33,7 +33,7 @@
        pdev->evtchn_irq = INVALID_EVTCHN_IRQ;
        pdev->be_watching = 0;
@@ -1160,9 +1178,20 @@ diff -r c351a20e4265 drivers/xen/pciback/xenbus.c
        .ids                    = xenpci_ids,
        .probe                  = pciback_xenbus_probe,
        .remove                 = pciback_xenbus_remove,
-diff -r c351a20e4265 drivers/xen/privcmd/privcmd.c
---- a/drivers/xen/privcmd/privcmd.c    Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/privcmd/privcmd.c    Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/privcmd/compat_privcmd.c
+--- a/drivers/xen/privcmd/compat_privcmd.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/privcmd/compat_privcmd.c     Thu Jun 04 15:13:44 2009 +0100
+@@ -18,7 +18,6 @@
+  * Authors: Jimi Xenidis <jimix@watson.ibm.com>
+  */
+-#include <linux/config.h>
+ #include <linux/compat.h>
+ #include <linux/ioctl.h>
+ #include <linux/syscalls.h>
+diff -r f9b410dfa92a drivers/xen/privcmd/privcmd.c
+--- a/drivers/xen/privcmd/privcmd.c    Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/privcmd/privcmd.c    Thu Jun 04 15:13:44 2009 +0100
 @@ -288,15 +288,13 @@
  }
  
@@ -1191,9 +1220,9 @@ diff -r c351a20e4265 drivers/xen/privcmd/privcmd.c
        vma->vm_ops = &privcmd_vm_ops;
        vma->vm_private_data = NULL;
  
-diff -r c351a20e4265 drivers/xen/sfc_netback/accel.h
---- a/drivers/xen/sfc_netback/accel.h  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netback/accel.h  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netback/accel.h
+--- a/drivers/xen/sfc_netback/accel.h  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netback/accel.h  Thu Jun 04 15:13:44 2009 +0100
 @@ -25,6 +25,7 @@
  #ifndef NETBACK_ACCEL_H
  #define NETBACK_ACCEL_H
@@ -1202,9 +1231,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netback/accel.h
  #include <linux/slab.h>
  #include <linux/ip.h>
  #include <linux/tcp.h>
-diff -r c351a20e4265 drivers/xen/sfc_netback/accel_fwd.c
---- a/drivers/xen/sfc_netback/accel_fwd.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netback/accel_fwd.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netback/accel_fwd.c
+--- a/drivers/xen/sfc_netback/accel_fwd.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netback/accel_fwd.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -181,10 +181,11 @@
        unsigned long flags;
        cuckoo_hash_mac_key key = cuckoo_mac_to_key(mac);
@@ -1272,9 +1301,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netback/accel_fwd.c
  
                spin_lock_irqsave(&fwd_set->fwd_lock, flags);
                /*
-diff -r c351a20e4265 drivers/xen/sfc_netback/accel_solarflare.c
---- a/drivers/xen/sfc_netback/accel_solarflare.c       Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netback/accel_solarflare.c       Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netback/accel_solarflare.c
+--- a/drivers/xen/sfc_netback/accel_solarflare.c       Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netback/accel_solarflare.c       Thu Jun 04 15:13:44 2009 +0100
 @@ -114,7 +114,7 @@
        BUG_ON(port == NULL);
  
@@ -1293,9 +1322,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netback/accel_solarflare.c
  
                /*
                 * It's possible for the nic structure to have not
-diff -r c351a20e4265 drivers/xen/sfc_netback/accel_xenbus.c
---- a/drivers/xen/sfc_netback/accel_xenbus.c   Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netback/accel_xenbus.c   Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netback/accel_xenbus.c
+--- a/drivers/xen/sfc_netback/accel_xenbus.c   Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netback/accel_xenbus.c   Thu Jun 04 15:13:44 2009 +0100
 @@ -68,8 +68,7 @@
  
  
@@ -1316,9 +1345,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netback/accel_xenbus.c
  {
        VPRINTK("netirq %d from device %s\n", irq,
                ((struct xenbus_device *)context)->nodename);
-diff -r c351a20e4265 drivers/xen/sfc_netback/ci/efrm/nic_table.h
---- a/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netback/ci/efrm/nic_table.h
+--- a/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Thu Jun 04 15:13:44 2009 +0100
 @@ -62,21 +62,21 @@
  };
  
@@ -1361,9 +1390,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netback/ci/efrm/nic_table.h
                    efrm_nic_set_read((_set), (_i)))
  
  #endif /* __CI_EFRM_NIC_TABLE_H__ */
-diff -r c351a20e4265 drivers/xen/sfc_netfront/accel.h
---- a/drivers/xen/sfc_netfront/accel.h Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netfront/accel.h Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netfront/accel.h
+--- a/drivers/xen/sfc_netfront/accel.h Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel.h Thu Jun 04 15:13:44 2009 +0100
 @@ -35,6 +35,7 @@
  #include <xen/evtchn.h>
  
@@ -1385,9 +1414,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netfront/accel.h
  
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
  extern void netfront_accel_msg_from_bend(struct work_struct *context);
-diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_msg.c
---- a/drivers/xen/sfc_netfront/accel_msg.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netfront/accel_msg.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netfront/accel_msg.c
+--- a/drivers/xen/sfc_netfront/accel_msg.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_msg.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -41,11 +41,13 @@
        /* Prime our interrupt */
        spin_lock_irqsave(&vnic->irq_enabled_lock, flags);
@@ -1488,9 +1517,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_msg.c
        }
        else {
                spin_unlock_irqrestore(&vnic->irq_enabled_lock, flags);
-diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_tso.c
---- a/drivers/xen/sfc_netfront/accel_tso.c     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netfront/accel_tso.c     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netfront/accel_tso.c
+--- a/drivers/xen/sfc_netfront/accel_tso.c     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_tso.c     Thu Jun 04 15:13:44 2009 +0100
 @@ -33,10 +33,9 @@
  
  #include "accel_tso.h"
@@ -1561,9 +1590,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_tso.c
                EPRINTK("Trying to TSO send a packet without HW checksum\n");
  
        tso_start(&state, skb);
-diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_vi.c
---- a/drivers/xen/sfc_netfront/accel_vi.c      Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netfront/accel_vi.c      Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netfront/accel_vi.c
+--- a/drivers/xen/sfc_netfront/accel_vi.c      Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_vi.c      Thu Jun 04 15:13:44 2009 +0100
 @@ -461,9 +461,9 @@
  
        frag_i = -1;
@@ -1614,9 +1643,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_vi.c
  
                if (ip->protocol == IPPROTO_TCP) {
                        struct tcphdr *tcp = (struct tcphdr *)
-diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_xenbus.c
---- a/drivers/xen/sfc_netfront/accel_xenbus.c  Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netfront/accel_xenbus.c  Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netfront/accel_xenbus.c
+--- a/drivers/xen/sfc_netfront/accel_xenbus.c  Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_xenbus.c  Thu Jun 04 15:13:44 2009 +0100
 @@ -356,7 +356,7 @@
        /* Create xenbus msg event channel */
        err = bind_listening_port_to_irqhandler
@@ -1635,9 +1664,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netfront/accel_xenbus.c
        if (err < 0) {
                EPRINTK("Couldn't bind net event channel\n");
                goto fail_net_irq;
-diff -r c351a20e4265 drivers/xen/sfc_netutil/accel_util.h
---- a/drivers/xen/sfc_netutil/accel_util.h     Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/sfc_netutil/accel_util.h     Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/sfc_netutil/accel_util.h
+--- a/drivers/xen/sfc_netutil/accel_util.h     Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/sfc_netutil/accel_util.h     Thu Jun 04 15:13:44 2009 +0100
 @@ -63,9 +63,6 @@
                        DPRINTK("%s at %s:%d\n", #exp, __FILE__, __LINE__); \
        } while(0)
@@ -1648,9 +1677,9 @@ diff -r c351a20e4265 drivers/xen/sfc_netutil/accel_util.h
  #include <xen/xenbus.h>
  
  /*! Map a set of pages from another domain
-diff -r c351a20e4265 drivers/xen/xenbus/xenbus_comms.c
---- a/drivers/xen/xenbus/xenbus_comms.c        Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/xenbus/xenbus_comms.c        Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/xenbus/xenbus_comms.c
+--- a/drivers/xen/xenbus/xenbus_comms.c        Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_comms.c        Thu Jun 04 15:13:44 2009 +0100
 @@ -49,13 +49,13 @@
  
  static int xenbus_irq;
@@ -1668,9 +1697,9 @@ diff -r c351a20e4265 drivers/xen/xenbus/xenbus_comms.c
  {
        if (unlikely(xenstored_ready == 0)) {
                xenstored_ready = 1;
-diff -r c351a20e4265 drivers/xen/xenbus/xenbus_probe.c
---- a/drivers/xen/xenbus/xenbus_probe.c        Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/xenbus/xenbus_probe.c        Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/xenbus/xenbus_probe.c
+--- a/drivers/xen/xenbus/xenbus_probe.c        Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.c        Thu Jun 04 15:13:44 2009 +0100
 @@ -36,6 +36,7 @@
                 __FUNCTION__, __LINE__, ##args)
  
@@ -1757,9 +1786,9 @@ diff -r c351a20e4265 drivers/xen/xenbus/xenbus_probe.c
  
  void xenbus_unregister_driver(struct xenbus_driver *drv)
  {
-diff -r c351a20e4265 drivers/xen/xenbus/xenbus_probe.h
---- a/drivers/xen/xenbus/xenbus_probe.h        Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/xenbus/xenbus_probe.h        Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/xenbus/xenbus_probe.h
+--- a/drivers/xen/xenbus/xenbus_probe.h        Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.h        Thu Jun 04 15:13:44 2009 +0100
 @@ -63,7 +63,9 @@
  extern int xenbus_dev_probe(struct device *_dev);
  extern int xenbus_dev_remove(struct device *_dev);
@@ -1771,9 +1800,9 @@ diff -r c351a20e4265 drivers/xen/xenbus/xenbus_probe.h
  extern int xenbus_probe_node(struct xen_bus_type *bus,
                             const char *type,
                             const char *nodename);
-diff -r c351a20e4265 drivers/xen/xenbus/xenbus_probe_backend.c
---- a/drivers/xen/xenbus/xenbus_probe_backend.c        Thu Mar 19 10:41:53 2009 +0000
-+++ b/drivers/xen/xenbus/xenbus_probe_backend.c        Thu Mar 19 10:42:18 2009 +0000
+diff -r f9b410dfa92a drivers/xen/xenbus/xenbus_probe_backend.c
+--- a/drivers/xen/xenbus/xenbus_probe_backend.c        Fri May 15 16:19:00 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe_backend.c        Thu Jun 04 15:13:44 2009 +0100
 @@ -60,8 +60,7 @@
  #include <xen/platform-compat.h>
  #endif
index 1edab8cc15c4832d572ae4a1840f750d1003cc9e..3e7d2b81d82bd3e78e07166b7e9aa60c1e25793f 100644 (file)
@@ -1,6 +1,6 @@
-diff -r 029bcc5b920d buildconfigs/conf.linux-kdump/kdump
+diff -r 5e428261bbe7 buildconfigs/conf.linux-kdump/kdump
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/buildconfigs/conf.linux-kdump/kdump      Thu Mar 26 15:39:49 2009 +0000
++++ b/buildconfigs/conf.linux-kdump/kdump      Thu Jun 04 15:14:24 2009 +0100
 @@ -0,0 +1,107 @@
 +# CONFIG_NO_HZ is not set
 +# CONFIG_HIGH_RES_TIMERS is not set
@@ -109,9 +109,9 @@ diff -r 029bcc5b920d buildconfigs/conf.linux-kdump/kdump
 +# CONFIG_KALLSYMS_ALL is not set
 +# CONFIG_DEBUG_INFO is not set
 +# CONFIG_KDB is not set
-diff -r 029bcc5b920d buildconfigs/linux-defconfig_utility_x86_32
+diff -r 5e428261bbe7 buildconfigs/linux-defconfig_utility_x86_32
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/buildconfigs/linux-defconfig_utility_x86_32      Thu Mar 26 15:39:49 2009 +0000
++++ b/buildconfigs/linux-defconfig_utility_x86_32      Thu Jun 04 15:14:24 2009 +0100
 @@ -0,0 +1,1022 @@
 +#
 +# Automatically generated make config: don't edit
@@ -1135,14 +1135,14 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_utility_x86_32
 +CONFIG_HAS_IOMEM=y
 +CONFIG_HAS_IOPORT=y
 +CONFIG_HAS_DMA=y
-diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
+diff -r 5e428261bbe7 buildconfigs/linux-defconfig_xen_x86_32
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/buildconfigs/linux-defconfig_xen_x86_32  Thu Mar 26 15:39:49 2009 +0000
-@@ -0,0 +1,2617 @@
++++ b/buildconfigs/linux-defconfig_xen_x86_32  Thu Jun 04 15:14:24 2009 +0100
+@@ -0,0 +1,2627 @@
 +#
 +# Automatically generated make config: don't edit
-+# Linux kernel version: 2.6.27.19
-+# Thu Mar 26 15:31:08 2009
++# Linux kernel version: 2.6.27.19-5.1
++# Fri May 15 16:20:40 2009
 +#
 +# CONFIG_64BIT is not set
 +CONFIG_X86_32=y
@@ -1734,6 +1734,7 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
 +CONFIG_NET_SCH_GRED=m
 +CONFIG_NET_SCH_DSMARK=m
 +CONFIG_NET_SCH_NETEM=m
++# CONFIG_NET_SCH_INGRESS is not set
 +
 +#
 +# Classification
@@ -1757,7 +1758,15 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
 +CONFIG_NET_EMATCH_U32=m
 +CONFIG_NET_EMATCH_META=m
 +CONFIG_NET_EMATCH_TEXT=m
-+# CONFIG_NET_CLS_ACT is not set
++CONFIG_NET_CLS_ACT=y
++CONFIG_NET_ACT_POLICE=m
++# CONFIG_NET_ACT_GACT is not set
++# CONFIG_NET_ACT_MIRRED is not set
++# CONFIG_NET_ACT_IPT is not set
++# CONFIG_NET_ACT_NAT is not set
++# CONFIG_NET_ACT_PEDIT is not set
++# CONFIG_NET_ACT_SIMP is not set
++# CONFIG_NET_ACT_SKBEDIT is not set
 +# CONFIG_NET_CLS_IND is not set
 +CONFIG_NET_SCH_FIFO=y
 +# CONFIG_DCB is not set
@@ -2052,7 +2061,7 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
 +CONFIG_SCSI_SRP=m
 +# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
 +# CONFIG_SCSI_DH is not set
-+CONFIG_SCSI_BNX2_ISCSI=m
++# CONFIG_SCSI_BNX2_ISCSI is not set
 +CONFIG_ATA=m
 +# CONFIG_ATA_NONSTANDARD is not set
 +CONFIG_ATA_ACPI=y
@@ -2178,6 +2187,7 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
 +CONFIG_I2O_PROC=m
 +# CONFIG_MACINTOSH_DRIVERS is not set
 +CONFIG_NETDEVICES=y
++# CONFIG_IFB is not set
 +CONFIG_DUMMY=m
 +CONFIG_BONDING=m
 +# CONFIG_MACVLAN is not set
@@ -3756,3 +3766,2583 @@ diff -r 029bcc5b920d buildconfigs/linux-defconfig_xen_x86_32
 +CONFIG_HAS_IOPORT=y
 +CONFIG_HAS_DMA=y
 +CONFIG_CHECK_SIGNATURE=y
+diff -r 5e428261bbe7 buildconfigs/linux-defconfig_xen_x86_64
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/buildconfigs/linux-defconfig_xen_x86_64  Thu Jun 04 15:14:24 2009 +0100
+@@ -0,0 +1,2576 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.27.19-5.1
++# Thu Jun  4 14:43:28 2009
++#
++CONFIG_64BIT=y
++# CONFIG_X86_32 is not set
++CONFIG_X86_64=y
++CONFIG_X86=y
++CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
++# CONFIG_GENERIC_LOCKBREAK is not set
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CMOS_UPDATE=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_FAST_CMPXCHG_LOCAL=y
++CONFIG_MMU=y
++CONFIG_ZONE_DMA=y
++CONFIG_GENERIC_ISA_DMA=y
++CONFIG_GENERIC_IOMAP=y
++CONFIG_GENERIC_BUG=y
++CONFIG_GENERIC_HWEIGHT=y
++# CONFIG_GENERIC_GPIO is not set
++CONFIG_ARCH_MAY_HAVE_PC_FDC=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_TIME_VSYSCALL=y
++CONFIG_ARCH_HAS_CPU_RELAX=y
++CONFIG_ARCH_HAS_DEFAULT_IDLE=y
++CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
++CONFIG_HAVE_SETUP_PER_CPU_AREA=y
++CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
++CONFIG_ARCH_SUSPEND_POSSIBLE=y
++CONFIG_ZONE_DMA32=y
++CONFIG_ARCH_POPULATES_NODE_MAP=y
++CONFIG_AUDIT_ARCH=y
++CONFIG_ARCH_SUPPORTS_AOUT=y
++CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_GENERIC_PENDING_IRQ=y
++CONFIG_X86_SMP=y
++CONFIG_X86_64_SMP=y
++CONFIG_X86_NO_TSS=y
++CONFIG_X86_NO_IDT=y
++# CONFIG_KTIME_SCALAR is not set
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SUSE_KERNEL=y
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++CONFIG_SYSVIPC_SYSCTL=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_BSD_PROCESS_ACCT=y
++CONFIG_BSD_PROCESS_ACCT_V3=y
++CONFIG_TASKSTATS=y
++CONFIG_TASK_DELAY_ACCT=y
++# CONFIG_TASK_XACCT is not set
++# CONFIG_AUDIT is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_LOG_BUF_SHIFT=14
++# CONFIG_CGROUPS is not set
++CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
++# CONFIG_GROUP_SCHED is not set
++CONFIG_SYSFS_DEPRECATED=y
++CONFIG_SYSFS_DEPRECATED_V2=y
++# CONFIG_RELAY is not set
++CONFIG_NAMESPACES=y
++# CONFIG_UTS_NS is not set
++# CONFIG_IPC_NS is not set
++# CONFIG_USER_NS is not set
++# CONFIG_PID_NS is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++CONFIG_SYSCTL=y
++# CONFIG_EMBEDDED is not set
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++CONFIG_KALLSYMS_ALL=y
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_PCSPKR_PLATFORM=y
++# CONFIG_COMPAT_BRK is not set
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_ANON_INODES=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++# CONFIG_TRACEPOINTS is not set
++# CONFIG_MARKERS is not set
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
++CONFIG_HAVE_IOREMAP_PROT=y
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_ARCH_TRACEHOOK=y
++# CONFIG_HAVE_DMA_ATTRS is not set
++CONFIG_USE_GENERIC_SMP_HELPERS=y
++# CONFIG_HAVE_CLK is not set
++CONFIG_PROC_PAGE_MONITOR=y
++# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_KMOD=y
++CONFIG_STOP_MACHINE=y
++CONFIG_UTRACE=y
++CONFIG_BLOCK=y
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++CONFIG_BLOCK_COMPAT=y
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++# CONFIG_DEFAULT_AS is not set
++# CONFIG_DEFAULT_DEADLINE is not set
++CONFIG_DEFAULT_CFQ=y
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="cfq"
++CONFIG_CLASSIC_RCU=y
++# CONFIG_FREEZER is not set
++
++#
++# Processor type and features
++#
++# CONFIG_TICK_ONESHOT is not set
++CONFIG_SMP=y
++CONFIG_X86_FIND_SMP_CONFIG=y
++CONFIG_X86_MPPARSE=y
++# CONFIG_X86_PC is not set
++# CONFIG_X86_XEN is not set
++# CONFIG_X86_ELAN is not set
++# CONFIG_X86_VOYAGER is not set
++# CONFIG_X86_GENERICARCH is not set
++CONFIG_X86_64_XEN=y
++# CONFIG_X86_VSMP is not set
++# CONFIG_M386 is not set
++# CONFIG_M486 is not set
++# CONFIG_M586 is not set
++# CONFIG_M586TSC is not set
++# CONFIG_M586MMX is not set
++# CONFIG_M686 is not set
++# CONFIG_MPENTIUMII is not set
++# CONFIG_MPENTIUMIII is not set
++# CONFIG_MPENTIUMM is not set
++# CONFIG_MPENTIUM4 is not set
++# CONFIG_MK6 is not set
++# CONFIG_MK7 is not set
++# CONFIG_MK8 is not set
++# CONFIG_MCRUSOE is not set
++# CONFIG_MEFFICEON is not set
++# CONFIG_MWINCHIPC6 is not set
++# CONFIG_MWINCHIP2 is not set
++# CONFIG_MWINCHIP3D is not set
++# CONFIG_MGEODEGX1 is not set
++# CONFIG_MGEODE_LX is not set
++# CONFIG_MCYRIXIII is not set
++# CONFIG_MVIAC3_2 is not set
++# CONFIG_MVIAC7 is not set
++# CONFIG_MPSC is not set
++# CONFIG_MCORE2 is not set
++CONFIG_GENERIC_CPU=y
++CONFIG_X86_CPU=y
++CONFIG_X86_L1_CACHE_BYTES=128
++CONFIG_X86_INTERNODE_CACHE_BYTES=128
++CONFIG_X86_CMPXCHG=y
++CONFIG_X86_L1_CACHE_SHIFT=7
++CONFIG_X86_WP_WORKS_OK=y
++CONFIG_X86_CMPXCHG64=y
++CONFIG_X86_CMOV=y
++CONFIG_X86_MINIMUM_CPU_FAMILY=64
++CONFIG_X86_DEBUGCTLMSR=y
++CONFIG_DMI=y
++CONFIG_SWIOTLB=y
++CONFIG_IOMMU_HELPER=y
++# CONFIG_MAXSMP is not set
++CONFIG_NR_CPUS=32
++# CONFIG_PREEMPT_NONE is not set
++CONFIG_PREEMPT_VOLUNTARY=y
++# CONFIG_PREEMPT is not set
++# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
++CONFIG_X86_LOCAL_APIC=y
++CONFIG_X86_IO_APIC=y
++CONFIG_X86_XEN_GENAPIC=y
++# CONFIG_I8K is not set
++CONFIG_MICROCODE=m
++CONFIG_MICROCODE_OLD_INTERFACE=y
++CONFIG_X86_MSR=y
++CONFIG_X86_CPUID=m
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++# CONFIG_SPARSEMEM_STATIC is not set
++# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++CONFIG_RESOURCES_64BIT=y
++CONFIG_ZONE_DMA_FLAG=1
++CONFIG_BOUNCE=y
++CONFIG_VIRT_TO_BUS=y
++CONFIG_MTRR=y
++# CONFIG_X86_PAT is not set
++CONFIG_SECCOMP=y
++# CONFIG_SECCOMP_DISABLE_TSC is not set
++CONFIG_HZ_100=y
++# CONFIG_HZ_250 is not set
++# CONFIG_HZ_300 is not set
++# CONFIG_HZ_1000 is not set
++CONFIG_HZ=100
++# CONFIG_SCHED_HRTICK is not set
++CONFIG_KEXEC=y
++CONFIG_PHYSICAL_START=0x200000
++CONFIG_PHYSICAL_ALIGN=0x200000
++CONFIG_HOTPLUG_CPU=y
++# CONFIG_COMPAT_VDSO is not set
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_DEBUG is not set
++# CONFIG_SUSPEND is not set
++CONFIG_ACPI=y
++# CONFIG_ACPI_PROCFS is not set
++# CONFIG_ACPI_PROCFS_POWER is not set
++CONFIG_ACPI_SYSFS_POWER=y
++# CONFIG_ACPI_PROC_EVENT is not set
++CONFIG_ACPI_AC=m
++CONFIG_ACPI_BATTERY=m
++CONFIG_ACPI_BUTTON=m
++CONFIG_ACPI_FAN=m
++CONFIG_ACPI_DOCK=m
++CONFIG_ACPI_PROCESSOR=m
++CONFIG_ACPI_HOTPLUG_CPU=y
++CONFIG_ACPI_THERMAL=m
++# CONFIG_ACPI_WMI is not set
++CONFIG_ACPI_ASUS=m
++CONFIG_ACPI_TOSHIBA=m
++# CONFIG_ACPI_CUSTOM_DSDT is not set
++# CONFIG_ACPI_CUSTOM_DSDT_INITRD is not set
++CONFIG_ACPI_BLACKLIST_YEAR=0
++# CONFIG_ACPI_DEBUG is not set
++CONFIG_ACPI_EC=y
++# CONFIG_ACPI_PCI_SLOT is not set
++CONFIG_ACPI_POWER=y
++CONFIG_ACPI_SYSTEM=y
++CONFIG_ACPI_CONTAINER=m
++CONFIG_ACPI_SBS=m
++CONFIG_PROCESSOR_EXTERNAL_CONTROL=y
++
++#
++# CPU Frequency scaling
++#
++
++#
++# Bus options (PCI etc.)
++#
++CONFIG_PCI=y
++CONFIG_PCI_DIRECT=y
++CONFIG_PCI_MMCONFIG=y
++CONFIG_PCI_DOMAINS=y
++CONFIG_XEN_PCIDEV_FRONTEND=y
++# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
++# CONFIG_PCIEPORTBUS is not set
++CONFIG_ARCH_SUPPORTS_MSI=y
++CONFIG_PCI_MSI=y
++CONFIG_PCI_REASSIGN=y
++CONFIG_PCI_LEGACY=y
++# CONFIG_PCI_DEBUG is not set
++CONFIG_ISA_DMA_API=y
++CONFIG_K8_NB=y
++CONFIG_PCCARD=m
++# CONFIG_PCMCIA_DEBUG is not set
++CONFIG_PCMCIA=m
++CONFIG_PCMCIA_LOAD_CIS=y
++CONFIG_PCMCIA_IOCTL=y
++CONFIG_CARDBUS=y
++
++#
++# PC-card bridges
++#
++CONFIG_YENTA=m
++CONFIG_YENTA_O2=y
++CONFIG_YENTA_RICOH=y
++CONFIG_YENTA_TI=y
++CONFIG_YENTA_ENE_TUNE=y
++CONFIG_YENTA_TOSHIBA=y
++CONFIG_PD6729=m
++CONFIG_I82092=m
++CONFIG_PCCARD_NONSTATIC=m
++# CONFIG_HOTPLUG_PCI is not set
++
++#
++# Executable file formats / Emulations
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_COMPAT_BINFMT_ELF=y
++CONFIG_BINFMT_MISC=m
++CONFIG_IA32_EMULATION=y
++# CONFIG_IA32_AOUT is not set
++CONFIG_COMPAT=y
++CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
++CONFIG_SYSVIPC_COMPAT=y
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++CONFIG_XFRM=y
++CONFIG_XFRM_USER=m
++# CONFIG_XFRM_SUB_POLICY is not set
++# CONFIG_XFRM_MIGRATE is not set
++# CONFIG_XFRM_STATISTICS is not set
++CONFIG_XFRM_IPCOMP=m
++CONFIG_NET_KEY=m
++# CONFIG_NET_KEY_MIGRATE is not set
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_IP_ADVANCED_ROUTER=y
++CONFIG_ASK_IP_FIB_HASH=y
++# CONFIG_IP_FIB_TRIE is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_MULTIPLE_TABLES=y
++CONFIG_IP_ROUTE_MULTIPATH=y
++CONFIG_IP_ROUTE_VERBOSE=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++# CONFIG_IP_PNP_BOOTP is not set
++# CONFIG_IP_PNP_RARP is not set
++CONFIG_NET_IPIP=m
++CONFIG_NET_IPGRE=m
++CONFIG_NET_IPGRE_BROADCAST=y
++CONFIG_IP_MROUTE=y
++CONFIG_IP_PIMSM_V1=y
++CONFIG_IP_PIMSM_V2=y
++# CONFIG_ARPD is not set
++CONFIG_SYN_COOKIES=y
++CONFIG_INET_AH=m
++CONFIG_INET_ESP=m
++CONFIG_INET_IPCOMP=m
++CONFIG_INET_XFRM_TUNNEL=m
++CONFIG_INET_TUNNEL=m
++CONFIG_INET_XFRM_MODE_TRANSPORT=m
++CONFIG_INET_XFRM_MODE_TUNNEL=m
++# CONFIG_INET_XFRM_MODE_BEET is not set
++CONFIG_INET_LRO=y
++CONFIG_INET_DIAG=m
++CONFIG_INET_TCP_DIAG=m
++CONFIG_TCP_CONG_ADVANCED=y
++CONFIG_TCP_CONG_BIC=m
++CONFIG_TCP_CONG_CUBIC=m
++CONFIG_TCP_CONG_WESTWOOD=m
++CONFIG_TCP_CONG_HTCP=m
++CONFIG_TCP_CONG_HSTCP=m
++CONFIG_TCP_CONG_HYBLA=m
++CONFIG_TCP_CONG_VEGAS=m
++CONFIG_TCP_CONG_SCALABLE=m
++CONFIG_TCP_CONG_LP=m
++CONFIG_TCP_CONG_VENO=m
++# CONFIG_TCP_CONG_YEAH is not set
++# CONFIG_TCP_CONG_ILLINOIS is not set
++# CONFIG_DEFAULT_BIC is not set
++# CONFIG_DEFAULT_CUBIC is not set
++# CONFIG_DEFAULT_HTCP is not set
++# CONFIG_DEFAULT_VEGAS is not set
++# CONFIG_DEFAULT_WESTWOOD is not set
++CONFIG_DEFAULT_RENO=y
++CONFIG_DEFAULT_TCP_CONG="reno"
++# CONFIG_TCP_MD5SIG is not set
++CONFIG_IP_VS=m
++# CONFIG_IP_VS_DEBUG is not set
++CONFIG_IP_VS_TAB_BITS=12
++
++#
++# IPVS transport protocol load balancing support
++#
++CONFIG_IP_VS_PROTO_TCP=y
++CONFIG_IP_VS_PROTO_UDP=y
++CONFIG_IP_VS_PROTO_ESP=y
++CONFIG_IP_VS_PROTO_AH=y
++
++#
++# IPVS scheduler
++#
++CONFIG_IP_VS_RR=m
++CONFIG_IP_VS_WRR=m
++CONFIG_IP_VS_LC=m
++CONFIG_IP_VS_WLC=m
++CONFIG_IP_VS_LBLC=m
++CONFIG_IP_VS_LBLCR=m
++CONFIG_IP_VS_DH=m
++CONFIG_IP_VS_SH=m
++CONFIG_IP_VS_SED=m
++CONFIG_IP_VS_NQ=m
++
++#
++# IPVS application helper
++#
++CONFIG_IP_VS_FTP=m
++CONFIG_IPV6=m
++CONFIG_IPV6_PRIVACY=y
++# CONFIG_IPV6_ROUTER_PREF is not set
++# CONFIG_IPV6_OPTIMISTIC_DAD is not set
++CONFIG_INET6_AH=m
++CONFIG_INET6_ESP=m
++CONFIG_INET6_IPCOMP=m
++# CONFIG_IPV6_MIP6 is not set
++CONFIG_INET6_XFRM_TUNNEL=m
++CONFIG_INET6_TUNNEL=m
++CONFIG_INET6_XFRM_MODE_TRANSPORT=m
++CONFIG_INET6_XFRM_MODE_TUNNEL=m
++# CONFIG_INET6_XFRM_MODE_BEET is not set
++# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
++# CONFIG_IPV6_SIT is not set
++CONFIG_IPV6_TUNNEL=m
++# CONFIG_IPV6_MULTIPLE_TABLES is not set
++# CONFIG_IPV6_MROUTE is not set
++# CONFIG_NETLABEL is not set
++CONFIG_NETWORK_SECMARK=y
++CONFIG_NETFILTER=y
++# CONFIG_NETFILTER_DEBUG is not set
++# CONFIG_NETFILTER_ADVANCED is not set
++
++#
++# Core Netfilter Configuration
++#
++CONFIG_NETFILTER_NETLINK=m
++CONFIG_NETFILTER_NETLINK_LOG=m
++CONFIG_NF_CONNTRACK=m
++# CONFIG_NF_CONNTRACK_SECMARK is not set
++# CONFIG_NF_CONNTRACK_FTP is not set
++# CONFIG_NF_CONNTRACK_IRC is not set
++# CONFIG_NF_CONNTRACK_SIP is not set
++# CONFIG_NF_CT_NETLINK is not set
++CONFIG_NETFILTER_XTABLES=m
++CONFIG_NETFILTER_XT_TARGET_MARK=m
++# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
++CONFIG_NETFILTER_XT_TARGET_SECMARK=m
++# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
++CONFIG_NETFILTER_XT_MATCH_MARK=m
++CONFIG_NETFILTER_XT_MATCH_POLICY=m
++CONFIG_NETFILTER_XT_MATCH_STATE=m
++
++#
++# IP: Netfilter Configuration
++#
++CONFIG_NF_CONNTRACK_IPV4=m
++CONFIG_NF_CONNTRACK_PROC_COMPAT=y
++CONFIG_IP_NF_IPTABLES=m
++# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
++CONFIG_IP_NF_FILTER=m
++CONFIG_IP_NF_TARGET_REJECT=m
++CONFIG_IP_NF_TARGET_LOG=m
++CONFIG_IP_NF_TARGET_ULOG=m
++CONFIG_NF_NAT=m
++CONFIG_NF_NAT_NEEDED=y
++CONFIG_IP_NF_TARGET_MASQUERADE=m
++# CONFIG_NF_NAT_FTP is not set
++# CONFIG_NF_NAT_IRC is not set
++# CONFIG_NF_NAT_TFTP is not set
++# CONFIG_NF_NAT_AMANDA is not set
++# CONFIG_NF_NAT_PPTP is not set
++# CONFIG_NF_NAT_H323 is not set
++# CONFIG_NF_NAT_SIP is not set
++CONFIG_IP_NF_MANGLE=m
++
++#
++# IPv6: Netfilter Configuration
++#
++# CONFIG_NF_CONNTRACK_IPV6 is not set
++CONFIG_IP6_NF_IPTABLES=m
++CONFIG_IP6_NF_MATCH_IPV6HEADER=m
++CONFIG_IP6_NF_FILTER=m
++CONFIG_IP6_NF_TARGET_LOG=m
++CONFIG_IP6_NF_TARGET_REJECT=m
++CONFIG_IP6_NF_MANGLE=m
++CONFIG_IP_DCCP=m
++CONFIG_INET_DCCP_DIAG=m
++CONFIG_IP_DCCP_ACKVEC=y
++
++#
++# DCCP CCIDs Configuration (EXPERIMENTAL)
++#
++CONFIG_IP_DCCP_CCID2=m
++# CONFIG_IP_DCCP_CCID2_DEBUG is not set
++CONFIG_IP_DCCP_CCID3=m
++# CONFIG_IP_DCCP_CCID3_DEBUG is not set
++CONFIG_IP_DCCP_CCID3_RTO=100
++CONFIG_IP_DCCP_TFRC_LIB=m
++
++#
++# DCCP Kernel Hacking
++#
++# CONFIG_IP_DCCP_DEBUG is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++CONFIG_STP=m
++CONFIG_BRIDGE=m
++CONFIG_VLAN_8021Q=m
++# CONFIG_VLAN_8021Q_GVRP is not set
++# CONFIG_DECNET is not set
++CONFIG_LLC=m
++CONFIG_LLC2=m
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++CONFIG_LAPB=m
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++CONFIG_NET_SCHED=y
++
++#
++# Queueing/Scheduling
++#
++CONFIG_NET_SCH_CBQ=m
++CONFIG_NET_SCH_HTB=m
++CONFIG_NET_SCH_HFSC=m
++CONFIG_NET_SCH_PRIO=m
++# CONFIG_NET_SCH_MULTIQ is not set
++CONFIG_NET_SCH_RED=m
++CONFIG_NET_SCH_SFQ=m
++CONFIG_NET_SCH_TEQL=m
++CONFIG_NET_SCH_TBF=m
++CONFIG_NET_SCH_GRED=m
++CONFIG_NET_SCH_DSMARK=m
++CONFIG_NET_SCH_NETEM=m
++# CONFIG_NET_SCH_INGRESS is not set
++
++#
++# Classification
++#
++CONFIG_NET_CLS=y
++CONFIG_NET_CLS_BASIC=m
++CONFIG_NET_CLS_TCINDEX=m
++CONFIG_NET_CLS_ROUTE4=m
++CONFIG_NET_CLS_ROUTE=y
++CONFIG_NET_CLS_FW=m
++CONFIG_NET_CLS_U32=m
++CONFIG_CLS_U32_PERF=y
++CONFIG_CLS_U32_MARK=y
++CONFIG_NET_CLS_RSVP=m
++CONFIG_NET_CLS_RSVP6=m
++# CONFIG_NET_CLS_FLOW is not set
++CONFIG_NET_EMATCH=y
++CONFIG_NET_EMATCH_STACK=32
++CONFIG_NET_EMATCH_CMP=m
++CONFIG_NET_EMATCH_NBYTE=m
++CONFIG_NET_EMATCH_U32=m
++CONFIG_NET_EMATCH_META=m
++CONFIG_NET_EMATCH_TEXT=m
++CONFIG_NET_CLS_ACT=y
++CONFIG_NET_ACT_POLICE=m
++# CONFIG_NET_ACT_GACT is not set
++# CONFIG_NET_ACT_MIRRED is not set
++# CONFIG_NET_ACT_IPT is not set
++# CONFIG_NET_ACT_NAT is not set
++# CONFIG_NET_ACT_PEDIT is not set
++# CONFIG_NET_ACT_SIMP is not set
++# CONFIG_NET_ACT_SKBEDIT is not set
++# CONFIG_NET_CLS_IND is not set
++CONFIG_NET_SCH_FIFO=y
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++CONFIG_NET_PKTGEN=m
++CONFIG_HAMRADIO=y
++
++#
++# Packet Radio protocols
++#
++# CONFIG_AX25 is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++CONFIG_FIB_RULES=y
++
++#
++# Wireless
++#
++# CONFIG_CFG80211 is not set
++CONFIG_WIRELESS_EXT=y
++# CONFIG_WIRELESS_EXT_SYSFS is not set
++# CONFIG_MAC80211 is not set
++CONFIG_IEEE80211=m
++# CONFIG_IEEE80211_DEBUG is not set
++CONFIG_IEEE80211_CRYPT_WEP=m
++CONFIG_IEEE80211_CRYPT_CCMP=m
++CONFIG_IEEE80211_CRYPT_TKIP=m
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++# CONFIG_NETVM is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++CONFIG_FIRMWARE_IN_KERNEL=y
++CONFIG_EXTRA_FIRMWARE=""
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++CONFIG_SYS_HYPERVISOR=y
++CONFIG_CONNECTOR=m
++# CONFIG_MTD is not set
++CONFIG_PARPORT=m
++CONFIG_PARPORT_PC=m
++CONFIG_PARPORT_SERIAL=m
++CONFIG_PARPORT_PC_FIFO=y
++CONFIG_PARPORT_PC_SUPERIO=y
++CONFIG_PARPORT_PC_PCMCIA=m
++# CONFIG_PARPORT_GSC is not set
++CONFIG_PARPORT_AX88796=m
++CONFIG_PARPORT_1284=y
++CONFIG_PARPORT_NOT_PC=y
++CONFIG_PNP=y
++# CONFIG_PNP_DEBUG is not set
++
++#
++# Protocols
++#
++CONFIG_PNPACPI=y
++CONFIG_BLK_DEV=y
++CONFIG_BLK_DEV_FD=y
++# CONFIG_PARIDE is not set
++CONFIG_BLK_CPQ_DA=m
++CONFIG_BLK_CPQ_CISS_DA=m
++CONFIG_CISS_SCSI_TAPE=y
++CONFIG_BLK_DEV_DAC960=m
++CONFIG_BLK_DEV_UMEM=m
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_CRYPTOLOOP=m
++CONFIG_BLK_DEV_NBD=m
++CONFIG_BLK_DEV_SX8=m
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++# CONFIG_BLK_DEV_XIP is not set
++CONFIG_CDROM_PKTCDVD=m
++CONFIG_CDROM_PKTCDVD_BUFFERS=8
++CONFIG_CDROM_PKTCDVD_WCACHE=y
++CONFIG_ATA_OVER_ETH=m
++# CONFIG_CIPHER_TWOFISH is not set
++# CONFIG_BLK_DEV_HD is not set
++CONFIG_MISC_DEVICES=y
++CONFIG_IBM_ASM=m
++# CONFIG_PHANTOM is not set
++# CONFIG_EEPROM_93CX6 is not set
++# CONFIG_SGI_IOC4 is not set
++# CONFIG_TIFM_CORE is not set
++# CONFIG_ACER_WMI is not set
++# CONFIG_ASUS_LAPTOP is not set
++# CONFIG_FUJITSU_LAPTOP is not set
++# CONFIG_MSI_LAPTOP is not set
++# CONFIG_PANASONIC_LAPTOP is not set
++# CONFIG_COMPAL_LAPTOP is not set
++# CONFIG_SONY_LAPTOP is not set
++# CONFIG_THINKPAD_ACPI is not set
++# CONFIG_INTEL_MENLOW is not set
++# CONFIG_EEEPC_LAPTOP is not set
++# CONFIG_ENCLOSURE_SERVICES is not set
++# CONFIG_HP_ILO is not set
++CONFIG_HAVE_IDE=y
++CONFIG_IDE=y
++CONFIG_BLK_DEV_IDE=y
++
++#
++# Please see Documentation/ide/ide.txt for help/info on IDE drives
++#
++CONFIG_IDE_TIMINGS=y
++CONFIG_IDE_ATAPI=y
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=m
++CONFIG_IDEDISK_MULTI_MODE=y
++CONFIG_BLK_DEV_IDECS=m
++# CONFIG_BLK_DEV_DELKIN is not set
++CONFIG_BLK_DEV_IDECD=m
++CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
++CONFIG_BLK_DEV_IDETAPE=m
++CONFIG_BLK_DEV_IDEFLOPPY=m
++CONFIG_BLK_DEV_IDESCSI=m
++# CONFIG_BLK_DEV_IDEACPI is not set
++# CONFIG_IDE_TASK_IOCTL is not set
++CONFIG_IDE_PROC_FS=y
++
++#
++# IDE chipset support/bugfixes
++#
++CONFIG_IDE_GENERIC=m
++# CONFIG_BLK_DEV_PLATFORM is not set
++CONFIG_BLK_DEV_CMD640=y
++CONFIG_BLK_DEV_CMD640_ENHANCED=y
++CONFIG_BLK_DEV_IDEPNP=y
++CONFIG_BLK_DEV_IDEDMA_SFF=y
++
++#
++# PCI IDE chipsets support
++#
++CONFIG_BLK_DEV_IDEPCI=y
++# CONFIG_IDEPCI_PCIBUS_ORDER is not set
++CONFIG_BLK_DEV_OFFBOARD=y
++CONFIG_BLK_DEV_GENERIC=y
++CONFIG_BLK_DEV_OPTI621=m
++CONFIG_BLK_DEV_RZ1000=m
++CONFIG_BLK_DEV_IDEDMA_PCI=y
++CONFIG_BLK_DEV_AEC62XX=m
++CONFIG_BLK_DEV_ALI15X3=m
++CONFIG_BLK_DEV_AMD74XX=m
++CONFIG_BLK_DEV_ATIIXP=m
++CONFIG_BLK_DEV_CMD64X=m
++CONFIG_BLK_DEV_TRIFLEX=m
++CONFIG_BLK_DEV_CS5520=m
++CONFIG_BLK_DEV_CS5530=m
++CONFIG_BLK_DEV_HPT366=m
++CONFIG_BLK_DEV_JMICRON=m
++CONFIG_BLK_DEV_SC1200=m
++CONFIG_BLK_DEV_PIIX=m
++CONFIG_BLK_DEV_IT8213=m
++CONFIG_BLK_DEV_IT821X=m
++CONFIG_BLK_DEV_NS87415=m
++CONFIG_BLK_DEV_PDC202XX_OLD=m
++CONFIG_BLK_DEV_PDC202XX_NEW=m
++CONFIG_BLK_DEV_SVWKS=m
++CONFIG_BLK_DEV_SIIMAGE=m
++CONFIG_BLK_DEV_SIS5513=m
++CONFIG_BLK_DEV_SLC90E66=m
++CONFIG_BLK_DEV_TRM290=m
++CONFIG_BLK_DEV_VIA82CXXX=m
++CONFIG_BLK_DEV_TC86C001=m
++CONFIG_BLK_DEV_IDEDMA=y
++
++#
++# SCSI device support
++#
++CONFIG_RAID_ATTRS=m
++CONFIG_SCSI=m
++CONFIG_SCSI_DMA=y
++CONFIG_SCSI_TGT=m
++CONFIG_SCSI_NETLINK=y
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=m
++CONFIG_CHR_DEV_ST=m
++CONFIG_CHR_DEV_OSST=m
++CONFIG_BLK_DEV_SR=m
++# CONFIG_BLK_DEV_SR_VENDOR is not set
++CONFIG_CHR_DEV_SG=m
++CONFIG_CHR_DEV_SCH=m
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++CONFIG_SCSI_MULTI_LUN=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_LOGGING=y
++# CONFIG_SCSI_SCAN_ASYNC is not set
++CONFIG_SCSI_WAIT_SCAN=m
++
++#
++# SCSI Transports
++#
++CONFIG_SCSI_SPI_ATTRS=m
++CONFIG_SCSI_FC_ATTRS=m
++# CONFIG_SCSI_FC_TGT_ATTRS is not set
++CONFIG_SCSI_ISCSI_ATTRS=m
++CONFIG_SCSI_SAS_ATTRS=m
++CONFIG_SCSI_SAS_LIBSAS=m
++CONFIG_SCSI_SAS_ATA=y
++CONFIG_SCSI_SAS_HOST_SMP=y
++# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
++# CONFIG_SCSI_SRP_ATTRS is not set
++CONFIG_SCSI_LOWLEVEL=y
++CONFIG_ISCSI_TCP=m
++CONFIG_SCSI_CXGB3_ISCSI=m
++CONFIG_BLK_DEV_3W_XXXX_RAID=m
++CONFIG_SCSI_3W_9XXX=m
++CONFIG_SCSI_ACARD=m
++CONFIG_SCSI_AACRAID=m
++CONFIG_SCSI_AIC7XXX=m
++CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
++CONFIG_AIC7XXX_RESET_DELAY_MS=15000
++CONFIG_AIC7XXX_DEBUG_ENABLE=y
++CONFIG_AIC7XXX_DEBUG_MASK=0
++CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
++CONFIG_SCSI_AIC7XXX_OLD=m
++CONFIG_SCSI_AIC79XX=m
++CONFIG_AIC79XX_CMDS_PER_DEVICE=32
++CONFIG_AIC79XX_RESET_DELAY_MS=15000
++CONFIG_AIC79XX_DEBUG_ENABLE=y
++CONFIG_AIC79XX_DEBUG_MASK=0
++CONFIG_AIC79XX_REG_PRETTY_PRINT=y
++CONFIG_SCSI_AIC94XX=m
++# CONFIG_AIC94XX_DEBUG is not set
++CONFIG_SCSI_DPT_I2O=m
++# CONFIG_SCSI_ADVANSYS is not set
++CONFIG_SCSI_ARCMSR=m
++CONFIG_MEGARAID_NEWGEN=y
++CONFIG_MEGARAID_MM=m
++CONFIG_MEGARAID_MAILBOX=m
++CONFIG_MEGARAID_LEGACY=m
++CONFIG_MEGARAID_SAS=m
++# CONFIG_SCSI_HPTIOP is not set
++# CONFIG_SCSI_BUSLOGIC is not set
++# CONFIG_LIBFC is not set
++# CONFIG_FCOE is not set
++CONFIG_SCSI_DMX3191D=m
++CONFIG_SCSI_EATA=m
++CONFIG_SCSI_EATA_TAGGED_QUEUE=y
++CONFIG_SCSI_EATA_LINKED_COMMANDS=y
++CONFIG_SCSI_EATA_MAX_TAGS=16
++CONFIG_SCSI_FUTURE_DOMAIN=m
++CONFIG_SCSI_GDTH=m
++CONFIG_SCSI_IPS=m
++CONFIG_SCSI_INITIO=m
++CONFIG_SCSI_INIA100=m
++CONFIG_SCSI_PPA=m
++CONFIG_SCSI_IMM=m
++# CONFIG_SCSI_IZIP_EPP16 is not set
++# CONFIG_SCSI_IZIP_SLOW_CTR is not set
++CONFIG_SCSI_MVSAS=m
++CONFIG_SCSI_STEX=m
++CONFIG_SCSI_SYM53C8XX_2=m
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
++CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
++CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
++CONFIG_SCSI_SYM53C8XX_MMIO=y
++# CONFIG_SCSI_IPR is not set
++CONFIG_SCSI_QLOGIC_1280=m
++# CONFIG_SCSI_QLA_FC is not set
++# CONFIG_SCSI_QLA_ISCSI is not set
++# CONFIG_SCSI_LPFC is not set
++CONFIG_SCSI_DC395x=m
++CONFIG_SCSI_DC390T=m
++# CONFIG_SCSI_DEBUG is not set
++CONFIG_SCSI_SRP=m
++# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
++# CONFIG_SCSI_DH is not set
++# CONFIG_SCSI_BNX2_ISCSI is not set
++CONFIG_ATA=m
++# CONFIG_ATA_NONSTANDARD is not set
++CONFIG_ATA_ACPI=y
++# CONFIG_SATA_PMP is not set
++CONFIG_SATA_AHCI=m
++CONFIG_SATA_SIL24=m
++CONFIG_ATA_SFF=y
++CONFIG_SATA_SVW=m
++CONFIG_ATA_PIIX=m
++CONFIG_SATA_MV=m
++CONFIG_SATA_NV=m
++CONFIG_PDC_ADMA=m
++CONFIG_SATA_QSTOR=m
++CONFIG_SATA_PROMISE=m
++CONFIG_SATA_SX4=m
++CONFIG_SATA_SIL=m
++CONFIG_SATA_SIS=m
++CONFIG_SATA_ULI=m
++CONFIG_SATA_VIA=m
++CONFIG_SATA_VITESSE=m
++# CONFIG_SATA_INIC162X is not set
++# CONFIG_PATA_ACPI is not set
++# CONFIG_PATA_ALI is not set
++# CONFIG_PATA_AMD is not set
++CONFIG_PATA_ARTOP=m
++# CONFIG_PATA_ATIIXP is not set
++# CONFIG_PATA_CMD640_PCI is not set
++# CONFIG_PATA_CMD64X is not set
++# CONFIG_PATA_CS5520 is not set
++# CONFIG_PATA_CS5530 is not set
++# CONFIG_PATA_CYPRESS is not set
++CONFIG_PATA_EFAR=m
++# CONFIG_ATA_GENERIC is not set
++# CONFIG_PATA_HPT366 is not set
++CONFIG_PATA_HPT37X=m
++CONFIG_PATA_HPT3X2N=m
++# CONFIG_PATA_HPT3X3 is not set
++CONFIG_PATA_IT821X=m
++CONFIG_PATA_IT8213=m
++CONFIG_PATA_JMICRON=m
++# CONFIG_PATA_TRIFLEX is not set
++CONFIG_PATA_MARVELL=m
++# CONFIG_PATA_MPIIX is not set
++# CONFIG_PATA_OLDPIIX is not set
++CONFIG_PATA_NETCELL=m
++# CONFIG_PATA_NINJA32 is not set
++# CONFIG_PATA_NS87410 is not set
++# CONFIG_PATA_NS87415 is not set
++CONFIG_PATA_OPTI=m
++CONFIG_PATA_OPTIDMA=m
++# CONFIG_PATA_PCMCIA is not set
++# CONFIG_PATA_PDC_OLD is not set
++CONFIG_PATA_RADISYS=m
++CONFIG_PATA_RZ1000=m
++# CONFIG_PATA_SC1200 is not set
++# CONFIG_PATA_SERVERWORKS is not set
++# CONFIG_PATA_PDC2027X is not set
++CONFIG_PATA_SIL680=m
++CONFIG_PATA_SIS=m
++# CONFIG_PATA_VIA is not set
++# CONFIG_PATA_WINBOND is not set
++# CONFIG_PATA_SCH is not set
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++CONFIG_MD_RAID10=m
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
++CONFIG_MD_MULTIPATH=m
++CONFIG_MD_FAULTY=m
++CONFIG_BLK_DEV_DM=m
++# CONFIG_DM_DEBUG is not set
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++# CONFIG_DM_DELAY is not set
++# CONFIG_DM_RAID45 is not set
++# CONFIG_DM_UEVENT is not set
++CONFIG_FUSION=y
++CONFIG_FUSION_SPI=m
++CONFIG_FUSION_FC=m
++CONFIG_FUSION_SAS=m
++CONFIG_FUSION_MAX_SGE=128
++CONFIG_FUSION_MAX_FC_SGE=256
++CONFIG_FUSION_CTL=m
++CONFIG_FUSION_LAN=m
++# CONFIG_FUSION_LOGGING is not set
++
++#
++# IEEE 1394 (FireWire) support
++#
++
++#
++# Enable only one of the two stacks, unless you know what you are doing
++#
++# CONFIG_FIREWIRE is not set
++CONFIG_IEEE1394=m
++CONFIG_IEEE1394_OHCI1394=m
++CONFIG_IEEE1394_PCILYNX=m
++CONFIG_IEEE1394_SBP2=m
++# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
++CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
++CONFIG_IEEE1394_ETH1394=m
++CONFIG_IEEE1394_RAWIO=m
++CONFIG_IEEE1394_VIDEO1394=m
++CONFIG_IEEE1394_DV1394=m
++# CONFIG_IEEE1394_VERBOSEDEBUG is not set
++CONFIG_I2O=m
++CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
++CONFIG_I2O_EXT_ADAPTEC=y
++CONFIG_I2O_EXT_ADAPTEC_DMA64=y
++CONFIG_I2O_CONFIG=m
++CONFIG_I2O_CONFIG_OLD_IOCTL=y
++CONFIG_I2O_BUS=m
++CONFIG_I2O_BLOCK=m
++CONFIG_I2O_SCSI=m
++CONFIG_I2O_PROC=m
++# CONFIG_MACINTOSH_DRIVERS is not set
++CONFIG_NETDEVICES=y
++# CONFIG_IFB is not set
++CONFIG_DUMMY=m
++CONFIG_BONDING=m
++# CONFIG_MACVLAN is not set
++CONFIG_EQUALIZER=m
++CONFIG_TUN=m
++# CONFIG_VETH is not set
++CONFIG_NET_SB1000=m
++# CONFIG_ARCNET is not set
++CONFIG_PHYLIB=m
++
++#
++# MII PHY device drivers
++#
++CONFIG_MARVELL_PHY=m
++CONFIG_DAVICOM_PHY=m
++CONFIG_QSEMI_PHY=m
++CONFIG_LXT_PHY=m
++CONFIG_CICADA_PHY=m
++CONFIG_VITESSE_PHY=m
++CONFIG_SMSC_PHY=m
++CONFIG_BROADCOM_PHY=m
++CONFIG_ICPLUS_PHY=m
++CONFIG_REALTEK_PHY=m
++CONFIG_MDIO_BITBANG=m
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=m
++CONFIG_HAPPYMEAL=m
++CONFIG_SUNGEM=m
++CONFIG_CASSINI=m
++CONFIG_NET_VENDOR_3COM=y
++CONFIG_VORTEX=m
++CONFIG_TYPHOON=m
++CONFIG_ENC28J60=m
++# CONFIG_ENC28J60_WRITEVERIFY is not set
++CONFIG_NET_TULIP=y
++CONFIG_DE2104X=m
++CONFIG_TULIP=m
++# CONFIG_TULIP_MWI is not set
++# CONFIG_TULIP_MMIO is not set
++CONFIG_TULIP_NAPI=y
++CONFIG_TULIP_NAPI_HW_MITIGATION=y
++CONFIG_DE4X5=m
++CONFIG_WINBOND_840=m
++CONFIG_DM9102=m
++CONFIG_ULI526X=m
++CONFIG_PCMCIA_XIRCOM=m
++CONFIG_HP100=m
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
++CONFIG_NET_PCI=y
++CONFIG_PCNET32=m
++CONFIG_AMD8111_ETH=m
++CONFIG_ADAPTEC_STARFIRE=m
++CONFIG_B44=m
++CONFIG_B44_PCI_AUTOSELECT=y
++CONFIG_B44_PCICORE_AUTOSELECT=y
++CONFIG_B44_PCI=y
++CONFIG_FORCEDETH=m
++# CONFIG_FORCEDETH_NAPI is not set
++CONFIG_EEPRO100=m
++CONFIG_E100=m
++CONFIG_FEALNX=m
++CONFIG_NATSEMI=m
++CONFIG_NE2K_PCI=m
++CONFIG_8139CP=m
++CONFIG_8139TOO=m
++# CONFIG_8139TOO_PIO is not set
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++CONFIG_8139TOO_8129=y
++# CONFIG_8139_OLD_RX_RESET is not set
++# CONFIG_R6040 is not set
++CONFIG_SIS900=m
++CONFIG_EPIC100=m
++CONFIG_SUNDANCE=m
++# CONFIG_SUNDANCE_MMIO is not set
++CONFIG_TLAN=m
++CONFIG_VIA_RHINE=m
++# CONFIG_VIA_RHINE_MMIO is not set
++# CONFIG_SC92031 is not set
++CONFIG_NET_POCKET=y
++CONFIG_ATP=m
++CONFIG_DE600=m
++CONFIG_DE620=m
++CONFIG_ATL2=m
++CONFIG_NETDEV_1000=y
++CONFIG_ACENIC=m
++# CONFIG_ACENIC_OMIT_TIGON_I is not set
++CONFIG_DL2K=m
++CONFIG_E1000=m
++# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
++CONFIG_E1000E=m
++CONFIG_IP1000=m
++CONFIG_IGB=m
++CONFIG_IGB_LRO=y
++CONFIG_NS83820=m
++CONFIG_HAMACHI=m
++CONFIG_YELLOWFIN=m
++CONFIG_R8169=m
++CONFIG_R8169_VLAN=y
++CONFIG_SIS190=m
++CONFIG_SKGE=m
++CONFIG_SKY2=m
++CONFIG_VIA_VELOCITY=m
++CONFIG_TIGON3=m
++CONFIG_BNX2=m
++CONFIG_CNIC=m
++# CONFIG_QLA3XXX is not set
++CONFIG_ATL1=m
++CONFIG_ATL1E=m
++CONFIG_NETDEV_10000=y
++CONFIG_CHELSIO_T1=m
++CONFIG_CHELSIO_T1_1G=y
++CONFIG_CHELSIO_T3=m
++CONFIG_IXGBE=m
++CONFIG_IXGBE_LRO=y
++CONFIG_IXGB=m
++CONFIG_S2IO=m
++CONFIG_MYRI10GE=m
++# CONFIG_NETXEN_NIC is not set
++# CONFIG_NIU is not set
++# CONFIG_MLX4_CORE is not set
++CONFIG_TEHUTI=m
++CONFIG_BNX2X=m
++CONFIG_SFC=m
++CONFIG_SFC_DRIVERLINK=y
++CONFIG_SFC_RESOURCE=m
++# CONFIG_TR is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
++
++#
++# USB Network Adapters
++#
++CONFIG_USB_CATC=m
++CONFIG_USB_KAWETH=m
++CONFIG_USB_PEGASUS=m
++CONFIG_USB_RTL8150=m
++CONFIG_USB_USBNET=m
++CONFIG_USB_NET_AX8817X=m
++CONFIG_USB_NET_CDCETHER=m
++CONFIG_USB_NET_DM9601=m
++CONFIG_USB_NET_GL620A=m
++CONFIG_USB_NET_NET1080=m
++CONFIG_USB_NET_PLUSB=m
++CONFIG_USB_NET_MCS7830=m
++CONFIG_USB_NET_RNDIS_HOST=m
++CONFIG_USB_NET_CDC_SUBSET=m
++CONFIG_USB_ALI_M5632=y
++CONFIG_USB_AN2720=y
++CONFIG_USB_BELKIN=y
++CONFIG_USB_ARMLINUX=y
++# CONFIG_USB_EPSON2888 is not set
++# CONFIG_USB_KC2190 is not set
++CONFIG_USB_NET_ZAURUS=m
++CONFIG_NET_PCMCIA=y
++CONFIG_PCMCIA_3C589=m
++CONFIG_PCMCIA_3C574=m
++CONFIG_PCMCIA_FMVJ18X=m
++CONFIG_PCMCIA_PCNET=m
++CONFIG_PCMCIA_NMCLAN=m
++CONFIG_PCMCIA_SMC91C92=m
++CONFIG_PCMCIA_XIRC2PS=m
++CONFIG_PCMCIA_AXNET=m
++# CONFIG_WAN is not set
++CONFIG_FDDI=y
++# CONFIG_DEFXX is not set
++CONFIG_SKFP=m
++CONFIG_HIPPI=y
++CONFIG_ROADRUNNER=m
++CONFIG_ROADRUNNER_LARGE_RINGS=y
++CONFIG_PLIP=m
++CONFIG_PPP=m
++CONFIG_PPP_MULTILINK=y
++CONFIG_PPP_FILTER=y
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++CONFIG_PPPOE=m
++# CONFIG_PPPOL2TP is not set
++CONFIG_SLIP=m
++CONFIG_SLIP_COMPRESSED=y
++CONFIG_SLHC=m
++CONFIG_SLIP_SMART=y
++CONFIG_SLIP_MODE_SLIP6=y
++CONFIG_NET_FC=y
++CONFIG_NETCONSOLE=m
++# CONFIG_NETCONSOLE_DYNAMIC is not set
++CONFIG_NETPOLL=y
++CONFIG_NETPOLL_TRAP=y
++CONFIG_NET_POLL_CONTROLLER=y
++# CONFIG_ISDN is not set
++# CONFIG_PHONE is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++CONFIG_INPUT_FF_MEMLESS=m
++CONFIG_INPUT_POLLDEV=m
++
++#
++# Userland interfaces
++#
++CONFIG_INPUT_MOUSEDEV=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++CONFIG_INPUT_JOYDEV=m
++CONFIG_INPUT_EVDEV=m
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++CONFIG_KEYBOARD_ATKBD=y
++CONFIG_KEYBOARD_SUNKBD=m
++CONFIG_KEYBOARD_LKKBD=m
++CONFIG_KEYBOARD_XTKBD=m
++CONFIG_KEYBOARD_NEWTON=m
++CONFIG_KEYBOARD_STOWAWAY=m
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++CONFIG_MOUSE_PS2_ALPS=y
++CONFIG_MOUSE_PS2_LOGIPS2PP=y
++CONFIG_MOUSE_PS2_SYNAPTICS=y
++CONFIG_MOUSE_PS2_LIFEBOOK=y
++CONFIG_MOUSE_PS2_TRACKPOINT=y
++# CONFIG_MOUSE_PS2_TOUCHKIT is not set
++CONFIG_MOUSE_SERIAL=m
++# CONFIG_MOUSE_APPLETOUCH is not set
++# CONFIG_MOUSE_BCM5974 is not set
++CONFIG_MOUSE_VSXXXAA=m
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TABLET is not set
++CONFIG_INPUT_TOUCHSCREEN=y
++CONFIG_TOUCHSCREEN_ADS7846=m
++# CONFIG_TOUCHSCREEN_FUJITSU is not set
++CONFIG_TOUCHSCREEN_GUNZE=m
++CONFIG_TOUCHSCREEN_ELO=m
++# CONFIG_TOUCHSCREEN_ELOUSB is not set
++CONFIG_TOUCHSCREEN_MTOUCH=m
++# CONFIG_TOUCHSCREEN_INEXIO is not set
++CONFIG_TOUCHSCREEN_MK712=m
++# CONFIG_TOUCHSCREEN_PENMOUNT is not set
++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
++# CONFIG_TOUCHSCREEN_UCB1400 is not set
++# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
++# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_PCSPKR=m
++# CONFIG_INPUT_APANEL is not set
++# CONFIG_INPUT_ATLAS_BTNS is not set
++# CONFIG_INPUT_ATI_REMOTE is not set
++# CONFIG_INPUT_ATI_REMOTE2 is not set
++# CONFIG_INPUT_KEYSPAN_REMOTE is not set
++# CONFIG_INPUT_POWERMATE is not set
++# CONFIG_INPUT_YEALINK is not set
++CONFIG_INPUT_UINPUT=m
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_I8042=y
++CONFIG_SERIO_SERPORT=m
++CONFIG_SERIO_CT82C710=m
++CONFIG_SERIO_PARKBD=m
++CONFIG_SERIO_PCIPS2=m
++CONFIG_SERIO_LIBPS2=y
++CONFIG_SERIO_RAW=m
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_DEVKMEM is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++# CONFIG_NOZOMI is not set
++
++#
++# Serial drivers
++#
++CONFIG_SERIAL_8250=m
++CONFIG_FIX_EARLYCON_MEM=y
++CONFIG_SERIAL_8250_PCI=m
++CONFIG_SERIAL_8250_PNP=m
++# CONFIG_SERIAL_8250_CS is not set
++CONFIG_SERIAL_8250_NR_UARTS=4
++CONFIG_SERIAL_8250_RUNTIME_UARTS=4
++# CONFIG_SERIAL_8250_EXTENDED is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_CORE=m
++CONFIG_SERIAL_JSM=m
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++CONFIG_PRINTER=m
++# CONFIG_LP_CONSOLE is not set
++CONFIG_PPDEV=m
++CONFIG_IPMI_HANDLER=m
++# CONFIG_IPMI_PANIC_EVENT is not set
++CONFIG_IPMI_DEVICE_INTERFACE=m
++CONFIG_IPMI_SI=m
++CONFIG_IPMI_WATCHDOG=m
++CONFIG_IPMI_POWEROFF=m
++CONFIG_HW_RANDOM=y
++CONFIG_HW_RANDOM_INTEL=m
++CONFIG_HW_RANDOM_AMD=m
++CONFIG_NVRAM=m
++CONFIG_R3964=m
++CONFIG_APPLICOM=m
++
++#
++# PCMCIA character devices
++#
++CONFIG_SYNCLINK_CS=m
++CONFIG_CARDMAN_4000=m
++CONFIG_CARDMAN_4040=m
++# CONFIG_IPWIRELESS is not set
++CONFIG_MWAVE=m
++CONFIG_PC8736x_GPIO=m
++CONFIG_NSC_GPIO=m
++CONFIG_RAW_DRIVER=m
++CONFIG_MAX_RAW_DEVS=256
++CONFIG_HANGCHECK_TIMER=m
++CONFIG_TCG_TPM=m
++CONFIG_TCG_TIS=m
++CONFIG_TCG_NSC=m
++CONFIG_TCG_ATMEL=m
++CONFIG_TCG_INFINEON=m
++CONFIG_TCG_XEN=m
++CONFIG_TELCLOCK=m
++CONFIG_DEVPORT=y
++# CONFIG_CRASHER is not set
++CONFIG_I2C=m
++CONFIG_I2C_BOARDINFO=y
++CONFIG_I2C_CHARDEV=m
++CONFIG_I2C_HELPER_AUTO=y
++CONFIG_I2C_ALGOBIT=m
++CONFIG_I2C_ALGOPCA=m
++
++#
++# I2C Hardware Bus support
++#
++
++#
++# PC SMBus host controller drivers
++#
++CONFIG_I2C_ALI1535=m
++CONFIG_I2C_ALI1563=m
++CONFIG_I2C_ALI15X3=m
++CONFIG_I2C_AMD756=m
++CONFIG_I2C_AMD756_S4882=m
++CONFIG_I2C_AMD8111=m
++CONFIG_I2C_I801=m
++CONFIG_I2C_ISCH=m
++CONFIG_I2C_PIIX4=m
++CONFIG_I2C_NFORCE2=m
++CONFIG_I2C_NFORCE2_S4985=m
++CONFIG_I2C_SIS5595=m
++CONFIG_I2C_SIS630=m
++CONFIG_I2C_SIS96X=m
++CONFIG_I2C_VIA=m
++CONFIG_I2C_VIAPRO=m
++
++#
++# I2C system bus drivers (mostly embedded / system-on-chip)
++#
++CONFIG_I2C_OCORES=m
++CONFIG_I2C_SIMTEC=m
++
++#
++# External I2C/SMBus adapter drivers
++#
++CONFIG_I2C_PARPORT=m
++CONFIG_I2C_PARPORT_LIGHT=m
++CONFIG_I2C_TAOS_EVM=m
++# CONFIG_I2C_TINY_USB is not set
++
++#
++# Graphics adapter I2C/DDC channel drivers
++#
++CONFIG_I2C_VOODOO3=m
++
++#
++# Other I2C/SMBus bus drivers
++#
++CONFIG_I2C_PCA_PLATFORM=m
++CONFIG_I2C_STUB=m
++
++#
++# Miscellaneous I2C Chip support
++#
++CONFIG_DS1682=m
++CONFIG_AT24=m
++CONFIG_SENSORS_EEPROM=m
++CONFIG_SENSORS_PCF8574=m
++CONFIG_PCF8575=m
++CONFIG_SENSORS_PCA9539=m
++CONFIG_SENSORS_PCF8591=m
++CONFIG_SENSORS_MAX6875=m
++CONFIG_SENSORS_TSL2550=m
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++CONFIG_SPI=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++CONFIG_SPI_BITBANG=m
++CONFIG_SPI_BUTTERFLY=m
++CONFIG_SPI_LM70_LLP=m
++
++#
++# SPI Protocol Masters
++#
++CONFIG_SPI_AT25=m
++CONFIG_SPI_SPIDEV=m
++CONFIG_SPI_TLE62X0=m
++CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
++# CONFIG_GPIOLIB is not set
++CONFIG_W1=m
++CONFIG_W1_CON=y
++
++#
++# 1-wire Bus Masters
++#
++CONFIG_W1_MASTER_MATROX=m
++CONFIG_W1_MASTER_DS2490=m
++CONFIG_W1_MASTER_DS2482=m
++
++#
++# 1-wire Slaves
++#
++CONFIG_W1_SLAVE_THERM=m
++CONFIG_W1_SLAVE_SMEM=m
++CONFIG_W1_SLAVE_DS2433=m
++# CONFIG_W1_SLAVE_DS2433_CRC is not set
++# CONFIG_W1_SLAVE_DS2760 is not set
++CONFIG_POWER_SUPPLY=y
++# CONFIG_POWER_SUPPLY_DEBUG is not set
++# CONFIG_PDA_POWER is not set
++# CONFIG_BATTERY_DS2760 is not set
++CONFIG_HWMON=m
++CONFIG_HWMON_VID=m
++CONFIG_SENSORS_ABITUGURU=m
++CONFIG_SENSORS_ABITUGURU3=m
++CONFIG_SENSORS_AD7414=m
++CONFIG_SENSORS_AD7418=m
++CONFIG_SENSORS_ADCXX=m
++CONFIG_SENSORS_ADM1021=m
++CONFIG_SENSORS_ADM1025=m
++CONFIG_SENSORS_ADM1026=m
++CONFIG_SENSORS_ADM1029=m
++CONFIG_SENSORS_ADM1031=m
++CONFIG_SENSORS_ADM9240=m
++CONFIG_SENSORS_ADT7470=m
++CONFIG_SENSORS_ADT7473=m
++# CONFIG_SENSORS_K8TEMP is not set
++CONFIG_SENSORS_ASB100=m
++CONFIG_SENSORS_ATXP1=m
++CONFIG_SENSORS_DS1621=m
++CONFIG_SENSORS_I5K_AMB=m
++CONFIG_SENSORS_F71805F=m
++CONFIG_SENSORS_F71882FG=m
++CONFIG_SENSORS_F75375S=m
++CONFIG_SENSORS_FSCHER=m
++CONFIG_SENSORS_FSCPOS=m
++CONFIG_SENSORS_FSCHMD=m
++CONFIG_SENSORS_GL518SM=m
++CONFIG_SENSORS_GL520SM=m
++CONFIG_SENSORS_CORETEMP=m
++CONFIG_SENSORS_IBMAEM=m
++CONFIG_SENSORS_IBMPEX=m
++CONFIG_SENSORS_IT87=m
++CONFIG_SENSORS_LM63=m
++CONFIG_SENSORS_LM70=m
++CONFIG_SENSORS_LM75=m
++CONFIG_SENSORS_LM77=m
++CONFIG_SENSORS_LM78=m
++CONFIG_SENSORS_LM80=m
++CONFIG_SENSORS_LM83=m
++CONFIG_SENSORS_LM85=m
++CONFIG_SENSORS_LM87=m
++CONFIG_SENSORS_LM90=m
++CONFIG_SENSORS_LM92=m
++CONFIG_SENSORS_LM93=m
++CONFIG_SENSORS_MAX1619=m
++CONFIG_SENSORS_MAX6650=m
++CONFIG_SENSORS_PC87360=m
++CONFIG_SENSORS_PC87427=m
++CONFIG_SENSORS_SIS5595=m
++CONFIG_SENSORS_DME1737=m
++CONFIG_SENSORS_SMSC47M1=m
++CONFIG_SENSORS_SMSC47M192=m
++CONFIG_SENSORS_SMSC47B397=m
++CONFIG_SENSORS_ADS7828=m
++CONFIG_SENSORS_THMC50=m
++CONFIG_SENSORS_VIA686A=m
++CONFIG_SENSORS_VT1211=m
++CONFIG_SENSORS_VT8231=m
++CONFIG_SENSORS_W83781D=m
++CONFIG_SENSORS_W83791D=m
++CONFIG_SENSORS_W83792D=m
++CONFIG_SENSORS_W83793=m
++CONFIG_SENSORS_W83L785TS=m
++CONFIG_SENSORS_W83L786NG=m
++CONFIG_SENSORS_W83627HF=m
++CONFIG_SENSORS_W83627EHF=m
++CONFIG_SENSORS_HDAPS=m
++CONFIG_SENSORS_APPLESMC=m
++# CONFIG_HWMON_DEBUG_CHIP is not set
++CONFIG_THERMAL=m
++# CONFIG_THERMAL_HWMON is not set
++CONFIG_WATCHDOG=y
++# CONFIG_WATCHDOG_NOWAYOUT is not set
++
++#
++# Watchdog Device Drivers
++#
++CONFIG_SOFT_WATCHDOG=m
++CONFIG_ACQUIRE_WDT=m
++CONFIG_ADVANTECH_WDT=m
++CONFIG_ALIM1535_WDT=m
++CONFIG_ALIM7101_WDT=m
++CONFIG_SC520_WDT=m
++CONFIG_EUROTECH_WDT=m
++CONFIG_IB700_WDT=m
++CONFIG_IBMASR=m
++CONFIG_WAFER_WDT=m
++CONFIG_I6300ESB_WDT=m
++# CONFIG_ITCO_WDT is not set
++# CONFIG_IT8712F_WDT is not set
++# CONFIG_HP_WATCHDOG is not set
++CONFIG_SC1200_WDT=m
++# CONFIG_PC87413_WDT is not set
++CONFIG_60XX_WDT=m
++CONFIG_SBC8360_WDT=m
++CONFIG_CPU5_WDT=m
++# CONFIG_SMSC37B787_WDT is not set
++CONFIG_W83627HF_WDT=m
++# CONFIG_W83697HF_WDT is not set
++CONFIG_W83877F_WDT=m
++CONFIG_W83977F_WDT=m
++CONFIG_MACHZ_WDT=m
++CONFIG_SBC_EPX_C3_WATCHDOG=m
++
++#
++# PCI-based Watchdog Cards
++#
++CONFIG_PCIPCWATCHDOG=m
++CONFIG_WDTPCI=m
++CONFIG_WDT_501_PCI=y
++
++#
++# USB-based Watchdog Cards
++#
++CONFIG_USBPCWATCHDOG=m
++
++#
++# Sonics Silicon Backplane
++#
++CONFIG_SSB_POSSIBLE=y
++CONFIG_SSB=m
++CONFIG_SSB_SPROM=y
++CONFIG_SSB_PCIHOST_POSSIBLE=y
++CONFIG_SSB_PCIHOST=y
++# CONFIG_SSB_B43_PCI_BRIDGE is not set
++CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
++# CONFIG_SSB_PCMCIAHOST is not set
++# CONFIG_SSB_DEBUG is not set
++CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
++CONFIG_SSB_DRIVER_PCICORE=y
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_MFD_TMIO is not set
++
++#
++# Multimedia devices
++#
++
++#
++# Multimedia core support
++#
++# CONFIG_VIDEO_DEV is not set
++# CONFIG_DVB_CORE is not set
++# CONFIG_VIDEO_MEDIA is not set
++
++#
++# Multimedia drivers
++#
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++CONFIG_AGP=m
++CONFIG_AGP_AMD64=m
++CONFIG_AGP_INTEL=m
++CONFIG_AGP_SIS=m
++CONFIG_AGP_VIA=m
++CONFIG_DRM=m
++CONFIG_DRM_TDFX=m
++CONFIG_DRM_R128=m
++CONFIG_DRM_RADEON=m
++CONFIG_DRM_I810=m
++CONFIG_DRM_I830=m
++CONFIG_DRM_I915=m
++CONFIG_DRM_MGA=m
++CONFIG_DRM_SIS=m
++CONFIG_DRM_VIA=m
++# CONFIG_DRM_VIA_CHROME9 is not set
++CONFIG_DRM_SAVAGE=m
++CONFIG_VGASTATE=m
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB_DDC=m
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
++CONFIG_FB_SYS_FILLRECT=m
++CONFIG_FB_SYS_COPYAREA=m
++CONFIG_FB_SYS_IMAGEBLIT=m
++# CONFIG_FB_FOREIGN_ENDIAN is not set
++CONFIG_FB_SYS_FOPS=m
++CONFIG_FB_SVGALIB=m
++# CONFIG_FB_MACMODES is not set
++CONFIG_FB_BACKLIGHT=y
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++
++#
++# Frame buffer hardware drivers
++#
++CONFIG_FB_CIRRUS=m
++CONFIG_FB_PM2=m
++CONFIG_FB_PM2_FIFO_DISCONNECT=y
++CONFIG_FB_CYBER2000=m
++CONFIG_FB_ARC=m
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++CONFIG_FB_VGA16=m
++# CONFIG_FB_UVESA is not set
++CONFIG_FB_VESA=y
++# CONFIG_FB_EFI is not set
++# CONFIG_FB_N411 is not set
++CONFIG_FB_HGA=m
++# CONFIG_FB_HGA_ACCEL is not set
++CONFIG_FB_S1D13XXX=m
++CONFIG_FB_NVIDIA=m
++CONFIG_FB_NVIDIA_I2C=y
++# CONFIG_FB_NVIDIA_DEBUG is not set
++CONFIG_FB_NVIDIA_BACKLIGHT=y
++CONFIG_FB_RIVA=m
++CONFIG_FB_RIVA_I2C=y
++CONFIG_FB_RIVA_DEBUG=y
++CONFIG_FB_RIVA_BACKLIGHT=y
++CONFIG_FB_LE80578=m
++CONFIG_FB_CARILLO_RANCH=m
++CONFIG_FB_INTEL=m
++# CONFIG_FB_INTEL_DEBUG is not set
++CONFIG_FB_INTEL_I2C=y
++CONFIG_FB_MATROX=m
++CONFIG_FB_MATROX_MILLENIUM=y
++CONFIG_FB_MATROX_MYSTIQUE=y
++CONFIG_FB_MATROX_G=y
++# CONFIG_FB_MATROX_I2C is not set
++CONFIG_FB_MATROX_MULTIHEAD=y
++CONFIG_FB_RADEON=m
++CONFIG_FB_RADEON_I2C=y
++CONFIG_FB_RADEON_BACKLIGHT=y
++# CONFIG_FB_RADEON_DEBUG is not set
++CONFIG_FB_ATY128=m
++CONFIG_FB_ATY128_BACKLIGHT=y
++CONFIG_FB_ATY=m
++CONFIG_FB_ATY_CT=y
++CONFIG_FB_ATY_GENERIC_LCD=y
++CONFIG_FB_ATY_GX=y
++CONFIG_FB_ATY_BACKLIGHT=y
++CONFIG_FB_S3=m
++CONFIG_FB_SAVAGE=m
++CONFIG_FB_SAVAGE_I2C=y
++CONFIG_FB_SAVAGE_ACCEL=y
++CONFIG_FB_SIS=m
++CONFIG_FB_SIS_300=y
++CONFIG_FB_SIS_315=y
++CONFIG_FB_NEOMAGIC=m
++CONFIG_FB_KYRO=m
++CONFIG_FB_3DFX=m
++# CONFIG_FB_3DFX_ACCEL is not set
++CONFIG_FB_VOODOO1=m
++CONFIG_FB_VT8623=m
++CONFIG_FB_TRIDENT=m
++# CONFIG_FB_TRIDENT_ACCEL is not set
++CONFIG_FB_ARK=m
++# CONFIG_FB_PM3 is not set
++CONFIG_FB_CARMINE=m
++CONFIG_FB_CARMINE_DRAM_EVAL=y
++# CONFIG_CARMINE_DRAM_CUSTOM is not set
++CONFIG_FB_GEODE=y
++# CONFIG_FB_GEODE_LX is not set
++CONFIG_FB_GEODE_GX=m
++CONFIG_FB_GEODE_GX1=m
++CONFIG_FB_VIRTUAL=m
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_LCD_CLASS_DEVICE=m
++CONFIG_LCD_LTV350QV=m
++CONFIG_LCD_ILI9320=m
++CONFIG_LCD_VGG2432A4=m
++CONFIG_LCD_PLATFORM=m
++CONFIG_BACKLIGHT_CLASS_DEVICE=y
++CONFIG_BACKLIGHT_CORGI=m
++CONFIG_BACKLIGHT_PROGEAR=m
++CONFIG_BACKLIGHT_CARILLO_RANCH=m
++CONFIG_BACKLIGHT_MBP_NVIDIA=m
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++CONFIG_VGA_CONSOLE=y
++# CONFIG_VGACON_SOFT_SCROLLBACK is not set
++CONFIG_VIDEO_SELECT=y
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=m
++# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++# CONFIG_LOGO is not set
++
++#
++# Bootsplash configuration
++#
++# CONFIG_BOOTSPLASH is not set
++# CONFIG_SOUND is not set
++CONFIG_HID_SUPPORT=y
++CONFIG_HID=y
++# CONFIG_HID_DEBUG is not set
++# CONFIG_HIDRAW is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=m
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++CONFIG_HID_FF=y
++CONFIG_HID_PID=y
++CONFIG_LOGITECH_FF=y
++# CONFIG_LOGIRUMBLEPAD2_FF is not set
++# CONFIG_PANTHERLORD_FF is not set
++CONFIG_THRUSTMASTER_FF=y
++# CONFIG_ZEROPLUS_FF is not set
++CONFIG_USB_HIDDEV=y
++
++#
++# USB HID Boot Protocol drivers
++#
++# CONFIG_USB_KBD is not set
++# CONFIG_USB_MOUSE is not set
++CONFIG_USB_SUPPORT=y
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=m
++# CONFIG_USB_DEBUG is not set
++# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++CONFIG_USB_DEVICE_CLASS=y
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++CONFIG_USB_MON=y
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_C67X00_HCD is not set
++CONFIG_USB_EHCI_HCD=m
++CONFIG_USB_EHCI_ROOT_HUB_TT=y
++CONFIG_USB_EHCI_TT_NEWSCHED=y
++CONFIG_USB_ISP116X_HCD=m
++CONFIG_USB_ISP1760_HCD=m
++CONFIG_USB_OHCI_HCD=m
++# CONFIG_USB_OHCI_HCD_SSB is not set
++# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
++# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=m
++CONFIG_USB_SL811_HCD=m
++CONFIG_USB_SL811_CS=m
++# CONFIG_USB_R8A66597_HCD is not set
++# CONFIG_USB_GADGET_MUSB_HDRC is not set
++
++#
++# USB Device Class drivers
++#
++CONFIG_USB_ACM=m
++CONFIG_USB_PRINTER=m
++# CONFIG_USB_WDM is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=m
++# CONFIG_USB_STORAGE_DEBUG is not set
++CONFIG_USB_STORAGE_DATAFAB=y
++CONFIG_USB_STORAGE_FREECOM=y
++CONFIG_USB_STORAGE_ISD200=y
++CONFIG_USB_STORAGE_DPCM=y
++CONFIG_USB_STORAGE_USBAT=y
++CONFIG_USB_STORAGE_SDDR09=y
++CONFIG_USB_STORAGE_SDDR55=y
++CONFIG_USB_STORAGE_JUMPSHOT=y
++CONFIG_USB_STORAGE_ALAUDA=y
++# CONFIG_USB_STORAGE_ONETOUCH is not set
++# CONFIG_USB_STORAGE_KARMA is not set
++# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
++CONFIG_USB_LIBUSUAL=y
++
++#
++# USB Imaging devices
++#
++CONFIG_USB_MDC800=m
++CONFIG_USB_MICROTEK=m
++
++#
++# USB port drivers
++#
++CONFIG_USB_USS720=m
++CONFIG_USB_SERIAL=m
++CONFIG_USB_EZUSB=y
++CONFIG_USB_SERIAL_GENERIC=y
++# CONFIG_USB_SERIAL_AIRCABLE is not set
++CONFIG_USB_SERIAL_ARK3116=m
++CONFIG_USB_SERIAL_BELKIN=m
++# CONFIG_USB_SERIAL_CH341 is not set
++CONFIG_USB_SERIAL_WHITEHEAT=m
++CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
++CONFIG_USB_SERIAL_CP2101=m
++CONFIG_USB_SERIAL_CYPRESS_M8=m
++CONFIG_USB_SERIAL_EMPEG=m
++CONFIG_USB_SERIAL_FTDI_SIO=m
++CONFIG_USB_SERIAL_FUNSOFT=m
++CONFIG_USB_SERIAL_VISOR=m
++CONFIG_USB_SERIAL_IPAQ=m
++CONFIG_USB_SERIAL_IR=m
++CONFIG_USB_SERIAL_EDGEPORT=m
++CONFIG_USB_SERIAL_EDGEPORT_TI=m
++CONFIG_USB_SERIAL_GARMIN=m
++CONFIG_USB_SERIAL_IPW=m
++# CONFIG_USB_SERIAL_IUU is not set
++CONFIG_USB_SERIAL_KEYSPAN_PDA=m
++CONFIG_USB_SERIAL_KEYSPAN=m
++CONFIG_USB_SERIAL_KEYSPAN_MPR=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
++CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19=y
++CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
++CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
++CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
++CONFIG_USB_SERIAL_KLSI=m
++CONFIG_USB_SERIAL_KOBIL_SCT=m
++CONFIG_USB_SERIAL_MCT_U232=m
++CONFIG_USB_SERIAL_MOS7720=m
++CONFIG_USB_SERIAL_MOS7840=m
++CONFIG_USB_SERIAL_MOTOROLA=m
++CONFIG_USB_SERIAL_NAVMAN=m
++CONFIG_USB_SERIAL_PL2303=m
++CONFIG_USB_SERIAL_OTI6858=m
++CONFIG_USB_SERIAL_QUALCOMM=m
++CONFIG_USB_SERIAL_SPCP8X5=m
++CONFIG_USB_SERIAL_HP4X=m
++CONFIG_USB_SERIAL_SAFE=m
++CONFIG_USB_SERIAL_SAFE_PADDED=y
++CONFIG_USB_SERIAL_SIERRAWIRELESS=m
++CONFIG_USB_SERIAL_TI=m
++CONFIG_USB_SERIAL_CYBERJACK=m
++CONFIG_USB_SERIAL_XIRCOM=m
++CONFIG_USB_SERIAL_OPTION=m
++CONFIG_USB_SERIAL_OMNINET=m
++CONFIG_USB_SERIAL_DEBUG=m
++
++#
++# USB Miscellaneous drivers
++#
++CONFIG_USB_EMI62=m
++CONFIG_USB_EMI26=m
++CONFIG_USB_ADUTUX=m
++CONFIG_USB_RIO500=m
++CONFIG_USB_LEGOTOWER=m
++CONFIG_USB_LCD=m
++# CONFIG_USB_BERRY_CHARGE is not set
++CONFIG_USB_LED=m
++CONFIG_USB_CYPRESS_CY7C63=m
++CONFIG_USB_CYTHERM=m
++# CONFIG_USB_PHIDGET is not set
++CONFIG_USB_IDMOUSE=m
++# CONFIG_USB_FTDI_ELAN is not set
++CONFIG_USB_APPLEDISPLAY=m
++CONFIG_USB_SISUSBVGA=m
++CONFIG_USB_SISUSBVGA_CON=y
++CONFIG_USB_LD=m
++# CONFIG_USB_TRANCEVIBRATOR is not set
++# CONFIG_USB_IOWARRIOR is not set
++CONFIG_USB_TEST=m
++# CONFIG_USB_ISIGHTFW is not set
++CONFIG_USB_GADGET=m
++# CONFIG_USB_GADGET_DEBUG is not set
++# CONFIG_USB_GADGET_DEBUG_FILES is not set
++CONFIG_USB_GADGET_SELECTED=y
++# CONFIG_USB_GADGET_AMD5536UDC is not set
++# CONFIG_USB_GADGET_ATMEL_USBA is not set
++# CONFIG_USB_GADGET_FSL_USB2 is not set
++CONFIG_USB_GADGET_NET2280=y
++CONFIG_USB_NET2280=m
++# CONFIG_USB_GADGET_PXA25X is not set
++# CONFIG_USB_GADGET_M66592 is not set
++# CONFIG_USB_GADGET_PXA27X is not set
++# CONFIG_USB_GADGET_GOKU is not set
++# CONFIG_USB_GADGET_LH7A40X is not set
++# CONFIG_USB_GADGET_OMAP is not set
++# CONFIG_USB_GADGET_S3C2410 is not set
++# CONFIG_USB_GADGET_AT91 is not set
++# CONFIG_USB_GADGET_DUMMY_HCD is not set
++CONFIG_USB_GADGET_DUALSPEED=y
++CONFIG_USB_ZERO=m
++CONFIG_USB_ETH=m
++CONFIG_USB_ETH_RNDIS=y
++CONFIG_USB_GADGETFS=m
++CONFIG_USB_FILE_STORAGE=m
++# CONFIG_USB_FILE_STORAGE_TEST is not set
++CONFIG_USB_G_SERIAL=m
++# CONFIG_USB_MIDI_GADGET is not set
++# CONFIG_USB_G_PRINTER is not set
++# CONFIG_USB_CDC_COMPOSITE is not set
++# CONFIG_MMC is not set
++# CONFIG_MEMSTICK is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=m
++
++#
++# LED drivers
++#
++# CONFIG_LEDS_PCA9532 is not set
++# CONFIG_LEDS_CLEVO_MAIL is not set
++# CONFIG_LEDS_PCA955X is not set
++
++#
++# LED Triggers
++#
++# CONFIG_LEDS_TRIGGERS is not set
++# CONFIG_ACCESSIBILITY is not set
++# CONFIG_INFINIBAND is not set
++# CONFIG_EDAC is not set
++CONFIG_RTC_LIB=m
++CONFIG_RTC_CLASS=m
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=y
++CONFIG_RTC_INTF_PROC=y
++CONFIG_RTC_INTF_DEV=y
++CONFIG_RTC_INTF_DEV_UIE_EMUL=y
++CONFIG_RTC_DRV_TEST=m
++
++#
++# I2C RTC drivers
++#
++CONFIG_RTC_DRV_DS1307=m
++CONFIG_RTC_DRV_DS1374=m
++CONFIG_RTC_DRV_DS1672=m
++CONFIG_RTC_DRV_MAX6900=m
++CONFIG_RTC_DRV_RS5C372=m
++CONFIG_RTC_DRV_ISL1208=m
++CONFIG_RTC_DRV_X1205=m
++CONFIG_RTC_DRV_PCF8563=m
++CONFIG_RTC_DRV_PCF8583=m
++CONFIG_RTC_DRV_M41T80=m
++# CONFIG_RTC_DRV_M41T80_WDT is not set
++# CONFIG_RTC_DRV_S35390A is not set
++# CONFIG_RTC_DRV_FM3130 is not set
++
++#
++# SPI RTC drivers
++#
++# CONFIG_RTC_DRV_M41T94 is not set
++# CONFIG_RTC_DRV_DS1305 is not set
++CONFIG_RTC_DRV_MAX6902=m
++# CONFIG_RTC_DRV_R9701 is not set
++CONFIG_RTC_DRV_RS5C348=m
++
++#
++# Platform RTC drivers
++#
++CONFIG_RTC_DRV_CMOS=m
++# CONFIG_RTC_DRV_DS1511 is not set
++CONFIG_RTC_DRV_DS1553=m
++CONFIG_RTC_DRV_DS1742=m
++# CONFIG_RTC_DRV_STK17TA8 is not set
++CONFIG_RTC_DRV_M48T86=m
++# CONFIG_RTC_DRV_M48T59 is not set
++CONFIG_RTC_DRV_V3020=m
++
++#
++# on-CPU RTC drivers
++#
++# CONFIG_DMADEVICES is not set
++# CONFIG_AUXDISPLAY is not set
++# CONFIG_UIO is not set
++CONFIG_XEN=y
++CONFIG_XEN_INTERFACE_VERSION=0x00030207
++
++#
++# XEN
++#
++CONFIG_XEN_PRIVILEGED_GUEST=y
++# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
++CONFIG_XEN_PRIVCMD=y
++CONFIG_XEN_XENBUS_DEV=y
++CONFIG_XEN_NETDEV_ACCEL_SFC_UTIL=m
++CONFIG_XEN_BACKEND=y
++CONFIG_XEN_BLKDEV_BACKEND=y
++CONFIG_XEN_BLKDEV_TAP=y
++CONFIG_XEN_NETDEV_BACKEND=y
++# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
++CONFIG_XEN_NETDEV_ACCEL_SFC_BACKEND=m
++# CONFIG_XEN_NETDEV_LOOPBACK is not set
++CONFIG_XEN_PCIDEV_BACKEND=m
++CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
++# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
++# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
++# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
++# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
++CONFIG_XEN_TPMDEV_BACKEND=m
++CONFIG_XEN_SCSI_BACKEND=m
++CONFIG_XEN_BLKDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_FRONTEND=y
++CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND=m
++CONFIG_XEN_SCSI_FRONTEND=m
++CONFIG_XEN_GRANT_DEV=y
++CONFIG_XEN_FRAMEBUFFER=y
++CONFIG_XEN_KEYBOARD=y
++CONFIG_XEN_DISABLE_SERIAL=y
++CONFIG_XEN_SYSFS=y
++CONFIG_XEN_NR_GUEST_DEVICES=702
++# CONFIG_XEN_COMPAT_030002_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
++# CONFIG_XEN_COMPAT_030100_AND_LATER is not set
++CONFIG_XEN_COMPAT_030200_AND_LATER=y
++# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
++CONFIG_XEN_COMPAT=0x030200
++CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_IRQ_PER_CPU=y
++CONFIG_NO_IDLE_HZ=y
++CONFIG_XEN_SMPBOOT=y
++CONFIG_XEN_DEVMEM=y
++CONFIG_XEN_BALLOON=y
++CONFIG_XEN_SCRUB_PAGES=y
++# CONFIG_STAGING is not set
++
++#
++# Firmware Drivers
++#
++CONFIG_EDD=y
++# CONFIG_EDD_OFF is not set
++CONFIG_FIRMWARE_MEMMAP=y
++CONFIG_DELL_RBU=m
++CONFIG_DCDBAS=m
++# CONFIG_DMIID is not set
++CONFIG_ISCSI_IBFT_FIND=y
++CONFIG_ISCSI_IBFT=m
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++CONFIG_EXT2_FS_XATTR=y
++CONFIG_EXT2_FS_POSIX_ACL=y
++CONFIG_EXT2_FS_SECURITY=y
++CONFIG_EXT2_FS_XIP=y
++CONFIG_FS_XIP=y
++CONFIG_EXT3_FS=m
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++# CONFIG_EXT3_FS_NFS4ACL is not set
++CONFIG_EXT3_FS_SECURITY=y
++# CONFIG_EXT4DEV_FS is not set
++CONFIG_JBD=m
++CONFIG_FS_MBCACHE=y
++CONFIG_REISERFS_FS=m
++# CONFIG_REISERFS_CHECK is not set
++# CONFIG_REISERFS_PROC_INFO is not set
++CONFIG_REISERFS_FS_XATTR=y
++CONFIG_REISERFS_FS_POSIX_ACL=y
++CONFIG_REISERFS_FS_SECURITY=y
++CONFIG_JFS_FS=m
++CONFIG_JFS_POSIX_ACL=y
++# CONFIG_JFS_SECURITY is not set
++# CONFIG_JFS_DEBUG is not set
++CONFIG_JFS_STATISTICS=y
++CONFIG_FS_POSIX_ACL=y
++# CONFIG_FS_NFS4ACL is not set
++CONFIG_XFS_FS=m
++CONFIG_XFS_QUOTA=y
++# CONFIG_XFS_DMAPI is not set
++CONFIG_XFS_POSIX_ACL=y
++CONFIG_XFS_RT=y
++# CONFIG_XFS_DEBUG is not set
++CONFIG_GFS2_FS=m
++# CONFIG_GFS2_FS_LOCKING_DLM is not set
++# CONFIG_OCFS2_FS is not set
++CONFIG_DNOTIFY=y
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_DMAPI is not set
++CONFIG_QUOTA=y
++# CONFIG_QUOTA_NETLINK_INTERFACE is not set
++CONFIG_PRINT_QUOTA_WARNING=y
++CONFIG_QUOTA_TREE=m
++CONFIG_QFMT_V1=m
++CONFIG_QFMT_V2=m
++CONFIG_QUOTACTL=y
++CONFIG_AUTOFS_FS=m
++CONFIG_AUTOFS4_FS=m
++CONFIG_FUSE_FS=m
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=m
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=m
++CONFIG_MSDOS_FS=m
++CONFIG_VFAT_FS=m
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_CONFIGFS_FS=m
++
++#
++# Miscellaneous filesystems
++#
++CONFIG_ADFS_FS=m
++# CONFIG_ADFS_FS_RW is not set
++CONFIG_AFFS_FS=m
++# CONFIG_ECRYPT_FS is not set
++CONFIG_HFS_FS=m
++CONFIG_HFSPLUS_FS=m
++CONFIG_BEFS_FS=m
++# CONFIG_BEFS_DEBUG is not set
++CONFIG_BFS_FS=m
++CONFIG_EFS_FS=m
++CONFIG_CRAMFS=m
++CONFIG_SQUASHFS=m
++# CONFIG_SQUASHFS_EMBEDDED is not set
++CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
++CONFIG_VXFS_FS=m
++CONFIG_MINIX_FS=m
++# CONFIG_OMFS_FS is not set
++CONFIG_HPFS_FS=m
++CONFIG_QNX4FS_FS=m
++CONFIG_ROMFS_FS=m
++CONFIG_SYSV_FS=m
++CONFIG_UFS_FS=m
++# CONFIG_UFS_FS_WRITE is not set
++# CONFIG_UFS_DEBUG is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=m
++CONFIG_NFS_V3=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++# CONFIG_NFS_SWAP is not set
++CONFIG_NFSD=m
++CONFIG_NFSD_V2_ACL=y
++CONFIG_NFSD_V3=y
++CONFIG_NFSD_V3_ACL=y
++CONFIG_NFSD_V4=y
++CONFIG_LOCKD=m
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_ACL_SUPPORT=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=m
++CONFIG_SUNRPC_GSS=m
++# CONFIG_SUNRPC_SWAP is not set
++CONFIG_RPCSEC_GSS_KRB5=m
++CONFIG_RPCSEC_GSS_SPKM3=m
++CONFIG_SMB_FS=m
++CONFIG_SMB_NLS_DEFAULT=y
++CONFIG_SMB_NLS_REMOTE="cp850"
++CONFIG_CIFS=m
++CONFIG_CIFS_STATS=y
++CONFIG_CIFS_STATS2=y
++CONFIG_CIFS_WEAK_PW_HASH=y
++# CONFIG_CIFS_UPCALL is not set
++CONFIG_CIFS_XATTR=y
++# CONFIG_CIFS_POSIX is not set
++# CONFIG_CIFS_DEBUG2 is not set
++# CONFIG_CIFS_EXPERIMENTAL is not set
++CONFIG_NCP_FS=m
++CONFIG_NCPFS_PACKET_SIGNING=y
++CONFIG_NCPFS_IOCTL_LOCKING=y
++CONFIG_NCPFS_STRONG=y
++CONFIG_NCPFS_NFS_NS=y
++CONFIG_NCPFS_OS2_NS=y
++# CONFIG_NCPFS_SMALLDOS is not set
++CONFIG_NCPFS_NLS=y
++CONFIG_NCPFS_EXTRAS=y
++CONFIG_CODA_FS=m
++# CONFIG_AFS_FS is not set
++# CONFIG_NOVFS is not set
++
++#
++# Partition Types
++#
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_ACORN_PARTITION is not set
++CONFIG_OSF_PARTITION=y
++# CONFIG_AMIGA_PARTITION is not set
++CONFIG_ATARI_PARTITION=y
++CONFIG_MAC_PARTITION=y
++CONFIG_MSDOS_PARTITION=y
++CONFIG_BSD_DISKLABEL=y
++# CONFIG_MINIX_SUBPARTITION is not set
++CONFIG_SOLARIS_X86_PARTITION=y
++CONFIG_UNIXWARE_DISKLABEL=y
++CONFIG_LDM_PARTITION=y
++# CONFIG_LDM_DEBUG is not set
++CONFIG_SGI_PARTITION=y
++CONFIG_ULTRIX_PARTITION=y
++CONFIG_SUN_PARTITION=y
++CONFIG_KARMA_PARTITION=y
++CONFIG_EFI_PARTITION=y
++# CONFIG_SYSV68_PARTITION is not set
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="utf8"
++CONFIG_NLS_CODEPAGE_437=m
++CONFIG_NLS_CODEPAGE_737=m
++CONFIG_NLS_CODEPAGE_775=m
++CONFIG_NLS_CODEPAGE_850=m
++CONFIG_NLS_CODEPAGE_852=m
++CONFIG_NLS_CODEPAGE_855=m
++CONFIG_NLS_CODEPAGE_857=m
++CONFIG_NLS_CODEPAGE_860=m
++CONFIG_NLS_CODEPAGE_861=m
++CONFIG_NLS_CODEPAGE_862=m
++CONFIG_NLS_CODEPAGE_863=m
++CONFIG_NLS_CODEPAGE_864=m
++CONFIG_NLS_CODEPAGE_865=m
++CONFIG_NLS_CODEPAGE_866=m
++CONFIG_NLS_CODEPAGE_869=m
++CONFIG_NLS_CODEPAGE_936=m
++CONFIG_NLS_CODEPAGE_950=m
++CONFIG_NLS_CODEPAGE_932=m
++CONFIG_NLS_CODEPAGE_949=m
++CONFIG_NLS_CODEPAGE_874=m
++CONFIG_NLS_ISO8859_8=m
++CONFIG_NLS_CODEPAGE_1250=m
++CONFIG_NLS_CODEPAGE_1251=m
++CONFIG_NLS_ASCII=m
++CONFIG_NLS_ISO8859_1=m
++CONFIG_NLS_ISO8859_2=m
++CONFIG_NLS_ISO8859_3=m
++CONFIG_NLS_ISO8859_4=m
++CONFIG_NLS_ISO8859_5=m
++CONFIG_NLS_ISO8859_6=m
++CONFIG_NLS_ISO8859_7=m
++CONFIG_NLS_ISO8859_9=m
++CONFIG_NLS_ISO8859_13=m
++CONFIG_NLS_ISO8859_14=m
++CONFIG_NLS_ISO8859_15=m
++CONFIG_NLS_KOI8_R=m
++CONFIG_NLS_KOI8_U=m
++CONFIG_NLS_UTF8=m
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++# CONFIG_PRINTK_TIME is not set
++# CONFIG_ENABLE_WARN_DEPRECATED is not set
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_UNUSED_SYMBOLS=y
++# CONFIG_DEBUG_FS is not set
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
++CONFIG_SCHED_DEBUG=y
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_TIMER_STATS is not set
++# CONFIG_DEBUG_OBJECTS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++CONFIG_DEBUG_MEMORY_INIT=y
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_UNWIND_INFO is not set
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++# CONFIG_SYSCTL_SYSCALL_CHECK is not set
++CONFIG_HAVE_FTRACE=y
++CONFIG_HAVE_DYNAMIC_FTRACE=y
++# CONFIG_FTRACE is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_SYSPROF_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
++# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
++# CONFIG_SAMPLES is not set
++# CONFIG_STRICT_DEVMEM is not set
++CONFIG_EARLY_PRINTK=y
++# CONFIG_EARLY_PRINTK_DBGP is not set
++CONFIG_DEBUG_STACKOVERFLOW=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_PAGEALLOC is not set
++# CONFIG_DEBUG_PER_CPU_MAPS is not set
++# CONFIG_X86_PTDUMP is not set
++# CONFIG_DEBUG_RODATA is not set
++# CONFIG_DEBUG_NX_TEST is not set
++CONFIG_IO_DELAY_TYPE_0X80=0
++CONFIG_IO_DELAY_TYPE_0XED=1
++CONFIG_IO_DELAY_TYPE_UDELAY=2
++CONFIG_IO_DELAY_TYPE_NONE=3
++CONFIG_IO_DELAY_0X80=y
++# CONFIG_IO_DELAY_0XED is not set
++# CONFIG_IO_DELAY_UDELAY is not set
++# CONFIG_IO_DELAY_NONE is not set
++CONFIG_DEFAULT_IO_DELAY_TYPE=0
++# CONFIG_CPA_DEBUG is not set
++# CONFIG_OPTIMIZE_INLINING is not set
++
++#
++# Security options
++#
++CONFIG_KEYS=y
++# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
++CONFIG_SECURITY=y
++CONFIG_SECURITY_DEFAULT=""
++CONFIG_SECURITY_NETWORK=y
++# CONFIG_SECURITY_NETWORK_XFRM is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
++# CONFIG_SECURITY_APPARMOR is not set
++CONFIG_XOR_BLOCKS=m
++CONFIG_ASYNC_CORE=m
++CONFIG_ASYNC_MEMCPY=m
++CONFIG_ASYNC_XOR=m
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_AEAD=m
++CONFIG_CRYPTO_BLKCIPHER=m
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_MANAGER=y
++# CONFIG_CRYPTO_GF128MUL is not set
++CONFIG_CRYPTO_NULL=m
++# CONFIG_CRYPTO_CRYPTD is not set
++CONFIG_CRYPTO_AUTHENC=m
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++CONFIG_CRYPTO_CCM=m
++# CONFIG_CRYPTO_GCM is not set
++CONFIG_CRYPTO_SEQIV=m
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=m
++CONFIG_CRYPTO_CTR=m
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=m
++# CONFIG_CRYPTO_LRW is not set
++# CONFIG_CRYPTO_PCBC is not set
++# CONFIG_CRYPTO_XTS is not set
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=y
++CONFIG_CRYPTO_XCBC=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=y
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=m
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++CONFIG_CRYPTO_SHA1=m
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_TGR192=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=m
++# CONFIG_CRYPTO_AES_X86_64 is not set
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=m
++CONFIG_CRYPTO_BLOWFISH=m
++# CONFIG_CRYPTO_CAMELLIA is not set
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_DES=m
++# CONFIG_CRYPTO_FCRYPT is not set
++CONFIG_CRYPTO_KHAZAD=m
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SALSA20_X86_64 is not set
++# CONFIG_CRYPTO_SEED is not set
++CONFIG_CRYPTO_SERPENT=m
++CONFIG_CRYPTO_TEA=m
++CONFIG_CRYPTO_TWOFISH=m
++CONFIG_CRYPTO_TWOFISH_COMMON=m
++# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
++
++#
++# Compression
++#
++CONFIG_CRYPTO_DEFLATE=m
++# CONFIG_CRYPTO_LZO is not set
++CONFIG_CRYPTO_HW=y
++# CONFIG_CRYPTO_DEV_HIFN_795X is not set
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_FIRST_BIT=y
++CONFIG_GENERIC_FIND_NEXT_BIT=y
++CONFIG_CRC_CCITT=y
++CONFIG_CRC16=y
++# CONFIG_CRC_T10DIF is not set
++CONFIG_CRC_ITU_T=m
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++CONFIG_LIBCRC32C=y
++CONFIG_ZLIB_INFLATE=m
++CONFIG_ZLIB_DEFLATE=m
++CONFIG_TEXTSEARCH=y
++CONFIG_TEXTSEARCH_KMP=m
++CONFIG_TEXTSEARCH_BM=m
++CONFIG_TEXTSEARCH_FSM=m
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
++CONFIG_CHECK_SIGNATURE=y
diff --git a/master/kexec-define-vmcore_elf_check_arch_cross.patch b/master/kexec-define-vmcore_elf_check_arch_cross.patch
new file mode 100644 (file)
index 0000000..c123513
--- /dev/null
@@ -0,0 +1,12 @@
+diff -r 15cc4678e349 include/linux/crash_dump.h
+--- a/include/linux/crash_dump.h       Fri May 15 16:21:27 2009 +0100
++++ b/include/linux/crash_dump.h       Wed Jun 03 17:33:31 2009 +0100
+@@ -6,6 +6,8 @@
+ #include <linux/smp_lock.h>
+ #include <linux/device.h>
+ #include <linux/proc_fs.h>
++
++#include <asm/kexec.h>
+ #define ELFCORE_ADDR_MAX      (-1ULL)
diff --git a/master/linux-2.6.18-xen.hg-847.ad4d307bf9ce b/master/linux-2.6.18-xen.hg-847.ad4d307bf9ce
new file mode 100644 (file)
index 0000000..7268e57
--- /dev/null
@@ -0,0 +1,10786 @@
+# HG changeset patch
+# User Keir Fraser <keir.fraser@citrix.com>
+# Date 1238497150 -3600
+# Node ID ad4d307bf9ced378d0b49d4559ae33ecbff3c1b7
+# Parent  89d9c025b46c64922b8b082bf3ed69e0c03ad19e
+net sfc: Update sfc and sfc_resource driver to latest release
+
+...and update sfc_netfront, sfc_netback, sfc_netutil for any API changes
+
+sfc_netback: Fix asymmetric use of SFC buffer table alloc and free
+sfc_netback: Clean up if no SFC accel device found
+sfc_netback: Gracefully handle case where page grant fails
+sfc_netback: Disable net acceleration if the physical link goes down
+sfc_netfront: Less verbose error messages, more verbose counters for
+rx discard errors
+sfc_netfront: Gracefully handle case where SFC netfront fails during
+initialisation
+
+Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
+
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/Kconfig
+--- a/drivers/net/sfc/Kconfig  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/Kconfig  Tue Mar 31 11:59:10 2009 +0100
+@@ -2,6 +2,7 @@
+       tristate "Solarflare Solarstorm SFC4000 support"
+       depends on PCI && INET
+       select MII
++      select CRC32
+       help
+         This driver supports 10-gigabit Ethernet cards based on
+         the Solarflare Communications Solarstorm SFC4000 controller.
+@@ -28,8 +29,7 @@
+         new boot ROM to the NIC.
+ config SFC_RESOURCE
+-      depends on SFC && X86
+-      tristate "Solarflare Solarstorm SFC4000 resource driver"
+-      help
+-        This module provides the SFC resource manager driver.
+-
++        depends on SFC && X86
++        tristate "Solarflare Solarstorm SFC4000 resource driver"
++        help
++          This module provides the SFC resource manager driver.
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/Makefile
+--- a/drivers/net/sfc/Makefile Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/Makefile Tue Mar 31 11:59:10 2009 +0100
+@@ -1,43 +1,13 @@
++sfc-y                 += efx.o falcon.o tx.o rx.o mentormac.o falcon_gmac.o \
++                         falcon_xmac.o alaska.o i2c-direct.o selftest.o \
++                         driverlink.o ethtool.o xfp_phy.o mdio_10g.o \
++                         txc43128_phy.o tenxpress.o lm87_support.o boards.o \
++                         sfe4001.o pm8358_phy.o null_phy.o kernel_compat.o
++sfc-$(CONFIG_SFC_DEBUGFS) += debugfs.o
++obj-$(CONFIG_SFC)     += sfc.o
+-# Final objects
+-sfc_o = sfc.o
+-sfc_mtd_o = sfc_mtd.o
+-
+-# Constituent objects
+-sfc_elements_o :=
+-sfc_elements_o += efx.o
+-sfc_elements_o += falcon.o
+-sfc_elements_o += tx.o
+-sfc_elements_o += rx.o
+-sfc_elements_o += mentormac.o
+-sfc_elements_o += falcon_gmac.o
+-sfc_elements_o += falcon_xmac.o
+-sfc_elements_o += alaska.o
+-sfc_elements_o += i2c-direct.o
+-sfc_elements_o += selftest.o
+-sfc_elements_o += driverlink.o
+-ifeq ($(CONFIG_SFC_DEBUGFS),y)
+-sfc_elements_o += debugfs.o
+-endif
+-sfc_elements_o += ethtool.o
+-sfc_elements_o += xfp_phy.o
+-sfc_elements_o += mdio_10g.o
+-sfc_elements_o += txc43128_phy.o
+-sfc_elements_o += tenxpress.o
+-sfc_elements_o += lm87_support.o
+-sfc_elements_o += boards.o
+-sfc_elements_o += sfe4001.o
+-sfc_elements_o += pm8358_phy.o
+-sfc_elements_o += null_phy.o
+-sfc_elements_o += phy.o
+-sfc_elements_o += kernel_compat.o
+-
+-sfc_mtd_elements_o := mtd.o
+-
+-obj-$(CONFIG_SFC) += $(sfc_o)
+-obj-$(CONFIG_SFC_MTD) += $(sfc_mtd_o)
+-
+-sfc-objs = $(sfc_elements_o)
+-sfc_mtd-objs = $(sfc_mtd_elements_o)
++sfc_mtd-y = mtd.o
++obj-$(CONFIG_SFC_MTD) += sfc_mtd.o
+ obj-$(CONFIG_SFC_RESOURCE) += sfc_resource/
++
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/Module.symvers
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/Module.symvers   Tue Mar 31 11:59:10 2009 +0100
+@@ -0,0 +1,6 @@
++0x2e5e77fa    efx_dl_unregister_driver        drivers/net/sfc/sfc     EXPORT_SYMBOL
++0x4ac7afe9    efx_dl_schedule_reset   drivers/net/sfc/sfc     EXPORT_SYMBOL
++0xbb52ca8e    efx_dl_register_driver_api_ver_1        drivers/net/sfc/sfc     EXPORT_SYMBOL
++0x278552f6    efx_dl_register_callbacks       drivers/net/sfc/sfc     EXPORT_SYMBOL
++0xc4414515    efx_dl_get_nic  drivers/net/sfc/sfc     EXPORT_SYMBOL
++0x42cae6c4    efx_dl_unregister_callbacks     drivers/net/sfc/sfc     EXPORT_SYMBOL
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/bitfield.h
+--- a/drivers/net/sfc/bitfield.h       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/bitfield.h       Tue Mar 31 11:59:10 2009 +0100
+@@ -54,11 +54,6 @@
+ #define EFX_DWORD_2_WIDTH 32
+ #define EFX_DWORD_3_LBN 96
+ #define EFX_DWORD_3_WIDTH 32
+-
+-#define EFX_BYTE  1
+-#define EFX_WORD  2
+-#define EFX_DWORD 4
+-#define EFX_OWORD 8
+ /* Specified attribute (e.g. LBN) of the specified field */
+ #define EFX_VAL(field, attribute) field ## _ ## attribute
+@@ -505,7 +500,7 @@
+ #endif
+ #define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \
+-      if (FALCON_REV(efx) == FALCON_REV_B0) {                    \
++      if (FALCON_REV(efx) >= FALCON_REV_B0) {                    \
+               EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \
+       } else { \
+               EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \
+@@ -513,7 +508,7 @@
+ } while (0)
+ #define EFX_QWORD_FIELD_VER(efx, qword, field)        \
+-      (FALCON_REV(efx) == FALCON_REV_B0 ?     \
++      (FALCON_REV(efx) >= FALCON_REV_B0 ?     \
+        EFX_QWORD_FIELD((qword), field##_B0) : \
+        EFX_QWORD_FIELD((qword), field##_A1))
+@@ -527,18 +522,4 @@
+                         ~((u64) 0) : ~((u32) 0))
+ #define EFX_DMA_MASK(mask) ((mask) & EFX_DMA_MAX_MASK)
+-/*
+- * Determine if a DMA address is over the 4GB threshold
+- *
+- * Defined in a slightly tortuous way to avoid compiler warnings.
+- */
+-static inline int efx_is_over_4gb(dma_addr_t address)
+-{
+-      if (DMA_ADDR_T_WIDTH > 32)
+-              return (((u64) address) >> 32) ? 1 : 0;
+-      else
+-              /* Can never be true */
+-              return 0;
+-}
+-
+ #endif /* EFX_BITFIELD_H */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/debugfs.c
+--- a/drivers/net/sfc/debugfs.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/debugfs.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -27,9 +27,6 @@
+ #include <linux/module.h>
+ #include <linux/pci.h>
+-/* For out-of-tree builds we always need procfs, if only for a compatibility
+- * symlink.
+- */
+ #include <linux/proc_fs.h>
+ #include <linux/dcache.h>
+ #include <linux/seq_file.h>
+@@ -38,13 +35,6 @@
+ #include "debugfs.h"
+ #include "falcon.h"
+-/* EFX_USE_DEBUGFS is defined by kernel_compat.h so we can't decide whether to
+- * include this earlier.
+- */
+-#ifdef EFX_USE_DEBUGFS
+-#include <linux/debugfs.h>
+-#endif
+-
+ #ifndef PRIu64
+ #     if (BITS_PER_LONG == 64)
+ #             define PRIu64 "lu"
+@@ -52,8 +42,6 @@
+ #             define PRIu64 "llu"
+ #     endif
+ #endif
+-
+-#ifndef EFX_USE_DEBUGFS
+ static void efx_debugfs_remove(struct proc_dir_entry *entry)
+ {
+@@ -65,7 +53,6 @@
+ #define debugfs_create_dir proc_mkdir
+ #define debugfs_create_symlink proc_symlink
+-#endif /* !EFX_USE_DEBUGFS */
+ /* Parameter definition bound to a structure - each file has one of these */
+ struct efx_debugfs_bound_param {
+@@ -86,25 +73,6 @@
+ /* Sequential file interface to bound parameters */
+-
+-#if defined(EFX_USE_DEBUGFS)
+-
+-static int efx_debugfs_seq_show(struct seq_file *file, void *v)
+-{
+-      struct efx_debugfs_bound_param *binding =
+-              (struct efx_debugfs_bound_param *)file->private;
+-
+-      return binding->param->reader(file,
+-                                    binding->structure +
+-                                    binding->param->offset);
+-}
+-
+-static int efx_debugfs_open(struct inode *inode, struct file *file)
+-{
+-      return single_open(file, efx_debugfs_seq_show, inode->i_private);
+-}
+-
+-#else /* EFX_NOT_UPSTREAM && !EFX_USE_DEBUGFS */
+ static int efx_debugfs_seq_show(struct seq_file *file, void *v)
+ {
+@@ -124,8 +92,6 @@
+       return single_open(file, efx_debugfs_seq_show, PROC_I(inode)->pde);
+ }
+-#endif /* !EFX_NOT_UPSTREAM || EFX_USE_DEBUGFS */
+-
+ static struct file_operations efx_debugfs_file_ops = {
+       .owner   = THIS_MODULE,
+@@ -136,41 +102,10 @@
+ };
+-#if defined(EFX_USE_DEBUGFS)
+-
+-/**
+- * efx_fini_debugfs_child - remove a named child of a debugfs directory
+- * @dir:              Directory
+- * @name:             Name of child
+- *
+- * This removes the named child from the directory, if it exists.
+- */
+-void efx_fini_debugfs_child(struct dentry *dir, const char *name)
+-{
+-      struct qstr child_name;
+-      struct dentry *child;
+-
+-      child_name.len = strlen(name);
+-      child_name.name = name;
+-      child_name.hash = full_name_hash(child_name.name, child_name.len);
+-      child = d_lookup(dir, &child_name);
+-      if (child) {
+-              /* If it's a "regular" file, free its parameter binding */
+-              if (S_ISREG(child->d_inode->i_mode))
+-                      kfree(child->d_inode->i_private);
+-              debugfs_remove(child);
+-              dput(child);
+-      }
+-}
+-
+-#else /* EFX_NOT_UPSTREAM && !EFX_USE_DEBUGFS */
+-
+ void efx_fini_debugfs_child(struct proc_dir_entry *dir, const char *name)
+ {
+       remove_proc_entry(name, dir);
+ }
+-
+-#endif /* !EFX_NOT_UPSTREAM || EFX_USE_DEBUGFS */
+ /*
+  * Remove a debugfs directory.
+@@ -283,22 +218,6 @@
+       while (param->name) {
+               struct dentry *entry;
+-#if defined(EFX_USE_DEBUGFS)
+-              struct efx_debugfs_bound_param *binding;
+-
+-              binding = kmalloc(sizeof(*binding), GFP_KERNEL);
+-              if (!binding)
+-                      goto err;
+-              binding->param = param;
+-              binding->structure = structure;
+-
+-              entry = debugfs_create_file(param->name, S_IRUGO, parent,
+-                                          binding, &efx_debugfs_file_ops);
+-              if (!entry) {
+-                      kfree(binding);
+-                      goto err;
+-              }
+-#else
+               entry = create_proc_entry(param->name, S_IRUGO, parent);
+               if (!entry)
+                       goto err;
+@@ -314,7 +233,6 @@
+               entry->proc_fops = &efx_debugfs_file_ops;
+               smp_wmb();
+               entry->read_proc = (read_proc_t *) structure;
+-#endif
+               param++;
+       }
+@@ -392,7 +310,6 @@
+ static struct efx_debugfs_parameter efx_debugfs_port_parameters[] = {
+       EFX_NAMED_PARAMETER(enabled, struct efx_nic, port_enabled,
+                           int, efx_debugfs_read_int),
+-      EFX_INT_PARAMETER(struct efx_nic, net_dev_registered),
+       EFX_INT_PARAMETER(struct efx_nic, rx_checksum_enabled),
+       EFX_ATOMIC_PARAMETER(struct efx_nic, netif_stop_count),
+       EFX_INT_PARAMETER(struct efx_nic, link_up),
+@@ -668,6 +585,14 @@
+       EFX_INT_PARAMETER(struct efx_channel, rx_alloc_level),
+       EFX_INT_PARAMETER(struct efx_channel, rx_alloc_push_pages),
+       EFX_INT_PARAMETER(struct efx_channel, rx_alloc_pop_pages),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_merges),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_bursts),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_slow_start),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_misorder),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_too_many),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_new_stream),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_drop_idle),
++      EFX_UINT_PARAMETER(struct efx_channel, ssr.n_drop_closed),
+       {NULL},
+ };
+@@ -882,11 +807,7 @@
+ int efx_init_debugfs(void)
+ {
+       /* Create top-level directory */
+-#if defined(EFX_USE_DEBUGFS)
+-      efx_debug_root = debugfs_create_dir("sfc", NULL);
+-#else
+       efx_debug_root = proc_mkdir("sfc", proc_root_driver);
+-#endif
+       if (!efx_debug_root)
+               goto err;
+@@ -895,11 +816,6 @@
+       if (!efx_debug_cards)
+               goto err;
+-#if defined(EFX_USE_DEBUGFS)
+-      /* Create compatibility sym-link */
+-      if (!proc_symlink("sfc", proc_root_driver, "/sys/kernel/debug/sfc"))
+-              goto err;
+-#endif
+       return 0;
+  err:
+@@ -914,9 +830,7 @@
+  */
+ void efx_fini_debugfs(void)
+ {
+-#if defined(EFX_USE_DEBUGFS)
+       remove_proc_entry("sfc", proc_root_driver);
+-#endif
+       debugfs_remove(efx_debug_cards);
+       efx_debug_cards = NULL;
+       debugfs_remove(efx_debug_root);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/driverlink.c
+--- a/drivers/net/sfc/driverlink.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/driverlink.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -140,20 +140,15 @@
+       printk(KERN_INFO "Efx driverlink unregistering %s driver\n",
+                driver->name);
+-      /* Acquire lock.  We can't return failure, so have to use
+-       * down() instead of down_interruptible()
+-       */
++      /* Acquire lock.  We can't return failure */
+       mutex_lock(&efx_driverlink_lock);
+-      /* Remove all devices claimed by the driver */
+       list_for_each_entry_safe(efx_handle, efx_handle_n,
+                                &driver->device_list, driver_node)
+               efx_dl_del_device(&efx_handle->efx_dev);
+-      /* Remove driver from driver list */
+       list_del(&driver->node);
+-      /* Release lock */
+       mutex_unlock(&efx_driverlink_lock);
+ }
+ EXPORT_SYMBOL(efx_dl_unregister_driver);
+@@ -252,22 +247,14 @@
+  * To avoid a branch point on the fast-path, the callbacks are always
+  * implemented - they are never NULL.
+  */
+-#if defined(EFX_USE_FASTCALL)
+ static enum efx_veto fastcall
+-#else
+-static enum efx_veto
+-#endif
+ efx_dummy_tx_packet_callback(struct efx_dl_device *efx_dev, struct sk_buff *skb)
+ {
+       /* Never veto the packet */
+       return EFX_ALLOW_PACKET;
+ }
+-#if defined(EFX_USE_FASTCALL)
+ static enum efx_veto fastcall
+-#else
+-static enum efx_veto
+-#endif
+ efx_dummy_rx_packet_callback(struct efx_dl_device *efx_dev,
+                            const char *pkt_buf, int len)
+ {
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/driverlink_api.h
+--- a/drivers/net/sfc/driverlink_api.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/driverlink_api.h Tue Mar 31 11:59:10 2009 +0100
+@@ -29,13 +29,8 @@
+ #define EFX_DRIVERLINK_API_H
+ #include <linux/list.h> /* for struct list_head */
+-#if !defined(EFX_USE_FASTCALL)
+-      #include <linux/version.h>
+-      #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+-              #define EFX_USE_FASTCALL yes
+-              #include <linux/linkage.h>
+-      #endif
+-#endif
++#include <linux/linkage.h>
++#define EFX_USE_FASTCALL yes
+ /**
+  * DOC: Efx driverlink API
+@@ -327,25 +322,25 @@
+  *    The sfc driver will provide the appropriate lock semantics for
+  *    the underlying hardware.
+  * @buffer_table_min: First available buffer table entry
+- * @buffer_table_max: Last available buffer table entry + 1
++ * @buffer_table_lim: Last available buffer table entry + 1
+  * @evq_timer_min: First available event queue with timer
+- * @evq_timer_max: Last available event queue with timer + 1
++ * @evq_timer_lim: Last available event queue with timer + 1
+  * @evq_int_min: First available event queue with interrupt
+- * @evq_int_max: Last available event queue with interrupt + 1
++ * @evq_int_lim: Last available event queue with interrupt + 1
+  * @rxq_min: First available RX queue
+- * @rxq_max: Last available RX queue + 1
++ * @rxq_lim: Last available RX queue + 1
+  * @txq_min: First available TX queue
+- * @txq_max: Last available TX queue + 1
++ * @txq_lim: Last available TX queue + 1
+  * @flags: Hardware variation flags
+  */
+ struct efx_dl_falcon_resources {
+       struct efx_dl_device_info hdr;
+       spinlock_t *biu_lock;
+-      unsigned buffer_table_min, buffer_table_max;
+-      unsigned evq_timer_min, evq_timer_max;
+-      unsigned evq_int_min, evq_int_max;
+-      unsigned rxq_min, rxq_max;
+-      unsigned txq_min, txq_max;
++      unsigned buffer_table_min, buffer_table_lim;
++      unsigned evq_timer_min, evq_timer_lim;
++      unsigned evq_int_min, evq_int_lim;
++      unsigned rxq_min, rxq_lim;
++      unsigned txq_min, txq_lim;
+       enum efx_dl_falcon_resource_flags flags;
+ };
+@@ -426,13 +421,8 @@
+        * may have multiple TX queues, running in parallel, please avoid
+        * the need for locking if it all possible.
+        */
+-#if defined(EFX_USE_FASTCALL)
+       enum efx_veto fastcall (*tx_packet) (struct efx_dl_device *efx_dev,
+                                            struct sk_buff *skb);
+-#else
+-      enum efx_veto (*tx_packet) (struct efx_dl_device *efx_dev,
+-                                  struct sk_buff *skb);
+-#endif
+       /*
+        * rx_packet - Packet received.
+@@ -457,13 +447,8 @@
+        * allows for lockless operation between receive channels, so
+        * please avoid the need for locking if at all possible.
+        */
+-#if defined(EFX_USE_FASTCALL)
+       enum efx_veto fastcall (*rx_packet) (struct efx_dl_device *efx_dev,
+                                            const char *pkt_hdr, int pkt_len);
+-#else
+-      enum efx_veto (*rx_packet) (struct efx_dl_device *efx_dev,
+-                                  const char *pkt_hdr, int pkt_len);
+-#endif
+       /*
+        * link_change - Link status change.
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/efx.c
+--- a/drivers/net/sfc/efx.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/efx.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -36,7 +36,6 @@
+ #include <linux/in.h>
+ #include <linux/crc32.h>
+ #include <linux/ethtool.h>
+-#include <asm/uaccess.h>
+ #include "net_driver.h"
+ #include "gmii.h"
+ #include "driverlink.h"
+@@ -93,13 +92,16 @@
+ const unsigned int efx_reset_type_max = RESET_TYPE_MAX;
+ const char *efx_reset_type_names[] = {
+-      [RESET_TYPE_INVISIBLE]    = "INVISIBLE",
+-      [RESET_TYPE_ALL]          = "ALL",
+-      [RESET_TYPE_WORLD]        = "WORLD",
+-      [RESET_TYPE_DISABLE]      = "DISABLE",
+-      [RESET_TYPE_MONITOR]      = "MONITOR",
+-      [RESET_TYPE_INT_ERROR]    = "INT_ERROR",
+-      [RESET_TYPE_RX_RECOVERY]  = "RX_RECOVERY",
++      [RESET_TYPE_INVISIBLE]     = "INVISIBLE",
++      [RESET_TYPE_ALL]           = "ALL",
++      [RESET_TYPE_WORLD]         = "WORLD",
++      [RESET_TYPE_DISABLE]       = "DISABLE",
++      [RESET_TYPE_MONITOR]       = "MONITOR",
++      [RESET_TYPE_INT_ERROR]     = "INT_ERROR",
++      [RESET_TYPE_RX_RECOVERY]   = "RX_RECOVERY",
++      [RESET_TYPE_RX_DESC_FETCH] = "RX_DESC_FETCH",
++      [RESET_TYPE_TX_DESC_FETCH] = "TX_DESC_FETCH",
++      [RESET_TYPE_TX_SKIP]       = "TX_SKIP",
+ };
+ const unsigned int efx_nic_state_max = STATE_MAX;
+@@ -113,12 +115,28 @@
+ #define EFX_MAX_MTU (9 * 1024)
++/* RX slow fill workqueue. If memory allocation fails in the fast path,
++ * a work item is pushed onto this work queue to retry the allocation later,
++ * to avoid the NIC being starved of RX buffers. Since this is a per cpu
++ * workqueue, there is nothing to be gained in making it per NIC
++ */
++static struct workqueue_struct *refill_workqueue;
+ /**************************************************************************
+  *
+  * Configurable values
+  *
+  *************************************************************************/
++
++/*
++ * Enable large receive offload (LRO) aka soft segment reassembly (SSR)
++ *
++ * This sets the default for new devices.  It can be controlled later
++ * using ethtool.
++ */
++static int lro = 1;
++module_param(lro, int, 0644);
++MODULE_PARM_DESC(lro, "Large receive offload acceleration");
+ /*
+  * Use separate channels for TX and RX events
+@@ -150,7 +168,7 @@
+ /* This controls whether or not the driver will initialise devices
+  * with invalid MAC addresses stored in the EEPROM or flash.  If true,
+  * such devices will be initialised with a random locally-generated
+- * MAC address.  This allows for loading the efx_mtd driver to
++ * MAC address.  This allows for loading the sfc_mtd driver to
+  * reprogram the flash, even if the flash contents (including the MAC
+  * address) have previously been erased.
+  */
+@@ -182,11 +200,7 @@
+  */
+ static unsigned int allow_load_on_failure;
+-/* Set to 1 to enable the use of Message-Signalled Interrupts (MSI).
+- * MSI will not work on some motherboards due to limitations of the
+- * chipset, so the default is off.
+- *
+- * This is the highest capability interrupt mode to use
++/* This is the first interrupt mode to try out of:
+  * 0 => MSI-X
+  * 1 => MSI
+  * 2 => legacy
+@@ -203,10 +217,8 @@
+  * i.e. the number of CPUs among which we may distribute simultaneous
+  * interrupt handling.
+  *
+- * Cards without MSI-X will only target one CPU
+- *
+- * Default (0) means to use all CPUs in the system.  This parameter
+- * can be set using "rss_cpus=xxx" when loading the module.
++ * Cards without MSI-X will only target one CPU via legacy or MSI interrupt.
++ * The default (0) means to assign an interrupt to each package (level II cache)
+  */
+ static unsigned int rss_cpus;
+ module_param(rss_cpus, uint, 0444);
+@@ -221,6 +233,13 @@
+ static void efx_remove_port(struct efx_nic *efx);
+ static void efx_fini_napi(struct efx_nic *efx);
+ static void efx_fini_channels(struct efx_nic *efx);
++
++#define EFX_ASSERT_RESET_SERIALISED(efx)              \
++      do {                                            \
++              if ((efx->state == STATE_RUNNING) ||    \
++                  (efx->state == STATE_RESETTING))    \
++                      ASSERT_RTNL();                  \
++      } while (0)
+ /**************************************************************************
+  *
+@@ -253,6 +272,7 @@
+               channel->rx_pkt = NULL;
+       }
++      efx_flush_lro(channel);
+       efx_rx_strategy(channel);
+       /* Refill descriptor rings as necessary */
+@@ -288,19 +308,11 @@
+  * NAPI guarantees serialisation of polls of the same device, which
+  * provides the guarantee required by efx_process_channel().
+  */
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-static int efx_poll(struct napi_struct *napi, int budget)
+-{
+-      struct efx_channel *channel =
+-              container_of(napi, struct efx_channel, napi_str);
+-      struct net_device *napi_dev = channel->napi_dev;
+-#else
+ static int efx_poll(struct net_device *napi, int *budget_ret)
+ {
+       struct net_device *napi_dev = napi;
+       struct efx_channel *channel = napi_dev->priv;
+       int budget = min(napi_dev->quota, *budget_ret);
+-#endif
+       int unused;
+       int rx_packets;
+@@ -309,10 +321,8 @@
+       unused = efx_process_channel(channel, budget);
+       rx_packets = (budget - unused);
+-#if defined(EFX_HAVE_OLD_NAPI)
+       napi_dev->quota -= rx_packets;
+       *budget_ret -= rx_packets;
+-#endif
+       if (rx_packets < budget) {
+               /* There is no race here; although napi_disable() will
+@@ -324,11 +334,7 @@
+               efx_channel_processed(channel);
+       }
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-      return rx_packets;
+-#else
+       return (rx_packets >= budget);
+-#endif
+ }
+ /* Process the eventq of the specified channel immediately on this CPU
+@@ -387,8 +393,6 @@
+ {
+       EFX_LOG(channel->efx, "chan %d init event queue\n", channel->channel);
+-      ASSERT_RTNL();
+-
+       /* Initialise fields */
+       channel->eventq_read_ptr = 0;
+@@ -398,8 +402,6 @@
+ static void efx_fini_eventq(struct efx_channel *channel)
+ {
+       EFX_LOG(channel->efx, "chan %d fini event queue\n", channel->channel);
+-
+-      ASSERT_RTNL();
+       falcon_fini_eventq(channel);
+ }
+@@ -429,7 +431,7 @@
+              EFX_MAX_FRAME_LEN(efx->net_dev->mtu) +
+              efx->type->rx_buffer_padding);
+-      /* Page-based allocation page-order */
++      /* Calculate page-order */
+       for (order = 0; ((1u << order) * PAGE_SIZE) < len; ++order)
+               ;
+@@ -573,9 +575,7 @@
+       /* Wait for any NAPI processing to complete */
+       napi_disable(&channel->napi_str);
+-      /* Ensure that any worker threads have exited or will be
+-       * no-ops.
+-       */
++      /* Ensure that any worker threads have exited or will be no-ops */
+       efx_for_each_channel_rx_queue(rx_queue, channel) {
+               spin_lock_bh(&rx_queue->add_lock);
+               spin_unlock_bh(&rx_queue->add_lock);
+@@ -588,7 +588,8 @@
+       struct efx_tx_queue *tx_queue;
+       struct efx_rx_queue *rx_queue;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
++      BUG_ON(efx->port_enabled);
+       efx_for_each_channel(channel, efx) {
+               EFX_LOG(channel->efx, "shut down chan %d\n", channel->channel);
+@@ -624,6 +625,11 @@
+       channel->used_flags = 0;
+ }
++void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue, int delay)
++{
++      queue_delayed_work(refill_workqueue, &rx_queue->work, delay);
++}
++
+ /**************************************************************************
+  *
+  * Port handling
+@@ -636,12 +642,13 @@
+  */
+ static void efx_link_status_changed(struct efx_nic *efx)
+ {
+-      unsigned long flags __attribute__ ((unused));
+       int carrier_ok;
+-      /* Ensure no link status notifications get sent to the OS after the net
+-       * device has been unregistered. */
+-      if (!efx->net_dev_registered)
++      /* SFC Bug 5356: A net_dev notifier is registered, so we must ensure
++       * that no events are triggered between unregister_netdev() and the
++       * driver unloading. A more general condition is that NETDEV_CHANGE
++       * can only be generated between NETDEV_UP and NETDEV_DOWN */
++      if (!netif_running(efx->net_dev))
+               return;
+       carrier_ok = netif_carrier_ok(efx->net_dev) ? 1 : 0;
+@@ -685,46 +692,50 @@
+                        (efx->loopback_mode ? " LOOPBACK]" : ""),
+                        (efx->promiscuous ? " [PROMISC]" : ""));
+       } else {
+-              EFX_INFO(efx, "link down\n");
++              EFX_INFO(efx, "link down%s\n",
++                       efx->phy_powered ? "" : " [OFF]");
+       }
+ }
+-/* This call reinitialises the MAC to pick up new PHY settings
+- * To call from a context that cannot sleep use reconfigure_work work item
+- * For on_disabled=1 the caller must be serialised against efx_reset,
+- * ideally by holding the rtnl lock.
+- */
+-void efx_reconfigure_port(struct efx_nic *efx, int on_disabled)
++/* This call reinitialises the MAC to pick up new PHY settings. The
++ * caller must hold the mac_lock */
++static void __efx_reconfigure_port(struct efx_nic *efx)
+ {
+-      mutex_lock(&efx->mac_lock);
++      WARN_ON(!mutex_is_locked(&efx->mac_lock));
+-      EFX_LOG(efx, "reconfiguring MAC from PHY settings\n");
+-
+-      if (on_disabled)
+-              ASSERT_RTNL();
+-      else if (!efx->port_enabled)
+-              goto out;
++      EFX_LOG(efx, "reconfiguring MAC from PHY settings on CPU %d\n",
++              raw_smp_processor_id());
+       efx->mac_op->reconfigure(efx);
+-out:
+       /* Inform kernel of loss/gain of carrier */
+       efx_link_status_changed(efx);
++}
++/* Reinitialise the MAC to pick up new PHY settings, even if the port is
++ * disabled. */
++void efx_reconfigure_port(struct efx_nic *efx)
++{
++      EFX_ASSERT_RESET_SERIALISED(efx);
++
++      mutex_lock(&efx->mac_lock);
++      __efx_reconfigure_port(efx);
+       mutex_unlock(&efx->mac_lock);
+ }
++/* Asynchronous efx_reconfigure_port work item. To speed up efx_flush_all()
++ * we don't efx_reconfigure_port() if the port is disabled. Care is taken
++ * in efx_stop_all() and efx_start_port() to prevent PHY events being lost */
+ static void efx_reconfigure_work(struct work_struct *data)
+ {
+       struct efx_nic *efx = container_of(data, struct efx_nic,
+                                          reconfigure_work);
+-      EFX_LOG(efx, "MAC reconfigure executing on CPU %d\n",
+-              raw_smp_processor_id());
+-
+-      /* Reinitialise MAC to activate new PHY parameters */
+-      efx_reconfigure_port(efx, 0);
++      mutex_lock(&efx->mac_lock);
++      if (efx->port_enabled)
++              __efx_reconfigure_port(efx);
++      mutex_unlock(&efx->mac_lock);
+ }
+ static int efx_probe_port(struct efx_nic *efx)
+@@ -789,47 +800,34 @@
+       return 0;
+ }
+-/* Allow efx_reconfigure_port() to run, and propagate delayed changes
+- * to the promiscuous flag to the MAC if needed */
++/* Allow efx_reconfigure_port() to be scheduled, and close the window
++ * between efx_stop_port and efx_flush_all whereby a previously scheduled
++ * efx_reconfigure_port() may have been cancelled */
+ static void efx_start_port(struct efx_nic *efx)
+ {
+       EFX_LOG(efx, "start port\n");
+-      ASSERT_RTNL();
+-
+       BUG_ON(efx->port_enabled);
+       mutex_lock(&efx->mac_lock);
+       efx->port_enabled = 1;
++      __efx_reconfigure_port(efx);
+       mutex_unlock(&efx->mac_lock);
+-
+-      if (efx->net_dev_registered) {
+-              int promiscuous;
+-
+-              netif_tx_lock_bh(efx->net_dev);
+-              promiscuous = (efx->net_dev->flags & IFF_PROMISC) ? 1 : 0;
+-              if (efx->promiscuous != promiscuous) {
+-                      efx->promiscuous = promiscuous;
+-                      queue_work(efx->workqueue, &efx->reconfigure_work);
+-              }
+-              netif_tx_unlock_bh(efx->net_dev);
+-      }
+ }
+-/* Prevents efx_reconfigure_port() from executing, and prevents
++/* Prevent efx_reconfigure_work and efx_monitor() from executing, and
+  * efx_set_multicast_list() from scheduling efx_reconfigure_work.
+  * efx_reconfigure_work can still be scheduled via NAPI processing
+  * until efx_flush_all() is called */
+ static void efx_stop_port(struct efx_nic *efx)
+ {
+       EFX_LOG(efx, "stop port\n");
+-      ASSERT_RTNL();
+       mutex_lock(&efx->mac_lock);
+       efx->port_enabled = 0;
+       mutex_unlock(&efx->mac_lock);
+       /* Serialise against efx_set_multicast_list() */
+-      if (efx->net_dev_registered) {
++      if (NET_DEV_REGISTERED(efx)) {
+               netif_tx_lock_bh(efx->net_dev);
+               netif_tx_unlock_bh(efx->net_dev);
+       }
+@@ -868,6 +866,7 @@
+ static int efx_init_io(struct efx_nic *efx)
+ {
+       struct pci_dev *pci_dev = efx->pci_dev;
++      dma_addr_t dma_mask = efx->type->max_dma_mask;
+       int rc;
+       EFX_LOG(efx, "initialising I/O\n");
+@@ -886,20 +885,18 @@
+        * (e.g. x86_64 with iommu_sac_force set) will allow 40 bit
+        * masks event though they reject 46 bit masks.
+        */
+-      efx->dma_mask = efx->type->max_dma_mask;
+-      while (efx->dma_mask > 0x7fffffffUL) {
+-              if (pci_dma_supported(pci_dev, efx->dma_mask) &&
+-                  ((rc = pci_set_dma_mask(pci_dev, efx->dma_mask)) == 0))
++      while (dma_mask > 0x7fffffffUL) {
++              if (pci_dma_supported(pci_dev, dma_mask) &&
++                  ((rc = pci_set_dma_mask(pci_dev, dma_mask)) == 0))
+                       break;
+-              efx->dma_mask >>= 1;
++              dma_mask >>= 1;
+       }
+       if (rc) {
+               EFX_ERR(efx, "could not find a suitable DMA mask\n");
+               goto fail2;
+       }
+-      EFX_LOG(efx, "using DMA mask %llx\n",
+-              (unsigned long long)efx->dma_mask);
+-      rc = pci_set_consistent_dma_mask(pci_dev, efx->dma_mask);
++      EFX_LOG(efx, "using DMA mask %llx\n", (unsigned long long) dma_mask);
++      rc = pci_set_consistent_dma_mask(pci_dev, dma_mask);
+       if (rc) {
+               /* pci_set_consistent_dma_mask() is not *allowed* to
+                * fail with a mask that pci_set_dma_mask() accepted,
+@@ -912,13 +909,7 @@
+       /* Get memory base address */
+       efx->membase_phys = pci_resource_start(efx->pci_dev,
+                                              efx->type->mem_bar);
+-#if !defined(EFX_HAVE_MSIX_TABLE_RESERVED)
+       rc = pci_request_region(pci_dev, efx->type->mem_bar, "sfc");
+-#else
+-      if (!request_mem_region(efx->membase_phys, efx->type->mem_map_size,
+-                              "sfc"))
+-              rc = -EIO;
+-#endif
+       if (rc) {
+               EFX_ERR(efx, "request for memory BAR failed\n");
+               rc = -EIO;
+@@ -960,11 +951,7 @@
+       }
+       if (efx->membase_phys) {
+-#if !defined(EFX_HAVE_MSIX_TABLE_RESERVED)
+               pci_release_region(efx->pci_dev, efx->type->mem_bar);
+-#else
+-              release_mem_region(efx->membase_phys, efx->type->mem_map_size);
+-#endif
+               efx->membase_phys = 0UL;
+       }
+@@ -972,33 +959,44 @@
+ }
+ /* Probe the number and type of interrupts we are able to obtain. */
+-static int efx_probe_interrupts(struct efx_nic *efx)
++static void efx_probe_interrupts(struct efx_nic *efx)
+ {
++      int max_channel = efx->type->phys_addr_channels - 1;
+       struct msix_entry xentries[EFX_MAX_CHANNELS];
+       int rc, i;
+-      /* Select number of used RSS queues */
+-      /* TODO: Can we react to CPU hotplug? */
+-      if (rss_cpus == 0)
+-              rss_cpus = num_online_cpus();
++      if (efx->interrupt_mode == EFX_INT_MODE_MSIX) {
++              BUG_ON(!pci_find_capability(efx->pci_dev, PCI_CAP_ID_MSIX));
+-      efx->rss_queues = 1;
+-      if (efx->interrupt_mode == EFX_INT_MODE_MSIX) {
+-              unsigned int max_channel = efx->type->phys_addr_channels - 1;
++              if (rss_cpus == 0) {
++#ifdef topology_core_siblings
++                      cpumask_t core_mask;
++                      int cpu;
+-              BUG_ON(!pci_find_capability(efx->pci_dev, PCI_CAP_ID_MSIX));
+-              efx->rss_queues = min(max_channel + 1, rss_cpus);
++                      cpus_clear(core_mask);
++                      efx->rss_queues = 0;
++                      for_each_online_cpu(cpu) {
++                              if (!cpu_isset(cpu, core_mask)) {
++                                      ++efx->rss_queues;
++                                      cpus_or(core_mask, core_mask,
++                                              topology_core_siblings(cpu));
++                              }
++                      }
++#else
++                      efx->rss_queues = num_online_cpus();
++#endif
++              } else {
++                      efx->rss_queues = rss_cpus;
++              }
++
++              /* Limit the number of rss queues appropriately */
++              efx->rss_queues = min(efx->rss_queues, max_channel + 1);
+               efx->rss_queues = min(efx->rss_queues, EFX_MAX_CHANNELS);
+-      }
+-      /* Determine how many RSS queues we can use, and mark channels
+-       * with the appropriate interrupt state */
+-      if (efx->interrupt_mode == EFX_INT_MODE_MSIX) {
+-              /* Build MSI request structure */
++              /* Request maximum number of MSI interrupts, and fill out
++               * the channel interrupt information the allowed allocation */
+               for (i = 0; i < efx->rss_queues; i++)
+                       xentries[i].entry = i;
+-
+-              /* Request maximum number of MSI interrupts */
+               rc = pci_enable_msix(efx->pci_dev, xentries, efx->rss_queues);
+               if (rc > 0) {
+                       EFX_BUG_ON_PARANOID(rc >= efx->rss_queues);
+@@ -1006,6 +1004,7 @@
+                       rc = pci_enable_msix(efx->pci_dev, xentries,
+                                            efx->rss_queues);
+               }
++
+               if (rc == 0) {
+                       for (i = 0; i < efx->rss_queues; i++) {
+                               efx->channel[i].has_interrupt = 1;
+@@ -1033,13 +1032,12 @@
+       /* Assume legacy interrupts */
+       if (efx->interrupt_mode == EFX_INT_MODE_LEGACY) {
++              efx->rss_queues = 1;
+               /* Every channel is interruptible */
+               for (i = 0; i < EFX_MAX_CHANNELS; i++)
+                       efx->channel[i].has_interrupt = 1;
+               efx->legacy_irq = efx->pci_dev->irq;
+       }
+-
+-      return 0;
+ }
+ static void efx_remove_interrupts(struct efx_nic *efx)
+@@ -1059,7 +1057,7 @@
+ /* Select number of used resources
+  * Should be called after probe_interrupts()
+  */
+-static int efx_select_used(struct efx_nic *efx)
++static void efx_select_used(struct efx_nic *efx)
+ {
+       struct efx_tx_queue *tx_queue;
+       struct efx_rx_queue *rx_queue;
+@@ -1096,7 +1094,6 @@
+                       rx_queue++;
+               }
+       }
+-      return 0;
+ }
+ static int efx_probe_nic(struct efx_nic *efx)
+@@ -1112,29 +1109,22 @@
+       /* Determine the number of channels and RX queues by trying to hook
+        * in MSI-X interrupts. */
+-      rc = efx_probe_interrupts(efx);
+-      if (rc)
+-              goto fail2;
++      efx_probe_interrupts(efx);
+       /* Determine number of RX queues and TX queues */
+-      rc = efx_select_used(efx);
+-      if (rc)
+-              goto fail3;
++      efx_select_used(efx);
+       /* Register debugfs entries */
+       rc = efx_init_debugfs_nic(efx);
+       if (rc)
+-              goto fail4;
++              goto fail2;
+       /* Initialise the interrupt moderation settings */
+       efx_init_irq_moderation(efx, tx_irq_mod_usec, rx_irq_mod_usec);
+       return 0;
+- fail4:
+-      /* fall-thru */
+- fail3:
++ fail2:
+       efx_remove_interrupts(efx);
+- fail2:
+       falcon_remove_nic(efx);
+  fail1:
+       return rc;
+@@ -1190,21 +1180,23 @@
+  fail3:
+       efx_for_each_channel(channel, efx)
+               efx_remove_channel(channel);
++      efx_remove_port(efx);
+  fail2:
+-      efx_remove_port(efx);
++      efx_remove_nic(efx);
+  fail1:
+       return rc;
+ }
+ /* Called after previous invocation(s) of efx_stop_all, restarts the
+- * port, kernel transmit queue, NAPI processing and hardware interrupts.
++ * port, kernel transmit queue, NAPI processing and hardware interrupts,
++ * and ensures that the port is scheduled to be reconfigured.
+  * This function is safe to call multiple times when the NIC is in any
+  * state. */
+ static void efx_start_all(struct efx_nic *efx)
+ {
+       struct efx_channel *channel;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       /* Check that it is appropriate to restart the interface. All
+        * of these flags are safe to read under just the rtnl lock */
+@@ -1212,7 +1204,7 @@
+               return;
+       if ((efx->state != STATE_RUNNING) && (efx->state != STATE_INIT))
+               return;
+-      if (efx->net_dev_registered && !netif_running(efx->net_dev))
++      if (NET_DEV_REGISTERED(efx) && !netif_running(efx->net_dev))
+               return;
+       /* Mark the port as enabled so port reconfigurations can start, then
+@@ -1227,8 +1219,7 @@
+       /* Start hardware monitor if we're in RUNNING */
+       if (efx->state == STATE_RUNNING)
+-              queue_delayed_work(efx->workqueue, &efx->monitor_work,
+-                                 efx_monitor_interval);
++              queue_work(efx->workqueue, &efx->monitor_work);
+ }
+ /* Flush all delayed work. Should only be called when no more delayed work
+@@ -1236,24 +1227,6 @@
+  * since we're holding the rtnl_lock at this point. */
+ static void efx_flush_all(struct efx_nic *efx)
+ {
+-#if defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+-      struct efx_rx_queue *rx_queue;
+-
+-      /* Make sure the hardware monitor is stopped */
+-      cancel_delayed_work_sync(&efx->monitor_work);
+-
+-      /* Ensure that all RX slow refills are complete. */
+-      efx_for_each_rx_queue(rx_queue, efx) {
+-              cancel_delayed_work_sync(&rx_queue->work);
+-      }
+-#endif
+-
+-#if defined(EFX_USE_CANCEL_WORK_SYNC)
+-      /* Stop scheduled port reconfigurations */
+-      cancel_work_sync(&efx->reconfigure_work);
+-#endif
+-
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+       /* Ensure that the hardware monitor and asynchronous port
+        * reconfigurations are complete, which are the only two consumers
+        * of efx->workqueue. Since the hardware monitor runs on a long period,
+@@ -1270,9 +1243,8 @@
+       /* efx_rx_work will disarm if !channel->enabled, so we can just
+        * flush the refill workqueue twice as well. */
+-      flush_workqueue(efx->refill_workqueue);
+-      flush_workqueue(efx->refill_workqueue);
+-#endif
++      flush_workqueue(refill_workqueue);
++      flush_workqueue(refill_workqueue);
+ }
+ /* Quiesce hardware and software without bringing the link down.
+@@ -1284,7 +1256,7 @@
+ {
+       struct efx_channel *channel;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       /* port_enabled can be read safely under the rtnl lock */
+       if (!efx->port_enabled)
+@@ -1298,20 +1270,27 @@
+               if (channel->irq)
+                       synchronize_irq(channel->irq);
+-      /* Stop all synchronous port reconfigurations. */
+-      efx_stop_port(efx);
+-
+       /* Stop all NAPI processing and synchronous rx refills */
+       efx_for_each_channel(channel, efx)
+               efx_stop_channel(channel);
++      /* Stop all asynchronous port reconfigurations. Since all
++       * event processing has already been stopped, there is no
++       * window to loose phy events */
++      efx_stop_port(efx);
++
+       /* Flush reconfigure_work, refill_workqueue, monitor_work */
+       efx_flush_all(efx);
++
++      /* Isolate the MAC from the TX and RX engines, so that queue
++       * flushes will complete in a timely fashion. */
++      falcon_deconfigure_mac_wrapper(efx);
++      falcon_drain_tx_fifo(efx);
+       /* Stop the kernel transmit interface late, so the watchdog
+        * timer isn't ticking over the flush */
+       efx_stop_queue(efx);
+-      if (efx->net_dev_registered) {
++      if (NET_DEV_REGISTERED(efx)) {
+               netif_tx_lock_bh(efx->net_dev);
+               netif_tx_unlock_bh(efx->net_dev);
+       }
+@@ -1360,16 +1339,15 @@
+       return rc;
+ }
++/* A convinience function to safely flush all the queues */
+ int efx_flush_queues(struct efx_nic *efx)
+ {
+       int rc;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       efx_stop_all(efx);
+-      /* We can't just flush the tx queues because the event queues
+-       * may contain tx completions from that queue. Just flush everything */
+       efx_fini_channels(efx);
+       rc = efx_init_channels(efx);
+       if (rc) {
+@@ -1394,7 +1372,7 @@
+       struct efx_tx_queue *tx_queue;
+       struct efx_rx_queue *rx_queue;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       efx_for_each_tx_queue(tx_queue, efx)
+               tx_queue->channel->irq_moderation = tx_usecs;
+@@ -1413,20 +1391,13 @@
+  * efx_reconfigure_port via the mac_lock */
+ static void efx_monitor(struct work_struct *data)
+ {
+-#if !defined(EFX_NEED_WORK_API_WRAPPERS)
+-      struct efx_nic *efx = container_of(data, struct efx_nic,
+-                                         monitor_work.work);
+-#else
+       struct efx_nic *efx = container_of(data, struct efx_nic,
+                                          monitor_work);
+-#endif
+       int rc = 0;
+       EFX_TRACE(efx, "hardware monitor executing on CPU %d\n",
+                 raw_smp_processor_id());
+-
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+       /* Without cancel_delayed_work_sync(), we have to make sure that
+        * we don't rearm when port_enabled == 0 */
+       mutex_lock(&efx->mac_lock);
+@@ -1436,19 +1407,6 @@
+       }
+       rc = efx->mac_op->check_hw(efx);
+-#else
+-      /* If the mac_lock is already held then it is likely a port
+-       * reconfiguration is already in place, which will likely do
+-       * most of the work of check_hw() anyway. */
+-      if (!mutex_trylock(&efx->mac_lock)) {
+-              queue_delayed_work(efx->workqueue, &efx->monitor_work,
+-                                 efx_monitor_interval);
+-              return;
+-      }
+-
+-      if (efx->port_enabled)
+-              rc = efx->mac_op->check_hw(efx);
+-#endif
+       mutex_unlock(&efx->mac_lock);
+       if (rc) {
+@@ -1478,24 +1436,11 @@
+ static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
+ {
+       struct efx_nic *efx = net_dev->priv;
+-      int rc;
+-      ASSERT_RTNL();
++      if (!in_interrupt())
++          EFX_ASSERT_RESET_SERIALISED(efx);
+-      switch (cmd) {
+-      case SIOCGMIIPHY:
+-      case SIOCGMIIREG:
+-              rc = generic_mii_ioctl(&efx->mii, if_mii(ifr), cmd, NULL);
+-              break;
+-      case SIOCSMIIREG:
+-              rc = generic_mii_ioctl(&efx->mii, if_mii(ifr), cmd, NULL);
+-              efx_reconfigure_port(efx, 0);
+-              break;
+-      default:
+-              rc = -EOPNOTSUPP;
+-      }
+-
+-      return rc;
++      return generic_mii_ioctl(&efx->mii, if_mii(ifr), cmd, NULL);
+ }
+ /**************************************************************************
+@@ -1512,8 +1457,6 @@
+       struct efx_channel *channel;
+       int rc;
+-      ASSERT_RTNL();
+-
+       /* Allocate the NAPI dev for the port */
+       efx->net_dev = alloc_etherdev(0);
+       if (!efx->net_dev) {
+@@ -1523,29 +1466,15 @@
+       efx->net_dev->priv = efx;
+       efx->mii.dev = efx->net_dev;
+-      /* Set features based on module parameters and DMA mask.
+-       * Enable DMA to ZONE_HIGHMEM if the NIC can access all memory
+-       * directly.  This only has an effect on 32-bit systems and
+-       * PAE on x86 limits memory to 64GB so 40 bits is plenty to
+-       * address everything.  If the device can't address 40 bits
+-       * then it's safest to turn NETIF_F_HIGHDMA off because this
+-       * might be a PAE system with more than 4G of RAM and a 32-bit
+-       * NIC.  The use of EFX_DMA_MASK is to eliminate compiler
+-       * warnings on platforms where dma_addr_t is 32-bit.  We
+-       * assume that in those cases we can access all memory
+-       * directly if our DMA mask is all ones. */
+-      efx->net_dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
+-      if (efx->dma_mask >= EFX_DMA_MASK(DMA_40BIT_MASK))
+-              efx->net_dev->features |= NETIF_F_HIGHDMA;
++      efx->net_dev->features |= (NETIF_F_IP_CSUM | NETIF_F_SG |
++                                 NETIF_F_HIGHDMA);
++      efx->lro_enabled = lro;
+       /* Copy MAC address */
+       memcpy(&efx->net_dev->dev_addr, efx->mac_address, ETH_ALEN);
+       /* Allocate the per channel devs */
+       efx_for_each_channel(channel, efx) {
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-              channel->napi_dev = efx->net_dev;
+-#else
+               channel->napi_dev = alloc_etherdev(0);
+               if (!channel->napi_dev) {
+                       rc = -ENOMEM;
+@@ -1553,7 +1482,11 @@
+               }
+               channel->napi_dev->priv = channel;
+               atomic_set(&channel->napi_dev->refcnt, 1);
+-#endif
++
++              /* Initialise LRO/SSR */
++              rc = efx_ssr_init(&channel->ssr, efx);
++              if (rc)
++                      goto err;
+       }
+       return 0;
+@@ -1567,16 +1500,15 @@
+ {
+       struct efx_channel *channel;
+-      ASSERT_RTNL();
++      efx_for_each_channel(channel, efx) {
++              /* Fini LRO/SSR */
++              efx_ssr_fini(&channel->ssr);
+-      efx_for_each_channel(channel, efx) {
+               /* Finish per channel NAPI */
+-#if defined(EFX_HAVE_OLD_NAPI)
+               if (channel->napi_dev) {
+                       channel->napi_dev->priv = NULL;
+                       free_netdev(channel->napi_dev);
+               }
+-#endif
+               channel->napi_dev = NULL;
+       }
+@@ -1621,10 +1553,11 @@
+ static int efx_net_open(struct net_device *net_dev)
+ {
+       struct efx_nic *efx = net_dev->priv;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       EFX_LOG(efx, "opening device %s on CPU %d\n", net_dev->name,
+               raw_smp_processor_id());
++
+       efx_start_all(efx);
+       return 0;
+ }
+@@ -1641,7 +1574,7 @@
+       EFX_LOG(efx, "closing %s on CPU %d\n", net_dev->name,
+               raw_smp_processor_id());
+-      /* Stop device and flush all the channels */
++      /* Stop the device and flush all the channels */
+       efx_stop_all(efx);
+       efx_fini_channels(efx);
+       rc = efx_init_channels(efx);
+@@ -1651,9 +1584,7 @@
+       return 0;
+ }
+-/* Context: process, dev_base_lock held, non-blocking.
+- * Statistics are taken directly from the MAC.
+- */
++/* Context: process, dev_base_lock held, non-blocking. */
+ static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
+ {
+       struct efx_nic *efx = net_dev->priv;
+@@ -1662,23 +1593,27 @@
+       if (!spin_trylock(&efx->stats_lock))
+               return stats;
+-      if (efx->state == STATE_RUNNING)
++      if (efx->state == STATE_RUNNING) {
+               efx->mac_op->update_stats(efx);
++              falcon_update_nic_stats(efx);
++      }
+       spin_unlock(&efx->stats_lock);
+       stats->rx_packets = mac_stats->rx_packets;
+       stats->tx_packets = mac_stats->tx_packets;
+       stats->rx_bytes = mac_stats->rx_bytes;
+       stats->tx_bytes = mac_stats->tx_bytes;
+-      stats->tx_errors = mac_stats->tx_bad;
+       stats->multicast = mac_stats->rx_multicast;
+       stats->collisions = mac_stats->tx_collision;
+-      stats->rx_length_errors = mac_stats->rx_gtjumbo;
+-      stats->rx_over_errors = mac_stats->rx_overflow;
++      stats->rx_length_errors = (mac_stats->rx_gtjumbo +
++                                 mac_stats->rx_length_error);
++      stats->rx_over_errors = efx->n_rx_nodesc_drop_cnt;
+       stats->rx_crc_errors = mac_stats->rx_bad;
+       stats->rx_frame_errors = mac_stats->rx_align_error;
+-      stats->rx_fifo_errors = 0;
++      stats->rx_fifo_errors = mac_stats->rx_overflow;
+       stats->rx_missed_errors = mac_stats->rx_missed;
++      stats->tx_window_errors = mac_stats->tx_late_collision;
++
+       stats->rx_errors = (stats->rx_length_errors +
+                           stats->rx_over_errors +
+                           stats->rx_crc_errors +
+@@ -1686,11 +1621,8 @@
+                           stats->rx_fifo_errors +
+                           stats->rx_missed_errors +
+                           mac_stats->rx_symbol_error);
+-      stats->tx_aborted_errors = 0;
+-      stats->tx_carrier_errors = 0;
+-      stats->tx_fifo_errors = 0;
+-      stats->tx_heartbeat_errors = 0;
+-      stats->tx_window_errors = 0;
++      stats->tx_errors = (stats->tx_window_errors +
++                          mac_stats->tx_bad);
+       return stats;
+ }
+@@ -1715,7 +1647,7 @@
+       struct efx_nic *efx = net_dev->priv;
+       int rc = 0;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       if (new_mtu > EFX_MAX_MTU)
+               return -EINVAL;
+@@ -1738,15 +1670,11 @@
+       if (rc)
+               goto fail;
+-      /* Reconfigure the MAC */
+-      efx_reconfigure_port(efx, 1);
+-
+       /* Notify driverlink client of new MTU */
+       EFX_DL_CALLBACK(efx, mtu_changed, new_mtu);
++ out:
+       efx_start_all(efx);
+-
+- out:
+       return rc;
+  fail:
+@@ -1760,7 +1688,7 @@
+       struct sockaddr *addr = data;
+       char *new_addr = addr->sa_data;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       if (!is_valid_ether_addr(new_addr)) {
+               DECLARE_MAC_BUF(mac);
+@@ -1772,7 +1700,7 @@
+       memcpy(net_dev->dev_addr, new_addr, net_dev->addr_len);
+       /* Reconfigure the MAC */
+-      efx_reconfigure_port(efx, 1);
++      efx_reconfigure_port(efx);
+       return 0;
+ }
+@@ -1783,7 +1711,6 @@
+       struct efx_nic *efx = net_dev->priv;
+       struct dev_mc_list *mc_list = net_dev->mc_list;
+       union efx_multicast_hash *mc_hash = &efx->multicast_hash;
+-      unsigned long flags __attribute__ ((unused));
+       int promiscuous;
+       u32 crc;
+       int bit;
+@@ -1792,10 +1719,11 @@
+       /* Set per-MAC promiscuity flag and reconfigure MAC if necessary */
+       promiscuous = (net_dev->flags & IFF_PROMISC) ? 1 : 0;
+       if (efx->promiscuous != promiscuous) {
+-              if (efx->port_enabled) {
+-                      efx->promiscuous = promiscuous;
++              efx->promiscuous = promiscuous;
++              /* Close the window between efx_stop_port() and efx_flush_all()
++               * by only queuing work when the port is enabled. */
++              if (efx->port_enabled)
+                       queue_work(efx->workqueue, &efx->reconfigure_work);
+-              }
+       }
+       /* Build multicast hash table */
+@@ -1805,8 +1733,8 @@
+               memset(mc_hash, 0x00, sizeof(*mc_hash));
+               for (i = 0; i < net_dev->mc_count; i++) {
+                       crc = ether_crc_le(ETH_ALEN, mc_list->dmi_addr);
+-                      bit = (crc & ((1 << EFX_MCAST_HASH_BITS) - 1));
+-                      set_bit_le(bit, (void *)mc_hash);
++                      bit = crc & (EFX_MCAST_HASH_ENTRIES - 1);
++                      set_bit_le(bit, mc_hash->byte);
+                       mc_list = mc_list->next;
+               }
+       }
+@@ -1836,6 +1764,21 @@
+       .notifier_call = efx_netdev_event,
+ };
++/* Prior to Linux 2.6.24, the bonding driver may call change_mtu()
++ * without holding the RTNL, unlike all other callers.  We try to
++ * mitigate the risk of a race with other reconfiguration using
++ * rtnl_trylock(), but we cannot eliminate it completely.
++ */
++static int efx_locked_change_mtu(struct net_device *net_dev, int new_mtu)
++{
++      int must_unlock = rtnl_trylock();
++      int rc = efx_change_mtu(net_dev, new_mtu);
++      if (must_unlock)
++              rtnl_unlock();
++      return rc;
++}
++#define efx_change_mtu efx_locked_change_mtu
++
+ static int efx_register_netdev(struct efx_nic *efx)
+ {
+       struct net_device *net_dev = efx->net_dev;
+@@ -1861,8 +1804,6 @@
+       /* Always start with carrier off; PHY events will detect the link */
+       netif_carrier_off(efx->net_dev);
+-      BUG_ON(efx->net_dev_registered);
+-
+       /* Clear MAC statistics */
+       efx->mac_op->update_stats(efx);
+       memset(&efx->mac_stats, 0, sizeof(efx->mac_stats));
+@@ -1882,28 +1823,11 @@
+               return rc;
+       }
+-      /* Allow link change notifications to be sent to the operating
+-       * system.  The must happen after register_netdev so that
+-       * there are no outstanding link changes if that call fails.
+-       * It must happen before efx_reconfigure_port so that the
+-       * initial state of the link is reported. */
+-      mutex_lock(&efx->mac_lock);
+-      efx->net_dev_registered = 1;
+-      mutex_unlock(&efx->mac_lock);
+-
+-      /* Safety net: in case we don't get a PHY event */
+-      rtnl_lock();
+-      efx_reconfigure_port(efx, 1);
+-      rtnl_unlock();
+-
+-      EFX_LOG(efx, "registered\n");
+-
+       return 0;
+ }
+ static void efx_unregister_netdev(struct efx_nic *efx)
+ {
+-      int was_registered = efx->net_dev_registered;
+       struct efx_tx_queue *tx_queue;
+       if (!efx->net_dev)
+@@ -1911,22 +1835,13 @@
+       BUG_ON(efx->net_dev->priv != efx);
+-      /* SFC Bug 5356: Ensure that no more link status notifications get
+-       * sent to the stack.  Bad things happen if there's an
+-       * outstanding notification after the net device is freed, but
+-       * they only get flushed out by unregister_netdev, not by
+-       * free_netdev. */
+-      mutex_lock(&efx->mac_lock);
+-      efx->net_dev_registered = 0;
+-      mutex_unlock(&efx->mac_lock);
+-
+       /* Free up any skbs still remaining. This has to happen before
+        * we try to unregister the netdev as running their destructors
+        * may be needed to get the device ref. count to 0. */
+       efx_for_each_tx_queue(tx_queue, efx)
+               efx_release_tx_buffers(tx_queue);
+-      if (was_registered) {
++      if (NET_DEV_REGISTERED(efx)) {
+               strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name));
+               efx_fini_debugfs_netdev(efx->net_dev);
+               unregister_netdev(efx->net_dev);
+@@ -1939,15 +1854,11 @@
+  *
+  **************************************************************************/
+-/* This suspends the device (and acquires the suspend lock) without
+- * flushing the descriptor queues.  It is included for the convenience
+- * of the driverlink layer.
+- */
++/* Serialise access to the driverlink callbacks, by quiescing event processing
++ * (without flushing the descriptor queues), and acquiring the rtnl_lock */
+ void efx_suspend(struct efx_nic *efx)
+ {
+       EFX_LOG(efx, "suspending operations\n");
+-
+-      down(&efx->suspend_lock);
+       rtnl_lock();
+       efx_stop_all(efx);
+@@ -1959,8 +1870,6 @@
+       efx_start_all(efx);
+       rtnl_unlock();
+-
+-      up(&efx->suspend_lock);
+ }
+ /* The final hardware and software finalisation before reset.
+@@ -1970,7 +1879,7 @@
+ {
+       int rc;
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       rc = efx->mac_op->get_settings(efx, ecmd);
+       if (rc) {
+@@ -1996,10 +1905,6 @@
+       if (rc)
+               goto fail1;
+-      /* In an INVISIBLE_RESET there might not be a link state transition,
+-       * so we push the multicast list here. */
+-      falcon_set_multicast_hash(efx);
+-
+       /* Restore MAC and PHY settings. */
+       rc = efx->mac_op->set_settings(efx, ecmd);
+       if (rc) {
+@@ -2021,35 +1926,29 @@
+  *
+  * This function will sleep.  You cannot reset from within an atomic
+  * state; use efx_schedule_reset() instead.
++ *
++ * Grabs the dl_reset_lock, and to serialise with kernel interfaces the
++ * rtnl_lock.
+  */
+ static int efx_reset(struct efx_nic *efx)
+ {
+       struct ethtool_cmd ecmd;
+-      unsigned long flags __attribute__ ((unused));
+       enum reset_type method = efx->reset_pending;
+       int rc;
++      /* Notify driverlink clients of imminent reset. */
+       efx_dl_reset_lock();
++      efx_dl_reset_suspend(efx);
+-      rc = down_interruptible(&efx->suspend_lock);
+-      if (rc) {
+-              EFX_ERR(efx, "reset aborted by signal\n");
+-              goto unlock_dl_lock;
+-      }
++      /* Serialise with kernel interfaces */
++      rtnl_lock();
+-      /* We've got suspend_lock, which means we can only be in
+-       * STATE_RUNNING or STATE_FINI. Don't clear
+-       * efx->reset_pending, since this flag indicates that we
+-       * should retry device initialisation.
+-       */
++      /* If we're not RUNNING then don't reset. Leave the reset_pending
++       * flag set so that efx_pci_probe_main will be retried */
+       if (efx->state != STATE_RUNNING) {
+               EFX_INFO(efx, "scheduled reset quenched. NIC not RUNNING\n");
+-              goto unlock_suspend_lock;
++              goto unlock_rtnl;
+       }
+-
+-      /* Notify driverlink clients of imminent reset. */
+-      efx_dl_reset_suspend(efx);
+-      rtnl_lock();
+       efx->state = STATE_RESETTING;
+       EFX_INFO(efx, "resetting (%s)\n", RESET_TYPE(method));
+@@ -2104,15 +2003,16 @@
+               goto fail5;
+       mutex_unlock(&efx->mac_lock);
+-      efx_reconfigure_port(efx, 1);
+       EFX_LOG(efx, "reset complete\n");
+       efx->state = STATE_RUNNING;
+       efx_start_all(efx);
++ unlock_rtnl:
+       rtnl_unlock();
+-
+-      goto notify;
++      efx_dl_reset_resume(efx, 1);
++      efx_dl_reset_unlock();
++      return 0;
+  fail5:
+  fail4:
+@@ -2122,22 +2022,13 @@
+       EFX_ERR(efx, "has been disabled\n");
+       efx->state = STATE_DISABLED;
+-      /* Remove the net_dev */
+       mutex_unlock(&efx->mac_lock);
+       rtnl_unlock();
++      /* Remove the net_dev */
+       efx_unregister_netdev(efx);
+       efx_fini_port(efx);
+-
+- notify:
+-      /* Notify driverlink clients of completed reset */
+-      efx_dl_reset_resume(efx, (rc == 0));
+-
+- unlock_suspend_lock:
+-      up(&efx->suspend_lock);
+-
+- unlock_dl_lock:
++      efx_dl_reset_resume(efx, 0);
+       efx_dl_reset_unlock();
+-
+       return rc;
+ }
+@@ -2170,6 +2061,7 @@
+       case RESET_TYPE_RX_RECOVERY:
+       case RESET_TYPE_RX_DESC_FETCH:
+       case RESET_TYPE_TX_DESC_FETCH:
++      case RESET_TYPE_TX_SKIP:
+               method = RESET_TYPE_INVISIBLE;
+               break;
+       default:
+@@ -2185,11 +2077,7 @@
+       efx->reset_pending = method;
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+       queue_work(efx->reset_workqueue, &efx->reset_work);
+-#else
+-      queue_work(efx->workqueue, &efx->reset_work);
+-#endif
+ }
+ /**************************************************************************
+@@ -2198,23 +2086,12 @@
+  *
+  **************************************************************************/
+-enum efx_type_index {
+-      EFX_TYPE_FALCON_A = 0,
+-      EFX_TYPE_FALCON_B = 1,
+-};
+-
+-static struct efx_nic_type *efx_nic_types[] = {
+-      [EFX_TYPE_FALCON_A] = &falcon_a_nic_type,
+-      [EFX_TYPE_FALCON_B] = &falcon_b_nic_type,
+-};
+-
+-
+ /* PCI device ID table */
+ static struct pci_device_id efx_pci_table[] __devinitdata = {
+-      {EFX_VENDID_SFC, FALCON_A_P_DEVID, PCI_ANY_ID, PCI_ANY_ID,
+-       0, 0, EFX_TYPE_FALCON_A},
+-      {EFX_VENDID_SFC, FALCON_B_P_DEVID, PCI_ANY_ID, PCI_ANY_ID,
+-       0, 0, EFX_TYPE_FALCON_B},
++      {PCI_DEVICE(EFX_VENDID_SFC, FALCON_A_P_DEVID),
++       .driver_data = (unsigned long) &falcon_a_nic_type},
++      {PCI_DEVICE(EFX_VENDID_SFC, FALCON_B_P_DEVID),
++       .driver_data = (unsigned long) &falcon_b_nic_type},
+       {0}                     /* end of list */
+ };
+@@ -2275,7 +2152,7 @@
+ /* This zeroes out and then fills in the invariants in a struct
+  * efx_nic (including all sub-structures).
+  */
+-static int efx_init_struct(struct efx_nic *efx, enum efx_type_index type,
++static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type,
+                          struct pci_dev *pci_dev)
+ {
+       struct efx_channel *channel;
+@@ -2288,7 +2165,6 @@
+       spin_lock_init(&efx->biu_lock);
+       spin_lock_init(&efx->phy_lock);
+       mutex_init(&efx->spi_lock);
+-      sema_init(&efx->suspend_lock, 1);
+       INIT_WORK(&efx->reset_work, efx_reset_work);
+       INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor);
+       efx->pci_dev = pci_dev;
+@@ -2333,7 +2209,7 @@
+               INIT_DELAYED_WORK(&rx_queue->work, efx_rx_work);
+       }
+-      efx->type = efx_nic_types[type];
++      efx->type = type;
+       /* Sanity-check NIC type */
+       EFX_BUG_ON_PARANOID(efx->type->txd_ring_mask &
+@@ -2352,62 +2228,38 @@
+       /* Higher numbered interrupt modes are less capable! */
+       efx->interrupt_mode = max(efx->type->max_interrupt_mode,
+                                 interrupt_mode);
+-#if defined(EFX_NEED_DUMMY_MSIX)
+-      if (efx->interrupt_mode == EFX_INT_MODE_MSIX)
+-              efx->interrupt_mode = EFX_INT_MODE_MSI;
+-#endif
+-      /* Tasks that can fail are last */
+-      efx->refill_workqueue = create_workqueue("sfc_refill");
+-      if (!efx->refill_workqueue) {
++      efx->workqueue = create_singlethread_workqueue("sfc_work");
++      if (!efx->workqueue) {
+               rc = -ENOMEM;
+               goto fail1;
+       }
+-      efx->workqueue = create_singlethread_workqueue("sfc_work");
+-      if (!efx->workqueue) {
++      efx->reset_workqueue = create_singlethread_workqueue("sfc_reset");
++      if (!efx->reset_workqueue) {
+               rc = -ENOMEM;
+               goto fail2;
+       }
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+-      efx->reset_workqueue = create_singlethread_workqueue("sfc_reset");
+-      if (!efx->reset_workqueue) {
+-              rc = -ENOMEM;
+-              goto fail3;
+-      }
+-#endif
+-
+       return 0;
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+- fail3:
++ fail2:
+       destroy_workqueue(efx->workqueue);
+       efx->workqueue = NULL;
+-#endif
+- fail2:
+-      destroy_workqueue(efx->refill_workqueue);
+-      efx->refill_workqueue = NULL;
+  fail1:
+       return rc;
+ }
+ static void efx_fini_struct(struct efx_nic *efx)
+ {
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+       if (efx->reset_workqueue) {
+               destroy_workqueue(efx->reset_workqueue);
+               efx->reset_workqueue = NULL;
+       }
+-#endif
+       if (efx->workqueue) {
+               destroy_workqueue(efx->workqueue);
+               efx->workqueue = NULL;
+-      }
+-      if (efx->refill_workqueue) {
+-              destroy_workqueue(efx->refill_workqueue);
+-              efx->refill_workqueue = NULL;
+       }
+ }
+@@ -2422,7 +2274,7 @@
+  */
+ static void efx_pci_remove_main(struct efx_nic *efx)
+ {
+-      ASSERT_RTNL();
++      EFX_ASSERT_RESET_SERIALISED(efx);
+       /* Skip everything if we never obtained a valid membase */
+       if (!efx->membase)
+@@ -2456,43 +2308,29 @@
+       /* Unregister driver from driverlink layer */
+       efx_dl_unregister_nic(efx);
+-      /* Mark the NIC as fini under both suspend_lock and
+-       * rtnl_lock */
+-      down(&efx->suspend_lock);
++      /* Mark the NIC as fini, then stop the interface */
+       rtnl_lock();
+       efx->state = STATE_FINI;
+-      up(&efx->suspend_lock);
++      dev_close(efx->net_dev);
+-      if (efx->membase) {
+-              /* Stop the NIC. Since we're in STATE_FINI, this
+-               * won't be reversed. */
+-              if (efx->net_dev_registered)
+-                      dev_close(efx->net_dev);
+-
+-              /* Release the rtnl lock. Any queued efx_resets()
+-               * can now return early [we're in STATE_FINI]. */
+-              rtnl_unlock();
+-
+-              efx_unregister_netdev(efx);
+-              efx_fini_debugfs_channels(efx);
+-
+-              /* Wait for any scheduled resets to complete. No more will be
+-               * scheduled from this point because efx_stop_all() has been
+-               * called, we are no longer registered with driverlink, and
+-               * the net_device's have been removed. */
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+-              flush_workqueue(efx->reset_workqueue);
+-#else
+-              flush_workqueue(efx->workqueue);
+-#endif
+-
+-              /* Fini and remove all the software state */
+-              rtnl_lock();
+-              efx_pci_remove_main(efx);
+-      }
+-
++      /* Allow any queued efx_resets() to complete */
+       rtnl_unlock();
++      if (efx->membase == NULL)
++              goto out;
++
++      efx_unregister_netdev(efx);
++      efx_fini_debugfs_channels(efx);
++
++      /* Wait for any scheduled resets to complete. No more will be
++       * scheduled from this point because efx_stop_all() has been
++       * called, we are no longer registered with driverlink, and
++       * the net_device's have been removed. */
++      flush_workqueue(efx->reset_workqueue);
++
++      efx_pci_remove_main(efx);
++
++out:
+       efx_fini_io(efx);
+       EFX_LOG(efx, "shutdown successful\n");
+@@ -2593,7 +2431,7 @@
+                                  const struct pci_device_id *entry)
+ {
+       struct efx_nic *efx;
+-      enum efx_type_index type = entry->driver_data;
++      struct efx_nic_type *type = (struct efx_nic_type *) entry->driver_data;
+       int i, rc;
+       /* Allocate and initialise a struct efx_nic */
+@@ -2614,50 +2452,27 @@
+       if (rc)
+               goto fail3;
+-      /* From this point on we begin to expose the driver to the OS
+-       * to varying degrees, so lets grab the suspend_lock and
+-       * rtnl_lock to serialise against efx_reset() and
+-       * friends. efx->state is not STATE_RUNNING yet, but we don't
+-       * want these tasks to fail, just to block until we drop the
+-       * lock
+-       */
+-      rc = down_interruptible(&efx->suspend_lock);
+-      if (rc) {
+-              EFX_ERR(efx, "suspend interrupted - aborting\n");
+-              goto fail4;
+-      }
+-
+-      rtnl_lock();
+-
+-      /* Probe, initialise and start everything. Run self-test */
++      /* No serialisation is required with the reset path because
++       * we're in STATE_INIT. */
+       for (i = 0; i < 5; i++) {
+               rc = efx_pci_probe_main(efx);
+               if (rc == 0)
+                       break;
+-              /* Retry if a recoverably reset event has been scheduled */
+-              if ((efx->reset_pending != RESET_TYPE_INVISIBLE) &&
+-                  (efx->reset_pending != RESET_TYPE_ALL))
+-                      goto fail5;
+-
+               /* Serialise against efx_reset(). No more resets will be
+                * scheduled since efx_stop_all() has been called, and we
+                * have not and never have been registered with either
+                * the rtnetlink or driverlink layers. */
+-              rtnl_unlock();
+-              up(&efx->suspend_lock);
++              flush_workqueue(efx->reset_workqueue);
+-#if defined(EFX_USE_CANCEL_WORK_SYNC)
+-              cancel_work_sync(&efx->reset_work);
+-#else
+-              flush_workqueue(efx->reset_workqueue);
+-#endif
+-
+-              down(&efx->suspend_lock);
+-              rtnl_lock();
++              /* Retry if a recoverably reset event has been scheduled */
++              if ((efx->reset_pending != RESET_TYPE_INVISIBLE) &&
++                  (efx->reset_pending != RESET_TYPE_ALL))
++                      goto fail4;
+               efx->reset_pending = RESET_TYPE_NONE;
+-      };
++      }
++
+       if (rc) {
+               EFX_ERR(efx, "Could not reset NIC\n");
+               goto fail5;
+@@ -2671,15 +2486,13 @@
+       /* Switch to the running state before we expose the device to
+        * the OS.  This is to ensure that the initial gathering of
+        * MAC stats succeeds. */
++      rtnl_lock();
+       efx->state = STATE_RUNNING;
+-
+       rtnl_unlock();
+       rc = efx_register_netdev(efx);
+       if (rc)
+               goto fail7;
+-
+-      up(&efx->suspend_lock);
+       EFX_LOG(efx, "initialisation successful\n");
+@@ -2691,18 +2504,12 @@
+       return 0;
+  fail8:
+-      down(&efx->suspend_lock);
+       efx_unregister_netdev(efx);
+  fail7:
+-      /* Re-acquire the rtnl lock around pci_remove_main() */
+-      rtnl_lock();
+       efx_fini_debugfs_channels(efx);
+  fail6:
+       efx_pci_remove_main(efx);
+  fail5:
+-      /* Drop the locks before fini */
+-      rtnl_unlock();
+-      up(&efx->suspend_lock);
+  fail4:
+       efx_fini_io(efx);
+  fail3:
+@@ -2749,6 +2556,12 @@
+       if (rc)
+               goto err_notifier;
++      refill_workqueue = create_workqueue("sfc_refill");
++      if (!refill_workqueue) {
++              rc = -ENOMEM;
++              goto err_refill;
++      }
++
+       rc = pci_register_driver(&efx_pci_driver);
+       if (rc < 0)
+               goto err_pci;
+@@ -2756,6 +2569,8 @@
+       return 0;
+  err_pci:
++      destroy_workqueue(refill_workqueue);
++ err_refill:
+       unregister_netdevice_notifier(&efx_netdev_notifier);
+  err_notifier:
+       efx_fini_debugfs();
+@@ -2768,6 +2583,7 @@
+       printk(KERN_INFO "Solarflare NET driver unloading\n");
+       pci_unregister_driver(&efx_pci_driver);
++      destroy_workqueue(refill_workqueue);
+       unregister_netdevice_notifier(&efx_netdev_notifier);
+       efx_fini_debugfs();
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/efx.h
+--- a/drivers/net/sfc/efx.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/efx.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -43,30 +43,19 @@
+ extern void efx_wake_queue(struct efx_nic *efx);
+ /* RX */
+-#if defined(EFX_USE_FASTCALL)
+ extern void fastcall efx_xmit_done(struct efx_tx_queue *tx_queue,
+                                  unsigned int index);
+-#else
+-extern void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
+-#endif
+-#if defined(EFX_USE_FASTCALL)
+ extern void fastcall efx_rx_packet(struct efx_rx_queue *rx_queue,
+                                  unsigned int index, unsigned int len,
+                                  int checksummed, int discard);
+-#else
+-extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
+-                        unsigned int len, int checksummed, int discard);
+-#endif
+-extern void efx_fini_rx_buffer(struct efx_rx_queue *rx_queue,
+-                             struct efx_rx_buffer *rx_buf);
++extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue, int delay);
+ /* Channels */
+ extern void efx_process_channel_now(struct efx_channel *channel);
+ extern int efx_flush_queues(struct efx_nic *efx);
+ /* Ports */
+-extern void efx_reconfigure_port(struct efx_nic *efx,
+-                               int on_disabled);
++extern void efx_reconfigure_port(struct efx_nic *efx);
+ /* Global */
+ extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type);
+@@ -91,13 +80,8 @@
+                 channel->channel, raw_smp_processor_id());
+       channel->work_pending = 1;
+-#if defined(EFX_HAVE_OLD_NAPI)
+       if (!test_and_set_bit(__LINK_STATE_RX_SCHED, &channel->napi_dev->state))
+               __netif_rx_schedule(channel->napi_dev);
+-#else
+-      netif_rx_schedule(channel->napi_dev, &channel->napi_str);
+-#endif
+ }
+-
+ #endif /* EFX_EFX_H */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/enum.h
+--- a/drivers/net/sfc/enum.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/enum.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -98,6 +98,9 @@
+  * @RESET_TYPE_MONITOR: reset due to hardware monitor
+  * @RESET_TYPE_INT_ERROR: reset due to internal error
+  * @RESET_TYPE_RX_RECOVERY: reset to recover from RX datapath errors
++ * @RESET_TYPE_RX_DESC_FETCH: pcie error during rx descriptor fetch
++ * @RESET_TYPE_TX_DESC_FETCH: pcie error during tx descriptor fetch
++ * @RESET_TYPE_TX_SKIP: hardware completed empty tx descriptors
+  */
+ enum reset_type {
+       RESET_TYPE_NONE = -1,
+@@ -111,6 +114,7 @@
+       RESET_TYPE_RX_RECOVERY,
+       RESET_TYPE_RX_DESC_FETCH,
+       RESET_TYPE_TX_DESC_FETCH,
++      RESET_TYPE_TX_SKIP,
+       RESET_TYPE_MAX,
+ };
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/ethtool.c
+--- a/drivers/net/sfc/ethtool.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/ethtool.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -28,7 +28,6 @@
+ #include <linux/netdevice.h>
+ #include <linux/ethtool.h>
+ #include <linux/rtnetlink.h>
+-#include <asm/uaccess.h>
+ #include "net_driver.h"
+ #include "selftest.h"
+ #include "efx.h"
+@@ -200,8 +199,15 @@
+                            struct ethtool_cmd *ecmd)
+ {
+       struct efx_nic *efx = net_dev->priv;
++      int rc;
+-      return efx->mac_op->get_settings(efx, ecmd);
++      if (!in_interrupt())
++          mutex_lock(&efx->mac_lock);
++      rc = efx->mac_op->get_settings(efx, ecmd);
++      if (!in_interrupt())
++          mutex_unlock(&efx->mac_lock);
++
++      return rc;
+ }
+ /* This must be called with rtnl_lock held. */
+@@ -211,14 +217,13 @@
+       struct efx_nic *efx = net_dev->priv;
+       int rc;
++      mutex_lock(&efx->mac_lock);
+       rc = efx->mac_op->set_settings(efx, ecmd);
+-      if (rc)
+-              return rc;
++      mutex_unlock(&efx->mac_lock);
++      if (!rc)
++              efx_reconfigure_port(efx);
+-      /* Push the settings to the MAC */
+-      efx_reconfigure_port(efx, 0);
+-
+-      return 0;
++      return rc;
+ }
+ static void efx_ethtool_get_drvinfo(struct net_device *net_dev,
+@@ -418,7 +423,6 @@
+                                 struct ethtool_stats *stats
+                                 __attribute__ ((unused)), u64 *data)
+ {
+-      unsigned long flags __attribute__ ((unused));
+       struct efx_nic *efx = net_dev->priv;
+       struct efx_mac_stats *mac_stats = &efx->mac_stats;
+       struct efx_ethtool_stat *stat;
+@@ -429,7 +433,6 @@
+       /* Update MAC and NIC statistics */
+       net_dev->get_stats(net_dev);
+-      falcon_update_nic_stats(efx);
+       /* Fill detailed statistics buffer */
+       for (i = 0; i < EFX_ETHTOOL_NUM_STATS; i++) {
+@@ -460,7 +463,6 @@
+       rc = ethtool_op_set_tx_csum(net_dev, enable);
+       if (rc)
+               return rc;
+-
+       efx_flush_queues(efx);
+@@ -668,14 +670,14 @@
+       flow_control |= pause->autoneg ? EFX_FC_AUTO : 0;
+       /* Try to push the pause parameters */
++      mutex_lock(&efx->mac_lock);
+       rc = efx->mac_op->set_pause(efx, flow_control);
+-      if (rc)
+-              return rc;
++      mutex_unlock(&efx->mac_lock);
+-      /* Push the settings to the MAC */
+-      efx_reconfigure_port(efx, 0);
++      if (!rc)
++              efx_reconfigure_port(efx);
+-      return 0;
++      return rc;
+ }
+ static void efx_ethtool_get_pauseparam(struct net_device *net_dev,
+@@ -689,7 +691,6 @@
+ }
+-#if defined(EFX_USE_ETHTOOL_GET_PERM_ADDR)
+ static int efx_ethtool_op_get_perm_addr(struct net_device *net_dev,
+                                       struct ethtool_perm_addr *addr,
+                                       u8 *data)
+@@ -700,7 +701,6 @@
+       return 0;
+ }
+-#endif
+ struct ethtool_ops efx_ethtool_ops = {
+       .get_settings           = efx_ethtool_get_settings,
+@@ -718,17 +718,11 @@
+       .set_tx_csum            = efx_ethtool_set_tx_csum,
+       .get_sg                 = ethtool_op_get_sg,
+       .set_sg                 = ethtool_op_set_sg,
+-#if defined(EFX_USE_ETHTOOL_FLAGS)
+-      .get_flags              = ethtool_op_get_flags,
+-      .set_flags              = ethtool_op_set_flags,
+-#endif
+       .self_test_count        = efx_ethtool_self_test_count,
+       .self_test              = efx_ethtool_self_test,
+       .get_strings            = efx_ethtool_get_strings,
+       .phys_id                = efx_ethtool_phys_id,
+       .get_stats_count        = efx_ethtool_get_stats_count,
+       .get_ethtool_stats      = efx_ethtool_get_stats,
+-#if defined(EFX_USE_ETHTOOL_GET_PERM_ADDR)
+       .get_perm_addr          = efx_ethtool_op_get_perm_addr,
+-#endif
+ };
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/falcon.c
+--- a/drivers/net/sfc/falcon.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/falcon.c Tue Mar 31 11:59:10 2009 +0100
+@@ -25,8 +25,7 @@
+  ****************************************************************************
+  */
+-#include <asm/io.h>
+-#include <asm/bitops.h>
++#include <linux/bitops.h>
+ #include <linux/delay.h>
+ #include <linux/pci.h>
+ #include <linux/module.h>
+@@ -51,20 +50,29 @@
+  * present in SFE400X evaluation boards
+  */
++/**
++ * struct falcon_nic_data - Falcon NIC state
++ * @tx_dc_entries: Number of entries in each TX queue descriptor cache
++ * @rx_dc_entries: Number of entries in each RX queue descriptor cache
++ * @tx_dc_base: Base address in SRAM of TX queue descriptor caches
++ * @rx_dc_base: Base address in SRAM of RX queue descriptor caches
++ * @old_loopback_mode: Previous loopback mode used in deconfigure_mac_wrapper
++ * @external_sram_cfg: Size and number of banks of external SRAM
++ * @pci_dev2: The secondary PCI device if present
++ * @resources: Driverlink parameters
++ */
+ struct falcon_nic_data {
+-      /* Number of entries in each TX queue descriptor cache. */
+       unsigned tx_dc_entries;
+-      /* Number of entries in each RX queue descriptor cache. */
+       unsigned rx_dc_entries;
+-      /* Base address in SRAM of TX queue descriptor caches. */
+       unsigned tx_dc_base;
+-      /* Base address in SRAM of RX queue descriptor caches. */
+       unsigned rx_dc_base;
+-      /* Previous loopback mode used in deconfigure_mac_wrapper */
+       enum efx_loopback_mode old_loopback_mode;
+-      /* Driverlink parameters */
++      struct pci_dev *pci_dev2;
++
++      int external_sram_cfg;
++
+       struct efx_dl_falcon_resources resources;
+ };
+@@ -150,21 +158,23 @@
+ #endif
+ /* TX DMA length mask (13-bit) */
+-#define FALCON_TX_DMA_MASK (8192 - 1)
++#define FALCON_TX_DMA_MASK (4096 - 1)
+-/* Alignment of special buffers (4KB) */
+-#define FALCON_BUF_ALIGN 4096
++/* Size and alignment of special buffers (4KB) */
++#define FALCON_BUF_SIZE 4096
+ /* Dummy SRAM size code */
+ #define SRM_NB_BSZ_ONCHIP_ONLY (-1)
+ /* Be nice if these (or equiv.) were in linux/pci_regs.h, but they're not. */
+-#define PCI_EXP_DEVCAP_PWR_VAL_LBN    (18)
+-/* This field takes up bits 26 and 27. */
+-#define PCI_EXP_DEVCAP_PWR_SCL_LBN    (26)
+-#define PCI_EXP_LNKSTA_LNK_WID                (0x3f0)
+-#define PCI_EXP_LNKSTA_LNK_WID_LBN    (4)
++#define PCI_EXP_DEVCAP_PWR_VAL_LBN    18
++#define PCI_EXP_DEVCAP_PWR_SCL_LBN    26
++#define PCI_EXP_DEVCTL_PAYLOAD_LBN    5
++#define PCI_EXP_LNKSTA_LNK_WID                0x3f0
++#define PCI_EXP_LNKSTA_LNK_WID_LBN    4
++#define FALCON_IS_DUAL_FUNC(efx)              \
++      (FALCON_REV(efx) < FALCON_REV_B0)
+ /**************************************************************************
+  *
+@@ -284,15 +294,23 @@
+  *
+  *************************************************************************/
+-/* Adds the relevant entries to the full-mode buffer table. */
++/*
++ * Initialise a Falcon special buffer
++ *
++ * This will define a buffer (previously allocated via
++ * falcon_alloc_special_buffer()) in Falcon's buffer table, allowing
++ * it to be used for event queues, descriptor rings etc.
++ */
+ static int
+-falcon_pin_special_buffer_full(struct efx_nic *efx,
+-                             struct efx_special_buffer *buffer)
++falcon_init_special_buffer(struct efx_nic *efx,
++                         struct efx_special_buffer *buffer)
+ {
+       efx_qword_t buf_desc;
+       int index;
+       dma_addr_t dma_addr;
+       int i;
++
++      EFX_BUG_ON_PARANOID(!buffer->addr);
+       /* Write buffer descriptors to NIC */
+       for (i = 0; i < buffer->entries; i++) {
+@@ -311,14 +329,17 @@
+       return 0;
+ }
+-/* Clears the relevant entries from the buffer table */
++/* Unmaps a buffer from Falcon and clears the buffer table entries */
+ static void
+-falcon_clear_special_buffer_full(struct efx_nic *efx,
+-                               struct efx_special_buffer *buffer)
++falcon_fini_special_buffer(struct efx_nic *efx,
++                         struct efx_special_buffer *buffer)
+ {
+       efx_oword_t buf_tbl_upd;
+       unsigned int start = buffer->index;
+       unsigned int end = (buffer->index + buffer->entries - 1);
++
++      if (!buffer->entries)
++              return;
+       EFX_LOG(efx, "unmapping special buffers %d-%d\n",
+               buffer->index, buffer->index + buffer->entries - 1);
+@@ -337,11 +358,8 @@
+  * This allocates memory for a new buffer, clears it and allocates a
+  * new buffer ID range.  It does not write into Falcon's buffer table.
+  *
+- * This call will allocate 4kB buffers, since Falcon can't use 8kB
+- * buffers for event queues and descriptor rings.  It will always
+- * allocate an even number of 4kB buffers, since when we're in
+- * half-entry mode for the buffer table we can only deal with pairs of
+- * buffers.
++ * This call will allocate 4KB buffers, since Falcon can't use 8KB
++ * buffers for event queues and descriptor rings.
+  */
+ static int falcon_alloc_special_buffer(struct efx_nic *efx,
+                                      struct efx_special_buffer *buffer,
+@@ -349,8 +367,7 @@
+ {
+       struct falcon_nic_data *nic_data = efx->nic_data;
+-      /* Round size up to an 8kB boundary (i.e. pairs of 4kB buffers) */
+-      len = (len + 8192 - 1) & ~(8192 - 1);
++      len = ALIGN(len, FALCON_BUF_SIZE);
+       /* Allocate buffer as consistent PCI DMA space */
+       buffer->addr = pci_alloc_consistent(efx->pci_dev, len,
+@@ -358,8 +375,8 @@
+       if (!buffer->addr)
+               return -ENOMEM;
+       buffer->len = len;
+-      buffer->entries = len / 4096;
+-      BUG_ON(buffer->dma_addr & (FALCON_BUF_ALIGN - 1));
++      buffer->entries = len / FALCON_BUF_SIZE;
++      BUG_ON(buffer->dma_addr & (FALCON_BUF_SIZE - 1));
+       /* All zeros is a potentially valid event so memset to 0xff */
+       memset(buffer->addr, 0xff, len);
+@@ -375,34 +392,6 @@
+               buffer->addr, virt_to_phys(buffer->addr));
+       return 0;
+-}
+-
+-/*
+- * Initialise a Falcon special buffer
+- *
+- * This will define a buffer (previously allocated via
+- * falcon_alloc_special_buffer()) in Falcon's buffer table, allowing
+- * it to be used for event queues, descriptor rings etc.
+- */
+-static int falcon_init_special_buffer(struct efx_nic *efx,
+-                                    struct efx_special_buffer *buffer)
+-{
+-      EFX_BUG_ON_PARANOID(!buffer->addr);
+-
+-      /* Write buffer descriptors to NIC */
+-      return falcon_pin_special_buffer_full(efx, buffer);
+-}
+-
+-/* Unmaps a buffer from Falcon and clears the buffer table
+- * entries */
+-static void falcon_fini_special_buffer(struct efx_nic *efx,
+-                                     struct efx_special_buffer *buffer)
+-{
+-
+-      if (!buffer->entries)
+-              return;
+-
+-      falcon_clear_special_buffer_full(efx, buffer);
+ }
+ /* Release the buffer memory. */
+@@ -487,11 +476,7 @@
+  * descriptor in the hardware TX descriptor ring (in host memory), and
+  * write a doorbell.
+  */
+-#if defined(EFX_USE_FASTCALL)
+ void fastcall falcon_push_buffers(struct efx_tx_queue *tx_queue)
+-#else
+-void falcon_push_buffers(struct efx_tx_queue *tx_queue)
+-#endif
+ {
+       struct efx_tx_buffer *buffer;
+@@ -603,8 +588,7 @@
+       falcon_write(efx, &tx_flush_descq, TX_FLUSH_DESCQ_REG_KER);
+       msleep(FALCON_FLUSH_TIMEOUT);
+-      /* If the NIC is resetting then don't bother checking */
+-      if (EFX_WORKAROUND_7803(efx) || (efx->state == STATE_RESETTING))
++      if (EFX_WORKAROUND_7803(efx))
+               return 0;
+       /* Look for a flush completed event */
+@@ -707,11 +691,7 @@
+ /* This writes to the RX_DESC_WPTR register for the specified receive
+  * descriptor ring.
+  */
+-#if defined(EFX_USE_FASTCALL)
+ void fastcall falcon_notify_rx_desc(struct efx_rx_queue *rx_queue)
+-#else
+-void falcon_notify_rx_desc(struct efx_rx_queue *rx_queue)
+-#endif
+ {
+       efx_dword_t reg;
+       unsigned write_ptr;
+@@ -799,8 +779,7 @@
+       falcon_write(efx, &rx_flush_descq, RX_FLUSH_DESCQ_REG_KER);
+       msleep(FALCON_FLUSH_TIMEOUT);
+-      /* If the NIC is resetting then don't bother checking */
+-      if (EFX_WORKAROUND_7803(efx) || (efx->state == STATE_RESETTING))
++      if (EFX_WORKAROUND_7803(efx))
+               return 0;
+       /* Look for a flush completed event */
+@@ -863,8 +842,10 @@
+                       continue;
+               break;
+       }
+-      if (rc)
++      if (rc) {
+               EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue);
++              efx_schedule_reset(efx, RESET_TYPE_INVISIBLE);
++      }
+       /* Remove RX descriptor ring from card */
+       EFX_ZERO_OWORD(rx_desc_ptr);
+@@ -897,11 +878,7 @@
+  * whereas channel->eventq_read_ptr contains the index of the "next to
+  * read" event.
+  */
+-#if defined(EFX_USE_FASTCALL)
+ void fastcall falcon_eventq_read_ack(struct efx_channel *channel)
+-#else
+-void falcon_eventq_read_ack(struct efx_channel *channel)
+-#endif
+ {
+       efx_dword_t reg;
+       struct efx_nic *efx = channel->efx;
+@@ -947,10 +924,10 @@
+               tx_ev_q_label = EFX_QWORD_FIELD(*event, TX_EV_Q_LABEL);
+               tx_queue = &efx->tx_queue[tx_ev_q_label];
+-              if (efx->net_dev_registered)
++              if (NET_DEV_REGISTERED(efx))
+                       netif_tx_lock(efx->net_dev);
+               falcon_notify_tx_desc(tx_queue);
+-              if (efx->net_dev_registered)
++              if (NET_DEV_REGISTERED(efx))
+                       netif_tx_unlock(efx->net_dev);
+       } else if (EFX_QWORD_FIELD(*event, TX_EV_PKT_ERR) &&
+                  EFX_WORKAROUND_10727(efx)) {
+@@ -1290,11 +1267,7 @@
+       }
+ }
+-#if defined(EFX_USE_FASTCALL)
+ int fastcall falcon_process_eventq(struct efx_channel *channel, int *rx_quota)
+-#else
+-int falcon_process_eventq(struct efx_channel *channel, int *rx_quota)
+-#endif
+ {
+       unsigned int read_ptr;
+       efx_qword_t event, *p_event;
+@@ -1555,6 +1528,7 @@
+  */
+ static irqreturn_t falcon_fatal_interrupt(struct efx_nic *efx)
+ {
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr;
+       efx_oword_t fatal_intr;
+       int error, mem_perr;
+@@ -1581,8 +1555,8 @@
+       /* Disable DMA bus mastering on both devices */
+       pci_disable_device(efx->pci_dev);
+-      if (efx->type->is_dual_func)
+-              pci_disable_device(efx->pci_dev2);
++      if (FALCON_IS_DUAL_FUNC(efx))
++              pci_disable_device(nic_data->pci_dev2);
+       if (++n_int_errors < FALCON_MAX_INT_ERRORS) {
+               EFX_ERR(efx, "SYSTEM ERROR - reset scheduled\n");
+@@ -1603,13 +1577,9 @@
+  * interrupts are disabled, to allow for correct semantics of
+  * efx_suspend() and efx_resume().
+  */
+-#if !defined(EFX_HAVE_IRQ_HANDLER_REGS)
+-static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id)
+-#else
+ static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id,
+                                             struct pt_regs *regs
+                                             __attribute__ ((unused)))
+-#endif
+ {
+       struct efx_nic *efx = (struct efx_nic *)dev_id;
+       efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr;
+@@ -1647,13 +1617,9 @@
+ }
+-#if !defined(EFX_HAVE_IRQ_HANDLER_REGS)
+-static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id)
+-#else
+ static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id,
+                                             struct pt_regs *regs
+                                             __attribute__ ((unused)))
+-#endif
+ {
+       struct efx_nic *efx = (struct efx_nic *)dev_id;
+       efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr;
+@@ -1710,13 +1676,9 @@
+  * interrupts are disabled, to allow for correct semantics of
+  * efx_suspend() and efx_resume().
+  */
+-#if !defined(EFX_HAVE_IRQ_HANDLER_REGS)
+-static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id)
+-#else
+ static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id,
+                                       struct pt_regs *regs
+                                       __attribute__ ((unused)))
+-#endif
+ {
+       struct efx_channel *channel = (struct efx_channel *)dev_id;
+       struct efx_nic *efx = channel->efx;
+@@ -1746,7 +1708,6 @@
+ {
+       int i = 0;
+       unsigned long offset;
+-      unsigned long flags __attribute__ ((unused));
+       efx_dword_t dword;
+       if (FALCON_REV(efx) < FALCON_REV_B0)
+@@ -1976,8 +1937,6 @@
+ void falcon_drain_tx_fifo(struct efx_nic *efx)
+ {
+       efx_oword_t temp;
+-      efx_oword_t mcast_reg0;
+-      efx_oword_t mcast_reg1;
+       int count;
+       if (FALCON_REV(efx) < FALCON_REV_B0)
+@@ -1994,9 +1953,6 @@
+       EFX_SET_OWORD_FIELD(temp, TXFIFO_DRAIN_EN_B0, 1);
+       falcon_write(efx, &temp, MAC0_CTRL_REG_KER);
+-
+-      falcon_read(efx, &mcast_reg0, MAC_MCAST_HASH_REG0_KER);
+-      falcon_read(efx, &mcast_reg1, MAC_MCAST_HASH_REG1_KER);
+       /* Reset the MAC and EM block. */
+       falcon_read(efx, &temp, GLB_CTL_REG_KER);
+@@ -2025,10 +1981,6 @@
+       spin_unlock(&efx->stats_lock);
+-      /* Restore the multicast hash registers. */
+-      falcon_write(efx, &mcast_reg0, MAC_MCAST_HASH_REG0_KER);
+-      falcon_write(efx, &mcast_reg1, MAC_MCAST_HASH_REG1_KER);
+-
+       /* If we've reset the EM block and the link is up, then
+        * we'll have to kick the XAUI link so the PHY can recover */
+       if (efx->link_up && EFX_IS10G(efx) && EFX_WORKAROUND_5147(efx))
+@@ -2053,6 +2005,12 @@
+        * draining the TX fifo and resetting. */
+       changing_loopback = (efx->loopback_mode != nic_data->old_loopback_mode);
+       nic_data->old_loopback_mode = efx->loopback_mode;
++
++      if (EFX_WORKAROUND_11667(efx) && (efx->phy_type == PHY_TYPE_10XPRESS)) {
++              if (changing_loopback)
++                      return;
++      }
++
+       if (changing_loopback || !efx->link_up)
+               falcon_drain_tx_fifo(efx);
+ }
+@@ -2074,8 +2032,7 @@
+       /* MAC_LINK_STATUS controls MAC backpressure but doesn't work
+        * as advertised.  Disable to ensure packets are not
+        * indefinitely held and TX queue can be flushed at any point
+-       * while the link is down.
+-       */
++       * while the link is down. */
+       EFX_POPULATE_OWORD_5(reg,
+                            MAC_XOFF_VAL, 0xffff /* max pause time */,
+                            MAC_BCAD_ACPT, 1,
+@@ -2091,12 +2048,12 @@
+       falcon_write(efx, &reg, MAC0_CTRL_REG_KER);
+-      /*
+-       * Transmission of pause frames when RX crosses the threshold is
++      /* Restore the multicast hash registers. */
++      falcon_set_multicast_hash(efx);
++
++      /* Transmission of pause frames when RX crosses the threshold is
+        * covered by RX_XOFF_MAC_EN and XM_TX_CFG_REG:XM_FCNTL.
+-       *
+-       * Action on receipt of pause frames is controller by XM_DIS_FCNTL
+-       */
++       * Action on receipt of pause frames is controller by XM_DIS_FCNTL */
+       tx_fc = (efx->flow_control & EFX_FC_TX) ? 1 : 0;
+       falcon_read(efx, &reg, RX_CFG_REG_KER);
+       EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc);
+@@ -2291,7 +2248,6 @@
+       unsigned int phy_10g = phy_id & FALCON_PHY_ID_10G;
+       efx_oword_t reg;
+       int value = -1;
+-      unsigned long flags __attribute__ ((unused));
+       if (phy_addr == PHY_ADDR_INVALID)
+               return -1;
+@@ -2373,7 +2329,7 @@
+       gmii->mdio_read = falcon_mdio_read;
+       gmii->mdio_write = falcon_mdio_write;
+       gmii->phy_id_mask = FALCON_PHY_ID_MASK;
+-      gmii->reg_num_mask = ((1 << EFX_WIDTH(MD_DEV_ADR)) - 1);
++      gmii->reg_num_mask = ((1 << EFX_WIDTH(MD_PHY_ADR)) - 1);
+ }
+ static int falcon_probe_gmac_port(struct efx_nic *efx)
+@@ -2493,17 +2449,16 @@
+ void falcon_set_multicast_hash(struct efx_nic *efx)
+ {
+-      union efx_multicast_hash falcon_mc_hash;
++      union efx_multicast_hash *mc_hash = &efx->multicast_hash;
+       /* Broadcast packets go through the multicast hash filter.
+        * ether_crc_le() of the broadcast address is 0xbe2612ff
+-       * so we always add bit 0xff to the mask we are given.
++       * so we always add bit 0xff to the mask.
+        */
+-      memcpy(&falcon_mc_hash, &efx->multicast_hash, sizeof(falcon_mc_hash));
+-      set_bit_le(0xff, (void *)&falcon_mc_hash);
++      set_bit_le(0xff, mc_hash->byte);
+-      falcon_write(efx, &falcon_mc_hash.oword[0], MAC_MCAST_HASH_REG0_KER);
+-      falcon_write(efx, &falcon_mc_hash.oword[1], MAC_MCAST_HASH_REG1_KER);
++      falcon_write(efx, &mc_hash->oword[0], MAC_MCAST_HASH_REG0_KER);
++      falcon_write(efx, &mc_hash->oword[1], MAC_MCAST_HASH_REG1_KER);
+ }
+ /**************************************************************************
+@@ -2587,6 +2542,7 @@
+  * context and is allowed to sleep. */
+ int falcon_reset_hw(struct efx_nic *efx, enum reset_type method)
+ {
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       efx_oword_t glb_ctl_reg_ker;
+       int rc;
+@@ -2601,8 +2557,8 @@
+                               "function prior to hardware reset\n");
+                       goto fail1;
+               }
+-              if (efx->type->is_dual_func) {
+-                      rc = pci_save_state(efx->pci_dev2);
++              if (FALCON_IS_DUAL_FUNC(efx)) {
++                      rc = pci_save_state(nic_data->pci_dev2);
+                       if (rc) {
+                               EFX_ERR(efx, "failed to backup PCI state of "
+                                       "secondary function prior to "
+@@ -2635,8 +2591,8 @@
+       /* Restore PCI configuration if needed */
+       if (method == RESET_TYPE_WORLD) {
+-              if (efx->type->is_dual_func) {
+-                      rc = pci_restore_state(efx->pci_dev2);
++              if (FALCON_IS_DUAL_FUNC(efx)) {
++                      rc = pci_restore_state(nic_data->pci_dev2);
+                       if (rc) {
+                               EFX_ERR(efx, "failed to restore PCI config for "
+                                       "the secondary function\n");
+@@ -2686,19 +2642,21 @@
+  */
+ static int falcon_reset_sram(struct efx_nic *efx)
+ {
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       efx_oword_t srm_cfg_reg_ker, gpio_cfg_reg_ker;
+       int count, onchip, sram_cfg_val;
+       /* Set the SRAM wake/sleep GPIO appropriately. */
+-      onchip = (efx->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY);
++      onchip = (nic_data->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY);
+       falcon_read(efx, &gpio_cfg_reg_ker, GPIO_CTL_REG_KER);
+       EFX_SET_OWORD_FIELD(gpio_cfg_reg_ker, GPIO1_OEN, 1);
+       EFX_SET_OWORD_FIELD(gpio_cfg_reg_ker, GPIO1_OUT, onchip ? 1 : 0);
+       falcon_write(efx, &gpio_cfg_reg_ker, GPIO_CTL_REG_KER);
+       /* Initiate SRAM reset */
+-      sram_cfg_val = (efx->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY) ?
+-              0 : efx->external_sram_cfg;
++      sram_cfg_val = nic_data->external_sram_cfg;
++      if (nic_data->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY)
++              sram_cfg_val = 0;
+       EFX_POPULATE_OWORD_2(srm_cfg_reg_ker,
+                            SRAM_OOB_BT_INIT_EN, 1,
+@@ -2761,11 +2719,12 @@
+ /* Extract non-volatile configuration */
+ static int falcon_probe_nvconfig(struct efx_nic *efx)
+ {
+-      int rc;
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       struct falcon_nvconfig *nvconfig;
+       struct efx_spi_device *spi;
+       size_t offset, len;
+       int magic_num, struct_ver, board_rev, onchip_sram;
++      int rc;
+       nvconfig = kmalloc(sizeof(*nvconfig), GFP_KERNEL);
+@@ -2831,18 +2790,18 @@
+        * automatically but might may been reset since boot.
+        */
+       if (onchip_sram) {
+-              efx->external_sram_cfg = SRM_NB_BSZ_ONCHIP_ONLY;
++              nic_data->external_sram_cfg = SRM_NB_BSZ_ONCHIP_ONLY;
+       } else {
+-              efx->external_sram_cfg =
+-                  EFX_OWORD_FIELD(nvconfig->srm_cfg_reg,
+-                                  SRM_NUM_BANKS_AND_BANK_SIZE);
+-              WARN_ON(efx->external_sram_cfg == SRM_NB_BSZ_RESERVED);
++              nic_data->external_sram_cfg =
++                      EFX_OWORD_FIELD(nvconfig->srm_cfg_reg,
++                                      SRM_NUM_BANKS_AND_BANK_SIZE);
++              WARN_ON(nic_data->external_sram_cfg == SRM_NB_BSZ_RESERVED);
+               /* Replace invalid setting with the smallest defaults */
+-              if (efx->external_sram_cfg == SRM_NB_BSZ_DEFAULT)
+-                      efx->external_sram_cfg = SRM_NB_BSZ_1BANKS_2M;
++              if (nic_data->external_sram_cfg == SRM_NB_BSZ_DEFAULT)
++                      nic_data->external_sram_cfg = SRM_NB_BSZ_1BANKS_2M;
+       }
+       EFX_LOG(efx, "external_sram_cfg=%d (>=0 is external)\n",
+-              efx->external_sram_cfg);
++              nic_data->external_sram_cfg);
+  out:
+       kfree(nvconfig);
+@@ -2892,31 +2851,35 @@
+        */
+       switch (FALCON_REV(efx)) {
+       case FALCON_REV_A1:
+-              res->rxq_min = res->txq_min = 16;
+-              res->evq_int_min = res->evq_int_max = 4;
++              res->rxq_min = 16;
++              res->txq_min = 16;
++              res->evq_int_min = 4;
++              res->evq_int_lim = 5;
+               res->evq_timer_min = 5;
+-              res->evq_timer_max = 4096;
++              res->evq_timer_lim = 4096;
+               internal_dcs_entries = 8192;
+               break;
+       case FALCON_REV_B0:
+       default:
+-              res->rxq_min = res->txq_min = res->evq_int_min = 0;
+-              res->evq_int_max = 64;
++              res->rxq_min = 0;
++              res->txq_min = 0;
++              res->evq_int_min = 0;
++              res->evq_int_lim = 64;
+               res->evq_timer_min = 64;
+-              res->evq_timer_max = 4096;
++              res->evq_timer_lim = 4096;
+               internal_dcs_entries = 4096;
+               break;
+       }
+       buffer_entry_bytes = 8;
+-      if (efx->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY) {
+-              res->rxq_max = internal_dcs_entries / nic_data->rx_dc_entries;
+-              res->txq_max = internal_dcs_entries / nic_data->tx_dc_entries;
++      if (nic_data->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY) {
++              res->rxq_lim = internal_dcs_entries / nic_data->rx_dc_entries;
++              res->txq_lim = internal_dcs_entries / nic_data->tx_dc_entries;
+               /* Prog model says 8K entries for buffer table in internal
+                * mode.  But does this not depend on full/half mode?
+                */
+-              res->buffer_table_max = 8192;
++              res->buffer_table_lim = 8192;
+               nic_data->tx_dc_base = 0x130000;
+               nic_data->rx_dc_base = 0x100000;
+       } else {
+@@ -2925,7 +2888,7 @@
+               /* Determine how much SRAM we have to play with.  We have
+                * to fit buffer table and descriptor caches in.
+                */
+-              switch (efx->external_sram_cfg) {
++              switch (nic_data->external_sram_cfg) {
+               case SRM_NB_BSZ_1BANKS_2M:
+               default:
+                       sram_bytes = 2 * 1024 * 1024;
+@@ -2953,17 +2916,17 @@
+               max_vnics = sram_bytes / vnic_bytes;
+               for (n_vnics = 1; n_vnics < res->evq_timer_min + max_vnics;)
+                       n_vnics *= 2;
+-              res->rxq_max = n_vnics;
+-              res->txq_max = n_vnics;
++              res->rxq_lim = n_vnics;
++              res->txq_lim = n_vnics;
+               dcs = n_vnics * nic_data->tx_dc_entries * 8;
+               nic_data->tx_dc_base = sram_bytes - dcs;
+               dcs = n_vnics * nic_data->rx_dc_entries * 8;
+               nic_data->rx_dc_base = nic_data->tx_dc_base - dcs;
+-              res->buffer_table_max = nic_data->rx_dc_base / 8;
++              res->buffer_table_lim = nic_data->rx_dc_base / 8;
+       }
+-      if (efx->type->is_dual_func)
++      if (FALCON_IS_DUAL_FUNC(efx))
+               res->flags |= EFX_DL_FALCON_DUAL_FUNC;
+       if (EFX_INT_MODE_USE_MSI(efx))
+@@ -2982,7 +2945,6 @@
+       falcon_read(efx, &altera_build, ALTERA_BUILD_REG_KER);
+       efx->is_asic = EFX_OWORD_FIELD(altera_build, VER_ALL) == 0;
+-#if !defined(EFX_USE_PCI_DEV_REVISION)
+       {
+               int rc;
+               rc = pci_read_config_byte(efx->pci_dev, PCI_CLASS_REVISION,
+@@ -2990,7 +2952,7 @@
+               if (rc)
+                       return rc;
+       }
+-#endif
++
+       switch (FALCON_REV(efx)) {
+       case FALCON_REV_A0:
+       case 0xff:
+@@ -3189,24 +3151,28 @@
+       efx->i2c.sda = 1;
+       efx->i2c.scl = 1;
++      /* Allocate storage for hardware specific data */
++      nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
++      efx->nic_data = (void *) nic_data;
++
+       /* Determine number of ports etc. */
+       rc = falcon_probe_nic_variant(efx);
+       if (rc)
+               goto fail1;
+       /* Probe secondary function if expected */
+-      if (efx->type->is_dual_func) {
++      if (FALCON_IS_DUAL_FUNC(efx)) {
+               struct pci_dev *dev = pci_dev_get(efx->pci_dev);
+               while ((dev = pci_get_device(EFX_VENDID_SFC, FALCON_A_S_DEVID,
+                                            dev))) {
+                       if (dev->bus == efx->pci_dev->bus &&
+                           dev->devfn == efx->pci_dev->devfn + 1) {
+-                              efx->pci_dev2 = dev;
++                              nic_data->pci_dev2 = dev;
+                               break;
+                       }
+               }
+-              if (!efx->pci_dev2) {
++              if (!nic_data->pci_dev2) {
+                       EFX_ERR(efx, "failed to find secondary function\n");
+                       rc = -ENODEV;
+                       goto fail2;
+@@ -3244,11 +3210,6 @@
+               efx->mii.phy_id = 2;
+       }
+-      /* Decide how many resources we can allocate, to ourselves
+-       * and to driverlink clients */
+-      nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
+-      efx->nic_data = (void *) nic_data;
+-
+       rc = falcon_dimension_resources(efx);
+       if (rc)
+               goto fail6;
+@@ -3256,21 +3217,21 @@
+       return 0;
+  fail6:
+-      kfree(nic_data);
+-      efx->nic_data = efx->dl_info = NULL;
++      efx->dl_info = NULL;
+  fail5:
+       falcon_remove_spi_devices(efx);
+       falcon_free_buffer(efx, &efx->irq_status);
+  fail4:
+       /* fall-thru */
+  fail3:
+-      if (efx->pci_dev2) {
+-              pci_dev_put(efx->pci_dev2);
+-              efx->pci_dev2 = NULL;
++      if (nic_data->pci_dev2) {
++              pci_dev_put(nic_data->pci_dev2);
++              nic_data->pci_dev2 = NULL;
+       }
+  fail2:
+       /* fall-thru */
+  fail1:
++      kfree(efx->nic_data);
+       return rc;
+ }
+@@ -3336,7 +3297,7 @@
+                                 &pcie_ctrl_stat_reg);
+       pcie_devicectrl = (u16) EFX_EXTRACT_DWORD(pcie_ctrl_stat_reg, 0, 15);
+       tlp_size = ((PCI_EXP_DEVCTL_PAYLOAD & pcie_devicectrl) >>
+-                  ffs(PCI_EXP_DEVCTL_PAYLOAD));
++                  PCI_EXP_DEVCTL_PAYLOAD_LBN);
+       EFX_WARN_ON_PARANOID(tlp_size > 3); /* => 1024 bytes */
+       tlp_ack_factor = &tlp_ack_factor_lut[tlp_size & 0x3];
+       tlp_size_decoded = tlp_ack_factor->tlp;
+@@ -3450,6 +3411,7 @@
+  */
+ int falcon_init_nic(struct efx_nic *efx)
+ {
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       struct falcon_nic_data *data;
+       efx_oword_t temp;
+       unsigned thresh;
+@@ -3469,7 +3431,7 @@
+       /* Use on-chip SRAM if needed.
+        */
+       falcon_read(efx, &temp, NIC_STAT_REG);
+-      if (efx->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY)
++      if (nic_data->external_sram_cfg == SRM_NB_BSZ_ONCHIP_ONLY)
+               EFX_SET_OWORD_FIELD(temp, ONCHIP_SRAM, 1);
+       else
+               EFX_SET_OWORD_FIELD(temp, ONCHIP_SRAM, 0);
+@@ -3623,9 +3585,7 @@
+ void falcon_remove_nic(struct efx_nic *efx)
+ {
+-      /* Tear down the private nic state, and the driverlink nic params */
+-      kfree(efx->nic_data);
+-      efx->nic_data = efx->dl_info = NULL;
++      struct falcon_nic_data *nic_data = efx->nic_data;
+       falcon_remove_spi_devices(efx);
+       falcon_free_buffer(efx, &efx->irq_status);
+@@ -3634,10 +3594,14 @@
+       (void) falcon_reset_hw(efx, RESET_TYPE_ALL);
+       /* Release the second function after the reset */
+-      if (efx->pci_dev2) {
+-              pci_dev_put(efx->pci_dev2);
+-              efx->pci_dev2 = NULL;
++      if (nic_data->pci_dev2) {
++              pci_dev_put(nic_data->pci_dev2);
++              nic_data->pci_dev2 = NULL;
+       }
++
++      /* Tear down the private nic state, and the driverlink nic params */
++      kfree(efx->nic_data);
++      efx->nic_data = efx->dl_info = NULL;
+ }
+ void falcon_update_nic_stats(struct efx_nic *efx)
+@@ -3657,7 +3621,6 @@
+  */
+ struct efx_nic_type falcon_a_nic_type = {
+-      .is_dual_func = 1,
+       .mem_bar = 2,
+       .mem_map_size = 0x20000,
+       .txd_ptr_tbl_base = TX_DESC_PTR_TBL_KER_A1,
+@@ -3679,7 +3642,6 @@
+ };
+ struct efx_nic_type falcon_b_nic_type = {
+-      .is_dual_func = 0,
+       .mem_bar = 2,
+       /* Map everything up to and including the RSS indirection
+        * table.  Don't map MSI-X table, MSI-X PBA since Linux
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/falcon.h
+--- a/drivers/net/sfc/falcon.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/falcon.h Tue Mar 31 11:59:10 2009 +0100
+@@ -28,8 +28,6 @@
+ #ifndef EFX_FALCON_H
+ #define EFX_FALCON_H
+-#include <asm/io.h>
+-#include <linux/spinlock.h>
+ #include "net_driver.h"
+ /*
+@@ -42,11 +40,7 @@
+       FALCON_REV_B0 = 2,
+ };
+-#if defined(EFX_USE_PCI_DEV_REVISION)
+-#define FALCON_REV(efx) ((efx)->pci_dev->revision)
+-#else
+ #define FALCON_REV(efx) ((efx)->revision)
+-#endif
+ extern struct efx_nic_type falcon_a_nic_type;
+ extern struct efx_nic_type falcon_b_nic_type;
+@@ -63,46 +57,29 @@
+ extern int falcon_init_tx(struct efx_tx_queue *tx_queue);
+ extern void falcon_fini_tx(struct efx_tx_queue *tx_queue);
+ extern void falcon_remove_tx(struct efx_tx_queue *tx_queue);
+-#if defined(EFX_USE_FASTCALL)
+ extern void fastcall falcon_push_buffers(struct efx_tx_queue *tx_queue);
+-#else
+-extern void falcon_push_buffers(struct efx_tx_queue *tx_queue);
+-#endif
+ /* RX data path */
+ extern int falcon_probe_rx(struct efx_rx_queue *rx_queue);
+ extern int falcon_init_rx(struct efx_rx_queue *rx_queue);
+ extern void falcon_fini_rx(struct efx_rx_queue *rx_queue);
+ extern void falcon_remove_rx(struct efx_rx_queue *rx_queue);
+-#if defined(EFX_USE_FASTCALL)
+ extern void fastcall falcon_notify_rx_desc(struct efx_rx_queue *rx_queue);
+-#else
+-extern void falcon_notify_rx_desc(struct efx_rx_queue *rx_queue);
+-#endif
+ /* Event data path */
+ extern int falcon_probe_eventq(struct efx_channel *channel);
+ extern int falcon_init_eventq(struct efx_channel *channel);
+ extern void falcon_fini_eventq(struct efx_channel *channel);
+ extern void falcon_remove_eventq(struct efx_channel *channel);
+-#if defined(EFX_USE_FASTCALL)
+ extern int fastcall falcon_process_eventq(struct efx_channel *channel,
+                                         int *rx_quota);
+-#else
+-extern int falcon_process_eventq(struct efx_channel *channel, int *rx_quota);
+-#endif
+-#if defined(EFX_USE_FASTCALL)
+ extern void fastcall falcon_eventq_read_ack(struct efx_channel *channel);
+-#else
+-extern void falcon_eventq_read_ack(struct efx_channel *channel);
+-#endif
+ /* Ports */
+ extern int falcon_probe_port(struct efx_nic *efx);
+ extern void falcon_remove_port(struct efx_nic *efx);
+ /* MAC/PHY */
+-extern void falcon_check_xaui_link_up(struct efx_nic *efx);
+ extern int falcon_xaui_link_ok(struct efx_nic *efx);
+ extern int falcon_dma_stats(struct efx_nic *efx,
+                           unsigned int done_offset);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/falcon_hwdefs.h
+--- a/drivers/net/sfc/falcon_hwdefs.h  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/falcon_hwdefs.h  Tue Mar 31 11:59:10 2009 +0100
+@@ -894,6 +894,15 @@
+ #define XM_DIS_FCNTL_WIDTH 1
+ /* XGMAC pause time count register */
++/* XGMAC management interrupt mask register */
++#define XM_MGT_INT_MSK_REG_MAC_B0 0x5
++#define XM_MSK_PRMBLE_ERR_LBN 2
++#define XM_MSK_PRMBLE_ERR_WIDTH 1
++#define XM_MSK_RMTFLT_LBN 1
++#define XM_MSK_RMTFLT_WIDTH 1
++#define XM_MSK_LCLFLT_LBN 0
++#define XM_MSK_LCLFLT_WIDTH 1
++
+ #define XM_PAUSE_TIME_REG_MAC 0x9
+ #define XM_TX_PAUSE_CNT_LBN 16
+ #define XM_TX_PAUSE_CNT_WIDTH 16
+@@ -922,6 +931,15 @@
+ #define XX_PWRDNC_EN_LBN 14
+ #define XX_PWRDNC_EN_WIDTH 1
+ #define XX_PWRDNB_EN_LBN 13
++/* XGMAC management interrupt status register */
++#define XM_MGT_INT_REG_MAC_B0 0x0f
++#define XM_PRMBLE_ERR 2
++#define XM_PRMBLE_WIDTH 1
++#define XM_RMTFLT_LBN 1
++#define XM_RMTFLT_WIDTH 1
++#define XM_LCLFLT_LBN 0
++#define XM_LCLFLT_WIDTH 1
++
+ #define XX_PWRDNB_EN_WIDTH 1
+ #define XX_PWRDNA_EN_LBN 12
+ #define XX_PWRDNA_EN_WIDTH 1
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/falcon_io.h
+--- a/drivers/net/sfc/falcon_io.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/falcon_io.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -28,8 +28,9 @@
+ #ifndef EFX_FALCON_IO_H
+ #define EFX_FALCON_IO_H
++#include <linux/io.h>
++#include <linux/spinlock.h>
+ #include "net_driver.h"
+-#include "falcon.h"
+ /**************************************************************************
+  *
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/falcon_xmac.c
+--- a/drivers/net/sfc/falcon_xmac.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/falcon_xmac.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -236,6 +236,43 @@
+       return rc;
+ }
++static int falcon_xgmii_status(struct efx_nic *efx)
++{
++      efx_dword_t reg;
++
++      if (FALCON_REV(efx) < FALCON_REV_B0)
++              return 1;
++
++      /* The ISR latches, so clear it and re-read */
++      efx->mac_op->mac_readl(efx, &reg, XM_MGT_INT_REG_MAC_B0);
++      efx->mac_op->mac_readl(efx, &reg, XM_MGT_INT_REG_MAC_B0);
++
++      if (EFX_DWORD_FIELD(reg, XM_LCLFLT) ||
++          EFX_DWORD_FIELD(reg, XM_RMTFLT)) {
++              EFX_INFO(efx, "MGT_INT: "EFX_DWORD_FMT"\n", EFX_DWORD_VAL(reg));
++              return 0;
++      }
++
++      return 1;
++}
++
++static void falcon_mask_status_intr(struct efx_nic *efx, int enable)
++{
++      efx_dword_t reg;
++
++      if ((FALCON_REV(efx) < FALCON_REV_B0) || LOOPBACK_INTERNAL(efx))
++              return;
++
++      /* Flush the ISR */
++      if (enable)
++              efx->mac_op->mac_readl(efx, &reg, XM_MGT_INT_REG_MAC_B0);
++
++      EFX_POPULATE_DWORD_2(reg,
++                           XM_MSK_RMTFLT, !enable,
++                           XM_MSK_LCLFLT, !enable);
++      efx->mac_op->mac_writel(efx, &reg, XM_MGT_INT_MSK_REG_MAC_B0);
++}
++
+ static int falcon_init_xmac(struct efx_nic *efx)
+ {
+       int rc;
+@@ -257,6 +294,7 @@
+       if (rc)
+               goto fail2;
++      falcon_mask_status_intr(efx, 1);
+       return 0;
+  fail2:
+@@ -269,9 +307,7 @@
+ int falcon_xaui_link_ok(struct efx_nic *efx)
+ {
+       efx_dword_t reg;
+-      int align_done;
+-      int sync_status;
+-      int link_ok = 0;
++      int align_done, sync_status, link_ok = 0;
+       /* If we're in internal loopback, then the link is up.
+        * The A1 FPGA/4G has RX and TX XAUI wired together, so the link is up.
+@@ -292,13 +328,25 @@
+       EFX_SET_DWORD_FIELD(reg, XX_COMMA_DET, XX_COMMA_DET_RESET);
+       EFX_SET_DWORD_FIELD(reg, XX_CHARERR, XX_CHARERR_RESET);
+       EFX_SET_DWORD_FIELD(reg, XX_DISPERR, XX_DISPERR_RESET);
++      efx->mac_op->mac_writel(efx, &reg, XX_CORE_STAT_REG_MAC);
+-      efx->mac_op->mac_writel(efx, &reg, XX_CORE_STAT_REG_MAC);
++      /* If the link is up, then check the phy side of the xaui link
++       * (error conditions from the wire side propoagate back through
++       * the phy to the xaui side). */
++      if (efx->link_up && link_ok) {
++              int has_phyxs = efx->phy_op->mmds & (1 << MDIO_MMD_PHYXS);
++              if (has_phyxs)
++                      link_ok = mdio_clause45_phyxgxs_lane_sync(efx);
++      }
++
++      /* If the PHY and XAUI links are up, then check the mac's xgmii
++       * fault state */
++      if (efx->link_up && link_ok)
++              link_ok = falcon_xgmii_status(efx);
+       return link_ok;
+ }
+-/* Do most of the heavy lifting of falcon_reconfigure_xmac */
+ static void falcon_reconfigure_xmac_core(struct efx_nic *efx)
+ {
+       unsigned int max_frame_len;
+@@ -367,7 +415,7 @@
+       efx->mac_op->mac_writel(efx, &reg, XM_ADR_HI_REG_MAC);
+       /* Handle B0 FPGA loopback where RAMBUS XGXS block not present */
+-      if (FALCON_REV(efx) == FALCON_REV_B0 && !efx->is_asic) {
++      if (FALCON_REV(efx) >= FALCON_REV_B0 && !efx->is_asic) {
+               int xgmii_loopback =
+                       (efx->loopback_mode == LOOPBACK_XGMII) ? 1 : 0;
+@@ -378,7 +426,6 @@
+       }
+ }
+-/* Do most of the heavy lifting of falcon_reconfigure_xmac */
+ static void falcon_reconfigure_xgxs_core(struct efx_nic *efx)
+ {
+       efx_dword_t reg;
+@@ -387,7 +434,7 @@
+       int xgmii_loopback =
+               (efx->loopback_mode == LOOPBACK_XGMII) ? 1 : 0;
+-      if (FALCON_REV(efx) == FALCON_REV_B0 && !efx->is_asic)
++      if (FALCON_REV(efx) >= FALCON_REV_B0 && !efx->is_asic)
+               /* RAMBUS XGXS block is not present */
+               return;
+@@ -442,52 +489,46 @@
+ }
+-/* Sometimes the XAUI link between Falcon and XFP fails to come up. The state
+- * of the link is checked during phy_reconfigure(). After XAIU is reset then
+- * the MAC must be reconfigured.
+- */
+-#define MAX_XAUI_TRIES (5)    /* It's never been seen to take more than 2 */
+-
+-void falcon_check_xaui_link_up(struct efx_nic *efx)
++/* Try and bring the Falcon side of the Falcon-Phy XAUI link fails
++ * to come back up. Bash it until it comes back up */
++static int falcon_check_xaui_link_up(struct efx_nic *efx)
+ {
+       int max_tries, tries;
+-      tries = EFX_WORKAROUND_5147(efx) ? MAX_XAUI_TRIES : 1;
++      tries = EFX_WORKAROUND_5147(efx) ? 5 : 1;
+       max_tries = tries;
+       if ((efx->loopback_mode == LOOPBACK_NETWORK) ||
+           (efx->phy_type == PHY_TYPE_NONE) ||
+           !efx->phy_powered)
+-              return;
++              return 0;
+       while (tries) {
+               if (falcon_xaui_link_ok(efx))
+-                      return;
++                      return 1;
+               EFX_LOG(efx, "%s Clobbering XAUI (%d tries left).\n",
+                       __func__, tries);
+               (void) falcon_reset_xaui(efx);
+-              /* Cannot use full reconfigure. Need to avoid recursion */
+-
+-              /* Give the poor thing time to sort itself out: if we retry
+-               * too fast it will never train. */
+               udelay(200);
+-
+-              falcon_reconfigure_xgxs_core(efx);
+-
+               tries--;
+       }
+-      EFX_ERR(efx, "Failed to bring XAUI link back up in %d tries!\n",
++      EFX_LOG(efx, "Failed to bring XAUI link back up in %d tries!\n",
+               max_tries);
++      return 0;
+ }
+ static void falcon_reconfigure_xmac(struct efx_nic *efx)
+ {
++      int xaui_link_ok;
++
++      falcon_mask_status_intr(efx, 0);
++
++      /* Deconfigure the mac wrapper, draining the tx fifo if necessary */
+       falcon_deconfigure_mac_wrapper(efx);
+-      /* In internal loopback modes disable transmit */
++      /* Reconfigure the PHY, disabling transmit in mac level loopback. */
+       efx->tx_disabled = LOOPBACK_INTERNAL(efx);
+-
+       efx->phy_op->reconfigure(efx);
+       falcon_reconfigure_xgxs_core(efx);
+@@ -496,8 +537,11 @@
+       /* Reconfigure MAC wrapper */
+       falcon_reconfigure_mac_wrapper(efx);
+-      /* Ensure XAUI link is up - might repeat reconfigure_xmac_core */
+-      falcon_check_xaui_link_up(efx);
++      /* Ensure XAUI link is up */
++      xaui_link_ok = falcon_check_xaui_link_up(efx);
++
++      if (xaui_link_ok && efx->link_up)
++              falcon_mask_status_intr(efx, 1);
+ }
+ static void falcon_fini_xmac(struct efx_nic *efx)
+@@ -576,29 +620,28 @@
+ static int falcon_check_xmac(struct efx_nic *efx)
+ {
+-      unsigned link_ok, phyxs_ok = 1;
+-      unsigned has_phyxs = efx->phy_op->mmds & (1 << MDIO_MMD_PHYXS);
+-
+-      /* Check the remote XAUI link status */
+-      link_ok = falcon_xaui_link_ok(efx);
++      unsigned xaui_link_ok;
++      int rc;
+       if ((efx->loopback_mode == LOOPBACK_NETWORK) ||
++          (efx->phy_type == PHY_TYPE_NONE) ||
+           !efx->phy_powered)
+               return 0;
+-      if (link_ok && has_phyxs && !LOOPBACK_INTERNAL(efx)) {
+-              /* Does the PHYXS think we have lane sync? */
+-              phyxs_ok = mdio_clause45_phyxgxs_lane_sync(efx);
+-      }
++      falcon_mask_status_intr(efx, 0);
++      xaui_link_ok = falcon_xaui_link_ok(efx);
+-      if (EFX_WORKAROUND_5147(efx) && (!link_ok || !phyxs_ok)) {
++      if (EFX_WORKAROUND_5147(efx) && !xaui_link_ok)
+               (void) falcon_reset_xaui(efx);
+-              falcon_reconfigure_xgxs_core(efx);
+-      }
+       /* Call the PHY check_hw routine */
+-      efx->phy_op->check_hw(efx);
+-      return 0;
++      rc = efx->phy_op->check_hw(efx);
++
++      /* Unmask interrupt if everything was (and still is) ok */
++      if (xaui_link_ok && efx->link_up)
++              falcon_mask_status_intr(efx, 1);
++
++      return rc;
+ }
+ /* Simulate a PHY event */
+@@ -659,12 +702,10 @@
+       reset = ((flow_control & EFX_FC_TX) &&
+                !(efx->flow_control & EFX_FC_TX));
+       if (EFX_WORKAROUND_11482(efx) && reset) {
+-              if (FALCON_REV(efx) == FALCON_REV_B0) {
++              if (FALCON_REV(efx) >= FALCON_REV_B0) {
+                       /* Recover by resetting the EM block */
+-                      mutex_lock(&efx->mac_lock);
+                       if (efx->link_up)
+                               falcon_drain_tx_fifo(efx);
+-                      mutex_unlock(&efx->mac_lock);
+               } else {
+                       /* Schedule a reset to recover */
+                       efx_schedule_reset(efx, RESET_TYPE_INVISIBLE);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/i2c-direct.c
+--- a/drivers/net/sfc/i2c-direct.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/i2c-direct.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -25,13 +25,13 @@
+  ****************************************************************************
+  */
+-#include <asm/io.h>
+ #include <linux/delay.h>
+ #include "net_driver.h"
+ #include "i2c-direct.h"
+-/* EEPROM access via I2C
+- * data (SDA) and clock (SCL) line read/writes
++/*
++ * I2C data (SDA) and clock (SCL) line read/writes with appropriate
++ * delays.
+  */
+ static inline void setsda(struct efx_i2c_interface *i2c, int state)
+@@ -79,7 +79,7 @@
+ {
+       EFX_WARN_ON_PARANOID(!i2c->scl);
+       EFX_WARN_ON_PARANOID(!i2c->sda);
+-      /* Just in case */
++      /* Devices may time out if operations do not end */
+       setscl(i2c, 1);
+       setsda(i2c, 1);
+       EFX_BUG_ON_PARANOID(getsda(i2c) != 1);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/kernel_compat.c
+--- a/drivers/net/sfc/kernel_compat.c  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/kernel_compat.c  Tue Mar 31 11:59:10 2009 +0100
+@@ -25,8 +25,6 @@
+  ****************************************************************************
+  */
+-#define EFX_IN_KCOMPAT_C 1
+-
+ #include "net_driver.h"
+ #include <linux/mii.h>
+ #include <linux/ethtool.h>
+@@ -47,514 +45,22 @@
+ /**************************************************************************
+  *
+- * GMII-friendly versions of mii_ethtool_[gs]set
+- *
+- **************************************************************************
+- *
+- * Kernels prior to 2.6.12 don't support GMII PHYs via
+- * mii_ethtool_gset and mii_ethtool_sset.  These are those functions
+- * taken from a 2.6.12 kernel tree, with the tests for
+- * mii->supports_gmii removed (since that field doesn't exist in older
+- * kernels).
+- *
+- */
+-
+-#ifdef EFX_NEED_MII_ETHTOOL_FIX
+-int efx_mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
+-{
+-      struct net_device *dev = mii->dev;
+-      u32 advert, bmcr, lpa, nego;
+-      u32 advert2 = 0, bmcr2 = 0, lpa2 = 0;
+-
+-      ecmd->supported =
+-          (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
+-           SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
+-           SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII);
+-      ecmd->supported |= SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full;
+-
+-      /* only supports twisted-pair */
+-      ecmd->port = PORT_MII;
+-
+-      /* only supports internal transceiver */
+-      ecmd->transceiver = XCVR_INTERNAL;
+-
+-      /* this isn't fully supported at higher layers */
+-      ecmd->phy_address = mii->phy_id;
+-
+-      ecmd->advertising = ADVERTISED_TP | ADVERTISED_MII;
+-      advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE);
+-      advert2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000);
+-
+-      if (advert & ADVERTISE_10HALF)
+-              ecmd->advertising |= ADVERTISED_10baseT_Half;
+-      if (advert & ADVERTISE_10FULL)
+-              ecmd->advertising |= ADVERTISED_10baseT_Full;
+-      if (advert & ADVERTISE_100HALF)
+-              ecmd->advertising |= ADVERTISED_100baseT_Half;
+-      if (advert & ADVERTISE_100FULL)
+-              ecmd->advertising |= ADVERTISED_100baseT_Full;
+-      if (advert2 & ADVERTISE_1000HALF)
+-              ecmd->advertising |= ADVERTISED_1000baseT_Half;
+-      if (advert2 & ADVERTISE_1000FULL)
+-              ecmd->advertising |= ADVERTISED_1000baseT_Full;
+-
+-      bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
+-      lpa = mii->mdio_read(dev, mii->phy_id, MII_LPA);
+-      bmcr2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000);
+-      lpa2 = mii->mdio_read(dev, mii->phy_id, MII_STAT1000);
+-      if (bmcr & BMCR_ANENABLE) {
+-              ecmd->advertising |= ADVERTISED_Autoneg;
+-              ecmd->autoneg = AUTONEG_ENABLE;
+-
+-              nego = mii_nway_result(advert & lpa);
+-              if ((bmcr2 & (ADVERTISE_1000HALF | ADVERTISE_1000FULL)) &
+-                  (lpa2 >> 2))
+-                      ecmd->speed = SPEED_1000;
+-              else if (nego == LPA_100FULL || nego == LPA_100HALF)
+-                      ecmd->speed = SPEED_100;
+-              else
+-                      ecmd->speed = SPEED_10;
+-              if ((lpa2 & LPA_1000FULL) || nego == LPA_100FULL ||
+-                  nego == LPA_10FULL) {
+-                      ecmd->duplex = DUPLEX_FULL;
+-                      mii->full_duplex = 1;
+-              } else {
+-                      ecmd->duplex = DUPLEX_HALF;
+-                      mii->full_duplex = 0;
+-              }
+-      } else {
+-              ecmd->autoneg = AUTONEG_DISABLE;
+-
+-              ecmd->speed = ((bmcr & BMCR_SPEED1000 &&
+-                              (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 :
+-                             (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10);
+-              ecmd->duplex =
+-                      (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF;
+-      }
+-
+-      /* ignore maxtxpkt, maxrxpkt for now */
+-
+-      return 0;
+-}
+-
+-int efx_mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd)
+-{
+-      struct net_device *dev = mii->dev;
+-
+-      if (ecmd->speed != SPEED_10 &&
+-          ecmd->speed != SPEED_100 &&
+-          ecmd->speed != SPEED_1000)
+-              return -EINVAL;
+-      if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
+-              return -EINVAL;
+-      if (ecmd->port != PORT_MII)
+-              return -EINVAL;
+-      if (ecmd->transceiver != XCVR_INTERNAL)
+-              return -EINVAL;
+-      if (ecmd->phy_address != mii->phy_id)
+-              return -EINVAL;
+-      if (ecmd->autoneg != AUTONEG_DISABLE && ecmd->autoneg != AUTONEG_ENABLE)
+-              return -EINVAL;
+-
+-      /* ignore supported, maxtxpkt, maxrxpkt */
+-
+-      if (ecmd->autoneg == AUTONEG_ENABLE) {
+-              u32 bmcr, advert, tmp;
+-              u32 advert2 = 0, tmp2 = 0;
+-
+-              if ((ecmd->advertising & (ADVERTISED_10baseT_Half |
+-                                        ADVERTISED_10baseT_Full |
+-                                        ADVERTISED_100baseT_Half |
+-                                        ADVERTISED_100baseT_Full |
+-                                        ADVERTISED_1000baseT_Half |
+-                                        ADVERTISED_1000baseT_Full)) == 0)
+-                      return -EINVAL;
+-
+-              /* advertise only what has been requested */
+-              advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE);
+-              tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
+-              advert2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000);
+-              tmp2 = advert2 & ~(ADVERTISE_1000HALF | ADVERTISE_1000FULL);
+-              if (ecmd->advertising & ADVERTISED_10baseT_Half)
+-                      tmp |= ADVERTISE_10HALF;
+-              if (ecmd->advertising & ADVERTISED_10baseT_Full)
+-                      tmp |= ADVERTISE_10FULL;
+-              if (ecmd->advertising & ADVERTISED_100baseT_Half)
+-                      tmp |= ADVERTISE_100HALF;
+-              if (ecmd->advertising & ADVERTISED_100baseT_Full)
+-                      tmp |= ADVERTISE_100FULL;
+-              if (ecmd->advertising & ADVERTISED_1000baseT_Half)
+-                      tmp2 |= ADVERTISE_1000HALF;
+-              if (ecmd->advertising & ADVERTISED_1000baseT_Full)
+-                      tmp2 |= ADVERTISE_1000FULL;
+-              if (advert != tmp) {
+-                      mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp);
+-                      mii->advertising = tmp;
+-              }
+-              if (advert2 != tmp2)
+-                      mii->mdio_write(dev, mii->phy_id, MII_CTRL1000, tmp2);
+-
+-              /* turn on autonegotiation, and force a renegotiate */
+-              bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
+-              bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
+-              mii->mdio_write(dev, mii->phy_id, MII_BMCR, bmcr);
+-
+-              mii->force_media = 0;
+-      } else {
+-              u32 bmcr, tmp;
+-
+-              /* turn off auto negotiation, set speed and duplexity */
+-              bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
+-              tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 |
+-                             BMCR_SPEED1000 | BMCR_FULLDPLX);
+-              if (ecmd->speed == SPEED_1000)
+-                      tmp |= BMCR_SPEED1000;
+-              else if (ecmd->speed == SPEED_100)
+-                      tmp |= BMCR_SPEED100;
+-              if (ecmd->duplex == DUPLEX_FULL) {
+-                      tmp |= BMCR_FULLDPLX;
+-                      mii->full_duplex = 1;
+-              } else {
+-                      mii->full_duplex = 0;
+-              }
+-              if (bmcr != tmp)
+-                      mii->mdio_write(dev, mii->phy_id, MII_BMCR, tmp);
+-
+-              mii->force_media = 1;
+-      }
+-      return 0;
+-}
+-#endif /* NEED_EFX_MII_ETHTOOL_GSET */
+-
+-/**************************************************************************
+- *
+- * unregister_netdevice_notifier : Has a race before 2.6.17
+- *
+- **************************************************************************
+- *
+- */
+-
+-#ifdef EFX_NEED_UNREGISTER_NETDEVICE_NOTIFIER_FIX
+-/**
+- * efx_unregister_netdevice_notifier - fixed unregister_netdevice_notifier
+- * @nb:               notifier to unregister
+- *
+- * unregister_netdevice_notifier() does not wait for the notifier
+- * to be unused before 2.6.17.  This wrapper fixes that.
+- */
+-int efx_unregister_netdevice_notifier(struct notifier_block *nb)
+-{
+-      int res;
+-
+-      res = unregister_netdevice_notifier(nb);
+-      /* Ensure any outstanding calls complete. */
+-      rtnl_lock();
+-      rtnl_unlock();
+-      return res;
+-}
+-#endif /* NEED_EFX_UNREGISTER_NETDEVICE_NOTIFIER */
+-
+-/**************************************************************************
+- *
+- * IOMMU-locking versions of pci_[un]map_single and
+- * pci_{alloc,free}_consistent.  See SFC bug 4560.
+- *
+- **************************************************************************
+- *
+- */
+-#ifdef EFX_NEED_IOMMU_LOCK
+-
+-/*
+- * efx_use_iommu_lock - IOMMU lock use control
+- *
+- * If set to 1, the driver will attempt to mitigate the race condition
+- * bug around IOMMU accesses in some 2.6 kernels.  If set to 2, the
+- * driver will use the lock even if it thinks it doesn't need to.
+- * Note that this is only a best-effort attempt; in particular, we
+- * cannot do anything about other drivers touching the IOMMU.
+- */
+-static unsigned int efx_use_iommu_lock = 1;
+-EXPORT_SYMBOL(efx_use_iommu_lock);
+-
+-/*
+- * efx_iommu_lock - lock around IOMMU accesses
+- *
+- * This spinlock should be held while calling functions that access
+- * the IOMMU if efx_use_iommu_lock is >= 2.  The efx_pci_*()
+- * functions do this where possible.
+- */
+-static spinlock_t efx_iommu_lock = SPIN_LOCK_UNLOCKED;
+-EXPORT_SYMBOL(efx_iommu_lock);
+-
+-/* Don't use the IOMMU lock if the device can access the whole of memory */
+-#define EFX_DMA_CONSISTENT(_efx)                      \
+-      (((_efx)->dma_mask >> PAGE_SHIFT) >= max_pfn)
+-/**
+- * efx_pci_map_single - map buffer for DMA, under IOMMU lock
+- * @pci:              PCI device
+- * @ptr:              Buffer
+- * @size:             Buffer length
+- * @direction:                DMA direction
+- *
+- * Wrapper for pci_map_single that uses efx_iommu_lock if necessary.
+- */
+-dma_addr_t efx_pci_map_single(struct pci_dev *pci, void *ptr, size_t size,
+-                            int direction)
+-{
+-      struct efx_nic *efx = pci_get_drvdata(pci);
+-      unsigned long flags __attribute__ ((unused));
+-      dma_addr_t dma_addr;
+-
+-      if (unlikely((efx_use_iommu_lock &&
+-                    (!EFX_NO_IOMMU) &&
+-                    (!EFX_DMA_CONSISTENT(efx))) ||
+-                   efx_use_iommu_lock >= 2)) {
+-              spin_lock_irqsave(&efx_iommu_lock, flags);
+-              dma_addr = pci_map_single(pci, ptr, size, direction);
+-              spin_unlock_irqrestore(&efx_iommu_lock, flags);
+-      } else {
+-              dma_addr = pci_map_single(pci, ptr, size, direction);
+-      }
+-      return dma_addr;
+-}
+-
+-/**
+- * efx_pci_unmap_single - unmap buffer for DMA, under IOMMU lock
+- * @pci:              PCI device
+- * @dma_addr:         DMA address
+- * @size:             Buffer length
+- * @direction:                DMA direction
+- *
+- * Wrapper for pci_unmap_single that uses efx_iommu_lock if necessary.
+- */
+-void efx_pci_unmap_single(struct pci_dev *pci, dma_addr_t dma_addr,
+-                        size_t size, int direction)
+-{
+-      struct efx_nic *efx = pci_get_drvdata(pci);
+-      unsigned long flags __attribute__ ((unused));
+-
+-      if (unlikely((efx_use_iommu_lock &&
+-                    (!EFX_NO_IOMMU) &&
+-                    (!EFX_DMA_CONSISTENT(efx))) ||
+-                   efx_use_iommu_lock >= 2)) {
+-              spin_lock_irqsave(&efx_iommu_lock, flags);
+-              pci_unmap_single(pci, dma_addr, size, direction);
+-              spin_unlock_irqrestore(&efx_iommu_lock, flags);
+-      } else {
+-              pci_unmap_single(pci, dma_addr, size, direction);
+-      }
+-}
+-
+-/**
+- * efx_pci_alloc_consistent - allocate DMA-consistent buffer, under IOMMU lock
+- * @pci:              PCI device
+- * @size:             Buffer length
+- * @dma_addr:         DMA address
+- *
+- * Wrapper for pci_alloc_consistent that uses efx_iommu_lock if necessary.
+- *
+- * Bugs: Currently this can't use the spinlock because
+- *    pci_alloc_consistent may block.
+- */
+-void *efx_pci_alloc_consistent(struct pci_dev *pci, size_t size,
+-                             dma_addr_t *dma_addr)
+-{
+-      return pci_alloc_consistent(pci, size, dma_addr);
+-}
+-
+-/**
+- * efx_pci_free_consistent - free DMA-consistent buffer, under IOMMU lock
+- * @pci:              PCI device
+- * @size:             Buffer length
+- * @ptr:              Buffer
+- * @dma_addr:         DMA address
+- *
+- * Wrapper for pci_free_consistent that uses efx_iommu_lock if necessary.
+- */
+-void efx_pci_free_consistent(struct pci_dev *pci, size_t size, void *ptr,
+-                           dma_addr_t dma_addr)
+-{
+-      struct efx_nic *efx = pci_get_drvdata(pci);
+-      unsigned long flags __attribute__ ((unused));
+-
+-      if (unlikely((efx_use_iommu_lock &&
+-                    (!EFX_NO_IOMMU) &&
+-                    (!EFX_DMA_CONSISTENT(efx))) ||
+-                   efx_use_iommu_lock >= 2)) {
+-              spin_lock_irqsave(&efx_iommu_lock, flags);
+-              pci_free_consistent(pci, size, ptr, dma_addr);
+-              spin_unlock_irqrestore(&efx_iommu_lock, flags);
+-      } else {
+-              pci_free_consistent(pci, size, ptr, dma_addr);
+-      }
+-}
+-
+-module_param(efx_use_iommu_lock, uint, 0644);
+-MODULE_PARM_DESC(efx_use_iommu_lock, "Enable lock for bug in free_iommu");
+-
+-#endif
+-
+-#ifdef EFX_NEED_COMPOUND_PAGE_FIX
+-
+-void efx_compound_page_destructor(struct page *page)
+-{
+-      /* Fake up page state to keep __free_pages happy */
+-      set_page_count(page, 1);
+-      page[1].mapping = NULL;
+-
+-      __free_pages(page, (unsigned long)page[1].index);
+-}
+-
+-#endif /* NEED_COMPOUND_PAGE_FIX */
+-
+-/**************************************************************************
+- *
+- * print_hex_dump, taken from lib/hexdump.c.
+- *
+- **************************************************************************
+- *
+- */
+-#ifdef EFX_NEED_HEX_DUMP
+-
+-#define hex_asc(x)    "0123456789abcdef"[x]
+-#define isascii(c) (((unsigned char)(c))<=0x7f)
+-
+-static void hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
+-                             int groupsize, char *linebuf, size_t linebuflen,
+-                             int ascii)
+-{
+-        const u8 *ptr = buf;
+-        u8 ch;
+-        int j, lx = 0;
+-        int ascii_column;
+-
+-        if (rowsize != 16 && rowsize != 32)
+-                rowsize = 16;
+-
+-        if (!len)
+-                goto nil;
+-        if (len > rowsize)              /* limit to one line at a time */
+-                len = rowsize;
+-        if ((len % groupsize) != 0)     /* no mixed size output */
+-                groupsize = 1;
+-
+-        switch (groupsize) {
+-        case 8: {
+-                const u64 *ptr8 = buf;
+-                int ngroups = len / groupsize;
+-
+-                for (j = 0; j < ngroups; j++)
+-                        lx += scnprintf(linebuf + lx, linebuflen - lx,
+-                              "%16.16llx ", (unsigned long long)*(ptr8 + j));
+-                ascii_column = 17 * ngroups + 2;
+-                break;
+-        }
+-
+-        case 4: {
+-                const u32 *ptr4 = buf;
+-                int ngroups = len / groupsize;
+-
+-                for (j = 0; j < ngroups; j++)
+-                        lx += scnprintf(linebuf + lx, linebuflen - lx,
+-                              "%8.8x ", *(ptr4 + j));
+-                ascii_column = 9 * ngroups + 2;
+-                break;
+-        }
+-
+-        case 2: {
+-                const u16 *ptr2 = buf;
+-                int ngroups = len / groupsize;
+-
+-                for (j = 0; j < ngroups; j++)
+-                        lx += scnprintf(linebuf + lx, linebuflen - lx,
+-                              "%4.4x ", *(ptr2 + j));
+-                ascii_column = 5 * ngroups + 2;
+-                break;
+-        }
+-
+-        default:
+-                for (j = 0; (j < rowsize) && (j < len) && (lx + 4) < linebuflen;
+-                     j++) {
+-                        ch = ptr[j];
+-                        linebuf[lx++] = hex_asc(ch >> 4);
+-                        linebuf[lx++] = hex_asc(ch & 0x0f);
+-                        linebuf[lx++] = ' ';
+-                }
+-                ascii_column = 3 * rowsize + 2;
+-                break;
+-        }
+-        if (!ascii)
+-                goto nil;
+-
+-        while (lx < (linebuflen - 1) && lx < (ascii_column - 1))
+-                linebuf[lx++] = ' ';
+-      /* Removed is_print() check */
+-        for (j = 0; (j < rowsize) && (j < len) && (lx + 2) < linebuflen; j++)
+-                linebuf[lx++] = isascii(ptr[j]) ? ptr[j] : '.';
+-nil:
+-        linebuf[lx++] = '\0';
+-}
+-
+-void print_hex_dump(const char *level, const char *prefix_str, int prefix_type,
+-                  int rowsize, int groupsize,
+-                  const void *buf, size_t len, int ascii)
+-{
+-        const u8 *ptr = buf;
+-        int i, linelen, remaining = len;
+-        char linebuf[200];
+-
+-        if (rowsize != 16 && rowsize != 32)
+-                rowsize = 16;
+-
+-        for (i = 0; i < len; i += rowsize) {
+-                linelen = min(remaining, rowsize);
+-                remaining -= rowsize;
+-                hex_dump_to_buffer(ptr + i, linelen, rowsize, groupsize,
+-                                 linebuf, sizeof(linebuf), ascii);
+-
+-                switch (prefix_type) {
+-                case DUMP_PREFIX_ADDRESS:
+-                        printk("%s%s%*p: %s\n", level, prefix_str,
+-                             (int)(2 * sizeof(void *)), ptr + i, linebuf);
+-                        break;
+-                case DUMP_PREFIX_OFFSET:
+-                        printk("%s%s%.8x: %s\n", level, prefix_str, i, linebuf);
+-                        break;
+-                default:
+-                        printk("%s%s%s\n", level, prefix_str, linebuf);
+-                        break;
+-                }
+-        }
+-}
+-
+-#endif /* EFX_NEED_HEX_DUMP */
+-
+-/**************************************************************************
+- *
+  * print_mac, from net/ethernet/eth.c in v2.6.24
+  *
+  **************************************************************************
+  *
+  */
+-#ifdef EFX_NEED_PRINT_MAC
+ char *print_mac(char *buf, const u8 *addr)
+ {
+         sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x",
+                 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+         return buf;
+ }
+-#endif /* EFX_NEED_PRINT_MAC */
+ #ifdef EFX_NEED_CSUM_TCPUDP_NOFOLD
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+-__wsum
+-csum_tcpudp_nofold (__be32 saddr, __be32 daddr, unsigned short len,
+-                  unsigned short proto, __wsum sum)
+-#else
+ __wsum
+ csum_tcpudp_nofold (unsigned long saddr, unsigned long daddr,
+                   unsigned short len, unsigned short proto, __wsum sum)
+-#endif
+ {
+       unsigned long result;
+@@ -570,85 +76,3 @@
+ }
+ #endif /* EFX_NEED_CSUM_TCPUDP_NOFOLD */
+-
+-#ifdef EFX_NEED_RANDOM_ETHER_ADDR
+-/* Generate random MAC address */
+-void efx_random_ether_addr(uint8_t *addr) {
+-        get_random_bytes (addr, ETH_ALEN);
+-      addr [0] &= 0xfe;       /* clear multicast bit */
+-      addr [0] |= 0x02;       /* set local assignment bit (IEEE802) */
+-}
+-#endif /* EFX_NEED_RANDOM_ETHER_ADDR */
+-
+-#ifdef EFX_NEED_MSECS_TO_JIFFIES
+-/*
+- * When we convert to jiffies then we interpret incoming values
+- * the following way:
+- *
+- * - negative values mean 'infinite timeout' (MAX_JIFFY_OFFSET)
+- *
+- * - 'too large' values [that would result in larger than
+- *   MAX_JIFFY_OFFSET values] mean 'infinite timeout' too.
+- *
+- * - all other values are converted to jiffies by either multiplying
+- *   the input value by a factor or dividing it with a factor
+- *
+- * We must also be careful about 32-bit overflows.
+- */
+-#ifndef MSEC_PER_SEC
+-#define MSEC_PER_SEC  1000L
+-#endif
+-unsigned long msecs_to_jiffies(const unsigned int m)
+-{
+-      /*
+-       * Negative value, means infinite timeout:
+-       */
+-      if ((int)m < 0)
+-              return MAX_JIFFY_OFFSET;
+-
+-#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
+-      /*
+-       * HZ is equal to or smaller than 1000, and 1000 is a nice
+-       * round multiple of HZ, divide with the factor between them,
+-       * but round upwards:
+-       */
+-      return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ);
+-#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+-      /*
+-       * HZ is larger than 1000, and HZ is a nice round multiple of
+-       * 1000 - simply multiply with the factor between them.
+-       *
+-       * But first make sure the multiplication result cannot
+-       * overflow:
+-       */
+-      if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
+-              return MAX_JIFFY_OFFSET;
+-
+-      return m * (HZ / MSEC_PER_SEC);
+-#else
+-      /*
+-       * Generic case - multiply, round and divide. But first
+-       * check that if we are doing a net multiplication, that
+-       * we wouldnt overflow:
+-       */
+-      if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
+-              return MAX_JIFFY_OFFSET;
+-
+-      return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC;
+-#endif
+-}
+-#endif /* EFX_NEED_MSECS_TO_JIFFIES */
+-
+-#ifdef EFX_NEED_MSLEEP
+-/**
+- * msleep - sleep safely even with waitqueue interruptions
+- * @msecs: Time in milliseconds to sleep for
+- */
+-void msleep(unsigned int msecs)
+-{
+-      unsigned long timeout = msecs_to_jiffies(msecs) + 1;
+-
+-      while (timeout)
+-              timeout = schedule_timeout_uninterruptible(timeout);
+-}
+-#endif
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/kernel_compat.h
+--- a/drivers/net/sfc/kernel_compat.h  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/kernel_compat.h  Tue Mar 31 11:59:10 2009 +0100
+@@ -37,406 +37,32 @@
+ #include <linux/interrupt.h>
+ #include <linux/skbuff.h>
+ #include <linux/netdevice.h>
+-
+-#include "extraversion.h"
++#include <linux/rtnetlink.h>
+ /*
+  * Kernel backwards compatibility
+  *
+- * This file provides macros that enable the driver to be compiled on
+- * any kernel from 2.6.9 onward (plus SLES 9 2.6.5), without requiring
+- * explicit version tests scattered throughout the code.
++ * This file provides macros to facilitate backporting the driver.
+  */
+-/**************************************************************************
+- *
+- * Version/config/architecture tests to set feature flags
+- *
+- **************************************************************************
+- *
+- * NOTE: For simplicity, these initial version tests cover kernel.org
+- * releases only.  Backported features in "enterprise" kernels are
+- * handled further down.
+- */
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) &&      \
+-      !(defined(EFX_DIST_SUSE) &&                      \
+-        LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) && \
+-        EFX_DIST_KVER_LEVEL_1 == 7)
+-      #error "This kernel version is now unsupported"
++#ifdef __ia64__
++      /* csum_tcpudp_nofold() is extern but not exported */
++      #define EFX_NEED_CSUM_TCPUDP_NOFOLD yes
+ #endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6)
+-      #define EFX_NEED_RANDOM_ETHER_ADDR yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)
+-      #define EFX_NEED_I2C_CLASS_HWMON yes
+-      #define EFX_NEED_IF_MII yes
+-      #define EFX_NEED_MSLEEP yes
+-      #define EFX_NEED_MSECS_TO_JIFFIES yes
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8)
+-      #define EFX_USE_MTD_ERASE_FAIL_ADDR yes
+-#else
+-      #define EFX_NEED_MTD_ERASE_CALLBACK yes
+-      #define EFX_NEED_DUMMY_PCI_DISABLE_MSI yes
+-      #define EFX_NEED_DUMMY_MSIX yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
+-      #define EFX_NEED_BYTEORDER_TYPES yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+-      #define EFX_NEED_MMIOWB yes
+-      #define EFX_NEED_PCI_SAVE_RESTORE_WRAPPERS yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
+-      #define EFX_NEED_DUMMY_SUPPORTS_GMII yes
+-      #define EFX_NEED_MII_CONSTANTS yes
+-      #define EFX_NEED_MII_ETHTOOL_FIX yes
+-      #define EFX_HAVE_MSIX_TABLE_RESERVED yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+-      #define EFX_NEED_SCHEDULE_TIMEOUT_INTERRUPTIBLE yes
+-      #define EFX_NEED_SCHEDULE_TIMEOUT_UNINTERRUPTIBLE yes
+-      #define EFX_NEED_GFP_T yes
+-      #define EFX_NEED_KZALLOC yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+-      #define EFX_NEED_SETUP_TIMER yes
+-      #ifdef CONFIG_HUGETLB_PAGE
+-              #define EFX_USE_COMPOUND_PAGES yes
+-      #endif
+-#else
+-      #define EFX_USE_COMPOUND_PAGES yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+-      #define EFX_NEED_MUTEX yes
+-      #define EFX_NEED_SAFE_LISTS yes
+-      #ifdef EFX_USE_COMPOUND_PAGES
+-              #define EFX_NEED_COMPOUND_PAGE_FIX yes
+-      #endif
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
+-      #define EFX_NEED_UNREGISTER_NETDEVICE_NOTIFIER_FIX yes
+-      #define EFX_NEED_DEV_NOTICE yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+-      #define EFX_NEED_IRQF_FLAGS yes
+-      #define EFX_NEED_NETDEV_ALLOC_SKB yes
+-      /* Fedora backported 2.6.18 netdevice.h changes */
+-      #ifndef NETIF_F_GSO
+-              #define EFX_NEED_NETIF_TX_LOCK yes
+-      #endif
+-#else
+-      #define EFX_USE_MTD_WRITESIZE yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+-      #define EFX_NEED_IRQ_HANDLER_T yes
+-      #define EFX_HAVE_IRQ_HANDLER_REGS yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+-      #define EFX_NEED_WORK_API_WRAPPERS yes
+-      #define EFX_USE_FASTCALL yes
+-      #define EFX_NEED_CSUM_UNFOLDED yes
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+-      /*
+-       * debugfs was introduced earlier, but only supports sym-links
+-       * from 2.6.21
+-       */
+-      #ifdef CONFIG_DEBUG_FS
+-              #define EFX_USE_DEBUGFS yes
+-      #endif
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+-      #define EFX_NEED_SKB_HEADER_MACROS yes
+-      #define EFX_NEED_HEX_DUMP yes
+-#else
+-      #define EFX_USE_CANCEL_WORK_SYNC yes
+-#endif
+-
+-#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)
+-      #define EFX_NEED_HEX_DUMP_CONST_FIX yes
+-#endif
+-
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)) && \
+-    (LINUX_VERSION_CODE <  KERNEL_VERSION(2,6,23))
+-      #define EFX_USE_ETHTOOL_GET_PERM_ADDR yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+-      #ifdef __ia64__
+-              /* csum_tcpudp_nofold() is extern but not exported */
+-              #define EFX_NEED_CSUM_TCPUDP_NOFOLD yes
+-      #endif
+-#else
+-      #define EFX_USE_PCI_DEV_REVISION yes
+-      #define EFX_USE_CANCEL_DELAYED_WORK_SYNC yes
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+-      #define EFX_HAVE_OLD_NAPI yes
+-      #define EFX_NEED_GENERIC_LRO yes
+-      #define EFX_NEED_PRINT_MAC yes
+-#else
+-      #define EFX_USE_ETHTOOL_FLAGS yes
+-#endif
+-
+-/*
+- * SFC Bug 4560: Some kernels leak IOMMU entries under heavy load.  Use a
+- * spinlock to serialise access where possible to alleviate the
+- * problem.
+- *
+- * NB. The following definition is duplicated in
+- * the char driver.  Please keep in sync.
+- */
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) && \
+-     defined(__x86_64__) && defined(CONFIG_SMP))
+-      #define EFX_NEED_IOMMU_LOCK yes
+-      #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+-              #if defined(CONFIG_GART_IOMMU)
+-                      #define EFX_NO_IOMMU no_iommu
+-              #else
+-                      #define EFX_NO_IOMMU 1
+-              #endif
+-      #else
+-              #define EFX_NO_IOMMU 0
+-      #endif
+-#endif
+-
+ #ifdef CONFIG_PPC64
+       /* __raw_writel and friends are broken on ppc64 */
+       #define EFX_NEED_RAW_READ_AND_WRITE_FIX yes
+ #endif
+-/**************************************************************************
+- *
+- * Exceptions for backported features
+- *
+- **************************************************************************
+- */
++typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
+-/* RHEL4 */
+-#if defined(EFX_DIST_RHEL) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9)
+-      #if EFX_DIST_KVER_LEVEL_1 >= 22
+-              /* linux-2.6.9-mmiowb.patch */
+-              #undef EFX_NEED_MMIOWB
+-      #endif
+-      #if EFX_DIST_KVER_LEVEL_1 >= 34
+-              /* linux-2.6.9-net-mii-update.patch */
+-              #undef EFX_NEED_DUMMY_SUPPORTS_GMII
+-              #undef EFX_NEED_MII_CONSTANTS
+-              #undef EFX_NEED_MII_ETHTOOL_FIX
+-              /* linux-2.6.9-gfp_t-typedef.patch */
+-              #undef EFX_NEED_GFP_T
+-              /* linux-2.6.9-slab-update.patch */
+-              #undef EFX_NEED_KZALLOC
+-      #endif
+-      #if EFX_DIST_KVER_LEVEL_1 >= 55
+-              /* linux-2.6.18-sata-update.patch (ported from 2.6.18->2.6.9) */
+-              #undef EFX_NEED_SCHEDULE_TIMEOUT_UNINTERRUPTIBLE
+-              #undef EFX_NEED_IRQ_HANDLER_T
+-      #endif
+-#endif
++#define skb_mac_header(skb)   (skb)->mac.raw
++#define skb_network_header(skb) (skb)->nh.raw
++#define eth_hdr(skb)          ((struct ethhdr *)skb_mac_header(skb))
++#define tcp_hdr(skb)          (skb)->h.th
++#define ip_hdr(skb)           (skb)->nh.iph
++#define skb_tail_pointer(skb)   (skb)->tail
+-/* RHEL5 */
+-#if defined(EFX_DIST_RHEL) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,18)
+-      #if EFX_DIST_KVER_LEVEL_1 >= 53
+-              /* linux-2.6.18-sata-update.patch */
+-              #undef EFX_NEED_SCHEDULE_TIMEOUT_UNINTERRUPTIBLE
+-              #undef EFX_NEED_IRQ_HANDLER_T
+-      #endif
+-#endif
+-
+-#if defined(EFX_DIST_RHEL)
+-      #if (LINUX_VERSION_CODE != KERNEL_VERSION(2,6,9)) && \
+-           (LINUX_VERSION_CODE != KERNEL_VERSION(2,6,18))
+-              #error "Unknown Red Hat Enterprise kernel version"
+-      #endif
+-#endif
+-
+-/* SLES9 */
+-#if defined(EFX_DIST_SUSE) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) && \
+-      EFX_DIST_KVER_LEVEL_1 == 7
+-      #if EFX_DIST_KVER_LEVEL_2 >= 139
+-              #undef EFX_NEED_MMIOWB
+-      #endif
+-      #if EFX_DIST_KVER_LEVEL_2 >= 191
+-              #undef EFX_NEED_MSLEEP
+-              #undef EFX_NEED_MSECS_TO_JIFFIES
+-      #endif
+-      #if EFX_DIST_KVER_LEVEL_2 >= 244
+-              #undef EFX_NEED_BYTEORDER_TYPES
+-      #endif
+-      #if EFX_DIST_KVER_LEVEL_2 >= 252
+-              #undef EFX_NEED_KZALLOC
+-      #endif
+-#endif
+-
+-/**************************************************************************
+- *
+- * Definitions of missing constants, types, functions and macros
+- *
+- **************************************************************************
+- *
+- */
+-
+-#ifndef DMA_40BIT_MASK
+-      #define DMA_40BIT_MASK  0x000000ffffffffffULL
+-#endif
+-
+-#ifndef spin_trylock_irqsave
+-      #define spin_trylock_irqsave(lock, flags)       \
+-      ({                                              \
+-              local_irq_save(flags);                  \
+-              spin_trylock(lock) ?                    \
+-              1 : ({local_irq_restore(flags); 0;});   \
+-      })
+-#endif
+-
+-#ifndef raw_smp_processor_id
+-      #define raw_smp_processor_id() (current_thread_info()->cpu)
+-#endif
+-
+-#ifndef NETIF_F_LRO
+-      #define NETIF_F_LRO 0
+-#endif
+-
+-/* Cope with small changes in PCI constants between minor kernel revisions */
+-#if PCI_X_STATUS != 4
+-      #undef PCI_X_STATUS
+-      #define PCI_X_STATUS 4
+-      #undef PCI_X_STATUS_MAX_SPLIT
+-      #define PCI_X_STATUS_MAX_SPLIT 0x03800000
+-#endif
+-
+-#ifndef PCI_EXP_LNKSTA
+-      #define PCI_EXP_LNKSTA          18          /* Link Status */
+-#endif
+-
+-/* Used for struct pt_regs */
+-#ifndef regs_return_value
+-      #if defined(__x86_64__)
+-              #define regs_return_value(regs) ((regs)->rax)
+-      #elif defined(__i386__)
+-              #define regs_return_value(regs) ((regs)->eax)
+-      #elif defined(__ia64__)
+-              #define regs_return_value(regs) ((regs)->r8)
+-      #else
+-              #error "Need definition for regs_return_value()"
+-      #endif
+-#endif
+-
+-#ifndef __GFP_COMP
+-      #define __GFP_COMP 0
+-#endif
+-
+-#ifndef __iomem
+-      #define __iomem
+-#endif
+-
+-#ifndef NET_IP_ALIGN
+-      #define NET_IP_ALIGN 2
+-#endif
+-
+-#ifndef PCI_CAP_ID_EXP
+-#define PCI_CAP_ID_EXP                0x10    /* PCI Express */
+-#endif
+-
+-#ifndef PCI_EXP_FLAGS
+-#define PCI_EXP_FLAGS           2           /* Capabilities register */
+-#define PCI_EXP_FLAGS_TYPE      0x00f0      /* Capability version */
+-#define PCI_EXP_TYPE_ENDPOINT   0x0         /* Express Endpoint */
+-#define PCI_EXP_TYPE_LEG_END    0x1         /* Legacy Endpoint */
+-#define PCI_EXP_TYPE_ROOT_PORT  0x4         /* Root Port */
+-#endif
+-
+-#ifndef PCI_EXP_DEVCAP
+-#define PCI_EXP_DEVCAP          4           /* Device capabilities */
+-#define PCI_EXP_DEVCAP_PAYLOAD  0x07        /* Max_Payload_Size */
+-#define PCI_EXP_DEVCAP_PWR_VAL  0x3fc0000   /* Slot Power Limit Value */
+-#define PCI_EXP_DEVCAP_PWR_SCL  0xc000000   /* Slot Power Limit Scale */
+-#endif
+-
+-#ifndef PCI_EXP_DEVCTL
+-#define PCI_EXP_DEVCTL          8           /* Device Control */
+-#define PCI_EXP_DEVCTL_PAYLOAD  0x00e0      /* Max_Payload_Size */
+-#define PCI_EXP_DEVCTL_READRQ   0x7000      /* Max_Read_Request_Size */
+-#endif
+-
+-#ifndef PCI_EXP_LNKSTA
+-#define PCI_EXP_LNKSTA                18          /* Link Status */
+-#endif
+-
+-#ifndef NETDEV_TX_OK
+-      #define NETDEV_TX_OK 0
+-#endif
+-
+-#ifndef NETDEV_TX_BUSY
+-      #define NETDEV_TX_BUSY 1
+-#endif
+-
+-#ifndef __force
+-      #define __force
+-#endif
+-
+-#if ! defined(for_each_cpu_mask) && ! defined(CONFIG_SMP)
+-      #define for_each_cpu_mask(cpu, mask)            \
+-              for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
+-#endif
+-
+-/**************************************************************************/
+-
+-#ifdef EFX_NEED_IRQ_HANDLER_T
+-      typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
+-#endif
+-
+-#ifdef EFX_NEED_I2C_CLASS_HWMON
+-      #define I2C_CLASS_HWMON (1<<0)
+-#endif
+-
+-#ifdef EFX_NEED_MII_CONSTANTS
+-      #define MII_CTRL1000            0x09
+-      #define MII_STAT1000            0x0a
+-      #define BMCR_SPEED1000          0x0040
+-      #define ADVERTISE_PAUSE_ASYM    0x0800
+-      #define ADVERTISE_PAUSE_CAP     0x0400
+-      #define LPA_PAUSE_ASYM          0x0800
+-      #define LPA_PAUSE_CAP           0x0400
+-      #define ADVERTISE_1000FULL      0x0200
+-      #define ADVERTISE_1000HALF      0x0100
+-      #define LPA_1000FULL            0x0800
+-      #define LPA_1000HALF            0x0400
+-#endif
+-
+-#ifdef EFX_NEED_DUMMY_SUPPORTS_GMII
+-      #include <linux/mii.h>
+-      /* Ugly; redirect nonexistent new field to an old unused field */
+-      #undef supports_gmii
+-      #define supports_gmii full_duplex
+-#endif
+-
+-#ifdef EFX_NEED_SKB_HEADER_MACROS
+-      #define skb_mac_header(skb)     (skb)->mac.raw
+-      #define skb_network_header(skb) (skb)->nh.raw
+-      #define tcp_hdr(skb)            (skb)->h.th
+-      #define ip_hdr(skb)             (skb)->nh.iph
+-      #define skb_tail_pointer(skb)   (skb)->tail
+-#endif
+ #ifdef EFX_NEED_RAW_READ_AND_WRITE_FIX
+       #include <asm/io.h>
+@@ -499,427 +125,60 @@
+       #define __raw_readq efx_raw_readq
+ #endif
+-#ifdef EFX_NEED_SCHEDULE_TIMEOUT_INTERRUPTIBLE
+-      static inline signed long
+-      schedule_timeout_interruptible(signed long timeout)
+-      {
+-              set_current_state(TASK_INTERRUPTIBLE);
+-              return schedule_timeout(timeout);
+-      }
+-#endif
++typedef u32 __wsum;
++#define csum_unfold(x) ((__force __wsum) x)
+-#ifdef EFX_NEED_SCHEDULE_TIMEOUT_UNINTERRUPTIBLE
+-      static inline signed long
+-      schedule_timeout_uninterruptible(signed long timeout)
+-      {
+-              set_current_state(TASK_UNINTERRUPTIBLE);
+-              return schedule_timeout(timeout);
+-      }
+-#endif
++#define DECLARE_MAC_BUF(var) char var[18] __attribute__((unused))
++extern char *print_mac(char *buf, const u8 *addr);
+-#ifdef EFX_NEED_MMIOWB
+-      #if defined(__i386__) || defined(__x86_64__)
+-              #define mmiowb()
+-      #elif defined(__ia64__)
+-              #ifndef ia64_mfa
+-                      #define ia64_mfa() asm volatile ("mf.a" ::: "memory")
+-              #endif
+-              #define mmiowb ia64_mfa
+-      #else
+-              #error "Need definition for mmiowb()"
+-      #endif
+-#endif
++/**
++ * queue_delayed_work in pre 2.6.20 can't rearm from inside
++ * the work member. So instead do a rather hacky sleep
++ */
++#define delayed_work work_struct
++#define INIT_DELAYED_WORK INIT_WORK
+-#ifdef EFX_NEED_KZALLOC
+-      static inline void *kzalloc(size_t size, int flags)
+-      {
+-              void *buf = kmalloc(size, flags);
+-              if (buf)
+-                      memset(buf, 0,size);
+-              return buf;
+-      }
+-#endif
++static int inline efx_queue_delayed_work(struct workqueue_struct *wq,
++                                       struct work_struct *work,
++                                       unsigned long delay)
++{
++      if (unlikely(delay > 0))
++              schedule_timeout_uninterruptible(delay);
++      return queue_work(wq, work);
++}
++#define queue_delayed_work efx_queue_delayed_work
+-#ifdef EFX_NEED_SETUP_TIMER
+-      static inline void setup_timer(struct timer_list * timer,
+-                                     void (*function)(unsigned long),
+-                                     unsigned long data)
+-      {
+-              timer->function = function;
+-              timer->data = data;
+-              init_timer(timer);
+-      }
+-#endif
++/**
++ * The old and new work-function prototypes just differ
++ * in the type of the pointer returned, so it's safe
++ * to cast between the prototypes.
++ */
++typedef void (*efx_old_work_func_t)(void *p);
+-#ifdef EFX_NEED_MUTEX
+-      #define EFX_DEFINE_MUTEX(x) DECLARE_MUTEX(x)
+-      #undef DEFINE_MUTEX
+-      #define DEFINE_MUTEX EFX_DEFINE_MUTEX
++#undef INIT_WORK
++#define INIT_WORK(_work, _func)                                       \
++      do {                                                    \
++              INIT_LIST_HEAD(&(_work)->entry);                \
++              (_work)->pending = 0;                           \
++              PREPARE_WORK((_work),                           \
++                           (efx_old_work_func_t) (_func),     \
++                           (_work));                          \
++      } while (0)
+-      #define efx_mutex semaphore
+-      #undef mutex
+-      #define mutex efx_mutex
++#define napi_str napi_dev[0]
+-      #define efx_mutex_init(x) init_MUTEX(x)
+-      #undef mutex_init
+-      #define mutex_init efx_mutex_init
++static inline void netif_napi_add(struct net_device *dev,
++                                struct net_device *dummy,
++                                int (*poll) (struct net_device *, int *),
++                                int weight)
++{
++      dev->weight = weight;
++      dev->poll = poll;
++}
+-      #define efx_mutex_destroy(x) do { } while(0)
+-      #undef mutex_destroy
+-      #define mutex_destroy efx_mutex_destroy
++#define napi_enable netif_poll_enable
++#define napi_disable netif_poll_disable
+-      #define efx_mutex_lock(x) down(x)
+-      #undef mutex_lock
+-      #define mutex_lock efx_mutex_lock
+-
+-      #define efx_mutex_lock_interruptible(x) down_interruptible(x)
+-      #undef mutex_lock_interruptible
+-      #define mutex_lock_interruptible efx_mutex_lock_interruptible
+-
+-      #define efx_mutex_unlock(x) up(x)
+-      #undef mutex_unlock
+-      #define mutex_unlock efx_mutex_unlock
+-
+-      #define efx_mutex_trylock(x) (!down_trylock(x))
+-      #undef mutex_trylock
+-      #define mutex_trylock efx_mutex_trylock
+-
+-      static inline int efx_mutex_is_locked(struct efx_mutex *m)
+-      {
+-              /* NB. This is quite inefficient, but it's the best we
+-               * can do with the semaphore API. */
+-              if ( down_trylock(m) )
+-                      return 1;
+-              /* Undo the effect of down_trylock. */
+-              up(m);
+-              return 0;
+-      }
+-      #undef mutex_is_locked
+-      #define mutex_is_locked efx_mutex_is_locked
+-#endif
+-
+-#ifndef NETIF_F_GSO
+-      #define efx_gso_size tso_size
+-      #undef gso_size
+-      #define gso_size efx_gso_size
+-      #define efx_gso_segs tso_segs
+-      #undef gso_segs
+-      #define gso_segs efx_gso_segs
+-#endif
+-
+-#ifdef EFX_NEED_IRQF_FLAGS
+-      #ifdef SA_PROBEIRQ
+-              #define IRQF_PROBE_SHARED  SA_PROBEIRQ
+-      #else
+-              #define IRQF_PROBE_SHARED  0
+-      #endif
+-      #define IRQF_SHARED        SA_SHIRQ
+-#endif
+-
+-#ifdef EFX_NEED_NETDEV_ALLOC_SKB
+-      #ifndef NET_SKB_PAD
+-              #define NET_SKB_PAD 16
+-      #endif
+-
+-      static inline
+-      struct sk_buff *netdev_alloc_skb(struct net_device *dev,
+-                                       unsigned int length)
+-      {
+-              struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD,
+-                                              GFP_ATOMIC | __GFP_COLD);
+-              if (likely(skb)) {
+-                      skb_reserve(skb, NET_SKB_PAD);
+-                      skb->dev = dev;
+-              }
+-              return skb;
+-      }
+-#endif
+-
+-#ifdef EFX_NEED_NETIF_TX_LOCK
+-      static inline void netif_tx_lock(struct net_device *dev)
+-      {
+-              spin_lock(&dev->xmit_lock);
+-              dev->xmit_lock_owner = smp_processor_id();
+-      }
+-      static inline void netif_tx_lock_bh(struct net_device *dev)
+-      {
+-              spin_lock_bh(&dev->xmit_lock);
+-              dev->xmit_lock_owner = smp_processor_id();
+-      }
+-      static inline void netif_tx_unlock_bh(struct net_device *dev)
+-      {
+-              dev->xmit_lock_owner = -1;
+-              spin_unlock_bh(&dev->xmit_lock);
+-      }
+-      static inline void netif_tx_unlock(struct net_device *dev)
+-      {
+-              dev->xmit_lock_owner = -1;
+-              spin_unlock(&dev->xmit_lock);
+-      }
+-#endif
+-
+-#ifdef EFX_NEED_CSUM_UNFOLDED
+-      typedef u32 __wsum;
+-      #define csum_unfold(x) ((__force __wsum) x)
+-#endif
+-
+-#ifdef EFX_NEED_HEX_DUMP
+-      enum {
+-              DUMP_PREFIX_NONE,
+-              DUMP_PREFIX_ADDRESS,
+-              DUMP_PREFIX_OFFSET
+-      };
+-#endif
+-
+-#ifdef EFX_NEED_PRINT_MAC
+-      #define DECLARE_MAC_BUF(var) char var[18] __attribute__((unused))
+-#endif
+-
+-#ifdef EFX_NEED_GFP_T
+-      typedef unsigned int gfp_t;
+-#endif
+-
+-#ifdef EFX_NEED_SAFE_LISTS
+-      #define list_for_each_entry_safe_reverse(pos, n, head, member)       \
+-              for (pos = list_entry((head)->prev, typeof(*pos), member),   \
+-                   n = list_entry(pos->member.prev, typeof(*pos), member); \
+-                   &pos->member != (head);                                 \
+-                   pos = n,                                                \
+-                   n = list_entry(n->member.prev, typeof(*n), member))
+-#endif
+-
+-#ifdef EFX_NEED_DEV_NOTICE
+-      #define dev_notice dev_warn
+-#endif
+-
+-#ifdef EFX_NEED_IF_MII
+-      #include <linux/mii.h>
+-      static inline struct mii_ioctl_data *efx_if_mii ( struct ifreq *rq ) {
+-              return ( struct mii_ioctl_data * ) &rq->ifr_ifru;
+-      }
+-      #undef if_mii
+-      #define if_mii efx_if_mii
+-#endif
+-
+-#ifdef EFX_NEED_MTD_ERASE_CALLBACK
+-      #include <linux/mtd/mtd.h>
+-      static inline void efx_mtd_erase_callback(struct erase_info *instr) {
+-              if ( instr->callback )
+-                      instr->callback ( instr );
+-      }
+-      #undef mtd_erase_callback
+-      #define mtd_erase_callback efx_mtd_erase_callback
+-#endif
+-
+-#ifdef EFX_NEED_DUMMY_PCI_DISABLE_MSI
+-      #include <linux/pci.h>
+-      static inline void dummy_pci_disable_msi ( struct pci_dev *dev ) {
+-              /* Do nothing */
+-      }
+-      #undef pci_disable_msi
+-      #define pci_disable_msi dummy_pci_disable_msi
+-#endif
+-
+-#ifdef EFX_NEED_DUMMY_MSIX
+-      struct msix_entry {
+-              u16     vector; /* kernel uses to write allocated vector */
+-              u16     entry;  /* driver uses to specify entry, OS writes */
+-      };
+-      static inline int pci_enable_msix(struct pci_dev* dev,
+-                                        struct msix_entry *entries, int nvec)
+-              {return -1;}
+-      static inline void pci_disable_msix(struct pci_dev *dev) { /* Do nothing */}
+-#endif
+-
+-#ifdef EFX_NEED_BYTEORDER_TYPES
+-      typedef __u16 __be16;
+-      typedef __u32 __be32;
+-      typedef __u64 __be64;
+-      typedef __u16 __le16;
+-      typedef __u32 __le32;
+-      typedef __u64 __le64;
+-#endif
+-
+-/**************************************************************************
+- *
+- * Missing functions provided by kernel_compat.c
+- *
+- **************************************************************************
+- *
+- */
+-#ifdef EFX_NEED_RANDOM_ETHER_ADDR
+-      extern void efx_random_ether_addr(uint8_t *addr);
+-      #ifndef EFX_IN_KCOMPAT_C
+-              #undef random_ether_addr
+-              #define random_ether_addr efx_random_ether_addr
+-      #endif
+-#endif
+-
+-#ifdef EFX_NEED_MII_ETHTOOL_FIX
+-      extern int efx_mii_ethtool_gset(struct mii_if_info *mii,
+-                                      struct ethtool_cmd *ecmd);
+-      extern int efx_mii_ethtool_sset(struct mii_if_info *mii,
+-                                      struct ethtool_cmd *ecmd);
+-      #ifndef EFX_IN_KCOMPAT_C
+-              #undef mii_ethtool_gset
+-              #define mii_ethtool_gset efx_mii_ethtool_gset
+-              #undef mii_ethtool_sset
+-              #define mii_ethtool_sset efx_mii_ethtool_sset
+-      #endif
+-#endif
+-
+-#ifdef EFX_NEED_UNREGISTER_NETDEVICE_NOTIFIER_FIX
+-      extern int efx_unregister_netdevice_notifier(struct notifier_block *nb);
+-      #ifndef EFX_IN_KCOMPAT_C
+-              #undef unregister_netdevice_notifier
+-              #define unregister_netdevice_notifier \
+-                              efx_unregister_netdevice_notifier
+-      #endif
+-#endif
+-
+-#ifdef EFX_NEED_IOMMU_LOCK
+-      extern dma_addr_t efx_pci_map_single(struct pci_dev *pci, void *ptr,
+-                                           size_t size, int direction);
+-      extern void efx_pci_unmap_single(struct pci_dev *pci,
+-                                       dma_addr_t dma_addr, size_t size,
+-                                       int direction);
+-      extern void * efx_pci_alloc_consistent(struct pci_dev *pci,
+-                                             size_t size,
+-                                             dma_addr_t *dma_addr);
+-      extern void efx_pci_free_consistent(struct pci_dev *pci,
+-                                          size_t size, void *ptr,
+-                                          dma_addr_t dma_addr);
+-      #ifndef EFX_IN_KCOMPAT_C
+-              #undef pci_map_single
+-              #undef pci_unmap_single
+-              #undef pci_alloc_consistent
+-              #undef pci_free_consistent
+-              #define pci_map_single efx_pci_map_single
+-              #define pci_unmap_single efx_pci_unmap_single
+-              #define pci_alloc_consistent efx_pci_alloc_consistent
+-              #define pci_free_consistent efx_pci_free_consistent
+-      #endif
+-#endif
+-
+-#ifdef EFX_NEED_PRINT_MAC
+-      extern char *print_mac(char *buf, const u8 *addr);
+-#endif
+-
+-#ifdef EFX_NEED_COMPOUND_PAGE_FIX
+-      extern void efx_compound_page_destructor(struct page *page);
+-#endif
+-
+-#ifdef EFX_NEED_HEX_DUMP
+-      extern void
+-      print_hex_dump(const char *level, const char *prefix_str,
+-                     int prefix_type, int rowsize, int groupsize,
+-                     const void *buf, size_t len, int ascii);
+-#endif
+-
+-#ifdef EFX_NEED_MSECS_TO_JIFFIES
+-      extern unsigned long msecs_to_jiffies(const unsigned int m);
+-#endif
+-
+-#ifdef EFX_NEED_MSLEEP
+-      extern void msleep(unsigned int msecs);
+-#endif
+-
+-/**************************************************************************
+- *
+- * Wrappers to fix bugs and parameter changes
+- *
+- **************************************************************************
+- *
+- */
+-
+-#ifdef EFX_NEED_PCI_SAVE_RESTORE_WRAPPERS
+-      #define pci_save_state(_dev)                                    \
+-              pci_save_state(_dev, (_dev)->saved_config_space)
+-
+-      #define pci_restore_state(_dev)                                 \
+-              pci_restore_state(_dev, (_dev)->saved_config_space)
+-#endif
+-
+-#ifdef EFX_NEED_WORK_API_WRAPPERS
+-      /**
+-       * queue_delayed_work in pre 2.6.20 can't rearm from inside
+-       * the work member. So instead do a rather hacky sleep
+-       */
+-      #define delayed_work work_struct
+-      #define INIT_DELAYED_WORK INIT_WORK
+-
+-      static int inline efx_queue_delayed_work(struct workqueue_struct *wq,
+-                                               struct work_struct *work,
+-                                               unsigned long delay)
+-      {
+-              if (unlikely(delay > 0))
+-                      schedule_timeout_uninterruptible(delay);
+-              return queue_work(wq, work);
+-      }
+-      #define queue_delayed_work efx_queue_delayed_work
+-
+-      /**
+-       * The old and new work-function prototypes just differ
+-       * in the type of the pointer returned, so it's safe
+-       * to cast between the prototypes.
+-       */
+-      typedef void (*efx_old_work_func_t)(void *p);
+-
+-      #undef INIT_WORK
+-      #define INIT_WORK(_work, _func)                                 \
+-              do {                                                    \
+-                      INIT_LIST_HEAD(&(_work)->entry);                \
+-                      (_work)->pending = 0;                           \
+-                      PREPARE_WORK((_work),                           \
+-                                   (efx_old_work_func_t) (_func),     \
+-                                   (_work));                          \
+-              } while (0)
+-#endif
+-
+-#ifdef EFX_HAVE_OLD_NAPI
+-      #define napi_str napi_dev[0]
+-
+-      static inline void netif_napi_add(struct net_device *dev,
+-                                        struct net_device *dummy,
+-                                        int (*poll) (struct net_device *,
+-                                                     int *),
+-                                        int weight)
+-      {
+-              dev->weight = weight;
+-              dev->poll = poll;
+-      }
+-
+-      #define napi_enable netif_poll_enable
+-      #define napi_disable netif_poll_disable
+-
+-      #define netif_rx_complete(dev, dummy) netif_rx_complete(dev)
+-#endif
+-
+-#ifdef EFX_NEED_COMPOUND_PAGE_FIX
+-      static inline
+-      struct page *efx_alloc_pages(gfp_t flags, unsigned int order)
+-      {
+-              struct page *p = alloc_pages(flags, order);
+-              if ((flags & __GFP_COMP) && (p != NULL) && (order > 0))
+-                      p[1].mapping = (void *)efx_compound_page_destructor;
+-              return p;
+-      }
+-      #undef alloc_pages
+-      #define alloc_pages efx_alloc_pages
+-
+-      static inline
+-      void efx_free_pages(struct page *p, unsigned int order)
+-      {
+-              if ((order > 0) && (page_count(p) == 1))
+-                      p[1].mapping = NULL;
+-              __free_pages(p, order);
+-      }
+-      #define __free_pages efx_free_pages
+-#endif
+-
+-#ifdef EFX_NEED_HEX_DUMP_CONST_FIX
+-      #define print_hex_dump(v,s,t,r,g,b,l,a) \
+-              print_hex_dump((v),(s),(t),(r),(g),(void*)(b),(l),(a))
+-#endif
++#define netif_rx_complete(dev, dummy) netif_rx_complete(dev)
+ #endif /* EFX_KERNEL_COMPAT_H */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/mdio_10g.c
+--- a/drivers/net/sfc/mdio_10g.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/mdio_10g.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -106,8 +106,8 @@
+ }
+ /* This ought to be ridiculous overkill. We expect it to fail rarely */
+-#define MDIO45_RESET_TIME     HZ
+-#define MDIO45_RESET_ITERS    (100)
++#define MDIO45_RESET_TIME     1000 /* ms */
++#define MDIO45_RESET_ITERS    100
+ int mdio_clause45_wait_reset_mmds(struct efx_nic *efx,
+                                 unsigned int mmd_mask)
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/mtd.c
+--- a/drivers/net/sfc/mtd.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/mtd.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -300,9 +300,7 @@
+               erase->state = MTD_ERASE_DONE;
+       } else {
+               erase->state = MTD_ERASE_FAILED;
+-#if defined(EFX_USE_MTD_ERASE_FAIL_ADDR)
+               erase->fail_addr = 0xffffffff;
+-#endif
+       }
+       mtd_erase_callback(erase);
+       return rc;
+@@ -437,9 +435,7 @@
+       efx_mtd->mtd.size = spi->size;
+       efx_mtd->mtd.erasesize = spi->erase_size;
+-#if defined(EFX_USE_MTD_WRITESIZE)
+       efx_mtd->mtd.writesize = 1;
+-#endif
+       if (snprintf(efx_mtd->name, sizeof(efx_mtd->name),
+                    "%s %s", efx->name, type_name) >=
+           sizeof(efx_mtd->name))
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/net_driver.h
+--- a/drivers/net/sfc/net_driver.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/net_driver.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -50,13 +50,8 @@
+ #include "driverlink.h"
+ #include "i2c-direct.h"
+-      #ifndef EFX_USE_DEBUGFS
+-              /* Sick, but we have no other use for dentry */
+-              #define dentry proc_dir_entry
+-      #endif
+-
+-#define EFX_MAX_LRO_DESCRIPTORS 8
+-#define EFX_MAX_LRO_AGGR MAX_SKB_FRAGS
++/* Sick, but we have no other use for dentry */
++#define dentry proc_dir_entry
+ /**************************************************************************
+  *
+@@ -66,7 +61,7 @@
+ #ifndef EFX_DRIVER_NAME
+ #define EFX_DRIVER_NAME       "sfc"
+ #endif
+-#define EFX_DRIVER_VERSION    "2.2.0101"
++#define EFX_DRIVER_VERSION    "2.2.0204"
+ #ifdef EFX_ENABLE_DEBUG
+ #define EFX_BUG_ON_PARANOID(x) BUG_ON(x)
+@@ -76,11 +71,15 @@
+ #define EFX_WARN_ON_PARANOID(x) do {} while (0)
+ #endif
++#define NET_DEV_REGISTERED(efx)                                       \
++      ((efx)->net_dev &&                                      \
++       ((efx)->net_dev->reg_state == NETREG_REGISTERED))
++
+ /* Include net device name in log messages if it has been registered.
+  * Use efx->name not efx->net_dev->name so that races with (un)registration
+  * are harmless.
+  */
+-#define NET_DEV_NAME(efx) ((efx)->net_dev_registered ? (efx)->name : "")
++#define NET_DEV_NAME(efx) (NET_DEV_REGISTERED(efx) ? (efx)->name : "")
+ /* Un-rate-limited logging */
+ #define EFX_ERR(efx, fmt, args...) \
+@@ -336,6 +335,83 @@
+ };
++
++/**
++ * struct efx_ssr_conn - Connection state for Soft Segment Reassembly (SSR) aka LRO
++ * @link: Link for hash table and free list.
++ * @active_link: Link for active_conns list
++ * @saddr: Source IP address
++ * @daddr: Destination IP address
++ * @source: Source TCP port number
++ * @dest: Destination TCP port number
++ * @n_in_order_pkts: Number of in-order packets we've seen with payload.
++ * @next_seq: Next in-order sequence number.
++ * @last_pkt_jiffies: Time we last saw a packet on this connection.
++ * @skb: The SKB we are currently holding.
++ *    If %NULL, then all following fields are undefined.
++ * @skb_tail: The tail of the frag_list of SKBs we're holding.
++ *    Only valid after at least one merge.
++ * @eh: The ethernet header of the skb we are holding.
++ * @iph: The IP header of the skb we are holding.
++ * @th: The TCP header of the skb we are holding.
++ * @th_last: The TCP header of the last packet merged.
++ */
++struct efx_ssr_conn {
++      struct list_head link;
++      struct list_head active_link;
++      unsigned saddr, daddr;
++      unsigned short source, dest;
++      unsigned n_in_order_pkts;
++      unsigned next_seq;
++      unsigned long last_pkt_jiffies;
++      struct sk_buff *skb;
++      struct sk_buff *skb_tail;
++      struct ethhdr *eh;
++      struct iphdr *iph;
++      struct tcphdr *th;
++      struct tcphdr *th_last;
++};
++
++/**
++ * struct efx_ssr_state - Port state for Soft Segment Reassembly (SSR) aka LRO
++ * @efx: The associated NIC.
++ * @conns_mask: Number of hash buckets - 1.
++ * @conns: Hash buckets for tracked connections.
++ * @conns_n: Length of linked list for each hash bucket.
++ * @active_conns: Connections that are holding a packet.
++ *    Connections are self-linked when not in this list.
++ * @free_conns: Free efx_ssr_conn instances.
++ * @last_purge_jiffies: The value of jiffies last time we purged idle
++ *    connections.
++ * @n_merges: Number of packets absorbed by SSR.
++ * @n_bursts: Number of bursts spotted by SSR.
++ * @n_slow_start: Number of packets not merged because connection may be in
++ *    slow-start.
++ * @n_misorder: Number of out-of-order packets seen in tracked streams.
++ * @n_too_many: Incremented when we're trying to track too many streams.
++ * @n_new_stream: Number of distinct streams we've tracked.
++ * @n_drop_idle: Number of streams discarded because they went idle.
++ * @n_drop_closed: Number of streams that have seen a FIN or RST.
++ */
++struct efx_ssr_state {
++      struct efx_nic *efx;
++      unsigned conns_mask;
++      struct list_head *conns;
++      unsigned *conns_n;
++      struct list_head active_conns;
++      struct list_head free_conns;
++      unsigned long last_purge_jiffies;
++      unsigned n_merges;
++      unsigned n_bursts;
++      unsigned n_slow_start;
++      unsigned n_misorder;
++      unsigned n_too_many;
++      unsigned n_new_stream;
++      unsigned n_drop_idle;
++      unsigned n_drop_closed;
++};
++
++
+ /* Flags for channel->used_flags */
+ #define EFX_USED_BY_RX 1
+ #define EFX_USED_BY_TX 2
+@@ -371,6 +447,7 @@
+  * @last_eventq_read_ptr: Last event queue read pointer value.
+  * @eventq_magic: Event queue magic value for driver-generated test events
+  * @debug_dir: debugfs directory
++ * @ssr: LRO/SSR state
+  * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors
+  *    and diagnostic counters
+  * @rx_alloc_push_pages: RX allocation method currently in use for pushing
+@@ -395,9 +472,6 @@
+       unsigned int has_interrupt;
+       unsigned int irq_moderation;
+       struct net_device *napi_dev;
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-      struct napi_struct napi_str;
+-#endif
+       struct work_struct reset_work;
+       int work_pending;
+       struct efx_special_buffer eventq;
+@@ -409,6 +483,7 @@
+       struct dentry *debug_dir;
+ #endif
++      struct efx_ssr_state ssr;
+       int rx_alloc_level;
+       int rx_alloc_push_pages;
+       int rx_alloc_pop_pages;
+@@ -533,10 +608,10 @@
+ #define EFX_ISCLAUSE45(efx) ((efx)->phy_type != PHY_TYPE_1G_ALASKA)
+ enum nic_state {
+-      STATE_INIT = 0,      /* suspend_lock always held */
++      STATE_INIT = 0,
+       STATE_RUNNING = 1,
+       STATE_FINI = 2,
+-      STATE_RESETTING = 3, /* suspend_lock always held */
++      STATE_RESETTING = 3, /* rtnl_lock always held */
+       STATE_DISABLED = 4,
+       STATE_MAX,
+ };
+@@ -548,10 +623,10 @@
+  * This is the equivalent of NET_IP_ALIGN [which controls the alignment
+  * of the skb->head for hardware DMA].
+  */
+-#ifdef __ia64__
+-#define EFX_PAGE_IP_ALIGN 2
++#if defined(__i386__) || defined(__x86_64__)
++#define EFX_PAGE_IP_ALIGN 0
+ #else
+-#define EFX_PAGE_IP_ALIGN 0
++#define EFX_PAGE_IP_ALIGN NET_IP_ALIGN
+ #endif
+ /*
+@@ -578,14 +653,14 @@
+  * @mac_writel: Write dword to MAC register
+  * @mac_readl: Read dword from a MAC register
+  * @init: Initialise MAC and PHY
+- * @reconfigure: Reconfigure MAC and PHY (e.g. for new link parameters)
++ * @reconfigure: Reconfigure MAC and PHY. Serialised by the mac_lock
+  * @update_stats: Update statistics
+  * @fini: Shut down MAC and PHY
+- * @check_hw: Check hardware
++ * @check_hw: Check hardware. Serialised by the mac_lock
+  * @fake_phy_event: Simulate a PHY event on a port
+- * @get_settings: Get ethtool settings
+- * @set_settings: Set ethtool settings
+- * @set_pause: Set pause parameters
++ * @get_settings: Get ethtool settings. Serialised by the mac_lock
++ * @set_settings: Set ethtool settings. Serialised by the mac_lock
++ * @set_pause: Set pause parameters. Serialised by the mac_lock
+  */
+ struct efx_mac_operations {
+       void (*mac_writel) (struct efx_nic *efx,
+@@ -711,8 +786,8 @@
+ /* An Efx multicast filter hash */
+ union efx_multicast_hash {
+-      u8 byte[EFX_MCAST_HASH_ENTRIES / sizeof(u8)];
+-      efx_oword_t oword[EFX_MCAST_HASH_ENTRIES / sizeof(efx_oword_t)];
++      u8 byte[EFX_MCAST_HASH_ENTRIES / 8];
++      efx_oword_t oword[EFX_MCAST_HASH_ENTRIES / sizeof(efx_oword_t) / 8];
+ };
+ /* Efx Error condition statistics */
+@@ -732,12 +807,9 @@
+  * struct efx_nic - an Efx NIC
+  * @name: Device name (net device name or bus id before net device registered)
+  * @pci_dev: The PCI device
+- * @pci_dev2: The secondary PCI device if present
+  * @type: Controller type attributes
+- * @dma_mask: DMA mask
+  * @legacy_irq: IRQ number
+  * @workqueue: Workqueue for resets, port reconfigures and the HW monitor
+- * @refill_workqueue: RX refill workqueue
+  * @reset_work: Scheduled reset workitem
+  * @monitor_work: Hardware monitor workitem
+  * @membase_phys: Memory BAR value as physical address
+@@ -746,15 +818,10 @@
+  * @interrupt_mode: Interrupt mode
+  * @is_asic: Is ASIC (else FPGA)
+  * @is_10g: Is set to 10G (else 1G)
+- * @external_sram_cfg: Size and number of banks of external SRAM
+  * @i2c: I2C interface
+  * @board_info: Board-level information
+- * @state: Device state flag. Can only be manipulated when both
+- *    suspend_lock and rtnl_lock are held.  Can be read when
+- *    either is held.
++ * @state: Device state flag. Serialised by the rtnl_lock.
+  * @reset_pending: Pending reset method (normally RESET_TYPE_NONE)
+- * @suspend_lock: Device suspend lock.  This must not be acquired with
+- *    rtnl_lock held.
+  * @tx_queue: TX DMA queues
+  * @rx_queue: RX DMA queues
+  * @channel: Channels
+@@ -774,23 +841,21 @@
+  * @spi_lock: SPI bus lock
+  * @n_rx_nodesc_drop_cnt: RX no descriptor drop count
+  * @nic_data: Hardware dependant state
+- * @mac_lock: MAC access lock. Protects efx->port_enabled/net_dev_registered
+- *            and efx_reconfigure_port()
++ * @mac_lock: MAC access lock. Protects @port_enabled, efx_monitor() and
++ *    efx_reconfigure_port()
+  * @port_enabled: Port enabled indicator.
+- *    Serialises efx_stop_all and efx_start_all with kernel interfaces.
+- *    Safe to read under the rtnl_lock, mac_lock, or netif_tx_lock, but
+- *    all three must be held to modify it.
+- * @net_dev_registered: Port is registered with operating system.
++ *    Serialises efx_stop_all(), efx_start_all() and efx_monitor() and
++ *    efx_reconfigure_work with kernel interfaces. Safe to read under any
++ *    one of the rtnl_lock, mac_lock, or netif_tx_lock, but all three must
++ *    be held to modify it.
+  * @port_initialized: Port initialized?
+  * @net_dev: Operating system network device. Consider holding the rtnl lock
+  * @rx_checksum_enabled: RX checksumming enabled
+  * @netif_stop_count: Port stop count
+  * @netif_stop_lock: Port stop lock
+- * @mac_stats: MAC statistics
+- * @stats: Net device statistics.
+- *    Hardware-specific code fills in @mac_stats, which provides a
+- *    detailed breakdown.  Generic code aggregates these statistics
+- *    into a standard &struct net_device_stats.
++ * @mac_stats: MAC statistics. These include all statistics the MACs
++ *    can provide.  Generic code converts these into a standard
++ *    &struct net_device_stats.
+  * @stats_buffer: DMA buffer for statistics
+  * @stats_lock: Statistics update lock
+  * @mac_op: MAC interface
+@@ -829,21 +894,14 @@
+ struct efx_nic {
+       char name[IFNAMSIZ];
+       struct pci_dev *pci_dev;
+-      struct pci_dev *pci_dev2;
+-#if !defined(EFX_USE_PCI_DEV_REVISION)
+       u8 revision;
+-#endif
+       const struct efx_nic_type *type;
+-      dma_addr_t dma_mask;
+       int legacy_irq;
+       struct workqueue_struct *workqueue;
+-#if !defined(EFX_USE_CANCEL_DELAYED_WORK_SYNC)
+       /* Since we can't use cancel_delayed_work_sync efx_reset() has to
+        * flush efx->workqueue to serialise against efx_reconfigure_port
+        * and efx_monitor. So it can't also run on workqueue */
+       struct workqueue_struct *reset_workqueue;
+-#endif
+-      struct workqueue_struct *refill_workqueue;
+       struct work_struct reset_work;
+       struct delayed_work monitor_work;
+       unsigned long membase_phys;
+@@ -852,15 +910,12 @@
+       enum efx_int_mode interrupt_mode;
+       unsigned int is_asic:1;
+       unsigned int is_10g:1;
+-      int external_sram_cfg;
+       struct efx_i2c_interface i2c;
+       struct efx_board board_info;
+       enum nic_state state;
+       enum reset_type reset_pending;
+-
+-      struct semaphore suspend_lock;
+       struct efx_tx_queue tx_queue[EFX_MAX_TX_QUEUES];
+       struct efx_rx_queue rx_queue[EFX_MAX_RX_QUEUES];
+@@ -885,11 +940,11 @@
+       struct mutex mac_lock;
+       int port_enabled;
+-      int net_dev_registered;
+       int port_initialized;
+       struct net_device *net_dev;
+       int rx_checksum_enabled;
++      int lro_enabled;
+       atomic_t netif_stop_count;
+       spinlock_t netif_stop_lock;
+@@ -942,7 +997,6 @@
+ /**
+  * struct efx_nic_type - Efx device type definition
+- * @is_dual_func: Is dual-function (else single-function)
+  * @mem_bar: Memory BAR number
+  * @mem_map_size: Memory BAR mapped size
+  * @txd_ptr_tbl_base: TX descriptor ring base address
+@@ -965,7 +1019,6 @@
+  *    descriptors
+  */
+ struct efx_nic_type {
+-      unsigned int is_dual_func;
+       unsigned int mem_bar;
+       unsigned int mem_map_size;
+       unsigned int txd_ptr_tbl_base;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/null_phy.c
+--- a/drivers/net/sfc/null_phy.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/null_phy.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -33,10 +33,8 @@
+       int link_ok = falcon_xaui_link_ok(efx);
+       /* Generate PHY event that a PHY would have generated */
+-      if (link_ok != efx->link_up) {
+-              efx->link_up = link_ok;
++      if (link_ok != efx->link_up)
+               efx->mac_op->fake_phy_event(efx);
+-      }
+       return 0;
+ }
+@@ -46,7 +44,7 @@
+       /* CX4 is always 10000FD only */
+       efx->link_options = GM_LPA_10000FULL;
+-      falcon_null_phy_check_hw(efx);
++      efx->link_up = falcon_xaui_link_ok(efx);
+ }
+ struct efx_phy_operations falcon_null_phy_ops = {
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/pm8358_phy.c
+--- a/drivers/net/sfc/pm8358_phy.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/pm8358_phy.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -162,10 +162,8 @@
+       int rc = 0;
+       int link_up = pm8358_link_ok(efx);
+       /* Simulate a PHY event if link state has changed */
+-      if (link_up != efx->link_up) {
+-              efx->link_up = link_up;
++      if (link_up != efx->link_up)
+               efx->mac_op->fake_phy_event(efx);
+-      }
+       return rc;
+ }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/rx.c
+--- a/drivers/net/sfc/rx.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/rx.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -84,7 +84,7 @@
+ #define RX_ALLOC_LEVEL_LRO 0x2000
+ #define RX_ALLOC_LEVEL_MAX 0x3000
+ #define RX_ALLOC_FACTOR_LRO 1
+-#define RX_ALLOC_FACTOR_SKB -2
++#define RX_ALLOC_FACTOR_SKB (-2)
+ /* This is the percentage fill level below which new RX descriptors
+  * will be added to the RX descriptor ring.
+@@ -284,8 +284,8 @@
+       }
+ }
+-inline void efx_fini_rx_buffer(struct efx_rx_queue *rx_queue,
+-                             struct efx_rx_buffer *rx_buf)
++static inline void efx_fini_rx_buffer(struct efx_rx_queue *rx_queue,
++                                    struct efx_rx_buffer *rx_buf)
+ {
+       /* Unmap for DMA */
+       efx_unmap_rx_buffer(rx_queue->efx, rx_buf);
+@@ -364,7 +364,7 @@
+                 rx_queue->added_count - rx_queue->removed_count);
+  out:
+-      /* Send write pointer to card.  */
++      /* Send write pointer to card. */
+       falcon_notify_rx_desc(rx_queue);
+       /* If the fast fill is running inside from the refill tasklet, then
+@@ -399,8 +399,7 @@
+                * that work is immediately pending to free some memory
+                * (e.g. an RX event or TX completion)
+                */
+-              queue_delayed_work(rx_queue->efx->refill_workqueue,
+-                                 &rx_queue->work, 0);
++              efx_schedule_slow_fill(rx_queue, 0);
+       }
+ }
+@@ -409,11 +408,7 @@
+       struct efx_rx_queue *rx_queue;
+       int rc;
+-#if !defined(EFX_NEED_WORK_API_WRAPPERS)
+-      rx_queue = container_of(data, struct efx_rx_queue, work.work);
+-#else
+       rx_queue = container_of(data, struct efx_rx_queue, work);
+-#endif
+       if (unlikely(!rx_queue->channel->enabled))
+               return;
+@@ -425,10 +420,8 @@
+       /* Push new RX descriptors, allowing at least 1 jiffy for
+        * the kernel to free some more memory. */
+       rc = __efx_fast_push_rx_descriptors(rx_queue, 1);
+-      if (rc) {
+-              queue_delayed_work(rx_queue->efx->refill_workqueue,
+-                                 &rx_queue->work, 1);
+-      }
++      if (rc)
++              efx_schedule_slow_fill(rx_queue, 1);
+ }
+ static inline void efx_rx_packet__check_len(struct efx_rx_queue *rx_queue,
+@@ -513,14 +506,9 @@
+       return skb;
+ }
+-#if defined(EFX_USE_FASTCALL)
+ void fastcall efx_rx_packet(struct efx_rx_queue *rx_queue,
+                           unsigned int index, unsigned int len,
+                           int checksummed, int discard)
+-#else
+-void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
+-                 unsigned int len, int checksummed, int discard)
+-#endif
+ {
+       struct efx_nic *efx = rx_queue->efx;
+       struct efx_rx_buffer *rx_buf;
+@@ -587,6 +575,7 @@
+       struct efx_nic *efx = channel->efx;
+       enum efx_veto veto;
+       struct sk_buff *skb;
++      int lro = efx->lro_enabled;
+       /* If we're in loopback test, then pass the packet directly to the
+        * loopback layer, and free the rx_buf here
+@@ -616,7 +605,14 @@
+        * changed, then flush the LRO state.
+        */
+       if (unlikely(channel->rx_alloc_pop_pages != (rx_buf->page != NULL))) {
++              efx_flush_lro(channel);
+               channel->rx_alloc_pop_pages = (rx_buf->page != NULL);
++      }
++      if (likely(checksummed && lro)) {
++              if (efx_ssr(&channel->ssr, rx_buf)) {
++                      channel->rx_alloc_level += RX_ALLOC_FACTOR_LRO;
++                      goto done;
++              }
+       }
+       /* Allow callback to veto the packet */
+@@ -668,7 +664,7 @@
+       enum efx_rx_alloc_method method = rx_alloc_method;
+       /* Only makes sense to use page based allocation if LRO is enabled */
+-      if (!(channel->efx->net_dev->features & NETIF_F_LRO)) {
++      if (!(channel->efx->lro_enabled)) {
+               method = RX_ALLOC_METHOD_SKB;
+       } else if (method == RX_ALLOC_METHOD_AUTO) {
+               /* Constrain the rx_alloc_level */
+@@ -725,8 +721,6 @@
+       EFX_LOG(rx_queue->efx, "initialising RX queue %d\n", rx_queue->queue);
+-      ASSERT_RTNL();
+-
+       /* Initialise ptr fields */
+       rx_queue->added_count = 0;
+       rx_queue->notified_count = 0;
+@@ -753,8 +747,6 @@
+       struct efx_rx_buffer *rx_buf;
+       EFX_LOG(rx_queue->efx, "shutting down RX queue %d\n", rx_queue->queue);
+-
+-      ASSERT_RTNL();
+       /* Flush RX queue and remove descriptor ring */
+       falcon_fini_rx(rx_queue);
+@@ -788,6 +780,12 @@
+       rx_queue->used = 0;
+ }
++/* Flush LRO/SSR state for the given channel */
++void efx_flush_lro(struct efx_channel *channel)
++{
++      efx_ssr_end_of_burst(&channel->ssr);
++}
++
+ module_param(rx_alloc_method, int, 0644);
+ MODULE_PARM_DESC(rx_alloc_method, "Allocation method used for RX buffers");
+@@ -796,3 +794,441 @@
+ MODULE_PARM_DESC(rx_refill_threshold,
+                "RX descriptor ring fast/slow fill threshold (%)");
++
++
++/* Size of the LRO hash table.  Must be a power of 2.  A larger table
++ * means we can accelerate a larger number of streams.
++ */
++static unsigned lro_table_size = 128;
++module_param(lro_table_size, uint, 0644);
++MODULE_PARM_DESC(lro_table_size,
++               "Size of the LRO hash table.  Must be a power of 2");
++
++/* Maximum length of a hash chain.  If chains get too long then the lookup
++ * time increases and may exceed the benefit of LRO.
++ */
++static unsigned lro_chain_max = 20;
++module_param(lro_chain_max, uint, 0644);
++MODULE_PARM_DESC(lro_chain_max,
++               "Maximum length of chains in the LRO hash table");
++
++
++/* Maximum time (in jiffies) that a connection can be idle before it's LRO
++ * state is discarded.
++ */
++static unsigned lro_idle_jiffies = HZ / 10 + 1;       /* 100ms */
++module_param(lro_idle_jiffies, uint, 0644);
++MODULE_PARM_DESC(lro_idle_jiffies, "Time (in jiffies) after which an"
++               " idle connection's LRO state is discarded");
++
++
++/* Number of packets with payload that must arrive in-order before a
++ * connection is eligible for LRO.  The idea is we should avoid coalescing
++ * segments when the sender is in slow-start because reducing the ACK rate
++ * can damage performance.
++ */
++static unsigned lro_slow_start_packets = 20;
++module_param(lro_slow_start_packets, uint, 0644);
++MODULE_PARM_DESC(lro_slow_start_packets, "Number of packets that must "
++               "pass in-order before starting LRO.");
++
++
++int efx_ssr_init(struct efx_ssr_state *st, struct efx_nic *efx)
++{
++      unsigned i;
++      st->conns_mask = lro_table_size - 1;
++      if ((st->conns_mask + 1) & st->conns_mask) {
++              EFX_ERR(efx, "lro_table_size(=%u) must be a power of 2\n",
++                      lro_table_size);
++              return -EINVAL;
++      }
++      st->efx = efx;
++      st->conns = kmalloc((st->conns_mask + 1)
++                          * sizeof(st->conns[0]), GFP_KERNEL);
++      if (st->conns == NULL)
++              return -ENOMEM;
++      st->conns_n = kmalloc((st->conns_mask + 1)
++                            * sizeof(st->conns_n[0]), GFP_KERNEL);
++      if (st->conns_n == NULL) {
++              kfree(st->conns);
++              st->conns = NULL;
++              return -ENOMEM;
++      }
++      for (i = 0; i <= st->conns_mask; ++i) {
++              INIT_LIST_HEAD(&st->conns[i]);
++              st->conns_n[i] = 0;
++      }
++      INIT_LIST_HEAD(&st->active_conns);
++      INIT_LIST_HEAD(&st->free_conns);
++      return 0;
++}
++
++/* Drop the given connection, and add it to the free list */
++static inline void efx_ssr_drop(struct efx_ssr_state *st,
++                              struct efx_ssr_conn *c, unsigned conn_hash)
++{
++      EFX_BUG_ON_PARANOID(c->skb);
++      EFX_BUG_ON_PARANOID(st->conns_n[conn_hash] <= 0);
++      --st->conns_n[conn_hash];
++      list_del(&c->link);
++      list_add(&c->link, &st->free_conns);
++}
++
++void efx_ssr_fini(struct efx_ssr_state *st)
++{
++      struct efx_ssr_conn *c;
++      unsigned i;
++
++      /* Return cleanly if efx_ssr_init() has not been called. */
++      if (st->conns == NULL)
++              return;
++
++      EFX_BUG_ON_PARANOID(!list_empty(&st->active_conns));
++
++      for (i = 0; i <= st->conns_mask; ++i)
++              while (!list_empty(&st->conns[i])) {
++                      c = list_entry(st->conns[i].prev,
++                                     struct efx_ssr_conn, link);
++                      efx_ssr_drop(st, c, i);
++              }
++
++      while (!list_empty(&st->free_conns)) {
++              c = list_entry(st->free_conns.prev, struct efx_ssr_conn, link);
++              list_del(&c->link);
++              EFX_BUG_ON_PARANOID(c->skb);
++              kfree(c);
++      }
++
++      kfree(st->conns_n);
++      kfree(st->conns);
++      st->conns = NULL;
++}
++
++/* Calc IP checksum and deliver to the OS */
++static void efx_ssr_deliver(struct efx_ssr_state *st, struct efx_ssr_conn *c)
++{
++      struct efx_nic *efx = st->efx;
++      int veto, len;
++
++      EFX_BUG_ON_PARANOID(!c->skb);
++
++      ++st->n_bursts;
++
++      /* Finish off packet munging and recalculate IP header checksum. */
++      c->iph->tot_len = htons(c->iph->tot_len);
++      c->iph->check = 0;
++      c->iph->check = ip_fast_csum((u8 *) c->iph, c->iph->ihl);
++
++      len = c->skb->len + ((char *)c->iph - (char *)c->eh);
++      c->skb->truesize = len + sizeof(struct sk_buff);
++
++      c->th->window = c->th_last->window;
++      c->th->ack_seq = c->th_last->ack_seq;
++      if (c->th->doff == c->th_last->doff) {
++              /* Copy TCP options (take care to avoid going negative). */
++              len = ((c->th->doff - 5) & 0xf) << 2u;
++              memcpy(c->th + 1, c->th_last + 1, len);
++      }
++
++      /* Allow callback to veto the packet. */
++      veto = EFX_DL_CALLBACK(efx, rx_packet, (char *)c->eh, len);
++      if (unlikely(veto)) {
++              EFX_LOG(efx, "RX vetoed by driverlink %s driver\n",
++                      efx->dl_cb_dev.rx_packet->driver->name);
++              dev_kfree_skb_any(c->skb);
++      } else {
++              netif_receive_skb(c->skb);
++      }
++
++      c->skb = NULL;
++      list_del_init(&c->active_link);
++}
++
++/* Stop tracking connections that have gone idle in order to keep hash
++ * chains short.
++ */
++static void efx_ssr_purge_idle(struct efx_ssr_state *st, unsigned now)
++{
++      struct efx_ssr_conn *c;
++      unsigned i;
++
++      EFX_BUG_ON_PARANOID(!list_empty(&st->active_conns));
++
++      st->last_purge_jiffies = now;
++      for (i = 0; i <= st->conns_mask; ++i) {
++              if (list_empty(&st->conns[i]))
++                      continue;
++
++              c = list_entry(st->conns[i].prev, struct efx_ssr_conn, link);
++              if (now - c->last_pkt_jiffies > lro_idle_jiffies) {
++                      ++st->n_drop_idle;
++                      efx_ssr_drop(st, c, i);
++              }
++      }
++}
++
++/* Push held skbs down into network stack.
++ * Only called when active list is non-empty.
++ */
++void __efx_ssr_end_of_burst(struct efx_ssr_state *st)
++{
++      struct efx_ssr_conn *c;
++      unsigned j;
++
++      EFX_BUG_ON_PARANOID(list_empty(&st->active_conns));
++
++      do {
++              c = list_entry(st->active_conns.next, struct efx_ssr_conn,
++                             active_link);
++              EFX_BUG_ON_PARANOID(!c->skb);
++              efx_ssr_deliver(st, c);
++      } while (!list_empty(&st->active_conns));
++
++      j = jiffies;
++      if (unlikely(j != st->last_purge_jiffies))
++              efx_ssr_purge_idle(st, j);
++}
++
++/* Construct an skb Push held skbs down into network stack.
++ * Only called when active list is non-empty.
++ */
++static inline int
++efx_ssr_merge(struct efx_ssr_state *st, struct efx_ssr_conn *c,
++            struct tcphdr *th, int data_length)
++{
++      /* Increase lengths appropriately */
++      c->skb->len += data_length;
++      c->skb->data_len += data_length;
++
++      /*
++       * Keep track of max MSS seen and store in
++       * gso_size for kernel to use
++       */
++      if (data_length > skb_shinfo(c->skb)->gso_size)
++              skb_shinfo(c->skb)->gso_size = data_length;
++
++      /* Update the connection state flags */
++      c->iph->tot_len += data_length;
++      c->th->psh |= th->psh;
++      c->th_last = th;
++      ++st->n_merges;
++
++      /* Pass packet up now if another segment could overflow the IP
++       * length.
++       */
++      return (c->skb->len > 65536 - 9200);
++}
++
++static inline void
++efx_ssr_start(struct efx_ssr_state *st, struct efx_ssr_conn *c,
++            struct tcphdr *th, int data_length)
++{
++      /* Initialise gso_size appropriately */
++      skb_shinfo(c->skb)->gso_size = data_length;
++
++      /* Mangle header fields for later processing */
++      c->iph->tot_len = ntohs(c->iph->tot_len);
++
++      /* Move this connection the head of the active list */
++      list_del(&c->active_link);
++      list_add(&c->active_link, &st->active_conns);
++}
++
++static inline int
++efx_ssr_conn_page(struct efx_ssr_state *st, struct efx_ssr_conn *c,
++                struct efx_rx_buffer *rx_buf, struct tcphdr *th,
++                int hdr_length, int data_length)
++{
++      if (likely(c->skb)) {
++              struct skb_frag_struct *frag;
++              frag = skb_shinfo(c->skb)->frags;
++              frag += skb_shinfo(c->skb)->nr_frags;
++              frag->page = rx_buf->page;
++              frag->page_offset = RX_BUF_OFFSET(rx_buf) + hdr_length;
++              frag->size = data_length;
++              ++skb_shinfo(c->skb)->nr_frags;
++              rx_buf->page = NULL;
++
++              if (efx_ssr_merge(st, c, th, data_length) ||
++                  (skb_shinfo(c->skb)->nr_frags == MAX_SKB_FRAGS))
++                      efx_ssr_deliver(st, c);
++
++              return 1;
++      } else {
++              c->skb = efx_rx_mk_skb(rx_buf, st->efx, hdr_length);
++              if (unlikely(c->skb == NULL))
++                      return 0;
++
++              c->eh = eth_hdr(c->skb);
++              c->iph = (struct iphdr *)c->skb->data;
++              c->th = (struct tcphdr *)((u8 *) c->iph + c->iph->ihl * 4);
++              c->th_last = c->th;
++
++              efx_ssr_start(st, c, th, data_length);
++
++              return 1;
++      }
++}
++
++static inline void
++efx_ssr_conn_skb(struct efx_ssr_state *st, struct efx_ssr_conn *c,
++               struct efx_rx_buffer *rx_buf, struct ethhdr *eh,
++               struct iphdr *iph, struct tcphdr *th, int data_length)
++{
++      /* Transfer ownership of the rx_buf->skb to the LRO chain */
++      struct sk_buff *skb = rx_buf->skb;
++      rx_buf->skb = NULL;
++
++      if (likely(c->skb)) {
++              /* Remove the headers */
++              skb_pull(skb, skb->len - data_length);
++
++              /* Tack the new skb onto the head skb's frag_list. */
++              EFX_BUG_ON_PARANOID(skb->next);
++              if (!skb_shinfo(c->skb)->frag_list)
++                      skb_shinfo(c->skb)->frag_list = skb;
++              else
++                      c->skb_tail->next = skb;
++              c->skb_tail = skb;
++
++              if (efx_ssr_merge(st, c, th, data_length))
++                      efx_ssr_deliver(st, c);
++      } else {
++              c->skb = skb;
++              c->eh = eh;
++              c->iph = iph;
++              c->th = th;
++              c->th_last = th;
++
++              efx_ssr_start(st, c, th, data_length);
++      }
++}
++
++/* Process SKB and decide whether to dispatch it to the stack now or
++ * later.
++ */
++int efx_ssr(struct efx_ssr_state *st, struct efx_rx_buffer *rx_buf)
++{
++
++      int eh_proto, data_length, hdr_length, dont_merge;
++      struct efx_ssr_conn *c;
++      struct ethhdr *eh;
++      struct iphdr *iph;
++      struct tcphdr *th;
++      unsigned th_seq, conn_hash, pkt_length;
++
++      /* This does not handle VLAN code */
++      /* Find the IP header. The ethernet header is always at rx_buf->data */
++      eh = (struct ethhdr *)rx_buf->data;
++      if (rx_buf->page) {
++              eh_proto = eh->h_proto;
++              iph = (struct iphdr *)(eh + 1);
++      } else {
++              /* The skb head is at the IP header */
++              eh_proto = rx_buf->skb->protocol;
++              iph = (struct iphdr *)rx_buf->skb->data;
++      }
++
++      /* We're not interested if it isn't TCP over IPv4, or if fragged. */
++      if ((eh_proto - htons(ETH_P_IP)) |
++          (iph->protocol - IPPROTO_TCP) |
++          (iph->frag_off & htons(IP_MF | IP_OFFSET)))
++              return 0;
++
++      /* Get the TCP protocol */
++      th = (struct tcphdr *)((u8 *) iph + iph->ihl * 4);
++      hdr_length = (u8 *) th + th->doff * 4 - (u8 *) eh;
++      /* Cope with padding after IP header */
++      pkt_length = ntohs(iph->tot_len) + (u8 *)iph - (u8 *)eh;
++      rx_buf->len = min(pkt_length, rx_buf->len);
++      data_length = rx_buf->len - hdr_length;
++      th_seq = ntohl(th->seq);
++      dont_merge = ((data_length <= 0)
++                    | th->urg | th->syn | th->rst | th->fin);
++
++      /* Very cheap and crude hash. */
++      conn_hash = (th->source ^ th->dest) & st->conns_mask;
++
++      list_for_each_entry(c, &st->conns[conn_hash], link) {
++              if ((c->saddr - iph->saddr) | (c->daddr - iph->daddr) |
++                  (c->source - th->source) | (c->dest - th->dest))
++                      continue;
++
++              /* Re-insert at head of list to reduce lookup time. */
++              list_del(&c->link);
++              list_add(&c->link, &st->conns[conn_hash]);
++
++              if (unlikely(th_seq - c->next_seq)) {
++                      /* Out-of-order, so start counting again. */
++                      if (c->skb)
++                              efx_ssr_deliver(st, c);
++                      c->n_in_order_pkts = 0;
++                      c->next_seq = th_seq + data_length;
++                      ++st->n_misorder;
++                      return 0;
++              }
++              c->next_seq = th_seq + data_length;
++              c->last_pkt_jiffies = jiffies;
++
++              if (c->n_in_order_pkts < lro_slow_start_packets) {
++                      /* May be in slow-start, so don't merge. */
++                      ++st->n_slow_start;
++                      ++c->n_in_order_pkts;
++                      return 0;
++              }
++
++              if (unlikely(dont_merge)) {
++                      if (c->skb)
++                              efx_ssr_deliver(st, c);
++                      if (th->fin || th->rst) {
++                              ++st->n_drop_closed;
++                              efx_ssr_drop(st, c, conn_hash);
++                      }
++                      return 0;
++              }
++
++              if (rx_buf->page) {
++                      return efx_ssr_conn_page(st, c, rx_buf, th, hdr_length,
++                                               data_length);
++              } else {
++                      efx_ssr_conn_skb(st, c, rx_buf, eh, iph, th,
++                                       data_length);
++                      return 1;
++              }
++      }
++
++      /* We're not yet tracking this connection. */
++      if (dont_merge)
++              return 0;
++
++      if (st->conns_n[conn_hash] >= lro_chain_max) {
++              ++st->n_too_many;
++              return 0;
++      }
++
++      if (!list_empty(&st->free_conns)) {
++              c = list_entry(st->free_conns.next, struct efx_ssr_conn, link);
++              list_del(&c->link);
++      } else {
++              c = kmalloc(sizeof(*c), GFP_ATOMIC);
++              if (c == NULL)
++                      return 0;
++              c->skb = NULL;
++              INIT_LIST_HEAD(&c->active_link);
++      }
++
++      /* Create the connection tracking data */
++      ++st->conns_n[conn_hash];
++      list_add(&c->link, &st->conns[conn_hash]);
++      c->saddr = iph->saddr;
++      c->daddr = iph->daddr;
++      c->source = th->source;
++      c->dest = th->dest;
++      c->next_seq = th_seq + data_length;
++      c->n_in_order_pkts = 0;
++      EFX_BUG_ON_PARANOID(c->skb);
++      ++st->n_new_stream;
++      return 0;
++}
++
++
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/rx.h
+--- a/drivers/net/sfc/rx.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/rx.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -26,6 +26,7 @@
+ #ifndef EFX_RX_H
+ #define EFX_RX_H
++#include <linux/skbuff.h>
+ #include "net_driver.h"
+@@ -34,6 +35,7 @@
+ int efx_init_rx_queue(struct efx_rx_queue *rx_queue);
+ void efx_fini_rx_queue(struct efx_rx_queue *rx_queue);
++void efx_flush_lro(struct efx_channel *channel);
+ void efx_rx_strategy(struct efx_channel *channel);
+ void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue);
+ void efx_rx_work(struct work_struct *data);
+@@ -41,4 +43,19 @@
+                    struct efx_rx_buffer *rx_buf, int checksummed);
++
++extern int efx_ssr_init(struct efx_ssr_state *st, struct efx_nic *efx);
++extern void efx_ssr_fini(struct efx_ssr_state *st);
++
++extern void __efx_ssr_end_of_burst(struct efx_ssr_state *st);
++extern int efx_ssr(struct efx_ssr_state *st, struct efx_rx_buffer *rx_buf);
++
++
++static inline void efx_ssr_end_of_burst(struct efx_ssr_state *st)
++{
++      if (!list_empty(&st->active_conns))
++              __efx_ssr_end_of_burst(st);
++}
++
++
+ #endif /* EFX_RX_H */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/selftest.c
+--- a/drivers/net/sfc/selftest.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/selftest.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -35,7 +35,6 @@
+ #include <linux/in.h>
+ #include <linux/udp.h>
+ #include <linux/rtnetlink.h>
+-#include <asm/io.h>
+ #include "net_driver.h"
+ #include "ethtool.h"
+ #include "efx.h"
+@@ -245,8 +244,7 @@
+               if (channel->eventq_magic == magic)
+                       goto eventq_ok;
+-      }
+-      while (++count < 2);
++      } while (++count < 2);
+       EFX_ERR(channel->efx, "channel %d timed out in %ld jiffies waiting for"
+               " event queue\n", channel->channel, jiffies - j_start);
+@@ -471,9 +469,6 @@
+                            struct efx_tx_queue *tx_queue,
+                            struct efx_loopback_self_tests *lb_tests)
+ {
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-      struct efx_channel *channel;
+-#endif
+       struct efx_selftest_state *state = efx->loopback_selftest;
+       struct efx_loopback_payload *payload;
+       struct sk_buff *skb;
+@@ -513,17 +508,8 @@
+               udelay(10);
+       }
+-#if !defined(EFX_HAVE_OLD_NAPI)
+-      /* NAPI polling is not enabled, so process channels synchronously */
+-      schedule_timeout_uninterruptible(HZ / 50);
+-      efx_for_each_channel_with_interrupt(channel, efx) {
+-              if (channel->work_pending)
+-                      efx_process_channel_now(channel);
+-      }
+-#else
+       /* Allow time for processing */
+       schedule_timeout_uninterruptible(HZ / 10);
+-#endif
+       if (state->flush)
+               goto out3;
+@@ -625,7 +611,7 @@
+       struct ethtool_cmd ecmd, ecmd_loopback;
+       struct efx_tx_queue *tx_queue;
+       enum efx_loopback_mode old_mode, mode;
+-      int old_powered, count, rc = 0;
++      int old_powered, count, rc = 0, link_up;
+       int retry = EFX_WORKAROUND_8909(efx);
+       /* Get current PHY settings */
+@@ -663,7 +649,7 @@
+               state->flush = 1;
+               efx->phy_powered = 1;
+               efx->loopback_mode = mode;
+-              efx_reconfigure_port(efx, 0);
++              efx_reconfigure_port(efx);
+               /* Wait for the PHY to signal the link is up */
+               count = 0;
+@@ -677,11 +663,21 @@
+                       /* Wait for PHY events to be processed */
+                       flush_workqueue(efx->workqueue);
+                       rmb();
+-              } while ((++count < 20) && !efx->link_up);
++
++                      /* efx->link_up can be 1 even if the XAUI link is down,
++                       * (bug5762). Usually, it's not worth bothering with the
++                       * difference, but for selftests, we need that extra
++                       * guarantee that the link is really, really, up.
++                       */
++                      link_up = efx->link_up;
++                      if (EFX_IS10G(efx) && !falcon_xaui_link_ok(efx))
++                              link_up = 0;
++
++              } while ((++count < 20) && !link_up);
+               /* The link should now be up. If it isn't, there is no point
+                * in attempting a loopback test */
+-              if (!efx->link_up) {
++              if (!link_up) {
+                       EFX_ERR(efx, "loopback %s never came up\n",
+                               LOOPBACK_MODE(efx));
+                       rc = -EIO;
+@@ -712,7 +708,7 @@
+                       state->flush = 1;
+                       efx->loopback_mode = first;
+-                      efx_reconfigure_port(efx, 0);
++                      efx_reconfigure_port(efx);
+                       retry = rc = 0;
+                       --mode;
+@@ -750,8 +746,6 @@
+       struct efx_channel *channel;
+       int rc = 0;
+-      ASSERT_RTNL();
+-
+       EFX_LOG(efx, "performing online self-tests\n");
+       rc |= efx_test_interrupts(efx, tests);
+@@ -778,8 +772,6 @@
+ {
+       struct efx_selftest_state *state;
+       int rc = 0;
+-
+-      ASSERT_RTNL();
+       EFX_LOG(efx, "performing offline self-tests\n");
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h
+--- a/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -70,22 +70,23 @@
+ #define efhw_nic_close_hardware(nic) \
+       ((nic)->efhw_func->close_hardware(nic))
+-#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr) \
+-      ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr)))
++#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr, non_irq_evq) \
++      ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr), \
++                                       (non_irq_evq)))
+ /*-------------- Interrupt support  ------------ */
+ /** Handle interrupt.  Return 0 if not handled, 1 if handled. */
+ #define efhw_nic_interrupt(nic) \
+       ((nic)->efhw_func->interrupt(nic))
+-#define efhw_nic_interrupt_enable(nic, index) \
+-      ((nic)->efhw_func->interrupt_enable(nic, index))
++#define efhw_nic_interrupt_enable(nic) \
++      ((nic)->efhw_func->interrupt_enable(nic))
+-#define efhw_nic_interrupt_disable(nic, index) \
+-      ((nic)->efhw_func->interrupt_disable(nic, index))
++#define efhw_nic_interrupt_disable(nic) \
++      ((nic)->efhw_func->interrupt_disable(nic))
+-#define efhw_nic_set_interrupt_moderation(nic, index, val) \
+-      ((nic)->efhw_func->set_interrupt_moderation(nic, index, val))
++#define efhw_nic_set_interrupt_moderation(nic, val) \
++      ((nic)->efhw_func->set_interrupt_moderation(nic, val))
+ /*-------------- Event support  ------------ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h
+--- a/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -197,7 +197,7 @@
+ };
+ static inline void
+-falcon_write_ddd_d(efhw_ioaddr_t kva,
++falcon_write_ddd_d(volatile char __iomem *kva,
+                  uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3)
+ {
+       writel(d0, kva + 0);
+@@ -207,7 +207,7 @@
+       writel(d3, kva + 12);
+ }
+-static inline void falcon_write_q(efhw_ioaddr_t kva, uint64_t q)
++static inline void falcon_write_q(volatile char __iomem *kva, uint64_t q)
+ {
+       union __u64to32 u;
+       u.u64 = q;
+@@ -217,7 +217,7 @@
+       writel(u.s.b, kva + 4);
+ }
+-static inline void falcon_read_q(efhw_ioaddr_t addr, uint64_t *q0)
++static inline void falcon_read_q(volatile char __iomem *addr, uint64_t *q0)
+ {
+       /* It is essential that we read dword0 first, so that
+        * the shadow register is updated with the latest value
+@@ -232,14 +232,14 @@
+ }
+ static inline void
+-falcon_write_qq(efhw_ioaddr_t kva, uint64_t q0, uint64_t q1)
++falcon_write_qq(volatile char __iomem *kva, uint64_t q0, uint64_t q1)
+ {
+       writeq(q0, kva + 0);
+       falcon_write_q(kva + 8, q1);
+ }
+ static inline void
+-falcon_read_qq(efhw_ioaddr_t addr, uint64_t *q0, uint64_t *q1)
++falcon_read_qq(volatile char __iomem *addr, uint64_t *q0, uint64_t *q1)
+ {
+       falcon_read_q(addr, q0);
+       *q1 = readq(addr + 8);
+@@ -390,9 +390,6 @@
+ /* Falcon nails down the event queue mappings */
+ #define FALCON_EVQ_KERNEL0   (0)      /* hardwired for net driver */
+ #define FALCON_EVQ_CHAR      (4)      /* char driver's event queue      */
+-#define FALCON_EVQ_NONIRQ    (5)      /* char driver's non interrupting
+-                                         queue. Subsequent queues are
+-                                         available for user apps */
+ /* reserved by the drivers */
+ #define FALCON_EVQ_TBL_RESERVED          (8)
+@@ -411,7 +408,8 @@
+  *
+  *---------------------------------------------------------------------------*/
+-static inline void falcon_deadbeef(efhw_ioaddr_t efhw_kva, unsigned what)
++static inline void
++falcon_deadbeef(volatile char __iomem *efhw_kva, unsigned what)
+ {
+       writel(what, efhw_kva + 0x300);
+       mmiowb();
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
+--- a/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h Tue Mar 31 11:59:10 2009 +0100
+@@ -190,8 +190,6 @@
+ /*! Constants for the type field in efx_vi_hw_resource */
+ #define EFX_VI_HW_RESOURCE_TXDMAQ    0x0      /* PFN of TX DMA Q */
+ #define EFX_VI_HW_RESOURCE_RXDMAQ    0x1      /* PFN of RX DMA Q */
+-#define EFX_VI_HW_RESOURCE_TXBELL    0x2      /* PFN of TX Doorbell (EF1) */
+-#define EFX_VI_HW_RESOURCE_RXBELL    0x3      /* PFN of RX Doorbell (EF1) */
+ #define EFX_VI_HW_RESOURCE_EVQTIMER  0x4      /* Address of event q timer */
+ /* Address of event q pointer (EF1) */
+@@ -229,7 +227,6 @@
+  * Metadata concerning the list of hardware resource mappings
+  */
+ struct efx_vi_hw_resource_metadata {
+-      int version;
+       int evq_order;
+       int evq_offs;
+       int evq_capacity;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h
+--- a/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h Tue Mar 31 11:59:10 2009 +0100
+@@ -38,12 +38,6 @@
+ #ifndef __CI_DRIVER_RESOURCE_LINUX_RESOURCE__
+ #define __CI_DRIVER_RESOURCE_LINUX_RESOURCE__
+-#ifndef __linux__
+-# error Silly
+-#endif
+-#ifndef __KERNEL__
+-# error Silly
+-#endif
+ #include <ci/efhw/efhw_types.h>
+ #include <linux/interrupt.h>
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/common.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/common.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -56,10 +56,6 @@
+               uint32_t a;
+               uint32_t b;
+       } opaque;
+-      struct {
+-              uint32_t code;
+-              uint32_t status;
+-      } ev1002;
+ } efhw_event_t;
+ /* Flags for TX/RX queues */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -52,7 +52,7 @@
+ /* Linux kernel also does not provide PRIx32... Sigh. */
+ #define PRIx32 "x"
+-
++ 
+ #ifdef __ia64__
+ # define PRIx64 "lx"
+ #else
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h        Tue Mar 31 11:59:10 2009 +0100
+@@ -45,14 +45,6 @@
+ /*--------------------------------------------------------------------
+  *
+- * hardware limits used in the types
+- *
+- *--------------------------------------------------------------------*/
+-
+-#define EFHW_KEVENTQ_MAX    8
+-
+-/*--------------------------------------------------------------------
+- *
+  * forward type declarations
+  *
+  *--------------------------------------------------------------------*/
+@@ -72,7 +64,7 @@
+ struct eventq_resource_hardware {
+       /*!iobuffer allocated for eventq - can be larger than eventq */
+-      efhw_iopages_t iobuff;
++      struct efhw_iopages iobuff;
+       unsigned iobuff_off;
+       struct efhw_buffer_table_allocation buf_tbl_alloc;
+       int capacity;           /*!< capacity of event queue */
+@@ -85,7 +77,7 @@
+  *--------------------------------------------------------------------*/
+ struct efhw_keventq {
+-      volatile int lock;
++      int lock;
+       caddr_t evq_base;
+       int32_t evq_ptr;
+       uint32_t evq_mask;
+@@ -115,7 +107,7 @@
+       /*! initialise all hardware functional units */
+       int (*init_hardware) (struct efhw_nic *nic,
+                             struct efhw_ev_handler *,
+-                            const uint8_t *mac_addr);
++                            const uint8_t *mac_addr, int non_irq_evq);
+   /*-------------- Interrupt support  ------------ */
+@@ -130,17 +122,17 @@
+        */
+       int (*interrupt) (struct efhw_nic *nic);
+-      /*! Enable given interrupt mask for the given IRQ unit */
+-      void (*interrupt_enable) (struct efhw_nic *nic, uint idx);
++      /*! Enable the interrupt */
++      void (*interrupt_enable) (struct efhw_nic *nic);
+-      /*! Disable given interrupt mask for the given IRQ unit */
+-      void (*interrupt_disable) (struct efhw_nic *nic, uint idx);
++      /*! Disable the interrupt */
++      void (*interrupt_disable) (struct efhw_nic *nic);
+       /*! Set interrupt moderation strategy for the given IRQ unit
+        ** val is in usec
+        */
+       void (*set_interrupt_moderation)(struct efhw_nic *nic,
+-                                       uint idx, uint val);
++                                       uint val);
+   /*-------------- Event support  ------------ */
+@@ -255,8 +247,8 @@
+ /*! */
+ struct efhw_nic {
+-      /*! zero base index in efrm_nic_table.nic array */
+-      volatile int index;
++      /*! zero base index in efrm_nic_tablep->nic array */
++      int index;
+       int ifindex;            /*!< OS level nic index */
+ #ifdef HAS_NET_NAMESPACE
+       struct net *nd_net;
+@@ -283,7 +275,7 @@
+       /* hardware resources */
+       /*! I/O address of the start of the bar */
+-      efhw_ioaddr_t bar_ioaddr;
++      volatile char __iomem *bar_ioaddr;
+       /*! Bar number of control aperture. */
+       unsigned ctr_ap_bar;
+@@ -312,14 +304,17 @@
+       void (*irq_handler) (struct efhw_nic *, int unit);
+       /*! event queues per driver */
+-      struct efhw_keventq evq[EFHW_KEVENTQ_MAX];
++      struct efhw_keventq interrupting_evq;
+ /* for marking when we are not using an IRQ unit
+       - 0 is a valid offset to an IRQ unit on EF1! */
+ #define EFHW_IRQ_UNIT_UNUSED  0xffff
+-      /*! interrupt unit in use  */
+-      unsigned int irq_unit[EFHW_KEVENTQ_MAX];
+-      efhw_iopage_t irq_iobuff;       /*!<  Falcon SYSERR interrupt */
++      /*! interrupt unit in use for the interrupting event queue  */
++      unsigned int irq_unit;
++
++      struct efhw_keventq non_interrupting_evq;
++
++      struct efhw_iopage irq_iobuff;  /*!<  Falcon SYSERR interrupt */
+       /* The new driverlink infrastructure. */
+       struct efx_dl_device *net_driver_dev;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/eventq.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -47,10 +47,9 @@
+ /*! Callbacks for handling events. */
+ struct efhw_ev_handler {
+-      void (*wakeup_fn)(struct efhw_nic *nic, efhw_event_t *ev);
+-      void (*timeout_fn)(struct efhw_nic *nic, efhw_event_t *ev);
+-      void (*sw_fn)(struct efhw_nic *nic, efhw_event_t *ev);
+-      void (*dmaq_flushed_fn) (struct efhw_nic *, int, int);
++      void (*wakeup_fn)(struct efhw_nic *nic, unsigned);
++      void (*timeout_fn)(struct efhw_nic *nic, unsigned);
++      void (*dmaq_flushed_fn) (struct efhw_nic *, unsigned, int);
+ };
+ extern int efhw_keventq_ctor(struct efhw_nic *, int instance,
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/falcon.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -71,11 +71,6 @@
+ falcon_handle_char_event(struct efhw_nic *nic,
+                        struct efhw_ev_handler *h, efhw_event_t *evp);
+-/*! map event queue instance space (0,1,2,..) onto event queue
+-  number. This function takes into account the allocation rules for
+-  the underlying driver model */
+-extern int falcon_idx_to_evq(struct efhw_nic *nic, uint idx);
+-
+ /*! Acknowledge to HW that processing is complete on a given event queue */
+ extern void falcon_nic_evq_ack(struct efhw_nic *nic, uint evq,        /* evq id */
+                              uint rptr,       /* new read pointer update */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -50,6 +50,10 @@
+ #error Unknown endianness
+ #endif
++#ifndef __iomem
++#define __iomem
++#endif
++
+ #ifndef mmiowb
+       #if defined(__i386__) || defined(__x86_64__)
+               #define mmiowb()
+@@ -63,10 +67,8 @@
+       #endif
+ #endif
+-typedef char *efhw_ioaddr_t;
+-
+ #ifndef readq
+-static inline uint64_t __readq(void __iomem *addr)
++static inline uint64_t __readq(volatile void __iomem *addr)
+ {
+       return *(volatile uint64_t *)addr;
+ }
+@@ -74,7 +76,7 @@
+ #endif
+ #ifndef writeq
+-static inline void __writeq(uint64_t v, void __iomem *addr)
++static inline void __writeq(uint64_t v, volatile void __iomem *addr)
+ {
+       *(volatile uint64_t *)addr = v;
+ }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/iopage.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -48,11 +48,11 @@
+  *
+  *--------------------------------------------------------------------*/
+-extern int efhw_iopage_alloc(struct efhw_nic *, efhw_iopage_t *p);
+-extern void efhw_iopage_free(struct efhw_nic *, efhw_iopage_t *p);
++extern int efhw_iopage_alloc(struct efhw_nic *, struct efhw_iopage *p);
++extern void efhw_iopage_free(struct efhw_nic *, struct efhw_iopage *p);
+-extern int efhw_iopages_alloc(struct efhw_nic *, efhw_iopages_t *p,
++extern int efhw_iopages_alloc(struct efhw_nic *, struct efhw_iopages *p,
+                             unsigned order);
+-extern void efhw_iopages_free(struct efhw_nic *, efhw_iopages_t *p);
++extern void efhw_iopages_free(struct efhw_nic *, struct efhw_iopages *p);
+ #endif /* __CI_DRIVER_RESOURCE_IOPAGE_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -3,7 +3,8 @@
+  *          resource management for Xen backend, OpenOnload, etc
+  *           (including support for SFE4001 10GBT NIC)
+  *
+- * This file provides efhw_page_t and efhw_iopage_t for Linux kernel.
++ * This file provides struct efhw_page and struct efhw_iopage for Linux
++ * kernel.
+  *
+  * Copyright 2005-2007: Solarflare Communications Inc,
+  *                      9501 Jeronimo Road, Suite 250,
+@@ -38,77 +39,83 @@
+ #ifndef __CI_EFHW_IOPAGE_LINUX_H__
+ #define __CI_EFHW_IOPAGE_LINUX_H__
++#include <linux/version.h>
+ #include <linux/gfp.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ #include <linux/hardirq.h>
++#else
++#include <asm/hardirq.h>
++#endif
++#include <linux/errno.h>
+ #include <ci/efhw/debug.h>
+ /*--------------------------------------------------------------------
+  *
+- * efhw_page_t: A single page of memory.  Directly mapped in the driver,
+- * and can be mapped to userlevel.
++ * struct efhw_page: A single page of memory.  Directly mapped in the
++ * driver, and can be mapped to userlevel.
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
++struct efhw_page {
+       unsigned long kva;
+-} efhw_page_t;
++};
+-static inline int efhw_page_alloc(efhw_page_t *p)
++static inline int efhw_page_alloc(struct efhw_page *p)
+ {
+       p->kva = __get_free_page(in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
+       return p->kva ? 0 : -ENOMEM;
+ }
+-static inline int efhw_page_alloc_zeroed(efhw_page_t *p)
++static inline int efhw_page_alloc_zeroed(struct efhw_page *p)
+ {
+       p->kva = get_zeroed_page(in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
+       return p->kva ? 0 : -ENOMEM;
+ }
+-static inline void efhw_page_free(efhw_page_t *p)
++static inline void efhw_page_free(struct efhw_page *p)
+ {
+       free_page(p->kva);
+       EFHW_DO_DEBUG(memset(p, 0, sizeof(*p)));
+ }
+-static inline char *efhw_page_ptr(efhw_page_t *p)
++static inline char *efhw_page_ptr(struct efhw_page *p)
+ {
+       return (char *)p->kva;
+ }
+-static inline unsigned efhw_page_pfn(efhw_page_t *p)
++static inline unsigned efhw_page_pfn(struct efhw_page *p)
+ {
+       return (unsigned)(__pa(p->kva) >> PAGE_SHIFT);
+ }
+-static inline void efhw_page_mark_invalid(efhw_page_t *p)
++static inline void efhw_page_mark_invalid(struct efhw_page *p)
+ {
+       p->kva = 0;
+ }
+-static inline int efhw_page_is_valid(efhw_page_t *p)
++static inline int efhw_page_is_valid(struct efhw_page *p)
+ {
+       return p->kva != 0;
+ }
+-static inline void efhw_page_init_from_va(efhw_page_t *p, void *va)
++static inline void efhw_page_init_from_va(struct efhw_page *p, void *va)
+ {
+       p->kva = (unsigned long)va;
+ }
+ /*--------------------------------------------------------------------
+  *
+- * efhw_iopage_t: A single page of memory.  Directly mapped in the driver,
++ * struct efhw_iopage: A single page of memory.  Directly mapped in the driver,
+  * and can be mapped to userlevel.  Can also be accessed by the NIC.
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
+-      efhw_page_t p;
++struct efhw_iopage {
++      struct efhw_page p;
+       dma_addr_t dma_addr;
+-} efhw_iopage_t;
++};
+-static inline dma_addr_t efhw_iopage_dma_addr(efhw_iopage_t *p)
++static inline dma_addr_t efhw_iopage_dma_addr(struct efhw_iopage *p)
+ {
+       return p->dma_addr;
+ }
+@@ -120,9 +127,9 @@
+ /*--------------------------------------------------------------------
+  *
+- * efhw_iopages_t: A set of pages that are contiguous in physical memory.
+- * Directly mapped in the driver, and can be mapped to userlevel.  Can also
+- * be accessed by the NIC.
++ * struct efhw_iopages: A set of pages that are contiguous in physical
++ * memory.  Directly mapped in the driver, and can be mapped to userlevel.
++ * Can also be accessed by the NIC.
+  *
+  * NB. The O/S may be unwilling to allocate many, or even any of these.  So
+  * only use this type where the NIC really needs a physically contiguous
+@@ -130,44 +137,44 @@
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
++struct efhw_iopages {
+       caddr_t kva;
+       unsigned order;
+       dma_addr_t dma_addr;
+-} efhw_iopages_t;
++};
+-static inline caddr_t efhw_iopages_ptr(efhw_iopages_t *p)
++static inline caddr_t efhw_iopages_ptr(struct efhw_iopages *p)
+ {
+       return p->kva;
+ }
+-static inline unsigned efhw_iopages_pfn(efhw_iopages_t *p)
++static inline unsigned efhw_iopages_pfn(struct efhw_iopages *p)
+ {
+       return (unsigned)(__pa(p->kva) >> PAGE_SHIFT);
+ }
+-static inline dma_addr_t efhw_iopages_dma_addr(efhw_iopages_t *p)
++static inline dma_addr_t efhw_iopages_dma_addr(struct efhw_iopages *p)
+ {
+       return p->dma_addr;
+ }
+-static inline unsigned efhw_iopages_size(efhw_iopages_t *p)
++static inline unsigned efhw_iopages_size(struct efhw_iopages *p)
+ {
+       return 1u << (p->order + PAGE_SHIFT);
+ }
+-/* efhw_iopage_t <-> efhw_iopages_t conversions for handling physically
+- * contiguous allocations in iobufsets for iSCSI.  This allows the
+- * essential information about contiguous allocations from
+- * efhw_iopages_alloc() to be saved away in the efhw_iopage_t array in an
+- * iobufset.  (Changing the iobufset resource to use a union type would
++/* struct efhw_iopage <-> struct efhw_iopages conversions for handling
++ * physically contiguous allocations in iobufsets for iSCSI.  This allows
++ * the essential information about contiguous allocations from
++ * efhw_iopages_alloc() to be saved away in the struct efhw_iopage array in
++ * an iobufset.  (Changing the iobufset resource to use a union type would
+  * involve a lot of code changes, and make the iobufset's metadata larger
+  * which could be bad as it's supposed to fit into a single page on some
+  * platforms.)
+  */
+ static inline void
+-efhw_iopage_init_from_iopages(efhw_iopage_t *iopage,
+-                          efhw_iopages_t *iopages, unsigned pageno)
++efhw_iopage_init_from_iopages(struct efhw_iopage *iopage,
++                            struct efhw_iopages *iopages, unsigned pageno)
+ {
+       iopage->p.kva = ((unsigned long)efhw_iopages_ptr(iopages))
+           + (pageno * PAGE_SIZE);
+@@ -176,8 +183,8 @@
+ }
+ static inline void
+-efhw_iopages_init_from_iopage(efhw_iopages_t *iopages,
+-                          efhw_iopage_t *iopage, unsigned order)
++efhw_iopages_init_from_iopage(struct efhw_iopages *iopages,
++                            struct efhw_iopage *iopage, unsigned order)
+ {
+       iopages->kva = (caddr_t) efhw_iopage_ptr(iopage);
+       EFHW_ASSERT(iopages->kva);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -69,16 +69,16 @@
+  *--------------------------------------------------------------------*/
+ struct vi_resource_dimensions {
+-      unsigned evq_int_min, evq_int_max;
+-      unsigned evq_timer_min, evq_timer_max;
+-      unsigned rxq_min, rxq_max;
+-      unsigned txq_min, txq_max;
++      unsigned evq_int_min, evq_int_lim;
++      unsigned evq_timer_min, evq_timer_lim;
++      unsigned rxq_min, rxq_lim;
++      unsigned txq_min, txq_lim;
+ };
+ /*! Initialise resources */
+ extern int
+ efrm_resources_init(const struct vi_resource_dimensions *,
+-                  int buffer_table_min, int buffer_table_max);
++                  int buffer_table_min, int buffer_table_lim);
+ /*! Tear down resources */
+ extern void efrm_resources_fini(void);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h  Tue Mar 31 11:59:10 2009 +0100
+@@ -55,7 +55,7 @@
+       unsigned int n_bufs;
+       unsigned int pages_per_contiguous_chunk;
+       unsigned order;
+-      efhw_iopage_t bufs[1];
++      struct efhw_iopage bufs[1];
+       /*!< up to n_bufs can follow this, so this must be the last member */
+ };
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h Tue Mar 31 11:59:10 2009 +0100
+@@ -62,21 +62,21 @@
+ };
+ /* Resource driver structures used by other drivers as well */
+-extern struct efrm_nic_table efrm_nic_table;
++extern struct efrm_nic_table *efrm_nic_tablep;
+ static inline void efrm_nic_table_hold(void)
+ {
+-      atomic_inc(&efrm_nic_table.ref_count);
++      atomic_inc(&efrm_nic_tablep->ref_count);
+ }
+ static inline void efrm_nic_table_rele(void)
+ {
+-      atomic_dec(&efrm_nic_table.ref_count);
++      atomic_dec(&efrm_nic_tablep->ref_count);
+ }
+ static inline int efrm_nic_table_held(void)
+ {
+-      return (atomic_read(&efrm_nic_table.ref_count) != 0);
++      return (atomic_read(&efrm_nic_tablep->ref_count) != 0);
+ }
+ /* Run code block _x multiple times with variable nic set to each
+@@ -86,13 +86,13 @@
+       for ((_nic_i) = (efrm_nic_table_hold(), 0);                     \
+            (_nic_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0); \
+            (_nic_i)++)                                                \
+-              if (((_nic) = efrm_nic_table.nic[_nic_i]))
++              if (((_nic) = efrm_nic_tablep->nic[_nic_i]))
+ #define EFRM_FOR_EACH_NIC_IN_SET(_set, _i, _nic)                      \
+       for ((_i) = (efrm_nic_table_hold(), 0);                         \
+            (_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0);     \
+            ++(_i))                                                    \
+-              if (((_nic) = efrm_nic_table.nic[_i]) &&                \
++              if (((_nic) = efrm_nic_tablep->nic[_i]) &&              \
+                   efrm_nic_set_read((_set), (_i)))
+ #endif /* __CI_EFRM_NIC_TABLE_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/private.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/private.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/private.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -93,7 +93,15 @@
+       unsigned int i;
+       struct kfifo *ids;
+       unsigned char *buffer;
++#ifndef TCP_CHIMNEY_SUPPORT
+       unsigned int size = roundup_pow_of_two((limit - base) * sizeof(int));
++#else
++        /* ### TODO - Linux kfifos really are a power of two, sysdep_ci2linux
++                      does ci_fifo2's, which only actually hold 2^n - 1.
++                      We need to double buffer size, not add one, because
++                      ci_fifo2 can only be a power of two. */
++      unsigned int size = roundup_pow_of_two((limit - base) * 2 * sizeof(int));
++#endif
+       EFRM_ASSERT(base <= limit);
+       buffer = vmalloc(size);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h       Tue Mar 31 11:59:10 2009 +0100
+@@ -48,7 +48,7 @@
+  * level.
+  ***********************************************************************/
+-typedef struct efrm_resource_handle_s {
++typedef struct {
+       uint32_t handle;
+ } efrm_resource_handle_t;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -41,14 +41,8 @@
+ /* Spinlocks are defined in efhw/sysdep.h */
+ #include <ci/efhw/sysdep.h>
+-#if defined(__linux__) && defined(__KERNEL__)
+ # include <ci/efrm/sysdep_linux.h>
+-#else
+-
+-# include <ci/efrm/sysdep_ci2linux.h>
+-
+-#endif
+ #endif /* __CI_EFRM_SYSDEP_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -50,7 +50,11 @@
+ #include <linux/workqueue.h>
+ #include <linux/gfp.h>
+ #include <linux/slab.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ #include <linux/hardirq.h>
++#else
++#include <asm/hardirq.h>
++#endif
+ #include <linux/kernel.h>
+ #include <linux/if_ether.h>
+ #include <linux/completion.h>
+@@ -60,6 +64,21 @@
+ /* get roundup_pow_of_two(), which was in kernel.h in early kernel versions */
+ #include <linux/log2.h>
+ #endif
++
++
++/********************************************************************
++ *
++ * Utility functions
++ *
++ ********************************************************************/
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
++static inline unsigned long __attribute_const__ roundup_pow_of_two(unsigned long x)
++{
++        return (1UL << fls(x - 1));
++}
++#endif
++
+ /********************************************************************
+  *
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h       Tue Mar 31 11:59:10 2009 +0100
+@@ -168,4 +168,12 @@
+ uint32_t efrm_vi_rm_evq_bytes(struct vi_resource *virs
+                             /*,struct efhw_nic *nic */ );
++
++/* Fill [out_vi_data] with information required to allow a VI to be init'd.
++ * [out_vi_data] must ref at least VI_MAPPINGS_SIZE bytes.
++ */
++extern void efrm_vi_resource_mappings(struct vi_resource*, int nic_i,
++                                      void* out_vi_data);
++
++
+ #endif /* __CI_EFRM_VI_RESOURCE_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h       Tue Mar 31 11:59:10 2009 +0100
+@@ -67,11 +67,7 @@
+       struct vi_resource *evq_virs;
+ };
+-#ifdef __ci_ul_driver__
+-#define EFRM_VI_USE_WORKQUEUE 0
+-#else
+ #define EFRM_VI_USE_WORKQUEUE 1
+-#endif
+ /*! Global information for the VI resource manager. */
+ struct vi_resource_manager {
+@@ -115,7 +111,7 @@
+ struct vi_resource_nic_info {
+       struct eventq_resource_hardware evq_pages;
+ #if defined(__CI_HARDWARE_CONFIG_FALCON__)
+-      efhw_iopages_t dmaq_pages[EFRM_VI_RM_DMA_QUEUE_COUNT];
++      struct efhw_iopages dmaq_pages[EFRM_VI_RM_DMA_QUEUE_COUNT];
+ #endif
+ };
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h
+--- a/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h       Tue Mar 31 11:59:10 2009 +0100
+@@ -70,14 +70,17 @@
+                                hw->iobuff_off);
+ }
+-/*! Wakeup handler, see efhw_ev_handler_t for prototype */
+-extern void efrm_handle_wakeup_event(struct efhw_nic *nic, efhw_event_t *ev);
++/*! Wakeup handler */
++extern void efrm_handle_wakeup_event(struct efhw_nic *nic, unsigned id);
+-/*! Timeout handler, see efhw_ev_handler_t for prototype */
+-extern void efrm_handle_timeout_event(struct efhw_nic *nic, efhw_event_t *ev);
++/*! Timeout handler */
++extern void efrm_handle_timeout_event(struct efhw_nic *nic, unsigned id);
+-/*! DMA flush handler, see efhw_ev_handler_t for prototype */
+-extern void efrm_handle_dmaq_flushed(struct efhw_nic *nic, int instance,
++/*! DMA flush handler */
++extern void efrm_handle_dmaq_flushed(struct efhw_nic *nic, unsigned id,
+                                  int rx_flush);
++/*! SRAM update handler */
++extern void efrm_handle_sram_event(struct efhw_nic *nic);
++
+ #endif /* __CI_EFRM_VI_RESOURCE_PRIVATE_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/driver_object.c
+--- a/drivers/net/sfc/sfc_resource/driver_object.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/driver_object.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -48,10 +48,10 @@
+ */
+ #define efrm_driver_lock(irqlock_state) \
+-      spin_lock_irqsave(&efrm_nic_table.lock, irqlock_state)
++      spin_lock_irqsave(&efrm_nic_tablep->lock, irqlock_state)
+ #define efrm_driver_unlock(irqlock_state)             \
+-      spin_unlock_irqrestore(&efrm_nic_table.lock,    \
++      spin_unlock_irqrestore(&efrm_nic_tablep->lock,  \
+                              irqlock_state);
+ /* These routines are all methods on the architecturally singleton
+@@ -63,8 +63,9 @@
+ */
+ /*! Exported driver state */
+-struct efrm_nic_table efrm_nic_table;
+-EXPORT_SYMBOL(efrm_nic_table);
++static struct efrm_nic_table efrm_nic_table;
++struct efrm_nic_table *efrm_nic_tablep;
++EXPORT_SYMBOL(efrm_nic_tablep);
+ /* Internal table with resource managers.
+  * We'd like to not export it, but we are still using efrm_rm_table
+@@ -75,10 +76,8 @@
+ int efrm_driver_ctor(void)
+ {
+-      memset(&efrm_nic_table, 0, sizeof(efrm_nic_table));
+-      memset(&efrm_rm_table, 0, sizeof(efrm_rm_table));
+-
+-      spin_lock_init(&efrm_nic_table.lock);
++        efrm_nic_tablep = &efrm_nic_table;
++      spin_lock_init(&efrm_nic_tablep->lock);
+       EFRM_TRACE("%s: driver created", __FUNCTION__);
+       return 0;
+@@ -88,7 +87,10 @@
+ {
+       EFRM_ASSERT(!efrm_nic_table_held());
+-      spin_lock_destroy(&efrm_nic_table.lock);
++      spin_lock_destroy(&efrm_nic_tablep->lock);
++      memset(&efrm_nic_table, 0, sizeof(efrm_nic_table));
++      memset(&efrm_rm_table, 0, sizeof(efrm_rm_table));
++
+       EFRM_TRACE("%s: driver deleted", __FUNCTION__);
+       return 0;
+ }
+@@ -108,21 +110,21 @@
+               goto done;
+       }
+-      if (efrm_nic_table.nic_count == EFHW_MAX_NR_DEVS) {
++      if (efrm_nic_tablep->nic_count == EFHW_MAX_NR_DEVS) {
+               EFRM_WARN("%s: filled up NIC table size %d", __FUNCTION__,
+                         EFHW_MAX_NR_DEVS);
+               rc = -E2BIG;
+               goto done;
+       }
+-      EFRM_ASSERT(efrm_nic_table.nic[nic_index] == NULL);
+-      efrm_nic_table.nic[nic_index] = nic;
++      EFRM_ASSERT(efrm_nic_tablep->nic[nic_index] == NULL);
++      efrm_nic_tablep->nic[nic_index] = nic;
+       nic->index = nic_index;
+-      if (efrm_nic_table.a_nic == NULL)
+-              efrm_nic_table.a_nic = nic;
++      if (efrm_nic_tablep->a_nic == NULL)
++              efrm_nic_tablep->a_nic = nic;
+-      efrm_nic_table.nic_count++;
++      efrm_nic_tablep->nic_count++;
+       efrm_driver_unlock(lock_flags);
+       return rc;
+@@ -147,24 +149,24 @@
+               goto done;
+       }
+-      EFRM_ASSERT(efrm_nic_table.nic[nic_index] == nic);
++      EFRM_ASSERT(efrm_nic_tablep->nic[nic_index] == nic);
+       nic->index = -1;
+-      efrm_nic_table.nic[nic_index] = NULL;
++      efrm_nic_tablep->nic[nic_index] = NULL;
+-      --efrm_nic_table.nic_count;
++      --efrm_nic_tablep->nic_count;
+-      if (efrm_nic_table.a_nic == nic) {
+-              if (efrm_nic_table.nic_count == 0) {
+-                      efrm_nic_table.a_nic = NULL;
++      if (efrm_nic_tablep->a_nic == nic) {
++              if (efrm_nic_tablep->nic_count == 0) {
++                      efrm_nic_tablep->a_nic = NULL;
+               } else {
+                       for (nic_index = 0; nic_index < EFHW_MAX_NR_DEVS;
+                            nic_index++) {
+-                              if (efrm_nic_table.nic[nic_index] != NULL)
+-                                      efrm_nic_table.a_nic =
+-                                          efrm_nic_table.nic[nic_index];
++                              if (efrm_nic_tablep->nic[nic_index] != NULL)
++                                      efrm_nic_tablep->a_nic =
++                                          efrm_nic_tablep->nic[nic_index];
+                       }
+-                      EFRM_ASSERT(efrm_nic_table.a_nic);
++                      EFRM_ASSERT(efrm_nic_tablep->a_nic);
+               }
+       }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/driverlink_new.c
+--- a/drivers/net/sfc/sfc_resource/driverlink_new.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/driverlink_new.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -66,21 +66,20 @@
+                           const struct efx_dl_falcon_resources *res)
+ {
+       rd->evq_timer_min = res->evq_timer_min;
+-      rd->evq_timer_max = res->evq_timer_max;
++      rd->evq_timer_lim = res->evq_timer_lim;
+       rd->evq_int_min = res->evq_int_min;
+-      rd->evq_int_max = res->evq_int_max;
++      rd->evq_int_lim = res->evq_int_lim;
+       rd->rxq_min = res->rxq_min;
+-      rd->rxq_max = res->rxq_max;
++      rd->rxq_lim = res->rxq_lim;
+       rd->txq_min = res->txq_min;
+-      rd->txq_max = res->txq_max;
++      rd->txq_lim = res->txq_lim;
+       EFRM_TRACE
+           ("Using evq_int(%d-%d) evq_timer(%d-%d) RXQ(%d-%d) TXQ(%d-%d)",
+-           res->evq_int_min, res->evq_int_max, res->evq_timer_min,
+-           res->evq_timer_max, res->rxq_min, res->rxq_max, res->txq_min,
+-           res->txq_max);
++           res->evq_int_min, res->evq_int_lim, res->evq_timer_min,
++           res->evq_timer_lim, res->rxq_min, res->rxq_lim, res->txq_min,
++           res->txq_lim);
+ }
+-#if defined(EFX_NOT_UPSTREAM)
+ /* We have a module parameter that can tell us to only load the char driver
+  * for 1 NIC (if there are multiple NICs in the system), and if so which one.
+  * This tells us the PCI bus and slot of the NIC to load for, or -1 to just
+@@ -98,7 +97,6 @@
+ MODULE_PARM_DESC(only_NIC,
+                "Initialise sfc_resource driver for one NIC only, "
+                "with specified PCI bus and slot");
+-#endif
+ static int
+ efrm_dl_probe(struct efx_dl_device *efrm_dev,
+@@ -112,16 +110,14 @@
+       struct pci_dev *dev;
+       struct efhw_nic *nic;
+       unsigned probe_flags = 0;
++      int non_irq_evq;
+       int rc;
+       efrm_dev->priv = NULL;
+-      efx_dl_for_each_device_info_matching(dev_info, EFX_DL_FALCON_RESOURCES,
+-                                           struct efx_dl_falcon_resources,
+-                                           hdr, res) {
+-              /* break out, leaving res pointing at the falcon resources */
+-              break;
+-      }
++      efx_dl_search_device_info(dev_info, EFX_DL_FALCON_RESOURCES,
++                                struct efx_dl_falcon_resources,
++                                hdr, res);
+       if (res == NULL) {
+               EFRM_ERR("%s: Unable to find falcon driverlink resources",
+@@ -132,24 +128,24 @@
+       if (res->flags & EFX_DL_FALCON_USE_MSI)
+               probe_flags |= NIC_FLAG_TRY_MSI;
++#if defined(EFX_NOT_UPSTREAM)
++      if (only_NIC != -1 &&
++          (efrm_dev->pci_dev->bus->number !=
++           ((only_NIC >> 8) & 0xFFFF)
++           || PCI_SLOT(efrm_dev->pci_dev->devfn) !=
++           (only_NIC & 0xFF))) {
++        EFRM_NOTICE("Hiding char device %x:%x",
++                    efrm_dev->pci_dev->bus->number,
++                    PCI_SLOT(efrm_dev->pci_dev->devfn));
++        return -ENODEV;
++      }
++#endif
++      
+       dev = efrm_dev->pci_dev;
+       if (res->flags & EFX_DL_FALCON_DUAL_FUNC) {
+               unsigned vendor = dev->vendor;
+               EFRM_ASSERT(dev->bus != NULL);
+               dev = NULL;
+-
+-#if defined(EFX_NOT_UPSTREAM)
+-              if (only_NIC != -1 &&
+-                  (efrm_dev->pci_dev->bus->number !=
+-                   ((only_NIC >> 8) & 0xFFFF)
+-                   || PCI_SLOT(efrm_dev->pci_dev->devfn) !=
+-                   (only_NIC & 0xFF))) {
+-                      EFRM_NOTICE("Hiding char device %x:%x",
+-                                  efrm_dev->pci_dev->bus->number,
+-                                  PCI_SLOT(efrm_dev->pci_dev->devfn));
+-                      return -ENODEV;
+-              }
+-#endif
+               while ((dev = pci_get_device(vendor, FALCON_S_DEVID, dev))
+                      != NULL) {
+@@ -174,10 +170,14 @@
+       init_vi_resource_dimensions(&res_dim, res);
++      EFRM_ASSERT(res_dim.evq_timer_lim > res_dim.evq_timer_min);
++      res_dim.evq_timer_lim--;
++      non_irq_evq = res_dim.evq_timer_lim;
++
+       rc = efrm_nic_add(dev, probe_flags, net_dev->dev_addr, &lnic,
+                         res->biu_lock,
+-                        res->buffer_table_min, res->buffer_table_max,
+-                        &res_dim);
++                        res->buffer_table_min, res->buffer_table_lim,
++                        non_irq_evq, &res_dim);
+       if (rc != 0)
+               return rc;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/efx_vi_shm.c
+--- a/drivers/net/sfc/sfc_resource/efx_vi_shm.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/efx_vi_shm.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -298,7 +298,7 @@
+               /* TODO do we need to get_page() here ? */
+               dma_addr = pci_map_page
+-                  (linux_efhw_nic(efrm_nic_table.nic[efx_state->nic_index])->
++                  (linux_efhw_nic(efrm_nic_tablep->nic[efx_state->nic_index])->
+                    pci_dev, pages[i], 0, PAGE_SIZE, PCI_DMA_TODEVICE);
+               efrm_buffer_table_set(&dm_state->bt_handle, i, dma_addr,
+@@ -399,7 +399,7 @@
+       for (i = 0; i < dm_state->n_pages; ++i)
+               pci_unmap_page(linux_efhw_nic
+-                      (efrm_nic_table.nic[efx_state->nic_index])->pci_dev,
++                      (efrm_nic_tablep->nic[efx_state->nic_index])->pci_dev,
+                       dm_state->dma_addrs[i], PAGE_SIZE, PCI_DMA_TODEVICE);
+       kfree(dm_state->dma_addrs);
+@@ -547,7 +547,7 @@
+ {
+       struct efx_vi_state *efx_state = vih;
+       int i, ni = efx_state->nic_index;
+-      struct linux_efhw_nic *lnic = linux_efhw_nic(efrm_nic_table.nic[ni]);
++      struct linux_efhw_nic *lnic = linux_efhw_nic(efrm_nic_tablep->nic[ni]);
+       unsigned long phys = lnic->ctr_ap_pci_addr;
+       struct efrm_resource *ep_res = &efx_state->vi_res->rs;
+       unsigned ep_mmap_bytes;
+@@ -555,11 +555,9 @@
+       if (*length < EFX_VI_HW_RESOURCE_MAXSIZE)
+               return -EINVAL;
+-      mdata->version = 0;
+-
+-      mdata->nic_arch = efrm_nic_table.nic[ni]->devtype.arch;
+-      mdata->nic_variant = efrm_nic_table.nic[ni]->devtype.variant;
+-      mdata->nic_revision = efrm_nic_table.nic[ni]->devtype.revision;
++      mdata->nic_arch = efrm_nic_tablep->nic[ni]->devtype.arch;
++      mdata->nic_variant = efrm_nic_tablep->nic[ni]->devtype.variant;
++      mdata->nic_revision = efrm_nic_tablep->nic[ni]->devtype.revision;
+       mdata->evq_order =
+           efx_state->vi_res->nic_info[ni].evq_pages.iobuff.order;
+@@ -634,9 +632,6 @@
+               (unsigned long)efx_state->vi_res->nic_info[ni].
+                       dmaq_pages[EFRM_VI_RM_DMA_QUEUE_RX].kva;
+-      /* NB EFX_VI_HW_RESOURCE_TXBELL not used on Falcon */
+-      /* NB EFX_VI_HW_RESOURCE_RXBELL not used on Falcon */
+-
+       i++;
+       hw_res_array[i].type = EFX_VI_HW_RESOURCE_EVQTIMER;
+       hw_res_array[i].mem_type = EFX_VI_HW_RESOURCE_PERIPHERAL;
+@@ -648,7 +643,7 @@
+       /* NB EFX_VI_HW_RESOURCE_EVQPTR not used on Falcon */
+       i++;
+-      switch (efrm_nic_table.nic[ni]->devtype.variant) {
++      switch (efrm_nic_tablep->nic[ni]->devtype.variant) {
+       case 'A':
+               hw_res_array[i].type = EFX_VI_HW_RESOURCE_EVQRPTR;
+               hw_res_array[i].mem_type = EFX_VI_HW_RESOURCE_PERIPHERAL;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/eventq.c
+--- a/drivers/net/sfc/sfc_resource/eventq.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/eventq.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -170,7 +170,7 @@
+ efhw_handle_rxdmaq_flushed(struct efhw_nic *nic, struct efhw_ev_handler *h,
+                          efhw_event_t *evp)
+ {
+-      int instance = (int)FALCON_EVENT_RX_FLUSH_Q_ID(evp);
++      unsigned instance = (unsigned)FALCON_EVENT_RX_FLUSH_Q_ID(evp);
+       EFHW_TRACE("%s: instance=%d", __FUNCTION__, instance);
+       if (!h->dmaq_flushed_fn) {
+@@ -185,24 +185,28 @@
+ efhw_handle_wakeup_event(struct efhw_nic *nic, struct efhw_ev_handler *h,
+                        efhw_event_t *evp)
+ {
++      unsigned instance = (unsigned)FALCON_EVENT_WAKE_EVQ_ID(evp);
++
+       if (!h->wakeup_fn) {
+               EFHW_WARN("%s: no handler registered", __FUNCTION__);
+               return;
+       }
+-      h->wakeup_fn(nic, evp);
++      h->wakeup_fn(nic, instance);
+ }
+ void
+ efhw_handle_timeout_event(struct efhw_nic *nic, struct efhw_ev_handler *h,
+                         efhw_event_t *evp)
+ {
++      unsigned instance = (unsigned)FALCON_EVENT_WAKE_EVQ_ID(evp);
++
+       if (!h->timeout_fn) {
+               EFHW_WARN("%s: no handler registered", __FUNCTION__);
+               return;
+       }
+-      h->timeout_fn(nic, evp);
++      h->timeout_fn(nic, instance);
+ }
+ /**********************************************************************
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/falcon.c
+--- a/drivers/net/sfc/sfc_resource/falcon.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/falcon.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -45,14 +45,11 @@
+  *
+  *---------------------------------------------------------------------------*/
+-/* on for debug builds */
+-#ifndef NDEBUG
+-#  define FALCON_FULL_FILTER_CACHE 1  /* complete SW shadow of filter tbl */
+-#  define FALCON_VERIFY_FILTERS    0
+-#else /* Also adds duplicate filter check */
+-#  define FALCON_FULL_FILTER_CACHE 1  /* keep this on for some security */
+-#  define FALCON_VERIFY_FILTERS    0
+-#endif
++/* Keep a software copy of the filter table and check for duplicates. */
++#define FALCON_FULL_FILTER_CACHE 1
++
++/* Read filters back from the hardware to detect corruption. */
++#define FALCON_VERIFY_FILTERS    0
+ /* options */
+ #define RX_FILTER_CTL_SRCH_LIMIT_TCP_FULL 8   /* default search limit */
+@@ -73,11 +70,7 @@
+  *
+  *---------------------------------------------------------------------------*/
+-#ifndef __KERNEL__
+-#define _DEBUG_SYM_ extern
+-#else
+ #define _DEBUG_SYM_ static inline
+-#endif
+  /*----------------------------------------------------------------------------
+   *
+@@ -208,6 +201,7 @@
+               EFHW_ASSERT(!rss_b0);
+               break;
+       case 'B':
++      case 'C':
+               v4 |= scat_b0 << __DW4(SCATTER_EN_1_B0_LBN);
+               v4 |= rss_b0 << __DW4(RSS_EN_1_B0_LBN);
+               break;
+@@ -407,7 +401,7 @@
+       uint index, desc_type;
+       uint64_t val1, val2, val3;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* Q attributes */
+       int iscsi_hdig_en = ((flags & EFHW_VI_ISCSI_TX_HDIG_EN) != 0);
+@@ -471,6 +465,7 @@
+       switch (nic->devtype.variant) {
+       case 'B':
++      case 'C':
+               __DW3CHCK(TX_NON_IP_DROP_DIS_B0_LBN,
+                         TX_NON_IP_DROP_DIS_B0_WIDTH);
+               __DW3CHCK(TX_IP_CHKSM_DIS_B0_LBN, TX_IP_CHKSM_DIS_B0_WIDTH);
+@@ -523,7 +518,7 @@
+       uint i, desc_type = 1;
+       uint64_t val1, val2, val3;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* Q attributes */
+ #if BUG5762_WORKAROUND
+@@ -613,7 +608,7 @@
+       FALCON_LOCK_DECL;
+       uint64_t val1, val2, val3;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* initialise the TX descriptor queue pointer table */
+@@ -646,7 +641,7 @@
+       FALCON_LOCK_DECL;
+       uint64_t val1, val2, val3;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* initialise the TX descriptor queue pointer table */
+       offset = falcon_dma_rx_q_offset(nic, dmaq);
+@@ -749,8 +744,8 @@
+ {
+       /* programming the half table needs to be done in pairs. */
+       uint64_t entry, val, shift;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
+-      efhw_ioaddr_t offset;
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *offset;
+       EFHW_BUILD_ASSERT(BUF_ADR_HBUF_ODD_LBN == BUF_ADR_HBUF_EVEN_LBN + 32);
+       EFHW_BUILD_ASSERT(BUF_OWNER_ID_HBUF_ODD_LBN ==
+@@ -774,9 +769,9 @@
+       val &= ~(((uint64_t) 0xffffffff) << shift);
+       val |= (entry << shift);
+-      EFHW_TRACE("%s[%x]: " ci_dma_addr_fmt ":%x:%" PRIx64 "->%x = %"
+-                 PRIx64, __FUNCTION__, buffer_id, dma_addr, own_id, entry,
+-                 (unsigned)(offset - efhw_kva), val);
++      EFHW_TRACE("%s[%x]: %lx:%x:%" PRIx64 "->%x = %"
++                 PRIx64, __FUNCTION__, buffer_id, (unsigned long) dma_addr,
++                 own_id, entry, (unsigned)(offset - efhw_kva), val);
+       /* Falcon requires that access to this register is serialised */
+       falcon_write_q(offset, val);
+@@ -811,9 +806,9 @@
+                              dma_addr_t dma_addr, uint bufsz,
+                              uint region, int own_id, int buffer_id)
+ {
+-      efhw_ioaddr_t offset;
++      volatile char __iomem *offset;
+       uint64_t entry;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_ASSERT(region < FALCON_REGION_NUM);
+@@ -826,9 +821,9 @@
+       entry = falcon_nic_buffer_table_entry64_mk(dma_addr, bufsz, region,
+                                                  own_id);
+-      EFHW_TRACE("%s[%x]: " ci_dma_addr_fmt
+-                 ":bufsz=%x:region=%x:ownid=%x",
+-                 __FUNCTION__, buffer_id, dma_addr, bufsz, region, own_id);
++      EFHW_TRACE("%s[%x]: %lx:bufsz=%x:region=%x:ownid=%x",
++                 __FUNCTION__, buffer_id, (unsigned long) dma_addr, bufsz,
++                 region, own_id);
+       EFHW_TRACE("%s: BUF[%x]:NIC[%x]->%" PRIx64,
+                  __FUNCTION__, buffer_id,
+@@ -870,7 +865,7 @@
+ static inline void _falcon_nic_buffer_table_commit(struct efhw_nic *nic)
+ {
+       /* MUST be called holding the FALCON_LOCK */
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint64_t cmd;
+       EFHW_BUILD_ASSERT(BUF_TBL_UPD_REG_KER_OFST == BUF_TBL_UPD_REG_OFST);
+@@ -900,9 +895,9 @@
+       uint64_t cmd;
+       uint64_t start_id = buffer_id;
+       uint64_t end_id = buffer_id + num - 1;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+-      efhw_ioaddr_t offset = (efhw_kva + BUF_TBL_UPD_REG_OFST);
++      volatile char __iomem *offset = (efhw_kva + BUF_TBL_UPD_REG_OFST);
+       EFHW_BUILD_ASSERT(BUF_TBL_UPD_REG_KER_OFST == BUF_TBL_UPD_REG_OFST);
+@@ -962,12 +957,9 @@
+        * updates */
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_BUILD_ASSERT(SRM_UPD_EVQ_REG_OFST == SRM_UPD_EVQ_REG_KER_OFST);
+-
+-      EFHW_ASSERT((evq == FALCON_EVQ_KERNEL0) || (evq == FALCON_EVQ_CHAR) ||
+-                  (evq == FALCON_EVQ_NONIRQ));
+       __DWCHCK(SRM_UPD_EVQ_ID_LBN, SRM_UPD_EVQ_ID_WIDTH);
+       __RANGECHCK(evq, SRM_UPD_EVQ_ID_WIDTH);
+@@ -991,7 +983,7 @@
+       FALCON_LOCK_DECL;
+       uint i, val;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* size must be one of the various options, otherwise we assert */
+       for (i = 0; i < N_EVENTQ_SIZES; i++) {
+@@ -1045,7 +1037,7 @@
+ {
+       uint val;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_BUILD_ASSERT(FALCON_EVQ_CHAR == 4);
+@@ -1078,38 +1070,13 @@
+       mmiowb();
+ }
+-/*----------------------------------------------------------------------------
+- *
+- * Helper for evq mapping
+- *
+- * idx = 0 && char   => hw eventq[4]
+- * idx = 0 && net    => hw eventq[0]
+- *   0 < idx < 5     => hw eventq[idx]  (5 is non-interrupting)
+- *
+- *
+- *---------------------------------------------------------------------------*/
+-
+-int falcon_idx_to_evq(struct efhw_nic *nic, uint idx)
+-{
+-      EFHW_BUILD_ASSERT(FALCON_EVQ_CHAR == 4);
+-      EFHW_ASSERT(idx <= FALCON_EVQ_NONIRQ);
+-      return (idx > 0) ? idx : FALCON_EVQ_CHAR;
+-}
+-
+-static inline int falcon_evq_is_interrupting(struct efhw_nic *nic, uint idx)
+-{
+-      EFHW_BUILD_ASSERT(FALCON_EVQ_CHAR == 4);
+-      EFHW_ASSERT(idx <= FALCON_EVQ_NONIRQ);
+-
+-      /* only the first CHAR driver event queue is interrupting */
+-      return (idx == FALCON_EVQ_CHAR);
+-}
++/*---------------------------------------------------------------------------*/
+ static inline void
+ falcon_drv_ev(struct efhw_nic *nic, uint64_t data, uint qid)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       /* send an event from one driver to the other */
+       EFHW_BUILD_ASSERT(DRV_EV_REG_KER_OFST == DRV_EV_REG_OFST);
+@@ -1133,7 +1100,7 @@
+       FALCON_LOCK_DECL;
+       uint val;
+       ulong offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_BUILD_ASSERT(TIMER_VAL_LBN == 0);
+@@ -1184,7 +1151,7 @@
+          Pacing only available on the virtual interfaces
+        */
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       ulong offset;
+       if (pace > 20)
+@@ -1200,6 +1167,7 @@
+               offset += (dmaq - TX_PACE_TBL_FIRST_QUEUE_A1) * 16;
+               break;
+       case 'B':
++      case 'C':
+               /* Would be nice to assert this, but as dmaq is unsigned and
+                * TX_PACE_TBL_FIRST_QUEUE_B0 is 0, it makes no sense
+                * EFHW_ASSERT(dmaq >= TX_PACE_TBL_FIRST_QUEUE_B0);
+@@ -1232,8 +1200,8 @@
+ static void falcon_nic_handle_fatal_int(struct efhw_nic *nic)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *offset;
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint64_t val;
+       offset = (efhw_kva + FATAL_INTR_REG_OFST);
+@@ -1264,8 +1232,8 @@
+ {
+       FALCON_LOCK_DECL;
+       uint val;
+-      efhw_ioaddr_t offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *offset;
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_BUILD_ASSERT(DRV_INT_EN_CHAR_WIDTH == 1);
+@@ -1288,8 +1256,8 @@
+ static void falcon_nic_interrupt_hw_disable(struct efhw_nic *nic)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *offset;
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       EFHW_BUILD_ASSERT(SRAM_PERR_INT_KER_WIDTH == 1);
+       EFHW_BUILD_ASSERT(DRV_INT_EN_KER_LBN == 0);
+@@ -1312,13 +1280,12 @@
+       FALCON_LOCK_UNLOCK(nic);
+ }
+-#ifndef __ci_ul_driver__
+ static void falcon_nic_irq_addr_set(struct efhw_nic *nic, dma_addr_t dma_addr)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t offset;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *offset;
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       offset = (efhw_kva + INT_ADR_REG_CHAR_OFST);
+@@ -1332,7 +1299,6 @@
+       FALCON_LOCK_UNLOCK(nic);
+ }
+-#endif
+ /*--------------------------------------------------------------------
+@@ -1345,7 +1311,7 @@
+ falcon_nic_set_rx_usr_buf_size(struct efhw_nic *nic, int usr_buf_bytes)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint64_t val, val2, usr_buf_size = usr_buf_bytes / 32;
+       int rubs_lbn, rubs_width, roec_lbn;
+@@ -1361,6 +1327,7 @@
+               roec_lbn = RX_OWNERR_CTL_A1_LBN;
+               break;
+       case 'B':
++      case 'C':
+               rubs_lbn = RX_USR_BUF_SIZE_B0_LBN;
+               rubs_width = RX_USR_BUF_SIZE_B0_WIDTH;
+               roec_lbn = RX_OWNERR_CTL_B0_LBN;
+@@ -1392,7 +1359,7 @@
+                            uint32_t *tcp_wild,
+                            uint32_t *udp_full, uint32_t *udp_wild)
+ {
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       FALCON_LOCK_DECL;
+       uint64_t val;
+@@ -1420,7 +1387,7 @@
+                            uint32_t udp_full, uint32_t udp_wild)
+ {
+       uint64_t val, val2;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       FALCON_LOCK_DECL;
+       EFHW_ASSERT(tcp_full < nic->filter_tbl_size);
+@@ -1480,7 +1447,7 @@
+ _DEBUG_SYM_ void falcon_nic_tx_cfg(struct efhw_nic *nic, int unlocked)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint64_t val1, val2;
+       EFHW_BUILD_ASSERT(TX_CFG_REG_OFST == TX_CFG_REG_KER_OFST);
+@@ -1516,7 +1483,7 @@
+ static void falcon_nic_pace_cfg(struct efhw_nic *nic)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       unsigned offset = 0;
+       uint64_t val;
+@@ -1527,6 +1494,7 @@
+       switch (nic->devtype.variant) {
+       case 'A':  offset = TX_PACE_REG_A1_OFST;  break;
+       case 'B':  offset = TX_PACE_REG_B0_OFST;  break;
++      case 'C':  offset = TX_PACE_REG_B0_OFST;  break;
+       default:   EFHW_ASSERT(0);                break;
+       }
+       falcon_write_qq(efhw_kva + offset, val, 0);
+@@ -1697,15 +1665,6 @@
+  *
+  *---------------------------------------------------------------------------*/
+-#ifdef __ci_ul_driver__
+-
+-static int falcon_nic_init_irq_channel(struct efhw_nic *nic, int enable)
+-{
+-      EFHW_ERR("%s: not implemented for ul driver", __FUNCTION__);
+-      return -EOPNOTSUPP;
+-}
+-
+-#else
+ static int falcon_nic_init_irq_channel(struct efhw_nic *nic, int enable)
+ {
+@@ -1727,14 +1686,13 @@
+               falcon_nic_irq_addr_set(nic, 0);
+       }
+-      EFHW_TRACE("%s: " ci_dma_addr_fmt " %sable", __FUNCTION__,
+-                 efhw_iopage_dma_addr(&nic->irq_iobuff), enable ?
+-                      "en" : "dis");
++      EFHW_TRACE("%s: %lx %sable", __FUNCTION__,
++                 (unsigned long) efhw_iopage_dma_addr(&nic->irq_iobuff),
++                 enable ? "en" : "dis");
+       return 0;
+ }
+-#endif
+ static void falcon_nic_close_hardware(struct efhw_nic *nic)
+ {
+@@ -1747,14 +1705,10 @@
+       EFHW_NOTICE("%s:", __FUNCTION__);
+ }
+-#ifdef __ci_ul_driver__
+-extern
+-#else
+ static
+-#endif
+ int falcon_nic_get_mac_config(struct efhw_nic *nic)
+ {
+-      efhw_ioaddr_t efhw_kva = nic->bar_ioaddr;
++      volatile char __iomem *efhw_kva = nic->bar_ioaddr;
+       int is_mac_type_1g;
+       uint32_t strap, altera;
+       uint64_t rx_cfg, r;
+@@ -1811,6 +1765,23 @@
+               }
+ #endif
+               break;
++      case 'C':
++              /* Treat like B0 for now, but without the RX FIFO size check
++               * (don't need it, and RX_CFG_REG will likely change soon
++               * anyway).
++               */
++              is_mac_type_1g = (0 != (strap & 2));
++#if FALCON_MAC_SET_TYPE_BY_SPEED
++              /* Check the selected strap pins against the MAC speed -
++               * and adjust if necessary.
++               */
++              {
++                      int speed;
++                      speed = readl(efhw_kva + MAC0_CTRL_REG_OFST) & 0x3;
++                      is_mac_type_1g = (speed <= 2);
++              }
++#endif
++              break;
+       default:
+               EFHW_ASSERT(0);
+               is_mac_type_1g = 0;
+@@ -1834,7 +1805,7 @@
+ static int
+ falcon_nic_init_hardware(struct efhw_nic *nic,
+                        struct efhw_ev_handler *ev_handlers,
+-                       const uint8_t *mac_addr)
++                       const uint8_t *mac_addr, int non_irq_evq)
+ {
+       int rc;
+@@ -1868,7 +1839,7 @@
+          IFDEF FALCON's can be removed from
+          nic.c:efhw_nic_allocate_common_hardware_resources()
+        */
+-      nic->irq_unit[0] = INT_EN_REG_CHAR_OFST;
++      nic->irq_unit = INT_EN_REG_CHAR_OFST;
+       /*****************************************************************
+        * The rest of this function deals with initialization of the NICs
+@@ -1877,7 +1848,7 @@
+       /* char driver grabs SRM events onto the non interrupting
+        * event queue */
+-      falcon_nic_srm_upd_evq(nic, FALCON_EVQ_NONIRQ);
++      falcon_nic_srm_upd_evq(nic, non_irq_evq);
+       /* RXDP tweaks */
+@@ -1906,19 +1877,19 @@
+                                    RX_FILTER_CTL_SRCH_LIMIT_UDP_WILD);
+       if (!(nic->flags & NIC_FLAG_NO_INTERRUPT)) {
+-              rc = efhw_keventq_ctor(nic, FALCON_EVQ_CHAR, &nic->evq[0],
+-                                     ev_handlers);
++              rc = efhw_keventq_ctor(nic, FALCON_EVQ_CHAR,
++                                     &nic->interrupting_evq, ev_handlers);
+               if (rc < 0) {
+                       EFHW_ERR("%s: efhw_keventq_ctor() failed (%d) evq=%d",
+                                __FUNCTION__, rc, FALCON_EVQ_CHAR);
+                       return rc;
+               }
+       }
+-      rc = efhw_keventq_ctor(nic, FALCON_EVQ_NONIRQ,
+-                             &nic->evq[FALCON_EVQ_NONIRQ], NULL);
++      rc = efhw_keventq_ctor(nic, non_irq_evq,
++                             &nic->non_interrupting_evq, NULL);
+       if (rc < 0) {
+               EFHW_ERR("%s: efhw_keventq_ctor() failed (%d) evq=%d",
+-                       __FUNCTION__, rc, FALCON_EVQ_NONIRQ);
++                       __FUNCTION__, rc, non_irq_evq);
+               return rc;
+       }
+@@ -1938,11 +1909,12 @@
+  *--------------------------------------------------------------------*/
+ static void
+-falcon_nic_interrupt_enable(struct efhw_nic *nic, unsigned idx)
++falcon_nic_interrupt_enable(struct efhw_nic *nic)
+ {
+-      int evq;
++      struct efhw_keventq *q;
++      unsigned rdptr;
+-      if (idx || (nic->flags & NIC_FLAG_NO_INTERRUPT))
++      if (nic->flags & NIC_FLAG_NO_INTERRUPT)
+               return;
+       /* Enable driver interrupts */
+@@ -1950,32 +1922,26 @@
+       falcon_nic_interrupt_hw_enable(nic);
+       /* An interrupting eventq must start of day ack its read pointer */
+-      evq = falcon_idx_to_evq(nic, idx);
+-
+-      if (falcon_evq_is_interrupting(nic, evq)) {
+-              struct efhw_keventq *q = &nic->evq[idx];
+-              unsigned rdptr =
+-                  EFHW_EVENT_OFFSET(q, q, 1) / sizeof(efhw_event_t);
+-              falcon_nic_evq_ack(nic, evq, rdptr, false);
+-              EFHW_NOTICE("%s: ACK evq[%d]:%x", __FUNCTION__, evq, rdptr);
+-      }
++      q = &nic->interrupting_evq;
++      rdptr = EFHW_EVENT_OFFSET(q, q, 1) / sizeof(efhw_event_t);
++      falcon_nic_evq_ack(nic, FALCON_EVQ_CHAR, rdptr, false);
++      EFHW_NOTICE("%s: ACK evq[%d]:%x", __FUNCTION__,
++                  FALCON_EVQ_CHAR, rdptr);
+ }
+-static void falcon_nic_interrupt_disable(struct efhw_nic *nic, uint idx)
++static void falcon_nic_interrupt_disable(struct efhw_nic *nic)
+ {
+       /* NB. No need to check for NIC_FLAG_NO_INTERRUPT, as
+        ** falcon_nic_interrupt_hw_disable() will do it. */
+-      if (idx)
+-              return;
+       falcon_nic_interrupt_hw_disable(nic);
+ }
+ static void
+-falcon_nic_set_interrupt_moderation(struct efhw_nic *nic, uint idx,
++falcon_nic_set_interrupt_moderation(struct efhw_nic *nic,
+                                   uint32_t val)
+ {
+-      falcon_timer_cmd(nic, falcon_idx_to_evq(nic, idx),
+-                       TIMER_MODE_INT_HLDOFF, val / 5);
++      falcon_timer_cmd(nic, FALCON_EVQ_CHAR, TIMER_MODE_INT_HLDOFF,
++                       val / 5);
+ }
+ static inline void legacy_irq_ack(struct efhw_nic *nic)
+@@ -1992,7 +1958,7 @@
+ static int falcon_nic_interrupt(struct efhw_nic *nic)
+ {
+-      volatile uint32_t *syserr_ptr =
++      uint32_t *syserr_ptr =
+           (uint32_t *) efhw_iopage_ptr(&nic->irq_iobuff);
+       int handled = 0;
+       int done_ack = 0;
+@@ -2102,7 +2068,7 @@
+ void
+ falcon_nic_ipfilter_ctor(struct efhw_nic *nic)
+ {
+-      if (nic->devtype.variant == 'B' && nic->fpga_version)
++      if (nic->devtype.variant >= 'B' && nic->fpga_version)
+               nic->filter_tbl_size = 8 * 1024;
+       else
+               nic->filter_tbl_size = 16 * 1024;
+@@ -2276,10 +2242,6 @@
+ static inline void falcon_nic_buffer_table_lazy_commit(struct efhw_nic *nic)
+ {
+-#if defined(__ci_ul_driver__)
+-      if (!(nic->options & NIC_OPT_EFTEST))
+-              return;
+-#endif
+       /* Do nothing if operating in synchronous mode. */
+       if (!nic->irq_handler)
+@@ -2291,10 +2253,6 @@
+       FALCON_LOCK_DECL;
+       int count = 0, rc = 0;
+-#if defined(__ci_ul_driver__)
+-      if (!(nic->options & NIC_OPT_EFTEST))
+-              return;
+-#endif
+       /* We can be called here early days */
+       if (!nic->irq_handler)
+@@ -2316,9 +2274,9 @@
+                * upcalls into the core driver */
+               struct efhw_ev_handler handler;
+               memset(&handler, 0, sizeof(handler));
+-              nic->evq[FALCON_EVQ_NONIRQ].ev_handlers = &handler;
+-              rc = efhw_keventq_poll(nic, &nic->evq[FALCON_EVQ_NONIRQ]);
+-              nic->evq[FALCON_EVQ_NONIRQ].ev_handlers = NULL;
++              nic->non_interrupting_evq.ev_handlers = &handler;
++              rc = efhw_keventq_poll(nic, &nic->non_interrupting_evq);
++              nic->non_interrupting_evq.ev_handlers = NULL;
+               if (rc < 0) {
+                       EFHW_ERR("%s: poll ERROR (%d:%d) ***** ",
+@@ -2353,10 +2311,6 @@
+          an event or DMA queue */
+       FALCON_LOCK_DECL;
+-#if defined(__ci_ul_driver__)
+-      if (!(nic->options & NIC_OPT_EFTEST))
+-              return;
+-#endif
+       /* Do nothing if operating in synchronous mode. */
+       if (!nic->irq_handler)
+@@ -2463,7 +2417,7 @@
+       FALCON_LOCK_DECL;
+       uint64_t val_low64, val_high64;
+       uint64_t size, hwptr, swptr, val;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       ulong offset = falcon_dma_tx_q_offset(nic, dmaq);
+       /* Falcon requires 128 bit atomic access for this register */
+@@ -2500,7 +2454,7 @@
+ {
+       FALCON_LOCK_DECL;
+       uint64_t val_low64, val_high64;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       ulong offset = falcon_dma_tx_q_offset(nic, dmaq);
+       EFHW_WARN("Recovering stuck TXQ[%d]", dmaq);
+@@ -2523,7 +2477,7 @@
+ __falcon_really_flush_tx_dma_channel(struct efhw_nic *nic, uint dmaq)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint val;
+       EFHW_BUILD_ASSERT(TX_FLUSH_DESCQ_REG_KER_OFST ==
+@@ -2557,7 +2511,7 @@
+       FALCON_LOCK_DECL;
+       uint64_t val_low64, val_high64;
+       uint64_t enable, flush_pending;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       ulong offset = falcon_dma_tx_q_offset(nic, dmaq);
+       /* Falcon requires 128 bit atomic access for this register */
+@@ -2606,7 +2560,7 @@
+ __falcon_really_flush_rx_dma_channel(struct efhw_nic *nic, uint dmaq)
+ {
+       FALCON_LOCK_DECL;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       uint val;
+       EFHW_BUILD_ASSERT(RX_FLUSH_DESCQ_REG_KER_OFST ==
+@@ -2634,7 +2588,7 @@
+ {
+       FALCON_LOCK_DECL;
+       uint64_t val;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       ulong offset = falcon_dma_rx_q_offset(nic, dmaq);
+       /* Falcon requires 128 bit atomic access for this register */
+@@ -2678,17 +2632,13 @@
+       case TX_DESCQ_FLS_DONE_EV_DECODE:
+               EFHW_TRACE("TX[%d] flushed",
+                          (int)FALCON_EVENT_TX_FLUSH_Q_ID(ev));
+-#if !defined(__ci_ul_driver__)
+               efhw_handle_txdmaq_flushed(nic, h, ev);
+-#endif
+               break;
+       case RX_DESCQ_FLS_DONE_EV_DECODE:
+               EFHW_TRACE("RX[%d] flushed",
+                          (int)FALCON_EVENT_TX_FLUSH_Q_ID(ev));
+-#if !defined(__ci_ul_driver__)
+               efhw_handle_rxdmaq_flushed(nic, h, ev);
+-#endif
+               break;
+       case SRM_UPD_DONE_EV_DECODE:
+@@ -2698,16 +2648,16 @@
+               break;
+       case EVQ_INIT_DONE_EV_DECODE:
+-              EFHW_TRACE("EVQ INIT");
++              EFHW_TRACE("%sEVQ INIT", "");
+               break;
+       case WAKE_UP_EV_DECODE:
+-              EFHW_TRACE("WAKE UP");
++              EFHW_TRACE("%sWAKE UP", "");
+               efhw_handle_wakeup_event(nic, h, ev);
+               break;
+       case TIMER_EV_DECODE:
+-              EFHW_TRACE("TIMER");
++              EFHW_TRACE("%sTIMER", "");
+               efhw_handle_timeout_event(nic, h, ev);
+               break;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/falcon_mac.c
+--- a/drivers/net/sfc/sfc_resource/falcon_mac.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/falcon_mac.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -65,7 +65,7 @@
+ /*! Get MAC current address - i.e not necessarily the one in the EEPROM */
+ static inline void mentormac_get_mac_addr(struct efhw_nic *nic)
+ {
+-      efhw_ioaddr_t mac_kva;
++      volatile char __iomem *mac_kva;
+       uint val1, val2;
+       MENTOR_MAC_ASSERT_VALID();
+@@ -131,7 +131,7 @@
+ static inline void GDACT10mac_get_mac_addr(struct efhw_nic *nic)
+ {
+       uint val1, val2;
+-      efhw_ioaddr_t efhw_kva = EFHW_KVA(nic);
++      volatile char __iomem *efhw_kva = EFHW_KVA(nic);
+       FALCON_LOCK_DECL;
+       GDACT10_MAC_ASSERT_VALID();
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/filter_resource.c
+--- a/drivers/net/sfc/sfc_resource/filter_resource.c   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/filter_resource.c   Tue Mar 31 11:59:10 2009 +0100
+@@ -234,7 +234,7 @@
+       EFRM_ASSERT(frs);
+       EFRM_ASSERT(frs->pt);
+-      if (efrm_nic_table.a_nic->devtype.variant >= 'B') {
++      if (efrm_nic_tablep->a_nic->devtype.variant >= 'B') {
+               /* Scatter setting must match the setting for
+                * the corresponding RX queue */
+               if (!(frs->pt->flags & EFHW_VI_JUMBO_EN))
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/iobufset_resource.c
+--- a/drivers/net/sfc/sfc_resource/iobufset_resource.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/iobufset_resource.c Tue Mar 31 11:59:10 2009 +0100
+@@ -58,7 +58,7 @@
+ static inline size_t iobsrs_size(int no_pages)
+ {
+       return offsetof(struct iobufset_resource, bufs) +
+-          no_pages * sizeof(efhw_iopage_t);
++          no_pages * sizeof(struct efhw_iopage);
+ }
+ void efrm_iobufset_resource_free(struct iobufset_resource *rs)
+@@ -74,21 +74,21 @@
+               efrm_buffer_table_free(&rs->buf_tbl_alloc);
+       /* see comment on call to efhw_iopage_alloc in the alloc routine above
+-         for discussion on use of efrm_nic_table.a_nic here */
+-      EFRM_ASSERT(efrm_nic_table.a_nic);
++         for discussion on use of efrm_nic_tablep->a_nic here */
++      EFRM_ASSERT(efrm_nic_tablep->a_nic);
+       if (rs->order == 0) {
+               for (i = 0; i < rs->n_bufs; ++i)
+-                      efhw_iopage_free(efrm_nic_table.a_nic, &rs->bufs[i]);
++                      efhw_iopage_free(efrm_nic_tablep->a_nic, &rs->bufs[i]);
+       } else {
+               /* it is important that this is executed in increasing page
+                * order because some implementations of
+                * efhw_iopages_init_from_iopage() assume this */
+               for (i = 0; i < rs->n_bufs;
+                    i += rs->pages_per_contiguous_chunk) {
+-                      efhw_iopages_t iopages;
++                      struct efhw_iopages iopages;
+                       efhw_iopages_init_from_iopage(&iopages, &rs->bufs[i],
+                                                   rs->order);
+-                      efhw_iopages_free(efrm_nic_table.a_nic, &iopages);
++                      efhw_iopages_free(efrm_nic_tablep->a_nic, &iopages);
+               }
+       }
+@@ -126,7 +126,7 @@
+       EFRM_RESOURCE_ASSERT_VALID(&vi_evq->rs, 0);
+       EFRM_ASSERT(EFRM_RESOURCE_TYPE(vi_evq->rs.rs_handle) ==
+                   EFRM_RESOURCE_VI);
+-      EFRM_ASSERT(efrm_nic_table.a_nic);
++      EFRM_ASSERT(efrm_nic_tablep->a_nic);
+       /* allocate the resource data structure. */
+       object_size = iobsrs_size(n_pages);
+@@ -186,11 +186,11 @@
+                       /* due to bug2426 we have to specifiy a NIC when
+                        * allocating a DMAable page, which is a bit messy.
+                        * For now we assume that if the page is suitable
+-                       * (e.g. DMAable) by one nic (efrm_nic_table.a_nic),
++                       * (e.g. DMAable) by one nic (efrm_nic_tablep->a_nic),
+                        * it is suitable for all NICs.
+                        * XXX I bet that breaks in Solaris.
+                        */
+-                      rc = efhw_iopage_alloc(efrm_nic_table.a_nic,
++                      rc = efhw_iopage_alloc(efrm_nic_tablep->a_nic,
+                                            &iobrs->bufs[i]);
+                       if (rc < 0) {
+                               EFRM_ERR("%s: failed (rc %d) to allocate "
+@@ -199,7 +199,7 @@
+                       }
+               }
+       } else {
+-              efhw_iopages_t iopages;
++              struct efhw_iopages iopages;
+               unsigned j;
+               /* make sure iobufs are in a known state in case we don't
+@@ -209,7 +209,7 @@
+               for (i = 0; i < iobrs->n_bufs;
+                    i += iobrs->pages_per_contiguous_chunk) {
+-                      rc = efhw_iopages_alloc(efrm_nic_table.a_nic,
++                      rc = efhw_iopages_alloc(efrm_nic_tablep->a_nic,
+                                               &iopages, iobrs->order);
+                       if (rc < 0) {
+                               EFRM_ERR("%s: failed (rc %d) to allocate "
+@@ -277,16 +277,16 @@
+       i = iobrs->n_bufs;
+ fail4:
+       /* see comment on call to efhw_iopage_alloc above for a discussion
+-       * on use of efrm_nic_table.a_nic here */
++       * on use of efrm_nic_tablep->a_nic here */
+       if (iobrs->order == 0) {
+               while (i--) {
+-                      efhw_iopage_t *page = &iobrs->bufs[i];
+-                      efhw_iopage_free(efrm_nic_table.a_nic, page);
++                      struct efhw_iopage *page = &iobrs->bufs[i];
++                      efhw_iopage_free(efrm_nic_tablep->a_nic, page);
+               }
+       } else {
+               unsigned int j;
+               for (j = 0; j < i; j += iobrs->pages_per_contiguous_chunk) {
+-                      efhw_iopages_t iopages;
++                      struct efhw_iopages iopages;
+                       EFRM_ASSERT(j % iobrs->pages_per_contiguous_chunk
+                                   == 0);
+@@ -296,7 +296,7 @@
+                       efhw_iopages_init_from_iopage(&iopages,
+                                                     &iobrs->bufs[j],
+                                                     iobrs->order);
+-                      efhw_iopages_free(efrm_nic_table.a_nic, &iopages);
++                      efhw_iopages_free(efrm_nic_tablep->a_nic, &iopages);
+               }
+       }
+       efrm_vi_resource_release(iobrs->evq);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/iopage.c
+--- a/drivers/net/sfc/sfc_resource/iopage.c    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/iopage.c    Tue Mar 31 11:59:10 2009 +0100
+@@ -34,7 +34,7 @@
+ #include "kernel_compat.h"
+ #include <ci/efhw/common_sysdep.h> /* for dma_addr_t */
+-int efhw_iopage_alloc(struct efhw_nic *nic, efhw_iopage_t *p)
++int efhw_iopage_alloc(struct efhw_nic *nic, struct efhw_iopage *p)
+ {
+       struct linux_efhw_nic *lnic = linux_efhw_nic(nic);
+       dma_addr_t handle;
+@@ -55,7 +55,7 @@
+       return 0;
+ }
+-void efhw_iopage_free(struct efhw_nic *nic, efhw_iopage_t *p)
++void efhw_iopage_free(struct efhw_nic *nic, struct efhw_iopage *p)
+ {
+       struct linux_efhw_nic *lnic = linux_efhw_nic(nic);
+       EFHW_ASSERT(efhw_page_is_valid(&p->p));
+@@ -64,7 +64,9 @@
+                                efhw_iopage_ptr(p), p->dma_addr);
+ }
+-int efhw_iopages_alloc(struct efhw_nic *nic, efhw_iopages_t *p, unsigned order)
++int
++efhw_iopages_alloc(struct efhw_nic *nic, struct efhw_iopages *p,
++                 unsigned order)
+ {
+       unsigned bytes = 1u << (order + PAGE_SHIFT);
+       struct linux_efhw_nic *lnic = linux_efhw_nic(nic);
+@@ -91,7 +93,7 @@
+       return 0;
+ }
+-void efhw_iopages_free(struct efhw_nic *nic, efhw_iopages_t *p)
++void efhw_iopages_free(struct efhw_nic *nic, struct efhw_iopages *p)
+ {
+       unsigned bytes = 1u << (p->order + PAGE_SHIFT);
+       struct linux_efhw_nic *lnic = linux_efhw_nic(nic);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/kernel_compat.c
+--- a/drivers/net/sfc/sfc_resource/kernel_compat.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -48,22 +48,6 @@
+ #define EFRM_IOPAGE_COUNTS_ENABLED 0
+-
+-/* I admit that it's a bit ugly going straight to the field, but it
+- * seems easiest given that get_page followed by put_page on a page
+- * with PG_reserved set will increment the ref count on 2.6.14 and
+- * below, but not 2.6.15.  Also, RedHat have hidden put_page_testzero
+- * in a header file which produces warnings when compiled.  This
+- * doesn't agree with our use of -Werror.
+- */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
+-# define page_count_field(pg)  ((pg)->count)
+-#else
+-# define page_count_field(pg)  ((pg)->_count)
+-#endif
+-
+-#define inc_page_count(page)   atomic_inc(&page_count_field(page))
+-#define dec_page_count(page)   atomic_dec(&page_count_field(page))
+ /* Bug 5531: set_page_count doesn't work if the new page count is an
+  * expression. */
+@@ -170,15 +154,6 @@
+    *    Hon    - The PG_compound bit is honoured by munmap.
+    *
+    *                 OS      A       B       C       D
+-   * 2.4.18                  NotDef  NU      resv    NotHon
+-   * 2.4.29                  NotDef  NU      resv    NotHon
+-   * 2.4.20-31.9     rhl9    NotDef  NU      resv    NotHon
+-   *
+-   * 2.4.21-4.EL     rhel3   Comp    NU      resv    Hon
+-   * 2.4.21-15.EL    rhel3   Comp    NU      resv    Hon
+-   * 2.4.21-32.EL    rhel3   Comp    NU      resv    Hon
+-   * 2.4.21-40.EL    rhel3   Comp    NU      resv    Hon
+-   *
+    * 2.6.0                   Comp    NU      resv    NotHon
+    *
+    * 2.6.5-7.97      sles9   OptInv  NU      resv    NotHon
+@@ -209,72 +184,39 @@
+    * to one on all the sub-pages.  The SLES 9 range are affected, as
+    * are kernels built without CONFIG_MMU defined.
+    *
+-   * Possible strategies for multi-page allocations:
++   * On all kernel versions, we just allocate a compound page.
++   * Reference counting should then work on the whole allocation but
++   * is broken by bug/feature D (above) on old kernels.
+    *
+-   * EFRM_MMAP_USE_COMPOUND
+-   * 1. Allocate a compound page.  Reference counting should then work
+-   *    on the whole allocation.  This is a good theory, but is broken
+-   *    by bug/feature D (above).
+-   *
+-   * EFRM_MMAP_USE_SPLIT
+-   * 2. Convert the multi-page allocation to many single page
+-   *    allocations.  This involves incrementing the reference counts
+-   *    and clearing PG_compound on all the pages (including the
+-   *    first).  The references should be released _after_ calling
+-   *    pci_free_consistent so that that call doesn't release the
+-   *    memory.
+-   *
+-   * EFRM_MMAP_USE_INCREMENT
+-   * 3. Increment the reference count on all the pages after
+-   *    allocating and decrement them again before freeing.  This gets
+-   *    round the zero reference count problem.  It doesn't handle the
+-   *    case where someone else is holding a reference to one of our
+-   *    pages when we free the pages, but we think VM_IO stops this
+-   *    from happening.
++   * EFRM_MMAP_USE_SPLIT 
++
++   *    On old kernels, we convert the multi-page allocation to many
++   *    single page allocations.  This involves incrementing the
++   *    reference counts and clearing PG_compound on all the pages
++   *    (including the first).  Given that the affected kernels are
++   *    inconsistent about the initial reference counts on high order
++   *    page allocations, we reinitialise the reference counts instead
++   *    of incrementing them.  The references are released _after_
++   *    calling pci_free_consistent so that that call doesn't release
++   *    the memory.
+    */
+-/* Should we use strategy 1?  This can be forced on us by the OS. */
+-#if defined(PG_compound)
+-#define EFRM_MMAP_USE_COMPOUND 1
+-#else
+-#define EFRM_MMAP_USE_COMPOUND 0
+-#endif
+-
+-/* Should we use strategy 2?  This can be used even if strategy 1 is
+- * used. */
++/* Should we split each multi-page allocation into single page
++ * allocations? */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+ #define EFRM_MMAP_USE_SPLIT    1
+ #else
+ #define EFRM_MMAP_USE_SPLIT    0
+ #endif
+-/* Should we use strategy 3?  There's no point doing this if either
+- * strategy 1 or strategy 2 is used. */
+-#if !EFRM_MMAP_USE_COMPOUND && !EFRM_MMAP_USE_SPLIT
+-#error "We shouldn't have to use this strategy."
+-#define EFRM_MMAP_USE_INCREMENT 1
+-#else
+-#define EFRM_MMAP_USE_INCREMENT 0
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
+-#define EFRM_MMAP_RESET_REFCNT  1
+-#else
+-#define EFRM_MMAP_RESET_REFCNT  0
+-#endif
+-
+ /* NB. 2.6.17 has renamed SetPageCompound to __SetPageCompound and
+  * ClearPageCompound to __ClearPageCompound. */
+-#if ((defined(PageCompound)        !=  defined(PG_compound)) ||       \
+-     (defined(SetPageCompound)     !=  defined(PG_compound) &&        \
+-      defined(__SetPageCompound)   !=  defined(PG_compound)) ||       \
+-     (defined(ClearPageCompound)   !=  defined(PG_compound) &&        \
+-      defined(__ClearPageCompound) !=  defined(PG_compound)) ||       \
+-     (defined(__GFP_COMP)          && !defined(PG_compound)))
++#if ( ( !defined(PageCompound) ) ||                                   \
++      ( !defined(PG_compound) ) ||                                    \
++      ( !defined(SetPageCompound)   && !defined(__SetPageCompound) ) ||       \
++      ( !defined(ClearPageCompound) && !defined(__ClearPageCompound) ) )
+ #error Mismatch of defined page-flags.
+ #endif
+-
+-extern int use_pci_alloc;     /* Use pci_alloc_consistent to alloc iopages */
+ /****************************************************************************
+  *
+@@ -286,7 +228,7 @@
+ {
+       unsigned pfn = __pa(kva) >> PAGE_SHIFT;
+       struct page *start_pg = pfn_to_page(pfn);
+-#if !defined(NDEBUG) || EFRM_MMAP_USE_SPLIT
++#if EFRM_MMAP_USE_SPLIT
+       struct page *end_pg = start_pg + (1 << order);
+       struct page *pg;
+ #endif
+@@ -308,45 +250,8 @@
+       /* Check the page count and PG_compound bit. */
+ #ifndef NDEBUG
+-#  if defined(PG_compound)
+-      EFRM_ASSERT(PageCompound(start_pg) == EFRM_MMAP_USE_COMPOUND);
+-#  endif
++      EFRM_ASSERT(PageCompound(start_pg) == 1);
+       EFRM_ASSERT(page_count(start_pg) == 1);
+-
+-      {
+-              /* Some kernels have the page count field hold (ref_count-1)
+-               * rather than (ref_count).  This is so that decrementing the
+-               * reference count to "zero" causes the internal value to change
+-               * from 0 to -1 which sets the carry flag.  Other kernels store
+-               * the real reference count value in the obvious way.  We handle
+-               * this here by reading the reference count field of the first
+-               * page, which is always 1. */
+-              int pg_count_zero;
+-              pg_count_zero = atomic_read(&page_count_field(start_pg)) - 1;
+-              for (pg = start_pg + 1; pg < end_pg; pg++) {
+-                      int pg_count;
+-#  if defined(PG_compound)
+-                      EFRM_ASSERT(PageCompound(pg) == EFRM_MMAP_USE_COMPOUND);
+-#  endif
+-
+-                      /* Bug 5450: Some kernels initialise the page count
+-                       * to one for pages other than the first and some
+-                       * leave it at zero.  We allow either behaviour
+-                       * here, but disallow anything strange.  Newer
+-                       * kernels only define set_page_count in an
+-                       * internal header file, so we have to make do with
+-                       * incrementing and decrementing the reference
+-                       * count.  Fortunately, those kernels don't set the
+-                       * reference count to one on all the pages. */
+-                      pg_count = atomic_read(&page_count_field(pg));
+-#  if EFRM_MMAP_RESET_REFCNT
+-                      if (pg_count != pg_count_zero)
+-                              EFRM_ASSERT(pg_count == pg_count_zero + 1);
+-#  else
+-                      EFRM_ASSERT(pg_count == pg_count_zero);
+-#  endif
+-              }
+-      }
+ #endif
+       /* Split the multi-page allocation if necessary. */
+@@ -354,50 +259,33 @@
+       for (pg = start_pg; pg < end_pg; pg++) {
+               /* This is no longer a compound page. */
+-#  if EFRM_MMAP_USE_COMPOUND
+               ClearPageCompound(pg);
+               EFRM_ASSERT(PageCompound(pg) == 0);
+-#  endif
+ #  ifndef NDEBUG
+               {
+                       int pg_count = page_count(pg);
+                       /* Bug 5450: The page count can be zero or one here. */
+-                      if (pg == start_pg) {
++                      if (pg == start_pg)
+                               EFRM_ASSERT(pg_count == 1);
+-                      } else {
+-#    if EFRM_MMAP_RESET_REFCNT
+-                              if (pg_count != 0)
+-                                      EFRM_ASSERT(pg_count == 1);
+-#    else
+-                              EFRM_ASSERT(pg_count == 0);
+-#    endif
+-                      }
++                      else if (pg_count != 0)
++                              EFRM_ASSERT(pg_count == 1);
+               }
+ #  endif
+-              /* Get a reference which will be released after the pages have
+-               * been passed back to pci_free_consistent. */
+-#  if EFRM_MMAP_RESET_REFCNT
+-              /* Bug 5450: Reset the reference count since the count might
+-               * already be 1. */
++              /* Get a reference which will be released after the
++               * pages have been passed back to pci_free_consistent.
++               * Reset the page count instead of incrementing it
++               * because old kernels are inconsistent about
++               * initialising the reference count. */
+               ci_set_page_count(pg, (pg == start_pg) ? 2 : 1);
+-#  else
+-              get_page(pg);
+-#  endif
+       }
+-#endif
+-
+-      /* Fudge the reference count if necessary. */
+-#if EFRM_MMAP_USE_INCREMENT
+-      for (pg = start_pg; pg < end_pg; pg++)
+-              inc_page_count(pg);
+ #endif
+ }
+ static inline void pci_mmap_pages_hack_before_free(caddr_t kva, unsigned order)
+ {
+-#if EFRM_MMAP_USE_INCREMENT || !defined(NDEBUG)
++#if !defined(NDEBUG)
+       /* Drop the references taken in pci_mmap_pages_hack_after_alloc */
+       unsigned pfn = __pa(kva) >> PAGE_SHIFT;
+       struct page *start_pg = pfn_to_page(pfn);
+@@ -412,15 +300,9 @@
+       if (PageReserved(start_pg))
+               return;
+-#  if EFRM_MMAP_USE_INCREMENT
+-      for (pg = start_pg; pg < end_pg; pg++)
+-              dec_page_count(pg);
+-#  endif
+-
+-#if !defined(NDEBUG)
+       EFRM_ASSERT(page_count(start_pg) == 1+EFRM_MMAP_USE_SPLIT);
+-#  if EFRM_MMAP_USE_COMPOUND && !EFRM_MMAP_USE_SPLIT
++#  if !EFRM_MMAP_USE_SPLIT
+       for (pg = start_pg; pg < end_pg; pg++)
+               EFRM_ASSERT(PageCompound(pg));
+ #  else
+@@ -432,7 +314,6 @@
+               EFRM_ASSERT(page_count(pg) == exp_pg_count);
+       }
+ #  endif
+-#endif
+ #endif
+ }
+@@ -483,52 +364,23 @@
+ void *efrm_dma_alloc_coherent(struct device *dev, size_t size,
+                             dma_addr_t *dma_addr, int flag)
+ {
+-      struct pci_dev *pci_dev;
+       void *ptr;
+       unsigned order;
+-      EFRM_IOMMU_DECL;
+       order = __ffs(size/PAGE_SIZE);
+       EFRM_ASSERT(size == (PAGE_SIZE<<order));
++
++      /* Can't take a spinlock here since the allocation can
++       * block. */
++      ptr = dma_alloc_coherent(dev, size, dma_addr, flag);
++      if (ptr == NULL)
++              return ptr;
+       /* NB. The caller may well set __GFP_COMP.  However we can't
+        * rely on this working on older kernels.  2.6.9 only acts on
+        * __GFP_COMP if CONFIG_HUGETLB_PAGE is defined.  If the flag
+        * did have an effect then PG_compound will be set on the
+        * pages. */
+-
+-      if (use_pci_alloc) {
+-              /* Can't take a spinlock here since the allocation can
+-               * block. */
+-              ptr = dma_alloc_coherent(dev, size, dma_addr, flag);
+-              if (ptr == NULL)
+-                      return ptr;
+-      } else {
+-#ifdef CONFIG_SWIOTLB         /* BUG1340 */
+-              if (swiotlb) {
+-                      EFRM_ERR("%s: This kernel is using DMA bounce "
+-                               "buffers.  Please upgrade kernel to "
+-                               "linux2.6 or reduce the amount of RAM "
+-                               "with mem=XXX.", __FUNCTION__);
+-                      return NULL;
+-              }
+-#endif
+-              ptr = (void *)__get_free_pages(flag, order);
+-
+-              if (ptr == NULL)
+-                      return NULL;
+-
+-              EFRM_IOMMU_LOCK();
+-              pci_dev = container_of(dev, struct pci_dev, dev);
+-              *dma_addr = pci_map_single(pci_dev, ptr, size,
+-                                         PCI_DMA_BIDIRECTIONAL);
+-              EFRM_IOMMU_UNLOCK();
+-              if (pci_dma_mapping_error(*dma_addr)) {
+-                      free_pages((unsigned long)ptr, order);
+-                      return NULL;
+-              }
+-      }
+-
+ #ifndef CONFIG_IA64
+       pci_mmap_pages_hack_after_alloc(ptr, order);
+ #endif
+@@ -547,9 +399,7 @@
+ void efrm_dma_free_coherent(struct device *dev, size_t size,
+                           void *ptr, dma_addr_t dma_addr)
+ {
+-      struct pci_dev *pci_dev;
+       unsigned order;
+-      EFRM_IOMMU_DECL;
+       order = __ffs(size/PAGE_SIZE);
+       EFRM_ASSERT(size == (PAGE_SIZE<<order));
+@@ -564,19 +414,7 @@
+ #ifndef CONFIG_IA64
+       pci_mmap_pages_hack_before_free(ptr, order);
+ #endif
+-      if (use_pci_alloc) {
+-              EFRM_IOMMU_LOCK();
+-              dma_free_coherent(dev, size, ptr, dma_addr);
+-              EFRM_IOMMU_UNLOCK();
+-      } else {
+-              pci_dev = container_of(dev, struct pci_dev, dev);
+-              EFRM_IOMMU_LOCK();
+-              efrm_pci_unmap_single(pci_dev, dma_addr, size,
+-                                    PCI_DMA_BIDIRECTIONAL);
+-              EFRM_IOMMU_UNLOCK();
+-
+-              free_pages((unsigned long)ptr, order);
+-      }
++      dma_free_coherent(dev, size, ptr, dma_addr);
+ #ifndef CONFIG_IA64
+       pci_mmap_pages_hack_after_free(ptr, order);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/kernel_compat.h
+--- a/drivers/net/sfc/sfc_resource/kernel_compat.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -40,9 +40,12 @@
+ #define DRIVER_LINUX_RESOURCE_KERNEL_COMPAT_H
+ #include <linux/version.h>
++#include <linux/moduleparam.h>
++#include <linux/sched.h>
++#include <asm/io.h>
++#include <linux/pci.h>
+ /********* wait_for_completion_timeout() ********************/
+-#include <linux/sched.h>
+ /* RHEL_RELEASE_CODE from linux/version.h is only defined for 2.6.9-55EL
+  * UTS_RELEASE is unfortunately unusable
+@@ -51,7 +54,7 @@
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)) && \
+       !defined(RHEL_RELEASE_CODE)
+-static inline unsigned long fastcall __sched
++static inline unsigned long fastcall
+ efrm_wait_for_completion_timeout(struct completion *x, unsigned long timeout)
+ {
+       might_sleep();
+@@ -87,125 +90,24 @@
+ #endif
+-/********* pci_map_*() ********************/
++/********* io mapping ********************/
+-#include <linux/pci.h>
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,9)
+-/* Bug 4560: Some kernels leak IOMMU entries under heavy load.  Use a
+- * spinlock to serialise access where possible to alleviate the
+- * problem.
+- *
+- * NB. This is duplicated in the net driver.  Please keep in sync. */
+-#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && \
+-     (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) && \
+-      defined(__x86_64__) && defined(CONFIG_SMP))
++  #ifndef __iomem
++  #define __iomem
++  #endif
+-#define EFRM_HAVE_IOMMU_LOCK 1
+-
+-#if ((LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5)) && \
+-      defined(CONFIG_SUSE_KERNEL))
+-#define EFRM_NEED_ALTERNATE_MAX_PFN 1
+-#endif
+-
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+-#if defined(CONFIG_GART_IOMMU)
+-#define EFRM_NO_IOMMU no_iommu
+-#else
+-#define EFRM_NO_IOMMU 1
+-#endif
+-#else
+-#define EFRM_NO_IOMMU 0
+-#endif
+-
+-/* Set to 0 if we should never use the lock.  Set to 1 if we should
+- * automatically determine if we should use the lock.  Set to 2 if we
+- * should always use the lock. */
+-extern unsigned int efx_use_iommu_lock;
+-/* Defined in the net driver. */
+-extern spinlock_t efx_iommu_lock;
+-/* Non-zero if there is a card which needs the lock. */
+-extern int efrm_need_iommu_lock;
+-
+-/* The IRQ state is needed if the lock is being used.  The flag is
+- * cached to ensure that every lock is followed by an unlock, even
+- * if the global flag changes in the middle of the operation. */
+-
+-#define EFRM_IOMMU_DECL                               \
+-      unsigned long efx_iommu_irq_state = 0;  \
+-      int efx_iommu_using_lock;
+-#define EFRM_IOMMU_LOCK()                                             \
+-      do {                                                            \
+-              efx_iommu_using_lock = (efx_use_iommu_lock &&           \
+-                                      (efrm_need_iommu_lock ||        \
+-                                       efx_use_iommu_lock >= 2));     \
+-              if (efx_iommu_using_lock)                               \
+-              spin_lock_irqsave(&efx_iommu_lock, efx_iommu_irq_state);\
+-      } while (0)
+-#define EFRM_IOMMU_UNLOCK()                                           \
+-      do {                                                            \
+-              if (efx_iommu_using_lock)                               \
+-              spin_unlock_irqrestore(&efx_iommu_lock,                 \
+-                                     efx_iommu_irq_state);            \
+-      } while (0)
+-
+-#else /* defined(__x86_64__) && defined(CONFIG_SMP) */
+-
+-#define EFRM_HAVE_IOMMU_LOCK 0
+-#define EFRM_IOMMU_DECL
+-#define EFRM_IOMMU_LOCK()    do {} while (0)
+-#define EFRM_IOMMU_UNLOCK()  do {} while (0)
++  static inline void efrm_iounmap(volatile void __iomem *addr)
++  {
++        iounmap((void __iomem *)addr);
++  }
++  #define iounmap(arg) efrm_iounmap(arg)
+ #endif
+-static inline dma_addr_t efrm_pci_map_single(struct pci_dev *hwdev, void *ptr,
+-                                           size_t size, int direction)
+-{
+-      dma_addr_t dma_addr;
+-      EFRM_IOMMU_DECL;
+-      EFRM_IOMMU_LOCK();
+-      dma_addr = pci_map_single(hwdev, ptr, size, direction);
+-      EFRM_IOMMU_UNLOCK();
+-
+-      return dma_addr;
+-}
+-
+-static inline void efrm_pci_unmap_single(struct pci_dev *hwdev,
+-                                       dma_addr_t dma_addr, size_t size,
+-                                       int direction)
+-{
+-      EFRM_IOMMU_DECL;
+-
+-      EFRM_IOMMU_LOCK();
+-      pci_unmap_single(hwdev, dma_addr, size, direction);
+-      EFRM_IOMMU_UNLOCK();
+-}
+-
+-static inline dma_addr_t efrm_pci_map_page(struct pci_dev *hwdev,
+-                                         struct page *page,
+-                                         unsigned long offset, size_t size,
+-                                         int direction)
+-{
+-      dma_addr_t dma_addr;
+-      EFRM_IOMMU_DECL;
+-
+-      EFRM_IOMMU_LOCK();
+-      dma_addr = pci_map_page(hwdev, page, offset, size, direction);
+-      EFRM_IOMMU_UNLOCK();
+-
+-      return dma_addr;
+-}
+-
+-static inline void efrm_pci_unmap_page(struct pci_dev *hwdev,
+-                                     dma_addr_t dma_addr, size_t size,
+-                                     int direction)
+-{
+-      EFRM_IOMMU_DECL;
+-
+-      EFRM_IOMMU_LOCK();
+-      pci_unmap_page(hwdev, dma_addr, size, direction);
+-      EFRM_IOMMU_UNLOCK();
+-}
++/********* Memory allocation *************/
+ #ifndef IN_KERNEL_COMPAT_C
+ #  ifndef __GFP_COMP
+@@ -215,6 +117,9 @@
+ #    define __GFP_ZERO 0
+ #  endif
+ #endif
++
++
++/********* pci_map_*() ********************/
+ extern void *efrm_dma_alloc_coherent(struct device *dev, size_t size,
+                                    dma_addr_t *dma_addr, int flag);
+@@ -236,4 +141,11 @@
+       efrm_dma_free_coherent(&hwdev->dev, size, ptr, dma_addr);
+ }
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8))
++static inline void efrm_pci_disable_msi(struct pci_dev *dev) {}
++#undef pci_disable_msi
++#define pci_disable_msi efrm_pci_disable_msi
++#endif
++
+ #endif /* DRIVER_LINUX_RESOURCE_KERNEL_COMPAT_H */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/linux_resource_internal.h
+--- a/drivers/net/sfc/sfc_resource/linux_resource_internal.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/linux_resource_internal.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -65,7 +65,8 @@
+ extern int
+ efrm_nic_add(struct pci_dev *dev, unsigned int opts, const uint8_t *mac_addr,
+            struct linux_efhw_nic **lnic_out, spinlock_t *reg_lock,
+-           int bt_min, int bt_max, const struct vi_resource_dimensions *);
++           int bt_min, int bt_max, int non_irq_evq,
++           const struct vi_resource_dimensions *);
+ extern void efrm_nic_del(struct linux_efhw_nic *);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/nic.c
+--- a/drivers/net/sfc/sfc_resource/nic.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/nic.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -71,6 +71,17 @@
+                       return 0;
+               }
+               break;
++      case 0x7777:
++              dt->arch = EFHW_ARCH_FALCON;
++              dt->variant = 'C';
++              switch (class_revision) {
++              case 0:
++                      dt->revision = 0;
++                      break;
++              default:
++                      return 0;
++              }
++              break;
+       default:
+               return 0;
+       }
+@@ -92,8 +103,6 @@
+ void efhw_nic_init(struct efhw_nic *nic, unsigned flags, unsigned options,
+                  struct efhw_device_type dev_type)
+ {
+-      int i;
+-
+       nic->devtype = dev_type;
+       nic->flags = flags;
+       nic->options = options;
+@@ -102,8 +111,7 @@
+       nic->reg_lock = &nic->the_reg_lock;
+       nic->mtu = 1500 + ETH_HLEN;
+-      for (i = 0; i < EFHW_KEVENTQ_MAX; i++)
+-              nic->irq_unit[i] = EFHW_IRQ_UNIT_UNUSED;
++      nic->irq_unit = EFHW_IRQ_UNIT_UNUSED;
+       switch (nic->devtype.arch) {
+       case EFHW_ARCH_FALCON:
+@@ -118,6 +126,7 @@
+                       nic->ctr_ap_bar = FALCON_S_CTR_AP_BAR;
+                       break;
+               case 'B':
++              case 'C':
+                       nic->flags |= NIC_FLAG_NO_INTERRUPT;
+                       nic->ctr_ap_bar = FALCON_P_CTR_AP_BAR;
+                       break;
+@@ -135,18 +144,14 @@
+ void efhw_nic_close_interrupts(struct efhw_nic *nic)
+ {
+-      int i;
+-
+       EFHW_ASSERT(nic);
+       if (!efhw_nic_have_hw(nic))
+               return;
+       EFHW_ASSERT(efhw_nic_have_hw(nic));
+-      for (i = 0; i < EFHW_KEVENTQ_MAX; i++) {
+-              if (nic->irq_unit[i] != EFHW_IRQ_UNIT_UNUSED)
+-                      efhw_nic_interrupt_disable(nic, i);
+-      }
++      if (nic->irq_unit != EFHW_IRQ_UNIT_UNUSED)
++              efhw_nic_interrupt_disable(nic);
+ }
+ void efhw_nic_dtor(struct efhw_nic *nic)
+@@ -156,7 +161,6 @@
+       /* Check that we have functional units because the software only
+        * driver doesn't initialise anything hardware related any more */
+-#ifndef __ci_ul_driver__
+       /* close interrupts is called first because the act of deregistering
+          the driver could cause this driver to change from master to slave
+          and hence the implicit interrupt mappings would be wrong */
+@@ -168,19 +172,14 @@
+               efhw_nic_close_hardware(nic);
+       }
+       EFHW_TRACE("%s: functional units ... done", __FUNCTION__);
+-#endif
+       /* destroy event queues */
+       EFHW_TRACE("%s: event queues ... ", __FUNCTION__);
+-#ifndef __ci_ul_driver__
+-      {
+-              int i;
+-              for (i = 0; i < EFHW_KEVENTQ_MAX; ++i)
+-                      if (nic->evq[i].evq_mask)
+-                              efhw_keventq_dtor(nic, &nic->evq[i]);
+-      }
+-#endif
++      if (nic->interrupting_evq.evq_mask)
++              efhw_keventq_dtor(nic, &nic->interrupting_evq);
++      if (nic->non_interrupting_evq.evq_mask)
++              efhw_keventq_dtor(nic, &nic->non_interrupting_evq);
+       EFHW_TRACE("%s: event queues ... done", __FUNCTION__);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/resource_driver.c
+--- a/drivers/net/sfc/sfc_resource/resource_driver.c   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/resource_driver.c   Tue Mar 31 11:59:10 2009 +0100
+@@ -45,15 +45,6 @@
+ #include <ci/efrm/vi_resource_private.h>
+ #include <ci/efrm/driver_private.h>
+-#if EFRM_HAVE_IOMMU_LOCK
+-#ifdef EFRM_NEED_ALTERNATE_MAX_PFN
+-extern unsigned long blk_max_pfn;
+-#define max_pfn blk_max_pfn
+-#else
+-#include <linux/bootmem.h>
+-#endif
+-#endif
+-
+ MODULE_AUTHOR("Solarflare Communications");
+ MODULE_LICENSE("GPL");
+@@ -63,11 +54,6 @@
+       .dmaq_flushed_fn = efrm_handle_dmaq_flushed,
+ };
+-#if EFRM_HAVE_IOMMU_LOCK
+-int efrm_need_iommu_lock;
+-EXPORT_SYMBOL(efrm_need_iommu_lock);
+-#endif
+-
+ const int max_hardware_init_repeats = 10;
+ /*--------------------------------------------------------------------
+@@ -76,7 +62,6 @@
+  *
+  *--------------------------------------------------------------------*/
+ /* See docs/notes/pci_alloc_consistent */
+-int use_pci_alloc = 1;                /* Use pci_alloc_consistent to alloc iopages */
+ static int do_irq = 1;                /* enable interrupts */
+ #if defined(CONFIG_X86_XEN)
+@@ -94,9 +79,6 @@
+ MODULE_PARM_DESC(irq_moderation, "IRQ moderation in usec");
+ module_param(nic_options, int, S_IRUGO);
+ MODULE_PARM_DESC(nic_options, "Nic options -- see efhw_types.h");
+-module_param(use_pci_alloc, int, S_IRUGO);
+-MODULE_PARM_DESC(use_pci_alloc, "Use pci_alloc_consistent to alloc iopages "
+-               "(autodetected by kernel version)");
+ module_param(efx_vi_eventq_size, int, S_IRUGO);
+ MODULE_PARM_DESC(efx_vi_eventq_size,
+                "Size of event queue allocated by efx_vi library");
+@@ -176,7 +158,6 @@
+ {
+       int capacity;
+       int page_order;
+-      int i;
+       int rc;
+       /* Choose queue size. */
+@@ -189,16 +170,19 @@
+               } else if (capacity & nic->evq_sizes)
+                       break;
+       }
+-      for (i = 0; i < EFHW_KEVENTQ_MAX; ++i) {
+-              nic->evq[i].hw.capacity = capacity;
+-              nic->evq[i].hw.buf_tbl_alloc.base = (unsigned)-1;
+-      }
++
++      nic->interrupting_evq.hw.capacity = capacity;
++      nic->interrupting_evq.hw.buf_tbl_alloc.base = (unsigned)-1;
++
++      nic->non_interrupting_evq.hw.capacity = capacity;
++      nic->non_interrupting_evq.hw.buf_tbl_alloc.base = (unsigned)-1;
+       /* allocate buffer table entries to map onto the iobuffer */
+       page_order = get_order(capacity * sizeof(efhw_event_t));
+       if (!(nic->flags & NIC_FLAG_NO_INTERRUPT)) {
+               rc = efrm_buffer_table_alloc(page_order,
+-                                           &nic->evq[0].hw.buf_tbl_alloc);
++                                           &nic->interrupting_evq
++                                           .hw.buf_tbl_alloc);
+               if (rc < 0) {
+                       EFRM_WARN
+                           ("%s: failed (%d) to alloc %d buffer table entries",
+@@ -207,7 +191,7 @@
+               }
+       }
+       rc = efrm_buffer_table_alloc(page_order,
+-                                   &nic->evq[FALCON_EVQ_NONIRQ].hw.
++                                   &nic->non_interrupting_evq.hw.
+                                    buf_tbl_alloc);
+       if (rc < 0) {
+               EFRM_WARN
+@@ -223,16 +207,17 @@
+  */
+ static void efrm_nic_buffer_table_free(struct efhw_nic *nic)
+ {
+-      int i;
+-      for (i = 0; i <= FALCON_EVQ_NONIRQ; i++)
+-              if (nic->evq[i].hw.buf_tbl_alloc.base != (unsigned)-1)
+-                      efrm_buffer_table_free(&nic->evq[i].hw.buf_tbl_alloc);
+-
++      if (nic->interrupting_evq.hw.buf_tbl_alloc.base != (unsigned)-1)
++              efrm_buffer_table_free(&nic->interrupting_evq.hw
++                                     .buf_tbl_alloc);
++      if (nic->non_interrupting_evq.hw.buf_tbl_alloc.base != (unsigned)-1)
++              efrm_buffer_table_free(&nic->non_interrupting_evq
++                                     .hw.buf_tbl_alloc);
+ }
+ static int iomap_bar(struct linux_efhw_nic *lnic, size_t len)
+ {
+-      efhw_ioaddr_t ioaddr;
++      volatile char __iomem *ioaddr;
+       ioaddr = ioremap_nocache(lnic->ctr_ap_pci_addr, len);
+       if (ioaddr == 0)
+@@ -345,11 +330,9 @@
+ void linux_efrm_nic_dtor(struct linux_efhw_nic *lnic)
+ {
+       struct efhw_nic *nic = &lnic->nic;
+-      efhw_ioaddr_t bar_ioaddr = nic->bar_ioaddr;
++      volatile char __iomem *bar_ioaddr = nic->bar_ioaddr;
+       efhw_nic_dtor(nic);
+-
+-      efrm_nic_buffer_table_free(nic);
+       /* Unmap the bar. */
+       EFRM_ASSERT(bar_ioaddr);
+@@ -369,7 +352,7 @@
+       EFRM_ASSERT(!(nic->flags & NIC_FLAG_NO_INTERRUPT));
+-      efhw_keventq_poll(nic, &nic->evq[0]);
++      efhw_keventq_poll(nic, &nic->interrupting_evq);
+       EFRM_TRACE("tasklet complete");
+ }
+@@ -409,7 +392,7 @@
+ int
+ efrm_nic_add(struct pci_dev *dev, unsigned flags, const uint8_t *mac_addr,
+            struct linux_efhw_nic **lnic_out, spinlock_t *reg_lock,
+-           int bt_min, int bt_max,
++           int bt_min, int bt_lim, int non_irq_evq,
+            const struct vi_resource_dimensions *res_dim)
+ {
+       struct linux_efhw_nic *lnic = NULL;
+@@ -424,14 +407,14 @@
+                  pci_name(dev) ? pci_name(dev) : "?", dev->irq);
+       /* Ensure that we have room for the new adapter-structure. */
+-      if (efrm_nic_table.nic_count == EFHW_MAX_NR_DEVS) {
++      if (efrm_nic_tablep->nic_count == EFHW_MAX_NR_DEVS) {
+               EFRM_WARN("%s: WARNING: too many devices", __FUNCTION__);
+               rc = -ENOMEM;
+               goto failed;
+       }
+       if (n_nics_probed == 0) {
+-              rc = efrm_resources_init(res_dim, bt_min, bt_max);
++              rc = efrm_resources_init(res_dim, bt_min, bt_lim);
+               if (rc != 0)
+                       goto failed;
+               resources_init = 1;
+@@ -467,7 +450,7 @@
+       rc = efrm_driver_register_nic(nic, nic_index++);
+       if (rc < 0) {
+               EFRM_ERR("%s: cannot register nic %d with nic error code %d",
+-                       __FUNCTION__, efrm_nic_table.nic_count, rc);
++                       __FUNCTION__, efrm_nic_tablep->nic_count, rc);
+               goto failed;
+       }
+       registered_nic = 1;
+@@ -484,7 +467,8 @@
+          we want to make sure that we maximise our chances, so we
+          loop a few times until all is good. */
+       for (count = 0; count < max_hardware_init_repeats; count++) {
+-              rc = efhw_nic_init_hardware(nic, &ev_handler, mac_addr);
++              rc = efhw_nic_init_hardware(nic, &ev_handler, mac_addr,
++                                          non_irq_evq);
+               if (rc >= 0)
+                       break;
+@@ -509,18 +493,10 @@
+                       EFRM_ERR("Interrupt initialisation failed (%d)", rc);
+                       goto failed;
+               }
+-              efhw_nic_set_interrupt_moderation(nic, 0, irq_moderation);
+-              efhw_nic_interrupt_enable(nic, 0);
++              efhw_nic_set_interrupt_moderation(nic, irq_moderation);
++              efhw_nic_interrupt_enable(nic);
+       }
+       EFRM_TRACE("interrupts are %sregistered", do_irq ? "" : "not ");
+-
+-#if EFRM_HAVE_IOMMU_LOCK
+-      /* Bug 4560: We need the lock if there is memory which cannot be
+-       * accessed by the card and there is an IOMMU to access it.  In that
+-       * case, the kernel will use the IOMMU to access the high memory. */
+-      if ((dev->dma_mask >> PAGE_SHIFT) < max_pfn && !EFRM_NO_IOMMU)
+-              efrm_need_iommu_lock = 1;
+-#endif
+       *lnic_out = lnic;
+       EFRM_ASSERT(rc == 0);
+@@ -551,6 +527,8 @@
+       EFRM_TRACE("%s:", __FUNCTION__);
+       EFRM_ASSERT(nic);
++
++      efrm_nic_buffer_table_free(nic);
+       efrm_driver_unregister_nic(nic);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/resources.c
+--- a/drivers/net/sfc/sfc_resource/resources.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/resources.c Tue Mar 31 11:59:10 2009 +0100
+@@ -40,11 +40,11 @@
+ int
+ efrm_resources_init(const struct vi_resource_dimensions *vi_res_dim,
+-                  int buffer_table_min, int buffer_table_max)
++                  int buffer_table_min, int buffer_table_lim)
+ {
+       int i, rc;
+-      rc = efrm_buffer_table_ctor(buffer_table_min, buffer_table_max);
++      rc = efrm_buffer_table_ctor(buffer_table_min, buffer_table_lim);
+       if (rc != 0)
+               return rc;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/vi_resource_alloc.c
+--- a/drivers/net/sfc/sfc_resource/vi_resource_alloc.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/vi_resource_alloc.c Tue Mar 31 11:59:10 2009 +0100
+@@ -82,13 +82,13 @@
+       int instance;
+       int rc;
+-      if (efrm_nic_table.a_nic == NULL)       /* ?? FIXME: surely not right */
++      if (efrm_nic_tablep->a_nic == NULL)     /* ?? FIXME: surely not right */
+               return -ENODEV;
+       spin_lock_irqsave(&efrm_vi_manager->rm.rm_lock, lock_flags);
+       /* Falcon A1 RX phys addr wierdness. */
+-      if (efrm_nic_table.a_nic->devtype.variant == 'A' &&
++      if (efrm_nic_tablep->a_nic->devtype.variant == 'A' &&
+           (vi_flags & EFHW_VI_RX_PHYS_ADDR_EN)) {
+               if (vi_flags & EFHW_VI_JUMBO_EN) {
+                       /* Falcon-A cannot do phys + scatter. */
+@@ -141,10 +141,10 @@
+       irq_flags_t lock_flags;
+       struct kfifo *instances;
+-      if (efrm_nic_table.a_nic == NULL)       /* ?? FIXME: surely not right */
++      if (efrm_nic_tablep->a_nic == NULL)     /* ?? FIXME: surely not right */
+               return;
+-      if (efrm_nic_table.a_nic->devtype.variant == 'A' &&
++      if (efrm_nic_tablep->a_nic->devtype.variant == 'A' &&
+           instance == FALCON_A1_ISCSI_DMAQ) {
+               EFRM_ASSERT(efrm_vi_manager->iscsi_dmaq_instance_is_free ==
+                           false);
+@@ -361,7 +361,7 @@
+ efrm_vi_rm_init_evq(struct vi_resource *virs, int nic_index)
+ {
+       int rc;
+-      struct efhw_nic *nic = efrm_nic_table.nic[nic_index];
++      struct efhw_nic *nic = efrm_nic_tablep->nic[nic_index];
+       int instance = EFRM_RESOURCE_INSTANCE(virs->rs.rs_handle);
+       struct eventq_resource_hardware *evq_hw =
+           &virs->nic_info[nic_index].evq_pages;
+@@ -419,7 +419,7 @@
+ static inline void
+ efrm_vi_rm_fini_evq(struct vi_resource *virs, int nic_index)
+ {
+-      struct efhw_nic *nic = efrm_nic_table.nic[nic_index];
++      struct efhw_nic *nic = efrm_nic_tablep->nic[nic_index];
+       int instance = EFRM_RESOURCE_INSTANCE(virs->rs.rs_handle);
+       struct vi_resource_nic_info *nic_info = &virs->nic_info[nic_index];
+@@ -481,7 +481,7 @@
+                            int queue_type, int init, int nic_index)
+ {
+       int rc;
+-      struct efhw_nic *nic = efrm_nic_table.nic[nic_index];
++      struct efhw_nic *nic = efrm_nic_tablep->nic[nic_index];
+       int instance = EFRM_RESOURCE_INSTANCE(virs->rs.rs_handle);
+       uint32_t buf_bytes;
+       struct vi_resource *evq_virs;
+@@ -490,7 +490,7 @@
+       struct vi_resource_nic_info *nic_info = &virs->nic_info[nic_index];
+       int page_order;
+       uint32_t num_pages;
+-      efhw_iopages_t *iobuff;
++      struct efhw_iopages *iobuff;
+ #endif
+       if (!init)
+@@ -553,6 +553,10 @@
+       /* Ignore disabled queues. */
+       if (virs->dmaq_capacity[queue_type] == 0)
+               return 0;
++
++      /* Ensure TX pacing turned off -- queue flush doesn't reset this. */
++      if (queue_type == EFRM_VI_RM_DMA_QUEUE_TX)
++              falcon_nic_pace(nic, instance, 0);
+       /* No need to disable the queue here.  Nobody is using it anyway. */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/vi_resource_event.c
+--- a/drivers/net/sfc/sfc_resource/vi_resource_event.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/vi_resource_event.c Tue Mar 31 11:59:10 2009 +0100
+@@ -48,7 +48,7 @@
+       struct efhw_nic *nic;
+       int next_i;
+       EFRM_ASSERT(efrm_nic_set_read(&virs->nic_set, nic_index));
+-      nic = efrm_nic_table.nic[nic_index];
++      nic = efrm_nic_tablep->nic[nic_index];
+       EFRM_ASSERT(nic);
+       next_i = ((current_ptr / sizeof(efhw_event_t)) &
+                 (virs->evq_capacity - 1));
+@@ -61,7 +61,7 @@
+ void efrm_eventq_reset(struct vi_resource *virs, int nic_index)
+ {
+-      struct efhw_nic *nic = efrm_nic_table.nic[nic_index];
++      struct efhw_nic *nic = efrm_nic_tablep->nic[nic_index];
+       int instance = EFRM_RESOURCE_INSTANCE(virs->rs.rs_handle);
+       EFRM_ASSERT(virs->evq_capacity != 0);
+@@ -217,16 +217,18 @@
+       }
+ }
+-void efrm_handle_wakeup_event(struct efhw_nic *nic, efhw_event_t *ev)
++void efrm_handle_wakeup_event(struct efhw_nic *nic, unsigned instance)
+ {
+-      efrm_eventq_do_callback(nic,
+-                              (unsigned int)FALCON_EVENT_WAKE_EVQ_ID(ev),
+-                              false);
++      efrm_eventq_do_callback(nic, instance, false);
+ }
+-void efrm_handle_timeout_event(struct efhw_nic *nic, efhw_event_t *ev)
++void efrm_handle_timeout_event(struct efhw_nic *nic, unsigned instance)
+ {
+-      efrm_eventq_do_callback(nic,
+-                              (unsigned int)FALCON_EVENT_WAKE_EVQ_ID(ev),
+-                              true);
++      efrm_eventq_do_callback(nic, instance, true);
+ }
++
++void efrm_handle_sram_event(struct efhw_nic *nic)
++{
++  if (nic->buf_commit_outstanding > 0)
++    nic->buf_commit_outstanding--;
++}
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/vi_resource_flush.c
+--- a/drivers/net/sfc/sfc_resource/vi_resource_flush.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/vi_resource_flush.c Tue Mar 31 11:59:10 2009 +0100
+@@ -409,7 +409,7 @@
+ }
+ void
+-efrm_handle_dmaq_flushed(struct efhw_nic *flush_nic, int instance,
++efrm_handle_dmaq_flushed(struct efhw_nic *flush_nic, unsigned instance,
+                        int rx_flush)
+ {
+       irq_flags_t lock_flags;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfc_resource/vi_resource_manager.c
+--- a/drivers/net/sfc/sfc_resource/vi_resource_manager.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/vi_resource_manager.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -76,7 +76,7 @@
+       struct list_head flush_pending;
+       irq_flags_t lock_flags;
+       int rc, i, n_evqs;
+-      unsigned dmaq_min, dmaq_max;
++      unsigned dmaq_min, dmaq_lim;
+       EFRM_ASSERT(rm_in_out);
+@@ -85,11 +85,11 @@
+       EFRM_ASSERT(dims);
+       EFRM_NOTICE("vi_resource_manager: evq_int=%u-%u evq_timer=%u-%u",
+-                  dims->evq_int_min, dims->evq_int_max,
+-                  dims->evq_timer_min, dims->evq_timer_max);
++                  dims->evq_int_min, dims->evq_int_lim,
++                  dims->evq_timer_min, dims->evq_timer_lim);
+       EFRM_NOTICE("vi_resource_manager: rxq=%u-%u txq=%u-%u",
+-                  dims->rxq_min, dims->rxq_max,
+-                  dims->txq_min, dims->txq_max);
++                  dims->rxq_min, dims->rxq_lim,
++                  dims->txq_min, dims->txq_lim);
+       efrm_vi_manager = kmalloc(sizeof(*efrm_vi_manager), GFP_KERNEL);
+       if (efrm_vi_manager == NULL) {
+@@ -102,12 +102,12 @@
+       efrm_vi_manager->iscsi_dmaq_instance_is_free = true;
+       dmaq_min = max(dims->rxq_min, dims->txq_min);
+-      dmaq_max = min(dims->rxq_max, dims->txq_max);
++      dmaq_lim = min(dims->rxq_lim, dims->txq_lim);
+       efrm_vi_manager->with_timer_base =
+           max(dmaq_min, dims->evq_timer_min);
+       efrm_vi_manager->with_timer_limit =
+-          min(dmaq_max, dims->evq_timer_max);
++          min(dmaq_lim, dims->evq_timer_lim);
+       rc = efrm_kfifo_id_ctor(&efrm_vi_manager->instances_with_timer,
+                               efrm_vi_manager->with_timer_base,
+                               efrm_vi_manager->with_timer_limit,
+@@ -118,7 +118,7 @@
+       efrm_vi_manager->with_interrupt_base =
+           max(dmaq_min, dims->evq_int_min);
+       efrm_vi_manager->with_interrupt_limit =
+-          min(dmaq_max, dims->evq_int_max);
++          min(dmaq_lim, dims->evq_int_lim);
+       efrm_vi_manager->with_interrupt_limit =
+               max(efrm_vi_manager->with_interrupt_limit,
+                   efrm_vi_manager->with_interrupt_base);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/sfe4001.c
+--- a/drivers/net/sfc/sfe4001.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/sfe4001.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -130,18 +130,18 @@
+       /* Turn off all power rails */
+       out = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
+       /* Disable port 1 outputs on IO expander */
+       cfg = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1);
+       /* Disable port 0 outputs on IO expander */
+       cfg = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1);
+       /* Clear any over-temperature alert */
+-      (void) efx_i2c_read(i2c, MAX6647, RSL, &in, EFX_BYTE);
++      (void) efx_i2c_read(i2c, MAX6647, RSL, &in, 1);
+ }
+ static int sfe4001_check_hw(struct efx_nic *efx)
+@@ -163,7 +163,7 @@
+       if (falcon_xaui_link_ok(efx))
+               return 0;
+-      rc = efx_i2c_read(i2c, PCA9539, P1_IN, &status, EFX_BYTE);
++      rc = efx_i2c_read(i2c, PCA9539, P1_IN, &status, 1);
+       status &= ((1 << P1_AFE_PWD_LBN) | (1 << P1_DSP_PWD25_LBN));
+       /* We know we can read from the IO expander because we did
+@@ -223,12 +223,12 @@
+       /* Set DSP over-temperature alert threshold */
+       EFX_INFO(efx, "DSP cut-out at %dC\n", xgphy_max_temperature);
+       rc = efx_i2c_write(i2c, MAX6647, WLHO,
+-                         &xgphy_max_temperature, EFX_BYTE);
++                         &xgphy_max_temperature, 1);
+       if (rc)
+               goto fail1;
+       /* Read it back and verify */
+-      rc = efx_i2c_read(i2c, MAX6647, RLHN, &in, EFX_BYTE);
++      rc = efx_i2c_read(i2c, MAX6647, RLHN, &in, 1);
+       if (rc)
+               goto fail1;
+       if (in != xgphy_max_temperature) {
+@@ -237,17 +237,17 @@
+       }
+       /* Clear any previous over-temperature alert */
+-      rc = efx_i2c_read(i2c, MAX6647, RSL, &in, EFX_BYTE);
++      rc = efx_i2c_read(i2c, MAX6647, RSL, &in, 1);
+       if (rc)
+               goto fail1;
+       /* Enable port 0 and port 1 outputs on IO expander */
+       cfg = 0x00;
+-      rc = efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, EFX_BYTE);
++      rc = efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1);
+       if (rc)
+               goto fail1;
+       cfg = 0xff & ~(1 << P1_SPARE_LBN);
+-      rc = efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, EFX_BYTE);
++      rc = efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1);
+       if (rc)
+               goto fail2;
+@@ -255,7 +255,7 @@
+       out = 0xff & ~((0 << P0_EN_1V2_LBN) | (0 << P0_EN_2V5_LBN) |
+                      (0 << P0_EN_3V3X_LBN) | (0 << P0_EN_5V_LBN) |
+                      (0 << P0_EN_1V0X_LBN));
+-      rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, EFX_BYTE);
++      rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
+       if (rc)
+               goto fail3;
+@@ -267,14 +267,14 @@
+                              (1 << P0_EN_3V3X_LBN) | (1 << P0_EN_5V_LBN) |
+                              (1 << P0_X_TRST_LBN));
+-              rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, EFX_BYTE);
++              rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
+               if (rc)
+                       goto fail3;
+               msleep(10);
+               /* Turn on 1V power rail */
+               out &= ~(1 << P0_EN_1V0X_LBN);
+-              rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, EFX_BYTE);
++              rc = efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
+               if (rc)
+                       goto fail3;
+@@ -283,7 +283,7 @@
+               schedule_timeout_uninterruptible(HZ);
+               /* Check DSP is powered */
+-              rc = efx_i2c_read(i2c, PCA9539, P1_IN, &in, EFX_BYTE);
++              rc = efx_i2c_read(i2c, PCA9539, P1_IN, &in, 1);
+               if (rc)
+                       goto fail3;
+               if (in & (1 << P1_AFE_PWD_LBN))
+@@ -302,14 +302,14 @@
+ fail3:
+       /* Turn off all power rails */
+       out = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
+       /* Disable port 1 outputs on IO expander */
+       out = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, 1);
+ fail2:
+       /* Disable port 0 outputs on IO expander */
+       out = 0xff;
+-      (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, EFX_BYTE);
++      (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &out, 1);
+ fail1:
+       return rc;
+ }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/tenxpress.c
+--- a/drivers/net/sfc/tenxpress.c      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/tenxpress.c      Tue Mar 31 11:59:10 2009 +0100
+@@ -574,10 +574,8 @@
+       link_ok = phy_up && tenxpress_link_ok(efx, 1);
+-      if (link_ok != efx->link_up) {
+-              efx->link_up = link_ok;
++      if (link_ok != efx->link_up)
+               efx->mac_op->fake_phy_event(efx);
+-      }
+       /* Nothing to check if we've already shut down the PHY */
+       if (!phy_up)
+@@ -652,7 +650,7 @@
+       soft_rst2 = mdio_clause45_read(efx, phy, MDIO_MMD_PCS,
+                                      PCS_SOFT_RST2_REG);
+-      /* Modify => put in reset */
++      /* Put in reset */
+       test_select &= ~(1 << CLK312_EN_LBN);
+       mdio_clause45_write(efx, phy, MDIO_MMD_PCS,
+                           PCS_TEST_SELECT_REG, test_select);
+@@ -666,7 +664,7 @@
+                           PCS_CLOCK_CTRL_REG, clk_ctrl);
+       udelay(10);
+-      /* Modify => remove reset */
++      /* Remove reset */
+       clk_ctrl |= (1 << PLL312_RST_N_LBN);
+       mdio_clause45_write(efx, phy, MDIO_MMD_PCS,
+                           PCS_CLOCK_CTRL_REG, clk_ctrl);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/tx.c
+--- a/drivers/net/sfc/tx.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/tx.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -61,8 +61,7 @@
+       EFX_TRACE(efx, "stop TX queue\n");
+       atomic_inc(&efx->netif_stop_count);
+-      if (likely(efx->net_dev_registered))
+-              netif_stop_queue(efx->net_dev);
++      netif_stop_queue(efx->net_dev);
+       spin_unlock_bh(&efx->netif_stop_lock);
+ }
+@@ -77,12 +76,35 @@
+       if (atomic_dec_and_lock(&efx->netif_stop_count,
+                               &efx->netif_stop_lock)) {
+               EFX_TRACE(efx, "waking TX queue\n");
+-              if (likely(efx->net_dev_registered))
+-                      netif_wake_queue(efx->net_dev);
++              netif_wake_queue(efx->net_dev);
+               spin_unlock(&efx->netif_stop_lock);
+       }
+       local_bh_enable();
+ }
++
++static inline void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
++                                    struct efx_tx_buffer *buffer)
++{
++      if (buffer->unmap_len) {
++              struct pci_dev *pci_dev = tx_queue->efx->pci_dev;
++              if (buffer->unmap_single)
++                      pci_unmap_single(pci_dev, buffer->unmap_addr,
++                                       buffer->unmap_len, PCI_DMA_TODEVICE);
++              else
++                      pci_unmap_page(pci_dev, buffer->unmap_addr,
++                                     buffer->unmap_len, PCI_DMA_TODEVICE);
++              buffer->unmap_len = 0;
++              buffer->unmap_single = 0;
++      }
++
++      if (buffer->skb) {
++              dev_kfree_skb_any((struct sk_buff *) buffer->skb);
++              buffer->skb = NULL;
++              EFX_TRACE(tx_queue->efx, "TX queue %d transmission id %x "
++                        "complete\n", tx_queue->queue, read_ptr);
++      }
++}
++
+ /*
+  * Add a socket buffer to a TX queue
+@@ -239,17 +261,7 @@
+               --tx_queue->insert_count;
+               insert_ptr = tx_queue->insert_count & efx->type->txd_ring_mask;
+               buffer = &tx_queue->buffer[insert_ptr];
+-              if (buffer->unmap_len) {
+-                      if (buffer->unmap_single)
+-                              pci_unmap_single(pci_dev, buffer->unmap_addr,
+-                                               buffer->unmap_len,
+-                                               PCI_DMA_TODEVICE);
+-                      else
+-                              pci_unmap_page(pci_dev, buffer->unmap_addr,
+-                                             buffer->unmap_len,
+-                                             PCI_DMA_TODEVICE);
+-              }
+-              buffer->unmap_len = 0;
++              efx_dequeue_buffer(tx_queue, buffer);
+               buffer->len = 0;
+       }
+@@ -269,56 +281,30 @@
+ static inline void efx_dequeue_buffers(struct efx_tx_queue *tx_queue,
+                                      unsigned int index)
+ {
+-      struct pci_dev *pci_dev = tx_queue->efx->pci_dev;
+-      struct efx_tx_buffer *buffer;
++      struct efx_nic *efx = tx_queue->efx;
+       unsigned int stop_index, read_ptr;
++      unsigned int mask = tx_queue->efx->type->txd_ring_mask;
+-      /* Calculate the stopping point.  Doing the check this way
+-       * avoids wrongly completing every buffer in the ring if we
+-       * get called twice with the same index.  (Hardware should
+-       * never do this, since it can't complete that many buffers in
+-       * one go.)
+-       */
+-      stop_index = (index + 1) & tx_queue->efx->type->txd_ring_mask;
+-      read_ptr = tx_queue->read_count & tx_queue->efx->type->txd_ring_mask;
++      stop_index = (index + 1) & mask;
++      read_ptr = tx_queue->read_count & mask;
+       while (read_ptr != stop_index) {
+-              buffer = &tx_queue->buffer[read_ptr];
++              struct efx_tx_buffer *buffer = &tx_queue->buffer[read_ptr];
+               if (unlikely(buffer->len == 0)) {
+                       EFX_ERR(tx_queue->efx, "TX queue %d spurious TX "
+                               "completion id %x\n", tx_queue->queue,
+                               read_ptr);
+-                      atomic_inc(&tx_queue->efx->errors.spurious_tx);
+-                      /* Don't reset */
+-              } else {
+-                      if (buffer->unmap_len) {
+-                              if (buffer->unmap_single)
+-                                      pci_unmap_single(pci_dev,
+-                                                       buffer->unmap_addr,
+-                                                       buffer->unmap_len,
+-                                                       PCI_DMA_TODEVICE);
+-                              else
+-                                      pci_unmap_page(pci_dev,
+-                                                     buffer->unmap_addr,
+-                                                     buffer->unmap_len,
+-                                                     PCI_DMA_TODEVICE);
+-                              buffer->unmap_single = 0;
+-                              buffer->unmap_len = 0;
+-                      }
+-                      if (buffer->skb) {
+-                              dev_kfree_skb_any((struct sk_buff *)
+-                                                buffer->skb);
+-                              buffer->skb = NULL;
+-                              EFX_TRACE(tx_queue->efx, "TX queue %d "
+-                                        "transmission id %x complete\n",
+-                                        tx_queue->queue, read_ptr);
+-                      }
+-                      buffer->continuation = 1;
+-                      buffer->len = 0;
++                      atomic_inc(&efx->errors.spurious_tx);
++                      efx_schedule_reset(efx, RESET_TYPE_TX_SKIP);
++                      return;
+               }
++
++              efx_dequeue_buffer(tx_queue, buffer);
++              buffer->continuation = 1;
++              buffer->len = 0;
++
+               ++tx_queue->read_count;
+-              read_ptr = (tx_queue->read_count &
+-                          tx_queue->efx->type->txd_ring_mask);
++              read_ptr = tx_queue->read_count & mask;
+       }
+ }
+@@ -385,13 +371,8 @@
+       return rc;
+ }
+-#if defined(EFX_USE_FASTCALL)
+ void fastcall efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
+-#else
+-void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
+-#endif
+ {
+-      unsigned long flags __attribute__ ((unused));
+       unsigned fill_level;
+       struct efx_nic *efx = tx_queue->efx;
+@@ -407,11 +388,7 @@
+       if (unlikely(tx_queue->stopped)) {
+               fill_level = tx_queue->insert_count - tx_queue->read_count;
+               if (fill_level < EFX_NETDEV_TX_THRESHOLD(tx_queue)) {
+-                      /* If the port is stopped and the net_dev isn't
+-                       * registered, then the caller must be performing
+-                       * flow control manually */
+-                      if (unlikely(!efx->net_dev_registered))
+-                              return;
++                      EFX_BUG_ON_PARANOID(!NET_DEV_REGISTERED(efx));
+                       /* Do this under netif_tx_lock(), to avoid racing
+                        * with efx_xmit(). */
+@@ -464,8 +441,6 @@
+ {
+       EFX_LOG(tx_queue->efx, "initialising TX queue %d\n", tx_queue->queue);
+-      ASSERT_RTNL();
+-
+       /* Initialise fields */
+       tx_queue->insert_count = 0;
+       tx_queue->write_count = 0;
+@@ -479,22 +454,26 @@
+ void efx_release_tx_buffers(struct efx_tx_queue *tx_queue)
+ {
+-      unsigned int last_index, mask;
+-      if (tx_queue->buffer) {
+-              /* Free any buffers left in the ring */
+-              mask = tx_queue->efx->type->txd_ring_mask;
+-              last_index = (tx_queue->insert_count - 1) & mask;
+-              EFX_LOG(tx_queue->efx, "Will dequeue up to 0x%x from 0x%x\n",
+-                      last_index, tx_queue->read_count & mask);
+-              efx_dequeue_buffers(tx_queue, last_index);
++      struct efx_tx_buffer *buffer;
++
++      if (!tx_queue->buffer)
++              return;
++
++      /* Free any buffers left in the ring */
++      while (tx_queue->read_count != tx_queue->write_count) {
++              buffer = &tx_queue->buffer[tx_queue->read_count &
++                                         tx_queue->efx->type->txd_ring_mask];
++              efx_dequeue_buffer(tx_queue, buffer);
++              buffer->continuation = 1;
++              buffer->len = 0;
++
++              ++tx_queue->read_count;
+       }
+ }
+ void efx_fini_tx_queue(struct efx_tx_queue *tx_queue)
+ {
+       EFX_LOG(tx_queue->efx, "shutting down TX queue %d\n", tx_queue->queue);
+-
+-      ASSERT_RTNL();
+       /* Flush TX queue, remove descriptor ring */
+       falcon_fini_tx(tx_queue);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/txc43128_phy.c
+--- a/drivers/net/sfc/txc43128_phy.c   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/txc43128_phy.c   Tue Mar 31 11:59:10 2009 +0100
+@@ -653,10 +653,9 @@
+       int link_up = txc43128_phy_read_link(efx);
+       /* Simulate a PHY event if link state has changed */
+-      if (link_up != efx->link_up) {
+-              efx->link_up = link_up;
++      if (link_up != efx->link_up)
+               efx->mac_op->fake_phy_event(efx);
+-      } else if (EFX_WORKAROUND_10934(efx)) {
++      else if (EFX_WORKAROUND_10934(efx)) {
+               if (link_up || (efx->loopback_mode != LOOPBACK_NONE))
+                       data->bug10934_timer = jiffies;
+               else {
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/workarounds.h
+--- a/drivers/net/sfc/workarounds.h    Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/workarounds.h    Tue Mar 31 11:59:10 2009 +0100
+@@ -34,7 +34,7 @@
+ #define EFX_WORKAROUND_ALWAYS(efx) 1
+ #define EFX_WORKAROUND_FALCON_A(efx) (FALCON_REV(efx) <= FALCON_REV_A1)
+ #define EFX_WORKAROUND_FALCON_B0FPGA(efx) \
+-      (FALCON_REV(efx) == FALCON_REV_B0 && !(efx)->is_asic)
++      (FALCON_REV(efx) >= FALCON_REV_B0 && !(efx)->is_asic)
+ /* XAUI resets if link not detected */
+ #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS
+@@ -67,6 +67,8 @@
+ #define EFX_WORKAROUND_11482 EFX_WORKAROUND_ALWAYS
+ /* Flush events can take a very long time to appear */
+ #define EFX_WORKAROUND_11557 EFX_WORKAROUND_ALWAYS
++/* 10Xpress is sensitive to unstable XAUI sync when going into loopback */
++#define EFX_WORKAROUND_11667 EFX_WORKAROUND_ALWAYS
+ /* Spurious parity errors in TSORT buffers */
+ #define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/net/sfc/xfp_phy.c
+--- a/drivers/net/sfc/xfp_phy.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/net/sfc/xfp_phy.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -114,11 +114,12 @@
+       phy_data->tx_disabled = efx->tx_disabled;
+       rc = xfp_reset_phy(efx);
++
++      EFX_INFO(efx, "XFP: PHY init %s.\n",
++               rc ? "failed" : "successful");
+       if (rc < 0)
+               goto fail;
+-      EFX_INFO(efx, "XFP: PHY init %s.\n",
+-               rc ? "failed" : "successful");
+       return 0;
+  fail:
+@@ -142,10 +143,8 @@
+       int rc = 0;
+       int link_up = xfp_link_ok(efx);
+       /* Simulate a PHY event if link state has changed */
+-      if (link_up != efx->link_up) {
+-              efx->link_up = link_up;
++      if (link_up != efx->link_up)
+               efx->mac_op->fake_phy_event(efx);
+-      }
+       rc = efx->board_info.monitor(efx);
+       if (rc) {
+@@ -192,15 +191,13 @@
+ }
+ struct efx_phy_operations falcon_xfp_phy_ops = {
+-      .init            = xfp_phy_init,
+-      .reconfigure     = xfp_phy_reconfigure,
+-      .check_hw        = xfp_phy_check_hw,
+-      .fini            = xfp_phy_fini,
+-      .clear_interrupt = xfp_phy_clear_interrupt,
+-      .reset_xaui      = efx_port_dummy_op_void,
+-      .mmds            = XFP_REQUIRED_DEVS,
+-      .loopbacks       = XFP_LOOPBACKS,
+-      /* No loopback appears to be reliable enough for self-test
+-       * operation. So don't do it. */
++      .init             = xfp_phy_init,
++      .reconfigure      = xfp_phy_reconfigure,
++      .check_hw         = xfp_phy_check_hw,
++      .fini             = xfp_phy_fini,
++      .clear_interrupt  = xfp_phy_clear_interrupt,
++      .reset_xaui       = efx_port_dummy_op_void,
++      .mmds             = XFP_REQUIRED_DEVS,
++      .loopbacks        = XFP_LOOPBACKS,
+       .startup_loopback = LOOPBACK_PCS,
+ };
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/accel.c
+--- a/drivers/xen/sfc_netback/accel.c  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/accel.c  Tue Mar 31 11:59:10 2009 +0100
+@@ -38,7 +38,9 @@
+       struct net_device *net_dev = (struct net_device *)ptr;
+       struct netback_accel *bend;
+-      if ((event == NETDEV_UP) || (event == NETDEV_DOWN)) {
++      if ((event == NETDEV_UP) || 
++          (event == NETDEV_DOWN) ||
++          (event == NETDEV_CHANGE)) {
+               mutex_lock(&bend_list_mutex);
+               bend = bend_list;
+               while (bend != NULL) {
+@@ -51,9 +53,16 @@
+                       if (bend->shared_page == NULL)
+                               goto next;
+-                      if (bend->net_dev->ifindex == net_dev->ifindex)
+-                              netback_accel_set_interface_state
+-                                      (bend, event == NETDEV_UP);
++                      if (bend->net_dev->ifindex == net_dev->ifindex) {
++                              int ok;
++                              if (event == NETDEV_CHANGE)
++                                      ok = (netif_carrier_ok(net_dev) && 
++                                            (net_dev->flags & IFF_UP));
++                              else
++                                      ok = (netif_carrier_ok(net_dev) && 
++                                            (event == NETDEV_UP));
++                              netback_accel_set_interface_state(bend, ok);
++                      }
+               next:
+                       mutex_unlock(&bend->bend_mutex);
+@@ -86,22 +95,31 @@
+ #endif
+       rc = netback_accel_init_fwd();
++      if (rc != 0)
++              goto fail0;
+-      if (rc == 0)
+-              netback_accel_debugfs_init();
++      netback_accel_debugfs_init();
+-      if (rc == 0)
+-              rc = netback_accel_sf_init();
++      rc = netback_accel_sf_init();
++      if (rc != 0)
++              goto fail1;
+-      if (rc == 0)
+-              rc = register_netdevice_notifier
+-                      (&netback_accel_netdev_notifier);
++      rc = register_netdevice_notifier
++              (&netback_accel_netdev_notifier);
++      if (rc != 0)
++              goto fail2;
+-      /*
+-       * What if no device was found, shouldn't we clean up stuff
+-       * we've allocated for acceleration subsystem?
+-       */
++      return 0;
++ fail2:
++      netback_accel_sf_shutdown();
++ fail1:
++      netback_accel_debugfs_fini();
++      netback_accel_shutdown_fwd();
++ fail0:
++#ifdef EFX_GCOV
++      gcov_provider_fini(THIS_MODULE);
++#endif
+       return rc;
+ }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/accel_solarflare.c
+--- a/drivers/xen/sfc_netback/accel_solarflare.c       Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/accel_solarflare.c       Tue Mar 31 11:59:10 2009 +0100
+@@ -170,25 +170,16 @@
+  */
+ static int efx_device_to_efab_nic_index(struct efx_dl_device *efx_dl_dev) 
+ {
+-      int i;
++      int i, rc = -1;
++      struct efhw_nic *nic;
+-      for (i = 0; i < EFHW_MAX_NR_DEVS; i++) {
+-              struct efhw_nic *nic = efrm_nic_table.nic[i];
+-
+-              /*
+-               * It's possible for the nic structure to have not
+-               * been initialised if the resource driver failed its
+-               * driverlink probe
+-               */ 
+-              if (nic == NULL || nic->net_driver_dev == NULL)
+-                      continue;
+-
+-              /* Work out if these are talking about the same NIC */
+-              if (nic->net_driver_dev->pci_dev == efx_dl_dev->pci_dev)
+-                      return i;
++      EFRM_FOR_EACH_NIC(i, nic) {
++              if (nic != NULL && nic->net_driver_dev != NULL &&
++                  nic->net_driver_dev->pci_dev == efx_dl_dev->pci_dev)
++                      rc = i;
+       }
+-      return -1;
++      return rc;
+ }
+@@ -600,9 +591,6 @@
+               return rc;
+       }
+-      if (res_mdata.version != 0)
+-              return -EPROTO;
+-
+       hwinfo->nic_arch = res_mdata.nic_arch;
+       hwinfo->nic_variant = res_mdata.nic_variant;
+       hwinfo->nic_revision = res_mdata.nic_revision;
+@@ -648,38 +636,57 @@
+       }
+       VPRINTK("Passing txdmaq page pfn %lx\n", txdmaq_pfn);
+-      accel_hw_priv->txdmaq_gnt = hwinfo->txdmaq_gnt = 
+-              net_accel_grant_page(bend->hdev_data, pfn_to_mfn(txdmaq_pfn), 
+-                                   0);
++      rc = net_accel_grant_page(bend->hdev_data, pfn_to_mfn(txdmaq_pfn), 0);
++      if (rc < 0)
++              goto fail0;
++      accel_hw_priv->txdmaq_gnt = hwinfo->txdmaq_gnt = rc;
+       VPRINTK("Passing rxdmaq page pfn %lx\n", rxdmaq_pfn);
+-      accel_hw_priv->rxdmaq_gnt = hwinfo->rxdmaq_gnt = 
+-              net_accel_grant_page(bend->hdev_data, pfn_to_mfn(rxdmaq_pfn), 
+-                                   0);
++      rc = net_accel_grant_page(bend->hdev_data, pfn_to_mfn(rxdmaq_pfn), 0);
++      if (rc < 0)
++              goto fail1;
++      accel_hw_priv->rxdmaq_gnt = hwinfo->rxdmaq_gnt = rc;
+       VPRINTK("Passing doorbell page mfn %x\n", hwinfo->doorbell_mfn);
+       /* Make the relevant H/W pages mappable by the far end */
+-      accel_hw_priv->doorbell_gnt = hwinfo->doorbell_gnt = 
+-              net_accel_grant_page(bend->hdev_data, hwinfo->doorbell_mfn, 1);
++      rc = net_accel_grant_page(bend->hdev_data, hwinfo->doorbell_mfn, 1);
++      if (rc < 0)
++              goto fail2;
++      accel_hw_priv->doorbell_gnt = hwinfo->doorbell_gnt = rc;
+       
+       /* Now do the same for the memory pages */
+       /* Convert the page + length we got back for the evq to grants. */
+       for (i = 0; i < accel_hw_priv->evq_npages; i++) {
+-              accel_hw_priv->evq_mem_gnts[i] = hwinfo->evq_mem_gnts[i] =
+-                      net_accel_grant_page(bend->hdev_data, pfn_to_mfn(pfn), 0);
++              rc = net_accel_grant_page(bend->hdev_data, pfn_to_mfn(pfn), 0);
++              if (rc < 0)
++                      goto fail3;
++              accel_hw_priv->evq_mem_gnts[i] = hwinfo->evq_mem_gnts[i] = rc;
++
+               VPRINTK("Got grant %u for evq pfn %x\n", hwinfo->evq_mem_gnts[i], 
+                       pfn);
+               pfn++;
+       }
+       return 0;
++
++ fail3:
++      for (i = i - 1; i >= 0; i--) {
++              ungrant_or_crash(accel_hw_priv->evq_mem_gnts[i], bend->far_end);
++      }
++      ungrant_or_crash(accel_hw_priv->doorbell_gnt, bend->far_end);
++ fail2:
++      ungrant_or_crash(accel_hw_priv->rxdmaq_gnt, bend->far_end);
++ fail1:
++      ungrant_or_crash(accel_hw_priv->txdmaq_gnt, bend->far_end);     
++ fail0:
++      return rc;
+ }
+ static int ef_bend_hwinfo_falcon_a(struct netback_accel *bend, 
+                                  struct net_accel_hw_falcon_a *hwinfo)
+ {
+-      int rc;
++      int rc, i;
+       struct falcon_bend_accel_priv *accel_hw_priv = bend->accel_hw_priv;
+       if ((rc = ef_bend_hwinfo_falcon_common(bend, &hwinfo->common)) != 0)
+@@ -695,8 +702,17 @@
+               hwinfo->common.evq_rptr);
+       rc = net_accel_grant_page(bend->hdev_data, 
+                                 hwinfo->common.evq_rptr >> PAGE_SHIFT, 0);
+-      if (rc < 0)
++      if (rc < 0) {
++              /* Undo ef_bend_hwinfo_falcon_common() */
++              ungrant_or_crash(accel_hw_priv->txdmaq_gnt, bend->far_end);
++              ungrant_or_crash(accel_hw_priv->rxdmaq_gnt, bend->far_end);
++              ungrant_or_crash(accel_hw_priv->doorbell_gnt, bend->far_end);
++              for (i = 0; i < accel_hw_priv->evq_npages; i++) {
++                      ungrant_or_crash(accel_hw_priv->evq_mem_gnts[i],
++                                       bend->far_end);
++              }
+               return rc;
++      }
+       accel_hw_priv->evq_rptr_gnt = hwinfo->evq_rptr_gnt = rc;
+       VPRINTK("evq_rptr_gnt got %d\n", hwinfo->evq_rptr_gnt);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/accel_xenbus.c
+--- a/drivers/xen/sfc_netback/accel_xenbus.c   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/accel_xenbus.c   Tue Mar 31 11:59:10 2009 +0100
+@@ -240,7 +240,8 @@
+       /* Initialise the shared page(s) used for comms */
+       net_accel_msg_init_page(bend->shared_page, PAGE_SIZE, 
+-                              bend->net_dev->flags & IFF_UP);
++                              (bend->net_dev->flags & IFF_UP) && 
++                              (netif_carrier_ok(bend->net_dev)));
+       msgs_per_queue = (PAGE_SIZE/2) / sizeof(struct net_accel_msg);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h
+--- a/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -190,8 +190,6 @@
+ /*! Constants for the type field in efx_vi_hw_resource */
+ #define EFX_VI_HW_RESOURCE_TXDMAQ    0x0      /* PFN of TX DMA Q */
+ #define EFX_VI_HW_RESOURCE_RXDMAQ    0x1      /* PFN of RX DMA Q */
+-#define EFX_VI_HW_RESOURCE_TXBELL    0x2      /* PFN of TX Doorbell (EF1) */
+-#define EFX_VI_HW_RESOURCE_RXBELL    0x3      /* PFN of RX Doorbell (EF1) */
+ #define EFX_VI_HW_RESOURCE_EVQTIMER  0x4      /* Address of event q timer */
+ /* Address of event q pointer (EF1) */
+@@ -229,7 +227,6 @@
+  * Metadata concerning the list of hardware resource mappings
+  */
+ struct efx_vi_hw_resource_metadata {
+-      int version;
+       int evq_order;
+       int evq_offs;
+       int evq_capacity;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efhw/common.h
+--- a/drivers/xen/sfc_netback/ci/efhw/common.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/common.h Tue Mar 31 11:59:10 2009 +0100
+@@ -56,10 +56,6 @@
+               uint32_t a;
+               uint32_t b;
+       } opaque;
+-      struct {
+-              uint32_t code;
+-              uint32_t status;
+-      } ev1002;
+ } efhw_event_t;
+ /* Flags for TX/RX queues */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
+--- a/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Tue Mar 31 11:59:10 2009 +0100
+@@ -52,8 +52,12 @@
+ /* Linux kernel also does not provide PRIx32... Sigh. */
+ #define PRIx32 "x"
+-#define PRIx64 "llx"
+-
++ 
++#ifdef __ia64__
++# define PRIx64 "lx"
++#else
++# define PRIx64 "llx"
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+ enum {
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efhw/efhw_types.h
+--- a/drivers/xen/sfc_netback/ci/efhw/efhw_types.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/efhw_types.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -45,14 +45,6 @@
+ /*--------------------------------------------------------------------
+  *
+- * hardware limits used in the types
+- *
+- *--------------------------------------------------------------------*/
+-
+-#define EFHW_KEVENTQ_MAX    8
+-
+-/*--------------------------------------------------------------------
+- *
+  * forward type declarations
+  *
+  *--------------------------------------------------------------------*/
+@@ -72,7 +64,7 @@
+ struct eventq_resource_hardware {
+       /*!iobuffer allocated for eventq - can be larger than eventq */
+-      efhw_iopages_t iobuff;
++      struct efhw_iopages iobuff;
+       unsigned iobuff_off;
+       struct efhw_buffer_table_allocation buf_tbl_alloc;
+       int capacity;           /*!< capacity of event queue */
+@@ -85,7 +77,7 @@
+  *--------------------------------------------------------------------*/
+ struct efhw_keventq {
+-      volatile int lock;
++      int lock;
+       caddr_t evq_base;
+       int32_t evq_ptr;
+       uint32_t evq_mask;
+@@ -115,7 +107,7 @@
+       /*! initialise all hardware functional units */
+       int (*init_hardware) (struct efhw_nic *nic,
+                             struct efhw_ev_handler *,
+-                            const uint8_t *mac_addr);
++                            const uint8_t *mac_addr, int non_irq_evq);
+   /*-------------- Interrupt support  ------------ */
+@@ -130,17 +122,17 @@
+        */
+       int (*interrupt) (struct efhw_nic *nic);
+-      /*! Enable given interrupt mask for the given IRQ unit */
+-      void (*interrupt_enable) (struct efhw_nic *nic, uint idx);
++      /*! Enable the interrupt */
++      void (*interrupt_enable) (struct efhw_nic *nic);
+-      /*! Disable given interrupt mask for the given IRQ unit */
+-      void (*interrupt_disable) (struct efhw_nic *nic, uint idx);
++      /*! Disable the interrupt */
++      void (*interrupt_disable) (struct efhw_nic *nic);
+       /*! Set interrupt moderation strategy for the given IRQ unit
+        ** val is in usec
+        */
+       void (*set_interrupt_moderation)(struct efhw_nic *nic,
+-                                       uint idx, uint val);
++                                       uint val);
+   /*-------------- Event support  ------------ */
+@@ -255,8 +247,8 @@
+ /*! */
+ struct efhw_nic {
+-      /*! zero base index in efrm_nic_table.nic array */
+-      volatile int index;
++      /*! zero base index in efrm_nic_tablep->nic array */
++      int index;
+       int ifindex;            /*!< OS level nic index */
+ #ifdef HAS_NET_NAMESPACE
+       struct net *nd_net;
+@@ -283,7 +275,7 @@
+       /* hardware resources */
+       /*! I/O address of the start of the bar */
+-      efhw_ioaddr_t bar_ioaddr;
++      volatile char __iomem *bar_ioaddr;
+       /*! Bar number of control aperture. */
+       unsigned ctr_ap_bar;
+@@ -312,14 +304,17 @@
+       void (*irq_handler) (struct efhw_nic *, int unit);
+       /*! event queues per driver */
+-      struct efhw_keventq evq[EFHW_KEVENTQ_MAX];
++      struct efhw_keventq interrupting_evq;
+ /* for marking when we are not using an IRQ unit
+       - 0 is a valid offset to an IRQ unit on EF1! */
+ #define EFHW_IRQ_UNIT_UNUSED  0xffff
+-      /*! interrupt unit in use  */
+-      unsigned int irq_unit[EFHW_KEVENTQ_MAX];
+-      efhw_iopage_t irq_iobuff;       /*!<  Falcon SYSERR interrupt */
++      /*! interrupt unit in use for the interrupting event queue  */
++      unsigned int irq_unit;
++
++      struct efhw_keventq non_interrupting_evq;
++
++      struct efhw_iopage irq_iobuff;  /*!<  Falcon SYSERR interrupt */
+       /* The new driverlink infrastructure. */
+       struct efx_dl_device *net_driver_dev;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h
+--- a/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h        Tue Mar 31 11:59:10 2009 +0100
+@@ -50,6 +50,10 @@
+ #error Unknown endianness
+ #endif
++#ifndef __iomem
++#define __iomem
++#endif
++
+ #ifndef mmiowb
+       #if defined(__i386__) || defined(__x86_64__)
+               #define mmiowb()
+@@ -63,10 +67,8 @@
+       #endif
+ #endif
+-typedef char *efhw_ioaddr_t;
+-
+ #ifndef readq
+-static inline uint64_t __readq(void __iomem *addr)
++static inline uint64_t __readq(volatile void __iomem *addr)
+ {
+       return *(volatile uint64_t *)addr;
+ }
+@@ -74,7 +76,7 @@
+ #endif
+ #ifndef writeq
+-static inline void __writeq(uint64_t v, void __iomem *addr)
++static inline void __writeq(uint64_t v, volatile void __iomem *addr)
+ {
+       *(volatile uint64_t *)addr = v;
+ }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efhw/iopage_types.h
+--- a/drivers/xen/sfc_netback/ci/efhw/iopage_types.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/iopage_types.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -3,7 +3,8 @@
+  *          resource management for Xen backend, OpenOnload, etc
+  *           (including support for SFE4001 10GBT NIC)
+  *
+- * This file provides efhw_page_t and efhw_iopage_t for Linux kernel.
++ * This file provides struct efhw_page and struct efhw_iopage for Linux
++ * kernel.
+  *
+  * Copyright 2005-2007: Solarflare Communications Inc,
+  *                      9501 Jeronimo Road, Suite 250,
+@@ -38,77 +39,83 @@
+ #ifndef __CI_EFHW_IOPAGE_LINUX_H__
+ #define __CI_EFHW_IOPAGE_LINUX_H__
++#include <linux/version.h>
+ #include <linux/gfp.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ #include <linux/hardirq.h>
++#else
++#include <asm/hardirq.h>
++#endif
++#include <linux/errno.h>
+ #include <ci/efhw/debug.h>
+ /*--------------------------------------------------------------------
+  *
+- * efhw_page_t: A single page of memory.  Directly mapped in the driver,
+- * and can be mapped to userlevel.
++ * struct efhw_page: A single page of memory.  Directly mapped in the
++ * driver, and can be mapped to userlevel.
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
++struct efhw_page {
+       unsigned long kva;
+-} efhw_page_t;
++};
+-static inline int efhw_page_alloc(efhw_page_t *p)
++static inline int efhw_page_alloc(struct efhw_page *p)
+ {
+       p->kva = __get_free_page(in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
+       return p->kva ? 0 : -ENOMEM;
+ }
+-static inline int efhw_page_alloc_zeroed(efhw_page_t *p)
++static inline int efhw_page_alloc_zeroed(struct efhw_page *p)
+ {
+       p->kva = get_zeroed_page(in_interrupt()? GFP_ATOMIC : GFP_KERNEL);
+       return p->kva ? 0 : -ENOMEM;
+ }
+-static inline void efhw_page_free(efhw_page_t *p)
++static inline void efhw_page_free(struct efhw_page *p)
+ {
+       free_page(p->kva);
+       EFHW_DO_DEBUG(memset(p, 0, sizeof(*p)));
+ }
+-static inline char *efhw_page_ptr(efhw_page_t *p)
++static inline char *efhw_page_ptr(struct efhw_page *p)
+ {
+       return (char *)p->kva;
+ }
+-static inline unsigned efhw_page_pfn(efhw_page_t *p)
++static inline unsigned efhw_page_pfn(struct efhw_page *p)
+ {
+       return (unsigned)(__pa(p->kva) >> PAGE_SHIFT);
+ }
+-static inline void efhw_page_mark_invalid(efhw_page_t *p)
++static inline void efhw_page_mark_invalid(struct efhw_page *p)
+ {
+       p->kva = 0;
+ }
+-static inline int efhw_page_is_valid(efhw_page_t *p)
++static inline int efhw_page_is_valid(struct efhw_page *p)
+ {
+       return p->kva != 0;
+ }
+-static inline void efhw_page_init_from_va(efhw_page_t *p, void *va)
++static inline void efhw_page_init_from_va(struct efhw_page *p, void *va)
+ {
+       p->kva = (unsigned long)va;
+ }
+ /*--------------------------------------------------------------------
+  *
+- * efhw_iopage_t: A single page of memory.  Directly mapped in the driver,
++ * struct efhw_iopage: A single page of memory.  Directly mapped in the driver,
+  * and can be mapped to userlevel.  Can also be accessed by the NIC.
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
+-      efhw_page_t p;
++struct efhw_iopage {
++      struct efhw_page p;
+       dma_addr_t dma_addr;
+-} efhw_iopage_t;
++};
+-static inline dma_addr_t efhw_iopage_dma_addr(efhw_iopage_t *p)
++static inline dma_addr_t efhw_iopage_dma_addr(struct efhw_iopage *p)
+ {
+       return p->dma_addr;
+ }
+@@ -120,9 +127,9 @@
+ /*--------------------------------------------------------------------
+  *
+- * efhw_iopages_t: A set of pages that are contiguous in physical memory.
+- * Directly mapped in the driver, and can be mapped to userlevel.  Can also
+- * be accessed by the NIC.
++ * struct efhw_iopages: A set of pages that are contiguous in physical
++ * memory.  Directly mapped in the driver, and can be mapped to userlevel.
++ * Can also be accessed by the NIC.
+  *
+  * NB. The O/S may be unwilling to allocate many, or even any of these.  So
+  * only use this type where the NIC really needs a physically contiguous
+@@ -130,44 +137,44 @@
+  *
+  *--------------------------------------------------------------------*/
+-typedef struct {
++struct efhw_iopages {
+       caddr_t kva;
+       unsigned order;
+       dma_addr_t dma_addr;
+-} efhw_iopages_t;
++};
+-static inline caddr_t efhw_iopages_ptr(efhw_iopages_t *p)
++static inline caddr_t efhw_iopages_ptr(struct efhw_iopages *p)
+ {
+       return p->kva;
+ }
+-static inline unsigned efhw_iopages_pfn(efhw_iopages_t *p)
++static inline unsigned efhw_iopages_pfn(struct efhw_iopages *p)
+ {
+       return (unsigned)(__pa(p->kva) >> PAGE_SHIFT);
+ }
+-static inline dma_addr_t efhw_iopages_dma_addr(efhw_iopages_t *p)
++static inline dma_addr_t efhw_iopages_dma_addr(struct efhw_iopages *p)
+ {
+       return p->dma_addr;
+ }
+-static inline unsigned efhw_iopages_size(efhw_iopages_t *p)
++static inline unsigned efhw_iopages_size(struct efhw_iopages *p)
+ {
+       return 1u << (p->order + PAGE_SHIFT);
+ }
+-/* efhw_iopage_t <-> efhw_iopages_t conversions for handling physically
+- * contiguous allocations in iobufsets for iSCSI.  This allows the
+- * essential information about contiguous allocations from
+- * efhw_iopages_alloc() to be saved away in the efhw_iopage_t array in an
+- * iobufset.  (Changing the iobufset resource to use a union type would
++/* struct efhw_iopage <-> struct efhw_iopages conversions for handling
++ * physically contiguous allocations in iobufsets for iSCSI.  This allows
++ * the essential information about contiguous allocations from
++ * efhw_iopages_alloc() to be saved away in the struct efhw_iopage array in
++ * an iobufset.  (Changing the iobufset resource to use a union type would
+  * involve a lot of code changes, and make the iobufset's metadata larger
+  * which could be bad as it's supposed to fit into a single page on some
+  * platforms.)
+  */
+ static inline void
+-efhw_iopage_init_from_iopages(efhw_iopage_t *iopage,
+-                          efhw_iopages_t *iopages, unsigned pageno)
++efhw_iopage_init_from_iopages(struct efhw_iopage *iopage,
++                            struct efhw_iopages *iopages, unsigned pageno)
+ {
+       iopage->p.kva = ((unsigned long)efhw_iopages_ptr(iopages))
+           + (pageno * PAGE_SIZE);
+@@ -176,8 +183,8 @@
+ }
+ static inline void
+-efhw_iopages_init_from_iopage(efhw_iopages_t *iopages,
+-                          efhw_iopage_t *iopage, unsigned order)
++efhw_iopages_init_from_iopage(struct efhw_iopages *iopages,
++                            struct efhw_iopage *iopage, unsigned order)
+ {
+       iopages->kva = (caddr_t) efhw_iopage_ptr(iopage);
+       EFHW_ASSERT(iopages->kva);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efrm/nic_table.h
+--- a/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -62,21 +62,21 @@
+ };
+ /* Resource driver structures used by other drivers as well */
+-extern struct efrm_nic_table efrm_nic_table;
++extern struct efrm_nic_table *efrm_nic_tablep;
+ static inline void efrm_nic_table_hold(void)
+ {
+-      atomic_inc(&efrm_nic_table.ref_count);
++      atomic_inc(&efrm_nic_tablep->ref_count);
+ }
+ static inline void efrm_nic_table_rele(void)
+ {
+-      atomic_dec(&efrm_nic_table.ref_count);
++      atomic_dec(&efrm_nic_tablep->ref_count);
+ }
+ static inline int efrm_nic_table_held(void)
+ {
+-      return (atomic_read(&efrm_nic_table.ref_count) != 0);
++      return (atomic_read(&efrm_nic_tablep->ref_count) != 0);
+ }
+ /* Run code block _x multiple times with variable nic set to each
+@@ -86,13 +86,13 @@
+       for ((_nic_i) = (efrm_nic_table_hold(), 0);                     \
+            (_nic_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0); \
+            (_nic_i)++)                                                \
+-              if (((_nic) = efrm_nic_table.nic[_nic_i]))
++              if (((_nic) = efrm_nic_tablep->nic[_nic_i]))
+ #define EFRM_FOR_EACH_NIC_IN_SET(_set, _i, _nic)                      \
+       for ((_i) = (efrm_nic_table_hold(), 0);                         \
+            (_i) < EFHW_MAX_NR_DEVS || (efrm_nic_table_rele(), 0);     \
+            ++(_i))                                                    \
+-              if (((_nic) = efrm_nic_table.nic[_i]) &&                \
++              if (((_nic) = efrm_nic_tablep->nic[_i]) &&              \
+                   efrm_nic_set_read((_set), (_i)))
+ #endif /* __CI_EFRM_NIC_TABLE_H__ */
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h
+--- a/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -50,7 +50,11 @@
+ #include <linux/workqueue.h>
+ #include <linux/gfp.h>
+ #include <linux/slab.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
+ #include <linux/hardirq.h>
++#else
++#include <asm/hardirq.h>
++#endif
+ #include <linux/kernel.h>
+ #include <linux/if_ether.h>
+ #include <linux/completion.h>
+@@ -60,6 +64,21 @@
+ /* get roundup_pow_of_two(), which was in kernel.h in early kernel versions */
+ #include <linux/log2.h>
+ #endif
++
++
++/********************************************************************
++ *
++ * Utility functions
++ *
++ ********************************************************************/
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
++static inline unsigned long __attribute_const__ roundup_pow_of_two(unsigned long x)
++{
++        return (1UL << fls(x - 1));
++}
++#endif
++
+ /********************************************************************
+  *
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/tools/log.h
+--- a/drivers/xen/sfc_netback/ci/tools/log.h   Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/tools/log.h   Tue Mar 31 11:59:10 2009 +0100
+@@ -163,6 +163,13 @@
+   ** must be at least 16 bytes long.
+   */
++#if defined(__unix__) && ! defined(__KERNEL__)
++extern int ci_format_select_set(char* s, int len_s, int nfds, const fd_set*);
++extern int ci_format_select(char* s, int len_s,
++                          int nfds, const fd_set* rds, const fd_set* wrs,
++                          const fd_set* exs, struct timeval* timeout);
++#endif
++
+ /**********************************************************************
+  * Error checking.
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h
+--- a/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h      Tue Mar 31 11:59:10 2009 +0100
+@@ -115,6 +115,15 @@
+ ci_inline void ci_atomic32_add(volatile ci_uint32* p, ci_uint32 v)
+ { __asm__ __volatile__("lock; addl %1, %0" : "+m" (*p) : "ir" (v)); }
++
++ci_inline void ci_atomic32_inc(volatile ci_uint32* p)
++{ __asm__ __volatile__("lock; incl %0" : "+m" (*p)); }
++
++ci_inline int ci_atomic32_dec_and_test(volatile ci_uint32* p) {
++  char r;
++  __asm__ __volatile__("lock; decl %0; sete %1" : "+m" (*p), "=qm" (r));
++  return r;
++}
+ #define ci_atomic_or(a, v)   ci_atomic32_or ((ci_uint32*) &(a)->n, (v))
+ #define ci_atomic_and(a, v)  ci_atomic32_and((ci_uint32*) &(a)->n, (v))
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/accel.h
+--- a/drivers/xen/sfc_netfront/accel.h Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel.h Tue Mar 31 11:59:10 2009 +0100
+@@ -108,10 +108,22 @@
+       /** Number of frame trunc events seen on fastpath */
+       u64 fastpath_frm_trunc;
++      /** Number of rx discard (bad crc) events seen on fastpath */
++      u64 fastpath_crc_bad;
++
++      /** Number of rx discard (bad csum) events seen on fastpath */
++      u64 fastpath_csum_bad;
++
++      /** Number of rx discard (bad rights) events seen on fastpath */
++      u64 fastpath_rights_bad;
++
++      /** Number of rx discard ("other") events seen on fastpath */
++      u64 fastpath_discard_other;
++
+       /** Number of no rx descriptor trunc events seen on fastpath */
+       u64 rx_no_desc_trunc;
+-      /** The number of misc bad events (e.g. RX_DISCARD) processed. */
++      /** The number of misc bad events processed. */
+       u64 bad_event_count;
+       /** Number of events dealt with in poll loop */
+@@ -163,6 +175,10 @@
+       struct dentry *fastpath_tx_completions;
+       struct dentry *fastpath_tx_pending_max;
+       struct dentry *fastpath_frm_trunc;
++      struct dentry *fastpath_crc_bad;
++      struct dentry *fastpath_csum_bad;
++      struct dentry *fastpath_rights_bad;
++      struct dentry *fastpath_discard_other;
+       struct dentry *rx_no_desc_trunc;
+       struct dentry *event_count;
+       struct dentry *bad_event_count;
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/accel_debugfs.c
+--- a/drivers/xen/sfc_netfront/accel_debugfs.c Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_debugfs.c Tue Mar 31 11:59:10 2009 +0100
+@@ -146,6 +146,18 @@
+       vnic->dbfs.fastpath_frm_trunc = debugfs_create_u64
+               ("fastpath_frm_trunc", S_IRUSR | S_IRGRP | S_IROTH,
+                vnic->dbfs_dir, &vnic->stats.fastpath_frm_trunc);
++      vnic->dbfs.fastpath_crc_bad = debugfs_create_u64
++              ("fastpath_crc_bad", S_IRUSR | S_IRGRP | S_IROTH,
++               vnic->dbfs_dir, &vnic->stats.fastpath_crc_bad);
++      vnic->dbfs.fastpath_csum_bad = debugfs_create_u64
++              ("fastpath_csum_bad", S_IRUSR | S_IRGRP | S_IROTH,
++               vnic->dbfs_dir, &vnic->stats.fastpath_csum_bad);
++      vnic->dbfs.fastpath_rights_bad = debugfs_create_u64
++              ("fastpath_rights_bad", S_IRUSR | S_IRGRP | S_IROTH,
++               vnic->dbfs_dir, &vnic->stats.fastpath_rights_bad);
++      vnic->dbfs.fastpath_discard_other = debugfs_create_u64
++              ("fastpath_discard_other", S_IRUSR | S_IRGRP | S_IROTH,
++               vnic->dbfs_dir, &vnic->stats.fastpath_discard_other);
+       vnic->dbfs.rx_no_desc_trunc = debugfs_create_u64
+               ("rx_no_desc_trunc", S_IRUSR | S_IRGRP | S_IROTH,
+                vnic->dbfs_dir, &vnic->stats.rx_no_desc_trunc);
+@@ -199,6 +211,10 @@
+               debugfs_remove(vnic->dbfs.event_count_since_irq);
+               debugfs_remove(vnic->dbfs.events_per_irq_max);
+               debugfs_remove(vnic->dbfs.fastpath_frm_trunc);
++              debugfs_remove(vnic->dbfs.fastpath_crc_bad);
++              debugfs_remove(vnic->dbfs.fastpath_csum_bad);
++              debugfs_remove(vnic->dbfs.fastpath_rights_bad);
++              debugfs_remove(vnic->dbfs.fastpath_discard_other);
+               debugfs_remove(vnic->dbfs.rx_no_desc_trunc);
+               debugfs_remove(vnic->dbfs.events_per_poll_max);
+               debugfs_remove(vnic->dbfs.events_per_poll_rx_max);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/accel_msg.c
+--- a/drivers/xen/sfc_netfront/accel_msg.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_msg.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -124,7 +124,6 @@
+ static void netfront_accel_interface_up(netfront_accel_vnic *vnic)
+ {
+-
+       if (!vnic->backend_netdev_up) {
+               vnic->backend_netdev_up = 1;
+               
+@@ -136,7 +135,6 @@
+ static void netfront_accel_interface_down(netfront_accel_vnic *vnic)
+ {
+-
+       if (vnic->backend_netdev_up) {
+               vnic->backend_netdev_up = 0;
+               
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/accel_netfront.c
+--- a/drivers/xen/sfc_netfront/accel_netfront.c        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_netfront.c        Tue Mar 31 11:59:10 2009 +0100
+@@ -274,7 +274,7 @@
+       if (rc < 0) {
+               EPRINTK("Xen netfront accelerator version mismatch\n");
+-              return -EINVAL;
++              goto fail;
+       }
+       if (rc > 0) {
+@@ -283,10 +283,19 @@
+                * and accept certain subsets of previous versions
+                */
+               EPRINTK("Xen netfront accelerator version mismatch\n");
+-              return -EINVAL;
++              goto fail;
+       }
+       return 0;
++
++ fail:
++      netfront_accel_debugfs_fini();
++      flush_workqueue(netfront_accel_workqueue);
++      destroy_workqueue(netfront_accel_workqueue);
++#ifdef EFX_GCOV
++      gcov_provider_fini(THIS_MODULE);
++#endif
++      return -EINVAL;
+ }
+ module_init(netfront_accel_init);
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/accel_vi.c
+--- a/drivers/xen/sfc_netfront/accel_vi.c      Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_vi.c      Tue Mar 31 11:59:10 2009 +0100
+@@ -938,18 +938,29 @@
+                               " buffer %d RX_DISCARD_OTHER q_id %d\n",
+                               __FUNCTION__, EF_EVENT_PRI_ARG(*ev), id,
+                               EF_EVENT_RX_DISCARD_Q_ID(*ev) );
+-                      /*
+-                       * Probably tail of packet for which error has
+-                       * already been logged, so don't count in
+-                       * stats
+-                       */
++                      NETFRONT_ACCEL_STATS_OP(++vnic->stats.fastpath_discard_other);
++              } else if (EF_EVENT_RX_DISCARD_TYPE(*ev) ==
++                         EF_EVENT_RX_DISCARD_CSUM_BAD) {
++                      DPRINTK("%s: " EF_EVENT_FMT 
++                              " buffer %d DISCARD CSUM_BAD q_id %d\n",
++                              __FUNCTION__, EF_EVENT_PRI_ARG(*ev), id,
++                              EF_EVENT_RX_DISCARD_Q_ID(*ev) );
++                      NETFRONT_ACCEL_STATS_OP(++vnic->stats.fastpath_csum_bad);
++              } else if (EF_EVENT_RX_DISCARD_TYPE(*ev) ==
++                         EF_EVENT_RX_DISCARD_CRC_BAD) {
++                      DPRINTK("%s: " EF_EVENT_FMT 
++                              " buffer %d DISCARD CRC_BAD q_id %d\n",
++                              __FUNCTION__, EF_EVENT_PRI_ARG(*ev), id,
++                              EF_EVENT_RX_DISCARD_Q_ID(*ev) );
++                      NETFRONT_ACCEL_STATS_OP(++vnic->stats.fastpath_crc_bad);
+               } else {
+-                      EPRINTK("%s: " EF_EVENT_FMT 
+-                              " buffer %d rx discard type %d q_id %d\n",
++                      BUG_ON(EF_EVENT_RX_DISCARD_TYPE(*ev) !=
++                             EF_EVENT_RX_DISCARD_RIGHTS);
++                      DPRINTK("%s: " EF_EVENT_FMT 
++                              " buffer %d DISCARD RIGHTS q_id %d\n",
+                               __FUNCTION__, EF_EVENT_PRI_ARG(*ev), id,
+-                              EF_EVENT_RX_DISCARD_TYPE(*ev), 
+                               EF_EVENT_RX_DISCARD_Q_ID(*ev) );
+-                      NETFRONT_ACCEL_STATS_OP(++vnic->stats.bad_event_count);
++                      NETFRONT_ACCEL_STATS_OP(++vnic->stats.fastpath_rights_bad);
+               }
+       }
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/ef_vi_falcon.h
+--- a/drivers/xen/sfc_netfront/ef_vi_falcon.h  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon.h  Tue Mar 31 11:59:10 2009 +0100
+@@ -156,7 +156,7 @@
+ #define EFVI_FALCON_EVQTIMER_DISABLE  (EFVI_FALCON_TIMER_MODE_DIS  << TIMER_MODE_LBN) 
+-/* ---- efhw_event_t helpers --- */
++/* ---- ef_vi_event helpers --- */
+ #define EFVI_FALCON_EVENT_CODE(evp) \
+        ((evp)->u64 & EFVI_FALCON_EVENT_CODE_MASK)
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/etherfabric/ef_vi.h
+--- a/drivers/xen/sfc_netfront/etherfabric/ef_vi.h     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/etherfabric/ef_vi.h     Tue Mar 31 11:59:10 2009 +0100
+@@ -225,24 +225,6 @@
+ /* Falcon constants */
+ #define TX_EV_DESC_PTR_LBN 0
+-/**********************************************************************
+- * ef_iobufset ********************************************************
+- **********************************************************************/
+-
+-/*! \i_ef_bufs An [ef_iobufset] is a collection of buffers to be used
+-** with the NIC.
+-*/
+-typedef struct ef_iobufset {
+-      unsigned                      magic;
+-      unsigned                      bufs_mmap_bytes;
+-      unsigned                      bufs_handle;
+-      int                           bufs_ptr_off;
+-      ef_addr                       bufs_addr;
+-      unsigned                      bufs_size; /* size rounded to pow2 */
+-      int                           bufs_num;
+-      int                           faultonaccess;
+-} ef_iobufset;
+-
+ /**********************************************************************
+  * ef_vi **************************************************************
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/falcon_event.c
+--- a/drivers/xen/sfc_netfront/falcon_event.c  Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/falcon_event.c  Tue Mar 31 11:59:10 2009 +0100
+@@ -95,7 +95,7 @@
+                                    const ef_vi_qword* ev)
+ {
+       unsigned q_id = QWORD_GET_U(RX_EV_Q_LABEL, *ev);
+-      unsigned desc_ptr = QWORD_GET_U(RX_EV_DESC_PTR, *ev);
++      uint16_t desc_ptr = QWORD_GET_U(RX_EV_DESC_PTR, *ev);
+       ef_rx_dup_state_t* rx_dup_state = &evq->evq_state->rx_dup_state[q_id];
+       if(likely( desc_ptr != rx_dup_state->rx_last_desc_ptr )) {
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/falcon_vi.c
+--- a/drivers/xen/sfc_netfront/falcon_vi.c     Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/falcon_vi.c     Tue Mar 31 11:59:10 2009 +0100
+@@ -431,6 +431,14 @@
+ }
++int ef_vi_receive_post(ef_vi* vi, ef_addr addr, ef_request_id dma_id)
++{
++  int rc = ef_vi_receive_init(vi, addr, dma_id, 0);
++  if( rc == 0 )  ef_vi_receive_push(vi);
++  return rc;
++}
++
++
+ void ef_vi_receive_push(ef_vi* vi)
+ {
+       ef_vi_wiob();
+diff -r 89d9c025b46c -r ad4d307bf9ce drivers/xen/sfc_netfront/sysdep.h
+--- a/drivers/xen/sfc_netfront/sysdep.h        Tue Mar 31 11:49:12 2009 +0100
++++ b/drivers/xen/sfc_netfront/sysdep.h        Tue Mar 31 11:59:10 2009 +0100
+@@ -32,6 +32,10 @@
+ /*! \cidoxg_include_ci_ul */
+ #ifndef __CI_CIUL_SYSDEP_LINUX_H__
+ #define __CI_CIUL_SYSDEP_LINUX_H__
++
++
++#define ef_vi_wiob()  mmiowb()
++
+ /**********************************************************************
+  * Kernel version compatability
+@@ -72,12 +76,19 @@
+ # if defined(__i386__) || defined(__x86_64__)  /* GCC x86/x64 */
+    typedef unsigned long long ef_vi_dma_addr_t; 
+-#  if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+-#   define ef_vi_wiob()  __asm__ __volatile__ ("sfence")
+-#  else
+-#   define ef_vi_wiob()  __asm__ __volatile__ (".byte 0x0F, 0xAE, 0xF8")
++# endif
++#endif
++
++#ifndef mmiowb
++# if defined(__i386__) || defined(__x86_64__)
++#  define mmiowb()
++# elif defined(__ia64__)
++#  ifndef ia64_mfa
++#   define ia64_mfa() asm volatile ("mf.a" ::: "memory")
+ #  endif
+-
++#  define mmiowb ia64_mfa
++# else
++#  error "Need definition for mmiowb"
+ # endif
+ #endif
+@@ -88,7 +99,6 @@
+ #if !defined(__GNUC__)
+ # if defined(__PPC__)  /* GCC, PPC */
+    typedef unsigned long     ef_vi_dma_addr_t;
+-#  define ef_vi_wiob()  wmb()
+ #  ifdef __powerpc64__
+ #   ifdef CONFIG_SMP
+@@ -110,8 +120,6 @@
+ # elif defined(__ia64__)  /* GCC, IA64 */
+    typedef unsigned long     ef_vi_dma_addr_t;
+-#  define ef_vi_wiob()  __asm__ __volatile__("mf.a": : :"memory")
+-
+ # else
+ #  error Unknown processor - GNU C
+ # endif
+@@ -127,13 +135,6 @@
+ #   define EF_VI_LIKELY(t)    __builtin_expect((t), 1)
+ #   define EF_VI_UNLIKELY(t)  __builtin_expect((t), 0)
+ #  endif
+-
+-#  if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+-#   define ef_vi_wiob()  __asm__ __volatile__ ("sfence")
+-#  else
+-#   define ef_vi_wiob()  __asm__ __volatile__ (".byte 0x0F, 0xAE, 0xF8")
+-#  endif
+-
+ # else
+ #  error Old Intel compiler not supported.
+ # endif
diff --git a/master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf b/master/linux-2.6.18-xen.hg-848.ab1d4fbbe4bf
new file mode 100644 (file)
index 0000000..f4c51c9
--- /dev/null
@@ -0,0 +1,594 @@
+# HG changeset patch
+# User Keir Fraser <keir.fraser@citrix.com>
+# Date 1238497203 -3600
+# Node ID ab1d4fbbe4bf93f203e0c4d62c18bd248e4f1d4a
+# Parent  ad4d307bf9ced378d0b49d4559ae33ecbff3c1b7
+netfront accel: Simplify, document, and fix a theoretical bug in use
+of spin locks by netfront acceleration plugins
+
+Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
+
+diff -r ad4d307bf9ce -r ab1d4fbbe4bf drivers/xen/netfront/accel.c
+--- a/drivers/xen/netfront/accel.c     Tue Mar 31 11:59:10 2009 +0100
++++ b/drivers/xen/netfront/accel.c     Tue Mar 31 12:00:03 2009 +0100
+@@ -57,9 +57,6 @@
+  */ 
+ static struct list_head accelerators_list;
+-/* Lock to protect access to accelerators_list */
+-static spinlock_t accelerators_lock;
+-
+ /* Workqueue to process acceleration configuration changes */
+ struct workqueue_struct *accel_watch_workqueue;
+@@ -69,7 +66,6 @@
+ void netif_init_accel(void)
+ {
+       INIT_LIST_HEAD(&accelerators_list);
+-      spin_lock_init(&accelerators_lock);
+       accel_watch_workqueue = create_workqueue("net_accel");
+ }
+@@ -77,13 +73,11 @@
+ void netif_exit_accel(void)
+ {
+       struct netfront_accelerator *accelerator, *tmp;
+-      unsigned long flags;
+       flush_workqueue(accel_watch_workqueue);
+       destroy_workqueue(accel_watch_workqueue);
+-      spin_lock_irqsave(&accelerators_lock, flags);
+-
++      /* No lock required as everything else should be quiet by now */
+       list_for_each_entry_safe(accelerator, tmp, &accelerators_list, link) {
+               BUG_ON(!list_empty(&accelerator->vif_states));
+@@ -91,8 +85,6 @@
+               kfree(accelerator->frontend);
+               kfree(accelerator);
+       }
+-
+-      spin_unlock_irqrestore(&accelerators_lock, flags);
+ }
+@@ -245,16 +237,12 @@
+ /* 
+  * Add a frontend vif to the list of vifs that is using a netfront
+- * accelerator plugin module.
++ * accelerator plugin module.  Must be called with the accelerator
++ * mutex held.
+  */
+ static void add_accelerator_vif(struct netfront_accelerator *accelerator,
+                               struct netfront_info *np)
+ {
+-      unsigned long flags;
+-
+-      /* Need lock to write list */
+-      spin_lock_irqsave(&accelerator->vif_states_lock, flags);
+-
+       if (np->accelerator == NULL) {
+               np->accelerator = accelerator;
+               
+@@ -267,13 +255,13 @@
+                */
+               BUG_ON(np->accelerator != accelerator);
+       }
+-
+-      spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
+ }
+ /*
+- * Initialise the state to track an accelerator plugin module.
++ * Initialise the state to track an accelerator plugin module.  
++ * 
++ * Must be called with the accelerator mutex held.
+  */ 
+ static int init_accelerator(const char *frontend, 
+                           struct netfront_accelerator **result,
+@@ -281,7 +269,6 @@
+ {
+       struct netfront_accelerator *accelerator = 
+               kmalloc(sizeof(struct netfront_accelerator), GFP_KERNEL);
+-      unsigned long flags;
+       int frontend_len;
+       if (!accelerator) {
+@@ -303,9 +290,7 @@
+       accelerator->hooks = hooks;
+-      spin_lock_irqsave(&accelerators_lock, flags);
+       list_add(&accelerator->link, &accelerators_list);
+-      spin_unlock_irqrestore(&accelerators_lock, flags);
+       *result = accelerator;
+@@ -316,11 +301,14 @@
+ /* 
+  * Modify the hooks stored in the per-vif state to match that in the
+  * netfront accelerator's state.
++ * 
++ * Takes the vif_states_lock spinlock and may sleep.
+  */
+ static void 
+ accelerator_set_vif_state_hooks(struct netfront_accel_vif_state *vif_state)
+ {
+-      /* This function must be called with the vif_states_lock held */
++      struct netfront_accelerator *accelerator;
++      unsigned long flags;
+       DPRINTK("%p\n",vif_state);
+@@ -328,19 +316,25 @@
+       netif_poll_disable(vif_state->np->netdev);
+       netif_tx_lock_bh(vif_state->np->netdev);
+-      vif_state->hooks = vif_state->np->accelerator->hooks;
++      accelerator = vif_state->np->accelerator;
++      spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++      vif_state->hooks = accelerator->hooks;
++      spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
+       netif_tx_unlock_bh(vif_state->np->netdev);
+       netif_poll_enable(vif_state->np->netdev);
+ }
++/* 
++ * Must be called with the accelerator mutex held.  Takes the
++ * vif_states_lock spinlock.
++ */
+ static void accelerator_probe_new_vif(struct netfront_info *np,
+                                     struct xenbus_device *dev, 
+                                     struct netfront_accelerator *accelerator)
+ {
+       struct netfront_accel_hooks *hooks;
+-      unsigned long flags;
+       DPRINTK("\n");
+@@ -349,17 +343,8 @@
+       
+       hooks = accelerator->hooks;
+       
+-      if (hooks) {
+-              if (hooks->new_device(np->netdev, dev) == 0) {
+-                      spin_lock_irqsave
+-                              (&accelerator->vif_states_lock, flags);
+-
+-                      accelerator_set_vif_state_hooks(&np->accel_vif_state);
+-
+-                      spin_unlock_irqrestore
+-                              (&accelerator->vif_states_lock, flags);
+-              }
+-      }
++      if (hooks && hooks->new_device(np->netdev, dev) == 0)
++              accelerator_set_vif_state_hooks(&np->accel_vif_state);
+       return;
+ }
+@@ -368,7 +353,10 @@
+ /*  
+  * Request that a particular netfront accelerator plugin is loaded.
+  * Usually called as a result of the vif configuration specifying
+- * which one to use. Must be called with accelerator_mutex held 
++ * which one to use.
++ *
++ * Must be called with accelerator_mutex held.  Takes the
++ * vif_states_lock spinlock.
+  */
+ static int netfront_load_accelerator(struct netfront_info *np, 
+                                    struct xenbus_device *dev, 
+@@ -407,13 +395,15 @@
+  * this accelerator.  Notify the accelerator plugin of the relevant
+  * device if so.  Called when an accelerator plugin module is first
+  * loaded and connects to netfront.
++ *
++ * Must be called with accelerator_mutex held.  Takes the
++ * vif_states_lock spinlock.
+  */
+ static void 
+ accelerator_probe_vifs(struct netfront_accelerator *accelerator,
+                      struct netfront_accel_hooks *hooks)
+ {
+       struct netfront_accel_vif_state *vif_state, *tmp;
+-      unsigned long flags;
+       DPRINTK("%p\n", accelerator);
+@@ -425,29 +415,22 @@
+       BUG_ON(hooks == NULL);
+       accelerator->hooks = hooks;
+-      /* 
+-       *  currently hold accelerator_mutex, so don't need
+-       *  vif_states_lock to read the list
+-       */
++      /* Holds accelerator_mutex to iterate list */
+       list_for_each_entry_safe(vif_state, tmp, &accelerator->vif_states,
+                                link) {
+               struct netfront_info *np = vif_state->np;
+               
+-              if (hooks->new_device(np->netdev, vif_state->dev) == 0) {
+-                      spin_lock_irqsave
+-                              (&accelerator->vif_states_lock, flags);
+-
++              if (hooks->new_device(np->netdev, vif_state->dev) == 0)
+                       accelerator_set_vif_state_hooks(vif_state);
+-
+-                      spin_unlock_irqrestore
+-                              (&accelerator->vif_states_lock, flags);
+-              }
+       }
+ }
+ /* 
+- * Called by the netfront accelerator plugin module when it has loaded 
++ * Called by the netfront accelerator plugin module when it has
++ * loaded.
++ *
++ * Takes the accelerator_mutex and vif_states_lock spinlock.
+  */
+ int netfront_accelerator_loaded(int version, const char *frontend, 
+                               struct netfront_accel_hooks *hooks)
+@@ -503,14 +486,20 @@
+ /* 
+  * Remove the hooks from a single vif state.
++ * 
++ * Takes the vif_states_lock spinlock and may sleep.
+  */
+ static void 
+ accelerator_remove_single_hook(struct netfront_accelerator *accelerator,
+                              struct netfront_accel_vif_state *vif_state)
+ {
++      unsigned long flags;
++
+       /* Make sure there are no data path operations going on */
+       netif_poll_disable(vif_state->np->netdev);
+       netif_tx_lock_bh(vif_state->np->netdev);
++
++      spin_lock_irqsave(&accelerator->vif_states_lock, flags);
+       /* 
+        * Remove the hooks, but leave the vif_state on the
+@@ -520,6 +509,8 @@
+        */
+       vif_state->hooks = NULL;
+       
++      spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
++
+       netif_tx_unlock_bh(vif_state->np->netdev);
+       netif_poll_enable(vif_state->np->netdev);                      
+ }
+@@ -527,25 +518,25 @@
+ /* 
+  * Safely remove the accelerator function hooks from a netfront state.
++ * 
++ * Must be called with the accelerator mutex held.  Takes the
++ * vif_states_lock spinlock.
+  */
+ static void accelerator_remove_hooks(struct netfront_accelerator *accelerator)
+ {
+-      struct netfront_accel_hooks *hooks;
+       struct netfront_accel_vif_state *vif_state, *tmp;
+       unsigned long flags;
+-      /* Mutex is held so don't need vif_states_lock to iterate list */
++      /* Mutex is held to iterate list */
+       list_for_each_entry_safe(vif_state, tmp,
+                                &accelerator->vif_states,
+                                link) {
+-              spin_lock_irqsave(&accelerator->vif_states_lock, flags);
++              if(vif_state->hooks) {
++                      spin_lock_irqsave(&accelerator->vif_states_lock, flags);
+-              if(vif_state->hooks) {
+-                      hooks = vif_state->hooks;
+-                      
+                       /* Last chance to get statistics from the accelerator */
+-                      hooks->get_stats(vif_state->np->netdev,
+-                                       &vif_state->np->stats);
++                      vif_state->hooks->get_stats(vif_state->np->netdev,
++                                                  &vif_state->np->stats);
+                       spin_unlock_irqrestore(&accelerator->vif_states_lock,
+                                              flags);
+@@ -553,9 +544,6 @@
+                       accelerator_remove_single_hook(accelerator, vif_state);
+                       accelerator->hooks->remove(vif_state->dev);
+-              } else {
+-                      spin_unlock_irqrestore(&accelerator->vif_states_lock,
+-                                             flags);
+               }
+       }
+       
+@@ -567,47 +555,47 @@
+  * Called by a netfront accelerator when it is unloaded.  This safely
+  * removes the hooks into the plugin and blocks until all devices have
+  * finished using it, so on return it is safe to unload.
++ *
++ * Takes the accelerator mutex, and vif_states_lock spinlock.
+  */
+ void netfront_accelerator_stop(const char *frontend)
+ {
+       struct netfront_accelerator *accelerator;
+-      unsigned long flags;
+       mutex_lock(&accelerator_mutex);
+-      spin_lock_irqsave(&accelerators_lock, flags);
+       list_for_each_entry(accelerator, &accelerators_list, link) {
+               if (match_accelerator(frontend, accelerator)) {
+-                      spin_unlock_irqrestore(&accelerators_lock, flags);
+-
+                       accelerator_remove_hooks(accelerator);
+-
+                       goto out;
+               }
+       }
+-      spin_unlock_irqrestore(&accelerators_lock, flags);
+  out:
+       mutex_unlock(&accelerator_mutex);
+ }
+ EXPORT_SYMBOL_GPL(netfront_accelerator_stop);
+-/* Helper for call_remove and do_suspend */
+-static int do_remove(struct netfront_info *np, struct xenbus_device *dev,
+-                   unsigned long *lock_flags)
++/* 
++ * Helper for call_remove and do_suspend
++ * 
++ * Must be called with the accelerator mutex held.  Takes the
++ * vif_states_lock spinlock.
++ */
++static int do_remove(struct netfront_info *np, struct xenbus_device *dev)
+ {
+       struct netfront_accelerator *accelerator = np->accelerator;
+-      struct netfront_accel_hooks *hooks;
++      unsigned long flags;
+       int rc = 0;
+  
+       if (np->accel_vif_state.hooks) {
+-              hooks = np->accel_vif_state.hooks;
++              spin_lock_irqsave(&accelerator->vif_states_lock, flags);
+               /* Last chance to get statistics from the accelerator */
+-              hooks->get_stats(np->netdev, &np->stats);
++              np->accel_vif_state.hooks->get_stats(np->netdev, &np->stats);
+               spin_unlock_irqrestore(&accelerator->vif_states_lock, 
+-                                     *lock_flags);
++                                     flags);
+               /* 
+                * Try and do the opposite of accelerator_probe_new_vif
+@@ -618,20 +606,21 @@
+                                              &np->accel_vif_state);
+               rc = accelerator->hooks->remove(dev);
+-
+-              spin_lock_irqsave(&accelerator->vif_states_lock, *lock_flags);
+       }
+  
+       return rc;
+ }
++/*
++ * Must be called with the accelerator mutex held.  Takes the
++ * vif_states_lock spinlock
++ */
+ static int netfront_remove_accelerator(struct netfront_info *np,
+                                      struct xenbus_device *dev)
+ {
+       struct netfront_accelerator *accelerator;
+       struct netfront_accel_vif_state *tmp_vif_state;
+-      unsigned long flags;
+       int rc = 0; 
+       /* Check that we've got a device that was accelerated */
+@@ -639,8 +628,6 @@
+               return rc;
+       accelerator = np->accelerator;
+-
+-      spin_lock_irqsave(&accelerator->vif_states_lock, flags); 
+       list_for_each_entry(tmp_vif_state, &accelerator->vif_states,
+                           link) {
+@@ -650,16 +637,18 @@
+               }
+       }
+-      rc = do_remove(np, dev, &flags);
++      rc = do_remove(np, dev);
+       np->accelerator = NULL;
+-
+-      spin_unlock_irqrestore(&accelerator->vif_states_lock, flags); 
+       return rc;
+ }
++/*
++ * No lock pre-requisites.  Takes the accelerator mutex and the
++ * vif_states_lock spinlock.
++ */
+ int netfront_accelerator_call_remove(struct netfront_info *np,
+                                    struct xenbus_device *dev)
+ {
+@@ -671,11 +660,14 @@
+       return rc;
+ }
+-  
++
++/*
++ * No lock pre-requisites.  Takes the accelerator mutex and the
++ * vif_states_lock spinlock.
++ */
+ int netfront_accelerator_suspend(struct netfront_info *np,
+                                struct xenbus_device *dev)
+ {
+-      unsigned long flags;
+       int rc = 0;
+       
+       netfront_accelerator_remove_watch(np);
+@@ -690,11 +682,7 @@
+        * Call the remove accelerator hook, but leave the vif_state
+        * on the accelerator's list in case there is a suspend_cancel.
+        */
+-      spin_lock_irqsave(&np->accelerator->vif_states_lock, flags); 
+-      
+-      rc = do_remove(np, dev, &flags);
+-
+-      spin_unlock_irqrestore(&np->accelerator->vif_states_lock, flags); 
++      rc = do_remove(np, dev);
+  out:
+       mutex_unlock(&accelerator_mutex);
+       return rc;
+@@ -713,15 +701,16 @@
+               netfront_accelerator_add_watch(np);
+       return 0;
+ }
+- 
+- 
++
++
++/*
++ * No lock pre-requisites.  Takes the accelerator mutex
++ */
+ void netfront_accelerator_resume(struct netfront_info *np,
+                                struct xenbus_device *dev)
+ {
+       struct netfront_accel_vif_state *accel_vif_state = NULL;
+-      spinlock_t *vif_states_lock;
+-      unsigned long flags;
+- 
++
+       mutex_lock(&accelerator_mutex);
+       /* Check that we've got a device that was accelerated */
+@@ -734,9 +723,6 @@
+               if (accel_vif_state->dev == dev) {
+                       BUG_ON(accel_vif_state != &np->accel_vif_state);
+  
+-                      vif_states_lock = &np->accelerator->vif_states_lock;
+-                      spin_lock_irqsave(vif_states_lock, flags); 
+- 
+                       /* 
+                        * Remove it from the accelerator's list so
+                        * state is consistent for probing new vifs
+@@ -744,9 +730,7 @@
+                        */
+                       list_del(&accel_vif_state->link);
+                       np->accelerator = NULL;
+- 
+-                      spin_unlock_irqrestore(vif_states_lock, flags); 
+-                      
++
+                       break;
+               }
+       }
+@@ -757,11 +741,13 @@
+ }
++/*
++ * No lock pre-requisites.  Takes the vif_states_lock spinlock
++ */
+ int netfront_check_accelerator_queue_ready(struct net_device *dev,
+                                          struct netfront_info *np)
+ {
+       struct netfront_accelerator *accelerator;
+-      struct netfront_accel_hooks *hooks;
+       int rc = 1;
+       unsigned long flags;
+@@ -770,8 +756,8 @@
+       /* Call the check_ready accelerator hook. */ 
+       if (np->accel_vif_state.hooks && accelerator) {
+               spin_lock_irqsave(&accelerator->vif_states_lock, flags); 
+-              hooks = np->accel_vif_state.hooks;
+-              if (hooks && np->accelerator == accelerator)
++              if (np->accel_vif_state.hooks &&
++                  np->accelerator == accelerator)
+                       rc = np->accel_vif_state.hooks->check_ready(dev);
+               spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
+       }
+@@ -780,11 +766,13 @@
+ }
++/*
++ * No lock pre-requisites.  Takes the vif_states_lock spinlock
++ */
+ void netfront_accelerator_call_stop_napi_irq(struct netfront_info *np,
+                                            struct net_device *dev)
+ {
+       struct netfront_accelerator *accelerator;
+-      struct netfront_accel_hooks *hooks;
+       unsigned long flags;
+       accelerator = np->accelerator;
+@@ -792,19 +780,21 @@
+       /* Call the stop_napi_interrupts accelerator hook. */
+       if (np->accel_vif_state.hooks && accelerator != NULL) {
+               spin_lock_irqsave(&accelerator->vif_states_lock, flags); 
+-              hooks = np->accel_vif_state.hooks;
+-              if (hooks && np->accelerator == accelerator)
++              if (np->accel_vif_state.hooks &&
++                  np->accelerator == accelerator)
+                       np->accel_vif_state.hooks->stop_napi_irq(dev);
+               spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
+       }
+ }
++/*
++ * No lock pre-requisites.  Takes the vif_states_lock spinlock
++ */
+ int netfront_accelerator_call_get_stats(struct netfront_info *np,
+                                       struct net_device *dev)
+ {
+       struct netfront_accelerator *accelerator;
+-      struct netfront_accel_hooks *hooks;
+       unsigned long flags;
+       int rc = 0;
+@@ -813,8 +803,8 @@
+       /* Call the get_stats accelerator hook. */
+       if (np->accel_vif_state.hooks && accelerator != NULL) {
+               spin_lock_irqsave(&accelerator->vif_states_lock, flags); 
+-              hooks = np->accel_vif_state.hooks;
+-              if (hooks && np->accelerator == accelerator)
++              if (np->accel_vif_state.hooks && 
++                  np->accelerator == accelerator)
+                       rc = np->accel_vif_state.hooks->get_stats(dev,
+                                                                 &np->stats);
+               spin_unlock_irqrestore(&accelerator->vif_states_lock, flags);
+diff -r ad4d307bf9ce -r ab1d4fbbe4bf drivers/xen/netfront/netfront.c
+--- a/drivers/xen/netfront/netfront.c  Tue Mar 31 11:59:10 2009 +0100
++++ b/drivers/xen/netfront/netfront.c  Tue Mar 31 12:00:03 2009 +0100
+@@ -2238,10 +2238,9 @@
+ #ifdef CONFIG_INET
+       unregister_inetaddr_notifier(&notifier_inetdev);
+ #endif
++      xenbus_unregister_driver(&netfront_driver);
+       netif_exit_accel();
+-
+-      return xenbus_unregister_driver(&netfront_driver);
+ }
+ module_exit(netif_exit);
diff --git a/master/linux-2.6.18-xen.hg-849.3a4410c4504e b/master/linux-2.6.18-xen.hg-849.3a4410c4504e
new file mode 100644 (file)
index 0000000..0e3676a
--- /dev/null
@@ -0,0 +1,112 @@
+# HG changeset patch
+# User Keir Fraser <keir.fraser@citrix.com>
+# Date 1238497253 -3600
+# Node ID 3a4410c4504ea64f2c1e873df3234938366050ad
+# Parent  ab1d4fbbe4bf93f203e0c4d62c18bd248e4f1d4a
+sfc_netfront: Only clear tx_skb when ready for netif_wake_queue
+(doing otherwise could result in a lost packet) and document use of
+locks to protect tx_skb
+
+Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
+
+diff -r ab1d4fbbe4bf -r 3a4410c4504e drivers/xen/sfc_netfront/accel.h
+--- a/drivers/xen/sfc_netfront/accel.h Tue Mar 31 12:00:03 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel.h Tue Mar 31 12:00:53 2009 +0100
+@@ -277,8 +277,10 @@
+       int poll_enabled;
+-      /** A spare slot for a TX packet.  This is treated as an extension
+-       * of the DMA queue. */
++      /** A spare slot for a TX packet.  This is treated as an
++       * extension of the DMA queue.  Reads require either
++       * netfront's tx_lock or the vnic tx_lock; writes require both
++       * locks */
+       struct sk_buff *tx_skb;
+       /** Keep track of fragments of SSR packets */
+diff -r ab1d4fbbe4bf -r 3a4410c4504e drivers/xen/sfc_netfront/accel_netfront.c
+--- a/drivers/xen/sfc_netfront/accel_netfront.c        Tue Mar 31 12:00:03 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_netfront.c        Tue Mar 31 12:00:53 2009 +0100
+@@ -65,7 +65,7 @@
+               BUG_ON(vnic->net_dev != net_dev);
+               DPRINTK("%s stopping queue\n", __FUNCTION__);
+-              /* Netfront's lock protects tx_skb */
++              /* Need netfront's tx_lock and vnic tx_lock to write tx_skb */
+               spin_lock_irqsave(&np->tx_lock, flags2);
+               BUG_ON(vnic->tx_skb != NULL);
+               vnic->tx_skb = skb;
+@@ -183,7 +183,7 @@
+       BUG_ON(vnic == NULL);
+-      /* This is protected by netfront's lock */ 
++      /* Read of tx_skb is protected by netfront's tx_lock */ 
+       return vnic->tx_skb == NULL;
+ }
+diff -r ab1d4fbbe4bf -r 3a4410c4504e drivers/xen/sfc_netfront/accel_vi.c
+--- a/drivers/xen/sfc_netfront/accel_vi.c      Tue Mar 31 12:00:03 2009 +0100
++++ b/drivers/xen/sfc_netfront/accel_vi.c      Tue Mar 31 12:00:53 2009 +0100
+@@ -991,39 +991,35 @@
+ {
+       struct netfront_info *np = ((struct netfront_info *)
+                                   netdev_priv(vnic->net_dev));
+-      struct sk_buff *skb;
+       int handled;
+       unsigned long flags;
+-      
++
+       /*
+-       * TODO if we could safely check tx_skb == NULL and return
+-       * early without taking the lock, that would obviously help
+-       * performance
++       * We hold the vnic tx_lock which is sufficient to exclude
++       * writes to tx_skb
+        */
+-      /* Take the netfront lock which protects tx_skb. */
+-      spin_lock_irqsave(&np->tx_lock, flags);
+       if (vnic->tx_skb != NULL) {
+               DPRINTK("%s trying to send spare buffer\n", __FUNCTION__);
+               
+-              skb = vnic->tx_skb;
+-              vnic->tx_skb = NULL;
+-
+-              spin_unlock_irqrestore(&np->tx_lock, flags);
+-
+-              handled = netfront_accel_vi_tx_post(vnic, skb);
++              handled = netfront_accel_vi_tx_post(vnic, vnic->tx_skb);
+               
+-              spin_lock_irqsave(&np->tx_lock, flags);
+-
+               if (handled != NETFRONT_ACCEL_STATUS_BUSY) {
+                       DPRINTK("%s restarting tx\n", __FUNCTION__);
++
++                      /* Need netfront tx_lock and vnic tx_lock to
++                       * write tx_skb */
++                      spin_lock_irqsave(&np->tx_lock, flags);
++
++                      vnic->tx_skb = NULL;
++
+                       if (netfront_check_queue_ready(vnic->net_dev)) {
+                               netif_wake_queue(vnic->net_dev);
+                               NETFRONT_ACCEL_STATS_OP
+                                       (vnic->stats.queue_wakes++);
+                       }
+-              } else {
+-                      vnic->tx_skb = skb;
++                      spin_unlock_irqrestore(&np->tx_lock, flags);
++
+               }
+               
+               /*
+@@ -1032,7 +1028,6 @@
+                */
+               BUG_ON(handled == NETFRONT_ACCEL_STATUS_CANT);
+       }
+-      spin_unlock_irqrestore(&np->tx_lock, flags);
+ }
index 32fed1e6bd61cac3a57719832c86617741bd3471..e889900153fa33bc143406ffc2ee06d2e4beebb2 100644 (file)
@@ -1,6 +1,6 @@
-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon        2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon  Wed May 06 16:55:55 2009 +0100
 @@ -0,0 +1,87 @@
 +What:         /sys/kernel/perfmon
 +Date:         Nov 2007
@@ -89,9 +89,9 @@ diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon linux-2.6.27.19-
 +              Bitmask to enable/disable certain perfmon2 features.
 +              Currently defined:
 +              - bit 0: if set, then reserved bitfield are ignored on PMC writes
-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-fmt linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-fmt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-fmt    2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon-fmt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon-fmt      Wed May 06 16:55:55 2009 +0100
 @@ -0,0 +1,18 @@
 +What:         /sys/kernel/perfmon/formats
 +Date:         2007
@@ -111,9 +111,9 @@ diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-fmt linux-2.6.27
 +
 +              Version number of the format in clear text and null terminated.
 +
-diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-pmu linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-pmu
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/ABI/testing/sysfs-perfmon-pmu    2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/ABI/testing/sysfs-perfmon-pmu
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/ABI/testing/sysfs-perfmon-pmu      Wed May 06 16:55:55 2009 +0100
 @@ -0,0 +1,46 @@
 +What:         /sys/kernel/perfmon/pmu
 +Date:         Nov 2007
@@ -161,9 +161,9 @@ diff -purN linux-2.6.27/Documentation/ABI/testing/sysfs-perfmon-pmu linux-2.6.27
 +
 +              the width in bits of the registers. This field is only relevant for counter
 +              registers.
-diff -purN linux-2.6.27/Documentation/DocBook/Makefile linux-2.6.27.19-5.1/Documentation/DocBook/Makefile
---- linux-2.6.27/Documentation/DocBook/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/Makefile 2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/DocBook/Makefile
+--- a/Documentation/DocBook/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/DocBook/Makefile   Wed May 06 16:55:55 2009 +0100
 @@ -7,7 +7,7 @@
  # list of DOCBOOKS.
  
@@ -173,10 +173,10 @@ diff -purN linux-2.6.27/Documentation/DocBook/Makefile linux-2.6.27.19-5.1/Docum
            procfs-guide.xml writing_usb_driver.xml networking.xml \
            kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
            gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
-diff -purN linux-2.6.27/Documentation/DocBook/kernel-api.tmpl linux-2.6.27.19-5.1/Documentation/DocBook/kernel-api.tmpl
---- linux-2.6.27/Documentation/DocBook/kernel-api.tmpl 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/kernel-api.tmpl  2009-03-25 16:11:45.000000000 +0000
-@@ -364,6 +364,10 @@ X!Edrivers/pnp/system.c
+diff -r 9608d5473017 Documentation/DocBook/kernel-api.tmpl
+--- a/Documentation/DocBook/kernel-api.tmpl    Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/DocBook/kernel-api.tmpl    Wed May 06 16:55:56 2009 +0100
+@@ -364,6 +364,10 @@
  !Eblock/blk-barrier.c
  !Eblock/blk-tag.c
  !Iblock/blk-tag.c
@@ -187,9 +187,9 @@ diff -purN linux-2.6.27/Documentation/DocBook/kernel-api.tmpl linux-2.6.27.19-5.
    </chapter>
  
    <chapter id="chrdev">
-diff -purN linux-2.6.27/Documentation/DocBook/utrace.tmpl linux-2.6.27.19-5.1/Documentation/DocBook/utrace.tmpl
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/DocBook/utrace.tmpl      2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/DocBook/utrace.tmpl
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/DocBook/utrace.tmpl        Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,566 @@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
@@ -757,9 +757,9 @@ diff -purN linux-2.6.27/Documentation/DocBook/utrace.tmpl linux-2.6.27.19-5.1/Do
 +</chapter>
 +
 +</book>
-diff -purN linux-2.6.27/Documentation/acpi/dsdt-override.txt linux-2.6.27.19-5.1/Documentation/acpi/dsdt-override.txt
---- linux-2.6.27/Documentation/acpi/dsdt-override.txt  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/acpi/dsdt-override.txt   2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/acpi/dsdt-override.txt
+--- a/Documentation/acpi/dsdt-override.txt     Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/acpi/dsdt-override.txt     Wed May 06 16:55:56 2009 +0100
 @@ -1,7 +1,15 @@
 -Linux supports a method of overriding the BIOS DSDT:
 +Linux supports two methods of overriding the BIOS DSDT:
@@ -778,9 +778,9 @@ diff -purN linux-2.6.27/Documentation/acpi/dsdt-override.txt linux-2.6.27.19-5.1
 +
 +Documentation/initramfs-add-dsdt.sh is provided for convenience
 +for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
-diff -purN linux-2.6.27/Documentation/acpi/initramfs-add-dsdt.sh linux-2.6.27.19-5.1/Documentation/acpi/initramfs-add-dsdt.sh
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/acpi/initramfs-add-dsdt.sh       2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/acpi/initramfs-add-dsdt.sh
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/acpi/initramfs-add-dsdt.sh Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,43 @@
 +#!/bin/bash
 +# Adds a DSDT file to the initrd (if it's an initramfs)
@@ -825,10 +825,10 @@ diff -purN linux-2.6.27/Documentation/acpi/initramfs-add-dsdt.sh linux-2.6.27.19
 +# re-compress the archive
 +gzip -c "$tempcpio"/initramfs.cpio > "$1"
 +
-diff -purN linux-2.6.27/Documentation/block/deadline-iosched.txt linux-2.6.27.19-5.1/Documentation/block/deadline-iosched.txt
---- linux-2.6.27/Documentation/block/deadline-iosched.txt      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/block/deadline-iosched.txt       2009-03-25 16:11:44.000000000 +0000
-@@ -30,12 +30,18 @@ write_expire       (in ms)
+diff -r 9608d5473017 Documentation/block/deadline-iosched.txt
+--- a/Documentation/block/deadline-iosched.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/block/deadline-iosched.txt Wed May 06 16:55:56 2009 +0100
+@@ -30,12 +30,18 @@
  Similar to read_expire mentioned above, but for writes.
  
  
@@ -851,10 +851,10 @@ diff -purN linux-2.6.27/Documentation/block/deadline-iosched.txt linux-2.6.27.19
  
  
  writes_starved        (number of dispatches)
-diff -purN linux-2.6.27/Documentation/cciss.txt linux-2.6.27.19-5.1/Documentation/cciss.txt
---- linux-2.6.27/Documentation/cciss.txt       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cciss.txt        2009-03-25 16:11:43.000000000 +0000
-@@ -26,6 +26,8 @@ This driver is known to work with the fo
+diff -r 9608d5473017 Documentation/cciss.txt
+--- a/Documentation/cciss.txt  Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cciss.txt  Wed May 06 16:55:56 2009 +0100
+@@ -26,6 +26,8 @@
        * SA P410i
        * SA P411
        * SA P812
@@ -863,9 +863,561 @@ diff -purN linux-2.6.27/Documentation/cciss.txt linux-2.6.27.19-5.1/Documentatio
  
  Detecting drive failures:
  -------------------------
-diff -purN linux-2.6.27/Documentation/cgroups/cgroups.txt linux-2.6.27.19-5.1/Documentation/cgroups/cgroups.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups/cgroups.txt      2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/cgroups.txt
+--- a/Documentation/cgroups.txt        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cgroups.txt        Wed May 06 16:55:56 2009 +0100
+@@ -1,548 +0,0 @@
+-                              CGROUPS
+-                              -------
+-
+-Written by Paul Menage <menage@google.com> based on Documentation/cpusets.txt
+-
+-Original copyright statements from cpusets.txt:
+-Portions Copyright (C) 2004 BULL SA.
+-Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
+-Modified by Paul Jackson <pj@sgi.com>
+-Modified by Christoph Lameter <clameter@sgi.com>
+-
+-CONTENTS:
+-=========
+-
+-1. Control Groups
+-  1.1 What are cgroups ?
+-  1.2 Why are cgroups needed ?
+-  1.3 How are cgroups implemented ?
+-  1.4 What does notify_on_release do ?
+-  1.5 How do I use cgroups ?
+-2. Usage Examples and Syntax
+-  2.1 Basic Usage
+-  2.2 Attaching processes
+-3. Kernel API
+-  3.1 Overview
+-  3.2 Synchronization
+-  3.3 Subsystem API
+-4. Questions
+-
+-1. Control Groups
+-=================
+-
+-1.1 What are cgroups ?
+-----------------------
+-
+-Control Groups provide a mechanism for aggregating/partitioning sets of
+-tasks, and all their future children, into hierarchical groups with
+-specialized behaviour.
+-
+-Definitions:
+-
+-A *cgroup* associates a set of tasks with a set of parameters for one
+-or more subsystems.
+-
+-A *subsystem* is a module that makes use of the task grouping
+-facilities provided by cgroups to treat groups of tasks in
+-particular ways. A subsystem is typically a "resource controller" that
+-schedules a resource or applies per-cgroup limits, but it may be
+-anything that wants to act on a group of processes, e.g. a
+-virtualization subsystem.
+-
+-A *hierarchy* is a set of cgroups arranged in a tree, such that
+-every task in the system is in exactly one of the cgroups in the
+-hierarchy, and a set of subsystems; each subsystem has system-specific
+-state attached to each cgroup in the hierarchy.  Each hierarchy has
+-an instance of the cgroup virtual filesystem associated with it.
+-
+-At any one time there may be multiple active hierachies of task
+-cgroups. Each hierarchy is a partition of all tasks in the system.
+-
+-User level code may create and destroy cgroups by name in an
+-instance of the cgroup virtual file system, specify and query to
+-which cgroup a task is assigned, and list the task pids assigned to
+-a cgroup. Those creations and assignments only affect the hierarchy
+-associated with that instance of the cgroup file system.
+-
+-On their own, the only use for cgroups is for simple job
+-tracking. The intention is that other subsystems hook into the generic
+-cgroup support to provide new attributes for cgroups, such as
+-accounting/limiting the resources which processes in a cgroup can
+-access. For example, cpusets (see Documentation/cpusets.txt) allows
+-you to associate a set of CPUs and a set of memory nodes with the
+-tasks in each cgroup.
+-
+-1.2 Why are cgroups needed ?
+-----------------------------
+-
+-There are multiple efforts to provide process aggregations in the
+-Linux kernel, mainly for resource tracking purposes. Such efforts
+-include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server
+-namespaces. These all require the basic notion of a
+-grouping/partitioning of processes, with newly forked processes ending
+-in the same group (cgroup) as their parent process.
+-
+-The kernel cgroup patch provides the minimum essential kernel
+-mechanisms required to efficiently implement such groups. It has
+-minimal impact on the system fast paths, and provides hooks for
+-specific subsystems such as cpusets to provide additional behaviour as
+-desired.
+-
+-Multiple hierarchy support is provided to allow for situations where
+-the division of tasks into cgroups is distinctly different for
+-different subsystems - having parallel hierarchies allows each
+-hierarchy to be a natural division of tasks, without having to handle
+-complex combinations of tasks that would be present if several
+-unrelated subsystems needed to be forced into the same tree of
+-cgroups.
+-
+-At one extreme, each resource controller or subsystem could be in a
+-separate hierarchy; at the other extreme, all subsystems
+-would be attached to the same hierarchy.
+-
+-As an example of a scenario (originally proposed by vatsa@in.ibm.com)
+-that can benefit from multiple hierarchies, consider a large
+-university server with various users - students, professors, system
+-tasks etc. The resource planning for this server could be along the
+-following lines:
+-
+-       CPU :           Top cpuset
+-                       /       \
+-               CPUSet1         CPUSet2
+-                  |              |
+-               (Profs)         (Students)
+-
+-               In addition (system tasks) are attached to topcpuset (so
+-               that they can run anywhere) with a limit of 20%
+-
+-       Memory : Professors (50%), students (30%), system (20%)
+-
+-       Disk : Prof (50%), students (30%), system (20%)
+-
+-       Network : WWW browsing (20%), Network File System (60%), others (20%)
+-                               / \
+-                       Prof (15%) students (5%)
+-
+-Browsers like firefox/lynx go into the WWW network class, while (k)nfsd go
+-into NFS network class.
+-
+-At the same time firefox/lynx will share an appropriate CPU/Memory class
+-depending on who launched it (prof/student).
+-
+-With the ability to classify tasks differently for different resources
+-(by putting those resource subsystems in different hierarchies) then
+-the admin can easily set up a script which receives exec notifications
+-and depending on who is launching the browser he can
+-
+-       # echo browser_pid > /mnt/<restype>/<userclass>/tasks
+-
+-With only a single hierarchy, he now would potentially have to create
+-a separate cgroup for every browser launched and associate it with
+-approp network and other resource class.  This may lead to
+-proliferation of such cgroups.
+-
+-Also lets say that the administrator would like to give enhanced network
+-access temporarily to a student's browser (since it is night and the user
+-wants to do online gaming :))  OR give one of the students simulation
+-apps enhanced CPU power,
+-
+-With ability to write pids directly to resource classes, it's just a
+-matter of :
+-
+-       # echo pid > /mnt/network/<new_class>/tasks
+-       (after some time)
+-       # echo pid > /mnt/network/<orig_class>/tasks
+-
+-Without this ability, he would have to split the cgroup into
+-multiple separate ones and then associate the new cgroups with the
+-new resource classes.
+-
+-
+-
+-1.3 How are cgroups implemented ?
+----------------------------------
+-
+-Control Groups extends the kernel as follows:
+-
+- - Each task in the system has a reference-counted pointer to a
+-   css_set.
+-
+- - A css_set contains a set of reference-counted pointers to
+-   cgroup_subsys_state objects, one for each cgroup subsystem
+-   registered in the system. There is no direct link from a task to
+-   the cgroup of which it's a member in each hierarchy, but this
+-   can be determined by following pointers through the
+-   cgroup_subsys_state objects. This is because accessing the
+-   subsystem state is something that's expected to happen frequently
+-   and in performance-critical code, whereas operations that require a
+-   task's actual cgroup assignments (in particular, moving between
+-   cgroups) are less common. A linked list runs through the cg_list
+-   field of each task_struct using the css_set, anchored at
+-   css_set->tasks.
+-
+- - A cgroup hierarchy filesystem can be mounted  for browsing and
+-   manipulation from user space.
+-
+- - You can list all the tasks (by pid) attached to any cgroup.
+-
+-The implementation of cgroups requires a few, simple hooks
+-into the rest of the kernel, none in performance critical paths:
+-
+- - in init/main.c, to initialize the root cgroups and initial
+-   css_set at system boot.
+-
+- - in fork and exit, to attach and detach a task from its css_set.
+-
+-In addition a new file system, of type "cgroup" may be mounted, to
+-enable browsing and modifying the cgroups presently known to the
+-kernel.  When mounting a cgroup hierarchy, you may specify a
+-comma-separated list of subsystems to mount as the filesystem mount
+-options.  By default, mounting the cgroup filesystem attempts to
+-mount a hierarchy containing all registered subsystems.
+-
+-If an active hierarchy with exactly the same set of subsystems already
+-exists, it will be reused for the new mount. If no existing hierarchy
+-matches, and any of the requested subsystems are in use in an existing
+-hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
+-is activated, associated with the requested subsystems.
+-
+-It's not currently possible to bind a new subsystem to an active
+-cgroup hierarchy, or to unbind a subsystem from an active cgroup
+-hierarchy. This may be possible in future, but is fraught with nasty
+-error-recovery issues.
+-
+-When a cgroup filesystem is unmounted, if there are any
+-child cgroups created below the top-level cgroup, that hierarchy
+-will remain active even though unmounted; if there are no
+-child cgroups then the hierarchy will be deactivated.
+-
+-No new system calls are added for cgroups - all support for
+-querying and modifying cgroups is via this cgroup file system.
+-
+-Each task under /proc has an added file named 'cgroup' displaying,
+-for each active hierarchy, the subsystem names and the cgroup name
+-as the path relative to the root of the cgroup file system.
+-
+-Each cgroup is represented by a directory in the cgroup file system
+-containing the following files describing that cgroup:
+-
+- - tasks: list of tasks (by pid) attached to that cgroup
+- - releasable flag: cgroup currently removeable?
+- - notify_on_release flag: run the release agent on exit?
+- - release_agent: the path to use for release notifications (this file
+-   exists in the top cgroup only)
+-
+-Other subsystems such as cpusets may add additional files in each
+-cgroup dir.
+-
+-New cgroups are created using the mkdir system call or shell
+-command.  The properties of a cgroup, such as its flags, are
+-modified by writing to the appropriate file in that cgroups
+-directory, as listed above.
+-
+-The named hierarchical structure of nested cgroups allows partitioning
+-a large system into nested, dynamically changeable, "soft-partitions".
+-
+-The attachment of each task, automatically inherited at fork by any
+-children of that task, to a cgroup allows organizing the work load
+-on a system into related sets of tasks.  A task may be re-attached to
+-any other cgroup, if allowed by the permissions on the necessary
+-cgroup file system directories.
+-
+-When a task is moved from one cgroup to another, it gets a new
+-css_set pointer - if there's an already existing css_set with the
+-desired collection of cgroups then that group is reused, else a new
+-css_set is allocated. Note that the current implementation uses a
+-linear search to locate an appropriate existing css_set, so isn't
+-very efficient. A future version will use a hash table for better
+-performance.
+-
+-To allow access from a cgroup to the css_sets (and hence tasks)
+-that comprise it, a set of cg_cgroup_link objects form a lattice;
+-each cg_cgroup_link is linked into a list of cg_cgroup_links for
+-a single cgroup on its cgrp_link_list field, and a list of
+-cg_cgroup_links for a single css_set on its cg_link_list.
+-
+-Thus the set of tasks in a cgroup can be listed by iterating over
+-each css_set that references the cgroup, and sub-iterating over
+-each css_set's task set.
+-
+-The use of a Linux virtual file system (vfs) to represent the
+-cgroup hierarchy provides for a familiar permission and name space
+-for cgroups, with a minimum of additional kernel code.
+-
+-1.4 What does notify_on_release do ?
+-------------------------------------
+-
+-If the notify_on_release flag is enabled (1) in a cgroup, then
+-whenever the last task in the cgroup leaves (exits or attaches to
+-some other cgroup) and the last child cgroup of that cgroup
+-is removed, then the kernel runs the command specified by the contents
+-of the "release_agent" file in that hierarchy's root directory,
+-supplying the pathname (relative to the mount point of the cgroup
+-file system) of the abandoned cgroup.  This enables automatic
+-removal of abandoned cgroups.  The default value of
+-notify_on_release in the root cgroup at system boot is disabled
+-(0).  The default value of other cgroups at creation is the current
+-value of their parents notify_on_release setting. The default value of
+-a cgroup hierarchy's release_agent path is empty.
+-
+-1.5 How do I use cgroups ?
+---------------------------
+-
+-To start a new job that is to be contained within a cgroup, using
+-the "cpuset" cgroup subsystem, the steps are something like:
+-
+- 1) mkdir /dev/cgroup
+- 2) mount -t cgroup -ocpuset cpuset /dev/cgroup
+- 3) Create the new cgroup by doing mkdir's and write's (or echo's) in
+-    the /dev/cgroup virtual file system.
+- 4) Start a task that will be the "founding father" of the new job.
+- 5) Attach that task to the new cgroup by writing its pid to the
+-    /dev/cgroup tasks file for that cgroup.
+- 6) fork, exec or clone the job tasks from this founding father task.
+-
+-For example, the following sequence of commands will setup a cgroup
+-named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
+-and then start a subshell 'sh' in that cgroup:
+-
+-  mount -t cgroup cpuset -ocpuset /dev/cgroup
+-  cd /dev/cgroup
+-  mkdir Charlie
+-  cd Charlie
+-  /bin/echo 2-3 > cpuset.cpus
+-  /bin/echo 1 > cpuset.mems
+-  /bin/echo $$ > tasks
+-  sh
+-  # The subshell 'sh' is now running in cgroup Charlie
+-  # The next line should display '/Charlie'
+-  cat /proc/self/cgroup
+-
+-2. Usage Examples and Syntax
+-============================
+-
+-2.1 Basic Usage
+----------------
+-
+-Creating, modifying, using the cgroups can be done through the cgroup
+-virtual filesystem.
+-
+-To mount a cgroup hierarchy will all available subsystems, type:
+-# mount -t cgroup xxx /dev/cgroup
+-
+-The "xxx" is not interpreted by the cgroup code, but will appear in
+-/proc/mounts so may be any useful identifying string that you like.
+-
+-To mount a cgroup hierarchy with just the cpuset and numtasks
+-subsystems, type:
+-# mount -t cgroup -o cpuset,numtasks hier1 /dev/cgroup
+-
+-To change the set of subsystems bound to a mounted hierarchy, just
+-remount with different options:
+-
+-# mount -o remount,cpuset,ns  /dev/cgroup
+-
+-Note that changing the set of subsystems is currently only supported
+-when the hierarchy consists of a single (root) cgroup. Supporting
+-the ability to arbitrarily bind/unbind subsystems from an existing
+-cgroup hierarchy is intended to be implemented in the future.
+-
+-Then under /dev/cgroup you can find a tree that corresponds to the
+-tree of the cgroups in the system. For instance, /dev/cgroup
+-is the cgroup that holds the whole system.
+-
+-If you want to create a new cgroup under /dev/cgroup:
+-# cd /dev/cgroup
+-# mkdir my_cgroup
+-
+-Now you want to do something with this cgroup.
+-# cd my_cgroup
+-
+-In this directory you can find several files:
+-# ls
+-notify_on_release releasable tasks
+-(plus whatever files added by the attached subsystems)
+-
+-Now attach your shell to this cgroup:
+-# /bin/echo $$ > tasks
+-
+-You can also create cgroups inside your cgroup by using mkdir in this
+-directory.
+-# mkdir my_sub_cs
+-
+-To remove a cgroup, just use rmdir:
+-# rmdir my_sub_cs
+-
+-This will fail if the cgroup is in use (has cgroups inside, or
+-has processes attached, or is held alive by other subsystem-specific
+-reference).
+-
+-2.2 Attaching processes
+------------------------
+-
+-# /bin/echo PID > tasks
+-
+-Note that it is PID, not PIDs. You can only attach ONE task at a time.
+-If you have several tasks to attach, you have to do it one after another:
+-
+-# /bin/echo PID1 > tasks
+-# /bin/echo PID2 > tasks
+-      ...
+-# /bin/echo PIDn > tasks
+-
+-You can attach the current shell task by echoing 0:
+-
+-# echo 0 > tasks
+-
+-3. Kernel API
+-=============
+-
+-3.1 Overview
+-------------
+-
+-Each kernel subsystem that wants to hook into the generic cgroup
+-system needs to create a cgroup_subsys object. This contains
+-various methods, which are callbacks from the cgroup system, along
+-with a subsystem id which will be assigned by the cgroup system.
+-
+-Other fields in the cgroup_subsys object include:
+-
+-- subsys_id: a unique array index for the subsystem, indicating which
+-  entry in cgroup->subsys[] this subsystem should be managing.
+-
+-- name: should be initialized to a unique subsystem name. Should be
+-  no longer than MAX_CGROUP_TYPE_NAMELEN.
+-
+-- early_init: indicate if the subsystem needs early initialization
+-  at system boot.
+-
+-Each cgroup object created by the system has an array of pointers,
+-indexed by subsystem id; this pointer is entirely managed by the
+-subsystem; the generic cgroup code will never touch this pointer.
+-
+-3.2 Synchronization
+--------------------
+-
+-There is a global mutex, cgroup_mutex, used by the cgroup
+-system. This should be taken by anything that wants to modify a
+-cgroup. It may also be taken to prevent cgroups from being
+-modified, but more specific locks may be more appropriate in that
+-situation.
+-
+-See kernel/cgroup.c for more details.
+-
+-Subsystems can take/release the cgroup_mutex via the functions
+-cgroup_lock()/cgroup_unlock().
+-
+-Accessing a task's cgroup pointer may be done in the following ways:
+-- while holding cgroup_mutex
+-- while holding the task's alloc_lock (via task_lock())
+-- inside an rcu_read_lock() section via rcu_dereference()
+-
+-3.3 Subsystem API
+------------------
+-
+-Each subsystem should:
+-
+-- add an entry in linux/cgroup_subsys.h
+-- define a cgroup_subsys object called <name>_subsys
+-
+-Each subsystem may export the following methods. The only mandatory
+-methods are create/destroy. Any others that are null are presumed to
+-be successful no-ops.
+-
+-struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
+-                                 struct cgroup *cgrp)
+-(cgroup_mutex held by caller)
+-
+-Called to create a subsystem state object for a cgroup. The
+-subsystem should allocate its subsystem state object for the passed
+-cgroup, returning a pointer to the new object on success or a
+-negative error code. On success, the subsystem pointer should point to
+-a structure of type cgroup_subsys_state (typically embedded in a
+-larger subsystem-specific object), which will be initialized by the
+-cgroup system. Note that this will be called at initialization to
+-create the root subsystem state for this subsystem; this case can be
+-identified by the passed cgroup object having a NULL parent (since
+-it's the root of the hierarchy) and may be an appropriate place for
+-initialization code.
+-
+-void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-(cgroup_mutex held by caller)
+-
+-The cgroup system is about to destroy the passed cgroup; the subsystem
+-should do any necessary cleanup and free its subsystem state
+-object. By the time this method is called, the cgroup has already been
+-unlinked from the file system and from the child list of its parent;
+-cgroup->parent is still valid. (Note - can also be called for a
+-newly-created cgroup if an error occurs after this subsystem's
+-create() method has been called for the new cgroup).
+-
+-void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
+-(cgroup_mutex held by caller)
+-
+-Called before checking the reference count on each subsystem. This may
+-be useful for subsystems which have some extra references even if
+-there are not tasks in the cgroup.
+-
+-int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
+-             struct task_struct *task)
+-(cgroup_mutex held by caller)
+-
+-Called prior to moving a task into a cgroup; if the subsystem
+-returns an error, this will abort the attach operation.  If a NULL
+-task is passed, then a successful result indicates that *any*
+-unspecified task can be moved into the cgroup. Note that this isn't
+-called on a fork. If this method returns 0 (success) then this should
+-remain valid while the caller holds cgroup_mutex.
+-
+-void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
+-          struct cgroup *old_cgrp, struct task_struct *task)
+-
+-Called after the task has been attached to the cgroup, to allow any
+-post-attachment activity that requires memory allocations or blocking.
+-
+-void fork(struct cgroup_subsy *ss, struct task_struct *task)
+-
+-Called when a task is forked into a cgroup.
+-
+-void exit(struct cgroup_subsys *ss, struct task_struct *task)
+-
+-Called during task exit.
+-
+-int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-
+-Called after creation of a cgroup to allow a subsystem to populate
+-the cgroup directory with file entries.  The subsystem should make
+-calls to cgroup_add_file() with objects of type cftype (see
+-include/linux/cgroup.h for details).  Note that although this
+-method can return an error code, the error code is currently not
+-always handled well.
+-
+-void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
+-
+-Called at the end of cgroup_clone() to do any paramater
+-initialization which might be required before a task could attach.  For
+-example in cpusets, no task may attach before 'cpus' and 'mems' are set
+-up.
+-
+-void bind(struct cgroup_subsys *ss, struct cgroup *root)
+-(cgroup_mutex held by caller)
+-
+-Called when a cgroup subsystem is rebound to a different hierarchy
+-and root cgroup. Currently this will only involve movement between
+-the default hierarchy (which never has sub-cgroups) and a hierarchy
+-that is being created/destroyed (and hence has no sub-cgroups).
+-
+-4. Questions
+-============
+-
+-Q: what's up with this '/bin/echo' ?
+-A: bash's builtin 'echo' command does not check calls to write() against
+-   errors. If you use it in the cgroup file system, you won't be
+-   able to tell whether a command succeeded or failed.
+-
+-Q: When I attach processes, only the first of the line gets really attached !
+-A: We can only return one error code per call to write(). So you should also
+-   put only ONE pid.
+-
+diff -r 9608d5473017 Documentation/cgroups/cgroups.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/cgroups/cgroups.txt        Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,548 @@
 +                              CGROUPS
 +                              -------
@@ -1415,9 +1967,9 @@ diff -purN linux-2.6.27/Documentation/cgroups/cgroups.txt linux-2.6.27.19-5.1/Do
 +A: We can only return one error code per call to write(). So you should also
 +   put only ONE pid.
 +
-diff -purN linux-2.6.27/Documentation/cgroups/freezer-subsystem.txt linux-2.6.27.19-5.1/Documentation/cgroups/freezer-subsystem.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups/freezer-subsystem.txt    2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/cgroups/freezer-subsystem.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/cgroups/freezer-subsystem.txt      Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,102 @@
 +The cgroup freezer is useful to batch job management system which start
 +and stop sets of tasks in order to schedule the resources of a machine
@@ -1521,562 +2073,10 @@ diff -purN linux-2.6.27/Documentation/cgroups/freezer-subsystem.txt linux-2.6.27
 +              and returns EINVAL)
 +      3) The tasks that blocked the cgroup from entering the "FROZEN"
 +              state disappear from the cgroup's set of tasks.
-diff -purN linux-2.6.27/Documentation/cgroups.txt linux-2.6.27.19-5.1/Documentation/cgroups.txt
---- linux-2.6.27/Documentation/cgroups.txt     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cgroups.txt      1970-01-01 01:00:00.000000000 +0100
-@@ -1,548 +0,0 @@
--                              CGROUPS
--                              -------
--
--Written by Paul Menage <menage@google.com> based on Documentation/cpusets.txt
--
--Original copyright statements from cpusets.txt:
--Portions Copyright (C) 2004 BULL SA.
--Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
--Modified by Paul Jackson <pj@sgi.com>
--Modified by Christoph Lameter <clameter@sgi.com>
--
--CONTENTS:
--=========
--
--1. Control Groups
--  1.1 What are cgroups ?
--  1.2 Why are cgroups needed ?
--  1.3 How are cgroups implemented ?
--  1.4 What does notify_on_release do ?
--  1.5 How do I use cgroups ?
--2. Usage Examples and Syntax
--  2.1 Basic Usage
--  2.2 Attaching processes
--3. Kernel API
--  3.1 Overview
--  3.2 Synchronization
--  3.3 Subsystem API
--4. Questions
--
--1. Control Groups
--=================
--
--1.1 What are cgroups ?
------------------------
--
--Control Groups provide a mechanism for aggregating/partitioning sets of
--tasks, and all their future children, into hierarchical groups with
--specialized behaviour.
--
--Definitions:
--
--A *cgroup* associates a set of tasks with a set of parameters for one
--or more subsystems.
--
--A *subsystem* is a module that makes use of the task grouping
--facilities provided by cgroups to treat groups of tasks in
--particular ways. A subsystem is typically a "resource controller" that
--schedules a resource or applies per-cgroup limits, but it may be
--anything that wants to act on a group of processes, e.g. a
--virtualization subsystem.
--
--A *hierarchy* is a set of cgroups arranged in a tree, such that
--every task in the system is in exactly one of the cgroups in the
--hierarchy, and a set of subsystems; each subsystem has system-specific
--state attached to each cgroup in the hierarchy.  Each hierarchy has
--an instance of the cgroup virtual filesystem associated with it.
--
--At any one time there may be multiple active hierachies of task
--cgroups. Each hierarchy is a partition of all tasks in the system.
--
--User level code may create and destroy cgroups by name in an
--instance of the cgroup virtual file system, specify and query to
--which cgroup a task is assigned, and list the task pids assigned to
--a cgroup. Those creations and assignments only affect the hierarchy
--associated with that instance of the cgroup file system.
--
--On their own, the only use for cgroups is for simple job
--tracking. The intention is that other subsystems hook into the generic
--cgroup support to provide new attributes for cgroups, such as
--accounting/limiting the resources which processes in a cgroup can
--access. For example, cpusets (see Documentation/cpusets.txt) allows
--you to associate a set of CPUs and a set of memory nodes with the
--tasks in each cgroup.
--
--1.2 Why are cgroups needed ?
------------------------------
--
--There are multiple efforts to provide process aggregations in the
--Linux kernel, mainly for resource tracking purposes. Such efforts
--include cpusets, CKRM/ResGroups, UserBeanCounters, and virtual server
--namespaces. These all require the basic notion of a
--grouping/partitioning of processes, with newly forked processes ending
--in the same group (cgroup) as their parent process.
--
--The kernel cgroup patch provides the minimum essential kernel
--mechanisms required to efficiently implement such groups. It has
--minimal impact on the system fast paths, and provides hooks for
--specific subsystems such as cpusets to provide additional behaviour as
--desired.
--
--Multiple hierarchy support is provided to allow for situations where
--the division of tasks into cgroups is distinctly different for
--different subsystems - having parallel hierarchies allows each
--hierarchy to be a natural division of tasks, without having to handle
--complex combinations of tasks that would be present if several
--unrelated subsystems needed to be forced into the same tree of
--cgroups.
--
--At one extreme, each resource controller or subsystem could be in a
--separate hierarchy; at the other extreme, all subsystems
--would be attached to the same hierarchy.
--
--As an example of a scenario (originally proposed by vatsa@in.ibm.com)
--that can benefit from multiple hierarchies, consider a large
--university server with various users - students, professors, system
--tasks etc. The resource planning for this server could be along the
--following lines:
--
--       CPU :           Top cpuset
--                       /       \
--               CPUSet1         CPUSet2
--                  |              |
--               (Profs)         (Students)
--
--               In addition (system tasks) are attached to topcpuset (so
--               that they can run anywhere) with a limit of 20%
--
--       Memory : Professors (50%), students (30%), system (20%)
--
--       Disk : Prof (50%), students (30%), system (20%)
--
--       Network : WWW browsing (20%), Network File System (60%), others (20%)
--                               / \
--                       Prof (15%) students (5%)
--
--Browsers like firefox/lynx go into the WWW network class, while (k)nfsd go
--into NFS network class.
--
--At the same time firefox/lynx will share an appropriate CPU/Memory class
--depending on who launched it (prof/student).
--
--With the ability to classify tasks differently for different resources
--(by putting those resource subsystems in different hierarchies) then
--the admin can easily set up a script which receives exec notifications
--and depending on who is launching the browser he can
--
--       # echo browser_pid > /mnt/<restype>/<userclass>/tasks
--
--With only a single hierarchy, he now would potentially have to create
--a separate cgroup for every browser launched and associate it with
--approp network and other resource class.  This may lead to
--proliferation of such cgroups.
--
--Also lets say that the administrator would like to give enhanced network
--access temporarily to a student's browser (since it is night and the user
--wants to do online gaming :))  OR give one of the students simulation
--apps enhanced CPU power,
--
--With ability to write pids directly to resource classes, it's just a
--matter of :
--
--       # echo pid > /mnt/network/<new_class>/tasks
--       (after some time)
--       # echo pid > /mnt/network/<orig_class>/tasks
--
--Without this ability, he would have to split the cgroup into
--multiple separate ones and then associate the new cgroups with the
--new resource classes.
--
--
--
--1.3 How are cgroups implemented ?
-----------------------------------
--
--Control Groups extends the kernel as follows:
--
-- - Each task in the system has a reference-counted pointer to a
--   css_set.
--
-- - A css_set contains a set of reference-counted pointers to
--   cgroup_subsys_state objects, one for each cgroup subsystem
--   registered in the system. There is no direct link from a task to
--   the cgroup of which it's a member in each hierarchy, but this
--   can be determined by following pointers through the
--   cgroup_subsys_state objects. This is because accessing the
--   subsystem state is something that's expected to happen frequently
--   and in performance-critical code, whereas operations that require a
--   task's actual cgroup assignments (in particular, moving between
--   cgroups) are less common. A linked list runs through the cg_list
--   field of each task_struct using the css_set, anchored at
--   css_set->tasks.
--
-- - A cgroup hierarchy filesystem can be mounted  for browsing and
--   manipulation from user space.
--
-- - You can list all the tasks (by pid) attached to any cgroup.
--
--The implementation of cgroups requires a few, simple hooks
--into the rest of the kernel, none in performance critical paths:
--
-- - in init/main.c, to initialize the root cgroups and initial
--   css_set at system boot.
--
-- - in fork and exit, to attach and detach a task from its css_set.
--
--In addition a new file system, of type "cgroup" may be mounted, to
--enable browsing and modifying the cgroups presently known to the
--kernel.  When mounting a cgroup hierarchy, you may specify a
--comma-separated list of subsystems to mount as the filesystem mount
--options.  By default, mounting the cgroup filesystem attempts to
--mount a hierarchy containing all registered subsystems.
--
--If an active hierarchy with exactly the same set of subsystems already
--exists, it will be reused for the new mount. If no existing hierarchy
--matches, and any of the requested subsystems are in use in an existing
--hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
--is activated, associated with the requested subsystems.
--
--It's not currently possible to bind a new subsystem to an active
--cgroup hierarchy, or to unbind a subsystem from an active cgroup
--hierarchy. This may be possible in future, but is fraught with nasty
--error-recovery issues.
--
--When a cgroup filesystem is unmounted, if there are any
--child cgroups created below the top-level cgroup, that hierarchy
--will remain active even though unmounted; if there are no
--child cgroups then the hierarchy will be deactivated.
--
--No new system calls are added for cgroups - all support for
--querying and modifying cgroups is via this cgroup file system.
--
--Each task under /proc has an added file named 'cgroup' displaying,
--for each active hierarchy, the subsystem names and the cgroup name
--as the path relative to the root of the cgroup file system.
--
--Each cgroup is represented by a directory in the cgroup file system
--containing the following files describing that cgroup:
--
-- - tasks: list of tasks (by pid) attached to that cgroup
-- - releasable flag: cgroup currently removeable?
-- - notify_on_release flag: run the release agent on exit?
-- - release_agent: the path to use for release notifications (this file
--   exists in the top cgroup only)
--
--Other subsystems such as cpusets may add additional files in each
--cgroup dir.
--
--New cgroups are created using the mkdir system call or shell
--command.  The properties of a cgroup, such as its flags, are
--modified by writing to the appropriate file in that cgroups
--directory, as listed above.
--
--The named hierarchical structure of nested cgroups allows partitioning
--a large system into nested, dynamically changeable, "soft-partitions".
--
--The attachment of each task, automatically inherited at fork by any
--children of that task, to a cgroup allows organizing the work load
--on a system into related sets of tasks.  A task may be re-attached to
--any other cgroup, if allowed by the permissions on the necessary
--cgroup file system directories.
--
--When a task is moved from one cgroup to another, it gets a new
--css_set pointer - if there's an already existing css_set with the
--desired collection of cgroups then that group is reused, else a new
--css_set is allocated. Note that the current implementation uses a
--linear search to locate an appropriate existing css_set, so isn't
--very efficient. A future version will use a hash table for better
--performance.
--
--To allow access from a cgroup to the css_sets (and hence tasks)
--that comprise it, a set of cg_cgroup_link objects form a lattice;
--each cg_cgroup_link is linked into a list of cg_cgroup_links for
--a single cgroup on its cgrp_link_list field, and a list of
--cg_cgroup_links for a single css_set on its cg_link_list.
--
--Thus the set of tasks in a cgroup can be listed by iterating over
--each css_set that references the cgroup, and sub-iterating over
--each css_set's task set.
--
--The use of a Linux virtual file system (vfs) to represent the
--cgroup hierarchy provides for a familiar permission and name space
--for cgroups, with a minimum of additional kernel code.
--
--1.4 What does notify_on_release do ?
--------------------------------------
--
--If the notify_on_release flag is enabled (1) in a cgroup, then
--whenever the last task in the cgroup leaves (exits or attaches to
--some other cgroup) and the last child cgroup of that cgroup
--is removed, then the kernel runs the command specified by the contents
--of the "release_agent" file in that hierarchy's root directory,
--supplying the pathname (relative to the mount point of the cgroup
--file system) of the abandoned cgroup.  This enables automatic
--removal of abandoned cgroups.  The default value of
--notify_on_release in the root cgroup at system boot is disabled
--(0).  The default value of other cgroups at creation is the current
--value of their parents notify_on_release setting. The default value of
--a cgroup hierarchy's release_agent path is empty.
--
--1.5 How do I use cgroups ?
----------------------------
--
--To start a new job that is to be contained within a cgroup, using
--the "cpuset" cgroup subsystem, the steps are something like:
--
-- 1) mkdir /dev/cgroup
-- 2) mount -t cgroup -ocpuset cpuset /dev/cgroup
-- 3) Create the new cgroup by doing mkdir's and write's (or echo's) in
--    the /dev/cgroup virtual file system.
-- 4) Start a task that will be the "founding father" of the new job.
-- 5) Attach that task to the new cgroup by writing its pid to the
--    /dev/cgroup tasks file for that cgroup.
-- 6) fork, exec or clone the job tasks from this founding father task.
--
--For example, the following sequence of commands will setup a cgroup
--named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,
--and then start a subshell 'sh' in that cgroup:
--
--  mount -t cgroup cpuset -ocpuset /dev/cgroup
--  cd /dev/cgroup
--  mkdir Charlie
--  cd Charlie
--  /bin/echo 2-3 > cpuset.cpus
--  /bin/echo 1 > cpuset.mems
--  /bin/echo $$ > tasks
--  sh
--  # The subshell 'sh' is now running in cgroup Charlie
--  # The next line should display '/Charlie'
--  cat /proc/self/cgroup
--
--2. Usage Examples and Syntax
--============================
--
--2.1 Basic Usage
-----------------
--
--Creating, modifying, using the cgroups can be done through the cgroup
--virtual filesystem.
--
--To mount a cgroup hierarchy will all available subsystems, type:
--# mount -t cgroup xxx /dev/cgroup
--
--The "xxx" is not interpreted by the cgroup code, but will appear in
--/proc/mounts so may be any useful identifying string that you like.
--
--To mount a cgroup hierarchy with just the cpuset and numtasks
--subsystems, type:
--# mount -t cgroup -o cpuset,numtasks hier1 /dev/cgroup
--
--To change the set of subsystems bound to a mounted hierarchy, just
--remount with different options:
--
--# mount -o remount,cpuset,ns  /dev/cgroup
--
--Note that changing the set of subsystems is currently only supported
--when the hierarchy consists of a single (root) cgroup. Supporting
--the ability to arbitrarily bind/unbind subsystems from an existing
--cgroup hierarchy is intended to be implemented in the future.
--
--Then under /dev/cgroup you can find a tree that corresponds to the
--tree of the cgroups in the system. For instance, /dev/cgroup
--is the cgroup that holds the whole system.
--
--If you want to create a new cgroup under /dev/cgroup:
--# cd /dev/cgroup
--# mkdir my_cgroup
--
--Now you want to do something with this cgroup.
--# cd my_cgroup
--
--In this directory you can find several files:
--# ls
--notify_on_release releasable tasks
--(plus whatever files added by the attached subsystems)
--
--Now attach your shell to this cgroup:
--# /bin/echo $$ > tasks
--
--You can also create cgroups inside your cgroup by using mkdir in this
--directory.
--# mkdir my_sub_cs
--
--To remove a cgroup, just use rmdir:
--# rmdir my_sub_cs
--
--This will fail if the cgroup is in use (has cgroups inside, or
--has processes attached, or is held alive by other subsystem-specific
--reference).
--
--2.2 Attaching processes
-------------------------
--
--# /bin/echo PID > tasks
--
--Note that it is PID, not PIDs. You can only attach ONE task at a time.
--If you have several tasks to attach, you have to do it one after another:
--
--# /bin/echo PID1 > tasks
--# /bin/echo PID2 > tasks
--      ...
--# /bin/echo PIDn > tasks
--
--You can attach the current shell task by echoing 0:
--
--# echo 0 > tasks
--
--3. Kernel API
--=============
--
--3.1 Overview
--------------
--
--Each kernel subsystem that wants to hook into the generic cgroup
--system needs to create a cgroup_subsys object. This contains
--various methods, which are callbacks from the cgroup system, along
--with a subsystem id which will be assigned by the cgroup system.
--
--Other fields in the cgroup_subsys object include:
--
--- subsys_id: a unique array index for the subsystem, indicating which
--  entry in cgroup->subsys[] this subsystem should be managing.
--
--- name: should be initialized to a unique subsystem name. Should be
--  no longer than MAX_CGROUP_TYPE_NAMELEN.
--
--- early_init: indicate if the subsystem needs early initialization
--  at system boot.
--
--Each cgroup object created by the system has an array of pointers,
--indexed by subsystem id; this pointer is entirely managed by the
--subsystem; the generic cgroup code will never touch this pointer.
--
--3.2 Synchronization
---------------------
--
--There is a global mutex, cgroup_mutex, used by the cgroup
--system. This should be taken by anything that wants to modify a
--cgroup. It may also be taken to prevent cgroups from being
--modified, but more specific locks may be more appropriate in that
--situation.
--
--See kernel/cgroup.c for more details.
--
--Subsystems can take/release the cgroup_mutex via the functions
--cgroup_lock()/cgroup_unlock().
--
--Accessing a task's cgroup pointer may be done in the following ways:
--- while holding cgroup_mutex
--- while holding the task's alloc_lock (via task_lock())
--- inside an rcu_read_lock() section via rcu_dereference()
--
--3.3 Subsystem API
-------------------
--
--Each subsystem should:
--
--- add an entry in linux/cgroup_subsys.h
--- define a cgroup_subsys object called <name>_subsys
--
--Each subsystem may export the following methods. The only mandatory
--methods are create/destroy. Any others that are null are presumed to
--be successful no-ops.
--
--struct cgroup_subsys_state *create(struct cgroup_subsys *ss,
--                                 struct cgroup *cgrp)
--(cgroup_mutex held by caller)
--
--Called to create a subsystem state object for a cgroup. The
--subsystem should allocate its subsystem state object for the passed
--cgroup, returning a pointer to the new object on success or a
--negative error code. On success, the subsystem pointer should point to
--a structure of type cgroup_subsys_state (typically embedded in a
--larger subsystem-specific object), which will be initialized by the
--cgroup system. Note that this will be called at initialization to
--create the root subsystem state for this subsystem; this case can be
--identified by the passed cgroup object having a NULL parent (since
--it's the root of the hierarchy) and may be an appropriate place for
--initialization code.
--
--void destroy(struct cgroup_subsys *ss, struct cgroup *cgrp)
--(cgroup_mutex held by caller)
--
--The cgroup system is about to destroy the passed cgroup; the subsystem
--should do any necessary cleanup and free its subsystem state
--object. By the time this method is called, the cgroup has already been
--unlinked from the file system and from the child list of its parent;
--cgroup->parent is still valid. (Note - can also be called for a
--newly-created cgroup if an error occurs after this subsystem's
--create() method has been called for the new cgroup).
--
--void pre_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
--(cgroup_mutex held by caller)
--
--Called before checking the reference count on each subsystem. This may
--be useful for subsystems which have some extra references even if
--there are not tasks in the cgroup.
--
--int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
--             struct task_struct *task)
--(cgroup_mutex held by caller)
--
--Called prior to moving a task into a cgroup; if the subsystem
--returns an error, this will abort the attach operation.  If a NULL
--task is passed, then a successful result indicates that *any*
--unspecified task can be moved into the cgroup. Note that this isn't
--called on a fork. If this method returns 0 (success) then this should
--remain valid while the caller holds cgroup_mutex.
--
--void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
--          struct cgroup *old_cgrp, struct task_struct *task)
--
--Called after the task has been attached to the cgroup, to allow any
--post-attachment activity that requires memory allocations or blocking.
--
--void fork(struct cgroup_subsy *ss, struct task_struct *task)
--
--Called when a task is forked into a cgroup.
--
--void exit(struct cgroup_subsys *ss, struct task_struct *task)
--
--Called during task exit.
--
--int populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
--
--Called after creation of a cgroup to allow a subsystem to populate
--the cgroup directory with file entries.  The subsystem should make
--calls to cgroup_add_file() with objects of type cftype (see
--include/linux/cgroup.h for details).  Note that although this
--method can return an error code, the error code is currently not
--always handled well.
--
--void post_clone(struct cgroup_subsys *ss, struct cgroup *cgrp)
--
--Called at the end of cgroup_clone() to do any paramater
--initialization which might be required before a task could attach.  For
--example in cpusets, no task may attach before 'cpus' and 'mems' are set
--up.
--
--void bind(struct cgroup_subsys *ss, struct cgroup *root)
--(cgroup_mutex held by caller)
--
--Called when a cgroup subsystem is rebound to a different hierarchy
--and root cgroup. Currently this will only involve movement between
--the default hierarchy (which never has sub-cgroups) and a hierarchy
--that is being created/destroyed (and hence has no sub-cgroups).
--
--4. Questions
--============
--
--Q: what's up with this '/bin/echo' ?
--A: bash's builtin 'echo' command does not check calls to write() against
--   errors. If you use it in the cgroup file system, you won't be
--   able to tell whether a command succeeded or failed.
--
--Q: When I attach processes, only the first of the line gets really attached !
--A: We can only return one error code per call to write(). So you should also
--   put only ONE pid.
--
-diff -purN linux-2.6.27/Documentation/cpu-freq/governors.txt linux-2.6.27.19-5.1/Documentation/cpu-freq/governors.txt
---- linux-2.6.27/Documentation/cpu-freq/governors.txt  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpu-freq/governors.txt   2009-03-25 16:11:45.000000000 +0000
-@@ -117,7 +117,19 @@ accessible parameters:
+diff -r 9608d5473017 Documentation/cpu-freq/governors.txt
+--- a/Documentation/cpu-freq/governors.txt     Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpu-freq/governors.txt     Wed May 06 16:55:56 2009 +0100
+@@ -117,7 +117,19 @@
  sampling_rate: measured in uS (10^-6 seconds), this is how often you
  want the kernel to look at the CPU usage and to make decisions on
  what to do about the frequency.  Typically this is set to values of
@@ -2097,10 +2097,10 @@ diff -purN linux-2.6.27/Documentation/cpu-freq/governors.txt linux-2.6.27.19-5.1
  
  show_sampling_rate_(min|max): the minimum and maximum sampling rates
  available that you may set 'sampling_rate' to.
-diff -purN linux-2.6.27/Documentation/cpu-freq/user-guide.txt linux-2.6.27.19-5.1/Documentation/cpu-freq/user-guide.txt
---- linux-2.6.27/Documentation/cpu-freq/user-guide.txt 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpu-freq/user-guide.txt  2009-03-25 16:11:45.000000000 +0000
-@@ -142,6 +142,18 @@ cpuinfo_min_freq :                this file shows the 
+diff -r 9608d5473017 Documentation/cpu-freq/user-guide.txt
+--- a/Documentation/cpu-freq/user-guide.txt    Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpu-freq/user-guide.txt    Wed May 06 16:55:56 2009 +0100
+@@ -142,6 +142,18 @@
                                frequency the processor can run at(in kHz) 
  cpuinfo_max_freq :            this file shows the maximum operating
                                frequency the processor can run at(in kHz) 
@@ -2119,10 +2119,10 @@ diff -purN linux-2.6.27/Documentation/cpu-freq/user-guide.txt linux-2.6.27.19-5.
  scaling_driver :              this file shows what cpufreq driver is
                                used to set the frequency on this CPU
  
-diff -purN linux-2.6.27/Documentation/cpusets.txt linux-2.6.27.19-5.1/Documentation/cpusets.txt
---- linux-2.6.27/Documentation/cpusets.txt     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/cpusets.txt      2009-03-25 16:11:43.000000000 +0000
-@@ -48,7 +48,7 @@ hooks, beyond what is already present, r
+diff -r 9608d5473017 Documentation/cpusets.txt
+--- a/Documentation/cpusets.txt        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/cpusets.txt        Wed May 06 16:55:56 2009 +0100
+@@ -48,7 +48,7 @@
  job placement on large systems.
  
  Cpusets use the generic cgroup subsystem described in
@@ -2131,10 +2131,10 @@ diff -purN linux-2.6.27/Documentation/cpusets.txt linux-2.6.27.19-5.1/Documentat
  
  Requests by a task, using the sched_setaffinity(2) system call to
  include CPUs in its CPU affinity mask, and using the mbind(2) and
-diff -purN linux-2.6.27/Documentation/filesystems/Locking linux-2.6.27.19-5.1/Documentation/filesystems/Locking
---- linux-2.6.27/Documentation/filesystems/Locking     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/Locking      2009-03-25 16:11:44.000000000 +0000
-@@ -169,6 +169,10 @@ prototypes:
+diff -r 9608d5473017 Documentation/filesystems/Locking
+--- a/Documentation/filesystems/Locking        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/Locking        Wed May 06 16:55:56 2009 +0100
+@@ -169,6 +169,10 @@
        int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
                        loff_t offset, unsigned long nr_segs);
        int (*launder_page) (struct page *);
@@ -2145,7 +2145,7 @@ diff -purN linux-2.6.27/Documentation/filesystems/Locking linux-2.6.27.19-5.1/Do
  
  locking rules:
        All except set_page_dirty may block
-@@ -190,6 +194,10 @@ invalidatepage:           no      yes
+@@ -190,6 +194,10 @@
  releasepage:          no      yes
  direct_IO:            no
  launder_page:         no      yes
@@ -2156,10 +2156,11 @@ diff -purN linux-2.6.27/Documentation/filesystems/Locking linux-2.6.27.19-5.1/Do
  
        ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
  may be called from the request handler (/dev/loop).
-@@ -289,6 +297,20 @@ cleaned, or an error value if not. Note 
+@@ -288,6 +296,20 @@
+ cleaned, or an error value if not. Note that in order to prevent the page
  getting mapped back in and redirtied, it needs to be kept locked
  across the entire operation.
++
 +      ->swapon() will be called with a non-zero argument on files backing
 +(non block device backed) swapfiles. A return value of zero indicates success,
 +in which case this file can be used for backing swapspace. The swapspace
@@ -2173,14 +2174,13 @@ diff -purN linux-2.6.27/Documentation/filesystems/Locking linux-2.6.27.19-5.1/Do
 +
 +      ->swap_in() when swapon() returned success, this method is used to
 +read the swap page.
-+
        Note: currently almost all instances of address_space methods are
  using BKL for internal serialization and that's one of the worst sources
- of contention. Normally they are calling library functions (in fs/buffer.c)
-diff -purN linux-2.6.27/Documentation/filesystems/ocfs2.txt linux-2.6.27.19-5.1/Documentation/filesystems/ocfs2.txt
---- linux-2.6.27/Documentation/filesystems/ocfs2.txt   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/ocfs2.txt    2009-03-25 16:11:44.000000000 +0000
-@@ -76,3 +76,9 @@ localalloc=8(*)              Allows custom localallo
+diff -r 9608d5473017 Documentation/filesystems/ocfs2.txt
+--- a/Documentation/filesystems/ocfs2.txt      Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/ocfs2.txt      Wed May 06 16:55:56 2009 +0100
+@@ -76,3 +76,9 @@
                        large, the fs will silently revert it to the default.
                        Localalloc is not enabled for local mounts.
  localflocks           This disables cluster aware flock.
@@ -2190,10 +2190,10 @@ diff -purN linux-2.6.27/Documentation/filesystems/ocfs2.txt linux-2.6.27.19-5.1/
 +                      bits of significance.
 +user_xattr    (*)     Enables Extended User Attributes.
 +nouser_xattr          Disables Extended User Attributes.
-diff -purN linux-2.6.27/Documentation/filesystems/proc.txt linux-2.6.27.19-5.1/Documentation/filesystems/proc.txt
---- linux-2.6.27/Documentation/filesystems/proc.txt    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/proc.txt     2009-03-25 16:11:44.000000000 +0000
-@@ -44,6 +44,7 @@ Table of Contents
+diff -r 9608d5473017 Documentation/filesystems/proc.txt
+--- a/Documentation/filesystems/proc.txt       Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/proc.txt       Wed May 06 16:55:56 2009 +0100
+@@ -44,6 +44,7 @@
    2.14        /proc/<pid>/io - Display the IO accounting fields
    2.15        /proc/<pid>/coredump_filter - Core dump filtering settings
    2.16        /proc/<pid>/mountinfo - Information about mounts
@@ -2201,7 +2201,7 @@ diff -purN linux-2.6.27/Documentation/filesystems/proc.txt linux-2.6.27.19-5.1/D
  
  ------------------------------------------------------------------------------
  Preface
-@@ -2471,4 +2472,30 @@ For more information on mount propagatio
+@@ -2471,4 +2472,30 @@
  
    Documentation/filesystems/sharedsubtree.txt
  
@@ -2232,10 +2232,10 @@ diff -purN linux-2.6.27/Documentation/filesystems/proc.txt linux-2.6.27.19-5.1/D
 +
  ------------------------------------------------------------------------------
 +
-diff -purN linux-2.6.27/Documentation/filesystems/sysfs-pci.txt linux-2.6.27.19-5.1/Documentation/filesystems/sysfs-pci.txt
---- linux-2.6.27/Documentation/filesystems/sysfs-pci.txt       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/sysfs-pci.txt        2009-03-25 16:11:44.000000000 +0000
-@@ -9,6 +9,7 @@ that support it.  For example, a given b
+diff -r 9608d5473017 Documentation/filesystems/sysfs-pci.txt
+--- a/Documentation/filesystems/sysfs-pci.txt  Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/sysfs-pci.txt  Wed May 06 16:55:56 2009 +0100
+@@ -9,6 +9,7 @@
       |   |-- class
       |   |-- config
       |   |-- device
@@ -2243,7 +2243,7 @@ diff -purN linux-2.6.27/Documentation/filesystems/sysfs-pci.txt linux-2.6.27.19-
       |   |-- irq
       |   |-- local_cpus
       |   |-- resource
-@@ -32,6 +33,7 @@ files, each with their own function.
+@@ -32,6 +33,7 @@
         class             PCI class (ascii, ro)
         config            PCI config space (binary, rw)
         device            PCI device (ascii, ro)
@@ -2251,7 +2251,7 @@ diff -purN linux-2.6.27/Documentation/filesystems/sysfs-pci.txt linux-2.6.27.19-
         irq               IRQ number (ascii, ro)
         local_cpus        nearby CPU mask (cpumask, ro)
         resource                  PCI resource host addresses (ascii, ro)
-@@ -57,10 +59,19 @@ used to do actual device programming fro
+@@ -57,10 +59,19 @@
  don't support mmapping of certain resources, so be sure to check the return
  value from any attempted mmap.
  
@@ -2272,10 +2272,10 @@ diff -purN linux-2.6.27/Documentation/filesystems/sysfs-pci.txt linux-2.6.27.19-
  
  Accessing legacy resources through sysfs
  ----------------------------------------
-diff -purN linux-2.6.27/Documentation/filesystems/vfs.txt linux-2.6.27.19-5.1/Documentation/filesystems/vfs.txt
---- linux-2.6.27/Documentation/filesystems/vfs.txt     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/filesystems/vfs.txt      2009-03-25 16:11:44.000000000 +0000
-@@ -539,6 +539,11 @@ struct address_space_operations {
+diff -r 9608d5473017 Documentation/filesystems/vfs.txt
+--- a/Documentation/filesystems/vfs.txt        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/filesystems/vfs.txt        Wed May 06 16:55:56 2009 +0100
+@@ -539,6 +539,11 @@
        /* migrate the contents of a page to the specified target */
        int (*migratepage) (struct page *, struct page *);
        int (*launder_page) (struct page *);
@@ -2287,7 +2287,7 @@ diff -purN linux-2.6.27/Documentation/filesystems/vfs.txt linux-2.6.27.19-5.1/Do
  };
  
    writepage: called by the VM to write a dirty page to backing store.
-@@ -724,6 +729,19 @@ struct address_space_operations {
+@@ -724,6 +729,19 @@
        prevent redirtying the page, it is kept locked during the whole
        operation.
  
@@ -2307,10 +2307,10 @@ diff -purN linux-2.6.27/Documentation/filesystems/vfs.txt linux-2.6.27.19-5.1/Do
  The File Object
  ===============
  
-diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-i801 linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-i801
---- linux-2.6.27/Documentation/i2c/busses/i2c-i801     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-i801      2009-03-25 16:11:44.000000000 +0000
-@@ -13,8 +13,9 @@ Supported adapters:
+diff -r 9608d5473017 Documentation/i2c/busses/i2c-i801
+--- a/Documentation/i2c/busses/i2c-i801        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/i2c/busses/i2c-i801        Wed May 06 16:55:56 2009 +0100
+@@ -13,8 +13,9 @@
    * Intel 631xESB/632xESB (ESB2)
    * Intel 82801H (ICH8)
    * Intel 82801I (ICH9)
@@ -2322,7 +2322,7 @@ diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-i801 linux-2.6.27.19-5.1/Do
     Datasheets: Publicly available at the Intel website
  
  Authors: 
-@@ -32,7 +33,7 @@ Description
+@@ -32,7 +33,7 @@
  -----------
  
  The ICH (properly known as the 82801AA), ICH0 (82801AB), ICH2 (82801BA),
@@ -2331,10 +2331,10 @@ diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-i801 linux-2.6.27.19-5.1/Do
  Intel's '810' chipset for Celeron-based PCs, '810E' chipset for
  Pentium-based PCs, '815E' chipset, and others.
  
-diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-sis96x linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-sis96x
---- linux-2.6.27/Documentation/i2c/busses/i2c-sis96x   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/i2c/busses/i2c-sis96x    2009-03-25 16:11:44.000000000 +0000
-@@ -42,7 +42,7 @@ I suspect that this driver could be made
+diff -r 9608d5473017 Documentation/i2c/busses/i2c-sis96x
+--- a/Documentation/i2c/busses/i2c-sis96x      Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/i2c/busses/i2c-sis96x      Wed May 06 16:55:56 2009 +0100
+@@ -42,7 +42,7 @@
  chipsets as well: 635, and 635T. If anyone owns a board with those chips
  AND is willing to risk crashing & burning an otherwise well-behaved kernel
  in the name of progress... please contact me at <mhoffman@lightlink.com> or
@@ -2343,9 +2343,9 @@ diff -purN linux-2.6.27/Documentation/i2c/busses/i2c-sis96x linux-2.6.27.19-5.1/
  reports and/or success stories as well.
  
  
-diff -purN linux-2.6.27/Documentation/kdb/bt_x86 linux-2.6.27.19-5.1/Documentation/kdb/bt_x86
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/bt_x86       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/bt_x86
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/bt_x86 Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,1837 @@
 +Copyright Keith Owens, 2007.
 +
@@ -4184,9 +4184,9 @@ diff -purN linux-2.6.27/Documentation/kdb/bt_x86 linux-2.6.27.19-5.1/Documentati
 +has not changed since the previous scan, there is no need to rescan bb[2], bb[7]
 +or bb[4].  Since bb[4] is not being rescanned, there is no need to rescan bb[5]
 +or bb[6] and the cycle is closed.
-diff -purN linux-2.6.27/Documentation/kdb/kdb.mm linux-2.6.27.19-5.1/Documentation/kdb/kdb.mm
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb.mm       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb.mm
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb.mm Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,492 @@
 +.TH KDB 8 "September 21, 2005"
 +.hy 0
@@ -4680,9 +4680,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb.mm linux-2.6.27.19-5.1/Documentati
 +.SH SEE ALSO
 +.P
 +linux/Documentation/kdb/kdb_{bp,bt,env,ll,md,ps,rd,sr,ss}.man
-diff -purN linux-2.6.27/Documentation/kdb/kdb_bp.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_bp.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_bp.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_bp.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_bp.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,197 @@
 +.TH BD 1 "July 12, 2004"
 +.SH NAME
@@ -4881,9 +4881,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_bp.man linux-2.6.27.19-5.1/Documen
 +.TP 8
 +bc *
 +Clear all breakpoints
-diff -purN linux-2.6.27/Documentation/kdb/kdb_bt.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_bt.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_bt.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_bt.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_bt.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,315 @@
 +.TH BT 1 "July 20, 2007"
 +.SH NAME
@@ -5200,9 +5200,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_bt.man linux-2.6.27.19-5.1/Documen
 +0xf65a3e10 0xc016c8b0 do_mount+0x5df (0xf68e9000, 0xf65d6000, 0xf6818000, 0xc0ed0000, 0xf7257000)
 +0xf65a3f90 0xc016c996 sys_mount+0x6f (0x8069b50, 0x8069b60, 0x8069b70, 0xc0ed0000, 0x8069ba0)
 +0xf65a3fb4 0xc0102646 sysenter_past_esp+0x5f (invalid, invalid, invalid, 0x73, 0x246, 0xbfe52f50)
-diff -purN linux-2.6.27/Documentation/kdb/kdb_env.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_env.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_env.man  2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_env.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_env.man    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,46 @@
 +.TH ENV 1 "24 September 2000"
 +.SH NAME
@@ -5250,9 +5250,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_env.man linux-2.6.27.19-5.1/Docume
 +set IDCOUNT=100
 +Set the number of lines to display for the \fBid\fP command
 +to the value \fI100\fP.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ll.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ll.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ll.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ll.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ll.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,134 @@
 +.TH LL 1 "19 April 1999"
 +.SH NAME
@@ -5388,9 +5388,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_ll.man linux-2.6.27.19-5.1/Documen
 +page_prot = 0x25   avl_height = 2244    vm_offset = 0x0
 +flags:  READ WRITE EXEC MAYREAD MAYWRITE MAYEXEC GROWSDOWN
 +kdb>
-diff -purN linux-2.6.27/Documentation/kdb/kdb_md.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_md.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_md.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_md.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_md.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,136 @@
 +.TH MD 1 "August 4, 2004"
 +.SH NAME
@@ -5528,9 +5528,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_md.man linux-2.6.27.19-5.1/Documen
 +md chrdev_table 15
 +Display 15 lines (at 16 bytes per line) starting at address
 +represented by the symbol \fIchrdev_table\fP.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ps.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ps.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ps.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ps.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ps.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,96 @@
 +.TH PS 1 "September 14, 2004"
 +.SH NAME
@@ -5628,9 +5628,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_ps.man linux-2.6.27.19-5.1/Documen
 +displays all tasks.
 +This is easier than remembering DRSTCZEUIM.
 +
-diff -purN linux-2.6.27/Documentation/kdb/kdb_rd.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_rd.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_rd.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_rd.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_rd.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,170 @@
 +.TH RD 1 "September 20, 2005"
 +.SH NAME
@@ -5802,9 +5802,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_rd.man linux-2.6.27.19-5.1/Documen
 +.TP 8
 +rm %CP15CRn7CRm5Op6 0
 +Same with above.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_sr.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_sr.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_sr.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_sr.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_sr.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,68 @@
 +.TH SR 1 "7 October 2002"
 +.SH NAME
@@ -5874,9 +5874,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_sr.man linux-2.6.27.19-5.1/Documen
 +If the sysrq handler or any of the sysrq functions have to wait for a
 +lock then they will never return and kdb will appear to hang.
 +Invoking sysrq code from kdb is inherently unsafe.
-diff -purN linux-2.6.27/Documentation/kdb/kdb_ss.man linux-2.6.27.19-5.1/Documentation/kdb/kdb_ss.man
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/kdb_ss.man   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/kdb_ss.man
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/kdb_ss.man     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,109 @@
 +.TH SS 1 "17 January 2002"
 +.SH NAME
@@ -5987,9 +5987,9 @@ diff -purN linux-2.6.27/Documentation/kdb/kdb_ss.man linux-2.6.27.19-5.1/Documen
 +sys_read+0x6:   pushl  %edi
 +[0]kdb>
 +
-diff -purN linux-2.6.27/Documentation/kdb/slides linux-2.6.27.19-5.1/Documentation/kdb/slides
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kdb/slides       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/kdb/slides
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kdb/slides Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,1382 @@
 +#! /opt/cpg/bin/do-mgp
 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -7373,10 +7373,10 @@ diff -purN linux-2.6.27/Documentation/kdb/slides linux-2.6.27.19-5.1/Documentati
 +                                            [Uptodate Req Mapped]
 +DIRTY  page_struct   index  cnt  flags
 +LOCKED page_struct   index  cnt  flags
-diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/Documentation/kernel-parameters.txt
---- linux-2.6.27/Documentation/kernel-parameters.txt   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kernel-parameters.txt    2009-03-25 16:11:44.000000000 +0000
-@@ -179,6 +179,9 @@ and is between 256 and 4096 characters. 
+diff -r 9608d5473017 Documentation/kernel-parameters.txt
+--- a/Documentation/kernel-parameters.txt      Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/kernel-parameters.txt      Wed May 06 16:55:56 2009 +0100
+@@ -179,6 +179,9 @@
  
        acpi_no_auto_ssdt       [HW,ACPI] Disable automatic loading of SSDT
  
@@ -7386,10 +7386,11 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        acpi_os_name=   [HW,ACPI] Tell ACPI BIOS the name of the OS
                        Format: To spoof as Windows 98: ="Microsoft Windows"
  
-@@ -197,6 +200,19 @@ and is between 256 and 4096 characters. 
+@@ -196,6 +199,19 @@
+                       Use timer override. For some broken Nvidia NF5 boards
                        that require a timer override, but don't have
                        HPET
++
 +      acpi_backlight= [HW,ACPI]
 +                      acpi_backlight=vendor
 +                      acpi_backlight=video
@@ -7402,23 +7403,22 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
 +                      acpi_display_output=vendor
 +                      acpi_display_output=video
 +                      See above.
-+
        acpi.debug_layer=       [HW,ACPI]
                        Format: <int>
-                       Each bit of the <int> indicates an ACPI debug layer,
-@@ -237,6 +253,11 @@ and is between 256 and 4096 characters. 
+@@ -236,6 +252,11 @@
+                       Override the pmtimer bug detection: force the kernel
                        to assume that this machine's pmtimer latches its value
                        and always returns good values.
++
 +      acpi_root_table= [X86,ACPI]
 +                      { rsdt }
 +                      rsdt: Take RSDT address for fetching
 +                      ACPI tables (instead of XSDT)
-+
        agp=            [AGP]
                        { off | try_unsupported }
-                       off: disable AGP support
-@@ -283,7 +304,7 @@ and is between 256 and 4096 characters. 
+@@ -283,7 +304,7 @@
                        Possible values are:
                        isolate - enable device isolation (each device, as far
                                  as possible, will get its own protection
@@ -7427,7 +7427,7 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        amd_iommu_size= [HW,X86-64]
                        Define the size of the aperture for the AMD IOMMU
                        driver. Possible values are:
-@@ -402,8 +423,11 @@ and is between 256 and 4096 characters. 
+@@ -402,8 +423,11 @@
                        See Documentation/s390/CommonIO for details.
  
        cgroup_disable= [KNL] Disable a particular controller
@@ -7439,16 +7439,16 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
  
        checkreqprot    [SELINUX] Set initial checkreqprot flag value.
                        Format: { "0" | "1" }
-@@ -475,6 +499,8 @@ and is between 256 and 4096 characters. 
+@@ -474,6 +498,8 @@
+                       disable: disable HPET and use PIT instead
                        force: allow force enabled of undocumented chips (ICH4,
                        VIA, nVidia)
-+      hpet64          [X86-64,HPET] enable 64-bit mode of the HPET timer (bnc#456700)
 +
++      hpet64          [X86-64,HPET] enable 64-bit mode of the HPET timer (bnc#456700)
        com20020=       [HW,NET] ARCnet - COM20020 chipset
                        Format:
-                       <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
-@@ -659,11 +685,12 @@ and is between 256 and 4096 characters. 
+@@ -659,11 +685,12 @@
        earlyprintk=    [X86-32,X86-64,SH,BLACKFIN]
                        earlyprintk=vga
                        earlyprintk=serial[,ttySn[,baudrate]]
@@ -7462,19 +7462,19 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
  
                        Currently only ttyS0 and ttyS1 are supported.
  
-@@ -675,6 +702,11 @@ and is between 256 and 4096 characters. 
+@@ -674,6 +701,11 @@
+                       console.
  
        eata=           [HW,SCSI]
++
 +      ec_intr=        [HW,ACPI] ACPI Embedded Controller interrupt mode
 +                      Format: <int>
 +                      0: polling mode
 +                      non-0: interrupt mode (default)
-+
        edd=            [EDD]
                        Format: {"off" | "on" | "skip[mbr]"}
-@@ -1393,6 +1425,15 @@ and is between 256 and 4096 characters. 
+@@ -1393,6 +1425,15 @@
                        instruction doesn't work correctly and not to
                        use it.
  
@@ -7490,20 +7490,20 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        nohalt          [IA-64] Tells the kernel not to use the power saving
                        function PAL_HALT_LIGHT when idle. This increases
                        power-consumption. On the positive side, it reduces
-@@ -1425,6 +1466,12 @@ and is between 256 and 4096 characters. 
+@@ -1424,6 +1465,12 @@
+       nolapic         [X86-32,APIC] Do not enable or use the local APIC.
  
        nolapic_timer   [X86-32,APIC] Do not use the local APIC timer.
++
 +      nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
 +
 +      x2apic_phys     [X86-64,APIC] Use x2apic physical mode instead of
 +                      default x2apic cluster mode on platforms
 +                      supporting x2apic.
-+
        noltlbs         [PPC] Do not use large page/tlb entries for kernel
                        lowmem mapping on PPC40x.
-@@ -1566,6 +1613,17 @@ and is between 256 and 4096 characters. 
+@@ -1566,6 +1613,17 @@
                nomsi           [MSI] If the PCI_MSI kernel config parameter is
                                enabled, this kernel boot option can be used to
                                disable the use of MSI interrupts system-wide.
@@ -7521,7 +7521,7 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
                biosirq         [X86-32] Use PCI BIOS calls to get the interrupt
                                routing table. These calls are known to be buggy
                                on several machines and they hang the machine
-@@ -1643,6 +1701,9 @@ and is between 256 and 4096 characters. 
+@@ -1643,6 +1701,9 @@
                        Format: { 0 | 1 }
                        See arch/parisc/kernel/pdc_chassis.c
  
@@ -7531,19 +7531,19 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        pf.             [PARIDE]
                        See Documentation/paride.txt.
  
-@@ -1680,6 +1741,11 @@ and is between 256 and 4096 characters. 
+@@ -1679,6 +1740,11 @@
+                       [ISAPNP] Exclude memory regions for the
                        autoconfiguration.
                        Ranges are in pairs (memory base and size).
++
 +      dynamic_printk
 +                      Enables pr_debug()/dev_dbg() calls if
 +                      CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. These can also
 +                      be switched on/off via <debugfs>/dynamic_printk/modules
-+
        print-fatal-signals=
                        [KNL] debug: print fatal signals
-                       print-fatal-signals=1: print segfault info to
-@@ -2113,6 +2179,12 @@ and is between 256 and 4096 characters. 
+@@ -2113,6 +2179,12 @@
                        pernode     one pool for each NUMA node (equivalent
                                    to global on non-NUMA machines)
  
@@ -7556,7 +7556,7 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        swiotlb=        [IA-64] Number of I/O TLB slabs
  
        switches=       [HW,M68k]
-@@ -2168,12 +2240,27 @@ and is between 256 and 4096 characters. 
+@@ -2168,11 +2240,26 @@
                        See comment before function dc390_setup() in
                        drivers/scsi/tmscsim.c.
  
@@ -7573,20 +7573,19 @@ diff -purN linux-2.6.27/Documentation/kernel-parameters.txt linux-2.6.27.19-5.1/
        trix=           [HW,OSS] MediaTrix AudioTrix Pro
                        Format:
                        <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
++
 +      tsc=            Disable clocksource-must-verify flag for TSC.
 +                      Format: <string>
 +                      [x86] reliable: mark tsc clocksource as reliable, this
 +                      disables clocksource verification at runtime.
 +                      Used to enable high-resolution timer mode on older
 +                      hardware, and in virtualized environment.
-+
        turbografx.map[2|3]=    [HW,JOY]
                        TurboGraFX parallel port interface
-                       Format:
-diff -purN linux-2.6.27/Documentation/kmsg/s390/aes_s390 linux-2.6.27.19-5.1/Documentation/kmsg/s390/aes_s390
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/aes_s390       2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/aes_s390
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/aes_s390 Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,30 @@
 +/*?
 + * Text: "Allocating AES fallback algorithm %s failed\n"
@@ -7618,9 +7617,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/aes_s390 linux-2.6.27.19-5.1/Doc
 + * None.
 + */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/af_iucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/af_iucv
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/af_iucv        2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/af_iucv
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/af_iucv  Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,33 @@
 +/*?
 + * Text: "Application %s on z/VM guest %s exceeds message limit\n"
@@ -7655,9 +7654,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/af_iucv linux-2.6.27.19-5.1/Docu
 + * operating systems of the z/VM hypervisor. If the module has been
 + * compiled into the kernel, ignore this message.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/ap linux-2.6.27.19-5.1/Documentation/kmsg/s390/ap
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/ap     2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/ap
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/ap       Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,47 @@
 +/*?
 + * Text: "%d is not a valid cryptographic domain\n"
@@ -7706,9 +7705,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/ap linux-2.6.27.19-5.1/Documenta
 + * updates become active, then reload the ap module. If the ap module has been
 + * compiled into the kernel, reboot Linux.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/appldata linux-2.6.27.19-5.1/Documentation/kmsg/s390/appldata
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/appldata       2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/appldata
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/appldata Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,88 @@
 +/*?
 + * Text: "Starting the data collection for %s failed with rc=%d\n"
@@ -7798,9 +7797,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/appldata linux-2.6.27.19-5.1/Doc
 + * Linux instance to support less than 110 CPUs.
 + */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cio linux-2.6.27.19-5.1/Documentation/kmsg/s390/cio
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cio    2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cio
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cio      Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,92 @@
 +/*?
 + * Text: "%s is not a valid device for the cio_ignore kernel parameter\n"
@@ -7894,9 +7893,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/cio linux-2.6.27.19-5.1/Document
 + * See the errno man page to find out what caused the problem.
 + */
 + /*? Text: "%s: Got subchannel machine check but no sch_event handler provided.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/claw linux-2.6.27.19-5.1/Documentation/kmsg/s390/claw
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/claw   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/claw
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/claw     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,666 @@
 +/*?
 + * Text: "%s: add_files failed\n"
@@ -8564,9 +8563,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/claw linux-2.6.27.19-5.1/Documen
 +/*? Text: "%s: CLAW device %.8s: System validate completed.\n" */
 +/*? Text: "%s: %s: Disconnect: Vers=%d,link_id=%d,Corr=%d\n" */
 +/*? Text: "%s: %s: Revc Conn Resp: Vers=%d,link_id=%d,Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cpcmd linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpcmd
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpcmd  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cpcmd
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cpcmd    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,17 @@
 +/*?
 + * Text: "The cpcmd kernel function failed to allocate a response buffer\n"
@@ -8585,9 +8584,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/cpcmd linux-2.6.27.19-5.1/Docume
 + * machine.
 + */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/cpu linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpu
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/cpu    2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/cpu
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/cpu      Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,69 @@
 +/*?
 + * Text: "Processor %d started, address %d, identification %06X\n"
@@ -8658,9 +8657,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/cpu linux-2.6.27.19-5.1/Document
 + * message to a support organization, be sure to communicate that the dump
 + * does not include all CPU information.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/ctcm linux-2.6.27.19-5.1/Documentation/kmsg/s390/ctcm
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/ctcm   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/ctcm
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/ctcm     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,199 @@
 +/*?
 + * Text: "%s: An I/O-error occurred on the CTCM device\n"
@@ -8861,9 +8860,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/ctcm linux-2.6.27.19-5.1/Documen
 +/*? Text: "%s: Connected with remote side\n" */
 +/*? Text: "%s: Restarting device\n" */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/dcssblk linux-2.6.27.19-5.1/Documentation/kmsg/s390/dcssblk
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/dcssblk        2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/dcssblk
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/dcssblk  Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,162 @@
 +/*?
 + * Text: "Adjacent DCSSs %s and %s are not contiguous\n"
@@ -9027,9 +9026,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/dcssblk linux-2.6.27.19-5.1/Docu
 + * device. If the DCSSs of the device are of type ER or SR, change the access
 + * mode to exclusive-writable before writing to the device.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/extmem linux-2.6.27.19-5.1/Documentation/kmsg/s390/extmem
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/extmem 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/extmem
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/extmem   Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,290 @@
 +/*?
 + * Text: "Querying a DCSS type failed with rc=%ld\n"
@@ -9321,9 +9320,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/extmem linux-2.6.27.19-5.1/Docum
 + * Ensure that the DCSS range is defined below the kernel mapping range.
 + */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/hypfs linux-2.6.27.19-5.1/Documentation/kmsg/s390/hypfs
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/hypfs  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/hypfs
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/hypfs    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,56 @@
 +/*?
 + * Text: "The hardware system does not support hypfs\n"
@@ -9381,9 +9380,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/hypfs linux-2.6.27.19-5.1/Docume
 + */
 +
 +/*? Text: "Hypervisor filesystem mounted\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/iucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/iucv
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/iucv   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/iucv
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/iucv     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,20 @@
 +/*?
 + * Text: "Defining an interrupt buffer on CPU %i failed with 0x%02x (%s)\n"
@@ -9405,9 +9404,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/iucv linux-2.6.27.19-5.1/Documen
 +
 +/*? Text: "iucv_external_interrupt: out of memory\n" */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/lcs linux-2.6.27.19-5.1/Documentation/kmsg/s390/lcs
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/lcs    2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/lcs
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/lcs      Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,160 @@
 +/*?
 + * Text: "%s:  Allocating a socket buffer to interface %s failed\n"
@@ -9569,9 +9568,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/lcs linux-2.6.27.19-5.1/Document
 +/*? Text: "Initialization failed\n" */
 +/*? Text: "Terminating lcs module.\n" */
 +/*? Text: "Device %s could not be recovered!\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/monreader linux-2.6.27.19-5.1/Documentation/kmsg/s390/monreader
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/monreader      2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/monreader
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/monreader        Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,127 @@
 +/*?
 + * Text: "Reading monitor data failed with rc=%i\n"
@@ -9700,9 +9699,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/monreader linux-2.6.27.19-5.1/Do
 + * the *MONITOR DCSS on the z/VM hypervisor. If the default name, MONDCSS, is
 + * used, omit the monreader.mondcss or mondcss parameter.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/monwriter linux-2.6.27.19-5.1/Documentation/kmsg/s390/monwriter
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/monwriter      2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/monwriter
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/monwriter        Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,16 @@
 +/*?
 + * Text: "Writing monitor data failed with rc=%i\n"
@@ -9720,9 +9719,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/monwriter linux-2.6.27.19-5.1/Do
 + * For other return codes see the section about DIAGNOSE Code X'DC'
 + * in "z/VM CP Programming Services".
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/netiucv linux-2.6.27.19-5.1/Documentation/kmsg/s390/netiucv
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/netiucv        2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/netiucv
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/netiucv  Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,139 @@
 +/*?
 + * Text: "%s: The peer interface of the IUCV device has closed the connection\n"
@@ -9863,9 +9862,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/netiucv linux-2.6.27.19-5.1/Docu
 +
 +/*? Text: "driver unloaded\n" */
 +/*? Text: "driver initialized\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/qeth linux-2.6.27.19-5.1/Documentation/kmsg/s390/qeth
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/qeth   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/qeth
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/qeth     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,501 @@
 +/*?
 + * Text: "%s: The LAN is offline\n"
@@ -10368,9 +10367,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/qeth linux-2.6.27.19-5.1/Documen
 +/*? Text: "%s: HW Checksumming (inbound) enabled\n" */
 +/*? Text: "unregister layer 3 discipline\n" */
 +/*? Text: "%s: Multicast enabled\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/s390dbf linux-2.6.27.19-5.1/Documentation/kmsg/s390/s390dbf
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/s390dbf        2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/s390dbf
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/s390dbf  Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,83 @@
 +/*?
 + * Text: "Root becomes the owner of all s390dbf files in sysfs\n"
@@ -10455,9 +10454,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/s390dbf linux-2.6.27.19-5.1/Docu
 +/*? Text: "%s: switched off\n" */
 +/*? Text: "%s: level %i is out of range (%i - %i)\n" */
 +/*? Text: "Registering view %s/%s failed due to out of memory\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_cmd linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cmd
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cmd       2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_cmd
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_cmd Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,6 @@
 +/*? Text: "sync request failed (cmd=0x%08x, status=0x%02x)\n" */
 +/*? Text: "readcpuinfo failed (response=0x%04x)\n" */
@@ -10465,30 +10464,30 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_cmd linux-2.6.27.19-5.1/Doc
 +/*? Text: "configure channel-path failed (cmd=0x%08x, response=0x%04x)\n" */
 +/*? Text: "read channel-path info failed (response=0x%04x)\n" */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_config linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_config
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_config    2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_config
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_config      Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,3 @@
 +/*? Text: "cpu capability changed.\n" */
 +/*? Text: "no configuration management.\n" */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_cpi linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cpi
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_cpi       2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_cpi
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_cpi Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,2 @@
 +/*? Text: "request failed (status=0x%02x)\n" */
 +/*? Text: "request failed with response code 0x%x\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/sclp_sdias linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_sdias
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/sclp_sdias     2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/sclp_sdias
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/sclp_sdias       Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,4 @@
 +/*? Text: "sclp_send failed for get_nr_blocks\n" */
 +/*? Text: "SCLP error: %x\n" */
 +/*? Text: "sclp_send failed: %x\n" */
 +/*? Text: "Error from SCLP while copying hsa. Event status = %x\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/setup linux-2.6.27.19-5.1/Documentation/kmsg/s390/setup
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/setup  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/setup
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/setup    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,151 @@
 +/*?
 + * Text: "Execute protection active, mvcos available\n"
@@ -10641,9 +10640,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/setup linux-2.6.27.19-5.1/Docume
 + * User action:
 + * None.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/time linux-2.6.27.19-5.1/Documentation/kmsg/s390/time
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/time   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/time
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/time     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,36 @@
 +/*?
 + * Text: "The ETR interface has adjusted the clock by %li microseconds\n"
@@ -10681,9 +10680,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/time linux-2.6.27.19-5.1/Documen
 + * To avoid this warning remove the 'stp=' kernel parameter.
 + */
 +
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmcp linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmcp
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmcp   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmcp
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmcp     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,13 @@
 +/*?
 + * Text: "The z/VM CP interface device driver cannot be loaded without z/VM\n"
@@ -10698,18 +10697,18 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/vmcp linux-2.6.27.19-5.1/Documen
 + * operating systems of the z/VM hypervisor. If the device driver has been
 + * compiled into the kernel, ignore this message.
 + */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmlogrdr linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmlogrdr
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmlogrdr       2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmlogrdr
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmlogrdr Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,5 @@
 +/*? Text: "vmlogrdr: failed to start recording automatically\n" */
 +/*? Text: "vmlogrdr: connection severed with reason %i\n" */
 +/*? Text: "vmlogrdr: iucv connection to %s failed with rc %i \n" */
 +/*? Text: "vmlogrdr: failed to stop recording automatically\n" */
 +/*? Text: "not running under VM, driver not loaded.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/vmur linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmur
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/vmur   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/vmur
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/vmur     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,34 @@
 +/*?
 + * Text: "The %s cannot be loaded without z/VM\n"
@@ -10745,9 +10744,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/vmur linux-2.6.27.19-5.1/Documen
 +
 +/*? Text: "%s loaded.\n" */
 +/*? Text: "%s unloaded.\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/xpram linux-2.6.27.19-5.1/Documentation/kmsg/s390/xpram
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/xpram  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/xpram
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/xpram    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,58 @@
 +/*?
 + * Text: "%d is not a valid number of XPRAM devices\n"
@@ -10807,9 +10806,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/xpram linux-2.6.27.19-5.1/Docume
 +/*? Text: "  partitions to be sized automatically: %d\n" */
 +/*? Text: "  automatically determined partition size: %lu kB\n" */
 +/*? Text: "  %u pages expanded memory found (%lu KB).\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/zdump linux-2.6.27.19-5.1/Documentation/kmsg/s390/zdump
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/zdump  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/zdump
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/zdump    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,12 @@
 +/*?
 + * Text: "The 32-bit dump tool cannot be used for a 64-bit system\n"
@@ -10823,9 +10822,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/zdump linux-2.6.27.19-5.1/Docume
 +/*? Text: "DETECTED 'S390 (32 bit) OS'\n" */
 +/*? Text: "0x%x is an unknown architecture.\n" */
 +/*? Text: "DETECTED 'S390X (64 bit) OS'\n" */
-diff -purN linux-2.6.27/Documentation/kmsg/s390/zfcp linux-2.6.27.19-5.1/Documentation/kmsg/s390/zfcp
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/kmsg/s390/zfcp   2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/kmsg/s390/zfcp
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/kmsg/s390/zfcp     Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,831 @@
 +/*?
 + * Text: "%s is not a valid SCSI device\n"
@@ -11658,9 +11657,9 @@ diff -purN linux-2.6.27/Documentation/kmsg/s390/zfcp linux-2.6.27.19-5.1/Documen
 + * adapter. Check your SAN setup and consider reducing the number of ports
 + * visible to the FCP adapter by using more restrictive zoning in the SAN.
 + */
-diff -purN linux-2.6.27/Documentation/network-swap.txt linux-2.6.27.19-5.1/Documentation/network-swap.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/network-swap.txt 2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/network-swap.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/network-swap.txt   Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,270 @@
 +
 +Problem:
@@ -11932,10 +11931,10 @@ diff -purN linux-2.6.27/Documentation/network-swap.txt linux-2.6.27.19-5.1/Docum
 +Neil Brown (with updates from Peter Zijlstra)
 +
 +
-diff -purN linux-2.6.27/Documentation/networking/multiqueue.txt linux-2.6.27.19-5.1/Documentation/networking/multiqueue.txt
---- linux-2.6.27/Documentation/networking/multiqueue.txt       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/networking/multiqueue.txt        2009-03-25 16:11:43.000000000 +0000
-@@ -24,4 +24,56 @@ netif_{start|stop|wake}_subqueue() funct
+diff -r 9608d5473017 Documentation/networking/multiqueue.txt
+--- a/Documentation/networking/multiqueue.txt  Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/networking/multiqueue.txt  Wed May 06 16:55:56 2009 +0100
+@@ -24,4 +24,56 @@
  device is still operational.  netdev->queue_lock is still used when the device
  comes online or when it's completely shut down (unregister_netdev(), etc.).
  
@@ -11993,9 +11992,9 @@ diff -purN linux-2.6.27/Documentation/networking/multiqueue.txt linux-2.6.27.19-
 +
 +Author: Alexander Duyck <alexander.h.duyck@intel.com>
 +Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com>
-diff -purN linux-2.6.27/Documentation/perfmon2-debugfs.txt linux-2.6.27.19-5.1/Documentation/perfmon2-debugfs.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/perfmon2-debugfs.txt     2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 Documentation/perfmon2-debugfs.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/perfmon2-debugfs.txt       Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,126 @@
 +              The perfmon2 debug and statistics interface
 +                ------------------------------------------
@@ -12123,9 +12122,9 @@ diff -purN linux-2.6.27/Documentation/perfmon2-debugfs.txt linux-2.6.27.19-5.1/D
 +              handles asynchronous perfmon2 work for per-thread contexts
 +              (sessions).
 +
-diff -purN linux-2.6.27/Documentation/perfmon2.txt linux-2.6.27.19-5.1/Documentation/perfmon2.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/perfmon2.txt     2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 Documentation/perfmon2.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/perfmon2.txt       Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,213 @@
 +              The perfmon2 hardware monitoring interface
 +              ------------------------------------------
@@ -12340,9 +12339,9 @@ diff -purN linux-2.6.27/Documentation/perfmon2.txt linux-2.6.27.19-5.1/Documenta
 +IX/ Documentation
 +
 +   Visit http://perfmon2.sf.net
-diff -purN linux-2.6.27/Documentation/scsi/cxgb3i.txt linux-2.6.27.19-5.1/Documentation/scsi/cxgb3i.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/scsi/cxgb3i.txt  2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/scsi/cxgb3i.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/scsi/cxgb3i.txt    Wed May 06 16:55:56 2009 +0100
 @@ -0,0 +1,51 @@
 +Chelsio S3 iSCSI Driver for Linux
 +
@@ -12395,10 +12394,10 @@ diff -purN linux-2.6.27/Documentation/scsi/cxgb3i.txt linux-2.6.27.19-5.1/Docume
 +   "-I <iface file name>" option needs to be specified with most of the
 +   iscsiadm command. <iface file name> is the transport interface file created
 +   in step 1.
-diff -purN linux-2.6.27/Documentation/scsi/scsi_fc_transport.txt linux-2.6.27.19-5.1/Documentation/scsi/scsi_fc_transport.txt
---- linux-2.6.27/Documentation/scsi/scsi_fc_transport.txt      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/scsi/scsi_fc_transport.txt       2009-03-25 16:11:44.000000000 +0000
-@@ -436,6 +436,42 @@ Other:
+diff -r 9608d5473017 Documentation/scsi/scsi_fc_transport.txt
+--- a/Documentation/scsi/scsi_fc_transport.txt Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/scsi/scsi_fc_transport.txt Wed May 06 16:55:56 2009 +0100
+@@ -436,6 +436,42 @@
      was updated to remove all vports for the fc_host as well.
  
  
@@ -12441,10 +12440,10 @@ diff -purN linux-2.6.27/Documentation/scsi/scsi_fc_transport.txt linux-2.6.27.19
  Credits
  =======
  The following people have contributed to this document:
-diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.6.27.19-5.1/Documentation/sound/alsa/ALSA-Configuration.txt
---- linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sound/alsa/ALSA-Configuration.txt        2009-03-25 16:11:43.000000000 +0000
-@@ -746,8 +746,10 @@ Prior to version 0.9.0rc4 options had a 
+diff -r 9608d5473017 Documentation/sound/alsa/ALSA-Configuration.txt
+--- a/Documentation/sound/alsa/ALSA-Configuration.txt  Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sound/alsa/ALSA-Configuration.txt  Wed May 06 16:55:56 2009 +0100
+@@ -746,8 +746,10 @@
    Module snd-hda-intel
    --------------------
  
@@ -12457,7 +12456,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
                VIA VT8251/VT8237A,
                SIS966, ULI M5461
  
-@@ -807,6 +809,7 @@ Prior to version 0.9.0rc4 options had a 
+@@ -807,6 +809,7 @@
        ALC260
          hp            HP machines
          hp-3013       HP machines (3013-variant)
@@ -12465,7 +12464,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          fujitsu       Fujitsu S7020
          acer          Acer TravelMate
          will          Will laptops (PB V7900)
-@@ -828,8 +831,11 @@ Prior to version 0.9.0rc4 options had a 
+@@ -828,8 +831,11 @@
          hippo         Hippo (ATI) with jack detection, Sony UX-90s
          hippo_1       Hippo (Benq) with jack detection
          sony-assamd   Sony ASSAMD
@@ -12477,7 +12476,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          basic         fixed pin assignment w/o SPDIF
          auto          auto-config reading BIOS (default)
  
-@@ -838,6 +844,8 @@ Prior to version 0.9.0rc4 options had a 
+@@ -838,6 +844,8 @@
          3stack        3-stack model
          toshiba       Toshiba A205
          acer          Acer laptops
@@ -12486,7 +12485,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          dell          Dell OEM laptops (Vostro 1200)
          zepto         Zepto laptops
          test          for testing/debugging purpose, almost all controls can
-@@ -847,6 +855,11 @@ Prior to version 0.9.0rc4 options had a 
+@@ -847,6 +855,11 @@
  
        ALC269
          basic         Basic preset
@@ -12498,7 +12497,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
  
        ALC662/663
          3stack-dig    3-stack (2-channel) with SPDIF
-@@ -856,10 +869,17 @@ Prior to version 0.9.0rc4 options had a 
+@@ -856,10 +869,17 @@
          lenovo-101e    Lenovo laptop
          eeepc-p701    ASUS Eeepc P701
          eeepc-ep20    ASUS Eeepc EP20
@@ -12516,7 +12515,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          auto          auto-config reading BIOS (default)
  
        ALC882/885
-@@ -891,12 +911,14 @@ Prior to version 0.9.0rc4 options had a 
+@@ -891,12 +911,14 @@
          lenovo-101e   Lenovo 101E
          lenovo-nb0763 Lenovo NB0763
          lenovo-ms7195-dig Lenovo MS7195
@@ -12531,7 +12530,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          auto          auto-config reading BIOS (default)
  
        ALC861/660
-@@ -929,7 +951,7 @@ Prior to version 0.9.0rc4 options had a 
+@@ -929,7 +951,7 @@
          allout        5-jack in back, 2-jack in front, SPDIF out
          auto          auto-config reading BIOS (default)
  
@@ -12540,7 +12539,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          3stack        3-stack mode (default)
          6stack        6-stack mode
  
-@@ -960,9 +982,10 @@ Prior to version 0.9.0rc4 options had a 
+@@ -960,9 +982,10 @@
          6stack        6-jack, separate surrounds (default)
          3stack        3-stack, shared surrounds
          laptop        2-channel only (FSC V2060, Samsung M50)
@@ -12552,7 +12551,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
  
        AD1988/AD1988B/AD1989A/AD1989B
          6stack        6-jack
-@@ -1014,6 +1037,7 @@ Prior to version 0.9.0rc4 options had a 
+@@ -1014,6 +1037,7 @@
          dell-m42      Dell (unknown)
          dell-m43      Dell Precision
          dell-m44      Dell Inspiron
@@ -12560,7 +12559,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
  
        STAC9220/9221
          ref           Reference board
-@@ -1044,6 +1068,7 @@ Prior to version 0.9.0rc4 options had a 
+@@ -1044,6 +1068,7 @@
  
        STAC9227/9228/9229/927x
          ref           Reference board
@@ -12568,7 +12567,7 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
          3stack        D965 3stack
          5stack        D965 5stack + SPDIF
          dell-3stack   Dell Dimension E520
-@@ -1053,10 +1078,14 @@ Prior to version 0.9.0rc4 options had a 
+@@ -1053,10 +1078,14 @@
          ref           Reference board
          dell-m4-1     Dell desktops
          dell-m4-2     Dell desktops
@@ -12584,10 +12583,10 @@ diff -purN linux-2.6.27/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.
  
        STAC9872
          vaio          Setup for VAIO FE550G/SZ110
-diff -purN linux-2.6.27/Documentation/sparc/sbus_drivers.txt linux-2.6.27.19-5.1/Documentation/sparc/sbus_drivers.txt
---- linux-2.6.27/Documentation/sparc/sbus_drivers.txt  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sparc/sbus_drivers.txt   2009-03-25 16:11:44.000000000 +0000
-@@ -68,6 +68,7 @@ probe in an SBUS driver under Linux:
+diff -r 9608d5473017 Documentation/sparc/sbus_drivers.txt
+--- a/Documentation/sparc/sbus_drivers.txt     Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sparc/sbus_drivers.txt     Wed May 06 16:55:56 2009 +0100
+@@ -68,6 +68,7 @@
  
        static struct of_platform_driver mydevice_driver = {
                .match_table    = mydevice_match,
@@ -12595,17 +12594,17 @@ diff -purN linux-2.6.27/Documentation/sparc/sbus_drivers.txt linux-2.6.27.19-5.1
                .probe          = mydevice_probe,
                .remove         = __devexit_p(mydevice_remove),
                .driver         = {
-diff -purN linux-2.6.27/Documentation/sysctl/kernel.txt linux-2.6.27.19-5.1/Documentation/sysctl/kernel.txt
---- linux-2.6.27/Documentation/sysctl/kernel.txt       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/sysctl/kernel.txt        2009-03-25 16:11:45.000000000 +0000
-@@ -369,4 +369,17 @@ can be ORed together:
+diff -r 9608d5473017 Documentation/sysctl/kernel.txt
+--- a/Documentation/sysctl/kernel.txt  Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/sysctl/kernel.txt  Wed May 06 16:55:57 2009 +0100
+@@ -369,4 +369,17 @@
    2 - A module was force loaded by insmod -f.
        Set by modutils >= 2.4.9 and module-init-tools.
    4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
 + 64 - A module from drivers/staging was loaded.
 + 0x40000000 - An unsupported kernel module was loaded.
 + 0x80000000 - An kernel module with external support was loaded.
-+
 +==============================================================
 +
 +unsupported:
@@ -12615,10 +12614,10 @@ diff -purN linux-2.6.27/Documentation/sysctl/kernel.txt linux-2.6.27.19-5.1/Docu
 +  0 - refuse to load unsupported modules,
 +  1 - warn when loading unsupported modules,
 +  2 - don't warn.
-diff -purN linux-2.6.27/Documentation/tracepoints.txt linux-2.6.27.19-5.1/Documentation/tracepoints.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/tracepoints.txt  2009-03-25 16:11:43.000000000 +0000
++
+diff -r 9608d5473017 Documentation/tracepoints.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Documentation/tracepoints.txt    Wed May 06 16:55:57 2009 +0100
 @@ -0,0 +1,103 @@
 +                   Using the Linux Kernel Tracepoints
 +
@@ -12723,9 +12722,9 @@ diff -purN linux-2.6.27/Documentation/tracepoints.txt linux-2.6.27.19-5.1/Docume
 +cat /proc/tracepoint-example (returns an expected error)
 +rmmod tracepoint-example tracepoint-probe-example
 +dmesg
-diff -purN linux-2.6.27/Documentation/video4linux/CARDLIST.au0828 linux-2.6.27.19-5.1/Documentation/video4linux/CARDLIST.au0828
---- linux-2.6.27/Documentation/video4linux/CARDLIST.au0828     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Documentation/video4linux/CARDLIST.au0828      2009-03-25 16:11:44.000000000 +0000
+diff -r 9608d5473017 Documentation/video4linux/CARDLIST.au0828
+--- a/Documentation/video4linux/CARDLIST.au0828        Wed May 06 15:47:13 2009 +0100
++++ b/Documentation/video4linux/CARDLIST.au0828        Wed May 06 16:55:57 2009 +0100
 @@ -1,5 +1,5 @@
    0 -> Unknown board                            (au0828)
 -  1 -> Hauppauge HVR950Q                        (au0828)        [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008]
@@ -12733,10 +12732,10 @@ diff -purN linux-2.6.27/Documentation/video4linux/CARDLIST.au0828 linux-2.6.27.1
    2 -> Hauppauge HVR850                         (au0828)        [2040:7240]
    3 -> DViCO FusionHDTV USB                     (au0828)        [0fe9:d620]
    4 -> Hauppauge HVR950Q rev xxF8               (au0828)        [2040:7201,2040:7211,2040:7281]
-diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
---- linux-2.6.27/MAINTAINERS   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/MAINTAINERS    2009-03-25 16:11:42.000000000 +0000
-@@ -360,7 +360,7 @@ S: Maintained
+diff -r 9608d5473017 MAINTAINERS
+--- a/MAINTAINERS      Wed May 06 15:47:13 2009 +0100
++++ b/MAINTAINERS      Wed May 06 16:55:57 2009 +0100
+@@ -360,7 +360,7 @@
  ALI1563 I2C DRIVER
  P:    Rudolf Marek
  M:    r.marek@assembler.cz
@@ -12745,7 +12744,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  ALPHA PORT
-@@ -1681,7 +1681,7 @@ FREESCALE I2C CPM DRIVER
+@@ -1681,7 +1681,7 @@
  P:    Jochen Friedrich
  M:    jochen@scram.de
  L:    linuxppc-dev@ozlabs.org
@@ -12754,7 +12753,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  FREESCALE SOC FS_ENET DRIVER
-@@ -1982,7 +1982,7 @@ S:       Maintained
+@@ -1982,7 +1982,7 @@
  I2C/SMBUS STUB DRIVER
  P:    Mark M. Hoffman
  M:    mhoffman@lightlink.com
@@ -12763,7 +12762,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  I2C SUBSYSTEM
-@@ -1990,14 +1990,14 @@ P:     Jean Delvare (PC drivers, core)
+@@ -1990,14 +1990,14 @@
  M:    khali@linux-fr.org
  P:    Ben Dooks (embedded platforms)
  M:    ben-linux@fluff.org
@@ -12780,7 +12779,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  T:    http://www.harbaum.org/till/i2c_tiny_usb
  S:    Maintained
  
-@@ -3070,7 +3070,7 @@ S:       Maintained
+@@ -3070,7 +3070,7 @@
  OPENCORES I2C BUS DRIVER
  P:    Peter Korsgaard
  M:    jacmet@sunsite.dk
@@ -12789,7 +12788,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
-@@ -3144,7 +3144,12 @@ S:      Maintained
+@@ -3144,7 +3144,12 @@
  PA SEMI SMBUS DRIVER
  P:    Olof Johansson
  M:    olof@lixom.net
@@ -12803,7 +12802,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  PARALLEL PORT SUPPORT
-@@ -3239,6 +3244,14 @@ M:      balbir@linux.vnet.ibm.com
+@@ -3239,6 +3244,14 @@
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  
@@ -12818,7 +12817,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  PERSONALITY HANDLING
  P:    Christoph Hellwig
  M:    hch@infradead.org
-@@ -3280,7 +3293,7 @@ S:       Maintained
+@@ -3280,7 +3293,7 @@
  PNXxxxx I2C DRIVER
  P:    Vitaly Wool
  M:    vitalywool@gmail.com
@@ -12827,20 +12826,20 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  PPP PROTOCOL DRIVERS AND COMPRESSORS
-@@ -3353,6 +3366,12 @@ L:      linuxppc-dev@ozlabs.org
+@@ -3352,6 +3365,12 @@
+ L:    linuxppc-dev@ozlabs.org
  L:    cbe-oss-dev@ozlabs.org
  S:    Supported
++
 +PS3VRAM DRIVER
 +P:    Jim Paris
 +M:    jim@jtan.com
 +L:    cbe-oss-dev@ozlabs.org
 +S:    Maintained
-+
  PVRUSB2 VIDEO4LINUX DRIVER
  P:    Mike Isely
- M:    isely@pobox.com
-@@ -3725,7 +3744,7 @@ S:       Maintained
+@@ -3725,7 +3744,7 @@
  SIS 96X I2C/SMBUS DRIVER
  P:    Mark M. Hoffman
  M:    mhoffman@lightlink.com
@@ -12849,21 +12848,21 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  SIS FRAMEBUFFER DRIVER
-@@ -3862,6 +3881,13 @@ M:      chrisw@sous-sol.org
+@@ -3860,6 +3879,13 @@
+ P:    Chris Wright
+ M:    chrisw@sous-sol.org
  L:    stable@kernel.org
- S:    Maintained
++S:    Maintained
++
 +STAGING SUBSYSTEM:
 +P:    Greg Kroah-Hartman
 +M:    gregkh@suse.de
 +L:    linux-kernel@vger.kernel.org
 +T:    quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
-+S:    Maintained
-+
+ S:    Maintained
  SHARP LH SUPPORT (LH7952X & LH7A40X)
- P:    Marc Singer
- M:    elf@buici.com
-@@ -4445,7 +4471,7 @@ S:       Maintained
+@@ -4445,7 +4471,7 @@
  VIAPRO SMBUS DRIVER
  P:    Jean Delvare
  M:    khali@linux-fr.org
@@ -12872,7 +12871,7 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  S:    Maintained
  
  VIA VELOCITY NETWORK DRIVER
-@@ -4578,6 +4604,13 @@ W:      http://oss.sgi.com/projects/xfs
+@@ -4578,6 +4604,13 @@
  T:    git git://oss.sgi.com:8090/xfs/xfs-2.6.git
  S:    Supported
  
@@ -12886,24 +12885,26 @@ diff -purN linux-2.6.27/MAINTAINERS linux-2.6.27.19-5.1/MAINTAINERS
  XILINX SYSTEMACE DRIVER
  P:    Grant Likely
  M:    grant.likely@secretlab.ca
-diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
---- linux-2.6.27/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/Makefile       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 Makefile
+--- a/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/Makefile Wed May 06 16:55:57 2009 +0100
 @@ -1,8 +1,8 @@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 27
 -EXTRAVERSION =
 -NAME = Rotary Wombat
-+EXTRAVERSION = .19
++EXTRAVERSION = .19-5.1
 +NAME = Trembling Tortoise
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
-@@ -63,6 +63,20 @@ ifndef KBUILD_CHECKSRC
-   KBUILD_CHECKSRC = 0
+@@ -61,6 +61,20 @@
  endif
+ ifndef KBUILD_CHECKSRC
+   KBUILD_CHECKSRC = 0
++endif
++
 +# Call message checker as part of the C compilation
 +#
 +# Use 'make D=1' to enable checking
@@ -12916,12 +12917,10 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
 +endif
 +ifndef KBUILD_KMSG_CHECK
 +  KBUILD_KMSG_CHECK = 0
-+endif
-+
+ endif
  # Use make M=dir to specify directory of external module to build
- # Old syntax make ... SUBDIRS=$PWD is still supported
- # Setting the environment variable KBUILD_EXTMOD take precedence
-@@ -321,6 +335,7 @@ PERL               = perl
+@@ -321,6 +335,7 @@
  CHECK         = sparse
  
  CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF)
@@ -12929,7 +12928,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  MODFLAGS      = -DMODULE
  CFLAGS_MODULE   = $(MODFLAGS)
  AFLAGS_MODULE   = $(MODFLAGS)
-@@ -343,6 +358,11 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstric
+@@ -343,6 +358,11 @@
                   -Werror-implicit-function-declaration
  KBUILD_AFLAGS   := -D__ASSEMBLY__
  
@@ -12941,7 +12940,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-@@ -355,6 +375,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODU
+@@ -355,6 +375,7 @@
  export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
  export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
  export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
@@ -12949,7 +12948,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  
  # When compiling out-of-tree modules, put MODVERDIR in the module
  # tree rather than in the kernel tree. The kernel tree might
-@@ -531,6 +552,11 @@ else
+@@ -531,6 +552,11 @@
  KBUILD_CFLAGS += -fomit-frame-pointer
  endif
  
@@ -12961,7 +12960,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  ifdef CONFIG_DEBUG_INFO
  KBUILD_CFLAGS += -g
  KBUILD_AFLAGS += -gdwarf-2
-@@ -620,6 +646,8 @@ export mod_strip_cmd
+@@ -620,6 +646,8 @@
  
  ifeq ($(KBUILD_EXTMOD),)
  core-y                += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -12970,7 +12969,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  
  vmlinux-dirs  := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
                     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -934,7 +962,11 @@ ifneq ($(KBUILD_SRC),)
+@@ -934,7 +962,11 @@
        fi;
        $(Q)if [ ! -d include2 ]; then                                  \
            mkdir -p include2;                                          \
@@ -12983,7 +12982,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
        fi
  endif
  
-@@ -965,8 +997,10 @@ define check-symlink
+@@ -965,8 +997,10 @@
        set -e;                                                            \
        if [ -L include/asm ]; then                                        \
                asmlink=`readlink include/asm | cut -d '-' -f 2`;          \
@@ -12996,7 +12995,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
                        echo "       set ARCH or save .config and run 'make mrproper' to fix it";             \
                        exit 1;                                            \
                fi;                                                        \
-@@ -977,12 +1011,17 @@ endef
+@@ -977,12 +1011,17 @@
  # not exist so the test in chack-symlink works and we have a
  # directory for generated filesas used by some architectures.
  define create-symlink
@@ -13020,7 +13019,7 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
        fi
  endef
  
-@@ -1025,7 +1064,7 @@ depend dep:
+@@ -1025,7 +1064,7 @@
  
  # ---------------------------------------------------------------------------
  # Firmware install
@@ -13029,9 +13028,9 @@ diff -purN linux-2.6.27/Makefile linux-2.6.27.19-5.1/Makefile
  export INSTALL_FW_PATH
  
  PHONY += firmware_install
-diff -purN linux-2.6.27/Module.supported linux-2.6.27.19-5.1/Module.supported
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/Module.supported       2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 Module.supported
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/Module.supported Wed May 06 16:55:57 2009 +0100
 @@ -0,0 +1,1882 @@
 +err_inject
 +bestcomm-ata
@@ -14915,10 +14914,10 @@ diff -purN linux-2.6.27/Module.supported linux-2.6.27.19-5.1/Module.supported
 +sfc_netutil external
 +cifs external
 +jfs external
-diff -purN linux-2.6.27/arch/Kconfig linux-2.6.27.19-5.1/arch/Kconfig
---- linux-2.6.27/arch/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/Kconfig   2009-03-25 16:10:44.000000000 +0000
-@@ -46,6 +46,9 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS
+diff -r 9608d5473017 arch/Kconfig
+--- a/arch/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/Kconfig     Wed May 06 16:55:57 2009 +0100
+@@ -46,6 +46,9 @@
          See Documentation/unaligned-memory-access.txt for more
          information on the topic of unaligned memory accesses.
  
@@ -14928,10 +14927,10 @@ diff -purN linux-2.6.27/arch/Kconfig linux-2.6.27.19-5.1/arch/Kconfig
  config KRETPROBES
        def_bool y
        depends on KPROBES && HAVE_KRETPROBES
-diff -purN linux-2.6.27/arch/alpha/Kconfig linux-2.6.27.19-5.1/arch/alpha/Kconfig
---- linux-2.6.27/arch/alpha/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/Kconfig     2009-03-25 16:10:46.000000000 +0000
-@@ -72,6 +72,7 @@ config ARCH_SUPPORTS_AOUT
+diff -r 9608d5473017 arch/alpha/Kconfig
+--- a/arch/alpha/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/Kconfig       Wed May 06 16:55:57 2009 +0100
+@@ -72,6 +72,7 @@
        def_bool y
  
  source "init/Kconfig"
@@ -14939,9 +14938,9 @@ diff -purN linux-2.6.27/arch/alpha/Kconfig linux-2.6.27.19-5.1/arch/alpha/Kconfi
  
  
  menu "System setup"
-diff -purN linux-2.6.27/arch/alpha/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/alpha/include/asm/ioctls.h
---- linux-2.6.27/arch/alpha/include/asm/ioctls.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/ioctls.h        2009-03-25 16:10:46.000000000 +0000
+diff -r 9608d5473017 arch/alpha/include/asm/ioctls.h
+--- a/arch/alpha/include/asm/ioctls.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/ioctls.h  Wed May 06 16:55:57 2009 +0100
 @@ -91,6 +91,7 @@
  #define TIOCGSID      0x5429  /* Return the session ID of FD */
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -14950,10 +14949,10 @@ diff -purN linux-2.6.27/arch/alpha/include/asm/ioctls.h linux-2.6.27.19-5.1/arch
  
  #define TIOCSERCONFIG 0x5453
  #define TIOCSERGWILD  0x5454
-diff -purN linux-2.6.27/arch/alpha/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/alpha/include/asm/spinlock.h
---- linux-2.6.27/arch/alpha/include/asm/spinlock.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/spinlock.h      2009-03-25 16:10:46.000000000 +0000
-@@ -166,6 +166,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 arch/alpha/include/asm/spinlock.h
+--- a/arch/alpha/include/asm/spinlock.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/spinlock.h        Wed May 06 16:55:57 2009 +0100
+@@ -166,6 +166,9 @@
        lock->lock = 0;
  }
  
@@ -14963,10 +14962,10 @@ diff -purN linux-2.6.27/arch/alpha/include/asm/spinlock.h linux-2.6.27.19-5.1/ar
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/arch/alpha/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/alpha/include/asm/thread_info.h
---- linux-2.6.27/arch/alpha/include/asm/thread_info.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/include/asm/thread_info.h   2009-03-25 16:10:47.000000000 +0000
-@@ -74,12 +74,14 @@ register struct thread_info *__current_t
+diff -r 9608d5473017 arch/alpha/include/asm/thread_info.h
+--- a/arch/alpha/include/asm/thread_info.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/include/asm/thread_info.h     Wed May 06 16:55:57 2009 +0100
+@@ -74,12 +74,14 @@
  #define TIF_UAC_SIGBUS                7
  #define TIF_MEMDIE            8
  #define TIF_RESTORE_SIGMASK   9       /* restore signal mask in do_signal */
@@ -14981,10 +14980,10 @@ diff -purN linux-2.6.27/arch/alpha/include/asm/thread_info.h linux-2.6.27.19-5.1
  
  /* Work to do on interrupt/exception return.  */
  #define _TIF_WORK_MASK                (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
-diff -purN linux-2.6.27/arch/alpha/kernel/entry.S linux-2.6.27.19-5.1/arch/alpha/kernel/entry.S
---- linux-2.6.27/arch/alpha/kernel/entry.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/entry.S      2009-03-25 16:10:46.000000000 +0000
-@@ -894,9 +894,9 @@ sys_getxpid:
+diff -r 9608d5473017 arch/alpha/kernel/entry.S
+--- a/arch/alpha/kernel/entry.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/entry.S        Wed May 06 16:55:57 2009 +0100
+@@ -894,9 +894,9 @@
  .end sys_getxpid
  
        .align  4
@@ -14997,7 +14996,7 @@ diff -purN linux-2.6.27/arch/alpha/kernel/entry.S linux-2.6.27.19-5.1/arch/alpha
        lda     $sp, -16($sp)
        stq     $26, 0($sp)
        .prologue 0
-@@ -914,7 +914,7 @@ sys_pipe:
+@@ -914,7 +914,7 @@
        stq     $1, 80+16($sp)
  1:    lda     $sp, 16($sp)
        ret
@@ -15006,10 +15005,10 @@ diff -purN linux-2.6.27/arch/alpha/kernel/entry.S linux-2.6.27.19-5.1/arch/alpha
  
        .align  4
        .globl  sys_execve
-diff -purN linux-2.6.27/arch/alpha/kernel/irq_srm.c linux-2.6.27.19-5.1/arch/alpha/kernel/irq_srm.c
---- linux-2.6.27/arch/alpha/kernel/irq_srm.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/irq_srm.c    2009-03-25 16:10:46.000000000 +0000
-@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ig
+diff -r 9608d5473017 arch/alpha/kernel/irq_srm.c
+--- a/arch/alpha/kernel/irq_srm.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/irq_srm.c      Wed May 06 16:55:57 2009 +0100
+@@ -63,6 +63,8 @@
  {
        long i;
  
@@ -15018,10 +15017,10 @@ diff -purN linux-2.6.27/arch/alpha/kernel/irq_srm.c linux-2.6.27.19-5.1/arch/alp
        for (i = 16; i < max; ++i) {
                if (i < 64 && ((ignore_mask >> i) & 1))
                        continue;
-diff -purN linux-2.6.27/arch/alpha/kernel/systbls.S linux-2.6.27.19-5.1/arch/alpha/kernel/systbls.S
---- linux-2.6.27/arch/alpha/kernel/systbls.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/alpha/kernel/systbls.S    2009-03-25 16:10:46.000000000 +0000
-@@ -52,7 +52,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/alpha/kernel/systbls.S
+--- a/arch/alpha/kernel/systbls.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/alpha/kernel/systbls.S      Wed May 06 16:55:57 2009 +0100
+@@ -52,7 +52,7 @@
        .quad sys_setpgid
        .quad alpha_ni_syscall                  /* 40 */
        .quad sys_dup
@@ -15030,21 +15029,21 @@ diff -purN linux-2.6.27/arch/alpha/kernel/systbls.S linux-2.6.27.19-5.1/arch/alp
        .quad osf_set_program_attributes
        .quad alpha_ni_syscall
        .quad sys_open                          /* 45 */
-diff -purN linux-2.6.27/arch/arm/Kconfig linux-2.6.27.19-5.1/arch/arm/Kconfig
---- linux-2.6.27/arch/arm/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/Kconfig       2009-03-25 16:10:48.000000000 +0000
-@@ -190,6 +190,8 @@ config VECTORS_BASE
+diff -r 9608d5473017 arch/arm/Kconfig
+--- a/arch/arm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/Kconfig Wed May 06 16:55:57 2009 +0100
+@@ -189,6 +189,8 @@
+         The base address of exception vectors.
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "System Type"
  
- choice
-diff -purN linux-2.6.27/arch/arm/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/arm/include/asm/ioctls.h
---- linux-2.6.27/arch/arm/include/asm/ioctls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/include/asm/ioctls.h  2009-03-25 16:10:49.000000000 +0000
+diff -r 9608d5473017 arch/arm/include/asm/ioctls.h
+--- a/arch/arm/include/asm/ioctls.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/include/asm/ioctls.h    Wed May 06 16:55:57 2009 +0100
 @@ -52,6 +52,7 @@
  #define TCSETSF2      _IOW('T',0x2D, struct termios2)
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -15053,10 +15052,10 @@ diff -purN linux-2.6.27/arch/arm/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/a
  
  #define FIONCLEX      0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX               0x5451
-diff -purN linux-2.6.27/arch/arm/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/arm/include/asm/spinlock.h
---- linux-2.6.27/arch/arm/include/asm/spinlock.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/include/asm/spinlock.h        2009-03-25 16:10:49.000000000 +0000
-@@ -217,6 +217,9 @@ static inline int __raw_read_trylock(raw
+diff -r 9608d5473017 arch/arm/include/asm/spinlock.h
+--- a/arch/arm/include/asm/spinlock.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/include/asm/spinlock.h  Wed May 06 16:55:57 2009 +0100
+@@ -217,6 +217,9 @@
  /* read_can_lock - would read_trylock() succeed? */
  #define __raw_read_can_lock(x)                ((x)->lock < 0x80000000)
  
@@ -15066,9 +15065,9 @@ diff -purN linux-2.6.27/arch/arm/include/asm/spinlock.h linux-2.6.27.19-5.1/arch
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/arch/arm/kernel/calls.S linux-2.6.27.19-5.1/arch/arm/kernel/calls.S
---- linux-2.6.27/arch/arm/kernel/calls.S       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/kernel/calls.S        2009-03-25 16:10:48.000000000 +0000
+diff -r 9608d5473017 arch/arm/kernel/calls.S
+--- a/arch/arm/kernel/calls.S  Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/kernel/calls.S  Wed May 06 16:55:57 2009 +0100
 @@ -98,7 +98,7 @@
                CALL(sys_uselib)
                CALL(sys_swapon)
@@ -15078,10 +15077,10 @@ diff -purN linux-2.6.27/arch/arm/kernel/calls.S linux-2.6.27.19-5.1/arch/arm/ker
  /* 90 */      CALL(OBSOLETE(old_mmap))        /* used by libc4 */
                CALL(sys_munmap)
                CALL(sys_truncate)
-diff -purN linux-2.6.27/arch/arm/mach-ns9xxx/irq.c linux-2.6.27.19-5.1/arch/arm/mach-ns9xxx/irq.c
---- linux-2.6.27/arch/arm/mach-ns9xxx/irq.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-ns9xxx/irq.c     2009-03-25 16:10:48.000000000 +0000
-@@ -86,7 +86,7 @@ static void handle_prio_irq(unsigned int
+diff -r 9608d5473017 arch/arm/mach-ns9xxx/irq.c
+--- a/arch/arm/mach-ns9xxx/irq.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-ns9xxx/irq.c       Wed May 06 16:55:57 2009 +0100
+@@ -86,7 +86,7 @@
        /* XXX: There is no direct way to access noirqdebug, so check
         * unconditionally for spurious irqs...
         * Maybe this function should go to kernel/irq/chip.c? */
@@ -15090,9 +15089,9 @@ diff -purN linux-2.6.27/arch/arm/mach-ns9xxx/irq.c linux-2.6.27.19-5.1/arch/arm/
  
        spin_lock(&desc->lock);
        desc->status &= ~IRQ_INPROGRESS;
-diff -purN linux-2.6.27/arch/arm/mach-pxa/include/mach/reset.h linux-2.6.27.19-5.1/arch/arm/mach-pxa/include/mach/reset.h
---- linux-2.6.27/arch/arm/mach-pxa/include/mach/reset.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/include/mach/reset.h 2009-03-25 16:10:48.000000000 +0000
+diff -r 9608d5473017 arch/arm/mach-pxa/include/mach/reset.h
+--- a/arch/arm/mach-pxa/include/mach/reset.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/include/mach/reset.h   Wed May 06 16:55:57 2009 +0100
 @@ -10,9 +10,12 @@
  extern unsigned int reset_status;
  extern void clear_reset_status(unsigned int mask);
@@ -15109,10 +15108,10 @@ diff -purN linux-2.6.27/arch/arm/mach-pxa/include/mach/reset.h linux-2.6.27.19-5
 +extern int init_gpio_reset(int gpio, int output);
  
  #endif /* __ASM_ARCH_RESET_H */
-diff -purN linux-2.6.27/arch/arm/mach-pxa/reset.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/reset.c
---- linux-2.6.27/arch/arm/mach-pxa/reset.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/reset.c      2009-03-25 16:10:48.000000000 +0000
-@@ -20,7 +20,7 @@ static void do_hw_reset(void);
+diff -r 9608d5473017 arch/arm/mach-pxa/reset.c
+--- a/arch/arm/mach-pxa/reset.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/reset.c        Wed May 06 16:55:57 2009 +0100
+@@ -20,7 +20,7 @@
  
  static int reset_gpio = -1;
  
@@ -15121,7 +15120,7 @@ diff -purN linux-2.6.27/arch/arm/mach-pxa/reset.c linux-2.6.27.19-5.1/arch/arm/m
  {
        int rc;
  
-@@ -30,9 +30,12 @@ int init_gpio_reset(int gpio)
+@@ -30,9 +30,12 @@
                goto out;
        }
  
@@ -15136,10 +15135,10 @@ diff -purN linux-2.6.27/arch/arm/mach-pxa/reset.c linux-2.6.27.19-5.1/arch/arm/m
                gpio_free(gpio);
                goto out;
        }
-diff -purN linux-2.6.27/arch/arm/mach-pxa/spitz.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/spitz.c
---- linux-2.6.27/arch/arm/mach-pxa/spitz.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/spitz.c      2009-03-25 16:10:48.000000000 +0000
-@@ -548,7 +548,7 @@ static void spitz_restart(char mode)
+diff -r 9608d5473017 arch/arm/mach-pxa/spitz.c
+--- a/arch/arm/mach-pxa/spitz.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/spitz.c        Wed May 06 16:55:57 2009 +0100
+@@ -548,7 +548,7 @@
  
  static void __init common_init(void)
  {
@@ -15148,10 +15147,10 @@ diff -purN linux-2.6.27/arch/arm/mach-pxa/spitz.c linux-2.6.27.19-5.1/arch/arm/m
        pm_power_off = spitz_poweroff;
        arm_pm_restart = spitz_restart;
  
-diff -purN linux-2.6.27/arch/arm/mach-pxa/tosa.c linux-2.6.27.19-5.1/arch/arm/mach-pxa/tosa.c
---- linux-2.6.27/arch/arm/mach-pxa/tosa.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mach-pxa/tosa.c       2009-03-25 16:10:48.000000000 +0000
-@@ -781,7 +781,7 @@ static void __init tosa_init(void)
+diff -r 9608d5473017 arch/arm/mach-pxa/tosa.c
+--- a/arch/arm/mach-pxa/tosa.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mach-pxa/tosa.c Wed May 06 16:55:57 2009 +0100
+@@ -781,7 +781,7 @@
        gpio_set_wake(MFP_PIN_GPIO1, 1);
        /* We can't pass to gpio-keys since it will drop the Reset altfunc */
  
@@ -15160,10 +15159,10 @@ diff -purN linux-2.6.27/arch/arm/mach-pxa/tosa.c linux-2.6.27.19-5.1/arch/arm/ma
  
        pm_power_off = tosa_poweroff;
        arm_pm_restart = tosa_restart;
-diff -purN linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c linux-2.6.27.19-5.1/arch/arm/mm/cache-feroceon-l2.c
---- linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mm/cache-feroceon-l2.c        2009-03-25 16:10:48.000000000 +0000
-@@ -148,7 +148,7 @@ static void feroceon_l2_inv_range(unsign
+diff -r 9608d5473017 arch/arm/mm/cache-feroceon-l2.c
+--- a/arch/arm/mm/cache-feroceon-l2.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mm/cache-feroceon-l2.c  Wed May 06 16:55:57 2009 +0100
+@@ -148,7 +148,7 @@
        /*
         * Clean and invalidate partial last cache line.
         */
@@ -15172,7 +15171,7 @@ diff -purN linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c linux-2.6.27.19-5.1/arch
                l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
                end &= ~(CACHE_LINE_SIZE - 1);
        }
-@@ -156,7 +156,7 @@ static void feroceon_l2_inv_range(unsign
+@@ -156,7 +156,7 @@
        /*
         * Invalidate all full cache lines between 'start' and 'end'.
         */
@@ -15181,10 +15180,10 @@ diff -purN linux-2.6.27/arch/arm/mm/cache-feroceon-l2.c linux-2.6.27.19-5.1/arch
                unsigned long range_end = calc_range_end(start, end);
                l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
                start = range_end;
-diff -purN linux-2.6.27/arch/arm/mm/cache-xsc3l2.c linux-2.6.27.19-5.1/arch/arm/mm/cache-xsc3l2.c
---- linux-2.6.27/arch/arm/mm/cache-xsc3l2.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/arm/mm/cache-xsc3l2.c     2009-03-25 16:10:48.000000000 +0000
-@@ -97,7 +97,7 @@ static void xsc3_l2_inv_range(unsigned l
+diff -r 9608d5473017 arch/arm/mm/cache-xsc3l2.c
+--- a/arch/arm/mm/cache-xsc3l2.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/arm/mm/cache-xsc3l2.c       Wed May 06 16:55:57 2009 +0100
+@@ -97,7 +97,7 @@
        /*
         * Clean and invalidate partial last cache line.
         */
@@ -15193,7 +15192,7 @@ diff -purN linux-2.6.27/arch/arm/mm/cache-xsc3l2.c linux-2.6.27.19-5.1/arch/arm/
                xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1));
                xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
                end &= ~(CACHE_LINE_SIZE - 1);
-@@ -106,7 +106,7 @@ static void xsc3_l2_inv_range(unsigned l
+@@ -106,7 +106,7 @@
        /*
         * Invalidate all full cache lines between 'start' and 'end'.
         */
@@ -15202,22 +15201,22 @@ diff -purN linux-2.6.27/arch/arm/mm/cache-xsc3l2.c linux-2.6.27.19-5.1/arch/arm/
                xsc3_l2_inv_pa(start);
                start += CACHE_LINE_SIZE;
        }
-diff -purN linux-2.6.27/arch/avr32/Kconfig linux-2.6.27.19-5.1/arch/avr32/Kconfig
---- linux-2.6.27/arch/avr32/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/avr32/Kconfig     2009-03-25 16:10:47.000000000 +0000
-@@ -72,6 +72,8 @@ config GENERIC_BUG
+diff -r 9608d5473017 arch/avr32/Kconfig
+--- a/arch/avr32/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/arch/avr32/Kconfig       Wed May 06 16:55:57 2009 +0100
+@@ -71,6 +71,8 @@
+       depends on BUG
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "System Type and features"
  
- source "kernel/time/Kconfig"
-diff -purN linux-2.6.27/arch/avr32/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/avr32/include/asm/thread_info.h
---- linux-2.6.27/arch/avr32/include/asm/thread_info.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/avr32/include/asm/thread_info.h   2009-03-25 16:10:47.000000000 +0000
-@@ -96,6 +96,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/avr32/include/asm/thread_info.h
+--- a/arch/avr32/include/asm/thread_info.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/avr32/include/asm/thread_info.h     Wed May 06 16:55:57 2009 +0100
+@@ -96,6 +96,7 @@
  #define _TIF_MEMDIE           (1 << TIF_MEMDIE)
  #define _TIF_RESTORE_SIGMASK  (1 << TIF_RESTORE_SIGMASK)
  #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
@@ -15225,37 +15224,36 @@ diff -purN linux-2.6.27/arch/avr32/include/asm/thread_info.h linux-2.6.27.19-5.1
  
  /* Note: The masks below must never span more than 16 bits! */
  
-diff -purN linux-2.6.27/arch/blackfin/Kconfig linux-2.6.27.19-5.1/arch/blackfin/Kconfig
---- linux-2.6.27/arch/blackfin/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/blackfin/Kconfig  2009-03-25 16:10:55.000000000 +0000
-@@ -64,8 +64,11 @@ config HARDWARE_PM
+diff -r 9608d5473017 arch/blackfin/Kconfig
+--- a/arch/blackfin/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/arch/blackfin/Kconfig    Wed May 06 16:55:57 2009 +0100
+@@ -64,7 +64,10 @@
        depends on OPROFILE
  
  source "init/Kconfig"
 +
  source "kernel/Kconfig.preempt"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "Blackfin Processor Options"
  
- comment "Processor and Board Settings"
-diff -purN linux-2.6.27/arch/cris/Kconfig linux-2.6.27.19-5.1/arch/cris/Kconfig
---- linux-2.6.27/arch/cris/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/Kconfig      2009-03-25 16:10:52.000000000 +0000
-@@ -62,6 +62,8 @@ config HZ
+diff -r 9608d5473017 arch/cris/Kconfig
+--- a/arch/cris/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/Kconfig        Wed May 06 16:55:57 2009 +0100
+@@ -61,6 +61,8 @@
+       default 100
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "General setup"
  
- source "fs/Kconfig.binfmt"
-diff -purN linux-2.6.27/arch/cris/arch-v10/kernel/entry.S linux-2.6.27.19-5.1/arch/cris/arch-v10/kernel/entry.S
---- linux-2.6.27/arch/cris/arch-v10/kernel/entry.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/arch-v10/kernel/entry.S      2009-03-25 16:10:52.000000000 +0000
-@@ -691,7 +691,7 @@ sys_call_table:    
+diff -r 9608d5473017 arch/cris/arch-v10/kernel/entry.S
+--- a/arch/cris/arch-v10/kernel/entry.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/arch-v10/kernel/entry.S        Wed May 06 16:55:57 2009 +0100
+@@ -691,7 +691,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -15264,10 +15262,10 @@ diff -purN linux-2.6.27/arch/cris/arch-v10/kernel/entry.S linux-2.6.27.19-5.1/ar
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/cris/arch-v32/kernel/entry.S linux-2.6.27.19-5.1/arch/cris/arch-v32/kernel/entry.S
---- linux-2.6.27/arch/cris/arch-v32/kernel/entry.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/cris/arch-v32/kernel/entry.S      2009-03-25 16:10:52.000000000 +0000
-@@ -614,7 +614,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/cris/arch-v32/kernel/entry.S
+--- a/arch/cris/arch-v32/kernel/entry.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/cris/arch-v32/kernel/entry.S        Wed May 06 16:55:57 2009 +0100
+@@ -614,7 +614,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -15276,34 +15274,34 @@ diff -purN linux-2.6.27/arch/cris/arch-v32/kernel/entry.S linux-2.6.27.19-5.1/ar
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/frv/Kconfig linux-2.6.27.19-5.1/arch/frv/Kconfig
---- linux-2.6.27/arch/frv/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/frv/Kconfig       2009-03-25 16:10:55.000000000 +0000
-@@ -66,6 +66,8 @@ mainmenu "Fujitsu FR-V Kernel Configurat
+diff -r 9608d5473017 arch/frv/Kconfig
+--- a/arch/frv/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/frv/Kconfig Wed May 06 16:55:58 2009 +0100
+@@ -65,6 +65,8 @@
+ mainmenu "Fujitsu FR-V Kernel Configuration"
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  
- menu "Fujitsu FR-V system setup"
  
-diff -purN linux-2.6.27/arch/h8300/Kconfig linux-2.6.27.19-5.1/arch/h8300/Kconfig
---- linux-2.6.27/arch/h8300/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/Kconfig     2009-03-25 16:10:47.000000000 +0000
-@@ -89,6 +89,8 @@ config HZ
+ menu "Fujitsu FR-V system setup"
+diff -r 9608d5473017 arch/h8300/Kconfig
+--- a/arch/h8300/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/Kconfig       Wed May 06 16:55:58 2009 +0100
+@@ -88,6 +88,8 @@
+       default 100
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  source "arch/h8300/Kconfig.cpu"
  
- menu "Executable file formats"
-diff -purN linux-2.6.27/arch/h8300/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/h8300/include/asm/thread_info.h
---- linux-2.6.27/arch/h8300/include/asm/thread_info.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/include/asm/thread_info.h   2009-03-25 16:10:47.000000000 +0000
-@@ -89,6 +89,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/h8300/include/asm/thread_info.h
+--- a/arch/h8300/include/asm/thread_info.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/include/asm/thread_info.h     Wed May 06 16:55:58 2009 +0100
+@@ -89,6 +89,7 @@
                                           TIF_NEED_RESCHED */
  #define TIF_MEMDIE            4
  #define TIF_RESTORE_SIGMASK   5       /* restore signal mask in do_signal() */
@@ -15311,7 +15309,7 @@ diff -purN linux-2.6.27/arch/h8300/include/asm/thread_info.h linux-2.6.27.19-5.1
  
  /* as above, but as bit values */
  #define _TIF_SYSCALL_TRACE    (1<<TIF_SYSCALL_TRACE)
-@@ -96,6 +97,7 @@ static inline struct thread_info *curren
+@@ -96,6 +97,7 @@
  #define _TIF_NEED_RESCHED     (1<<TIF_NEED_RESCHED)
  #define _TIF_POLLING_NRFLAG   (1<<TIF_POLLING_NRFLAG)
  #define _TIF_RESTORE_SIGMASK  (1<<TIF_RESTORE_SIGMASK)
@@ -15319,10 +15317,10 @@ diff -purN linux-2.6.27/arch/h8300/include/asm/thread_info.h linux-2.6.27.19-5.1
  
  #define _TIF_WORK_MASK                0x0000FFFE      /* work to do on interrupt/exception return */
  
-diff -purN linux-2.6.27/arch/h8300/kernel/syscalls.S linux-2.6.27.19-5.1/arch/h8300/kernel/syscalls.S
---- linux-2.6.27/arch/h8300/kernel/syscalls.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/h8300/kernel/syscalls.S   2009-03-25 16:10:47.000000000 +0000
-@@ -103,7 +103,7 @@ SYMBOL_NAME_LABEL(sys_call_table)  
+diff -r 9608d5473017 arch/h8300/kernel/syscalls.S
+--- a/arch/h8300/kernel/syscalls.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/h8300/kernel/syscalls.S     Wed May 06 16:55:58 2009 +0100
+@@ -103,7 +103,7 @@
        .long SYMBOL_NAME(sys_uselib)
        .long SYMBOL_NAME(sys_swapon)
        .long SYMBOL_NAME(sys_reboot)
@@ -15331,10 +15329,10 @@ diff -purN linux-2.6.27/arch/h8300/kernel/syscalls.S linux-2.6.27.19-5.1/arch/h8
        .long SYMBOL_NAME(old_mmap)             /* 90 */
        .long SYMBOL_NAME(sys_munmap)
        .long SYMBOL_NAME(sys_truncate)
-diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
---- linux-2.6.27/arch/ia64/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Kconfig      2009-03-25 16:10:50.000000000 +0000
-@@ -7,6 +7,8 @@ mainmenu "IA-64 Linux Kernel Configurati
+diff -r 9608d5473017 arch/ia64/Kconfig
+--- a/arch/ia64/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Kconfig        Wed May 06 16:55:58 2009 +0100
+@@ -7,6 +7,8 @@
  
  source "init/Kconfig"
  
@@ -15343,7 +15341,7 @@ diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
  menu "Processor type and features"
  
  config IA64
-@@ -15,6 +17,7 @@ config IA64
+@@ -15,6 +17,7 @@
        select ACPI if (!IA64_HP_SIM)
        select PM if (!IA64_HP_SIM)
        select ARCH_SUPPORTS_MSI
@@ -15351,21 +15349,20 @@ diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_KPROBES
-@@ -470,13 +473,14 @@ config COMPAT_FOR_U64_ALIGNMENT
+@@ -470,13 +473,14 @@
  config IA64_MCA_RECOVERY
        tristate "MCA recovery from errors other than TLB."
  
 -config PERFMON
 -      bool "Performance monitor support"
--      help
++config IA64_CPE_MIGRATE
++      tristate "Migrate data off pages with correctable errors"
++      default m
+       help
 -        Selects whether support for the IA-64 performance monitor hardware
 -        is included in the kernel.  This makes some kernel data-structures a
 -        little bigger and slows down execution a bit, but it is generally
 -        a good idea to turn this on.  If you're unsure, say Y.
-+config IA64_CPE_MIGRATE
-+      tristate "Migrate data off pages with correctable errors"
-+      default m
-+      help
 +        Migrate data off pages with correctable memory errors.  Selecting
 +        Y will build this functionality into the kernel.  Selecting M will
 +        build this functionality as a kernel loadable module.  Installing
@@ -15373,7 +15370,7 @@ diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
  
  config IA64_PALINFO
        tristate "/proc/pal support"
-@@ -501,6 +505,7 @@ config IA64_MC_ERR_INJECT
+@@ -501,6 +505,7 @@
  
  config SGI_SN
        def_bool y if (IA64_SGI_SN2 || IA64_GENERIC)
@@ -15381,19 +15378,19 @@ diff -purN linux-2.6.27/arch/ia64/Kconfig linux-2.6.27.19-5.1/arch/ia64/Kconfig
  
  config IA64_ESI
        bool "ESI (Extensible SAL Interface) support"
-@@ -549,6 +554,8 @@ source "drivers/firmware/Kconfig"
+@@ -548,6 +553,8 @@
+ source "drivers/firmware/Kconfig"
  
  source "fs/Kconfig.binfmt"
-+source "arch/ia64/perfmon/Kconfig"
 +
++source "arch/ia64/perfmon/Kconfig"
  endmenu
  
- menu "Power management and ACPI"
-diff -purN linux-2.6.27/arch/ia64/Kconfig.debug linux-2.6.27.19-5.1/arch/ia64/Kconfig.debug
---- linux-2.6.27/arch/ia64/Kconfig.debug       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Kconfig.debug        2009-03-25 16:10:50.000000000 +0000
-@@ -56,9 +56,106 @@ config IA64_DEBUG_IRQ
+diff -r 9608d5473017 arch/ia64/Kconfig.debug
+--- a/arch/ia64/Kconfig.debug  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Kconfig.debug  Wed May 06 16:55:58 2009 +0100
+@@ -56,9 +56,106 @@
          and restore instructions.  It's useful for tracking down spinlock
          problems, but slow!  If you're unsure, select N.
  
@@ -15500,10 +15497,10 @@ diff -purN linux-2.6.27/arch/ia64/Kconfig.debug linux-2.6.27.19-5.1/arch/ia64/Kc
 +        Of imsire. say N.
 +
  endmenu
-diff -purN linux-2.6.27/arch/ia64/Makefile linux-2.6.27.19-5.1/arch/ia64/Makefile
---- linux-2.6.27/arch/ia64/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/Makefile     2009-03-25 16:10:50.000000000 +0000
-@@ -57,9 +57,11 @@ core-$(CONFIG_IA64_GENERIC)         += arch/ia6
+diff -r 9608d5473017 arch/ia64/Makefile
+--- a/arch/ia64/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/Makefile       Wed May 06 16:55:58 2009 +0100
+@@ -57,9 +57,11 @@
  core-$(CONFIG_IA64_HP_ZX1)    += arch/ia64/dig/
  core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
  core-$(CONFIG_IA64_SGI_SN2)   += arch/ia64/sn/
@@ -15515,16 +15512,16 @@ diff -purN linux-2.6.27/arch/ia64/Makefile linux-2.6.27.19-5.1/arch/ia64/Makefil
  drivers-$(CONFIG_PCI)         += arch/ia64/pci/
  drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/
  drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/
-@@ -105,4 +107,4 @@ archprepare: make_nr_irqs_h FORCE
+@@ -105,4 +107,4 @@
  PHONY += make_nr_irqs_h FORCE
  
  make_nr_irqs_h: FORCE
 -      $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h
 +      $(Q)$(MAKE) $(build)=arch/ia64/kernel arch/ia64/include/asm/nr-irqs.h
-diff -purN linux-2.6.27/arch/ia64/configs/generic_defconfig linux-2.6.27.19-5.1/arch/ia64/configs/generic_defconfig
---- linux-2.6.27/arch/ia64/configs/generic_defconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/configs/generic_defconfig    2009-03-25 16:10:50.000000000 +0000
-@@ -209,7 +209,6 @@ CONFIG_IA32_SUPPORT=y
+diff -r 9608d5473017 arch/ia64/configs/generic_defconfig
+--- a/arch/ia64/configs/generic_defconfig      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/configs/generic_defconfig      Wed May 06 16:55:58 2009 +0100
+@@ -209,7 +209,6 @@
  CONFIG_COMPAT=y
  CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
  CONFIG_IA64_MCA_RECOVERY=y
@@ -15532,10 +15529,12 @@ diff -purN linux-2.6.27/arch/ia64/configs/generic_defconfig linux-2.6.27.19-5.1/
  CONFIG_IA64_PALINFO=y
  # CONFIG_IA64_MC_ERR_INJECT is not set
  CONFIG_SGI_SN=y
-@@ -234,6 +233,16 @@ CONFIG_BINFMT_ELF=y
+@@ -232,6 +231,16 @@
+ CONFIG_DMIID=y
+ CONFIG_BINFMT_ELF=y
  CONFIG_BINFMT_MISC=m
- #
++
++#
 +# Hardware Performance Monitoring support
 +#
 +CONFIG_PERFMON=y
@@ -15544,15 +15543,13 @@ diff -purN linux-2.6.27/arch/ia64/configs/generic_defconfig linux-2.6.27.19-5.1/
 +CONFIG_IA64_PERFMON_ITANIUM=y
 +CONFIG_IA64_PERFMON_MCKINLEY=y
 +CONFIG_IA64_PERFMON_MONTECITO=y
-+
-+#
- # Power management and ACPI
  #
- CONFIG_PM=y
-diff -purN linux-2.6.27/arch/ia64/ia32/ia32_entry.S linux-2.6.27.19-5.1/arch/ia64/ia32/ia32_entry.S
---- linux-2.6.27/arch/ia64/ia32/ia32_entry.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/ia32/ia32_entry.S    2009-03-25 16:10:50.000000000 +0000
-@@ -215,7 +215,7 @@ ia32_syscall_table:
+ # Power management and ACPI
+diff -r 9608d5473017 arch/ia64/ia32/ia32_entry.S
+--- a/arch/ia64/ia32/ia32_entry.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/ia32/ia32_entry.S      Wed May 06 16:55:58 2009 +0100
+@@ -215,7 +215,7 @@
        data8 sys_mkdir
        data8 sys_rmdir           /* 40 */
        data8 sys_dup
@@ -15561,10 +15558,10 @@ diff -purN linux-2.6.27/arch/ia64/ia32/ia32_entry.S linux-2.6.27.19-5.1/arch/ia6
        data8 compat_sys_times
        data8 sys_ni_syscall      /* old prof syscall holder */
        data8 sys32_brk           /* 45 */
-diff -purN linux-2.6.27/arch/ia64/include/asm/Kbuild linux-2.6.27.19-5.1/arch/ia64/include/asm/Kbuild
---- linux-2.6.27/arch/ia64/include/asm/Kbuild  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/Kbuild   2009-03-25 16:10:50.000000000 +0000
-@@ -5,10 +5,12 @@ header-y += fpu.h
+diff -r 9608d5473017 arch/ia64/include/asm/Kbuild
+--- a/arch/ia64/include/asm/Kbuild     Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/Kbuild     Wed May 06 16:55:58 2009 +0100
+@@ -5,10 +5,12 @@
  header-y += fpswa.h
  header-y += ia64regs.h
  header-y += intel_intrin.h
@@ -15578,9 +15575,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/Kbuild linux-2.6.27.19-5.1/arch/ia
  
  unifdef-y += gcc_intrin.h
  unifdef-y += intrinsics.h
-diff -purN linux-2.6.27/arch/ia64/include/asm/ansidecl.h linux-2.6.27.19-5.1/arch/ia64/include/asm/ansidecl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/ansidecl.h       2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/ansidecl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/ansidecl.h Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,383 @@
 +/* ANSI and traditional C compatability macros
 +   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -15965,9 +15962,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/ansidecl.h linux-2.6.27.19-5.1/arc
 +#endif
 +
 +#endif        /* ansidecl.h   */
-diff -purN linux-2.6.27/arch/ia64/include/asm/bfd.h linux-2.6.27.19-5.1/arch/ia64/include/asm/bfd.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/bfd.h    2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/bfd.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/bfd.h      Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,5089 @@
 +/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
 +   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
@@ -21058,10 +21055,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/bfd.h linux-2.6.27.19-5.1/arch/ia6
 +}
 +#endif
 +#endif
-diff -purN linux-2.6.27/arch/ia64/include/asm/hw_irq.h linux-2.6.27.19-5.1/arch/ia64/include/asm/hw_irq.h
---- linux-2.6.27/arch/ia64/include/asm/hw_irq.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/hw_irq.h 2009-03-25 16:10:50.000000000 +0000
-@@ -67,9 +67,9 @@ extern int ia64_last_device_vector;
+diff -r 9608d5473017 arch/ia64/include/asm/hw_irq.h
+--- a/arch/ia64/include/asm/hw_irq.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/hw_irq.h   Wed May 06 16:55:58 2009 +0100
+@@ -67,9 +67,9 @@
  #define IA64_NUM_DEVICE_VECTORS               (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1)
  
  #define IA64_MCA_RENDEZ_VECTOR                0xe8    /* MCA rendez interrupt */
@@ -21072,9 +21069,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/hw_irq.h linux-2.6.27.19-5.1/arch/
  #define IA64_IPI_LOCAL_TLB_FLUSH      0xfc    /* SMP flush local TLB */
  #define IA64_IPI_RESCHEDULE           0xfd    /* SMP reschedule */
  #define IA64_IPI_VECTOR                       0xfe    /* inter-processor interrupt vector */
-diff -purN linux-2.6.27/arch/ia64/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/ia64/include/asm/ioctls.h
---- linux-2.6.27/arch/ia64/include/asm/ioctls.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/ioctls.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/ioctls.h
+--- a/arch/ia64/include/asm/ioctls.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/ioctls.h   Wed May 06 16:55:58 2009 +0100
 @@ -59,6 +59,7 @@
  #define TCSETSF2      _IOW('T',0x2D, struct termios2)
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -21083,9 +21080,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/
  
  #define FIONCLEX      0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX               0x5451
-diff -purN linux-2.6.27/arch/ia64/include/asm/irq.h linux-2.6.27.19-5.1/arch/ia64/include/asm/irq.h
---- linux-2.6.27/arch/ia64/include/asm/irq.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/irq.h    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/irq.h
+--- a/arch/ia64/include/asm/irq.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/irq.h      Wed May 06 16:55:58 2009 +0100
 @@ -13,7 +13,7 @@
  
  #include <linux/types.h>
@@ -21095,9 +21092,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/irq.h linux-2.6.27.19-5.1/arch/ia6
  
  static __inline__ int
  irq_canonicalize (int irq)
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdb.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb.h    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdb.h      Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,49 @@
 +#ifndef _ASM_KDB_H
 +#define _ASM_KDB_H
@@ -21148,9 +21145,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/kdb.h linux-2.6.27.19-5.1/arch/ia6
 +#endif
 +
 +#endif        /* !_ASM_KDB_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdb_break.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb_break.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdb_break.h      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdb_break.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdb_break.h        Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,24 @@
 +#ifndef _ASM_KDB_BREAK_H
 +#define _ASM_KDB_BREAK_H
@@ -21176,9 +21173,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/kdb_break.h linux-2.6.27.19-5.1/ar
 +#define KDB_BREAK_ENTER_SLAVE 0x80102         /* KDB_ENTER_SLAVE(), concurrent slave events */
 +
 +#endif        /* !_ASM_KDB_BREAK_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kdbprivate.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kdbprivate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kdbprivate.h     2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kdbprivate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/kdbprivate.h       Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,124 @@
 +#ifndef _ASM_KDBPRIVATE_H
 +#define _ASM_KDBPRIVATE_H
@@ -21304,10 +21301,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/kdbprivate.h linux-2.6.27.19-5.1/a
 +extern void kdba_wait_for_cpus(void);
 +
 +#endif        /* !_ASM_KDBPRIVATE_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/kmap_types.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kmap_types.h
---- linux-2.6.27/arch/ia64/include/asm/kmap_types.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kmap_types.h     2009-03-25 16:10:50.000000000 +0000
-@@ -22,7 +22,8 @@ D(9) KM_IRQ0,
+diff -r 9608d5473017 arch/ia64/include/asm/kmap_types.h
+--- a/arch/ia64/include/asm/kmap_types.h       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/kmap_types.h       Wed May 06 16:55:58 2009 +0100
+@@ -22,7 +22,8 @@
  D(10) KM_IRQ1,
  D(11) KM_SOFTIRQ0,
  D(12) KM_SOFTIRQ1,
@@ -21317,9 +21314,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/kmap_types.h linux-2.6.27.19-5.1/a
  };
  
  #undef D
-diff -purN linux-2.6.27/arch/ia64/include/asm/kregs.h linux-2.6.27.19-5.1/arch/ia64/include/asm/kregs.h
---- linux-2.6.27/arch/ia64/include/asm/kregs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/kregs.h  2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/kregs.h
+--- a/arch/ia64/include/asm/kregs.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/kregs.h    Wed May 06 16:55:58 2009 +0100
 @@ -72,7 +72,7 @@
  /* A mask of PSR bits that we generally don't want to inherit across a clone2() or an
     execve().  Only list flags here that need to be cleared/set for BOTH clone2() and
@@ -21329,10 +21326,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/kregs.h linux-2.6.27.19-5.1/arch/i
                                 IA64_PSR_TB  | IA64_PSR_ID  | IA64_PSR_DA | IA64_PSR_DD | \
                                 IA64_PSR_SS  | IA64_PSR_ED  | IA64_PSR_IA)
  #define IA64_PSR_BITS_TO_SET  (IA64_PSR_DFH | IA64_PSR_SP)
-diff -purN linux-2.6.27/arch/ia64/include/asm/mca.h linux-2.6.27.19-5.1/arch/ia64/include/asm/mca.h
---- linux-2.6.27/arch/ia64/include/asm/mca.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/mca.h    2009-03-25 16:10:50.000000000 +0000
-@@ -137,6 +137,7 @@ extern unsigned long __per_cpu_mca[NR_CP
+diff -r 9608d5473017 arch/ia64/include/asm/mca.h
+--- a/arch/ia64/include/asm/mca.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/mca.h      Wed May 06 16:55:58 2009 +0100
+@@ -137,6 +137,7 @@
  
  extern int cpe_vector;
  extern int ia64_cpe_irq;
@@ -21340,7 +21337,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/mca.h linux-2.6.27.19-5.1/arch/ia6
  extern void ia64_mca_init(void);
  extern void ia64_mca_cpu_init(void *);
  extern void ia64_os_mca_dispatch(void);
-@@ -150,10 +151,15 @@ extern void ia64_slave_init_handler(void
+@@ -150,9 +151,14 @@
  extern void ia64_mca_cmc_vector_setup(void);
  extern int  ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *));
  extern void ia64_unreg_MCA_extension(void);
@@ -21349,17 +21346,16 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/mca.h linux-2.6.27.19-5.1/arch/ia6
  extern u64 ia64_get_rnat(u64 *);
  extern void ia64_mca_printk(const char * fmt, ...)
         __attribute__ ((format (printf, 1, 2)));
++
 +extern struct list_head badpagelist;
 +extern unsigned int total_badpages;
-+
  struct ia64_mca_notify_die {
        struct ia64_sal_os_state *sos;
-       int *monarch_cpu;
-diff -purN linux-2.6.27/arch/ia64/include/asm/meminit.h linux-2.6.27.19-5.1/arch/ia64/include/asm/meminit.h
---- linux-2.6.27/arch/ia64/include/asm/meminit.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/meminit.h        2009-03-25 16:10:50.000000000 +0000
-@@ -47,7 +47,6 @@ extern int reserve_elfcorehdr(unsigned l
+diff -r 9608d5473017 arch/ia64/include/asm/meminit.h
+--- a/arch/ia64/include/asm/meminit.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/meminit.h  Wed May 06 16:55:58 2009 +0100
+@@ -47,7 +47,6 @@
   */
  #define GRANULEROUNDDOWN(n)   ((n) & ~(IA64_GRANULE_SIZE-1))
  #define GRANULEROUNDUP(n)     (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
@@ -21367,10 +21363,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/meminit.h linux-2.6.27.19-5.1/arch
  
  #ifdef CONFIG_NUMA
    extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
-diff -purN linux-2.6.27/arch/ia64/include/asm/page.h linux-2.6.27.19-5.1/arch/ia64/include/asm/page.h
---- linux-2.6.27/arch/ia64/include/asm/page.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/page.h   2009-03-25 16:10:51.000000000 +0000
-@@ -121,6 +121,7 @@ extern unsigned long max_low_pfn;
+diff -r 9608d5473017 arch/ia64/include/asm/page.h
+--- a/arch/ia64/include/asm/page.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/page.h     Wed May 06 16:55:58 2009 +0100
+@@ -121,6 +121,7 @@
  #endif
  
  #define page_to_phys(page)    (page_to_pfn(page) << PAGE_SHIFT)
@@ -21378,21 +21374,55 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/page.h linux-2.6.27.19-5.1/arch/ia
  #define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
  #define pfn_to_kaddr(pfn)     __va((pfn) << PAGE_SHIFT)
  
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon.h
---- linux-2.6.27/arch/ia64/include/asm/perfmon.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon.h        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon.h
+--- a/arch/ia64/include/asm/perfmon.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/perfmon.h  Wed May 06 16:55:58 2009 +0100
 @@ -1,279 +1,59 @@
  /*
 - * Copyright (C) 2001-2003 Hewlett-Packard Co
 - *               Stephane Eranian <eranian@hpl.hp.com>
-- */
--
++ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
++ * Contributed by Stephane Eranian <eranian@hpl.hp.com>
++ *
++ * This file contains Itanium Processor Family specific definitions
++ * for the perfmon interface.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of version 2 of the GNU General Public
++ * License as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ * 02111-1307 USA
++ */
++#ifndef _ASM_IA64_PERFMON_H_
++#define _ASM_IA64_PERFMON_H_
++
++/*
++ * arch-specific user visible interface definitions
+  */
 -#ifndef _ASM_IA64_PERFMON_H
 -#define _ASM_IA64_PERFMON_H
--
--/*
++#define PFM_ARCH_MAX_PMCS     (256+64)
++#define PFM_ARCH_MAX_PMDS     (256+64)
++
++#define PFM_ARCH_PMD_STK_ARG  8
++#define PFM_ARCH_PMC_STK_ARG  8
+ /*
 - * perfmon comamnds supported on all CPU models
-- */
++ * Itanium specific context flags
++ *
++ * bits[00-15]: generic flags (see asm/perfmon.h)
++ * bits[16-31]: arch-specific flags
+  */
 -#define PFM_WRITE_PMCS                0x01
 -#define PFM_WRITE_PMDS                0x02
 -#define PFM_READ_PMDS         0x03
@@ -21410,20 +21440,31 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -#define PFM_GET_PMC_RESET_VAL 0x0f
 -#define PFM_LOAD_CONTEXT      0x10
 -#define PFM_UNLOAD_CONTEXT    0x11
--
--/*
++#define PFM_ITA_FL_INSECURE 0x10000 /* clear psr.sp on non system, non self */
+ /*
 - * PMU model specific commands (may not be supported on all PMU models)
-- */
++ * Itanium specific public event set flags (set_flags)
++ *
++ * event set flags layout:
++ * bits[00-15] : generic flags
++ * bits[16-31] : arch-specific flags
+  */
 -#define PFM_WRITE_IBRS                0x20
 -#define PFM_WRITE_DBRS                0x21
--
--/*
++#define PFM_ITA_SETFL_EXCL_INTR       0x10000  /* exclude interrupt execution */
++#define PFM_ITA_SETFL_INTR_ONLY       0x20000  /* include only interrupt execution */
++#define PFM_ITA_SETFL_IDLE_EXCL 0x40000  /* stop monitoring in idle loop */
+ /*
 - * context flags
-- */
++ * compatibility for version v2.0 of the interface
+  */
 -#define PFM_FL_NOTIFY_BLOCK            0x01   /* block task on user level notifications */
 -#define PFM_FL_SYSTEM_WIDE     0x02   /* create a system wide context */
 -#define PFM_FL_OVFL_NO_MSG     0x80   /* do not post overflow/end messages for notification */
--
++#include <asm/perfmon_compat.h>
 -/*
 - * event set flags
 - */
@@ -21437,9 +21478,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -
 -/*
 - * PMD/PMC/IBR/DBR return flags (ignored on input)
-+ * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
-+ * Contributed by Stephane Eranian <eranian@hpl.hp.com>
-  *
+- *
 - * Those flags are used on output and must be checked in case EAGAIN is returned
 - * by any of the calls using a pfarg_reg_t or pfarg_dbreg_t structure.
 - */
@@ -21544,36 +21583,17 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -
 -/*
 - * Define the version numbers for both perfmon as a whole and the sampling buffer format.
-+ * This file contains Itanium Processor Family specific definitions
-+ * for the perfmon interface.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of version 2 of the GNU General Public
-+ * License as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ * 02111-1307 USA
-  */
+- */
 -#define PFM_VERSION_MAJ                2U
 -#define PFM_VERSION_MIN                0U
 -#define PFM_VERSION            (((PFM_VERSION_MAJ&0xffff)<<16)|(PFM_VERSION_MIN & 0xffff))
 -#define PFM_VERSION_MAJOR(x)   (((x)>>16) & 0xffff)
 -#define PFM_VERSION_MINOR(x)   ((x) & 0xffff)
 -
-+#ifndef _ASM_IA64_PERFMON_H_
-+#define _ASM_IA64_PERFMON_H_
- /*
+-
+-/*
 - * miscellaneous architected definitions
-+ * arch-specific user visible interface definitions
-  */
+- */
 -#define PMU_FIRST_COUNTER     4       /* first counting monitor (PMC/PMD) */
 -#define PMU_MAX_PMCS          256     /* maximum architected number of PMC registers */
 -#define PMU_MAX_PMDS          256     /* maximum architected number of PMD registers */
@@ -21588,7 +21608,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -
 -extern void pfm_save_regs (struct task_struct *);
 -extern void pfm_load_regs (struct task_struct *);
+-
 -extern void pfm_exit_thread(struct task_struct *);
 -extern int  pfm_use_debug_registers(struct task_struct *);
 -extern int  pfm_release_debug_registers(struct task_struct *);
@@ -21598,9 +21618,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -extern void pfm_handle_work(void);
 -extern int  pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
 -extern int  pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *h);
-+#define PFM_ARCH_MAX_PMCS     (256+64)
-+#define PFM_ARCH_MAX_PMDS     (256+64)
+-
 -
 -
 -/*
@@ -21653,41 +21671,25 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -
 -extern int pfm_register_buffer_fmt(pfm_buffer_fmt_t *fmt);
 -extern int pfm_unregister_buffer_fmt(pfm_uuid_t uuid);
-+#define PFM_ARCH_PMD_STK_ARG  8
-+#define PFM_ARCH_PMC_STK_ARG  8
- /*
+-
+-/*
 - * perfmon interface exported to modules
-+ * Itanium specific context flags
-+ *
-+ * bits[00-15]: generic flags (see asm/perfmon.h)
-+ * bits[16-31]: arch-specific flags
-  */
+- */
 -extern int pfm_mod_read_pmds(struct task_struct *, void *req, unsigned int nreq, struct pt_regs *regs);
 -extern int pfm_mod_write_pmcs(struct task_struct *, void *req, unsigned int nreq, struct pt_regs *regs);
 -extern int pfm_mod_write_ibrs(struct task_struct *task, void *req, unsigned int nreq, struct pt_regs *regs);
 -extern int pfm_mod_write_dbrs(struct task_struct *task, void *req, unsigned int nreq, struct pt_regs *regs);
-+#define PFM_ITA_FL_INSECURE 0x10000 /* clear psr.sp on non system, non self */
- /*
+-
+-/*
 - * describe the content of the local_cpu_date->pfm_syst_info field
-+ * Itanium specific public event set flags (set_flags)
-+ *
-+ * event set flags layout:
-+ * bits[00-15] : generic flags
-+ * bits[16-31] : arch-specific flags
-  */
+- */
 -#define PFM_CPUINFO_SYST_WIDE 0x1     /* if set a system wide session exists */
 -#define PFM_CPUINFO_DCR_PP    0x2     /* if set the system wide session has started */
 -#define PFM_CPUINFO_EXCL_IDLE 0x4     /* the system wide session excludes the idle task */
-+#define PFM_ITA_SETFL_EXCL_INTR       0x10000  /* exclude interrupt execution */
-+#define PFM_ITA_SETFL_INTR_ONLY       0x20000  /* include only interrupt execution */
-+#define PFM_ITA_SETFL_IDLE_EXCL 0x40000  /* stop monitoring in idle loop */
- /*
+-
+-/*
 - * sysctl control structure. visible to sampling formats
-+ * compatibility for version v2.0 of the interface
-  */
+- */
 -typedef struct {
 -      int     debug;          /* turn on/off debugging via syslog */
 -      int     debug_ovfl;     /* turn on/off debug printk in overflow handler */
@@ -21698,13 +21700,12 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon.h linux-2.6.27.19-5.1/arch
 -
 -
 -#endif /* __KERNEL__ */
-+#include <asm/perfmon_compat.h>
+-
 -#endif /* _ASM_IA64_PERFMON_H */
 +#endif /* _ASM_IA64_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_compat.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_compat.h 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/perfmon_compat.h   Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,167 @@
 +/*
 + * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
@@ -21873,9 +21874,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_compat.h linux-2.6.27.19-5
 +#define PFM_REG_HAS_ERROR(flag)       (((flag) & PFM_REG_RETFL_MASK) != 0)
 +
 +#endif /* _ASM_IA64_PERFMON_COMPAT_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_default_smpl.h
---- linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_default_smpl.h   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_default_smpl.h
+--- a/arch/ia64/include/asm/perfmon_default_smpl.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/perfmon_default_smpl.h     Wed May 06 16:55:58 2009 +0100
 @@ -1,83 +1,106 @@
  /*
 - * Copyright (C) 2002-2003 Hewlett-Packard Co
@@ -21953,22 +21954,20 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.2
 -      unsigned long   hdr_count;              /* how many valid entries */
 -      unsigned long   hdr_cur_offs;           /* current offset from top of buffer */
 -      unsigned long   hdr_reserved2;          /* reserved for future use */
--
--      unsigned long   hdr_overflows;          /* how many times the buffer overflowed */
--      unsigned long   hdr_buf_size;           /* how many bytes in the buffer */
--
--      unsigned int    hdr_version;            /* contains perfmon version (smpl format diffs) */
--      unsigned int    hdr_reserved1;          /* for future use */
--      unsigned long   hdr_reserved[10];       /* for future use */
--} pfm_default_smpl_hdr_t;
 +struct pfm_default_smpl_hdr {
 +      u64     hdr_count;      /* how many valid entries */
 +      u64     hdr_cur_offs;   /* current offset from top of buffer */
 +      u64     dr_reserved2;   /* reserved for future use */
-+
+-      unsigned long   hdr_overflows;          /* how many times the buffer overflowed */
+-      unsigned long   hdr_buf_size;           /* how many bytes in the buffer */
 +      u64     hdr_overflows;  /* how many times the buffer overflowed */
 +      u64     hdr_buf_size;   /* how many bytes in the buffer */
-+
+-      unsigned int    hdr_version;            /* contains perfmon version (smpl format diffs) */
+-      unsigned int    hdr_reserved1;          /* for future use */
+-      unsigned long   hdr_reserved[10];       /* for future use */
+-} pfm_default_smpl_hdr_t;
 +      u32     hdr_version;    /* smpl format version*/
 +      u32     hdr_reserved1;          /* for future use */
 +      u64     hdr_reserved[10];       /* for future use */
@@ -21992,7 +21991,18 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.2
 -        int             pid;                    /* thread id (for NPTL, this is gettid()) */
 -        unsigned char   reserved1[3];           /* reserved for future use */
 -        unsigned char   ovfl_pmd;               /* index of overflowed PMD */
--
++struct pfm_default_smpl_entry {
++      pid_t   pid;            /* thread id (for NPTL, this is gettid()) */
++      uint8_t reserved1[3];   /* for future use */
++      uint8_t ovfl_pmd;       /* overflow pmd for this sample */
++      u64     last_reset_val; /* initial value of overflowed PMD */
++      unsigned long ip;       /* where did the overflow interrupt happened */
++      u64     tstamp;         /* overflow timetamp */
++      u16     cpu;            /* cpu on which the overfow occured */
++      u16     set;            /* event set active when overflow ocurred   */
++      pid_t   tgid;           /* thread group id (for NPTL, this is getpid()) */
++};
 -        unsigned long   last_reset_val;         /* initial value of overflowed PMD */
 -        unsigned long   ip;                     /* where did the overflow interrupt happened  */
 -        unsigned long   tstamp;                 /* ar.itc when entering perfmon intr. handler */
@@ -22005,18 +22015,6 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.2
 -#define PFM_DEFAULT_MAX_PMDS          64 /* how many pmds supported by data structures (sizeof(unsigned long) */
 -#define PFM_DEFAULT_MAX_ENTRY_SIZE    (sizeof(pfm_default_smpl_entry_t)+(sizeof(unsigned long)*PFM_DEFAULT_MAX_PMDS))
 -#define PFM_DEFAULT_SMPL_MIN_BUF_SIZE (sizeof(pfm_default_smpl_hdr_t)+PFM_DEFAULT_MAX_ENTRY_SIZE)
-+struct pfm_default_smpl_entry {
-+      pid_t   pid;            /* thread id (for NPTL, this is gettid()) */
-+      uint8_t reserved1[3];   /* for future use */
-+      uint8_t ovfl_pmd;       /* overflow pmd for this sample */
-+      u64     last_reset_val; /* initial value of overflowed PMD */
-+      unsigned long ip;       /* where did the overflow interrupt happened */
-+      u64     tstamp;         /* overflow timetamp */
-+      u16     cpu;            /* cpu on which the overfow occured */
-+      u16     set;            /* event set active when overflow ocurred   */
-+      pid_t   tgid;           /* thread group id (for NPTL, this is getpid()) */
-+};
-+
 +#define PFM_DEFAULT_MAX_PMDS          64 /* #pmds supported  */
 +#define PFM_DEFAULT_MAX_ENTRY_SIZE    (sizeof(struct pfm_default_smpl_entry)+\
 +                                       (sizeof(u64)*PFM_DEFAULT_MAX_PMDS))
@@ -22032,9 +22030,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_default_smpl.h linux-2.6.2
  
 -#endif /* __PERFMON_DEFAULT_SMPL_H__ */
 +#endif /* __ASM_IA64_PERFMON_DEFAULT_SMPL_H__ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/perfmon_kern.h   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/include/asm/perfmon_kern.h     Wed May 06 16:55:58 2009 +0100
 @@ -0,0 +1,351 @@
 +/*
 + * Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.
@@ -22387,9 +22385,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/perfmon_kern.h linux-2.6.27.19-5.1
 +
 +#endif /* __KERNEL__ */
 +#endif /* _ASM_IA64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/ia64/include/asm/processor.h linux-2.6.27.19-5.1/arch/ia64/include/asm/processor.h
---- linux-2.6.27/arch/ia64/include/asm/processor.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/processor.h      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/processor.h
+--- a/arch/ia64/include/asm/processor.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/processor.h        Wed May 06 16:56:00 2009 +0100
 @@ -42,7 +42,6 @@
  
  #define IA64_THREAD_FPH_VALID (__IA64_UL(1) << 0)     /* floating-point high state valid? */
@@ -22398,7 +22396,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/processor.h linux-2.6.27.19-5.1/ar
  #define IA64_THREAD_UAC_NOPRINT       (__IA64_UL(1) << 3)     /* don't log unaligned accesses */
  #define IA64_THREAD_UAC_SIGBUS        (__IA64_UL(1) << 4)     /* generate SIGBUS on unaligned acc. */
  #define IA64_THREAD_MIGRATION (__IA64_UL(1) << 5)     /* require migration
-@@ -321,14 +320,6 @@ struct thread_struct {
+@@ -321,14 +320,6 @@
  #else
  # define INIT_THREAD_IA32
  #endif /* CONFIG_IA32_SUPPORT */
@@ -22413,7 +22411,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/processor.h linux-2.6.27.19-5.1/ar
        __u64 dbr[IA64_NUM_DBG_REGS];
        __u64 ibr[IA64_NUM_DBG_REGS];
        struct ia64_fpreg fph[96];      /* saved/loaded on demand */
-@@ -343,7 +334,6 @@ struct thread_struct {
+@@ -343,7 +334,6 @@
        .task_size =    DEFAULT_TASK_SIZE,                      \
        .last_fph_cpu =  -1,                                    \
        INIT_THREAD_IA32                                        \
@@ -22421,9 +22419,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/processor.h linux-2.6.27.19-5.1/ar
        .dbr =          {0, },                                  \
        .ibr =          {0, },                                  \
        .fph =          {{{{0}}}, }                             \
-diff -purN linux-2.6.27/arch/ia64/include/asm/sn/bte.h linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/bte.h
---- linux-2.6.27/arch/ia64/include/asm/sn/bte.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/bte.h 2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/sn/bte.h
+--- a/arch/ia64/include/asm/sn/bte.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/sn/bte.h   Wed May 06 16:56:00 2009 +0100
 @@ -38,8 +38,8 @@
  
  /* BTE status register only supports 16 bits for length field */
@@ -22435,9 +22433,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/sn/bte.h linux-2.6.27.19-5.1/arch/
  
  
  /* Define hardware */
-diff -purN linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/sn_sal.h
---- linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/sn/sn_sal.h      2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/ia64/include/asm/sn/sn_sal.h
+--- a/arch/ia64/include/asm/sn/sn_sal.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/sn/sn_sal.h        Wed May 06 16:56:01 2009 +0100
 @@ -90,6 +90,8 @@
  #define  SN_SAL_SET_CPU_NUMBER                           0x02000068
  
@@ -22447,7 +22445,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h linux-2.6.27.19-5.1/ar
  
  /*
   * Service-specific constants
-@@ -1185,4 +1187,47 @@ ia64_sn_kernel_launch_event(void)
+@@ -1185,4 +1187,47 @@
        SAL_CALL_NOLOCK(rv, SN_SAL_KERNEL_LAUNCH_EVENT, 0, 0, 0, 0, 0, 0, 0);
        return rv.status;
  }
@@ -22495,10 +22493,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/sn/sn_sal.h linux-2.6.27.19-5.1/ar
 +      return rv.status;
 +}
  #endif /* _ASM_IA64_SN_SN_SAL_H */
-diff -purN linux-2.6.27/arch/ia64/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/ia64/include/asm/spinlock.h
---- linux-2.6.27/arch/ia64/include/asm/spinlock.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/spinlock.h       2009-03-25 16:10:51.000000000 +0000
-@@ -120,6 +120,35 @@ do {                                                                                      \
+diff -r 9608d5473017 arch/ia64/include/asm/spinlock.h
+--- a/arch/ia64/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/spinlock.h Wed May 06 16:56:01 2009 +0100
+@@ -120,6 +120,35 @@
  #define __raw_read_can_lock(rw)               (*(volatile int *)(rw) >= 0)
  #define __raw_write_can_lock(rw)      (*(volatile int *)(rw) == 0)
  
@@ -22534,7 +22532,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/spinlock.h linux-2.6.27.19-5.1/arc
  #define __raw_read_lock(rw)                                                           \
  do {                                                                                  \
        raw_rwlock_t *__read_lock_ptr = (rw);                                           \
-@@ -131,6 +160,8 @@ do {                                                                                       \
+@@ -131,6 +160,8 @@
        }                                                                               \
  } while (0)
  
@@ -22543,7 +22541,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/spinlock.h linux-2.6.27.19-5.1/arc
  #define __raw_read_unlock(rw)                                 \
  do {                                                          \
        raw_rwlock_t *__read_lock_ptr = (rw);                   \
-@@ -138,21 +169,28 @@ do {                                                             \
+@@ -138,20 +169,27 @@
  } while (0)
  
  #ifdef ASM_SUPPORTED
@@ -22569,25 +22567,24 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/spinlock.h linux-2.6.27.19-5.1/arc
 +              :: "r"(rw), "r"(flags), "i"(IA64_PSR_I_BIT)                     \
 +              : "ar.ccv", "p6", "p7", "r2", "r29", "memory");                 \
  } while(0)
-+#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0)
 +
++#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0)
  #define __raw_write_trylock(rw)                                                       \
  ({                                                                            \
-       register long result;                                                   \
-@@ -174,6 +212,8 @@ static inline void __raw_write_unlock(ra
+@@ -173,6 +211,8 @@
+ }
  
  #else /* !ASM_SUPPORTED */
-+#define __raw_write_lock_flags(l, flags) __raw_write_lock(l)
 +
++#define __raw_write_lock_flags(l, flags) __raw_write_lock(l)
  #define __raw_write_lock(l)                                                           \
  ({                                                                                    \
-       __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1);                       \
-diff -purN linux-2.6.27/arch/ia64/include/asm/system.h linux-2.6.27.19-5.1/arch/ia64/include/asm/system.h
---- linux-2.6.27/arch/ia64/include/asm/system.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/system.h 2009-03-25 16:10:50.000000000 +0000
-@@ -217,6 +217,7 @@ struct task_struct;
+diff -r 9608d5473017 arch/ia64/include/asm/system.h
+--- a/arch/ia64/include/asm/system.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/system.h   Wed May 06 16:56:01 2009 +0100
+@@ -217,6 +217,7 @@
  extern void ia64_save_extra (struct task_struct *task);
  extern void ia64_load_extra (struct task_struct *task);
  
@@ -22595,7 +22592,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/system.h linux-2.6.27.19-5.1/arch/
  #ifdef CONFIG_VIRT_CPU_ACCOUNTING
  extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next);
  # define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n)
-@@ -224,16 +225,9 @@ extern void ia64_account_on_switch (stru
+@@ -224,16 +225,9 @@
  # define IA64_ACCOUNT_ON_SWITCH(p,n)
  #endif
  
@@ -22615,7 +22612,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/system.h linux-2.6.27.19-5.1/arch/
  
  #define __switch_to(prev,next,last) do {                                                       \
        IA64_ACCOUNT_ON_SWITCH(prev, next);                                                      \
-@@ -241,6 +235,10 @@ extern void ia64_account_on_switch (stru
+@@ -241,6 +235,10 @@
                ia64_save_extra(prev);                                                           \
        if (IA64_HAS_EXTRA_STATE(next))                                                          \
                ia64_load_extra(next);                                                           \
@@ -22626,10 +22623,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/system.h linux-2.6.27.19-5.1/arch/
        ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next);                      \
        (last) = ia64_switch_to((next));                                                         \
  } while (0)
-diff -purN linux-2.6.27/arch/ia64/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/ia64/include/asm/thread_info.h
---- linux-2.6.27/arch/ia64/include/asm/thread_info.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/thread_info.h    2009-03-25 16:10:51.000000000 +0000
-@@ -110,6 +110,8 @@ extern void tsk_clear_notify_resume(stru
+diff -r 9608d5473017 arch/ia64/include/asm/thread_info.h
+--- a/arch/ia64/include/asm/thread_info.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/thread_info.h      Wed May 06 16:56:01 2009 +0100
+@@ -110,6 +110,8 @@
  #define TIF_DB_DISABLED               19      /* debug trap disabled for fsyscall */
  #define TIF_FREEZE            20      /* is freezing for suspend */
  #define TIF_RESTORE_RSE               21      /* user RBS is newer than kernel RBS */
@@ -22638,7 +22635,7 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/thread_info.h linux-2.6.27.19-5.1/
  
  #define _TIF_SYSCALL_TRACE    (1 << TIF_SYSCALL_TRACE)
  #define _TIF_SYSCALL_AUDIT    (1 << TIF_SYSCALL_AUDIT)
-@@ -123,6 +125,8 @@ extern void tsk_clear_notify_resume(stru
+@@ -123,6 +125,8 @@
  #define _TIF_DB_DISABLED      (1 << TIF_DB_DISABLED)
  #define _TIF_FREEZE           (1 << TIF_FREEZE)
  #define _TIF_RESTORE_RSE      (1 << TIF_RESTORE_RSE)
@@ -22647,10 +22644,10 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/thread_info.h linux-2.6.27.19-5.1/
  
  /* "work to do on user-return" bits */
  #define TIF_ALLWORK_MASK      (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\
-diff -purN linux-2.6.27/arch/ia64/include/asm/unistd.h linux-2.6.27.19-5.1/arch/ia64/include/asm/unistd.h
---- linux-2.6.27/arch/ia64/include/asm/unistd.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/include/asm/unistd.h 2009-03-25 16:10:50.000000000 +0000
-@@ -363,7 +363,7 @@ struct pt_regs;
+diff -r 9608d5473017 arch/ia64/include/asm/unistd.h
+--- a/arch/ia64/include/asm/unistd.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/include/asm/unistd.h   Wed May 06 16:56:01 2009 +0100
+@@ -363,7 +363,7 @@
  struct sigaction;
  long sys_execve(char __user *filename, char __user * __user *argv,
                           char __user * __user *envp, struct pt_regs *regs);
@@ -22659,9 +22656,9 @@ diff -purN linux-2.6.27/arch/ia64/include/asm/unistd.h linux-2.6.27.19-5.1/arch/
  asmlinkage long sys_rt_sigaction(int sig,
                                 const struct sigaction __user *act,
                                 struct sigaction __user *oact,
-diff -purN linux-2.6.27/arch/ia64/kdb/ChangeLog linux-2.6.27.19-5.1/arch/ia64/kdb/ChangeLog
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ChangeLog        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ChangeLog
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ChangeLog  Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,1085 @@
 +2008-09-30 Jay Lan  <jlan@sgi.com>
 +
@@ -23748,9 +23745,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ChangeLog linux-2.6.27.19-5.1/arch/ia64/kd
 +2002-01-07 Keith Owens  <kaos@sgi.com>
 +
 +      * Split kdb for ia64 as kdb v2.0-2.4.17-ia64-011226-1.
-diff -purN linux-2.6.27/arch/ia64/kdb/Makefile linux-2.6.27.19-5.1/arch/ia64/kdb/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/Makefile 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/Makefile   Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,21 @@
 +#
 +# This file is subject to the terms and conditions of the GNU General Public
@@ -23773,9 +23770,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/Makefile linux-2.6.27.19-5.1/arch/ia64/kdb
 +AFLAGS_kdba_jmp.o += $(AFLAGS_KERNEL)
 +
 +USE_STANDARD_AS_RULE  := true
-diff -purN linux-2.6.27/arch/ia64/kdb/cpu-ia64-opc.c linux-2.6.27.19-5.1/arch/ia64/kdb/cpu-ia64-opc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/cpu-ia64-opc.c   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/cpu-ia64-opc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/cpu-ia64-opc.c     Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,598 @@
 +/* Copyright 1998, 1999, 2000, 2001, 2002, 2003
 +   Free Software Foundation, Inc.
@@ -24375,9 +24372,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/cpu-ia64-opc.c linux-2.6.27.19-5.1/arch/ia
 +    { ABS, ins_const, ext_const, 0, {{0, 0}}, 0,              /* LDXMOV */
 +      "ldxmov target" },
 +  };
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.c    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-asmtab.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-asmtab.c      Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,8585 @@
 +/* This file is automatically generated by ia64-gen.  Do not edit!  */
 +
@@ -32964,9 +32961,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.c linux-2.6.27.19-5.1/arch/ia6
 +{ 0x1, 0, 0, 2671 },
 +};
 +
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-asmtab.h    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-asmtab.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-asmtab.h      Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,158 @@
 +/* ia64-asmtab.h -- Header for compacted IA-64 opcode tables.
 +   Copyright 1999, 2000 Free Software Foundation, Inc.
@@ -33126,9 +33123,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64-asmtab.h linux-2.6.27.19-5.1/arch/ia6
 +};
 +
 +#endif
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-dis.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-dis.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-dis.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-dis.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-dis.c Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,312 @@
 +/* ia64-dis.c -- Disassemble ia64 instructions
 +   Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
@@ -33442,9 +33439,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64-dis.c linux-2.6.27.19-5.1/arch/ia64/k
 +  (*info->fprintf_func) (info->stream, "      data8 %#011llx", (long long) insn);
 +  goto failed;
 +}
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.c linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-opc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-opc.c Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,749 @@
 +/* ia64-opc.c -- Functions to access the compacted opcode table
 +   Copyright 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
@@ -34195,9 +34192,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.c linux-2.6.27.19-5.1/arch/ia64/k
 +
 +  return &dependencies[index];
 +}
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64-opc.h       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64-opc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64-opc.h Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,141 @@
 +/* ia64-opc.h -- IA-64 opcode table.
 +   Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
@@ -34340,9 +34337,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64-opc.h linux-2.6.27.19-5.1/arch/ia64/k
 +#define TGT64   IA64_OPND_TGT64
 +
 +#endif
-diff -purN linux-2.6.27/arch/ia64/kdb/ia64.h linux-2.6.27.19-5.1/arch/ia64/kdb/ia64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/ia64.h   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/ia64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/ia64.h     Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,402 @@
 +/* ia64.h -- Header file for ia64 opcode table
 +   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
@@ -34746,9 +34743,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/ia64.h linux-2.6.27.19-5.1/arch/ia64/kdb/i
 +extern const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT];
 +
 +#endif /* opcode_ia64_h */
-diff -purN linux-2.6.27/arch/ia64/kdb/kdb_cmds linux-2.6.27.19-5.1/arch/ia64/kdb/kdb_cmds
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdb_cmds 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdb_cmds
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdb_cmds   Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,17 @@
 +# Standard architecture specific commands for kdb.
 +# These commands are appended to those in kdb/kdb_cmds, see that file for
@@ -34767,9 +34764,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdb_cmds linux-2.6.27.19-5.1/arch/ia64/kdb
 +  -dmesg 600
 +  -bt
 +endefcmd
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bp.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bp.c        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_bp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_bp.c  Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,841 @@
 +/*
 + * Kernel Debugger Architecture Dependent Breakpoint Handling
@@ -35612,9 +35609,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bp.c linux-2.6.27.19-5.1/arch/ia64/kd
 +      }
 +      return(0);
 +}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_bt.c        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_bt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_bt.c  Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,285 @@
 +/*
 + * Kernel Debugger Architecture Dependent Stack Traceback
@@ -35901,9 +35898,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/ia64/kd
 +{
 +      return kdba_bt_stack(argcount, p);
 +}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_fru.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_fru.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_fru.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_fru.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_fru.c Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,65 @@
 +/*
 + * Kernel Debugger Architecture Dependent FRU functions.
@@ -35970,9 +35967,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_fru.c linux-2.6.27.19-5.1/arch/ia64/k
 +
 +module_init(kdba_fru_init)
 +module_exit(kdba_fru_exit)
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_id.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_id.c        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_id.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_id.c  Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,529 @@
 +/*
 + * Kernel Debugger Architecture Dependent Instruction Disassembly
@@ -36503,9 +36500,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/ia64/kd
 +
 +      dip->display_endian         = BFD_ENDIAN_LITTLE;
 +}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_io.c        2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_io.c  Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,661 @@
 +/*
 + * Kernel Debugger Architecture Dependent Console I/O handler
@@ -37168,9 +37165,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/ia64/kd
 +
 +void kdba_local_arch_setup(void) {}
 +void kdba_local_arch_cleanup(void) {}
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_jmp.S linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_jmp.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_jmp.S       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_jmp.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_jmp.S Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,394 @@
 +/*
 + * Kernel Debugger Architecture Dependent Longjump Support.
@@ -37566,9 +37563,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_jmp.S linux-2.6.27.19-5.1/arch/ia64/k
 +#else /* __KERNEL__ */
 +END(kdba_longjmp)
 +#endif        /* !_KERNEL__ */
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_pod.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_pod.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_pod.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_pod.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_pod.c Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,64 @@
 +/*
 + * Kernel Debugger Architecture Dependent POD functions.
@@ -37634,9 +37631,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_pod.c linux-2.6.27.19-5.1/arch/ia64/k
 +
 +module_init(kdba_pod_init)
 +module_exit(kdba_pod_exit)
-diff -purN linux-2.6.27/arch/ia64/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_support.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kdb/kdba_support.c   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kdb/kdba_support.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kdb/kdba_support.c     Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,1720 @@
 +/*
 + * Kernel Debugger Architecture Independent Support Functions
@@ -39358,9 +39355,9 @@ diff -purN linux-2.6.27/arch/ia64/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/ia
 +      }
 +}
 +#endif
-diff -purN linux-2.6.27/arch/ia64/kernel/Makefile linux-2.6.27.19-5.1/arch/ia64/kernel/Makefile
---- linux-2.6.27/arch/ia64/kernel/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/Makefile      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/Makefile
+--- a/arch/ia64/kernel/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/Makefile        Wed May 06 16:56:01 2009 +0100
 @@ -5,7 +5,7 @@
  extra-y       := head.o init_task.o vmlinux.lds
  
@@ -39370,7 +39367,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/Makefile linux-2.6.27.19-5.1/arch/ia64/
         salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
         unwind.o mca.o mca_asm.o topology.o
  
-@@ -23,10 +23,10 @@ obj-$(CONFIG_IOSAPIC)              += iosapic.o
+@@ -23,10 +23,10 @@
  obj-$(CONFIG_MODULES)         += module.o
  obj-$(CONFIG_SMP)             += smp.o smpboot.o
  obj-$(CONFIG_NUMA)            += numa.o
@@ -39382,7 +39379,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/Makefile linux-2.6.27.19-5.1/arch/ia64/
  obj-$(CONFIG_KPROBES)         += kprobes.o jprobes.o
  obj-$(CONFIG_KEXEC)           += machine_kexec.o relocate_kernel.o crash.o
  obj-$(CONFIG_CRASH_DUMP)      += crash_dump.o
-@@ -96,15 +96,15 @@ endef
+@@ -96,15 +96,15 @@
  
  # We use internal kbuild rules to avoid the "is up to date" message from make
  arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \
@@ -39401,10 +39398,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/Makefile linux-2.6.27.19-5.1/arch/ia64/
  
  #
  # native ivt.S and entry.S
-diff -purN linux-2.6.27/arch/ia64/kernel/acpi.c linux-2.6.27.19-5.1/arch/ia64/kernel/acpi.c
---- linux-2.6.27/arch/ia64/kernel/acpi.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/acpi.c        2009-03-25 16:10:50.000000000 +0000
-@@ -656,6 +656,30 @@ static int __init acpi_parse_fadt(struct
+diff -r 9608d5473017 arch/ia64/kernel/acpi.c
+--- a/arch/ia64/kernel/acpi.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/acpi.c  Wed May 06 16:56:01 2009 +0100
+@@ -656,6 +656,30 @@
        return 0;
  }
  
@@ -39435,21 +39432,21 @@ diff -purN linux-2.6.27/arch/ia64/kernel/acpi.c linux-2.6.27.19-5.1/arch/ia64/ke
  int __init acpi_boot_init(void)
  {
  
-@@ -679,11 +703,6 @@ int __init acpi_boot_init(void)
+@@ -678,11 +702,6 @@
+           (ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, acpi_parse_lapic_addr_ovr, 0) < 0)
                printk(KERN_ERR PREFIX
                       "Error parsing LAPIC address override entry\n");
+-
 -      if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, acpi_parse_lsapic, NR_CPUS)
 -          < 1)
 -              printk(KERN_ERR PREFIX
 -                     "Error parsing MADT - no LAPIC entries\n");
--
        if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0)
            < 0)
-               printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
-diff -purN linux-2.6.27/arch/ia64/kernel/cpe_migrate.c linux-2.6.27.19-5.1/arch/ia64/kernel/cpe_migrate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/cpe_migrate.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/cpe_migrate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/kernel/cpe_migrate.c   Wed May 06 16:56:01 2009 +0100
 @@ -0,0 +1,474 @@
 +/*
 + * File:      cpe_migrate.c
@@ -39925,10 +39922,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/cpe_migrate.c linux-2.6.27.19-5.1/arch/
 +MODULE_AUTHOR("Russ Anderson <rja@sgi.com>");
 +MODULE_DESCRIPTION("ia64 Corrected Error page migration driver");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/arch/ia64/kernel/entry.S linux-2.6.27.19-5.1/arch/ia64/kernel/entry.S
---- linux-2.6.27/arch/ia64/kernel/entry.S      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/entry.S       2009-03-25 16:10:50.000000000 +0000
-@@ -1436,7 +1436,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/ia64/kernel/entry.S
+--- a/arch/ia64/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/entry.S Wed May 06 16:56:01 2009 +0100
+@@ -1436,7 +1436,7 @@
        data8 sys_mkdir                         // 1055
        data8 sys_rmdir
        data8 sys_dup
@@ -39937,10 +39934,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/entry.S linux-2.6.27.19-5.1/arch/ia64/k
        data8 sys_times
        data8 ia64_brk                          // 1060
        data8 sys_setgid
-diff -purN linux-2.6.27/arch/ia64/kernel/head.S linux-2.6.27.19-5.1/arch/ia64/kernel/head.S
---- linux-2.6.27/arch/ia64/kernel/head.S       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/head.S        2009-03-25 16:10:50.000000000 +0000
-@@ -259,8 +259,13 @@ start_ap:
+diff -r 9608d5473017 arch/ia64/kernel/head.S
+--- a/arch/ia64/kernel/head.S  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/head.S  Wed May 06 16:56:01 2009 +0100
+@@ -259,8 +259,13 @@
        /*
         * Switch into virtual mode:
         */
@@ -39955,21 +39952,21 @@ diff -purN linux-2.6.27/arch/ia64/kernel/head.S linux-2.6.27.19-5.1/arch/ia64/ke
        ;;
        mov cr.ipsr=r16
        movl r17=1f
-diff -purN linux-2.6.27/arch/ia64/kernel/irq_ia64.c linux-2.6.27.19-5.1/arch/ia64/kernel/irq_ia64.c
---- linux-2.6.27/arch/ia64/kernel/irq_ia64.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/irq_ia64.c    2009-03-25 16:10:50.000000000 +0000
-@@ -40,10 +40,6 @@
+diff -r 9608d5473017 arch/ia64/kernel/irq_ia64.c
+--- a/arch/ia64/kernel/irq_ia64.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/irq_ia64.c      Wed May 06 16:56:01 2009 +0100
+@@ -39,10 +39,6 @@
+ #include <asm/pgtable.h>
  #include <asm/system.h>
  #include <asm/tlbflush.h>
+-
 -#ifdef CONFIG_PERFMON
 -# include <asm/perfmon.h>
 -#endif
--
  #define IRQ_DEBUG     0
  
- #define IRQ_VECTOR_UNASSIGNED (0)
-@@ -660,9 +656,6 @@ init_IRQ (void)
+@@ -660,9 +656,6 @@
        }
  #endif
  #endif
@@ -39979,9 +39976,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/irq_ia64.c linux-2.6.27.19-5.1/arch/ia6
        platform_irq_init();
  }
  
-diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/kernel/mca.c
---- linux-2.6.27/arch/ia64/kernel/mca.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/mca.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/mca.c
+--- a/arch/ia64/kernel/mca.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/mca.c   Wed May 06 16:56:01 2009 +0100
 @@ -68,6 +68,9 @@
   *
   * 2007-04-27 Russ Anderson <rja@sgi.com>
@@ -40003,7 +40000,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
  #include <asm/delay.h>
  #include <asm/machvec.h>
-@@ -163,7 +170,14 @@ static int cmc_polling_enabled = 1;
+@@ -163,7 +170,14 @@
   * but encounters problems retrieving CPE logs.  This should only be
   * necessary for debugging.
   */
@@ -40019,7 +40016,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
  extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe);
  
-@@ -523,6 +537,28 @@ int mca_recover_range(unsigned long addr
+@@ -523,6 +537,28 @@
  }
  EXPORT_SYMBOL_GPL(mca_recover_range);
  
@@ -40048,7 +40045,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  #ifdef CONFIG_ACPI
  
  int cpe_vector = -1;
-@@ -534,6 +570,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, v
+@@ -534,6 +570,7 @@
        static unsigned long    cpe_history[CPE_HISTORY_LENGTH];
        static int              index;
        static DEFINE_SPINLOCK(cpe_history_lock);
@@ -40056,7 +40053,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
        IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
                       __func__, cpe_irq, smp_processor_id());
-@@ -580,6 +617,8 @@ ia64_mca_cpe_int_handler (int cpe_irq, v
+@@ -580,6 +617,8 @@
  out:
        /* Get the CPE error record and log it */
        ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CPE);
@@ -40065,10 +40062,11 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
        return IRQ_HANDLED;
  }
-@@ -789,6 +828,14 @@ ia64_mca_rendez_int_handler(int rendez_i
+@@ -788,6 +827,14 @@
+        * reached SAL
         */
        ia64_sal_mc_rendez();
++
 +#ifdef CONFIG_KDB
 +      /* We get here when the MCA monarch has entered and has woken up the
 +       * slaves.  Do a KDB rendezvous to meet the monarch cpu.
@@ -40076,11 +40074,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
 +      if (monarch_cpu != -1)
 +              KDB_ENTER_SLAVE();
 +#endif
-+
        NOTIFY_MCA(DIE_MCA_RENDZVOUS_PROCESS, get_irq_regs(), (long)&nd, 1);
  
-       /* Wait for the monarch cpu to exit. */
-@@ -1326,6 +1373,19 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1326,6 +1373,19 @@
                mca_insert_tr(0x2); /*Reload dynamic itrs*/
        }
  
@@ -40100,7 +40097,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
        NOTIFY_MCA(DIE_MCA_MONARCH_LEAVE, regs, (long)&nd, 1);
  
        if (atomic_dec_return(&mca_count) > 0) {
-@@ -1338,6 +1398,12 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1338,6 +1398,12 @@
                        if (cpu_isset(i, mca_cpu)) {
                                monarch_cpu = i;
                                cpu_clear(i, mca_cpu);  /* wake next cpu */
@@ -40113,7 +40110,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
                                while (monarch_cpu != -1)
                                        cpu_relax();    /* spin until last cpu leaves */
                                set_curr_task(cpu, previous_current);
-@@ -1347,6 +1413,7 @@ ia64_mca_handler(struct pt_regs *regs, s
+@@ -1347,6 +1413,7 @@
                        }
                }
        }
@@ -40121,7 +40118,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
        set_curr_task(cpu, previous_current);
        ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
        monarch_cpu = -1;       /* This frees the slaves and previous monarchs */
-@@ -1607,6 +1674,11 @@ default_monarch_init_process(struct noti
+@@ -1607,6 +1674,11 @@
                }
        }
        printk("\n\n");
@@ -40133,7 +40130,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
        if (read_trylock(&tasklist_lock)) {
                do_each_thread (g, t) {
                        printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
-@@ -1614,6 +1686,7 @@ default_monarch_init_process(struct noti
+@@ -1614,6 +1686,7 @@
                } while_each_thread (g, t);
                read_unlock(&tasklist_lock);
        }
@@ -40141,7 +40138,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
        /* FIXME: This will not restore zapped printk locks. */
        RESTORE_LOGLEVEL(console_loglevel);
        return NOTIFY_DONE;
-@@ -1646,6 +1719,20 @@ ia64_init_handler(struct pt_regs *regs, 
+@@ -1646,6 +1719,20 @@
        int cpu = smp_processor_id();
        struct ia64_mca_notify_die nd =
                { .sos = sos, .monarch_cpu = &monarch_cpu };
@@ -40162,7 +40159,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
        NOTIFY_INIT(DIE_INIT_ENTER, regs, (long)&nd, 0);
  
-@@ -1684,6 +1771,11 @@ ia64_init_handler(struct pt_regs *regs, 
+@@ -1684,6 +1771,11 @@
                ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT;
                while (monarch_cpu == -1)
                       cpu_relax();     /* spin until monarch enters */
@@ -40174,7 +40171,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
  
                NOTIFY_INIT(DIE_INIT_SLAVE_ENTER, regs, (long)&nd, 1);
                NOTIFY_INIT(DIE_INIT_SLAVE_PROCESS, regs, (long)&nd, 1);
-@@ -1712,6 +1804,14 @@ ia64_init_handler(struct pt_regs *regs, 
+@@ -1712,6 +1804,14 @@
        mprintk("Delaying for 5 seconds...\n");
        udelay(5*1000000);
        ia64_wait_for_slaves(cpu, "INIT");
@@ -40189,7 +40186,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
        /* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
         * to default_monarch_init_process() above and just print all the
         * tasks.
-@@ -1950,6 +2050,13 @@ ia64_mca_init(void)
+@@ -1950,6 +2050,13 @@
                        printk(KERN_INFO "Increasing MCA rendezvous timeout from "
                                "%ld to %ld milliseconds\n", timeout, isrv.v0);
                        timeout = isrv.v0;
@@ -40203,9 +40200,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/mca.c linux-2.6.27.19-5.1/arch/ia64/ker
                        NOTIFY_MCA(DIE_MCA_NEW_TIMEOUT, NULL, timeout, 0);
                        continue;
                }
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_default_smpl.c linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_default_smpl.c
---- linux-2.6.27/arch/ia64/kernel/perfmon_default_smpl.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_default_smpl.c        1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_default_smpl.c
+--- a/arch/ia64/kernel/perfmon_default_smpl.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_default_smpl.c  Wed May 06 16:56:01 2009 +0100
 @@ -1,296 +0,0 @@
 -/*
 - * Copyright (C) 2002-2003 Hewlett-Packard Co
@@ -40503,9 +40500,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_default_smpl.c linux-2.6.27.19-
 -module_init(pfm_default_smpl_init_module);
 -module_exit(pfm_default_smpl_cleanup_module);
 -
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_generic.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_generic.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_generic.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_generic.h     1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_generic.h
+--- a/arch/ia64/kernel/perfmon_generic.h       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_generic.h       Wed May 06 16:56:01 2009 +0100
 @@ -1,45 +0,0 @@
 -/*
 - * This file contains the generic PMU register description tables
@@ -40552,9 +40549,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_generic.h linux-2.6.27.19-5.1/a
 -      .pmc_desc   = pfm_gen_pmc_desc
 -};
 -
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_itanium.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_itanium.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_itanium.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_itanium.h     1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_itanium.h
+--- a/arch/ia64/kernel/perfmon_itanium.h       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_itanium.h       Wed May 06 16:56:01 2009 +0100
 @@ -1,115 +0,0 @@
 -/*
 - * This file contains the Itanium PMU register description tables
@@ -40671,9 +40668,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_itanium.h linux-2.6.27.19-5.1/a
 -};
 -
 -
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_mckinley.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_mckinley.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_mckinley.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_mckinley.h    1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_mckinley.h
+--- a/arch/ia64/kernel/perfmon_mckinley.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_mckinley.h      Wed May 06 16:56:01 2009 +0100
 @@ -1,187 +0,0 @@
 -/*
 - * This file contains the McKinley PMU register description tables
@@ -40862,9 +40859,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_mckinley.h linux-2.6.27.19-5.1/
 -};
 -
 -
-diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_montecito.h linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_montecito.h
---- linux-2.6.27/arch/ia64/kernel/perfmon_montecito.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/perfmon_montecito.h   1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 arch/ia64/kernel/perfmon_montecito.h
+--- a/arch/ia64/kernel/perfmon_montecito.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/perfmon_montecito.h     Wed May 06 16:56:01 2009 +0100
 @@ -1,269 +0,0 @@
 -/*
 - * This file contains the Montecito PMU register description tables
@@ -41135,9 +41132,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/perfmon_montecito.h linux-2.6.27.19-5.1
 -      .num_dbrs        = 8,
 -      .use_rr_dbregs   = 1 /* debug register are use for range retrictions */
 -};
-diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64/kernel/process.c
---- linux-2.6.27/arch/ia64/kernel/process.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/process.c     2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/process.c
+--- a/arch/ia64/kernel/process.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/process.c       Wed May 06 16:56:01 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/delay.h>
  #include <linux/kdebug.h>
@@ -41146,18 +41143,18 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
  
  #include <asm/cpu.h>
  #include <asm/delay.h>
-@@ -45,10 +46,6 @@
+@@ -44,10 +45,6 @@
+ #include <asm/user.h>
  
  #include "entry.h"
+-
 -#ifdef CONFIG_PERFMON
 -# include <asm/perfmon.h>
 -#endif
--
  #include "sigframe.h"
  
- void (*ia64_mark_idle)(int);
-@@ -162,10 +159,8 @@ show_regs (struct pt_regs *regs)
+@@ -162,10 +159,8 @@
  
  void tsk_clear_notify_resume(struct task_struct *tsk)
  {
@@ -41169,7 +41166,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
        if (test_ti_thread_flag(task_thread_info(tsk), TIF_RESTORE_RSE))
                return;
        clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME);
-@@ -188,14 +183,9 @@ do_notify_resume_user(sigset_t *unused, 
+@@ -188,14 +183,9 @@
                return;
        }
  
@@ -41187,7 +41184,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
  
        /* deal with pending signal delivery */
        if (test_thread_flag(TIF_SIGPENDING)) {
-@@ -212,22 +202,15 @@ do_notify_resume_user(sigset_t *unused, 
+@@ -212,21 +202,14 @@
        local_irq_disable();    /* force interrupt disable */
  }
  
@@ -41201,17 +41198,16 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
        return 1;
  }
  __setup("nohalt", nohalt_setup);
+-
 -void
 -update_pal_halt_status(int status)
 -{
 -      can_do_pal_halt = pal_halt && status;
 -}
--
  /*
   * We use this if we don't have any better idle routine..
-  */
-@@ -236,6 +219,22 @@ default_idle (void)
+@@ -236,6 +219,22 @@
  {
        local_irq_enable();
        while (!need_resched()) {
@@ -41234,7 +41230,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
                if (can_do_pal_halt) {
                        local_irq_disable();
                        if (!need_resched()) {
-@@ -244,6 +243,12 @@ default_idle (void)
+@@ -244,6 +243,12 @@
                        local_irq_enable();
                } else
                        cpu_relax();
@@ -41247,7 +41243,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
        }
  }
  
-@@ -344,22 +349,9 @@ cpu_idle (void)
+@@ -344,21 +349,8 @@
  void
  ia64_save_extra (struct task_struct *task)
  {
@@ -41257,7 +41253,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
 -
        if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
                ia64_save_debug_regs(&task->thread.dbr[0]);
+-
 -#ifdef CONFIG_PERFMON
 -      if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
 -              pfm_save_regs(task);
@@ -41266,11 +41262,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
 -      if (info & PFM_CPUINFO_SYST_WIDE)
 -              pfm_syst_wide_update_task(task, info, 0);
 -#endif
--
  #ifdef CONFIG_IA32_SUPPORT
        if (IS_IA32_PROCESS(task_pt_regs(task)))
-               ia32_save_state(task);
-@@ -369,22 +361,9 @@ ia64_save_extra (struct task_struct *tas
+@@ -369,21 +361,8 @@
  void
  ia64_load_extra (struct task_struct *task)
  {
@@ -41280,7 +41275,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
 -
        if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
                ia64_load_debug_regs(&task->thread.dbr[0]);
+-
 -#ifdef CONFIG_PERFMON
 -      if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
 -              pfm_load_regs(task);
@@ -41289,11 +41284,10 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
 -      if (info & PFM_CPUINFO_SYST_WIDE) 
 -              pfm_syst_wide_update_task(task, info, 1);
 -#endif
--
  #ifdef CONFIG_IA32_SUPPORT
        if (IS_IA32_PROCESS(task_pt_regs(task)))
-               ia32_load_state(task);
-@@ -510,8 +489,7 @@ copy_thread (int nr, unsigned long clone
+@@ -510,8 +489,7 @@
         * call behavior where scratch registers are preserved across
         * system calls (unless used by the system call itself).
         */
@@ -41303,7 +41297,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
  #     define THREAD_FLAGS_TO_SET      0
        p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR)
                           | THREAD_FLAGS_TO_SET);
-@@ -533,10 +511,8 @@ copy_thread (int nr, unsigned long clone
+@@ -533,10 +511,8 @@
        }
  #endif
  
@@ -41316,7 +41310,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
        return retval;
  }
  
-@@ -745,15 +721,13 @@ exit_thread (void)
+@@ -745,15 +721,13 @@
  {
  
        ia64_drop_fpu(current);
@@ -41337,9 +41331,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/process.c linux-2.6.27.19-5.1/arch/ia64
        if (IS_IA32_PROCESS(task_pt_regs(current)))
                ia32_drop_ia64_partial_page_list(current);
  }
-diff -purN linux-2.6.27/arch/ia64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/ia64/kernel/ptrace.c
---- linux-2.6.27/arch/ia64/kernel/ptrace.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/ptrace.c      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/ptrace.c
+--- a/arch/ia64/kernel/ptrace.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/ptrace.c        Wed May 06 16:56:01 2009 +0100
 @@ -20,6 +20,7 @@
  #include <linux/security.h>
  #include <linux/audit.h>
@@ -41358,7 +41352,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/ia64/
  
  #include "entry.h"
  
-@@ -2124,7 +2122,6 @@ access_uarea(struct task_struct *child, 
+@@ -2124,7 +2122,6 @@
                                "address 0x%lx\n", addr);
                return -1;
        }
@@ -41366,7 +41360,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/ia64/
        /*
         * Check if debug registers are used by perfmon. This
         * test must be done once we know that we can do the
-@@ -2142,9 +2139,8 @@ access_uarea(struct task_struct *child, 
+@@ -2142,9 +2139,8 @@
         * IA64_THREAD_DBG_VALID. The registers are restored
         * by the PMU context switch code.
         */
@@ -41377,9 +41371,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/ia64/
  
        if (!(child->thread.flags & IA64_THREAD_DBG_VALID)) {
                child->thread.flags |= IA64_THREAD_DBG_VALID;
-diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/kernel/setup.c
---- linux-2.6.27/arch/ia64/kernel/setup.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/setup.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/setup.c
+--- a/arch/ia64/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/setup.c Wed May 06 16:56:01 2009 +0100
 @@ -45,6 +45,7 @@
  #include <linux/cpufreq.h>
  #include <linux/kexec.h>
@@ -41388,7 +41382,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/k
  
  #include <asm/ia32.h>
  #include <asm/machvec.h>
-@@ -549,8 +550,12 @@ setup_arch (char **cmdline_p)
+@@ -549,8 +550,12 @@
  #ifdef CONFIG_ACPI
        /* Initialize the ACPI boot-time table parser */
        acpi_table_init();
@@ -41401,7 +41395,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/k
        per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
                32 : cpus_weight(early_cpu_possible_map)),
                additional_cpus > 0 ? additional_cpus : 0);
-@@ -841,9 +846,6 @@ void __init
+@@ -841,9 +846,6 @@
  setup_per_cpu_areas (void)
  {
        /* start_kernel() requires this... */
@@ -41411,7 +41405,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/k
  }
  
  /*
-@@ -1051,6 +1053,8 @@ cpu_init (void)
+@@ -1051,6 +1053,8 @@
        }
        platform_cpu_init();
        pm_idle = default_idle;
@@ -41420,9 +41414,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/k
  }
  
  void __init
-diff -purN linux-2.6.27/arch/ia64/kernel/smp.c linux-2.6.27.19-5.1/arch/ia64/kernel/smp.c
---- linux-2.6.27/arch/ia64/kernel/smp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/smp.c 2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/smp.c
+--- a/arch/ia64/kernel/smp.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/smp.c   Wed May 06 16:56:01 2009 +0100
 @@ -36,6 +36,11 @@
  #include <asm/current.h>
  #include <asm/delay.h>
@@ -41435,7 +41429,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smp.c linux-2.6.27.19-5.1/arch/ia64/ker
  #include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/page.h>
-@@ -64,6 +69,9 @@ static DEFINE_PER_CPU(unsigned short, sh
+@@ -64,6 +69,9 @@
  #define IPI_CPU_STOP          1
  #define IPI_CALL_FUNC_SINGLE  2
  #define IPI_KDUMP_CPU_STOP    3
@@ -41445,20 +41439,20 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smp.c linux-2.6.27.19-5.1/arch/ia64/ker
  
  /* This needs to be cacheline aligned because it is written to by *other* CPUs.  */
  static DEFINE_PER_CPU_SHARED_ALIGNED(u64, ipi_operation);
-@@ -124,6 +132,12 @@ handle_IPI (int irq, void *dev_id)
+@@ -122,6 +130,12 @@
+ #ifdef CONFIG_KEXEC
+                       case IPI_KDUMP_CPU_STOP:
                                unw_init_running(kdump_cpu_freeze, NULL);
-                               break;
- #endif
++                              break;
++#endif
 +#ifdef CONFIG_KDB
 +                      case IPI_KDB_INTERRUPT:
 +                              if (!kdb_ipi(get_irq_regs(), NULL))
 +                                      printk(KERN_ERR "kdb_ipi() rejected IPI_KDB_INTERRUPT\n");
-+                              break;
-+#endif
+                               break;
+ #endif
                        default:
-                               printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n",
-                                               this_cpu, which);
-@@ -335,3 +349,12 @@ setup_profiling_timer (unsigned int mult
+@@ -335,3 +349,12 @@
  {
        return -EINVAL;
  }
@@ -41471,9 +41465,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smp.c linux-2.6.27.19-5.1/arch/ia64/ker
 +              send_IPI_allbutself(IPI_KDB_INTERRUPT);
 +}
 +#endif        /* CONFIG_KDB */
-diff -purN linux-2.6.27/arch/ia64/kernel/smpboot.c linux-2.6.27.19-5.1/arch/ia64/kernel/smpboot.c
---- linux-2.6.27/arch/ia64/kernel/smpboot.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/smpboot.c     2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/smpboot.c
+--- a/arch/ia64/kernel/smpboot.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/smpboot.c       Wed May 06 16:56:02 2009 +0100
 @@ -39,6 +39,7 @@
  #include <linux/efi.h>
  #include <linux/percpu.h>
@@ -41482,7 +41476,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smpboot.c linux-2.6.27.19-5.1/arch/ia64
  
  #include <asm/atomic.h>
  #include <asm/cache.h>
-@@ -381,10 +382,6 @@ smp_callin (void)
+@@ -381,10 +382,6 @@
        extern void ia64_init_itm(void);
        extern volatile int time_keeper_id;
  
@@ -41493,18 +41487,18 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smpboot.c linux-2.6.27.19-5.1/arch/ia64
        cpuid = smp_processor_id();
        phys_id = hard_smp_processor_id();
        itc_master = time_keeper_id;
-@@ -410,10 +407,6 @@ smp_callin (void)
+@@ -409,10 +406,6 @@
+       smp_setup_percpu_timer();
  
        ia64_mca_cmc_vector_setup();    /* Setup vector on AP */
+-
 -#ifdef CONFIG_PERFMON
 -      pfm_init_percpu();
 -#endif
--
        local_irq_enable();
  
-       if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
-@@ -741,16 +734,15 @@ int __cpu_disable(void)
+@@ -741,16 +734,15 @@
                        return -EBUSY;
        }
  
@@ -41516,19 +41510,19 @@ diff -purN linux-2.6.27/arch/ia64/kernel/smpboot.c linux-2.6.27.19-5.1/arch/ia64
 +              return -EBUSY;
  
        remove_siblinginfo(cpu);
--      fixup_irqs();
-       cpu_clear(cpu, cpu_online_map);
-+      fixup_irqs();
++      cpu_clear(cpu, cpu_online_map);
+       fixup_irqs();
+-      cpu_clear(cpu, cpu_online_map);
        local_flush_tlb_all();
        cpu_clear(cpu, cpu_callin_map);
 +      pfm_cpu_disable();
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia64/kernel/sys_ia64.c
---- linux-2.6.27/arch/ia64/kernel/sys_ia64.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/sys_ia64.c    2009-03-25 16:10:50.000000000 +0000
-@@ -59,6 +59,8 @@ arch_get_unmapped_area (struct file *fil
+diff -r 9608d5473017 arch/ia64/kernel/sys_ia64.c
+--- a/arch/ia64/kernel/sys_ia64.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/sys_ia64.c      Wed May 06 16:56:02 2009 +0100
+@@ -59,6 +59,8 @@
        start_addr = addr = (addr + align_mask) & ~align_mask;
  
        for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
@@ -41537,7 +41531,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia6
                /* At this point:  (!vma || addr < vma->vm_end). */
                if (TASK_SIZE - len < addr || RGN_MAP_LIMIT - len < REGION_OFFSET(addr)) {
                        if (start_addr != TASK_UNMAPPED_BASE) {
-@@ -68,7 +70,14 @@ arch_get_unmapped_area (struct file *fil
+@@ -68,7 +70,14 @@
                        }
                        return -ENOMEM;
                }
@@ -41553,7 +41547,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia6
                        /* Remember the address where we stopped this search:  */
                        mm->free_area_cache = addr + len;
                        return addr;
-@@ -154,7 +163,7 @@ out:
+@@ -154,7 +163,7 @@
   * and r9) as this is faster than doing a copy_to_user().
   */
  asmlinkage long
@@ -41562,7 +41556,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia6
  {
        struct pt_regs *regs = task_pt_regs(current);
        int fd[2];
-@@ -284,3 +293,11 @@ sys_pciconfig_write (unsigned long bus, 
+@@ -284,3 +293,11 @@
  }
  
  #endif /* CONFIG_PCI */
@@ -41574,9 +41568,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/sys_ia64.c linux-2.6.27.19-5.1/arch/ia6
 +      return -ENOSYS;
 +}
 +#endif
-diff -purN linux-2.6.27/arch/ia64/kernel/traps.c linux-2.6.27.19-5.1/arch/ia64/kernel/traps.c
---- linux-2.6.27/arch/ia64/kernel/traps.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/traps.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/traps.c
+--- a/arch/ia64/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/traps.c Wed May 06 16:56:02 2009 +0100
 @@ -13,6 +13,9 @@
  #include <linux/tty.h>
  #include <linux/vt_kern.h>            /* For unblank_screen() */
@@ -41587,18 +41581,18 @@ diff -purN linux-2.6.27/arch/ia64/kernel/traps.c linux-2.6.27.19-5.1/arch/ia64/k
  #include <linux/hardirq.h>
  #include <linux/kprobes.h>
  #include <linux/delay.h>              /* for ssleep() */
-@@ -78,6 +81,10 @@ die (const char *str, struct pt_regs *re
+@@ -77,6 +80,10 @@
        if (!regs)
                return 1;
++
 +#ifdef        CONFIG_KDB
 +      (void)kdb(KDB_REASON_OOPS, err, regs);
 +#endif        /* CONFIG_KDB */
-+
        if (panic_on_oops)
                panic("Fatal exception");
-@@ -171,6 +178,17 @@ __kprobes ia64_bad_break (unsigned long 
+@@ -171,6 +178,17 @@
                if (break_num < 0x80000) {
                        sig = SIGILL; code = __ILL_BREAK;
                } else {
@@ -41616,7 +41610,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/traps.c linux-2.6.27.19-5.1/arch/ia64/k
                        if (notify_die(DIE_BREAK, "bad break", regs, break_num, TRAP_BRKPT, SIGTRAP)
                                        == NOTIFY_STOP)
                                return;
-@@ -565,6 +583,10 @@ ia64_fault (unsigned long vector, unsign
+@@ -565,6 +583,10 @@
                if (notify_die(DIE_FAULT, "ia64_fault", &regs, vector, siginfo.si_code, SIGTRAP)
                                == NOTIFY_STOP)
                        return;
@@ -41627,9 +41621,9 @@ diff -purN linux-2.6.27/arch/ia64/kernel/traps.c linux-2.6.27.19-5.1/arch/ia64/k
                siginfo.si_signo = SIGTRAP;
                siginfo.si_errno = 0;
                siginfo.si_addr  = (void __user *) ifa;
-diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/kernel/unwind.c
---- linux-2.6.27/arch/ia64/kernel/unwind.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kernel/unwind.c      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kernel/unwind.c
+--- a/arch/ia64/kernel/unwind.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kernel/unwind.c        Wed May 06 16:56:02 2009 +0100
 @@ -57,14 +57,27 @@
  
  #ifdef UNW_DEBUG
@@ -41676,7 +41670,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/
  
  typedef unsigned long unw_word;
  typedef unsigned char unw_hash_index_t;
-@@ -2092,7 +2105,7 @@ unw_add_unwind_table (const char *name, 
+@@ -2092,7 +2105,7 @@
                return NULL;
        }
  
@@ -41685,7 +41679,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/
        if (!table)
                return NULL;
  
-@@ -2165,7 +2178,7 @@ unw_remove_unwind_table (void *handle)
+@@ -2165,7 +2178,7 @@
                write_unlock(&tmp->lock);
        }
  
@@ -41694,7 +41688,7 @@ diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/
  }
  
  static int __init
-@@ -2199,7 +2212,7 @@ create_gate_table (void)
+@@ -2199,7 +2212,7 @@
                size += 3*8 + 8 + 8*UNW_LENGTH(*(u64 *) (segbase + entry->info_offset));
        size += 8;      /* reserve space for "end of table" marker */
  
@@ -41703,13 +41697,14 @@ diff -purN linux-2.6.27/arch/ia64/kernel/unwind.c linux-2.6.27.19-5.1/arch/ia64/
        if (!unw.gate_table) {
                unw.gate_table_size = 0;
                printk(KERN_ERR "%s: unable to create unwind data for gate page!\n", __func__);
-diff -purN linux-2.6.27/arch/ia64/kvm/Kconfig linux-2.6.27.19-5.1/arch/ia64/kvm/Kconfig
---- linux-2.6.27/arch/ia64/kvm/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kvm/Kconfig  2009-03-25 16:10:50.000000000 +0000
-@@ -17,6 +17,19 @@ menuconfig VIRTUALIZATION
+diff -r 9608d5473017 arch/ia64/kvm/Kconfig
+--- a/arch/ia64/kvm/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kvm/Kconfig    Wed May 06 16:56:02 2009 +0100
+@@ -16,6 +16,19 @@
+         If you say N, all options in this submenu will be skipped and disabled.
  
  if VIRTUALIZATION
++
 +config KVM_KMP
 +      bool "Build Kernel-based Virtual Machine (KVM) as KMP"
 +      depends on HAVE_KVM
@@ -41722,13 +41717,12 @@ diff -purN linux-2.6.27/arch/ia64/kvm/Kconfig linux-2.6.27.19-5.1/arch/ia64/kvm/
 +        itself.
 +
 +        Say Y here.
-+
  config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
-       depends on HAVE_KVM && EXPERIMENTAL
-diff -purN linux-2.6.27/arch/ia64/kvm/vti.h linux-2.6.27.19-5.1/arch/ia64/kvm/vti.h
---- linux-2.6.27/arch/ia64/kvm/vti.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/kvm/vti.h    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/kvm/vti.h
+--- a/arch/ia64/kvm/vti.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/kvm/vti.h      Wed May 06 16:56:02 2009 +0100
 @@ -83,13 +83,13 @@
  union vac {
        unsigned long value;
@@ -41750,7 +41744,7 @@ diff -purN linux-2.6.27/arch/ia64/kvm/vti.h linux-2.6.27.19-5.1/arch/ia64/kvm/vt
                long reserved:57;
        };
  };
-@@ -97,12 +97,12 @@ union vac {
+@@ -97,12 +97,12 @@
  union vdc {
        unsigned long value;
        struct {
@@ -41769,10 +41763,10 @@ diff -purN linux-2.6.27/arch/ia64/kvm/vti.h linux-2.6.27.19-5.1/arch/ia64/kvm/vt
                long reserved:58;
        };
  };
-diff -purN linux-2.6.27/arch/ia64/lib/Makefile linux-2.6.27.19-5.1/arch/ia64/lib/Makefile
---- linux-2.6.27/arch/ia64/lib/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/lib/Makefile 2009-03-25 16:10:50.000000000 +0000
-@@ -13,7 +13,6 @@ lib-y := __divsi3.o __udivsi3.o __modsi3
+diff -r 9608d5473017 arch/ia64/lib/Makefile
+--- a/arch/ia64/lib/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/lib/Makefile   Wed May 06 16:56:02 2009 +0100
+@@ -13,7 +13,6 @@
  
  obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
  obj-$(CONFIG_MCKINLEY)        += copy_page_mck.o memcpy_mck.o
@@ -41780,10 +41774,10 @@ diff -purN linux-2.6.27/arch/ia64/lib/Makefile linux-2.6.27.19-5.1/arch/ia64/lib
  
  AFLAGS___divdi3.o     =
  AFLAGS___udivdi3.o    = -DUNSIGNED
-diff -purN linux-2.6.27/arch/ia64/mm/discontig.c linux-2.6.27.19-5.1/arch/ia64/mm/discontig.c
---- linux-2.6.27/arch/ia64/mm/discontig.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/mm/discontig.c       2009-03-25 16:10:50.000000000 +0000
-@@ -635,7 +635,6 @@ static __init int count_node_pages(unsig
+diff -r 9608d5473017 arch/ia64/mm/discontig.c
+--- a/arch/ia64/mm/discontig.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/mm/discontig.c Wed May 06 16:56:02 2009 +0100
+@@ -635,7 +635,6 @@
                        (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT;
  #endif
        start = GRANULEROUNDDOWN(start);
@@ -41791,9 +41785,9 @@ diff -purN linux-2.6.27/arch/ia64/mm/discontig.c linux-2.6.27.19-5.1/arch/ia64/m
        end = GRANULEROUNDUP(end);
        mem_data[node].max_pfn = max(mem_data[node].max_pfn,
                                     end >> PAGE_SHIFT);
-diff -purN linux-2.6.27/arch/ia64/oprofile/init.c linux-2.6.27.19-5.1/arch/ia64/oprofile/init.c
---- linux-2.6.27/arch/ia64/oprofile/init.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/oprofile/init.c      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/oprofile/init.c
+--- a/arch/ia64/oprofile/init.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/oprofile/init.c        Wed May 06 16:56:02 2009 +0100
 @@ -12,8 +12,8 @@
  #include <linux/init.h>
  #include <linux/errno.h>
@@ -41805,7 +41799,7 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/init.c linux-2.6.27.19-5.1/arch/ia64/
  extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth);
  
  int __init oprofile_arch_init(struct oprofile_operations * ops)
-@@ -22,7 +22,7 @@ int __init oprofile_arch_init(struct opr
+@@ -22,7 +22,7 @@
  
  #ifdef CONFIG_PERFMON
        /* perfmon_init() can fail, but we have no way to report it */
@@ -41814,7 +41808,7 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/init.c linux-2.6.27.19-5.1/arch/ia64/
  #endif
        ops->backtrace = ia64_backtrace;
  
-@@ -33,6 +33,6 @@ int __init oprofile_arch_init(struct opr
+@@ -33,6 +33,6 @@
  void oprofile_arch_exit(void)
  {
  #ifdef CONFIG_PERFMON
@@ -41822,9 +41816,9 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/init.c linux-2.6.27.19-5.1/arch/ia64/
 +      op_perfmon_exit();
  #endif
  }
-diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia64/oprofile/perfmon.c
---- linux-2.6.27/arch/ia64/oprofile/perfmon.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/oprofile/perfmon.c   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/oprofile/perfmon.c
+--- a/arch/ia64/oprofile/perfmon.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/oprofile/perfmon.c     Wed May 06 16:56:02 2009 +0100
 @@ -10,25 +10,30 @@
  #include <linux/kernel.h>
  #include <linux/oprofile.h>
@@ -41862,7 +41856,7 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia
        return 0;
  }
  
-@@ -45,17 +50,13 @@ static void perfmon_stop(void)
+@@ -45,16 +50,12 @@
        allow_ints = 0;
  }
  
@@ -41880,12 +41874,11 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia
 +      .fmt_flags = PFM_FMT_BUILTIN_FLAG,
 +      .owner = THIS_MODULE
  };
 -
  static char * get_cpu_type(void)
  {
-       __u8 family = local_cpu_data->family;
-@@ -75,9 +76,9 @@ static char * get_cpu_type(void)
+@@ -75,9 +76,9 @@
  
  static int using_perfmon;
  
@@ -41897,7 +41890,7 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia
        if (ret)
                return -ENODEV;
  
-@@ -90,10 +91,10 @@ int perfmon_init(struct oprofile_operati
+@@ -90,10 +91,10 @@
  }
  
  
@@ -41910,9 +41903,9 @@ diff -purN linux-2.6.27/arch/ia64/oprofile/perfmon.c linux-2.6.27.19-5.1/arch/ia
 -      pfm_unregister_buffer_fmt(oprofile_fmt.fmt_uuid);
 +      pfm_fmt_unregister(&oprofile_fmt);
  }
-diff -purN linux-2.6.27/arch/ia64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/ia64/perfmon/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/Kconfig      2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/Kconfig        Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,67 @@
 +menu "Hardware Performance Monitoring support"
 +config PERFMON
@@ -41981,9 +41974,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/ia64/
 +      help
 +      Enables support for Itanium 2 9000 (Montecito) PMU.
 +endmenu
-diff -purN linux-2.6.27/arch/ia64/perfmon/Makefile linux-2.6.27.19-5.1/arch/ia64/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/Makefile     2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/Makefile       Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,11 @@
 +#
 +# Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
@@ -41996,9 +41989,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/Makefile linux-2.6.27.19-5.1/arch/ia64
 +obj-$(CONFIG_IA64_PERFMON_ITANIUM)    += perfmon_itanium.o
 +obj-$(CONFIG_IA64_PERFMON_MCKINLEY)   += perfmon_mckinley.o
 +obj-$(CONFIG_IA64_PERFMON_MONTECITO)  += perfmon_montecito.o
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon.c    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon.c      Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,946 @@
 +/*
 + * This file implements the IA-64 specific
@@ -42946,9 +42939,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/ia6
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_compat.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_compat.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_compat.c     2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_compat.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_compat.c       Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,1210 @@
 +/*
 + * This file implements the IA-64 specific
@@ -44160,9 +44153,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_compat.c linux-2.6.27.19-5.1/a
 +      perfmon_proc->proc_fops = &pfm_proc_fops;
 +      return 0;
 +}
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_default_smpl.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_default_smpl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_default_smpl.c       2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_default_smpl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_default_smpl.c Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,273 @@
 +/*
 + * Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.
@@ -44437,9 +44430,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_default_smpl.c linux-2.6.27.19
 +
 +module_init(pfm_default_fmt_init_module);
 +module_exit(pfm_default_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_generic.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_generic.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_generic.c    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_generic.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_generic.c      Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,148 @@
 +/*
 + * This file contains the generic PMU register description tables
@@ -44589,9 +44582,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_generic.c linux-2.6.27.19-5.1/
 +
 +module_init(pfm_gen_pmu_init_module);
 +module_exit(pfm_gen_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_itanium.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_itanium.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_itanium.c    2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_itanium.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_itanium.c      Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,232 @@
 +/*
 + * This file contains the Itanium PMU register description tables
@@ -44825,9 +44818,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_itanium.c linux-2.6.27.19-5.1/
 +module_init(pfm_ita_pmu_init_module);
 +module_exit(pfm_ita_pmu_cleanup_module);
 +
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_mckinley.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_mckinley.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_mckinley.c   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_mckinley.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_mckinley.c     Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,290 @@
 +/*
 + * This file contains the McKinley PMU register description tables
@@ -45119,9 +45112,9 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_mckinley.c linux-2.6.27.19-5.1
 +
 +module_init(pfm_mck_pmu_init_module);
 +module_exit(pfm_mck_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_montecito.c linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_montecito.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/perfmon/perfmon_montecito.c  2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/ia64/perfmon/perfmon_montecito.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/ia64/perfmon/perfmon_montecito.c    Wed May 06 16:56:02 2009 +0100
 @@ -0,0 +1,412 @@
 +/*
 + * This file contains the McKinley PMU register description tables
@@ -45535,10 +45528,10 @@ diff -purN linux-2.6.27/arch/ia64/perfmon/perfmon_montecito.c linux-2.6.27.19-5.
 +
 +module_init(pfm_mont_pmu_init_module);
 +module_exit(pfm_mont_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/bte.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/bte.c
---- linux-2.6.27/arch/ia64/sn/kernel/bte.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/bte.c      2009-03-25 16:10:51.000000000 +0000
-@@ -97,9 +97,10 @@ bte_result_t bte_copy(u64 src, u64 dest,
+diff -r 9608d5473017 arch/ia64/sn/kernel/bte.c
+--- a/arch/ia64/sn/kernel/bte.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/bte.c        Wed May 06 16:56:02 2009 +0100
+@@ -97,9 +97,10 @@
                return BTE_SUCCESS;
        }
  
@@ -45552,10 +45545,10 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/bte.c linux-2.6.27.19-5.1/arch/ia64/
  
        /*
         * Start with interface corresponding to cpu number
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_acpi_init.c
---- linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_acpi_init.c     2009-03-25 16:10:51.000000000 +0000
-@@ -232,7 +232,7 @@ exit:
+diff -r 9608d5473017 arch/ia64/sn/kernel/io_acpi_init.c
+--- a/arch/ia64/sn/kernel/io_acpi_init.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/io_acpi_init.c       Wed May 06 16:56:02 2009 +0100
+@@ -232,7 +232,7 @@
  static unsigned int
  get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
  {
@@ -45564,7 +45557,7 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/a
        acpi_handle child;
        unsigned int devfn;
        int function;
-@@ -292,8 +292,8 @@ get_host_devfn(acpi_handle device_handle
+@@ -292,8 +292,8 @@
  static acpi_status
  find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
@@ -45575,7 +45568,7 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/a
        acpi_handle parent = NULL;
        acpi_status status;
        unsigned int devfn;
-@@ -348,7 +348,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *
+@@ -348,7 +348,7 @@
        unsigned int host_devfn;
        struct sn_pcidev_match pcidev_match;
        acpi_handle rootbus_handle;
@@ -45584,7 +45577,7 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/a
        acpi_status status;
  
        rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
-@@ -434,7 +434,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
+@@ -434,7 +434,7 @@
                size = pci_resource_len(dev, PCI_ROM_RESOURCE);
                addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE],
                               size);
@@ -45593,10 +45586,10 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_acpi_init.c linux-2.6.27.19-5.1/a
                dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr;
                dev->resource[PCI_ROM_RESOURCE].end =
                                        (unsigned long) addr + image_size - 1;
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_init.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_init.c
---- linux-2.6.27/arch/ia64/sn/kernel/io_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/io_init.c  2009-03-25 16:10:51.000000000 +0000
-@@ -269,7 +269,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
+diff -r 9608d5473017 arch/ia64/sn/kernel/io_init.c
+--- a/arch/ia64/sn/kernel/io_init.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/io_init.c    Wed May 06 16:56:02 2009 +0100
+@@ -269,7 +269,7 @@
  
                        rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE),
                                      size + 1);
@@ -45605,10 +45598,10 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/io_init.c linux-2.6.27.19-5.1/arch/i
                        dev->resource[PCI_ROM_RESOURCE].end =
                                dev->resource[PCI_ROM_RESOURCE].start +
                                image_size - 1;
-diff -purN linux-2.6.27/arch/ia64/sn/kernel/irq.c linux-2.6.27.19-5.1/arch/ia64/sn/kernel/irq.c
---- linux-2.6.27/arch/ia64/sn/kernel/irq.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/kernel/irq.c      2009-03-25 16:10:51.000000000 +0000
-@@ -391,6 +391,11 @@ void sn_irq_fixup(struct pci_dev *pci_de
+diff -r 9608d5473017 arch/ia64/sn/kernel/irq.c
+--- a/arch/ia64/sn/kernel/irq.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/kernel/irq.c        Wed May 06 16:56:02 2009 +0100
+@@ -391,6 +391,11 @@
  #ifdef CONFIG_SMP
        cpuphys = cpu_physical_id(cpu);
        set_irq_affinity_info(sn_irq_info->irq_irq, cpuphys, 0);
@@ -45620,10 +45613,10 @@ diff -purN linux-2.6.27/arch/ia64/sn/kernel/irq.c linux-2.6.27.19-5.1/arch/ia64/
  #endif
  }
  
-diff -purN linux-2.6.27/arch/ia64/sn/pci/pcibr/pcibr_dma.c linux-2.6.27.19-5.1/arch/ia64/sn/pci/pcibr/pcibr_dma.c
---- linux-2.6.27/arch/ia64/sn/pci/pcibr/pcibr_dma.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/sn/pci/pcibr/pcibr_dma.c     2009-03-25 16:10:51.000000000 +0000
-@@ -135,11 +135,10 @@ pcibr_dmatrans_direct64(struct pcidev_in
+diff -r 9608d5473017 arch/ia64/sn/pci/pcibr/pcibr_dma.c
+--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c       Wed May 06 16:56:02 2009 +0100
+@@ -135,11 +135,10 @@
        if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS)
                pci_addr = IS_PIC_SOFT(pcibus_info) ?
                                PHYS_TO_DMA(paddr) :
@@ -45638,10 +45631,10 @@ diff -purN linux-2.6.27/arch/ia64/sn/pci/pcibr/pcibr_dma.c linux-2.6.27.19-5.1/a
  
        /* Handle Bus mode */
        if (IS_PCIX(pcibus_info))
-diff -purN linux-2.6.27/arch/ia64/uv/kernel/setup.c linux-2.6.27.19-5.1/arch/ia64/uv/kernel/setup.c
---- linux-2.6.27/arch/ia64/uv/kernel/setup.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/ia64/uv/kernel/setup.c    2009-03-25 16:10:51.000000000 +0000
-@@ -19,6 +19,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info)
+diff -r 9608d5473017 arch/ia64/uv/kernel/setup.c
+--- a/arch/ia64/uv/kernel/setup.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/ia64/uv/kernel/setup.c      Wed May 06 16:56:02 2009 +0100
+@@ -19,6 +19,12 @@
  
  #ifdef CONFIG_IA64_SGI_UV
  int sn_prom_type;
@@ -45654,34 +45647,34 @@ diff -purN linux-2.6.27/arch/ia64/uv/kernel/setup.c linux-2.6.27.19-5.1/arch/ia6
  #endif
  
  struct redir_addr {
-diff -purN linux-2.6.27/arch/m32r/Kconfig linux-2.6.27.19-5.1/arch/m32r/Kconfig
---- linux-2.6.27/arch/m32r/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m32r/Kconfig      2009-03-25 16:10:43.000000000 +0000
-@@ -45,6 +45,8 @@ config HZ
+diff -r 9608d5473017 arch/m32r/Kconfig
+--- a/arch/m32r/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/m32r/Kconfig        Wed May 06 16:56:02 2009 +0100
+@@ -44,6 +44,8 @@
+       default 100
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  
- menu "Processor type and features"
  
-diff -purN linux-2.6.27/arch/m68k/Kconfig linux-2.6.27.19-5.1/arch/m68k/Kconfig
---- linux-2.6.27/arch/m68k/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/Kconfig      2009-03-25 16:10:44.000000000 +0000
-@@ -64,6 +64,8 @@ mainmenu "Linux/68k Kernel Configuration
+ menu "Processor type and features"
+diff -r 9608d5473017 arch/m68k/Kconfig
+--- a/arch/m68k/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/Kconfig        Wed May 06 16:56:02 2009 +0100
+@@ -63,6 +63,8 @@
+ mainmenu "Linux/68k Kernel Configuration"
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "Platform dependent setup"
  
- config EISA
-diff -purN linux-2.6.27/arch/m68k/kernel/entry.S linux-2.6.27.19-5.1/arch/m68k/kernel/entry.S
---- linux-2.6.27/arch/m68k/kernel/entry.S      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/kernel/entry.S       2009-03-25 16:10:44.000000000 +0000
-@@ -513,7 +513,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/m68k/kernel/entry.S
+--- a/arch/m68k/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/kernel/entry.S Wed May 06 16:56:02 2009 +0100
+@@ -513,7 +513,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -45690,10 +45683,10 @@ diff -purN linux-2.6.27/arch/m68k/kernel/entry.S linux-2.6.27.19-5.1/arch/m68k/k
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/m68k/kernel/ints.c linux-2.6.27.19-5.1/arch/m68k/kernel/ints.c
---- linux-2.6.27/arch/m68k/kernel/ints.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68k/kernel/ints.c        2009-03-25 16:10:44.000000000 +0000
-@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(un
+diff -r 9608d5473017 arch/m68k/kernel/ints.c
+--- a/arch/m68k/kernel/ints.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68k/kernel/ints.c  Wed May 06 16:56:02 2009 +0100
+@@ -133,7 +133,7 @@
  {
        int i;
  
@@ -45702,33 +45695,33 @@ diff -purN linux-2.6.27/arch/m68k/kernel/ints.c linux-2.6.27.19-5.1/arch/m68k/ke
        m68k_first_user_vec = vec;
        for (i = 0; i < cnt; i++)
                irq_controller[IRQ_USER + i] = &user_irq_controller;
-diff -purN linux-2.6.27/arch/m68knommu/Kconfig linux-2.6.27.19-5.1/arch/m68knommu/Kconfig
---- linux-2.6.27/arch/m68knommu/Kconfig        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/Kconfig 2009-03-25 16:10:54.000000000 +0000
-@@ -14,6 +14,10 @@ config MMU
+diff -r 9608d5473017 arch/m68knommu/Kconfig
+--- a/arch/m68knommu/Kconfig   Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/Kconfig   Wed May 06 16:56:02 2009 +0100
+@@ -13,6 +13,10 @@
+ config MMU
        bool
        default n
++
 +config NO_DMA
 +      bool
 +      default y
-+
  config FPU
        bool
-       default n
-@@ -78,6 +82,8 @@ config ARCH_SUPPORTS_AOUT
+@@ -77,6 +81,8 @@
+       def_bool y
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "Processor type and features"
  
- choice
-diff -purN linux-2.6.27/arch/m68knommu/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/m68knommu/include/asm/thread_info.h
---- linux-2.6.27/arch/m68knommu/include/asm/thread_info.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/include/asm/thread_info.h       2009-03-25 16:10:54.000000000 +0000
-@@ -84,12 +84,14 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/m68knommu/include/asm/thread_info.h
+--- a/arch/m68knommu/include/asm/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/include/asm/thread_info.h Wed May 06 16:56:02 2009 +0100
+@@ -84,12 +84,14 @@
  #define TIF_POLLING_NRFLAG    3       /* true if poll_idle() is polling
                                           TIF_NEED_RESCHED */
  #define TIF_MEMDIE            4
@@ -45743,10 +45736,10 @@ diff -purN linux-2.6.27/arch/m68knommu/include/asm/thread_info.h linux-2.6.27.19
  
  #define _TIF_WORK_MASK                0x0000FFFE      /* work to do on interrupt/exception return */
  
-diff -purN linux-2.6.27/arch/m68knommu/kernel/syscalltable.S linux-2.6.27.19-5.1/arch/m68knommu/kernel/syscalltable.S
---- linux-2.6.27/arch/m68knommu/kernel/syscalltable.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/m68knommu/kernel/syscalltable.S   2009-03-25 16:10:54.000000000 +0000
-@@ -107,7 +107,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/m68knommu/kernel/syscalltable.S
+--- a/arch/m68knommu/kernel/syscalltable.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/m68knommu/kernel/syscalltable.S     Wed May 06 16:56:02 2009 +0100
+@@ -107,7 +107,7 @@
        .long sys_uselib
        .long sys_ni_syscall    /* sys_swapon */
        .long sys_reboot
@@ -45755,10 +45748,10 @@ diff -purN linux-2.6.27/arch/m68knommu/kernel/syscalltable.S linux-2.6.27.19-5.1
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/mips/Kconfig linux-2.6.27.19-5.1/arch/mips/Kconfig
---- linux-2.6.27/arch/mips/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/Kconfig      2009-03-25 16:10:45.000000000 +0000
-@@ -1857,6 +1857,8 @@ config SECCOMP
+diff -r 9608d5473017 arch/mips/Kconfig
+--- a/arch/mips/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/Kconfig        Wed May 06 16:56:03 2009 +0100
+@@ -1857,6 +1857,8 @@
  
          If unsure, say Y. Only embedded should say N here.
  
@@ -45767,34 +45760,34 @@ diff -purN linux-2.6.27/arch/mips/Kconfig linux-2.6.27.19-5.1/arch/mips/Kconfig
  endmenu
  
  config RWSEM_GENERIC_SPINLOCK
-@@ -1882,6 +1884,8 @@ config PROBE_INITRD_HEADER
+@@ -1881,6 +1883,8 @@
+         Say Y here if you are using arch/mips/boot/addinitrd.c to
          add initrd or initramfs image to the kernel image.
          Otherwise, say N.
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
  
- config HW_HAS_EISA
-diff -purN linux-2.6.27/arch/mips/Makefile linux-2.6.27.19-5.1/arch/mips/Makefile
---- linux-2.6.27/arch/mips/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/Makefile     2009-03-25 16:10:45.000000000 +0000
-@@ -154,6 +154,12 @@ endif
+diff -r 9608d5473017 arch/mips/Makefile
+--- a/arch/mips/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/Makefile       Wed May 06 16:56:03 2009 +0100
+@@ -152,6 +152,12 @@
+ MODFLAGS      += -msb1-pass1-workarounds
  endif
- #
+ endif
++
++#
 +# Perfmon support
 +#
 +
 +core-$(CONFIG_PERFMON)                += arch/mips/perfmon/
-+
-+#
- # Firmware support
  #
- libs-$(CONFIG_ARC)            += arch/mips/fw/arc/
-diff -purN linux-2.6.27/arch/mips/kernel/process.c linux-2.6.27.19-5.1/arch/mips/kernel/process.c
---- linux-2.6.27/arch/mips/kernel/process.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/process.c     2009-03-25 16:10:45.000000000 +0000
+ # Firmware support
+diff -r 9608d5473017 arch/mips/kernel/process.c
+--- a/arch/mips/kernel/process.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/process.c       Wed May 06 16:56:03 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/completion.h>
  #include <linux/kallsyms.h>
@@ -45803,7 +45796,7 @@ diff -purN linux-2.6.27/arch/mips/kernel/process.c linux-2.6.27.19-5.1/arch/mips
  
  #include <asm/asm.h>
  #include <asm/bootinfo.h>
-@@ -94,6 +95,7 @@ void start_thread(struct pt_regs * regs,
+@@ -94,6 +95,7 @@
  
  void exit_thread(void)
  {
@@ -45811,19 +45804,19 @@ diff -purN linux-2.6.27/arch/mips/kernel/process.c linux-2.6.27.19-5.1/arch/mips
  }
  
  void flush_thread(void)
-@@ -162,6 +164,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -161,6 +163,8 @@
        if (clone_flags & CLONE_SETTLS)
                ti->tp_value = regs->regs[7];
-+      pfm_copy_thread(p);
 +
++      pfm_copy_thread(p);
        return 0;
  }
-diff -purN linux-2.6.27/arch/mips/kernel/scall32-o32.S linux-2.6.27.19-5.1/arch/mips/kernel/scall32-o32.S
---- linux-2.6.27/arch/mips/kernel/scall32-o32.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/scall32-o32.S 2009-03-25 16:10:45.000000000 +0000
-@@ -401,7 +401,7 @@ einval:    li      v0, -EINVAL
+diff -r 9608d5473017 arch/mips/kernel/scall32-o32.S
+--- a/arch/mips/kernel/scall32-o32.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/scall32-o32.S   Wed May 06 16:56:03 2009 +0100
+@@ -401,7 +401,7 @@
        sys     sys_uselib              1
        sys     sys_swapon              2
        sys     sys_reboot              3
@@ -45832,9 +45825,9 @@ diff -purN linux-2.6.27/arch/mips/kernel/scall32-o32.S linux-2.6.27.19-5.1/arch/
        sys     old_mmap                6       /* 4090 */
        sys     sys_munmap              2
        sys     sys_truncate            2
-diff -purN linux-2.6.27/arch/mips/kernel/signal.c linux-2.6.27.19-5.1/arch/mips/kernel/signal.c
---- linux-2.6.27/arch/mips/kernel/signal.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/signal.c      2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/kernel/signal.c
+--- a/arch/mips/kernel/signal.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/signal.c        Wed May 06 16:56:03 2009 +0100
 @@ -20,6 +20,7 @@
  #include <linux/unistd.h>
  #include <linux/compiler.h>
@@ -45843,7 +45836,7 @@ diff -purN linux-2.6.27/arch/mips/kernel/signal.c linux-2.6.27.19-5.1/arch/mips/
  
  #include <asm/abi.h>
  #include <asm/asm.h>
-@@ -694,8 +695,11 @@ static void do_signal(struct pt_regs *re
+@@ -694,8 +695,11 @@
   * - triggered by the TIF_WORK_MASK flags
   */
  asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
@@ -45856,10 +45849,10 @@ diff -purN linux-2.6.27/arch/mips/kernel/signal.c linux-2.6.27.19-5.1/arch/mips/
        /* deal with pending signal delivery */
        if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
                do_signal(regs);
-diff -purN linux-2.6.27/arch/mips/kernel/time.c linux-2.6.27.19-5.1/arch/mips/kernel/time.c
---- linux-2.6.27/arch/mips/kernel/time.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/time.c        2009-03-25 16:10:45.000000000 +0000
-@@ -49,10 +49,11 @@ int update_persistent_clock(struct times
+diff -r 9608d5473017 arch/mips/kernel/time.c
+--- a/arch/mips/kernel/time.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/time.c  Wed May 06 16:56:03 2009 +0100
+@@ -49,10 +49,11 @@
        return rtc_mips_set_mmss(now.tv_sec);
  }
  
@@ -45872,10 +45865,10 @@ diff -purN linux-2.6.27/arch/mips/kernel/time.c linux-2.6.27.19-5.1/arch/mips/ke
  
  int (*perf_irq)(void) = null_perf_irq;
  
-diff -purN linux-2.6.27/arch/mips/kernel/traps.c linux-2.6.27.19-5.1/arch/mips/kernel/traps.c
---- linux-2.6.27/arch/mips/kernel/traps.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/kernel/traps.c       2009-03-25 16:10:45.000000000 +0000
-@@ -92,17 +92,15 @@ static void show_raw_backtrace(unsigned 
+diff -r 9608d5473017 arch/mips/kernel/traps.c
+--- a/arch/mips/kernel/traps.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/kernel/traps.c Wed May 06 16:56:03 2009 +0100
+@@ -92,17 +92,15 @@
  #ifdef CONFIG_KALLSYMS
        printk("\n");
  #endif
@@ -45900,9 +45893,9 @@ diff -purN linux-2.6.27/arch/mips/kernel/traps.c linux-2.6.27.19-5.1/arch/mips/k
  }
  
  #ifdef CONFIG_KALLSYMS
-diff -purN linux-2.6.27/arch/mips/mti-malta/malta-time.c linux-2.6.27.19-5.1/arch/mips/mti-malta/malta-time.c
---- linux-2.6.27/arch/mips/mti-malta/malta-time.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/mti-malta/malta-time.c       2009-03-25 16:10:46.000000000 +0000
+diff -r 9608d5473017 arch/mips/mti-malta/malta-time.c
+--- a/arch/mips/mti-malta/malta-time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/mips/mti-malta/malta-time.c Wed May 06 16:56:03 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/time.h>
  #include <linux/timex.h>
@@ -45911,9 +45904,9 @@ diff -purN linux-2.6.27/arch/mips/mti-malta/malta-time.c linux-2.6.27.19-5.1/arc
  
  #include <asm/mipsregs.h>
  #include <asm/mipsmtregs.h>
-diff -purN linux-2.6.27/arch/mips/perfmon/Kconfig linux-2.6.27.19-5.1/arch/mips/perfmon/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/Kconfig      2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/Kconfig        Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,61 @@
 +menu "Hardware Performance Monitoring support"
 +config PERFMON
@@ -45976,15 +45969,15 @@ diff -purN linux-2.6.27/arch/mips/perfmon/Kconfig linux-2.6.27.19-5.1/arch/mips/
 +      help
 +      Enables support for the MIPS64 hardware performance counters"
 +endmenu
-diff -purN linux-2.6.27/arch/mips/perfmon/Makefile linux-2.6.27.19-5.1/arch/mips/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/Makefile     2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/Makefile       Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,2 @@
 +obj-$(CONFIG_PERFMON)         += perfmon.o
 +obj-$(CONFIG_PERFMON_MIPS64)  += perfmon_mips64.o
-diff -purN linux-2.6.27/arch/mips/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon.c    2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/perfmon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/perfmon.c      Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,313 @@
 +/*
 + * This file implements the MIPS64 specific
@@ -46299,9 +46292,9 @@ diff -purN linux-2.6.27/arch/mips/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/mip
 +      return 0;
 +}
 +EXPORT_SYMBOL(perfmon_perf_irq);
-diff -purN linux-2.6.27/arch/mips/perfmon/perfmon_mips64.c linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon_mips64.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mips/perfmon/perfmon_mips64.c     2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/mips/perfmon/perfmon_mips64.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/mips/perfmon/perfmon_mips64.c       Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,218 @@
 +/*
 + * This file contains the MIPS64 and decendent PMU register description tables
@@ -46521,22 +46514,22 @@ diff -purN linux-2.6.27/arch/mips/perfmon/perfmon_mips64.c linux-2.6.27.19-5.1/a
 +
 +module_init(pfm_mips64_pmu_init_module);
 +module_exit(pfm_mips64_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/mn10300/Kconfig linux-2.6.27.19-5.1/arch/mn10300/Kconfig
---- linux-2.6.27/arch/mn10300/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mn10300/Kconfig   2009-03-25 16:10:52.000000000 +0000
-@@ -71,6 +71,8 @@ mainmenu "Matsushita MN10300/AM33 Kernel
+diff -r 9608d5473017 arch/mn10300/Kconfig
+--- a/arch/mn10300/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/mn10300/Kconfig     Wed May 06 16:56:03 2009 +0100
+@@ -70,6 +70,8 @@
+ mainmenu "Matsushita MN10300/AM33 Kernel Configuration"
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  
- menu "Matsushita MN10300 system setup"
  
-diff -purN linux-2.6.27/arch/mn10300/kernel/entry.S linux-2.6.27.19-5.1/arch/mn10300/kernel/entry.S
---- linux-2.6.27/arch/mn10300/kernel/entry.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/mn10300/kernel/entry.S    2009-03-25 16:10:52.000000000 +0000
-@@ -477,7 +477,7 @@ ENTRY(sys_call_table)
+ menu "Matsushita MN10300 system setup"
+diff -r 9608d5473017 arch/mn10300/kernel/entry.S
+--- a/arch/mn10300/kernel/entry.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/mn10300/kernel/entry.S      Wed May 06 16:56:03 2009 +0100
+@@ -477,7 +477,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -46545,21 +46538,21 @@ diff -purN linux-2.6.27/arch/mn10300/kernel/entry.S linux-2.6.27.19-5.1/arch/mn1
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/parisc/Kconfig linux-2.6.27.19-5.1/arch/parisc/Kconfig
---- linux-2.6.27/arch/parisc/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/parisc/Kconfig    2009-03-25 16:10:51.000000000 +0000
-@@ -93,6 +93,8 @@ config ARCH_MAY_HAVE_PC_FDC
+diff -r 9608d5473017 arch/parisc/Kconfig
+--- a/arch/parisc/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/arch/parisc/Kconfig      Wed May 06 16:56:03 2009 +0100
+@@ -92,6 +92,8 @@
+       default y
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  
- menu "Processor type and features"
  
-diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/parisc/kernel/traps.c
---- linux-2.6.27/arch/parisc/kernel/traps.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/parisc/kernel/traps.c     2009-03-25 16:10:51.000000000 +0000
+ menu "Processor type and features"
+diff -r 9608d5473017 arch/parisc/kernel/traps.c
+--- a/arch/parisc/kernel/traps.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/parisc/kernel/traps.c       Wed May 06 16:56:03 2009 +0100
 @@ -24,7 +24,6 @@
  #include <linux/init.h>
  #include <linux/interrupt.h>
@@ -46577,7 +46570,7 @@ diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/pari
        struct pt_regs *regs);
  
  static int printbinary(char *buf, unsigned long x, int nbits)
-@@ -121,18 +120,19 @@ static void print_fr(char *level, struct
+@@ -121,18 +120,19 @@
  
  void show_regs(struct pt_regs *regs)
  {
@@ -46600,7 +46593,7 @@ diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/pari
                print_fr(level, regs);
  
        cr30 = mfctl(30);
-@@ -145,14 +145,18 @@ void show_regs(struct pt_regs *regs)
+@@ -145,14 +145,18 @@
        printk("%s CPU: %8d   CR30: " RFMT " CR31: " RFMT "\n",
               level, current_thread_info()->cpu, cr30, cr31);
        printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
@@ -46626,7 +46619,7 @@ diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/pari
  }
  
  
-@@ -173,20 +177,15 @@ static void do_show_stack(struct unwind_
+@@ -173,20 +177,15 @@
                        break;
  
                if (__kernel_text_address(info->ip)) {
@@ -46651,10 +46644,10 @@ diff -purN linux-2.6.27/arch/parisc/kernel/traps.c linux-2.6.27.19-5.1/arch/pari
        struct pt_regs *regs)
  {
        struct unwind_frame_info info;
-diff -purN linux-2.6.27/arch/powerpc/Kconfig linux-2.6.27.19-5.1/arch/powerpc/Kconfig
---- linux-2.6.27/arch/powerpc/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/Kconfig   2009-03-25 16:10:53.000000000 +0000
-@@ -122,6 +122,7 @@ config PPC
+diff -r 9608d5473017 arch/powerpc/Kconfig
+--- a/arch/powerpc/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/Kconfig     Wed May 06 16:56:03 2009 +0100
+@@ -122,6 +122,7 @@
        select HAVE_DMA_ATTRS if PPC64
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_OPROFILE
@@ -46662,7 +46655,7 @@ diff -purN linux-2.6.27/arch/powerpc/Kconfig linux-2.6.27.19-5.1/arch/powerpc/Kc
  
  config EARLY_PRINTK
        bool
-@@ -227,9 +228,13 @@ config PPC_OF_PLATFORM_PCI
+@@ -227,8 +228,12 @@
  
  source "init/Kconfig"
  
@@ -46670,16 +46663,15 @@ diff -purN linux-2.6.27/arch/powerpc/Kconfig linux-2.6.27.19-5.1/arch/powerpc/Kc
 +
  source "arch/powerpc/sysdev/Kconfig"
  source "arch/powerpc/platforms/Kconfig"
-+source "arch/powerpc/perfmon/Kconfig"
 +
++source "arch/powerpc/perfmon/Kconfig"
  menu "Kernel options"
  
- config HIGHMEM
-diff -purN linux-2.6.27/arch/powerpc/Makefile linux-2.6.27.19-5.1/arch/powerpc/Makefile
---- linux-2.6.27/arch/powerpc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/Makefile  2009-03-25 16:10:54.000000000 +0000
-@@ -83,15 +83,17 @@ ifeq ($(GCC_BROKEN_VEC),y)
+diff -r 9608d5473017 arch/powerpc/Makefile
+--- a/arch/powerpc/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/Makefile    Wed May 06 16:56:03 2009 +0100
+@@ -83,15 +83,17 @@
        KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
  else
        KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
@@ -46699,7 +46691,7 @@ diff -purN linux-2.6.27/arch/powerpc/Makefile linux-2.6.27.19-5.1/arch/powerpc/M
  endif
  
  ifeq ($(CONFIG_TUNE_CELL),y)
-@@ -146,6 +148,7 @@ core-y                             += arch/powerpc/kernel/ \
+@@ -146,6 +148,7 @@
                                   arch/powerpc/platforms/
  core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/
  core-$(CONFIG_XMON)           += arch/powerpc/xmon/
@@ -46707,9 +46699,9 @@ diff -purN linux-2.6.27/arch/powerpc/Makefile linux-2.6.27.19-5.1/arch/powerpc/M
  core-$(CONFIG_KVM)            += arch/powerpc/kvm/
  
  drivers-$(CONFIG_OPROFILE)    += arch/powerpc/oprofile/
-diff -purN linux-2.6.27/arch/powerpc/configs/linkstation_defconfig linux-2.6.27.19-5.1/arch/powerpc/configs/linkstation_defconfig
---- linux-2.6.27/arch/powerpc/configs/linkstation_defconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/configs/linkstation_defconfig     2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/configs/linkstation_defconfig
+--- a/arch/powerpc/configs/linkstation_defconfig       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/configs/linkstation_defconfig       Wed May 06 16:56:03 2009 +0100
 @@ -1,7 +1,7 @@
  #
  # Automatically generated make config: don't edit
@@ -46720,7 +46712,7 @@ diff -purN linux-2.6.27/arch/powerpc/configs/linkstation_defconfig linux-2.6.27.
  #
  # CONFIG_PPC64 is not set
  
-@@ -934,7 +934,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+@@ -934,7 +934,7 @@
  CONFIG_SERIAL_CORE=y
  CONFIG_SERIAL_CORE_CONSOLE=y
  # CONFIG_SERIAL_JSM is not set
@@ -46729,7 +46721,7 @@ diff -purN linux-2.6.27/arch/powerpc/configs/linkstation_defconfig linux-2.6.27.
  CONFIG_UNIX98_PTYS=y
  CONFIG_LEGACY_PTYS=y
  CONFIG_LEGACY_PTY_COUNT=256
-@@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m
+@@ -1211,7 +1211,6 @@
  # CONFIG_USB_STORAGE_ALAUDA is not set
  # CONFIG_USB_STORAGE_ONETOUCH is not set
  # CONFIG_USB_STORAGE_KARMA is not set
@@ -46737,10 +46729,10 @@ diff -purN linux-2.6.27/arch/powerpc/configs/linkstation_defconfig linux-2.6.27.
  # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
  # CONFIG_USB_LIBUSUAL is not set
  
-diff -purN linux-2.6.27/arch/powerpc/include/asm/Kbuild linux-2.6.27.19-5.1/arch/powerpc/include/asm/Kbuild
---- linux-2.6.27/arch/powerpc/include/asm/Kbuild       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/Kbuild        2009-03-25 16:10:54.000000000 +0000
-@@ -21,6 +21,7 @@ header-y += resource.h
+diff -r 9608d5473017 arch/powerpc/include/asm/Kbuild
+--- a/arch/powerpc/include/asm/Kbuild  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/Kbuild  Wed May 06 16:56:03 2009 +0100
+@@ -21,6 +21,7 @@
  header-y += sigcontext.h
  header-y += statfs.h
  header-y += ps3fb.h
@@ -46748,9 +46740,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/Kbuild linux-2.6.27.19-5.1/arch
  
  unifdef-y += bootx.h
  unifdef-y += byteorder.h
-diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-pmu.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-pmu.h
---- linux-2.6.27/arch/powerpc/include/asm/cell-pmu.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-pmu.h    2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/cell-pmu.h
+--- a/arch/powerpc/include/asm/cell-pmu.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/cell-pmu.h      Wed May 06 16:56:03 2009 +0100
 @@ -61,6 +61,11 @@
  
  /* Macros for the pm_status register. */
@@ -46763,10 +46755,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-pmu.h linux-2.6.27.19-5.1/
  
  enum pm_reg_name {
        group_control,
-diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-regs.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-regs.h
---- linux-2.6.27/arch/powerpc/include/asm/cell-regs.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/cell-regs.h   2009-03-25 16:10:54.000000000 +0000
-@@ -117,8 +117,9 @@ struct cbe_pmd_regs {
+diff -r 9608d5473017 arch/powerpc/include/asm/cell-regs.h
+--- a/arch/powerpc/include/asm/cell-regs.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/cell-regs.h     Wed May 06 16:56:03 2009 +0100
+@@ -117,8 +117,9 @@
        u8      pad_0x0c1c_0x0c20 [4];                          /* 0x0c1c */
  #define CBE_PMD_FIR_MODE_M8           0x00800
        u64     fir_enable_mask;                                /* 0x0c20 */
@@ -46778,7 +46770,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-regs.h linux-2.6.27.19-5.1
        u64     ras_esc_0;                                      /* 0x0ca8 */
        u8      pad_0x0cb0_0x1000 [0x1000 - 0x0cb0];            /* 0x0cb0 */
  };
-@@ -218,7 +219,11 @@ extern struct cbe_iic_regs __iomem *cbe_
+@@ -218,7 +219,11 @@
  
  
  struct cbe_mic_tm_regs {
@@ -46791,7 +46783,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-regs.h linux-2.6.27.19-5.1
  
        u64     mic_ctl_cnfg2;                                  /* 0x0040 */
  #define CBE_MIC_ENABLE_AUX_TRC                0x8000000000000000LL
-@@ -303,6 +308,25 @@ struct cbe_mic_tm_regs {
+@@ -303,6 +308,25 @@
  extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np);
  extern struct cbe_mic_tm_regs __iomem *cbe_get_cpu_mic_tm_regs(int cpu);
  
@@ -46817,9 +46809,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/cell-regs.h linux-2.6.27.19-5.1
  /* some utility functions to deal with SMT */
  extern u32 cbe_get_hw_thread_id(int cpu);
  extern u32 cbe_cpu_to_node(int cpu);
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ioctls.h
---- linux-2.6.27/arch/powerpc/include/asm/ioctls.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ioctls.h      2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/ioctls.h
+--- a/arch/powerpc/include/asm/ioctls.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ioctls.h        Wed May 06 16:56:03 2009 +0100
 @@ -91,6 +91,7 @@
  #define TIOCGSID      0x5429  /* Return the session ID of FD */
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -46828,10 +46820,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/ioctls.h linux-2.6.27.19-5.1/ar
  
  #define TIOCSERCONFIG 0x5453
  #define TIOCSERGWILD  0x5454
-diff -purN linux-2.6.27/arch/powerpc/include/asm/lppaca.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/lppaca.h
---- linux-2.6.27/arch/powerpc/include/asm/lppaca.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/lppaca.h      2009-03-25 16:10:54.000000000 +0000
-@@ -133,7 +133,8 @@ struct lppaca {
+diff -r 9608d5473017 arch/powerpc/include/asm/lppaca.h
+--- a/arch/powerpc/include/asm/lppaca.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/lppaca.h        Wed May 06 16:56:03 2009 +0100
+@@ -133,7 +133,8 @@
  //=============================================================================
  // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data
  //=============================================================================
@@ -46841,9 +46833,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/lppaca.h linux-2.6.27.19-5.1/ar
  } __attribute__((__aligned__(0x400)));
  
  extern struct lppaca lppaca[];
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mpc52xx_psc.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpc52xx_psc.h
---- linux-2.6.27/arch/powerpc/include/asm/mpc52xx_psc.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpc52xx_psc.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/mpc52xx_psc.h
+--- a/arch/powerpc/include/asm/mpc52xx_psc.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mpc52xx_psc.h   Wed May 06 16:56:03 2009 +0100
 @@ -28,6 +28,10 @@
  #define MPC52xx_PSC_MAXNUM    6
  
@@ -46855,10 +46847,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/mpc52xx_psc.h linux-2.6.27.19-5
  #define MPC52xx_PSC_SR_CDE    0x0080
  #define MPC52xx_PSC_SR_RXRDY  0x0100
  #define MPC52xx_PSC_SR_RXFULL 0x0200
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mpic.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpic.h
---- linux-2.6.27/arch/powerpc/include/asm/mpic.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mpic.h        2009-03-25 16:10:54.000000000 +0000
-@@ -355,6 +355,8 @@ struct mpic
+diff -r 9608d5473017 arch/powerpc/include/asm/mpic.h
+--- a/arch/powerpc/include/asm/mpic.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mpic.h  Wed May 06 16:56:03 2009 +0100
+@@ -355,6 +355,8 @@
  #define MPIC_NO_BIAS                  0x00000400
  /* Ignore NIRQS as reported by FRR */
  #define MPIC_BROKEN_FRR_NIRQS         0x00000800
@@ -46867,9 +46859,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/mpic.h linux-2.6.27.19-5.1/arch
  
  /* MPIC HW modification ID */
  #define MPIC_REGSET_MASK              0xf0000000
-diff -purN linux-2.6.27/arch/powerpc/include/asm/mutex.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/mutex.h
---- linux-2.6.27/arch/powerpc/include/asm/mutex.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/mutex.h       2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/mutex.h
+--- a/arch/powerpc/include/asm/mutex.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/mutex.h Wed May 06 16:56:03 2009 +0100
 @@ -1,9 +1,134 @@
  /*
 - * Pull in the generic implementation for the mutex fastpath.
@@ -46940,18 +46932,22 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/mutex.h linux-2.6.27.19-5.1/arc
 + *                          from 1 to a 0 value
 + *  @count: pointer of type atomic_t
 + *  @fail_fn: function to call if the original value was not 1
-+ *
+  *
+- * TODO: implement optimized primitives instead, or leave the generic
+- * implementation in place, or pick the atomic_xchg() based generic
+- * implementation. (see asm-generic/mutex-xchg.h for details)
 + * Change the count from 1 to a value lower than 1, and call <fail_fn> if
 + * it wasn't 1 originally. This function MUST leave the value lower than
 + * 1 even when the "1" assertion wasn't true.
-+ */
+  */
 +static inline void
 +__mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
 +{
 +      if (unlikely(__mutex_dec_return_lock(count) < 0))
 +              fail_fn(count);
 +}
-+
+-#include <asm-generic/mutex-dec.h>
 +/**
 + *  __mutex_fastpath_lock_retval - try to take the lock by moving the count
 + *                                 from 1 to a 0 value
@@ -46993,13 +46989,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/mutex.h linux-2.6.27.19-5.1/arc
 + *
 + *  @count: pointer of type atomic_t
 + *  @fail_fn: fallback function
-  *
-- * TODO: implement optimized primitives instead, or leave the generic
-- * implementation in place, or pick the atomic_xchg() based generic
-- * implementation. (see asm-generic/mutex-xchg.h for details)
++ *
 + * Change the count from 1 to 0, and return 1 (success), or if the count
 + * was not 1, then return 0 (failure).
-  */
++ */
 +static inline int
 +__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
 +{
@@ -47007,13 +47000,12 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/mutex.h linux-2.6.27.19-5.1/arc
 +              return 1;
 +      return 0;
 +}
--#include <asm-generic/mutex-dec.h>
++
 +#endif
-diff -purN linux-2.6.27/arch/powerpc/include/asm/paca.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/paca.h
---- linux-2.6.27/arch/powerpc/include/asm/paca.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/paca.h        2009-03-25 16:10:54.000000000 +0000
-@@ -97,6 +97,10 @@ struct paca_struct {
+diff -r 9608d5473017 arch/powerpc/include/asm/paca.h
+--- a/arch/powerpc/include/asm/paca.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/paca.h  Wed May 06 16:56:03 2009 +0100
+@@ -97,6 +97,10 @@
        u8 soft_enabled;                /* irq soft-enable flag */
        u8 hard_enabled;                /* set if irqs are enabled in MSR */
        u8 io_sync;                     /* writel() needs spin_unlock sync */
@@ -47024,10 +47016,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/paca.h linux-2.6.27.19-5.1/arch
  
        /* Stuff for accurate time accounting */
        u64 user_time;                  /* accumulated usermode TB ticks */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/pci-bridge.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci-bridge.h
---- linux-2.6.27/arch/powerpc/include/asm/pci-bridge.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci-bridge.h  2009-03-25 16:10:54.000000000 +0000
-@@ -234,9 +234,7 @@ extern void pcibios_remove_pci_devices(s
+diff -r 9608d5473017 arch/powerpc/include/asm/pci-bridge.h
+--- a/arch/powerpc/include/asm/pci-bridge.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/pci-bridge.h    Wed May 06 16:56:03 2009 +0100
+@@ -234,9 +234,7 @@
  
  /** Discover new pci devices under this bus, and add them */
  extern void pcibios_add_pci_devices(struct pci_bus *bus);
@@ -47038,10 +47030,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/pci-bridge.h linux-2.6.27.19-5.
  
  static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
  {
-diff -purN linux-2.6.27/arch/powerpc/include/asm/pci.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci.h
---- linux-2.6.27/arch/powerpc/include/asm/pci.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/pci.h 2009-03-25 16:10:54.000000000 +0000
-@@ -196,9 +196,12 @@ extern void pcibios_setup_new_device(str
+diff -r 9608d5473017 arch/powerpc/include/asm/pci.h
+--- a/arch/powerpc/include/asm/pci.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/pci.h   Wed May 06 16:56:03 2009 +0100
+@@ -196,9 +196,12 @@
  
  extern void pcibios_claim_one_bus(struct pci_bus *b);
  
@@ -47054,7 +47046,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/pci.h linux-2.6.27.19-5.1/arch/
  
  extern struct pci_dev *of_create_pci_dev(struct device_node *node,
                                        struct pci_bus *bus, int devfn);
-@@ -206,7 +209,8 @@ extern struct pci_dev *of_create_pci_dev
+@@ -206,7 +209,8 @@
  extern void of_scan_pci_bridge(struct device_node *node,
                                struct pci_dev *dev);
  
@@ -47064,7 +47056,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/pci.h linux-2.6.27.19-5.1/arch/
  
  extern int pci_read_irq_line(struct pci_dev *dev);
  
-@@ -221,8 +225,10 @@ extern void pci_resource_to_user(const s
+@@ -221,8 +225,10 @@
                                 const struct resource *rsrc,
                                 resource_size_t *start, resource_size_t *end);
  
@@ -47077,9 +47069,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/pci.h linux-2.6.27.19-5.1/arch/
  
  #endif        /* __KERNEL__ */
  #endif /* __ASM_POWERPC_PCI_H */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon.h     2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/perfmon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/include/asm/perfmon.h       Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,33 @@
 +/*
 + * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
@@ -47114,9 +47106,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon.h linux-2.6.27.19-5.1/a
 +#define PFM_ARCH_MAX_PMDS     (256+64) /* 256 HW 64 SW */
 +
 +#endif /* _ASM_POWERPC_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/perfmon_kern.h        2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/include/asm/perfmon_kern.h  Wed May 06 16:56:03 2009 +0100
 @@ -0,0 +1,385 @@
 +/*
 + * Copyright (c) 2005 David Gibson, IBM Corporation.
@@ -47503,10 +47495,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/perfmon_kern.h linux-2.6.27.19-
 +
 +#endif /* __KERNEL__ */
 +#endif /* _ASM_POWERPC_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3.h
---- linux-2.6.27/arch/powerpc/include/asm/ps3.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3.h 2009-03-25 16:10:54.000000000 +0000
-@@ -340,6 +340,7 @@ enum ps3_system_bus_device_type {
+diff -r 9608d5473017 arch/powerpc/include/asm/ps3.h
+--- a/arch/powerpc/include/asm/ps3.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ps3.h   Wed May 06 16:56:03 2009 +0100
+@@ -340,6 +340,7 @@
  enum ps3_match_sub_id {
        /* for PS3_MATCH_ID_GRAPHICS */
        PS3_MATCH_SUB_ID_FB             = 1,
@@ -47514,7 +47506,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3.h linux-2.6.27.19-5.1/arch/
  };
  
  /**
-@@ -516,4 +517,7 @@ void ps3_sync_irq(int node);
+@@ -516,4 +517,7 @@
  u32 ps3_get_hw_thread_id(int cpu);
  u64 ps3_get_spe_id(void *arg);
  
@@ -47522,10 +47514,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3.h linux-2.6.27.19-5.1/arch/
 +extern struct mutex ps3_gpu_mutex;
 +
  #endif
-diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3av.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3av.h
---- linux-2.6.27/arch/powerpc/include/asm/ps3av.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/ps3av.h       2009-03-25 16:10:54.000000000 +0000
-@@ -678,6 +678,8 @@ struct ps3av_pkt_avb_param {
+diff -r 9608d5473017 arch/powerpc/include/asm/ps3av.h
+--- a/arch/powerpc/include/asm/ps3av.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/ps3av.h Wed May 06 16:56:03 2009 +0100
+@@ -678,6 +678,8 @@
        u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE];
  };
  
@@ -47534,7 +47526,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3av.h linux-2.6.27.19-5.1/arc
  
  /** command status **/
  #define PS3AV_STATUS_SUCCESS                  0x0000  /* success */
-@@ -735,10 +737,8 @@ extern int ps3av_get_mode(void);
+@@ -735,10 +737,8 @@
  extern int ps3av_video_mode2res(u32, u32 *, u32 *);
  extern int ps3av_video_mute(int);
  extern int ps3av_audio_mute(int);
@@ -47546,9 +47538,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/ps3av.h linux-2.6.27.19-5.1/arc
 -extern void ps3av_flip_ctl(int on);
  
  #endif        /* _ASM_POWERPC_PS3AV_H_ */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/reg.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/reg.h
---- linux-2.6.27/arch/powerpc/include/asm/reg.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/reg.h 2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/reg.h
+--- a/arch/powerpc/include/asm/reg.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/reg.h   Wed May 06 16:56:03 2009 +0100
 @@ -698,6 +698,7 @@
  #define PV_POWER5     0x003A
  #define PV_POWER5p    0x003B
@@ -47557,9 +47549,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/reg.h linux-2.6.27.19-5.1/arch/
  #define PV_630                0x0040
  #define PV_630p       0x0041
  #define PV_970MP      0x0044
-diff -purN linux-2.6.27/arch/powerpc/include/asm/serial.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/serial.h
---- linux-2.6.27/arch/powerpc/include/asm/serial.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/serial.h      2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/serial.h
+--- a/arch/powerpc/include/asm/serial.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/serial.h        Wed May 06 16:56:03 2009 +0100
 @@ -15,6 +15,12 @@
  /* Default baud base if not found in device-tree */
  #define BASE_BAUD ( 1843200 / 16 )
@@ -47573,10 +47565,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/serial.h linux-2.6.27.19-5.1/ar
  #ifdef CONFIG_PPC_UDBG_16550
  extern void find_legacy_serial_ports(void);
  #else
-diff -purN linux-2.6.27/arch/powerpc/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/spinlock.h
---- linux-2.6.27/arch/powerpc/include/asm/spinlock.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/spinlock.h    2009-03-25 16:10:54.000000000 +0000
-@@ -287,6 +287,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 arch/powerpc/include/asm/spinlock.h
+--- a/arch/powerpc/include/asm/spinlock.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/spinlock.h      Wed May 06 16:56:03 2009 +0100
+@@ -287,6 +287,9 @@
        rw->lock = 0;
  }
  
@@ -47586,24 +47578,24 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/spinlock.h linux-2.6.27.19-5.1/
  #define _raw_spin_relax(lock) __spin_yield(lock)
  #define _raw_read_relax(lock) __rw_yield(lock)
  #define _raw_write_relax(lock)        __rw_yield(lock)
-diff -purN linux-2.6.27/arch/powerpc/include/asm/synch.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/synch.h
---- linux-2.6.27/arch/powerpc/include/asm/synch.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/synch.h       2009-03-25 16:10:54.000000000 +0000
-@@ -5,6 +5,10 @@
+diff -r 9608d5473017 arch/powerpc/include/asm/synch.h
+--- a/arch/powerpc/include/asm/synch.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/synch.h Wed May 06 16:56:03 2009 +0100
+@@ -4,6 +4,10 @@
  #include <linux/stringify.h>
  #include <asm/feature-fixups.h>
++
 +#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
 +#define __SUBARCH_HAS_LWSYNC
 +#endif
-+
  #ifndef __ASSEMBLY__
  extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
- extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
-diff -purN linux-2.6.27/arch/powerpc/include/asm/systbl.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/systbl.h
---- linux-2.6.27/arch/powerpc/include/asm/systbl.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/systbl.h      2009-03-25 16:10:54.000000000 +0000
-@@ -92,7 +92,7 @@ COMPAT_SYS_SPU(readlink)
+diff -r 9608d5473017 arch/powerpc/include/asm/systbl.h
+--- a/arch/powerpc/include/asm/systbl.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/systbl.h        Wed May 06 16:56:03 2009 +0100
+@@ -92,7 +92,7 @@
  SYSCALL(uselib)
  SYSCALL(swapon)
  SYSCALL(reboot)
@@ -47612,7 +47604,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/systbl.h linux-2.6.27.19-5.1/ar
  SYSCALL_SPU(mmap)
  SYSCALL_SPU(munmap)
  SYSCALL_SPU(truncate)
-@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid)
+@@ -145,7 +145,7 @@
  SYSCALL_SPU(setfsgid)
  SYSCALL_SPU(llseek)
  COMPAT_SYS_SPU(getdents)
@@ -47621,9 +47613,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/systbl.h linux-2.6.27.19-5.1/ar
  SYSCALL_SPU(flock)
  SYSCALL_SPU(msync)
  COMPAT_SYS_SPU(readv)
-diff -purN linux-2.6.27/arch/powerpc/include/asm/system.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/system.h
---- linux-2.6.27/arch/powerpc/include/asm/system.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/system.h      2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/system.h
+--- a/arch/powerpc/include/asm/system.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/system.h        Wed May 06 16:56:03 2009 +0100
 @@ -23,15 +23,17 @@
   * read_barrier_depends() prevents data-dependent loads being reordered
   *    across this point (nop on PPC).
@@ -47668,10 +47660,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/system.h linux-2.6.27.19-5.1/ar
  #define smp_read_barrier_depends()    read_barrier_depends()
  #else
  #define smp_mb()      barrier()
-diff -purN linux-2.6.27/arch/powerpc/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/thread_info.h
---- linux-2.6.27/arch/powerpc/include/asm/thread_info.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/thread_info.h 2009-03-25 16:10:54.000000000 +0000
-@@ -130,10 +130,12 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/powerpc/include/asm/thread_info.h
+--- a/arch/powerpc/include/asm/thread_info.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/thread_info.h   Wed May 06 16:56:03 2009 +0100
+@@ -130,10 +130,12 @@
  #define _TIF_FREEZE           (1<<TIF_FREEZE)
  #define _TIF_RUNLATCH         (1<<TIF_RUNLATCH)
  #define _TIF_ABI_PENDING      (1<<TIF_ABI_PENDING)
@@ -47685,9 +47677,9 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/thread_info.h linux-2.6.27.19-5
  #define _TIF_PERSYSCALL_MASK  (_TIF_RESTOREALL|_TIF_NOERROR)
  
  /* Bits in local_flags */
-diff -purN linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h linux-2.6.27.19-5.1/arch/powerpc/include/asm/vdso_datapage.h
---- linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/include/asm/vdso_datapage.h       2009-03-25 16:10:54.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/include/asm/vdso_datapage.h
+--- a/arch/powerpc/include/asm/vdso_datapage.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/include/asm/vdso_datapage.h Wed May 06 16:56:03 2009 +0100
 @@ -39,6 +39,7 @@
  #ifndef __ASSEMBLY__
  
@@ -47696,7 +47688,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h linux-2.6.27.19
  
  #define SYSCALL_MAP_SIZE      ((__NR_syscalls + 31) / 32)
  
-@@ -83,6 +84,7 @@ struct vdso_data {
+@@ -83,6 +84,7 @@
        __u32 icache_log_block_size;            /* L1 i-cache log block size */
        __s32 wtom_clock_sec;                   /* Wall to monotonic clock */
        __s32 wtom_clock_nsec;
@@ -47704,7 +47696,7 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h linux-2.6.27.19
        __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls  */
        __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
  };
-@@ -102,6 +104,7 @@ struct vdso_data {
+@@ -102,6 +104,7 @@
        __u32 tz_dsttime;               /* Type of dst correction       0x5C */
        __s32 wtom_clock_sec;                   /* Wall to monotonic clock */
        __s32 wtom_clock_nsec;
@@ -47712,10 +47704,10 @@ diff -purN linux-2.6.27/arch/powerpc/include/asm/vdso_datapage.h linux-2.6.27.19
        __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
        __u32 dcache_block_size;        /* L1 d-cache block size     */
        __u32 icache_block_size;        /* L1 i-cache block size     */
-diff -purN linux-2.6.27/arch/powerpc/kernel/align.c linux-2.6.27.19-5.1/arch/powerpc/kernel/align.c
---- linux-2.6.27/arch/powerpc/kernel/align.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/align.c    2009-03-25 16:10:54.000000000 +0000
-@@ -367,27 +367,24 @@ static int emulate_multiple(struct pt_re
+diff -r 9608d5473017 arch/powerpc/kernel/align.c
+--- a/arch/powerpc/kernel/align.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/align.c      Wed May 06 16:56:03 2009 +0100
+@@ -367,27 +367,24 @@
  static int emulate_fp_pair(unsigned char __user *addr, unsigned int reg,
                           unsigned int flags)
  {
@@ -47756,7 +47748,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/align.c linux-2.6.27.19-5.1/arch/pow
                }
        }
        if (ret)
-@@ -646,11 +643,16 @@ static int emulate_vsx(unsigned char __u
+@@ -646,10 +643,15 @@
                       unsigned int areg, struct pt_regs *regs,
                       unsigned int flags, unsigned int length)
  {
@@ -47765,19 +47757,18 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/align.c linux-2.6.27.19-5.1/arch/pow
        int ret = 0;
  
        flush_vsx_to_thread(current);
++
 +      if (reg < 32)
 +              ptr = (char *) &current->thread.TS_FPR(reg);
 +      else
 +              ptr = (char *) &current->thread.vr[reg - 32];
-+
        if (flags & ST)
                ret = __copy_to_user(addr, ptr, length);
-         else {
-diff -purN linux-2.6.27/arch/powerpc/kernel/asm-offsets.c linux-2.6.27.19-5.1/arch/powerpc/kernel/asm-offsets.c
---- linux-2.6.27/arch/powerpc/kernel/asm-offsets.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/asm-offsets.c      2009-03-25 16:10:54.000000000 +0000
-@@ -304,6 +304,7 @@ int main(void)
+diff -r 9608d5473017 arch/powerpc/kernel/asm-offsets.c
+--- a/arch/powerpc/kernel/asm-offsets.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/asm-offsets.c        Wed May 06 16:56:03 2009 +0100
+@@ -304,6 +304,7 @@
        DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
        DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
        DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
@@ -47785,10 +47776,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/asm-offsets.c linux-2.6.27.19-5.1/ar
        DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size));
        DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size));
        DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size));
-diff -purN linux-2.6.27/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6.27.19-5.1/arch/powerpc/kernel/cpu_setup_44x.S
---- linux-2.6.27/arch/powerpc/kernel/cpu_setup_44x.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/cpu_setup_44x.S    2009-03-25 16:10:54.000000000 +0000
-@@ -35,6 +35,7 @@ _GLOBAL(__setup_cpu_440grx)
+diff -r 9608d5473017 arch/powerpc/kernel/cpu_setup_44x.S
+--- a/arch/powerpc/kernel/cpu_setup_44x.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/cpu_setup_44x.S      Wed May 06 16:56:03 2009 +0100
+@@ -35,6 +35,7 @@
  _GLOBAL(__setup_cpu_460ex)
  _GLOBAL(__setup_cpu_460gt)
        b       __init_fpu_44x
@@ -47796,10 +47787,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/cpu_setup_44x.S linux-2.6.27.19-5.1/
  _GLOBAL(__setup_cpu_440gx)
  _GLOBAL(__setup_cpu_440spe)
        b       __fixup_440A_mcheck
-diff -purN linux-2.6.27/arch/powerpc/kernel/cputable.c linux-2.6.27.19-5.1/arch/powerpc/kernel/cputable.c
---- linux-2.6.27/arch/powerpc/kernel/cputable.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/cputable.c 2009-03-25 16:10:53.000000000 +0000
-@@ -39,6 +39,7 @@ extern void __setup_cpu_440epx(unsigned 
+diff -r 9608d5473017 arch/powerpc/kernel/cputable.c
+--- a/arch/powerpc/kernel/cputable.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/cputable.c   Wed May 06 16:56:03 2009 +0100
+@@ -39,6 +39,7 @@
  extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
  extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
  extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
@@ -47807,7 +47798,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/cputable.c linux-2.6.27.19-5.1/arch/
  extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
  extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
  extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
-@@ -1463,6 +1464,8 @@ static struct cpu_spec __initdata cpu_sp
+@@ -1463,6 +1464,8 @@
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
@@ -47816,9 +47807,9 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/cputable.c linux-2.6.27.19-5.1/arch/
                .platform               = "ppc440",
        },
        { /* 460EX */
-diff -purN linux-2.6.27/arch/powerpc/kernel/entry_32.S linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_32.S
---- linux-2.6.27/arch/powerpc/kernel/entry_32.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_32.S 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/kernel/entry_32.S
+--- a/arch/powerpc/kernel/entry_32.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/entry_32.S   Wed May 06 16:56:03 2009 +0100
 @@ -39,7 +39,7 @@
   * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
   */
@@ -47828,10 +47819,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/entry_32.S linux-2.6.27.19-5.1/arch/
  #else
  #define LOAD_MSR_KERNEL(r, x) li r,(x)
  #endif
-diff -purN linux-2.6.27/arch/powerpc/kernel/entry_64.S linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_64.S
---- linux-2.6.27/arch/powerpc/kernel/entry_64.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/entry_64.S 2009-03-25 16:10:53.000000000 +0000
-@@ -57,12 +57,12 @@ system_call_common:
+diff -r 9608d5473017 arch/powerpc/kernel/entry_64.S
+--- a/arch/powerpc/kernel/entry_64.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/entry_64.S   Wed May 06 16:56:03 2009 +0100
+@@ -57,12 +57,12 @@
        beq-    1f
        ld      r1,PACAKSAVE(r13)
  1:    std     r10,0(r1)
@@ -47845,7 +47836,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/entry_64.S linux-2.6.27.19-5.1/arch/
        std     r2,GPR2(r1)
        std     r3,GPR3(r1)
        std     r4,GPR4(r1)
-@@ -643,6 +643,10 @@ user_work:
+@@ -643,6 +643,10 @@
        b       .ret_from_except_lite
  
  1:    bl      .save_nvgprs
@@ -47856,10 +47847,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/entry_64.S linux-2.6.27.19-5.1/arch/
        addi    r3,r1,STACK_FRAME_OVERHEAD
        bl      .do_signal
        b       .ret_from_except
-diff -purN linux-2.6.27/arch/powerpc/kernel/irq.c linux-2.6.27.19-5.1/arch/powerpc/kernel/irq.c
---- linux-2.6.27/arch/powerpc/kernel/irq.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/irq.c      2009-03-25 16:10:53.000000000 +0000
-@@ -104,6 +104,24 @@ static inline notrace void set_soft_enab
+diff -r 9608d5473017 arch/powerpc/kernel/irq.c
+--- a/arch/powerpc/kernel/irq.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/irq.c        Wed May 06 16:56:03 2009 +0100
+@@ -104,6 +104,24 @@
        : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled)));
  }
  
@@ -47884,10 +47875,11 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/irq.c linux-2.6.27.19-5.1/arch/power
  notrace void raw_local_irq_restore(unsigned long en)
  {
        /*
-@@ -162,6 +180,19 @@ notrace void raw_local_irq_restore(unsig
+@@ -161,6 +179,19 @@
+               u64 tmp;
                lv1_get_version_info(&tmp);
        }
++
 +#ifdef CONFIG_PERFMON
 +      /*
 +       * If a PMU exception occurred while interrupts were soft disabled,
@@ -47900,14 +47892,13 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/irq.c linux-2.6.27.19-5.1/arch/power
 +              mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) | MMCR0_PMAO);
 +      }
 +#endif /* CONFIG_PERFMON */
-+
        __hard_irq_enable();
  }
- EXPORT_SYMBOL(raw_local_irq_restore);
-diff -purN linux-2.6.27/arch/powerpc/kernel/legacy_serial.c linux-2.6.27.19-5.1/arch/powerpc/kernel/legacy_serial.c
---- linux-2.6.27/arch/powerpc/kernel/legacy_serial.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/legacy_serial.c    2009-03-25 16:10:53.000000000 +0000
-@@ -494,6 +494,55 @@ device_initcall(serial_dev_init);
+diff -r 9608d5473017 arch/powerpc/kernel/legacy_serial.c
+--- a/arch/powerpc/kernel/legacy_serial.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/legacy_serial.c      Wed May 06 16:56:04 2009 +0100
+@@ -494,6 +494,55 @@
  
  
  #ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -47963,7 +47954,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/legacy_serial.c linux-2.6.27.19-5.1/
  /*
   * This is called very early, as part of console_init() (typically just after
   * time_init()). This function is respondible for trying to find a good
-@@ -562,6 +611,9 @@ static int __init check_legacy_serial_co
+@@ -562,6 +611,9 @@
        if (i >= legacy_serial_count)
                goto not_found;
  
@@ -47973,28 +47964,28 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/legacy_serial.c linux-2.6.27.19-5.1/
        of_node_put(prom_stdout);
  
        DBG("Found serial console at ttyS%d\n", offset);
-diff -purN linux-2.6.27/arch/powerpc/kernel/machine_kexec.c linux-2.6.27.19-5.1/arch/powerpc/kernel/machine_kexec.c
---- linux-2.6.27/arch/powerpc/kernel/machine_kexec.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/machine_kexec.c    2009-03-25 16:10:53.000000000 +0000
-@@ -44,6 +44,14 @@ void machine_kexec_cleanup(struct kimage
+diff -r 9608d5473017 arch/powerpc/kernel/machine_kexec.c
+--- a/arch/powerpc/kernel/machine_kexec.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/machine_kexec.c      Wed May 06 16:56:04 2009 +0100
+@@ -42,6 +42,14 @@
+ {
+       if (ppc_md.machine_kexec_cleanup)
                ppc_md.machine_kexec_cleanup(image);
- }
++}
++
 +void arch_crash_save_vmcoreinfo(void)
 +{
 +#ifdef CONFIG_NEED_MULTIPLE_NODES
 +      VMCOREINFO_SYMBOL(node_data);
 +      VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
 +#endif
-+}
-+
+ }
  /*
-  * Do not allocate memory (or fail in any way) in machine_kexec().
-  * We are past the point of no return, committed to rebooting now.
-diff -purN linux-2.6.27/arch/powerpc/kernel/of_platform.c linux-2.6.27.19-5.1/arch/powerpc/kernel/of_platform.c
---- linux-2.6.27/arch/powerpc/kernel/of_platform.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/of_platform.c      2009-03-25 16:10:53.000000000 +0000
-@@ -307,6 +307,7 @@ static struct of_device_id of_pci_phb_id
+diff -r 9608d5473017 arch/powerpc/kernel/of_platform.c
+--- a/arch/powerpc/kernel/of_platform.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/of_platform.c        Wed May 06 16:56:04 2009 +0100
+@@ -307,6 +307,7 @@
  };
  
  static struct of_platform_driver of_pci_phb_driver = {
@@ -48002,10 +47993,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/of_platform.c linux-2.6.27.19-5.1/ar
        .match_table = of_pci_phb_ids,
        .probe = of_pci_phb_probe,
        .driver = {
-diff -purN linux-2.6.27/arch/powerpc/kernel/paca.c linux-2.6.27.19-5.1/arch/powerpc/kernel/paca.c
---- linux-2.6.27/arch/powerpc/kernel/paca.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/paca.c     2009-03-25 16:10:53.000000000 +0000
-@@ -36,6 +36,7 @@ struct lppaca lppaca[] = {
+diff -r 9608d5473017 arch/powerpc/kernel/paca.c
+--- a/arch/powerpc/kernel/paca.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/paca.c       Wed May 06 16:56:04 2009 +0100
+@@ -36,6 +36,7 @@
                .end_of_quantum = 0xfffffffffffffffful,
                .slb_count = 64,
                .vmxregs_in_use = 0,
@@ -48013,10 +48004,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/paca.c linux-2.6.27.19-5.1/arch/powe
        },
  };
  
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci-common.c
---- linux-2.6.27/arch/powerpc/kernel/pci-common.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci-common.c       2009-03-25 16:10:54.000000000 +0000
-@@ -789,63 +789,78 @@ static void __devinit pcibios_fixup_reso
+diff -r 9608d5473017 arch/powerpc/kernel/pci-common.c
+--- a/arch/powerpc/kernel/pci-common.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci-common.c Wed May 06 16:56:04 2009 +0100
+@@ -789,63 +789,78 @@
  }
  DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
  
@@ -48069,12 +48060,6 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 -                              res->flags = 0;
 -                              continue;
 -                      }
--
--                      pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
--                               pci_name(dev), i,
--                               (unsigned long long)res->start,\
--                               (unsigned long long)res->end,
--                               (unsigned int)res->flags);
 +      for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
 +              if ((res = bus->resource[i]) == NULL)
 +                      continue;
@@ -48083,7 +48068,11 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +              if (i >= 3 && bus->self->transparent)
 +                      continue;
  
--                      fixup_resource(res, dev);
+-                      pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
+-                               pci_name(dev), i,
+-                               (unsigned long long)res->start,\
+-                               (unsigned long long)res->end,
+-                               (unsigned int)res->flags);
 +              /* On PowerMac, Apple leaves bridge windows open over
 +               * an inaccessible region of memory space (0...fffff)
 +               * which is somewhat bogus, but that's what they think
@@ -48104,8 +48093,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +                             i, bus->number);
 +                      res->flags = 0;
 +                      continue;
-               }
-+
++              }
+-                      fixup_resource(res, dev);
+-              }
 +              pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
 +                       pci_name(dev), i,
 +                       (unsigned long long)res->start,\
@@ -48117,10 +48108,12 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
  
 +host_bridge:
 +
-+      /* Additional setup that is different between 32 and 64 bits for now */
+       /* Additional setup that is different between 32 and 64 bits for now */
+-      pcibios_do_bus_setup(bus);
 +      pcibios_do_bus_setup_self(bus);
 +}
-+
+-      /* Platform specific bus fixups */
 +void __devinit pcibios_fixup_bus_devices(struct pci_bus *bus)
 +{
 +      struct pci_dev *dev = bus->self;
@@ -48128,16 +48121,14 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +      pr_debug("PCI: Fixup bus devices %d (%s)\n",
 +               bus->number, dev ? pci_name(dev) : "PHB");
 +
-       /* Additional setup that is different between 32 and 64 bits for now */
--      pcibios_do_bus_setup(bus);
++      /* Additional setup that is different between 32 and 64 bits for now */
 +      pcibios_do_bus_setup_devices(bus);
--      /* Platform specific bus fixups */
++
 +      /* Platform specific bus fixups (XXX Get rid of these !) */
        if (ppc_md.pcibios_fixup_bus)
                ppc_md.pcibios_fixup_bus(bus);
  
-@@ -864,19 +879,11 @@ void __devinit pcibios_fixup_bus(struct 
+@@ -864,18 +879,10 @@
         */
        if (bus->self != NULL)
                pci_read_bridge_bases(bus);
@@ -48146,7 +48137,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +      pcibios_fixup_bus_devices(bus);
  }
  EXPORT_SYMBOL(pcibios_fixup_bus);
+-
 -/* When building a bus from the OF tree rather than probing, we need a
 - * slightly different version of the fixup which doesn't read the
 - * bridge bases using config space accesses
@@ -48155,11 +48146,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 -{
 -      __pcibios_fixup_bus(bus);
 -}
--
  static int skip_isa_ioresource_align(struct pci_dev *dev)
  {
-       if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
-@@ -986,70 +993,71 @@ static int __init reparent_resources(str
+@@ -986,70 +993,71 @@
   *        as well.
   */
  
@@ -48176,47 +48166,9 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 -              for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
 -                      if ((res = bus->resource[i]) == NULL || !res->flags
 -                          || res->start > res->end)
--                              continue;
--                      if (bus->parent == NULL)
--                              pr = (res->flags & IORESOURCE_IO) ?
--                                      &ioport_resource : &iomem_resource;
--                      else {
--                              /* Don't bother with non-root busses when
--                               * re-assigning all resources. We clear the
--                               * resource flags as if they were colliding
--                               * and as such ensure proper re-allocation
--                               * later.
--                               */
--                              if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
--                                      goto clear_resource;
--                              pr = pci_find_parent_resource(bus->self, res);
--                              if (pr == res) {
--                                      /* this happens when the generic PCI
--                                       * code (wrongly) decides that this
--                                       * bridge is transparent  -- paulus
--                                       */
--                                      continue;
--                              }
--                      }
 +      DBG("PCI: Allocating bus resources for %04x:%02x...\n",
 +          pci_domain_nr(bus), bus->number);
--                      DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
--                          "[0x%x], parent %p (%s)\n",
--                          bus->self ? pci_name(bus->self) : "PHB",
--                          bus->number, i,
--                          (unsigned long long)res->start,
--                          (unsigned long long)res->end,
--                          (unsigned int)res->flags,
--                          pr, (pr && pr->name) ? pr->name : "nil");
--
--                      if (pr && !(pr->flags & IORESOURCE_UNSET)) {
--                              if (request_resource(pr, res) == 0)
--                                      continue;
--                              /*
--                               * Must be a conflict with an existing entry.
--                               * Move that entry (or entries) under the
--                               * bridge resource and try again.
++
 +      for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
 +              if ((res = bus->resource[i]) == NULL || !res->flags
 +                  || res->start > res->end || res->parent)
@@ -48238,20 +48190,39 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +                              /* this happens when the generic PCI
 +                               * code (wrongly) decides that this
 +                               * bridge is transparent  -- paulus
-                                */
--                              if (reparent_resources(pr, res) == 0)
++                               */
+                               continue;
+-                      if (bus->parent == NULL)
+-                              pr = (res->flags & IORESOURCE_IO) ?
+-                                      &ioport_resource : &iomem_resource;
+-                      else {
+-                              /* Don't bother with non-root busses when
+-                               * re-assigning all resources. We clear the
+-                               * resource flags as if they were colliding
+-                               * and as such ensure proper re-allocation
+-                               * later.
+-                               */
+-                              if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
+-                                      goto clear_resource;
+-                              pr = pci_find_parent_resource(bus->self, res);
+-                              if (pr == res) {
+-                                      /* this happens when the generic PCI
+-                                       * code (wrongly) decides that this
+-                                       * bridge is transparent  -- paulus
+-                                       */
 -                                      continue;
-+                              continue;
+-                              }
                        }
--                      printk(KERN_WARNING
--                             "PCI: Cannot allocate resource region "
--                             "%d of PCI bridge %d, will remap\n",
--                             i, bus->number);
--clear_resource:
--                      res->flags = 0;
-               }
--              pcibios_allocate_bus_resources(&bus->children);
-+
++              }
+-                      DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
+-                          "[0x%x], parent %p (%s)\n",
+-                          bus->self ? pci_name(bus->self) : "PHB",
+-                          bus->number, i,
+-                          (unsigned long long)res->start,
+-                          (unsigned long long)res->end,
+-                          (unsigned int)res->flags,
+-                          pr, (pr && pr->name) ? pr->name : "nil");
 +              DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
 +                  "[0x%x], parent %p (%s)\n",
 +                  bus->self ? pci_name(bus->self) : "PHB",
@@ -48260,7 +48231,22 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +                  (unsigned long long)res->end,
 +                  (unsigned int)res->flags,
 +                  pr, (pr && pr->name) ? pr->name : "nil");
-+
+-                      if (pr && !(pr->flags & IORESOURCE_UNSET)) {
+-                              if (request_resource(pr, res) == 0)
+-                                      continue;
+-                              /*
+-                               * Must be a conflict with an existing entry.
+-                               * Move that entry (or entries) under the
+-                               * bridge resource and try again.
+-                               */
+-                              if (reparent_resources(pr, res) == 0)
+-                                      continue;
+-                      }
+-                      printk(KERN_WARNING
+-                             "PCI: Cannot allocate resource region "
+-                             "%d of PCI bridge %d, will remap\n",
+-                             i, bus->number);
 +              if (pr && !(pr->flags & IORESOURCE_UNSET)) {
 +                      if (request_resource(pr, res) == 0)
 +                              continue;
@@ -48274,7 +48260,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
 +              }
 +              printk(KERN_WARNING "PCI: Cannot allocate resource region "
 +                     "%d of PCI bridge %d, will remap\n", i, bus->number);
-+clear_resource:
+ clear_resource:
+-                      res->flags = 0;
+-              }
+-              pcibios_allocate_bus_resources(&bus->children);
 +              res->flags = 0;
        }
 +
@@ -48285,7 +48274,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
  
  static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
  {
-@@ -1119,10 +1127,13 @@ static void __init pcibios_allocate_reso
+@@ -1119,10 +1127,13 @@
  
  void __init pcibios_resource_survey(void)
  {
@@ -48300,7 +48289,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
  
        if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
                pcibios_allocate_resources(0);
-@@ -1157,6 +1168,13 @@ void __devinit pcibios_claim_one_bus(str
+@@ -1157,6 +1168,13 @@
  
                        if (r->parent || !r->start || !r->flags)
                                continue;
@@ -48314,10 +48303,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci-common.c linux-2.6.27.19-5.1/arc
                        pci_claim_resource(dev, i);
                }
        }
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci_32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_32.c
---- linux-2.6.27/arch/powerpc/kernel/pci_32.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_32.c   2009-03-25 16:10:53.000000000 +0000
-@@ -418,7 +418,7 @@ static int __init pcibios_init(void)
+diff -r 9608d5473017 arch/powerpc/kernel/pci_32.c
+--- a/arch/powerpc/kernel/pci_32.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci_32.c     Wed May 06 16:56:04 2009 +0100
+@@ -418,7 +418,7 @@
  
  subsys_initcall(pcibios_init);
  
@@ -48326,21 +48315,21 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_32.c linux-2.6.27.19-5.1/arch/po
  {
        struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
        unsigned long io_offset;
-@@ -459,6 +459,10 @@ void __devinit pcibios_do_bus_setup(stru
+@@ -457,6 +457,10 @@
+                       bus->resource[i+1] = res;
+               }
        }
- }
-+void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
-+{
 +}
 +
++void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
++{
+ }
  /* the next one is stolen from the alpha port... */
- void __init
- pcibios_update_irq(struct pci_dev *dev, int irq)
-diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_64.c
---- linux-2.6.27/arch/powerpc/kernel/pci_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/pci_64.c   2009-03-25 16:10:53.000000000 +0000
-@@ -225,14 +225,16 @@ struct pci_dev *of_create_pci_dev(struct
+diff -r 9608d5473017 arch/powerpc/kernel/pci_64.c
+--- a/arch/powerpc/kernel/pci_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/pci_64.c     Wed May 06 16:56:04 2009 +0100
+@@ -225,14 +225,16 @@
  EXPORT_SYMBOL(of_create_pci_dev);
  
  void __devinit of_scan_bus(struct device_node *node,
@@ -48359,7 +48348,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/po
  
        /* Scan direct children */
        for_each_child_of_node(node, child) {
-@@ -249,8 +251,12 @@ void __devinit of_scan_bus(struct device
+@@ -249,8 +251,12 @@
                DBG("    dev header type: %x\n", dev->hdr_type);
        }
  
@@ -48374,7 +48363,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/po
  
        /* Now scan child busses */
        list_for_each_entry(dev, &bus->devices, bus_list) {
-@@ -346,7 +352,7 @@ void __devinit of_scan_pci_bridge(struct
+@@ -346,7 +352,7 @@
        DBG("    probe mode: %d\n", mode);
  
        if (mode == PCI_PROBE_DEVTREE)
@@ -48383,7 +48372,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/po
        else if (mode == PCI_PROBE_NORMAL)
                pci_scan_child_bus(bus);
  }
-@@ -396,7 +402,7 @@ void __devinit scan_phb(struct pci_contr
+@@ -396,7 +402,7 @@
        DBG("    probe mode: %d\n", mode);
        if (mode == PCI_PROBE_DEVTREE) {
                bus->subordinate = hose->last_busno;
@@ -48392,7 +48381,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/po
        }
  
        if (mode == PCI_PROBE_NORMAL)
-@@ -455,7 +461,7 @@ int pcibios_unmap_io_space(struct pci_bu
+@@ -455,7 +461,7 @@
                    pci_name(bus->self));
  
                __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
@@ -48401,38 +48390,39 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/pci_64.c linux-2.6.27.19-5.1/arch/po
                return 0;
        }
  
-@@ -568,12 +574,15 @@ void __devinit pcibios_setup_new_device(
+@@ -568,12 +574,15 @@
  }
  EXPORT_SYMBOL(pcibios_setup_new_device);
  
 -void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
 +void __devinit pcibios_do_bus_setup_self(struct pci_bus *bus)
- {
--      struct pci_dev *dev;
--
-       if (ppc_md.pci_dma_bus_setup)
-               ppc_md.pci_dma_bus_setup(bus);
++{
++      if (ppc_md.pci_dma_bus_setup)
++              ppc_md.pci_dma_bus_setup(bus);
 +}
 +
 +void __devinit pcibios_do_bus_setup_devices(struct pci_bus *bus)
-+{
-+      struct pci_dev *dev;
+ {
+       struct pci_dev *dev;
+-
+-      if (ppc_md.pci_dma_bus_setup)
+-              ppc_md.pci_dma_bus_setup(bus);
  
        list_for_each_entry(dev, &bus->devices, bus_list)
                pcibios_setup_new_device(dev);
-diff -purN linux-2.6.27/arch/powerpc/kernel/ppc32.h linux-2.6.27.19-5.1/arch/powerpc/kernel/ppc32.h
---- linux-2.6.27/arch/powerpc/kernel/ppc32.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/ppc32.h    2009-03-25 16:10:54.000000000 +0000
-@@ -136,4 +136,6 @@ struct ucontext32 { 
+diff -r 9608d5473017 arch/powerpc/kernel/ppc32.h
+--- a/arch/powerpc/kernel/ppc32.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/ppc32.h      Wed May 06 16:56:04 2009 +0100
+@@ -136,4 +136,6 @@
        struct mcontext32       uc_mcontext;
  };
  
 +extern int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s);
 +
  #endif  /* _PPC64_PPC32_H */
-diff -purN linux-2.6.27/arch/powerpc/kernel/process.c linux-2.6.27.19-5.1/arch/powerpc/kernel/process.c
---- linux-2.6.27/arch/powerpc/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/process.c  2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/kernel/process.c
+--- a/arch/powerpc/kernel/process.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/process.c    Wed May 06 16:56:04 2009 +0100
 @@ -33,6 +33,7 @@
  #include <linux/mqueue.h>
  #include <linux/hardirq.h>
@@ -48441,23 +48431,22 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/process.c linux-2.6.27.19-5.1/arch/p
  
  #include <asm/pgtable.h>
  #include <asm/uaccess.h>
-@@ -393,9 +394,14 @@ struct task_struct *__switch_to(struct t
+@@ -393,8 +394,13 @@
                new_thread->start_tb = current_tb;
        }
  #endif
--
-       local_irq_save(flags);
++      local_irq_save(flags);
  
+-      local_irq_save(flags);
 +      if (test_tsk_thread_flag(prev, TIF_PERFMON_CTXSW))
 +              pfm_ctxsw_out(prev, new);
 +
 +      if (test_tsk_thread_flag(new, TIF_PERFMON_CTXSW))
 +              pfm_ctxsw_in(prev, new);
-+
        account_system_vtime(current);
        account_process_vtime(current);
-       calculate_steal_time();
-@@ -544,6 +550,7 @@ void show_regs(struct pt_regs * regs)
+@@ -544,6 +550,7 @@
  void exit_thread(void)
  {
        discard_lazy_cpu_state();
@@ -48465,7 +48454,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/process.c linux-2.6.27.19-5.1/arch/p
  }
  
  void flush_thread(void)
-@@ -669,6 +676,7 @@ int copy_thread(int nr, unsigned long cl
+@@ -669,6 +676,7 @@
  #else
        kregs->nip = (unsigned long)ret_from_fork;
  #endif
@@ -48473,10 +48462,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/process.c linux-2.6.27.19-5.1/arch/p
  
        return 0;
  }
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom.c
---- linux-2.6.27/arch/powerpc/kernel/prom.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom.c     2009-03-25 16:10:54.000000000 +0000
-@@ -888,9 +888,10 @@ static u64 __init dt_mem_next_cell(int s
+diff -r 9608d5473017 arch/powerpc/kernel/prom.c
+--- a/arch/powerpc/kernel/prom.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom.c       Wed May 06 16:56:04 2009 +0100
+@@ -888,9 +888,10 @@
   */
  static int __init early_init_dt_scan_drconf_memory(unsigned long node)
  {
@@ -48488,7 +48477,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom.c linux-2.6.27.19-5.1/arch/powe
  
        ls = (cell_t *)of_get_flat_dt_prop(node, "ibm,lmb-size", &l);
        if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t))
-@@ -905,6 +906,12 @@ static int __init early_init_dt_scan_drc
+@@ -905,6 +906,12 @@
        if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(cell_t))
                return 0;
  
@@ -48501,7 +48490,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom.c linux-2.6.27.19-5.1/arch/powe
        for (; n != 0; --n) {
                base = dt_mem_next_cell(dt_root_addr_cells, &dm);
                flags = dm[3];
-@@ -915,13 +922,34 @@ static int __init early_init_dt_scan_drc
+@@ -915,13 +922,34 @@
                if ((flags & 0x80) || !(flags & 0x8))
                        continue;
                size = lmb_size;
@@ -48541,10 +48530,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom.c linux-2.6.27.19-5.1/arch/powe
        }
        lmb_dump_all();
        return 0;
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_init.c
---- linux-2.6.27/arch/powerpc/kernel/prom_init.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_init.c        2009-03-25 16:10:53.000000000 +0000
-@@ -172,6 +172,7 @@ static unsigned long __initdata dt_strin
+diff -r 9608d5473017 arch/powerpc/kernel/prom_init.c
+--- a/arch/powerpc/kernel/prom_init.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom_init.c  Wed May 06 16:56:04 2009 +0100
+@@ -172,6 +172,7 @@
  
  static unsigned long __initdata prom_initrd_start, prom_initrd_end;
  
@@ -48552,7 +48541,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
  #ifdef CONFIG_PPC64
  static int __initdata prom_iommu_force_on;
  static int __initdata prom_iommu_off;
-@@ -555,9 +556,7 @@ unsigned long prom_memparse(const char *
+@@ -555,9 +556,7 @@
  static void __init early_cmdline_parse(void)
  {
        struct prom_t *_prom = &RELOC(prom);
@@ -48562,7 +48551,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
        char *p;
        int l = 0;
  
-@@ -572,6 +571,14 @@ static void __init early_cmdline_parse(v
+@@ -572,6 +571,14 @@
  #endif /* CONFIG_CMDLINE */
        prom_printf("command line: %s\n", RELOC(prom_cmd_line));
  
@@ -48577,7 +48566,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
  #ifdef CONFIG_PPC64
        opt = strstr(RELOC(prom_cmd_line), RELOC("iommu="));
        if (opt) {
-@@ -2189,6 +2196,7 @@ static void __init fixup_device_tree_efi
+@@ -2189,6 +2196,7 @@
  
  static void __init fixup_device_tree_efika(void)
  {
@@ -48585,7 +48574,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
        int sound_irq[3] = { 2, 2, 0 };
        int bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
                                3,4,0, 3,5,0, 3,6,0, 3,7,0,
-@@ -2244,6 +2252,8 @@ static void __init fixup_device_tree_efi
+@@ -2244,6 +2252,8 @@
                        prom_printf("Adding sound interrupts property\n");
                        prom_setprop(node, "/builtin/sound", "interrupts",
                                     sound_irq, sizeof(sound_irq));
@@ -48594,7 +48583,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
                }
        }
  
-@@ -2397,6 +2407,7 @@ unsigned long __init prom_init(unsigned 
+@@ -2397,6 +2407,7 @@
        /* 
         * Initialize display devices
         */
@@ -48602,10 +48591,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_init.c linux-2.6.27.19-5.1/arch
        prom_check_displays();
  
  #ifdef CONFIG_PPC64
-diff -purN linux-2.6.27/arch/powerpc/kernel/prom_parse.c linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_parse.c
---- linux-2.6.27/arch/powerpc/kernel/prom_parse.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/prom_parse.c       2009-03-25 16:10:53.000000000 +0000
-@@ -250,8 +250,11 @@ int of_irq_map_pci(struct pci_dev *pdev,
+diff -r 9608d5473017 arch/powerpc/kernel/prom_parse.c
+--- a/arch/powerpc/kernel/prom_parse.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/prom_parse.c Wed May 06 16:56:04 2009 +0100
+@@ -250,8 +250,11 @@
         * parsing
         */
        dn = pci_device_to_OF_node(pdev);
@@ -48619,10 +48608,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/prom_parse.c linux-2.6.27.19-5.1/arc
  
        /* Ok, we don't, time to have fun. Let's start by building up an
         * interrupt spec.  we assume #interrupt-cells is 1, which is standard
-diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/ptrace32.c
---- linux-2.6.27/arch/powerpc/kernel/ptrace32.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/ptrace32.c 2009-03-25 16:10:53.000000000 +0000
-@@ -29,12 +29,15 @@
+diff -r 9608d5473017 arch/powerpc/kernel/ptrace32.c
+--- a/arch/powerpc/kernel/ptrace32.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/ptrace32.c   Wed May 06 16:56:04 2009 +0100
+@@ -29,11 +29,14 @@
  #include <linux/security.h>
  #include <linux/signal.h>
  #include <linux/compat.h>
@@ -48632,16 +48621,16 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/
  #include <asm/page.h>
  #include <asm/pgtable.h>
  #include <asm/system.h>
-+#include "ppc32.h"
 +
++#include "ppc32.h"
  /*
   * does not yet catch signals sent when the child dies.
-  * in exit.c or in signal.c.
-@@ -69,6 +72,27 @@ static long compat_ptrace_old(struct tas
+@@ -68,6 +71,27 @@
+ #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1)
  #define FPRHALF(i) (((i) - PT_FPR0) & 1)
  #define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i)
++
 +static int compat_ptrace_getsiginfo(struct task_struct *child, compat_siginfo_t __user *data)
 +{
 +      siginfo_t lastinfo;
@@ -48662,11 +48651,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/
 +              return copy_siginfo_to_user32(data, &lastinfo);
 +      return error;
 +}
-+
  long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
                        compat_ulong_t caddr, compat_ulong_t cdata)
- {
-@@ -290,6 +314,9 @@ long compat_arch_ptrace(struct task_stru
+@@ -290,6 +314,9 @@
                        0, PT_REGS_COUNT * sizeof(compat_long_t),
                        compat_ptr(data));
  
@@ -48676,10 +48664,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/ptrace32.c linux-2.6.27.19-5.1/arch/
        case PTRACE_GETFPREGS:
        case PTRACE_SETFPREGS:
        case PTRACE_GETVRREGS:
-diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas.c
---- linux-2.6.27/arch/powerpc/kernel/rtas.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas.c     2009-03-25 16:10:53.000000000 +0000
-@@ -46,6 +46,7 @@ EXPORT_SYMBOL(rtas);
+diff -r 9608d5473017 arch/powerpc/kernel/rtas.c
+--- a/arch/powerpc/kernel/rtas.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/rtas.c       Wed May 06 16:56:04 2009 +0100
+@@ -46,6 +46,7 @@
  
  struct rtas_suspend_me_data {
        atomic_t working; /* number of cpus accessing this struct */
@@ -48687,7 +48675,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powe
        int token; /* ibm,suspend-me */
        int error;
        struct completion *complete; /* wait on this until working == 0 */
-@@ -663,7 +664,7 @@ static int ibm_suspend_me_token = RTAS_U
+@@ -663,7 +664,7 @@
  #ifdef CONFIG_PPC_PSERIES
  static void rtas_percpu_suspend_me(void *info)
  {
@@ -48696,7 +48684,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powe
        unsigned long msr_save;
        int cpu;
        struct rtas_suspend_me_data *data =
-@@ -675,7 +676,8 @@ static void rtas_percpu_suspend_me(void 
+@@ -675,7 +676,8 @@
        msr_save = mfmsr();
        mtmsr(msr_save & ~(MSR_EE));
  
@@ -48706,7 +48694,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powe
  
        mtmsr(msr_save);
  
-@@ -698,6 +700,9 @@ static void rtas_percpu_suspend_me(void 
+@@ -698,6 +700,9 @@
                       smp_processor_id(), rc);
                data->error = rc;
        }
@@ -48716,7 +48704,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powe
        /* This cpu did the suspend or got an error; in either case,
         * we need to prod all other other cpus out of join state.
         * Extra prods are harmless.
-@@ -740,6 +745,7 @@ static int rtas_ibm_suspend_me(struct rt
+@@ -740,6 +745,7 @@
        }
  
        atomic_set(&data.working, 0);
@@ -48724,10 +48712,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas.c linux-2.6.27.19-5.1/arch/powe
        data.token = rtas_token("ibm,suspend-me");
        data.error = 0;
        data.complete = &done;
-diff -purN linux-2.6.27/arch/powerpc/kernel/rtas_pci.c linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas_pci.c
---- linux-2.6.27/arch/powerpc/kernel/rtas_pci.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/rtas_pci.c 2009-03-25 16:10:53.000000000 +0000
-@@ -301,51 +301,3 @@ void __init find_and_init_phbs(void)
+diff -r 9608d5473017 arch/powerpc/kernel/rtas_pci.c
+--- a/arch/powerpc/kernel/rtas_pci.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/rtas_pci.c   Wed May 06 16:56:04 2009 +0100
+@@ -301,51 +301,3 @@
  #endif /* CONFIG_PPC32 */
        }
  }
@@ -48779,10 +48767,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/rtas_pci.c linux-2.6.27.19-5.1/arch/
 -      return 0;
 -}
 -EXPORT_SYMBOL(pcibios_remove_root_bus);
-diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_32.c
---- linux-2.6.27/arch/powerpc/kernel/signal_32.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_32.c        2009-03-25 16:10:53.000000000 +0000
-@@ -410,7 +410,7 @@ inline unsigned long copy_fpr_from_user(
+diff -r 9608d5473017 arch/powerpc/kernel/signal_32.c
+--- a/arch/powerpc/kernel/signal_32.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/signal_32.c  Wed May 06 16:56:04 2009 +0100
+@@ -410,7 +410,7 @@
   * altivec/spe instructions at some point.
   */
  static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,
@@ -48791,7 +48779,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
  {
        unsigned long msr = regs->msr;
  
-@@ -451,7 +451,7 @@ static int save_user_regs(struct pt_regs
+@@ -451,7 +451,7 @@
         * the saved MSR value to indicate that frame->mc_vregs
         * contains valid data
         */
@@ -48800,7 +48788,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
                __giveup_vsx(current);
                if (copy_vsx_to_user(&frame->mc_vsregs, current))
                        return 1;
-@@ -858,11 +858,11 @@ int handle_rt_signal32(unsigned long sig
+@@ -858,11 +858,11 @@
        frame = &rt_sf->uc.uc_mcontext;
        addr = frame;
        if (vdso32_rt_sigtramp && current->mm->context.vdso_base) {
@@ -48814,7 +48802,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
                        goto badframe;
                regs->link = (unsigned long) frame->tramp;
        }
-@@ -936,13 +936,22 @@ long sys_swapcontext(struct ucontext __u
+@@ -936,13 +936,22 @@
                     int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
  {
        unsigned char tmp;
@@ -48840,7 +48828,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
        /*
         * Check that the context is not smaller than the original
         * size (with VMX but without VSX)
-@@ -956,16 +965,9 @@ long sys_swapcontext(struct ucontext __u
+@@ -956,16 +965,9 @@
        if ((ctx_size < sizeof(struct ucontext)) &&
            (new_msr & MSR_VSX))
                return -EINVAL;
@@ -48860,7 +48848,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
  #else
        /* Context size is for future use. Right now, we only make sure
         * we are passed something we understand
-@@ -985,17 +987,17 @@ long sys_swapcontext(struct ucontext __u
+@@ -985,17 +987,17 @@
                 */
                mctx = (struct mcontext __user *)
                        ((unsigned long) &old_ctx->uc_mcontext & ~0xfUL);
@@ -48882,7 +48870,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
                return -EFAULT;
  
        /*
-@@ -1196,11 +1198,11 @@ int handle_signal32(unsigned long sig, s
+@@ -1196,11 +1198,11 @@
                goto badframe;
  
        if (vdso32_sigtramp && current->mm->context.vdso_base) {
@@ -48896,10 +48884,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_32.c linux-2.6.27.19-5.1/arch
                        goto badframe;
                regs->link = (unsigned long) frame->mctx.tramp;
        }
-diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_64.c
---- linux-2.6.27/arch/powerpc/kernel/signal_64.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/signal_64.c        2009-03-25 16:10:54.000000000 +0000
-@@ -74,7 +74,8 @@ static const char fmt64[] = KERN_INFO \
+diff -r 9608d5473017 arch/powerpc/kernel/signal_64.c
+--- a/arch/powerpc/kernel/signal_64.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/signal_64.c  Wed May 06 16:56:04 2009 +0100
+@@ -74,7 +74,8 @@
   */
  
  static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
@@ -48909,7 +48897,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch
  {
        /* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the
         * process never used altivec yet (MSR_VEC is zero in pt_regs of
-@@ -121,7 +122,7 @@ static long setup_sigcontext(struct sigc
+@@ -121,7 +122,7 @@
         * then out to userspace.  Update v_regs to point after the
         * VMX data.
         */
@@ -48918,7 +48906,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch
                __giveup_vsx(current);
                v_regs += ELF_NVRREG;
                err |= copy_vsx_to_user(v_regs, current);
-@@ -284,9 +285,10 @@ int sys_swapcontext(struct ucontext __us
+@@ -284,9 +285,10 @@
        unsigned char tmp;
        sigset_t set;
        unsigned long new_msr = 0;
@@ -48930,7 +48918,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch
                return -EFAULT;
        /*
         * Check that the context is not smaller than the original
-@@ -301,28 +303,23 @@ int sys_swapcontext(struct ucontext __us
+@@ -301,28 +303,23 @@
        if ((ctx_size < sizeof(struct ucontext)) &&
            (new_msr & MSR_VSX))
                return -EINVAL;
@@ -48968,7 +48956,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch
                return -EFAULT;
  
        /*
-@@ -425,7 +422,7 @@ int handle_rt_signal64(int signr, struct
+@@ -425,7 +422,7 @@
                          &frame->uc.uc_stack.ss_flags);
        err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
        err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, signr, NULL,
@@ -48977,10 +48965,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/signal_64.c linux-2.6.27.19-5.1/arch
        err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
        if (err)
                goto badframe;
-diff -purN linux-2.6.27/arch/powerpc/kernel/time.c linux-2.6.27.19-5.1/arch/powerpc/kernel/time.c
---- linux-2.6.27/arch/powerpc/kernel/time.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/time.c     2009-03-25 16:10:54.000000000 +0000
-@@ -456,6 +456,7 @@ static inline void update_gtod(u64 new_t
+diff -r 9608d5473017 arch/powerpc/kernel/time.c
+--- a/arch/powerpc/kernel/time.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/time.c       Wed May 06 16:56:04 2009 +0100
+@@ -456,6 +456,7 @@
        vdso_data->tb_to_xs = new_tb_to_xs;
        vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
        vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
@@ -48988,24 +48976,24 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/time.c linux-2.6.27.19-5.1/arch/powe
        smp_wmb();
        ++(vdso_data->tb_update_count);
  }
-diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso32/gettimeofday.S
---- linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso32/gettimeofday.S      2009-03-25 16:10:53.000000000 +0000
-@@ -16,6 +16,13 @@
+diff -r 9608d5473017 arch/powerpc/kernel/vdso32/gettimeofday.S
+--- a/arch/powerpc/kernel/vdso32/gettimeofday.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vdso32/gettimeofday.S        Wed May 06 16:56:04 2009 +0100
+@@ -15,6 +15,13 @@
+ #include <asm/vdso.h>
  #include <asm/asm-offsets.h>
  #include <asm/unistd.h>
++
 +/* Offset for the low 32-bit part of a field of long type */
 +#ifdef CONFIG_PPC64
 +#define LOPART        4
 +#else
 +#define LOPART        0
 +#endif
-+
        .text
  /*
-  * Exact prototype of gettimeofday
-@@ -90,101 +97,53 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -90,101 +97,53 @@
  
        mflr    r12                     /* r12 saves lr */
    .cfi_register lr,r12
@@ -49014,7 +49002,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.1
        bl      __get_datapage@local    /* get data page */
        mr      r9,r3                   /* datapage ptr in r9 */
 -      beq     cr1,50f                 /* if monotonic -> jump there */
--
 -      /*
 -       * CLOCK_REALTIME
 -       */
@@ -49026,7 +49014,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.1
 -      rlwinm  r5,r4,12,20,31
 -      rlwimi  r5,r3,12,0,19
 -      stw     r5,TSPC32_TV_SEC(r11)
+-
 -      /* get remaining xsec and convert to nsec. we scale
 -       * up remaining xsec by 12 bits and get the top 32 bits
 -       * of the multiplication, then we multiply by 1000
@@ -49104,31 +49092,33 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.1
         * possible at all ?
         */
 -      add     r3,r3,r6
--      add     r4,r4,r7
--      lis     r5,NSEC_PER_SEC@h
--      ori     r5,r5,NSEC_PER_SEC@l
--      cmpl    cr0,r4,r5
--      cmpli   cr1,r4,0
 +      add     r3,r3,r5
 +      add     r4,r4,r6
 +      cmpw    cr0,r4,r7
 +      cmpwi   cr1,r4,0
-       blt     1f
--      subf    r4,r5,r4
++      blt     1f
 +      subf    r4,r7,r4
-       addi    r3,r3,1
--1:    bge     cr1,1f
++      addi    r3,r3,1
 +1:    bge     cr1,80f
-       addi    r3,r3,-1
++      addi    r3,r3,-1
+       add     r4,r4,r7
+-      lis     r5,NSEC_PER_SEC@h
+-      ori     r5,r5,NSEC_PER_SEC@l
+-      cmpl    cr0,r4,r5
+-      cmpli   cr1,r4,0
+-      blt     1f
+-      subf    r4,r5,r4
+-      addi    r3,r3,1
+-1:    bge     cr1,1f
+-      addi    r3,r3,-1
 -      add     r4,r4,r5
 -1:    stw     r3,TSPC32_TV_SEC(r11)
-+      add     r4,r4,r7
 +
 +80:   stw     r3,TSPC32_TV_SEC(r11)
        stw     r4,TSPC32_TV_NSEC(r11)
  
        mtlr    r12
-@@ -195,10 +154,6 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -195,10 +154,6 @@
        /*
         * syscall fallback
         */
@@ -49139,7 +49129,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.1
  99:
        li      r0,__NR_clock_gettime
        sc
-@@ -322,3 +277,98 @@ __do_get_xsec:
+@@ -322,3 +277,98 @@
         */
  3:    blr
    .cfi_endproc
@@ -49238,10 +49228,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso32/gettimeofday.S linux-2.6.27.1
 +
 +      blr
 +  .cfi_endproc
-diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso64/gettimeofday.S
---- linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vdso64/gettimeofday.S      2009-03-25 16:10:53.000000000 +0000
-@@ -75,90 +75,49 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+diff -r 9608d5473017 arch/powerpc/kernel/vdso64/gettimeofday.S
+--- a/arch/powerpc/kernel/vdso64/gettimeofday.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vdso64/gettimeofday.S        Wed May 06 16:56:04 2009 +0100
+@@ -75,90 +75,49 @@
  
        mflr    r12                     /* r12 saves lr */
    .cfi_register lr,r12
@@ -49323,15 +49313,14 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.1
 -      /* Calculate and store result. Note that this mimmics the C code,
 -       * which may cause funny results if nsec goes negative... is that
 -       * possible at all ?
--       */
++      /* Add wall->monotonic offset and check for overflow or underflow.
+        */
 -      add     r4,r4,r5
 -      add     r7,r7,r6
 -      lis     r9,NSEC_PER_SEC@h
 -      ori     r9,r9,NSEC_PER_SEC@l
 -      cmpl    cr0,r7,r9
 -      cmpli   cr1,r7,0
-+      /* Add wall->monotonic offset and check for overflow or underflow.
-+       */
 +      add     r4,r4,r6
 +      add     r5,r5,r9
 +      cmpd    cr0,r5,r7
@@ -49353,7 +49342,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.1
  
        mtlr    r12
        crclr   cr0*4+so
-@@ -168,10 +127,6 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
+@@ -168,10 +127,6 @@
        /*
         * syscall fallback
         */
@@ -49364,7 +49353,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.1
  99:
        li      r0,__NR_clock_gettime
        sc
-@@ -253,3 +208,59 @@ V_FUNCTION_BEGIN(__do_get_xsec)
+@@ -253,3 +208,59 @@
        blr
    .cfi_endproc
  V_FUNCTION_END(__do_get_xsec)
@@ -49424,10 +49413,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vdso64/gettimeofday.S linux-2.6.27.1
 +      blr
 +  .cfi_endproc
 +V_FUNCTION_END(__do_get_tspec)
-diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/powerpc/kernel/vio.c
---- linux-2.6.27/arch/powerpc/kernel/vio.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/kernel/vio.c      2009-03-25 16:10:53.000000000 +0000
-@@ -492,14 +492,14 @@ static void *vio_dma_iommu_alloc_coheren
+diff -r 9608d5473017 arch/powerpc/kernel/vio.c
+--- a/arch/powerpc/kernel/vio.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/kernel/vio.c        Wed May 06 16:56:04 2009 +0100
+@@ -492,14 +492,14 @@
        struct vio_dev *viodev = to_vio_dev(dev);
        void *ret;
  
@@ -49444,7 +49433,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/power
                atomic_inc(&viodev->cmo.allocs_failed);
        }
  
-@@ -513,7 +513,7 @@ static void vio_dma_iommu_free_coherent(
+@@ -513,7 +513,7 @@
  
        dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle);
  
@@ -49453,7 +49442,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/power
  }
  
  static dma_addr_t vio_dma_iommu_map_single(struct device *dev, void *vaddr,
-@@ -572,6 +572,7 @@ static int vio_dma_iommu_map_sg(struct d
+@@ -572,6 +572,7 @@
        if (unlikely(!ret)) {
                vio_cmo_dealloc(viodev, alloc_size);
                atomic_inc(&viodev->cmo.allocs_failed);
@@ -49461,7 +49450,7 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/power
        }
  
        for (sgl = sglist, count = 0; count < ret; count++, sgl++)
-@@ -1315,9 +1316,24 @@ static ssize_t devspec_show(struct devic
+@@ -1315,9 +1316,24 @@
        return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
  }
  
@@ -49486,10 +49475,10 @@ diff -purN linux-2.6.27/arch/powerpc/kernel/vio.c linux-2.6.27.19-5.1/arch/power
        __ATTR_NULL
  };
  
-diff -purN linux-2.6.27/arch/powerpc/lib/rheap.c linux-2.6.27.19-5.1/arch/powerpc/lib/rheap.c
---- linux-2.6.27/arch/powerpc/lib/rheap.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/lib/rheap.c       2009-03-25 16:10:54.000000000 +0000
-@@ -556,6 +556,7 @@ unsigned long rh_alloc_fixed(rh_info_t *
+diff -r 9608d5473017 arch/powerpc/lib/rheap.c
+--- a/arch/powerpc/lib/rheap.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/lib/rheap.c Wed May 06 16:56:04 2009 +0100
+@@ -556,6 +556,7 @@
                be = blk->start + blk->size;
                if (s >= bs && e <= be)
                        break;
@@ -49497,10 +49486,10 @@ diff -purN linux-2.6.27/arch/powerpc/lib/rheap.c linux-2.6.27.19-5.1/arch/powerp
        }
  
        if (blk == NULL)
-diff -purN linux-2.6.27/arch/powerpc/lib/sstep.c linux-2.6.27.19-5.1/arch/powerpc/lib/sstep.c
---- linux-2.6.27/arch/powerpc/lib/sstep.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/lib/sstep.c       2009-03-25 16:10:54.000000000 +0000
-@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_reg
+diff -r 9608d5473017 arch/powerpc/lib/sstep.c
+--- a/arch/powerpc/lib/sstep.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/lib/sstep.c Wed May 06 16:56:04 2009 +0100
+@@ -172,6 +172,8 @@
                        }
                        break;
                case 0x378:     /* orx */
@@ -49509,9 +49498,9 @@ diff -purN linux-2.6.27/arch/powerpc/lib/sstep.c linux-2.6.27.19-5.1/arch/powerp
                        rs = (instr >> 21) & 0x1f;
                        rb = (instr >> 11) & 0x1f;
                        if (rs == rb) {         /* mr */
-diff -purN linux-2.6.27/arch/powerpc/mm/fault.c linux-2.6.27.19-5.1/arch/powerpc/mm/fault.c
---- linux-2.6.27/arch/powerpc/mm/fault.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/fault.c        2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/mm/fault.c
+--- a/arch/powerpc/mm/fault.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/fault.c  Wed May 06 16:56:04 2009 +0100
 @@ -30,6 +30,7 @@
  #include <linux/kprobes.h>
  #include <linux/kdebug.h>
@@ -49520,7 +49509,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/fault.c linux-2.6.27.19-5.1/arch/powerpc
  #include <asm/page.h>
  #include <asm/pgtable.h>
  #include <asm/mmu.h>
-@@ -318,9 +319,16 @@ good_area:
+@@ -318,9 +319,16 @@
                        goto do_sigbus;
                BUG();
        }
@@ -49539,10 +49528,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/fault.c linux-2.6.27.19-5.1/arch/powerpc
                current->min_flt++;
        up_read(&mm->mmap_sem);
        return 0;
-diff -purN linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c linux-2.6.27.19-5.1/arch/powerpc/mm/fsl_booke_mmu.c
---- linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/fsl_booke_mmu.c        2009-03-25 16:10:53.000000000 +0000
-@@ -80,7 +80,7 @@ extern unsigned int tlbcam_index;
+diff -r 9608d5473017 arch/powerpc/mm/fsl_booke_mmu.c
+--- a/arch/powerpc/mm/fsl_booke_mmu.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/fsl_booke_mmu.c  Wed May 06 16:56:04 2009 +0100
+@@ -80,7 +80,7 @@
  /*
   * Return PA for this VA if it is mapped by a CAM, or 0
   */
@@ -49551,7 +49540,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c linux-2.6.27.19-5.1/arch
  {
        int b;
        for (b = 0; b < tlbcam_index; ++b)
-@@ -92,7 +92,7 @@ unsigned long v_mapped_by_tlbcam(unsigne
+@@ -92,7 +92,7 @@
  /*
   * Return VA for a given PA or 0 if not mapped
   */
@@ -49560,10 +49549,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/fsl_booke_mmu.c linux-2.6.27.19-5.1/arch
  {
        int b;
        for (b = 0; b < tlbcam_index; ++b)
-diff -purN linux-2.6.27/arch/powerpc/mm/hash_utils_64.c linux-2.6.27.19-5.1/arch/powerpc/mm/hash_utils_64.c
---- linux-2.6.27/arch/powerpc/mm/hash_utils_64.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/hash_utils_64.c        2009-03-25 16:10:53.000000000 +0000
-@@ -381,8 +381,10 @@ static int __init htab_dt_scan_hugepage_
+diff -r 9608d5473017 arch/powerpc/mm/hash_utils_64.c
+--- a/arch/powerpc/mm/hash_utils_64.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/hash_utils_64.c  Wed May 06 16:56:04 2009 +0100
+@@ -381,8 +381,10 @@
        printk(KERN_INFO "Huge page(16GB) memory: "
                        "addr = 0x%lX size = 0x%lX pages = %d\n",
                        phys_addr, block_size, expected_pages);
@@ -49576,10 +49565,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/hash_utils_64.c linux-2.6.27.19-5.1/arch
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/powerpc/mm/hugetlbpage.c linux-2.6.27.19-5.1/arch/powerpc/mm/hugetlbpage.c
---- linux-2.6.27/arch/powerpc/mm/hugetlbpage.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/hugetlbpage.c  2009-03-25 16:10:52.000000000 +0000
-@@ -500,6 +500,9 @@ unsigned long hugetlb_get_unmapped_area(
+diff -r 9608d5473017 arch/powerpc/mm/hugetlbpage.c
+--- a/arch/powerpc/mm/hugetlbpage.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/hugetlbpage.c    Wed May 06 16:56:04 2009 +0100
+@@ -500,6 +500,9 @@
  {
        struct hstate *hstate = hstate_file(file);
        int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
@@ -49589,9 +49578,9 @@ diff -purN linux-2.6.27/arch/powerpc/mm/hugetlbpage.c linux-2.6.27.19-5.1/arch/p
        return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
  }
  
-diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/mm/numa.c
---- linux-2.6.27/arch/powerpc/mm/numa.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/numa.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/mm/numa.c
+--- a/arch/powerpc/mm/numa.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/numa.c   Wed May 06 16:56:04 2009 +0100
 @@ -19,6 +19,7 @@
  #include <linux/notifier.h>
  #include <linux/lmb.h>
@@ -49600,7 +49589,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
  #include <asm/sparsemem.h>
  #include <asm/prom.h>
  #include <asm/system.h>
-@@ -89,6 +90,48 @@ static int __cpuinit fake_numa_create_ne
+@@ -89,6 +90,48 @@
        return 0;
  }
  
@@ -49649,10 +49638,12 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
  static void __cpuinit map_cpu_to_node(int cpu, int node)
  {
        numa_cpu_lookup_table[cpu] = node;
-@@ -150,6 +193,21 @@ static const int *of_get_associativity(s
+@@ -148,6 +191,21 @@
+ static const int *of_get_associativity(struct device_node *dev)
+ {
        return of_get_property(dev, "ibm,associativity", NULL);
- }
++}
++
 +/*
 + * Returns the property linux,drconf-usable-memory if
 + * it exists (the property exists only in kexec/kdump kernels,
@@ -49666,12 +49657,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
 +      if (!prop || len < sizeof(unsigned int))
 +              return 0;
 +      return prop;
-+}
-+
+ }
  /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
-  * info is found.
-  */
-@@ -487,14 +545,29 @@ static unsigned long __init numa_enforce
+@@ -487,14 +545,29 @@
  }
  
  /*
@@ -49704,7 +49693,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
        int nid;
        struct assoc_arrays aa;
  
-@@ -510,6 +583,11 @@ static void __init parse_drconf_memory(s
+@@ -510,6 +583,11 @@
        if (rc)
                return;
  
@@ -49716,18 +49705,17 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
        for (; n != 0; --n) {
                struct of_drconf_cell drmem;
  
-@@ -521,21 +599,31 @@ static void __init parse_drconf_memory(s
+@@ -521,21 +599,31 @@
                    || !(drmem.flags & DRCONF_MEM_ASSIGNED))
                        continue;
  
 -              nid = of_drconf_to_nid_single(&drmem, &aa);
--
--              fake_numa_create_new_node(
--                              ((drmem.base_addr + lmb_size) >> PAGE_SHIFT),
 +              base = drmem.base_addr;
 +              size = lmb_size;
 +              ranges = 1;
-+
+-              fake_numa_create_new_node(
+-                              ((drmem.base_addr + lmb_size) >> PAGE_SHIFT),
 +              if (is_kexec_kdump) {
 +                      ranges = read_usm_ranges(&usm);
 +                      if (!ranges) /* there are no (base, size) duple */
@@ -49762,7 +49750,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
        }
  }
  
-@@ -780,10 +868,75 @@ static struct notifier_block __cpuinitda
+@@ -780,10 +868,75 @@
        .priority = 1 /* Must run before sched domains notifier. */
  };
  
@@ -49839,7 +49827,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
  
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
-@@ -803,9 +956,16 @@ void __init do_init_bootmem(void)
+@@ -803,9 +956,16 @@
                unsigned long bootmem_paddr;
                unsigned long bootmap_pages;
  
@@ -49857,7 +49845,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
                NODE_DATA(nid) = careful_allocation(nid,
                                        sizeof(struct pglist_data),
                                        SMP_CACHE_BYTES, end_pfn);
-@@ -837,36 +997,12 @@ void __init do_init_bootmem(void)
+@@ -837,36 +997,12 @@
                                  start_pfn, end_pfn);
  
                free_bootmem_with_active_regions(nid, end_pfn);
@@ -49900,10 +49888,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/numa.c linux-2.6.27.19-5.1/arch/powerpc/
                sparse_memory_present_with_active_regions(nid);
        }
  }
-diff -purN linux-2.6.27/arch/powerpc/mm/pgtable_32.c linux-2.6.27.19-5.1/arch/powerpc/mm/pgtable_32.c
---- linux-2.6.27/arch/powerpc/mm/pgtable_32.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/pgtable_32.c   2009-03-25 16:10:53.000000000 +0000
-@@ -65,8 +65,8 @@ void setbat(int index, unsigned long vir
+diff -r 9608d5473017 arch/powerpc/mm/pgtable_32.c
+--- a/arch/powerpc/mm/pgtable_32.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/pgtable_32.c     Wed May 06 16:56:04 2009 +0100
+@@ -65,8 +65,8 @@
  
  #ifdef HAVE_TLBCAM
  extern unsigned int tlbcam_index;
@@ -49914,10 +49902,10 @@ diff -purN linux-2.6.27/arch/powerpc/mm/pgtable_32.c linux-2.6.27.19-5.1/arch/po
  #else /* !HAVE_TLBCAM */
  #define v_mapped_by_tlbcam(x) (0UL)
  #define p_mapped_by_tlbcam(x) (0UL)
-diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc/mm/slice.c
---- linux-2.6.27/arch/powerpc/mm/slice.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/mm/slice.c        2009-03-25 16:10:53.000000000 +0000
-@@ -94,11 +94,21 @@ static int slice_area_is_free(struct mm_
+diff -r 9608d5473017 arch/powerpc/mm/slice.c
+--- a/arch/powerpc/mm/slice.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/mm/slice.c  Wed May 06 16:56:04 2009 +0100
+@@ -94,11 +94,21 @@
                              unsigned long len)
  {
        struct vm_area_struct *vma;
@@ -49940,7 +49928,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
  }
  
  static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice)
-@@ -242,8 +252,10 @@ static unsigned long slice_find_area_bot
+@@ -242,8 +252,10 @@
  
  full_search:
        for (;;) {
@@ -49952,7 +49940,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
                        break;
                vma = find_vma(mm, addr);
                BUG_ON(vma && (addr >= vma->vm_end));
-@@ -256,7 +268,14 @@ full_search:
+@@ -256,7 +268,14 @@
                                addr = _ALIGN_UP(addr + 1,  1ul << SLICE_HIGH_SHIFT);
                        continue;
                }
@@ -49968,7 +49956,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
                        /*
                         * Remember the place where we stopped the search:
                         */
-@@ -264,8 +283,8 @@ full_search:
+@@ -264,8 +283,8 @@
                                mm->free_area_cache = addr + len;
                        return addr;
                }
@@ -49979,7 +49967,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
                addr = vma->vm_end;
        }
  
-@@ -284,37 +303,23 @@ static unsigned long slice_find_area_top
+@@ -284,37 +303,23 @@
                                             int psize, int use_cache)
  {
        struct vm_area_struct *vma;
@@ -49995,12 +49983,19 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
                        mm->cached_hole_size = 0;
 -                      mm->free_area_cache = mm->mmap_base;
 -              }
--
++              } else
++                      start_addr = addr = mm->free_area_cache;
++      } else
++              start_addr = addr = mm->mmap_base;
 -              /* either no address requested or can't fit in requested
 -               * address hole
 -               */
 -              addr = mm->free_area_cache;
--
++full_search:
++      while (addr > len) {
++              unsigned long guard;
 -              /* make sure it can fit in the remaining address space */
 -              if (addr > len) {
 -                      addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
@@ -50013,20 +50008,13 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
 -                                      return (mm->free_area_cache = addr);
 -              }
 -      }
-+              } else
-+                      start_addr = addr = mm->free_area_cache;
-+      } else
-+              start_addr = addr = mm->mmap_base;
+-
 -      addr = mm->mmap_base;
-+full_search:
-       while (addr > len) {
-+              unsigned long guard;
-+
+-      while (addr > len) {
                /* Go down by chunk size */
                addr = _ALIGN_DOWN(addr - len, 1ul << pshift);
  
-@@ -336,7 +341,15 @@ static unsigned long slice_find_area_top
+@@ -336,7 +341,15 @@
                 * return with success:
                 */
                vma = find_vma(mm, addr);
@@ -50043,7 +50031,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
                        /* remember the address as a hint for next time */
                        if (use_cache)
                                mm->free_area_cache = addr;
-@@ -344,11 +357,16 @@ static unsigned long slice_find_area_top
+@@ -344,11 +357,16 @@
                }
  
                /* remember the largest hole we saw so far */
@@ -50063,7 +50051,7 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
        }
  
        /*
-@@ -710,9 +728,18 @@ int is_hugepage_only_range(struct mm_str
+@@ -710,9 +728,18 @@
                           unsigned long len)
  {
        struct slice_mask mask, available;
@@ -50083,9 +50071,9 @@ diff -purN linux-2.6.27/arch/powerpc/mm/slice.c linux-2.6.27.19-5.1/arch/powerpc
  
  #if 0 /* too verbose */
        slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n",
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/pr_util.h
---- linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/pr_util.h   2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/pr_util.h
+--- a/arch/powerpc/oprofile/cell/pr_util.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/pr_util.h     Wed May 06 16:56:04 2009 +0100
 @@ -24,6 +24,11 @@
  #define SKIP_GENERIC_SYNC 0
  #define SYNC_START_ERROR -1
@@ -50098,7 +50086,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h linux-2.6.27.19-5.1
  
  struct spu_overlay_info {     /* map of sections within an SPU overlay */
        unsigned int vma;       /* SPU virtual memory address from elf */
-@@ -62,6 +67,14 @@ struct vma_to_fileoffset_map {      /* map of
+@@ -62,6 +67,14 @@
  
  };
  
@@ -50113,9 +50101,9 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/pr_util.h linux-2.6.27.19-5.1
  /* The three functions below are for maintaining and accessing
   * the vma-to-fileoffset map.
   */
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_profiler.c
---- linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_profiler.c      2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/spu_profiler.c
+--- a/arch/powerpc/oprofile/cell/spu_profiler.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/spu_profiler.c        Wed May 06 16:56:04 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/smp.h>
  #include <linux/slab.h>
@@ -50138,7 +50126,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c linux-2.6.27.1
  
  #define SPU_PC_MASK        0xFFFF
  
-@@ -208,6 +208,7 @@ int start_spu_profiling(unsigned int cyc
+@@ -208,6 +208,7 @@
  
        spu_prof_running = 1;
        hrtimer_start(&timer, kt, HRTIMER_MODE_REL);
@@ -50146,10 +50134,10 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_profiler.c linux-2.6.27.1
  
        return 0;
  }
-diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_task_sync.c
---- linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/cell/spu_task_sync.c     2009-03-25 16:10:53.000000000 +0000
-@@ -35,7 +35,102 @@ static DEFINE_SPINLOCK(buffer_lock);
+diff -r 9608d5473017 arch/powerpc/oprofile/cell/spu_task_sync.c
+--- a/arch/powerpc/oprofile/cell/spu_task_sync.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/cell/spu_task_sync.c       Wed May 06 16:56:04 2009 +0100
+@@ -35,7 +35,102 @@
  static DEFINE_SPINLOCK(cache_lock);
  static int num_spu_nodes;
  int spu_prof_num_nodes;
@@ -50253,7 +50241,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
  
  /* Container for caching information about an active SPU task. */
  struct cached_info {
-@@ -305,14 +400,21 @@ static int process_context_switch(struct
+@@ -305,14 +400,21 @@
  
        /* Record context info in event buffer */
        spin_lock_irqsave(&buffer_lock, flags);
@@ -50283,7 +50271,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
        spin_unlock_irqrestore(&buffer_lock, flags);
        smp_wmb();      /* insure spu event buffer updates are written */
                        /* don't want entries intermingled... */
-@@ -360,6 +462,47 @@ static int number_of_online_nodes(void)
+@@ -360,6 +462,47 @@
          return nodes;
  }
  
@@ -50331,7 +50319,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
  /* The main purpose of this function is to synchronize
   * OProfile with SPUFS by registering to be notified of
   * SPU task switches.
-@@ -372,20 +515,35 @@ static int number_of_online_nodes(void)
+@@ -372,19 +515,34 @@
   */
  int spu_sync_start(void)
  {
@@ -50362,16 +50350,15 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
 +              spu_buff_add(num_spu_nodes, spu);
 +      }
        spin_unlock_irqrestore(&buffer_lock, flags);
++
 +      for (spu = 0; spu < num_spu_nodes; spu++) {
 +              spu_buff[spu].ctx_sw_seen = 0;
 +              spu_buff[spu].last_guard_val = 0;
 +      }
-+
        /* Register for SPU events  */
        register_ret = spu_switch_event_register(&spu_active);
-       if (register_ret) {
-@@ -393,8 +551,6 @@ int spu_sync_start(void)
+@@ -393,8 +551,6 @@
                goto out;
        }
  
@@ -50380,7 +50367,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
        pr_debug("spu_sync_start -- running.\n");
  out:
        return ret;
-@@ -446,13 +602,20 @@ void spu_sync_buffer(int spu_num, unsign
+@@ -446,13 +602,20 @@
                 * use.  We need to discard samples taken during the time
                 * period which an overlay occurs (i.e., guard value changes).
                 */
@@ -50404,7 +50391,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
        }
        spin_unlock(&buffer_lock);
  out:
-@@ -463,20 +626,41 @@ out:
+@@ -463,20 +626,41 @@
  int spu_sync_stop(void)
  {
        unsigned long flags = 0;
@@ -50454,10 +50441,10 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/cell/spu_task_sync.c linux-2.6.27.
  }
  
 -
-diff -purN linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c linux-2.6.27.19-5.1/arch/powerpc/oprofile/op_model_cell.c
---- linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/oprofile/op_model_cell.c  2009-03-25 16:10:53.000000000 +0000
-@@ -582,6 +582,13 @@ static int cell_reg_setup(struct op_coun
+diff -r 9608d5473017 arch/powerpc/oprofile/op_model_cell.c
+--- a/arch/powerpc/oprofile/op_model_cell.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/oprofile/op_model_cell.c    Wed May 06 16:56:04 2009 +0100
+@@ -582,6 +582,13 @@
  
        num_counters = num_ctrs;
  
@@ -50471,7 +50458,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c linux-2.6.27.19-5.
        pm_regs.group_control = 0;
        pm_regs.debug_bus_control = 0;
  
-@@ -830,13 +837,13 @@ static int calculate_lfsr(int n)
+@@ -830,13 +837,13 @@
  static int pm_rtas_activate_spu_profiling(u32 node)
  {
        int ret, i;
@@ -50487,7 +50474,7 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c linux-2.6.27.19-5.
                pm_signal_local[i].cpu = node;
                pm_signal_local[i].signal_group = 41;
                /* spu i on word (i/2) */
-@@ -848,7 +855,7 @@ static int pm_rtas_activate_spu_profilin
+@@ -848,7 +855,7 @@
  
        ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE,
                                     PASSTHRU_ENABLE, pm_signal_local,
@@ -50496,9 +50483,9 @@ diff -purN linux-2.6.27/arch/powerpc/oprofile/op_model_cell.c linux-2.6.27.19-5.
                                      * sizeof(struct pm_signal)));
  
        if (unlikely(ret)) {
-diff -purN linux-2.6.27/arch/powerpc/perfmon/Kconfig linux-2.6.27.19-5.1/arch/powerpc/perfmon/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/Kconfig   2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/Kconfig     Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,67 @@
 +menu "Hardware Performance Monitoring support"
 +config PERFMON
@@ -50567,9 +50554,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/Kconfig linux-2.6.27.19-5.1/arch/po
 +      If unsure, say M.
 +
 +endmenu
-diff -purN linux-2.6.27/arch/powerpc/perfmon/Makefile linux-2.6.27.19-5.1/arch/powerpc/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/Makefile  2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/Makefile    Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,6 @@
 +obj-$(CONFIG_PERFMON)         += perfmon.o
 +obj-$(CONFIG_PERFMON_POWER4)  += perfmon_power4.o
@@ -50577,9 +50564,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/Makefile linux-2.6.27.19-5.1/arch/p
 +obj-$(CONFIG_PERFMON_POWER6)  += perfmon_power6.o
 +obj-$(CONFIG_PERFMON_PPC32)   += perfmon_ppc32.o
 +obj-$(CONFIG_PERFMON_CELL)    += perfmon_cell.o
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon.c 2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon.c   Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,334 @@
 +/*
 + * This file implements the powerpc specific
@@ -50915,9 +50902,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/
 +                      arch_info->irq_handler(regs, ctx);
 +      }
 +}
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_cell.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_cell.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_cell.c    2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_cell.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_cell.c      Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,1449 @@
 +/*
 + * This file contains the Cell PMU register description tables
@@ -52368,9 +52355,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_cell.c linux-2.6.27.19-5.1/
 +
 +module_init(pfm_cell_pmu_init_module);
 +module_exit(pfm_cell_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power4.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power4.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power4.c  2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power4.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power4.c    Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,309 @@
 +/*
 + * This file contains the POWER4 PMU register description tables
@@ -52681,9 +52668,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power4.c linux-2.6.27.19-5.
 +
 +module_init(pfm_power4_pmu_init_module);
 +module_exit(pfm_power4_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power5.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power5.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power5.c  2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power5.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power5.c    Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,326 @@
 +/*
 + * This file contains the POWER5 PMU register description tables
@@ -53011,9 +52998,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power5.c linux-2.6.27.19-5.
 +
 +module_init(pfm_power5_pmu_init_module);
 +module_exit(pfm_power5_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power6.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power6.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_power6.c  2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_power6.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_power6.c    Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,520 @@
 +/*
 + * This file contains the POWER6 PMU register description tables
@@ -53535,9 +53522,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_power6.c linux-2.6.27.19-5.
 +
 +module_init(pfm_power6_pmu_init_module);
 +module_exit(pfm_power6_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_ppc32.c linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_ppc32.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/perfmon/perfmon_ppc32.c   2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/perfmon/perfmon_ppc32.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/powerpc/perfmon/perfmon_ppc32.c     Wed May 06 16:56:04 2009 +0100
 @@ -0,0 +1,340 @@
 +/*
 + * This file contains the PPC32 PMU register description tables
@@ -53879,9 +53866,9 @@ diff -purN linux-2.6.27/arch/powerpc/perfmon/perfmon_ppc32.c linux-2.6.27.19-5.1
 +
 +module_init(pfm_ppc32_pmu_init_module);
 +module_exit(pfm_ppc32_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/efika.c linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/efika.c
---- linux-2.6.27/arch/powerpc/platforms/52xx/efika.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/efika.c    2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/52xx/efika.c
+--- a/arch/powerpc/platforms/52xx/efika.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/52xx/efika.c      Wed May 06 16:56:04 2009 +0100
 @@ -13,6 +13,7 @@
  #include <linux/utsrelease.h>
  #include <linux/pci.h>
@@ -53890,7 +53877,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/efika.c linux-2.6.27.19-5.1/
  #include <asm/prom.h>
  #include <asm/time.h>
  #include <asm/machdep.h>
-@@ -211,12 +212,61 @@ static int __init efika_probe(void)
+@@ -211,12 +212,61 @@
        return 1;
  }
  
@@ -53952,10 +53939,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/efika.c linux-2.6.27.19-5.1/
        .show_cpuinfo           = efika_show_cpuinfo,
        .init_IRQ               = mpc52xx_init_irq,
        .get_irq                = mpc52xx_get_irq,
-diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
---- linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/52xx/mpc52xx_gpio.c     2009-03-25 16:10:53.000000000 +0000
-@@ -192,6 +192,7 @@ static const struct of_device_id mpc52xx
+diff -r 9608d5473017 arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c       Wed May 06 16:56:04 2009 +0100
+@@ -192,6 +192,7 @@
  };
  
  static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = {
@@ -53963,7 +53950,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c linux-2.6.27.
        .name = "gpio_wkup",
        .match_table = mpc52xx_wkup_gpiochip_match,
        .probe = mpc52xx_wkup_gpiochip_probe,
-@@ -348,6 +349,7 @@ static const struct of_device_id mpc52xx
+@@ -348,6 +349,7 @@
  };
  
  static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
@@ -53971,7 +53958,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c linux-2.6.27.
        .name = "gpio",
        .match_table = mpc52xx_simple_gpiochip_match,
        .probe = mpc52xx_simple_gpiochip_probe,
-@@ -433,6 +435,7 @@ static const struct of_device_id mpc52xx
+@@ -433,6 +435,7 @@
  };
  
  static struct of_platform_driver mpc52xx_gpt_gpiochip_driver = {
@@ -53979,10 +53966,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/52xx/mpc52xx_gpio.c linux-2.6.27.
        .name = "gpio_gpt",
        .match_table = mpc52xx_gpt_gpiochip_match,
        .probe = mpc52xx_gpt_gpiochip_probe,
-diff -purN linux-2.6.27/arch/powerpc/platforms/82xx/ep8248e.c linux-2.6.27.19-5.1/arch/powerpc/platforms/82xx/ep8248e.c
---- linux-2.6.27/arch/powerpc/platforms/82xx/ep8248e.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/82xx/ep8248e.c  2009-03-25 16:10:53.000000000 +0000
-@@ -163,6 +163,7 @@ static struct of_platform_driver ep8248e
+diff -r 9608d5473017 arch/powerpc/platforms/82xx/ep8248e.c
+--- a/arch/powerpc/platforms/82xx/ep8248e.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/82xx/ep8248e.c    Wed May 06 16:56:04 2009 +0100
+@@ -163,6 +163,7 @@
        .match_table = ep8248e_mdio_match,
        .probe = ep8248e_mdio_probe,
        .remove = ep8248e_mdio_remove,
@@ -53990,10 +53977,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/82xx/ep8248e.c linux-2.6.27.19-5.
  };
  
  struct cpm_pin {
-diff -purN linux-2.6.27/arch/powerpc/platforms/83xx/suspend.c linux-2.6.27.19-5.1/arch/powerpc/platforms/83xx/suspend.c
---- linux-2.6.27/arch/powerpc/platforms/83xx/suspend.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/83xx/suspend.c  2009-03-25 16:10:53.000000000 +0000
-@@ -374,6 +374,7 @@ static struct of_device_id pmc_match[] =
+diff -r 9608d5473017 arch/powerpc/platforms/83xx/suspend.c
+--- a/arch/powerpc/platforms/83xx/suspend.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/83xx/suspend.c    Wed May 06 16:56:04 2009 +0100
+@@ -374,6 +374,7 @@
  };
  
  static struct of_platform_driver pmc_driver = {
@@ -54001,10 +53988,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/83xx/suspend.c linux-2.6.27.19-5.
        .name = "mpc83xx-pmc",
        .match_table = pmc_match,
        .probe = pmc_probe,
-diff -purN linux-2.6.27/arch/powerpc/platforms/85xx/mpc85xx_ds.c linux-2.6.27.19-5.1/arch/powerpc/platforms/85xx/mpc85xx_ds.c
---- linux-2.6.27/arch/powerpc/platforms/85xx/mpc85xx_ds.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/85xx/mpc85xx_ds.c       2009-03-25 16:10:53.000000000 +0000
-@@ -78,7 +78,8 @@ void __init mpc85xx_ds_pic_init(void)
+diff -r 9608d5473017 arch/powerpc/platforms/85xx/mpc85xx_ds.c
+--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c Wed May 06 16:56:04 2009 +0100
+@@ -78,7 +78,8 @@
  
        mpic = mpic_alloc(np, r.start,
                          MPIC_PRIMARY | MPIC_WANTS_RESET |
@@ -54014,10 +54001,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/85xx/mpc85xx_ds.c linux-2.6.27.19
                        0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
        of_node_put(np);
-diff -purN linux-2.6.27/arch/powerpc/platforms/86xx/pic.c linux-2.6.27.19-5.1/arch/powerpc/platforms/86xx/pic.c
---- linux-2.6.27/arch/powerpc/platforms/86xx/pic.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/86xx/pic.c      2009-03-25 16:10:53.000000000 +0000
-@@ -44,7 +44,8 @@ void __init mpc86xx_init_irq(void)
+diff -r 9608d5473017 arch/powerpc/platforms/86xx/pic.c
+--- a/arch/powerpc/platforms/86xx/pic.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/86xx/pic.c        Wed May 06 16:56:04 2009 +0100
+@@ -44,7 +44,8 @@
  
        mpic = mpic_alloc(np, res.start,
                        MPIC_PRIMARY | MPIC_WANTS_RESET |
@@ -54027,10 +54014,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/86xx/pic.c linux-2.6.27.19-5.1/ar
                        0, 256, " MPIC     ");
        of_node_put(np);
        BUG_ON(mpic == NULL);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/axon_msi.c
---- linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/axon_msi.c 2009-03-25 16:10:53.000000000 +0000
-@@ -95,6 +95,7 @@ static void axon_msi_cascade(unsigned in
+diff -r 9608d5473017 arch/powerpc/platforms/cell/axon_msi.c
+--- a/arch/powerpc/platforms/cell/axon_msi.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/axon_msi.c   Wed May 06 16:56:04 2009 +0100
+@@ -95,6 +95,7 @@
        struct axon_msic *msic = get_irq_data(irq);
        u32 write_offset, msi;
        int idx;
@@ -54038,7 +54025,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5
  
        write_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG);
        pr_debug("axon_msi: original write_offset 0x%x\n", write_offset);
-@@ -102,7 +103,7 @@ static void axon_msi_cascade(unsigned in
+@@ -102,7 +103,7 @@
        /* write_offset doesn't wrap properly, so we have to mask it */
        write_offset &= MSIC_FIFO_SIZE_MASK;
  
@@ -54047,7 +54034,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5
                idx  = msic->read_offset / sizeof(__le32);
                msi  = le32_to_cpu(msic->fifo_virt[idx]);
                msi &= 0xFFFF;
-@@ -110,13 +111,37 @@ static void axon_msi_cascade(unsigned in
+@@ -110,13 +111,37 @@
                pr_debug("axon_msi: woff %x roff %x msi %x\n",
                          write_offset, msic->read_offset, msi);
  
@@ -54089,7 +54076,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5
        }
  
        desc->chip->eoi(irq);
-@@ -364,6 +389,7 @@ static int axon_msi_probe(struct of_devi
+@@ -364,6 +389,7 @@
                       dn->full_name);
                goto out_free_fifo;
        }
@@ -54097,17 +54084,17 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5
  
        msic->irq_host = irq_alloc_host(dn, IRQ_HOST_MAP_NOMAP,
                                        NR_IRQS, &msic_host_ops, 0);
-@@ -387,6 +413,9 @@ static int axon_msi_probe(struct of_devi
+@@ -386,6 +412,9 @@
+       msic_dcr_write(msic, MSIC_CTRL_REG,
                        MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
                        MSIC_CTRL_FIFO_SIZE);
++
 +      msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
 +                              & MSIC_FIFO_SIZE_MASK;
-+
        device->dev.platform_data = msic;
  
-       ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
-@@ -417,6 +446,7 @@ static const struct of_device_id axon_ms
+@@ -417,6 +446,7 @@
  };
  
  static struct of_platform_driver axon_msi_driver = {
@@ -54115,10 +54102,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/axon_msi.c linux-2.6.27.19-5
        .match_table    = axon_msi_device_id,
        .probe          = axon_msi_probe,
        .shutdown       = axon_msi_shutdown,
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/cbe_regs.c
---- linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/cbe_regs.c 2009-03-25 16:10:53.000000000 +0000
-@@ -33,6 +33,7 @@ static struct cbe_regs_map
+diff -r 9608d5473017 arch/powerpc/platforms/cell/cbe_regs.c
+--- a/arch/powerpc/platforms/cell/cbe_regs.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/cbe_regs.c   Wed May 06 16:56:04 2009 +0100
+@@ -33,6 +33,7 @@
        struct cbe_iic_regs __iomem *iic_regs;
        struct cbe_mic_tm_regs __iomem *mic_tm_regs;
        struct cbe_pmd_shadow_regs pmd_shadow_regs;
@@ -54126,7 +54113,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5
  } cbe_regs_maps[MAX_CBE];
  static int cbe_regs_map_count;
  
-@@ -145,6 +146,23 @@ struct cbe_mic_tm_regs __iomem *cbe_get_
+@@ -145,6 +146,23 @@
  }
  EXPORT_SYMBOL_GPL(cbe_get_cpu_mic_tm_regs);
  
@@ -54150,7 +54137,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5
  u32 cbe_get_hw_thread_id(int cpu)
  {
        return cbe_thread_map[cpu].thread_id;
-@@ -206,6 +224,11 @@ void __init cbe_fill_regs_map(struct cbe
+@@ -206,6 +224,11 @@
                for_each_node_by_type(np, "mic-tm")
                        if (of_get_parent(np) == be)
                                map->mic_tm_regs = of_iomap(np, 0);
@@ -54162,7 +54149,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5
        } else {
                struct device_node *cpu;
                /* That hack must die die die ! */
-@@ -227,6 +250,10 @@ void __init cbe_fill_regs_map(struct cbe
+@@ -227,6 +250,10 @@
                prop = of_get_property(cpu, "mic-tm", NULL);
                if (prop != NULL)
                        map->mic_tm_regs = ioremap(prop->address, prop->len);
@@ -54173,10 +54160,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.27.19-5
        }
  }
  
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/interrupt.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/interrupt.c
---- linux-2.6.27/arch/powerpc/platforms/cell/interrupt.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/interrupt.c        2009-03-25 16:10:53.000000000 +0000
-@@ -270,7 +270,7 @@ static void handle_iic_irq(unsigned int 
+diff -r 9608d5473017 arch/powerpc/platforms/cell/interrupt.c
+--- a/arch/powerpc/platforms/cell/interrupt.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/interrupt.c  Wed May 06 16:56:04 2009 +0100
+@@ -270,7 +270,7 @@
                spin_unlock(&desc->lock);
                action_ret = handle_IRQ_event(irq, action);
                if (!noirqdebug)
@@ -54185,9 +54172,9 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/interrupt.c linux-2.6.27.19-
                spin_lock(&desc->lock);
  
        } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/smp.c
---- linux-2.6.27/arch/powerpc/platforms/cell/smp.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/smp.c      2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/cell/smp.c
+--- a/arch/powerpc/platforms/cell/smp.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/smp.c        Wed May 06 16:56:04 2009 +0100
 @@ -54,8 +54,8 @@
  #endif
  
@@ -54199,7 +54186,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/ar
   */
  static cpumask_t of_spin_map;
  
-@@ -129,10 +129,15 @@ static int __init smp_iic_probe(void)
+@@ -129,10 +129,15 @@
        return cpus_weight(cpu_possible_map);
  }
  
@@ -54216,7 +54203,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/ar
  }
  
  static DEFINE_SPINLOCK(timebase_lock);
-@@ -192,7 +197,7 @@ static struct smp_ops_t bpa_iic_smp_ops 
+@@ -192,7 +197,7 @@
        .message_pass   = smp_iic_message_pass,
        .probe          = smp_iic_probe,
        .kick_cpu       = smp_cell_kick_cpu,
@@ -54225,7 +54212,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/ar
        .cpu_bootable   = smp_cell_cpu_bootable,
  };
  
-@@ -208,11 +213,7 @@ void __init smp_init_cell(void)
+@@ -208,11 +213,7 @@
        /* Mark threads which are still spinning in hold loops. */
        if (cpu_has_feature(CPU_FTR_SMT)) {
                for_each_present_cpu(i) {
@@ -54238,10 +54225,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/smp.c linux-2.6.27.19-5.1/ar
                                cpu_set(i, of_spin_map);
                }
        } else {
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/file.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/file.c       2009-03-25 16:10:53.000000000 +0000
-@@ -390,6 +390,9 @@ static int spufs_ps_fault(struct vm_area
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/file.c
+--- a/arch/powerpc/platforms/cell/spufs/file.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/file.c Wed May 06 16:56:05 2009 +0100
+@@ -390,6 +390,9 @@
        if (offset >= ps_size)
                return VM_FAULT_SIGBUS;
  
@@ -54251,27 +54238,23 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
        /*
         * Because we release the mmap_sem, the context may be destroyed while
         * we're in spu_wait. Grab an extra reference so it isn't destroyed
-@@ -548,6 +551,11 @@ spufs_regs_read(struct file *file, char 
+@@ -547,6 +550,11 @@
+ {
        int ret;
        struct spu_context *ctx = file->private_data;
++
 +      /* pre-check for file position: if we'd return EOF, there's no point
 +       * causing a deschedule */
 +      if (*pos >= sizeof(ctx->csa.lscsa->gprs))
 +              return 0;
-+
        ret = spu_acquire_saved(ctx);
        if (ret)
-               return ret;
-@@ -2426,38 +2434,49 @@ static inline int spufs_switch_log_avail
+@@ -2426,38 +2434,49 @@
  static int spufs_switch_log_open(struct inode *inode, struct file *file)
  {
        struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
 +      int rc;
-+
-+      rc = spu_acquire(ctx);
-+      if (rc)
-+              return rc;
  
 -      /*
 -       * We (ab-)use the mapping_lock here because it serves the similar
@@ -54279,6 +54262,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 -       * be renamed eventually.
 -       */
 -      mutex_lock(&ctx->mapping_lock);
++      rc = spu_acquire(ctx);
++      if (rc)
++              return rc;
++
        if (ctx->switch_log) {
 -              spin_lock(&ctx->switch_log->lock);
 -              ctx->switch_log->head = 0;
@@ -54299,7 +54286,8 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 -              init_waitqueue_head(&ctx->switch_log->wait);
 +              rc = -EBUSY;
 +              goto out;
-+      }
+       }
+-      mutex_unlock(&ctx->mapping_lock);
 +
 +      ctx->switch_log = kmalloc(sizeof(struct switch_log) +
 +              SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
@@ -54308,8 +54296,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 +      if (!ctx->switch_log) {
 +              rc = -ENOMEM;
 +              goto out;
-       }
--      mutex_unlock(&ctx->mapping_lock);
++      }
 +
 +      ctx->switch_log->head = ctx->switch_log->tail = 0;
 +      init_waitqueue_head(&ctx->switch_log->wait);
@@ -54340,7 +54327,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
  }
  
  static int switch_log_sprint(struct spu_context *ctx, char *tbuf, int n)
-@@ -2485,42 +2504,54 @@ static ssize_t spufs_switch_log_read(str
+@@ -2485,42 +2504,54 @@
        if (!buf || len < 0)
                return -EINVAL;
  
@@ -54364,10 +54351,6 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 +                      if (cnt > 0) {
 +                              /* If there's data ready to go, we can
 +                               * just return straight away */
-+                              break;
-+
-+                      } else if (file->f_flags & O_NONBLOCK) {
-+                              error = -EAGAIN;
                                break;
 -              }
  
@@ -54376,6 +54359,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 -                      /* multiple readers race? */
 -                      spin_unlock(&ctx->switch_log->lock);
 -                      continue;
++                      } else if (file->f_flags & O_NONBLOCK) {
++                              error = -EAGAIN;
++                              break;
++
 +                      } else {
 +                              /* spufs_wait will drop the mutex and
 +                               * re-acquire, but since we're in read(), the
@@ -54419,16 +54406,16 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
                        break;
  
                error = copy_to_user(buf + cnt, tbuf, width);
-@@ -2529,6 +2560,8 @@ static ssize_t spufs_switch_log_read(str
+@@ -2528,6 +2559,8 @@
+                       break;
                cnt += width;
        }
-+      spu_release(ctx);
 +
++      spu_release(ctx);
        return cnt == 0 ? error : cnt;
  }
-@@ -2537,29 +2570,41 @@ static unsigned int spufs_switch_log_pol
+@@ -2537,29 +2570,41 @@
        struct inode *inode = file->f_path.dentry->d_inode;
        struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
        unsigned int mask = 0;
@@ -54442,9 +54429,9 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
 +
        if (spufs_switch_log_used(ctx) > 0)
                mask |= POLLIN;
-+      spu_release(ctx);
 +
++      spu_release(ctx);
        return mask;
  }
  
@@ -54475,7 +54462,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
        if (spufs_switch_log_avail(ctx) > 1) {
                struct switch_log_entry *p;
  
-@@ -2573,7 +2618,6 @@ void spu_switch_log_notify(struct spu *s
+@@ -2573,7 +2618,6 @@
                ctx->switch_log->head =
                        (ctx->switch_log->head + 1) % SWITCH_LOG_BUFSIZE;
        }
@@ -54483,10 +54470,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/file.c linux-2.6.27.19
  
        wake_up(&ctx->switch_log->wait);
  }
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/inode.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/inode.c      2009-03-25 16:10:53.000000000 +0000
-@@ -298,8 +298,8 @@ spufs_mkdir(struct inode *dir, struct de
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/inode.c
+--- a/arch/powerpc/platforms/cell/spufs/inode.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/inode.c        Wed May 06 16:56:05 2009 +0100
+@@ -298,8 +298,8 @@
  
        d_instantiate(dentry, inode);
        dget(dentry);
@@ -54497,7 +54484,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c linux-2.6.27.1
        goto out;
  
  out_free_ctx:
-@@ -496,6 +496,8 @@ spufs_create_context(struct inode *inode
+@@ -496,6 +496,8 @@
        ret = spufs_context_open(dget(dentry), mntget(mnt));
        if (ret < 0) {
                WARN_ON(spufs_rmdir(inode, dentry));
@@ -54506,7 +54493,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c linux-2.6.27.1
                mutex_unlock(&inode->i_mutex);
                spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
                goto out;
-@@ -538,8 +540,8 @@ spufs_mkgang(struct inode *dir, struct d
+@@ -538,8 +540,8 @@
        inode->i_fop = &simple_dir_operations;
  
        d_instantiate(dentry, inode);
@@ -54517,10 +54504,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/inode.c linux-2.6.27.1
        return ret;
  
  out_iput:
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/run.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/run.c        2009-03-25 16:10:53.000000000 +0000
-@@ -249,6 +249,7 @@ static int spu_run_fini(struct spu_conte
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/run.c
+--- a/arch/powerpc/platforms/cell/spufs/run.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/run.c  Wed May 06 16:56:05 2009 +0100
+@@ -249,6 +249,7 @@
  
        spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
        clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags);
@@ -54528,7 +54515,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c linux-2.6.27.19-
        spu_release(ctx);
  
        if (signal_pending(current))
-@@ -417,8 +418,6 @@ long spufs_run_spu(struct spu_context *c
+@@ -417,8 +418,6 @@
        ret = spu_run_fini(ctx, npc, &status);
        spu_yield(ctx);
  
@@ -54537,10 +54524,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/run.c linux-2.6.27.19-
        if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
            (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100))
                ctx->stats.libassist++;
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sched.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sched.c      2009-03-25 16:10:53.000000000 +0000
-@@ -312,6 +312,15 @@ static struct spu *aff_ref_location(stru
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/sched.c
+--- a/arch/powerpc/platforms/cell/spufs/sched.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/sched.c        Wed May 06 16:56:05 2009 +0100
+@@ -312,6 +312,15 @@
         */
        node = cpu_to_node(raw_smp_processor_id());
        for (n = 0; n < MAX_NUMNODES; n++, node++) {
@@ -54556,7 +54543,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c linux-2.6.27.1
                int available_spus;
  
                node = (node < MAX_NUMNODES) ? node : 0;
-@@ -321,12 +330,10 @@ static struct spu *aff_ref_location(stru
+@@ -321,12 +330,10 @@
                available_spus = 0;
                mutex_lock(&cbe_spu_info[node].list_mutex);
                list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) {
@@ -54573,7 +54560,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c linux-2.6.27.1
                }
                if (available_spus < ctx->gang->contexts) {
                        mutex_unlock(&cbe_spu_info[node].list_mutex);
-@@ -437,6 +444,11 @@ static void spu_unbind_context(struct sp
+@@ -437,6 +444,11 @@
                atomic_dec(&cbe_spu_info[spu->node].reserved_spus);
  
        if (ctx->gang)
@@ -54585,10 +54572,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sched.c linux-2.6.27.1
                atomic_dec_if_positive(&ctx->gang->aff_sched_count);
  
        spu_switch_notify(spu, NULL);
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/spufs.h linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/spufs.h
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/spufs.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/spufs.h      2009-03-25 16:10:53.000000000 +0000
-@@ -65,7 +65,6 @@ enum {
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/spufs.h
+--- a/arch/powerpc/platforms/cell/spufs/spufs.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/spufs.h        Wed May 06 16:56:05 2009 +0100
+@@ -65,7 +65,6 @@
  };
  
  struct switch_log {
@@ -54596,10 +54583,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/spufs.h linux-2.6.27.1
        wait_queue_head_t       wait;
        unsigned long           head;
        unsigned long           tail;
-diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sputrace.c
---- linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/cell/spufs/sputrace.c   2009-03-25 16:10:53.000000000 +0000
-@@ -40,6 +40,7 @@ static DECLARE_WAIT_QUEUE_HEAD(sputrace_
+diff -r 9608d5473017 arch/powerpc/platforms/cell/spufs/sputrace.c
+--- a/arch/powerpc/platforms/cell/spufs/sputrace.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/cell/spufs/sputrace.c     Wed May 06 16:56:05 2009 +0100
+@@ -40,6 +40,7 @@
  static ktime_t sputrace_start;
  static unsigned long sputrace_head, sputrace_tail;
  static struct sputrace *sputrace_log;
@@ -54607,7 +54594,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c linux-2.6.2
  
  static int sputrace_used(void)
  {
-@@ -79,6 +80,11 @@ static ssize_t sputrace_read(struct file
+@@ -79,6 +80,11 @@
                char tbuf[128];
                int width;
  
@@ -54619,7 +54606,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c linux-2.6.2
                error = wait_event_interruptible(sputrace_wait,
                                                 sputrace_used() > 0);
                if (error)
-@@ -109,24 +115,49 @@ static ssize_t sputrace_read(struct file
+@@ -109,24 +115,49 @@
  
  static int sputrace_open(struct inode *inode, struct file *file)
  {
@@ -54672,10 +54659,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/cell/spufs/sputrace.c linux-2.6.2
        if (sputrace_avail() > 1) {
                struct sputrace *t = sputrace_log + sputrace_head;
  
-diff -purN linux-2.6.27/arch/powerpc/platforms/chrp/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/chrp/setup.c
---- linux-2.6.27/arch/powerpc/platforms/chrp/setup.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/chrp/setup.c    2009-03-25 16:10:53.000000000 +0000
-@@ -295,7 +295,7 @@ static void chrp_init_early(void)
+diff -r 9608d5473017 arch/powerpc/platforms/chrp/setup.c
+--- a/arch/powerpc/platforms/chrp/setup.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/chrp/setup.c      Wed May 06 16:56:05 2009 +0100
+@@ -295,7 +295,7 @@
        if (!property)
                goto out_put;
        if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
@@ -54684,9 +54671,9 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/chrp/setup.c linux-2.6.27.19-5.1/
  out_put:
        of_node_put(node);
  }
-diff -purN linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c linux-2.6.27.19-5.1/arch/powerpc/platforms/embedded6xx/linkstation.c
---- linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/embedded6xx/linkstation.c       2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/embedded6xx/linkstation.c
+--- a/arch/powerpc/platforms/embedded6xx/linkstation.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/embedded6xx/linkstation.c Wed May 06 16:56:05 2009 +0100
 @@ -13,6 +13,7 @@
  #include <linux/kernel.h>
  #include <linux/initrd.h>
@@ -54695,10 +54682,11 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c linux-2
  
  #include <asm/time.h>
  #include <asm/prom.h>
-@@ -54,6 +55,19 @@ static struct mtd_partition linkstation_
+@@ -53,6 +54,19 @@
+               .size   = 0x0f0000,
        },
  };
++
 +static __initdata struct of_device_id of_bus_ids[] = {
 +      { .type = "soc", },
 +      { .compatible = "simple-bus", },
@@ -54711,14 +54699,13 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/embedded6xx/linkstation.c linux-2
 +      return 0;
 +}
 +machine_device_initcall(linkstation, declare_of_platform_devices);
-+
  static int __init linkstation_add_bridge(struct device_node *dev)
  {
- #ifdef CONFIG_PCI
-diff -purN linux-2.6.27/arch/powerpc/platforms/pasemi/gpio_mdio.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pasemi/gpio_mdio.c
---- linux-2.6.27/arch/powerpc/platforms/pasemi/gpio_mdio.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pasemi/gpio_mdio.c      2009-03-25 16:10:53.000000000 +0000
-@@ -322,6 +322,7 @@ MODULE_DEVICE_TABLE(of, gpio_mdio_match)
+diff -r 9608d5473017 arch/powerpc/platforms/pasemi/gpio_mdio.c
+--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c        Wed May 06 16:56:05 2009 +0100
+@@ -322,6 +322,7 @@
  
  static struct of_platform_driver gpio_mdio_driver =
  {
@@ -54726,13 +54713,16 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pasemi/gpio_mdio.c linux-2.6.27.1
        .match_table    = gpio_mdio_match,
        .probe          = gpio_mdio_probe,
        .remove         = gpio_mdio_remove,
-diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/device-init.c
---- linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/device-init.c       2009-03-25 16:10:53.000000000 +0000
-@@ -499,6 +499,41 @@ static int __init ps3_register_graphics_
-       return result;
- }
+diff -r 9608d5473017 arch/powerpc/platforms/ps3/device-init.c
+--- a/arch/powerpc/platforms/ps3/device-init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/ps3/device-init.c Wed May 06 16:56:05 2009 +0100
+@@ -496,6 +496,41 @@
+                       __func__, __LINE__);
  
+       pr_debug(" <- %s:%d\n", __func__, __LINE__);
++      return result;
++}
++
 +static int __init ps3_register_ramdisk_device(void)
 +{
 +      int result;
@@ -54765,13 +54755,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c linux-2.6.27.19
 +fail_device_register:
 +      kfree(p);
 +      pr_debug(" <- %s:%d failed\n", __func__, __LINE__);
-+      return result;
-+}
-+
- /**
-  * ps3_setup_dynamic_device - Setup a dynamic device from the repository
-  */
-@@ -927,6 +962,8 @@ static int __init ps3_register_devices(v
+       return result;
+ }
+@@ -927,6 +962,8 @@
  
        ps3_register_lpm_devices();
  
@@ -54780,24 +54767,24 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/device-init.c linux-2.6.27.19
        pr_debug(" <- %s:%d\n", __func__, __LINE__);
        return 0;
  }
-diff -purN linux-2.6.27/arch/powerpc/platforms/ps3/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/setup.c
---- linux-2.6.27/arch/powerpc/platforms/ps3/setup.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/ps3/setup.c     2009-03-25 16:10:53.000000000 +0000
-@@ -42,6 +42,10 @@
+diff -r 9608d5473017 arch/powerpc/platforms/ps3/setup.c
+--- a/arch/powerpc/platforms/ps3/setup.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/ps3/setup.c       Wed May 06 16:56:05 2009 +0100
+@@ -41,6 +41,10 @@
+ #else
  #define DBG pr_debug
  #endif
++
 +/* mutex synchronizing GPU accesses and video mode changes */
 +DEFINE_MUTEX(ps3_gpu_mutex);
 +EXPORT_SYMBOL_GPL(ps3_gpu_mutex);
-+
  #if !defined(CONFIG_SMP)
  static void smp_send_stop(void) {}
- #endif
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/Kconfig linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/Kconfig
---- linux-2.6.27/arch/powerpc/platforms/pseries/Kconfig        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/Kconfig 2009-03-25 16:10:53.000000000 +0000
-@@ -54,7 +54,7 @@ config PPC_SMLPAR
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/Kconfig
+--- a/arch/powerpc/platforms/pseries/Kconfig   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/Kconfig   Wed May 06 16:56:05 2009 +0100
+@@ -54,7 +54,7 @@
  
  config CMM
        tristate "Collaborative memory management"
@@ -54806,19 +54793,19 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/Kconfig linux-2.6.27.19-5
        default y
        help
          Select this option, if you want to enable the kernel interface
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/eeh.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/eeh.c   2009-03-25 16:10:53.000000000 +0000
-@@ -21,6 +21,8 @@
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/eeh.c
+--- a/arch/powerpc/platforms/pseries/eeh.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/eeh.c     Wed May 06 16:56:05 2009 +0100
+@@ -20,6 +20,8 @@
+  *
   * Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
   */
-+#undef DEBUG
 +
++#undef DEBUG
  #include <linux/delay.h>
  #include <linux/init.h>
- #include <linux/list.h>
-@@ -488,10 +490,8 @@ int eeh_dn_check_failure(struct device_n
+@@ -488,10 +490,8 @@
        if (!(pdn->eeh_mode & EEH_MODE_SUPPORTED) ||
            pdn->eeh_mode & EEH_MODE_NOCHECK) {
                ignored_check++;
@@ -54831,7 +54818,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c linux-2.6.27.19-5.1
                return 0;
        }
  
-@@ -1014,10 +1014,9 @@ static void *early_enable_eeh(struct dev
+@@ -1014,10 +1014,9 @@
                        eeh_subsystem_enabled = 1;
                        pdn->eeh_mode |= EEH_MODE_SUPPORTED;
  
@@ -54845,7 +54832,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c linux-2.6.27.19-5.1
                } else {
  
                        /* This device doesn't support EEH, but it may have an
-@@ -1161,13 +1160,17 @@ static void eeh_add_device_late(struct p
+@@ -1161,13 +1160,17 @@
        if (!dev || !eeh_subsystem_enabled)
                return;
  
@@ -54853,51 +54840,53 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/eeh.c linux-2.6.27.19-5.1
 -      printk(KERN_DEBUG "EEH: adding device %s\n", pci_name(dev));
 -#endif
 +      pr_debug("EEH: Adding device %s\n", pci_name(dev));
--      pci_dev_get (dev);
-       dn = pci_device_to_OF_node(dev);
-       pdn = PCI_DN(dn);
++
++      dn = pci_device_to_OF_node(dev);
++      pdn = PCI_DN(dn);
 +      if (pdn->pcidev == dev) {
 +              pr_debug("EEH: Already referenced !\n");
 +              return;
 +      }
 +      WARN_ON(pdn->pcidev);
-+
-+      pci_dev_get (dev);
+       pci_dev_get (dev);
+-      dn = pci_device_to_OF_node(dev);
+-      pdn = PCI_DN(dn);
        pdn->pcidev = dev;
  
        pci_addr_cache_insert_device(dev);
-@@ -1206,17 +1209,18 @@ static void eeh_remove_device(struct pci
+@@ -1206,17 +1209,18 @@
                return;
  
        /* Unregister the device with the EEH/PCI address search system */
 -#ifdef DEBUG
 -      printk(KERN_DEBUG "EEH: remove device %s\n", pci_name(dev));
 -#endif
--      pci_addr_cache_remove_device(dev);
--      eeh_sysfs_remove_device(dev);
 +      pr_debug("EEH: Removing device %s\n", pci_name(dev));
-       dn = pci_device_to_OF_node(dev);
--      if (PCI_DN(dn)->pcidev) {
--              PCI_DN(dn)->pcidev = NULL;
--              pci_dev_put (dev);
++
++      dn = pci_device_to_OF_node(dev);
 +      if (PCI_DN(dn)->pcidev == NULL) {
 +              pr_debug("EEH: Not referenced !\n");
 +              return;
-       }
++      }
 +      PCI_DN(dn)->pcidev = NULL;
 +      pci_dev_put (dev);
 +
-+      pci_addr_cache_remove_device(dev);
-+      eeh_sysfs_remove_device(dev);
+       pci_addr_cache_remove_device(dev);
+       eeh_sysfs_remove_device(dev);
+-
+-      dn = pci_device_to_OF_node(dev);
+-      if (PCI_DN(dn)->pcidev) {
+-              PCI_DN(dn)->pcidev = NULL;
+-              pci_dev_put (dev);
+-      }
  }
  
  void eeh_remove_bus_device(struct pci_dev *dev)
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/hotplug-memory.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/hotplug-memory.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/hotplug-memory.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/hotplug-memory.c        2009-03-25 16:10:53.000000000 +0000
-@@ -21,7 +21,19 @@ static int pseries_remove_lmb(unsigned l
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/hotplug-memory.c
+--- a/arch/powerpc/platforms/pseries/hotplug-memory.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/hotplug-memory.c  Wed May 06 16:56:05 2009 +0100
+@@ -21,7 +21,19 @@
        struct zone *zone;
        int ret;
  
@@ -54918,19 +54907,19 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/hotplug-memory.c linux-2.
        zone = page_zone(pfn_to_page(start_pfn));
  
        /*
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/pci_dlpar.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/pci_dlpar.c     2009-03-25 16:10:53.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/pci_dlpar.c
+--- a/arch/powerpc/platforms/pseries/pci_dlpar.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/pci_dlpar.c       Wed May 06 16:56:05 2009 +0100
+@@ -24,6 +24,8 @@
+  * along with this program; if not, write to the Free Software
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
-+#undef DEBUG
 +
++#undef DEBUG
  #include <linux/pci.h>
  #include <asm/pci-bridge.h>
- #include <asm/ppc-pci.h>
-@@ -69,73 +71,41 @@ EXPORT_SYMBOL_GPL(pcibios_find_pci_bus);
+@@ -69,73 +71,41 @@
   * Remove all of the PCI devices under this bus both from the
   * linux pci device tree, and from the powerpc EEH address cache.
   */
@@ -54958,17 +54947,25 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
 -/* Must be called before pci_bus_add_devices */
 -void
 -pcibios_fixup_new_pci_devices(struct pci_bus *bus)
--{
++void pcibios_finish_adding_new_bus(struct pci_bus *bus)
+ {
 -      struct pci_dev *dev;
--
++      pr_debug("PCI: Finishing adding hotplug bus %04x:%02x\n",
++               pci_domain_nr(bus), bus->number);
 -      list_for_each_entry(dev, &bus->devices, bus_list) {
 -              /* Skip already-added devices */
 -              if (!dev->is_added) {
 -                      int i;
--
++      /* Allocate bus and devices resources */
++      pcibios_allocate_bus_resources(bus);
++      pcibios_claim_one_bus(bus);
 -                      /* Fill device archdata and setup iommu table */
 -                      pcibios_setup_new_device(dev);
--
++      /* Add new devices to global lists.  Register in proc, sysfs. */
++      pci_bus_add_devices(bus);
 -                      pci_read_irq_line(dev);
 -                      for (i = 0; i < PCI_NUM_RESOURCES; i++) {
 -                              struct resource *r = &dev->resource[i];
@@ -54979,21 +54976,20 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
 -                      }
 -              }
 -      }
--}
++      /* Fixup EEH */
++      eeh_add_device_tree_late(bus);
+ }
 -EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices);
 -
 -static int
 -pcibios_pci_config_bridge(struct pci_dev *dev)
-+void pcibios_finish_adding_new_bus(struct pci_bus *bus)
- {
+-{
 -      u8 sec_busno;
 -      struct pci_bus *child_bus;
 -
 -      /* Get busno of downstream bus */
 -      pci_read_config_byte(dev, PCI_SECONDARY_BUS, &sec_busno);
-+      pr_debug("PCI: Finishing adding hotplug bus %04x:%02x\n",
-+               pci_domain_nr(bus), bus->number);
+-
 -      /* Add to children of PCI bridge dev->bus */
 -      child_bus = pci_add_new_bus(dev->bus, dev, sec_busno);
 -      if (!child_bus) {
@@ -55003,28 +54999,21 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
 -      sprintf(child_bus->name, "PCI Bus #%02x", child_bus->number);
 -
 -      pci_scan_child_bus(child_bus);
-+      /* Allocate bus and devices resources */
-+      pcibios_allocate_bus_resources(bus);
-+      pcibios_claim_one_bus(bus);
+-
 -      /* Fixup new pci devices */
 -      pcibios_fixup_new_pci_devices(child_bus);
-+      /* Add new devices to global lists.  Register in proc, sysfs. */
-+      pci_bus_add_devices(bus);
+-
 -      /* Make the discovered devices available */
 -      pci_bus_add_devices(child_bus);
 -
 -      eeh_add_device_tree_late(child_bus);
 -      return 0;
-+      /* Fixup EEH */
-+      eeh_add_device_tree_late(bus);
- }
+-}
 +EXPORT_SYMBOL_GPL(pcibios_finish_adding_new_bus);
  
  /**
   * pcibios_add_pci_devices - adds new pci devices to bus
-@@ -147,10 +117,9 @@ pcibios_pci_config_bridge(struct pci_dev
+@@ -147,10 +117,9 @@
   * is how this routine differs from other, similar pcibios
   * routines.)
   */
@@ -55037,7 +55026,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
        struct pci_dev *dev;
        struct device_node *dn = pci_bus_to_OF_node(bus);
  
-@@ -162,25 +131,24 @@ pcibios_add_pci_devices(struct pci_bus *
+@@ -162,25 +131,24 @@
  
        if (mode == PCI_PROBE_DEVTREE) {
                /* use ofdt-based probe */
@@ -55076,16 +55065,16 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
        }
  }
  EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
-@@ -190,6 +158,8 @@ struct pci_controller * __devinit init_p
+@@ -189,6 +157,8 @@
+ {
        struct pci_controller *phb;
        int primary;
-+      pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name);
 +
++      pr_debug("PCI: Initializing new hotplug PHB %s\n", dn->full_name);
        primary = list_empty(&hose_list);
        phb = pcibios_alloc_controller(dn);
-       if (!phb)
-@@ -203,10 +173,57 @@ struct pci_controller * __devinit init_p
+@@ -203,10 +173,57 @@
                eeh_add_device_tree_early(dn);
  
        scan_phb(phb);
@@ -55146,10 +55135,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/pci_dlpar.c linux-2.6.27.
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(remove_phb_dynamic);
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/setup.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/setup.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/setup.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/setup.c 2009-03-25 16:10:53.000000000 +0000
-@@ -299,7 +299,11 @@ static void __init pSeries_setup_arch(vo
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/setup.c
+--- a/arch/powerpc/platforms/pseries/setup.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/setup.c   Wed May 06 16:56:05 2009 +0100
+@@ -299,7 +299,11 @@
  static int __init pSeries_init_panel(void)
  {
        /* Manually leave the kernel version on the panel. */
@@ -55162,9 +55151,9 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/setup.c linux-2.6.27.19-5
        ppc_md.progress(init_utsname()->version, 0);
  
        return 0;
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/smp.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/smp.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/smp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/smp.c   2009-03-25 16:10:53.000000000 +0000
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/smp.c
+--- a/arch/powerpc/platforms/pseries/smp.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/smp.c     Wed May 06 16:56:05 2009 +0100
 @@ -52,8 +52,8 @@
  
  
@@ -55176,7 +55165,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/smp.c linux-2.6.27.19-5.1
   */
  static cpumask_t of_spin_map;
  
-@@ -191,8 +191,7 @@ static void __devinit smp_pSeries_kick_c
+@@ -191,8 +191,7 @@
  static int smp_pSeries_cpu_bootable(unsigned int nr)
  {
        /* Special case - we inhibit secondary thread startup
@@ -55186,7 +55175,7 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/smp.c linux-2.6.27.19-5.1
         */
        if (system_state < SYSTEM_RUNNING &&
            cpu_has_feature(CPU_FTR_SMT) &&
-@@ -229,11 +228,7 @@ static void __init smp_init_pseries(void
+@@ -229,11 +228,7 @@
        /* Mark threads which are still spinning in hold loops. */
        if (cpu_has_feature(CPU_FTR_SMT)) {
                for_each_present_cpu(i) { 
@@ -55199,30 +55188,30 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/smp.c linux-2.6.27.19-5.1
                                cpu_set(i, of_spin_map);
                }
        } else {
-diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/xics.c linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/xics.c
---- linux-2.6.27/arch/powerpc/platforms/pseries/xics.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/platforms/pseries/xics.c  2009-03-25 16:10:53.000000000 +0000
-@@ -208,9 +208,6 @@ static int get_irq_server(unsigned int v
+diff -r 9608d5473017 arch/powerpc/platforms/pseries/xics.c
+--- a/arch/powerpc/platforms/pseries/xics.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/platforms/pseries/xics.c    Wed May 06 16:56:05 2009 +0100
+@@ -207,9 +207,6 @@
+       /* For the moment only implement delivery to all cpus or one cpu */
        cpumask_t cpumask = irq_desc[virq].affinity;
        cpumask_t tmp = CPU_MASK_NONE;
+-
 -      if (! cpu_isset(default_server, cpu_online_map))
 -              xics_update_irq_servers();
--
        if (!distribute_irqs)
                return default_server;
-@@ -659,8 +656,8 @@ void __init xics_init_IRQ(void)
+@@ -659,8 +656,8 @@
        if (found == 0)
                return;
  
--      xics_init_host();
-       xics_update_irq_servers();
-+      xics_init_host();
++      xics_update_irq_servers();
+       xics_init_host();
+-      xics_update_irq_servers();
  
        if (firmware_has_feature(FW_FEATURE_LPAR))
                ppc_md.get_irq = xics_get_irq_lpar;
-@@ -753,6 +750,10 @@ void xics_migrate_irqs_away(void)
+@@ -753,6 +750,10 @@
        int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
        unsigned int irq, virq;
  
@@ -55233,10 +55222,10 @@ diff -purN linux-2.6.27/arch/powerpc/platforms/pseries/xics.c linux-2.6.27.19-5.
        /* Reject any interrupt that was queued to us... */
        xics_set_cpu_priority(0);
  
-diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_msi.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_msi.c
---- linux-2.6.27/arch/powerpc/sysdev/fsl_msi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_msi.c  2009-03-25 16:10:54.000000000 +0000
-@@ -416,6 +416,7 @@ static const struct of_device_id fsl_of_
+diff -r 9608d5473017 arch/powerpc/sysdev/fsl_msi.c
+--- a/arch/powerpc/sysdev/fsl_msi.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/fsl_msi.c    Wed May 06 16:56:05 2009 +0100
+@@ -416,6 +416,7 @@
  };
  
  static struct of_platform_driver fsl_of_msi_driver = {
@@ -55244,10 +55233,10 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_msi.c linux-2.6.27.19-5.1/arch/p
        .name = "fsl-msi",
        .match_table = fsl_of_msi_ids,
        .probe = fsl_of_msi_probe,
-diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_rio.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_rio.c
---- linux-2.6.27/arch/powerpc/sysdev/fsl_rio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/fsl_rio.c  2009-03-25 16:10:54.000000000 +0000
-@@ -1197,6 +1197,7 @@ static const struct of_device_id fsl_of_
+diff -r 9608d5473017 arch/powerpc/sysdev/fsl_rio.c
+--- a/arch/powerpc/sysdev/fsl_rio.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/fsl_rio.c    Wed May 06 16:56:05 2009 +0100
+@@ -1197,6 +1197,7 @@
  };
  
  static struct of_platform_driver fsl_of_rio_rpn_driver = {
@@ -55255,10 +55244,10 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/fsl_rio.c linux-2.6.27.19-5.1/arch/p
        .name = "fsl-of-rio",
        .match_table = fsl_of_rio_rpn_ids,
        .probe = fsl_of_rio_rpn_probe,
-diff -purN linux-2.6.27/arch/powerpc/sysdev/ipic.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/ipic.c
---- linux-2.6.27/arch/powerpc/sysdev/ipic.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/ipic.c     2009-03-25 16:10:54.000000000 +0000
-@@ -920,6 +920,7 @@ static int ipic_suspend(struct sys_devic
+diff -r 9608d5473017 arch/powerpc/sysdev/ipic.c
+--- a/arch/powerpc/sysdev/ipic.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/ipic.c       Wed May 06 16:56:05 2009 +0100
+@@ -920,6 +920,7 @@
        ipic_saved_state.sermr = ipic_read(ipic->regs, IPIC_SERMR);
        ipic_saved_state.sercr = ipic_read(ipic->regs, IPIC_SERCR);
  
@@ -55266,7 +55255,7 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/ipic.c linux-2.6.27.19-5.1/arch/powe
        if (fsl_deep_sleep()) {
                /* In deep sleep, make sure there can be no
                 * pending interrupts, as this can cause
-@@ -930,6 +931,7 @@ static int ipic_suspend(struct sys_devic
+@@ -930,6 +931,7 @@
                ipic_write(ipic->regs, IPIC_SEMSR, 0);
                ipic_write(ipic->regs, IPIC_SERMR, 0);
        }
@@ -55274,10 +55263,10 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/ipic.c linux-2.6.27.19-5.1/arch/powe
  
        return 0;
  }
-diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/mpic.c
---- linux-2.6.27/arch/powerpc/sysdev/mpic.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/mpic.c     2009-03-25 16:10:54.000000000 +0000
-@@ -563,6 +563,51 @@ static void __init mpic_scan_ht_pics(str
+diff -r 9608d5473017 arch/powerpc/sysdev/mpic.c
+--- a/arch/powerpc/sysdev/mpic.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/mpic.c       Wed May 06 16:56:05 2009 +0100
+@@ -563,6 +563,51 @@
  
  #endif /* CONFIG_MPIC_U3_HT_IRQS */
  
@@ -55329,7 +55318,7 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powe
  
  #define mpic_irq_to_hw(virq)  ((unsigned int)irq_map[virq].hwirq)
  
-@@ -777,12 +822,18 @@ void mpic_set_affinity(unsigned int irq,
+@@ -777,12 +822,18 @@
        struct mpic *mpic = mpic_from_irq(irq);
        unsigned int src = mpic_irq_to_hw(irq);
  
@@ -55352,7 +55341,7 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powe
  }
  
  static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type)
-@@ -1220,6 +1271,7 @@ void __init mpic_set_default_senses(stru
+@@ -1220,6 +1271,7 @@
  void __init mpic_init(struct mpic *mpic)
  {
        int i;
@@ -55360,7 +55349,7 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powe
  
        BUG_ON(mpic->num_sources == 0);
  
-@@ -1262,6 +1314,11 @@ void __init mpic_init(struct mpic *mpic)
+@@ -1262,6 +1314,11 @@
  
        mpic_pasemi_msi_init(mpic);
  
@@ -55372,7 +55361,7 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powe
        for (i = 0; i < mpic->num_sources; i++) {
                /* start with vector = source number, and masked */
                u32 vecpri = MPIC_VECPRI_MASK | i |
-@@ -1272,8 +1329,7 @@ void __init mpic_init(struct mpic *mpic)
+@@ -1272,8 +1329,7 @@
                        continue;
                /* init hw */
                mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
@@ -55382,10 +55371,10 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/mpic.c linux-2.6.27.19-5.1/arch/powe
        }
        
        /* Init spurious vector */
-diff -purN linux-2.6.27/arch/powerpc/sysdev/pmi.c linux-2.6.27.19-5.1/arch/powerpc/sysdev/pmi.c
---- linux-2.6.27/arch/powerpc/sysdev/pmi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/sysdev/pmi.c      2009-03-25 16:10:54.000000000 +0000
-@@ -205,6 +205,7 @@ static int pmi_of_remove(struct of_devic
+diff -r 9608d5473017 arch/powerpc/sysdev/pmi.c
+--- a/arch/powerpc/sysdev/pmi.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/sysdev/pmi.c        Wed May 06 16:56:05 2009 +0100
+@@ -205,6 +205,7 @@
  }
  
  static struct of_platform_driver pmi_of_platform_driver = {
@@ -55393,10 +55382,10 @@ diff -purN linux-2.6.27/arch/powerpc/sysdev/pmi.c linux-2.6.27.19-5.1/arch/power
        .match_table    = pmi_match,
        .probe          = pmi_of_probe,
        .remove         = pmi_of_remove,
-diff -purN linux-2.6.27/arch/powerpc/xmon/xmon.c linux-2.6.27.19-5.1/arch/powerpc/xmon/xmon.c
---- linux-2.6.27/arch/powerpc/xmon/xmon.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/powerpc/xmon/xmon.c       2009-03-25 16:10:54.000000000 +0000
-@@ -136,6 +136,7 @@ static struct bpt *in_breakpoint_table(u
+diff -r 9608d5473017 arch/powerpc/xmon/xmon.c
+--- a/arch/powerpc/xmon/xmon.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/powerpc/xmon/xmon.c Wed May 06 16:56:05 2009 +0100
+@@ -136,6 +136,7 @@
  static int  do_step(struct pt_regs *);
  static void bpt_cmds(void);
  static void cacheflush(void);
@@ -55404,7 +55393,7 @@ diff -purN linux-2.6.27/arch/powerpc/xmon/xmon.c linux-2.6.27.19-5.1/arch/powerp
  static int  cpu_cmd(void);
  static void csum(void);
  static void bootcmds(void);
-@@ -194,6 +195,7 @@ Commands:\n\
+@@ -194,6 +195,7 @@
  #endif
    "\
    C   checksum\n\
@@ -55412,17 +55401,17 @@ diff -purN linux-2.6.27/arch/powerpc/xmon/xmon.c linux-2.6.27.19-5.1/arch/powerp
    d   dump bytes\n\
    di  dump instructions\n\
    df  dump float values\n\
-@@ -808,6 +810,9 @@ cmds(struct pt_regs *excp)
+@@ -807,6 +809,9 @@
+                       break;
                case 'd':
                        dump();
-                       break;
++                      break;
 +              case 'D':
 +                      xmon_show_dmesg();
-+                      break;
+                       break;
                case 'l':
                        symbol_lookup();
-                       break;
-@@ -2522,6 +2527,58 @@ static void xmon_print_symbol(unsigned l
+@@ -2522,6 +2527,58 @@
        printf("%s", after);
  }
  
@@ -55481,10 +55470,10 @@ diff -purN linux-2.6.27/arch/powerpc/xmon/xmon.c linux-2.6.27.19-5.1/arch/powerp
  #ifdef CONFIG_PPC64
  static void dump_slb(void)
  {
-diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
---- linux-2.6.27/arch/s390/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/Kconfig      2009-03-25 16:10:51.000000000 +0000
-@@ -70,13 +70,18 @@ mainmenu "Linux Kernel Configuration"
+diff -r 9608d5473017 arch/s390/Kconfig
+--- a/arch/s390/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/Kconfig        Wed May 06 16:56:05 2009 +0100
+@@ -70,12 +70,17 @@
  
  config S390
        def_bool y
@@ -55497,13 +55486,12 @@ diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
 +      select HAVE_ARCH_TRACEHOOK
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "Base setup"
  
- comment "Processor type and features"
-@@ -222,6 +227,14 @@ config MARCH_Z9_109
+@@ -222,6 +227,14 @@
          Class (z9 BC). The kernel will be slightly faster but will not
          work on older machines such as the z990, z890, z900, and z800.
  
@@ -55518,10 +55506,11 @@ diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
  endchoice
  
  config PACK_STACK
-@@ -342,16 +355,6 @@ config QDIO
+@@ -341,16 +354,6 @@
+         module will be called qdio.
  
          If unsure, say Y.
+-
 -config QDIO_DEBUG
 -      bool "Extended debugging information"
 -      depends on QDIO
@@ -55531,11 +55520,10 @@ diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
 -        Warning: this option reduces the performance of the QDIO module.
 -
 -        If unsure, say N.
--
  config CHSC_SCH
        tristate "Support for CHSC subchannels"
-       help
-@@ -571,6 +574,15 @@ bool "s390 guest support (EXPERIMENTAL)"
+@@ -571,6 +574,15 @@
        select VIRTIO_CONSOLE
        help
          Select this option if you want to run the kernel under s390 linux
@@ -55551,10 +55539,10 @@ diff -purN linux-2.6.27/arch/s390/Kconfig linux-2.6.27.19-5.1/arch/s390/Kconfig
  endmenu
  
  source "net/Kconfig"
-diff -purN linux-2.6.27/arch/s390/Makefile linux-2.6.27.19-5.1/arch/s390/Makefile
---- linux-2.6.27/arch/s390/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/Makefile     2009-03-25 16:10:52.000000000 +0000
-@@ -34,6 +34,7 @@ cflags-$(CONFIG_MARCH_G5)   += $(call cc
+diff -r 9608d5473017 arch/s390/Makefile
+--- a/arch/s390/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/Makefile       Wed May 06 16:56:05 2009 +0100
+@@ -34,6 +34,7 @@
  cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900)
  cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
  cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
@@ -55562,9 +55550,9 @@ diff -purN linux-2.6.27/arch/s390/Makefile linux-2.6.27.19-5.1/arch/s390/Makefil
  
  #KBUILD_IMAGE is necessary for make rpm
  KBUILD_IMAGE  :=arch/s390/boot/image
-diff -purN linux-2.6.27/arch/s390/appldata/appldata.h linux-2.6.27.19-5.1/arch/s390/appldata/appldata.h
---- linux-2.6.27/arch/s390/appldata/appldata.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata.h  2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/appldata/appldata.h
+--- a/arch/s390/appldata/appldata.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata.h    Wed May 06 16:56:05 2009 +0100
 @@ -26,10 +26,6 @@
  #define CTL_APPLDATA_NET_SUM  2125
  #define CTL_APPLDATA_PROC     2126
@@ -55576,18 +55564,18 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata.h linux-2.6.27.19-5.1/arch/s
  struct appldata_ops {
        struct list_head list;
        struct ctl_table_header *sysctl_header;
-diff -purN linux-2.6.27/arch/s390/appldata/appldata_base.c linux-2.6.27.19-5.1/arch/s390/appldata/appldata_base.c
---- linux-2.6.27/arch/s390/appldata/appldata_base.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata_base.c     2009-03-25 16:10:52.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 arch/s390/appldata/appldata_base.c
+--- a/arch/s390/appldata/appldata_base.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata_base.c       Wed May 06 16:56:05 2009 +0100
+@@ -9,6 +9,8 @@
+  *
   * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
   */
-+#define KMSG_COMPONENT        "appldata"
 +
++#define KMSG_COMPONENT        "appldata"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/slab.h>
 @@ -32,7 +34,6 @@
  #include "appldata.h"
  
@@ -55596,7 +55584,7 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_base.c linux-2.6.27.19-5.1/a
  #define APPLDATA_CPU_INTERVAL 10000           /* default (CPU) time for
                                                   sampling interval in
                                                   milliseconds */
-@@ -390,8 +391,8 @@ appldata_generic_handler(ctl_table *ctl,
+@@ -390,8 +391,8 @@
                                        (unsigned long) ops->data, ops->size,
                                        ops->mod_lvl);
                if (rc != 0) {
@@ -55607,7 +55595,7 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_base.c linux-2.6.27.19-5.1/a
                        module_put(ops->owner);
                } else
                        ops->active = 1;
-@@ -401,8 +402,8 @@ appldata_generic_handler(ctl_table *ctl,
+@@ -401,8 +402,8 @@
                                (unsigned long) ops->data, ops->size,
                                ops->mod_lvl);
                if (rc != 0)
@@ -55618,18 +55606,18 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_base.c linux-2.6.27.19-5.1/a
                module_put(ops->owner);
        }
        spin_unlock(&appldata_ops_lock);
-diff -purN linux-2.6.27/arch/s390/appldata/appldata_os.c linux-2.6.27.19-5.1/arch/s390/appldata/appldata_os.c
---- linux-2.6.27/arch/s390/appldata/appldata_os.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/appldata/appldata_os.c       2009-03-25 16:10:52.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 arch/s390/appldata/appldata_os.c
+--- a/arch/s390/appldata/appldata_os.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/appldata/appldata_os.c Wed May 06 16:56:05 2009 +0100
+@@ -8,6 +8,8 @@
+  *
   * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
   */
-+#define KMSG_COMPONENT        "appldata"
 +
++#define KMSG_COMPONENT        "appldata"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/slab.h>
 @@ -22,7 +24,6 @@
  #include "appldata.h"
  
@@ -55638,7 +55626,7 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_os.c linux-2.6.27.19-5.1/arc
  #define LOAD_INT(x) ((x) >> FSHIFT)
  #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
  
-@@ -143,21 +144,16 @@ static void appldata_get_os_data(void *d
+@@ -143,21 +144,16 @@
                                           (unsigned long) ops.data, new_size,
                                           ops.mod_lvl);
                        if (rc != 0)
@@ -55664,7 +55652,7 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_os.c linux-2.6.27.19-5.1/arc
                }
                ops.size = new_size;
        }
-@@ -178,8 +174,8 @@ static int __init appldata_os_init(void)
+@@ -178,8 +174,8 @@
        max_size = sizeof(struct appldata_os_data) +
                   (NR_CPUS * sizeof(struct appldata_os_per_cpu));
        if (max_size > APPLDATA_MAX_REC_SIZE) {
@@ -55675,10 +55663,10 @@ diff -purN linux-2.6.27/arch/s390/appldata/appldata_os.c linux-2.6.27.19-5.1/arc
                rc = -ENOMEM;
                goto out;
        }
-diff -purN linux-2.6.27/arch/s390/boot/Makefile linux-2.6.27.19-5.1/arch/s390/boot/Makefile
---- linux-2.6.27/arch/s390/boot/Makefile       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/boot/Makefile        2009-03-25 16:10:51.000000000 +0000
-@@ -8,7 +8,7 @@ COMPILE_VERSION := __linux_compile_versi
+diff -r 9608d5473017 arch/s390/boot/Makefile
+--- a/arch/s390/boot/Makefile  Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/boot/Makefile  Wed May 06 16:56:05 2009 +0100
+@@ -8,7 +8,7 @@
  
  EXTRA_CFLAGS  := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I.
  
@@ -55687,9 +55675,9 @@ diff -purN linux-2.6.27/arch/s390/boot/Makefile linux-2.6.27.19-5.1/arch/s390/bo
  
  $(obj)/image: vmlinux FORCE
        $(call if_changed,objcopy)
-diff -purN linux-2.6.27/arch/s390/boot/kerntypes.c linux-2.6.27.19-5.1/arch/s390/boot/kerntypes.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/boot/kerntypes.c     2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/boot/kerntypes.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/boot/kerntypes.c       Wed May 06 16:56:05 2009 +0100
 @@ -0,0 +1,289 @@
 +/*
 + * kerntypes.c
@@ -55980,19 +55968,19 @@ diff -purN linux-2.6.27/arch/s390/boot/kerntypes.c linux-2.6.27.19-5.1/arch/s390
 +
 +/* include driver core private structures */
 +#include "drivers/base/base.h"
-diff -purN linux-2.6.27/arch/s390/crypto/aes_s390.c linux-2.6.27.19-5.1/arch/s390/crypto/aes_s390.c
---- linux-2.6.27/arch/s390/crypto/aes_s390.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/crypto/aes_s390.c    2009-03-25 16:10:51.000000000 +0000
-@@ -17,6 +17,8 @@
+diff -r 9608d5473017 arch/s390/crypto/aes_s390.c
+--- a/arch/s390/crypto/aes_s390.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/crypto/aes_s390.c      Wed May 06 16:56:05 2009 +0100
+@@ -16,6 +16,8 @@
+  * any later version.
   *
   */
-+#define KMSG_COMPONENT "aes_s390"
 +
++#define KMSG_COMPONENT "aes_s390"
  #include <crypto/aes.h>
  #include <crypto/algapi.h>
- #include <linux/err.h>
-@@ -169,7 +171,8 @@ static int fallback_init_cip(struct cryp
+@@ -169,7 +171,8 @@
                        CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
  
        if (IS_ERR(sctx->fallback.cip)) {
@@ -56002,7 +55990,7 @@ diff -purN linux-2.6.27/arch/s390/crypto/aes_s390.c linux-2.6.27.19-5.1/arch/s39
                return PTR_ERR(sctx->fallback.blk);
        }
  
-@@ -349,7 +352,8 @@ static int fallback_init_blk(struct cryp
+@@ -349,7 +352,8 @@
                        CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
  
        if (IS_ERR(sctx->fallback.blk)) {
@@ -56012,7 +56000,7 @@ diff -purN linux-2.6.27/arch/s390/crypto/aes_s390.c linux-2.6.27.19-5.1/arch/s39
                return PTR_ERR(sctx->fallback.blk);
        }
  
-@@ -515,9 +519,8 @@ static int __init aes_s390_init(void)
+@@ -515,9 +519,8 @@
  
        /* z9 109 and z9 BC/EC only support 128 bit key length */
        if (keylen_flag == AES_KEYLEN_128)
@@ -56024,10 +56012,10 @@ diff -purN linux-2.6.27/arch/s390/crypto/aes_s390.c linux-2.6.27.19-5.1/arch/s39
  
        ret = crypto_register_alg(&aes_alg);
        if (ret)
-diff -purN linux-2.6.27/arch/s390/hypfs/hypfs_diag.c linux-2.6.27.19-5.1/arch/s390/hypfs/hypfs_diag.c
---- linux-2.6.27/arch/s390/hypfs/hypfs_diag.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/hypfs/hypfs_diag.c   2009-03-25 16:10:52.000000000 +0000
-@@ -3,10 +3,12 @@
+diff -r 9608d5473017 arch/s390/hypfs/hypfs_diag.c
+--- a/arch/s390/hypfs/hypfs_diag.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/hypfs/hypfs_diag.c     Wed May 06 16:56:05 2009 +0100
+@@ -3,9 +3,11 @@
   *    Hypervisor filesystem for Linux on s390. Diag 204 and 224
   *    implementation.
   *
@@ -56035,13 +56023,12 @@ diff -purN linux-2.6.27/arch/s390/hypfs/hypfs_diag.c linux-2.6.27.19-5.1/arch/s3
 + *    Copyright IBM Corp. 2006, 2008
   *    Author(s): Michael Holzheu <holzheu@de.ibm.com>
   */
-+#define KMSG_COMPONENT "hypfs"
 +
++#define KMSG_COMPONENT "hypfs"
  #include <linux/types.h>
  #include <linux/errno.h>
- #include <linux/string.h>
-@@ -527,13 +529,14 @@ __init int hypfs_diag_init(void)
+@@ -527,13 +529,14 @@
        int rc;
  
        if (diag204_probe()) {
@@ -56058,10 +56045,10 @@ diff -purN linux-2.6.27/arch/s390/hypfs/hypfs_diag.c linux-2.6.27.19-5.1/arch/s3
        }
        return rc;
  }
-diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hypfs/inode.c
---- linux-2.6.27/arch/s390/hypfs/inode.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/hypfs/inode.c        2009-03-25 16:10:52.000000000 +0000
-@@ -2,10 +2,12 @@
+diff -r 9608d5473017 arch/s390/hypfs/inode.c
+--- a/arch/s390/hypfs/inode.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/hypfs/inode.c  Wed May 06 16:56:05 2009 +0100
+@@ -2,9 +2,11 @@
   *  arch/s390/hypfs/inode.c
   *    Hypervisor filesystem for Linux on s390.
   *
@@ -56069,13 +56056,12 @@ diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hy
 + *    Copyright IBM Corp. 2006, 2008
   *    Author(s): Michael Holzheu <holzheu@de.ibm.com>
   */
-+#define KMSG_COMPONENT "hypfs"
 +
++#define KMSG_COMPONENT "hypfs"
  #include <linux/types.h>
  #include <linux/errno.h>
- #include <linux/fs.h>
-@@ -200,7 +202,7 @@ static ssize_t hypfs_aio_write(struct ki
+@@ -200,7 +202,7 @@
        else
                rc = hypfs_diag_create_files(sb, sb->s_root);
        if (rc) {
@@ -56084,7 +56070,7 @@ diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hy
                hypfs_delete_tree(sb->s_root);
                goto out;
        }
-@@ -252,8 +254,7 @@ static int hypfs_parse_options(char *opt
+@@ -252,8 +254,7 @@
                        break;
                case opt_err:
                default:
@@ -56094,7 +56080,7 @@ diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hy
                        return -EINVAL;
                }
        }
-@@ -317,7 +318,7 @@ static int hypfs_fill_super(struct super
+@@ -317,7 +318,7 @@
        }
        hypfs_update_update(sb);
        sb->s_root = root_dentry;
@@ -56103,7 +56089,7 @@ diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hy
        return 0;
  
  err_tree:
-@@ -513,7 +514,7 @@ fail_sysfs:
+@@ -513,7 +514,7 @@
        if (!MACHINE_IS_VM)
                hypfs_diag_exit();
  fail_diag:
@@ -56112,9 +56098,9 @@ diff -purN linux-2.6.27/arch/s390/hypfs/inode.c linux-2.6.27.19-5.1/arch/s390/hy
        return rc;
  }
  
-diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s390/include/asm/dasd.h
---- linux-2.6.27/arch/s390/include/asm/dasd.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/dasd.h   2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/dasd.h
+--- a/arch/s390/include/asm/dasd.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/dasd.h     Wed May 06 16:56:05 2009 +0100
 @@ -3,6 +3,8 @@
   * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
   * Bugreports.to..: <Linux390@de.ibm.com>
@@ -56124,7 +56110,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s3
   *
   * This file is the interface of the DASD device driver, which is exported to user space
   * any future changes wrt the API will result in a change of the APIVERSION reported
-@@ -76,6 +78,7 @@ typedef struct dasd_information2_t {
+@@ -76,6 +78,7 @@
  #define DASD_FEATURE_USEDIAG       0x02
  #define DASD_FEATURE_INITIAL_ONLINE  0x04
  #define DASD_FEATURE_ERPLOG        0x08
@@ -56132,7 +56118,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s3
  
  #define DASD_PARTN_BITS 2
  
-@@ -202,6 +205,16 @@ typedef struct attrib_data_t {
+@@ -202,6 +205,16 @@
  #define DASD_SEQ_PRESTAGE  0x4
  #define DASD_REC_ACCESS    0x5
  
@@ -56149,7 +56135,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s3
  
  /********************************************************************************
   * SECTION: Definition of IOCTLs
-@@ -247,6 +260,7 @@ typedef struct attrib_data_t {
+@@ -247,6 +260,7 @@
  /* Set Attributes (cache operations) */
  #define BIODASDSATTR   _IOW(DASD_IOCTL_LETTER,2,attrib_data_t) 
  
@@ -56157,10 +56143,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/dasd.h linux-2.6.27.19-5.1/arch/s3
  
  #endif                                /* DASD_H */
  
-diff -purN linux-2.6.27/arch/s390/include/asm/elf.h linux-2.6.27.19-5.1/arch/s390/include/asm/elf.h
---- linux-2.6.27/arch/s390/include/asm/elf.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/elf.h    2009-03-25 16:10:52.000000000 +0000
-@@ -168,16 +168,16 @@ extern char elf_platform[];
+diff -r 9608d5473017 arch/s390/include/asm/elf.h
+--- a/arch/s390/include/asm/elf.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/elf.h      Wed May 06 16:56:05 2009 +0100
+@@ -168,16 +168,16 @@
  #ifndef __s390x__
  #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
  #else /* __s390x__ */
@@ -56187,10 +56173,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/elf.h linux-2.6.27.19-5.1/arch/s39
  } while (0)
  #endif /* __s390x__ */
  
-diff -purN linux-2.6.27/arch/s390/include/asm/fcx.h linux-2.6.27.19-5.1/arch/s390/include/asm/fcx.h
---- linux-2.6.27/arch/s390/include/asm/fcx.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/fcx.h    2009-03-25 16:10:52.000000000 +0000
-@@ -248,8 +248,8 @@ struct dcw {
+diff -r 9608d5473017 arch/s390/include/asm/fcx.h
+--- a/arch/s390/include/asm/fcx.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/fcx.h      Wed May 06 16:56:06 2009 +0100
+@@ -248,8 +248,8 @@
  #define TCCB_MAX_SIZE         (sizeof(struct tccb_tcah) + \
                                 TCCB_MAX_DCW * sizeof(struct dcw) + \
                                 sizeof(struct tccb_tcat))
@@ -56201,9 +56187,9 @@ diff -purN linux-2.6.27/arch/s390/include/asm/fcx.h linux-2.6.27.19-5.1/arch/s39
  
  /**
   * struct tccb_tcah - Transport-Command-Area Header (TCAH)
-diff -purN linux-2.6.27/arch/s390/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/s390/include/asm/ioctls.h
---- linux-2.6.27/arch/s390/include/asm/ioctls.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/ioctls.h 2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/ioctls.h
+--- a/arch/s390/include/asm/ioctls.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/ioctls.h   Wed May 06 16:56:06 2009 +0100
 @@ -60,6 +60,7 @@
  #define TCSETSF2      _IOW('T',0x2D, struct termios2)
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -56212,10 +56198,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/
  
  #define FIONCLEX      0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX               0x5451
-diff -purN linux-2.6.27/arch/s390/include/asm/ptrace.h linux-2.6.27.19-5.1/arch/s390/include/asm/ptrace.h
---- linux-2.6.27/arch/s390/include/asm/ptrace.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/ptrace.h 2009-03-25 16:10:52.000000000 +0000
-@@ -321,8 +321,8 @@ struct pt_regs 
+diff -r 9608d5473017 arch/s390/include/asm/ptrace.h
+--- a/arch/s390/include/asm/ptrace.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/ptrace.h   Wed May 06 16:56:06 2009 +0100
+@@ -321,8 +321,8 @@
        psw_t psw;
        unsigned long gprs[NUM_GPRS];
        unsigned long orig_gpr2;
@@ -56225,7 +56211,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/ptrace.h linux-2.6.27.19-5.1/arch/
  };
  #endif
  
-@@ -490,6 +490,7 @@ extern void user_disable_single_step(str
+@@ -490,6 +490,7 @@
  
  #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
  #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
@@ -56233,10 +56219,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/ptrace.h linux-2.6.27.19-5.1/arch/
  #define regs_return_value(regs)((regs)->gprs[2])
  #define profile_pc(regs) instruction_pointer(regs)
  extern void show_regs(struct pt_regs * regs);
-diff -purN linux-2.6.27/arch/s390/include/asm/qdio.h linux-2.6.27.19-5.1/arch/s390/include/asm/qdio.h
---- linux-2.6.27/arch/s390/include/asm/qdio.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/qdio.h   2009-03-25 16:10:52.000000000 +0000
-@@ -367,16 +367,16 @@ struct qdio_initialize {
+diff -r 9608d5473017 arch/s390/include/asm/qdio.h
+--- a/arch/s390/include/asm/qdio.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/qdio.h     Wed May 06 16:56:06 2009 +0100
+@@ -367,16 +367,16 @@
  #define QDIO_FLAG_SYNC_OUTPUT         0x02
  #define QDIO_FLAG_PCI_OUT             0x10
  
@@ -56261,10 +56247,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/qdio.h linux-2.6.27.19-5.1/arch/s3
 +extern int qdio_get_ssqd_desc(struct ccw_device *dev, struct qdio_ssqd_desc*);
  
  #endif /* __QDIO_H__ */
-diff -purN linux-2.6.27/arch/s390/include/asm/setup.h linux-2.6.27.19-5.1/arch/s390/include/asm/setup.h
---- linux-2.6.27/arch/s390/include/asm/setup.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/setup.h  2009-03-25 16:10:52.000000000 +0000
-@@ -43,6 +43,8 @@ struct mem_chunk {
+diff -r 9608d5473017 arch/s390/include/asm/setup.h
+--- a/arch/s390/include/asm/setup.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/setup.h    Wed May 06 16:56:06 2009 +0100
+@@ -43,6 +43,8 @@
  
  extern struct mem_chunk memory_chunk[];
  extern unsigned long real_memory_size;
@@ -56273,10 +56259,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/setup.h linux-2.6.27.19-5.1/arch/s
  
  void detect_memory_layout(struct mem_chunk chunk[]);
  
-diff -purN linux-2.6.27/arch/s390/include/asm/sigp.h linux-2.6.27.19-5.1/arch/s390/include/asm/sigp.h
---- linux-2.6.27/arch/s390/include/asm/sigp.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/sigp.h   2009-03-25 16:10:52.000000000 +0000
-@@ -61,6 +61,7 @@ typedef enum
+diff -r 9608d5473017 arch/s390/include/asm/sigp.h
+--- a/arch/s390/include/asm/sigp.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/sigp.h     Wed May 06 16:56:06 2009 +0100
+@@ -61,6 +61,7 @@
  {
        ec_schedule=0,
        ec_call_function,
@@ -56284,10 +56270,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/sigp.h linux-2.6.27.19-5.1/arch/s3
        ec_bit_last
  } ec_bit_sig;
  
-diff -purN linux-2.6.27/arch/s390/include/asm/smp.h linux-2.6.27.19-5.1/arch/s390/include/asm/smp.h
---- linux-2.6.27/arch/s390/include/asm/smp.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/smp.h    2009-03-25 16:10:52.000000000 +0000
-@@ -91,8 +91,9 @@ extern int __cpu_up (unsigned int cpu);
+diff -r 9608d5473017 arch/s390/include/asm/smp.h
+--- a/arch/s390/include/asm/smp.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/smp.h      Wed May 06 16:56:06 2009 +0100
+@@ -91,8 +91,9 @@
  extern struct mutex smp_cpu_state_mutex;
  extern int smp_cpu_polarization[];
  
@@ -56299,10 +56285,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/smp.h linux-2.6.27.19-5.1/arch/s39
  #endif
  
  #ifndef CONFIG_SMP
-diff -purN linux-2.6.27/arch/s390/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/s390/include/asm/spinlock.h
---- linux-2.6.27/arch/s390/include/asm/spinlock.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/spinlock.h       2009-03-25 16:10:52.000000000 +0000
-@@ -172,6 +172,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 arch/s390/include/asm/spinlock.h
+--- a/arch/s390/include/asm/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/spinlock.h Wed May 06 16:56:06 2009 +0100
+@@ -172,6 +172,9 @@
        return _raw_write_trylock_retry(rw);
  }
  
@@ -56312,9 +56298,9 @@ diff -purN linux-2.6.27/arch/s390/include/asm/spinlock.h linux-2.6.27.19-5.1/arc
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
  
-diff -purN linux-2.6.27/arch/s390/include/asm/syscall.h linux-2.6.27.19-5.1/arch/s390/include/asm/syscall.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/syscall.h        2009-03-25 16:10:52.000000000 +0000
+diff -r 9608d5473017 arch/s390/include/asm/syscall.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/include/asm/syscall.h  Wed May 06 16:56:06 2009 +0100
 @@ -0,0 +1,78 @@
 +/*
 + * Access to user system call parameters and results
@@ -56394,10 +56380,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/syscall.h linux-2.6.27.19-5.1/arch
 +}
 +
 +#endif        /* _ASM_SYSCALL_H */
-diff -purN linux-2.6.27/arch/s390/include/asm/thread_info.h linux-2.6.27.19-5.1/arch/s390/include/asm/thread_info.h
---- linux-2.6.27/arch/s390/include/asm/thread_info.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/thread_info.h    2009-03-25 16:10:52.000000000 +0000
-@@ -86,6 +86,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 arch/s390/include/asm/thread_info.h
+--- a/arch/s390/include/asm/thread_info.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/thread_info.h      Wed May 06 16:56:06 2009 +0100
+@@ -86,6 +86,7 @@
   * thread information flags bit numbers
   */
  #define TIF_SYSCALL_TRACE     0       /* syscall trace active */
@@ -56405,7 +56391,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/thread_info.h linux-2.6.27.19-5.1/
  #define TIF_SIGPENDING                2       /* signal pending */
  #define TIF_NEED_RESCHED      3       /* rescheduling necessary */
  #define TIF_RESTART_SVC               4       /* restart svc with new svc number */
-@@ -98,8 +99,10 @@ static inline struct thread_info *curren
+@@ -98,8 +99,10 @@
  #define TIF_31BIT             18      /* 32bit process */ 
  #define TIF_MEMDIE            19
  #define TIF_RESTORE_SIGMASK   20      /* restore signal mask in do_signal() */
@@ -56416,7 +56402,7 @@ diff -purN linux-2.6.27/arch/s390/include/asm/thread_info.h linux-2.6.27.19-5.1/
  #define _TIF_RESTORE_SIGMASK  (1<<TIF_RESTORE_SIGMASK)
  #define _TIF_SIGPENDING               (1<<TIF_SIGPENDING)
  #define _TIF_NEED_RESCHED     (1<<TIF_NEED_RESCHED)
-@@ -110,6 +113,7 @@ static inline struct thread_info *curren
+@@ -110,6 +113,7 @@
  #define _TIF_USEDFPU          (1<<TIF_USEDFPU)
  #define _TIF_POLLING_NRFLAG   (1<<TIF_POLLING_NRFLAG)
  #define _TIF_31BIT            (1<<TIF_31BIT)
@@ -56424,13 +56410,15 @@ diff -purN linux-2.6.27/arch/s390/include/asm/thread_info.h linux-2.6.27.19-5.1/
  
  #endif /* __KERNEL__ */
  
-diff -purN linux-2.6.27/arch/s390/include/asm/tlb.h linux-2.6.27.19-5.1/arch/s390/include/asm/tlb.h
---- linux-2.6.27/arch/s390/include/asm/tlb.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/tlb.h    2009-03-25 16:10:52.000000000 +0000
-@@ -34,6 +34,19 @@
+diff -r 9608d5473017 arch/s390/include/asm/tlb.h
+--- a/arch/s390/include/asm/tlb.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/tlb.h      Wed May 06 16:56:06 2009 +0100
+@@ -32,6 +32,19 @@
+ #define TLB_NR_PTRS   1
+ #else
  #define TLB_NR_PTRS   508
- #endif
++#endif
++
 +/* Lifted from asm-generic/tlb.h; Is used by patches.suse/unmap_vmas-lat */
 +/*
 + * For UP we don't need to worry about TLB flush
@@ -56442,15 +56430,13 @@ diff -purN linux-2.6.27/arch/s390/include/asm/tlb.h linux-2.6.27.19-5.1/arch/s39
 +#else
 +  #define FREE_PTE_NR   1
 +  #define tlb_fast_mode(tlb) 1
-+#endif
-+
+ #endif
  struct mmu_gather {
-       struct mm_struct *mm;
-       unsigned int fullmm;
-diff -purN linux-2.6.27/arch/s390/include/asm/topology.h linux-2.6.27.19-5.1/arch/s390/include/asm/topology.h
---- linux-2.6.27/arch/s390/include/asm/topology.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/include/asm/topology.h       2009-03-25 16:10:52.000000000 +0000
-@@ -28,6 +28,8 @@ static inline void s390_init_cpu_topolog
+diff -r 9608d5473017 arch/s390/include/asm/topology.h
+--- a/arch/s390/include/asm/topology.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/include/asm/topology.h Wed May 06 16:56:06 2009 +0100
+@@ -28,6 +28,8 @@
  };
  #endif
  
@@ -56459,10 +56445,10 @@ diff -purN linux-2.6.27/arch/s390/include/asm/topology.h linux-2.6.27.19-5.1/arc
  #include <asm-generic/topology.h>
  
  #endif /* _ASM_S390_TOPOLOGY_H */
-diff -purN linux-2.6.27/arch/s390/kernel/Makefile linux-2.6.27.19-5.1/arch/s390/kernel/Makefile
---- linux-2.6.27/arch/s390/kernel/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/Makefile      2009-03-25 16:10:51.000000000 +0000
-@@ -12,8 +12,8 @@ CFLAGS_smp.o := -Wno-nonnull
+diff -r 9608d5473017 arch/s390/kernel/Makefile
+--- a/arch/s390/kernel/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/Makefile        Wed May 06 16:56:06 2009 +0100
+@@ -12,8 +12,8 @@
  #
  CFLAGS_ptrace.o               += -DUTS_MACHINE='"$(UTS_MACHINE)"'
  
@@ -56473,10 +56459,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/Makefile linux-2.6.27.19-5.1/arch/s390/
            s390_ext.o debug.o irq.o ipl.o dis.o diag.o mem_detect.o
  
  obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
-diff -purN linux-2.6.27/arch/s390/kernel/asm-offsets.c linux-2.6.27.19-5.1/arch/s390/kernel/asm-offsets.c
---- linux-2.6.27/arch/s390/kernel/asm-offsets.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/asm-offsets.c 2009-03-25 16:10:51.000000000 +0000
-@@ -32,7 +32,7 @@ int main(void)
+diff -r 9608d5473017 arch/s390/kernel/asm-offsets.c
+--- a/arch/s390/kernel/asm-offsets.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/asm-offsets.c   Wed May 06 16:56:06 2009 +0100
+@@ -32,7 +32,7 @@
        DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs));
        DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2));
        DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc));
@@ -56485,10 +56471,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/asm-offsets.c linux-2.6.27.19-5.1/arch/
        DEFINE(__PT_SIZE, sizeof(struct pt_regs));
        BLANK();
        DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain));
-diff -purN linux-2.6.27/arch/s390/kernel/compat_signal.c linux-2.6.27.19-5.1/arch/s390/kernel/compat_signal.c
---- linux-2.6.27/arch/s390/kernel/compat_signal.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/compat_signal.c       2009-03-25 16:10:51.000000000 +0000
-@@ -340,7 +340,7 @@ static int restore_sigregs32(struct pt_r
+diff -r 9608d5473017 arch/s390/kernel/compat_signal.c
+--- a/arch/s390/kernel/compat_signal.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/compat_signal.c Wed May 06 16:56:06 2009 +0100
+@@ -340,7 +340,7 @@
                return err;
  
        restore_fp_regs(&current->thread.fp_regs);
@@ -56497,10 +56483,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/compat_signal.c linux-2.6.27.19-5.1/arc
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/s390/kernel/compat_wrapper.S linux-2.6.27.19-5.1/arch/s390/kernel/compat_wrapper.S
---- linux-2.6.27/arch/s390/kernel/compat_wrapper.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/compat_wrapper.S      2009-03-25 16:10:51.000000000 +0000
-@@ -549,7 +549,7 @@ sys32_setdomainname_wrapper:
+diff -r 9608d5473017 arch/s390/kernel/compat_wrapper.S
+--- a/arch/s390/kernel/compat_wrapper.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/compat_wrapper.S        Wed May 06 16:56:06 2009 +0100
+@@ -549,7 +549,7 @@
        .globl  sys32_newuname_wrapper
  sys32_newuname_wrapper:
        llgtr   %r2,%r2                 # struct new_utsname *
@@ -56509,7 +56495,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/compat_wrapper.S linux-2.6.27.19-5.1/ar
  
        .globl  compat_sys_adjtimex_wrapper
  compat_sys_adjtimex_wrapper:
-@@ -617,7 +617,7 @@ sys32_sysfs_wrapper:
+@@ -617,7 +617,7 @@
        .globl  sys32_personality_wrapper
  sys32_personality_wrapper:
        llgfr   %r2,%r2                 # unsigned long
@@ -56518,7 +56504,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/compat_wrapper.S linux-2.6.27.19-5.1/ar
  
        .globl  sys32_setfsuid16_wrapper
  sys32_setfsuid16_wrapper:
-@@ -1769,3 +1769,41 @@ sys_dup3_wrapper:
+@@ -1769,3 +1769,41 @@
  sys_epoll_create1_wrapper:
        lgfr    %r2,%r2                 # int
        jg      sys_epoll_create1       # branch to system call
@@ -56560,19 +56546,19 @@ diff -purN linux-2.6.27/arch/s390/kernel/compat_wrapper.S linux-2.6.27.19-5.1/ar
 +      llgfr   %r5,%r5                 # u32
 +      llgfr   %r6,%r6                 # u32
 +      jg      compat_sys_keyctl       # branch to system call
-diff -purN linux-2.6.27/arch/s390/kernel/cpcmd.c linux-2.6.27.19-5.1/arch/s390/kernel/cpcmd.c
---- linux-2.6.27/arch/s390/kernel/cpcmd.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/cpcmd.c       2009-03-25 16:10:51.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/s390/kernel/cpcmd.c
+--- a/arch/s390/kernel/cpcmd.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/cpcmd.c Wed May 06 16:56:06 2009 +0100
+@@ -6,6 +6,8 @@
+  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
   *               Christian Borntraeger (cborntra@de.ibm.com),
   */
-+#define KMSG_COMPONENT "cpcmd"
 +
++#define KMSG_COMPONENT "cpcmd"
  #include <linux/kernel.h>
  #include <linux/module.h>
- #include <linux/slab.h>
-@@ -104,8 +106,8 @@ int cpcmd(const char *cmd, char *respons
+@@ -104,8 +106,8 @@
                        (((unsigned long)response + rlen) >> 31)) {
                lowbuf = kmalloc(rlen, GFP_KERNEL | GFP_DMA);
                if (!lowbuf) {
@@ -56583,19 +56569,19 @@ diff -purN linux-2.6.27/arch/s390/kernel/cpcmd.c linux-2.6.27.19-5.1/arch/s390/k
                        return -ENOMEM;
                }
                spin_lock_irqsave(&cpcmd_lock, flags);
-diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/kernel/debug.c
---- linux-2.6.27/arch/s390/kernel/debug.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/debug.c       2009-03-25 16:10:51.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 arch/s390/kernel/debug.c
+--- a/arch/s390/kernel/debug.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/debug.c Wed May 06 16:56:06 2009 +0100
+@@ -9,6 +9,8 @@
+  *
   *    Bugreports to: <Linux390@de.ibm.com>
   */
-+#define KMSG_COMPONENT "s390dbf"
 +
++#define KMSG_COMPONENT "s390dbf"
  #include <linux/stddef.h>
  #include <linux/kernel.h>
- #include <linux/errno.h>
-@@ -693,8 +695,8 @@ debug_info_t *debug_register_mode(const 
+@@ -693,8 +695,8 @@
        /* Since debugfs currently does not support uid/gid other than root, */
        /* we do not allow gid/uid != 0 until we get support for that. */
        if ((uid != 0) || (gid != 0))
@@ -56606,7 +56592,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
        if (!initialized)
                BUG();
        mutex_lock(&debug_mutex);
-@@ -709,7 +711,7 @@ debug_info_t *debug_register_mode(const 
+@@ -709,7 +711,7 @@
        debug_register_view(rc, &debug_pages_view);
  out:
          if (!rc){
@@ -56615,7 +56601,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
          }
        mutex_unlock(&debug_mutex);
        return rc;
-@@ -763,8 +765,8 @@ debug_set_size(debug_info_t* id, int nr_
+@@ -763,8 +765,8 @@
        if(pages_per_area > 0){
                new_areas = debug_areas_alloc(pages_per_area, nr_areas);
                if(!new_areas) {
@@ -56626,7 +56612,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
                        rc = -ENOMEM;
                        goto out;
                }
-@@ -780,8 +782,7 @@ debug_set_size(debug_info_t* id, int nr_
+@@ -780,8 +782,7 @@
        memset(id->active_entries,0,sizeof(int)*id->nr_areas);
        memset(id->active_pages, 0, sizeof(int)*id->nr_areas);
        spin_unlock_irqrestore(&id->lock,flags);
@@ -56636,7 +56622,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
  out:
        return rc;
  }
-@@ -800,10 +801,9 @@ debug_set_level(debug_info_t* id, int ne
+@@ -800,10 +801,9 @@
        spin_lock_irqsave(&id->lock,flags);
          if(new_level == DEBUG_OFF_LEVEL){
                  id->level = DEBUG_OFF_LEVEL;
@@ -56649,7 +56635,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
                          id->name, new_level, 0, DEBUG_MAX_LEVEL);
          } else {
                  id->level = new_level;
-@@ -1108,8 +1108,8 @@ debug_register_view(debug_info_t * id, s
+@@ -1108,8 +1108,8 @@
        pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry,
                                id , &debug_file_ops);
        if (!pde){
@@ -56660,7 +56646,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
                rc = -1;
                goto out;
        }
-@@ -1119,10 +1119,8 @@ debug_register_view(debug_info_t * id, s
+@@ -1119,10 +1119,8 @@
                        break;
        }
        if (i == DEBUG_MAX_VIEWS) {
@@ -56673,7 +56659,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
                debugfs_remove(pde);
                rc = -1;
        } else {
-@@ -1303,7 +1301,8 @@ debug_input_level_fn(debug_info_t * id, 
+@@ -1303,7 +1301,8 @@
                new_level = debug_get_uint(str);
        }
        if(new_level < 0) {
@@ -56683,7 +56669,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
                rc = -EINVAL;
        } else {
                debug_set_level(id, new_level);
-@@ -1380,7 +1379,8 @@ debug_input_flush_fn(debug_info_t * id, 
+@@ -1380,7 +1379,8 @@
                  goto out;
          }
  
@@ -56693,10 +56679,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/debug.c linux-2.6.27.19-5.1/arch/s390/k
  
  out:
          *offset += user_len;
-diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/kernel/entry.S
---- linux-2.6.27/arch/s390/kernel/entry.S      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry.S       2009-03-25 16:10:51.000000000 +0000
-@@ -46,12 +46,12 @@ SP_R14          =  STACK_FRAME_OVERHEAD + __P
+diff -r 9608d5473017 arch/s390/kernel/entry.S
+--- a/arch/s390/kernel/entry.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry.S Wed May 06 16:56:06 2009 +0100
+@@ -46,12 +46,12 @@
  SP_R15             =  STACK_FRAME_OVERHEAD + __PT_GPRS + 60
  SP_ORIG_R2   =        STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
  SP_ILC             =  STACK_FRAME_OVERHEAD + __PT_ILC
@@ -56712,7 +56698,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
                 _TIF_MCCK_PENDING)
  
  STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER
-@@ -180,11 +180,10 @@ STACK_SIZE  = 1 << STACK_SHIFT
+@@ -180,11 +180,10 @@
        .macro  CREATE_STACK_FRAME psworg,savearea
        s       %r15,BASED(.Lc_spsize)  # make room for registers & psw
        mvc     SP_PSW(8,%r15),0(%r12)  # move user PSW to stack
@@ -56726,7 +56712,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        mvc     SP_R12(16,%r15),\savearea # move %r12-%r15 to stack
        la      %r12,0
        st      %r12,__SF_BACKCHAIN(%r15)       # clear back chain
-@@ -261,16 +260,17 @@ sysc_update:
+@@ -261,16 +260,17 @@
  #endif
  sysc_do_svc:
        l       %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
@@ -56746,7 +56732,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        l       %r8,BASED(.Lsysc_table)
        tm      __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
        l       %r8,0(%r7,%r8)    # get system call addr.
-@@ -318,6 +318,8 @@ sysc_work:
+@@ -318,6 +318,8 @@
        bo      BASED(sysc_reschedule)
        tm      __TI_flags+3(%r9),_TIF_SIGPENDING
        bnz     BASED(sysc_sigpending)
@@ -56755,7 +56741,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        tm      __TI_flags+3(%r9),_TIF_RESTART_SVC
        bo      BASED(sysc_restart)
        tm      __TI_flags+3(%r9),_TIF_SINGLE_STEP
-@@ -356,12 +358,21 @@ sysc_sigpending:
+@@ -356,12 +358,21 @@
        b       BASED(sysc_work_loop)
  
  #
@@ -56778,7 +56764,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        mvc     SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument
        lm      %r2,%r6,SP_R2(%r15)     # load svc arguments
        b       BASED(sysc_do_restart)  # restart svc
-@@ -371,27 +382,29 @@ sysc_restart:
+@@ -371,27 +382,29 @@
  #
  sysc_singlestep:
        ni      __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP
@@ -56814,7 +56800,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        l       %r8,0(%r7,%r8)
  sysc_tracego:
        lm      %r3,%r6,SP_R3(%r15)
-@@ -401,9 +414,8 @@ sysc_tracego:
+@@ -401,9 +414,8 @@
  sysc_tracenogo:
        tm      __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
        bz      BASED(sysc_return)
@@ -56825,7 +56811,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        la      %r14,BASED(sysc_return)
        br      %r1
  
-@@ -571,7 +583,8 @@ pgm_svcper:
+@@ -571,7 +583,8 @@
  # per was called from kernel, must be kprobes
  #
  kernel_per:
@@ -56835,7 +56821,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        l       %r1,BASED(.Lhandle_per) # load adr. of per handler
        la      %r14,BASED(sysc_restore)# load adr. of system return
-@@ -666,6 +679,8 @@ io_work_loop:
+@@ -666,6 +679,8 @@
        bo      BASED(io_reschedule)
        tm      __TI_flags+3(%r9),_TIF_SIGPENDING
        bnz     BASED(io_sigpending)
@@ -56844,10 +56830,15 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
        b       BASED(io_restore)
  io_work_done:
  
-@@ -704,6 +719,19 @@ io_sigpending:
-       TRACE_IRQS_OFF
-       b       BASED(io_work_loop)
+@@ -699,6 +714,19 @@
+       stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
+       la      %r2,SP_PTREGS(%r15)     # load pt_regs
+       l       %r1,BASED(.Ldo_signal)
++      basr    %r14,%r1                # call do_signal
++      stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
++      TRACE_IRQS_OFF
++      b       BASED(io_work_loop)
++
 +#
 +# _TIF_SIGPENDING is set, call do_signal
 +#
@@ -56856,15 +56847,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
 +      stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
 +      la      %r2,SP_PTREGS(%r15)     # load pt_regs
 +      l       %r1,BASED(.Ldo_notify_resume)
-+      basr    %r14,%r1                # call do_signal
-+      stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
-+      TRACE_IRQS_OFF
-+      b       BASED(io_work_loop)
-+
- /*
-  * External interrupt handler routine
-  */
-@@ -1070,6 +1098,8 @@ cleanup_io_leave_insn:
+       basr    %r14,%r1                # call do_signal
+       stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
+@@ -1070,6 +1098,8 @@
  .Ldo_IRQ:     .long   do_IRQ
  .Ldo_extint:  .long   do_extint
  .Ldo_signal:  .long   do_signal
@@ -56873,7 +56859,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
  .Lhandle_per: .long   do_single_step
  .Ldo_execve:  .long   do_execve
  .Lexecve_tail:        .long   execve_tail
-@@ -1079,7 +1109,8 @@ cleanup_io_leave_insn:
+@@ -1079,7 +1109,8 @@
  .Lpreempt_schedule_irq:
                .long   preempt_schedule_irq
  #endif
@@ -56883,10 +56869,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.S linux-2.6.27.19-5.1/arch/s390/k
  .Lschedtail:  .long   schedule_tail
  .Lsysc_table: .long   sys_call_table
  #ifdef CONFIG_TRACE_IRQFLAGS
-diff -purN linux-2.6.27/arch/s390/kernel/entry.h linux-2.6.27.19-5.1/arch/s390/kernel/entry.h
---- linux-2.6.27/arch/s390/kernel/entry.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry.h       2009-03-25 16:10:51.000000000 +0000
-@@ -30,23 +30,23 @@ struct fadvise64_64_args;
+diff -r 9608d5473017 arch/s390/kernel/entry.h
+--- a/arch/s390/kernel/entry.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry.h Wed May 06 16:56:06 2009 +0100
+@@ -30,23 +30,23 @@
  struct old_sigaction;
  struct sel_arg_struct;
  
@@ -56918,10 +56904,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry.h linux-2.6.27.19-5.1/arch/s390/k
  long sys_sigaction(int sig, const struct old_sigaction __user *act,
                   struct old_sigaction __user *oact);
  long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss);
-diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390/kernel/entry64.S
---- linux-2.6.27/arch/s390/kernel/entry64.S    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/entry64.S     2009-03-25 16:10:51.000000000 +0000
-@@ -46,15 +46,15 @@ SP_R14          =  STACK_FRAME_OVERHEAD + __P
+diff -r 9608d5473017 arch/s390/kernel/entry64.S
+--- a/arch/s390/kernel/entry64.S       Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/entry64.S       Wed May 06 16:56:06 2009 +0100
+@@ -46,15 +46,15 @@
  SP_R15             =  STACK_FRAME_OVERHEAD + __PT_GPRS + 120
  SP_ORIG_R2   =        STACK_FRAME_OVERHEAD + __PT_ORIG_GPR2
  SP_ILC             =  STACK_FRAME_OVERHEAD + __PT_ILC
@@ -56940,7 +56926,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
                 _TIF_MCCK_PENDING)
  
  #define BASED(name) name-system_call(%r13)
-@@ -168,11 +168,10 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_
+@@ -168,11 +168,10 @@
        .macro  CREATE_STACK_FRAME psworg,savearea
        aghi    %r15,-SP_SIZE           # make room for registers & psw
        mvc     SP_PSW(16,%r15),0(%r12) # move user PSW to stack
@@ -56954,7 +56940,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        mvc     SP_R12(32,%r15),\savearea # move %r12-%r15 to stack
        la      %r12,0
        stg     %r12,__SF_BACKCHAIN(%r15)
-@@ -247,16 +246,17 @@ sysc_update:
+@@ -247,16 +246,17 @@
  #endif
  sysc_do_svc:
        lg      %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
@@ -56974,7 +56960,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        larl    %r10,sys_call_table
  #ifdef CONFIG_COMPAT
        tm      __TI_flags+5(%r9),(_TIF_31BIT>>16)  # running in 31 bit mode ?
-@@ -310,6 +310,8 @@ sysc_work:
+@@ -310,6 +310,8 @@
        jo      sysc_reschedule
        tm      __TI_flags+7(%r9),_TIF_SIGPENDING
        jnz     sysc_sigpending
@@ -56983,7 +56969,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        tm      __TI_flags+7(%r9),_TIF_RESTART_SVC
        jo      sysc_restart
        tm      __TI_flags+7(%r9),_TIF_SINGLE_STEP
-@@ -345,12 +347,19 @@ sysc_sigpending:
+@@ -345,12 +347,19 @@
        j       sysc_work_loop
  
  #
@@ -57004,7 +56990,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        mvc     SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument
        lmg     %r2,%r6,SP_R2(%r15)     # load svc arguments
        j       sysc_do_restart         # restart svc
-@@ -359,28 +368,26 @@ sysc_restart:
+@@ -359,28 +368,26 @@
  # _TIF_SINGLE_STEP is set, call do_single_step
  #
  sysc_singlestep:
@@ -57040,7 +57026,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        lgf     %r8,0(%r7,%r10)
  sysc_tracego:
        lmg     %r3,%r6,SP_R3(%r15)
-@@ -391,9 +398,8 @@ sysc_tracenogo:
+@@ -391,9 +398,8 @@
        tm      __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
        jz      sysc_return
        la      %r2,SP_PTREGS(%r15)     # load pt_regs
@@ -57051,7 +57037,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
  
  #
  # a new process exits the kernel with ret_from_fork
-@@ -556,8 +562,7 @@ pgm_svcper:
+@@ -556,8 +562,7 @@
  # per was called from kernel, must be kprobes
  #
  kernel_per:
@@ -57061,7 +57047,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        larl    %r14,sysc_restore       # load adr. of system ret, no work
        jg      do_single_step          # branch to do_single_step
-@@ -672,6 +677,8 @@ io_work_loop:
+@@ -672,6 +677,8 @@
        jo      io_reschedule
        tm      __TI_flags+7(%r9),_TIF_SIGPENDING
        jnz     io_sigpending
@@ -57070,10 +57056,14 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
        j       io_restore
  io_work_done:
  
-@@ -712,6 +719,18 @@ io_sigpending:
-       TRACE_IRQS_OFF
-       j       io_work_loop
+@@ -708,6 +715,18 @@
+       stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
+       la      %r2,SP_PTREGS(%r15)     # load pt_regs
+       brasl   %r14,do_signal          # call do_signal
++      stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
++      TRACE_IRQS_OFF
++      j       io_work_loop
++
 +#
 +# _TIF_NOTIFY_RESUME or is set, call do_notify_resume
 +#
@@ -57082,17 +57072,13 @@ diff -purN linux-2.6.27/arch/s390/kernel/entry64.S linux-2.6.27.19-5.1/arch/s390
 +      stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
 +      la      %r2,SP_PTREGS(%r15)     # load pt_regs
 +      brasl   %r14,do_notify_resume   # call do_notify_resume
-+      stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
-+      TRACE_IRQS_OFF
-+      j       io_work_loop
-+
- /*
-  * External interrupt handler routine
-  */
-diff -purN linux-2.6.27/arch/s390/kernel/head.S linux-2.6.27.19-5.1/arch/s390/kernel/head.S
---- linux-2.6.27/arch/s390/kernel/head.S       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head.S        2009-03-25 16:10:51.000000000 +0000
-@@ -461,6 +461,55 @@ start:
+       stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
+       j       io_work_loop
+diff -r 9608d5473017 arch/s390/kernel/head.S
+--- a/arch/s390/kernel/head.S  Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head.S  Wed May 06 16:56:06 2009 +0100
+@@ -461,6 +461,55 @@
        .byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7
        .byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
  
@@ -57148,9 +57134,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/head.S linux-2.6.27.19-5.1/arch/s390/ke
  #ifdef CONFIG_64BIT
  #include "head64.S"
  #else
-diff -purN linux-2.6.27/arch/s390/kernel/head31.S linux-2.6.27.19-5.1/arch/s390/kernel/head31.S
---- linux-2.6.27/arch/s390/kernel/head31.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head31.S      2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/head31.S
+--- a/arch/s390/kernel/head31.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head31.S        Wed May 06 16:56:06 2009 +0100
 @@ -10,34 +10,13 @@
   *
   */
@@ -57189,13 +57175,14 @@ diff -purN linux-2.6.27/arch/s390/kernel/head31.S linux-2.6.27.19-5.1/arch/s390/
        lctl    %c0,%c15,.Lctl-.LPG1(%r13) # load control registers
        l       %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area
                                        # move IPL device to lowcore
-diff -purN linux-2.6.27/arch/s390/kernel/head64.S linux-2.6.27.19-5.1/arch/s390/kernel/head64.S
---- linux-2.6.27/arch/s390/kernel/head64.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/head64.S      2009-03-25 16:10:51.000000000 +0000
-@@ -10,29 +10,6 @@
+diff -r 9608d5473017 arch/s390/kernel/head64.S
+--- a/arch/s390/kernel/head64.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/head64.S        Wed May 06 16:56:06 2009 +0100
+@@ -9,29 +9,6 @@
+  *            Heiko Carstens <heiko.carstens@de.ibm.com>
   *
   */
+-
 -#
 -# startup-code at 0x10000, running in absolute addressing mode
 -# this is called either by the ipl loader or directly by PSW restart
@@ -57218,13 +57205,12 @@ diff -purN linux-2.6.27/arch/s390/kernel/head64.S linux-2.6.27.19-5.1/arch/s390/
 -      .org    COMMAND_LINE
 -      .byte   "root=/dev/ram0 ro"
 -      .byte   0
--
        .org    0x11000
  
- startup_continue:
-diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390/kernel/process.c
---- linux-2.6.27/arch/s390/kernel/process.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/process.c     2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/process.c
+--- a/arch/s390/kernel/process.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/process.c       Wed May 06 16:56:06 2009 +0100
 @@ -38,6 +38,7 @@
  #include <linux/utsname.h>
  #include <linux/tick.h>
@@ -57233,7 +57219,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390
  #include <asm/uaccess.h>
  #include <asm/pgtable.h>
  #include <asm/system.h>
-@@ -257,13 +258,13 @@ int copy_thread(int nr, unsigned long cl
+@@ -257,13 +258,13 @@
          return 0;
  }
  
@@ -57249,7 +57235,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390
  {
        struct pt_regs *regs = task_pt_regs(current);
        unsigned long clone_flags;
-@@ -290,7 +291,7 @@ asmlinkage long sys_clone(void)
+@@ -290,7 +291,7 @@
   * do not have enough call-clobbered registers to hold all
   * the information you need.
   */
@@ -57258,7 +57244,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390
  {
        struct pt_regs *regs = task_pt_regs(current);
        return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
-@@ -310,7 +311,7 @@ asmlinkage void execve_tail(void)
+@@ -310,7 +311,7 @@
  /*
   * sys_execve() executes a new program.
   */
@@ -57267,9 +57253,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/process.c linux-2.6.27.19-5.1/arch/s390
  {
        struct pt_regs *regs = task_pt_regs(current);
        char *filename;
-diff -purN linux-2.6.27/arch/s390/kernel/processor.c linux-2.6.27.19-5.1/arch/s390/kernel/processor.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/processor.c   2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/processor.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/s390/kernel/processor.c     Wed May 06 16:56:06 2009 +0100
 @@ -0,0 +1,97 @@
 +/*
 + *  arch/s390/kernel/processor.c
@@ -57368,9 +57354,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/processor.c linux-2.6.27.19-5.1/arch/s3
 +      .show   = show_cpuinfo,
 +};
 +
-diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/kernel/ptrace.c
---- linux-2.6.27/arch/s390/kernel/ptrace.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/ptrace.c      2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/ptrace.c
+--- a/arch/s390/kernel/ptrace.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/ptrace.c        Wed May 06 16:56:06 2009 +0100
 @@ -35,6 +35,7 @@
  #include <linux/signal.h>
  #include <linux/elf.h>
@@ -57379,7 +57365,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/
  
  #include <asm/segment.h>
  #include <asm/page.h>
-@@ -639,40 +640,58 @@ long compat_arch_ptrace(struct task_stru
+@@ -639,40 +640,58 @@
  }
  #endif
  
@@ -57415,12 +57401,6 @@ diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/
 -      if (current->exit_code) {
 -              send_sig(current->exit_code, current, 1);
 -              current->exit_code = 0;
--      }
-- out:
--      if (unlikely(current->audit_context) && !entryexit)
--              audit_syscall_entry(test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X,
--                                  regs->gprs[2], regs->orig_gpr2, regs->gprs[3],
--                                  regs->gprs[4], regs->gprs[5]);
 +      if (is_self_ptracing(regs->gprs[2])) {
 +              struct siginfo info;
 +
@@ -57432,7 +57412,12 @@ diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/
 +              send_sig_info(SIGSYS, &info, current);
 +              regs->gprs[2] = -1;
 +              return -1L;
-+      }
+       }
+- out:
+-      if (unlikely(current->audit_context) && !entryexit)
+-              audit_syscall_entry(test_thread_flag(TIF_31BIT)?AUDIT_ARCH_S390:AUDIT_ARCH_S390X,
+-                                  regs->gprs[2], regs->orig_gpr2, regs->gprs[3],
+-                                  regs->gprs[4], regs->gprs[5]);
 +
 +      ret = regs->gprs[2];
 +      if (test_thread_flag(TIF_SYSCALL_TRACE) &&
@@ -57467,18 +57452,18 @@ diff -purN linux-2.6.27/arch/s390/kernel/ptrace.c linux-2.6.27.19-5.1/arch/s390/
  }
  
  /*
-diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/kernel/setup.c
---- linux-2.6.27/arch/s390/kernel/setup.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/setup.c       2009-03-25 16:10:51.000000000 +0000
-@@ -14,6 +14,8 @@
+diff -r 9608d5473017 arch/s390/kernel/setup.c
+--- a/arch/s390/kernel/setup.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/setup.c Wed May 06 16:56:06 2009 +0100
+@@ -13,6 +13,8 @@
+ /*
   * This file handles the architecture-dependent parts of initialization
   */
-+#define KMSG_COMPONENT "setup"
 +
++#define KMSG_COMPONENT "setup"
  #include <linux/errno.h>
  #include <linux/module.h>
- #include <linux/sched.h>
 @@ -32,7 +34,6 @@
  #include <linux/bootmem.h>
  #include <linux/root_dev.h>
@@ -57487,7 +57472,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  #include <linux/kernel_stat.h>
  #include <linux/device.h>
  #include <linux/notifier.h>
-@@ -80,7 +81,9 @@ char elf_platform[ELF_PLATFORM_SIZE];
+@@ -80,7 +81,9 @@
  
  struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];
  volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
@@ -57498,7 +57483,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  
  /*
   * This is set up by the setup-routine at boot-time
-@@ -279,20 +282,17 @@ void (*pm_power_off)(void) = machine_pow
+@@ -279,20 +282,17 @@
  static int __init early_parse_mem(char *p)
  {
        memory_end = memparse(p, &p);
@@ -57522,7 +57507,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  {
        psw_user_bits = PSW_BASE_BITS | PSW_MASK_DAT | user_amode |
                        PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
-@@ -309,11 +309,11 @@ static void set_amode_and_uaccess(unsign
+@@ -309,11 +309,11 @@
                          PSW_MASK_MCHECK | PSW_DEFAULT_KEY;
  
        if (MACHINE_HAS_MVCOS) {
@@ -57536,7 +57521,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
        }
  }
  
-@@ -328,9 +328,10 @@ static int __init early_parse_switch_amo
+@@ -328,9 +328,10 @@
  early_param("switch_amode", early_parse_switch_amode);
  
  #else /* CONFIG_S390_SWITCH_AMODE */
@@ -57549,7 +57534,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  }
  #endif /* CONFIG_S390_SWITCH_AMODE */
  
-@@ -355,11 +356,20 @@ early_param("noexec", early_parse_noexec
+@@ -355,11 +356,20 @@
  static void setup_addressing_mode(void)
  {
        if (s390_noexec) {
@@ -57574,7 +57559,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
        }
  #ifdef CONFIG_TRACE_IRQFLAGS
        sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
-@@ -494,8 +504,10 @@ static void __init setup_memory_end(void
+@@ -494,8 +504,10 @@
        int i;
  
  #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE)
@@ -57586,7 +57571,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  #endif
        memory_size = 0;
        memory_end &= PAGE_MASK;
-@@ -572,15 +584,15 @@ setup_memory(void)
+@@ -572,15 +584,15 @@
                        start = PFN_PHYS(start_pfn) + bmap_size + PAGE_SIZE;
  
                        if (start + INITRD_SIZE > memory_end) {
@@ -57607,7 +57592,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
                                memmove((void *) start, (void *) INITRD_START,
                                        INITRD_SIZE);
                                INITRD_START = start;
-@@ -604,13 +616,13 @@ setup_memory(void)
+@@ -604,13 +616,13 @@
                if (memory_chunk[i].type != CHUNK_READ_WRITE)
                        continue;
                start_chunk = PFN_DOWN(memory_chunk[i].addr);
@@ -57623,7 +57608,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
                        page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY);
        }
  
-@@ -642,8 +654,9 @@ setup_memory(void)
+@@ -642,8 +654,9 @@
                        initrd_start = INITRD_START;
                        initrd_end = initrd_start + INITRD_SIZE;
                } else {
@@ -57635,7 +57620,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
                               initrd_start + INITRD_SIZE, memory_end);
                        initrd_start = initrd_end = 0;
                }
-@@ -756,21 +769,27 @@ setup_arch(char **cmdline_p)
+@@ -756,21 +769,27 @@
           * print what head.S has found out about the machine
           */
  #ifndef CONFIG_64BIT
@@ -57672,7 +57657,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
  #endif /* CONFIG_64BIT */
  
        /* Have one command line that is parsed and saved in /proc/cmdline */
-@@ -818,90 +837,3 @@ setup_arch(char **cmdline_p)
+@@ -818,90 +837,3 @@
        /* Setup zfcpdump support */
        setup_zfcpdump(console_devno);
  }
@@ -57763,9 +57748,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/setup.c linux-2.6.27.19-5.1/arch/s390/k
 -      .show   = show_cpuinfo,
 -};
 -
-diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/kernel/signal.c
---- linux-2.6.27/arch/s390/kernel/signal.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/signal.c      2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/signal.c
+--- a/arch/s390/kernel/signal.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/signal.c        Wed May 06 16:56:06 2009 +0100
 @@ -24,6 +24,8 @@
  #include <linux/tty.h>
  #include <linux/personality.h>
@@ -57775,7 +57760,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
  #include <asm/ucontext.h>
  #include <asm/uaccess.h>
  #include <asm/lowcore.h>
-@@ -52,8 +54,7 @@ typedef struct 
+@@ -52,8 +54,7 @@
  /*
   * Atomically swap in the new signal mask, and wait for a signal.
   */
@@ -57785,7 +57770,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
  {
        mask &= _BLOCKABLE;
        spin_lock_irq(&current->sighand->siglock);
-@@ -69,9 +70,8 @@ sys_sigsuspend(int history0, int history
+@@ -69,9 +70,8 @@
        return -ERESTARTNOHAND;
  }
  
@@ -57797,7 +57782,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
  {
        struct k_sigaction new_ka, old_ka;
        int ret;
-@@ -101,15 +101,13 @@ sys_sigaction(int sig, const struct old_
+@@ -101,14 +101,12 @@
        return ret;
  }
  
@@ -57809,13 +57794,12 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
        struct pt_regs *regs = task_pt_regs(current);
        return do_sigaltstack(uss, uoss, regs->gprs[15]);
  }
 -
 -
  /* Returns non-zero on fault. */
  static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
- {
-@@ -159,11 +157,11 @@ static int restore_sigregs(struct pt_reg
+@@ -159,11 +157,11 @@
        current->thread.fp_regs.fpc &= FPC_VALID_MASK;
  
        restore_fp_regs(&current->thread.fp_regs);
@@ -57829,7 +57813,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
  {
        struct pt_regs *regs = task_pt_regs(current);
        sigframe __user *frame = (sigframe __user *)regs->gprs[15];
-@@ -190,7 +188,7 @@ badframe:
+@@ -190,7 +188,7 @@
        return 0;
  }
  
@@ -57838,7 +57822,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
  {
        struct pt_regs *regs = task_pt_regs(current);
        rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15];
-@@ -444,7 +442,7 @@ void do_signal(struct pt_regs *regs)
+@@ -444,7 +442,7 @@
                oldset = &current->blocked;
  
        /* Are we from a system call? */
@@ -57847,7 +57831,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
                continue_addr = regs->psw.addr;
                restart_addr = continue_addr - regs->ilc;
                retval = regs->gprs[2];
-@@ -461,7 +459,7 @@ void do_signal(struct pt_regs *regs)
+@@ -461,7 +459,7 @@
                case -ERESTART_RESTARTBLOCK:
                        regs->gprs[2] = -EINTR;
                }
@@ -57856,7 +57840,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
        }
  
        /* Get signal to deliver.  When running under ptrace, at this point
-@@ -507,6 +505,12 @@ void do_signal(struct pt_regs *regs)
+@@ -507,6 +505,12 @@
                         */
                        if (current->thread.per_info.single_step)
                                set_thread_flag(TIF_SINGLE_STEP);
@@ -57869,7 +57853,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
                }
                return;
        }
-@@ -526,3 +530,9 @@ void do_signal(struct pt_regs *regs)
+@@ -526,3 +530,9 @@
                set_thread_flag(TIF_RESTART_SVC);
        }
  }
@@ -57879,19 +57863,19 @@ diff -purN linux-2.6.27/arch/s390/kernel/signal.c linux-2.6.27.19-5.1/arch/s390/
 +      clear_thread_flag(TIF_NOTIFY_RESUME);
 +      tracehook_notify_resume(regs);
 +}
-diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/kernel/smp.c
---- linux-2.6.27/arch/s390/kernel/smp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/smp.c 2009-03-25 16:10:51.000000000 +0000
-@@ -20,6 +20,8 @@
+diff -r 9608d5473017 arch/s390/kernel/smp.c
+--- a/arch/s390/kernel/smp.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/smp.c   Wed May 06 16:56:06 2009 +0100
+@@ -19,6 +19,8 @@
+  * one which is causing all the confusion with __cpu_logical_map and
   * cpu_number_map in other architectures.
   */
-+#define KMSG_COMPONENT "cpu"
 +
++#define KMSG_COMPONENT "cpu"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/mm.h>
-@@ -77,159 +79,6 @@ static DEFINE_PER_CPU(struct cpu, cpu_de
+@@ -77,159 +79,6 @@
  
  static void smp_ext_bitcall(int, ec_bit_sig);
  
@@ -58051,7 +58035,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  void smp_send_stop(void)
  {
        int cpu, rc;
-@@ -271,7 +120,10 @@ static void do_ext_call_interrupt(__u16 
+@@ -271,7 +120,10 @@
        bits = xchg(&S390_lowcore.ext_call_fast, 0);
  
        if (test_bit(ec_call_function, &bits))
@@ -58063,10 +58047,12 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  }
  
  /*
-@@ -288,6 +140,19 @@ static void smp_ext_bitcall(int cpu, ec_
+@@ -286,6 +138,19 @@
+       set_bit(sig, (unsigned long *) &lowcore_ptr[cpu]->ext_call_fast);
+       while (signal_processor(cpu, sigp_emergency_signal) == sigp_busy)
                udelay(10);
- }
++}
++
 +void arch_send_call_function_ipi(cpumask_t mask)
 +{
 +      int cpu;
@@ -58078,12 +58064,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
 +void arch_send_call_function_single_ipi(int cpu)
 +{
 +      smp_ext_bitcall(cpu, ec_call_function_single);
-+}
-+
+ }
  #ifndef CONFIG_64BIT
- /*
-  * this function sends a 'purge tlb' signal to another CPU.
-@@ -388,8 +253,8 @@ static void __init smp_get_save_area(uns
+@@ -388,8 +253,8 @@
        if (ipl_info.type != IPL_TYPE_FCP_DUMP)
                return;
        if (cpu >= NR_CPUS) {
@@ -58094,7 +58078,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
                return;
        }
        zfcpdump_save_areas[cpu] = kmalloc(sizeof(union save_area), GFP_KERNEL);
-@@ -562,7 +427,7 @@ static void __init smp_detect_cpus(void)
+@@ -562,7 +427,7 @@
        }
  out:
        kfree(info);
@@ -58103,7 +58087,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
        get_online_cpus();
        __smp_rescan_cpus();
        put_online_cpus();
-@@ -586,9 +451,9 @@ int __cpuinit start_secondary(void *cpuv
+@@ -586,9 +451,9 @@
        pfault_init();
  
        /* Mark this cpu as online */
@@ -58115,7 +58099,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
        /* Switch on interrupts */
        local_irq_enable();
        /* Print info about this processor */
-@@ -688,12 +553,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
+@@ -688,12 +553,8 @@
  
        ccode = signal_processor_p((__u32)(unsigned long)(lowcore_ptr[cpu]),
                                   cpu, sigp_set_prefix);
@@ -58129,7 +58113,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  
        idle = current_set[cpu];
        cpu_lowcore = lowcore_ptr[cpu];
-@@ -776,7 +637,7 @@ void __cpu_die(unsigned int cpu)
+@@ -776,7 +637,7 @@
        while (!smp_cpu_not_running(cpu))
                cpu_relax();
        smp_free_lowcore(cpu);
@@ -58138,7 +58122,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  }
  
  void cpu_die(void)
-@@ -1117,9 +978,7 @@ out:
+@@ -1117,9 +978,7 @@
        return rc;
  }
  
@@ -58149,7 +58133,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
                                  size_t count)
  {
        int rc;
-@@ -1127,12 +986,10 @@ static ssize_t __ref rescan_store(struct
+@@ -1127,12 +986,10 @@
        rc = smp_rescan_cpus();
        return rc ? rc : count;
  }
@@ -58164,7 +58148,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  {
        ssize_t count;
  
-@@ -1142,9 +999,8 @@ static ssize_t dispatching_show(struct s
+@@ -1142,9 +999,8 @@
        return count;
  }
  
@@ -58176,7 +58160,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  {
        int val, rc;
        char delim;
-@@ -1166,7 +1022,8 @@ out:
+@@ -1166,7 +1022,8 @@
        put_online_cpus();
        return rc ? rc : count;
  }
@@ -58186,7 +58170,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
  
  static int __init topology_init(void)
  {
-@@ -1176,13 +1033,11 @@ static int __init topology_init(void)
+@@ -1176,13 +1033,11 @@
        register_cpu_notifier(&smp_cpu_nb);
  
  #ifdef CONFIG_HOTPLUG_CPU
@@ -58202,9 +58186,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/smp.c linux-2.6.27.19-5.1/arch/s390/ker
        if (rc)
                return rc;
        for_each_present_cpu(cpu) {
-diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s390/kernel/sys_s390.c
---- linux-2.6.27/arch/s390/kernel/sys_s390.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/sys_s390.c    2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/sys_s390.c
+--- a/arch/s390/kernel/sys_s390.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/sys_s390.c      Wed May 06 16:56:06 2009 +0100
 @@ -29,6 +29,7 @@
  #include <linux/personality.h>
  #include <linux/unistd.h>
@@ -58213,7 +58197,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  #include <asm/uaccess.h>
  #include "entry.h"
  
-@@ -74,7 +75,7 @@ struct mmap_arg_struct {
+@@ -74,7 +75,7 @@
        unsigned long offset;
  };
  
@@ -58222,7 +58206,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  {
        struct mmap_arg_struct a;
        int error = -EFAULT;
-@@ -86,7 +87,7 @@ out:
+@@ -86,7 +87,7 @@
        return error;
  }
  
@@ -58231,7 +58215,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  {
        struct mmap_arg_struct a;
        long error = -EFAULT;
-@@ -127,8 +128,8 @@ asmlinkage long old_select(struct sel_ar
+@@ -127,8 +128,8 @@
   *
   * This is really horribly ugly.
   */
@@ -58242,7 +58226,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  {
          struct ipc_kludge tmp;
        int ret;
-@@ -194,18 +195,18 @@ asmlinkage long sys_ipc(uint call, int f
+@@ -194,18 +195,18 @@
  }
  
  #ifdef CONFIG_64BIT
@@ -58264,7 +58248,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  {
        int ret;
  
-@@ -224,15 +225,13 @@ asmlinkage long s390x_personality(unsign
+@@ -224,14 +225,12 @@
   */
  #ifndef CONFIG_64BIT
  
@@ -58276,13 +58260,12 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
        return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low,
                        len, advice);
  }
--#endif
 -
+-#endif
  struct fadvise64_64_args {
        int fd;
-       long long offset;
-@@ -240,8 +239,7 @@ struct fadvise64_64_args {
+@@ -240,8 +239,7 @@
        int advice;
  };
  
@@ -58292,7 +58275,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  {
        struct fadvise64_64_args a;
  
-@@ -250,7 +248,6 @@ s390_fadvise64_64(struct fadvise64_64_ar
+@@ -250,7 +248,6 @@
        return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice);
  }
  
@@ -58300,7 +58283,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
  /*
   * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last
   * 64 bit argument "len" is split into the upper and lower 32 bits. The
-@@ -263,9 +260,19 @@ s390_fadvise64_64(struct fadvise64_64_ar
+@@ -263,9 +260,19 @@
   * to
   *   %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len
   */
@@ -58318,13 +58301,13 @@ diff -purN linux-2.6.27/arch/s390/kernel/sys_s390.c linux-2.6.27.19-5.1/arch/s39
 +                                 (u32) len_high, (u32) len_low);
 +}
 +SYSCALL_ALIAS(sys_s390_fallocate, SyS_s390_fallocate);
-+#endif
-+
  #endif
-diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s390/kernel/syscalls.S
---- linux-2.6.27/arch/s390/kernel/syscalls.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/syscalls.S    2009-03-25 16:10:51.000000000 +0000
-@@ -98,7 +98,7 @@ SYSCALL(sys_uselib,sys_uselib,sys32_usel
++
++#endif
+diff -r 9608d5473017 arch/s390/kernel/syscalls.S
+--- a/arch/s390/kernel/syscalls.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/syscalls.S      Wed May 06 16:56:06 2009 +0100
+@@ -98,7 +98,7 @@
  SYSCALL(sys_swapon,sys_swapon,sys32_swapon_wrapper)
  SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper)
  SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper)  /* old readdir syscall */
@@ -58333,7 +58316,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper)
  SYSCALL(sys_truncate,sys_truncate,sys32_truncate_wrapper)
  SYSCALL(sys_ftruncate,sys_ftruncate,sys32_ftruncate_wrapper)
-@@ -130,7 +130,7 @@ SYSCALL(sys_fsync,sys_fsync,sys32_fsync_
+@@ -130,7 +130,7 @@
  SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn)
  SYSCALL(sys_clone,sys_clone,sys32_clone)                      /* 120 */
  SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper)
@@ -58342,7 +58325,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  NI_SYSCALL                                                    /* modify_ldt for i386 */
  SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
  SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper)     /* 125 */
-@@ -144,7 +144,7 @@ SYSCALL(sys_getpgid,sys_getpgid,sys32_ge
+@@ -144,7 +144,7 @@
  SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper)
  SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper)
  SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper)              /* 135 */
@@ -58351,7 +58334,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  NI_SYSCALL                                                    /* for afs_syscall */
  SYSCALL(sys_setfsuid16,sys_ni_syscall,sys32_setfsuid16_wrapper)       /* old setfsuid16 syscall */
  SYSCALL(sys_setfsgid16,sys_ni_syscall,sys32_setfsgid16_wrapper)       /* old setfsgid16 syscall */
-@@ -194,7 +194,7 @@ SYSCALL(sys_chown16,sys_ni_syscall,sys32
+@@ -194,7 +194,7 @@
  SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper)
  SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper)
  SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper)           /* 185 */
@@ -58360,7 +58343,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_sendfile,sys_sendfile64,sys32_sendfile_wrapper)
  NI_SYSCALL                                                    /* streams1 */
  NI_SYSCALL                                                    /* streams2 */
-@@ -230,8 +230,8 @@ SYSCALL(sys_mincore,sys_mincore,sys32_mi
+@@ -230,8 +230,8 @@
  SYSCALL(sys_madvise,sys_madvise,sys32_madvise_wrapper)
  SYSCALL(sys_getdents64,sys_getdents64,sys32_getdents64_wrapper)       /* 220 */
  SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64_wrapper)
@@ -58371,7 +58354,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_setxattr,sys_setxattr,sys32_setxattr_wrapper)
  SYSCALL(sys_lsetxattr,sys_lsetxattr,sys32_lsetxattr_wrapper)  /* 225 */
  SYSCALL(sys_fsetxattr,sys_fsetxattr,sys32_fsetxattr_wrapper)
-@@ -245,11 +245,11 @@ SYSCALL(sys_removexattr,sys_removexattr,
+@@ -245,11 +245,11 @@
  SYSCALL(sys_lremovexattr,sys_lremovexattr,sys32_lremovexattr_wrapper)
  SYSCALL(sys_fremovexattr,sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */
  SYSCALL(sys_gettid,sys_gettid,sys_gettid)
@@ -58385,7 +58368,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  NI_SYSCALL                                                    /* reserved for TUX */
  SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper)
  SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper)
-@@ -261,7 +261,7 @@ SYSCALL(sys_epoll_create,sys_epoll_creat
+@@ -261,7 +261,7 @@
  SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper)    /* 250 */
  SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper)
  SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper)
@@ -58394,7 +58377,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper)
  SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper)      /* 255 */
  SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper)
-@@ -272,7 +272,7 @@ SYSCALL(sys_clock_gettime,sys_clock_gett
+@@ -272,7 +272,7 @@
  SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
  SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper)
  NI_SYSCALL                                                    /* reserved for vserver */
@@ -58403,7 +58386,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper)
  SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper)
  SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper)
-@@ -288,7 +288,7 @@ SYSCALL(sys_mq_getsetattr,sys_mq_getseta
+@@ -288,7 +288,7 @@
  SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load_wrapper)
  SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper)
  SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper)
@@ -58412,7 +58395,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper)
  SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper)
  SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper)
-@@ -322,7 +322,7 @@ NI_SYSCALL                                                 /* 310 sys_move_pages *
+@@ -322,7 +322,7 @@
  SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
  SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
  SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
@@ -58421,9 +58404,9 @@ diff -purN linux-2.6.27/arch/s390/kernel/syscalls.S linux-2.6.27.19-5.1/arch/s39
  SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper)     /* 315 */
  SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
  NI_SYSCALL                                            /* 317 old sys_timer_fd */
-diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/kernel/time.c
---- linux-2.6.27/arch/s390/kernel/time.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/time.c        2009-03-25 16:10:51.000000000 +0000
+diff -r 9608d5473017 arch/s390/kernel/time.c
+--- a/arch/s390/kernel/time.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/time.c  Wed May 06 16:56:06 2009 +0100
 @@ -12,6 +12,8 @@
   *    Copyright (C) 1991, 1992, 1995  Linus Torvalds
   */
@@ -58442,7 +58425,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  #include <linux/time.h>
  #include <linux/sysdev.h>
  #include <linux/delay.h>
-@@ -291,8 +295,8 @@ static unsigned long long adjust_time(un
+@@ -291,8 +295,8 @@
        }
        jiffies_timer_cc += delta;
        if (adjust.offset != 0) {
@@ -58453,7 +58436,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
                adjust.modes = ADJ_OFFSET_SINGLESHOT;
                do_adjtimex(&adjust);
        }
-@@ -363,6 +367,15 @@ static void enable_sync_clock(void)
+@@ -363,6 +367,15 @@
        atomic_set_mask(0x80000000, sw_ptr);
  }
  
@@ -58469,7 +58452,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  /*
   * External Time Reference (ETR) code.
   */
-@@ -428,6 +441,7 @@ static struct timer_list etr_timer;
+@@ -428,6 +441,7 @@
  
  static void etr_timeout(unsigned long dummy);
  static void etr_work_fn(struct work_struct *work);
@@ -58477,7 +58460,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  static DECLARE_WORK(etr_work, etr_work_fn);
  
  /*
-@@ -443,8 +457,8 @@ static void etr_reset(void)
+@@ -443,8 +457,8 @@
                etr_tolec = get_clock();
                set_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags);
        } else if (etr_port0_online || etr_port1_online) {
@@ -58488,7 +58471,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
                etr_port0_online = etr_port1_online = 0;
        }
  }
-@@ -455,17 +469,18 @@ static int __init etr_init(void)
+@@ -455,17 +469,18 @@
  
        if (!test_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags))
                return 0;
@@ -58509,7 +58492,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        }
        return 0;
  }
-@@ -492,7 +507,7 @@ void etr_switch_to_local(void)
+@@ -492,7 +507,7 @@
        if (test_bit(CLOCK_SYNC_ETR, &clock_sync_flags))
                disable_sync_clock(NULL);
        set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events);
@@ -58518,7 +58501,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -508,7 +523,7 @@ void etr_sync_check(void)
+@@ -508,7 +523,7 @@
        if (test_bit(CLOCK_SYNC_ETR, &clock_sync_flags))
                disable_sync_clock(NULL);
        set_bit(ETR_EVENT_SYNC_CHECK, &etr_events);
@@ -58527,7 +58510,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -532,13 +547,13 @@ static void etr_timing_alert(struct etr_
+@@ -532,13 +547,13 @@
                 * Both ports are not up-to-date now.
                 */
                set_bit(ETR_EVENT_PORT_ALERT, &etr_events);
@@ -58543,7 +58526,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -645,14 +660,16 @@ static int etr_aib_follows(struct etr_ai
+@@ -645,14 +660,16 @@
  }
  
  struct clock_sync_data {
@@ -58563,7 +58546,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        enable_sync_clock();
        /*
         * This looks like a busy wait loop but it isn't. etr_sync_cpus
-@@ -678,39 +695,35 @@ static void clock_sync_cpu_start(void *d
+@@ -678,39 +695,35 @@
        fixup_clock_comparator(sync->fixup_cc);
  }
  
@@ -58590,22 +58573,8 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        int rc;
  
 -      /* Check if the current aib is adjacent to the sync port aib. */
--      sync_port = (port == 0) ? &etr_port0 : &etr_port1;
--      follows = etr_aib_follows(sync_port, aib, port);
--      memcpy(sync_port, aib, sizeof(*aib));
--      if (!follows)
--              return -EAGAIN;
 +      etr_sync = data;
--      /*
--       * Catch all other cpus and make them wait until we have
--       * successfully synced the clock. smp_call_function will
--       * return after all other cpus are in etr_sync_cpu_start.
--       */
--      memset(&etr_sync, 0, sizeof(etr_sync));
--      preempt_disable();
--      smp_call_function(clock_sync_cpu_start, &etr_sync, 0);
--      local_irq_disable();
++
 +      if (xchg(&first, 1) == 1) {
 +              /* Slave */
 +              clock_sync_cpu(etr_sync);
@@ -58618,11 +58587,25 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
 +
 +      port = etr_sync->etr_port;
 +      aib = etr_sync->etr_aib;
-+      sync_port = (port == 0) ? &etr_port0 : &etr_port1;
+       sync_port = (port == 0) ? &etr_port0 : &etr_port1;
+-      follows = etr_aib_follows(sync_port, aib, port);
+-      memcpy(sync_port, aib, sizeof(*aib));
+-      if (!follows)
+-              return -EAGAIN;
+-
+-      /*
+-       * Catch all other cpus and make them wait until we have
+-       * successfully synced the clock. smp_call_function will
+-       * return after all other cpus are in etr_sync_cpu_start.
+-       */
+-      memset(&etr_sync, 0, sizeof(etr_sync));
+-      preempt_disable();
+-      smp_call_function(clock_sync_cpu_start, &etr_sync, 0);
+-      local_irq_disable();
        enable_sync_clock();
  
        /* Set clock to next OTE. */
-@@ -727,16 +740,16 @@ static int etr_sync_clock(struct etr_aib
+@@ -727,16 +740,16 @@
                delay = (unsigned long long)
                        (aib->edf2.etv - sync_port->edf2.etv) << 32;
                delta = adjust_time(old_clock, clock, delay);
@@ -58642,7 +58625,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
                        rc = 0;
                }
        } else {
-@@ -744,12 +757,33 @@ static int etr_sync_clock(struct etr_aib
+@@ -744,12 +757,33 @@
                __ctl_clear_bit(0, 29);
                __ctl_clear_bit(14, 21);
                disable_sync_clock(NULL);
@@ -58680,7 +58663,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        return rc;
  }
  
-@@ -906,7 +940,7 @@ static void etr_update_eacr(struct etr_e
+@@ -906,7 +940,7 @@
  }
  
  /*
@@ -58689,17 +58672,17 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
   * particular this is the only function that calls etr_update_eacr(),
   * it "controls" the etr control register.
   */
-@@ -917,6 +951,9 @@ static void etr_work_fn(struct work_stru
+@@ -916,6 +950,9 @@
+       struct etr_eacr eacr;
        struct etr_aib aib;
        int sync_port;
++
 +      /* prevent multiple execution. */
 +      mutex_lock(&etr_work_mutex);
-+
        /* Create working copy of etr_eacr. */
        eacr = etr_eacr;
-@@ -932,7 +969,7 @@ static void etr_work_fn(struct work_stru
+@@ -932,7 +969,7 @@
                del_timer_sync(&etr_timer);
                etr_update_eacr(eacr);
                clear_bit(CLOCK_SYNC_ETR, &clock_sync_flags);
@@ -58708,7 +58691,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        }
  
        /* Store aib to get the current ETR status word. */
-@@ -1019,7 +1056,7 @@ static void etr_work_fn(struct work_stru
+@@ -1019,7 +1056,7 @@
            eacr.es || sync_port < 0) {
                etr_update_eacr(eacr);
                etr_set_tolec_timeout(now);
@@ -58717,7 +58700,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        }
  
        /*
-@@ -1039,7 +1076,7 @@ static void etr_work_fn(struct work_stru
+@@ -1039,7 +1076,7 @@
        etr_update_eacr(eacr);
        set_bit(CLOCK_SYNC_ETR, &clock_sync_flags);
        if (now < etr_tolec + (1600000 << 12) ||
@@ -58726,7 +58709,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
                /* Sync failed. Try again in 1/2 second. */
                eacr.es = 0;
                etr_update_eacr(eacr);
-@@ -1047,6 +1084,8 @@ static void etr_work_fn(struct work_stru
+@@ -1047,6 +1084,8 @@
                etr_set_sync_timeout();
        } else
                etr_set_tolec_timeout(now);
@@ -58735,7 +58718,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -1128,13 +1167,13 @@ static ssize_t etr_online_store(struct s
+@@ -1128,13 +1167,13 @@
                        return count;   /* Nothing to do. */
                etr_port0_online = value;
                set_bit(ETR_EVENT_PORT0_CHANGE, &etr_events);
@@ -58751,7 +58734,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        }
        return count;
  }
-@@ -1335,6 +1374,7 @@ static struct stp_sstpi stp_info;
+@@ -1335,6 +1374,7 @@
  static void *stp_page;
  
  static void stp_work_fn(struct work_struct *work);
@@ -58759,7 +58742,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  static DECLARE_WORK(stp_work, stp_work_fn);
  
  static int __init early_parse_stp(char *p)
-@@ -1356,10 +1396,11 @@ static void __init stp_reset(void)
+@@ -1356,10 +1396,11 @@
  
        stp_page = alloc_bootmem_pages(PAGE_SIZE);
        rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000);
@@ -58773,7 +58756,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
                free_bootmem((unsigned long) stp_page, PAGE_SIZE);
                stp_page = NULL;
                stp_online = 0;
-@@ -1368,8 +1409,12 @@ static void __init stp_reset(void)
+@@ -1368,8 +1409,12 @@
  
  static int __init stp_init(void)
  {
@@ -58788,7 +58771,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        return 0;
  }
  
-@@ -1386,7 +1431,7 @@ arch_initcall(stp_init);
+@@ -1386,7 +1431,7 @@
  static void stp_timing_alert(struct stp_irq_parm *intparm)
  {
        if (intparm->tsc || intparm->lac || intparm->tcpc)
@@ -58797,7 +58780,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -1414,46 +1459,34 @@ void stp_island_check(void)
+@@ -1414,46 +1459,34 @@
        if (!test_bit(CLOCK_SYNC_STP, &clock_sync_flags))
                return;
        disable_sync_clock(NULL);
@@ -58822,25 +58805,25 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
 -      if (!stp_online) {
 -              chsc_sstpc(stp_page, STP_OP_CTRL, 0x0000);
 -              return;
--      }
 +      stp_sync = data;
--      rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0xb0e0);
--      if (rc)
--              return;
++
 +      if (xchg(&first, 1) == 1) {
 +              /* Slave */
 +              clock_sync_cpu(stp_sync);
 +              return 0;
-+      }
+       }
  
--      rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
--      if (rc || stp_info.c == 0)
+-      rc = chsc_sstpc(stp_page, STP_OP_CTRL, 0xb0e0);
+-      if (rc)
 -              return;
 +      /* Wait until all other cpus entered the sync function. */
 +      while (atomic_read(&stp_sync->cpus) != 0)
 +              cpu_relax();
  
+-      rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
+-      if (rc || stp_info.c == 0)
+-              return;
+-
 -      /*
 -       * Catch all other cpus and make them wait until we have
 -       * successfully synced the clock. smp_call_function will
@@ -58859,7 +58842,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  
        rc = 0;
        if (stp_info.todoff[0] || stp_info.todoff[1] ||
-@@ -1472,16 +1505,49 @@ static void stp_work_fn(struct work_stru
+@@ -1472,16 +1505,49 @@
        }
        if (rc) {
                disable_sync_clock(NULL);
@@ -58875,7 +58858,10 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
 +      xchg(&first, 0);
 +      return 0;
 +}
-+
+-      local_irq_enable();
+-      smp_call_function(clock_sync_cpu_end, NULL, 0);
+-      preempt_enable();
 +/*
 + * STP work. Check for the STP state and take over the clock
 + * synchronization if the STP clock source is usable.
@@ -58884,10 +58870,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
 +{
 +      struct clock_sync_data stp_sync;
 +      int rc;
--      local_irq_enable();
--      smp_call_function(clock_sync_cpu_end, NULL, 0);
--      preempt_enable();
++
 +      /* prevent multiple execution. */
 +      mutex_lock(&stp_work_mutex);
 +
@@ -58915,7 +58898,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
  }
  
  /*
-@@ -1590,7 +1656,7 @@ static ssize_t stp_online_store(struct s
+@@ -1590,7 +1656,7 @@
        if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
                return -EOPNOTSUPP;
        stp_online = value;
@@ -58924,18 +58907,18 @@ diff -purN linux-2.6.27/arch/s390/kernel/time.c linux-2.6.27.19-5.1/arch/s390/ke
        return count;
  }
  
-diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s390/kernel/topology.c
---- linux-2.6.27/arch/s390/kernel/topology.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/kernel/topology.c    2009-03-25 16:10:51.000000000 +0000
-@@ -3,6 +3,8 @@
+diff -r 9608d5473017 arch/s390/kernel/topology.c
+--- a/arch/s390/kernel/topology.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/kernel/topology.c      Wed May 06 16:56:06 2009 +0100
+@@ -2,6 +2,8 @@
+  *    Copyright IBM Corp. 2007
   *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
   */
-+#define KMSG_COMPONENT "cpu"
 +
++#define KMSG_COMPONENT "cpu"
  #include <linux/kernel.h>
  #include <linux/mm.h>
- #include <linux/init.h>
 @@ -12,6 +14,7 @@
  #include <linux/workqueue.h>
  #include <linux/cpu.h>
@@ -58944,7 +58927,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  #include <asm/delay.h>
  #include <asm/s390_ext.h>
  #include <asm/sysinfo.h>
-@@ -57,26 +60,29 @@ struct core_info {
+@@ -57,26 +60,29 @@
        cpumask_t mask;
  };
  
@@ -58978,7 +58961,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        while (core) {
                if (cpu_isset(cpu, core->mask)) {
                        mask = core->mask;
-@@ -84,7 +90,7 @@ cpumask_t cpu_coregroup_map(unsigned int
+@@ -84,7 +90,7 @@
                }
                core = core->next;
        }
@@ -58987,7 +58970,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        if (cpus_empty(mask))
                mask = cpumask_of_cpu(cpu);
        return mask;
-@@ -133,7 +139,7 @@ static void tl_to_cores(struct tl_info *
+@@ -133,7 +139,7 @@
        union tl_entry *tle, *end;
        struct core_info *core = &core_info;
  
@@ -58996,7 +58979,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        clear_cores();
        tle = info->tle;
        end = (union tl_entry *)((unsigned long)info + info->length);
-@@ -157,7 +163,7 @@ static void tl_to_cores(struct tl_info *
+@@ -157,7 +163,7 @@
                }
                tle = next_tle(tle);
        }
@@ -59005,7 +58988,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  }
  
  static void topology_update_polarization_simple(void)
-@@ -165,7 +171,7 @@ static void topology_update_polarization
+@@ -165,7 +171,7 @@
        int cpu;
  
        mutex_lock(&smp_cpu_state_mutex);
@@ -59014,7 +58997,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
                smp_cpu_polarization[cpu] = POLARIZATION_HRZ;
        mutex_unlock(&smp_cpu_state_mutex);
  }
-@@ -196,7 +202,7 @@ int topology_set_cpu_management(int fc)
+@@ -196,7 +202,7 @@
                rc = ptf(PTF_HORIZONTAL);
        if (rc)
                return -EBUSY;
@@ -59023,7 +59006,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
                smp_cpu_polarization[cpu] = POLARIZATION_UNKNWN;
        return rc;
  }
-@@ -205,11 +211,11 @@ static void update_cpu_core_map(void)
+@@ -205,11 +211,11 @@
  {
        int cpu;
  
@@ -59037,7 +59020,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  {
        struct tl_info *info = tl_info;
        struct sys_device *sysdev;
-@@ -218,7 +224,7 @@ void arch_update_cpu_topology(void)
+@@ -218,7 +224,7 @@
        if (!machine_has_topology) {
                update_cpu_core_map();
                topology_update_polarization_simple();
@@ -59046,7 +59029,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        }
        stsi(info, 15, 1, 2);
        tl_to_cores(info);
-@@ -227,11 +233,12 @@ void arch_update_cpu_topology(void)
+@@ -227,11 +233,12 @@
                sysdev = get_cpu_sysdev(cpu);
                kobject_uevent(&sysdev->kobj, KOBJ_CHANGE);
        }
@@ -59060,7 +59043,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  }
  
  void topology_schedule_update(void)
-@@ -254,10 +261,14 @@ static void set_topology_timer(void)
+@@ -254,10 +261,14 @@
        add_timer(&topology_timer);
  }
  
@@ -59077,7 +59060,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  
  static int __init init_topology_update(void)
  {
-@@ -269,14 +280,7 @@ static int __init init_topology_update(v
+@@ -269,14 +280,7 @@
                goto out;
        }
        init_timer_deferrable(&topology_timer);
@@ -59093,7 +59076,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
  out:
        update_cpu_core_map();
        return rc;
-@@ -297,9 +301,6 @@ void __init s390_init_cpu_topology(void)
+@@ -297,9 +301,6 @@
                return;
        machine_has_topology = 1;
  
@@ -59103,7 +59086,7 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        tl_info = alloc_bootmem_pages(PAGE_SIZE);
        info = tl_info;
        stsi(info, 15, 1, 2);
-@@ -308,7 +309,7 @@ void __init s390_init_cpu_topology(void)
+@@ -308,7 +309,7 @@
        for (i = 0; i < info->mnest - 2; i++)
                nr_cores *= info->mag[NR_MAG - 3 - i];
  
@@ -59112,16 +59095,16 @@ diff -purN linux-2.6.27/arch/s390/kernel/topology.c linux-2.6.27.19-5.1/arch/s39
        for (i = 0; i < NR_MAG; i++)
                printk(" %d", info->mag[i]);
        printk(" / %d\n", info->mnest);
-@@ -323,5 +324,4 @@ void __init s390_init_cpu_topology(void)
+@@ -323,5 +324,4 @@
        return;
  error:
        machine_has_topology = 0;
 -      machine_has_topology_irq = 0;
  }
-diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390/lib/uaccess_pt.c
---- linux-2.6.27/arch/s390/lib/uaccess_pt.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/lib/uaccess_pt.c     2009-03-25 16:10:52.000000000 +0000
-@@ -43,8 +43,9 @@ static int __handle_fault(struct mm_stru
+diff -r 9608d5473017 arch/s390/lib/uaccess_pt.c
+--- a/arch/s390/lib/uaccess_pt.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/lib/uaccess_pt.c       Wed May 06 16:56:06 2009 +0100
+@@ -43,8 +43,9 @@
        int ret = -EFAULT;
        int fault;
  
@@ -59132,7 +59115,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        down_read(&mm->mmap_sem);
        vma = find_vma(mm, address);
        if (unlikely(!vma))
-@@ -109,6 +110,8 @@ static size_t __user_copy_pt(unsigned lo
+@@ -109,6 +110,8 @@
        pte_t *pte;
        void *from, *to;
  
@@ -59141,7 +59124,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        done = 0;
  retry:
        spin_lock(&mm->page_table_lock);
-@@ -182,10 +185,6 @@ size_t copy_from_user_pt(size_t n, const
+@@ -182,10 +185,6 @@
  {
        size_t rc;
  
@@ -59152,7 +59135,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        rc = __user_copy_pt((unsigned long) from, to, n, 0);
        if (unlikely(rc))
                memset(to + n - rc, 0, rc);
-@@ -194,10 +193,6 @@ size_t copy_from_user_pt(size_t n, const
+@@ -194,10 +193,6 @@
  
  size_t copy_to_user_pt(size_t n, void __user *to, const void *from)
  {
@@ -59163,7 +59146,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        return __user_copy_pt((unsigned long) to, (void *) from, n, 1);
  }
  
-@@ -205,10 +200,6 @@ static size_t clear_user_pt(size_t n, vo
+@@ -205,10 +200,6 @@
  {
        long done, size, ret;
  
@@ -59174,7 +59157,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        done = 0;
        do {
                if (n - done > PAGE_SIZE)
-@@ -234,7 +225,7 @@ static size_t strnlen_user_pt(size_t cou
+@@ -234,7 +225,7 @@
        size_t len_str;
  
        if (segment_eq(get_fs(), KERNEL_DS))
@@ -59183,7 +59166,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        done = 0;
  retry:
        spin_lock(&mm->page_table_lock);
-@@ -276,13 +267,6 @@ static size_t strncpy_from_user_pt(size_
+@@ -276,13 +267,6 @@
                return -EFAULT;
        if (n > count)
                n = count;
@@ -59197,7 +59180,7 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        if (__user_copy_pt((unsigned long) src, dst, n, 0))
                return -EFAULT;
        if (dst[n-1] == '\0')
-@@ -302,10 +286,8 @@ static size_t copy_in_user_pt(size_t n, 
+@@ -302,10 +286,8 @@
        pte_t *pte_from, *pte_to;
        int write_user;
  
@@ -59210,18 +59193,18 @@ diff -purN linux-2.6.27/arch/s390/lib/uaccess_pt.c linux-2.6.27.19-5.1/arch/s390
        done = 0;
  retry:
        spin_lock(&mm->page_table_lock);
-diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/extmem.c
---- linux-2.6.27/arch/s390/mm/extmem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/mm/extmem.c  2009-03-25 16:10:51.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/s390/mm/extmem.c
+--- a/arch/s390/mm/extmem.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/mm/extmem.c    Wed May 06 16:56:06 2009 +0100
+@@ -6,6 +6,8 @@
+  * Bugreports.to..: <Linux390@de.ibm.com>
   * (C) IBM Corporation 2002-2004
   */
-+#define KMSG_COMPONENT "extmem"
 +
++#define KMSG_COMPONENT "extmem"
  #include <linux/kernel.h>
  #include <linux/string.h>
- #include <linux/spinlock.h>
 @@ -24,39 +26,46 @@
  #include <asm/cpcmd.h>
  #include <asm/setup.h>
@@ -59285,7 +59268,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
  
  struct qin64 {
        char qopcode;
-@@ -86,6 +95,55 @@ static DEFINE_MUTEX(dcss_lock);
+@@ -86,6 +95,55 @@
  static LIST_HEAD(dcss_list);
  static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
                                        "EW/EN-MIXED" };
@@ -59341,7 +59324,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
  
  /*
   * Create the 8 bytes, ebcdic VM segment name from
-@@ -135,25 +193,45 @@ segment_by_name (char *name)
+@@ -135,25 +193,45 @@
   * Perform a function on a dcss segment.
   */
  static inline int
@@ -59360,13 +59343,9 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
 +      }
        rx = (unsigned long) parameter;
 -      ry = (unsigned long) func;
--      asm volatile(
 +      ry = (unsigned long) *func;
 +
- #ifdef CONFIG_64BIT
--              "       sam31\n"
--              "       diag    %0,%1,0x64\n"
--              "       sam64\n"
++#ifdef CONFIG_64BIT
 +      /* 64-bit Diag x'64' new subcode, keep in 64-bit addressing mode */
 +      if (*func > DCSS_SEGEXT)
 +              asm volatile(
@@ -59383,9 +59362,14 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
 +                      "       ipm     %2\n"
 +                      "       srl     %2,28\n"
 +                      : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc");
- #else
-+      asm volatile(
++#else
+       asm volatile(
+-#ifdef CONFIG_64BIT
+-              "       sam31\n"
                "       diag    %0,%1,0x64\n"
+-              "       sam64\n"
+-#else
+-              "       diag    %0,%1,0x64\n"
 -#endif
                "       ipm     %2\n"
                "       srl     %2,28\n"
@@ -59394,7 +59378,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
        *ret1 = rx;
        *ret2 = ry;
        return rc;
-@@ -190,14 +268,45 @@ query_segment_type (struct dcss_segment 
+@@ -190,14 +268,45 @@
        qin->qoutlen = sizeof(struct qout64);
        memcpy (qin->qname, seg->dcss_name, 8);
  
@@ -59442,7 +59426,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
        if (qout->segcnt > 6) {
                rc = -ENOTSUPP;
                goto out_free;
-@@ -248,7 +357,6 @@ query_segment_type (struct dcss_segment 
+@@ -248,7 +357,6 @@
   * -EIO     : could not perform query diagnose
   * -ENOENT  : no such segment
   * -ENOTSUPP: multi-part segment cannot be used with linux
@@ -59450,7 +59434,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
   * -ENOMEM  : out of memory
   * 0 .. 6   : type of segment as defined in include/asm-s390/extmem.h
   */
-@@ -269,6 +377,30 @@ segment_type (char* name)
+@@ -269,6 +377,30 @@
  }
  
  /*
@@ -59481,7 +59465,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
   * real segment loading function, called from segment_load
   */
  static int
-@@ -276,7 +408,8 @@ __segment_load (char *name, int do_nonsh
+@@ -276,7 +408,8 @@
  {
        struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment),
                        GFP_DMA);
@@ -59491,21 +59475,21 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
  
        if (seg == NULL) {
                rc = -ENOMEM;
-@@ -287,6 +420,13 @@ __segment_load (char *name, int do_nonsh
+@@ -286,6 +419,13 @@
+       rc = query_segment_type (seg);
        if (rc < 0)
                goto out_free;
++
 +      if (loadshr_scode == DCSS_LOADSHRX) {
 +              if (segment_overlaps_others(seg)) {
 +                      rc = -EBUSY;
 +                      goto out_free;
 +              }
 +      }
-+
        rc = vmem_add_mapping(seg->start_addr, seg->end - seg->start_addr + 1);
  
-       if (rc)
-@@ -316,35 +456,40 @@ __segment_load (char *name, int do_nonsh
+@@ -316,35 +456,40 @@
        }
  
        if (do_nonshared)
@@ -59517,27 +59501,28 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
 -
 -      diag_cc = dcss_diag(dcss_command, seg->dcss_name,
 -                      &seg->start_addr, &seg->end);
+-      if (diag_cc > 1) {
+-              PRINT_WARN ("segment_load: could not load segment %s - "
+-                              "diag returned error (%ld)\n",name,seg->end);
+-              rc = dcss_diag_translate_rc (seg->end);
+-              dcss_diag(DCSS_PURGESEG, seg->dcss_name,
+-                              &seg->start_addr, &seg->end);
 +              diag_cc = dcss_diag(&loadshr_scode, seg->dcss_name,
 +                              &start_addr, &end_addr);
 +      if (diag_cc < 0) {
 +              dcss_diag(&purgeseg_scode, seg->dcss_name,
 +                              &dummy, &dummy);
 +              rc = diag_cc;
-+              goto out_resource;
-+      }
-       if (diag_cc > 1) {
--              PRINT_WARN ("segment_load: could not load segment %s - "
--                              "diag returned error (%ld)\n",name,seg->end);
--              rc = dcss_diag_translate_rc (seg->end);
--              dcss_diag(DCSS_PURGESEG, seg->dcss_name,
--                              &seg->start_addr, &seg->end);
+               goto out_resource;
+       }
++      if (diag_cc > 1) {
 +              pr_warning("Loading DCSS %s failed with rc=%ld\n", name,
 +                         end_addr);
 +              rc = dcss_diag_translate_rc(end_addr);
 +              dcss_diag(&purgeseg_scode, seg->dcss_name,
 +                              &dummy, &dummy);
-               goto out_resource;
-       }
++              goto out_resource;
++      }
 +      seg->start_addr = start_addr;
 +      seg->end = end_addr;
        seg->do_nonshared = do_nonshared;
@@ -59564,7 +59549,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
        }
        goto out;
   out_resource:
-@@ -423,8 +568,8 @@ int
+@@ -423,8 +568,8 @@
  segment_modify_shared (char *name, int do_nonshared)
  {
        struct dcss_segment *seg;
@@ -59575,7 +59560,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
  
        mutex_lock(&dcss_lock);
        seg = segment_by_name (name);
-@@ -433,50 +578,62 @@ segment_modify_shared (char *name, int d
+@@ -433,50 +578,62 @@
                goto out_unlock;
        }
        if (do_nonshared == seg->do_nonshared) {
@@ -59616,7 +59601,10 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                kfree(seg->res);
 -              goto out_del;
 +              goto out_del_mem;
-+      }
+       }
+-      dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
+-      diag_cc = dcss_diag(dcss_command, seg->dcss_name,
+-                      &seg->start_addr, &seg->end);
 +
 +      dcss_diag(&purgeseg_scode, seg->dcss_name, &dummy, &dummy);
 +      if (do_nonshared)
@@ -59628,10 +59616,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
 +      if (diag_cc < 0) {
 +              rc = diag_cc;
 +              goto out_del_res;
-       }
--      dcss_diag(DCSS_PURGESEG, seg->dcss_name, &dummy, &dummy);
--      diag_cc = dcss_diag(dcss_command, seg->dcss_name,
--                      &seg->start_addr, &seg->end);
++      }
        if (diag_cc > 1) {
 -              PRINT_WARN ("segment_modify_shared: could not reload segment %s"
 -                              " - diag returned error (%ld)\n",name,seg->end);
@@ -59659,7 +59644,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
        kfree(seg);
   out_unlock:
        mutex_unlock(&dcss_lock);
-@@ -500,8 +657,7 @@ segment_unload(char *name)
+@@ -500,8 +657,7 @@
        mutex_lock(&dcss_lock);
        seg = segment_by_name (name);
        if (seg == NULL) {
@@ -59669,7 +59654,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                goto out_unlock;
        }
        if (atomic_dec_return(&seg->ref_count) != 0)
-@@ -510,7 +666,7 @@ segment_unload(char *name)
+@@ -510,7 +666,7 @@
        kfree(seg->res);
        vmem_remove_mapping(seg->start_addr, seg->end - seg->start_addr + 1);
        list_del(&seg->list);
@@ -59678,7 +59663,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
        kfree(seg);
  out_unlock:
        mutex_unlock(&dcss_lock);
-@@ -536,8 +692,7 @@ segment_save(char *name)
+@@ -536,8 +692,7 @@
        seg = segment_by_name (name);
  
        if (seg == NULL) {
@@ -59688,7 +59673,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                goto out;
        }
  
-@@ -545,7 +700,7 @@ segment_save(char *name)
+@@ -545,7 +700,7 @@
        endpfn = (seg->end) >> PAGE_SHIFT;
        sprintf(cmd1, "DEFSEG %s", name);
        for (i=0; i<seg->segcnt; i++) {
@@ -59697,7 +59682,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                        seg->range[i].start >> PAGE_SHIFT,
                        seg->range[i].end >> PAGE_SHIFT,
                        segtype_string[seg->range[i].start & 0xff]);
-@@ -554,14 +709,14 @@ segment_save(char *name)
+@@ -554,14 +709,14 @@
        response = 0;
        cpcmd(cmd1, NULL, 0, &response);
        if (response) {
@@ -59716,7 +59701,7 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                goto out;
        }
  out:
-@@ -576,44 +731,41 @@ void segment_warning(int rc, char *seg_n
+@@ -576,44 +731,41 @@
  {
        switch (rc) {
        case -ENOENT:
@@ -59778,10 +59763,10 @@ diff -purN linux-2.6.27/arch/s390/mm/extmem.c linux-2.6.27.19-5.1/arch/s390/mm/e
                break;
        }
  }
-diff -purN linux-2.6.27/arch/s390/mm/pgtable.c linux-2.6.27.19-5.1/arch/s390/mm/pgtable.c
---- linux-2.6.27/arch/s390/mm/pgtable.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/s390/mm/pgtable.c 2009-03-25 16:10:51.000000000 +0000
-@@ -256,6 +256,10 @@ int s390_enable_sie(void)
+diff -r 9608d5473017 arch/s390/mm/pgtable.c
+--- a/arch/s390/mm/pgtable.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/s390/mm/pgtable.c   Wed May 06 16:56:06 2009 +0100
+@@ -256,6 +256,10 @@
        struct task_struct *tsk = current;
        struct mm_struct *mm, *old_mm;
  
@@ -59792,21 +59777,21 @@ diff -purN linux-2.6.27/arch/s390/mm/pgtable.c linux-2.6.27.19-5.1/arch/s390/mm/
        /* Do we have pgstes? if yes, we are done */
        if (tsk->mm->context.pgstes)
                return 0;
-diff -purN linux-2.6.27/arch/sh/Kconfig linux-2.6.27.19-5.1/arch/sh/Kconfig
---- linux-2.6.27/arch/sh/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/Kconfig        2009-03-25 16:10:49.000000000 +0000
-@@ -106,6 +106,8 @@ config IO_TRAPPED
+diff -r 9608d5473017 arch/sh/Kconfig
+--- a/arch/sh/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/Kconfig  Wed May 06 16:56:06 2009 +0100
+@@ -105,6 +105,8 @@
+       bool
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "System type"
  
- #
-diff -purN linux-2.6.27/arch/sh/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/sh/include/asm/ioctls.h
---- linux-2.6.27/arch/sh/include/asm/ioctls.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/include/asm/ioctls.h   2009-03-25 16:10:50.000000000 +0000
+diff -r 9608d5473017 arch/sh/include/asm/ioctls.h
+--- a/arch/sh/include/asm/ioctls.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/include/asm/ioctls.h     Wed May 06 16:56:06 2009 +0100
 @@ -84,6 +84,7 @@
  #define TCSETSF2      _IOW('T', 45, struct termios2)
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -59815,10 +59800,10 @@ diff -purN linux-2.6.27/arch/sh/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/sh
  
  #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */
  #define TIOCSERGWILD  _IOR('T', 84,  int) /* 0x5454 */
-diff -purN linux-2.6.27/arch/sh/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/sh/include/asm/spinlock.h
---- linux-2.6.27/arch/sh/include/asm/spinlock.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/include/asm/spinlock.h 2009-03-25 16:10:50.000000000 +0000
-@@ -216,6 +216,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 arch/sh/include/asm/spinlock.h
+--- a/arch/sh/include/asm/spinlock.h   Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/include/asm/spinlock.h   Wed May 06 16:56:07 2009 +0100
+@@ -216,6 +216,9 @@
        return (oldval > (RW_LOCK_BIAS - 1));
  }
  
@@ -59828,9 +59813,9 @@ diff -purN linux-2.6.27/arch/sh/include/asm/spinlock.h linux-2.6.27.19-5.1/arch/
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/arch/sh/kernel/sys_sh32.c linux-2.6.27.19-5.1/arch/sh/kernel/sys_sh32.c
---- linux-2.6.27/arch/sh/kernel/sys_sh32.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/sys_sh32.c      2009-03-25 16:10:49.000000000 +0000
+diff -r 9608d5473017 arch/sh/kernel/sys_sh32.c
+--- a/arch/sh/kernel/sys_sh32.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/sys_sh32.c        Wed May 06 16:56:07 2009 +0100
 @@ -21,7 +21,7 @@
   * sys_pipe() is the normal C calling standard for creating
   * a pipe. It's not the way Unix traditionally does this, though.
@@ -59840,10 +59825,10 @@ diff -purN linux-2.6.27/arch/sh/kernel/sys_sh32.c linux-2.6.27.19-5.1/arch/sh/ke
        unsigned long r6, unsigned long r7,
        struct pt_regs __regs)
  {
-diff -purN linux-2.6.27/arch/sh/kernel/syscalls_32.S linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_32.S
---- linux-2.6.27/arch/sh/kernel/syscalls_32.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_32.S   2009-03-25 16:10:49.000000000 +0000
-@@ -58,7 +58,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/sh/kernel/syscalls_32.S
+--- a/arch/sh/kernel/syscalls_32.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/syscalls_32.S     Wed May 06 16:56:07 2009 +0100
+@@ -58,7 +58,7 @@
        .long sys_mkdir
        .long sys_rmdir         /* 40 */
        .long sys_dup
@@ -59852,7 +59837,7 @@ diff -purN linux-2.6.27/arch/sh/kernel/syscalls_32.S linux-2.6.27.19-5.1/arch/sh
        .long sys_times
        .long sys_ni_syscall    /* old prof syscall holder */
        .long sys_brk           /* 45 */
-@@ -105,7 +105,7 @@ ENTRY(sys_call_table)
+@@ -105,7 +105,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -59861,10 +59846,10 @@ diff -purN linux-2.6.27/arch/sh/kernel/syscalls_32.S linux-2.6.27.19-5.1/arch/sh
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/sh/kernel/syscalls_64.S linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_64.S
---- linux-2.6.27/arch/sh/kernel/syscalls_64.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sh/kernel/syscalls_64.S   2009-03-25 16:10:50.000000000 +0000
-@@ -109,7 +109,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/sh/kernel/syscalls_64.S
+--- a/arch/sh/kernel/syscalls_64.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sh/kernel/syscalls_64.S     Wed May 06 16:56:07 2009 +0100
+@@ -109,7 +109,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -59873,22 +59858,22 @@ diff -purN linux-2.6.27/arch/sh/kernel/syscalls_64.S linux-2.6.27.19-5.1/arch/sh
        .long old_mmap                  /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/sparc/Kconfig linux-2.6.27.19-5.1/arch/sparc/Kconfig
---- linux-2.6.27/arch/sparc/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/Kconfig     2009-03-25 16:10:44.000000000 +0000
-@@ -32,6 +32,8 @@ config HZ
+diff -r 9608d5473017 arch/sparc/Kconfig
+--- a/arch/sparc/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/Kconfig       Wed May 06 16:56:07 2009 +0100
+@@ -31,6 +31,8 @@
+       default 100
  
  source "init/Kconfig"
-+source "kernel/Kconfig.freezer"
 +
++source "kernel/Kconfig.freezer"
  menu "General machine setup"
  
- config SMP
-diff -purN linux-2.6.27/arch/sparc/include/asm/hypervisor.h linux-2.6.27.19-5.1/arch/sparc/include/asm/hypervisor.h
---- linux-2.6.27/arch/sparc/include/asm/hypervisor.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/hypervisor.h    2009-03-25 16:10:45.000000000 +0000
-@@ -2713,6 +2713,30 @@ extern unsigned long sun4v_ldc_revoke(un
+diff -r 9608d5473017 arch/sparc/include/asm/hypervisor.h
+--- a/arch/sparc/include/asm/hypervisor.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/hypervisor.h      Wed May 06 16:56:07 2009 +0100
+@@ -2713,6 +2713,30 @@
   */
  #define HV_FAST_SET_PERFREG           0x101
  
@@ -59919,9 +59904,9 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/hypervisor.h linux-2.6.27.19-5.1/
  /* MMU statistics services.
   *
   * The hypervisor maintains MMU statistics and privileged code provides
-diff -purN linux-2.6.27/arch/sparc/include/asm/ioctls.h linux-2.6.27.19-5.1/arch/sparc/include/asm/ioctls.h
---- linux-2.6.27/arch/sparc/include/asm/ioctls.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/ioctls.h        2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/ioctls.h
+--- a/arch/sparc/include/asm/ioctls.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/ioctls.h  Wed May 06 16:56:07 2009 +0100
 @@ -19,6 +19,7 @@
  #define TCSETS2               _IOW('T', 13, struct termios2)
  #define TCSETSW2      _IOW('T', 14, struct termios2)
@@ -59930,10 +59915,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/ioctls.h linux-2.6.27.19-5.1/arch
  
  /* Note that all the ioctls that are not available in Linux have a 
   * double underscore on the front to: a) avoid some programs to
-diff -purN linux-2.6.27/arch/sparc/include/asm/irq_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/irq_64.h
---- linux-2.6.27/arch/sparc/include/asm/irq_64.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/irq_64.h        2009-03-25 16:10:45.000000000 +0000
-@@ -67,6 +67,9 @@ extern void virt_irq_free(unsigned int v
+diff -r 9608d5473017 arch/sparc/include/asm/irq_64.h
+--- a/arch/sparc/include/asm/irq_64.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/irq_64.h  Wed May 06 16:56:07 2009 +0100
+@@ -67,6 +67,9 @@
  extern void __init init_IRQ(void);
  extern void fixup_irqs(void);
  
@@ -59943,10 +59928,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/irq_64.h linux-2.6.27.19-5.1/arch
  static inline void set_softint(unsigned long bits)
  {
        __asm__ __volatile__("wr        %0, 0x0, %%set_softint"
-diff -purN linux-2.6.27/arch/sparc/include/asm/parport.h linux-2.6.27.19-5.1/arch/sparc/include/asm/parport.h
---- linux-2.6.27/arch/sparc/include/asm/parport.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/parport.h       2009-03-25 16:10:45.000000000 +0000
-@@ -231,6 +231,7 @@ static struct of_device_id ecpp_match[] 
+diff -r 9608d5473017 arch/sparc/include/asm/parport.h
+--- a/arch/sparc/include/asm/parport.h Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/parport.h Wed May 06 16:56:07 2009 +0100
+@@ -231,6 +231,7 @@
  };
  
  static struct of_platform_driver ecpp_driver = {
@@ -59954,9 +59939,9 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/parport.h linux-2.6.27.19-5.1/arc
        .name                   = "ecpp",
        .match_table            = ecpp_match,
        .probe                  = ecpp_probe,
-diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon.h linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon.h       2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/perfmon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc/include/asm/perfmon.h Wed May 06 16:56:07 2009 +0100
 @@ -0,0 +1,11 @@
 +#ifndef _SPARC64_PERFMON_H_
 +#define _SPARC64_PERFMON_H_
@@ -59969,9 +59954,9 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon.h linux-2.6.27.19-5.1/arc
 +#define PFM_ARCH_MAX_PMDS     3
 +
 +#endif /* _SPARC64_PERFMON_H_ */
-diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon_kern.h linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/perfmon_kern.h  2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc/include/asm/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc/include/asm/perfmon_kern.h    Wed May 06 16:56:07 2009 +0100
 @@ -0,0 +1,281 @@
 +#ifndef _SPARC64_PERFMON_KERN_H_
 +#define _SPARC64_PERFMON_KERN_H_
@@ -60254,10 +60239,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/perfmon_kern.h linux-2.6.27.19-5.
 +#endif /* __KERNEL__ */
 +
 +#endif /* _SPARC64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_32.h linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_32.h
---- linux-2.6.27/arch/sparc/include/asm/spinlock_32.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_32.h   2009-03-25 16:10:45.000000000 +0000
-@@ -179,6 +179,8 @@ static inline int __read_trylock(raw_rwl
+diff -r 9608d5473017 arch/sparc/include/asm/spinlock_32.h
+--- a/arch/sparc/include/asm/spinlock_32.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/spinlock_32.h     Wed May 06 16:56:07 2009 +0100
+@@ -179,6 +179,8 @@
  #define __raw_write_unlock(rw)        do { (rw)->lock = 0; } while(0)
  
  #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
@@ -60266,10 +60251,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_32.h linux-2.6.27.19-5.1
  
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_64.h
---- linux-2.6.27/arch/sparc/include/asm/spinlock_64.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/spinlock_64.h   2009-03-25 16:10:45.000000000 +0000
-@@ -232,9 +232,11 @@ static int inline __write_trylock(raw_rw
+diff -r 9608d5473017 arch/sparc/include/asm/spinlock_64.h
+--- a/arch/sparc/include/asm/spinlock_64.h     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/spinlock_64.h     Wed May 06 16:56:08 2009 +0100
+@@ -232,9 +232,11 @@
  }
  
  #define __raw_read_lock(p)    __read_lock(p)
@@ -60281,10 +60266,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/spinlock_64.h linux-2.6.27.19-5.1
  #define __raw_write_unlock(p) __write_unlock(p)
  #define __raw_write_trylock(p)        __write_trylock(p)
  
-diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/system_64.h
---- linux-2.6.27/arch/sparc/include/asm/system_64.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/system_64.h     2009-03-25 16:10:45.000000000 +0000
-@@ -30,6 +30,9 @@ enum sparc_cpu {
+diff -r 9608d5473017 arch/sparc/include/asm/system_64.h
+--- a/arch/sparc/include/asm/system_64.h       Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/system_64.h       Wed May 06 16:56:08 2009 +0100
+@@ -30,6 +30,9 @@
  #define ARCH_SUN4C_SUN4 0
  #define ARCH_SUN4 0
  
@@ -60294,7 +60279,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/a
  extern char reboot_command[];
  
  /* These are here in an effort to more fully work around Spitfire Errata
-@@ -104,15 +107,13 @@ do {     __asm__ __volatile__("ba,pt     %%xcc, 
+@@ -104,15 +107,13 @@
  #define write_pcr(__p) __asm__ __volatile__("wr       %0, 0x0, %%pcr" : : "r" (__p))
  #define read_pic(__p)  __asm__ __volatile__("rd %%pic, %0" : "=r" (__p))
  
@@ -60316,7 +60301,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/a
  
  #ifndef __ASSEMBLY__
  
-@@ -145,14 +146,10 @@ do {                                             \
+@@ -145,14 +146,10 @@
         * and 2 stores in this critical code path.  -DaveM
         */
  #define switch_to(prev, next, last)                                   \
@@ -60335,7 +60320,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/a
        flush_tlb_pending();                                            \
        save_and_clear_fpu();                                           \
        /* If you are tempted to conditionalize the following */        \
-@@ -197,11 +194,6 @@ do {      if (test_thread_flag(TIF_PERFCTR)) 
+@@ -197,11 +194,6 @@
                "l1", "l2", "l3", "l4", "l5", "l6", "l7",               \
          "i0", "i1", "i2", "i3", "i4", "i5",                           \
          "o0", "o1", "o2", "o3", "o4", "o5",       "o7");              \
@@ -60347,10 +60332,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/system_64.h linux-2.6.27.19-5.1/a
  } while(0)
  
  static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val)
-diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_32.h linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_32.h
---- linux-2.6.27/arch/sparc/include/asm/thread_info_32.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_32.h        2009-03-25 16:10:45.000000000 +0000
-@@ -139,6 +139,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, 
+diff -r 9608d5473017 arch/sparc/include/asm/thread_info_32.h
+--- a/arch/sparc/include/asm/thread_info_32.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/thread_info_32.h  Wed May 06 16:56:08 2009 +0100
+@@ -139,6 +139,7 @@
  #define TIF_POLLING_NRFLAG    9       /* true if poll_idle() is polling
                                         * TIF_NEED_RESCHED */
  #define TIF_MEMDIE            10
@@ -60358,7 +60343,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_32.h linux-2.6.27.19-
  
  /* as above, but as bit values */
  #define _TIF_SYSCALL_TRACE    (1<<TIF_SYSCALL_TRACE)
-@@ -152,6 +153,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, 
+@@ -152,6 +153,7 @@
  #define _TIF_DO_NOTIFY_RESUME_MASK    (_TIF_NOTIFY_RESUME | \
                                         _TIF_SIGPENDING | \
                                         _TIF_RESTORE_SIGMASK)
@@ -60366,10 +60351,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_32.h linux-2.6.27.19-
  
  #endif /* __KERNEL__ */
  
-diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_64.h
---- linux-2.6.27/arch/sparc/include/asm/thread_info_64.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/thread_info_64.h        2009-03-25 16:10:45.000000000 +0000
-@@ -58,11 +58,6 @@ struct thread_info {
+diff -r 9608d5473017 arch/sparc/include/asm/thread_info_64.h
+--- a/arch/sparc/include/asm/thread_info_64.h  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/thread_info_64.h  Wed May 06 16:56:08 2009 +0100
+@@ -58,11 +58,6 @@
        unsigned long           gsr[7];
        unsigned long           xfsr[7];
  
@@ -60381,7 +60366,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-
        struct restart_block    restart_block;
  
        struct pt_regs          *kern_una_regs;
-@@ -96,15 +91,10 @@ struct thread_info {
+@@ -96,15 +91,10 @@
  #define TI_RWIN_SPTRS 0x000003c8
  #define TI_GSR                0x00000400
  #define TI_XFSR               0x00000438
@@ -60401,7 +60386,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-
  
  /* We embed this in the uppermost byte of thread_info->flags */
  #define FAULT_CODE_WRITE      0x01    /* Write access, implies D-TLB     */
-@@ -222,11 +212,11 @@ register struct thread_info *current_thr
+@@ -222,11 +212,11 @@
  #define TIF_NOTIFY_RESUME     1       /* callback before returning to user */
  #define TIF_SIGPENDING                2       /* signal pending */
  #define TIF_NEED_RESCHED      3       /* rescheduling necessary */
@@ -60415,7 +60400,7 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-
  #define TIF_SECCOMP           9       /* secure computing */
  #define TIF_SYSCALL_AUDIT     10      /* syscall auditing active */
  /* flag bit 11 is available */
-@@ -237,22 +227,24 @@ register struct thread_info *current_thr
+@@ -237,22 +227,24 @@
  #define TIF_ABI_PENDING               12
  #define TIF_MEMDIE            13
  #define TIF_POLLING_NRFLAG    14
@@ -60442,10 +60427,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/thread_info_64.h linux-2.6.27.19-
  #define _TIF_DO_NOTIFY_RESUME_MASK    (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING)
  
  /*
-diff -purN linux-2.6.27/arch/sparc/include/asm/uaccess_64.h linux-2.6.27.19-5.1/arch/sparc/include/asm/uaccess_64.h
---- linux-2.6.27/arch/sparc/include/asm/uaccess_64.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/include/asm/uaccess_64.h    2009-03-25 16:10:45.000000000 +0000
-@@ -265,8 +265,8 @@ extern long __strnlen_user(const char __
+diff -r 9608d5473017 arch/sparc/include/asm/uaccess_64.h
+--- a/arch/sparc/include/asm/uaccess_64.h      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/include/asm/uaccess_64.h      Wed May 06 16:56:08 2009 +0100
+@@ -265,8 +265,8 @@
  
  #define strlen_user __strlen_user
  #define strnlen_user __strnlen_user
@@ -60456,10 +60441,10 @@ diff -purN linux-2.6.27/arch/sparc/include/asm/uaccess_64.h linux-2.6.27.19-5.1/
  
  #endif  /* __ASSEMBLY__ */
  
-diff -purN linux-2.6.27/arch/sparc/kernel/entry.S linux-2.6.27.19-5.1/arch/sparc/kernel/entry.S
---- linux-2.6.27/arch/sparc/kernel/entry.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/entry.S      2009-03-25 16:10:44.000000000 +0000
-@@ -1142,8 +1142,8 @@ sunos_execv:
+diff -r 9608d5473017 arch/sparc/kernel/entry.S
+--- a/arch/sparc/kernel/entry.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/entry.S        Wed May 06 16:56:08 2009 +0100
+@@ -1142,8 +1142,8 @@
         ld     [%sp + STACKFRAME_SZ + PT_I0], %o0
  
        .align  4
@@ -60470,10 +60455,10 @@ diff -purN linux-2.6.27/arch/sparc/kernel/entry.S linux-2.6.27.19-5.1/arch/sparc
        mov     %o7, %l5
        add     %sp, STACKFRAME_SZ, %o0         ! pt_regs *regs arg
        call    sparc_pipe
-diff -purN linux-2.6.27/arch/sparc/kernel/systbls.S linux-2.6.27.19-5.1/arch/sparc/kernel/systbls.S
---- linux-2.6.27/arch/sparc/kernel/systbls.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/systbls.S    2009-03-25 16:10:44.000000000 +0000
-@@ -24,7 +24,7 @@ sys_call_table:
+diff -r 9608d5473017 arch/sparc/kernel/systbls.S
+--- a/arch/sparc/kernel/systbls.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/systbls.S      Wed May 06 16:56:08 2009 +0100
+@@ -24,7 +24,7 @@
  /*25*/        .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause
  /*30*/        .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
  /*35*/        .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile
@@ -60482,7 +60467,7 @@ diff -purN linux-2.6.27/arch/sparc/kernel/systbls.S linux-2.6.27.19-5.1/arch/spa
  /*45*/        .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16
  /*50*/        .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl
  /*55*/        .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve
-@@ -56,7 +56,7 @@ sys_call_table:
+@@ -56,7 +56,7 @@
  /*185*/       .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname
  /*190*/       .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl
  /*195*/       .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sparc_sigaction, sys_sgetmask
@@ -60491,10 +60476,10 @@ diff -purN linux-2.6.27/arch/sparc/kernel/systbls.S linux-2.6.27.19-5.1/arch/spa
  /*205*/       .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
  /*210*/       .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo
  /*215*/       .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex
-diff -purN linux-2.6.27/arch/sparc/kernel/time.c linux-2.6.27.19-5.1/arch/sparc/kernel/time.c
---- linux-2.6.27/arch/sparc/kernel/time.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc/kernel/time.c       2009-03-25 16:10:44.000000000 +0000
-@@ -345,6 +345,7 @@ static struct of_device_id clock_match[]
+diff -r 9608d5473017 arch/sparc/kernel/time.c
+--- a/arch/sparc/kernel/time.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc/kernel/time.c Wed May 06 16:56:08 2009 +0100
+@@ -345,6 +345,7 @@
  };
  
  static struct of_platform_driver clock_driver = {
@@ -60502,10 +60487,10 @@ diff -purN linux-2.6.27/arch/sparc/kernel/time.c linux-2.6.27.19-5.1/arch/sparc/
        .match_table    = clock_match,
        .probe          = clock_probe,
        .driver         = {
-diff -purN linux-2.6.27/arch/sparc64/Kconfig linux-2.6.27.19-5.1/arch/sparc64/Kconfig
---- linux-2.6.27/arch/sparc64/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/Kconfig   2009-03-25 16:10:45.000000000 +0000
-@@ -15,6 +15,7 @@ config SPARC64
+diff -r 9608d5473017 arch/sparc64/Kconfig
+--- a/arch/sparc64/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/Kconfig     Wed May 06 16:56:08 2009 +0100
+@@ -15,6 +15,7 @@
        select HAVE_FTRACE
        select HAVE_IDE
        select HAVE_LMB
@@ -60513,7 +60498,7 @@ diff -purN linux-2.6.27/arch/sparc64/Kconfig linux-2.6.27.19-5.1/arch/sparc64/Kc
        select HAVE_ARCH_KGDB
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_ARCH_TRACEHOOK
-@@ -84,6 +85,7 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
+@@ -84,6 +85,7 @@
        def_bool y
  
  source "init/Kconfig"
@@ -60521,7 +60506,7 @@ diff -purN linux-2.6.27/arch/sparc64/Kconfig linux-2.6.27.19-5.1/arch/sparc64/Kc
  
  menu "Processor type and features"
  
-@@ -401,6 +403,8 @@ source "drivers/sbus/char/Kconfig"
+@@ -401,6 +403,8 @@
  
  source "fs/Kconfig"
  
@@ -60530,10 +60515,10 @@ diff -purN linux-2.6.27/arch/sparc64/Kconfig linux-2.6.27.19-5.1/arch/sparc64/Kc
  source "arch/sparc64/Kconfig.debug"
  
  source "security/Kconfig"
-diff -purN linux-2.6.27/arch/sparc64/Makefile linux-2.6.27.19-5.1/arch/sparc64/Makefile
---- linux-2.6.27/arch/sparc64/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/Makefile  2009-03-25 16:10:45.000000000 +0000
-@@ -32,6 +32,8 @@ core-y                               += arch/sparc64/math-emu/
+diff -r 9608d5473017 arch/sparc64/Makefile
+--- a/arch/sparc64/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/Makefile    Wed May 06 16:56:08 2009 +0100
+@@ -32,6 +32,8 @@
  libs-y                                += arch/sparc64/prom/ arch/sparc64/lib/
  drivers-$(CONFIG_OPROFILE)    += arch/sparc64/oprofile/
  
@@ -60542,10 +60527,10 @@ diff -purN linux-2.6.27/arch/sparc64/Makefile linux-2.6.27.19-5.1/arch/sparc64/M
  boot := arch/sparc64/boot
  
  image tftpboot.img vmlinux.aout: vmlinux
-diff -purN linux-2.6.27/arch/sparc64/kernel/auxio.c linux-2.6.27.19-5.1/arch/sparc64/kernel/auxio.c
---- linux-2.6.27/arch/sparc64/kernel/auxio.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/auxio.c    2009-03-25 16:10:45.000000000 +0000
-@@ -148,6 +148,7 @@ static int __devinit auxio_probe(struct 
+diff -r 9608d5473017 arch/sparc64/kernel/auxio.c
+--- a/arch/sparc64/kernel/auxio.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/auxio.c      Wed May 06 16:56:08 2009 +0100
+@@ -148,6 +148,7 @@
  }
  
  static struct of_platform_driver auxio_driver = {
@@ -60553,9 +60538,9 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/auxio.c linux-2.6.27.19-5.1/arch/spa
        .match_table    = auxio_match,
        .probe          = auxio_probe,
        .driver         = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc64/kernel/cpu.c
---- linux-2.6.27/arch/sparc64/kernel/cpu.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/cpu.c      2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/cpu.c
+--- a/arch/sparc64/kernel/cpu.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/cpu.c        Wed May 06 16:56:08 2009 +0100
 @@ -20,16 +20,17 @@
  DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
  
@@ -60581,7 +60566,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
  };
  
  static struct cpu_fp_info linux_sparc_fpu[] = {
-@@ -49,23 +50,24 @@ static struct cpu_fp_info linux_sparc_fp
+@@ -49,23 +50,24 @@
  #define NSPARCFPU  ARRAY_SIZE(linux_sparc_fpu)
  
  static struct cpu_iu_info linux_sparc_chips[] = {
@@ -60618,7 +60603,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
  
  static void __init sun4v_cpu_probe(void)
  {
-@@ -73,11 +75,13 @@ static void __init sun4v_cpu_probe(void)
+@@ -73,11 +75,13 @@
        case SUN4V_CHIP_NIAGARA1:
                sparc_cpu_type = "UltraSparc T1 (Niagara)";
                sparc_fpu_type = "UltraSparc T1 integrated FPU";
@@ -60632,7 +60617,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
                break;
  
        default:
-@@ -85,6 +89,7 @@ static void __init sun4v_cpu_probe(void)
+@@ -85,6 +89,7 @@
                       prom_cpu_compatible);
                sparc_cpu_type = "Unknown SUN4V CPU";
                sparc_fpu_type = "Unknown SUN4V FPU";
@@ -60640,7 +60625,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
                break;
        }
  }
-@@ -117,6 +122,8 @@ retry:
+@@ -117,6 +122,8 @@
                        if (linux_sparc_chips[i].impl == impl) {
                                sparc_cpu_type =
                                        linux_sparc_chips[i].cpu_name;
@@ -60649,7 +60634,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
                                break;
                        }
                }
-@@ -134,7 +141,7 @@ retry:
+@@ -134,7 +141,7 @@
                        printk("DEBUG: manuf[%lx] impl[%lx]\n",
                               manuf, impl);
                }
@@ -60658,10 +60643,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/cpu.c linux-2.6.27.19-5.1/arch/sparc
        }
  
        for (i = 0; i < NSPARCFPU; i++) {
-diff -purN linux-2.6.27/arch/sparc64/kernel/hvcalls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/hvcalls.S
---- linux-2.6.27/arch/sparc64/kernel/hvcalls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/hvcalls.S  2009-03-25 16:10:45.000000000 +0000
-@@ -884,3 +884,44 @@ sun4v_mmu_demap_all:
+diff -r 9608d5473017 arch/sparc64/kernel/hvcalls.S
+--- a/arch/sparc64/kernel/hvcalls.S    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/hvcalls.S    Wed May 06 16:56:08 2009 +0100
+@@ -884,3 +884,44 @@
        retl
         nop
        .size   sun4v_mmu_demap_all, .-sun4v_mmu_demap_all
@@ -60706,10 +60691,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/hvcalls.S linux-2.6.27.19-5.1/arch/s
 +       nop
 +      .size   sun4v_niagara2_setperf, .-sun4v_niagara2_setperf
 +
-diff -purN linux-2.6.27/arch/sparc64/kernel/irq.c linux-2.6.27.19-5.1/arch/sparc64/kernel/irq.c
---- linux-2.6.27/arch/sparc64/kernel/irq.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/irq.c      2009-03-25 16:10:45.000000000 +0000
-@@ -749,6 +749,20 @@ void handler_irq(int irq, struct pt_regs
+diff -r 9608d5473017 arch/sparc64/kernel/irq.c
+--- a/arch/sparc64/kernel/irq.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/irq.c        Wed May 06 16:56:08 2009 +0100
+@@ -749,6 +749,20 @@
        irq_exit();
        set_irq_regs(old_regs);
  }
@@ -60730,10 +60715,11 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/irq.c linux-2.6.27.19-5.1/arch/sparc
  
  void do_softirq(void)
  {
-@@ -776,6 +790,55 @@ void do_softirq(void)
+@@ -775,6 +789,55 @@
        local_irq_restore(flags);
  }
++
 +/* Almost a direct copy of the powerpc PMC code.  */
 +static DEFINE_SPINLOCK(perf_irq_lock);
 +static void *perf_irq_owner_caller; /* mostly for debugging */
@@ -60782,14 +60768,13 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/irq.c linux-2.6.27.19-5.1/arch/sparc
 +}
 +EXPORT_SYMBOL_GPL(release_perfctr_intr);
 +
-+
  #ifdef CONFIG_HOTPLUG_CPU
  void fixup_irqs(void)
- {
-diff -purN linux-2.6.27/arch/sparc64/kernel/pci.c linux-2.6.27.19-5.1/arch/sparc64/kernel/pci.c
---- linux-2.6.27/arch/sparc64/kernel/pci.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/pci.c      2009-03-25 16:10:45.000000000 +0000
-@@ -1017,6 +1017,7 @@ static int __pci_mmap_make_offset(struct
+diff -r 9608d5473017 arch/sparc64/kernel/pci.c
+--- a/arch/sparc64/kernel/pci.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/pci.c        Wed May 06 16:56:08 2009 +0100
+@@ -1017,6 +1017,7 @@
  
        for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
                struct resource *rp = &pdev->resource[i];
@@ -60797,7 +60782,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/pci.c linux-2.6.27.19-5.1/arch/sparc
  
                /* Active? */
                if (!rp->flags)
-@@ -1034,8 +1035,15 @@ static int __pci_mmap_make_offset(struct
+@@ -1034,8 +1035,15 @@
                                continue;
                }
  
@@ -60814,10 +60799,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/pci.c linux-2.6.27.19-5.1/arch/sparc
                        break;
        }
  
-diff -purN linux-2.6.27/arch/sparc64/kernel/power.c linux-2.6.27.19-5.1/arch/sparc64/kernel/power.c
---- linux-2.6.27/arch/sparc64/kernel/power.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/power.c    2009-03-25 16:10:45.000000000 +0000
-@@ -104,6 +104,7 @@ static struct of_device_id power_match[]
+diff -r 9608d5473017 arch/sparc64/kernel/power.c
+--- a/arch/sparc64/kernel/power.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/power.c      Wed May 06 16:56:08 2009 +0100
+@@ -104,6 +104,7 @@
  };
  
  static struct of_platform_driver power_driver = {
@@ -60825,9 +60810,9 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/power.c linux-2.6.27.19-5.1/arch/spa
        .match_table    = power_match,
        .probe          = power_probe,
        .driver         = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/process.c linux-2.6.27.19-5.1/arch/sparc64/kernel/process.c
---- linux-2.6.27/arch/sparc64/kernel/process.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/process.c  2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/process.c
+--- a/arch/sparc64/kernel/process.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/process.c    Wed May 06 16:56:08 2009 +0100
 @@ -30,6 +30,7 @@
  #include <linux/cpu.h>
  #include <linux/elfcore.h>
@@ -60836,7 +60821,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/process.c linux-2.6.27.19-5.1/arch/s
  
  #include <asm/oplib.h>
  #include <asm/uaccess.h>
-@@ -385,11 +386,7 @@ void exit_thread(void)
+@@ -385,11 +386,7 @@
                        t->utraps[0]--;
        }
  
@@ -60849,21 +60834,21 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/process.c linux-2.6.27.19-5.1/arch/s
  }
  
  void flush_thread(void)
-@@ -411,13 +408,6 @@ void flush_thread(void)
+@@ -410,13 +407,6 @@
+               tsb_context_switch(mm);
  
        set_thread_wsaved(0);
+-
 -      /* Turn off performance counters if on. */
 -      if (test_and_clear_thread_flag(TIF_PERFCTR)) {
 -              t->user_cntd0 = t->user_cntd1 = NULL;
 -              t->pcr_reg = 0;
 -              write_pcr(0);
 -      }
--
        /* Clear FPU register state. */
        t->fpsaved[0] = 0;
-       
-@@ -631,16 +621,6 @@ int copy_thread(int nr, unsigned long cl
+@@ -631,16 +621,6 @@
                t->kregs->u_regs[UREG_FP] =
                  ((unsigned long) child_sf) - STACK_BIAS;
  
@@ -60880,19 +60865,19 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/process.c linux-2.6.27.19-5.1/arch/s
                t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
                t->kregs->u_regs[UREG_G6] = (unsigned long) t;
                t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
-@@ -673,6 +653,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -672,6 +652,8 @@
        if (clone_flags & CLONE_SETTLS)
                t->kregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3];
-+      pfm_copy_thread(p);
 +
++      pfm_copy_thread(p);
        return 0;
  }
-diff -purN linux-2.6.27/arch/sparc64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/sparc64/kernel/ptrace.c
---- linux-2.6.27/arch/sparc64/kernel/ptrace.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/ptrace.c   2009-03-25 16:10:45.000000000 +0000
-@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *chi
+diff -r 9608d5473017 arch/sparc64/kernel/ptrace.c
+--- a/arch/sparc64/kernel/ptrace.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/ptrace.c     Wed May 06 16:56:08 2009 +0100
+@@ -1014,7 +1014,7 @@
                break;
  
        case PTRACE_SETFPREGS64:
@@ -60901,10 +60886,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/ptrace.c linux-2.6.27.19-5.1/arch/sp
                                          0 * sizeof(u64),
                                          33 * sizeof(u64),
                                          fps);
-diff -purN linux-2.6.27/arch/sparc64/kernel/rtrap.S linux-2.6.27.19-5.1/arch/sparc64/kernel/rtrap.S
---- linux-2.6.27/arch/sparc64/kernel/rtrap.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/rtrap.S    2009-03-25 16:10:45.000000000 +0000
-@@ -65,55 +65,14 @@ __handle_user_windows:
+diff -r 9608d5473017 arch/sparc64/kernel/rtrap.S
+--- a/arch/sparc64/kernel/rtrap.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/rtrap.S      Wed May 06 16:56:08 2009 +0100
+@@ -65,55 +65,14 @@
                ba,pt                   %xcc, __handle_user_windows_continue
  
                 andn                   %l1, %l4, %l1
@@ -60962,7 +60947,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/rtrap.S linux-2.6.27.19-5.1/arch/spa
  
  __handle_signal:
                mov                     %l5, %o1
-@@ -202,12 +161,8 @@ __handle_signal_continue:
+@@ -202,12 +161,8 @@
                brnz,pn                 %o2, __handle_user_windows
                 nop
  __handle_user_windows_continue:
@@ -60976,10 +60961,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/rtrap.S linux-2.6.27.19-5.1/arch/spa
  
                /* This fpdepth clear is necessary for non-syscall rtraps only */
  user_nowork:
-diff -purN linux-2.6.27/arch/sparc64/kernel/setup.c linux-2.6.27.19-5.1/arch/sparc64/kernel/setup.c
---- linux-2.6.27/arch/sparc64/kernel/setup.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/setup.c    2009-03-25 16:10:45.000000000 +0000
-@@ -352,6 +352,7 @@ static int show_cpuinfo(struct seq_file 
+diff -r 9608d5473017 arch/sparc64/kernel/setup.c
+--- a/arch/sparc64/kernel/setup.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/setup.c      Wed May 06 16:56:08 2009 +0100
+@@ -352,6 +352,7 @@
        seq_printf(m, 
                   "cpu\t\t: %s\n"
                   "fpu\t\t: %s\n"
@@ -60987,7 +60972,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/setup.c linux-2.6.27.19-5.1/arch/spa
                   "prom\t\t: %s\n"
                   "type\t\t: %s\n"
                   "ncpus probed\t: %d\n"
-@@ -364,6 +365,7 @@ static int show_cpuinfo(struct seq_file 
+@@ -364,6 +365,7 @@
                   ,
                   sparc_cpu_type,
                   sparc_fpu_type,
@@ -60995,9 +60980,9 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/setup.c linux-2.6.27.19-5.1/arch/spa
                   prom_version,
                   ((tlb_type == hypervisor) ?
                    "sun4v" :
-diff -purN linux-2.6.27/arch/sparc64/kernel/signal.c linux-2.6.27.19-5.1/arch/sparc64/kernel/signal.c
---- linux-2.6.27/arch/sparc64/kernel/signal.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/signal.c   2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/signal.c
+--- a/arch/sparc64/kernel/signal.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/signal.c     Wed May 06 16:56:08 2009 +0100
 @@ -23,6 +23,7 @@
  #include <linux/tty.h>
  #include <linux/binfmts.h>
@@ -61006,7 +60991,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/signal.c linux-2.6.27.19-5.1/arch/sp
  
  #include <asm/uaccess.h>
  #include <asm/ptrace.h>
-@@ -608,6 +609,9 @@ static void do_signal(struct pt_regs *re
+@@ -608,6 +609,9 @@
  
  void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
  {
@@ -61016,9 +61001,9 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/signal.c linux-2.6.27.19-5.1/arch/sp
        if (thread_info_flags & _TIF_SIGPENDING)
                do_signal(regs, orig_i0);
        if (thread_info_flags & _TIF_NOTIFY_RESUME) {
-diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch/sparc64/kernel/sys_sparc.c
---- linux-2.6.27/arch/sparc64/kernel/sys_sparc.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/sys_sparc.c        2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/sys_sparc.c
+--- a/arch/sparc64/kernel/sys_sparc.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/sys_sparc.c  Wed May 06 16:56:08 2009 +0100
 @@ -26,7 +26,6 @@
  
  #include <asm/uaccess.h>
@@ -61027,7 +61012,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  #include <asm/unistd.h>
  
  #include "entry.h"
-@@ -397,7 +396,7 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -397,7 +396,7 @@
        }
  }
  
@@ -61036,7 +61021,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        /* People could try to be nasty and use ta 0x6d in 32bit programs */
        if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
-@@ -413,7 +412,7 @@ asmlinkage unsigned long sparc_brk(unsig
+@@ -413,7 +412,7 @@
   * sys_pipe() is the normal C calling standard for creating
   * a pipe. It's not the way unix traditionally does this, though.
   */
@@ -61045,7 +61030,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        int fd[2];
        int error;
-@@ -433,8 +432,8 @@ out:
+@@ -433,8 +432,8 @@
   * This is really horribly ugly.
   */
  
@@ -61056,7 +61041,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        long err;
  
-@@ -517,7 +516,7 @@ out:
+@@ -517,7 +516,7 @@
        return err;
  }
  
@@ -61065,7 +61050,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        int ret = sys_newuname(name);
        
-@@ -528,7 +527,7 @@ asmlinkage long sparc64_newuname(struct 
+@@ -528,7 +527,7 @@
        return ret;
  }
  
@@ -61074,7 +61059,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        int ret;
  
-@@ -562,9 +561,9 @@ int sparc_mmap_check(unsigned long addr,
+@@ -562,9 +561,9 @@
  }
  
  /* Linux version of mmap */
@@ -61087,7 +61072,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        struct file * file = NULL;
        unsigned long retval = -EBADF;
-@@ -587,7 +586,7 @@ out:
+@@ -587,7 +586,7 @@
        return retval;
  }
  
@@ -61096,7 +61081,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        long ret;
  
-@@ -604,9 +603,9 @@ extern unsigned long do_mremap(unsigned 
+@@ -604,9 +603,9 @@
        unsigned long old_len, unsigned long new_len,
        unsigned long flags, unsigned long new_addr);
                  
@@ -61109,7 +61094,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        unsigned long ret = -EINVAL;
  
-@@ -669,7 +668,7 @@ asmlinkage void sparc_breakpoint(struct 
+@@ -669,7 +668,7 @@
  
  extern void check_pending(int signum);
  
@@ -61118,7 +61103,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
          int nlen, err;
  
-@@ -692,11 +691,10 @@ out:
+@@ -692,11 +691,10 @@
        return err;
  }
  
@@ -61134,7 +61119,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
                return -EINVAL;
-@@ -762,11 +760,9 @@ asmlinkage long sparc_memory_ordering(un
+@@ -762,11 +760,9 @@
        return 0;
  }
  
@@ -61149,7 +61134,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  {
        struct k_sigaction new_ka, old_ka;
        int ret;
-@@ -791,106 +787,11 @@ asmlinkage long sys_rt_sigaction(int sig
+@@ -791,106 +787,11 @@
        return ret;
  }
  
@@ -61260,10 +61245,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/sys_sparc.c linux-2.6.27.19-5.1/arch
  }
  
  /*
-diff -purN linux-2.6.27/arch/sparc64/kernel/syscalls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/syscalls.S
---- linux-2.6.27/arch/sparc64/kernel/syscalls.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/syscalls.S 2009-03-25 16:10:45.000000000 +0000
-@@ -20,8 +20,8 @@ execve_merge:
+diff -r 9608d5473017 arch/sparc64/kernel/syscalls.S
+--- a/arch/sparc64/kernel/syscalls.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/syscalls.S   Wed May 06 16:56:08 2009 +0100
+@@ -20,8 +20,8 @@
         add    %sp, PTREGS_OFF, %o0
  
        .align  32
@@ -61274,7 +61259,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/syscalls.S linux-2.6.27.19-5.1/arch/
         add    %sp, PTREGS_OFF, %o0
  sys_nis_syscall:
        ba,pt   %xcc, c_sys_nis_syscall
-@@ -117,26 +117,9 @@ ret_from_syscall:
+@@ -117,26 +117,9 @@
        stb     %g0, [%g6 + TI_NEW_CHILD]
        ldx     [%g6 + TI_FLAGS], %l0
        call    schedule_tail
@@ -61304,10 +61289,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/syscalls.S linux-2.6.27.19-5.1/arch/
  
        .globl  sparc_exit
        .type   sparc_exit,#function
-diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.S
---- linux-2.6.27/arch/sparc64/kernel/systbls.S 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.S  2009-03-25 16:10:45.000000000 +0000
-@@ -21,12 +21,12 @@ sys_call_table32:
+diff -r 9608d5473017 arch/sparc64/kernel/systbls.S
+--- a/arch/sparc64/kernel/systbls.S    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/systbls.S    Wed May 06 16:56:08 2009 +0100
+@@ -21,12 +21,12 @@
  /*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
  /*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
  /*10*/  .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
@@ -61322,7 +61307,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/s
        .word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16
  /*50*/        .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
        .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve
-@@ -55,8 +55,8 @@ sys_call_table32:
+@@ -55,8 +55,8 @@
  /*170*/       .word sys32_lsetxattr, sys32_fsetxattr, sys_getxattr, sys_lgetxattr, compat_sys_getdents
        .word sys_setsid, sys_fchdir, sys32_fgetxattr, sys_listxattr, sys_llistxattr
  /*180*/       .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall
@@ -61333,7 +61318,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/s
        .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask
  /*200*/       .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
        .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64
-@@ -95,18 +95,18 @@ sys_call_table:
+@@ -95,18 +95,18 @@
  /*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
  /*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link
  /*10*/  .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
@@ -61355,7 +61340,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/s
        .word sys_madvise, sys_vhangup, sys_nis_syscall, sys_mincore, sys_getgroups
  /*80*/        .word sys_setgroups, sys_getpgrp, sys_nis_syscall, sys_setitimer, sys_nis_syscall
        .word sys_swapon, sys_getitimer, sys_nis_syscall, sys_sethostname, sys_nis_syscall
-@@ -129,8 +129,8 @@ sys_call_table:
+@@ -129,8 +129,8 @@
  /*170*/       .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents
        .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
  /*180*/       .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall
@@ -61366,7 +61351,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/s
        .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask
  /*200*/       .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall
        .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64
-@@ -142,7 +142,7 @@ sys_call_table:
+@@ -142,7 +142,7 @@
        .word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
  /*240*/       .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
        .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
@@ -61375,10 +61360,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.S linux-2.6.27.19-5.1/arch/s
        .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
  /*260*/       .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
        .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy
-diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.h linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.h
---- linux-2.6.27/arch/sparc64/kernel/systbls.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/systbls.h  2009-03-25 16:10:45.000000000 +0000
-@@ -16,9 +16,6 @@ extern asmlinkage long sys_ipc(unsigned 
+diff -r 9608d5473017 arch/sparc64/kernel/systbls.h
+--- a/arch/sparc64/kernel/systbls.h    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/systbls.h    Wed May 06 16:56:08 2009 +0100
+@@ -16,9 +16,6 @@
                               void __user *ptr, long fifth);
  extern asmlinkage long sparc64_newuname(struct new_utsname __user *name);
  extern asmlinkage long sparc64_personality(unsigned long personality);
@@ -61388,10 +61373,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/systbls.h linux-2.6.27.19-5.1/arch/s
  extern asmlinkage long sys64_munmap(unsigned long addr, size_t len);
  extern asmlinkage unsigned long sys64_mremap(unsigned long addr,
                                             unsigned long old_len,
-diff -purN linux-2.6.27/arch/sparc64/kernel/time.c linux-2.6.27.19-5.1/arch/sparc64/kernel/time.c
---- linux-2.6.27/arch/sparc64/kernel/time.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/time.c     2009-03-25 16:10:45.000000000 +0000
-@@ -777,6 +777,7 @@ static struct of_device_id clock_match[]
+diff -r 9608d5473017 arch/sparc64/kernel/time.c
+--- a/arch/sparc64/kernel/time.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/time.c       Wed May 06 16:56:08 2009 +0100
+@@ -777,6 +777,7 @@
  };
  
  static struct of_platform_driver clock_driver = {
@@ -61399,10 +61384,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/time.c linux-2.6.27.19-5.1/arch/spar
        .match_table    = clock_match,
        .probe          = clock_probe,
        .driver         = {
-diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arch/sparc64/kernel/trampoline.S
---- linux-2.6.27/arch/sparc64/kernel/trampoline.S      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/trampoline.S       2009-03-25 16:10:45.000000000 +0000
-@@ -328,6 +328,12 @@ after_lock_tlb:
+diff -r 9608d5473017 arch/sparc64/kernel/trampoline.S
+--- a/arch/sparc64/kernel/trampoline.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/trampoline.S Wed May 06 16:56:08 2009 +0100
+@@ -328,6 +328,12 @@
  
        wrpr            %g0, 0, %wstate
  
@@ -61415,7 +61400,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arc
        /* As a hack, put &init_thread_union into %g6.
         * prom_world() loads from here to restore the %asi
         * register.
-@@ -337,7 +343,7 @@ after_lock_tlb:
+@@ -337,7 +343,7 @@
  
        sethi           %hi(is_sun4v), %o0
        lduw            [%o0 + %lo(is_sun4v)], %o0
@@ -61424,7 +61409,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arc
         nop
  
        TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
-@@ -369,10 +375,10 @@ after_lock_tlb:
+@@ -369,10 +375,10 @@
        call            %o1
         add            %sp, (2047 + 128), %o0
  
@@ -61437,7 +61422,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arc
        set             prom_set_trap_table_name, %g2
        stx             %g2, [%sp + 2047 + 128 + 0x00]
        mov             1, %g2
-@@ -386,7 +392,11 @@ after_lock_tlb:
+@@ -386,7 +392,11 @@
        call            %o1
         add            %sp, (2047 + 128), %o0
  
@@ -61450,10 +61435,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/trampoline.S linux-2.6.27.19-5.1/arc
        ldx             [%g6 + TI_TASK], %g4
  
        mov             1, %g5
-diff -purN linux-2.6.27/arch/sparc64/kernel/traps.c linux-2.6.27.19-5.1/arch/sparc64/kernel/traps.c
---- linux-2.6.27/arch/sparc64/kernel/traps.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/traps.c    2009-03-25 16:10:45.000000000 +0000
-@@ -2470,85 +2470,89 @@ extern void tsb_config_offsets_are_bolix
+diff -r 9608d5473017 arch/sparc64/kernel/traps.c
+--- a/arch/sparc64/kernel/traps.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/traps.c      Wed May 06 16:56:08 2009 +0100
+@@ -2470,85 +2470,89 @@
  /* Only invoked on boot processor. */
  void __init trap_init(void)
  {
@@ -61620,10 +61605,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/traps.c linux-2.6.27.19-5.1/arch/spa
  
        /* Attach to the address space of init_task.  On SMP we
         * do this in smp.c:smp_callin for other cpus.
-diff -purN linux-2.6.27/arch/sparc64/kernel/ttable.S linux-2.6.27.19-5.1/arch/sparc64/kernel/ttable.S
---- linux-2.6.27/arch/sparc64/kernel/ttable.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/ttable.S   2009-03-25 16:10:45.000000000 +0000
-@@ -66,7 +66,7 @@ tl0_irq6:    BTRAP(0x46)
+diff -r 9608d5473017 arch/sparc64/kernel/ttable.S
+--- a/arch/sparc64/kernel/ttable.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/ttable.S     Wed May 06 16:56:08 2009 +0100
+@@ -66,7 +66,7 @@
  tl0_irq7:     BTRAP(0x47) BTRAP(0x48) BTRAP(0x49)
  tl0_irq10:    BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d)
  tl0_irq14:    TRAP_IRQ(timer_interrupt, 14)
@@ -61632,9 +61617,9 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/ttable.S linux-2.6.27.19-5.1/arch/sp
  tl0_resv050:  BTRAP(0x50) BTRAP(0x51) BTRAP(0x52) BTRAP(0x53) BTRAP(0x54) BTRAP(0x55)
  tl0_resv056:  BTRAP(0x56) BTRAP(0x57) BTRAP(0x58) BTRAP(0x59) BTRAP(0x5a) BTRAP(0x5b)
  tl0_resv05c:  BTRAP(0x5c) BTRAP(0x5d) BTRAP(0x5e) BTRAP(0x5f)
-diff -purN linux-2.6.27/arch/sparc64/kernel/visemul.c linux-2.6.27.19-5.1/arch/sparc64/kernel/visemul.c
---- linux-2.6.27/arch/sparc64/kernel/visemul.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/kernel/visemul.c  2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/kernel/visemul.c
+--- a/arch/sparc64/kernel/visemul.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/kernel/visemul.c    Wed May 06 16:56:08 2009 +0100
 @@ -131,7 +131,7 @@
  #define VIS_OPF_SHIFT 5
  #define VIS_OPF_MASK  (0x1ff << VIS_OPF_SHIFT)
@@ -61644,7 +61629,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/visemul.c linux-2.6.27.19-5.1/arch/s
  #define RS2(INSN)     (((INSN) >>  0) & 0x1f)
  #define RD(INSN)      (((INSN) >> 25) & 0x1f)
  
-@@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, 
+@@ -445,7 +445,7 @@
        unsigned long i;
  
        rs1 = fpd_regval(f, RS1(insn));
@@ -61653,7 +61638,7 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/visemul.c linux-2.6.27.19-5.1/arch/s
        rd = fpd_regaddr(f, RD(insn));
  
        rd_val = *rd;
-@@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsig
+@@ -807,6 +807,8 @@
        if (get_user(insn, (u32 __user *) pc))
                return -EFAULT;
  
@@ -61662,10 +61647,10 @@ diff -purN linux-2.6.27/arch/sparc64/kernel/visemul.c linux-2.6.27.19-5.1/arch/s
        opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT;
        switch (opf) {
        default:
-diff -purN linux-2.6.27/arch/sparc64/lib/user_fixup.c linux-2.6.27.19-5.1/arch/sparc64/lib/user_fixup.c
---- linux-2.6.27/arch/sparc64/lib/user_fixup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/lib/user_fixup.c  2009-03-25 16:10:45.000000000 +0000
-@@ -24,7 +24,7 @@ static unsigned long compute_size(unsign
+diff -r 9608d5473017 arch/sparc64/lib/user_fixup.c
+--- a/arch/sparc64/lib/user_fixup.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/sparc64/lib/user_fixup.c    Wed May 06 16:56:08 2009 +0100
+@@ -24,7 +24,7 @@
        if (fault_addr < start || fault_addr >= end) {
                *offset = 0;
        } else {
@@ -61674,9 +61659,9 @@ diff -purN linux-2.6.27/arch/sparc64/lib/user_fixup.c linux-2.6.27.19-5.1/arch/s
                size = end - fault_addr;
        }
        return size;
-diff -purN linux-2.6.27/arch/sparc64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/sparc64/perfmon/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/Kconfig   2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/perfmon/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/Kconfig     Wed May 06 16:56:08 2009 +0100
 @@ -0,0 +1,26 @@
 +menu "Hardware Performance Monitoring support"
 +config PERFMON
@@ -61704,14 +61689,14 @@ diff -purN linux-2.6.27/arch/sparc64/perfmon/Kconfig linux-2.6.27.19-5.1/arch/sp
 +      subsystem. The debugfs filesystem must be mounted.
 +
 +endmenu
-diff -purN linux-2.6.27/arch/sparc64/perfmon/Makefile linux-2.6.27.19-5.1/arch/sparc64/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/Makefile  2009-03-25 16:10:45.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 arch/sparc64/perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/Makefile    Wed May 06 16:56:08 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_PERFMON) += perfmon.o
-diff -purN linux-2.6.27/arch/sparc64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/sparc64/perfmon/perfmon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/sparc64/perfmon/perfmon.c 2009-03-25 16:10:45.000000000 +0000
+diff -r 9608d5473017 arch/sparc64/perfmon/perfmon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/sparc64/perfmon/perfmon.c   Wed May 06 16:56:08 2009 +0100
 @@ -0,0 +1,422 @@
 +/* perfmon.c: sparc64 perfmon support
 + *
@@ -62135,10 +62120,10 @@ diff -purN linux-2.6.27/arch/sparc64/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/
 +
 +module_init(pfm_sparc64_pmu_init);
 +module_exit(pfm_sparc64_pmu_exit);
-diff -purN linux-2.6.27/arch/um/Kconfig linux-2.6.27.19-5.1/arch/um/Kconfig
---- linux-2.6.27/arch/um/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/um/Kconfig        2009-03-25 16:10:47.000000000 +0000
-@@ -229,6 +229,8 @@ endmenu
+diff -r 9608d5473017 arch/um/Kconfig
+--- a/arch/um/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/arch/um/Kconfig  Wed May 06 16:56:08 2009 +0100
+@@ -229,6 +229,8 @@
  
  source "init/Kconfig"
  
@@ -62147,9 +62132,9 @@ diff -purN linux-2.6.27/arch/um/Kconfig linux-2.6.27.19-5.1/arch/um/Kconfig
  source "drivers/block/Kconfig"
  
  source "arch/um/Kconfig.char"
-diff -purN linux-2.6.27/arch/um/drivers/mconsole_kern.c linux-2.6.27.19-5.1/arch/um/drivers/mconsole_kern.c
---- linux-2.6.27/arch/um/drivers/mconsole_kern.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/um/drivers/mconsole_kern.c        2009-03-25 16:10:47.000000000 +0000
+diff -r 9608d5473017 arch/um/drivers/mconsole_kern.c
+--- a/arch/um/drivers/mconsole_kern.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/um/drivers/mconsole_kern.c  Wed May 06 16:56:08 2009 +0100
 @@ -16,6 +16,8 @@
  #include <linux/slab.h>
  #include <linux/syscalls.h>
@@ -62159,7 +62144,7 @@ diff -purN linux-2.6.27/arch/um/drivers/mconsole_kern.c linux-2.6.27.19-5.1/arch
  #include <linux/workqueue.h>
  #include <linux/mutex.h>
  #include <asm/uaccess.h>
-@@ -785,7 +787,7 @@ static int __init mconsole_init(void)
+@@ -785,7 +787,7 @@
        /* long to avoid size mismatch warnings from gcc */
        long sock;
        int err;
@@ -62168,10 +62153,10 @@ diff -purN linux-2.6.27/arch/um/drivers/mconsole_kern.c linux-2.6.27.19-5.1/arch
  
        if (umid_file_name("mconsole", file, sizeof(file)))
                return -1;
-diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
---- linux-2.6.27/arch/x86/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig       2009-03-25 16:10:44.000000000 +0000
-@@ -27,8 +27,9 @@ config X86
+diff -r 9608d5473017 arch/x86/Kconfig
+--- a/arch/x86/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig Wed May 06 16:56:09 2009 +0100
+@@ -27,8 +27,9 @@
        select HAVE_KRETPROBES
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FTRACE
@@ -62183,7 +62168,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        select HAVE_GENERIC_DMA_COHERENT if X86_32
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
  
-@@ -49,13 +50,16 @@ config GENERIC_CMOS_UPDATE
+@@ -49,13 +50,16 @@
  
  config CLOCKSOURCE_WATCHDOG
        def_bool y
@@ -62200,7 +62185,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  config LOCKDEP_SUPPORT
        def_bool y
-@@ -123,6 +127,9 @@ config GENERIC_TIME_VSYSCALL
+@@ -123,6 +127,9 @@
  config ARCH_HAS_CPU_RELAX
        def_bool y
  
@@ -62210,7 +62195,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  config ARCH_HAS_CACHE_LINE_SIZE
        def_bool y
  
-@@ -135,6 +142,7 @@ config HAVE_CPUMASK_OF_CPU_MAP
+@@ -135,6 +142,7 @@
  config ARCH_HIBERNATION_POSSIBLE
        def_bool y
        depends on !SMP || !X86_VOYAGER
@@ -62218,7 +62203,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  config ARCH_SUSPEND_POSSIBLE
        def_bool y
-@@ -187,23 +195,33 @@ config X86_64_SMP
+@@ -187,23 +195,33 @@
  
  config X86_HT
        bool
@@ -62238,7 +62223,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        depends on X86_SMP || (X86_VOYAGER && SMP) || (64BIT && ACPI_SLEEP)
 +      depends on !XEN
        default y
++
 +config X86_NO_TSS
 +      def_bool y
 +      depends on XEN
@@ -62246,7 +62231,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
 +config X86_NO_IDT
 +      def_bool y
 +      depends on XEN
-+
  config KTIME_SCALAR
        def_bool X86_32
  source "init/Kconfig"
@@ -62254,10 +62239,11 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  menu "Processor type and features"
  
-@@ -266,6 +284,18 @@ config X86_PC
+@@ -265,6 +283,18 @@
+       bool "PC-compatible"
        help
          Choose this option if your computer is a standard PC or compatible.
++
 +config X86_XEN
 +      bool "Xen-compatible"
 +      depends on X86_32
@@ -62269,11 +62255,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
 +      help
 +        Choose this option if you plan to run this kernel on top of the
 +        Xen Hypervisor.
-+
  config X86_ELAN
        bool "AMD Elan"
-       depends on X86_32
-@@ -333,6 +363,14 @@ config X86_BIGSMP
+@@ -333,6 +363,14 @@
  
  endif
  
@@ -62288,7 +62273,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  config X86_VSMP
        bool "Support for ScaleMP vSMP"
        select PARAVIRT
-@@ -369,7 +407,7 @@ config X86_RDC321X
+@@ -369,7 +407,7 @@
  config SCHED_NO_NO_OMIT_FRAME_POINTER
        def_bool y
        prompt "Single-depth WCHAN output"
@@ -62297,7 +62282,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Calculate simpler /proc/<PID>/wchan values. If this option
          is disabled then wchan values will recurse back to the
-@@ -380,6 +418,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
+@@ -380,6 +418,7 @@
  
  menuconfig PARAVIRT_GUEST
        bool "Paravirtualized guest support"
@@ -62305,7 +62290,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Say Y here to get to see options related to running Linux under
          various hypervisors.  This option alone does not add any kernel code.
-@@ -447,6 +486,7 @@ config PARAVIRT_DEBUG
+@@ -447,6 +486,7 @@
  
  config MEMTEST
        bool "Memtest"
@@ -62313,7 +62298,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          This option adds a kernel parameter 'memtest', which allows memtest
          to be set.
-@@ -473,6 +513,7 @@ source "arch/x86/Kconfig.cpu"
+@@ -473,6 +513,7 @@
  config HPET_TIMER
        def_bool X86_64
        prompt "HPET Timer Support" if X86_32
@@ -62321,7 +62306,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
           Use the IA-PC HPET (High Precision Event Timer) to manage
           time in preference to the PIT and RTC, if a HPET is
-@@ -509,7 +550,7 @@ config GART_IOMMU
+@@ -509,7 +550,7 @@
        default y
        select SWIOTLB
        select AGP
@@ -62330,7 +62315,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Support for full DMA access of devices with 32bit memory access only
          on systems with more than 3GB. This is usually needed for USB,
-@@ -524,7 +565,7 @@ config GART_IOMMU
+@@ -524,7 +565,7 @@
  config CALGARY_IOMMU
        bool "IBM Calgary IOMMU support"
        select SWIOTLB
@@ -62339,7 +62324,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Support for hardware IOMMUs in IBM's xSeries x366 and x460
          systems. Needed to run systems with more than 3GB of memory
-@@ -553,7 +594,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
+@@ -553,7 +594,7 @@
  config AMD_IOMMU
        bool "AMD IOMMU support"
        select SWIOTLB
@@ -62348,7 +62333,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          With this option you can enable support for AMD IOMMU hardware in
          your system. An IOMMU is a hardware component which provides
-@@ -567,7 +608,7 @@ config AMD_IOMMU
+@@ -567,7 +608,7 @@
  
  # need this always selected by IOMMU for the VIA workaround
  config SWIOTLB
@@ -62357,7 +62342,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Support for software bounce buffers used on x86-64 systems
          which don't have a hardware IOMMU (e.g. the current generation
-@@ -580,18 +621,21 @@ config IOMMU_HELPER
+@@ -580,18 +621,21 @@
  
  config MAXSMP
        bool "Configure Maximum number of SMP Processors and NUMA Nodes"
@@ -62382,7 +62367,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        default "8"
        help
          This allows you to specify the maximum number of CPUs which this
-@@ -599,7 +643,7 @@ config NR_CPUS
+@@ -599,7 +643,7 @@
          minimum value which makes sense is 2.
  
          This is purely to save memory - each supported CPU adds
@@ -62391,7 +62376,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  config SCHED_SMT
        bool "SMT (Hyperthreading) scheduler support"
-@@ -621,9 +665,33 @@ config SCHED_MC
+@@ -621,9 +665,33 @@
  
  source "kernel/Kconfig.preempt"
  
@@ -62426,7 +62411,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          A local APIC (Advanced Programmable Interrupt Controller) is an
          integrated interrupt controller in the CPU. If you have a single-CPU
-@@ -649,18 +717,24 @@ config X86_UP_IOAPIC
+@@ -649,18 +717,24 @@
  config X86_LOCAL_APIC
        def_bool y
        depends on X86_64 || (X86_32 && (X86_UP_APIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH))
@@ -62452,7 +62437,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
          Machine Check Exception support allows the processor to notify the
          kernel if it detects a problem (e.g. overheating, component failure).
-@@ -760,7 +834,7 @@ config I8K
+@@ -760,7 +834,7 @@
  config X86_REBOOTFIXUPS
        def_bool n
        prompt "Enable X86 board specific fixups for reboot"
@@ -62461,7 +62446,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
          This enables chipset and/or board specific fixups to be done
          in order to get reboot to work correctly. This is only needed on
-@@ -777,6 +851,7 @@ config X86_REBOOTFIXUPS
+@@ -777,6 +851,7 @@
  
  config MICROCODE
        tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
@@ -62469,7 +62454,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        select FW_LOADER
        ---help---
          If you say Y here, you will be able to update the microcode on
-@@ -924,7 +999,7 @@ config HIGHMEM
+@@ -924,7 +999,7 @@
  config X86_PAE
        def_bool n
        prompt "PAE (Physical Address Extension) Support"
@@ -62478,7 +62463,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        select RESOURCES_64BIT
        help
          PAE is required for NX support, and furthermore enables
-@@ -932,10 +1007,19 @@ config X86_PAE
+@@ -932,10 +1007,19 @@
          has the cost of more pagetable lookup overhead, and also
          consumes more pagetable space per process.
  
@@ -62499,7 +62484,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL)
        default n if X86_PC
        default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP)
-@@ -991,7 +1075,8 @@ config NUMA_EMU
+@@ -991,7 +1075,8 @@
          number of nodes. This is only useful for debugging.
  
  config NODES_SHIFT
@@ -62509,7 +62494,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        range 1 9   if X86_64
        default "9" if MAXSMP
        default "6" if X86_64
-@@ -1032,11 +1117,11 @@ config ARCH_DISCONTIGMEM_DEFAULT
+@@ -1032,11 +1117,11 @@
  
  config ARCH_SPARSEMEM_DEFAULT
        def_bool y
@@ -62523,7 +62508,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        select SPARSEMEM_STATIC if X86_32
        select SPARSEMEM_VMEMMAP_ENABLE if X86_64
  
-@@ -1059,9 +1144,31 @@ config HIGHPTE
+@@ -1059,9 +1144,31 @@
          low memory.  Setting this option will put user-space page table
          entries in high memory.
  
@@ -62555,7 +62540,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
          Linux can emulate a math coprocessor (used for floating point
          operations) if you don't have one. 486DX and Pentium processors have
-@@ -1087,6 +1194,7 @@ config MATH_EMULATION
+@@ -1087,6 +1194,7 @@
  
  config MTRR
        bool "MTRR (Memory Type Range Register) support"
@@ -62563,7 +62548,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
          On Intel P6 family processors (Pentium Pro, Pentium II and later)
          the Memory Type Range Registers (MTRRs) may be used to control
-@@ -1122,7 +1230,7 @@ config MTRR
+@@ -1122,7 +1230,7 @@
  config MTRR_SANITIZER
        bool
        prompt "MTRR cleanup support"
@@ -62572,7 +62557,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Convert MTRR layout from continuous to discrete, so X drivers can
          add writeback entries.
-@@ -1168,7 +1276,7 @@ config X86_PAT
+@@ -1168,7 +1276,7 @@
  config EFI
        def_bool n
        prompt "EFI runtime service support"
@@ -62581,7 +62566,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
        This enables the kernel to use EFI runtime services that are
        available (such as the EFI variable services).
-@@ -1183,7 +1291,7 @@ config EFI
+@@ -1183,7 +1291,7 @@
  config IRQBALANCE
        def_bool y
        prompt "Enable kernel irq balancing"
@@ -62590,10 +62575,11 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          The default yes will allow the kernel to do irq load balancing.
          Saying no will keep the kernel from doing irq load balancing.
-@@ -1205,6 +1313,18 @@ config SECCOMP
+@@ -1204,6 +1312,18 @@
+         defined by each seccomp mode.
  
          If unsure, say Y. Only embedded should say N here.
++
 +config SECCOMP_DISABLE_TSC
 +      bool "Disable the TSC for seccomp tasks"
 +      depends on SECCOMP
@@ -62605,11 +62591,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
 +
 +        If you care most about performance say N. Say Y only if you're
 +        paranoid about covert channels.
-+
  config CC_STACKPROTECTOR
        bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
-       depends on X86_64 && EXPERIMENTAL && BROKEN
-@@ -1233,7 +1353,7 @@ source kernel/Kconfig.hz
+@@ -1233,7 +1353,7 @@
  
  config KEXEC
        bool "kexec system call"
@@ -62618,7 +62603,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          kexec is a system call that implements the ability to shutdown your
          current kernel, and to start another kernel.  It is like a reboot
-@@ -1251,6 +1371,7 @@ config KEXEC
+@@ -1251,6 +1371,7 @@
  config CRASH_DUMP
        bool "kernel crash dumps"
        depends on X86_64 || (X86_32 && HIGHMEM)
@@ -62626,7 +62611,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Generate crash dump after being started by kexec.
          This should be normally only set in special crash dump kernels
-@@ -1315,7 +1436,7 @@ config PHYSICAL_START
+@@ -1315,7 +1436,7 @@
  
  config RELOCATABLE
        bool "Build a relocatable kernel (EXPERIMENTAL)"
@@ -62635,7 +62620,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          This builds a kernel image that retains relocation information
          so it can be loaded someplace besides the default 1MB.
-@@ -1378,18 +1499,23 @@ config COMPAT_VDSO
+@@ -1378,18 +1499,23 @@
  
          If unsure, say Y.
  
@@ -62660,7 +62645,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  config ARCH_HIBERNATION_HEADER
        def_bool y
-@@ -1406,7 +1532,7 @@ config X86_APM_BOOT
+@@ -1406,7 +1532,7 @@
  
  menuconfig APM
        tristate "APM (Advanced Power Management) BIOS support"
@@ -62669,7 +62654,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        ---help---
          APM is a BIOS specification for saving power using several different
          techniques. This is mostly useful for battery powered laptops with
-@@ -1545,6 +1671,7 @@ config PCI
+@@ -1545,6 +1671,7 @@
        bool "PCI support"
        default y
        select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
@@ -62677,7 +62662,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
          bus system, i.e. the way the CPU talks to the other stuff inside
-@@ -1572,6 +1699,7 @@ choice
+@@ -1572,6 +1699,7 @@
  
  config PCI_GOBIOS
        bool "BIOS"
@@ -62685,7 +62670,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  config PCI_GOMMCONFIG
        bool "MMConfig"
-@@ -1583,6 +1711,13 @@ config PCI_GOOLPC
+@@ -1583,6 +1711,13 @@
        bool "OLPC"
        depends on OLPC
  
@@ -62699,7 +62684,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  config PCI_GOANY
        bool "Any"
  
-@@ -1590,7 +1725,7 @@ endchoice
+@@ -1590,7 +1725,7 @@
  
  config PCI_BIOS
        def_bool y
@@ -62708,7 +62693,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  
  # x86-64 doesn't support PCI BIOS access from long mode so always go direct.
  config PCI_DIRECT
-@@ -1613,9 +1748,25 @@ config PCI_MMCONFIG
+@@ -1613,9 +1748,25 @@
        bool "Support mmconfig PCI config space access"
        depends on X86_64 && PCI && ACPI
  
@@ -62734,7 +62719,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          DMA remapping (DMAR) devices support enables independent address
          translations for Direct Memory Access (DMA) from devices.
-@@ -1643,6 +1794,15 @@ config DMAR_FLOPPY_WA
+@@ -1643,6 +1794,15 @@
         workaround will setup a 1:1 mapping for the first
         16M to make floppy (an ISA device) work.
  
@@ -62750,7 +62735,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
  source "drivers/pci/pcie/Kconfig"
  
  source "drivers/pci/Kconfig"
-@@ -1655,7 +1815,7 @@ if X86_32
+@@ -1655,7 +1815,7 @@
  
  config ISA
        bool "ISA support"
@@ -62759,7 +62744,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        help
          Find out whether you have ISA slots on your motherboard.  ISA is the
          name of a bus system, i.e. the way the CPU talks to the other stuff
-@@ -1682,7 +1842,7 @@ config EISA
+@@ -1682,7 +1842,7 @@
  source "drivers/eisa/Kconfig"
  
  config MCA
@@ -62768,10 +62753,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig linux-2.6.27.19-5.1/arch/x86/Kconfig
        default y if X86_VOYAGER
        help
          MicroChannel Architecture is found in some IBM PS/2 machines and
-diff -purN linux-2.6.27/arch/x86/Kconfig.cpu linux-2.6.27.19-5.1/arch/x86/Kconfig.cpu
---- linux-2.6.27/arch/x86/Kconfig.cpu  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig.cpu   2009-03-25 16:10:44.000000000 +0000
-@@ -340,7 +340,7 @@ config X86_PPRO_FENCE
+diff -r 9608d5473017 arch/x86/Kconfig.cpu
+--- a/arch/x86/Kconfig.cpu     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig.cpu     Wed May 06 16:56:09 2009 +0100
+@@ -340,7 +340,7 @@
  
  config X86_F00F_BUG
        def_bool y
@@ -62780,7 +62765,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.cpu linux-2.6.27.19-5.1/arch/x86/Kconfi
  
  config X86_WP_WORKS_OK
        def_bool y
-@@ -397,6 +397,7 @@ config X86_P6_NOP
+@@ -397,6 +397,7 @@
  config X86_TSC
        def_bool y
        depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64
@@ -62788,10 +62773,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.cpu linux-2.6.27.19-5.1/arch/x86/Kconfi
  
  config X86_CMPXCHG64
        def_bool y
-diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kconfig.debug
---- linux-2.6.27/arch/x86/Kconfig.debug        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Kconfig.debug 2009-03-25 16:10:44.000000000 +0000
-@@ -25,6 +25,7 @@ config STRICT_DEVMEM
+diff -r 9608d5473017 arch/x86/Kconfig.debug
+--- a/arch/x86/Kconfig.debug   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Kconfig.debug   Wed May 06 16:56:09 2009 +0100
+@@ -25,6 +25,7 @@
  config X86_VERBOSE_BOOTUP
        bool "Enable verbose x86 bootup info messages"
        default y
@@ -62799,10 +62784,11 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
        help
          Enables the informational output from the decompression stage
          (e.g. bzImage) of the boot. If you disable this you will still
-@@ -43,6 +44,19 @@ config EARLY_PRINTK
+@@ -42,6 +43,19 @@
+         it is not recommended because it looks ugly and doesn't cooperate
          with klogd/syslogd or the X server. You should normally N here,
          unless you want to debug such a crash.
++
 +config EARLY_PRINTK_DBGP
 +      bool "Early printk via EHCI debug port"
 +      default n
@@ -62815,11 +62801,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
 +        it is not recommended because it looks ugly and doesn't cooperate
 +        with klogd/syslogd or the X server. You should normally N here,
 +        unless you want to debug such a crash. You need usb debug device.
-+
  config DEBUG_STACKOVERFLOW
        bool "Check for stack overflows"
-       depends on DEBUG_KERNEL
-@@ -101,18 +115,6 @@ config DEBUG_RODATA
+@@ -101,18 +115,6 @@
          data. This is recommended so that we can catch kernel bugs sooner.
          If in doubt, say "Y".
  
@@ -62838,7 +62823,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
  config DEBUG_RODATA_TEST
        bool "Testcase for the DEBUG_RODATA feature"
        depends on DEBUG_RODATA
-@@ -142,7 +144,7 @@ config 4KSTACKS
+@@ -142,7 +144,7 @@
  config DOUBLEFAULT
        default y
        bool "Enable doublefault exception handler" if EMBEDDED
@@ -62847,7 +62832,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
        help
          This option allows trapping of rare doublefault exceptions that
          would otherwise cause a system to silently reboot. Disabling this
-@@ -178,7 +180,7 @@ config MMIOTRACE_HOOKS
+@@ -178,7 +180,7 @@
  
  config MMIOTRACE
        bool "Memory mapped IO tracing"
@@ -62856,7 +62841,7 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
        select TRACING
        select MMIOTRACE_HOOKS
        help
-@@ -278,6 +280,7 @@ config DEBUG_BOOT_PARAMS
+@@ -278,6 +280,7 @@
        bool "Debug boot parameters"
        depends on DEBUG_KERNEL
        depends on DEBUG_FS
@@ -62864,11 +62849,10 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
        help
          This option will cause struct boot_params to be exported via debugfs.
  
-@@ -301,5 +304,91 @@ config OPTIMIZE_INLINING
+@@ -301,5 +304,91 @@
  
          If unsure, say N.
  
--endmenu
 +config KDB
 +      bool "Built-in Kernel Debugger support"
 +      depends on DEBUG_KERNEL && !XEN
@@ -62955,12 +62939,13 @@ diff -purN linux-2.6.27/arch/x86/Kconfig.debug linux-2.6.27.19-5.1/arch/x86/Kcon
 +      help
 +        If you want to take Kdump kernel vmcore from KDB then say Y here.
 +        Of imsire. say N.
-+endmenu
-diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
---- linux-2.6.27/arch/x86/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/Makefile      2009-03-25 16:10:44.000000000 +0000
-@@ -98,7 +98,9 @@ KBUILD_CFLAGS += -pipe
++
+ endmenu
+-
+diff -r 9608d5473017 arch/x86/Makefile
+--- a/arch/x86/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/Makefile        Wed May 06 16:56:09 2009 +0100
+@@ -98,7 +98,9 @@
  # Workaround for a gcc prelease that unfortunately was shipped in a suse release
  KBUILD_CFLAGS += -Wno-sign-compare
  #
@@ -62970,7 +62955,7 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  # prevent gcc from generating any FP code by mistake
  KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
  
-@@ -113,6 +115,10 @@ mcore-y  := arch/x86/mach-default/
+@@ -113,6 +115,10 @@
  mflags-$(CONFIG_X86_VOYAGER)  := -Iinclude/asm-x86/mach-voyager
  mcore-$(CONFIG_X86_VOYAGER)   := arch/x86/mach-voyager/
  
@@ -62981,7 +62966,7 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  # generic subarchitecture
  mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic
  fcore-$(CONFIG_X86_GENERICARCH)       += arch/x86/mach-generic/
-@@ -122,8 +128,10 @@ mcore-$(CONFIG_X86_GENERICARCH)   := arch/
+@@ -122,8 +128,10 @@
  mflags-y += -Iinclude/asm-x86/mach-default
  
  # 64 bit does not support subarch support - clear sub arch variables
@@ -62992,7 +62977,7 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  
  KBUILD_CFLAGS += $(mflags-y)
  KBUILD_AFLAGS += $(mflags-y)
-@@ -142,7 +150,7 @@ libs-y  += arch/x86/lib/
+@@ -142,13 +150,15 @@
  core-y += $(fcore-y)
  
  # Xen paravirtualization support
@@ -63001,16 +62986,15 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  
  # lguest paravirtualization support
  core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/
-@@ -150,6 +158,8 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/
  core-y += arch/x86/kernel/
  core-y += arch/x86/mm/
-+core-$(CONFIG_PERFMON) += arch/x86/perfmon/
 +
++core-$(CONFIG_PERFMON) += arch/x86/perfmon/
  # Remaining sub architecture files
  core-y += $(mcore-y)
-@@ -171,14 +181,36 @@ ifeq ($(CONFIG_X86_32),y)
+@@ -171,14 +181,36 @@
  drivers-$(CONFIG_FB) += arch/x86/video/
  endif
  
@@ -63048,7 +63032,7 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  # Default kernel to build
  all: bzImage
  
-@@ -201,6 +233,7 @@ zdisk bzdisk: vmlinux
+@@ -201,6 +233,7 @@
  
  fdimage fdimage144 fdimage288 isoimage: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
@@ -63056,10 +63040,10 @@ diff -purN linux-2.6.27/arch/x86/Makefile linux-2.6.27.19-5.1/arch/x86/Makefile
  
  install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
-diff -purN linux-2.6.27/arch/x86/boot/Makefile linux-2.6.27.19-5.1/arch/x86/boot/Makefile
---- linux-2.6.27/arch/x86/boot/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/boot/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -25,7 +25,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
+diff -r 9608d5473017 arch/x86/boot/Makefile
+--- a/arch/x86/boot/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/boot/Makefile   Wed May 06 16:56:09 2009 +0100
+@@ -25,7 +25,7 @@
  
  #RAMDISK := -DRAMDISK=512
  
@@ -63068,7 +63052,7 @@ diff -purN linux-2.6.27/arch/x86/boot/Makefile linux-2.6.27.19-5.1/arch/x86/boot
  subdir-               := compressed
  
  setup-y               += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
-@@ -190,5 +190,13 @@ zlilo: $(BOOTIMAGE)
+@@ -190,5 +190,13 @@
        cp System.map $(INSTALL_PATH)/
        if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
  
@@ -63082,10 +63066,10 @@ diff -purN linux-2.6.27/arch/x86/boot/Makefile linux-2.6.27.19-5.1/arch/x86/boot
 +
  install:
        sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
-diff -purN linux-2.6.27/arch/x86/boot/video-vesa.c linux-2.6.27.19-5.1/arch/x86/boot/video-vesa.c
---- linux-2.6.27/arch/x86/boot/video-vesa.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/boot/video-vesa.c     2009-03-25 16:10:44.000000000 +0000
-@@ -270,9 +270,10 @@ void vesa_store_edid(void)
+diff -r 9608d5473017 arch/x86/boot/video-vesa.c
+--- a/arch/x86/boot/video-vesa.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/boot/video-vesa.c       Wed May 06 16:56:09 2009 +0100
+@@ -270,9 +270,10 @@
           we genuinely have to assume all registers are destroyed here. */
  
        asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es"
@@ -63099,7 +63083,7 @@ diff -purN linux-2.6.27/arch/x86/boot/video-vesa.c linux-2.6.27.19-5.1/arch/x86/
  
        if (ax != 0x004f)
                return;         /* No EDID */
-@@ -286,8 +287,9 @@ void vesa_store_edid(void)
+@@ -286,8 +287,9 @@
        dx = 0;                 /* EDID block number */
        di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
        asm(INT10
@@ -63111,9 +63095,9 @@ diff -purN linux-2.6.27/arch/x86/boot/video-vesa.c linux-2.6.27.19-5.1/arch/x86/
            : "esi");
  #endif /* CONFIG_FIRMWARE_EDID */
  }
-diff -purN linux-2.6.27/arch/x86/ia32/ia32entry-xen.S linux-2.6.27.19-5.1/arch/x86/ia32/ia32entry-xen.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/ia32/ia32entry-xen.S  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/ia32/ia32entry-xen.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/ia32/ia32entry-xen.S    Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,784 @@
 +/*
 + * Compatibility mode system call entry point for x86-64. 
@@ -63899,9 +63883,9 @@ diff -purN linux-2.6.27/arch/x86/ia32/ia32entry-xen.S linux-2.6.27.19-5.1/arch/x
 +      .quad sys_pipe2
 +      .quad sys_inotify_init1
 +ia32_syscall_end:
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog   Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,230 @@
 +2008-09-30 Jay Lan  <jlan@sgi.com>
 +
@@ -64133,9 +64117,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog linux-2.6.27.19-5.1/arch/x86/kdb/
 +      *     struct scsi_cmnd. Thus, these fields are no longer displayed
 +      *     on "sc" command.
 +      * kdb v4.4-2.6.24-rc1-x86-1.
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_32 linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_32
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_32      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog_32
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog_32        Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,865 @@
 +2007-11-08 Jay Lan  <jlan@sgi.com>
 +
@@ -65002,9 +64986,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_32 linux-2.6.27.19-5.1/arch/x86/k
 +2001-12-22 Keith Owens  <kaos@sgi.com>
 +
 +      * Split kdb for i386 as kdb v2.0-2.4.17-i386-1.
-diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_64 linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_64
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/ChangeLog_64      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/ChangeLog_64
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/ChangeLog_64        Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,447 @@
 +2007-11-08 Jay Lan  <jlan@sgi.com>
 +
@@ -65453,18 +65437,18 @@ diff -purN linux-2.6.27/arch/x86/kdb/ChangeLog_64 linux-2.6.27.19-5.1/arch/x86/k
 +
 +      * Sync xfs <-> kdb i386 code.
 +
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile linux-2.6.27.19-5.1/arch/x86/kdb/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile    Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,5 @@
 +ifeq ($(CONFIG_X86_32),y)
 +include ${srctree}/arch/x86/kdb/Makefile_32
 +else
 +include ${srctree}/arch/x86/kdb/Makefile_64
 +endif
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile_32 linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_32
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_32       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile_32
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile_32 Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,25 @@
 +#
 +# This file is subject to the terms and conditions of the GNU General Public
@@ -65491,9 +65475,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/Makefile_32 linux-2.6.27.19-5.1/arch/x86/kd
 +override CFLAGS := $(CFLAGS:%-pg=% )
 +
 +CFLAGS_kdba_io.o += -I $(TOPDIR)/arch/$(SRCARCH)/kdb
-diff -purN linux-2.6.27/arch/x86/kdb/Makefile_64 linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_64
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/Makefile_64       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/Makefile_64
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/Makefile_64 Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,25 @@
 +#
 +# This file is subject to the terms and conditions of the GNU General Public
@@ -65520,9 +65504,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/Makefile_64 linux-2.6.27.19-5.1/arch/x86/kd
 +override CFLAGS := $(CFLAGS:%-pg=% )
 +
 +CFLAGS_kdba_io.o += -I $(TOPDIR)/arch/$(SRCARCH)/kdb
-diff -purN linux-2.6.27/arch/x86/kdb/i386-dis.c linux-2.6.27.19-5.1/arch/x86/kdb/i386-dis.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/i386-dis.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/i386-dis.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/i386-dis.c  Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,4686 @@
 +/* Print i386 instructions for GDB, the GNU debugger.
 +   Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
@@ -70210,9 +70194,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/i386-dis.c linux-2.6.27.19-5.1/arch/x86/kdb
 +    strcpy (obuf, "vmptrld");
 +  OP_E (bytemode, sizeflag);
 +}
-diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_32 linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_32
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_32       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdb_cmds_32
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdb_cmds_32 Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,17 @@
 +# Standard architecture specific commands for kdb.
 +# These commands are appended to those in kdb/kdb_cmds, see that file for
@@ -70231,9 +70215,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_32 linux-2.6.27.19-5.1/arch/x86/kd
 +  -dmesg 600
 +  -bt
 +endefcmd
-diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_64 linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_64
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdb_cmds_64       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdb_cmds_64
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdb_cmds_64 Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,18 @@
 +# Standard architecture specific commands for kdb.
 +# These commands are appended to those in kdb/kdb_cmds, see that file for
@@ -70253,9 +70237,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdb_cmds_64 linux-2.6.27.19-5.1/arch/x86/kd
 +  -bt
 +  -cpu_pda *
 +endefcmd
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_32.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_32.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_32.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bp_32.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bp_32.c        Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,914 @@
 +/*
 + * Kernel Debugger Architecture Dependent Breakpoint Handling
@@ -71171,9 +71155,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_32.c linux-2.6.27.19-5.1/arch/x86/k
 +      }
 +      return(0);
 +}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_64.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_64.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bp_64.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bp_64.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bp_64.c        Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,912 @@
 +/*
 + * Kernel Debugger Architecture Dependent Breakpoint Handling
@@ -72087,9 +72071,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_bp_64.c linux-2.6.27.19-5.1/arch/x86/k
 +      }
 +      return(0);
 +}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_bt.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_bt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_bt.c   Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,5600 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -77691,9 +77675,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_bt.c linux-2.6.27.19-5.1/arch/x86/kdb/
 +
 +module_init(kdba_bt_x86_init)
 +module_exit(kdba_bt_x86_exit)
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_id.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_id.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_id.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_id.c   Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,261 @@
 +/*
 + * Kernel Debugger Architecture Dependent Instruction Disassembly
@@ -77956,9 +77940,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_id.c linux-2.6.27.19-5.1/arch/x86/kdb/
 +
 +      dip->display_endian         = BFD_ENDIAN_LITTLE;
 +}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_io.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_io.c   Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,609 @@
 +/*
 + * Kernel Debugger Architecture Dependent Console I/O handler
@@ -78569,9 +78553,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_io.c linux-2.6.27.19-5.1/arch/x86/kdb/
 +      mdelay(1);
 +#endif        /* CONFIG_VT_CONSOLE */
 +}
-diff -purN linux-2.6.27/arch/x86/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/x86/kdb/kdba_support.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdba_support.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdba_support.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdba_support.c      Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + * Kernel Debugger Architecture Independent Support Functions
@@ -78630,9 +78614,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdba_support.c linux-2.6.27.19-5.1/arch/x86
 +}
 +
 +#endif
-diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_32.c linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_32.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_32.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdbasupport_32.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdbasupport_32.c    Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,1086 @@
 +/*
 + * Kernel Debugger Architecture Independent Support Functions
@@ -79720,9 +79704,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_32.c linux-2.6.27.19-5.1/arch/x
 +}
 +
 +#endif        /* CONFIG_SMP */
-diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_64.c linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_64.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/kdbasupport_64.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/kdbasupport_64.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/kdbasupport_64.c    Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,1042 @@
 +/*
 + * Kernel Debugger Architecture Independent Support Functions
@@ -80766,9 +80750,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/kdbasupport_64.c linux-2.6.27.19-5.1/arch/x
 +}
 +
 +#endif        /* CONFIG_SMP */
-diff -purN linux-2.6.27/arch/x86/kdb/pc_keyb.h linux-2.6.27.19-5.1/arch/x86/kdb/pc_keyb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/pc_keyb.h 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/pc_keyb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/pc_keyb.h   Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,137 @@
 +/*
 + *    include/linux/pc_keyb.h
@@ -80907,9 +80891,9 @@ diff -purN linux-2.6.27/arch/x86/kdb/pc_keyb.h linux-2.6.27.19-5.1/arch/x86/kdb/
 +#define kbd_read_status() inb(KBD_STATUS_REG)
 +#define kbd_write_output(val) outb(val, KBD_DATA_REG)
 +#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
-diff -purN linux-2.6.27/arch/x86/kdb/x86_64-dis.c linux-2.6.27.19-5.1/arch/x86/kdb/x86_64-dis.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kdb/x86_64-dis.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kdb/x86_64-dis.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kdb/x86_64-dis.c        Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,4686 @@
 +/* Print i386 instructions for GDB, the GNU debugger.
 +   Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
@@ -85597,10 +85581,10 @@ diff -purN linux-2.6.27/arch/x86/kdb/x86_64-dis.c linux-2.6.27.19-5.1/arch/x86/k
 +    strcpy (obuf, "vmptrld");
 +  OP_E (bytemode, sizeflag);
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/Makefile
---- linux-2.6.27/arch/x86/kernel/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/Makefile       2009-03-25 16:10:44.000000000 +0000
-@@ -99,11 +99,17 @@ scx200-y                   += scx200_32.o
+diff -r 9608d5473017 arch/x86/kernel/Makefile
+--- a/arch/x86/kernel/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/Makefile Wed May 06 16:56:09 2009 +0100
+@@ -99,11 +99,17 @@
  
  obj-$(CONFIG_OLPC)            += olpc.o
  
@@ -85620,7 +85604,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/Makefile linux-2.6.27.19-5.1/arch/x86/ke
          obj-$(CONFIG_X86_PM_TIMER)    += pmtimer_64.o
          obj-$(CONFIG_AUDIT)           += audit_64.o
  
-@@ -113,4 +119,12 @@ ifeq ($(CONFIG_X86_64),y)
+@@ -113,4 +119,12 @@
          obj-$(CONFIG_SWIOTLB)         += pci-swiotlb_64.o
  
          obj-$(CONFIG_PCI_MMCONFIG)    += mmconf-fam10h_64.o
@@ -85633,10 +85617,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/Makefile linux-2.6.27.19-5.1/arch/x86/ke
 +      genx2apic_%.o hpet.o i8253.o i8259.o irqinit_$(BITS).o \
 +      pci-swiotlb_64.o reboot.o smpboot.o tlb_$(BITS).o tsc.o tsc_sync.o \
 +      uv_%.o vsmp_64.o
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/acpi/Makefile
---- linux-2.6.27/arch/x86/kernel/acpi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/Makefile  2009-03-25 16:10:44.000000000 +0000
-@@ -5,6 +5,9 @@ obj-$(CONFIG_ACPI_SLEEP)       += sleep.o wake
+diff -r 9608d5473017 arch/x86/kernel/acpi/Makefile
+--- a/arch/x86/kernel/acpi/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/Makefile    Wed May 06 16:56:09 2009 +0100
+@@ -5,6 +5,9 @@
  
  ifneq ($(CONFIG_ACPI_PROCESSOR),)
  obj-y                         += cstate.o processor.o
@@ -85646,15 +85630,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/Makefile linux-2.6.27.19-5.1/arch/x
  endif
  
  $(obj)/wakeup_rm.o:    $(obj)/realmode/wakeup.bin
-@@ -12,3 +15,4 @@ $(obj)/wakeup_rm.o:    $(obj)/realmode/w
+@@ -12,3 +15,4 @@
  $(obj)/realmode/wakeup.bin: FORCE
        $(Q)$(MAKE) $(build)=$(obj)/realmode
  
 +disabled-obj-$(CONFIG_XEN)    := cstate.o wakeup_%.o
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/boot.c
---- linux-2.6.27/arch/x86/kernel/acpi/boot.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/boot.c    2009-03-25 16:10:44.000000000 +0000
-@@ -89,7 +89,7 @@ int acpi_sci_override_gsi __initdata;
+diff -r 9608d5473017 arch/x86/kernel/acpi/boot.c
+--- a/arch/x86/kernel/acpi/boot.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/boot.c      Wed May 06 16:56:09 2009 +0100
+@@ -89,7 +89,7 @@
  int acpi_skip_timer_override __initdata;
  int acpi_use_timer_override __initdata;
  
@@ -85663,7 +85647,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
  #endif
  
-@@ -130,8 +130,13 @@ char *__init __acpi_map_table(unsigned l
+@@ -130,8 +130,13 @@
        if (!phys || !size)
                return NULL;
  
@@ -85677,7 +85661,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  
        offset = phys & (PAGE_SIZE - 1);
        mapped_size = PAGE_SIZE - offset;
-@@ -232,12 +237,14 @@ static int __init acpi_parse_madt(struct
+@@ -232,12 +237,14 @@
                return -ENODEV;
        }
  
@@ -85692,7 +85676,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  
        acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
  
-@@ -246,19 +253,23 @@ static int __init acpi_parse_madt(struct
+@@ -246,19 +253,23 @@
  
  static void __cpuinit acpi_register_lapic(int id, u8 enabled)
  {
@@ -85716,7 +85700,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  }
  
  static int __init
-@@ -308,6 +319,7 @@ static int __init
+@@ -308,6 +319,7 @@
  acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
                          const unsigned long end)
  {
@@ -85724,7 +85708,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL;
  
        lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header;
-@@ -316,6 +328,7 @@ acpi_parse_lapic_addr_ovr(struct acpi_su
+@@ -316,6 +328,7 @@
                return -EINVAL;
  
        acpi_lapic_addr = lapic_addr_ovr->address;
@@ -85732,7 +85716,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  
        return 0;
  }
-@@ -769,19 +782,23 @@ static int __init acpi_parse_fadt(struct
+@@ -769,19 +782,23 @@
   * returns 0 on success, < 0 on error
   */
  
@@ -85757,7 +85741,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  
  static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
  {
-@@ -891,10 +908,12 @@ static int mp_find_ioapic(int gsi)
+@@ -891,10 +908,12 @@
  static u8 __init uniq_ioapic_id(u8 id)
  {
  #ifdef CONFIG_X86_32
@@ -85770,7 +85754,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
                return id;
  #else
        int i;
-@@ -938,7 +957,9 @@ void __init mp_register_ioapic(int id, u
+@@ -938,7 +957,9 @@
        mp_ioapics[idx].mp_flags = MPC_APIC_USABLE;
        mp_ioapics[idx].mp_apicaddr = address;
  
@@ -85780,7 +85764,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        mp_ioapics[idx].mp_apicid = uniq_ioapic_id(id);
  #ifdef CONFIG_X86_32
        mp_ioapics[idx].mp_apicver = io_apic_get_version(idx);
-@@ -1095,7 +1116,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1095,7 +1116,7 @@
  {
        int ioapic;
        int ioapic_pin;
@@ -85789,7 +85773,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
  #define MAX_GSI_NUM   4096
  #define IRQ_COMPRESSION_START 64
  
-@@ -1124,7 +1145,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1124,7 +1145,7 @@
  
        ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
  
@@ -85798,7 +85782,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        if (ioapic_renumber_irq)
                gsi = ioapic_renumber_irq(ioapic, gsi);
  #endif
-@@ -1143,7 +1164,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1143,7 +1164,7 @@
        if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
                pr_debug(KERN_DEBUG "Pin %d-%d already programmed\n",
                         mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
@@ -85807,7 +85791,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
                return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
  #else
                return gsi;
-@@ -1151,7 +1172,7 @@ int mp_register_gsi(u32 gsi, int trigger
+@@ -1151,7 +1172,7 @@
        }
  
        set_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed);
@@ -85816,7 +85800,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        /*
         * For GSI >= 64, use IRQ compression
         */
-@@ -1351,7 +1372,9 @@ static void __init acpi_process_madt(voi
+@@ -1351,7 +1372,9 @@
                                acpi_ioapic = 1;
  
                                smp_found_config = 1;
@@ -85826,7 +85810,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
                        }
                }
                if (error == -EINVAL) {
-@@ -1593,6 +1616,11 @@ static struct dmi_system_id __initdata a
+@@ -1593,6 +1616,11 @@
                     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
                     },
         },
@@ -85838,7 +85822,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        /*
         * HP laptops which use a DSDT reporting as HP/SB400/10000,
         * which includes some code which overrides all temperature
-@@ -1721,6 +1749,9 @@ int __init early_acpi_boot_init(void)
+@@ -1721,6 +1749,9 @@
  
  int __init acpi_boot_init(void)
  {
@@ -85848,10 +85832,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/boot.c linux-2.6.27.19-5.1/arch/x86
        /*
         * If acpi_disabled, bail out
         * One exception: acpi=ht continues far enough to enumerate LAPICs
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/cstate.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/cstate.c
---- linux-2.6.27/arch/x86/kernel/acpi/cstate.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/cstate.c  2009-03-25 16:10:44.000000000 +0000
-@@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_e
+diff -r 9608d5473017 arch/x86/kernel/acpi/cstate.c
+--- a/arch/x86/kernel/acpi/cstate.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/cstate.c    Wed May 06 16:56:09 2009 +0100
+@@ -56,6 +56,7 @@
  static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
  
  #define MWAIT_SUBSTATE_MASK   (0xf)
@@ -85859,7 +85843,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/cstate.c linux-2.6.27.19-5.1/arch/x
  #define MWAIT_SUBSTATE_SIZE   (4)
  
  #define CPUID_MWAIT_LEAF (5)
-@@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsi
+@@ -98,7 +99,8 @@
        cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
  
        /* Check whether this particular cx_type (in CST) is supported or not */
@@ -85869,10 +85853,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/cstate.c linux-2.6.27.19-5.1/arch/x
        edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
        num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
  
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor.c
---- linux-2.6.27/arch/x86/kernel/acpi/processor.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor.c       2009-03-25 16:10:44.000000000 +0000
-@@ -75,7 +75,18 @@ static void init_intel_pdc(struct acpi_p
+diff -r 9608d5473017 arch/x86/kernel/acpi/processor.c
+--- a/arch/x86/kernel/acpi/processor.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/processor.c Wed May 06 16:56:09 2009 +0100
+@@ -75,7 +75,18 @@
  /* Initialize _PDC data based on the CPU vendor */
  void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
  {
@@ -85891,9 +85875,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor.c linux-2.6.27.19-5.1/arc
  
        pr->pdc = NULL;
        if (c->x86_vendor == X86_VENDOR_INTEL)
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor_extcntl_xen.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor_extcntl_xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/processor_extcntl_xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/processor_extcntl_xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/acpi/processor_extcntl_xen.c     Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,220 @@
 +/*
 + * processor_extcntl_xen.c - interface to notify Xen
@@ -86115,9 +86099,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/processor_extcntl_xen.c linux-2.6.2
 +
 +      return HYPERVISOR_platform_op(&op) == 0 ? op.u.get_cpu_freq.freq : 0;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/sleep-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/acpi/sleep-xen.c Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,177 @@
 +/*
 + * sleep.c - x86-specific ACPI sleep support.
@@ -86296,9 +86280,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep-xen.c linux-2.6.27.19-5.1/arc
 +
 +__setup("acpi_sleep=", acpi_sleep_setup);
 +#endif /* CONFIG_ACPI_PV_SLEEP */
-diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep.c linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep.c
---- linux-2.6.27/arch/x86/kernel/acpi/sleep.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/acpi/sleep.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/acpi/sleep.c
+--- a/arch/x86/kernel/acpi/sleep.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/acpi/sleep.c     Wed May 06 16:56:09 2009 +0100
 @@ -10,6 +10,7 @@
  #include <linux/dmi.h>
  #include <linux/cpumask.h>
@@ -86307,7 +86291,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep.c linux-2.6.27.19-5.1/arch/x8
  
  #include "realmode/wakeup.h"
  #include "sleep.h"
-@@ -98,6 +99,8 @@ int acpi_save_state_mem(void)
+@@ -98,6 +99,8 @@
        header->trampoline_segment = setup_trampoline() >> 4;
  #ifdef CONFIG_SMP
        stack_start.sp = temp_stack + 4096;
@@ -86316,10 +86300,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/acpi/sleep.c linux-2.6.27.19-5.1/arch/x8
  #endif
        initial_code = (unsigned long)wakeup_long64;
        saved_magic = 0x123456789abcdef0;
-diff -purN linux-2.6.27/arch/x86/kernel/alternative.c linux-2.6.27.19-5.1/arch/x86/kernel/alternative.c
---- linux-2.6.27/arch/x86/kernel/alternative.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/alternative.c  2009-03-25 16:10:44.000000000 +0000
-@@ -444,7 +444,7 @@ void __init alternative_instructions(voi
+diff -r 9608d5473017 arch/x86/kernel/alternative.c
+--- a/arch/x86/kernel/alternative.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/alternative.c    Wed May 06 16:56:09 2009 +0100
+@@ -444,7 +444,7 @@
                                            _text, _etext);
  
                /* Only switch to UP mode if we don't immediately boot others */
@@ -86328,10 +86312,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/alternative.c linux-2.6.27.19-5.1/arch/x
                        alternatives_smp_switch(0);
        }
  #endif
-diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu.c linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu.c
---- linux-2.6.27/arch/x86/kernel/amd_iommu.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu.c    2009-03-25 16:10:44.000000000 +0000
-@@ -235,7 +235,7 @@ static int iommu_map(struct protection_d
+diff -r 9608d5473017 arch/x86/kernel/amd_iommu.c
+--- a/arch/x86/kernel/amd_iommu.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/amd_iommu.c      Wed May 06 16:56:09 2009 +0100
+@@ -235,7 +235,7 @@
        u64 __pte, *pte, *page;
  
        bus_addr  = PAGE_ALIGN(bus_addr);
@@ -86340,7 +86324,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu.c linux-2.6.27.19-5.1/arch/x86
  
        /* only support 512GB address spaces for now */
        if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))
-@@ -487,7 +487,7 @@ static void dma_ops_free_pagetable(struc
+@@ -487,7 +487,7 @@
                        continue;
  
                p2 = IOMMU_PTE_PAGE(p1[i]);
@@ -86349,10 +86333,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu.c linux-2.6.27.19-5.1/arch/x86
                        if (!IOMMU_PTE_PRESENT(p2[j]))
                                continue;
                        p3 = IOMMU_PTE_PAGE(p2[j]);
-diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu_init.c linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu_init.c
---- linux-2.6.27/arch/x86/kernel/amd_iommu_init.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/amd_iommu_init.c       2009-03-25 16:10:44.000000000 +0000
-@@ -120,7 +120,7 @@ u16 amd_iommu_last_bdf;                    /* largest PCI
+diff -r 9608d5473017 arch/x86/kernel/amd_iommu_init.c
+--- a/arch/x86/kernel/amd_iommu_init.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/amd_iommu_init.c Wed May 06 16:56:09 2009 +0100
+@@ -120,7 +120,7 @@
  LIST_HEAD(amd_iommu_unity_map);               /* a list of required unity mappings
                                           we find in ACPI */
  unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */
@@ -86361,7 +86345,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu_init.c linux-2.6.27.19-5.1/arc
  
  LIST_HEAD(amd_iommu_list);            /* list of all AMD IOMMUs in the
                                           system */
-@@ -210,7 +210,7 @@ static void __init iommu_set_exclusion_r
+@@ -210,7 +210,7 @@
  /* Programs the physical address of the device table into the IOMMU hardware */
  static void __init iommu_set_device_table(struct amd_iommu *iommu)
  {
@@ -86370,18 +86354,18 @@ diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu_init.c linux-2.6.27.19-5.1/arc
  
        BUG_ON(iommu->mmio_base == NULL);
  
-@@ -407,6 +407,10 @@ static u8 * __init alloc_command_buffer(
+@@ -406,6 +406,10 @@
+       entry |= MMIO_CMD_SIZE_512;
        memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
                        &entry, sizeof(entry));
++
 +      /* set head and tail to zero manually */
 +      writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
 +      writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
-+
        iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
  
-       return cmd_buf;
-@@ -926,7 +930,8 @@ int __init amd_iommu_init(void)
+@@ -926,7 +930,8 @@
                goto free;
  
        /* IOMMU rlookup table - find the IOMMU for a specific device */
@@ -86391,9 +86375,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/amd_iommu_init.c linux-2.6.27.19-5.1/arc
                        get_order(rlookup_table_size));
        if (amd_iommu_rlookup_table == NULL)
                goto free;
-diff -purN linux-2.6.27/arch/x86/kernel/apic_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_32-xen.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/apic_32-xen.c    Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,52 @@
 +/*
 + *    Local APIC handling stubs
@@ -86447,9 +86431,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32-xen.c linux-2.6.27.19-5.1/arch/x
 +      return 0;
 +}
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_32.c
---- linux-2.6.27/arch/x86/kernel/apic_32.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_32.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_32.c
+--- a/arch/x86/kernel/apic_32.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apic_32.c        Wed May 06 16:56:09 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/acpi_pmtmr.h>
  #include <linux/module.h>
@@ -86458,7 +86442,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  
  #include <asm/atomic.h>
  #include <asm/smp.h>
-@@ -145,13 +146,13 @@ static int modern_apic(void)
+@@ -145,13 +146,13 @@
        return lapic_get_version() >= 0x14;
  }
  
@@ -86474,10 +86458,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  {
        u32 send_status;
        int timeout;
-@@ -167,6 +168,34 @@ u32 safe_apic_wait_icr_idle(void)
+@@ -166,6 +167,34 @@
        return send_status;
  }
++
 +void xapic_icr_write(u32 low, u32 id)
 +{
 +      apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id));
@@ -86505,11 +86490,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
 +
 +struct apic_ops __read_mostly *apic_ops = &xapic_ops;
 +EXPORT_SYMBOL_GPL(apic_ops);
-+
  /**
   * enable_NMI_through_LVT0 - enable NMI through local vector table 0
-  */
-@@ -291,7 +320,7 @@ static void lapic_timer_setup(enum clock
+@@ -291,7 +320,7 @@
  static void lapic_timer_broadcast(cpumask_t mask)
  {
  #ifdef CONFIG_SMP
@@ -86518,7 +86502,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  #endif
  }
  
-@@ -669,6 +698,7 @@ u8 setup_APIC_eilvt_ibs(u8 vector, u8 ms
+@@ -669,6 +698,7 @@
        setup_APIC_eilvt(APIC_EILVT_LVTOFF_IBS, vector, msg_type, mask);
        return APIC_EILVT_LVTOFF_IBS;
  }
@@ -86526,7 +86510,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  
  /*
   * Local APIC start and shutdown
-@@ -1115,7 +1145,7 @@ static int __init detect_init_APIC(void)
+@@ -1115,7 +1145,7 @@
        switch (boot_cpu_data.x86_vendor) {
        case X86_VENDOR_AMD:
                if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
@@ -86535,7 +86519,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
                        break;
                goto no_apic;
        case X86_VENDOR_INTEL:
-@@ -1205,7 +1235,7 @@ void __init init_apic_mappings(void)
+@@ -1205,7 +1235,7 @@
         * default configuration (or the MP table is broken).
         */
        if (boot_cpu_physical_apicid == -1U)
@@ -86544,7 +86528,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  
  }
  
-@@ -1242,7 +1272,7 @@ int __init APIC_init_uniprocessor(void)
+@@ -1242,7 +1272,7 @@
         * might be zero if read from MP tables. Get it from LAPIC.
         */
  #ifdef CONFIG_CRASH_DUMP
@@ -86553,7 +86537,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
  #endif
        physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
  
-@@ -1316,8 +1346,10 @@ void smp_error_interrupt(struct pt_regs 
+@@ -1316,8 +1346,10 @@
           6: Received illegal vector
           7: Illegal register address
        */
@@ -86564,19 +86548,19 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_32.c linux-2.6.27.19-5.1/arch/x86/k
        irq_exit();
  }
  
-@@ -1367,6 +1399,9 @@ void __init apic_intr_init(void)
+@@ -1366,6 +1398,9 @@
+       /* thermal monitor LVT interrupt */
  #ifdef CONFIG_X86_MCE_P4THERMAL
        alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
- #endif
++#endif
 +#ifdef CONFIG_PERFMON
 +      set_intr_gate(LOCAL_PERFMON_VECTOR, pmu_interrupt);
-+#endif
+ #endif
  }
  
- /**
-diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/apic_64.c
---- linux-2.6.27/arch/x86/kernel/apic_64.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apic_64.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/apic_64.c
+--- a/arch/x86/kernel/apic_64.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apic_64.c        Wed May 06 16:56:09 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/clockchips.h>
  #include <linux/acpi_pmtmr.h>
@@ -86605,7 +86589,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  
  /* Local APIC timer works in C2 */
  int local_apic_timer_c2_ok;
-@@ -118,13 +125,13 @@ static int modern_apic(void)
+@@ -118,13 +125,13 @@
        return lapic_get_version() >= 0x14;
  }
  
@@ -86621,10 +86605,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  {
        u32 send_status;
        int timeout;
-@@ -140,6 +147,70 @@ u32 safe_apic_wait_icr_idle(void)
+@@ -139,6 +146,70 @@
        return send_status;
  }
++
 +void xapic_icr_write(u32 low, u32 id)
 +{
 +      apic_write(APIC_ICR2, id << 24);
@@ -86688,11 +86673,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
 +      .wait_icr_idle = x2apic_wait_icr_idle,
 +      .safe_wait_icr_idle = safe_x2apic_wait_icr_idle,
 +};
-+
  /**
   * enable_NMI_through_LVT0 - enable NMI through local vector table 0
-  */
-@@ -228,6 +299,7 @@ u8 setup_APIC_eilvt_ibs(u8 vector, u8 ms
+@@ -228,6 +299,7 @@
        setup_APIC_eilvt(APIC_EILVT_LVTOFF_IBS, vector, msg_type, mask);
        return APIC_EILVT_LVTOFF_IBS;
  }
@@ -86700,7 +86684,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  
  /*
   * Program the next event, relative to now
-@@ -280,7 +352,7 @@ static void lapic_timer_setup(enum clock
+@@ -280,7 +352,7 @@
  static void lapic_timer_broadcast(cpumask_t mask)
  {
  #ifdef CONFIG_SMP
@@ -86709,7 +86693,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  #endif
  }
  
-@@ -629,10 +701,10 @@ int __init verify_local_APIC(void)
+@@ -629,10 +701,10 @@
        /*
         * The ID register is read/write in a real APIC.
         */
@@ -86722,7 +86706,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
        apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
        apic_write(APIC_ID, reg0);
        if (reg1 != (reg0 ^ APIC_ID_MASK))
-@@ -833,6 +905,132 @@ void __cpuinit end_local_APIC_setup(void
+@@ -833,6 +905,132 @@
        apic_pm_activate();
  }
  
@@ -86855,7 +86839,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  /*
   * Detect and enable local APICs on non-SMP boards.
   * Original code written by Keir Fraser.
-@@ -872,7 +1070,7 @@ void __init early_init_lapic_mapping(voi
+@@ -872,7 +1070,7 @@
         * Fetch the APIC ID of the BSP in case we have a
         * default configuration (or the MP table is broken).
         */
@@ -86864,7 +86848,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  }
  
  /**
-@@ -880,6 +1078,11 @@ void __init early_init_lapic_mapping(voi
+@@ -880,6 +1078,11 @@
   */
  void __init init_apic_mappings(void)
  {
@@ -86876,7 +86860,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
        /*
         * If no local APIC can be found then set up a fake all
         * zeroes page to simulate the local APIC and another
-@@ -899,7 +1102,7 @@ void __init init_apic_mappings(void)
+@@ -899,7 +1102,7 @@
         * Fetch the APIC ID of the BSP in case we have a
         * default configuration (or the MP table is broken).
         */
@@ -86885,17 +86869,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  }
  
  /*
-@@ -918,6 +1121,9 @@ int __init APIC_init_uniprocessor(void)
+@@ -917,6 +1120,9 @@
+               printk(KERN_INFO "Apic disabled by BIOS\n");
                return -1;
        }
++
 +      enable_IR_x2apic();
 +      setup_apic_routing();
-+
        verify_local_APIC();
  
-       connect_bsp_APIC();
-@@ -998,8 +1204,10 @@ asmlinkage void smp_error_interrupt(void
+@@ -998,8 +1204,10 @@
           6: Received illegal vector
           7: Illegal register address
        */
@@ -86906,7 +86890,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
        irq_exit();
  }
  
-@@ -1093,6 +1301,11 @@ void __cpuinit generic_processor_info(in
+@@ -1093,6 +1301,11 @@
        cpu_set(cpu, cpu_present_map);
  }
  
@@ -86918,7 +86902,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  /*
   * Power management
   */
-@@ -1129,7 +1342,7 @@ static int lapic_suspend(struct sys_devi
+@@ -1129,7 +1342,7 @@
  
        maxlvt = lapic_get_maxlvt();
  
@@ -86927,7 +86911,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
        apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
        apic_pm_state.apic_ldr = apic_read(APIC_LDR);
        apic_pm_state.apic_dfr = apic_read(APIC_DFR);
-@@ -1164,10 +1377,14 @@ static int lapic_resume(struct sys_devic
+@@ -1164,10 +1377,14 @@
        maxlvt = lapic_get_maxlvt();
  
        local_irq_save(flags);
@@ -86946,7 +86930,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
        apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED);
        apic_write(APIC_ID, apic_pm_state.apic_id);
        apic_write(APIC_DFR, apic_pm_state.apic_dfr);
-@@ -1307,6 +1524,15 @@ __cpuinit int apic_is_clustered_box(void
+@@ -1307,6 +1524,15 @@
        return (clusters > 2);
  }
  
@@ -86962,10 +86946,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/apic_64.c linux-2.6.27.19-5.1/arch/x86/k
  /*
   * APIC command line parameters
   */
-diff -purN linux-2.6.27/arch/x86/kernel/apm_32.c linux-2.6.27.19-5.1/arch/x86/kernel/apm_32.c
---- linux-2.6.27/arch/x86/kernel/apm_32.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/apm_32.c       2009-03-25 16:10:44.000000000 +0000
-@@ -389,6 +389,7 @@ static int smp __read_mostly;
+diff -r 9608d5473017 arch/x86/kernel/apm_32.c
+--- a/arch/x86/kernel/apm_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/apm_32.c Wed May 06 16:56:09 2009 +0100
+@@ -389,6 +389,7 @@
  static int apm_disabled = -1;
  #ifdef CONFIG_SMP
  static int power_off;
@@ -86973,7 +86957,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apm_32.c linux-2.6.27.19-5.1/arch/x86/ke
  #else
  static int power_off = 1;
  #endif
-@@ -1797,6 +1798,14 @@ static int apm(void *unused)
+@@ -1797,6 +1798,14 @@
                }
        }
  
@@ -86988,7 +86972,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/apm_32.c linux-2.6.27.19-5.1/arch/x86/ke
        /* Install our power off handler.. */
        if (power_off)
                pm_power_off = apm_power_off;
-@@ -1840,8 +1849,12 @@ static int __init apm_setup(char *str)
+@@ -1840,8 +1849,12 @@
                if (strncmp(str, "debug", 5) == 0)
                        debug = !invert;
                if ((strncmp(str, "power-off", 9) == 0) ||
@@ -87002,9 +86986,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/apm_32.c linux-2.6.27.19-5.1/arch/x86/ke
                if (strncmp(str, "smp", 3) == 0) {
                        smp = !invert;
                        idle_threshold = 100;
-diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_32.c
---- linux-2.6.27/arch/x86/kernel/asm-offsets_32.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_32.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/asm-offsets_32.c
+--- a/arch/x86/kernel/asm-offsets_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/asm-offsets_32.c Wed May 06 16:56:09 2009 +0100
 @@ -19,10 +19,14 @@
  #include <asm/bootparam.h>
  #include <asm/elf.h>
@@ -87020,7 +87004,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arc
  
  /* workaround for a warning with -Wmissing-prototypes */
  void foo(void);
-@@ -54,6 +58,7 @@ void foo(void)
+@@ -54,6 +58,7 @@
        OFFSET(TI_exec_domain, thread_info, exec_domain);
        OFFSET(TI_flags, thread_info, flags);
        OFFSET(TI_status, thread_info, status);
@@ -87028,7 +87012,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arc
        OFFSET(TI_preempt_count, thread_info, preempt_count);
        OFFSET(TI_addr_limit, thread_info, addr_limit);
        OFFSET(TI_restart_block, thread_info, restart_block);
-@@ -91,9 +96,14 @@ void foo(void)
+@@ -91,9 +96,14 @@
        OFFSET(pbe_orig_address, pbe, orig_address);
        OFFSET(pbe_next, pbe, next);
  
@@ -87044,7 +87028,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arc
  
        DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
        DEFINE(PAGE_SHIFT_asm, PAGE_SHIFT);
-@@ -115,7 +125,7 @@ void foo(void)
+@@ -115,7 +125,7 @@
        OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
  #endif
  
@@ -87053,10 +87037,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_32.c linux-2.6.27.19-5.1/arc
        BLANK();
        OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
        OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
-diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_64.c linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_64.c
---- linux-2.6.27/arch/x86/kernel/asm-offsets_64.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/asm-offsets_64.c       2009-03-25 16:10:44.000000000 +0000
-@@ -122,8 +122,10 @@ int main(void)
+diff -r 9608d5473017 arch/x86/kernel/asm-offsets_64.c
+--- a/arch/x86/kernel/asm-offsets_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/asm-offsets_64.c Wed May 06 16:56:09 2009 +0100
+@@ -122,8 +122,10 @@
        ENTRY(cr8);
        BLANK();
  #undef ENTRY
@@ -87067,7 +87051,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_64.c linux-2.6.27.19-5.1/arc
        DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
        BLANK();
        DEFINE(__NR_syscall_max, sizeof(syscalls) - 1);
-@@ -136,7 +138,7 @@ int main(void)
+@@ -136,7 +138,7 @@
  
        BLANK();
        DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
@@ -87076,18 +87060,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/asm-offsets_64.c linux-2.6.27.19-5.1/arc
        BLANK();
        OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
        OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
-diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/kernel/bios_uv.c
---- linux-2.6.27/arch/x86/kernel/bios_uv.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/bios_uv.c      2009-03-25 16:10:44.000000000 +0000
-@@ -1,8 +1,6 @@
+diff -r 9608d5473017 arch/x86/kernel/bios_uv.c
+--- a/arch/x86/kernel/bios_uv.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/bios_uv.c        Wed May 06 16:56:09 2009 +0100
+@@ -1,7 +1,5 @@
  /*
   * BIOS run time interface routines.
-  *
-- *  Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
 - *
+- *  Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
+  *
   *  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
 @@ -16,33 +14,180 @@
   *  You should have received a copy of the GNU General Public License
   *  along with this program; if not, write to the Free Software
@@ -87128,20 +87111,29 @@ diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/k
 +
 +      return efi_call6((void *)__va(tab->function),
 +                                      (u64)which, a1, a2, a3, a4, a5);
-+}
-+
+ }
+-long
+-x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
+-                 unsigned long *drift_info)
 +s64 uv_bios_call_irqsave(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
 +                                      u64 a4, u64 a5)
-+{
+ {
+-      struct uv_bios_retval isrv;
 +      unsigned long bios_flags;
 +      s64 ret;
-+
+-      BIOS_CALL(isrv, BIOS_FREQ_BASE, which, 0, 0, 0, 0, 0, 0);
+-      *ticks_per_second = isrv.v0;
+-      *drift_info = isrv.v1;
+-      return isrv.status;
 +      local_irq_save(bios_flags);
 +      ret = uv_bios_call(which, a1, a2, a3, a4, a5);
 +      local_irq_restore(bios_flags);
 +
 +      return ret;
-+}
+ }
+-EXPORT_SYMBOL_GPL(x86_bios_freq_base);
 +
 +s64 uv_bios_call_reentrant(enum uv_bios_cmd which, u64 a1, u64 a2, u64 a3,
 +                                      u64 a4, u64 a5)
@@ -87187,25 +87179,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/k
 +      if (region)
 +              *region = part.region_size;
 +      return ret;
- }
--long
--x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
--                 unsigned long *drift_info)
++}
++
 +int
 +uv_bios_mq_watchlist_alloc(int blade, void *mq, unsigned int mq_size,
 +                         unsigned long *intr_mmr_offset)
- {
--      struct uv_bios_retval isrv;
++{
 +      union uv_watchlist_u size_blade;
 +      unsigned long addr;
 +      u64 watchlist;
 +      s64 ret;
--      BIOS_CALL(isrv, BIOS_FREQ_BASE, which, 0, 0, 0, 0, 0, 0);
--      *ticks_per_second = isrv.v0;
--      *drift_info = isrv.v1;
--      return isrv.status;
++
 +      addr = uv_gpa(mq);
 +      size_blade.size = mq_size;
 +      size_blade.blade = blade;
@@ -87254,8 +87238,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/k
 +{
 +      return uv_bios_call(UV_BIOS_FREQ_BASE, clock_type,
 +                         (u64)ticks_per_second, 0, 0, 0);
- }
--EXPORT_SYMBOL_GPL(x86_bios_freq_base);
++}
 +EXPORT_SYMBOL_GPL(uv_bios_freq_base);
 +
 +
@@ -87289,9 +87272,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/bios_uv.c linux-2.6.27.19-5.1/arch/x86/k
 +void uv_bios_init(void) { }
 +#endif
 +
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/cpu/Makefile
---- linux-2.6.27/arch/x86/kernel/cpu/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/Makefile   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/Makefile
+--- a/arch/x86/kernel/cpu/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/Makefile     Wed May 06 16:56:09 2009 +0100
 @@ -4,6 +4,7 @@
  
  obj-y                 := intel_cacheinfo.o addon_cpuid_features.o
@@ -87300,25 +87283,25 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/Makefile linux-2.6.27.19-5.1/arch/x8
  
  obj-$(CONFIG_X86_32)  += common.o bugs.o
  obj-$(CONFIG_X86_64)  += common_64.o bugs_64.o
-@@ -22,3 +23,5 @@ obj-$(CONFIG_MTRR)   += mtrr/
+@@ -22,3 +23,5 @@
  obj-$(CONFIG_CPU_FREQ)        += cpufreq/
  
  obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
 +
 +disabled-obj-$(CONFIG_XEN) := hypervisor.o perfctr-watchdog.o vmware.o
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/addon_cpuid_features.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/addon_cpuid_features.c
---- linux-2.6.27/arch/x86/kernel/cpu/addon_cpuid_features.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/addon_cpuid_features.c     2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 arch/x86/kernel/cpu/addon_cpuid_features.c
+--- a/arch/x86/kernel/cpu/addon_cpuid_features.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/addon_cpuid_features.c       Wed May 06 16:56:09 2009 +0100
+@@ -6,6 +6,8 @@
  #include <asm/pat.h>
  #include <asm/processor.h>
-+#include <mach_apic.h>
 +
++#include <mach_apic.h>
  struct cpuid_bit {
        u16 feature;
-       u8 reg;
-@@ -48,6 +50,100 @@ void __cpuinit init_scattered_cpuid_feat
+@@ -48,6 +50,100 @@
        }
  }
  
@@ -87419,10 +87402,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/addon_cpuid_features.c linux-2.6.27.
  #ifdef CONFIG_X86_PAT
  void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
  {
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/amd_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/amd_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/amd_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/amd_64.c   2009-03-25 16:10:44.000000000 +0000
-@@ -193,6 +193,7 @@ static void __cpuinit init_amd(struct cp
+diff -r 9608d5473017 arch/x86/kernel/cpu/amd_64.c
+--- a/arch/x86/kernel/cpu/amd_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/amd_64.c     Wed May 06 16:56:09 2009 +0100
+@@ -193,6 +193,7 @@
                fam10h_check_enable_mmcfg();
        }
  
@@ -87430,7 +87413,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/amd_64.c linux-2.6.27.19-5.1/arch/x8
        if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
                unsigned long long tseg;
  
-@@ -211,6 +212,7 @@ static void __cpuinit init_amd(struct cp
+@@ -211,6 +212,7 @@
                        set_memory_4k((unsigned long)__va(tseg), 1);
                }
        }
@@ -87438,10 +87421,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/amd_64.c linux-2.6.27.19-5.1/arch/x8
  }
  
  static struct cpu_dev amd_cpu_dev __cpuinitdata = {
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/bugs_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/bugs_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/bugs_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/bugs_64.c  2009-03-25 16:10:44.000000000 +0000
-@@ -20,6 +20,7 @@ void __init check_bugs(void)
+diff -r 9608d5473017 arch/x86/kernel/cpu/bugs_64.c
+--- a/arch/x86/kernel/cpu/bugs_64.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/bugs_64.c    Wed May 06 16:56:09 2009 +0100
+@@ -20,6 +20,7 @@
  #endif
        alternative_instructions();
  
@@ -87449,15 +87432,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/bugs_64.c linux-2.6.27.19-5.1/arch/x
        /*
         * Make sure the first 2MB area is not mapped by huge pages
         * There are typically fixed size MTRRs in there and overlapping
-@@ -30,4 +31,5 @@ void __init check_bugs(void)
+@@ -30,4 +31,5 @@
         */
        if (!direct_gbpages)
                set_memory_4k((unsigned long)__va(0), 1);
 +#endif
  }
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/common-xen.c Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,759 @@
 +#include <linux/init.h>
 +#include <linux/string.h>
@@ -88218,9 +88201,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common-xen.c linux-2.6.27.19-5.1/arc
 +      per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
 +}
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common.c
---- linux-2.6.27/arch/x86/kernel/cpu/common.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common.c
+--- a/arch/x86/kernel/cpu/common.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/common.c     Wed May 06 16:56:09 2009 +0100
 @@ -5,6 +5,7 @@
  #include <linux/module.h>
  #include <linux/percpu.h>
@@ -88237,7 +88220,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common.c linux-2.6.27.19-5.1/arch/x8
  #ifdef CONFIG_X86_LOCAL_APIC
  #include <asm/mpspec.h>
  #include <asm/apic.h>
-@@ -505,6 +507,7 @@ static void __cpuinit identify_cpu(struc
+@@ -505,6 +507,7 @@
                                c->x86, c->x86_model);
        }
  
@@ -88245,7 +88228,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common.c linux-2.6.27.19-5.1/arch/x8
        /*
         * On SMP, boot_cpu_data holds the common feature set between
         * all CPUs; so make sure that we indicate which features are
-@@ -726,6 +729,8 @@ void __cpuinit cpu_init(void)
+@@ -726,6 +729,8 @@
        current_thread_info()->status = 0;
        clear_used_math();
        mxcsr_feature_mask_init();
@@ -88254,9 +88237,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common.c linux-2.6.27.19-5.1/arch/x8
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64-xen.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/common_64-xen.c      Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,774 @@
 +#include <linux/init.h>
 +#include <linux/kernel.h>
@@ -89032,9 +89015,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64-xen.c linux-2.6.27.19-5.1/
 +      if (is_uv_system())
 +              uv_cpu_init();
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/common_64.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/common_64.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/common_64.c
+--- a/arch/x86/kernel/cpu/common_64.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/common_64.c  Wed May 06 16:56:09 2009 +0100
 @@ -34,6 +34,7 @@
  #include <asm/sections.h>
  #include <asm/setup.h>
@@ -89043,17 +89026,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64.c linux-2.6.27.19-5.1/arch
  
  #include "cpu.h"
  
-@@ -128,6 +129,9 @@ void __cpuinit detect_ht(struct cpuinfo_
+@@ -127,6 +128,9 @@
+ #ifdef CONFIG_SMP
        u32 eax, ebx, ecx, edx;
        int index_msb, core_bits;
++
 +      if (cpu_has(c, X86_FEATURE_XTOPOLOGY))
 +              return;
-+
-       cpuid(1, &eax, &ebx, &ecx, &edx);
  
+       cpuid(1, &eax, &ebx, &ecx, &edx);
  
-@@ -384,6 +388,7 @@ static void __cpuinit identify_cpu(struc
+@@ -384,6 +388,7 @@
  
        detect_ht(c);
  
@@ -89061,7 +89044,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64.c linux-2.6.27.19-5.1/arch
        /*
         * On SMP, boot_cpu_data holds the common feature set between
         * all CPUs; so make sure that we indicate which features are
-@@ -636,6 +641,8 @@ void __cpuinit cpu_init(void)
+@@ -636,6 +641,8 @@
        barrier();
  
        check_efer();
@@ -89070,10 +89053,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/common_64.c linux-2.6.27.19-5.1/arch
  
        /*
         * set up and load the per-CPU TSS
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c     2009-03-25 16:10:44.000000000 +0000
-@@ -779,6 +779,9 @@ static int __init acpi_cpufreq_init(void
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c       Wed May 06 16:56:09 2009 +0100
+@@ -779,6 +779,9 @@
  {
        int ret;
  
@@ -89083,10 +89066,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.27.
        dprintk("acpi_cpufreq_init\n");
  
        ret = acpi_cpufreq_early_init();
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.c      2009-03-25 16:10:44.000000000 +0000
-@@ -116,9 +116,20 @@ static int query_current_values_with_pen
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c        Wed May 06 16:56:09 2009 +0100
+@@ -116,9 +116,20 @@
        u32 i = 0;
  
        if (cpu_family == CPU_HW_PSTATE) {
@@ -89110,7 +89093,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.1
                return 0;
        }
        do {
-@@ -916,10 +927,23 @@ static void powernow_k8_cpu_exit_acpi(st
+@@ -916,10 +927,23 @@
                acpi_processor_unregister_performance(&data->acpi_data, data->cpu);
  }
  
@@ -89134,7 +89117,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.1
  #endif /* CONFIG_X86_POWERNOW_K8_ACPI */
  
  /* Take a frequency, and issue the fid/vid transition command */
-@@ -1019,6 +1043,7 @@ static int powernowk8_target(struct cpuf
+@@ -1019,6 +1043,7 @@
        unsigned int newstate;
        int ret = -EIO;
  
@@ -89142,7 +89125,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.1
        if (!data)
                return -EINVAL;
  
-@@ -1117,6 +1142,7 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1117,6 +1142,7 @@
        }
  
        data->cpu = pol->cpu;
@@ -89150,43 +89133,43 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.c linux-2.6.27.1
  
        if (powernow_k8_cpu_init_acpi(data)) {
                /*
-@@ -1149,7 +1175,16 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1149,7 +1175,16 @@
                        kfree(data);
                        return -ENODEV;
                }
--      }
 +              /* Take a crude guess here.
 +               * That guess was in microseconds, so multiply with 1000 */
 +              pol->cpuinfo.transition_latency = (
 +                      ( (data->rvo + 8) * data->vstable * VST_UNITS_20US) +
 +                      (  (1 << data->irt) * 30)
 +                      ) * 1000;
-+      }
+       }
 +      else /* ACPI _PSS objects available */
 +              pol->cpuinfo.transition_latency =
 +                      get_transition_latency(data) * 1000;
  
        /* only run on specific CPU from here on */
        oldmask = current->cpus_allowed;
-@@ -1180,11 +1215,6 @@ static int __cpuinit powernowk8_cpu_init
+@@ -1179,11 +1214,6 @@
+       else
                pol->cpus = per_cpu(cpu_core_map, pol->cpu);
        data->available_cores = &(pol->cpus);
+-
 -      /* Take a crude guess here.
 -       * That guess was in microseconds, so multiply with 1000 */
 -      pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US)
 -          + (3 * (1 << data->irt) * 10)) * 1000;
--
        if (cpu_family == CPU_HW_PSTATE)
                pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
-       else
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
---- linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/cpufreq/powernow-k8.h      2009-03-25 16:10:44.000000000 +0000
-@@ -5,6 +5,19 @@
+diff -r 9608d5473017 arch/x86/kernel/cpu/cpufreq/powernow-k8.h
+--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h        Wed May 06 16:56:09 2009 +0100
+@@ -4,6 +4,19 @@
+  *  GNU general public license version 2. See "COPYING" or
   *  http://www.gnu.org/licenses/gpl.html
   */
++
 +
 +enum pstate {
 +      HW_PSTATE_INVALID = 0xff,
@@ -89199,11 +89182,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h linux-2.6.27.1
 +      HW_PSTATE_6 = 6,
 +      HW_PSTATE_7 = 7,
 +};
-+
  struct powernow_k8_data {
        unsigned int cpu;
-@@ -23,7 +36,9 @@ struct powernow_k8_data {
+@@ -23,7 +36,9 @@
          u32 exttype; /* extended interface = 1 */
  
        /* keep track of the current fid / vid or pstate */
@@ -89214,10 +89196,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/cpufreq/powernow-k8.h linux-2.6.27.1
  
        /* the powernow_table includes all frequency and vid/fid pairings:
         * fid are the lower 8 bits of the index, vid are the upper 8 bits.
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/feature_names.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/feature_names.c
---- linux-2.6.27/arch/x86/kernel/cpu/feature_names.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/feature_names.c    2009-03-25 16:10:44.000000000 +0000
-@@ -46,7 +46,7 @@ const char * const x86_cap_flags[NCAPINT
+diff -r 9608d5473017 arch/x86/kernel/cpu/feature_names.c
+--- a/arch/x86/kernel/cpu/feature_names.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/feature_names.c      Wed May 06 16:56:09 2009 +0100
+@@ -46,7 +46,7 @@
        /* Intel-defined (#2) */
        "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
        "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
@@ -89226,9 +89208,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/feature_names.c linux-2.6.27.19-5.1/
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  
        /* VIA/Cyrix/Centaur-defined */
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/hypervisor.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/hypervisor.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/hypervisor.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/hypervisor.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/hypervisor.c Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + * Common hypervisor code
@@ -89287,10 +89269,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/hypervisor.c linux-2.6.27.19-5.1/arc
 +      detect_hypervisor_vendor(c);
 +      hypervisor_set_feature_bits(c);
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel.c
---- linux-2.6.27/arch/x86/kernel/cpu/intel.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel.c    2009-03-25 16:10:44.000000000 +0000
-@@ -138,6 +138,13 @@ static void __cpuinit init_intel(struct 
+diff -r 9608d5473017 arch/x86/kernel/cpu/intel.c
+--- a/arch/x86/kernel/cpu/intel.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/intel.c      Wed May 06 16:56:09 2009 +0100
+@@ -138,6 +138,13 @@
        }
  #endif
  
@@ -89304,7 +89286,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel.c linux-2.6.27.19-5.1/arch/x86
        l2 = init_intel_cacheinfo(c);
        if (c->cpuid_level > 9) {
                unsigned eax = cpuid_eax(10);
-@@ -183,9 +190,14 @@ static void __cpuinit init_intel(struct 
+@@ -183,9 +190,14 @@
        if (p)
                strcpy(c->x86_model_id, p);
  
@@ -89322,10 +89304,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel.c linux-2.6.27.19-5.1/arch/x86
  
        /* Work around errata */
        Intel_errata_workarounds(c);
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel_64.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel_64.c
---- linux-2.6.27/arch/x86/kernel/cpu/intel_64.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/intel_64.c 2009-03-25 16:10:44.000000000 +0000
-@@ -54,6 +54,7 @@ static void __cpuinit srat_detect_node(v
+diff -r 9608d5473017 arch/x86/kernel/cpu/intel_64.c
+--- a/arch/x86/kernel/cpu/intel_64.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/intel_64.c   Wed May 06 16:56:09 2009 +0100
+@@ -54,6 +54,7 @@
  
  static void __cpuinit init_intel(struct cpuinfo_x86 *c)
  {
@@ -89333,7 +89315,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel_64.c linux-2.6.27.19-5.1/arch/
        init_intel_cacheinfo(c);
        if (c->cpuid_level > 9) {
                unsigned eax = cpuid_eax(10);
-@@ -80,7 +81,9 @@ static void __cpuinit init_intel(struct 
+@@ -80,7 +81,9 @@
        if (c->x86 == 6)
                set_cpu_cap(c, X86_FEATURE_REP_GOOD);
        set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
@@ -89344,17 +89326,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/intel_64.c linux-2.6.27.19-5.1/arch/
  
        srat_detect_node();
  }
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/mtrr/Makefile linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/Makefile
---- linux-2.6.27/arch/x86/kernel/cpu/mtrr/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/Makefile      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/mtrr/Makefile
+--- a/arch/x86/kernel/cpu/mtrr/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/cpu/mtrr/Makefile        Wed May 06 16:56:09 2009 +0100
 @@ -1,3 +1,4 @@
  obj-y         := main.o if.o generic.o state.o
  obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
  
 +obj-$(CONFIG_XEN) := main.o if.o
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/mtrr/main-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/main-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/mtrr/main-xen.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/mtrr/main-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/mtrr/main-xen.c      Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,330 @@
 +#include <linux/init.h>
 +#include <linux/proc_fs.h>
@@ -89686,9 +89668,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/mtrr/main-xen.c linux-2.6.27.19-5.1/
 +}
 +
 +subsys_initcall(mtrr_init);
-diff -purN linux-2.6.27/arch/x86/kernel/cpu/vmware.c linux-2.6.27.19-5.1/arch/x86/kernel/cpu/vmware.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/cpu/vmware.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/cpu/vmware.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/cpu/vmware.c     Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,111 @@
 +/*
 + * VMware Detection code.
@@ -89801,9 +89783,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/cpu/vmware.c linux-2.6.27.19-5.1/arch/x8
 +      set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
 +      set_cpu_cap(c, X86_FEATURE_TSC_RELIABLE);
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/kernel/crash.c
---- linux-2.6.27/arch/x86/kernel/crash.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/crash.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/crash.c
+--- a/arch/x86/kernel/crash.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/crash.c  Wed May 06 16:56:09 2009 +0100
 @@ -29,19 +29,45 @@
  
  #include <mach_ipi.h>
@@ -89850,7 +89832,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
        int cpu;
  
        if (val != DIE_NMI_IPI)
-@@ -56,6 +82,9 @@ static int crash_nmi_callback(struct not
+@@ -56,6 +82,9 @@
         */
        if (cpu == crashing_cpu)
                return NOTIFY_STOP;
@@ -89860,7 +89842,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
        local_irq_disable();
  
  #ifdef CONFIG_X86_32
-@@ -71,22 +100,57 @@ static int crash_nmi_callback(struct not
+@@ -71,22 +100,57 @@
        halt();
        for (;;)
                cpu_relax();
@@ -89922,7 +89904,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
  static void nmi_shootdown_cpus(void)
  {
        unsigned long msecs;
-@@ -111,12 +175,23 @@ static void nmi_shootdown_cpus(void)
+@@ -111,12 +175,23 @@
        /* Leave the nmi callback set */
        disable_local_APIC();
  }
@@ -89948,7 +89930,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
  
  void native_machine_crash_shutdown(struct pt_regs *regs)
  {
-@@ -131,6 +206,7 @@ void native_machine_crash_shutdown(struc
+@@ -131,6 +206,7 @@
        /* The kernel is broken so disable interrupts */
        local_irq_disable();
  
@@ -89956,7 +89938,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
        /* Make a note of crashing cpu. Will be used in NMI callback.*/
        crashing_cpu = safe_smp_processor_id();
        nmi_shootdown_cpus();
-@@ -138,8 +214,39 @@ void native_machine_crash_shutdown(struc
+@@ -138,8 +214,39 @@
  #if defined(CONFIG_X86_IO_APIC)
        disable_IO_APIC();
  #endif
@@ -89996,9 +89978,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/crash.c linux-2.6.27.19-5.1/arch/x86/ker
 +      crash_save_cpu(regs,safe_smp_processor_id());
 +}
 +#endif /* CONFIG_KDB_KDUMP */
-diff -purN linux-2.6.27/arch/x86/kernel/e820-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/e820-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/e820-xen.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/e820-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/e820-xen.c       Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,1490 @@
 +/*
 + * Handle the memory map.
@@ -91490,10 +91472,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/e820-xen.c linux-2.6.27.19-5.1/arch/x86/
 +      printk(KERN_INFO "Xen-provided physical RAM map:\n");
 +      e820_print_map(who);
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/x86/kernel/early-quirks.c
---- linux-2.6.27/arch/x86/kernel/early-quirks.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early-quirks.c 2009-03-25 16:10:44.000000000 +0000
-@@ -95,6 +95,99 @@ static void __init nvidia_bugs(int num, 
+diff -r 9608d5473017 arch/x86/kernel/early-quirks.c
+--- a/arch/x86/kernel/early-quirks.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/early-quirks.c   Wed May 06 16:56:09 2009 +0100
+@@ -95,6 +95,99 @@
  
  }
  
@@ -91593,7 +91575,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/
  #define QFLAG_APPLY_ONCE      0x1
  #define QFLAG_APPLIED         0x2
  #define QFLAG_DONE            (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
-@@ -107,6 +200,12 @@ struct chipset {
+@@ -107,6 +200,12 @@
        void (*f)(int num, int slot, int func);
  };
  
@@ -91606,7 +91588,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/
  static struct chipset early_qrk[] __initdata = {
        { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
          PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
-@@ -114,6 +213,10 @@ static struct chipset early_qrk[] __init
+@@ -114,6 +213,10 @@
          PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
        { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
          PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
@@ -91617,7 +91599,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/
        {}
  };
  
-@@ -169,17 +272,17 @@ static int __init check_dev_quirk(int nu
+@@ -169,17 +272,17 @@
  
  void __init early_quirks(void)
  {
@@ -91643,9 +91625,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/early-quirks.c linux-2.6.27.19-5.1/arch/
 +                              break;
 +              }
  }
-diff -purN linux-2.6.27/arch/x86/kernel/early_printk-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/early_printk-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early_printk-xen.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/early_printk-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/early_printk-xen.c       Wed May 06 16:56:09 2009 +0100
 @@ -0,0 +1,1041 @@
 +#include <linux/console.h>
 +#include <linux/kernel.h>
@@ -92688,9 +92670,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk-xen.c linux-2.6.27.19-5.1/a
 +}
 +
 +early_param("earlyprintk", setup_early_printk);
-diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/x86/kernel/early_printk.c
---- linux-2.6.27/arch/x86/kernel/early_printk.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/early_printk.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/early_printk.c
+--- a/arch/x86/kernel/early_printk.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/early_printk.c   Wed May 06 16:56:09 2009 +0100
 @@ -3,11 +3,19 @@
  #include <linux/init.h>
  #include <linux/string.h>
@@ -92711,7 +92693,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
  
  /* Simple VGA output */
  #define VGABASE               (__ISA_IO_base + 0xb8000)
-@@ -78,6 +86,7 @@ static int early_serial_base = 0x3f8;  /
+@@ -78,6 +86,7 @@
  static int early_serial_putc(unsigned char ch)
  {
        unsigned timeout = 0xffff;
@@ -92719,7 +92701,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
        while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout)
                cpu_relax();
        outb(ch, early_serial_base + TXR);
-@@ -151,6 +160,721 @@ static struct console early_serial_conso
+@@ -151,6 +160,721 @@
        .index =        -1,
  };
  
@@ -93441,7 +93423,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
  /* Console interface to a host file on AMD's SimNow! */
  
  static int simnow_fd;
-@@ -165,6 +889,7 @@ enum {
+@@ -165,6 +889,7 @@
  static noinline long simnow(long cmd, long a, long b, long c)
  {
        long ret;
@@ -93449,7 +93431,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
        asm volatile("cpuid" :
                     "=a" (ret) :
                     "b" (a), "c" (b), "d" (c), "0" (MAGIC1), "D" (cmd + MAGIC2));
-@@ -174,6 +899,7 @@ static noinline long simnow(long cmd, lo
+@@ -174,6 +899,7 @@
  static void __init simnow_init(char *str)
  {
        char *fn = "klog";
@@ -93457,7 +93439,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
        if (*str == '=')
                fn = ++str;
        /* error ignored */
-@@ -208,10 +934,11 @@ asmlinkage void early_printk(const char 
+@@ -208,10 +934,11 @@
        va_end(ap);
  }
  
@@ -93470,7 +93452,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
        if (!buf)
                return 0;
  
-@@ -219,8 +946,7 @@ static int __init setup_early_printk(cha
+@@ -219,8 +946,7 @@
                return 0;
        early_console_initialized = 1;
  
@@ -93480,7 +93462,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
  
        if (!strncmp(buf, "serial", 6)) {
                early_serial_init(buf + 6);
-@@ -238,6 +964,17 @@ static int __init setup_early_printk(cha
+@@ -238,6 +964,17 @@
                simnow_init(buf + 6);
                early_console = &simnow_console;
                keep_early = 1;
@@ -93498,7 +93480,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
  #ifdef CONFIG_HVC_XEN
        } else if (!strncmp(buf, "xen", 3)) {
                early_console = &xenboot_console;
-@@ -251,4 +988,23 @@ static int __init setup_early_printk(cha
+@@ -251,4 +988,23 @@
        register_console(early_console);
        return 0;
  }
@@ -93522,10 +93504,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/early_printk.c linux-2.6.27.19-5.1/arch/
 +}
 +
  early_param("earlyprintk", setup_early_printk);
-diff -purN linux-2.6.27/arch/x86/kernel/efi.c linux-2.6.27.19-5.1/arch/x86/kernel/efi.c
---- linux-2.6.27/arch/x86/kernel/efi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/efi.c  2009-03-25 16:10:44.000000000 +0000
-@@ -367,6 +367,10 @@ void __init efi_init(void)
+diff -r 9608d5473017 arch/x86/kernel/efi.c
+--- a/arch/x86/kernel/efi.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/efi.c    Wed May 06 16:56:10 2009 +0100
+@@ -367,6 +367,10 @@
                        efi.smbios = config_tables[i].table;
                        printk(" SMBIOS=0x%lx ", config_tables[i].table);
                } else if (!efi_guidcmp(config_tables[i].guid,
@@ -93536,9 +93518,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/efi.c linux-2.6.27.19-5.1/arch/x86/kerne
                                        HCDP_TABLE_GUID)) {
                        efi.hcdp = config_tables[i].table;
                        printk(" HCDP=0x%lx ", config_tables[i].table);
-diff -purN linux-2.6.27/arch/x86/kernel/entry_32-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_32-xen.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_32-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/entry_32-xen.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/entry_32-xen.S   Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1537 @@
 +/*
 + *
@@ -95077,10 +95059,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32-xen.S linux-2.6.27.19-5.1/arch/
 +#undef        sys_fork
 +#undef        sys_clone
 +#undef        sys_vfork
-diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_32.S
---- linux-2.6.27/arch/x86/kernel/entry_32.S    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_32.S     2009-03-25 16:10:44.000000000 +0000
-@@ -293,7 +293,7 @@ ENTRY(ia32_sysenter_target)
+diff -r 9608d5473017 arch/x86/kernel/entry_32.S
+--- a/arch/x86/kernel/entry_32.S       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/entry_32.S       Wed May 06 16:56:10 2009 +0100
+@@ -293,7 +293,7 @@
        CFI_SIGNAL_FRAME
        CFI_DEF_CFA esp, 0
        CFI_REGISTER esp, ebp
@@ -95089,7 +95071,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
  sysenter_past_esp:
        /*
         * Interrupts are disabled here, but we can't trace it until
-@@ -513,7 +513,7 @@ ENDPROC(system_call)
+@@ -513,7 +513,7 @@
        ALIGN
        RING0_PTREGS_FRAME              # can't unwind into user space anyway
  work_pending:
@@ -95098,7 +95080,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
        jz work_notifysig
  work_resched:
        call schedule
-@@ -782,7 +782,7 @@ END(device_not_available)
+@@ -782,7 +782,7 @@
   * that sets up the real kernel stack. Check here, since we can't
   * allow the wrong stack to be used.
   *
@@ -95107,7 +95089,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
   * already pushed 3 words if it hits on the sysenter instruction:
   * eflags, cs and eip.
   *
-@@ -794,7 +794,7 @@ END(device_not_available)
+@@ -794,7 +794,7 @@
        cmpw $__KERNEL_CS,4(%esp);              \
        jne ok;                                 \
  label:                                                \
@@ -95116,7 +95098,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
        CFI_DEF_CFA esp, 0;                     \
        CFI_UNDEFINED eip;                      \
        pushfl;                                 \
-@@ -1015,6 +1015,26 @@ ENTRY(alignment_check)
+@@ -1015,6 +1015,26 @@
        CFI_ENDPROC
  END(alignment_check)
  
@@ -95143,7 +95125,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
  ENTRY(divide_error)
        RING0_INT_FRAME
        pushl $0                        # no error code
-@@ -1047,6 +1067,38 @@ ENTRY(spurious_interrupt_bug)
+@@ -1047,6 +1067,38 @@
        CFI_ENDPROC
  END(spurious_interrupt_bug)
  
@@ -95182,7 +95164,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
  ENTRY(kernel_thread_helper)
        pushl $0                # fake return address for unwinder
        CFI_STARTPROC
-@@ -1060,7 +1112,7 @@ ENTRY(kernel_thread_helper)
+@@ -1060,7 +1112,7 @@
        CFI_ENDPROC
  ENDPROC(kernel_thread_helper)
  
@@ -95191,7 +95173,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
  /* Xen doesn't set %esp to be precisely what the normal sysenter
     entrypoint expects, so fix it up before using the normal path. */
  ENTRY(xen_sysenter_target)
-@@ -1153,7 +1205,7 @@ ENTRY(xen_failsafe_callback)
+@@ -1153,7 +1205,7 @@
  .previous
  ENDPROC(xen_failsafe_callback)
  
@@ -95200,9 +95182,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_32.S linux-2.6.27.19-5.1/arch/x86/
  
  #ifdef CONFIG_FTRACE
  #ifdef CONFIG_DYNAMIC_FTRACE
-diff -purN linux-2.6.27/arch/x86/kernel/entry_64-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_64-xen.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_64-xen.S 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/entry_64-xen.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/entry_64-xen.S   Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1456 @@
 +/*
 + *  linux/arch/x86_64/entry.S
@@ -96660,10 +96642,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64-xen.S linux-2.6.27.19-5.1/arch/
 +      CFI_ENDPROC
 +ENDPROC(arch_unwind_init_running)
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/kernel/entry_64.S
---- linux-2.6.27/arch/x86/kernel/entry_64.S    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/entry_64.S     2009-03-25 16:10:44.000000000 +0000
-@@ -275,12 +275,13 @@ ENTRY(native_usergs_sysret64)
+diff -r 9608d5473017 arch/x86/kernel/entry_64.S
+--- a/arch/x86/kernel/entry_64.S       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/entry_64.S       Wed May 06 16:56:10 2009 +0100
+@@ -275,12 +275,13 @@
  ENTRY(ret_from_fork)
        CFI_DEFAULT_STACK
        push kernel_eflags(%rip)
@@ -96679,7 +96661,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/
        jnz rff_trace
  rff_action:   
        RESTORE_REST
-@@ -290,6 +291,7 @@ rff_action:        
+@@ -290,6 +291,7 @@
        jnz  int_ret_from_sys_call
        RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
        jmp ret_from_sys_call
@@ -96687,7 +96669,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/
  rff_trace:
        movq %rsp,%rdi
        call syscall_trace_leave
-@@ -888,7 +890,13 @@ END(error_interrupt)
+@@ -888,7 +890,13 @@
  ENTRY(spurious_interrupt)
        apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt
  END(spurious_interrupt)
@@ -96702,7 +96684,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/
  /*
   * Exception entry points.
   */           
-@@ -1368,7 +1376,40 @@ KPROBE_ENTRY(ignore_sysret)
+@@ -1368,7 +1376,40 @@
        CFI_ENDPROC
  ENDPROC(ignore_sysret)
  
@@ -96744,7 +96726,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/
  ENTRY(xen_hypervisor_callback)
        zeroentry xen_do_hypervisor_callback
  END(xen_hypervisor_callback)
-@@ -1466,4 +1507,31 @@ ENTRY(xen_failsafe_callback)
+@@ -1466,4 +1507,31 @@
        CFI_ENDPROC
  END(xen_failsafe_callback)
  
@@ -96777,9 +96759,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/entry_64.S linux-2.6.27.19-5.1/arch/x86/
 +END(kdb_call)
 +
 +#endif        /* CONFIG_KDB */
-diff -purN linux-2.6.27/arch/x86/kernel/fixup.c linux-2.6.27.19-5.1/arch/x86/kernel/fixup.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/fixup.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/fixup.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/fixup.c  Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,88 @@
 +/******************************************************************************
 + * fixup.c
@@ -96869,9 +96851,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/fixup.c linux-2.6.27.19-5.1/arch/x86/ker
 +      return 0;
 +}
 +__initcall(fixup_init);
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genapic_64-xen.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,118 @@
 +/*
 + * Copyright 2004 James Cleverdon, IBM.
@@ -96991,9 +96973,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_64-xen.c linux-2.6.27.19-5.1/arc
 +}
 +EXPORT_SYMBOL_GPL(is_uv_system);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64.c
---- linux-2.6.27/arch/x86/kernel/genapic_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_64.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_64.c
+--- a/arch/x86/kernel/genapic_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genapic_64.c     Wed May 06 16:56:10 2009 +0100
 @@ -16,87 +16,63 @@
  #include <linux/ctype.h>
  #include <linux/init.h>
@@ -97045,16 +97027,16 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_64.c linux-2.6.27.19-5.1/arch/x8
 -              genapic = &apic_physflat;
 -      else
 -#endif
--
--      if (max_physical_apicid < 8)
--              genapic = &apic_flat;
--      else
--              genapic = &apic_physflat;
 +      if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) {
 +              if (!intr_remapping_enabled)
 +                      genapic = &apic_flat;
 +      }
  
+-      if (max_physical_apicid < 8)
+-              genapic = &apic_flat;
+-      else
+-              genapic = &apic_physflat;
+-
 -      printk(KERN_INFO "Setting APIC routing to %s\n", genapic->name);
 +      if (genapic == &apic_flat) {
 +              if (max_physical_apicid >= 8)
@@ -97115,9 +97097,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_64.c linux-2.6.27.19-5.1/arch/x8
 -      return uv_system_type != UV_NONE;
 -}
 -EXPORT_SYMBOL_GPL(is_uv_system);
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_flat_64.c
---- linux-2.6.27/arch/x86/kernel/genapic_flat_64.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_flat_64.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_flat_64.c
+--- a/arch/x86/kernel/genapic_flat_64.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genapic_flat_64.c        Wed May 06 16:56:10 2009 +0100
 @@ -15,16 +15,27 @@
  #include <linux/kernel.h>
  #include <linux/ctype.h>
@@ -97134,22 +97116,22 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
 +#endif
 +
 +static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
-+{
-+      return 1;
-+}
-+
-+static const cpumask_t *flat_target_cpus(void)
  {
 -      return cpu_online_map;
-+      return &cpu_online_map;
++      return 1;
  }
  
 -static cpumask_t flat_vector_allocation_domain(int cpu)
++static const cpumask_t *flat_target_cpus(void)
++{
++      return &cpu_online_map;
++}
++
 +static void flat_vector_allocation_domain(int cpu, cpumask_t *retmask)
  {
        /* Careful. Some cpus do not strictly honor the set of cpus
         * specified in the interrupt destination when using lowest
-@@ -34,8 +45,7 @@ static cpumask_t flat_vector_allocation_
+@@ -34,8 +45,7 @@
         * deliver interrupts to the wrong hyperthread when only one
         * hyperthread was specified in the interrupt desitination.
         */
@@ -97159,7 +97141,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
  }
  
  /*
-@@ -58,9 +68,8 @@ static void flat_init_apic_ldr(void)
+@@ -58,9 +68,8 @@
        apic_write(APIC_LDR, val);
  }
  
@@ -97170,7 +97152,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
        unsigned long flags;
  
        local_irq_save(flags);
-@@ -68,20 +77,40 @@ static void flat_send_IPI_mask(cpumask_t
+@@ -68,20 +77,40 @@
        local_irq_restore(flags);
  }
  
@@ -97215,7 +97197,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
        } else if (num_online_cpus() > 1) {
                __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
        }
-@@ -90,19 +119,43 @@ static void flat_send_IPI_allbutself(int
+@@ -90,19 +119,43 @@
  static void flat_send_IPI_all(int vector)
  {
        if (vector == NMI_VECTOR)
@@ -97263,7 +97245,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
  }
  
  static unsigned int phys_pkg_id(int index_msb)
-@@ -112,6 +165,7 @@ static unsigned int phys_pkg_id(int inde
+@@ -112,6 +165,7 @@
  
  struct genapic apic_flat =  {
        .name = "flat",
@@ -97271,7 +97253,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
        .int_delivery_mode = dest_LowestPrio,
        .int_dest_mode = (APIC_DEST_LOGICAL != 0),
        .target_cpus = flat_target_cpus,
-@@ -121,8 +175,13 @@ struct genapic apic_flat =  {
+@@ -121,8 +175,13 @@
        .send_IPI_all = flat_send_IPI_all,
        .send_IPI_allbutself = flat_send_IPI_allbutself,
        .send_IPI_mask = flat_send_IPI_mask,
@@ -97285,7 +97267,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
  };
  
  /*
-@@ -130,36 +189,55 @@ struct genapic apic_flat =  {
+@@ -130,36 +189,55 @@
   * We cannot use logical delivery in this case because the mask
   * overflows, so use physical mode.
   */
@@ -97301,43 +97283,44 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
 +              (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL))
 +              return 1;
 +#endif
-+
-+      return 0;
-+}
  
 -static cpumask_t physflat_target_cpus(void)
-+static const cpumask_t *physflat_target_cpus(void)
- {
+-{
 -      return cpu_online_map;
-+      return &cpu_online_map;
++      return 0;
  }
  
 -static cpumask_t physflat_vector_allocation_domain(int cpu)
-+static void physflat_vector_allocation_domain(int cpu, cpumask_t *retmask)
++static const cpumask_t *physflat_target_cpus(void)
  {
 -      return cpumask_of_cpu(cpu);
-+      cpus_clear(*retmask);
-+      cpu_set(cpu, *retmask);
++      return &cpu_online_map;
  }
  
 -static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
++static void physflat_vector_allocation_domain(int cpu, cpumask_t *retmask)
++{
++      cpus_clear(*retmask);
++      cpu_set(cpu, *retmask);
++}
++
 +static void physflat_send_IPI_mask(const cpumask_t *cpumask, int vector)
  {
        send_IPI_mask_sequence(cpumask, vector);
  }
  
--static void physflat_send_IPI_allbutself(int vector)
 +static void physflat_send_IPI_mask_allbutself(const cpumask_t *cpumask,
 +                                            int vector)
- {
--      cpumask_t allbutme = cpu_online_map;
++{
 +      send_IPI_mask_allbutself(cpumask, vector);
 +}
++
+ static void physflat_send_IPI_allbutself(int vector)
+ {
+-      cpumask_t allbutme = cpu_online_map;
+-
 -      cpu_clear(smp_processor_id(), allbutme);
 -      physflat_send_IPI_mask(allbutme, vector);
-+static void physflat_send_IPI_allbutself(int vector)
-+{
 +      send_IPI_mask_allbutself(&cpu_online_map, vector);
  }
  
@@ -97352,7 +97335,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
  {
        int cpu;
  
-@@ -167,7 +245,7 @@ static unsigned int physflat_cpu_mask_to
+@@ -167,7 +245,7 @@
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
@@ -97361,7 +97344,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
        if ((unsigned)cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
        else
-@@ -176,6 +254,7 @@ static unsigned int physflat_cpu_mask_to
+@@ -176,6 +254,7 @@
  
  struct genapic apic_physflat =  {
        .name = "physical flat",
@@ -97369,7 +97352,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
        .int_delivery_mode = dest_Fixed,
        .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
        .target_cpus = physflat_target_cpus,
-@@ -185,6 +264,11 @@ struct genapic apic_physflat =  {
+@@ -185,6 +264,11 @@
        .send_IPI_all = physflat_send_IPI_all,
        .send_IPI_allbutself = physflat_send_IPI_allbutself,
        .send_IPI_mask = physflat_send_IPI_mask,
@@ -97381,9 +97364,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_flat_64.c linux-2.6.27.19-5.1/ar
 +      .set_apic_id = set_apic_id,
 +      .apic_id_mask = (0xFFu<<24),
  };
-diff -purN linux-2.6.27/arch/x86/kernel/genapic_xen_64.c linux-2.6.27.19-5.1/arch/x86/kernel/genapic_xen_64.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genapic_xen_64.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genapic_xen_64.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genapic_xen_64.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,129 @@
 +/*
 + * Copyright 2004 James Cleverdon, IBM.
@@ -97514,9 +97497,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genapic_xen_64.c linux-2.6.27.19-5.1/arc
 +      .cpu_mask_to_apicid = xen_cpu_mask_to_apicid,
 +      .phys_pkg_id = phys_pkg_id,
 +};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_cluster.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_cluster.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_cluster.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_cluster.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genx2apic_cluster.c      Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,179 @@
 +#include <linux/threads.h>
 +#include <linux/cpumask.h>
@@ -97697,9 +97680,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_cluster.c linux-2.6.27.19-5.1/
 +      .set_apic_id = set_apic_id,
 +      .apic_id_mask = (0xFFFFFFFFu),
 +};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_phys.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_phys.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_phys.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_phys.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/genx2apic_phys.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,177 @@
 +#include <linux/threads.h>
 +#include <linux/cpumask.h>
@@ -97878,9 +97861,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_phys.c linux-2.6.27.19-5.1/arc
 +      .set_apic_id = set_apic_id,
 +      .apic_id_mask = (0xFFFFFFFFu),
 +};
-diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_uv_x.c
---- linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/genx2apic_uv_x.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/genx2apic_uv_x.c
+--- a/arch/x86/kernel/genx2apic_uv_x.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/genx2apic_uv_x.c Wed May 06 16:56:10 2009 +0100
 @@ -10,14 +10,18 @@
  
  #include <linux/kernel.h>
@@ -97901,10 +97884,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  #include <asm/smp.h>
  #include <asm/ipi.h>
  #include <asm/genapic.h>
-@@ -26,6 +30,34 @@
+@@ -25,6 +29,34 @@
+ #include <asm/uv/uv_mmrs.h>
  #include <asm/uv/uv_hub.h>
  #include <asm/uv/bios.h>
++
 +static enum uv_system_type uv_system_type;
 +
 +static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
@@ -97932,11 +97916,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
 +      return uv_system_type != UV_NONE;
 +}
 +EXPORT_SYMBOL(is_uv_system);
-+
  DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
  EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
-@@ -46,16 +78,15 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
+@@ -46,16 +78,15 @@
  
  /* Start with all IRQs pointing to boot CPU.  IRQ balancing will shift them. */
  
@@ -97958,7 +97941,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  }
  
  int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip)
-@@ -94,28 +125,37 @@ static void uv_send_IPI_one(int cpu, int
+@@ -94,28 +125,37 @@
        uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
  }
  
@@ -97986,11 +97969,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  static void uv_send_IPI_allbutself(int vector)
  {
 -      cpumask_t mask = cpu_online_map;
--
--      cpu_clear(smp_processor_id(), mask);
 +      unsigned int cpu;
 +      unsigned int this_cpu = smp_processor_id();
  
+-      cpu_clear(smp_processor_id(), mask);
+-
 -      if (!cpus_empty(mask))
 -              uv_send_IPI_mask(mask, vector);
 +      for_each_online_cpu(cpu)
@@ -98005,7 +97988,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  }
  
  static int uv_apic_id_registered(void)
-@@ -123,7 +163,11 @@ static int uv_apic_id_registered(void)
+@@ -123,7 +163,11 @@
        return 1;
  }
  
@@ -98018,7 +98001,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  {
        int cpu;
  
-@@ -131,38 +175,67 @@ static unsigned int uv_cpu_mask_to_apici
+@@ -131,38 +175,67 @@
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
@@ -98091,7 +98074,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  };
  
  static __cpuinit void set_x2apic_extra_bits(int pnode)
-@@ -222,12 +295,13 @@ static __init void map_low_mmrs(void)
+@@ -222,12 +295,13 @@
  
  enum map_type {map_wb, map_uc};
  
@@ -98107,7 +98090,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
        printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr,
                                                paddr + bytes);
        if (map_type == map_uc)
-@@ -243,7 +317,7 @@ static __init void map_gru_high(int max_
+@@ -243,7 +317,7 @@
  
        gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR);
        if (gru.s.enable)
@@ -98116,7 +98099,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  }
  
  static __init void map_config_high(int max_pnode)
-@@ -253,7 +327,7 @@ static __init void map_config_high(int m
+@@ -253,7 +327,7 @@
  
        cfg.v = uv_read_local_mmr(UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR);
        if (cfg.s.enable)
@@ -98125,7 +98108,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  }
  
  static __init void map_mmr_high(int max_pnode)
-@@ -263,7 +337,7 @@ static __init void map_mmr_high(int max_
+@@ -263,7 +337,7 @@
  
        mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
        if (mmr.s.enable)
@@ -98134,7 +98117,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  }
  
  static __init void map_mmioh_high(int max_pnode)
-@@ -273,17 +347,17 @@ static __init void map_mmioh_high(int ma
+@@ -273,17 +347,17 @@
  
        mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR);
        if (mmioh.s.enable)
@@ -98158,7 +98141,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
                printk(KERN_WARNING
                        "unable to determine platform RTC clock frequency, "
                        "guessing.\n");
-@@ -293,7 +367,120 @@ static __init void uv_rtc_init(void)
+@@ -293,7 +367,120 @@
                sn_rtc_cycles_per_second = ticks_per_sec;
  }
  
@@ -98280,7 +98263,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
  
  void __init uv_system_init(void)
  {
-@@ -320,16 +507,16 @@ void __init uv_system_init(void)
+@@ -320,16 +507,16 @@
        printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades());
  
        bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades();
@@ -98300,7 +98283,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
        memset(uv_cpu_to_blade, 255, bytes);
  
        blade = 0;
-@@ -349,6 +536,9 @@ void __init uv_system_init(void)
+@@ -349,6 +536,9 @@
        gnode_upper = (((unsigned long)node_id.s.node_id) &
                       ~((1 << n_val) - 1)) << m_val;
  
@@ -98310,7 +98293,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
        uv_rtc_init();
  
        for_each_present_cpu(cpu) {
-@@ -359,8 +549,7 @@ void __init uv_system_init(void)
+@@ -359,8 +549,7 @@
                uv_blade_info[blade].nr_possible_cpus++;
  
                uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base;
@@ -98320,7 +98303,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
                uv_cpu_hub_info(cpu)->m_val = m_val;
                uv_cpu_hub_info(cpu)->n_val = m_val;
                uv_cpu_hub_info(cpu)->numa_blade_id = blade;
-@@ -370,7 +559,8 @@ void __init uv_system_init(void)
+@@ -370,7 +559,8 @@
                uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1;
                uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper;
                uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base;
@@ -98330,13 +98313,16 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
                uv_node_to_blade[nid] = blade;
                uv_cpu_to_blade[cpu] = blade;
                max_pnode = max(pnode, max_pnode);
-@@ -385,19 +575,9 @@ void __init uv_system_init(void)
+@@ -385,19 +575,9 @@
        map_mmr_high(max_pnode);
        map_config_high(max_pnode);
        map_mmioh_high(max_pnode);
 -      uv_system_inited = true;
--}
 +      uv_scir_register_cpu_notifier();
++
++      uv_cpu_init();
++      proc_mkdir("sgi_uv", NULL);
+ }
  
 -/*
 - * Called on each cpu to initialize the per_cpu UV data area.
@@ -98350,13 +98336,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/genx2apic_uv_x.c linux-2.6.27.19-5.1/arc
 -
 -      if (get_uv_system_type() == UV_NON_UNIQUE_APIC)
 -              set_x2apic_extra_bits(uv_hub_info->pnode);
-+      uv_cpu_init();
-+      proc_mkdir("sgi_uv", NULL);
- }
-+
-diff -purN linux-2.6.27/arch/x86/kernel/head-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head-xen.c     2009-03-25 16:10:44.000000000 +0000
+-}
+diff -r 9608d5473017 arch/x86/kernel/head-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head-xen.c       Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,57 @@
 +#include <linux/kernel.h>
 +#include <linux/init.h>
@@ -98415,9 +98398,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head-xen.c linux-2.6.27.19-5.1/arch/x86/
 +      reserve_early_overlap_ok(lowmem, 0x100000, "BIOS reserved");
 +#endif
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/head32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head32-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head32-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + *  linux/arch/i386/kernel/head32.c -- prepare to run common code
@@ -98476,9 +98459,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head32-xen.c linux-2.6.27.19-5.1/arch/x8
 +
 +      start_kernel();
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/head64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/head64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head64-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head64-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,181 @@
 +/*
 + *  prepare to run common code
@@ -98661,9 +98644,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head64-xen.c linux-2.6.27.19-5.1/arch/x8
 +
 +      start_kernel();
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/head64.c linux-2.6.27.19-5.1/arch/x86/kernel/head64.c
---- linux-2.6.27/arch/x86/kernel/head64.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head64.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head64.c
+--- a/arch/x86/kernel/head64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/head64.c Wed May 06 16:56:10 2009 +0100
 @@ -26,7 +26,7 @@
  #include <asm/bios_ebda.h>
  
@@ -98673,9 +98656,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head64.c linux-2.6.27.19-5.1/arch/x86/ke
  
  #ifdef CONFIG_SMP
  /*
-diff -purN linux-2.6.27/arch/x86/kernel/head_32-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/head_32-xen.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_32-xen.S  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head_32-xen.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head_32-xen.S    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,164 @@
 +
 +
@@ -98841,9 +98824,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head_32-xen.S linux-2.6.27.19-5.1/arch/x
 +#endif
 +      ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 +      ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
-diff -purN linux-2.6.27/arch/x86/kernel/head_64-xen.S linux-2.6.27.19-5.1/arch/x86/kernel/head_64-xen.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_64-xen.S  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/head_64-xen.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/head_64-xen.S    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,140 @@
 +/*
 + *  linux/arch/x86_64/kernel/head.S -- start in 32bit and switch to 64bit
@@ -98985,10 +98968,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/head_64-xen.S linux-2.6.27.19-5.1/arch/x
 +      ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel")
 +      ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
 +      ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
-diff -purN linux-2.6.27/arch/x86/kernel/head_64.S linux-2.6.27.19-5.1/arch/x86/kernel/head_64.S
---- linux-2.6.27/arch/x86/kernel/head_64.S     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/head_64.S      2009-03-25 16:10:44.000000000 +0000
-@@ -305,7 +305,7 @@ ENTRY(early_idt_handler)
+diff -r 9608d5473017 arch/x86/kernel/head_64.S
+--- a/arch/x86/kernel/head_64.S        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/head_64.S        Wed May 06 16:56:10 2009 +0100
+@@ -305,7 +305,7 @@
        call dump_stack
  #ifdef CONFIG_KALLSYMS        
        leaq early_idt_ripmsg(%rip),%rdi
@@ -98997,9 +98980,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/head_64.S linux-2.6.27.19-5.1/arch/x86/k
        call __print_symbol
  #endif
  #endif /* EARLY_PRINTK */
-diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kernel/hpet.c
---- linux-2.6.27/arch/x86/kernel/hpet.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/hpet.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/hpet.c
+--- a/arch/x86/kernel/hpet.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/hpet.c   Wed May 06 16:56:10 2009 +0100
 @@ -24,6 +24,7 @@
   */
  unsigned long hpet_address;
@@ -99008,7 +98991,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
  
  unsigned long hpet_readl(unsigned long a)
  {
-@@ -37,6 +38,33 @@ static inline void hpet_writel(unsigned 
+@@ -37,6 +38,33 @@
  
  #ifdef CONFIG_X86_64
  #include <asm/pgtable.h>
@@ -99042,10 +99025,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
  #endif
  
  static inline void hpet_set_mapping(void)
-@@ -78,6 +106,17 @@ static int __init disable_hpet(char *str
+@@ -77,6 +105,17 @@
+       return 1;
  }
  __setup("nohpet", disable_hpet);
++
 +#ifdef CONFIG_X86_64
 +static int hpet64 = 0;
 +static int __init hpet64_setup(char *str)
@@ -99056,11 +99040,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
 +__setup("hpet64", hpet64_setup);
 +#endif
 +
-+
  static inline int is_hpet_capable(void)
  {
-       return (!boot_hpet_disable && hpet_address);
-@@ -141,6 +180,7 @@ static void hpet_reserve_platform_timers
+@@ -141,6 +180,7 @@
   * Common hpet info
   */
  static unsigned long hpet_period;
@@ -99068,7 +99051,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
  
  static void hpet_legacy_set_mode(enum clock_event_mode mode,
                          struct clock_event_device *evt);
-@@ -192,10 +232,38 @@ static void hpet_enable_legacy_int(void)
+@@ -192,10 +232,38 @@
        hpet_legacy_int_enabled = 1;
  }
  
@@ -99107,7 +99090,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
  
        /*
         * The mult factor is defined as (include/linux/clockchips.h)
-@@ -233,26 +301,30 @@ static void hpet_legacy_set_mode(enum cl
+@@ -233,26 +301,30 @@
        case CLOCK_EVT_MODE_PERIODIC:
                delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * hpet_clockevent.mult;
                delta >>= hpet_clockevent.shift;
@@ -99143,7 +99126,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
                hpet_writel(cfg, HPET_T0_CFG);
                break;
  
-@@ -272,20 +344,21 @@ static void hpet_legacy_set_mode(enum cl
+@@ -272,20 +344,21 @@
  static int hpet_legacy_next_event(unsigned long delta,
                                  struct clock_event_device *evt)
  {
@@ -99170,10 +99153,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/hpet.c linux-2.6.27.19-5.1/arch/x86/kern
  }
  
  /*
-diff -purN linux-2.6.27/arch/x86/kernel/i8259.c linux-2.6.27.19-5.1/arch/x86/kernel/i8259.c
---- linux-2.6.27/arch/x86/kernel/i8259.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/i8259.c        2009-03-25 16:10:44.000000000 +0000
-@@ -282,6 +282,30 @@ static int __init i8259A_init_sysfs(void
+diff -r 9608d5473017 arch/x86/kernel/i8259.c
+--- a/arch/x86/kernel/i8259.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/i8259.c  Wed May 06 16:56:10 2009 +0100
+@@ -282,6 +282,30 @@
  
  device_initcall(i8259A_init_sysfs);
  
@@ -99204,9 +99187,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/i8259.c linux-2.6.27.19-5.1/arch/x86/ker
  void init_8259A(int auto_eoi)
  {
        unsigned long flags;
-diff -purN linux-2.6.27/arch/x86/kernel/init_task-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/init_task-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/init_task-xen.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/init_task-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/init_task-xen.c  Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,51 @@
 +#include <linux/mm.h>
 +#include <linux/module.h>
@@ -99259,9 +99242,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/init_task-xen.c linux-2.6.27.19-5.1/arch
 +DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
 +#endif
 +
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/io_apic_32-xen.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,2993 @@
 +/*
 + *    Intel IO-APIC support for multi-Pentium hosts.
@@ -102256,9 +102239,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32-xen.c linux-2.6.27.19-5.1/arc
 +      }
 +}
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32.c
---- linux-2.6.27/arch/x86/kernel/io_apic_32.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_32.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_32.c
+--- a/arch/x86/kernel/io_apic_32.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/io_apic_32.c     Wed May 06 16:56:10 2009 +0100
 @@ -33,6 +33,10 @@
  #include <linux/sysdev.h>
  #include <linux/pci.h>
@@ -102270,7 +102253,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  #include <linux/htirq.h>
  #include <linux/freezer.h>
  #include <linux/kthread.h>
-@@ -344,11 +348,11 @@ static void set_ioapic_affinity_irq(unsi
+@@ -344,11 +348,11 @@
  
        cpus_and(tmp, cpumask, cpu_online_map);
        if (cpus_empty(tmp))
@@ -102284,7 +102267,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
        /* Prepare to do the io_apic_write */
        apicid_value = apicid_value << 24;
        spin_lock_irqsave(&ioapic_lock, flags);
-@@ -926,7 +930,7 @@ void __init setup_ioapic_dest(void)
+@@ -926,7 +930,7 @@
                        if (irq_entry == -1)
                                continue;
                        irq = pin_2_irq(irq_entry, ioapic, pin);
@@ -102293,7 +102276,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
                }
  
        }
-@@ -1189,6 +1193,10 @@ next:
+@@ -1189,6 +1193,10 @@
                return -ENOSPC;
        if (test_and_set_bit(vector, used_vectors))
                goto next;
@@ -102304,7 +102287,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  
        current_vector = vector;
        current_offset = offset;
-@@ -1490,7 +1498,7 @@ void /*__init*/ print_local_APIC(void *d
+@@ -1490,7 +1498,7 @@
                smp_processor_id(), hard_smp_processor_id());
        v = apic_read(APIC_ID);
        printk(KERN_INFO "... APIC ID:      %08x (%01x)\n", v,
@@ -102313,7 +102296,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
        v = apic_read(APIC_LVR);
        printk(KERN_INFO "... APIC VERSION: %08x\n", v);
        ver = GET_APIC_VERSION(v);
-@@ -1500,9 +1508,11 @@ void /*__init*/ print_local_APIC(void *d
+@@ -1500,9 +1508,11 @@
        printk(KERN_DEBUG "... APIC TASKPRI: %08x (%02x)\n", v, v & APIC_TPRI_MASK);
  
        if (APIC_INTEGRATED(ver)) {                     /* !82489DX */
@@ -102328,7 +102311,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
                v = apic_read(APIC_PROCPRI);
                printk(KERN_DEBUG "... APIC PROCPRI: %08x\n", v);
        }
-@@ -1698,8 +1708,7 @@ void disable_IO_APIC(void)
+@@ -1698,8 +1708,7 @@
                entry.dest_mode       = 0; /* Physical */
                entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
@@ -102338,7 +102321,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  
                /*
                 * Add it to the IO-APIC irq-routing table:
-@@ -2314,6 +2323,9 @@ void __init setup_IO_APIC(void)
+@@ -2314,6 +2323,9 @@
        for (i = first_system_vector; i < NR_VECTORS; i++)
                set_bit(i, used_vectors);
  
@@ -102348,7 +102331,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
        enable_IO_APIC();
  
        io_apic_irqs = ~PIC_IRQS;
-@@ -2518,13 +2530,13 @@ static void set_msi_irq_affinity(unsigne
+@@ -2518,13 +2530,13 @@
  
        cpus_and(tmp, mask, cpu_online_map);
        if (cpus_empty(tmp))
@@ -102364,7 +102347,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  
        read_msi_msg(irq, &msg);
  
-@@ -2611,11 +2623,11 @@ static void set_ht_irq_affinity(unsigned
+@@ -2611,11 +2623,11 @@
  
        cpus_and(tmp, mask, cpu_online_map);
        if (cpus_empty(tmp))
@@ -102378,7 +102361,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  
        target_ht_irq(irq, dest);
        irq_desc[irq].affinity = mask;
-@@ -2645,7 +2657,7 @@ int arch_setup_ht_irq(unsigned int irq, 
+@@ -2645,7 +2657,7 @@
  
                cpus_clear(tmp);
                cpu_set(vector >> 8, tmp);
@@ -102387,9 +102370,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_32.c linux-2.6.27.19-5.1/arch/x8
  
                msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
  
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/io_apic_64-xen.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,2450 @@
 +/*
 + *    Intel IO-APIC support for multi-Pentium hosts.
@@ -104841,9 +104824,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64-xen.c linux-2.6.27.19-5.1/arc
 + * IO APICS that are mapped in on a BAR in PCI space. */
 +late_initcall(ioapic_insert_resources);
 +#endif /* !CONFIG_XEN */
-diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64.c
---- linux-2.6.27/arch/x86/kernel/io_apic_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/io_apic_64.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/io_apic_64.c
+--- a/arch/x86/kernel/io_apic_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/io_apic_64.c     Wed May 06 16:56:10 2009 +0100
 @@ -37,6 +37,11 @@
  #include <acpi/acpi_bus.h>
  #endif
@@ -104866,7 +104849,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
  #include <mach_ipi.h>
  #include <mach_apic.h>
-@@ -81,7 +89,7 @@ static struct irq_cfg irq_cfg[NR_IRQS] _
+@@ -81,7 +89,7 @@
        [15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
  };
  
@@ -104875,17 +104858,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
  int first_system_vector = 0xfe;
  
-@@ -108,6 +116,9 @@ static DEFINE_SPINLOCK(vector_lock);
+@@ -107,6 +115,9 @@
+  * # of IRQ routing registers
   */
  int nr_ioapic_registers[MAX_IO_APICS];
++
 +/* I/O APIC RTE contents at the OS boot up */
 +struct IO_APIC_route_entry *early_ioapic_entries[MAX_IO_APICS];
-+
  /* I/O APIC entries */
  struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
- int nr_ioapics;
-@@ -303,7 +314,12 @@ static void __target_IO_APIC_irq(unsigne
+@@ -303,7 +314,12 @@
                pin = entry->pin;
                if (pin == -1)
                        break;
@@ -104899,7 +104882,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                reg = io_apic_read(apic, 0x10 + pin*2);
                reg &= ~IO_APIC_REDIR_VECTOR_MASK;
                reg |= vector;
-@@ -325,11 +341,11 @@ static void set_ioapic_affinity_irq(unsi
+@@ -325,11 +341,11 @@
        if (cpus_empty(tmp))
                return;
  
@@ -104913,10 +104896,12 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        /*
         * Only the high 8 bits are valid.
-@@ -440,6 +456,84 @@ static void clear_IO_APIC (void)
+@@ -438,6 +454,84 @@
+       for (apic = 0; apic < nr_ioapics; apic++)
+               for (pin = 0; pin < nr_ioapic_registers[apic]; pin++)
                        clear_IO_APIC_pin(apic, pin);
- }
++}
++
 +/*
 + * Saves and masks all the unmasked IO-APIC RTE's
 + */
@@ -104993,12 +104978,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +       * the setup_IO_APIC_irqs() to do proper initialization.
 +       */
 +      restore_IO_APIC_setup();
-+}
-+
- int skip_ioapic_setup;
- int ioapic_force;
+ }
  
-@@ -710,7 +804,7 @@ void unlock_vector_lock(void)
+ int skip_ioapic_setup;
+@@ -710,7 +804,7 @@
        spin_unlock(&vector_lock);
  }
  
@@ -105007,7 +104990,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  {
        /*
         * NOTE! The local APIC isn't very good at handling
-@@ -727,31 +821,28 @@ static int __assign_irq_vector(int irq, 
+@@ -727,31 +821,28 @@
        unsigned int old_vector;
        int cpu;
        struct irq_cfg *cfg;
@@ -105015,10 +104998,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        BUG_ON((unsigned)irq >= NR_IRQS);
        cfg = &irq_cfg[irq];
+-
 -      /* Only try and allocate irqs on cpus that are present */
 -      cpus_and(mask, mask, cpu_online_map);
--
        if ((cfg->move_in_progress) || cfg->move_cleanup_count)
                return -EBUSY;
  
@@ -105046,7 +105029,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
                vector = current_vector;
                offset = current_offset;
-@@ -766,7 +857,11 @@ next:
+@@ -766,7 +857,11 @@
                        continue;
                if (vector == IA32_SYSCALL_VECTOR)
                        goto next;
@@ -105059,7 +105042,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                        if (per_cpu(vector_irq, new_cpu)[vector] != -1)
                                goto next;
                /* Found one! */
-@@ -776,16 +871,16 @@ next:
+@@ -776,16 +871,16 @@
                        cfg->move_in_progress = 1;
                        cfg->old_domain = cfg->domain;
                }
@@ -105079,7 +105062,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  {
        int err;
        unsigned long flags;
-@@ -839,18 +934,98 @@ void __setup_vector_irq(int cpu)
+@@ -839,18 +934,98 @@
  }
  
  static struct irq_chip ioapic_chip;
@@ -105092,11 +105075,8 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 -      if (trigger) {
 +      if (trigger)
                irq_desc[irq].status |= IRQ_LEVEL;
--              set_irq_chip_and_handler_name(irq, &ioapic_chip,
--                                            handle_fasteoi_irq, "fasteoi");
--      } else {
 +      else
-               irq_desc[irq].status &= ~IRQ_LEVEL;
++              irq_desc[irq].status &= ~IRQ_LEVEL;
 +
 +#ifdef CONFIG_INTR_REMAP
 +      if (irq_remapped(irq)) {
@@ -105112,7 +105092,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      }
 +#endif
 +      if (trigger)
-+              set_irq_chip_and_handler_name(irq, &ioapic_chip,
+               set_irq_chip_and_handler_name(irq, &ioapic_chip,
+-                                            handle_fasteoi_irq, "fasteoi");
+-      } else {
+-              irq_desc[irq].status &= ~IRQ_LEVEL;
 +                                            handle_fasteoi_irq,
 +                                            "fasteoi");
 +      else
@@ -105182,7 +105165,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  }
  
  static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
-@@ -863,8 +1038,8 @@ static void setup_IO_APIC_irq(int apic, 
+@@ -863,8 +1038,8 @@
        if (!IO_APIC_IRQ(irq))
                return;
  
@@ -105193,7 +105176,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                return;
  
        cpus_and(mask, cfg->domain, mask);
-@@ -875,24 +1050,15 @@ static void setup_IO_APIC_irq(int apic, 
+@@ -875,24 +1050,15 @@
                    apic, mp_ioapics[apic].mp_apicid, pin, cfg->vector,
                    irq, trigger, polarity);
  
@@ -105201,7 +105184,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 -       * add it to the IO-APIC irq-routing table:
 -       */
 -      memset(&entry,0,sizeof(entry));
--
 -      entry.delivery_mode = INT_DELIVERY_MODE;
 -      entry.dest_mode = INT_DEST_MODE;
 -      entry.dest = cpu_mask_to_apicid(mask);
@@ -105209,7 +105192,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 -      entry.trigger = trigger;
 -      entry.polarity = polarity;
 -      entry.vector = cfg->vector;
+-
 -      /* Mask level triggered irqs.
 -       * Use IRQ_DELAYED_DISABLE for edge triggered irqs.
 -       */
@@ -105226,17 +105209,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        ioapic_register_intr(irq, trigger);
        if (irq < 16)
-@@ -944,6 +1110,9 @@ static void __init setup_timer_IRQ0_pin(
+@@ -943,6 +1109,9 @@
+                                       int vector)
  {
        struct IO_APIC_route_entry entry;
++
 +      if (intr_remapping_enabled)
 +              return;
-+
        memset(&entry, 0, sizeof(entry));
  
-       /*
-@@ -1090,6 +1259,7 @@ static __apicdebuginit void print_APIC_b
+@@ -1090,6 +1259,7 @@
  void __apicdebuginit print_local_APIC(void * dummy)
  {
        unsigned int v, ver, maxlvt;
@@ -105244,7 +105227,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        if (apic_verbosity == APIC_QUIET)
                return;
-@@ -1097,7 +1267,7 @@ void __apicdebuginit print_local_APIC(vo
+@@ -1097,7 +1267,7 @@
        printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n",
                smp_processor_id(), hard_smp_processor_id());
        v = apic_read(APIC_ID);
@@ -105253,7 +105236,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
        v = apic_read(APIC_LVR);
        printk(KERN_INFO "... APIC VERSION: %08x\n", v);
        ver = GET_APIC_VERSION(v);
-@@ -1133,10 +1303,9 @@ void __apicdebuginit print_local_APIC(vo
+@@ -1133,10 +1303,9 @@
        v = apic_read(APIC_ESR);
        printk(KERN_DEBUG "... APIC ESR: %08x\n", v);
  
@@ -105267,7 +105250,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        v = apic_read(APIC_LVTT);
        printk(KERN_DEBUG "... APIC LVTT: %08x\n", v);
-@@ -1291,7 +1460,7 @@ void disable_IO_APIC(void)
+@@ -1291,7 +1460,7 @@
                entry.dest_mode       = 0; /* Physical */
                entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
@@ -105276,7 +105259,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
                /*
                 * Add it to the IO-APIC irq-routing table:
-@@ -1381,7 +1550,7 @@ static int ioapic_retrigger_irq(unsigned
+@@ -1381,7 +1550,7 @@
        unsigned long flags;
  
        spin_lock_irqsave(&vector_lock, flags);
@@ -105285,7 +105268,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
        spin_unlock_irqrestore(&vector_lock, flags);
  
        return 1;
-@@ -1397,6 +1566,147 @@ static int ioapic_retrigger_irq(unsigned
+@@ -1397,6 +1566,147 @@
   */
  
  #ifdef CONFIG_SMP
@@ -105433,7 +105416,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  asmlinkage void smp_irq_move_cleanup_interrupt(void)
  {
        unsigned vector, me;
-@@ -1446,13 +1756,24 @@ static void irq_complete_move(unsigned i
+@@ -1446,12 +1756,23 @@
  
                cpus_and(cleanup_mask, cfg->old_domain, cpu_online_map);
                cfg->move_cleanup_count = cpus_weight(cleanup_mask);
@@ -105444,7 +105427,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  }
  #else
  static inline void irq_complete_move(unsigned int irq) {}
- #endif
++#endif
 +#ifdef CONFIG_INTR_REMAP
 +static void ack_x2apic_level(unsigned int irq)
 +{
@@ -105455,14 +105438,14 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +{
 +      ack_x2APIC_irq();
 +}
-+#endif
+ #endif
  
  static void ack_apic_edge(unsigned int irq)
- {
-@@ -1527,6 +1848,21 @@ static struct irq_chip ioapic_chip __rea
+@@ -1526,6 +1847,21 @@
+ #endif
        .retrigger      = ioapic_retrigger_irq,
  };
++
 +#ifdef CONFIG_INTR_REMAP
 +static struct irq_chip ir_ioapic_chip __read_mostly = {
 +      .name           = "IR-IO-APIC",
@@ -105477,11 +105460,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      .retrigger      = ioapic_retrigger_irq,
 +};
 +#endif
-+
  static inline void init_IO_APIC_traps(void)
  {
-       int irq;
-@@ -1712,6 +2048,8 @@ static inline void __init check_timer(vo
+@@ -1712,6 +2048,8 @@
         * 8259A.
         */
        if (pin1 == -1) {
@@ -105490,7 +105472,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                pin1 = pin2;
                apic1 = apic2;
                no_pin1 = 1;
-@@ -1738,6 +2076,8 @@ static inline void __init check_timer(vo
+@@ -1738,6 +2076,8 @@
                                clear_IO_APIC_pin(0, pin1);
                        goto out;
                }
@@ -105499,7 +105481,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                clear_IO_APIC_pin(apic1, pin1);
                if (!no_pin1)
                        apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: "
-@@ -1977,6 +2317,9 @@ void destroy_irq(unsigned int irq)
+@@ -1977,6 +2317,9 @@
  
        dynamic_irq_cleanup(irq);
  
@@ -105509,7 +105491,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
        spin_lock_irqsave(&vector_lock, flags);
        __clear_irq_vector(irq);
        spin_unlock_irqrestore(&vector_lock, flags);
-@@ -1993,13 +2336,44 @@ static int msi_compose_msg(struct pci_de
+@@ -1993,12 +2336,43 @@
        unsigned dest;
        cpumask_t tmp;
  
@@ -105522,7 +105504,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      err = assign_irq_vector(irq, &tmp);
 +      if (err)
 +              return err;
-+
 +      cpus_and(tmp, cfg->domain, tmp);
 +      dest = cpu_mask_to_apicid(&tmp);
 +
@@ -105545,8 +105527,8 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +              irte.dest_id = IRTE_DEST(dest);
 +
 +              modify_irte(irq, &irte);
-               msg->address_hi = MSI_ADDR_BASE_HI;
++
++              msg->address_hi = MSI_ADDR_BASE_HI;
 +              msg->data = sub_handle;
 +              msg->address_lo = MSI_ADDR_BASE_LO | MSI_ADDR_IR_EXT_INT |
 +                                MSI_ADDR_IR_SHV |
@@ -105555,11 +105537,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      } else
 +#endif
 +      {
-+              msg->address_hi = MSI_ADDR_BASE_HI;
+               msg->address_hi = MSI_ADDR_BASE_HI;
                msg->address_lo =
                        MSI_ADDR_BASE_LO |
-                       ((INT_DEST_MODE == 0) ?
-@@ -2033,11 +2407,11 @@ static void set_msi_irq_affinity(unsigne
+@@ -2033,11 +2407,11 @@
        if (cpus_empty(tmp))
                return;
  
@@ -105573,7 +105554,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        read_msi_msg(irq, &msg);
  
-@@ -2049,6 +2423,55 @@ static void set_msi_irq_affinity(unsigne
+@@ -2049,6 +2423,55 @@
        write_msi_msg(irq, &msg);
        irq_desc[irq].affinity = mask;
  }
@@ -105629,11 +105610,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  #endif /* CONFIG_SMP */
  
  /*
-@@ -2066,26 +2489,157 @@ static struct irq_chip msi_chip = {
+@@ -2066,26 +2489,157 @@
        .retrigger      = ioapic_retrigger_irq,
  };
  
--int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
 +#ifdef CONFIG_INTR_REMAP
 +static struct irq_chip msi_ir_chip = {
 +      .name           = "IR-PCI-MSI",
@@ -105652,7 +105632,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 + * in it.
 + */
 +static int msi_alloc_irte(struct pci_dev *dev, int irq, int nvec)
- {
++{
 +      struct intel_iommu *iommu;
 +      int index;
 +
@@ -105677,7 +105657,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc, int irq)
 +{
 +      int ret;
-       struct msi_msg msg;
++      struct msi_msg msg;
 +
 +      ret = msi_compose_msg(dev, irq, &msg);
 +      if (ret < 0)
@@ -105701,8 +105681,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      return 0;
 +}
 +
-+int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
-+{
+ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
+ {
+-      struct msi_msg msg;
        int irq, ret;
 +
        irq = create_irq();
@@ -105744,7 +105725,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      struct intel_iommu *iommu = 0;
 +      int index = 0;
 +#endif
-+
 +      sub_handle = 0;
 +      list_for_each_entry(desc, &dev->msi_list, list) {
 +              irq = create_irq();
@@ -105753,7 +105734,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +#ifdef CONFIG_INTR_REMAP
 +              if (!intr_remapping_enabled)
 +                      goto no_ir;
++
 +              if (!sub_handle) {
 +                      /*
 +                       * allocate the consecutive block of IRTE's
@@ -105792,7 +105773,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  }
  
  void arch_teardown_msi_irq(unsigned int irq)
-@@ -2106,11 +2660,11 @@ static void dmar_msi_set_affinity(unsign
+@@ -2106,11 +2660,11 @@
        if (cpus_empty(tmp))
                return;
  
@@ -105806,7 +105787,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        dmar_msi_read(irq, &msg);
  
-@@ -2182,11 +2736,11 @@ static void set_ht_irq_affinity(unsigned
+@@ -2182,11 +2736,11 @@
        if (cpus_empty(tmp))
                return;
  
@@ -105820,7 +105801,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
        target_ht_irq(irq, dest, cfg->vector);
        irq_desc[irq].affinity = mask;
-@@ -2210,14 +2764,14 @@ int arch_setup_ht_irq(unsigned int irq, 
+@@ -2210,14 +2764,14 @@
        int err;
        cpumask_t tmp;
  
@@ -105838,10 +105819,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
  
                msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
  
-@@ -2243,6 +2797,72 @@ int arch_setup_ht_irq(unsigned int irq, 
+@@ -2242,6 +2796,72 @@
+       return err;
  }
  #endif /* CONFIG_HT_IRQ */
++
 +#ifdef CONFIG_X86_64
 +/*
 + * Re-target the irq to the specified CPU and enable the specified MMR located
@@ -105907,11 +105889,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
 +      uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
 +}
 +#endif /* CONFIG_X86_64 */
-+
  /* --------------------------------------------------------------------------
                            ACPI-based IOAPIC Configuration
-    -------------------------------------------------------------------------- */
-@@ -2333,8 +2953,12 @@ void __init setup_ioapic_dest(void)
+@@ -2333,8 +2953,12 @@
                                setup_IO_APIC_irq(ioapic, pin, irq,
                                                  irq_trigger(irq_entry),
                                                  irq_polarity(irq_entry));
@@ -105925,9 +105906,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/io_apic_64.c linux-2.6.27.19-5.1/arch/x8
                }
  
        }
-diff -purN linux-2.6.27/arch/x86/kernel/ioport-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ioport-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ioport-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ioport-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ioport-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,112 @@
 +/*
 + * This contains the io-permission bitmap code - written by obz, with changes
@@ -106041,9 +106022,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/ioport-xen.c linux-2.6.27.19-5.1/arch/x8
 +out:
 +      return rc;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/ipi-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ipi-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ipi-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ipi-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ipi-xen.c        Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,239 @@
 +#include <linux/cpumask.h>
 +#include <linux/interrupt.h>
@@ -106284,10 +106265,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/ipi-xen.c linux-2.6.27.19-5.1/arch/x86/k
 +}
 +#endif
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/ipi.c linux-2.6.27.19-5.1/arch/x86/kernel/ipi.c
---- linux-2.6.27/arch/x86/kernel/ipi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ipi.c  2009-03-25 16:10:44.000000000 +0000
-@@ -114,9 +114,9 @@ static inline void __send_IPI_dest_field
+diff -r 9608d5473017 arch/x86/kernel/ipi.c
+--- a/arch/x86/kernel/ipi.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/ipi.c    Wed May 06 16:56:10 2009 +0100
+@@ -114,9 +114,9 @@
  /*
   * This is only used on smaller machines.
   */
@@ -106299,7 +106280,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ipi.c linux-2.6.27.19-5.1/arch/x86/kerne
        unsigned long flags;
  
        local_irq_save(flags);
-@@ -125,7 +125,7 @@ void send_IPI_mask_bitmask(cpumask_t cpu
+@@ -125,7 +125,7 @@
        local_irq_restore(flags);
  }
  
@@ -106308,7 +106289,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ipi.c linux-2.6.27.19-5.1/arch/x86/kerne
  {
        unsigned long flags;
        unsigned int query_cpu;
-@@ -137,12 +137,24 @@ void send_IPI_mask_sequence(cpumask_t ma
+@@ -137,12 +137,24 @@
         */
  
        local_irq_save(flags);
@@ -106337,9 +106318,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/ipi.c linux-2.6.27.19-5.1/arch/x86/kerne
        local_irq_restore(flags);
  }
  
-diff -purN linux-2.6.27/arch/x86/kernel/irq_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/irq_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irq_32-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irq_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/irq_32-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,445 @@
 +/*
 + *    Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
@@ -106786,9 +106767,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/irq_32-xen.c linux-2.6.27.19-5.1/arch/x8
 +}
 +#endif
 +
-diff -purN linux-2.6.27/arch/x86/kernel/irq_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/irq_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irq_64-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irq_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/irq_64-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,297 @@
 +/*
 + *    Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
@@ -107087,9 +107068,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/irq_64-xen.c linux-2.6.27.19-5.1/arch/x8
 +      }
 +      local_irq_restore(flags);
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/irqinit_64.c linux-2.6.27.19-5.1/arch/x86/kernel/irqinit_64.c
---- linux-2.6.27/arch/x86/kernel/irqinit_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/irqinit_64.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/irqinit_64.c
+--- a/arch/x86/kernel/irqinit_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/irqinit_64.c     Wed May 06 16:56:10 2009 +0100
 @@ -11,6 +11,7 @@
  #include <linux/kernel_stat.h>
  #include <linux/sysdev.h>
@@ -107098,7 +107079,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/irqinit_64.c linux-2.6.27.19-5.1/arch/x8
  
  #include <asm/acpi.h>
  #include <asm/atomic.h>
-@@ -217,6 +218,10 @@ void __init native_init_IRQ(void)
+@@ -217,6 +218,10 @@
        alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
        alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
  
@@ -107109,10 +107090,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/irqinit_64.c linux-2.6.27.19-5.1/arch/x8
        if (!acpi_ioapic)
                setup_irq(2, &irq2);
  }
-diff -purN linux-2.6.27/arch/x86/kernel/kvmclock.c linux-2.6.27.19-5.1/arch/x86/kernel/kvmclock.c
---- linux-2.6.27/arch/x86/kernel/kvmclock.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/kvmclock.c     2009-03-25 16:10:44.000000000 +0000
-@@ -100,7 +100,7 @@ static int kvm_register_clock(char *txt)
+diff -r 9608d5473017 arch/x86/kernel/kvmclock.c
+--- a/arch/x86/kernel/kvmclock.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/kvmclock.c       Wed May 06 16:56:10 2009 +0100
+@@ -100,7 +100,7 @@
  }
  
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -107121,9 +107102,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/kvmclock.c linux-2.6.27.19-5.1/arch/x86/
  {
        /*
         * Now that the first cpu already had this clocksource initialized,
-diff -purN linux-2.6.27/arch/x86/kernel/ldt-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/ldt-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ldt-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ldt-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/ldt-xen.c        Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,270 @@
 +/*
 + * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
@@ -107395,9 +107376,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/ldt-xen.c linux-2.6.27.19-5.1/arch/x86/k
 +      }
 +      return ret;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_32.c
---- linux-2.6.27/arch/x86/kernel/machine_kexec_32.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_32.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/machine_kexec_32.c
+--- a/arch/x86/kernel/machine_kexec_32.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/machine_kexec_32.c       Wed May 06 16:56:10 2009 +0100
 @@ -25,6 +25,10 @@
  #include <asm/system.h>
  #include <asm/cacheflush.h>
@@ -107409,41 +107390,34 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
  #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE)))
  static u32 kexec_pgd[1024] PAGE_ALIGNED;
  #ifdef CONFIG_X86_PAE
-@@ -34,48 +38,55 @@ static u32 kexec_pmd1[1024] PAGE_ALIGNED
+@@ -34,47 +38,54 @@
  static u32 kexec_pte0[1024] PAGE_ALIGNED;
  static u32 kexec_pte1[1024] PAGE_ALIGNED;
  
 -static void set_idt(void *newidt, __u16 limit)
--{
--      struct desc_ptr curidt;
 +#ifdef CONFIG_XEN
--      /* ia32 supports unaliged loads & stores */
--      curidt.size    = limit;
--      curidt.address = (unsigned long)newidt;
++
 +#define __ma(x) (pfn_to_mfn(__pa((x)) >> PAGE_SHIFT) << PAGE_SHIFT)
--      load_idt(&curidt);
--}
++
 +#if PAGES_NR > KEXEC_XEN_NO_PAGES
 +#error PAGES_NR is greater than KEXEC_XEN_NO_PAGES - Xen support will break
 +#endif
++
 +#if PA_CONTROL_PAGE != 0
 +#error PA_CONTROL_PAGE is non zero - Xen support will break
 +#endif
--static void set_gdt(void *newgdt, __u16 limit)
++
 +void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)
  {
--      struct desc_ptr curgdt;
+-      struct desc_ptr curidt;
 +      void *control_page;
  
--      /* ia32 supports unaligned loads & stores */
--      curgdt.size    = limit;
--      curgdt.address = (unsigned long)newgdt;
+-      /* ia32 supports unaliged loads & stores */
+-      curidt.size    = limit;
+-      curidt.address = (unsigned long)newidt;
 +      memset(xki->page_list, 0, sizeof(xki->page_list));
-+
+-      load_idt(&curidt);
 +      control_page = page_address(image->control_code_page);
 +      memcpy(control_page, relocate_kernel, PAGE_SIZE);
 +
@@ -107455,23 +107429,36 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
 +#endif
 +      xki->page_list[PA_PTE_0] = __ma(kexec_pte0);
 +      xki->page_list[PA_PTE_1] = __ma(kexec_pte1);
--      load_gdt(&curgdt);
++
  }
  
--static void load_segments(void)
 +int __init machine_kexec_setup_resources(struct resource *hypervisor,
 +                                       struct resource *phys_cpus,
 +                                       int nr_phys_cpus)
- {
--#define __STR(X) #X
--#define STR(X) __STR(X)
++{
 +      int k;
-+
+-static void set_gdt(void *newgdt, __u16 limit)
+-{
+-      struct desc_ptr curgdt;
 +      /* The per-cpu crash note resources belong to the hypervisor resource */
 +      for (k = 0; k < nr_phys_cpus; k++)
 +              request_resource(hypervisor, phys_cpus + k);
  
+-      /* ia32 supports unaligned loads & stores */
+-      curgdt.size    = limit;
+-      curgdt.address = (unsigned long)newgdt;
+-
+-      load_gdt(&curgdt);
++      return 0;
+ }
+-static void load_segments(void)
+-{
+-#define __STR(X) #X
+-#define STR(X) __STR(X)
++void machine_kexec_register_resources(struct resource *res) { ; }
 -      __asm__ __volatile__ (
 -              "\tljmp $"STR(__KERNEL_CS)",$1f\n"
 -              "\t1:\n"
@@ -107484,17 +107471,12 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
 -              ::: "eax", "memory");
 -#undef STR
 -#undef __STR
-+      return 0;
- }
-+void machine_kexec_register_resources(struct resource *res) { ; }
-+
+-}
 +#endif /* CONFIG_XEN */
-+
  /*
   * A architecture hook called to validate the
-  * proposed image and prepare the control pages
-@@ -106,6 +117,7 @@ void machine_kexec_cleanup(struct kimage
+@@ -106,6 +117,7 @@
                set_pages_nx(image->control_code_page, 1);
  }
  
@@ -107502,7 +107484,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
  /*
   * Do not allocate memory (or fail in any way) in machine_kexec().
   * We are past the point of no return, committed to rebooting now.
-@@ -162,25 +174,11 @@ void machine_kexec(struct kimage *image)
+@@ -162,25 +174,11 @@
        page_list[VA_PTE_0] = (unsigned long)kexec_pte0;
        page_list[PA_PTE_1] = __pa(kexec_pte1);
        page_list[VA_PTE_1] = (unsigned long)kexec_pte1;
@@ -107531,7 +107513,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
        image->start = relocate_kernel_ptr((unsigned long)image->head,
                                           (unsigned long)page_list,
                                           image->start, cpu_has_pae,
-@@ -193,6 +191,7 @@ void machine_kexec(struct kimage *image)
+@@ -193,6 +191,7 @@
  
        __ftrace_enabled_restore(save_ftrace_enabled);
  }
@@ -107539,10 +107521,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_32.c linux-2.6.27.19-5.1/a
  
  void arch_crash_save_vmcoreinfo(void)
  {
-diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_64.c
---- linux-2.6.27/arch/x86/kernel/machine_kexec_64.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/machine_kexec_64.c     2009-03-25 16:10:44.000000000 +0000
-@@ -27,6 +27,117 @@ static u64 kexec_pud1[512] PAGE_ALIGNED;
+diff -r 9608d5473017 arch/x86/kernel/machine_kexec_64.c
+--- a/arch/x86/kernel/machine_kexec_64.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/machine_kexec_64.c       Wed May 06 16:56:10 2009 +0100
+@@ -27,6 +27,117 @@
  static u64 kexec_pmd1[512] PAGE_ALIGNED;
  static u64 kexec_pte1[512] PAGE_ALIGNED;
  
@@ -107660,7 +107642,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
  static void init_level2_page(pmd_t *level2p, unsigned long addr)
  {
        unsigned long end_addr;
-@@ -34,7 +145,7 @@ static void init_level2_page(pmd_t *leve
+@@ -34,7 +145,7 @@
        addr &= PAGE_MASK;
        end_addr = addr + PUD_SIZE;
        while (addr < end_addr) {
@@ -107669,7 +107651,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
                addr += PMD_SIZE;
        }
  }
-@@ -59,12 +170,12 @@ static int init_level3_page(struct kimag
+@@ -59,12 +170,12 @@
                }
                level2p = (pmd_t *)page_address(page);
                init_level2_page(level2p, addr);
@@ -107684,7 +107666,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
                addr += PUD_SIZE;
        }
  out:
-@@ -95,12 +206,12 @@ static int init_level4_page(struct kimag
+@@ -95,12 +206,12 @@
                if (result) {
                        goto out;
                }
@@ -107699,11 +107681,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
                addr += PGDIR_SIZE;
        }
  out:
-@@ -111,49 +222,14 @@ out:
+@@ -111,49 +222,14 @@
  static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
  {
        pgd_t *level4p;
--      level4p = (pgd_t *)__va(start_pgtable);
++      unsigned long x_max_pfn = max_pfn;
++
++#ifdef CONFIG_XEN
++      x_max_pfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
++#endif
++
+       level4p = (pgd_t *)__va(start_pgtable);
 -      return init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT);
 -}
 -
@@ -107729,17 +107717,13 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
 -      /* x86-64 supports unaligned loads & stores */
 -      curgdt.size    = limit;
 -      curgdt.address = (unsigned long)newgdt;
-+      unsigned long x_max_pfn = max_pfn;
+-
 -      __asm__ __volatile__ (
 -              "lgdtq %0\n"
 -              : : "m" (curgdt)
 -              );
 -};
-+#ifdef CONFIG_XEN
-+      x_max_pfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
-+#endif
+-
 -static void load_segments(void)
 -{
 -      __asm__ __volatile__ (
@@ -107750,12 +107734,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
 -              "\tmovl %0,%%gs\n"
 -              : : "a" (__KERNEL_DS) : "memory"
 -              );
-+      level4p = (pgd_t *)__va(start_pgtable);
 +      return init_level4_page(image, level4p, 0, x_max_pfn << PAGE_SHIFT);
  }
  
  int machine_kexec_prepare(struct kimage *image)
-@@ -177,6 +253,7 @@ void machine_kexec_cleanup(struct kimage
+@@ -177,6 +253,7 @@
        return;
  }
  
@@ -107763,7 +107746,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
  /*
   * Do not allocate memory (or fail in any way) in machine_kexec().
   * We are past the point of no return, committed to rebooting now.
-@@ -214,30 +291,16 @@ void machine_kexec(struct kimage *image)
+@@ -214,30 +291,16 @@
        page_list[PA_TABLE_PAGE] =
          (unsigned long)__pa(page_address(image->control_code_page));
  
@@ -107797,9 +107780,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/machine_kexec_64.c linux-2.6.27.19-5.1/a
        VMCOREINFO_SYMBOL(init_level4_pgt);
  
  #ifdef CONFIG_NUMA
-diff -purN linux-2.6.27/arch/x86/kernel/microcode-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/microcode-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/microcode-xen.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/microcode-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/microcode-xen.c  Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,214 @@
 +/*
 + *    Intel CPU Microcode Update Driver for Linux
@@ -108015,10 +107998,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/microcode-xen.c linux-2.6.27.19-5.1/arch
 +
 +module_init(microcode_init)
 +module_exit(microcode_exit)
-diff -purN linux-2.6.27/arch/x86/kernel/mmconf-fam10h_64.c linux-2.6.27.19-5.1/arch/x86/kernel/mmconf-fam10h_64.c
---- linux-2.6.27/arch/x86/kernel/mmconf-fam10h_64.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mmconf-fam10h_64.c     2009-03-25 16:10:44.000000000 +0000
-@@ -219,6 +219,16 @@ void __cpuinit fam10h_check_enable_mmcfg
+diff -r 9608d5473017 arch/x86/kernel/mmconf-fam10h_64.c
+--- a/arch/x86/kernel/mmconf-fam10h_64.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/mmconf-fam10h_64.c       Wed May 06 16:56:10 2009 +0100
+@@ -219,6 +219,16 @@
        val |= fam10h_pci_mmconf_base | (8 << FAM10H_MMIO_CONF_BUSRANGE_SHIFT) |
               FAM10H_MMIO_CONF_ENABLE;
        wrmsrl(address, val);
@@ -108035,9 +108018,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/mmconf-fam10h_64.c linux-2.6.27.19-5.1/a
  }
  
  static int __devinit set_check_enable_amd_mmconf(const struct dmi_system_id *d)
-diff -purN linux-2.6.27/arch/x86/kernel/mpparse-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/mpparse-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mpparse-xen.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/mpparse-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/mpparse-xen.c    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1121 @@
 +/*
 + *    Intel Multiprocessor Specification 1.1 and 1.4
@@ -109160,10 +109143,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/mpparse-xen.c linux-2.6.27.19-5.1/arch/x
 +}
 +
 +late_initcall(update_mp_table);
-diff -purN linux-2.6.27/arch/x86/kernel/mpparse.c linux-2.6.27.19-5.1/arch/x86/kernel/mpparse.c
---- linux-2.6.27/arch/x86/kernel/mpparse.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/mpparse.c      2009-03-25 16:10:44.000000000 +0000
-@@ -397,7 +397,9 @@ static int __init smp_read_mpc(struct mp
+diff -r 9608d5473017 arch/x86/kernel/mpparse.c
+--- a/arch/x86/kernel/mpparse.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/mpparse.c        Wed May 06 16:56:10 2009 +0100
+@@ -397,7 +397,9 @@
         generic_bigsmp_probe();
  #endif
  
@@ -109173,9 +109156,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/mpparse.c linux-2.6.27.19-5.1/arch/x86/k
        if (!num_processors)
                printk(KERN_ERR "MPTABLE: no processors registered!\n");
        return num_processors;
-diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kernel/nmi.c
---- linux-2.6.27/arch/x86/kernel/nmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/nmi.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/nmi.c
+--- a/arch/x86/kernel/nmi.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/nmi.c    Wed May 06 16:56:10 2009 +0100
 @@ -27,7 +27,9 @@
  #include <linux/kdebug.h>
  #include <linux/smp.h>
@@ -109196,7 +109179,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kerne
  int nmi_watchdog_enabled;
  
  static cpumask_t backtrace_mask = CPU_MASK_NONE;
-@@ -456,6 +461,8 @@ nmi_watchdog_tick(struct pt_regs *regs, 
+@@ -456,6 +461,8 @@
        return rc;
  }
  
@@ -109205,7 +109188,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kerne
  #ifdef CONFIG_SYSCTL
  
  static int __init setup_unknown_nmi_panic(char *str)
-@@ -475,6 +482,7 @@ static int unknown_nmi_panic_callback(st
+@@ -475,6 +482,7 @@
        return 0;
  }
  
@@ -109213,7 +109196,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kerne
  /*
   * proc handler for /proc/sys/kernel/nmi
   */
-@@ -507,6 +515,7 @@ int proc_nmi_enabled(struct ctl_table *t
+@@ -507,6 +515,7 @@
        }
        return 0;
  }
@@ -109221,7 +109204,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kerne
  
  #endif /* CONFIG_SYSCTL */
  
-@@ -519,6 +528,7 @@ int do_nmi_callback(struct pt_regs *regs
+@@ -519,6 +528,7 @@
        return 0;
  }
  
@@ -109229,15 +109212,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/nmi.c linux-2.6.27.19-5.1/arch/x86/kerne
  void __trigger_all_cpu_backtrace(void)
  {
        int i;
-@@ -531,3 +541,4 @@ void __trigger_all_cpu_backtrace(void)
+@@ -531,3 +541,4 @@
                mdelay(1);
        }
  }
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/paravirt.c linux-2.6.27.19-5.1/arch/x86/kernel/paravirt.c
---- linux-2.6.27/arch/x86/kernel/paravirt.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/paravirt.c     2009-03-25 16:10:44.000000000 +0000
-@@ -373,8 +373,6 @@ struct pv_cpu_ops pv_cpu_ops = {
+diff -r 9608d5473017 arch/x86/kernel/paravirt.c
+--- a/arch/x86/kernel/paravirt.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/paravirt.c       Wed May 06 16:56:10 2009 +0100
+@@ -373,8 +373,6 @@
  
  struct pv_apic_ops pv_apic_ops = {
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -109246,9 +109229,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/paravirt.c linux-2.6.27.19-5.1/arch/x86/
        .setup_boot_clock = setup_boot_APIC_clock,
        .setup_secondary_clock = setup_secondary_APIC_clock,
        .startup_ipi_hook = paravirt_nop,
-diff -purN linux-2.6.27/arch/x86/kernel/pci-dma-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/pci-dma-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pci-dma-xen.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/pci-dma-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/pci-dma-xen.c    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,485 @@
 +#include <linux/dma-mapping.h>
 +#include <linux/dmar.h>
@@ -109735,9 +109718,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/pci-dma-xen.c linux-2.6.27.19-5.1/arch/x
 +}
 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/pci-nommu-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/pci-nommu-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pci-nommu-xen.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/pci-nommu-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/pci-nommu-xen.c  Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,97 @@
 +#include <linux/dma-mapping.h>
 +#include <linux/dmar.h>
@@ -109836,25 +109819,25 @@ diff -purN linux-2.6.27/arch/x86/kernel/pci-nommu-xen.c linux-2.6.27.19-5.1/arch
 +      force_iommu = 0; /* no HW IOMMU */
 +      dma_ops = &nommu_dma_ops;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/pcspeaker.c linux-2.6.27.19-5.1/arch/x86/kernel/pcspeaker.c
---- linux-2.6.27/arch/x86/kernel/pcspeaker.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/pcspeaker.c    2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,11 @@ static __init int add_pcspkr(void)
+diff -r 9608d5473017 arch/x86/kernel/pcspeaker.c
+--- a/arch/x86/kernel/pcspeaker.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/pcspeaker.c      Wed May 06 16:56:10 2009 +0100
+@@ -6,6 +6,11 @@
+ {
        struct platform_device *pd;
        int ret;
++
 +#ifdef CONFIG_XEN
 +      if (!is_initial_xendomain())
 +              return 0;
 +#endif
-+
        pd = platform_device_alloc("pcspkr", -1);
        if (!pd)
-               return -ENOMEM;
-diff -purN linux-2.6.27/arch/x86/kernel/probe_roms_32.c linux-2.6.27.19-5.1/arch/x86/kernel/probe_roms_32.c
---- linux-2.6.27/arch/x86/kernel/probe_roms_32.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/probe_roms_32.c        2009-03-25 16:10:44.000000000 +0000
-@@ -99,6 +99,11 @@ void __init probe_roms(void)
+diff -r 9608d5473017 arch/x86/kernel/probe_roms_32.c
+--- a/arch/x86/kernel/probe_roms_32.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/probe_roms_32.c  Wed May 06 16:56:10 2009 +0100
+@@ -99,6 +99,11 @@
        unsigned char c;
        int i;
  
@@ -109866,7 +109849,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/probe_roms_32.c linux-2.6.27.19-5.1/arch
        /* video rom */
        upper = adapter_rom_resources[0].start;
        for (start = video_rom_resource.start; start < upper; start += 2048) {
-@@ -131,7 +136,7 @@ void __init probe_roms(void)
+@@ -131,7 +136,7 @@
        upper = system_rom_resource.start;
  
        /* check for extension rom (ignore length byte!) */
@@ -109875,9 +109858,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/probe_roms_32.c linux-2.6.27.19-5.1/arch
        if (romsignature(rom)) {
                length = extension_rom_resource.end - extension_rom_resource.start + 1;
                if (romchecksum(rom, length)) {
-diff -purN linux-2.6.27/arch/x86/kernel/process-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process-xen.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process-xen.c    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,374 @@
 +#include <linux/errno.h>
 +#include <linux/kernel.h>
@@ -110253,9 +110236,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/process-xen.c linux-2.6.27.19-5.1/arch/x
 +}
 +early_param("idle", idle_setup);
 +
-diff -purN linux-2.6.27/arch/x86/kernel/process_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_32-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process_32-xen.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,752 @@
 +/*
 + *  Copyright (C) 1995  Linus Torvalds
@@ -111009,9 +110992,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32-xen.c linux-2.6.27.19-5.1/arc
 +      unsigned long range_end = mm->brk + 0x02000000;
 +      return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x86/kernel/process_32.c
---- linux-2.6.27/arch/x86/kernel/process_32.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_32.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_32.c
+--- a/arch/x86/kernel/process_32.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/process_32.c     Wed May 06 16:56:10 2009 +0100
 @@ -36,6 +36,7 @@
  #include <linux/personality.h>
  #include <linux/tick.h>
@@ -111020,7 +111003,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
  #include <linux/prctl.h>
  
  #include <asm/uaccess.h>
-@@ -277,6 +278,7 @@ void exit_thread(void)
+@@ -277,6 +278,7 @@
                tss->x86_tss.io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
                put_cpu();
        }
@@ -111028,7 +111011,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
  }
  
  void flush_thread(void)
-@@ -334,6 +336,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -334,6 +336,8 @@
  
        savesegment(gs, p->thread.gs);
  
@@ -111037,7 +111020,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
        tsk = current;
        if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
                p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr,
-@@ -387,6 +391,7 @@ static void hard_disable_TSC(void)
+@@ -387,6 +391,7 @@
  
  void disable_TSC(void)
  {
@@ -111045,7 +111028,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
        preempt_disable();
        if (!test_and_set_thread_flag(TIF_NOTSC))
                /*
-@@ -395,6 +400,7 @@ void disable_TSC(void)
+@@ -395,6 +400,7 @@
                 */
                hard_disable_TSC();
        preempt_enable();
@@ -111053,7 +111036,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
  }
  
  static void hard_enable_TSC(void)
-@@ -448,6 +454,9 @@ __switch_to_xtra(struct task_struct *pre
+@@ -448,6 +454,9 @@
        prev = &prev_p->thread;
        next = &next_p->thread;
  
@@ -111063,19 +111046,19 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_32.c linux-2.6.27.19-5.1/arch/x8
        debugctl = prev->debugctlmsr;
        if (next->ds_area_msr != prev->ds_area_msr) {
                /* we clear debugctl to make sure DS
-@@ -460,6 +469,9 @@ __switch_to_xtra(struct task_struct *pre
+@@ -459,6 +468,9 @@
        if (next->debugctlmsr != debugctl)
                update_debugctlmsr(next->debugctlmsr);
++
 +      if (test_tsk_thread_flag(next_p, TIF_PERFMON_CTXSW))
 +              pfm_ctxsw_in(prev_p, next_p);
-+
        if (test_tsk_thread_flag(next_p, TIF_DEBUG)) {
                set_debugreg(next->debugreg0, 0);
-               set_debugreg(next->debugreg1, 1);
-diff -purN linux-2.6.27/arch/x86/kernel/process_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/process_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_64-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/process_64-xen.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,920 @@
 +/*
 + *  Copyright (C) 1995  Linus Torvalds
@@ -111997,9 +111980,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64-xen.c linux-2.6.27.19-5.1/arc
 +      unsigned long range_end = mm->brk + 0x02000000;
 +      return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x86/kernel/process_64.c
---- linux-2.6.27/arch/x86/kernel/process_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/process_64.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/process_64.c
+--- a/arch/x86/kernel/process_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/process_64.c     Wed May 06 16:56:10 2009 +0100
 @@ -36,6 +36,7 @@
  #include <linux/kprobes.h>
  #include <linux/kdebug.h>
@@ -112008,7 +111991,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
  #include <linux/prctl.h>
  
  #include <asm/uaccess.h>
-@@ -240,6 +241,7 @@ void exit_thread(void)
+@@ -240,6 +241,7 @@
                t->io_bitmap_max = 0;
                put_cpu();
        }
@@ -112016,7 +111999,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
  }
  
  void flush_thread(void)
-@@ -344,6 +346,8 @@ int copy_thread(int nr, unsigned long cl
+@@ -344,6 +346,8 @@
        savesegment(es, p->thread.es);
        savesegment(ds, p->thread.ds);
  
@@ -112025,7 +112008,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
        if (unlikely(test_tsk_thread_flag(me, TIF_IO_BITMAP))) {
                p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
                if (!p->thread.io_bitmap_ptr) {
-@@ -406,6 +410,7 @@ static void hard_disable_TSC(void)
+@@ -406,6 +410,7 @@
  
  void disable_TSC(void)
  {
@@ -112033,7 +112016,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
        preempt_disable();
        if (!test_and_set_thread_flag(TIF_NOTSC))
                /*
-@@ -414,6 +419,7 @@ void disable_TSC(void)
+@@ -414,6 +419,7 @@
                 */
                hard_disable_TSC();
        preempt_enable();
@@ -112041,7 +112024,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
  }
  
  static void hard_enable_TSC(void)
-@@ -472,6 +478,9 @@ static inline void __switch_to_xtra(stru
+@@ -472,6 +478,9 @@
        prev = &prev_p->thread,
        next = &next_p->thread;
  
@@ -112051,17 +112034,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
        debugctl = prev->debugctlmsr;
        if (next->ds_area_msr != prev->ds_area_msr) {
                /* we clear debugctl to make sure DS
-@@ -484,6 +493,9 @@ static inline void __switch_to_xtra(stru
+@@ -483,6 +492,9 @@
        if (next->debugctlmsr != debugctl)
                update_debugctlmsr(next->debugctlmsr);
++
 +      if (test_tsk_thread_flag(next_p, TIF_PERFMON_CTXSW))
 +              pfm_ctxsw_in(prev_p, next_p);
-+
        if (test_tsk_thread_flag(next_p, TIF_DEBUG)) {
                loaddebug(next, 0);
-               loaddebug(next, 1);
-@@ -729,12 +741,12 @@ unsigned long get_wchan(struct task_stru
+@@ -729,12 +741,12 @@
        if (!p || p == current || p->state==TASK_RUNNING)
                return 0; 
        stack = (unsigned long)task_stack_page(p);
@@ -112076,9 +112059,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/process_64.c linux-2.6.27.19-5.1/arch/x8
                        return 0; 
                ip = *(u64 *)(fp+8);
                if (!in_sched_functions(ip))
-diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/kernel/ptrace.c
---- linux-2.6.27/arch/x86/kernel/ptrace.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/ptrace.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/ptrace.c
+--- a/arch/x86/kernel/ptrace.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/ptrace.c Wed May 06 16:56:10 2009 +0100
 @@ -14,6 +14,7 @@
  #include <linux/errno.h>
  #include <linux/ptrace.h>
@@ -112087,7 +112070,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/ke
  #include <linux/user.h>
  #include <linux/elf.h>
  #include <linux/security.h>
-@@ -1375,30 +1376,6 @@ void send_sigtrap(struct task_struct *ts
+@@ -1375,30 +1376,6 @@
        force_sig_info(SIGTRAP, &info, tsk);
  }
  
@@ -112118,7 +112101,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/ke
  
  #ifdef CONFIG_X86_32
  # define IS_IA32      1
-@@ -1429,11 +1406,23 @@ asmregparm long syscall_trace_enter(stru
+@@ -1429,11 +1406,23 @@
        /* do the secure computing check first */
        secure_computing(regs->orig_ax);
  
@@ -112144,7 +112127,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/ke
  
        if (unlikely(current->audit_context)) {
                if (IS_IA32)
-@@ -1455,11 +1444,14 @@ asmregparm long syscall_trace_enter(stru
+@@ -1455,11 +1444,14 @@
  
  asmregparm void syscall_trace_leave(struct pt_regs *regs)
  {
@@ -112160,7 +112143,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/ke
  
        /*
         * If TIF_SYSCALL_EMU is set, we only get here because of
-@@ -1475,6 +1467,6 @@ asmregparm void syscall_trace_leave(stru
+@@ -1475,6 +1467,6 @@
         * system call instruction.
         */
        if (test_thread_flag(TIF_SINGLESTEP) &&
@@ -112168,9 +112151,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/ptrace.c linux-2.6.27.19-5.1/arch/x86/ke
 +          tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL))
                send_sigtrap(current, regs, 0);
  }
-diff -purN linux-2.6.27/arch/x86/kernel/quirks-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/quirks-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/quirks-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/quirks-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/quirks-xen.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,459 @@
 +/*
 + * This file contains work-arounds for x86 and x86_64 platform bugs.
@@ -112631,9 +112614,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/quirks-xen.c linux-2.6.27.19-5.1/arch/x8
 +}
 +
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/reboot.c linux-2.6.27.19-5.1/arch/x86/kernel/reboot.c
---- linux-2.6.27/arch/x86/kernel/reboot.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/reboot.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/reboot.c
+--- a/arch/x86/kernel/reboot.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/reboot.c Wed May 06 16:56:10 2009 +0100
 @@ -3,6 +3,9 @@
  #include <linux/init.h>
  #include <linux/pm.h>
@@ -112644,7 +112627,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/reboot.c linux-2.6.27.19-5.1/arch/x86/ke
  #include <acpi/reboot.h>
  #include <asm/io.h>
  #include <asm/apic.h>
-@@ -429,6 +432,14 @@ void native_machine_shutdown(void)
+@@ -429,6 +432,14 @@
        /* Make certain I only run on the appropriate processor */
        set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id));
  
@@ -112659,10 +112642,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/reboot.c linux-2.6.27.19-5.1/arch/x86/ke
        /* O.K Now that I'm on the appropriate processor,
         * stop all of the others.
         */
-diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_32.S
---- linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_32.S   2009-03-25 16:10:44.000000000 +0000
-@@ -199,14 +199,45 @@ relocate_new_kernel:
+diff -r 9608d5473017 arch/x86/kernel/relocate_kernel_32.S
+--- a/arch/x86/kernel/relocate_kernel_32.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/relocate_kernel_32.S     Wed May 06 16:56:10 2009 +0100
+@@ -199,14 +199,45 @@
        movl    PTR(PA_PGD)(%ebp), %eax
        movl    %eax, %cr3
  
@@ -112713,7 +112696,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S linux-2.6.27.19-5.1
  
  identity_mapped:
        /* store the start address on the stack */
-@@ -378,5 +409,22 @@ swap_pages:
+@@ -378,5 +409,22 @@
        popl    %ebp
        ret
  
@@ -112736,10 +112719,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_32.S linux-2.6.27.19-5.1
 +
        .globl kexec_control_code_size
  .set kexec_control_code_size, . - relocate_kernel
-diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_64.S
---- linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/relocate_kernel_64.S   2009-03-25 16:10:44.000000000 +0000
-@@ -160,13 +160,39 @@ relocate_new_kernel:
+diff -r 9608d5473017 arch/x86/kernel/relocate_kernel_64.S
+--- a/arch/x86/kernel/relocate_kernel_64.S     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/relocate_kernel_64.S     Wed May 06 16:56:10 2009 +0100
+@@ -160,13 +160,39 @@
        movq    PTR(PA_PGD)(%rsi), %r9
        movq    %r9, %cr3
  
@@ -112783,13 +112766,13 @@ diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S linux-2.6.27.19-5.1
  
  identity_mapped:
        /* store the start address on the stack */
-@@ -262,5 +288,19 @@ identity_mapped:
+@@ -262,5 +288,19 @@
        xorq    %r13, %r13
        xorq    %r14, %r14
        xorq    %r15, %r15
--
-       ret
-+
++      ret
+-      ret
 +      .align  16
 +gdt:
 +      .quad   0x0000000000000000      /* NULL descriptor */
@@ -112804,10 +112787,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/relocate_kernel_64.S linux-2.6.27.19-5.1
 +idt_80:
 +      .word   0                       /* limit */
 +      .quad   0                       /* base */
-diff -purN linux-2.6.27/arch/x86/kernel/rtc.c linux-2.6.27.19-5.1/arch/x86/kernel/rtc.c
---- linux-2.6.27/arch/x86/kernel/rtc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/rtc.c  2009-03-25 16:10:44.000000000 +0000
-@@ -181,6 +181,10 @@ unsigned long read_persistent_clock(void
+diff -r 9608d5473017 arch/x86/kernel/rtc.c
+--- a/arch/x86/kernel/rtc.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/rtc.c    Wed May 06 16:56:10 2009 +0100
+@@ -181,6 +181,10 @@
  {
        unsigned long retval, flags;
  
@@ -112818,7 +112801,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/rtc.c linux-2.6.27.19-5.1/arch/x86/kerne
        spin_lock_irqsave(&rtc_lock, flags);
        retval = get_wallclock();
        spin_unlock_irqrestore(&rtc_lock, flags);
-@@ -190,6 +194,10 @@ unsigned long read_persistent_clock(void
+@@ -190,6 +194,10 @@
  
  int update_persistent_clock(struct timespec now)
  {
@@ -112829,7 +112812,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/rtc.c linux-2.6.27.19-5.1/arch/x86/kerne
        return set_rtc_mmss(now.tv_sec);
  }
  
-@@ -223,11 +231,25 @@ static struct platform_device rtc_device
+@@ -223,11 +231,25 @@
  static __init int add_rtc_cmos(void)
  {
  #ifdef CONFIG_PNP
@@ -112859,9 +112842,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/rtc.c linux-2.6.27.19-5.1/arch/x86/kerne
        return 0;
  }
  device_initcall(add_rtc_cmos);
-diff -purN linux-2.6.27/arch/x86/kernel/setup-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/setup-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup-xen.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/setup-xen.c      Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1198 @@
 +/*
 + *  Copyright (C) 1995  Linus Torvalds
@@ -114061,9 +114044,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup-xen.c linux-2.6.27.19-5.1/arch/x86
 +      return NOTIFY_DONE;
 +}
 +#endif /* !CONFIG_XEN */
-diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/kernel/setup.c
---- linux-2.6.27/arch/x86/kernel/setup.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup.c
+--- a/arch/x86/kernel/setup.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/setup.c  Wed May 06 16:56:10 2009 +0100
 @@ -98,6 +98,7 @@
  
  #include <mach_apic.h>
@@ -114072,7 +114055,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
  
  #include <asm/percpu.h>
  #include <asm/topology.h>
-@@ -578,6 +579,39 @@ static struct x86_quirks default_x86_qui
+@@ -578,6 +579,39 @@
  
  struct x86_quirks *x86_quirks __initdata = &default_x86_quirks;
  
@@ -114112,17 +114095,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
  /*
   * Determine if we were loaded by an EFI loader.  If so, then we have also been
   * passed the efi memmap, systab, etc., so we should use these data structures
-@@ -601,6 +635,9 @@ void __init setup_arch(char **cmdline_p)
+@@ -600,6 +634,9 @@
+ #else
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
  #endif
++
 +      /* VMI may relocate the fixmap; do this before touching ioremap area */
 +      vmi_init();
-+
        early_cpu_init();
        early_ioremap_init();
-@@ -674,13 +711,8 @@ void __init setup_arch(char **cmdline_p)
+@@ -674,13 +711,8 @@
        check_efer();
  #endif
  
@@ -114138,18 +114121,18 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
  
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
-@@ -699,6 +731,10 @@ void __init setup_arch(char **cmdline_p)
+@@ -698,6 +730,10 @@
+ #endif
  
        finish_e820_parsing();
++
 +      dmi_scan_machine();
 +
 +      dmi_check_system(bad_bios_dmi_table);
-+
  #ifdef CONFIG_X86_32
        probe_roms();
- #endif
-@@ -742,6 +778,8 @@ void __init setup_arch(char **cmdline_p)
+@@ -742,6 +778,8 @@
  #else
        num_physpages = max_pfn;
  
@@ -114158,7 +114141,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
  
        /* How many end-of-memory variables you have, grandma! */
        /* need this before calling reserve_initrd */
-@@ -781,8 +819,6 @@ void __init setup_arch(char **cmdline_p)
+@@ -781,14 +819,14 @@
        vsmp_init();
  #endif
  
@@ -114167,16 +114150,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
        io_delay_init();
  
        /*
-@@ -790,6 +826,8 @@ void __init setup_arch(char **cmdline_p)
+        * Parse the ACPI tables for possible boot-time SMP configuration.
         */
        acpi_boot_table_init();
-+      early_acpi_boot_init();
 +
++      early_acpi_boot_init();
  #ifdef CONFIG_ACPI_NUMA
        /*
-        * Parse SRAT to discover nodes.
-@@ -869,6 +907,12 @@ void __init setup_arch(char **cmdline_p)
+@@ -869,6 +907,12 @@
        e820_reserve_resources();
        e820_mark_nosave_regions(max_low_pfn);
  
@@ -114189,15 +114171,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup.c linux-2.6.27.19-5.1/arch/x86/ker
  #ifdef CONFIG_X86_32
        request_resource(&iomem_resource, &video_ram_resource);
  #endif
-@@ -885,3 +929,5 @@ void __init setup_arch(char **cmdline_p)
+@@ -885,3 +929,5 @@
  #endif
  #endif
  }
 +
 +
-diff -purN linux-2.6.27/arch/x86/kernel/setup_percpu-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/setup_percpu-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/setup_percpu-xen.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/setup_percpu-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/setup_percpu-xen.c       Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,385 @@
 +#include <linux/kernel.h>
 +#include <linux/module.h>
@@ -114584,9 +114566,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/setup_percpu-xen.c linux-2.6.27.19-5.1/a
 +
 +#endif /* X86_64_NUMA */
 +
-diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86/kernel/signal_32.c
---- linux-2.6.27/arch/x86/kernel/signal_32.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/signal_32.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/signal_32.c
+--- a/arch/x86/kernel/signal_32.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/signal_32.c      Wed May 06 16:56:10 2009 +0100
 @@ -17,7 +17,9 @@
  #include <linux/errno.h>
  #include <linux/sched.h>
@@ -114597,7 +114579,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86
  #include <linux/smp.h>
  #include <linux/mm.h>
  
-@@ -558,8 +560,6 @@ handle_signal(unsigned long sig, siginfo
+@@ -558,8 +560,6 @@
         * handler too.
         */
        regs->flags &= ~X86_EFLAGS_TF;
@@ -114606,10 +114588,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86
  
        spin_lock_irq(&current->sighand->siglock);
        sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
-@@ -568,6 +568,14 @@ handle_signal(unsigned long sig, siginfo
+@@ -567,6 +567,14 @@
+               sigaddset(&current->blocked, sig);
        recalc_sigpending();
        spin_unlock_irq(&current->sighand->siglock);
++
 +      if (current->instrumentation & PTS_SELF) {
 +              clear_thread_flag(TIF_SYSCALL_TRACE);
 +              current->instrumentation &= ~PTS_SELF;
@@ -114617,11 +114600,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86
 +
 +      tracehook_signal_handler(sig, info, ka, regs,
 +                               test_thread_flag(TIF_SINGLESTEP));
-+
        return 0;
  }
-@@ -657,9 +665,18 @@ static void do_signal(struct pt_regs *re
+@@ -657,9 +665,18 @@
  void
  do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
  {
@@ -114640,9 +114622,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_32.c linux-2.6.27.19-5.1/arch/x86
 +
        clear_thread_flag(TIF_IRET);
  }
-diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86/kernel/signal_64.c
---- linux-2.6.27/arch/x86/kernel/signal_64.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/signal_64.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/signal_64.c
+--- a/arch/x86/kernel/signal_64.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/signal_64.c      Wed May 06 16:56:10 2009 +0100
 @@ -15,10 +15,12 @@
  #include <linux/errno.h>
  #include <linux/wait.h>
@@ -114664,7 +114646,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
  #include "sigframe.h"
  
  #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-@@ -355,35 +358,6 @@ give_sigsegv:
+@@ -355,35 +358,6 @@
  }
  
  /*
@@ -114700,7 +114682,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
   * OK, we're invoking a handler
   */   
  
-@@ -394,9 +368,9 @@ handle_signal(unsigned long sig, siginfo
+@@ -394,9 +368,9 @@
        int ret;
  
        /* Are we from a system call? */
@@ -114712,7 +114694,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
                case -ERESTART_RESTARTBLOCK:
                case -ERESTARTNOHAND:
                        regs->ax = -EINTR;
-@@ -453,8 +427,6 @@ handle_signal(unsigned long sig, siginfo
+@@ -453,8 +427,6 @@
                 * handler too.
                 */
                regs->flags &= ~X86_EFLAGS_TF;
@@ -114721,7 +114703,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
  
                spin_lock_irq(&current->sighand->siglock);
                sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-@@ -462,6 +434,14 @@ handle_signal(unsigned long sig, siginfo
+@@ -462,6 +434,14 @@
                        sigaddset(&current->blocked,sig);
                recalc_sigpending();
                spin_unlock_irq(&current->sighand->siglock);
@@ -114736,7 +114718,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
        }
  
        return ret;
-@@ -518,9 +498,9 @@ static void do_signal(struct pt_regs *re
+@@ -518,9 +498,9 @@
        }
  
        /* Did we come from a system call? */
@@ -114748,7 +114730,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
                case -ERESTARTNOHAND:
                case -ERESTARTSYS:
                case -ERESTARTNOINTR:
-@@ -549,15 +529,25 @@ static void do_signal(struct pt_regs *re
+@@ -549,15 +529,25 @@
  void do_notify_resume(struct pt_regs *regs, void *unused,
                      __u32 thread_info_flags)
  {
@@ -114774,9 +114756,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/signal_64.c linux-2.6.27.19-5.1/arch/x86
  }
  
  void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
-diff -purN linux-2.6.27/arch/x86/kernel/smp-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/smp-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smp-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/smp-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/smp-xen.c        Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,202 @@
 +/*
 + *    Intel SMP support routines.
@@ -114980,10 +114962,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/smp-xen.c linux-2.6.27.19-5.1/arch/x86/k
 +
 +      return IRQ_HANDLED;
 +}
-diff -purN linux-2.6.27/arch/x86/kernel/smp.c linux-2.6.27.19-5.1/arch/x86/kernel/smp.c
---- linux-2.6.27/arch/x86/kernel/smp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smp.c  2009-03-25 16:10:44.000000000 +0000
-@@ -118,26 +118,17 @@ static void native_smp_send_reschedule(i
+diff -r 9608d5473017 arch/x86/kernel/smp.c
+--- a/arch/x86/kernel/smp.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/smp.c    Wed May 06 16:56:10 2009 +0100
+@@ -118,26 +118,17 @@
                WARN_ON(1);
                return;
        }
@@ -115014,9 +114996,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/smp.c linux-2.6.27.19-5.1/arch/x86/kerne
  }
  
  static void stop_this_cpu(void *dummy)
-diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/kernel/smpboot.c
---- linux-2.6.27/arch/x86/kernel/smpboot.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/smpboot.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/smpboot.c
+--- a/arch/x86/kernel/smpboot.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/smpboot.c        Wed May 06 16:56:10 2009 +0100
 @@ -42,6 +42,7 @@
  #include <linux/init.h>
  #include <linux/smp.h>
@@ -115025,7 +115007,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  #include <linux/sched.h>
  #include <linux/percpu.h>
  #include <linux/bootmem.h>
-@@ -123,7 +124,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
+@@ -123,7 +124,6 @@
  
  static atomic_t init_deasserted;
  
@@ -115033,7 +115015,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
  /* representing cpus for which sibling maps can be computed */
  static cpumask_t cpu_sibling_setup_map;
-@@ -165,6 +165,8 @@ static void unmap_cpu_to_node(int cpu)
+@@ -165,6 +165,8 @@
  #endif
  
  #ifdef CONFIG_X86_32
@@ -115042,7 +115024,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly =
                                        { [0 ... NR_CPUS-1] = BAD_APICID };
  
-@@ -210,7 +212,7 @@ static void __cpuinit smp_callin(void)
+@@ -210,7 +212,7 @@
        /*
         * (This works even if the APIC is not enabled.)
         */
@@ -115051,7 +115033,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
        cpuid = smp_processor_id();
        if (cpu_isset(cpuid, cpu_callin_map)) {
                panic("%s: phys CPU#%d, CPU#%d already present??\n", __func__,
-@@ -289,9 +291,7 @@ static void __cpuinit start_secondary(vo
+@@ -289,9 +291,7 @@
         * fragile that we want to limit the things done here to the
         * most necessary things.
         */
@@ -115061,7 +115043,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
        cpu_init();
        preempt_disable();
        smp_callin();
-@@ -550,8 +550,7 @@ static inline void __inquire_remote_apic
+@@ -550,8 +550,7 @@
                        printk(KERN_CONT
                               "a previous APIC delivery may have failed\n");
  
@@ -115071,7 +115053,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
                timeout = 0;
                do {
-@@ -582,12 +581,7 @@ wakeup_secondary_cpu(int logical_apicid,
+@@ -582,12 +581,7 @@
        unsigned long send_status, accept_status = 0;
        int maxlvt;
  
@@ -115085,7 +115067,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
        pr_debug("Waiting for send to finish...\n");
        send_status = safe_apic_wait_icr_idle();
-@@ -637,16 +631,14 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -637,16 +631,14 @@
  
        pr_debug("Asserting INIT.\n");
  
@@ -115107,7 +115089,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
        pr_debug("Waiting for send to finish...\n");
        send_status = safe_apic_wait_icr_idle();
-@@ -656,10 +648,8 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -656,10 +648,8 @@
        pr_debug("Deasserting INIT.\n");
  
        /* Target chip */
@@ -115119,7 +115101,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
        pr_debug("Waiting for send to finish...\n");
        send_status = safe_apic_wait_icr_idle();
-@@ -702,11 +692,10 @@ wakeup_secondary_cpu(int phys_apicid, un
+@@ -702,11 +692,10 @@
                 */
  
                /* Target chip */
@@ -115133,7 +115115,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
  
                /*
                 * Give the other CPU some time to accept the IPI.
-@@ -1175,10 +1164,17 @@ void __init native_smp_prepare_cpus(unsi
+@@ -1175,9 +1164,16 @@
         * Setup boot CPU information
         */
        smp_store_cpu_info(0); /* Final full version of the data */
@@ -115142,16 +115124,15 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
 +#endif
        current_thread_info()->cpu = 0;  /* needed? */
        set_cpu_sibling_map(0);
++
 +#ifdef CONFIG_X86_64
 +      enable_IR_x2apic();
 +      setup_apic_routing();
 +#endif
-+
        if (smp_sanity_check(max_cpus) < 0) {
                printk(KERN_INFO "SMP disabled\n");
-               disable_smp();
-@@ -1186,9 +1182,9 @@ void __init native_smp_prepare_cpus(unsi
+@@ -1186,9 +1182,9 @@
        }
  
        preempt_disable();
@@ -115163,7 +115144,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
                /* Or can we switch back to PIC here? */
        }
        preempt_enable();
-@@ -1382,6 +1378,7 @@ int __cpu_disable(void)
+@@ -1382,6 +1378,7 @@
        remove_cpu_from_maps(cpu);
        unlock_vector_lock();
        fixup_irqs(cpu_online_map);
@@ -115171,10 +115152,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/smpboot.c linux-2.6.27.19-5.1/arch/x86/k
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/x86/kernel/sys_x86_64.c linux-2.6.27.19-5.1/arch/x86/kernel/sys_x86_64.c
---- linux-2.6.27/arch/x86/kernel/sys_x86_64.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/sys_x86_64.c   2009-03-25 16:10:44.000000000 +0000
-@@ -106,6 +106,8 @@ arch_get_unmapped_area(struct file *filp
+diff -r 9608d5473017 arch/x86/kernel/sys_x86_64.c
+--- a/arch/x86/kernel/sys_x86_64.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/sys_x86_64.c     Wed May 06 16:56:10 2009 +0100
+@@ -106,6 +106,8 @@
  
  full_search:
        for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
@@ -115183,7 +115164,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/sys_x86_64.c linux-2.6.27.19-5.1/arch/x8
                /* At this point:  (!vma || addr < vma->vm_end). */
                if (end - len < addr) {
                        /*
-@@ -119,15 +121,22 @@ full_search:
+@@ -119,15 +121,22 @@
                        }
                        return -ENOMEM;
                }
@@ -115209,7 +115190,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/sys_x86_64.c linux-2.6.27.19-5.1/arch/x8
  
                addr = vma->vm_end;
        }
-@@ -174,34 +183,51 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -174,34 +183,51 @@
  
        /* make sure it can fit in the remaining address space */
        if (addr > len) {
@@ -115271,10 +115252,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/sys_x86_64.c linux-2.6.27.19-5.1/arch/x8
        } while (len < vma->vm_start);
  
  bottomup:
-diff -purN linux-2.6.27/arch/x86/kernel/syscall_table_32.S linux-2.6.27.19-5.1/arch/x86/kernel/syscall_table_32.S
---- linux-2.6.27/arch/x86/kernel/syscall_table_32.S    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/syscall_table_32.S     2009-03-25 16:10:44.000000000 +0000
-@@ -88,7 +88,7 @@ ENTRY(sys_call_table)
+diff -r 9608d5473017 arch/x86/kernel/syscall_table_32.S
+--- a/arch/x86/kernel/syscall_table_32.S       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/syscall_table_32.S       Wed May 06 16:56:10 2009 +0100
+@@ -88,7 +88,7 @@
        .long sys_uselib
        .long sys_swapon
        .long sys_reboot
@@ -115283,9 +115264,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/syscall_table_32.S linux-2.6.27.19-5.1/a
        .long old_mmap          /* 90 */
        .long sys_munmap
        .long sys_truncate
-diff -purN linux-2.6.27/arch/x86/kernel/time_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/time_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/time_32-xen.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/time_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/time_32-xen.c    Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,985 @@
 +/*
 + *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
@@ -116272,10 +116253,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/time_32-xen.c linux-2.6.27.19-5.1/arch/x
 +      return 0;
 +}
 +__initcall(xen_sysctl_init);
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_32.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_32.c
---- linux-2.6.27/arch/x86/kernel/tlb_32.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_32.c       2009-03-25 16:10:44.000000000 +0000
-@@ -158,7 +158,7 @@ void native_flush_tlb_others(const cpuma
+diff -r 9608d5473017 arch/x86/kernel/tlb_32.c
+--- a/arch/x86/kernel/tlb_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_32.c Wed May 06 16:56:10 2009 +0100
+@@ -158,7 +158,7 @@
         * We have to send the IPI only to
         * CPUs affected.
         */
@@ -116284,10 +116265,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/tlb_32.c linux-2.6.27.19-5.1/arch/x86/ke
  
        while (!cpus_empty(flush_cpumask))
                /* nothing. lockup detection does not belong here */
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_64.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_64.c
---- linux-2.6.27/arch/x86/kernel/tlb_64.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_64.c       2009-03-25 16:10:44.000000000 +0000
-@@ -186,7 +186,7 @@ void native_flush_tlb_others(const cpuma
+diff -r 9608d5473017 arch/x86/kernel/tlb_64.c
+--- a/arch/x86/kernel/tlb_64.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_64.c Wed May 06 16:56:10 2009 +0100
+@@ -186,7 +186,7 @@
         * We have to send the IPI only to
         * CPUs affected.
         */
@@ -116296,10 +116277,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/tlb_64.c linux-2.6.27.19-5.1/arch/x86/ke
  
        while (!cpus_empty(f->flush_cpumask))
                cpu_relax();
-diff -purN linux-2.6.27/arch/x86/kernel/tlb_uv.c linux-2.6.27.19-5.1/arch/x86/kernel/tlb_uv.c
---- linux-2.6.27/arch/x86/kernel/tlb_uv.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tlb_uv.c       2009-03-25 16:10:44.000000000 +0000
-@@ -566,14 +566,10 @@ static int __init uv_ptc_init(void)
+diff -r 9608d5473017 arch/x86/kernel/tlb_uv.c
+--- a/arch/x86/kernel/tlb_uv.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tlb_uv.c Wed May 06 16:56:10 2009 +0100
+@@ -566,14 +566,10 @@
        if (!is_uv_system())
                return 0;
  
@@ -116314,7 +116295,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tlb_uv.c linux-2.6.27.19-5.1/arch/x86/ke
                return -EINVAL;
        }
        proc_uv_ptc->proc_fops = &proc_uv_ptc_operations;
-@@ -586,7 +582,6 @@ static int __init uv_ptc_init(void)
+@@ -586,7 +582,6 @@
  static struct bau_control * __init uv_table_bases_init(int blade, int node)
  {
        int i;
@@ -116322,21 +116303,21 @@ diff -purN linux-2.6.27/arch/x86/kernel/tlb_uv.c linux-2.6.27.19-5.1/arch/x86/ke
        struct bau_msg_status *msp;
        struct bau_control *bau_tabp;
  
-@@ -603,13 +598,6 @@ static struct bau_control * __init uv_ta
+@@ -602,13 +597,6 @@
+       for (i = 0, msp = bau_tabp->msg_statuses; i < DEST_Q_SIZE; i++, msp++)
                bau_cpubits_clear(&msp->seen_by, (int)
                                  uv_blade_nr_possible_cpus(blade));
+-
 -      bau_tabp->watching =
 -          kmalloc_node(sizeof(int) * DEST_NUM_RESOURCES, GFP_KERNEL, node);
 -      BUG_ON(!bau_tabp->watching);
 -
 -      for (i = 0, ip = bau_tabp->watching; i < DEST_Q_SIZE; i++, ip++)
 -              *ip = 0;
--
        uv_bau_table_bases[blade] = bau_tabp;
  
-       return bau_tabp;
-@@ -632,7 +620,6 @@ uv_table_bases_finish(int blade, int nod
+@@ -632,7 +620,6 @@
                bcp->bau_msg_head       = bau_tablesp->va_queue_first;
                bcp->va_queue_first     = bau_tablesp->va_queue_first;
                bcp->va_queue_last      = bau_tablesp->va_queue_last;
@@ -116344,9 +116325,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/tlb_uv.c linux-2.6.27.19-5.1/arch/x86/ke
                bcp->msg_statuses       = bau_tablesp->msg_statuses;
                bcp->descriptor_base    = adp;
        }
-diff -purN linux-2.6.27/arch/x86/kernel/traps_32-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_32-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/traps_32-xen.c   Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1322 @@
 +/*
 + *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -117670,9 +117651,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32-xen.c linux-2.6.27.19-5.1/arch/
 +}
 +__setup("call_trace=", call_trace_setup);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_32.c
---- linux-2.6.27/arch/x86/kernel/traps_32.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_32.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_32.c
+--- a/arch/x86/kernel/traps_32.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/traps_32.c       Wed May 06 16:56:10 2009 +0100
 @@ -46,6 +46,10 @@
  #include <linux/edac.h>
  #endif
@@ -117684,7 +117665,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
  #include <asm/arch_hooks.h>
  #include <asm/stacktrace.h>
  #include <asm/processor.h>
-@@ -79,8 +83,14 @@ gate_desc idt_table[256]
+@@ -79,8 +83,14 @@
        __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
  
  int panic_on_unrecovered_nmi;
@@ -117699,7 +117680,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
  static int ignore_nmis;
  static int die_counter;
  
-@@ -151,6 +161,33 @@ print_context_stack(struct thread_info *
+@@ -151,12 +161,73 @@
        return bp;
  }
  
@@ -117733,10 +117714,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
  void dump_trace(struct task_struct *task, struct pt_regs *regs,
                unsigned long *stack, unsigned long bp,
                const struct stacktrace_ops *ops, void *data)
-@@ -158,6 +195,40 @@ void dump_trace(struct task_struct *task
+ {
        if (!task)
                task = current;
++
 +      if (call_trace >= 0) {
 +              int unw_ret = 0;
 +              struct unwind_frame_info info;
@@ -117770,11 +117751,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
 +              } else
 +                      ops->warning(data, "Inexact backtrace:\n");
 +      }
-+
        if (!stack) {
                unsigned long dummy;
-               stack = &dummy;
-@@ -395,6 +466,9 @@ void __kprobes oops_end(unsigned long fl
+@@ -395,6 +466,9 @@
        add_taint(TAINT_DIE);
        __raw_spin_unlock(&die_lock);
        raw_local_irq_restore(flags);
@@ -117784,7 +117764,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
  
        if (!regs)
                return;
-@@ -428,6 +502,8 @@ int __kprobes __die(const char *str, str
+@@ -428,6 +502,8 @@
        printk("DEBUG_PAGEALLOC");
  #endif
        printk("\n");
@@ -117793,7 +117773,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        if (notify_die(DIE_OOPS, str, regs, err,
                        current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
                return 1;
-@@ -463,6 +539,9 @@ void die(const char *str, struct pt_regs
+@@ -463,6 +539,9 @@
                printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
        }
  
@@ -117803,7 +117783,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        oops_end(flags, regs, SIGSEGV);
  }
  
-@@ -573,7 +652,7 @@ void do_##name(struct pt_regs *regs, lon
+@@ -573,7 +652,7 @@
  }
  
  DO_VM86_ERROR_INFO(0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->ip)
@@ -117812,7 +117792,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
  DO_VM86_ERROR(3, SIGTRAP, "int3", int3)
  #endif
  DO_VM86_ERROR(4, SIGSEGV, "overflow", overflow)
-@@ -701,6 +780,9 @@ io_check_error(unsigned char reason, str
+@@ -701,6 +780,9 @@
        printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
  
@@ -117822,7 +117802,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        /* Re-enable the IOCK line, wait for a few seconds */
        reason = (reason & 0xf) | 8;
        outb(reason, 0x61);
-@@ -716,6 +798,10 @@ io_check_error(unsigned char reason, str
+@@ -716,6 +798,10 @@
  static notrace __kprobes void
  unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
  {
@@ -117833,7 +117813,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
                return;
  #ifdef CONFIG_MCA
-@@ -756,6 +842,9 @@ void notrace __kprobes die_nmi(char *str
+@@ -756,6 +842,9 @@
        printk(" on CPU%d, ip %08lx, registers:\n",
                smp_processor_id(), regs->ip);
        show_registers(regs);
@@ -117843,10 +117823,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        if (do_panic)
                panic("Non maskable interrupt");
        console_silent();
-@@ -785,6 +874,16 @@ static notrace __kprobes void default_do
+@@ -784,6 +873,16 @@
+       /* Only the BSP gets external NMIs from the system. */
        if (!cpu)
                reason = get_nmi_reason();
++
 +#if defined(CONFIG_SMP) && defined(CONFIG_KDB)
 +      /*
 +       * Call the kernel debugger to see if this NMI is due
@@ -117856,11 +117837,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
 +              return;
 +      }
 +#endif /* defined(CONFIG_SMP) && defined(CONFIG_KDB) */
-+
        if (!(reason & 0xc0)) {
                if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
-                                                               == NOTIFY_STOP)
-@@ -852,6 +951,10 @@ void __kprobes do_int3(struct pt_regs *r
+@@ -852,6 +951,10 @@
  {
        trace_hardirqs_fixup();
  
@@ -117871,22 +117851,23 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
        if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
                        == NOTIFY_STOP)
                return;
-@@ -902,6 +1005,11 @@ void __kprobes do_debug(struct pt_regs *
+@@ -901,6 +1004,11 @@
+        */
        clear_tsk_thread_flag(tsk, TIF_DEBUGCTLMSR);
        tsk->thread.debugctlmsr = 0;
++
 +#ifdef        CONFIG_KDB
 +      if (kdb(KDB_REASON_DEBUG, error_code, regs))
 +              return;
 +#endif        /* CONFIG_KDB */
-+
        if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
                                                SIGTRAP) == NOTIFY_STOP)
-               return;
-@@ -956,6 +1064,16 @@ clear_TF_reenable:
+@@ -955,6 +1063,16 @@
+       regs->flags &= ~X86_EFLAGS_TF;
        return;
  }
++
 +#if   defined(CONFIG_KDB) && !defined(CONFIG_KPROBES)
 +void do_int3(struct pt_regs * regs, long error_code)
 +{
@@ -117896,11 +117877,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
 +}
 +#endif        /* CONFIG_KDB && !CONFIG_KPROBES */
 +
-+
  /*
   * Note that we play around with the 'TS' bit in an attempt to get
-  * the correct behaviour even in the presence of the asynchronous
-@@ -1254,3 +1372,19 @@ static int __init code_bytes_setup(char 
+@@ -1254,3 +1372,19 @@
        return 1;
  }
  __setup("code_bytes=", code_bytes_setup);
@@ -117920,9 +117900,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_32.c linux-2.6.27.19-5.1/arch/x86/
 +}
 +__setup("call_trace=", call_trace_setup);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_64-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/traps_64-xen.c   Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,1333 @@
 +/*
 + *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -119257,9 +119237,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64-xen.c linux-2.6.27.19-5.1/arch/
 +}
 +early_param("call_trace", call_trace_setup);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/kernel/traps_64.c
---- linux-2.6.27/arch/x86/kernel/traps_64.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/traps_64.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/traps_64.c
+--- a/arch/x86/kernel/traps_64.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/traps_64.c       Wed May 06 16:56:10 2009 +0100
 @@ -56,8 +56,14 @@
  #include <mach_traps.h>
  
@@ -119275,7 +119255,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
  static int ignore_nmis;
  static int die_counter;
  
-@@ -162,6 +168,32 @@ static unsigned long *in_exception_stack
+@@ -162,6 +168,32 @@
        return NULL;
  }
  
@@ -119308,10 +119288,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
  /*
   * x86-64 can have up to three kernel stacks: 
   * process stack
-@@ -226,6 +258,42 @@ void dump_trace(struct task_struct *task
+@@ -225,6 +257,42 @@
        if (!task)
                task = current;
++
 +      if (call_trace >= 0) {
 +              int unw_ret = 0;
 +              struct unwind_frame_info info;
@@ -119347,11 +119328,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
 +              } else
 +                      ops->warning(data, "Inexact backtrace:\n");
 +      }
-+
        if (!stack) {
                unsigned long dummy;
-               stack = &dummy;
-@@ -537,6 +605,8 @@ int __kprobes __die(const char *str, str
+@@ -537,6 +605,8 @@
        printk("DEBUG_PAGEALLOC");
  #endif
        printk("\n");
@@ -119360,7 +119340,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
        if (notify_die(DIE_OOPS, str, regs, err,
                        current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
                return 1;
-@@ -581,6 +651,8 @@ die_nmi(char *str, struct pt_regs *regs,
+@@ -581,6 +651,8 @@
        printk(" on CPU%d, ip %08lx, registers:\n",
                smp_processor_id(), regs->ip);
        show_registers(regs);
@@ -119369,17 +119349,17 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
        if (kexec_should_crash(current))
                crash_kexec(regs);
        if (do_panic || panic_on_oops)
-@@ -769,6 +841,9 @@ io_check_error(unsigned char reason, str
+@@ -768,6 +840,9 @@
+ {
        printk("NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
++
 +      if (panic_on_io_nmi)
 +              panic("NMI IOCK error: Not continuing");
-+
        /* Re-enable the IOCK line, wait for a few seconds */
        reason = (reason & 0xf) | 8;
-       outb(reason, 0x61);
-@@ -1210,3 +1285,21 @@ static int __init code_bytes_setup(char 
+@@ -1210,3 +1285,21 @@
        return 1;
  }
  __setup("code_bytes=", code_bytes_setup);
@@ -119401,9 +119381,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/traps_64.c linux-2.6.27.19-5.1/arch/x86/
 +}
 +early_param("call_trace", call_trace_setup);
 +#endif
-diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kernel/tsc.c
---- linux-2.6.27/arch/x86/kernel/tsc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tsc.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/tsc.c
+--- a/arch/x86/kernel/tsc.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tsc.c    Wed May 06 16:56:10 2009 +0100
 @@ -15,6 +15,7 @@
  #include <asm/vgtod.h>
  #include <asm/time.h>
@@ -119412,7 +119392,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
  
  unsigned int cpu_khz;           /* TSC clocks / usec, not used here */
  EXPORT_SYMBOL(cpu_khz);
-@@ -31,6 +32,7 @@ static int tsc_unstable;
+@@ -31,6 +32,7 @@
     erroneous rdtsc usage on !cpu_has_tsc processors */
  static int tsc_disabled = -1;
  
@@ -119420,10 +119400,11 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
  /*
   * Scheduler clock - returns current time in nanosec units.
   */
-@@ -98,6 +100,15 @@ int __init notsc_setup(char *str)
+@@ -97,6 +99,15 @@
+ #endif
  
  __setup("notsc", notsc_setup);
++
 +static int __init tsc_setup(char *str)
 +{
 +      if (!strcmp(str, "reliable"))
@@ -119432,28 +119413,26 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
 +}
 +
 +__setup("tsc=", tsc_setup);
-+
  #define MAX_RETRIES     5
  #define SMI_TRESHOLD    50000
-@@ -189,9 +200,15 @@ unsigned long native_calibrate_tsc(void)
+@@ -189,8 +200,14 @@
  {
        u64 tsc1, tsc2, delta, pm1, pm2, hpet1, hpet2;
        unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX;
 -      unsigned long flags;
 +      unsigned long flags, tsc_khz;
        int hpet = is_hpet_enabled(), i;
++
 +      tsc_khz = get_hypervisor_tsc_freq();
 +      if (tsc_khz) {
 +              printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
 +              return tsc_khz;
 +      }
-+
        /*
         * Run 5 calibration loops to get the lowest frequency value
-        * (the best estimate). We use two different calibration modes
-@@ -557,24 +574,21 @@ static struct dmi_system_id __initdata b
+@@ -557,24 +574,21 @@
        {}
  };
  
@@ -119475,18 +119454,18 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
 +      /* Geode_LX - the OLPC CPU has a possibly a very reliable TSC */
        if (res_low & RTSC_SUSP)
 -              clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
--}
--#else
--static inline void check_geode_tsc_reliable(void) { }
 +              tsc_clocksource_reliable = 1;
- #endif
++#endif
 +      if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
 +              tsc_clocksource_reliable = 1;
-+}
+ }
+-#else
+-static inline void check_geode_tsc_reliable(void) { }
+-#endif
  
  /*
   * Make an educated guess if the TSC is trustworthy and synchronized
-@@ -609,6 +623,8 @@ static void __init init_tsc_clocksource(
+@@ -609,6 +623,8 @@
  {
        clocksource_tsc.mult = clocksource_khz2mult(tsc_khz,
                        clocksource_tsc.shift);
@@ -119495,7 +119474,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
        /* lower the rating if we already know its unstable: */
        if (check_tsc_unstable()) {
                clocksource_tsc.rating = 0;
-@@ -639,10 +655,6 @@ void __init tsc_init(void)
+@@ -639,10 +655,6 @@
                cpu_khz = calibrate_cpu();
  #endif
  
@@ -119506,7 +119485,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
        printk("Detected %lu.%03lu MHz processor.\n",
                        (unsigned long)cpu_khz / 1000,
                        (unsigned long)cpu_khz % 1000);
-@@ -662,6 +674,10 @@ void __init tsc_init(void)
+@@ -662,6 +674,10 @@
        /* now allow native_sched_clock() to use rdtsc */
        tsc_disabled = 0;
  
@@ -119517,7 +119496,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
        use_tsc_delay();
        /* Check and install the TSC clocksource */
        dmi_check_system(bad_tsc_dmi_table);
-@@ -669,7 +685,7 @@ void __init tsc_init(void)
+@@ -669,7 +685,7 @@
        if (unsynchronized_tsc())
                mark_tsc_unstable("TSCs unsynchronized");
  
@@ -119526,10 +119505,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc.c linux-2.6.27.19-5.1/arch/x86/kerne
        init_tsc_clocksource();
  }
  
-diff -purN linux-2.6.27/arch/x86/kernel/tsc_sync.c linux-2.6.27.19-5.1/arch/x86/kernel/tsc_sync.c
---- linux-2.6.27/arch/x86/kernel/tsc_sync.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/tsc_sync.c     2009-03-25 16:10:44.000000000 +0000
-@@ -108,6 +108,12 @@ void __cpuinit check_tsc_sync_source(int
+diff -r 9608d5473017 arch/x86/kernel/tsc_sync.c
+--- a/arch/x86/kernel/tsc_sync.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/tsc_sync.c       Wed May 06 16:56:10 2009 +0100
+@@ -108,6 +108,12 @@
        if (unsynchronized_tsc())
                return;
  
@@ -119542,7 +119521,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc_sync.c linux-2.6.27.19-5.1/arch/x86/
        printk(KERN_INFO "checking TSC synchronization [CPU#%d -> CPU#%d]:",
                          smp_processor_id(), cpu);
  
-@@ -161,7 +167,7 @@ void __cpuinit check_tsc_sync_target(voi
+@@ -161,7 +167,7 @@
  {
        int cpus = 2;
  
@@ -119551,9 +119530,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/tsc_sync.c linux-2.6.27.19-5.1/arch/x86/
                return;
  
        /*
-diff -purN linux-2.6.27/arch/x86/kernel/uv_irq.c linux-2.6.27.19-5.1/arch/x86/kernel/uv_irq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/uv_irq.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/uv_irq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/uv_irq.c Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,79 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -119634,9 +119613,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/uv_irq.c linux-2.6.27.19-5.1/arch/x86/ke
 +      destroy_irq(irq);
 +}
 +EXPORT_SYMBOL_GPL(uv_teardown_irq);
-diff -purN linux-2.6.27/arch/x86/kernel/uv_sysfs.c linux-2.6.27.19-5.1/arch/x86/kernel/uv_sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/uv_sysfs.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/uv_sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/uv_sysfs.c       Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,72 @@
 +/*
 + * This file supports the /sys/firmware/sgi_uv interfaces for SGI UV.
@@ -119710,10 +119689,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/uv_sysfs.c linux-2.6.27.19-5.1/arch/x86/
 +}
 +
 +device_initcall(sgi_uv_sysfs_init);
-diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/kernel/vm86_32.c
---- linux-2.6.27/arch/x86/kernel/vm86_32.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vm86_32.c      2009-03-25 16:10:44.000000000 +0000
-@@ -124,7 +124,9 @@ static int copy_vm86_regs_from_user(stru
+diff -r 9608d5473017 arch/x86/kernel/vm86_32.c
+--- a/arch/x86/kernel/vm86_32.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vm86_32.c        Wed May 06 16:56:10 2009 +0100
+@@ -124,7 +124,9 @@
  
  struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
  {
@@ -119723,7 +119702,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/k
        struct pt_regs *ret;
        unsigned long tmp;
  
-@@ -147,12 +149,16 @@ struct pt_regs *save_v86_state(struct ke
+@@ -147,12 +149,16 @@
                do_exit(SIGSEGV);
        }
  
@@ -119740,7 +119719,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/k
  
        ret = KVM86->regs32;
  
-@@ -279,7 +285,9 @@ out:
+@@ -279,7 +285,9 @@
  
  static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk)
  {
@@ -119750,7 +119729,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/k
  /*
   * make sure the vm86() system call doesn't try to do anything silly
   */
-@@ -324,12 +332,16 @@ static void do_sys_vm86(struct kernel_vm
+@@ -324,12 +332,16 @@
        tsk->thread.saved_fs = info->regs32->fs;
        savesegment(gs, tsk->thread.saved_gs);
  
@@ -119767,10 +119746,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/vm86_32.c linux-2.6.27.19-5.1/arch/x86/k
  
        tsk->thread.screen_bitmap = info->screen_bitmap;
        if (info->flags & VM86_SCREEN_BITMAP)
-diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/kernel/vmi_32.c
---- linux-2.6.27/arch/x86/kernel/vmi_32.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vmi_32.c       2009-03-25 16:10:44.000000000 +0000
-@@ -430,6 +430,16 @@ static void vmi_release_pmd(u32 pfn)
+diff -r 9608d5473017 arch/x86/kernel/vmi_32.c
+--- a/arch/x86/kernel/vmi_32.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vmi_32.c Wed May 06 16:56:10 2009 +0100
+@@ -430,6 +430,16 @@
  }
  
  /*
@@ -119787,7 +119766,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
   * Helper macros for MMU update flags.  We can defer updates until a flush
   * or page invalidation only if the update is to the current address space
   * (otherwise, there is no flush).  We must check against init_mm, since
-@@ -677,6 +687,49 @@ static inline int __init probe_vmi_rom(v
+@@ -677,6 +687,49 @@
        return 0;
  }
  
@@ -119837,7 +119816,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
  /*
   * VMI setup common to all processors
   */
-@@ -881,6 +934,7 @@ static inline int __init activate_vmi(vo
+@@ -881,6 +934,7 @@
        if (vmi_ops.release_page) {
                pv_mmu_ops.release_pte = vmi_release_pte;
                pv_mmu_ops.release_pmd = vmi_release_pmd;
@@ -119845,7 +119824,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
        }
  
        /* Set linear is needed in all cases */
-@@ -905,8 +959,8 @@ static inline int __init activate_vmi(vo
+@@ -905,8 +959,8 @@
  #endif
  
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -119856,7 +119835,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
  #endif
  
        /*
-@@ -960,8 +1014,6 @@ static inline int __init activate_vmi(vo
+@@ -960,8 +1014,6 @@
  
  void __init vmi_init(void)
  {
@@ -119865,7 +119844,7 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
        if (!vmi_rom)
                probe_vmi_rom();
        else
-@@ -973,13 +1025,21 @@ void __init vmi_init(void)
+@@ -973,13 +1025,21 @@
  
        reserve_top_address(-vmi_rom->virtual_top);
  
@@ -119890,10 +119869,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmi_32.c linux-2.6.27.19-5.1/arch/x86/ke
        local_irq_restore(flags & X86_EFLAGS_IF);
  }
  
-diff -purN linux-2.6.27/arch/x86/kernel/vmlinux_32.lds.S linux-2.6.27.19-5.1/arch/x86/kernel/vmlinux_32.lds.S
---- linux-2.6.27/arch/x86/kernel/vmlinux_32.lds.S      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vmlinux_32.lds.S       2009-03-25 16:10:44.000000000 +0000
-@@ -29,6 +29,12 @@ PHDRS {
+diff -r 9608d5473017 arch/x86/kernel/vmlinux_32.lds.S
+--- a/arch/x86/kernel/vmlinux_32.lds.S Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kernel/vmlinux_32.lds.S Wed May 06 16:56:10 2009 +0100
+@@ -29,6 +29,12 @@
  SECTIONS
  {
    . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
@@ -119906,9 +119885,9 @@ diff -purN linux-2.6.27/arch/x86/kernel/vmlinux_32.lds.S linux-2.6.27.19-5.1/arc
    phys_startup_32 = startup_32 - LOAD_OFFSET;
  
    .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
-diff -purN linux-2.6.27/arch/x86/kernel/vsyscall_64-xen.c linux-2.6.27.19-5.1/arch/x86/kernel/vsyscall_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kernel/vsyscall_64-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/kernel/vsyscall_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/kernel/vsyscall_64-xen.c        Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,317 @@
 +/*
 + *  Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
@@ -120227,10 +120206,10 @@ diff -purN linux-2.6.27/arch/x86/kernel/vsyscall_64-xen.c linux-2.6.27.19-5.1/ar
 +}
 +
 +__initcall(vsyscall_init);
-diff -purN linux-2.6.27/arch/x86/kvm/Kconfig linux-2.6.27.19-5.1/arch/x86/kvm/Kconfig
---- linux-2.6.27/arch/x86/kvm/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/kvm/Kconfig   2009-03-25 16:10:44.000000000 +0000
-@@ -7,6 +7,7 @@ config HAVE_KVM
+diff -r 9608d5473017 arch/x86/kvm/Kconfig
+--- a/arch/x86/kvm/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/kvm/Kconfig     Wed May 06 16:56:10 2009 +0100
+@@ -7,6 +7,7 @@
  menuconfig VIRTUALIZATION
        bool "Virtualization"
        depends on HAVE_KVM || X86
@@ -120238,10 +120217,11 @@ diff -purN linux-2.6.27/arch/x86/kvm/Kconfig linux-2.6.27.19-5.1/arch/x86/kvm/Kc
        default y
        ---help---
          Say Y here to get to see options for using your Linux host to run other
-@@ -17,6 +18,20 @@ menuconfig VIRTUALIZATION
+@@ -16,6 +17,20 @@
+         If you say N, all options in this submenu will be skipped and disabled.
  
  if VIRTUALIZATION
++
 +config KVM_KMP
 +      bool "Build Kernel-based Virtual Machine (KVM) as KMP"
 +      depends on HAVE_KVM
@@ -120255,13 +120235,12 @@ diff -purN linux-2.6.27/arch/x86/kvm/Kconfig linux-2.6.27.19-5.1/arch/x86/kvm/Kc
 +        itself.
 +
 +        Say Y here.
-+
  config KVM
        tristate "Kernel-based Virtual Machine (KVM) support"
-       depends on HAVE_KVM
-diff -purN linux-2.6.27/arch/x86/lguest/boot.c linux-2.6.27.19-5.1/arch/x86/lguest/boot.c
---- linux-2.6.27/arch/x86/lguest/boot.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lguest/boot.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/lguest/boot.c
+--- a/arch/x86/lguest/boot.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lguest/boot.c   Wed May 06 16:56:10 2009 +0100
 @@ -55,6 +55,7 @@
  #include <linux/lguest_launcher.h>
  #include <linux/virtio_console.h>
@@ -120270,7 +120249,7 @@ diff -purN linux-2.6.27/arch/x86/lguest/boot.c linux-2.6.27.19-5.1/arch/x86/lgue
  #include <asm/lguest.h>
  #include <asm/paravirt.h>
  #include <asm/param.h>
-@@ -783,14 +784,45 @@ static void lguest_wbinvd(void)
+@@ -783,14 +784,45 @@
   * code qualifies for Advanced.  It will also never interrupt anything.  It
   * does, however, allow us to get through the Linux boot code. */
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -120318,7 +120297,7 @@ diff -purN linux-2.6.27/arch/x86/lguest/boot.c linux-2.6.27.19-5.1/arch/x86/lgue
  #endif
  
  /* STOP!  Until an interrupt comes in. */
-@@ -990,8 +1022,7 @@ __init void lguest_init(void)
+@@ -990,8 +1022,7 @@
  
  #ifdef CONFIG_X86_LOCAL_APIC
        /* apic read/write intercepts */
@@ -120328,18 +120307,18 @@ diff -purN linux-2.6.27/arch/x86/lguest/boot.c linux-2.6.27.19-5.1/arch/x86/lgue
  #endif
  
        /* time operations */
-diff -purN linux-2.6.27/arch/x86/lib/Makefile linux-2.6.27.19-5.1/arch/x86/lib/Makefile
---- linux-2.6.27/arch/x86/lib/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/Makefile  2009-03-25 16:10:44.000000000 +0000
-@@ -25,3 +25,5 @@ else
+diff -r 9608d5473017 arch/x86/lib/Makefile
+--- a/arch/x86/lib/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/Makefile    Wed May 06 16:56:10 2009 +0100
+@@ -25,3 +25,5 @@
          lib-y += memmove_64.o memset_64.o
          lib-y += copy_user_64.o rwlock_64.o copy_user_nocache_64.o
  endif
 +
 +lib-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
-diff -purN linux-2.6.27/arch/x86/lib/scrub.c linux-2.6.27.19-5.1/arch/x86/lib/scrub.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/scrub.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/lib/scrub.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/lib/scrub.c     Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,21 @@
 +#include <asm/cpufeature.h>
 +#include <asm/page.h>
@@ -120362,10 +120341,10 @@ diff -purN linux-2.6.27/arch/x86/lib/scrub.c linux-2.6.27.19-5.1/arch/x86/lib/sc
 +              for (; count--; v += PAGE_SIZE)
 +                      clear_page(v);
 +}
-diff -purN linux-2.6.27/arch/x86/lib/usercopy_32.c linux-2.6.27.19-5.1/arch/x86/lib/usercopy_32.c
---- linux-2.6.27/arch/x86/lib/usercopy_32.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/usercopy_32.c     2009-03-25 16:10:44.000000000 +0000
-@@ -49,7 +49,7 @@ do {                                                                    \
+diff -r 9608d5473017 arch/x86/lib/usercopy_32.c
+--- a/arch/x86/lib/usercopy_32.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/usercopy_32.c       Wed May 06 16:56:10 2009 +0100
+@@ -49,7 +49,7 @@
                "       jmp 2b\n"                                          \
                ".previous\n"                                              \
                _ASM_EXTABLE(0b,3b)                                        \
@@ -120374,7 +120353,7 @@ diff -purN linux-2.6.27/arch/x86/lib/usercopy_32.c linux-2.6.27.19-5.1/arch/x86/
                  "=&D" (__d2)                                             \
                : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
                : "memory");                                               \
-@@ -211,7 +211,7 @@ long strnlen_user(const char __user *s, 
+@@ -211,7 +211,7 @@
                "       .align 4\n"
                "       .long 0b,2b\n"
                ".previous"
@@ -120383,10 +120362,10 @@ diff -purN linux-2.6.27/arch/x86/lib/usercopy_32.c linux-2.6.27.19-5.1/arch/x86/
                :"0" (n), "1" (s), "2" (0), "3" (mask)
                :"cc");
        return res & mask;
-diff -purN linux-2.6.27/arch/x86/lib/usercopy_64.c linux-2.6.27.19-5.1/arch/x86/lib/usercopy_64.c
---- linux-2.6.27/arch/x86/lib/usercopy_64.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/lib/usercopy_64.c     2009-03-25 16:10:44.000000000 +0000
-@@ -32,7 +32,7 @@ do {                                                                    \
+diff -r 9608d5473017 arch/x86/lib/usercopy_64.c
+--- a/arch/x86/lib/usercopy_64.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/lib/usercopy_64.c       Wed May 06 16:56:10 2009 +0100
+@@ -32,7 +32,7 @@
                "       jmp 2b\n"                                          \
                ".previous\n"                                              \
                _ASM_EXTABLE(0b,3b)                                        \
@@ -120395,7 +120374,7 @@ diff -purN linux-2.6.27/arch/x86/lib/usercopy_64.c linux-2.6.27.19-5.1/arch/x86/
                  "=&D" (__d2)                                             \
                : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
                : "memory");                                               \
-@@ -86,7 +86,7 @@ unsigned long __clear_user(void __user *
+@@ -86,7 +86,7 @@
                ".previous\n"
                _ASM_EXTABLE(0b,3b)
                _ASM_EXTABLE(1b,2b)
@@ -120404,9 +120383,9 @@ diff -purN linux-2.6.27/arch/x86/lib/usercopy_64.c linux-2.6.27.19-5.1/arch/x86/
                : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr),
                  [zero] "r" (0UL), [eight] "r" (8UL));
        return size;
-diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/x86/mach-generic/bigsmp.c
---- linux-2.6.27/arch/x86/mach-generic/bigsmp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/bigsmp.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/bigsmp.c
+--- a/arch/x86/mach-generic/bigsmp.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/bigsmp.c   Wed May 06 16:56:10 2009 +0100
 @@ -5,23 +5,22 @@
  #define APIC_DEFINITION 1
  #include <linux/threads.h>
@@ -120420,10 +120399,10 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/
 -#include <linux/smp.h>
  #include <linux/init.h>
  #include <linux/dmi.h>
--#include <asm/mach-bigsmp/mach_apic.h>
- #include <asm/mach-bigsmp/mach_apicdef.h>
++#include <asm/mach-bigsmp/mach_apicdef.h>
 +#include <linux/smp.h>
-+#include <asm/mach-bigsmp/mach_apic.h>
+ #include <asm/mach-bigsmp/mach_apic.h>
+-#include <asm/mach-bigsmp/mach_apicdef.h>
  #include <asm/mach-bigsmp/mach_ipi.h>
  #include <asm/mach-default/mach_mpparse.h>
  
@@ -120434,7 +120413,7 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/
  {
        printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
        dmi_bigsmp = 1;
-@@ -30,15 +29,35 @@ static int hp_ht_bigsmp(const struct dmi
+@@ -30,14 +29,34 @@
  
  
  static const struct dmi_system_id bigsmp_dmi_table[] = {
@@ -120448,7 +120427,7 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/
 +      { force_bigsmp_apic, "HP ProLiant DL740",
        { DMI_MATCH(DMI_BIOS_VENDOR, "HP"),
        DMI_MATCH(DMI_BIOS_VERSION, "P47-"),}
-       },
++      },
 +
 +      { force_bigsmp_apic, "IBM x260 / x366 / x460",
 +      { DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
@@ -120468,13 +120447,12 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/bigsmp.c linux-2.6.27.19-5.1/arch/
 +      { force_bigsmp_apic, "IBM x3850 M2 / x3950 M2",
 +      { DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
 +      DMI_MATCH(DMI_BIOS_VERSION, "-[A3"),}
-+      },
+       },
         { }
  };
-diff -purN linux-2.6.27/arch/x86/mach-generic/es7000.c linux-2.6.27.19-5.1/arch/x86/mach-generic/es7000.c
---- linux-2.6.27/arch/x86/mach-generic/es7000.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/es7000.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/es7000.c
+--- a/arch/x86/mach-generic/es7000.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/es7000.c   Wed May 06 16:56:10 2009 +0100
 @@ -4,16 +4,15 @@
  #define APIC_DEFINITION 1
  #include <linux/threads.h>
@@ -120493,9 +120471,9 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/es7000.c linux-2.6.27.19-5.1/arch/
  #include <asm/mach-es7000/mach_apic.h>
  #include <asm/mach-es7000/mach_ipi.h>
  #include <asm/mach-es7000/mach_mpparse.h>
-diff -purN linux-2.6.27/arch/x86/mach-generic/numaq.c linux-2.6.27.19-5.1/arch/x86/mach-generic/numaq.c
---- linux-2.6.27/arch/x86/mach-generic/numaq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/numaq.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/numaq.c
+--- a/arch/x86/mach-generic/numaq.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/numaq.c    Wed May 06 16:56:10 2009 +0100
 @@ -4,7 +4,6 @@
  #define APIC_DEFINITION 1
  #include <linux/threads.h>
@@ -120508,17 +120486,17 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/numaq.c linux-2.6.27.19-5.1/arch/x
  #include <linux/kernel.h>
  #include <linux/string.h>
  #include <linux/init.h>
--#include <asm/mach-numaq/mach_apic.h>
- #include <asm/mach-numaq/mach_apicdef.h>
++#include <asm/mach-numaq/mach_apicdef.h>
 +#include <linux/smp.h>
-+#include <asm/mach-numaq/mach_apic.h>
+ #include <asm/mach-numaq/mach_apic.h>
+-#include <asm/mach-numaq/mach_apicdef.h>
  #include <asm/mach-numaq/mach_ipi.h>
  #include <asm/mach-numaq/mach_mpparse.h>
  #include <asm/mach-numaq/mach_wakecpu.h>
-diff -purN linux-2.6.27/arch/x86/mach-generic/probe.c linux-2.6.27.19-5.1/arch/x86/mach-generic/probe.c
---- linux-2.6.27/arch/x86/mach-generic/probe.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/probe.c  2009-03-25 16:10:44.000000000 +0000
-@@ -106,7 +106,7 @@ int __init mps_oem_check(struct mp_confi
+diff -r 9608d5473017 arch/x86/mach-generic/probe.c
+--- a/arch/x86/mach-generic/probe.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/probe.c    Wed May 06 16:56:10 2009 +0100
+@@ -106,7 +106,7 @@
        int i;
        for (i = 0; apic_probe[i]; ++i) {
                if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) {
@@ -120527,7 +120505,7 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/probe.c linux-2.6.27.19-5.1/arch/x
                                genapic = apic_probe[i];
                                printk(KERN_INFO "Switched to APIC driver `%s'.\n",
                                       genapic->name);
-@@ -122,7 +122,7 @@ int __init acpi_madt_oem_check(char *oem
+@@ -122,7 +122,7 @@
        int i;
        for (i = 0; apic_probe[i]; ++i) {
                if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) {
@@ -120536,9 +120514,9 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/probe.c linux-2.6.27.19-5.1/arch/x
                                genapic = apic_probe[i];
                                printk(KERN_INFO "Switched to APIC driver `%s'.\n",
                                       genapic->name);
-diff -purN linux-2.6.27/arch/x86/mach-generic/summit.c linux-2.6.27.19-5.1/arch/x86/mach-generic/summit.c
---- linux-2.6.27/arch/x86/mach-generic/summit.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-generic/summit.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-generic/summit.c
+--- a/arch/x86/mach-generic/summit.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mach-generic/summit.c   Wed May 06 16:56:10 2009 +0100
 @@ -4,17 +4,16 @@
  #define APIC_DEFINITION 1
  #include <linux/threads.h>
@@ -120550,27 +120528,27 @@ diff -purN linux-2.6.27/arch/x86/mach-generic/summit.c linux-2.6.27.19-5.1/arch/
  #include <asm/apicdef.h>
  #include <linux/kernel.h>
  #include <linux/string.h>
--#include <linux/smp.h>
- #include <linux/init.h>
--#include <asm/mach-summit/mach_apic.h>
- #include <asm/mach-summit/mach_apicdef.h>
-+#include <linux/smp.h>
-+#include <asm/mach-summit/mach_apic.h>
++#include <linux/init.h>
++#include <asm/mach-summit/mach_apicdef.h>
+ #include <linux/smp.h>
+-#include <linux/init.h>
+ #include <asm/mach-summit/mach_apic.h>
+-#include <asm/mach-summit/mach_apicdef.h>
  #include <asm/mach-summit/mach_ipi.h>
  #include <asm/mach-summit/mach_mpparse.h>
  
-diff -purN linux-2.6.27/arch/x86/mach-xen/Makefile linux-2.6.27.19-5.1/arch/x86/mach-xen/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-xen/Makefile     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-xen/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mach-xen/Makefile       Wed May 06 16:56:10 2009 +0100
 @@ -0,0 +1,5 @@
 +#
 +# Makefile for the linux kernel.
 +#
 +
 +obj-y                         := setup.o
-diff -purN linux-2.6.27/arch/x86/mach-xen/setup.c linux-2.6.27.19-5.1/arch/x86/mach-xen/setup.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mach-xen/setup.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mach-xen/setup.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mach-xen/setup.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,186 @@
 +/*
 + *    Machine specific setup for generic
@@ -120758,23 +120736,24 @@ diff -purN linux-2.6.27/arch/x86/mach-xen/setup.c linux-2.6.27.19-5.1/arch/x86/m
 +      }
 +#endif
 +}
-diff -purN linux-2.6.27/arch/x86/mm/Makefile linux-2.6.27.19-5.1/arch/x86/mm/Makefile
---- linux-2.6.27/arch/x86/mm/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/Makefile   2009-03-25 16:10:44.000000000 +0000
-@@ -21,4 +21,6 @@ obj-$(CONFIG_K8_NUMA)                += k8topology_64.
+diff -r 9608d5473017 arch/x86/mm/Makefile
+--- a/arch/x86/mm/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/Makefile     Wed May 06 16:56:11 2009 +0100
+@@ -21,4 +21,6 @@
  endif
  obj-$(CONFIG_ACPI_NUMA)               += srat_$(BITS).o
  
 +obj-$(CONFIG_XEN)             += hypervisor.o
 +
  obj-$(CONFIG_MEMTEST)         += memtest.o
-diff -purN linux-2.6.27/arch/x86/mm/discontig_32.c linux-2.6.27.19-5.1/arch/x86/mm/discontig_32.c
---- linux-2.6.27/arch/x86/mm/discontig_32.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/discontig_32.c     2009-03-25 16:10:44.000000000 +0000
-@@ -222,6 +222,41 @@ static void __init remap_numa_kva(void)
+diff -r 9608d5473017 arch/x86/mm/discontig_32.c
+--- a/arch/x86/mm/discontig_32.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/discontig_32.c       Wed May 06 16:56:11 2009 +0100
+@@ -221,6 +221,41 @@
+               }
        }
  }
++
 +#ifdef CONFIG_HIBERNATION
 +/**
 + * resume_map_numa_kva - add KVA mapping to the temporary page tables created
@@ -120809,13 +120788,12 @@ diff -purN linux-2.6.27/arch/x86/mm/discontig_32.c linux-2.6.27.19-5.1/arch/x86/
 +      }
 +}
 +#endif
-+
  static unsigned long calculate_numa_remap_pages(void)
  {
-       int nid;
-diff -purN linux-2.6.27/arch/x86/mm/fault-xen.c linux-2.6.27.19-5.1/arch/x86/mm/fault-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/fault-xen.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/fault-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/fault-xen.c  Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,994 @@
 +/*
 + *  Copyright (C) 1995  Linus Torvalds
@@ -121811,10 +121789,10 @@ diff -purN linux-2.6.27/arch/x86/mm/fault-xen.c linux-2.6.27.19-5.1/arch/x86/mm/
 +      }
 +#endif
 +}
-diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/fault.c
---- linux-2.6.27/arch/x86/mm/fault.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/fault.c    2009-03-25 16:10:44.000000000 +0000
-@@ -534,7 +534,7 @@ static int vmalloc_fault(unsigned long a
+diff -r 9608d5473017 arch/x86/mm/fault.c
+--- a/arch/x86/mm/fault.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/fault.c      Wed May 06 16:56:11 2009 +0100
+@@ -534,7 +534,7 @@
           happen within a race in page table update. In the later
           case just flush. */
  
@@ -121823,7 +121801,7 @@ diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/faul
        pgd_ref = pgd_offset_k(address);
        if (pgd_none(*pgd_ref))
                return -1;
-@@ -607,8 +607,6 @@ void __kprobes do_page_fault(struct pt_r
+@@ -607,8 +607,6 @@
  
        si_code = SEGV_MAPERR;
  
@@ -121832,7 +121810,7 @@ diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/faul
        if (unlikely(kmmio_fault(regs, address)))
                return;
  
-@@ -638,6 +636,9 @@ void __kprobes do_page_fault(struct pt_r
+@@ -638,6 +636,9 @@
                if (spurious_fault(address, error_code))
                        return;
  
@@ -121842,7 +121820,7 @@ diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/faul
                /*
                 * Don't take the mm semaphore here. If we fixup a prefetch
                 * fault we could otherwise deadlock.
-@@ -645,6 +646,9 @@ void __kprobes do_page_fault(struct pt_r
+@@ -645,6 +646,9 @@
                goto bad_area_nosemaphore;
        }
  
@@ -121852,9 +121830,9 @@ diff -purN linux-2.6.27/arch/x86/mm/fault.c linux-2.6.27.19-5.1/arch/x86/mm/faul
  
  #ifdef CONFIG_X86_32
        /* It's safe to allow irq's after cr2 has been saved and the vmalloc
-diff -purN linux-2.6.27/arch/x86/mm/highmem_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/highmem_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/highmem_32-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/highmem_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/highmem_32-xen.c     Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,207 @@
 +#include <linux/highmem.h>
 +#include <linux/module.h>
@@ -122063,9 +122041,9 @@ diff -purN linux-2.6.27/arch/x86/mm/highmem_32-xen.c linux-2.6.27.19-5.1/arch/x8
 +#endif
 +EXPORT_SYMBOL(clear_highpage);
 +EXPORT_SYMBOL(copy_highpage);
-diff -purN linux-2.6.27/arch/x86/mm/hypervisor.c linux-2.6.27.19-5.1/arch/x86/mm/hypervisor.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/hypervisor.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/hypervisor.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/hypervisor.c Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,1008 @@
 +/******************************************************************************
 + * mm/hypervisor.c
@@ -123075,9 +123053,9 @@ diff -purN linux-2.6.27/arch/x86/mm/hypervisor.c linux-2.6.27.19-5.1/arch/x86/mm
 +      maddr_t mach_gp = virt_to_machine(gdt + entry);
 +      return HYPERVISOR_update_descriptor(mach_gp, *(const u64*)desc);
 +}
-diff -purN linux-2.6.27/arch/x86/mm/init_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/init_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_32-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/init_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/init_32-xen.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,1251 @@
 +/*
 + *
@@ -124330,10 +124308,10 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32-xen.c linux-2.6.27.19-5.1/arch/x86/m
 +{
 +      return reserve_bootmem(phys, len, flags);
 +}
-diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/init_32.c
---- linux-2.6.27/arch/x86/mm/init_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_32.c  2009-03-25 16:10:44.000000000 +0000
-@@ -137,6 +137,48 @@ static pte_t * __init one_page_table_ini
+diff -r 9608d5473017 arch/x86/mm/init_32.c
+--- a/arch/x86/mm/init_32.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/init_32.c    Wed May 06 16:56:11 2009 +0100
+@@ -137,6 +137,48 @@
        return pte_offset_kernel(pmd, 0);
  }
  
@@ -124382,7 +124360,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  /*
   * This function initializes a certain range of kernel virtual memory
   * with new bootmem page tables, everywhere page tables are missing in
-@@ -153,6 +195,7 @@ page_table_range_init(unsigned long star
+@@ -153,6 +195,7 @@
        unsigned long vaddr;
        pgd_t *pgd;
        pmd_t *pmd;
@@ -124390,7 +124368,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        vaddr = start;
        pgd_idx = pgd_index(vaddr);
-@@ -164,7 +207,8 @@ page_table_range_init(unsigned long star
+@@ -164,7 +207,8 @@
                pmd = pmd + pmd_index(vaddr);
                for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
                                                        pmd++, pmd_idx++) {
@@ -124400,7 +124378,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
                        vaddr += PMD_SIZE;
                }
-@@ -447,7 +491,6 @@ static void __init early_ioremap_page_ta
+@@ -447,7 +491,6 @@
         * Fixed mappings, only the page table structure has to be
         * created - mappings will be set by set_fixmap():
         */
@@ -124408,7 +124386,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
        vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
        end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
        page_table_range_init(vaddr, end, pgd_base);
-@@ -718,7 +761,7 @@ void __init setup_bootmem_allocator(void
+@@ -718,7 +761,7 @@
        after_init_bootmem = 1;
  }
  
@@ -124417,7 +124395,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  {
        unsigned long puds, pmds, ptes, tables, start;
  
-@@ -728,7 +771,7 @@ static void __init find_early_table_spac
+@@ -728,7 +771,7 @@
        pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
        tables += PAGE_ALIGN(pmds * sizeof(pmd_t));
  
@@ -124426,7 +124404,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
                unsigned long extra;
  
                extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
-@@ -740,7 +783,7 @@ static void __init find_early_table_spac
+@@ -740,7 +783,7 @@
        tables += PAGE_ALIGN(ptes * sizeof(pte_t));
  
        /* for fixmap */
@@ -124435,7 +124413,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        /*
         * RED-PEN putting page tables only on node 0 could
-@@ -768,12 +811,22 @@ unsigned long __init_refok init_memory_m
+@@ -768,12 +811,22 @@
        pgd_t *pgd_base = swapper_pg_dir;
        unsigned long start_pfn, end_pfn;
        unsigned long big_page_start;
@@ -124459,7 +124437,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
  #ifdef CONFIG_X86_PAE
        set_nx();
-@@ -819,7 +872,7 @@ unsigned long __init_refok init_memory_m
+@@ -819,7 +872,7 @@
        end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
        if (start_pfn < end_pfn)
                kernel_physical_mapping_init(pgd_base, start_pfn, end_pfn,
@@ -124468,7 +124446,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        /* tail is not big page alignment ? */
        start_pfn = end_pfn;
-@@ -1063,6 +1116,28 @@ void mark_rodata_ro(void)
+@@ -1063,6 +1116,28 @@
        set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
  #endif
  }
@@ -124497,9 +124475,9 @@ diff -purN linux-2.6.27/arch/x86/mm/init_32.c linux-2.6.27.19-5.1/arch/x86/mm/in
  #endif
  
  void free_init_pages(char *what, unsigned long begin, unsigned long end)
-diff -purN linux-2.6.27/arch/x86/mm/init_64-xen.c linux-2.6.27.19-5.1/arch/x86/mm/init_64-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_64-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/init_64-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/init_64-xen.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,1467 @@
 +/*
 + *  linux/arch/x86_64/mm/init.c
@@ -125968,10 +125946,10 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64-xen.c linux-2.6.27.19-5.1/arch/x86/m
 +      }
 +}
 +#endif
-diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/init_64.c
---- linux-2.6.27/arch/x86/mm/init_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/init_64.c  2009-03-25 16:10:44.000000000 +0000
-@@ -446,13 +446,14 @@ phys_pud_update(pgd_t *pgd, unsigned lon
+diff -r 9608d5473017 arch/x86/mm/init_64.c
+--- a/arch/x86/mm/init_64.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/init_64.c    Wed May 06 16:56:11 2009 +0100
+@@ -446,13 +446,14 @@
        return phys_pud_init(pud, addr, end, page_size_mask);
  }
  
@@ -125988,7 +125966,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
                unsigned long extra;
                extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT);
                pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT;
-@@ -460,7 +461,7 @@ static void __init find_early_table_spac
+@@ -460,7 +461,7 @@
                pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
        tables += round_up(pmds * sizeof(pmd_t), PAGE_SIZE);
  
@@ -125997,7 +125975,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
                unsigned long extra;
                extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
                ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
-@@ -494,7 +495,7 @@ static void __init init_gbpages(void)
+@@ -494,7 +495,7 @@
                direct_gbpages = 0;
  }
  
@@ -126006,7 +125984,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
                                                unsigned long end,
                                                unsigned long page_size_mask)
  {
-@@ -571,6 +572,7 @@ unsigned long __init_refok init_memory_m
+@@ -571,6 +572,7 @@
  
        struct map_range mr[NR_RANGE_MR];
        int nr_range, i;
@@ -126014,7 +125992,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        printk(KERN_INFO "init_memory_mapping\n");
  
-@@ -584,9 +586,21 @@ unsigned long __init_refok init_memory_m
+@@ -584,9 +586,21 @@
        if (!after_bootmem)
                init_gbpages();
  
@@ -126038,7 +126016,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
                page_size_mask |= 1 << PG_LEVEL_2M;
  
        memset(mr, 0, sizeof(mr));
-@@ -647,7 +661,7 @@ unsigned long __init_refok init_memory_m
+@@ -647,7 +661,7 @@
                         (mr[i].page_size_mask & (1<<PG_LEVEL_2M))?"2M":"4k"));
  
        if (!after_bootmem)
@@ -126047,7 +126025,7 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        for (i = 0; i < nr_range; i++)
                last_map_addr = kernel_physical_mapping_init(
-@@ -721,12 +735,12 @@ int arch_add_memory(int nid, u64 start, 
+@@ -721,12 +735,12 @@
        unsigned long nr_pages = size >> PAGE_SHIFT;
        int ret;
  
@@ -126062,18 +126040,18 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
  
        return ret;
  }
-@@ -882,7 +896,24 @@ void mark_rodata_ro(void)
+@@ -882,7 +896,24 @@
        set_memory_ro(start, (end-start) >> PAGE_SHIFT);
  #endif
  }
 +EXPORT_SYMBOL(mark_rodata_ro);
-+
 +void mark_rodata_rw(void)
 +{
 +      unsigned long start = PFN_ALIGN(_stext), end = PFN_ALIGN(__end_rodata);
 +      unsigned long rodata_start =
 +              ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
++
 +#ifdef CONFIG_DYNAMIC_FTRACE
 +      /* Dynamic tracing modifies the kernel text section */
 +      start = rodata_start;
@@ -126087,9 +126065,9 @@ diff -purN linux-2.6.27/arch/x86/mm/init_64.c linux-2.6.27.19-5.1/arch/x86/mm/in
  #endif
  
  #ifdef CONFIG_BLK_DEV_INITRD
-diff -purN linux-2.6.27/arch/x86/mm/ioremap-xen.c linux-2.6.27.19-5.1/arch/x86/mm/ioremap-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/ioremap-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/ioremap-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/ioremap-xen.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,830 @@
 +/*
 + * Re-map IO memory to kernel address space so that we can access it.
@@ -126921,10 +126899,10 @@ diff -purN linux-2.6.27/arch/x86/mm/ioremap-xen.c linux-2.6.27.19-5.1/arch/x86/m
 +{
 +      WARN_ON(1);
 +}
-diff -purN linux-2.6.27/arch/x86/mm/ioremap.c linux-2.6.27.19-5.1/arch/x86/mm/ioremap.c
---- linux-2.6.27/arch/x86/mm/ioremap.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/ioremap.c  2009-03-25 16:10:44.000000000 +0000
-@@ -480,34 +480,9 @@ void __init early_ioremap_init(void)
+diff -r 9608d5473017 arch/x86/mm/ioremap.c
+--- a/arch/x86/mm/ioremap.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/ioremap.c    Wed May 06 16:56:11 2009 +0100
+@@ -480,34 +480,9 @@
        }
  }
  
@@ -126959,7 +126937,7 @@ diff -purN linux-2.6.27/arch/x86/mm/ioremap.c linux-2.6.27.19-5.1/arch/x86/mm/io
  }
  
  static void __init __early_set_fixmap(enum fixed_addresses idx,
-@@ -595,7 +570,7 @@ void __init *early_ioremap(unsigned long
+@@ -595,7 +570,7 @@
         */
        offset = phys_addr & ~PAGE_MASK;
        phys_addr &= PAGE_MASK;
@@ -126968,9 +126946,9 @@ diff -purN linux-2.6.27/arch/x86/mm/ioremap.c linux-2.6.27.19-5.1/arch/x86/mm/io
  
        /*
         * Mappings have to fit in the FIX_BTMAP area.
-diff -purN linux-2.6.27/arch/x86/mm/pageattr-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pageattr-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pageattr-xen.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pageattr-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pageattr-xen.c       Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,1248 @@
 +/*
 + * Copyright 2002 Andi Kleen, SuSE Labs.
@@ -128220,10 +128198,10 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr-xen.c linux-2.6.27.19-5.1/arch/x86/
 +#ifdef CONFIG_CPA_DEBUG
 +#include "pageattr-test.c"
 +#endif
-diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/pageattr.c
---- linux-2.6.27/arch/x86/mm/pageattr.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pageattr.c 2009-03-25 16:10:44.000000000 +0000
-@@ -190,6 +190,8 @@ static void cpa_flush_range(unsigned lon
+diff -r 9608d5473017 arch/x86/mm/pageattr.c
+--- a/arch/x86/mm/pageattr.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/pageattr.c   Wed May 06 16:56:11 2009 +0100
+@@ -190,6 +190,8 @@
        }
  }
  
@@ -128232,7 +128210,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  /*
   * Certain areas of memory on x86 require very specific protection flags,
   * for example the BIOS area or kernel text. Callers don't always get this
-@@ -221,8 +223,10 @@ static inline pgprot_t static_protection
+@@ -221,8 +223,10 @@
         * catches all aliases.
         */
        if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
@@ -128245,7 +128223,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  
        prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
  
-@@ -582,6 +586,36 @@ out_unlock:
+@@ -582,6 +586,36 @@
        return 0;
  }
  
@@ -128282,7 +128260,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  static int __change_page_attr(struct cpa_data *cpa, int primary)
  {
        unsigned long address = cpa->vaddr;
-@@ -589,20 +623,21 @@ static int __change_page_attr(struct cpa
+@@ -589,20 +623,21 @@
        unsigned int level;
        pte_t *kpte, old_pte;
  
@@ -128313,7 +128291,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  
        if (level == PG_LEVEL_4K) {
                pte_t new_pte;
-@@ -676,12 +711,7 @@ static int cpa_process_alias(struct cpa_
+@@ -676,12 +711,7 @@
         * mapping already:
         */
        if (!(within(cpa->vaddr, PAGE_OFFSET,
@@ -128327,7 +128305,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  
                alias_cpa = *cpa;
                alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT);
-@@ -817,6 +847,13 @@ static int change_page_attr_set_clr(unsi
+@@ -817,6 +847,13 @@
        else
                cpa_flush_all(cache);
  
@@ -128341,7 +128319,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  out:
        cpa_fill_pool(NULL);
  
-@@ -906,11 +943,28 @@ int set_memory_ro(unsigned long addr, in
+@@ -906,10 +943,27 @@
  {
        return change_page_attr_clear(addr, numpages, __pgprot(_PAGE_RW));
  }
@@ -128350,7 +128328,7 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
  int set_memory_rw(unsigned long addr, int numpages)
  {
        return change_page_attr_set(addr, numpages, __pgprot(_PAGE_RW));
- }
++}
 +EXPORT_SYMBOL(set_memory_rw);
 +
 +/* hack: bypass kernel rodata section static_protections check. */
@@ -128366,27 +128344,26 @@ diff -purN linux-2.6.27/arch/x86/mm/pageattr.c linux-2.6.27.19-5.1/arch/x86/mm/p
 +      mutex_unlock(&lock);
 +
 +      return ret;
-+}
+ }
  
  int set_memory_np(unsigned long addr, int numpages)
- {
-@@ -969,6 +1023,13 @@ int set_pages_rw(struct page *page, int 
-       return set_memory_rw(addr, numpages);
- }
+@@ -967,6 +1021,13 @@
+       unsigned long addr = (unsigned long)page_address(page);
  
+       return set_memory_rw(addr, numpages);
++}
++
 +int set_pages_rw_force(struct page *page, int numpages)
 +{
 +      unsigned long addr = (unsigned long)page_address(page);
 +
 +      return set_memory_rw_force(addr, numpages);
-+}
-+
- #ifdef CONFIG_DEBUG_PAGEALLOC
+ }
  
- static int __set_pages_p(struct page *page, int numpages)
-diff -purN linux-2.6.27/arch/x86/mm/pat-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pat-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pat-xen.c  2009-03-25 16:10:44.000000000 +0000
+ #ifdef CONFIG_DEBUG_PAGEALLOC
+diff -r 9608d5473017 arch/x86/mm/pat-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pat-xen.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,617 @@
 +/*
 + * Handle caching attributes in page tables (PAT)
@@ -129005,10 +128982,10 @@ diff -purN linux-2.6.27/arch/x86/mm/pat-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pa
 +late_initcall(pat_memtype_list_init);
 +
 +#endif /* CONFIG_DEBUG_FS */
-diff -purN linux-2.6.27/arch/x86/mm/pat.c linux-2.6.27.19-5.1/arch/x86/mm/pat.c
---- linux-2.6.27/arch/x86/mm/pat.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pat.c      2009-03-25 16:10:44.000000000 +0000
-@@ -403,12 +403,16 @@ static inline int range_is_allowed(unsig
+diff -r 9608d5473017 arch/x86/mm/pat.c
+--- a/arch/x86/mm/pat.c        Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/pat.c        Wed May 06 16:56:11 2009 +0100
+@@ -403,11 +403,15 @@
        return 1;
  }
  #else
@@ -129018,16 +128995,15 @@ diff -purN linux-2.6.27/arch/x86/mm/pat.c linux-2.6.27.19-5.1/arch/x86/mm/pat.c
        u64 from = ((u64)pfn) << PAGE_SHIFT;
        u64 to = from + size;
        u64 cursor = from;
++
 +      if (!pat_enabled)
 +              return 1;
-+
        while (cursor < to) {
                if (!devmem_is_allowed(pfn)) {
-                       printk(KERN_INFO
-diff -purN linux-2.6.27/arch/x86/mm/pgtable-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pgtable-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pgtable-xen.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pgtable-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pgtable-xen.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,854 @@
 +#include <linux/mm.h>
 +#include <linux/module.h>
@@ -129883,9 +129859,9 @@ diff -purN linux-2.6.27/arch/x86/mm/pgtable-xen.c linux-2.6.27.19-5.1/arch/x86/m
 +      set_pte_vaddr(address, pte);
 +      fixmaps_set++;
 +}
-diff -purN linux-2.6.27/arch/x86/mm/pgtable_32-xen.c linux-2.6.27.19-5.1/arch/x86/mm/pgtable_32-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/pgtable_32-xen.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/mm/pgtable_32-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/mm/pgtable_32-xen.c     Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,193 @@
 +#include <linux/sched.h>
 +#include <linux/kernel.h>
@@ -130080,10 +130056,10 @@ diff -purN linux-2.6.27/arch/x86/mm/pgtable_32-xen.c linux-2.6.27.19-5.1/arch/x8
 +              (unsigned long)va, pte_mkwrite(*pte), 0);
 +      BUG_ON(rc);
 +}
-diff -purN linux-2.6.27/arch/x86/mm/srat_64.c linux-2.6.27.19-5.1/arch/x86/mm/srat_64.c
---- linux-2.6.27/arch/x86/mm/srat_64.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/mm/srat_64.c  2009-03-25 16:10:44.000000000 +0000
-@@ -138,7 +138,7 @@ acpi_numa_processor_affinity_init(struct
+diff -r 9608d5473017 arch/x86/mm/srat_64.c
+--- a/arch/x86/mm/srat_64.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/mm/srat_64.c    Wed May 06 16:56:11 2009 +0100
+@@ -138,7 +138,7 @@
                return;
        }
  
@@ -130092,10 +130068,10 @@ diff -purN linux-2.6.27/arch/x86/mm/srat_64.c linux-2.6.27.19-5.1/arch/x86/mm/sr
                apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
        else
                apic_id = pa->apic_id;
-diff -purN linux-2.6.27/arch/x86/oprofile/Makefile linux-2.6.27.19-5.1/arch/x86/oprofile/Makefile
---- linux-2.6.27/arch/x86/oprofile/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/Makefile     2009-03-25 16:10:44.000000000 +0000
-@@ -6,7 +6,14 @@ DRIVER_OBJS = $(addprefix ../../../drive
+diff -r 9608d5473017 arch/x86/oprofile/Makefile
+--- a/arch/x86/oprofile/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/oprofile/Makefile       Wed May 06 16:56:11 2009 +0100
+@@ -6,7 +6,14 @@
                oprofilefs.o oprofile_stats.o  \
                timer_int.o )
  
@@ -130110,9 +130086,9 @@ diff -purN linux-2.6.27/arch/x86/oprofile/Makefile linux-2.6.27.19-5.1/arch/x86/
                                           op_model_ppro.o op_model_p4.o
  oprofile-$(CONFIG_X86_IO_APIC)                += nmi_timer_int.o
 +endif
-diff -purN linux-2.6.27/arch/x86/oprofile/nmi_int.c linux-2.6.27.19-5.1/arch/x86/oprofile/nmi_int.c
---- linux-2.6.27/arch/x86/oprofile/nmi_int.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/nmi_int.c    2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/oprofile/nmi_int.c
+--- a/arch/x86/oprofile/nmi_int.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/oprofile/nmi_int.c      Wed May 06 16:56:11 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/moduleparam.h>
  #include <linux/kdebug.h>
@@ -130121,7 +130097,7 @@ diff -purN linux-2.6.27/arch/x86/oprofile/nmi_int.c linux-2.6.27.19-5.1/arch/x86
  #include <asm/nmi.h>
  #include <asm/msr.h>
  #include <asm/apic.h>
-@@ -217,12 +218,18 @@ static int nmi_setup(void)
+@@ -217,12 +218,18 @@
        int err = 0;
        int cpu;
  
@@ -130141,7 +130117,7 @@ diff -purN linux-2.6.27/arch/x86/oprofile/nmi_int.c linux-2.6.27.19-5.1/arch/x86
                return err;
        }
  
-@@ -304,6 +311,7 @@ static void nmi_shutdown(void)
+@@ -304,6 +311,7 @@
        model->shutdown(msrs);
        free_msrs();
        put_cpu_var(cpu_msrs);
@@ -130149,9 +130125,9 @@ diff -purN linux-2.6.27/arch/x86/oprofile/nmi_int.c linux-2.6.27.19-5.1/arch/x86
  }
  
  static void nmi_cpu_start(void *dummy)
-diff -purN linux-2.6.27/arch/x86/oprofile/xenoprof.c linux-2.6.27.19-5.1/arch/x86/oprofile/xenoprof.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/oprofile/xenoprof.c   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/oprofile/xenoprof.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/oprofile/xenoprof.c     Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,179 @@
 +/**
 + * @file xenoprof.c
@@ -130332,10 +130308,10 @@ diff -purN linux-2.6.27/arch/x86/oprofile/xenoprof.c linux-2.6.27.19-5.1/arch/x8
 +{
 +      xenoprofile_exit();
 +}
-diff -purN linux-2.6.27/arch/x86/pci/Makefile linux-2.6.27.19-5.1/arch/x86/pci/Makefile
---- linux-2.6.27/arch/x86/pci/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/Makefile  2009-03-25 16:10:44.000000000 +0000
-@@ -4,6 +4,9 @@ obj-$(CONFIG_PCI_BIOS)         += pcbios.o
+diff -r 9608d5473017 arch/x86/pci/Makefile
+--- a/arch/x86/pci/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/Makefile    Wed May 06 16:56:11 2009 +0100
+@@ -4,6 +4,9 @@
  obj-$(CONFIG_PCI_MMCONFIG)    += mmconfig_$(BITS).o direct.o mmconfig-shared.o
  obj-$(CONFIG_PCI_DIRECT)      += direct.o
  obj-$(CONFIG_PCI_OLPC)                += olpc.o
@@ -130345,10 +130321,10 @@ diff -purN linux-2.6.27/arch/x86/pci/Makefile linux-2.6.27.19-5.1/arch/x86/pci/M
  
  obj-y                         += fixup.o
  obj-$(CONFIG_ACPI)            += acpi.o
-diff -purN linux-2.6.27/arch/x86/pci/amd_bus.c linux-2.6.27.19-5.1/arch/x86/pci/amd_bus.c
---- linux-2.6.27/arch/x86/pci/amd_bus.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/amd_bus.c 2009-03-25 16:10:44.000000000 +0000
-@@ -607,6 +607,14 @@ static int __init pci_io_ecs_init(void)
+diff -r 9608d5473017 arch/x86/pci/amd_bus.c
+--- a/arch/x86/pci/amd_bus.c   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/amd_bus.c   Wed May 06 16:56:11 2009 +0100
+@@ -607,6 +607,14 @@
        for_each_online_cpu(cpu)
                amd_cpu_notify(&amd_cpu_notifier, (unsigned long)CPU_ONLINE,
                               (void *)(long)cpu);
@@ -130363,7 +130339,7 @@ diff -purN linux-2.6.27/arch/x86/pci/amd_bus.c linux-2.6.27.19-5.1/arch/x86/pci/
        pci_probe |= PCI_HAS_IO_ECS;
  
        return 0;
-@@ -614,6 +622,10 @@ static int __init pci_io_ecs_init(void)
+@@ -614,6 +622,10 @@
  
  static int __init amd_postcore_init(void)
  {
@@ -130374,10 +130350,10 @@ diff -purN linux-2.6.27/arch/x86/pci/amd_bus.c linux-2.6.27.19-5.1/arch/x86/pci/
        if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
                return 0;
  
-diff -purN linux-2.6.27/arch/x86/pci/common.c linux-2.6.27.19-5.1/arch/x86/pci/common.c
---- linux-2.6.27/arch/x86/pci/common.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/common.c  2009-03-25 16:10:44.000000000 +0000
-@@ -23,6 +23,12 @@ unsigned int pci_probe = PCI_PROBE_BIOS 
+diff -r 9608d5473017 arch/x86/pci/common.c
+--- a/arch/x86/pci/common.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/common.c    Wed May 06 16:56:11 2009 +0100
+@@ -23,6 +23,12 @@
  unsigned int pci_early_dump_regs;
  static int pci_bf_sort;
  int pci_routeirq;
@@ -130390,7 +130366,7 @@ diff -purN linux-2.6.27/arch/x86/pci/common.c linux-2.6.27.19-5.1/arch/x86/pci/c
  int pcibios_last_bus = -1;
  unsigned long pirq_table_addr;
  struct pci_bus *pci_root_bus;
-@@ -519,6 +525,17 @@ char * __devinit  pcibios_setup(char *st
+@@ -519,6 +525,17 @@
        } else if (!strcmp(str, "skip_isa_align")) {
                pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
                return NULL;
@@ -130408,25 +130384,25 @@ diff -purN linux-2.6.27/arch/x86/pci/common.c linux-2.6.27.19-5.1/arch/x86/pci/c
        }
        return str;
  }
-@@ -546,6 +563,14 @@ void pcibios_disable_device (struct pci_
+@@ -544,6 +561,14 @@
+ {
+       if (!dev->msi_enabled && pcibios_disable_irq)
                pcibios_disable_irq(dev);
- }
++}
++
 +int pci_ext_cfg_avail(struct pci_dev *dev)
 +{
 +      if (raw_pci_ext_ops)
 +              return 1;
 +      else
 +              return 0;
-+}
-+
+ }
  struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
- {
-       struct pci_bus *bus = NULL;
-diff -purN linux-2.6.27/arch/x86/pci/fixup.c linux-2.6.27.19-5.1/arch/x86/pci/fixup.c
---- linux-2.6.27/arch/x86/pci/fixup.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/fixup.c   2009-03-25 16:10:44.000000000 +0000
-@@ -496,18 +496,21 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S
+diff -r 9608d5473017 arch/x86/pci/fixup.c
+--- a/arch/x86/pci/fixup.c     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/fixup.c     Wed May 06 16:56:11 2009 +0100
+@@ -496,18 +496,21 @@
                          pci_siemens_interrupt_controller);
  
  /*
@@ -130459,10 +130435,10 @@ diff -purN linux-2.6.27/arch/x86/pci/fixup.c linux-2.6.27.19-5.1/arch/x86/pci/fi
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1302, amd_cpu_pci_cfg_space_size);
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1303, amd_cpu_pci_cfg_space_size);
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1304, amd_cpu_pci_cfg_space_size);
-diff -purN linux-2.6.27/arch/x86/pci/i386.c linux-2.6.27.19-5.1/arch/x86/pci/i386.c
---- linux-2.6.27/arch/x86/pci/i386.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/i386.c    2009-03-25 16:10:44.000000000 +0000
-@@ -328,10 +328,14 @@ int pci_mmap_page_range(struct pci_dev *
+diff -r 9608d5473017 arch/x86/pci/i386.c
+--- a/arch/x86/pci/i386.c      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/i386.c      Wed May 06 16:56:11 2009 +0100
+@@ -328,10 +328,14 @@
                flags = new_flags;
        }
  
@@ -130477,9 +130453,9 @@ diff -purN linux-2.6.27/arch/x86/pci/i386.c linux-2.6.27.19-5.1/arch/x86/pci/i38
                free_memtype(addr, addr + len);
                return -EINVAL;
        }
-diff -purN linux-2.6.27/arch/x86/pci/irq-xen.c linux-2.6.27.19-5.1/arch/x86/pci/irq-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/irq-xen.c 2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/pci/irq-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/pci/irq-xen.c   Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,1273 @@
 +/*
 + *    Low-Level PCI Support for PC -- Routing of Interrupts
@@ -131754,10 +131730,10 @@ diff -purN linux-2.6.27/arch/x86/pci/irq-xen.c linux-2.6.27.19-5.1/arch/x86/pci/
 +      }
 +      return 0;
 +}
-diff -purN linux-2.6.27/arch/x86/pci/irq.c linux-2.6.27.19-5.1/arch/x86/pci/irq.c
---- linux-2.6.27/arch/x86/pci/irq.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/irq.c     2009-03-25 16:10:44.000000000 +0000
-@@ -573,6 +573,7 @@ static __init int intel_router_probe(str
+diff -r 9608d5473017 arch/x86/pci/irq.c
+--- a/arch/x86/pci/irq.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/pci/irq.c       Wed May 06 16:56:11 2009 +0100
+@@ -573,6 +573,7 @@
        case PCI_DEVICE_ID_INTEL_ICH7_1:
        case PCI_DEVICE_ID_INTEL_ICH7_30:
        case PCI_DEVICE_ID_INTEL_ICH7_31:
@@ -131765,7 +131741,7 @@ diff -purN linux-2.6.27/arch/x86/pci/irq.c linux-2.6.27.19-5.1/arch/x86/pci/irq.
        case PCI_DEVICE_ID_INTEL_ESB2_0:
        case PCI_DEVICE_ID_INTEL_ICH8_0:
        case PCI_DEVICE_ID_INTEL_ICH8_1:
-@@ -590,13 +591,20 @@ static __init int intel_router_probe(str
+@@ -590,13 +591,20 @@
        case PCI_DEVICE_ID_INTEL_ICH10_1:
        case PCI_DEVICE_ID_INTEL_ICH10_2:
        case PCI_DEVICE_ID_INTEL_ICH10_3:
@@ -131788,9 +131764,9 @@ diff -purN linux-2.6.27/arch/x86/pci/irq.c linux-2.6.27.19-5.1/arch/x86/pci/irq.
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/x86/pci/pcifront.c linux-2.6.27.19-5.1/arch/x86/pci/pcifront.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/pci/pcifront.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/pci/pcifront.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/pci/pcifront.c  Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + * PCI Frontend Stub - puts some "dummy" functions in to the Linux x86 PCI core
@@ -131849,9 +131825,9 @@ diff -purN linux-2.6.27/arch/x86/pci/pcifront.c linux-2.6.27.19-5.1/arch/x86/pci
 +}
 +
 +arch_initcall(pcifront_x86_stub_init);
-diff -purN linux-2.6.27/arch/x86/perfmon/Kconfig linux-2.6.27.19-5.1/arch/x86/perfmon/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/Kconfig       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/Kconfig Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,89 @@
 +menu "Hardware Performance Monitoring support"
 +config PERFMON
@@ -131942,9 +131918,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/Kconfig linux-2.6.27.19-5.1/arch/x86/pe
 +      Enables support for Athlon64/Opterton64 hardware performance counters.
 +      Support for family 6, 15 and 16(10H) processors.
 +endmenu
-diff -purN linux-2.6.27/arch/x86/perfmon/Makefile linux-2.6.27.19-5.1/arch/x86/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/Makefile      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/Makefile        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,13 @@
 +#
 +# Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
@@ -131959,9 +131935,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/Makefile linux-2.6.27.19-5.1/arch/x86/p
 +obj-$(CONFIG_X86_PERFMON_PEBS_CORE)   += perfmon_pebs_core_smpl.o
 +obj-$(CONFIG_X86_PERFMON_AMD64)       += perfmon_amd64.o
 +obj-$(CONFIG_X86_PERFMON_INTEL_ATOM)  += perfmon_intel_atom.o
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon.c     2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon.c       Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,761 @@
 +/*
 + * This file implements the X86 specific support for the perfmon2 interface
@@ -132724,9 +132700,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon.c linux-2.6.27.19-5.1/arch/x86/
 +      register_die_notifier(&pfm_nmi_nb);
 +      return 0;
 +}
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_amd64.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_amd64.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_amd64.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_amd64.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_amd64.c Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,754 @@
 +/*
 + * This file contains the PMU description for the Athlon64 and Opteron64
@@ -133482,9 +133458,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_amd64.c linux-2.6.27.19-5.1/arc
 +
 +module_init(pfm_amd64_pmu_init_module);
 +module_exit(pfm_amd64_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_arch.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_arch.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_arch.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_arch.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_arch.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,610 @@
 +/*
 + * This file contains the Intel architectural perfmon v1, v2, v3
@@ -134096,9 +134072,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_arch.c linux-2.6.27.19-5.
 +
 +module_init(pfm_intel_arch_pmu_init_module);
 +module_exit(pfm_intel_arch_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_atom.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_atom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_atom.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_atom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_atom.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,541 @@
 +/*
 + * perfmon support for Intel Atom (architectural perfmon v3 + PEBS)
@@ -134641,9 +134617,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_atom.c linux-2.6.27.19-5.
 +
 +module_init(pfm_intel_atom_pmu_init_module);
 +module_exit(pfm_intel_atom_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_core.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_core.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_intel_core.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_intel_core.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_intel_core.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,449 @@
 +/*
 + * This file contains the Intel Core PMU registers description tables.
@@ -135094,9 +135070,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_intel_core.c linux-2.6.27.19-5.
 +
 +module_init(pfm_core_pmu_init_module);
 +module_exit(pfm_core_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p4.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p4.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p4.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_p4.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_p4.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,913 @@
 +/*
 + * This file contains the P4/Xeon PMU register description tables
@@ -136011,9 +135987,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p4.c linux-2.6.27.19-5.1/arch/x
 +
 +module_init(pfm_p4_pmu_init_module);
 +module_exit(pfm_p4_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p6.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p6.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_p6.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_p6.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_p6.c    Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,310 @@
 +/*
 + * This file contains the P6 family processor PMU register description tables
@@ -136325,9 +136301,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_p6.c linux-2.6.27.19-5.1/arch/x
 +
 +module_init(pfm_p6_pmu_init_module);
 +module_exit(pfm_p6_pmu_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_core_smpl.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_core_smpl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_core_smpl.c      2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_pebs_core_smpl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_pebs_core_smpl.c        Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,256 @@
 +/*
 + * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
@@ -136585,9 +136561,9 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_core_smpl.c linux-2.6.27.1
 +
 +module_init(pfm_pebs_core_fmt_init_module);
 +module_exit(pfm_pebs_core_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_p4_smpl.c linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_p4_smpl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/perfmon/perfmon_pebs_p4_smpl.c        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/perfmon/perfmon_pebs_p4_smpl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/perfmon/perfmon_pebs_p4_smpl.c  Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,253 @@
 +/*
 + * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
@@ -136842,18 +136818,18 @@ diff -purN linux-2.6.27/arch/x86/perfmon/perfmon_pebs_p4_smpl.c linux-2.6.27.19-
 +
 +module_init(pfm_pebs_p4_fmt_init_module);
 +module_exit(pfm_pebs_p4_fmt_cleanup_module);
-diff -purN linux-2.6.27/arch/x86/power/Makefile linux-2.6.27.19-5.1/arch/x86/power/Makefile
---- linux-2.6.27/arch/x86/power/Makefile       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/Makefile        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/power/Makefile
+--- a/arch/x86/power/Makefile  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/Makefile  Wed May 06 16:56:11 2009 +0100
 @@ -1,2 +1,4 @@
  obj-$(CONFIG_PM_SLEEP)                += cpu_$(BITS).o
  obj-$(CONFIG_HIBERNATION)     += hibernate_$(BITS).o hibernate_asm_$(BITS).o
 +
 +disabled-obj-$(CONFIG_XEN)    := cpu_$(BITS).o
-diff -purN linux-2.6.27/arch/x86/power/cpu_32.c linux-2.6.27.19-5.1/arch/x86/power/cpu_32.c
---- linux-2.6.27/arch/x86/power/cpu_32.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/cpu_32.c        2009-03-25 16:10:44.000000000 +0000
-@@ -65,6 +65,7 @@ static void do_fpu_end(void)
+diff -r 9608d5473017 arch/x86/power/cpu_32.c
+--- a/arch/x86/power/cpu_32.c  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/cpu_32.c  Wed May 06 16:56:11 2009 +0100
+@@ -65,6 +65,7 @@
  
  static void fix_processor_context(void)
  {
@@ -136861,7 +136837,7 @@ diff -purN linux-2.6.27/arch/x86/power/cpu_32.c linux-2.6.27.19-5.1/arch/x86/pow
        int cpu = smp_processor_id();
        struct tss_struct *t = &per_cpu(init_tss, cpu);
  
-@@ -74,6 +75,7 @@ static void fix_processor_context(void)
+@@ -74,6 +75,7 @@
                                 * 386 hardware has concept of busy TSS or some
                                 * similar stupidity.
                                 */
@@ -136869,9 +136845,9 @@ diff -purN linux-2.6.27/arch/x86/power/cpu_32.c linux-2.6.27.19-5.1/arch/x86/pow
  
        load_TR_desc();                         /* This does ltr */
        load_LDT(&current->active_mm->context); /* This does lldt */
-diff -purN linux-2.6.27/arch/x86/power/hibernate_32.c linux-2.6.27.19-5.1/arch/x86/power/hibernate_32.c
---- linux-2.6.27/arch/x86/power/hibernate_32.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/power/hibernate_32.c  2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/power/hibernate_32.c
+--- a/arch/x86/power/hibernate_32.c    Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/power/hibernate_32.c    Wed May 06 16:56:11 2009 +0100
 @@ -12,6 +12,7 @@
  #include <asm/system.h>
  #include <asm/page.h>
@@ -136880,7 +136856,7 @@ diff -purN linux-2.6.27/arch/x86/power/hibernate_32.c linux-2.6.27.19-5.1/arch/x
  
  /* Defined in hibernate_asm_32.S */
  extern int restore_image(void);
-@@ -127,6 +128,9 @@ static int resume_physical_mapping_init(
+@@ -127,6 +128,9 @@
                        }
                }
        }
@@ -136890,10 +136866,10 @@ diff -purN linux-2.6.27/arch/x86/power/hibernate_32.c linux-2.6.27.19-5.1/arch/x
        return 0;
  }
  
-diff -purN linux-2.6.27/arch/x86/vdso/Makefile linux-2.6.27.19-5.1/arch/x86/vdso/Makefile
---- linux-2.6.27/arch/x86/vdso/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/Makefile 2009-03-25 16:10:44.000000000 +0000
-@@ -65,6 +65,7 @@ obj-$(VDSO32-y)                      += vdso32-syms.lds
+diff -r 9608d5473017 arch/x86/vdso/Makefile
+--- a/arch/x86/vdso/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/Makefile   Wed May 06 16:56:11 2009 +0100
+@@ -65,6 +65,7 @@
  vdso32.so-$(VDSO32-y)         += int80
  vdso32.so-$(CONFIG_COMPAT)    += syscall
  vdso32.so-$(VDSO32-y)         += sysenter
@@ -136901,48 +136877,9 @@ diff -purN linux-2.6.27/arch/x86/vdso/Makefile linux-2.6.27.19-5.1/arch/x86/vdso
  
  vdso32-images                 = $(vdso32.so-y:%=vdso32-%.so)
  
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32/note.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/note.S
---- linux-2.6.27/arch/x86/vdso/vdso32/note.S   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/note.S    2009-03-25 16:10:44.000000000 +0000
-@@ -13,7 +13,7 @@ ELFNOTE_START(Linux, 0, "a")
-       .long LINUX_VERSION_CODE
- ELFNOTE_END
--#ifdef CONFIG_XEN
-+#if defined(CONFIG_X86_XEN) || defined(CONFIG_PARAVIRT_XEN)
- /*
-  * Add a special note telling glibc's dynamic linker a fake hardware
-  * flavor that it will use to choose the search path for libraries in the
-@@ -37,8 +37,12 @@ ELFNOTE_END
- ELFNOTE_START(GNU, 2, "a")
-       .long 1                 /* ncaps */
-+#ifdef CONFIG_PARAVIRT_XEN
- VDSO32_NOTE_MASK:             /* Symbol used by arch/x86/xen/setup.c */
-       .long 0                 /* mask */
-+#else
-+      .long 1 << VDSO_NOTE_NONEGSEG_BIT /* mask */
-+#endif
-       .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
- ELFNOTE_END
- #endif
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32/syscall.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/syscall.S
---- linux-2.6.27/arch/x86/vdso/vdso32/syscall.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32/syscall.S 2009-03-25 16:10:44.000000000 +0000
-@@ -19,8 +19,10 @@ __kernel_vsyscall:
- .Lpush_ebp:
-       movl    %ecx, %ebp
-       syscall
-+#ifndef CONFIG_XEN
-       movl    $__USER32_DS, %ecx
-       movl    %ecx, %ss
-+#endif
-       movl    %ebp, %ecx
-       popl    %ebp
- .Lpop_ebp:
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32-setup-xen.c linux-2.6.27.19-5.1/arch/x86/vdso/vdso32-setup-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32-setup-xen.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/vdso/vdso32-setup-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/arch/x86/vdso/vdso32-setup-xen.c Wed May 06 16:56:11 2009 +0100
 @@ -0,0 +1,482 @@
 +/*
 + * (C) Copyright 2002 Linus Torvalds
@@ -137426,10 +137363,10 @@ diff -purN linux-2.6.27/arch/x86/vdso/vdso32-setup-xen.c linux-2.6.27.19-5.1/arc
 +}
 +
 +#endif        /* CONFIG_X86_64 */
-diff -purN linux-2.6.27/arch/x86/vdso/vdso32.S linux-2.6.27.19-5.1/arch/x86/vdso/vdso32.S
---- linux-2.6.27/arch/x86/vdso/vdso32.S        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/vdso/vdso32.S 2009-03-25 16:10:44.000000000 +0000
-@@ -9,7 +9,7 @@ vdso32_int80_end:
+diff -r 9608d5473017 arch/x86/vdso/vdso32.S
+--- a/arch/x86/vdso/vdso32.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32.S   Wed May 06 16:56:11 2009 +0100
+@@ -9,7 +9,7 @@
  
        .globl vdso32_syscall_start, vdso32_syscall_end
  vdso32_syscall_start:
@@ -137438,9 +137375,48 @@ diff -purN linux-2.6.27/arch/x86/vdso/vdso32.S linux-2.6.27.19-5.1/arch/x86/vdso
        .incbin "arch/x86/vdso/vdso32-syscall.so"
  #endif
  vdso32_syscall_end:
-diff -purN linux-2.6.27/arch/x86/xen/Kconfig linux-2.6.27.19-5.1/arch/x86/xen/Kconfig
---- linux-2.6.27/arch/x86/xen/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/Kconfig   2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/vdso/vdso32/note.S
+--- a/arch/x86/vdso/vdso32/note.S      Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32/note.S      Wed May 06 16:56:11 2009 +0100
+@@ -13,7 +13,7 @@
+       .long LINUX_VERSION_CODE
+ ELFNOTE_END
+-#ifdef CONFIG_XEN
++#if defined(CONFIG_X86_XEN) || defined(CONFIG_PARAVIRT_XEN)
+ /*
+  * Add a special note telling glibc's dynamic linker a fake hardware
+  * flavor that it will use to choose the search path for libraries in the
+@@ -37,8 +37,12 @@
+ ELFNOTE_START(GNU, 2, "a")
+       .long 1                 /* ncaps */
++#ifdef CONFIG_PARAVIRT_XEN
+ VDSO32_NOTE_MASK:             /* Symbol used by arch/x86/xen/setup.c */
+       .long 0                 /* mask */
++#else
++      .long 1 << VDSO_NOTE_NONEGSEG_BIT /* mask */
++#endif
+       .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
+ ELFNOTE_END
+ #endif
+diff -r 9608d5473017 arch/x86/vdso/vdso32/syscall.S
+--- a/arch/x86/vdso/vdso32/syscall.S   Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/vdso/vdso32/syscall.S   Wed May 06 16:56:11 2009 +0100
+@@ -19,8 +19,10 @@
+ .Lpush_ebp:
+       movl    %ecx, %ebp
+       syscall
++#ifndef CONFIG_XEN
+       movl    $__USER32_DS, %ecx
+       movl    %ecx, %ss
++#endif
+       movl    %ebp, %ecx
+       popl    %ebp
+ .Lpop_ebp:
+diff -r 9608d5473017 arch/x86/xen/Kconfig
+--- a/arch/x86/xen/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/Kconfig     Wed May 06 16:56:11 2009 +0100
 @@ -2,7 +2,7 @@
  # This Kconfig describes xen options
  #
@@ -137450,7 +137426,7 @@ diff -purN linux-2.6.27/arch/x86/xen/Kconfig linux-2.6.27.19-5.1/arch/x86/xen/Kc
        bool "Xen guest support"
        select PARAVIRT
        select PARAVIRT_CLOCK
-@@ -17,7 +17,7 @@ config XEN_MAX_DOMAIN_MEMORY
+@@ -17,7 +17,7 @@
         int "Maximum allowed size of a domain in gigabytes"
         default 8 if X86_32
         default 32 if X86_64
@@ -137459,7 +137435,7 @@ diff -purN linux-2.6.27/arch/x86/xen/Kconfig linux-2.6.27.19-5.1/arch/x86/xen/Kc
         help
           The pseudo-physical to machine address array is sized
           according to the maximum possible memory size of a Xen
-@@ -26,5 +26,5 @@ config XEN_MAX_DOMAIN_MEMORY
+@@ -26,5 +26,5 @@
  
  config XEN_SAVE_RESTORE
         bool
@@ -137467,9 +137443,9 @@ diff -purN linux-2.6.27/arch/x86/xen/Kconfig linux-2.6.27.19-5.1/arch/x86/xen/Kc
 +       depends on PARAVIRT_XEN && PM
         default y
 \ No newline at end of file
-diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xen/enlighten.c
---- linux-2.6.27/arch/x86/xen/enlighten.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/enlighten.c       2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/xen/enlighten.c
+--- a/arch/x86/xen/enlighten.c Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/enlighten.c Wed May 06 16:56:11 2009 +0100
 @@ -36,6 +36,7 @@
  #include <xen/hvc-console.h>
  
@@ -137478,7 +137454,7 @@ diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xe
  #include <asm/page.h>
  #include <asm/xen/hypercall.h>
  #include <asm/xen/hypervisor.h>
-@@ -580,16 +581,48 @@ static void xen_io_delay(void)
+@@ -580,16 +581,48 @@
  }
  
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -137529,7 +137505,7 @@ diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xe
  #endif
  
  static void xen_flush_tlb(void)
-@@ -1273,8 +1306,6 @@ static const struct pv_irq_ops xen_irq_o
+@@ -1273,8 +1306,6 @@
  
  static const struct pv_apic_ops xen_apic_ops __initdata = {
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -137538,7 +137514,7 @@ diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xe
        .setup_boot_clock = paravirt_nop,
        .setup_secondary_clock = paravirt_nop,
        .startup_ipi_hook = paravirt_nop,
-@@ -1413,7 +1444,7 @@ static void __init xen_reserve_top(void)
+@@ -1413,7 +1444,7 @@
        if (HYPERVISOR_xen_version(XENVER_platform_parameters, &pp) == 0)
                top = pp.virt_start;
  
@@ -137547,7 +137523,7 @@ diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xe
  #endif        /* CONFIG_X86_32 */
  }
  
-@@ -1677,6 +1708,13 @@ asmlinkage void __init xen_start_kernel(
+@@ -1677,6 +1708,13 @@
        pv_apic_ops = xen_apic_ops;
        pv_mmu_ops = xen_mmu_ops;
  
@@ -137561,10 +137537,10 @@ diff -purN linux-2.6.27/arch/x86/xen/enlighten.c linux-2.6.27.19-5.1/arch/x86/xe
        if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
                pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
                pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
-diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.c
---- linux-2.6.27/arch/x86/xen/smp.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/smp.c     2009-03-25 16:10:44.000000000 +0000
-@@ -157,7 +157,7 @@ static void __init xen_fill_possible_map
+diff -r 9608d5473017 arch/x86/xen/smp.c
+--- a/arch/x86/xen/smp.c       Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/smp.c       Wed May 06 16:56:11 2009 +0100
+@@ -157,7 +157,7 @@
  {
        int i, rc;
  
@@ -137573,7 +137549,7 @@ diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.
                rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
                if (rc >= 0) {
                        num_processors++;
-@@ -195,7 +195,7 @@ static void __init xen_smp_prepare_cpus(
+@@ -195,7 +195,7 @@
  
        /* Restrict the possible_map according to max_cpus. */
        while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
@@ -137582,7 +137558,7 @@ diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.
                        continue;
                cpu_clear(cpu, cpu_possible_map);
        }
-@@ -361,24 +361,22 @@ static void xen_smp_send_reschedule(int 
+@@ -361,24 +361,22 @@
        xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR);
  }
  
@@ -137611,7 +137587,7 @@ diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.
                if (xen_vcpu_stolen(cpu)) {
                        HYPERVISOR_sched_op(SCHEDOP_yield, 0);
                        break;
-@@ -388,7 +386,8 @@ static void xen_smp_send_call_function_i
+@@ -388,7 +386,8 @@
  
  static void xen_smp_send_call_function_single_ipi(int cpu)
  {
@@ -137621,9 +137597,9 @@ diff -purN linux-2.6.27/arch/x86/xen/smp.c linux-2.6.27.19-5.1/arch/x86/xen/smp.
  }
  
  static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id)
-diff -purN linux-2.6.27/arch/x86/xen/xen-head.S linux-2.6.27.19-5.1/arch/x86/xen/xen-head.S
---- linux-2.6.27/arch/x86/xen/xen-head.S       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/x86/xen/xen-head.S        2009-03-25 16:10:44.000000000 +0000
+diff -r 9608d5473017 arch/x86/xen/xen-head.S
+--- a/arch/x86/xen/xen-head.S  Wed May 06 15:47:13 2009 +0100
++++ b/arch/x86/xen/xen-head.S  Wed May 06 16:56:11 2009 +0100
 @@ -1,7 +1,7 @@
  /* Xen-specific pieces of head.S, intended to be included in the right
        place in head.S */
@@ -137633,16 +137609,16 @@ diff -purN linux-2.6.27/arch/x86/xen/xen-head.S linux-2.6.27.19-5.1/arch/x86/xen
  
  #include <linux/elfnote.h>
  #include <linux/init.h>
-@@ -52,4 +52,4 @@ ENTRY(hypercall_page)
+@@ -52,4 +52,4 @@
        ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW,   _ASM_PTR __HYPERVISOR_VIRT_START)
        ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET,   _ASM_PTR 0)
  
 -#endif /*CONFIG_XEN */
 +#endif /* CONFIG_PARAVIRT_XEN */
-diff -purN linux-2.6.27/arch/xtensa/Kconfig linux-2.6.27.19-5.1/arch/xtensa/Kconfig
---- linux-2.6.27/arch/xtensa/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/arch/xtensa/Kconfig    2009-03-25 16:10:47.000000000 +0000
-@@ -55,6 +55,7 @@ config HZ
+diff -r 9608d5473017 arch/xtensa/Kconfig
+--- a/arch/xtensa/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/arch/xtensa/Kconfig      Wed May 06 16:56:11 2009 +0100
+@@ -55,6 +55,7 @@
        default 100
  
  source "init/Kconfig"
@@ -137650,9 +137626,9 @@ diff -purN linux-2.6.27/arch/xtensa/Kconfig linux-2.6.27.19-5.1/arch/xtensa/Kcon
  
  menu "Processor type and features"
  
-diff -purN linux-2.6.27/block/Makefile linux-2.6.27.19-5.1/block/Makefile
---- linux-2.6.27/block/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/Makefile 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/Makefile
+--- a/block/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/block/Makefile   Wed May 06 16:56:11 2009 +0100
 @@ -4,8 +4,8 @@
  
  obj-$(CONFIG_BLOCK) := elevator.o blk-core.o blk-tag.o blk-sysfs.o \
@@ -137664,10 +137640,10 @@ diff -purN linux-2.6.27/block/Makefile linux-2.6.27.19-5.1/block/Makefile
  
  obj-$(CONFIG_BLK_DEV_BSG)     += bsg.o
  obj-$(CONFIG_IOSCHED_NOOP)    += noop-iosched.o
-diff -purN linux-2.6.27/block/as-iosched.c linux-2.6.27.19-5.1/block/as-iosched.c
---- linux-2.6.27/block/as-iosched.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/as-iosched.c     2009-03-25 16:11:42.000000000 +0000
-@@ -462,7 +462,7 @@ static void as_antic_stop(struct as_data
+diff -r 9608d5473017 block/as-iosched.c
+--- a/block/as-iosched.c       Wed May 06 15:47:13 2009 +0100
++++ b/block/as-iosched.c       Wed May 06 16:56:11 2009 +0100
+@@ -462,7 +462,7 @@
                        del_timer(&ad->antic_timer);
                ad->antic_status = ANTIC_FINISHED;
                /* see as_work_handler */
@@ -137676,7 +137652,7 @@ diff -purN linux-2.6.27/block/as-iosched.c linux-2.6.27.19-5.1/block/as-iosched.
        }
  }
  
-@@ -483,7 +483,7 @@ static void as_antic_timeout(unsigned lo
+@@ -483,7 +483,7 @@
                aic = ad->io_context->aic;
  
                ad->antic_status = ANTIC_FINISHED;
@@ -137685,7 +137661,7 @@ diff -purN linux-2.6.27/block/as-iosched.c linux-2.6.27.19-5.1/block/as-iosched.
  
                if (aic->ttime_samples == 0) {
                        /* process anticipated on has exited or timed out*/
-@@ -844,7 +844,7 @@ static void as_completed_request(struct 
+@@ -844,7 +844,7 @@
        if (ad->changed_batch && ad->nr_dispatched == 1) {
                ad->current_batch_expires = jiffies +
                                        ad->batch_expire[ad->batch_data_dir];
@@ -137694,10 +137670,10 @@ diff -purN linux-2.6.27/block/as-iosched.c linux-2.6.27.19-5.1/block/as-iosched.
                ad->changed_batch = 0;
  
                if (ad->batch_data_dir == REQ_SYNC)
-diff -purN linux-2.6.27/block/blk-barrier.c linux-2.6.27.19-5.1/block/blk-barrier.c
---- linux-2.6.27/block/blk-barrier.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-barrier.c    2009-03-25 16:11:42.000000000 +0000
-@@ -161,7 +161,7 @@ static inline struct request *start_orde
+diff -r 9608d5473017 block/blk-barrier.c
+--- a/block/blk-barrier.c      Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-barrier.c      Wed May 06 16:56:11 2009 +0100
+@@ -161,7 +161,7 @@
        /*
         * Prep proxy barrier request.
         */
@@ -137706,7 +137682,7 @@ diff -purN linux-2.6.27/block/blk-barrier.c linux-2.6.27.19-5.1/block/blk-barrie
        q->orig_bar_rq = rq;
        rq = &q->bar_rq;
        blk_rq_init(q, rq);
-@@ -219,7 +219,7 @@ int blk_do_ordered(struct request_queue 
+@@ -219,7 +219,7 @@
                         * This can happen when the queue switches to
                         * ORDERED_NONE while this request is on it.
                         */
@@ -137715,7 +137691,7 @@ diff -purN linux-2.6.27/block/blk-barrier.c linux-2.6.27.19-5.1/block/blk-barrie
                        if (__blk_end_request(rq, -EOPNOTSUPP,
                                              blk_rq_bytes(rq)))
                                BUG();
-@@ -315,3 +315,72 @@ int blkdev_issue_flush(struct block_devi
+@@ -315,3 +315,72 @@
        return ret;
  }
  EXPORT_SYMBOL(blkdev_issue_flush);
@@ -137788,9 +137764,9 @@ diff -purN linux-2.6.27/block/blk-barrier.c linux-2.6.27.19-5.1/block/blk-barrie
 +      return ret;
 +}
 +EXPORT_SYMBOL(blkdev_issue_discard);
-diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
---- linux-2.6.27/block/blk-core.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-core.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-core.c
+--- a/block/blk-core.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-core.c Wed May 06 16:56:11 2009 +0100
 @@ -26,8 +26,6 @@
  #include <linux/swap.h>
  #include <linux/writeback.h>
@@ -137800,16 +137776,16 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  #include <linux/blktrace_api.h>
  #include <linux/fault-inject.h>
  
-@@ -50,8 +48,6 @@ struct kmem_cache *blk_requestq_cachep;
+@@ -49,8 +47,6 @@
+  * Controlling structure to kblockd
   */
  static struct workqueue_struct *kblockd_workqueue;
--static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
 -
+-static DEFINE_PER_CPU(struct list_head, blk_cpu_done);
  static void drive_stat_acct(struct request *rq, int new_io)
  {
-       struct hd_struct *part;
-@@ -113,7 +109,8 @@ void blk_rq_init(struct request_queue *q
+@@ -113,7 +109,8 @@
        memset(rq, 0, sizeof(*rq));
  
        INIT_LIST_HEAD(&rq->queuelist);
@@ -137819,17 +137795,17 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        rq->q = q;
        rq->sector = rq->hard_sector = (sector_t) -1;
        INIT_HLIST_NODE(&rq->hash);
-@@ -141,6 +138,9 @@ static void req_bio_endio(struct request
+@@ -140,6 +137,9 @@
+                              __func__, nbytes, bio->bi_size);
                        nbytes = bio->bi_size;
                }
++
 +              if (unlikely(rq->cmd_flags & REQ_QUIET))
 +                      set_bit(BIO_QUIET, &bio->bi_flags);
-+
                bio->bi_size -= nbytes;
                bio->bi_sector += (nbytes >> 9);
-@@ -308,7 +308,7 @@ void blk_unplug_timeout(unsigned long da
+@@ -308,7 +308,7 @@
        blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_TIMER, NULL,
                                q->rq.count[READ] + q->rq.count[WRITE]);
  
@@ -137838,7 +137814,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  }
  
  void blk_unplug(struct request_queue *q)
-@@ -325,6 +325,24 @@ void blk_unplug(struct request_queue *q)
+@@ -325,6 +325,24 @@
  }
  EXPORT_SYMBOL(blk_unplug);
  
@@ -137863,7 +137839,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  /**
   * blk_start_queue - restart a previously stopped queue
   * @q:    The &struct request_queue in question
-@@ -339,18 +357,7 @@ void blk_start_queue(struct request_queu
+@@ -339,18 +357,7 @@
        WARN_ON(!irqs_disabled());
  
        queue_flag_clear(QUEUE_FLAG_STOPPED, q);
@@ -137883,7 +137859,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  }
  EXPORT_SYMBOL(blk_start_queue);
  
-@@ -392,13 +399,19 @@ EXPORT_SYMBOL(blk_stop_queue);
+@@ -392,13 +399,19 @@
  void blk_sync_queue(struct request_queue *q)
  {
        del_timer_sync(&q->unplug_timer);
@@ -137904,7 +137880,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   */
  void __blk_run_queue(struct request_queue *q)
  {
-@@ -408,21 +421,20 @@ void __blk_run_queue(struct request_queu
+@@ -408,21 +421,20 @@
         * Only recurse once to avoid overrunning the stack, let the unplug
         * handling reinvoke the handler shortly if we already got there.
         */
@@ -137934,7 +137910,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   */
  void blk_run_queue(struct request_queue *q)
  {
-@@ -441,6 +453,14 @@ void blk_put_queue(struct request_queue 
+@@ -441,6 +453,14 @@
  
  void blk_cleanup_queue(struct request_queue *q)
  {
@@ -137949,7 +137925,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        mutex_lock(&q->sysfs_lock);
        queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q);
        mutex_unlock(&q->sysfs_lock);
-@@ -496,6 +516,9 @@ struct request_queue *blk_alloc_queue_no
+@@ -496,6 +516,9 @@
        }
  
        init_timer(&q->unplug_timer);
@@ -137959,7 +137935,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  
        kobject_init(&q->kobj, &blk_queue_ktype);
  
-@@ -531,7 +554,7 @@ EXPORT_SYMBOL(blk_alloc_queue_node);
+@@ -531,7 +554,7 @@
   *    request queue; this lock will be taken also from interrupt context, so irq
   *    disabling is needed for it.
   *
@@ -137968,7 +137944,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *    it didn't succeed.
   *
   * Note:
-@@ -569,10 +592,11 @@ blk_init_queue_node(request_fn_proc *rfn
+@@ -569,10 +592,11 @@
        q->request_fn           = rfn;
        q->prep_rq_fn           = NULL;
        q->unplug_fn            = generic_unplug_device;
@@ -137982,7 +137958,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  
        blk_queue_make_request(q, __make_request);
        blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE);
-@@ -624,10 +648,6 @@ blk_alloc_request(struct request_queue *
+@@ -624,10 +648,6 @@
  
        blk_rq_init(q, rq);
  
@@ -137993,7 +137969,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        rq->cmd_flags = rw | REQ_ALLOCED;
  
        if (priv) {
-@@ -882,15 +902,18 @@ EXPORT_SYMBOL(blk_get_request);
+@@ -882,15 +902,18 @@
   *
   * This is basically a helper to remove the need to know whether a queue
   * is plugged or not if someone just wants to initiate dispatch of requests
@@ -138015,7 +137991,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                __generic_unplug_device(q);
  }
  EXPORT_SYMBOL(blk_start_queueing);
-@@ -907,6 +930,8 @@ EXPORT_SYMBOL(blk_start_queueing);
+@@ -907,6 +930,8 @@
   */
  void blk_requeue_request(struct request_queue *q, struct request *rq)
  {
@@ -138024,7 +138000,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        blk_add_trace_rq(q, rq, BLK_TA_REQUEUE);
  
        if (blk_rq_tagged(rq))
-@@ -917,7 +942,7 @@ void blk_requeue_request(struct request_
+@@ -917,7 +942,7 @@
  EXPORT_SYMBOL(blk_requeue_request);
  
  /**
@@ -138033,7 +138009,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * @q:                request queue where request should be inserted
   * @rq:               request to be inserted
   * @at_head:  insert request at head or tail of queue
-@@ -927,8 +952,8 @@ EXPORT_SYMBOL(blk_requeue_request);
+@@ -927,8 +952,8 @@
   *    Many block devices need to execute commands asynchronously, so they don't
   *    block the whole kernel from preemption during request execution.  This is
   *    accomplished normally by inserting aritficial requests tagged as
@@ -138044,7 +138020,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *
   *    We have the option of inserting the head or the tail of the queue.
   *    Typically we use the tail for new ioctls and so forth.  We use the head
-@@ -1070,18 +1095,31 @@ EXPORT_SYMBOL(blk_put_request);
+@@ -1070,18 +1095,31 @@
  
  void init_request_from_bio(struct request *req, struct bio *bio)
  {
@@ -138079,7 +138055,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                req->cmd_flags |= (REQ_HARDBARRIER | REQ_NOMERGE);
  
        if (bio_sync(bio))
-@@ -1099,7 +1137,7 @@ void init_request_from_bio(struct reques
+@@ -1099,7 +1137,7 @@
  static int __make_request(struct request_queue *q, struct bio *bio)
  {
        struct request *req;
@@ -138088,7 +138064,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        const unsigned short prio = bio_prio(bio);
        const int sync = bio_sync(bio);
        int rw_flags;
-@@ -1114,7 +1152,14 @@ static int __make_request(struct request
+@@ -1114,7 +1152,14 @@
        blk_queue_bounce(q, &bio);
  
        barrier = bio_barrier(bio);
@@ -138104,7 +138080,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                err = -EOPNOTSUPP;
                goto end_io;
        }
-@@ -1138,6 +1183,8 @@ static int __make_request(struct request
+@@ -1138,6 +1183,8 @@
                req->biotail = bio;
                req->nr_sectors = req->hard_nr_sectors += nr_sectors;
                req->ioprio = ioprio_best(req->ioprio, prio);
@@ -138113,7 +138089,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                drive_stat_acct(req, 0);
                if (!attempt_back_merge(q, req))
                        elv_merged_request(q, req, el_ret);
-@@ -1165,6 +1212,8 @@ static int __make_request(struct request
+@@ -1165,6 +1212,8 @@
                req->sector = req->hard_sector = bio->bi_sector;
                req->nr_sectors = req->hard_nr_sectors += nr_sectors;
                req->ioprio = ioprio_best(req->ioprio, prio);
@@ -138122,7 +138098,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                drive_stat_acct(req, 0);
                if (!attempt_front_merge(q, req))
                        elv_merged_request(q, req, el_ret);
-@@ -1200,13 +1249,15 @@ get_rq:
+@@ -1200,13 +1249,15 @@
        init_request_from_bio(req, bio);
  
        spin_lock_irq(q->queue_lock);
@@ -138139,7 +138115,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        spin_unlock_irq(q->queue_lock);
        return 0;
  
-@@ -1314,7 +1365,7 @@ static inline int bio_check_eod(struct b
+@@ -1314,7 +1365,7 @@
  }
  
  /**
@@ -138148,7 +138124,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * @bio:  The bio describing the location in memory and on the device.
   *
   * generic_make_request() is used to make I/O requests of block
-@@ -1409,7 +1460,8 @@ end_io:
+@@ -1409,7 +1460,8 @@
  
                if (bio_check_eod(bio, nr_sectors))
                        goto end_io;
@@ -138158,7 +138134,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                        err = -EOPNOTSUPP;
                        goto end_io;
                }
-@@ -1471,13 +1523,13 @@ void generic_make_request(struct bio *bi
+@@ -1471,13 +1523,13 @@
  EXPORT_SYMBOL(generic_make_request);
  
  /**
@@ -138174,7 +138150,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *
   */
  void submit_bio(int rw, struct bio *bio)
-@@ -1490,11 +1542,7 @@ void submit_bio(int rw, struct bio *bio)
+@@ -1490,11 +1542,7 @@
         * If it's a regular read/write or a barrier with data attached,
         * go through the normal accounting stuff before submission.
         */
@@ -138187,7 +138163,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
                if (rw & WRITE) {
                        count_vm_events(PGPGOUT, count);
                } else {
-@@ -1517,9 +1565,112 @@ void submit_bio(int rw, struct bio *bio)
+@@ -1517,9 +1565,112 @@
  EXPORT_SYMBOL(submit_bio);
  
  /**
@@ -138301,7 +138277,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * @nr_bytes: number of bytes to complete
   *
   * Description:
-@@ -1527,8 +1678,8 @@ EXPORT_SYMBOL(submit_bio);
+@@ -1527,8 +1678,8 @@
   *     for the next range of segments (if any) in the cluster.
   *
   * Return:
@@ -138312,7 +138288,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   **/
  static int __end_that_request_first(struct request *req, int error,
                                    int nr_bytes)
-@@ -1539,7 +1690,7 @@ static int __end_that_request_first(stru
+@@ -1539,7 +1690,7 @@
        blk_add_trace_rq(req->q, req, BLK_TA_COMPLETE);
  
        /*
@@ -138321,7 +138297,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
         * sense key with us all the way through
         */
        if (!blk_pc_request(req))
-@@ -1641,82 +1792,6 @@ static int __end_that_request_first(stru
+@@ -1641,82 +1792,6 @@
  }
  
  /*
@@ -138404,7 +138380,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * queue lock must be held
   */
  static void end_that_request_last(struct request *req, int error)
-@@ -1727,11 +1802,13 @@ static void end_that_request_last(struct
+@@ -1727,10 +1802,12 @@
                blk_queue_end_tag(req->q, req);
  
        if (blk_queued_rq(req))
@@ -138413,13 +138389,12 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  
        if (unlikely(laptop_mode) && blk_fs_request(req))
                laptop_io_completion();
-+      blk_delete_timer(req);
 +
++      blk_delete_timer(req);
        /*
         * Account IO completion.  bar_rq isn't accounted as a normal
-        * IO on queueing nor completion.  Accounting the containing
-@@ -1805,11 +1882,11 @@ EXPORT_SYMBOL_GPL(blk_rq_cur_bytes);
+@@ -1805,11 +1882,11 @@
  /**
   * end_queued_request - end all I/O on a queued request
   * @rq:               the request being processed
@@ -138433,7 +138408,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *     the request attached to the block layer.
   *
   **/
-@@ -1822,7 +1899,7 @@ EXPORT_SYMBOL(end_queued_request);
+@@ -1822,7 +1899,7 @@
  /**
   * end_dequeued_request - end all I/O on a dequeued request
   * @rq:               the request being processed
@@ -138442,7 +138417,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *
   * Description:
   *     Ends all I/O on a request. The request must already have been
-@@ -1840,14 +1917,14 @@ EXPORT_SYMBOL(end_dequeued_request);
+@@ -1840,14 +1917,14 @@
  /**
   * end_request - end I/O on the current segment of the request
   * @req:      the request being processed
@@ -138460,7 +138435,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *     they have a residual value to account for. For that case this function
   *     isn't really useful, unless the residual just happens to be the
   *     full current segment. In other words, don't use this function in new
-@@ -1862,15 +1939,31 @@ void end_request(struct request *req, in
+@@ -1862,15 +1939,31 @@
  }
  EXPORT_SYMBOL(end_request);
  
@@ -138494,7 +138469,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *                completion of the request.
   *
   * Description:
-@@ -1878,8 +1971,8 @@ EXPORT_SYMBOL(end_request);
+@@ -1878,8 +1971,8 @@
   *     If @rq has leftover, sets it up for the next range of segments.
   *
   * Return:
@@ -138505,7 +138480,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   **/
  static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
                      unsigned int bidi_bytes,
-@@ -1888,15 +1981,8 @@ static int blk_end_io(struct request *rq
+@@ -1888,15 +1981,8 @@
        struct request_queue *q = rq->q;
        unsigned long flags = 0UL;
  
@@ -138523,7 +138498,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  
        /* Special feature for tricky drivers */
        if (drv_callback && drv_callback(rq))
-@@ -1914,7 +2000,7 @@ static int blk_end_io(struct request *rq
+@@ -1914,7 +2000,7 @@
  /**
   * blk_end_request - Helper function for drivers to complete the request.
   * @rq:       the request being processed
@@ -138532,7 +138507,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * @nr_bytes: number of bytes to complete
   *
   * Description:
-@@ -1922,8 +2008,8 @@ static int blk_end_io(struct request *rq
+@@ -1922,8 +2008,8 @@
   *     If @rq has leftover, sets it up for the next range of segments.
   *
   * Return:
@@ -138543,7 +138518,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   **/
  int blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
  {
-@@ -1934,22 +2020,20 @@ EXPORT_SYMBOL_GPL(blk_end_request);
+@@ -1934,22 +2020,20 @@
  /**
   * __blk_end_request - Helper function for drivers to complete the request.
   * @rq:       the request being processed
@@ -138571,7 +138546,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  
        add_disk_randomness(rq->rq_disk);
  
-@@ -1962,7 +2046,7 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
+@@ -1962,7 +2046,7 @@
  /**
   * blk_end_bidi_request - Helper function for drivers to complete bidi request.
   * @rq:         the bidi request being processed
@@ -138580,7 +138555,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   * @nr_bytes:   number of bytes to complete @rq
   * @bidi_bytes: number of bytes to complete @rq->next_rq
   *
-@@ -1970,8 +2054,8 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
+@@ -1970,8 +2054,8 @@
   *     Ends I/O on a number of bytes attached to @rq and @rq->next_rq.
   *
   * Return:
@@ -138591,7 +138566,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   **/
  int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes,
                         unsigned int bidi_bytes)
-@@ -1981,13 +2065,43 @@ int blk_end_bidi_request(struct request 
+@@ -1981,13 +2065,43 @@
  EXPORT_SYMBOL_GPL(blk_end_bidi_request);
  
  /**
@@ -138637,7 +138612,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   *                completion of the request.
   *
   * Description:
-@@ -2000,10 +2114,10 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request);
+@@ -2000,10 +2114,10 @@
   *     Don't use this interface in other places anymore.
   *
   * Return:
@@ -138652,7 +138627,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
   **/
  int blk_end_request_callback(struct request *rq, int error,
                             unsigned int nr_bytes,
-@@ -2016,15 +2130,17 @@ EXPORT_SYMBOL_GPL(blk_end_request_callba
+@@ -2016,15 +2130,17 @@
  void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
                     struct bio *bio)
  {
@@ -138674,7 +138649,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        rq->data_len = bio->bi_size;
  
        rq->bio = rq->biotail = bio;
-@@ -2033,7 +2149,35 @@ void blk_rq_bio_prep(struct request_queu
+@@ -2033,7 +2149,35 @@
                rq->rq_disk = bio->bi_bdev->bd_disk;
  }
  
@@ -138711,7 +138686,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
  {
        return queue_work(kblockd_workqueue, work);
  }
-@@ -2047,8 +2191,6 @@ EXPORT_SYMBOL(kblockd_flush_work);
+@@ -2047,8 +2191,6 @@
  
  int __init blk_dev_init(void)
  {
@@ -138720,7 +138695,7 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        kblockd_workqueue = create_workqueue("kblockd");
        if (!kblockd_workqueue)
                panic("Failed to create kblockd\n");
-@@ -2059,12 +2201,6 @@ int __init blk_dev_init(void)
+@@ -2059,12 +2201,6 @@
        blk_requestq_cachep = kmem_cache_create("blkdev_queue",
                        sizeof(struct request_queue), 0, SLAB_PANIC, NULL);
  
@@ -138733,9 +138708,9 @@ diff -purN linux-2.6.27/block/blk-core.c linux-2.6.27.19-5.1/block/blk-core.c
        return 0;
  }
  
-diff -purN linux-2.6.27/block/blk-exec.c linux-2.6.27.19-5.1/block/blk-exec.c
---- linux-2.6.27/block/blk-exec.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-exec.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-exec.c
+--- a/block/blk-exec.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-exec.c Wed May 06 16:56:11 2009 +0100
 @@ -16,7 +16,7 @@
  /**
   * blk_end_sync_rq - executes a completion event on a request
@@ -138745,7 +138720,7 @@ diff -purN linux-2.6.27/block/blk-exec.c linux-2.6.27.19-5.1/block/blk-exec.c
   */
  static void blk_end_sync_rq(struct request *rq, int error)
  {
-@@ -41,7 +41,7 @@ static void blk_end_sync_rq(struct reque
+@@ -41,7 +41,7 @@
   * @done:     I/O completion handler
   *
   * Description:
@@ -138754,7 +138729,7 @@ diff -purN linux-2.6.27/block/blk-exec.c linux-2.6.27.19-5.1/block/blk-exec.c
   *    for execution.  Don't wait for completion.
   */
  void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
-@@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(blk_execute_rq_nowait)
+@@ -72,7 +72,7 @@
   * @at_head:    insert request at head or tail of queue
   *
   * Description:
@@ -138763,10 +138738,10 @@ diff -purN linux-2.6.27/block/blk-exec.c linux-2.6.27.19-5.1/block/blk-exec.c
   *    for execution and wait for completion.
   */
  int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
-diff -purN linux-2.6.27/block/blk-integrity.c linux-2.6.27.19-5.1/block/blk-integrity.c
---- linux-2.6.27/block/blk-integrity.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-integrity.c  2009-03-25 16:11:42.000000000 +0000
-@@ -108,51 +108,51 @@ new_segment:
+diff -r 9608d5473017 block/blk-integrity.c
+--- a/block/blk-integrity.c    Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-integrity.c    Wed May 06 16:56:11 2009 +0100
+@@ -108,51 +108,51 @@
  EXPORT_SYMBOL(blk_rq_map_integrity_sg);
  
  /**
@@ -138832,7 +138807,7 @@ diff -purN linux-2.6.27/block/blk-integrity.c linux-2.6.27.19-5.1/block/blk-inte
                       b1->name, b2->name);
                return -1;
        }
-@@ -375,7 +375,7 @@ void blk_integrity_unregister(struct gen
+@@ -375,7 +375,7 @@
  
        kobject_uevent(&bi->kobj, KOBJ_REMOVE);
        kobject_del(&bi->kobj);
@@ -138841,10 +138816,10 @@ diff -purN linux-2.6.27/block/blk-integrity.c linux-2.6.27.19-5.1/block/blk-inte
 +      disk->integrity = NULL;
  }
  EXPORT_SYMBOL(blk_integrity_unregister);
-diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
---- linux-2.6.27/block/blk-map.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-map.c        2009-03-25 16:11:42.000000000 +0000
-@@ -85,17 +85,17 @@ static int __blk_rq_map_user(struct requ
+diff -r 9608d5473017 block/blk-map.c
+--- a/block/blk-map.c  Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-map.c  Wed May 06 16:56:11 2009 +0100
+@@ -85,17 +85,17 @@
  }
  
  /**
@@ -138865,7 +138840,7 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
   *    still in process context.
   *
   *    Note: The mapped bio may need to be bounced through blk_queue_bounce()
-@@ -154,7 +154,7 @@ unmap_rq:
+@@ -154,7 +154,7 @@
  EXPORT_SYMBOL(blk_rq_map_user);
  
  /**
@@ -138874,7 +138849,7 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
   * @q:                request queue where request should be inserted
   * @rq:               request to map data to
   * @iov:      pointer to the iovec
-@@ -162,10 +162,10 @@ EXPORT_SYMBOL(blk_rq_map_user);
+@@ -162,10 +162,10 @@
   * @len:      I/O byte count
   *
   * Description:
@@ -138887,7 +138862,7 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
   *    still in process context.
   *
   *    Note: The mapped bio may need to be bounced through blk_queue_bounce()
-@@ -202,6 +202,12 @@ int blk_rq_map_user_iov(struct request_q
+@@ -202,6 +202,12 @@
                return PTR_ERR(bio);
  
        if (bio->bi_size != len) {
@@ -138900,7 +138875,7 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
                bio_endio(bio, 0);
                bio_unmap_user(bio);
                return -EINVAL;
-@@ -224,7 +230,7 @@ int blk_rq_map_user_iov(struct request_q
+@@ -224,7 +230,7 @@
   * Description:
   *    Unmap a rq previously mapped by blk_rq_map_user(). The caller must
   *    supply the original rq->bio from the blk_rq_map_user() return, since
@@ -138909,7 +138884,7 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
   */
  int blk_rq_unmap_user(struct bio *bio)
  {
-@@ -250,7 +256,7 @@ int blk_rq_unmap_user(struct bio *bio)
+@@ -250,7 +256,7 @@
  EXPORT_SYMBOL(blk_rq_unmap_user);
  
  /**
@@ -138918,9 +138893,9 @@ diff -purN linux-2.6.27/block/blk-map.c linux-2.6.27.19-5.1/block/blk-map.c
   * @q:                request queue where request should be inserted
   * @rq:               request to fill
   * @kbuf:     the kernel buffer
-diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
---- linux-2.6.27/block/blk-merge.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-merge.c      2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-merge.c
+--- a/block/blk-merge.c        Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-merge.c        Wed May 06 16:56:11 2009 +0100
 @@ -11,7 +11,7 @@
  
  void blk_recalc_rq_sectors(struct request *rq, int nsect)
@@ -138930,7 +138905,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
                rq->hard_sector += nsect;
                rq->hard_nr_sectors -= nsect;
  
-@@ -41,12 +41,9 @@ void blk_recalc_rq_sectors(struct reques
+@@ -41,12 +41,9 @@
  void blk_recalc_rq_segments(struct request *rq)
  {
        int nr_phys_segs;
@@ -138943,7 +138918,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
        int cluster;
        struct req_iterator iter;
        int high, highprv = 1;
-@@ -56,8 +53,8 @@ void blk_recalc_rq_segments(struct reque
+@@ -56,8 +53,8 @@
                return;
  
        cluster = test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
@@ -138954,7 +138929,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
        rq_for_each_segment(bv, rq, iter) {
                /*
                 * the trick here is making sure that a high page is never
-@@ -66,7 +63,7 @@ void blk_recalc_rq_segments(struct reque
+@@ -66,7 +63,7 @@
                 */
                high = page_to_pfn(bv->bv_page) > q->bounce_pfn;
                if (high || highprv)
@@ -138963,7 +138938,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
                if (cluster) {
                        if (seg_size + bv->bv_len > q->max_segment_size)
                                goto new_segment;
-@@ -74,26 +71,14 @@ void blk_recalc_rq_segments(struct reque
+@@ -74,26 +71,14 @@
                                goto new_segment;
                        if (!BIOVEC_SEG_BOUNDARY(q, bvprv, bv))
                                goto new_segment;
@@ -138992,7 +138967,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
                nr_phys_segs++;
                bvprv = bv;
-@@ -101,13 +86,11 @@ new_hw_segment:
+@@ -101,13 +86,11 @@
                highprv = high;
        }
  
@@ -139010,7 +138985,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  }
  
  void blk_recount_segments(struct request_queue *q, struct bio *bio)
-@@ -120,7 +103,6 @@ void blk_recount_segments(struct request
+@@ -120,7 +103,6 @@
        blk_recalc_rq_segments(&rq);
        bio->bi_next = nxt;
        bio->bi_phys_segments = rq.nr_phys_segments;
@@ -139018,20 +138993,20 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
        bio->bi_flags |= (1 << BIO_SEG_VALID);
  }
  EXPORT_SYMBOL(blk_recount_segments);
-@@ -131,13 +113,18 @@ static int blk_phys_contig_segment(struc
+@@ -131,35 +113,24 @@
        if (!test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags))
                return 0;
  
--      if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
 +      if (bio->bi_seg_back_size + nxt->bi_seg_front_size >
 +          q->max_segment_size)
-               return 0;
--      if (bio->bi_size + nxt->bi_size > q->max_segment_size)
++              return 0;
 +
 +      if (!bio_has_data(bio))
 +              return 1;
 +
-+      if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+       if (!BIOVEC_PHYS_MERGEABLE(__BVEC_END(bio), __BVEC_START(nxt)))
+-              return 0;
+-      if (bio->bi_size + nxt->bi_size > q->max_segment_size)
                return 0;
  
        /*
@@ -139040,10 +139015,11 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
         * these two to be merged into one
         */
        if (BIO_SEG_BOUNDARY(q, bio, nxt))
-@@ -146,22 +133,6 @@ static int blk_phys_contig_segment(struc
-       return 0;
- }
+               return 1;
  
+       return 0;
+-}
+-
 -static int blk_hw_contig_segment(struct request_queue *q, struct bio *bio,
 -                               struct bio *nxt)
 -{
@@ -139058,12 +139034,10 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
 -              return 0;
 -
 -      return 1;
--}
--
+ }
  /*
-  * map a request to scatterlist, return number of sg entries setup. Caller
-  * must make sure sg can hold rq->nr_phys_segments entries
-@@ -275,10 +246,9 @@ static inline int ll_new_hw_segment(stru
+@@ -275,10 +246,9 @@
                                    struct request *req,
                                    struct bio *bio)
  {
@@ -139075,7 +139049,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
            || req->nr_phys_segments + nr_phys_segs > q->max_phys_segments) {
                req->cmd_flags |= REQ_NOMERGE;
                if (req == q->last_merge)
-@@ -290,7 +260,6 @@ static inline int ll_new_hw_segment(stru
+@@ -290,7 +260,6 @@
         * This will form the start of a new hw segment.  Bump both
         * counters.
         */
@@ -139083,7 +139057,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
        req->nr_phys_segments += nr_phys_segs;
        return 1;
  }
-@@ -299,7 +268,6 @@ int ll_back_merge_fn(struct request_queu
+@@ -299,7 +268,6 @@
                     struct bio *bio)
  {
        unsigned short max_sectors;
@@ -139091,7 +139065,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        if (unlikely(blk_pc_request(req)))
                max_sectors = q->max_hw_sectors;
-@@ -316,19 +284,6 @@ int ll_back_merge_fn(struct request_queu
+@@ -316,19 +284,6 @@
                blk_recount_segments(q, req->biotail);
        if (!bio_flagged(bio, BIO_SEG_VALID))
                blk_recount_segments(q, bio);
@@ -139111,7 +139085,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        return ll_new_hw_segment(q, req, bio);
  }
-@@ -337,7 +292,6 @@ int ll_front_merge_fn(struct request_que
+@@ -337,7 +292,6 @@
                      struct bio *bio)
  {
        unsigned short max_sectors;
@@ -139119,7 +139093,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        if (unlikely(blk_pc_request(req)))
                max_sectors = q->max_hw_sectors;
-@@ -351,23 +305,10 @@ int ll_front_merge_fn(struct request_que
+@@ -351,23 +305,10 @@
                        q->last_merge = NULL;
                return 0;
        }
@@ -139143,7 +139117,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        return ll_new_hw_segment(q, req, bio);
  }
-@@ -376,7 +317,8 @@ static int ll_merge_requests_fn(struct r
+@@ -376,7 +317,8 @@
                                struct request *next)
  {
        int total_phys_segments;
@@ -139153,7 +139127,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        /*
         * First check if the either of the requests are re-queued
-@@ -392,32 +334,22 @@ static int ll_merge_requests_fn(struct r
+@@ -392,32 +334,22 @@
                return 0;
  
        total_phys_segments = req->nr_phys_segments + next->nr_phys_segments;
@@ -139193,7 +139167,7 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
        return 1;
  }
  
-@@ -481,6 +413,8 @@ static int attempt_merge(struct request_
+@@ -481,6 +413,8 @@
        }
  
        req->ioprio = ioprio_best(req->ioprio, next->ioprio);
@@ -139202,10 +139176,10 @@ diff -purN linux-2.6.27/block/blk-merge.c linux-2.6.27.19-5.1/block/blk-merge.c
  
        __blk_put_request(q, next);
        return 1;
-diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-settings.c
---- linux-2.6.27/block/blk-settings.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-settings.c   2009-03-25 16:11:42.000000000 +0000
-@@ -33,6 +33,23 @@ void blk_queue_prep_rq(struct request_qu
+diff -r 9608d5473017 block/blk-settings.c
+--- a/block/blk-settings.c     Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-settings.c     Wed May 06 16:56:11 2009 +0100
+@@ -33,6 +33,23 @@
  EXPORT_SYMBOL(blk_queue_prep_rq);
  
  /**
@@ -139229,10 +139203,11 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
   * blk_queue_merge_bvec - set a merge_bvec function for queue
   * @q:                queue
   * @mbfn:     merge_bvec_fn
-@@ -60,6 +77,24 @@ void blk_queue_softirq_done(struct reque
+@@ -59,6 +76,24 @@
+       q->softirq_done_fn = fn;
  }
  EXPORT_SYMBOL(blk_queue_softirq_done);
++
 +void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout)
 +{
 +      q->rq_timeout = timeout;
@@ -139250,11 +139225,10 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
 +      q->lld_busy_fn = fn;
 +}
 +EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
-+
  /**
   * blk_queue_make_request - define an alternate make_request function for a device
-  * @q:  the request queue for the device to be affected
-@@ -90,6 +125,9 @@ void blk_queue_make_request(struct reque
+@@ -90,6 +125,9 @@
        q->nr_requests = BLKDEV_MAX_RQ;
        blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
        blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
@@ -139264,16 +139238,16 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
        q->make_request_fn = mfn;
        q->backing_dev_info.ra_pages =
                        (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
-@@ -106,8 +144,6 @@ void blk_queue_make_request(struct reque
+@@ -105,8 +143,6 @@
+       q->unplug_delay = (3 * HZ) / 1000;      /* 3 milliseconds */
        if (q->unplug_delay == 0)
                q->unplug_delay = 1;
--      INIT_WORK(&q->unplug_work, blk_unplug_work);
 -
+-      INIT_WORK(&q->unplug_work, blk_unplug_work);
        q->unplug_timer.function = blk_unplug_timeout;
        q->unplug_timer.data = (unsigned long)q;
-@@ -127,7 +163,7 @@ EXPORT_SYMBOL(blk_queue_make_request);
+@@ -127,7 +163,7 @@
   *    Different hardware can have different requirements as to what pages
   *    it can do I/O directly to. A low level driver can call
   *    blk_queue_bounce_limit to have lower memory pages allocated as bounce
@@ -139282,7 +139256,7 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
   **/
  void blk_queue_bounce_limit(struct request_queue *q, u64 dma_addr)
  {
-@@ -212,7 +248,7 @@ EXPORT_SYMBOL(blk_queue_max_phys_segment
+@@ -212,7 +248,7 @@
   * Description:
   *    Enables a low level driver to set an upper limit on the number of
   *    hw data segments in a request.  This would be the largest number of
@@ -139291,7 +139265,7 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
   *    to the device.
   **/
  void blk_queue_max_hw_segments(struct request_queue *q,
-@@ -281,6 +317,7 @@ void blk_queue_stack_limits(struct reque
+@@ -281,6 +317,7 @@
        /* zero is "infinity" */
        t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
        t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
@@ -139299,7 +139273,7 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
  
        t->max_phys_segments = min(t->max_phys_segments, b->max_phys_segments);
        t->max_hw_segments = min(t->max_hw_segments, b->max_hw_segments);
-@@ -393,7 +430,7 @@ EXPORT_SYMBOL(blk_queue_segment_boundary
+@@ -393,7 +430,7 @@
   * @mask:  alignment mask
   *
   * description:
@@ -139308,7 +139282,7 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
   *    this is used when buiding direct io requests for the queue.
   *
   **/
-@@ -409,7 +446,7 @@ EXPORT_SYMBOL(blk_queue_dma_alignment);
+@@ -409,7 +446,7 @@
   * @mask:  alignment mask
   *
   * description:
@@ -139317,7 +139291,7 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
   *    If the requested alignment is larger than the current alignment, then
   *    the current queue alignment is updated to the new value, otherwise it
   *    is left alone.  The design of this is to allow multiple objects
-@@ -426,7 +463,7 @@ void blk_queue_update_dma_alignment(stru
+@@ -426,7 +463,7 @@
  }
  EXPORT_SYMBOL(blk_queue_update_dma_alignment);
  
@@ -139326,9 +139300,9 @@ diff -purN linux-2.6.27/block/blk-settings.c linux-2.6.27.19-5.1/block/blk-setti
  {
        blk_max_low_pfn = max_low_pfn - 1;
        blk_max_pfn = max_pfn - 1;
-diff -purN linux-2.6.27/block/blk-softirq.c linux-2.6.27.19-5.1/block/blk-softirq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-softirq.c    2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-softirq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/block/blk-softirq.c      Wed May 06 16:56:12 2009 +0100
 @@ -0,0 +1,173 @@
 +/*
 + * Functions related to softirq rq completions
@@ -139503,10 +139477,10 @@ diff -purN linux-2.6.27/block/blk-softirq.c linux-2.6.27.19-5.1/block/blk-softir
 +      return 0;
 +}
 +subsys_initcall(blk_softirq_init);
-diff -purN linux-2.6.27/block/blk-sysfs.c linux-2.6.27.19-5.1/block/blk-sysfs.c
---- linux-2.6.27/block/blk-sysfs.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-sysfs.c      2009-03-25 16:11:42.000000000 +0000
-@@ -156,6 +156,30 @@ static ssize_t queue_nomerges_store(stru
+diff -r 9608d5473017 block/blk-sysfs.c
+--- a/block/blk-sysfs.c        Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-sysfs.c        Wed May 06 16:56:12 2009 +0100
+@@ -156,6 +156,30 @@
        return ret;
  }
  
@@ -139537,7 +139511,7 @@ diff -purN linux-2.6.27/block/blk-sysfs.c linux-2.6.27.19-5.1/block/blk-sysfs.c
  
  static struct queue_sysfs_entry queue_requests_entry = {
        .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
-@@ -197,6 +221,12 @@ static struct queue_sysfs_entry queue_no
+@@ -197,6 +221,12 @@
        .store = queue_nomerges_store,
  };
  
@@ -139550,7 +139524,7 @@ diff -purN linux-2.6.27/block/blk-sysfs.c linux-2.6.27.19-5.1/block/blk-sysfs.c
  static struct attribute *default_attrs[] = {
        &queue_requests_entry.attr,
        &queue_ra_entry.attr,
-@@ -205,6 +235,7 @@ static struct attribute *default_attrs[]
+@@ -205,6 +235,7 @@
        &queue_iosched_entry.attr,
        &queue_hw_sector_size_entry.attr,
        &queue_nomerges_entry.attr,
@@ -139558,10 +139532,10 @@ diff -purN linux-2.6.27/block/blk-sysfs.c linux-2.6.27.19-5.1/block/blk-sysfs.c
        NULL,
  };
  
-diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
---- linux-2.6.27/block/blk-tag.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-tag.c        2009-03-25 16:11:42.000000000 +0000
-@@ -29,7 +29,7 @@ EXPORT_SYMBOL(blk_queue_find_tag);
+diff -r 9608d5473017 block/blk-tag.c
+--- a/block/blk-tag.c  Wed May 06 15:47:13 2009 +0100
++++ b/block/blk-tag.c  Wed May 06 16:56:12 2009 +0100
+@@ -29,7 +29,7 @@
   * __blk_free_tags - release a given set of tag maintenance info
   * @bqt:      the tag map to free
   *
@@ -139570,7 +139544,7 @@ diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
   * actually freed and false if there are still references using it
   */
  static int __blk_free_tags(struct blk_queue_tag *bqt)
-@@ -78,7 +78,7 @@ void __blk_queue_free_tags(struct reques
+@@ -78,7 +78,7 @@
   * blk_free_tags - release a given set of tag maintenance info
   * @bqt:      the tag map to free
   *
@@ -139579,7 +139553,7 @@ diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
   * function must guarantee to have released all the queues that
   * might have been using this tag map.
   */
-@@ -94,7 +94,7 @@ EXPORT_SYMBOL(blk_free_tags);
+@@ -94,7 +94,7 @@
   * @q:  the request queue for the device
   *
   *  Notes:
@@ -139588,7 +139562,7 @@ diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
   *    queue in function.
   **/
  void blk_queue_free_tags(struct request_queue *q)
-@@ -271,7 +271,7 @@ EXPORT_SYMBOL(blk_queue_resize_tags);
+@@ -271,7 +271,7 @@
   * @rq: the request that has completed
   *
   *  Description:
@@ -139597,9 +139571,9 @@ diff -purN linux-2.6.27/block/blk-tag.c linux-2.6.27.19-5.1/block/blk-tag.c
   *    all transfers have been done for a request. It's important to call
   *    this function before end_that_request_last(), as that will put the
   *    request back on the free list thus corrupting the internal tag list.
-diff -purN linux-2.6.27/block/blk-timeout.c linux-2.6.27.19-5.1/block/blk-timeout.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk-timeout.c    2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/blk-timeout.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/block/blk-timeout.c      Wed May 06 16:56:12 2009 +0100
 @@ -0,0 +1,167 @@
 +/*
 + * Functions related to generic timeout handling of requests.
@@ -139768,10 +139742,10 @@ diff -purN linux-2.6.27/block/blk-timeout.c linux-2.6.27.19-5.1/block/blk-timeou
 +
 +}
 +EXPORT_SYMBOL_GPL(blk_abort_queue);
-diff -purN linux-2.6.27/block/blk.h linux-2.6.27.19-5.1/block/blk.h
---- linux-2.6.27/block/blk.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blk.h    2009-03-25 16:11:42.000000000 +0000
-@@ -17,6 +17,30 @@ void __blk_queue_free_tags(struct reques
+diff -r 9608d5473017 block/blk.h
+--- a/block/blk.h      Wed May 06 15:47:13 2009 +0100
++++ b/block/blk.h      Wed May 06 16:56:12 2009 +0100
+@@ -17,6 +17,30 @@
  
  void blk_unplug_work(struct work_struct *work);
  void blk_unplug_timeout(unsigned long data);
@@ -139802,7 +139776,7 @@ diff -purN linux-2.6.27/block/blk.h linux-2.6.27.19-5.1/block/blk.h
  
  struct io_context *current_io_context(gfp_t gfp_flags, int node);
  
-@@ -59,4 +83,16 @@ static inline int queue_congestion_off_t
+@@ -59,4 +83,16 @@
  
  #endif /* BLK_DEV_INTEGRITY */
  
@@ -139815,14 +139789,14 @@ diff -purN linux-2.6.27/block/blk.h linux-2.6.27.19-5.1/block/blk.h
 +      return first_cpu(per_cpu(cpu_sibling_map, cpu));
 +#else
 +      return cpu;
-+#endif
+ #endif
 +}
 +
- #endif
-diff -purN linux-2.6.27/block/blktrace.c linux-2.6.27.19-5.1/block/blktrace.c
---- linux-2.6.27/block/blktrace.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/blktrace.c       2009-03-25 16:11:42.000000000 +0000
-@@ -111,23 +111,9 @@ static int act_log_check(struct blk_trac
++#endif
+diff -r 9608d5473017 block/blktrace.c
+--- a/block/blktrace.c Wed May 06 15:47:13 2009 +0100
++++ b/block/blktrace.c Wed May 06 16:56:12 2009 +0100
+@@ -111,23 +111,9 @@
   */
  static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK_TC_WRITE) };
  
@@ -139849,7 +139823,7 @@ diff -purN linux-2.6.27/block/blktrace.c linux-2.6.27.19-5.1/block/blktrace.c
  
  /*
   * The worker for the various blk_add_trace*() types. Fills out a
-@@ -147,10 +133,11 @@ void __blk_add_trace(struct blk_trace *b
+@@ -147,10 +133,11 @@
                return;
  
        what |= ddir_act[rw & WRITE];
@@ -139865,10 +139839,10 @@ diff -purN linux-2.6.27/block/blktrace.c linux-2.6.27.19-5.1/block/blktrace.c
  
        pid = tsk->pid;
        if (unlikely(act_log_check(bt, what, sector, pid)))
-diff -purN linux-2.6.27/block/bsg.c linux-2.6.27.19-5.1/block/bsg.c
---- linux-2.6.27/block/bsg.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/bsg.c    2009-03-25 16:11:42.000000000 +0000
-@@ -202,6 +202,8 @@ static int blk_fill_sgv4_hdr_rq(struct r
+diff -r 9608d5473017 block/bsg.c
+--- a/block/bsg.c      Wed May 06 15:47:13 2009 +0100
++++ b/block/bsg.c      Wed May 06 16:56:12 2009 +0100
+@@ -202,6 +202,8 @@
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
@@ -139877,10 +139851,10 @@ diff -purN linux-2.6.27/block/bsg.c linux-2.6.27.19-5.1/block/bsg.c
  
        return 0;
  }
-diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosched.c
---- linux-2.6.27/block/cfq-iosched.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/cfq-iosched.c    2009-03-25 16:11:42.000000000 +0000
-@@ -39,6 +39,7 @@ static int cfq_slice_idle = HZ / 125;
+diff -r 9608d5473017 block/cfq-iosched.c
+--- a/block/cfq-iosched.c      Wed May 06 15:47:13 2009 +0100
++++ b/block/cfq-iosched.c      Wed May 06 16:56:12 2009 +0100
+@@ -39,6 +39,7 @@
  #define CFQ_MIN_TT            (2)
  
  #define CFQ_SLICE_SCALE               (5)
@@ -139888,7 +139862,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
  
  #define RQ_CIC(rq)            \
        ((struct cfq_io_context *) (rq)->elevator_private)
-@@ -86,7 +87,14 @@ struct cfq_data {
+@@ -86,7 +87,14 @@
  
        int rq_in_driver;
        int sync_flight;
@@ -139903,7 +139877,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
  
        /*
         * idle window management
-@@ -244,7 +252,7 @@ static inline void cfq_schedule_dispatch
+@@ -244,7 +252,7 @@
  {
        if (cfqd->busy_queues) {
                cfq_log(cfqd, "schedule dispatch");
@@ -139912,7 +139886,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
        }
  }
  
-@@ -654,15 +662,6 @@ static void cfq_activate_request(struct 
+@@ -654,15 +662,6 @@
        cfq_log_cfqq(cfqd, RQ_CFQQ(rq), "activate rq, drv=%d",
                                                cfqd->rq_in_driver);
  
@@ -139928,7 +139902,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
        cfqd->last_position = rq->hard_sector + rq->hard_nr_sectors;
  }
  
-@@ -686,6 +685,7 @@ static void cfq_remove_request(struct re
+@@ -686,6 +685,7 @@
        list_del_init(&rq->queuelist);
        cfq_del_rq_rb(rq);
  
@@ -139936,7 +139910,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
        if (rq_is_meta(rq)) {
                WARN_ON(!cfqq->meta_pending);
                cfqq->meta_pending--;
-@@ -1310,7 +1310,15 @@ static void cfq_exit_single_io_context(s
+@@ -1310,7 +1310,15 @@
                unsigned long flags;
  
                spin_lock_irqsave(q->queue_lock, flags);
@@ -139953,7 +139927,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
                spin_unlock_irqrestore(q->queue_lock, flags);
        }
  }
-@@ -1833,6 +1841,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
+@@ -1833,6 +1841,7 @@
  {
        struct cfq_io_context *cic = RQ_CIC(rq);
  
@@ -139961,7 +139935,7 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
        if (rq_is_meta(rq))
                cfqq->meta_pending++;
  
-@@ -1880,6 +1889,31 @@ static void cfq_insert_request(struct re
+@@ -1880,6 +1889,31 @@
        cfq_rq_enqueued(cfqd, cfqq, rq);
  }
  
@@ -139993,16 +139967,16 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
  static void cfq_completed_request(struct request_queue *q, struct request *rq)
  {
        struct cfq_queue *cfqq = RQ_CFQQ(rq);
-@@ -1890,6 +1924,8 @@ static void cfq_completed_request(struct
+@@ -1889,6 +1923,8 @@
        now = jiffies;
        cfq_log_cfqq(cfqd, cfqq, "complete");
-+      cfq_update_hw_tag(cfqd);
 +
++      cfq_update_hw_tag(cfqd);
        WARN_ON(!cfqd->rq_in_driver);
        WARN_ON(!cfqq->dispatched);
-       cfqd->rq_in_driver--;
-@@ -2200,6 +2236,7 @@ static void *cfq_init_queue(struct reque
+@@ -2200,6 +2236,7 @@
        cfqd->cfq_slice[1] = cfq_slice_sync;
        cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
        cfqd->cfq_slice_idle = cfq_slice_idle;
@@ -140010,10 +139984,10 @@ diff -purN linux-2.6.27/block/cfq-iosched.c linux-2.6.27.19-5.1/block/cfq-iosche
  
        return cfqd;
  }
-diff -purN linux-2.6.27/block/compat_ioctl.c linux-2.6.27.19-5.1/block/compat_ioctl.c
---- linux-2.6.27/block/compat_ioctl.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/compat_ioctl.c   2009-03-25 16:11:42.000000000 +0000
-@@ -788,6 +788,7 @@ long compat_blkdev_ioctl(struct file *fi
+diff -r 9608d5473017 block/compat_ioctl.c
+--- a/block/compat_ioctl.c     Wed May 06 15:47:13 2009 +0100
++++ b/block/compat_ioctl.c     Wed May 06 16:56:12 2009 +0100
+@@ -788,6 +788,7 @@
                return compat_hdio_getgeo(disk, bdev, compat_ptr(arg));
        case BLKFLSBUF:
        case BLKROSET:
@@ -140021,10 +139995,10 @@ diff -purN linux-2.6.27/block/compat_ioctl.c linux-2.6.27.19-5.1/block/compat_io
        /*
         * the ones below are implemented in blkdev_locked_ioctl,
         * but we call blkdev_ioctl, which gets the lock for us
-diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadline-iosched.c
---- linux-2.6.27/block/deadline-iosched.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/deadline-iosched.c       2009-03-25 16:11:42.000000000 +0000
-@@ -33,7 +33,7 @@ struct deadline_data {
+diff -r 9608d5473017 block/deadline-iosched.c
+--- a/block/deadline-iosched.c Wed May 06 15:47:13 2009 +0100
++++ b/block/deadline-iosched.c Wed May 06 16:56:12 2009 +0100
+@@ -33,7 +33,7 @@
         */
        struct rb_root sort_list[2];    
        struct list_head fifo_list[2];
@@ -140033,7 +140007,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
        /*
         * next in sort order. read, write or both are NULL
         */
-@@ -53,7 +53,11 @@ struct deadline_data {
+@@ -53,7 +53,11 @@
  
  static void deadline_move_request(struct deadline_data *, struct request *);
  
@@ -140046,7 +140020,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
  
  /*
   * get the request after `rq' in sector-sorted order
-@@ -72,15 +76,11 @@ deadline_latter_request(struct request *
+@@ -72,15 +76,11 @@
  static void
  deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
  {
@@ -140064,7 +140038,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
  }
  
  static inline void
-@@ -91,7 +91,7 @@ deadline_del_rq_rb(struct deadline_data 
+@@ -91,7 +91,7 @@
        if (dd->next_rq[data_dir] == rq)
                dd->next_rq[data_dir] = deadline_latter_request(rq);
  
@@ -140073,7 +140047,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
  }
  
  /*
-@@ -106,7 +106,7 @@ deadline_add_request(struct request_queu
+@@ -106,7 +106,7 @@
        deadline_add_rq_rb(dd, rq);
  
        /*
@@ -140082,7 +140056,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
         */
        rq_set_fifo_time(rq, jiffies + dd->fifo_expire[data_dir]);
        list_add_tail(&rq->queuelist, &dd->fifo_list[data_dir]);
-@@ -162,7 +162,7 @@ static void deadline_merged_request(stru
+@@ -162,7 +162,7 @@
         * if the merge was a front merge, we need to reposition request
         */
        if (type == ELEVATOR_FRONT_MERGE) {
@@ -140091,7 +140065,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
                deadline_add_rq_rb(dd, req);
        }
  }
-@@ -212,7 +212,7 @@ deadline_move_request(struct deadline_da
+@@ -212,7 +212,7 @@
        dd->next_rq[WRITE] = NULL;
        dd->next_rq[data_dir] = deadline_latter_request(rq);
  
@@ -140100,7 +140074,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
  
        /*
         * take it off the sort and fifo list, move
-@@ -222,7 +222,7 @@ deadline_move_request(struct deadline_da
+@@ -222,7 +222,7 @@
  }
  
  /*
@@ -140109,7 +140083,7 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
   * 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir])
   */
  static inline int deadline_check_fifo(struct deadline_data *dd, int ddir)
-@@ -258,17 +258,9 @@ static int deadline_dispatch_requests(st
+@@ -258,17 +258,9 @@
        else
                rq = dd->next_rq[READ];
  
@@ -140130,9 +140104,9 @@ diff -purN linux-2.6.27/block/deadline-iosched.c linux-2.6.27.19-5.1/block/deadl
  
        /*
         * at this point we are not running a batch. select the appropriate
-diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
---- linux-2.6.27/block/elevator.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/elevator.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 block/elevator.c
+--- a/block/elevator.c Wed May 06 15:47:13 2009 +0100
++++ b/block/elevator.c Wed May 06 16:56:12 2009 +0100
 @@ -34,8 +34,9 @@
  #include <linux/delay.h>
  #include <linux/blktrace_api.h>
@@ -140144,20 +140118,20 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
  
  static DEFINE_SPINLOCK(elv_list_lock);
  static LIST_HEAD(elv_list);
-@@ -75,6 +76,12 @@ int elv_rq_merge_ok(struct request *rq, 
-               return 0;
-       /*
-+       * Don't merge file system requests and discard requests
-+       */
-+      if (bio_discard(bio) != bio_discard(rq->bio))
+@@ -72,6 +73,12 @@
+ int elv_rq_merge_ok(struct request *rq, struct bio *bio)
+ {
+       if (!rq_mergeable(rq))
 +              return 0;
 +
 +      /*
-        * different data direction or already started, don't merge
-        */
-       if (bio_data_dir(bio) != rq_data_dir(rq))
-@@ -438,6 +445,8 @@ void elv_dispatch_sort(struct request_qu
++       * Don't merge file system requests and discard requests
++       */
++      if (bio_discard(bio) != bio_discard(rq->bio))
+               return 0;
+       /*
+@@ -438,6 +445,8 @@
        list_for_each_prev(entry, &q->queue_head) {
                struct request *pos = list_entry_rq(entry);
  
@@ -140166,7 +140140,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                if (rq_data_dir(rq) != rq_data_dir(pos))
                        break;
                if (pos->cmd_flags & stop_flags)
-@@ -603,11 +612,11 @@ void elv_insert(struct request_queue *q,
+@@ -603,11 +612,11 @@
                 *   processing.
                 */
                blk_remove_plug(q);
@@ -140180,7 +140154,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                rq->cmd_flags |= REQ_SORTED;
                q->nr_sorted++;
                if (rq_mergeable(rq)) {
-@@ -692,7 +701,7 @@ void __elv_add_request(struct request_qu
+@@ -692,7 +701,7 @@
                 * this request is scheduling boundary, update
                 * end_sector
                 */
@@ -140189,7 +140163,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                        q->end_sector = rq_end_sector(rq);
                        q->boundary_rq = rq;
                }
-@@ -782,7 +791,6 @@ struct request *elv_next_request(struct 
+@@ -782,7 +791,6 @@
                         * device can handle
                         */
                        rq->nr_phys_segments++;
@@ -140197,7 +140171,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                }
  
                if (!q->prep_rq_fn)
-@@ -805,7 +813,6 @@ struct request *elv_next_request(struct 
+@@ -805,7 +813,6 @@
                                 * so that we don't add it again
                                 */
                                --rq->nr_phys_segments;
@@ -140205,7 +140179,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                        }
  
                        rq = NULL;
-@@ -838,7 +845,6 @@ void elv_dequeue_request(struct request_
+@@ -838,7 +845,6 @@
        if (blk_account_rq(rq))
                q->in_flight++;
  }
@@ -140213,7 +140187,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
  
  int elv_queue_empty(struct request_queue *q)
  {
-@@ -901,6 +907,19 @@ int elv_may_queue(struct request_queue *
+@@ -901,6 +907,19 @@
        return ELV_MQUEUE_MAY;
  }
  
@@ -140233,7 +140207,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
  void elv_completed_request(struct request_queue *q, struct request *rq)
  {
        elevator_t *e = q->elevator;
-@@ -924,7 +943,7 @@ void elv_completed_request(struct reques
+@@ -924,7 +943,7 @@
                    blk_ordered_cur_seq(q) == QUEUE_ORDSEQ_DRAIN &&
                    blk_ordered_req_seq(first_rq) > QUEUE_ORDSEQ_DRAIN) {
                        blk_ordered_complete_seq(q, QUEUE_ORDSEQ_DRAIN, 0);
@@ -140242,7 +140216,7 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                }
        }
  }
-@@ -1083,8 +1102,7 @@ static int elevator_switch(struct reques
+@@ -1083,8 +1102,7 @@
        elv_drain_elevator(q);
  
        while (q->rq.elvpriv) {
@@ -140252,10 +140226,10 @@ diff -purN linux-2.6.27/block/elevator.c linux-2.6.27.19-5.1/block/elevator.c
                spin_unlock_irq(q->queue_lock);
                msleep(10);
                spin_lock_irq(q->queue_lock);
-diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
---- linux-2.6.27/block/genhd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/genhd.c  2009-03-25 16:11:42.000000000 +0000
-@@ -173,6 +173,18 @@ static int exact_lock(dev_t devt, void *
+diff -r 9608d5473017 block/genhd.c
+--- a/block/genhd.c    Wed May 06 15:47:13 2009 +0100
++++ b/block/genhd.c    Wed May 06 16:56:12 2009 +0100
+@@ -173,6 +173,18 @@
        return 0;
  }
  
@@ -140274,7 +140248,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
  /**
   * add_disk - add partitioning information to kernel list
   * @disk: per-device partitioning information
-@@ -186,6 +198,8 @@ void add_disk(struct gendisk *disk)
+@@ -186,6 +198,8 @@
        int retval;
  
        disk->flags |= GENHD_FL_UP;
@@ -140283,7 +140257,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
        blk_register_region(MKDEV(disk->major, disk->first_minor),
                            disk->minors, NULL, exact_match, exact_lock, disk);
        register_disk(disk);
-@@ -211,10 +225,11 @@ void unlink_gendisk(struct gendisk *disk
+@@ -211,10 +225,11 @@
  
  /**
   * get_gendisk - get partitioning information for a given device
@@ -140297,7 +140271,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
   */
  struct gendisk *get_gendisk(dev_t devt, int *part)
  {
-@@ -428,7 +443,27 @@ static ssize_t disk_range_show(struct de
+@@ -428,7 +443,27 @@
  {
        struct gendisk *disk = dev_to_disk(dev);
  
@@ -140326,7 +140300,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
  }
  
  static ssize_t disk_removable_show(struct device *dev,
-@@ -518,7 +553,7 @@ static ssize_t disk_fail_store(struct de
+@@ -518,7 +553,7 @@
  
  #endif
  
@@ -140335,7 +140309,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
  static DEVICE_ATTR(removable, S_IRUGO, disk_removable_show, NULL);
  static DEVICE_ATTR(ro, S_IRUGO, disk_ro_show, NULL);
  static DEVICE_ATTR(size, S_IRUGO, disk_size_show, NULL);
-@@ -812,6 +847,16 @@ void put_disk(struct gendisk *disk)
+@@ -812,6 +847,16 @@
  
  EXPORT_SYMBOL(put_disk);
  
@@ -140352,7 +140326,7 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
  void set_device_ro(struct block_device *bdev, int flag)
  {
        if (bdev->bd_contains != bdev)
-@@ -825,6 +870,9 @@ EXPORT_SYMBOL(set_device_ro);
+@@ -825,6 +870,9 @@
  void set_disk_ro(struct gendisk *disk, int flag)
  {
        int i;
@@ -140362,13 +140336,15 @@ diff -purN linux-2.6.27/block/genhd.c linux-2.6.27.19-5.1/block/genhd.c
        disk->policy = flag;
        for (i = 0; i < disk->minors - 1; i++)
                if (disk->part[i]) disk->part[i]->policy = flag;
-diff -purN linux-2.6.27/block/ioctl.c linux-2.6.27.19-5.1/block/ioctl.c
---- linux-2.6.27/block/ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/ioctl.c  2009-03-25 16:11:42.000000000 +0000
-@@ -111,6 +111,69 @@ static int blkdev_reread_part(struct blo
+diff -r 9608d5473017 block/ioctl.c
+--- a/block/ioctl.c    Wed May 06 15:47:13 2009 +0100
++++ b/block/ioctl.c    Wed May 06 16:56:12 2009 +0100
+@@ -109,6 +109,69 @@
+       res = rescan_partitions(disk, bdev);
+       mutex_unlock(&bdev->bd_mutex);
        return res;
- }
++}
++
 +static void blk_ioc_discard_endio(struct bio *bio, int err)
 +{
 +      if (err) {
@@ -140430,12 +140406,10 @@ diff -purN linux-2.6.27/block/ioctl.c linux-2.6.27.19-5.1/block/ioctl.c
 +              bio_put(bio);
 +      }
 +      return ret;
-+}
-+
+ }
  static int put_ushort(unsigned long arg, unsigned short val)
- {
-       return put_user(val, (unsigned short __user *)arg);
-@@ -258,6 +321,19 @@ int blkdev_ioctl(struct inode *inode, st
+@@ -258,6 +321,19 @@
                set_device_ro(bdev, n);
                unlock_kernel();
                return 0;
@@ -140455,10 +140429,10 @@ diff -purN linux-2.6.27/block/ioctl.c linux-2.6.27.19-5.1/block/ioctl.c
        case HDIO_GETGEO: {
                struct hd_geometry geo;
  
-diff -purN linux-2.6.27/block/scsi_ioctl.c linux-2.6.27.19-5.1/block/scsi_ioctl.c
---- linux-2.6.27/block/scsi_ioctl.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/block/scsi_ioctl.c     2009-03-25 16:11:42.000000000 +0000
-@@ -208,6 +208,8 @@ static int blk_fill_sghdr_rq(struct requ
+diff -r 9608d5473017 block/scsi_ioctl.c
+--- a/block/scsi_ioctl.c       Wed May 06 15:47:13 2009 +0100
++++ b/block/scsi_ioctl.c       Wed May 06 16:56:12 2009 +0100
+@@ -208,6 +208,8 @@
                rq->timeout = q->sg_timeout;
        if (!rq->timeout)
                rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
@@ -140467,10 +140441,22 @@ diff -purN linux-2.6.27/block/scsi_ioctl.c linux-2.6.27.19-5.1/block/scsi_ioctl.
  
        return 0;
  }
-diff -purN linux-2.6.27/crypto/async_tx/async_xor.c linux-2.6.27.19-5.1/crypto/async_tx/async_xor.c
---- linux-2.6.27/crypto/async_tx/async_xor.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/async_tx/async_xor.c    2009-03-25 16:11:40.000000000 +0000
-@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, stru
+diff -r 9608d5473017 buildconfigs/Rules.mk
+--- a/buildconfigs/Rules.mk    Wed May 06 15:47:13 2009 +0100
++++ b/buildconfigs/Rules.mk    Wed May 06 16:56:12 2009 +0100
+@@ -2,7 +2,7 @@
+ XEN_TARGET_X86_PAE ?= y
+ LINUX_SERIES = 2.6
+-LINUX_VER    = 2.6.27
++LINUX_VER    = 2.6.27.19-5.1
+ EXTRAVERSION ?= xen
+diff -r 9608d5473017 crypto/async_tx/async_xor.c
+--- a/crypto/async_tx/async_xor.c      Wed May 06 15:47:13 2009 +0100
++++ b/crypto/async_tx/async_xor.c      Wed May 06 16:56:12 2009 +0100
+@@ -53,10 +53,17 @@
        int xor_src_cnt;
        dma_addr_t dma_dest;
  
@@ -140490,10 +140476,10 @@ diff -purN linux-2.6.27/crypto/async_tx/async_xor.c linux-2.6.27.19-5.1/crypto/a
  
        while (src_cnt) {
                async_flags = flags;
-diff -purN linux-2.6.27/crypto/authenc.c linux-2.6.27.19-5.1/crypto/authenc.c
---- linux-2.6.27/crypto/authenc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/authenc.c       2009-03-25 16:11:40.000000000 +0000
-@@ -157,16 +157,19 @@ static int crypto_authenc_genicv(struct 
+diff -r 9608d5473017 crypto/authenc.c
+--- a/crypto/authenc.c Wed May 06 15:47:13 2009 +0100
++++ b/crypto/authenc.c Wed May 06 16:56:12 2009 +0100
+@@ -157,16 +157,19 @@
        dstp = sg_page(dst);
        vdst = PageHighMem(dstp) ? NULL : page_address(dstp) + dst->offset;
  
@@ -140518,7 +140504,7 @@ diff -purN linux-2.6.27/crypto/authenc.c linux-2.6.27.19-5.1/crypto/authenc.c
                                 crypto_aead_authsize(authenc), 1);
        return 0;
  }
-@@ -284,11 +287,14 @@ static int crypto_authenc_iverify(struct
+@@ -284,11 +287,14 @@
        srcp = sg_page(src);
        vsrc = PageHighMem(srcp) ? NULL : page_address(srcp) + src->offset;
  
@@ -140537,10 +140523,10 @@ diff -purN linux-2.6.27/crypto/authenc.c linux-2.6.27.19-5.1/crypto/authenc.c
  }
  
  static int crypto_authenc_decrypt(struct aead_request *req)
-diff -purN linux-2.6.27/crypto/ccm.c linux-2.6.27.19-5.1/crypto/ccm.c
---- linux-2.6.27/crypto/ccm.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/crypto/ccm.c   2009-03-25 16:11:40.000000000 +0000
-@@ -266,6 +266,8 @@ static int crypto_ccm_auth(struct aead_r
+diff -r 9608d5473017 crypto/ccm.c
+--- a/crypto/ccm.c     Wed May 06 15:47:13 2009 +0100
++++ b/crypto/ccm.c     Wed May 06 16:56:12 2009 +0100
+@@ -266,6 +266,8 @@
        if (assoclen) {
                pctx->ilen = format_adata(idata, assoclen);
                get_data_to_compute(cipher, pctx, req->assoc, req->assoclen);
@@ -140549,20 +140535,20 @@ diff -purN linux-2.6.27/crypto/ccm.c linux-2.6.27.19-5.1/crypto/ccm.c
        }
  
        /* compute plaintext into mac */
-diff -purN linux-2.6.27/drivers/Kconfig linux-2.6.27.19-5.1/drivers/Kconfig
---- linux-2.6.27/drivers/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/Kconfig        2009-03-25 16:11:13.000000000 +0000
-@@ -101,4 +101,6 @@ source "drivers/auxdisplay/Kconfig"
+diff -r 9608d5473017 drivers/Kconfig
+--- a/drivers/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/Kconfig  Wed May 06 16:56:12 2009 +0100
+@@ -101,4 +101,6 @@
  source "drivers/uio/Kconfig"
  
  source "drivers/xen/Kconfig"
 +
 +source "drivers/staging/Kconfig"
  endmenu
-diff -purN linux-2.6.27/drivers/Makefile linux-2.6.27.19-5.1/drivers/Makefile
---- linux-2.6.27/drivers/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/Makefile       2009-03-25 16:11:20.000000000 +0000
-@@ -16,7 +16,7 @@ obj-$(CONFIG_ACPI)           += acpi/
+diff -r 9608d5473017 drivers/Makefile
+--- a/drivers/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/Makefile Wed May 06 16:56:12 2009 +0100
+@@ -16,7 +16,7 @@
  obj-$(CONFIG_PNP)             += pnp/
  obj-$(CONFIG_ARM_AMBA)                += amba/
  
@@ -140571,7 +140557,7 @@ diff -purN linux-2.6.27/drivers/Makefile linux-2.6.27.19-5.1/drivers/Makefile
  
  # char/ comes before serial/ etc so that the VT console is the boot-time
  # default.
-@@ -37,9 +37,10 @@ obj-y                               += base/ block/ misc/ mfd/ net/
+@@ -37,9 +37,10 @@
  obj-$(CONFIG_NUBUS)           += nubus/
  obj-$(CONFIG_ATM)             += atm/
  obj-y                         += macintosh/
@@ -140583,15 +140569,15 @@ diff -purN linux-2.6.27/drivers/Makefile linux-2.6.27.19-5.1/drivers/Makefile
  obj-$(CONFIG_FUSION)          += message/
  obj-$(CONFIG_FIREWIRE)                += firewire/
  obj-y                         += ieee1394/
-@@ -99,3 +100,4 @@ obj-$(CONFIG_OF)            += of/
+@@ -99,3 +100,4 @@
  obj-$(CONFIG_SSB)             += ssb/
  obj-$(CONFIG_VIRTIO)          += virtio/
  obj-$(CONFIG_REGULATOR)               += regulator/
 +obj-$(CONFIG_STAGING)         += staging/
-diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kconfig
---- linux-2.6.27/drivers/acpi/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/Kconfig   2009-03-25 16:11:24.000000000 +0000
-@@ -162,14 +162,6 @@ config ACPI_DOCK
+diff -r 9608d5473017 drivers/acpi/Kconfig
+--- a/drivers/acpi/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/Kconfig     Wed May 06 16:56:12 2009 +0100
+@@ -162,14 +162,6 @@
        help
          This driver adds support for ACPI controlled docking stations
  
@@ -140606,7 +140592,7 @@ diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kc
  config ACPI_PROCESSOR
        tristate "Processor"
        select THERMAL
-@@ -301,6 +293,17 @@ config ACPI_CUSTOM_DSDT
+@@ -301,6 +293,17 @@
        bool
        default ACPI_CUSTOM_DSDT_FILE != ""
  
@@ -140624,7 +140610,7 @@ diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kc
  config ACPI_BLACKLIST_YEAR
        int "Disable ACPI for systems before Jan 1st this year" if X86_32
        default 0
-@@ -359,6 +362,7 @@ config ACPI_SYSTEM
+@@ -359,6 +362,7 @@
  config X86_PM_TIMER
        bool "Power Management Timer Support" if EMBEDDED
        depends on X86
@@ -140632,7 +140618,7 @@ diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kc
        default y
        help
          The Power Management Timer is available on all ACPI-capable,
-@@ -412,4 +416,13 @@ config ACPI_SBS
+@@ -412,4 +416,13 @@
          This driver adds support for the Smart Battery System, another
          type of access to battery information, found on some laptops.
  
@@ -140646,10 +140632,10 @@ diff -purN linux-2.6.27/drivers/acpi/Kconfig linux-2.6.27.19-5.1/drivers/acpi/Kc
 +      depends on (X86 || IA64) && XEN
 +      default y
  endif # ACPI
-diff -purN linux-2.6.27/drivers/acpi/Makefile linux-2.6.27.19-5.1/drivers/acpi/Makefile
---- linux-2.6.27/drivers/acpi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/Makefile  2009-03-25 16:11:24.000000000 +0000
-@@ -34,6 +34,9 @@ processor-objs       += processor_core.o proce
+diff -r 9608d5473017 drivers/acpi/Makefile
+--- a/drivers/acpi/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/Makefile    Wed May 06 16:56:12 2009 +0100
+@@ -34,6 +34,9 @@
  ifdef CONFIG_CPU_FREQ
  processor-objs        += processor_perflib.o
  endif
@@ -140659,7 +140645,7 @@ diff -purN linux-2.6.27/drivers/acpi/Makefile linux-2.6.27.19-5.1/drivers/acpi/M
  
  obj-y                         += sleep/
  obj-y                         += bus.o glue.o
-@@ -45,8 +48,12 @@ obj-$(CONFIG_ACPI_BATTERY)  += battery.o
+@@ -45,8 +48,12 @@
  obj-$(CONFIG_ACPI_BUTTON)     += button.o
  obj-$(CONFIG_ACPI_FAN)                += fan.o
  obj-$(CONFIG_ACPI_DOCK)               += dock.o
@@ -140673,10 +140659,10 @@ diff -purN linux-2.6.27/drivers/acpi/Makefile linux-2.6.27.19-5.1/drivers/acpi/M
  obj-y                         += pci_root.o pci_link.o pci_irq.o pci_bind.o
  obj-$(CONFIG_ACPI_PCI_SLOT)   += pci_slot.o
  obj-$(CONFIG_ACPI_POWER)      += power.o
-diff -purN linux-2.6.27/drivers/acpi/ac.c linux-2.6.27.19-5.1/drivers/acpi/ac.c
---- linux-2.6.27/drivers/acpi/ac.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/ac.c      2009-03-25 16:11:24.000000000 +0000
-@@ -85,7 +85,7 @@ struct acpi_ac {
+diff -r 9608d5473017 drivers/acpi/ac.c
+--- a/drivers/acpi/ac.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/ac.c        Wed May 06 16:56:12 2009 +0100
+@@ -85,7 +85,7 @@
        struct power_supply charger;
  #endif
        struct acpi_device * device;
@@ -140685,10 +140671,10 @@ diff -purN linux-2.6.27/drivers/acpi/ac.c linux-2.6.27.19-5.1/drivers/acpi/ac.c
  };
  
  #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
-diff -purN linux-2.6.27/drivers/acpi/acpi_memhotplug.c linux-2.6.27.19-5.1/drivers/acpi/acpi_memhotplug.c
---- linux-2.6.27/drivers/acpi/acpi_memhotplug.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/acpi_memhotplug.c 2009-03-25 16:11:24.000000000 +0000
-@@ -194,8 +194,7 @@ acpi_memory_get_device(acpi_handle handl
+diff -r 9608d5473017 drivers/acpi/acpi_memhotplug.c
+--- a/drivers/acpi/acpi_memhotplug.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/acpi_memhotplug.c   Wed May 06 16:56:12 2009 +0100
+@@ -194,8 +194,7 @@
  
  static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
  {
@@ -140698,7 +140684,7 @@ diff -purN linux-2.6.27/drivers/acpi/acpi_memhotplug.c linux-2.6.27.19-5.1/drive
  
        /* Get device present/absent information from the _STA */
        if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA",
-@@ -264,7 +263,7 @@ static int acpi_memory_powerdown_device(
+@@ -264,7 +263,7 @@
        acpi_status status;
        struct acpi_object_list arg_list;
        union acpi_object arg;
@@ -140707,10 +140693,10 @@ diff -purN linux-2.6.27/drivers/acpi/acpi_memhotplug.c linux-2.6.27.19-5.1/drive
  
  
        /* Issue the _EJ0 command */
-diff -purN linux-2.6.27/drivers/acpi/asus_acpi.c linux-2.6.27.19-5.1/drivers/acpi/asus_acpi.c
---- linux-2.6.27/drivers/acpi/asus_acpi.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/asus_acpi.c       2009-03-25 16:11:24.000000000 +0000
-@@ -753,7 +753,7 @@ static int get_lcd_state(void)
+diff -r 9608d5473017 drivers/acpi/asus_acpi.c
+--- a/drivers/acpi/asus_acpi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/asus_acpi.c Wed May 06 16:56:12 2009 +0100
+@@ -753,7 +753,7 @@
                        /* That's what the AML code does */
                        lcd = out_obj.integer.value >> 8;
        } else if (hotk->model == F3Sa) {
@@ -140719,7 +140705,7 @@ diff -purN linux-2.6.27/drivers/acpi/asus_acpi.c linux-2.6.27.19-5.1/drivers/acp
                union acpi_object param;
                struct acpi_object_list input;
                acpi_status status;
-@@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void)
+@@ -1244,6 +1244,8 @@
                               "default values\n", string);
                        printk(KERN_NOTICE
                               "  send /proc/acpi/dsdt to the developers\n");
@@ -140728,10 +140714,10 @@ diff -purN linux-2.6.27/drivers/acpi/asus_acpi.c linux-2.6.27.19-5.1/drivers/acp
                }
                hotk->methods = &model_conf[hotk->model];
                return AE_OK;
-diff -purN linux-2.6.27/drivers/acpi/battery.c linux-2.6.27.19-5.1/drivers/acpi/battery.c
---- linux-2.6.27/drivers/acpi/battery.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/battery.c 2009-03-25 16:11:24.000000000 +0000
-@@ -472,7 +472,7 @@ static void sysfs_remove_battery(struct 
+diff -r 9608d5473017 drivers/acpi/battery.c
+--- a/drivers/acpi/battery.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/battery.c   Wed May 06 16:56:12 2009 +0100
+@@ -472,7 +472,7 @@
  
  static int acpi_battery_update(struct acpi_battery *battery)
  {
@@ -140740,7 +140726,7 @@ diff -purN linux-2.6.27/drivers/acpi/battery.c linux-2.6.27.19-5.1/drivers/acpi/
        result = acpi_battery_get_status(battery);
        if (result)
                return result;
-@@ -483,7 +483,8 @@ static int acpi_battery_update(struct ac
+@@ -483,7 +483,8 @@
                return 0;
        }
  #endif
@@ -140750,9 +140736,9 @@ diff -purN linux-2.6.27/drivers/acpi/battery.c linux-2.6.27.19-5.1/drivers/acpi/
                result = acpi_battery_get_info(battery);
                if (result)
                        return result;
-diff -purN linux-2.6.27/drivers/acpi/bay.c linux-2.6.27.19-5.1/drivers/acpi/bay.c
---- linux-2.6.27/drivers/acpi/bay.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/bay.c     1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 drivers/acpi/bay.c
+--- a/drivers/acpi/bay.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/bay.c       Wed May 06 16:56:13 2009 +0100
 @@ -1,411 +0,0 @@
 -/*
 - *  bay.c - ACPI removable drive bay driver
@@ -141165,10 +141151,10 @@ diff -purN linux-2.6.27/drivers/acpi/bay.c linux-2.6.27.19-5.1/drivers/acpi/bay.
 -postcore_initcall(bay_init);
 -module_exit(bay_exit);
 -
-diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.c
---- linux-2.6.27/drivers/acpi/bus.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/bus.c     2009-03-25 16:11:24.000000000 +0000
-@@ -77,7 +77,7 @@ EXPORT_SYMBOL(acpi_bus_get_device);
+diff -r 9608d5473017 drivers/acpi/bus.c
+--- a/drivers/acpi/bus.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/bus.c       Wed May 06 16:56:13 2009 +0100
+@@ -77,7 +77,7 @@
  int acpi_bus_get_status(struct acpi_device *device)
  {
        acpi_status status = AE_OK;
@@ -141177,7 +141163,7 @@ diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.
  
  
        if (!device)
-@@ -95,21 +95,21 @@ int acpi_bus_get_status(struct acpi_devi
+@@ -95,21 +95,21 @@
        }
  
        /*
@@ -141207,7 +141193,7 @@ diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.
        }
  
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n",
-@@ -155,7 +155,7 @@ int acpi_bus_get_power(acpi_handle handl
+@@ -155,7 +155,7 @@
        int result = 0;
        acpi_status status = 0;
        struct acpi_device *device = NULL;
@@ -141216,7 +141202,7 @@ diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.
  
  
        result = acpi_bus_get_device(handle, &device);
-@@ -496,6 +496,19 @@ static int acpi_bus_check_scope(struct a
+@@ -496,6 +496,19 @@
        return 0;
  }
  
@@ -141236,7 +141222,7 @@ diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.
  /**
   * acpi_bus_notify
   * ---------------
-@@ -506,6 +519,8 @@ static void acpi_bus_notify(acpi_handle 
+@@ -506,6 +519,8 @@
        int result = 0;
        struct acpi_device *device = NULL;
  
@@ -141245,10 +141231,10 @@ diff -purN linux-2.6.27/drivers/acpi/bus.c linux-2.6.27.19-5.1/drivers/acpi/bus.
  
        if (acpi_bus_get_device(handle, &device))
                return;
-diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/button.c
---- linux-2.6.27/drivers/acpi/button.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/button.c  2009-03-25 16:11:24.000000000 +0000
-@@ -145,7 +145,7 @@ static int acpi_button_state_seq_show(st
+diff -r 9608d5473017 drivers/acpi/button.c
+--- a/drivers/acpi/button.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/button.c    Wed May 06 16:56:13 2009 +0100
+@@ -145,7 +145,7 @@
  {
        struct acpi_button *button = seq->private;
        acpi_status status;
@@ -141257,7 +141243,7 @@ diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/b
  
        if (!button || !button->device)
                return 0;
-@@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct 
+@@ -253,7 +253,7 @@
     -------------------------------------------------------------------------- */
  static int acpi_lid_send_state(struct acpi_button *button)
  {
@@ -141266,7 +141252,7 @@ diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/b
        acpi_status status;
  
        status = acpi_evaluate_integer(button->device->handle, "_LID", NULL,
-@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct ac
+@@ -262,6 +262,7 @@
                return -ENODEV;
        /* input layer checks if event is redundant */
        input_report_switch(button->input, SW_LID, !state);
@@ -141274,7 +141260,7 @@ diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/b
        return 0;
  }
  
-@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_hand
+@@ -285,8 +286,8 @@
                        input_report_key(input, keycode, 1);
                        input_sync(input);
                        input_report_key(input, keycode, 0);
@@ -141284,10 +141270,10 @@ diff -purN linux-2.6.27/drivers/acpi/button.c linux-2.6.27.19-5.1/drivers/acpi/b
  
                acpi_bus_generate_proc_event(button->device, event,
                                        ++button->pushed);
-diff -purN linux-2.6.27/drivers/acpi/container.c linux-2.6.27.19-5.1/drivers/acpi/container.c
---- linux-2.6.27/drivers/acpi/container.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/container.c       2009-03-25 16:11:24.000000000 +0000
-@@ -76,7 +76,7 @@ static int is_device_present(acpi_handle
+diff -r 9608d5473017 drivers/acpi/container.c
+--- a/drivers/acpi/container.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/container.c Wed May 06 16:56:13 2009 +0100
+@@ -76,7 +76,7 @@
  {
        acpi_handle temp;
        acpi_status status;
@@ -141296,10 +141282,10 @@ diff -purN linux-2.6.27/drivers/acpi/container.c linux-2.6.27.19-5.1/drivers/acp
  
  
        status = acpi_get_handle(handle, "_STA", &temp);
-diff -purN linux-2.6.27/drivers/acpi/dispatcher/dsmethod.c linux-2.6.27.19-5.1/drivers/acpi/dispatcher/dsmethod.c
---- linux-2.6.27/drivers/acpi/dispatcher/dsmethod.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/dispatcher/dsmethod.c     2009-03-25 16:11:24.000000000 +0000
-@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status,
+diff -r 9608d5473017 drivers/acpi/dispatcher/dsmethod.c
+--- a/drivers/acpi/dispatcher/dsmethod.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/dispatcher/dsmethod.c       Wed May 06 16:56:13 2009 +0100
+@@ -103,6 +103,9 @@
                                                    NULL);
                acpi_ex_enter_interpreter();
        }
@@ -141309,10 +141295,10 @@ diff -purN linux-2.6.27/drivers/acpi/dispatcher/dsmethod.c linux-2.6.27.19-5.1/d
  #ifdef ACPI_DISASSEMBLER
        if (ACPI_FAILURE(status)) {
  
-diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/dock.c
---- linux-2.6.27/drivers/acpi/dock.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/dock.c    2009-03-25 16:11:24.000000000 +0000
-@@ -48,7 +48,6 @@ MODULE_PARM_DESC(immediate_undock, "1 (d
+diff -r 9608d5473017 drivers/acpi/dock.c
+--- a/drivers/acpi/dock.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/dock.c      Wed May 06 16:56:13 2009 +0100
+@@ -48,7 +48,6 @@
        " before undocking");
  
  static struct atomic_notifier_head dock_notifier_list;
@@ -141320,7 +141306,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  static char dock_device_name[] = "dock";
  
  static const struct acpi_device_id dock_device_ids[] = {
-@@ -65,23 +64,29 @@ struct dock_station {
+@@ -65,22 +64,28 @@
        struct mutex hp_lock;
        struct list_head dependent_devices;
        struct list_head hotplug_devices;
@@ -141347,13 +141333,12 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 +#define DOCK_IS_BAT   0x00000040
  #define DOCK_EVENT    3
  #define UNDOCK_EVENT  2
--static struct dock_station *dock_station;
 -
+-static struct dock_station *dock_station;
  /*****************************************************************************
   *                         Dock Dependent device functions                   *
-  *****************************************************************************/
-@@ -199,6 +204,60 @@ static int is_dock(acpi_handle handle)
+@@ -199,6 +204,60 @@
        return 1;
  }
  
@@ -141414,7 +141399,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  /**
   * is_dock_device - see if a device is on a dock station
   * @handle: acpi handle of the device
-@@ -209,11 +268,17 @@ static int is_dock(acpi_handle handle)
+@@ -209,11 +268,17 @@
   */
  int is_dock_device(acpi_handle handle)
  {
@@ -141434,7 +141419,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        return 0;
  }
-@@ -229,7 +294,7 @@ EXPORT_SYMBOL_GPL(is_dock_device);
+@@ -229,7 +294,7 @@
   */
  static int dock_present(struct dock_station *ds)
  {
@@ -141443,7 +141428,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        acpi_status status;
  
        if (ds) {
-@@ -320,8 +385,8 @@ static void hotplug_dock_devices(struct 
+@@ -320,8 +385,8 @@
         * First call driver specific hotplug functions
         */
        list_for_each_entry(dd, &ds->hotplug_devices, hotplug_list) {
@@ -141454,7 +141439,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        }
  
        /*
-@@ -341,9 +406,10 @@ static void hotplug_dock_devices(struct 
+@@ -341,9 +406,10 @@
  
  static void dock_event(struct dock_station *ds, u32 event, int num)
  {
@@ -141466,7 +141451,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        if (num == UNDOCK_EVENT)
                sprintf(event_string, "EVENT=undock");
-@@ -354,7 +420,14 @@ static void dock_event(struct dock_stati
+@@ -354,7 +420,14 @@
         * Indicate that the status of the dock station has
         * changed.
         */
@@ -141482,7 +141467,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  }
  
  /**
-@@ -414,9 +487,9 @@ static void handle_dock(struct dock_stat
+@@ -414,9 +487,9 @@
        arg.type = ACPI_TYPE_INTEGER;
        arg.integer.value = dock;
        status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
@@ -141495,7 +141480,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        kfree(buffer.pointer);
        kfree(name_buffer.pointer);
  }
-@@ -452,6 +525,25 @@ static inline void complete_undock(struc
+@@ -452,6 +525,25 @@
        ds->flags &= ~(DOCK_UNDOCKING);
  }
  
@@ -141521,7 +141506,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  /**
   * dock_in_progress - see if we are in the middle of handling a dock event
   * @ds: the dock station
-@@ -479,7 +571,7 @@ static int dock_in_progress(struct dock_
+@@ -479,7 +571,7 @@
   */
  int register_dock_notifier(struct notifier_block *nb)
  {
@@ -141530,7 +141515,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
                return -ENODEV;
  
        return atomic_notifier_chain_register(&dock_notifier_list, nb);
-@@ -493,7 +585,7 @@ EXPORT_SYMBOL_GPL(register_dock_notifier
+@@ -493,7 +585,7 @@
   */
  void unregister_dock_notifier(struct notifier_block *nb)
  {
@@ -141539,7 +141524,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
                return;
  
        atomic_notifier_chain_unregister(&dock_notifier_list, nb);
-@@ -504,7 +596,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
+@@ -504,7 +596,7 @@
  /**
   * register_hotplug_dock_device - register a hotplug function
   * @handle: the handle of the device
@@ -141548,7 +141533,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
   * @context: device specific data
   *
   * If a driver would like to perform a hotplug operation after a dock
-@@ -512,27 +604,36 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
+@@ -512,27 +604,36 @@
   * the dock driver after _DCK is executed.
   */
  int
@@ -141594,7 +141579,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  }
  
  EXPORT_SYMBOL_GPL(register_hotplug_dock_device);
-@@ -544,13 +645,16 @@ EXPORT_SYMBOL_GPL(register_hotplug_dock_
+@@ -544,13 +645,16 @@
  void unregister_hotplug_dock_device(acpi_handle handle)
  {
        struct dock_dependent_device *dd;
@@ -141615,7 +141600,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  }
  
  EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
-@@ -575,13 +679,9 @@ static int handle_eject_request(struct d
+@@ -575,13 +679,9 @@
         */
        dock_event(ds, event, UNDOCK_EVENT);
  
@@ -141630,13 +141615,13 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        eject_dock(ds);
        if (dock_present(ds)) {
                printk(KERN_ERR PREFIX "Unable to undock!\n");
-@@ -604,14 +704,36 @@ static int handle_eject_request(struct d
+@@ -604,14 +704,36 @@
  static void dock_notify(acpi_handle handle, u32 event, void *data)
  {
        struct dock_station *ds = data;
 +      struct acpi_device *tmp;
 +      int surprise_removal = 0;
-+
 +      /*
 +       * According to acpi spec 3.0a, if a DEVICE_CHECK notification
 +       * is sent and _DCK is present, it is assumed to mean an undock
@@ -141644,7 +141629,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 +       */
 +      if ((ds->flags & DOCK_IS_DOCK) && event == ACPI_NOTIFY_DEVICE_CHECK)
 +              event = ACPI_NOTIFY_EJECT_REQUEST;
++
 +      /*
 +       * dock station: BUS_CHECK - docked or surprise removal
 +       *               DEVICE_CHECK - undocked
@@ -141668,7 +141653,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
                                break;
                        }
                        atomic_notifier_call_chain(&dock_notifier_list,
-@@ -619,20 +741,19 @@ static void dock_notify(acpi_handle hand
+@@ -619,20 +741,19 @@
                        hotplug_dock_devices(ds, event);
                        complete_dock(ds);
                        dock_event(ds, event, DOCK_EVENT);
@@ -141699,10 +141684,11 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
                        handle_eject_request(ds, event);
                else
                        dock_event(ds, event, UNDOCK_EVENT);
-@@ -642,6 +763,51 @@ static void dock_notify(acpi_handle hand
+@@ -641,6 +762,51 @@
+               printk(KERN_ERR PREFIX "Unknown dock event %d\n", event);
        }
  }
++
 +struct dock_data {
 +      acpi_handle handle;
 +      unsigned long event;
@@ -141747,11 +141733,10 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 +static struct notifier_block dock_acpi_notifier = {
 +      .notifier_call = acpi_dock_notifier_call,
 +};
-+
  /**
   * find_dock_devices - find devices on the dock station
-  * @handle: the handle of the device we are examining
-@@ -688,8 +854,14 @@ fdd_out:
+@@ -688,8 +854,14 @@
  static ssize_t show_docked(struct device *dev,
                           struct device_attribute *attr, char *buf)
  {
@@ -141767,7 +141752,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  }
  static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);
  
-@@ -699,6 +871,8 @@ static DEVICE_ATTR(docked, S_IRUGO, show
+@@ -699,6 +871,8 @@
  static ssize_t show_flags(struct device *dev,
                          struct device_attribute *attr, char *buf)
  {
@@ -141776,7 +141761,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
  
  }
-@@ -711,6 +885,8 @@ static ssize_t write_undock(struct devic
+@@ -711,6 +885,8 @@
                           const char *buf, size_t count)
  {
        int ret;
@@ -141785,7 +141770,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        if (!count)
                return -EINVAL;
-@@ -727,16 +903,38 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL
+@@ -727,15 +903,37 @@
  static ssize_t show_dock_uid(struct device *dev,
                             struct device_attribute *attr, char *buf)
  {
@@ -141802,7 +141787,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 +      return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
  }
  static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
++
 +static ssize_t show_dock_type(struct device *dev,
 +              struct device_attribute *attr, char *buf)
 +{
@@ -141822,11 +141807,10 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 +      return snprintf(buf, PAGE_SIZE, "%s\n", type);
 +}
 +static DEVICE_ATTR(type, S_IRUGO, show_dock_type, NULL);
-+
  /**
   * dock_add - add a new dock station
-  * @handle: the dock station handle
-@@ -747,8 +945,9 @@ static DEVICE_ATTR(uid, S_IRUGO, show_do
+@@ -747,8 +945,9 @@
  static int dock_add(acpi_handle handle)
  {
        int ret;
@@ -141837,7 +141821,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        /* allocate & initialize the dock_station private data */
        dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL);
-@@ -758,22 +957,34 @@ static int dock_add(acpi_handle handle)
+@@ -758,21 +957,33 @@
        dock_station->last_dock_time = jiffies - HZ;
        INIT_LIST_HEAD(&dock_station->dependent_devices);
        INIT_LIST_HEAD(&dock_station->hotplug_devices);
@@ -141863,18 +141847,17 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        /* we want the dock device to send uevents */
        dock_device->dev.uevent_suppress = 0;
++
 +      if (is_dock(handle))
 +              dock_station->flags |= DOCK_IS_DOCK;
 +      if (is_ata(handle))
 +              dock_station->flags |= DOCK_IS_ATA;
 +      if (is_battery(handle))
 +              dock_station->flags |= DOCK_IS_BAT;
-+
        ret = device_create_file(&dock_device->dev, &dev_attr_docked);
        if (ret) {
-               printk("Error %d adding sysfs file\n", ret);
-@@ -812,6 +1023,9 @@ static int dock_add(acpi_handle handle)
+@@ -812,6 +1023,9 @@
                dock_station = NULL;
                return ret;
        }
@@ -141884,7 +141867,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
  
        /* Find dependent devices */
        acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-@@ -828,24 +1042,12 @@ static int dock_add(acpi_handle handle)
+@@ -828,24 +1042,12 @@
        }
        add_dock_dependent_device(dock_station, dd);
  
@@ -141912,7 +141895,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        device_remove_file(&dock_device->dev, &dev_attr_docked);
        device_remove_file(&dock_device->dev, &dev_attr_undock);
        device_remove_file(&dock_device->dev, &dev_attr_uid);
-@@ -859,12 +1061,12 @@ dock_add_err_unregister:
+@@ -859,12 +1061,12 @@
  /**
   * dock_remove - free up resources related to the dock station
   */
@@ -141928,7 +141911,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
                return 0;
  
        /* remove dependent devices */
-@@ -872,14 +1074,8 @@ static int dock_remove(void)
+@@ -872,14 +1074,8 @@
                                 list)
            kfree(dd);
  
@@ -141944,7 +141927,7 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        device_remove_file(&dock_device->dev, &dev_attr_docked);
        device_remove_file(&dock_device->dev, &dev_attr_undock);
        device_remove_file(&dock_device->dev, &dev_attr_uid);
-@@ -904,41 +1100,60 @@ static int dock_remove(void)
+@@ -904,41 +1100,60 @@
  static acpi_status
  find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
@@ -141960,21 +141943,21 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
        return status;
  }
  
--static int __init dock_init(void)
 +static acpi_status
 +find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
- {
--      int num = 0;
--
--      dock_station = NULL;
++{
 +      /* If bay is a dock, it's already handled */
 +      if (is_ejectable_bay(handle) && !is_dock(handle))
 +              dock_add(handle);
 +      return AE_OK;
 +}
-+static int __init dock_init(void)
-+{
++
+ static int __init dock_init(void)
+ {
+-      int num = 0;
+-
+-      dock_station = NULL;
+-
        if (acpi_disabled)
                return 0;
  
@@ -142016,9 +141999,9 @@ diff -purN linux-2.6.27/drivers/acpi/dock.c linux-2.6.27.19-5.1/drivers/acpi/doc
 + */
 +subsys_initcall(dock_init);
  module_exit(dock_exit);
-diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
---- linux-2.6.27/drivers/acpi/ec.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/ec.c      2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/ec.c
+--- a/drivers/acpi/ec.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/ec.c        Wed May 06 16:56:13 2009 +0100
 @@ -1,7 +1,7 @@
  /*
 - *  ec.c - ACPI Embedded Controller Driver (v2.0)
@@ -142046,7 +142029,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  #include <asm/io.h>
  #include <acpi/acpi_bus.h>
  #include <acpi/acpi_drivers.h>
-@@ -65,22 +66,21 @@ enum ec_command {
+@@ -65,22 +66,21 @@
        ACPI_EC_COMMAND_QUERY = 0x84,
  };
  
@@ -142077,7 +142060,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  };
  
  /* If we find an EC via the ECDT, we need to keep a ptr to its context */
-@@ -95,6 +95,18 @@ struct acpi_ec_query_handler {
+@@ -95,6 +95,18 @@
        u8 query_bit;
  };
  
@@ -142096,7 +142079,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  static struct acpi_ec {
        acpi_handle handle;
        unsigned long gpe;
-@@ -105,11 +117,12 @@ static struct acpi_ec {
+@@ -105,10 +117,11 @@
        struct mutex lock;
        wait_queue_head_t wait;
        struct list_head list;
@@ -142106,13 +142089,12 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +      struct transaction *curr;
 +      spinlock_t curr_lock;
  } *boot_ec, *first_ec;
-+int acpi_ec_intr = 1; /* Default is interrupt mode */
 +
++int acpi_ec_intr = 1; /* Default is interrupt mode */
  /* 
   * Some Asus system have exchanged ECDT data/command IO addresses.
-  */
-@@ -150,7 +163,7 @@ static inline u8 acpi_ec_read_data(struc
+@@ -150,7 +163,7 @@
  {
        u8 x = inb(ec->data_addr);
        pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
@@ -142121,7 +142103,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  }
  
  static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
-@@ -165,158 +178,193 @@ static inline void acpi_ec_write_data(st
+@@ -165,158 +178,193 @@
        outb(data, ec->data_addr);
  }
  
@@ -142129,14 +142111,6 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +static int ec_transaction_done(struct acpi_ec *ec)
  {
 -      if (test_bit(EC_FLAGS_WAIT_GPE, &ec->flags))
--              return 0;
--      if (event == ACPI_EC_EVENT_OBF_1) {
--              if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
--                      return 1;
--      } else if (event == ACPI_EC_EVENT_IBF_0) {
--              if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
--                      return 1;
--      }
 +      unsigned long flags;
 +      int ret = 0;
 +      spin_lock_irqsave(&ec->curr_lock, flags);
@@ -142145,21 +142119,16 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +      spin_unlock_irqrestore(&ec->curr_lock, flags);
 +      return ret;
 +}
--      return 0;
++
 +static void start_transaction(struct acpi_ec *ec)
 +{
 +      ec->curr->irq_count = ec->curr->wi = ec->curr->ri = 0;
 +      ec->curr->done = false;
 +      acpi_ec_write_cmd(ec, ec->curr->command);
- }
--static void ec_schedule_ec_poll(struct acpi_ec *ec)
++}
++
 +static void gpe_transaction(struct acpi_ec *ec, u8 status)
- {
--      if (test_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags))
--              schedule_delayed_work(&ec->work,
--                                    msecs_to_jiffies(ACPI_EC_DELAY));
++{
 +      unsigned long flags;
 +      spin_lock_irqsave(&ec->curr_lock, flags);
 +      if (!ec->curr)
@@ -142187,14 +142156,19 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +              ++ec->curr->irq_count;
 +unlock:
 +      spin_unlock_irqrestore(&ec->curr_lock, flags);
- }
--static void ec_switch_to_poll_mode(struct acpi_ec *ec)
++}
++
 +static int acpi_ec_wait(struct acpi_ec *ec)
- {
++{
 +      if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
 +                             msecs_to_jiffies(ACPI_EC_DELAY)))
-+              return 0;
+               return 0;
+-      if (event == ACPI_EC_EVENT_OBF_1) {
+-              if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
+-                      return 1;
+-      } else if (event == ACPI_EC_EVENT_IBF_0) {
+-              if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
+-                      return 1;
 +      /* try restart command if we get any false interrupts */
 +      if (ec->curr->irq_count &&
 +          (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) {
@@ -142203,23 +142177,46 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +              if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
 +                                      msecs_to_jiffies(ACPI_EC_DELAY)))
 +                      return 0;
-+      }
+       }
 +      /* missing GPEs, switch back to poll mode */
 +      if (printk_ratelimit())
 +              pr_info(PREFIX "missing confirmations, "
 +                              "switch off interrupt mode.\n");
-       set_bit(EC_FLAGS_NO_GPE, &ec->flags);
-       clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
--      acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
--      set_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags);
++      set_bit(EC_FLAGS_NO_GPE, &ec->flags);
++      clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 +      return 1;
- }
++}
  
--static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
 +static void acpi_ec_gpe_query(void *ec_cxt);
 +
 +static int ec_check_sci(struct acpi_ec *ec, u8 state)
++{
++      if (state & ACPI_EC_FLAG_SCI) {
++              if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
++                      return acpi_os_execute(OSL_EC_BURST_HANDLER,
++                              acpi_ec_gpe_query, ec);
++      }
+       return 0;
+ }
+-static void ec_schedule_ec_poll(struct acpi_ec *ec)
++static int ec_poll(struct acpi_ec *ec)
  {
+-      if (test_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags))
+-              schedule_delayed_work(&ec->work,
+-                                    msecs_to_jiffies(ACPI_EC_DELAY));
+-}
+-
+-static void ec_switch_to_poll_mode(struct acpi_ec *ec)
+-{
+-      set_bit(EC_FLAGS_NO_GPE, &ec->flags);
+-      clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+-      acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
+-      set_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags);
+-}
+-
+-static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
+-{
 -      atomic_set(&ec->irq_count, 0);
 -      if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
 -          likely(!force_poll)) {
@@ -142245,16 +142242,6 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 -                      msleep(1);
 -              }
 -              if (acpi_ec_check_status(ec,event))
-+      if (state & ACPI_EC_FLAG_SCI) {
-+              if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
-+                      return acpi_os_execute(OSL_EC_BURST_HANDLER,
-+                              acpi_ec_gpe_query, ec);
-+      }
-+      return 0;
-+}
-+
-+static int ec_poll(struct acpi_ec *ec)
-+{
 +      unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
 +      udelay(ACPI_EC_UDELAY);
 +      while (time_before(jiffies, delay)) {
@@ -142295,14 +142282,34 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +      if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) {
 +              clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 +              acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
-+      }
+       }
+-
+-      if (!rdata_len) {
+-              result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
+-              if (result) {
+-                      pr_err(PREFIX
+-                             "finish-write timeout, command = %d\n", command);
+-                      goto end;
+-              }
+-      } else if (command == ACPI_EC_COMMAND_QUERY)
 +      /* start transaction */
 +      spin_lock_irqsave(&ec->curr_lock, tmp);
 +      /* following two actions should be kept atomic */
 +      ec->curr = t;
 +      start_transaction(ec);
 +      if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
-+              clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+               clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+-
+-      for (; rdata_len > 0; --rdata_len) {
+-              result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
+-              if (result) {
+-                      pr_err(PREFIX "read timeout, command = %d\n", command);
+-                      goto end;
+-              }
+-              /* Don't expect GPE after last read */
+-              if (rdata_len > 1)
+-                      set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
+-              *(rdata++) = acpi_ec_read_data(ec);
 +      spin_unlock_irqrestore(&ec->curr_lock, tmp);
 +      /* if we selected poll mode or failed in GPE-mode do a poll loop */
 +      if (force_poll ||
@@ -142324,38 +142331,21 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +                      "transactions will use polling mode\n");
 +              set_bit(EC_FLAGS_GPE_STORM, &ec->flags);
        }
+-      end:
+-      pr_debug(PREFIX "transaction end\n");
+-      return result;
 +      return ret;
-+}
+ }
  
--      if (!rdata_len) {
--              result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
--              if (result) {
--                      pr_err(PREFIX
--                             "finish-write timeout, command = %d\n", command);
--                      goto end;
--              }
--      } else if (command == ACPI_EC_COMMAND_QUERY)
--              clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
+-static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
+-                             const u8 * wdata, unsigned wdata_len,
+-                             u8 * rdata, unsigned rdata_len,
 +static int ec_check_ibf0(struct acpi_ec *ec)
 +{
 +      u8 status = acpi_ec_read_status(ec);
 +      return (status & ACPI_EC_FLAG_IBF) == 0;
 +}
--      for (; rdata_len > 0; --rdata_len) {
--              result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
--              if (result) {
--                      pr_err(PREFIX "read timeout, command = %d\n", command);
--                      goto end;
--              }
--              /* Don't expect GPE after last read */
--              if (rdata_len > 1)
--                      set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
--              *(rdata++) = acpi_ec_read_data(ec);
--      }
--      end:
--      pr_debug(PREFIX "transaction end\n");
--      return result;
++
 +static int ec_wait_ibf0(struct acpi_ec *ec)
 +{
 +      unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
@@ -142366,11 +142356,8 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +              if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), timeout))
 +                      return 0;
 +      return -ETIME;
- }
--static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
--                             const u8 * wdata, unsigned wdata_len,
--                             u8 * rdata, unsigned rdata_len,
++}
++
 +static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t,
                               int force_poll)
  {
@@ -142423,7 +142410,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        return status;
  }
  
-@@ -327,21 +375,32 @@ static int acpi_ec_transaction(struct ac
+@@ -327,21 +375,32 @@
  int acpi_ec_burst_enable(struct acpi_ec *ec)
  {
        u8 d;
@@ -142460,7 +142447,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        *data = d;
        return result;
  }
-@@ -349,8 +408,11 @@ static int acpi_ec_read(struct acpi_ec *
+@@ -349,8 +408,11 @@
  static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
  {
        u8 wdata[2] = { address, data };
@@ -142474,7 +142461,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  }
  
  /*
-@@ -412,12 +474,13 @@ int ec_transaction(u8 command,
+@@ -412,12 +474,13 @@
                   u8 * rdata, unsigned rdata_len,
                   int force_poll)
  {
@@ -142491,7 +142478,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  }
  
  EXPORT_SYMBOL(ec_transaction);
-@@ -426,7 +489,9 @@ static int acpi_ec_query(struct acpi_ec 
+@@ -426,7 +489,9 @@
  {
        int result;
        u8 d;
@@ -142502,7 +142489,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        if (!ec || !data)
                return -EINVAL;
  
-@@ -436,7 +501,7 @@ static int acpi_ec_query(struct acpi_ec 
+@@ -436,7 +501,7 @@
         * bit to be cleared (and thus clearing the interrupt source).
         */
  
@@ -142511,7 +142498,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        if (result)
                return result;
  
-@@ -513,46 +578,35 @@ static void acpi_ec_gpe_query(void *ec_c
+@@ -513,46 +578,35 @@
  
  static u32 acpi_ec_gpe_handler(void *data)
  {
@@ -142578,7 +142565,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  }
  
  /* --------------------------------------------------------------------------
-@@ -696,8 +750,7 @@ static struct acpi_ec *make_acpi_ec(void
+@@ -696,8 +750,7 @@
        mutex_init(&ec->lock);
        init_waitqueue_head(&ec->wait);
        INIT_LIST_HEAD(&ec->list);
@@ -142588,7 +142575,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        return ec;
  }
  
-@@ -718,6 +771,7 @@ static acpi_status
+@@ -718,6 +771,7 @@
  ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
  {
        acpi_status status;
@@ -142596,7 +142583,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  
        struct acpi_ec *ec = context;
        status = acpi_walk_resources(handle, METHOD_NAME__CRS,
-@@ -727,31 +781,27 @@ ec_parse_device(acpi_handle handle, u32 
+@@ -727,31 +781,27 @@
  
        /* Get GPE bit assignment (EC events). */
        /* TODO: Add support for _GPE returning a package */
@@ -142634,7 +142621,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
  }
  
  static int acpi_ec_add(struct acpi_device *device)
-@@ -846,17 +896,17 @@ ec_parse_io_ports(struct acpi_resource *
+@@ -846,17 +896,17 @@
  static int ec_install_handlers(struct acpi_ec *ec)
  {
        acpi_status status;
@@ -142657,7 +142644,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        status = acpi_install_address_space_handler(ec->handle,
                                                    ACPI_ADR_SPACE_EC,
                                                    &acpi_ec_space_handler,
-@@ -866,7 +916,7 @@ static int ec_install_handlers(struct ac
+@@ -866,7 +916,7 @@
                return -ENODEV;
        }
  
@@ -142666,7 +142653,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        return 0;
  }
  
-@@ -887,7 +937,6 @@ static int acpi_ec_start(struct acpi_dev
+@@ -887,7 +937,6 @@
  
        /* EC is fully operational, allow queries */
        clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
@@ -142674,7 +142661,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
        return ret;
  }
  
-@@ -906,7 +955,7 @@ static int acpi_ec_stop(struct acpi_devi
+@@ -906,7 +955,7 @@
  
  int __init acpi_boot_ec_enable(void)
  {
@@ -142683,7 +142670,7 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
                return 0;
        if (!ec_install_handlers(boot_ec)) {
                first_ec = boot_ec;
-@@ -1047,3 +1096,14 @@ static void __exit acpi_ec_exit(void)
+@@ -1047,3 +1096,14 @@
        return;
  }
  #endif        /* 0 */
@@ -142698,10 +142685,10 @@ diff -purN linux-2.6.27/drivers/acpi/ec.c linux-2.6.27.19-5.1/drivers/acpi/ec.c
 +}
 +
 +__setup("ec_intr=", acpi_ec_set_intr_mode);
-diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/drivers/acpi/executer/exconfig.c
---- linux-2.6.27/drivers/acpi/executer/exconfig.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/executer/exconfig.c       2009-03-25 16:11:24.000000000 +0000
-@@ -280,6 +280,7 @@ acpi_ex_load_op(union acpi_operand_objec
+diff -r 9608d5473017 drivers/acpi/executer/exconfig.c
+--- a/drivers/acpi/executer/exconfig.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/executer/exconfig.c Wed May 06 16:56:13 2009 +0100
+@@ -280,6 +280,7 @@
                struct acpi_walk_state *walk_state)
  {
        union acpi_operand_object *ddb_handle;
@@ -142709,7 +142696,7 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
        struct acpi_table_desc table_desc;
        u32 table_index;
        acpi_status status;
-@@ -294,9 +295,8 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -294,9 +295,8 @@
        switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
        case ACPI_TYPE_REGION:
  
@@ -142721,7 +142708,7 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
  
                /* Region must be system_memory (from ACPI spec) */
  
-@@ -316,61 +316,112 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -316,22 +316,17 @@
                }
  
                /*
@@ -142730,29 +142717,47 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
 -               * we may eventually have to copy the table to a local buffer.
 +               * Map the table header and get the actual table length. The region
 +               * length is not guaranteed to be the same as the table length.
-+               */
+                */
+-              table_desc.address = obj_desc->region.address;
+-              table_desc.length = obj_desc->region.length;
+-              table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
+-              break;
 +              table = acpi_os_map_memory(obj_desc->region.address,
 +                                         sizeof(struct acpi_table_header));
 +              if (!table) {
 +                      return_ACPI_STATUS(AE_NO_MEMORY);
 +              }
-+
+-      case ACPI_TYPE_BUFFER:  /* Buffer or resolved region_field */
+-
+-              ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+-                                "Load from Buffer or Field %p %s\n", obj_desc,
+-                                acpi_ut_get_object_type_name(obj_desc)));
+-
+-              length = obj_desc->buffer.length;
 +              length = table->length;
 +              acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
-+
-+              /* Must have at least an ACPI table header */
-+
-+              if (length < sizeof(struct acpi_table_header)) {
-+                      return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
-+              }
-+
+               /* Must have at least an ACPI table header */
+@@ -339,38 +334,94 @@
+                       return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
+               }
+-              /* Validate checksum here. It won't get validated in tb_add_table */
 +              /*
 +               * The memory region is not guaranteed to remain stable and we must
 +               * copy the table to a local buffer. For example, the memory region
 +               * is corrupted after suspend on some machines. Dynamically loaded
 +               * tables are usually small, so this overhead is minimal.
-                */
-+
++               */
+-              status =
+-                  acpi_tb_verify_checksum(ACPI_CAST_PTR
+-                                          (struct acpi_table_header,
+-                                           obj_desc->buffer.pointer), length);
+-              if (ACPI_FAILURE(status)) {
+-                      return_ACPI_STATUS(status);
 +              /* Allocate a buffer for the table */
 +
 +              table_desc.pointer = ACPI_ALLOCATE(length);
@@ -142771,37 +142776,23 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
 +              ACPI_MEMCPY(table_desc.pointer, table, length);
 +              acpi_os_unmap_memory(table, length);
 +
-               table_desc.address = obj_desc->region.address;
--              table_desc.length = obj_desc->region.length;
--              table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
-               break;
-       case ACPI_TYPE_BUFFER:  /* Buffer or resolved region_field */
-               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
--                                "Load from Buffer or Field %p %s\n", obj_desc,
--                                acpi_ut_get_object_type_name(obj_desc)));
--
--              length = obj_desc->buffer.length;
++              table_desc.address = obj_desc->region.address;
++              break;
++
++      case ACPI_TYPE_BUFFER:  /* Buffer or resolved region_field */
++
++              ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
 +                                "Load table from Buffer or Field %p\n",
 +                                obj_desc));
-               /* Must have at least an ACPI table header */
--              if (length < sizeof(struct acpi_table_header)) {
++
++              /* Must have at least an ACPI table header */
++
 +              if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) {
-                       return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
-               }
--              /* Validate checksum here. It won't get validated in tb_add_table */
++                      return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
++              }
++
 +              /* Get the actual table length from the table header */
--              status =
--                  acpi_tb_verify_checksum(ACPI_CAST_PTR
--                                          (struct acpi_table_header,
--                                           obj_desc->buffer.pointer), length);
--              if (ACPI_FAILURE(status)) {
--                      return_ACPI_STATUS(status);
++
 +              table =
 +                  ACPI_CAST_PTR(struct acpi_table_header,
 +                                obj_desc->buffer.pointer);
@@ -142860,7 +142851,7 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
        status = acpi_tb_add_table(&table_desc, &table_index);
        if (ACPI_FAILURE(status)) {
                goto cleanup;
-@@ -379,7 +430,7 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -379,7 +430,7 @@
        /*
         * Add the table to the namespace.
         *
@@ -142869,7 +142860,7 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
         * This appears to go against the ACPI specification, but we do it for
         * compatibility with other ACPI implementations.
         */
-@@ -415,7 +466,7 @@ acpi_ex_load_op(union acpi_operand_objec
+@@ -415,7 +466,7 @@
        cleanup:
        if (ACPI_FAILURE(status)) {
  
@@ -142878,10 +142869,10 @@ diff -purN linux-2.6.27/drivers/acpi/executer/exconfig.c linux-2.6.27.19-5.1/dri
  
                acpi_tb_delete_table(&table_desc);
        }
-diff -purN linux-2.6.27/drivers/acpi/glue.c linux-2.6.27.19-5.1/drivers/acpi/glue.c
---- linux-2.6.27/drivers/acpi/glue.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/glue.c    2009-03-25 16:11:24.000000000 +0000
-@@ -140,6 +140,46 @@ struct device *acpi_get_physical_device(
+diff -r 9608d5473017 drivers/acpi/glue.c
+--- a/drivers/acpi/glue.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/glue.c      Wed May 06 16:56:13 2009 +0100
+@@ -140,6 +140,46 @@
  
  EXPORT_SYMBOL(acpi_get_physical_device);
  
@@ -142928,10 +142919,10 @@ diff -purN linux-2.6.27/drivers/acpi/glue.c linux-2.6.27.19-5.1/drivers/acpi/glu
  static int acpi_bind_one(struct device *dev, acpi_handle handle)
  {
        struct acpi_device *acpi_dev;
-diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/drivers/acpi/hardware/hwsleep.c
---- linux-2.6.27/drivers/acpi/hardware/hwsleep.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/hardware/hwsleep.c        2009-03-25 16:11:24.000000000 +0000
-@@ -78,19 +78,17 @@ acpi_set_firmware_waking_vector(acpi_phy
+diff -r 9608d5473017 drivers/acpi/hardware/hwsleep.c
+--- a/drivers/acpi/hardware/hwsleep.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/hardware/hwsleep.c  Wed May 06 16:56:13 2009 +0100
+@@ -78,19 +78,17 @@
                return_ACPI_STATUS(status);
        }
  
@@ -142961,7 +142952,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
  
        return_ACPI_STATUS(AE_OK);
  }
-@@ -134,20 +132,7 @@ acpi_get_firmware_waking_vector(acpi_phy
+@@ -134,20 +132,7 @@
        }
  
        /* Get the vector */
@@ -142983,7 +142974,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
  
        return_ACPI_STATUS(AE_OK);
  }
-@@ -256,7 +241,11 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -256,7 +241,11 @@
        u32 PM1Bcontrol;
        struct acpi_bit_register_info *sleep_type_reg_info;
        struct acpi_bit_register_info *sleep_enable_reg_info;
@@ -142995,7 +142986,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
        struct acpi_object_list arg_list;
        union acpi_object arg;
        acpi_status status;
-@@ -366,6 +355,7 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -366,6 +355,7 @@
  
        ACPI_FLUSH_CPU_CACHE();
  
@@ -143003,7 +142994,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
        status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL,
                                        PM1Acontrol);
        if (ACPI_FAILURE(status)) {
-@@ -412,6 +402,16 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -412,6 +402,16 @@
                /* Spin until we wake */
  
        } while (!in_value);
@@ -143020,7 +143011,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
  
        return_ACPI_STATUS(AE_OK);
  }
-@@ -430,6 +430,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_stat
+@@ -430,6 +430,7 @@
   *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
   *
   ******************************************************************************/
@@ -143028,7 +143019,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
  acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
  {
        u32 in_value;
-@@ -479,6 +480,7 @@ acpi_status asmlinkage acpi_enter_sleep_
+@@ -479,6 +480,7 @@
  }
  
  ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
@@ -143036,7 +143027,7 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
  
  /*******************************************************************************
   *
-@@ -627,6 +629,13 @@ acpi_status acpi_leave_sleep_state(u8 sl
+@@ -627,6 +629,13 @@
        }
        /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
  
@@ -143050,10 +143041,10 @@ diff -purN linux-2.6.27/drivers/acpi/hardware/hwsleep.c linux-2.6.27.19-5.1/driv
        acpi_gbl_system_awake_and_running = TRUE;
  
        /* Enable power button */
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsutils.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsutils.c
---- linux-2.6.27/drivers/acpi/namespace/nsutils.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsutils.c       2009-03-25 16:11:24.000000000 +0000
-@@ -314,9 +314,15 @@ void acpi_ns_get_internal_name_length(st
+diff -r 9608d5473017 drivers/acpi/namespace/nsutils.c
+--- a/drivers/acpi/namespace/nsutils.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsutils.c Wed May 06 16:56:13 2009 +0100
+@@ -314,9 +314,15 @@
         *
         * strlen() + 1 covers the first name_seg, which has no path separator
         */
@@ -143070,9 +143061,9 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsutils.c linux-2.6.27.19-5.1/dri
        } else {
                /*
                 * Handle Carat prefixes
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfeval.c
---- linux-2.6.27/drivers/acpi/namespace/nsxfeval.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfeval.c      2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/namespace/nsxfeval.c
+--- a/drivers/acpi/namespace/nsxfeval.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsxfeval.c        Wed May 06 16:56:13 2009 +0100
 @@ -45,9 +45,14 @@
  #include <acpi/acpi.h>
  #include <acpi/acnamesp.h>
@@ -143088,7 +143079,7 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/dr
  #ifdef ACPI_FUTURE_USAGE
  /*******************************************************************************
   *
-@@ -69,6 +74,7 @@ ACPI_MODULE_NAME("nsxfeval")
+@@ -69,6 +74,7 @@
   *              be valid (non-null)
   *
   ******************************************************************************/
@@ -143096,7 +143087,7 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/dr
  acpi_status
  acpi_evaluate_object_typed(acpi_handle handle,
                           acpi_string pathname,
-@@ -283,6 +289,10 @@ acpi_evaluate_object(acpi_handle handle,
+@@ -283,6 +289,10 @@
  
                        if (ACPI_SUCCESS(status)) {
  
@@ -143107,7 +143098,7 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/dr
                                /* Get the size of the returned object */
  
                                status =
-@@ -352,6 +362,74 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+@@ -352,6 +362,74 @@
  
  /*******************************************************************************
   *
@@ -143182,7 +143173,7 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/dr
   * FUNCTION:    acpi_walk_namespace
   *
   * PARAMETERS:  Type                - acpi_object_type to search for
-@@ -379,6 +457,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+@@ -379,6 +457,7 @@
   *              function, etc.
   *
   ******************************************************************************/
@@ -143190,10 +143181,10 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfeval.c linux-2.6.27.19-5.1/dr
  acpi_status
  acpi_walk_namespace(acpi_object_type type,
                    acpi_handle start_object,
-diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfname.c linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfname.c
---- linux-2.6.27/drivers/acpi/namespace/nsxfname.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/namespace/nsxfname.c      2009-03-25 16:11:24.000000000 +0000
-@@ -253,6 +253,7 @@ acpi_get_object_info(acpi_handle handle,
+diff -r 9608d5473017 drivers/acpi/namespace/nsxfname.c
+--- a/drivers/acpi/namespace/nsxfname.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/namespace/nsxfname.c        Wed May 06 16:56:13 2009 +0100
+@@ -253,6 +253,7 @@
        node = acpi_ns_map_handle_to_node(handle);
        if (!node) {
                (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
@@ -143201,10 +143192,10 @@ diff -purN linux-2.6.27/drivers/acpi/namespace/nsxfname.c linux-2.6.27.19-5.1/dr
                goto cleanup;
        }
  
-diff -purN linux-2.6.27/drivers/acpi/numa.c linux-2.6.27.19-5.1/drivers/acpi/numa.c
---- linux-2.6.27/drivers/acpi/numa.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/numa.c    2009-03-25 16:11:24.000000000 +0000
-@@ -258,7 +258,7 @@ int __init acpi_numa_init(void)
+diff -r 9608d5473017 drivers/acpi/numa.c
+--- a/drivers/acpi/numa.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/numa.c      Wed May 06 16:56:13 2009 +0100
+@@ -258,7 +258,7 @@
  
  int acpi_get_pxm(acpi_handle h)
  {
@@ -143213,22 +143204,22 @@ diff -purN linux-2.6.27/drivers/acpi/numa.c linux-2.6.27.19-5.1/drivers/acpi/num
        acpi_status status;
        acpi_handle handle;
        acpi_handle phandle = h;
-diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.c
---- linux-2.6.27/drivers/acpi/osl.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/osl.c     2009-03-25 16:11:24.000000000 +0000
-@@ -96,6 +96,11 @@ static DEFINE_SPINLOCK(acpi_res_lock);
+diff -r 9608d5473017 drivers/acpi/osl.c
+--- a/drivers/acpi/osl.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/osl.c       Wed May 06 16:56:13 2009 +0100
+@@ -95,6 +95,11 @@
  #define       OSI_STRING_LENGTH_MAX 64        /* arbitrary */
  static char osi_additional_string[OSI_STRING_LENGTH_MAX];
++
 +#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
 +static int acpi_no_initrd_override;
 +extern struct acpi_table_header *acpi_find_dsdt_initrd(void);
 +#endif
-+
  /*
   * "Ode to _OSI(Linux)"
-  *
-@@ -325,7 +330,7 @@ acpi_os_predefined_override(const struct
+@@ -325,7 +330,7 @@
        return AE_OK;
  }
  
@@ -143237,7 +143228,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
  acpi_os_table_override(struct acpi_table_header * existing_table,
                       struct acpi_table_header ** new_table)
  {
-@@ -338,6 +343,16 @@ acpi_os_table_override(struct acpi_table
+@@ -338,6 +343,16 @@
        if (strncmp(existing_table->signature, "DSDT", 4) == 0)
                *new_table = (struct acpi_table_header *)AmlCode;
  #endif
@@ -143254,10 +143245,11 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
        if (*new_table != NULL) {
                printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], "
                           "this is unsafe: tainting kernel\n",
-@@ -348,6 +363,15 @@ acpi_os_table_override(struct acpi_table
+@@ -347,6 +362,15 @@
+       }
        return AE_OK;
  }
++
 +#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
 +static int __init acpi_no_initrd_override_setup(char *s)
 +{
@@ -143266,11 +143258,10 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
 +}
 +__setup("acpi_no_initrd_override", acpi_no_initrd_override_setup);
 +#endif
-+
  static irqreturn_t acpi_irq(int irq, void *dev_id)
  {
-       u32 handled;
-@@ -608,7 +632,7 @@ static void acpi_os_derive_pci_id_2(acpi
+@@ -608,7 +632,7 @@
        acpi_handle handle;
        struct acpi_pci_id *pci_id = *id;
        acpi_status status;
@@ -143279,7 +143270,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
        acpi_object_type type;
  
        acpi_get_parent(chandle, &handle);
-@@ -620,8 +644,7 @@ static void acpi_os_derive_pci_id_2(acpi
+@@ -620,8 +644,7 @@
                if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
                        return;
  
@@ -143289,7 +143280,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
                                          &temp);
                if (ACPI_SUCCESS(status)) {
                        u32 val;
-@@ -682,6 +705,22 @@ static void acpi_os_execute_deferred(str
+@@ -682,6 +705,22 @@
        return;
  }
  
@@ -143312,7 +143303,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
  /*******************************************************************************
   *
   * FUNCTION:    acpi_os_execute
-@@ -697,12 +736,13 @@ static void acpi_os_execute_deferred(str
+@@ -697,12 +736,13 @@
   *
   ******************************************************************************/
  
@@ -143328,7 +143319,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
                          "Scheduling function [%p(%p)] for deferred execution.\n",
                          function, context));
-@@ -726,9 +766,17 @@ acpi_status acpi_os_execute(acpi_execute
+@@ -726,9 +766,17 @@
        dpc->function = function;
        dpc->context = context;
  
@@ -143349,7 +143340,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
                ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
                          "Call to queue_work() failed.\n"));
                status = AE_ERROR;
-@@ -737,8 +785,20 @@ acpi_status acpi_os_execute(acpi_execute
+@@ -737,7 +785,19 @@
        return_ACPI_STATUS(status);
  }
  
@@ -143359,18 +143350,17 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
 +      return __acpi_os_execute(type, function, context, 0);
 +}
  EXPORT_SYMBOL(acpi_os_execute);
++
 +acpi_status acpi_os_hotplug_execute(acpi_osd_exec_callback function,
 +      void *context)
 +{
 +      return __acpi_os_execute(0, function, context, 1);
 +}
 +EXPORT_SYMBOL(acpi_os_hotplug_execute);
-+
  void acpi_os_wait_events_complete(void *context)
  {
-       flush_workqueue(kacpid_wq);
-@@ -1261,34 +1321,6 @@ acpi_status acpi_os_release_object(acpi_
+@@ -1261,34 +1321,6 @@
        return (AE_OK);
  }
  
@@ -143405,7 +143395,7 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
  /******************************************************************************
   *
   * FUNCTION:    acpi_os_validate_interface
-@@ -1315,14 +1347,6 @@ acpi_os_validate_interface (char *interf
+@@ -1315,14 +1347,6 @@
                        osi_linux.cmdline ? " via cmdline" :
                        osi_linux.dmi ? " via DMI" : "");
  
@@ -143420,10 +143410,10 @@ diff -purN linux-2.6.27/drivers/acpi/osl.c linux-2.6.27.19-5.1/drivers/acpi/osl.
                if (!osi_linux.known && !osi_linux.cmdline) {
                        printk(KERN_NOTICE PREFIX
                                "If \"acpi_osi=%sLinux\" works better, "
-diff -purN linux-2.6.27/drivers/acpi/parser/psparse.c linux-2.6.27.19-5.1/drivers/acpi/parser/psparse.c
---- linux-2.6.27/drivers/acpi/parser/psparse.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/parser/psparse.c  2009-03-25 16:11:24.000000000 +0000
-@@ -641,10 +641,12 @@ acpi_status acpi_ps_parse_aml(struct acp
+diff -r 9608d5473017 drivers/acpi/parser/psparse.c
+--- a/drivers/acpi/parser/psparse.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/parser/psparse.c    Wed May 06 16:56:13 2009 +0100
+@@ -641,10 +641,12 @@
                                            ACPI_WALK_METHOD_RESTART;
                                }
                        } else {
@@ -143437,10 +143427,10 @@ diff -purN linux-2.6.27/drivers/acpi/parser/psparse.c linux-2.6.27.19-5.1/driver
                        }
                }
  
-diff -purN linux-2.6.27/drivers/acpi/pci_irq.c linux-2.6.27.19-5.1/drivers/acpi/pci_irq.c
---- linux-2.6.27/drivers/acpi/pci_irq.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_irq.c 2009-03-25 16:11:24.000000000 +0000
-@@ -384,6 +384,27 @@ acpi_pci_free_irq(struct acpi_prt_entry 
+diff -r 9608d5473017 drivers/acpi/pci_irq.c
+--- a/drivers/acpi/pci_irq.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_irq.c   Wed May 06 16:56:13 2009 +0100
+@@ -384,6 +384,27 @@
        return irq;
  }
  
@@ -143468,7 +143458,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_irq.c linux-2.6.27.19-5.1/drivers/acpi/
  /*
   * acpi_pci_irq_lookup
   * success: return IRQ >= 0
-@@ -413,6 +434,41 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
+@@ -413,6 +434,41 @@
        }
  
        ret = func(entry, triggering, polarity, link);
@@ -143510,10 +143500,10 @@ diff -purN linux-2.6.27/drivers/acpi/pci_irq.c linux-2.6.27.19-5.1/drivers/acpi/
        return ret;
  }
  
-diff -purN linux-2.6.27/drivers/acpi/pci_link.c linux-2.6.27.19-5.1/drivers/acpi/pci_link.c
---- linux-2.6.27/drivers/acpi/pci_link.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_link.c        2009-03-25 16:11:24.000000000 +0000
-@@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_d
+diff -r 9608d5473017 drivers/acpi/pci_link.c
+--- a/drivers/acpi/pci_link.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_link.c  Wed May 06 16:56:13 2009 +0100
+@@ -796,10 +796,6 @@
        struct list_head *node = NULL;
        struct acpi_pci_link *link = NULL;
  
@@ -143524,9 +143514,9 @@ diff -purN linux-2.6.27/drivers/acpi/pci_link.c linux-2.6.27.19-5.1/drivers/acpi
        list_for_each(node, &acpi_link.entries) {
                link = list_entry(node, struct acpi_pci_link, node);
                if (!link) {
-diff -purN linux-2.6.27/drivers/acpi/pci_root.c linux-2.6.27.19-5.1/drivers/acpi/pci_root.c
---- linux-2.6.27/drivers/acpi/pci_root.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_root.c        2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/pci_root.c
+--- a/drivers/acpi/pci_root.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_root.c  Wed May 06 16:56:13 2009 +0100
 @@ -31,6 +31,7 @@
  #include <linux/spinlock.h>
  #include <linux/pm.h>
@@ -143535,7 +143525,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_root.c linux-2.6.27.19-5.1/drivers/acpi
  #include <linux/acpi.h>
  #include <acpi/acpi_bus.h>
  #include <acpi/acpi_drivers.h>
-@@ -190,9 +191,10 @@ static int __devinit acpi_pci_root_add(s
+@@ -190,9 +191,10 @@
        struct acpi_pci_root *root = NULL;
        struct acpi_pci_root *tmp;
        acpi_status status = AE_OK;
@@ -143547,21 +143537,21 @@ diff -purN linux-2.6.27/drivers/acpi/pci_root.c linux-2.6.27.19-5.1/drivers/acpi
  
  
        if (!device)
-@@ -210,6 +212,13 @@ static int __devinit acpi_pci_root_add(s
+@@ -209,6 +211,13 @@
+       acpi_driver_data(device) = root;
  
        device->ops.bind = acpi_pci_bind;
++
 +      /*
 +       * All supported architectures that use ACPI have support for
 +       * PCI domains, so we indicate this in _OSC support capabilities.
 +       */
 +      flags = base_flags = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
 +      pci_acpi_osc_support(device->handle, flags);
-+
        /* 
         * Segment
-        * -------
-@@ -335,6 +344,17 @@ static int __devinit acpi_pci_root_add(s
+@@ -335,6 +344,17 @@
        list_for_each_entry(child, &device->children, node)
                acpi_pci_bridge_scan(child);
  
@@ -143579,10 +143569,10 @@ diff -purN linux-2.6.27/drivers/acpi/pci_root.c linux-2.6.27.19-5.1/drivers/acpi
        end:
        if (result) {
                if (!list_empty(&root->node))
-diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi/pci_slot.c
---- linux-2.6.27/drivers/acpi/pci_slot.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/pci_slot.c        2009-03-25 16:11:24.000000000 +0000
-@@ -76,10 +76,10 @@ static struct acpi_pci_driver acpi_pci_s
+diff -r 9608d5473017 drivers/acpi/pci_slot.c
+--- a/drivers/acpi/pci_slot.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/pci_slot.c  Wed May 06 16:56:13 2009 +0100
+@@ -76,10 +76,10 @@
  };
  
  static int
@@ -143595,7 +143585,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi
        acpi_status status;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
  
-@@ -132,7 +132,7 @@ static acpi_status
+@@ -132,7 +132,7 @@
  register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
        int device;
@@ -143604,7 +143594,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi
        char name[SLOT_NAME_SIZE];
        struct acpi_pci_slot *slot;
        struct pci_slot *pci_slot;
-@@ -150,7 +150,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -150,7 +150,7 @@
        }
  
        snprintf(name, sizeof(name), "%u", (u32)sun);
@@ -143613,7 +143603,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi
        if (IS_ERR(pci_slot)) {
                err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));
                kfree(slot);
-@@ -182,7 +182,7 @@ static acpi_status
+@@ -182,7 +182,7 @@
  walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
        int device, function;
@@ -143622,7 +143612,7 @@ diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi
        acpi_status status;
        acpi_handle dummy_handle;
        acpi_walk_callback user_function;
-@@ -239,7 +239,7 @@ static int
+@@ -239,7 +239,7 @@
  walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
  {
        int seg, bus;
@@ -143631,10 +143621,10 @@ diff -purN linux-2.6.27/drivers/acpi/pci_slot.c linux-2.6.27.19-5.1/drivers/acpi
        acpi_status status;
        acpi_handle dummy_handle;
        struct pci_bus *pci_bus;
-diff -purN linux-2.6.27/drivers/acpi/power.c linux-2.6.27.19-5.1/drivers/acpi/power.c
---- linux-2.6.27/drivers/acpi/power.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/power.c   2009-03-25 16:11:24.000000000 +0000
-@@ -131,7 +131,7 @@ acpi_power_get_context(acpi_handle handl
+diff -r 9608d5473017 drivers/acpi/power.c
+--- a/drivers/acpi/power.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/power.c     Wed May 06 16:56:13 2009 +0100
+@@ -131,7 +131,7 @@
  static int acpi_power_get_state(struct acpi_power_resource *resource, int *state)
  {
        acpi_status status = AE_OK;
@@ -143643,10 +143633,10 @@ diff -purN linux-2.6.27/drivers/acpi/power.c linux-2.6.27.19-5.1/drivers/acpi/po
  
  
        if (!resource || !state)
-diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/drivers/acpi/processor_core.c
---- linux-2.6.27/drivers/acpi/processor_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_core.c  2009-03-25 16:11:24.000000000 +0000
-@@ -89,6 +89,7 @@ static int acpi_processor_handle_eject(s
+diff -r 9608d5473017 drivers/acpi/processor_core.c
+--- a/drivers/acpi/processor_core.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_core.c    Wed May 06 16:56:13 2009 +0100
+@@ -89,6 +89,7 @@
  
  
  static const struct acpi_device_id processor_device_ids[] = {
@@ -143654,7 +143644,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        {ACPI_PROCESSOR_HID, 0},
        {"", 0},
  };
-@@ -409,7 +410,7 @@ static int acpi_processor_remove_fs(stru
+@@ -409,7 +410,7 @@
  /* Use the acpiid in MADT to map cpus in case of SMP */
  
  #ifndef CONFIG_SMP
@@ -143663,7 +143653,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  #else
  
  static struct acpi_table_madt *madt;
-@@ -428,27 +429,35 @@ static int map_lapic_id(struct acpi_subt
+@@ -428,27 +429,35 @@
  }
  
  static int map_lsapic_id(struct acpi_subtable_header *entry,
@@ -143713,7 +143703,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  {
        unsigned long madt_end, entry;
        int apic_id = -1;
-@@ -469,7 +478,7 @@ static int map_madt_entry(u32 acpi_id)
+@@ -469,7 +478,7 @@
                        if (map_lapic_id(header, acpi_id, &apic_id))
                                break;
                } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
@@ -143722,7 +143712,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
                                break;
                }
                entry += header->length;
-@@ -477,7 +486,7 @@ static int map_madt_entry(u32 acpi_id)
+@@ -477,7 +486,7 @@
        return apic_id;
  }
  
@@ -143731,7 +143721,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *obj;
-@@ -500,7 +509,7 @@ static int map_mat_entry(acpi_handle han
+@@ -500,7 +509,7 @@
        if (header->type == ACPI_MADT_TYPE_LOCAL_APIC) {
                map_lapic_id(header, acpi_id, &apic_id);
        } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
@@ -143740,7 +143730,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        }
  
  exit:
-@@ -509,14 +518,14 @@ exit:
+@@ -509,14 +518,14 @@
        return apic_id;
  }
  
@@ -143758,7 +143748,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        if (apic_id == -1)
                return apic_id;
  
-@@ -532,15 +541,16 @@ static int get_cpu_id(acpi_handle handle
+@@ -532,15 +541,16 @@
                                   Driver Interface
     -------------------------------------------------------------------------- */
  
@@ -143778,7 +143768,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        if (!pr)
                return -EINVAL;
  
-@@ -561,22 +571,23 @@ static int acpi_processor_get_info(struc
+@@ -561,22 +571,23 @@
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "No bus mastering arbitration control\n"));
  
@@ -143811,7 +143801,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
                status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
                if (ACPI_FAILURE(status)) {
                        printk(KERN_ERR PREFIX "Evaluating processor object\n");
-@@ -584,12 +595,13 @@ static int acpi_processor_get_info(struc
+@@ -584,12 +595,13 @@
                }
  
                /*
@@ -143829,7 +143819,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
        /* Handle UP system running SMP kernel, with no LAPIC in MADT */
        if (!cpu0_initialized && (cpu_index == -1) &&
-@@ -608,7 +620,8 @@ static int acpi_processor_get_info(struc
+@@ -608,7 +620,8 @@
         */
        if (pr->id == -1) {
                if (ACPI_FAILURE
@@ -143839,7 +143829,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
                        return -ENODEV;
                }
        }
-@@ -644,13 +657,17 @@ static int acpi_processor_get_info(struc
+@@ -644,13 +657,17 @@
         * of /proc/cpuinfo
         */
        status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer);
@@ -143858,7 +143848,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
  static int __cpuinit acpi_processor_start(struct acpi_device *device)
  {
-@@ -659,38 +676,56 @@ static int __cpuinit acpi_processor_star
+@@ -659,38 +676,56 @@
        struct acpi_processor *pr;
        struct sys_device *sysdev;
  
@@ -143921,7 +143911,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
        status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
                                             acpi_processor_notify, pr);
-@@ -698,15 +733,28 @@ static int __cpuinit acpi_processor_star
+@@ -698,14 +733,27 @@
        /* _PDC call should be done before doing anything else (if reqd.). */
        arch_acpi_processor_init_pdc(pr);
        acpi_processor_set_pdc(pr);
@@ -143945,15 +143935,14 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
  
        acpi_processor_power_init(pr, device);
++
 +      result = processor_extcntl_prepare(pr);
 +      if (result)
 +              goto end;
-+
        pr->cdev = thermal_cooling_device_register("Processor", device,
                                                &processor_cooling_ops);
-       if (IS_ERR(pr->cdev)) {
-@@ -834,7 +882,7 @@ static int acpi_processor_remove(struct 
+@@ -834,7 +882,7 @@
  
        pr = acpi_driver_data(device);
  
@@ -143962,7 +143951,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
                kfree(pr);
                return 0;
        }
-@@ -849,7 +897,8 @@ static int acpi_processor_remove(struct 
+@@ -849,7 +897,8 @@
        status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
                                            acpi_processor_notify);
  
@@ -143972,7 +143961,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
        acpi_processor_remove_fs(device);
  
-@@ -860,8 +909,14 @@ static int acpi_processor_remove(struct 
+@@ -860,8 +909,14 @@
                pr->cdev = NULL;
        }
  
@@ -143987,7 +143976,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        kfree(pr);
  
        return 0;
-@@ -875,7 +930,7 @@ static int acpi_processor_remove(struct 
+@@ -875,7 +930,7 @@
  static int is_processor_present(acpi_handle handle)
  {
        acpi_status status;
@@ -143996,7 +143985,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
  
  
        status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
-@@ -921,6 +976,10 @@ int acpi_processor_device_add(acpi_handl
+@@ -921,6 +976,10 @@
        if (!pr)
                return -ENODEV;
  
@@ -144007,18 +143996,18 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) {
                kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE);
        }
-@@ -960,6 +1019,10 @@ static void __ref acpi_processor_hotplug
+@@ -959,6 +1018,10 @@
+                       printk(KERN_ERR PREFIX "Driver data is NULL\n");
                        break;
                }
++
 +              if (processor_cntl_external())
 +                      processor_notify_external(pr,
 +                                      PROCESSOR_HOTPLUG, HOTPLUG_TYPE_ADD);
-+
                if (pr->id >= 0 && (pr->id < nr_cpu_ids)) {
                        kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
-                       break;
-@@ -991,6 +1054,11 @@ static void __ref acpi_processor_hotplug
+@@ -991,6 +1054,11 @@
  
                if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id)))
                        kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
@@ -144030,7 +144019,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
                break;
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-@@ -1055,6 +1123,11 @@ static acpi_status acpi_processor_hotadd
+@@ -1055,6 +1123,11 @@
  
  static int acpi_processor_handle_eject(struct acpi_processor *pr)
  {
@@ -144042,9 +144031,9 @@ diff -purN linux-2.6.27/drivers/acpi/processor_core.c linux-2.6.27.19-5.1/driver
        if (cpu_online(pr->id))
                cpu_down(pr->id);
  
-diff -purN linux-2.6.27/drivers/acpi/processor_extcntl.c linux-2.6.27.19-5.1/drivers/acpi/processor_extcntl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_extcntl.c       2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/processor_extcntl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/acpi/processor_extcntl.c Wed May 06 16:56:13 2009 +0100
 @@ -0,0 +1,233 @@
 +/*
 + * processor_extcntl.c - channel to external control logic
@@ -144279,10 +144268,10 @@ diff -purN linux-2.6.27/drivers/acpi/processor_extcntl.c linux-2.6.27.19-5.1/dri
 +      kfree(perf);
 +      return ret;
 +}
-diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/drivers/acpi/processor_idle.c
---- linux-2.6.27/drivers/acpi/processor_idle.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_idle.c  2009-03-25 16:11:24.000000000 +0000
-@@ -127,57 +127,6 @@ static int set_max_cstate(const struct d
+diff -r 9608d5473017 drivers/acpi/processor_idle.c
+--- a/drivers/acpi/processor_idle.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_idle.c    Wed May 06 16:56:13 2009 +0100
+@@ -127,57 +127,6 @@
  /* Actually this shouldn't be __cpuinitdata, would be better to fix the
     callers to only run once -AK */
  static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
@@ -144340,7 +144329,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
        { set_max_cstate, "Clevo 5600D", {
          DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
          DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
-@@ -956,7 +905,8 @@ static int acpi_processor_get_power_info
+@@ -956,7 +905,8 @@
                                 */
                                cx.entry_method = ACPI_CSTATE_HALT;
                                snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
@@ -144350,20 +144339,20 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
                                continue;
                        }
                        if (cx.type == ACPI_STATE_C1 &&
-@@ -995,6 +945,12 @@ static int acpi_processor_get_power_info
+@@ -994,6 +944,12 @@
+                       continue;
  
                cx.power = obj->integer.value;
++
 +#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
 +              /* cache control methods to notify external logic */
 +              if (processor_pm_external())
 +                      memcpy(&cx.reg, reg, sizeof(*reg));
 +#endif
-+
                current_count++;
                memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx));
-@@ -1336,14 +1292,18 @@ int acpi_processor_cst_has_changed(struc
+@@ -1336,14 +1292,18 @@
         * been initialized.
         */
        if (pm_idle_save) {
@@ -144384,7 +144373,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
                pm_idle = acpi_processor_idle;
  
        return result;
-@@ -1587,6 +1547,7 @@ static int acpi_idle_enter_bm(struct cpu
+@@ -1587,6 +1547,7 @@
  
        if (acpi_idle_bm_check()) {
                if (dev->safe_state) {
@@ -144392,7 +144381,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
                        return dev->safe_state->enter(dev, dev->safe_state);
                } else {
                        local_irq_disable();
-@@ -1782,6 +1743,13 @@ int acpi_processor_cst_has_changed(struc
+@@ -1782,6 +1743,13 @@
        if (!pr->flags.power_setup_done)
                return -ENODEV;
  
@@ -144406,7 +144395,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
        cpuidle_pause_and_lock();
        cpuidle_disable_device(&pr->power.dev);
        acpi_processor_get_power_info(pr);
-@@ -1865,7 +1833,7 @@ int __cpuinit acpi_processor_power_init(
+@@ -1865,7 +1833,7 @@
                printk(")\n");
  
  #ifndef CONFIG_CPU_IDLE
@@ -144415,7 +144404,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
                        pm_idle_save = pm_idle;
                        pm_idle = acpi_processor_idle;
                }
-@@ -1879,6 +1847,11 @@ int __cpuinit acpi_processor_power_init(
+@@ -1879,6 +1847,11 @@
                                 acpi_driver_data(device));
        if (!entry)
                return -EIO;
@@ -144427,10 +144416,10 @@ diff -purN linux-2.6.27/drivers/acpi/processor_idle.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/drivers/acpi/processor_perflib.c
---- linux-2.6.27/drivers/acpi/processor_perflib.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_perflib.c       2009-03-25 16:11:24.000000000 +0000
-@@ -80,6 +80,7 @@ MODULE_PARM_DESC(ignore_ppc, "If the fre
+diff -r 9608d5473017 drivers/acpi/processor_perflib.c
+--- a/drivers/acpi/processor_perflib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_perflib.c Wed May 06 16:56:13 2009 +0100
+@@ -80,6 +80,7 @@
  
  static int acpi_processor_ppc_status;
  
@@ -144438,7 +144427,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  static int acpi_processor_ppc_notifier(struct notifier_block *nb,
                                       unsigned long event, void *data)
  {
-@@ -122,11 +123,12 @@ static int acpi_processor_ppc_notifier(s
+@@ -122,11 +123,12 @@
  static struct notifier_block acpi_ppc_notifier_block = {
        .notifier_call = acpi_processor_ppc_notifier,
  };
@@ -144452,7 +144441,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  
  
        if (!pr)
-@@ -166,9 +168,15 @@ int acpi_processor_ppc_has_changed(struc
+@@ -166,9 +168,15 @@
        if (ret < 0)
                return (ret);
        else
@@ -144468,7 +144457,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  void acpi_processor_ppc_init(void)
  {
        if (!cpufreq_register_notifier
-@@ -187,6 +195,7 @@ void acpi_processor_ppc_exit(void)
+@@ -187,6 +195,7 @@
  
        acpi_processor_ppc_status &= ~PPC_REGISTERED;
  }
@@ -144476,7 +144465,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  
  static int acpi_processor_get_performance_control(struct acpi_processor *pr)
  {
-@@ -328,7 +337,10 @@ static int acpi_processor_get_performanc
+@@ -328,7 +337,10 @@
        return result;
  }
  
@@ -144488,7 +144477,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  {
        int result = 0;
        acpi_status status = AE_OK;
-@@ -356,6 +368,7 @@ static int acpi_processor_get_performanc
+@@ -356,6 +368,7 @@
        return 0;
  }
  
@@ -144496,7 +144485,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  int acpi_processor_notify_smm(struct module *calling_module)
  {
        acpi_status status;
-@@ -416,6 +429,7 @@ int acpi_processor_notify_smm(struct mod
+@@ -416,6 +429,7 @@
  }
  
  EXPORT_SYMBOL(acpi_processor_notify_smm);
@@ -144504,7 +144493,7 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  
  #ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
  /* /proc/acpi/processor/../performance interface (DEPRECATED) */
-@@ -507,7 +521,10 @@ static void acpi_cpufreq_remove_file(str
+@@ -507,7 +521,10 @@
  }
  #endif                                /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */
  
@@ -144516,10 +144505,10 @@ diff -purN linux-2.6.27/drivers/acpi/processor_perflib.c linux-2.6.27.19-5.1/dri
  {
        int result = 0;
        acpi_status status = AE_OK;
-diff -purN linux-2.6.27/drivers/acpi/processor_throttling.c linux-2.6.27.19-5.1/drivers/acpi/processor_throttling.c
---- linux-2.6.27/drivers/acpi/processor_throttling.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/processor_throttling.c    2009-03-25 16:11:24.000000000 +0000
-@@ -274,7 +274,7 @@ static int acpi_processor_throttling_not
+diff -r 9608d5473017 drivers/acpi/processor_throttling.c
+--- a/drivers/acpi/processor_throttling.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/processor_throttling.c      Wed May 06 16:56:13 2009 +0100
+@@ -274,7 +274,7 @@
  static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
  {
        acpi_status status = 0;
@@ -144528,10 +144517,10 @@ diff -purN linux-2.6.27/drivers/acpi/processor_throttling.c linux-2.6.27.19-5.1/
  
        if (!pr)
                return -EINVAL;
-diff -purN linux-2.6.27/drivers/acpi/reboot.c linux-2.6.27.19-5.1/drivers/acpi/reboot.c
---- linux-2.6.27/drivers/acpi/reboot.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/reboot.c  2009-03-25 16:11:24.000000000 +0000
-@@ -15,9 +15,28 @@ void acpi_reboot(void)
+diff -r 9608d5473017 drivers/acpi/reboot.c
+--- a/drivers/acpi/reboot.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/reboot.c    Wed May 06 16:56:13 2009 +0100
+@@ -15,9 +15,28 @@
  
        rr = &acpi_gbl_FADT.reset_register;
  
@@ -144563,10 +144552,10 @@ diff -purN linux-2.6.27/drivers/acpi/reboot.c linux-2.6.27.19-5.1/drivers/acpi/r
                return;
  
        reset_value = acpi_gbl_FADT.reset_value;
-diff -purN linux-2.6.27/drivers/acpi/sbshc.c linux-2.6.27.19-5.1/drivers/acpi/sbshc.c
---- linux-2.6.27/drivers/acpi/sbshc.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/sbshc.c   2009-03-25 16:11:24.000000000 +0000
-@@ -258,7 +258,7 @@ extern int acpi_ec_add_query_handler(str
+diff -r 9608d5473017 drivers/acpi/sbshc.c
+--- a/drivers/acpi/sbshc.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/sbshc.c     Wed May 06 16:56:13 2009 +0100
+@@ -258,7 +258,7 @@
  static int acpi_smbus_hc_add(struct acpi_device *device)
  {
        int status;
@@ -144575,24 +144564,24 @@ diff -purN linux-2.6.27/drivers/acpi/sbshc.c linux-2.6.27.19-5.1/drivers/acpi/sb
        struct acpi_smb_hc *hc;
  
        if (!device)
-diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/scan.c
---- linux-2.6.27/drivers/acpi/scan.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/scan.c    2009-03-25 16:11:24.000000000 +0000
-@@ -276,6 +276,13 @@ int acpi_match_device_ids(struct acpi_de
+diff -r 9608d5473017 drivers/acpi/scan.c
+--- a/drivers/acpi/scan.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/scan.c      Wed May 06 16:56:13 2009 +0100
+@@ -275,6 +275,13 @@
+                         const struct acpi_device_id *ids)
  {
        const struct acpi_device_id *id;
++
 +      /*
 +       * If the device is not present, it is unnecessary to load device
 +       * driver for it.
 +       */
 +      if (!device->status.present)
 +              return -ENODEV;
-+
        if (device->flags.hardware_id) {
                for (id = ids; id->id[0]; id++) {
-                       if (!strcmp((char*)id->id, device->pnp.hardware_id))
-@@ -901,36 +908,6 @@ static void acpi_device_get_busid(struct
+@@ -901,36 +908,6 @@
        }
  }
  
@@ -144629,7 +144618,7 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
  /*
   * acpi_bay_match - see if a device is an ejectable driver bay
   *
-@@ -1013,7 +990,7 @@ static void acpi_device_set_id(struct ac
+@@ -1013,7 +990,7 @@
                   will get autoloaded and the device might still match
                   against another driver.
                */
@@ -144638,7 +144627,7 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
                        cid_add = ACPI_VIDEO_HID;
                else if (ACPI_SUCCESS(acpi_bay_match(device)))
                        cid_add = ACPI_BAY_HID;
-@@ -1025,7 +1002,7 @@ static void acpi_device_set_id(struct ac
+@@ -1025,7 +1002,7 @@
                hid = ACPI_POWER_HID;
                break;
        case ACPI_BUS_TYPE_PROCESSOR:
@@ -144647,7 +144636,7 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
                break;
        case ACPI_BUS_TYPE_SYSTEM:
                hid = ACPI_SYSTEM_HID;
-@@ -1221,15 +1198,18 @@ acpi_add_single_object(struct acpi_devic
+@@ -1221,15 +1198,18 @@
                        result = -ENODEV;
                        goto end;
                }
@@ -144675,10 +144664,12 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
                }
                break;
        default:
-@@ -1252,6 +1232,16 @@ acpi_add_single_object(struct acpi_devic
+@@ -1250,6 +1230,16 @@
+        * -------------------------------------
+        */
        acpi_device_set_id(device, parent, handle, type);
-       /*
++
++      /*
 +       * The ACPI device is attached to acpi handle before getting
 +       * the power/wakeup/peformance flags. Otherwise OS can't get
 +       * the corresponding ACPI device by the acpi handle in the course
@@ -144687,12 +144678,10 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
 +      result = acpi_device_set_context(device, type);
 +      if (result)
 +              goto end;
-+
-+      /*
+       /*
         * Power Management
-        * ----------------
-        */
-@@ -1281,8 +1271,6 @@ acpi_add_single_object(struct acpi_devic
+@@ -1281,8 +1271,6 @@
                        goto end;
        }
  
@@ -144701,7 +144690,7 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
  
        result = acpi_device_register(device, parent);
  
-@@ -1402,7 +1390,12 @@ static int acpi_bus_scan(struct acpi_dev
+@@ -1402,7 +1390,12 @@
                 * TBD: Need notifications and other detection mechanisms
                 *      in place before we can fully implement this.
                 */
@@ -144715,10 +144704,10 @@ diff -purN linux-2.6.27/drivers/acpi/scan.c linux-2.6.27.19-5.1/drivers/acpi/sca
                        status = acpi_get_next_object(ACPI_TYPE_ANY, chandle,
                                                      NULL, NULL);
                        if (ACPI_SUCCESS(status)) {
-diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/acpi/sleep/main.c
---- linux-2.6.27/drivers/acpi/sleep/main.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/sleep/main.c      2009-03-25 16:11:24.000000000 +0000
-@@ -27,6 +27,7 @@ u8 sleep_states[ACPI_S_STATE_COUNT];
+diff -r 9608d5473017 drivers/acpi/sleep/main.c
+--- a/drivers/acpi/sleep/main.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/sleep/main.c        Wed May 06 16:56:14 2009 +0100
+@@ -27,6 +27,7 @@
  static int acpi_sleep_prepare(u32 acpi_state)
  {
  #ifdef CONFIG_ACPI_SLEEP
@@ -144726,7 +144715,7 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
        /* do we have a wakeup address for S2 and S3? */
        if (acpi_state == ACPI_STATE_S3) {
                if (!acpi_wakeup_address) {
-@@ -36,6 +37,7 @@ static int acpi_sleep_prepare(u32 acpi_s
+@@ -36,6 +37,7 @@
                                (acpi_physical_address)acpi_wakeup_address);
  
        }
@@ -144734,10 +144723,11 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
        ACPI_FLUSH_CPU_CACHE();
        acpi_enable_wakeup_device_prep(acpi_state);
  #endif
-@@ -60,6 +62,18 @@ void __init acpi_old_suspend_ordering(vo
+@@ -59,6 +61,18 @@
+ {
        old_suspend_ordering = true;
  }
++
 +/*
 + * According to the ACPI specification the BIOS should make sure that ACPI is
 + * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states.  Still,
@@ -144749,11 +144739,10 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
 + * cases.
 + */
 +static bool set_sci_en_on_resume;
-+
  /**
   *    acpi_pm_disable_gpes - Disable the GPEs.
-  */
-@@ -196,10 +210,23 @@ static int acpi_suspend_enter(suspend_st
+@@ -196,9 +210,22 @@
                break;
  
        case ACPI_STATE_S3:
@@ -144767,17 +144756,16 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
 +#endif
                break;
        }
++
 +      /* If ACPI is not enabled by the BIOS, we need to enable it here. */
 +      if (set_sci_en_on_resume)
 +              acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
 +      else
 +              acpi_enable();
-+
        /* Reprogram control registers and execute _BFS */
        acpi_leave_sleep_state_prep(acpi_state);
-@@ -287,6 +314,12 @@ static int __init init_old_suspend_order
+@@ -287,6 +314,12 @@
        return 0;
  }
  
@@ -144790,10 +144778,12 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
  static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
        {
        .callback = init_old_suspend_ordering,
-@@ -296,6 +329,38 @@ static struct dmi_system_id __initdata a
+@@ -294,6 +327,38 @@
+       .matches = {
+               DMI_MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
                DMI_MATCH(DMI_BOARD_NAME, "KN9 Series(NF-CK804)"),
-               },
-       },
++              },
++      },
 +      {
 +      .callback = init_old_suspend_ordering,
 +      .ident = "HP xw4600 Workstation",
@@ -144824,12 +144814,10 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
 +      .matches = {
 +              DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
 +              DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"),
-+              },
-+      },
+               },
+       },
        {},
- };
- #endif /* CONFIG_SUSPEND */
-@@ -444,7 +509,7 @@ int acpi_pm_device_sleep_state(struct de
+@@ -444,7 +509,7 @@
        acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
        struct acpi_device *adev;
        char acpi_method[] = "_SxD";
@@ -144838,10 +144826,10 @@ diff -purN linux-2.6.27/drivers/acpi/sleep/main.c linux-2.6.27.19-5.1/drivers/ac
  
        if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
                printk(KERN_DEBUG "ACPI handle has no context!\n");
-diff -purN linux-2.6.27/drivers/acpi/system.c linux-2.6.27.19-5.1/drivers/acpi/system.c
---- linux-2.6.27/drivers/acpi/system.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/system.c  2009-03-25 16:11:24.000000000 +0000
-@@ -78,9 +78,15 @@ static ssize_t acpi_table_show(struct ko
+diff -r 9608d5473017 drivers/acpi/system.c
+--- a/drivers/acpi/system.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/system.c    Wed May 06 16:56:14 2009 +0100
+@@ -78,9 +78,15 @@
            container_of(bin_attr, struct acpi_table_attr, attr);
        struct acpi_table_header *table_header = NULL;
        acpi_status status;
@@ -144858,7 +144846,7 @@ diff -purN linux-2.6.27/drivers/acpi/system.c linux-2.6.27.19-5.1/drivers/acpi/s
                           &table_header);
        if (ACPI_FAILURE(status))
                return -ENODEV;
-@@ -95,21 +101,24 @@ static void acpi_table_attr_init(struct 
+@@ -95,21 +101,24 @@
        struct acpi_table_header *header = NULL;
        struct acpi_table_attr *attr = NULL;
  
@@ -144890,67 +144878,9 @@ diff -purN linux-2.6.27/drivers/acpi/system.c linux-2.6.27.19-5.1/drivers/acpi/s
  
        table_attr->attr.size = 0;
        table_attr->attr.read = acpi_table_show;
-diff -purN linux-2.6.27/drivers/acpi/tables/tbutils.c linux-2.6.27.19-5.1/drivers/acpi/tables/tbutils.c
---- linux-2.6.27/drivers/acpi/tables/tbutils.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables/tbutils.c  2009-03-25 16:11:24.000000000 +0000
-@@ -420,7 +420,8 @@ acpi_tb_parse_root_table(acpi_physical_a
-       /* Differentiate between RSDT and XSDT root tables */
--      if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
-+      if (rsdp->revision > 1 && rsdp->xsdt_physical_address
-+          && !acpi_gbl_force_rsdt) {
-               /*
-                * Root table is an XSDT (64-bit physical addresses). We must use the
-                * XSDT if the revision is > 1 and the XSDT pointer is present, as per
-@@ -512,10 +513,9 @@ acpi_tb_parse_root_table(acpi_physical_a
-                       if (ACPI_FAILURE(status)) {
-                               ACPI_WARNING((AE_INFO,
-                                             "Truncating %u table entries!",
--                                            (unsigned)
--                                            (acpi_gbl_root_table_list.size -
--                                             acpi_gbl_root_table_list.
--                                             count)));
-+                                            (unsigned) (table_count -
-+                                             (acpi_gbl_root_table_list.
-+                                             count - 2))));
-                               break;
-                       }
-               }
-diff -purN linux-2.6.27/drivers/acpi/tables/tbxface.c linux-2.6.27.19-5.1/drivers/acpi/tables/tbxface.c
---- linux-2.6.27/drivers/acpi/tables/tbxface.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables/tbxface.c  2009-03-25 16:11:24.000000000 +0000
-@@ -487,7 +487,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_by_ind
-  *              the RSDT/XSDT.
-  *
-  ******************************************************************************/
--static acpi_status acpi_tb_load_namespace(void)
-+static acpi_status __init acpi_tb_load_namespace(void)
- {
-       acpi_status status;
-       struct acpi_table_header *table;
-@@ -612,7 +612,7 @@ static acpi_status acpi_tb_load_namespac
-  *
-  ******************************************************************************/
--acpi_status acpi_load_tables(void)
-+acpi_status __init acpi_load_tables(void)
- {
-       acpi_status status;
-@@ -630,9 +630,6 @@ acpi_status acpi_load_tables(void)
-       return_ACPI_STATUS(status);
- }
--ACPI_EXPORT_SYMBOL(acpi_load_tables)
--
--
- /*******************************************************************************
-  *
-  * FUNCTION:    acpi_install_table_handler
-diff -purN linux-2.6.27/drivers/acpi/tables.c linux-2.6.27.19-5.1/drivers/acpi/tables.c
---- linux-2.6.27/drivers/acpi/tables.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/tables.c  2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/tables.c
+--- a/drivers/acpi/tables.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables.c    Wed May 06 16:56:14 2009 +0100
 @@ -32,6 +32,7 @@
  #include <linux/errno.h>
  #include <linux/acpi.h>
@@ -144959,7 +144889,7 @@ diff -purN linux-2.6.27/drivers/acpi/tables.c linux-2.6.27.19-5.1/drivers/acpi/t
  
  #define PREFIX                        "ACPI: "
  
-@@ -282,6 +283,37 @@ static void __init check_multiple_madt(v
+@@ -282,6 +283,37 @@
        return;
  }
  
@@ -144997,7 +144927,7 @@ diff -purN linux-2.6.27/drivers/acpi/tables.c linux-2.6.27.19-5.1/drivers/acpi/t
  /*
   * acpi_table_init()
   *
-@@ -293,7 +325,17 @@ static void __init check_multiple_madt(v
+@@ -293,7 +325,17 @@
  
  int __init acpi_table_init(void)
  {
@@ -145016,9 +144946,67 @@ diff -purN linux-2.6.27/drivers/acpi/tables.c linux-2.6.27.19-5.1/drivers/acpi/t
        check_multiple_madt();
        return 0;
  }
-diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/thermal.c
---- linux-2.6.27/drivers/acpi/thermal.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/thermal.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/tables/tbutils.c
+--- a/drivers/acpi/tables/tbutils.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables/tbutils.c    Wed May 06 16:56:14 2009 +0100
+@@ -420,7 +420,8 @@
+       /* Differentiate between RSDT and XSDT root tables */
+-      if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
++      if (rsdp->revision > 1 && rsdp->xsdt_physical_address
++          && !acpi_gbl_force_rsdt) {
+               /*
+                * Root table is an XSDT (64-bit physical addresses). We must use the
+                * XSDT if the revision is > 1 and the XSDT pointer is present, as per
+@@ -512,10 +513,9 @@
+                       if (ACPI_FAILURE(status)) {
+                               ACPI_WARNING((AE_INFO,
+                                             "Truncating %u table entries!",
+-                                            (unsigned)
+-                                            (acpi_gbl_root_table_list.size -
+-                                             acpi_gbl_root_table_list.
+-                                             count)));
++                                            (unsigned) (table_count -
++                                             (acpi_gbl_root_table_list.
++                                             count - 2))));
+                               break;
+                       }
+               }
+diff -r 9608d5473017 drivers/acpi/tables/tbxface.c
+--- a/drivers/acpi/tables/tbxface.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/tables/tbxface.c    Wed May 06 16:56:14 2009 +0100
+@@ -487,7 +487,7 @@
+  *              the RSDT/XSDT.
+  *
+  ******************************************************************************/
+-static acpi_status acpi_tb_load_namespace(void)
++static acpi_status __init acpi_tb_load_namespace(void)
+ {
+       acpi_status status;
+       struct acpi_table_header *table;
+@@ -612,7 +612,7 @@
+  *
+  ******************************************************************************/
+-acpi_status acpi_load_tables(void)
++acpi_status __init acpi_load_tables(void)
+ {
+       acpi_status status;
+@@ -629,9 +629,6 @@
+       return_ACPI_STATUS(status);
+ }
+-
+-ACPI_EXPORT_SYMBOL(acpi_load_tables)
+-
+ /*******************************************************************************
+  *
+diff -r 9608d5473017 drivers/acpi/thermal.c
+--- a/drivers/acpi/thermal.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/thermal.c   Wed May 06 16:56:14 2009 +0100
 @@ -42,6 +42,7 @@
  #include <linux/kmod.h>
  #include <linux/seq_file.h>
@@ -145027,7 +145015,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
  #include <asm/uaccess.h>
  #include <linux/thermal.h>
  #include <acpi/acpi_bus.h>
-@@ -246,18 +247,18 @@ static const struct file_operations acpi
+@@ -246,18 +247,18 @@
  static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
  {
        acpi_status status = AE_OK;
@@ -145049,7 +145037,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n",
                          tz->temperature));
  
-@@ -267,17 +268,16 @@ static int acpi_thermal_get_temperature(
+@@ -267,17 +268,16 @@
  static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
  {
        acpi_status status = AE_OK;
@@ -145070,7 +145058,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n",
                          tz->polling_frequency));
  
-@@ -356,6 +356,7 @@ do {       \
+@@ -356,6 +356,7 @@
  static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
  {
        acpi_status status = AE_OK;
@@ -145078,7 +145066,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
        struct acpi_handle_list devices;
        int valid = 0;
        int i;
-@@ -363,7 +364,8 @@ static int acpi_thermal_trips_update(str
+@@ -363,7 +364,8 @@
        /* Critical Shutdown (required) */
        if (flag & ACPI_TRIPS_CRITICAL) {
                status = acpi_evaluate_integer(tz->device->handle,
@@ -145088,7 +145076,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
                /*
                 * Treat freezing temperatures as invalid as well; some
                 * BIOSes return really low values and cause reboots at startup.
-@@ -399,12 +401,13 @@ static int acpi_thermal_trips_update(str
+@@ -399,12 +401,13 @@
        /* Critical Sleep (optional) */
        if (flag & ACPI_TRIPS_HOT) {
                status = acpi_evaluate_integer(tz->device->handle,
@@ -145103,7 +145091,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
                        tz->trips.hot.flags.valid = 1;
                        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                        "Found hot threshold [%lu]\n",
-@@ -418,33 +421,40 @@ static int acpi_thermal_trips_update(str
+@@ -418,33 +421,40 @@
                if (psv == -1) {
                        status = AE_SUPPORT;
                } else if (psv > 0) {
@@ -145149,7 +145137,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
                        }
                }
        }
-@@ -479,7 +489,7 @@ static int acpi_thermal_trips_update(str
+@@ -479,7 +489,7 @@
  
                if (flag & ACPI_TRIPS_ACTIVE) {
                        status = acpi_evaluate_integer(tz->device->handle,
@@ -145158,7 +145146,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
                        if (ACPI_FAILURE(status)) {
                                tz->trips.active[i].flags.valid = 0;
                                if (i == 0)
-@@ -500,8 +510,10 @@ static int acpi_thermal_trips_update(str
+@@ -500,8 +510,10 @@
                                                tz->trips.active[i - 2].temperature :
                                                CELSIUS_TO_KELVIN(act));
                                break;
@@ -145170,7 +145158,7 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
                }
  
                name[2] = 'L';
-@@ -1629,6 +1641,66 @@ static int acpi_thermal_get_info(struct 
+@@ -1629,6 +1641,66 @@
        return 0;
  }
  
@@ -145237,10 +145225,11 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
  static int acpi_thermal_add(struct acpi_device *device)
  {
        int result = 0;
-@@ -1659,6 +1731,18 @@ static int acpi_thermal_add(struct acpi_
+@@ -1658,6 +1730,18 @@
+       result = acpi_thermal_register_thermal_zone(tz);
        if (result)
                goto free_memory;
++
 +      if (dmi_check_system(thermal_psv_dmi_table)) {
 +              if (tz->trips.passive.flags.valid &&
 +                  tz->trips.passive.temperature > CELSIUS_TO_KELVIN(85)) {
@@ -145252,14 +145241,13 @@ diff -purN linux-2.6.27/drivers/acpi/thermal.c linux-2.6.27.19-5.1/drivers/acpi/
 +                      acpi_thermal_set_polling(tz, 5);
 +              }
 +      }
-+
        result = acpi_thermal_add_fs(device);
        if (result)
-               goto unregister_thermal_zone;
-diff -purN linux-2.6.27/drivers/acpi/utilities/uteval.c linux-2.6.27.19-5.1/drivers/acpi/utilities/uteval.c
---- linux-2.6.27/drivers/acpi/utilities/uteval.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utilities/uteval.c        2009-03-25 16:11:24.000000000 +0000
-@@ -69,6 +69,7 @@ static char *acpi_interfaces_supported[]
+diff -r 9608d5473017 drivers/acpi/utilities/uteval.c
+--- a/drivers/acpi/utilities/uteval.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utilities/uteval.c  Wed May 06 16:56:14 2009 +0100
+@@ -69,6 +69,7 @@
        "Windows 2001.1",       /* Windows Server 2003 */
        "Windows 2001.1 SP1",   /* Windows Server 2003 SP1 - Added 03/2006 */
        "Windows 2006",         /* Windows Vista - Added 03/2006 */
@@ -145267,10 +145255,10 @@ diff -purN linux-2.6.27/drivers/acpi/utilities/uteval.c linux-2.6.27.19-5.1/driv
  
        /* Feature Group Strings */
  
-diff -purN linux-2.6.27/drivers/acpi/utilities/utglobal.c linux-2.6.27.19-5.1/drivers/acpi/utilities/utglobal.c
---- linux-2.6.27/drivers/acpi/utilities/utglobal.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utilities/utglobal.c      2009-03-25 16:11:24.000000000 +0000
-@@ -76,6 +76,7 @@ u8 acpi_gbl_method_executing = FALSE;
+diff -r 9608d5473017 drivers/acpi/utilities/utglobal.c
+--- a/drivers/acpi/utilities/utglobal.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utilities/utglobal.c        Wed May 06 16:56:14 2009 +0100
+@@ -76,6 +76,7 @@
  /* System flags */
  
  u32 acpi_gbl_startup_flags = 0;
@@ -145278,10 +145266,10 @@ diff -purN linux-2.6.27/drivers/acpi/utilities/utglobal.c linux-2.6.27.19-5.1/dr
  
  /* System starts uninitialized */
  
-diff -purN linux-2.6.27/drivers/acpi/utils.c linux-2.6.27.19-5.1/drivers/acpi/utils.c
---- linux-2.6.27/drivers/acpi/utils.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/utils.c   2009-03-25 16:11:24.000000000 +0000
-@@ -256,7 +256,7 @@ EXPORT_SYMBOL(acpi_extract_package);
+diff -r 9608d5473017 drivers/acpi/utils.c
+--- a/drivers/acpi/utils.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/utils.c     Wed May 06 16:56:14 2009 +0100
+@@ -256,7 +256,7 @@
  acpi_status
  acpi_evaluate_integer(acpi_handle handle,
                      acpi_string pathname,
@@ -145290,7 +145278,7 @@ diff -purN linux-2.6.27/drivers/acpi/utils.c linux-2.6.27.19-5.1/drivers/acpi/ut
  {
        acpi_status status = AE_OK;
        union acpi_object *element;
-@@ -288,7 +288,7 @@ acpi_evaluate_integer(acpi_handle handle
+@@ -288,7 +288,7 @@
        *data = element->integer.value;
        kfree(element);
  
@@ -145299,9 +145287,9 @@ diff -purN linux-2.6.27/drivers/acpi/utils.c linux-2.6.27.19-5.1/drivers/acpi/ut
  
        return AE_OK;
  }
-diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/video.c
---- linux-2.6.27/drivers/acpi/video.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/video.c   2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/video.c
+--- a/drivers/acpi/video.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/acpi/video.c     Wed May 06 16:56:14 2009 +0100
 @@ -36,6 +36,7 @@
  #include <linux/backlight.h>
  #include <linux/thermal.h>
@@ -145310,7 +145298,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  #include <asm/uaccess.h>
  
  #include <acpi/acpi_bus.h>
-@@ -291,20 +292,20 @@ static int acpi_video_device_lcd_set_lev
+@@ -291,20 +292,20 @@
                        int level);
  static int acpi_video_device_lcd_get_level_current(
                        struct acpi_video_device *device,
@@ -145334,7 +145322,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        int i;
        struct acpi_video_device *vd =
                (struct acpi_video_device *)bl_get_data(bd);
-@@ -336,7 +337,7 @@ static struct backlight_ops acpi_backlig
+@@ -336,7 +337,7 @@
  /*video output device sysfs support*/
  static int acpi_video_output_get(struct output_device *od)
  {
@@ -145343,7 +145331,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        struct acpi_video_device *vd =
                (struct acpi_video_device *)dev_get_drvdata(&od->dev);
        acpi_video_device_get_state(vd, &state);
-@@ -370,7 +371,7 @@ static int video_get_cur_state(struct th
+@@ -370,7 +371,7 @@
  {
        struct acpi_device *device = cdev->devdata;
        struct acpi_video_device *video = acpi_driver_data(device);
@@ -145352,7 +145340,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        int state;
  
        acpi_video_device_lcd_get_level_current(video, &level);
-@@ -410,7 +411,7 @@ static struct thermal_cooling_device_ops
+@@ -410,7 +411,7 @@
  /* device */
  
  static int
@@ -145361,7 +145349,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  {
        int status;
  
-@@ -421,7 +422,7 @@ acpi_video_device_query(struct acpi_vide
+@@ -421,7 +422,7 @@
  
  static int
  acpi_video_device_get_state(struct acpi_video_device *device,
@@ -145370,7 +145358,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  {
        int status;
  
-@@ -436,7 +437,7 @@ acpi_video_device_set_state(struct acpi_
+@@ -436,7 +437,7 @@
        int status;
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
@@ -145379,7 +145367,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
  
        arg0.integer.value = state;
-@@ -482,6 +483,7 @@ acpi_video_device_lcd_set_level(struct a
+@@ -482,6 +483,7 @@
        int status = AE_OK;
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
@@ -145387,7 +145375,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
  
        arg0.integer.value = level;
-@@ -490,12 +492,16 @@ acpi_video_device_lcd_set_level(struct a
+@@ -490,12 +492,16 @@
                status = acpi_evaluate_object(device->dev->handle, "_BCM",
                                              &args, NULL);
        device->brightness->curr = level;
@@ -145405,7 +145393,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  {
        if (device->cap._BQC)
                return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL,
-@@ -549,7 +555,7 @@ static int
+@@ -549,7 +555,7 @@
  acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
  {
        int status;
@@ -145414,7 +145402,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        union acpi_object arg0 = { ACPI_TYPE_INTEGER };
        struct acpi_object_list args = { 1, &arg0 };
  
-@@ -564,7 +570,7 @@ acpi_video_bus_set_POST(struct acpi_vide
+@@ -564,7 +570,7 @@
  }
  
  static int
@@ -145423,7 +145411,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  {
        int status;
  
-@@ -575,7 +581,7 @@ acpi_video_bus_get_POST(struct acpi_vide
+@@ -575,7 +581,7 @@
  
  static int
  acpi_video_bus_POST_options(struct acpi_video_bus *video,
@@ -145432,10 +145420,13 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  {
        int status;
  
-@@ -627,6 +633,16 @@ acpi_video_bus_DOS(struct acpi_video_bus
- }
+@@ -624,6 +630,16 @@
  
- /*
+       Failed:
+       return status;
++}
++
++/*
 + * Simple comparison function used to sort backlight levels.
 + */
 +
@@ -145443,13 +145434,10 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
 +acpi_video_cmp_level(const void *a, const void *b)
 +{
 +      return *(int *)a - *(int *)b;
-+}
-+
-+/*
-  *  Arg:      
-  *    device  : video output device (LCD, CRT, ..)
-  *
-@@ -677,6 +693,10 @@ acpi_video_init_brightness(struct acpi_v
+ }
+ /*
+@@ -677,6 +693,10 @@
                count++;
        }
  
@@ -145460,7 +145448,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        if (count < 2)
                goto out_free_levels;
  
-@@ -711,7 +731,7 @@ static void acpi_video_device_find_cap(s
+@@ -711,7 +731,7 @@
  {
        acpi_handle h_dummy1;
        u32 max_level = 0;
@@ -145469,7 +145457,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
        memset(&device->cap, 0, sizeof(device->cap));
  
-@@ -739,7 +759,19 @@ static void acpi_video_device_find_cap(s
+@@ -739,7 +759,19 @@
                device->cap._DSS = 1;
        }
  
@@ -145490,7 +145478,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
        if (device->cap._BCL && device->cap._BCM && max_level > 0) {
                int result;
-@@ -785,18 +817,21 @@ static void acpi_video_device_find_cap(s
+@@ -785,18 +817,21 @@
                        printk(KERN_ERR PREFIX "Create sysfs link\n");
  
        }
@@ -145523,7 +145511,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  }
  
  /*
-@@ -842,11 +877,16 @@ static void acpi_video_bus_find_cap(stru
+@@ -842,10 +877,15 @@
  static int acpi_video_bus_check(struct acpi_video_bus *video)
  {
        acpi_status status = -ENOENT;
@@ -145532,16 +145520,15 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
        if (!video)
                return -EINVAL;
++
 +      dev = acpi_get_physical_pci_device(video->device->handle);
 +      if (!dev)
 +              return -ENODEV;
 +      put_device(dev);
-+
        /* Since there is no HID, CID and so on for VGA driver, we have
         * to check well known required nodes.
-        */
-@@ -918,7 +958,7 @@ static int acpi_video_device_state_seq_s
+@@ -918,7 +958,7 @@
  {
        int status;
        struct acpi_video_device *dev = seq->private;
@@ -145550,7 +145537,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
  
        if (!dev)
-@@ -927,14 +967,14 @@ static int acpi_video_device_state_seq_s
+@@ -927,14 +967,14 @@
        status = acpi_video_device_get_state(dev, &state);
        seq_printf(seq, "state:     ");
        if (ACPI_SUCCESS(status))
@@ -145567,7 +145554,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        else
                seq_printf(seq, "<not supported>\n");
  
-@@ -992,7 +1032,7 @@ acpi_video_device_brightness_seq_show(st
+@@ -992,7 +1032,7 @@
        }
  
        seq_printf(seq, "levels: ");
@@ -145576,7 +145563,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
                seq_printf(seq, " %d", dev->brightness->levels[i]);
        seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr);
  
-@@ -1031,7 +1071,7 @@ acpi_video_device_write_brightness(struc
+@@ -1031,7 +1071,7 @@
                return -EFAULT;
  
        /* validate through the list of available levels */
@@ -145585,7 +145572,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
                if (level == dev->brightness->levels[i]) {
                        if (ACPI_SUCCESS
                            (acpi_video_device_lcd_set_level(dev, level)))
-@@ -1217,7 +1257,7 @@ static int acpi_video_bus_ROM_open_fs(st
+@@ -1217,7 +1257,7 @@
  static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
  {
        struct acpi_video_bus *video = seq->private;
@@ -145594,7 +145581,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        int status;
  
  
-@@ -1232,7 +1272,7 @@ static int acpi_video_bus_POST_info_seq_
+@@ -1232,7 +1272,7 @@
                        printk(KERN_WARNING PREFIX
                               "This indicates a BIOS bug. Please contact the manufacturer.\n");
                }
@@ -145603,7 +145590,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
                seq_printf(seq, "can POST: <integrated video>");
                if (options & 2)
                        seq_printf(seq, " <PCI video>");
-@@ -1256,7 +1296,7 @@ static int acpi_video_bus_POST_seq_show(
+@@ -1256,7 +1296,7 @@
  {
        struct acpi_video_bus *video = seq->private;
        int status;
@@ -145612,7 +145599,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
  
        if (!video)
-@@ -1303,7 +1343,7 @@ acpi_video_bus_write_POST(struct file *f
+@@ -1303,7 +1343,7 @@
        struct seq_file *m = file->private_data;
        struct acpi_video_bus *video = m->private;
        char str[12] = { 0 };
@@ -145621,7 +145608,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
  
        if (!video || count + 1 > sizeof str)
-@@ -1473,7 +1513,7 @@ static int
+@@ -1473,7 +1513,7 @@
  acpi_video_bus_get_one_device(struct acpi_device *device,
                              struct acpi_video_bus *video)
  {
@@ -145630,7 +145617,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        int status;
        struct acpi_video_device *data;
        struct acpi_video_device_attrib* attribute;
-@@ -1684,7 +1724,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1684,7 +1724,7 @@
        max = max_below = 0;
        min = min_above = 255;
        /* Find closest level to level_current */
@@ -145639,7 +145626,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
                l = device->brightness->levels[i];
                if (abs(l - level_current) < abs(delta)) {
                        delta = l - level_current;
-@@ -1694,7 +1734,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1694,7 +1734,7 @@
        }
        /* Ajust level_current to closest available level */
        level_current += delta;
@@ -145648,7 +145635,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
                l = device->brightness->levels[i];
                if (l < min)
                        min = l;
-@@ -1724,7 +1764,7 @@ acpi_video_get_next_level(struct acpi_vi
+@@ -1724,7 +1764,7 @@
  static void
  acpi_video_switch_brightness(struct acpi_video_device *device, int event)
  {
@@ -145657,7 +145644,7 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
        if (!device->brightness)
                return;
        acpi_video_device_lcd_get_level_current(device, &level_current);
-@@ -1978,6 +2018,12 @@ static int acpi_video_bus_add(struct acp
+@@ -1978,6 +2018,12 @@
                        device->pnp.bus_id[3] = '0' + instance;
                instance ++;
        }
@@ -145670,9 +145657,9 @@ diff -purN linux-2.6.27/drivers/acpi/video.c linux-2.6.27.19-5.1/drivers/acpi/vi
  
        video->device = device;
        strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
-diff -purN linux-2.6.27/drivers/acpi/video_detect.c linux-2.6.27.19-5.1/drivers/acpi/video_detect.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/acpi/video_detect.c    2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/acpi/video_detect.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/acpi/video_detect.c      Wed May 06 16:56:14 2009 +0100
 @@ -0,0 +1,283 @@
 +/*
 + *  Copyright (C) 2008       SuSE Linux Products GmbH
@@ -145957,10 +145944,10 @@ diff -purN linux-2.6.27/drivers/acpi/video_detect.c linux-2.6.27.19-5.1/drivers/
 +      return 1;
 +}
 +__setup("acpi_display_output=", acpi_display_output);
-diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.c
---- linux-2.6.27/drivers/ata/ahci.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/ahci.c     2009-03-25 16:11:13.000000000 +0000
-@@ -267,8 +267,8 @@ struct ahci_port_priv {
+diff -r 9608d5473017 drivers/ata/ahci.c
+--- a/drivers/ata/ahci.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/ahci.c       Wed May 06 16:56:14 2009 +0100
+@@ -267,8 +267,8 @@
                                                 * per PM slot */
  };
  
@@ -145971,7 +145958,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
  static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
  static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
  static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
-@@ -820,10 +820,10 @@ static unsigned ahci_scr_offset(struct a
+@@ -820,10 +820,10 @@
        return 0;
  }
  
@@ -145985,7 +145972,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
  
        if (offset) {
                *val = readl(port_mmio + offset);
-@@ -832,10 +832,10 @@ static int ahci_scr_read(struct ata_port
+@@ -832,10 +832,10 @@
        return -EINVAL;
  }
  
@@ -145999,7 +145986,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
  
        if (offset) {
                writel(val, port_mmio + offset);
-@@ -973,7 +973,7 @@ static void ahci_disable_alpm(struct ata
+@@ -973,7 +973,7 @@
        writel(PORT_IRQ_PHYRDY, port_mmio + PORT_IRQ_STAT);
  
        /* go ahead and clean out PhyRdy Change from Serror too */
@@ -146008,7 +145995,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
  
        /*
         * Clear flag to indicate that we should ignore all PhyRdy
-@@ -1937,8 +1937,8 @@ static void ahci_error_intr(struct ata_p
+@@ -1937,8 +1937,8 @@
        ata_ehi_push_desc(host_ehi, "irq_stat 0x%08x", irq_stat);
  
        /* AHCI needs SError cleared; otherwise, it might lock up */
@@ -146019,7 +146006,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
        host_ehi->serror |= serror;
  
        /* some controllers set IRQ_IF_ERR on device errors, ignore it */
-@@ -2027,7 +2027,7 @@ static void ahci_port_intr(struct ata_po
+@@ -2027,7 +2027,7 @@
        if ((hpriv->flags & AHCI_HFLAG_NO_HOTPLUG) &&
                (status & PORT_IRQ_PHYRDY)) {
                status &= ~PORT_IRQ_PHYRDY;
@@ -146028,7 +146015,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
        }
  
        if (unlikely(status & PORT_IRQ_ERROR)) {
-@@ -2528,6 +2528,32 @@ static void ahci_p5wdh_workaround(struct
+@@ -2528,6 +2528,32 @@
        }
  }
  
@@ -146061,7 +146048,7 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
  static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
  {
        static int printed_version;
-@@ -2623,6 +2649,12 @@ static int ahci_init_one(struct pci_dev 
+@@ -2623,6 +2649,12 @@
                }
        }
  
@@ -146074,10 +146061,10 @@ diff -purN linux-2.6.27/drivers/ata/ahci.c linux-2.6.27.19-5.1/drivers/ata/ahci.
        /* CAP.NP sometimes indicate the index of the last enabled
         * port, at other times, that of the last possible port, so
         * determining the maximum port number requires looking at
-diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/ata_piix.c
---- linux-2.6.27/drivers/ata/ata_piix.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/ata_piix.c 2009-03-25 16:11:13.000000000 +0000
-@@ -165,8 +165,10 @@ static void piix_set_dmamode(struct ata_
+diff -r 9608d5473017 drivers/ata/ata_piix.c
+--- a/drivers/ata/ata_piix.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/ata_piix.c   Wed May 06 16:56:14 2009 +0100
+@@ -165,8 +165,10 @@
  static void ich_set_dmamode(struct ata_port *ap, struct ata_device *adev);
  static int ich_pata_cable_detect(struct ata_port *ap);
  static u8 piix_vmw_bmdma_status(struct ata_port *ap);
@@ -146090,16 +146077,16 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
  #ifdef CONFIG_PM
  static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
  static int piix_pci_device_resume(struct pci_dev *pdev);
-@@ -278,12 +280,15 @@ static const struct pci_device_id piix_p
+@@ -278,12 +280,15 @@
        /* SATA Controller IDE (PCH) */
        { 0x8086, 0x3b20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
        /* SATA Controller IDE (PCH) */
 +      { 0x8086, 0x3b21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
 +      /* SATA Controller IDE (PCH) */
        { 0x8086, 0x3b26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
-       /* SATA Controller IDE (PCH) */
-+      { 0x8086, 0x3b28, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
 +      /* SATA Controller IDE (PCH) */
++      { 0x8086, 0x3b28, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
+       /* SATA Controller IDE (PCH) */
        { 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
        /* SATA Controller IDE (PCH) */
        { 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
@@ -146107,7 +146094,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
        { }     /* terminate list */
  };
  
-@@ -582,6 +587,7 @@ static const struct ich_laptop ich_lapto
+@@ -582,6 +587,7 @@
        { 0x27DF, 0x1025, 0x0110 },     /* ICH7 on Acer 3682WLMi */
        { 0x27DF, 0x1043, 0x1267 },     /* ICH7 on Asus W5F */
        { 0x27DF, 0x103C, 0x30A1 },     /* ICH7 on HP Compaq nc2400 */
@@ -146115,7 +146102,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
        { 0x24CA, 0x1025, 0x0061 },     /* ICH4 on ACER Aspire 2023WLMi */
        { 0x24CA, 0x1025, 0x003d },     /* ICH4 on ACER TM290 */
        { 0x266F, 0x1025, 0x0066 },     /* ICH6 on ACER Aspire 1694WLMi */
-@@ -885,23 +891,9 @@ static void ich_set_dmamode(struct ata_p
+@@ -885,23 +891,9 @@
   * Serial ATA Index/Data Pair Superset Registers access
   *
   * Beginning from ICH8, there's a sane way to access SCRs using index
@@ -146142,7 +146129,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
   */
  static const int piix_sidx_map[] = {
        [SCR_STATUS]    = 0,
-@@ -909,120 +901,90 @@ static const int piix_sidx_map[] = {
+@@ -909,120 +901,90 @@
        [SCR_CONTROL]   = 1,
  };
  
@@ -146167,31 +146154,20 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 -      piix_sidpr_sel(dev, reg);
 -      return ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
 -}
-+      struct piix_host_priv *hpriv = link->ap->host->private_data;
+-
 -static void piix_sidpr_write(struct ata_device *dev, unsigned int reg, u32 val)
 -{
 -      struct piix_host_priv *hpriv = dev->link->ap->host->private_data;
-+      if (reg >= ARRAY_SIZE(piix_sidx_map))
-+              return -EINVAL;
+-
 -      piix_sidpr_sel(dev, reg);
 -      iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA);
-+      piix_sidpr_sel(link, reg);
-+      *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
-+      return 0;
- }
+-}
+-
 -static u32 piix_merge_scr(u32 val0, u32 val1, const int * const *merge_tbl)
-+static irqreturn_t piix_interrupt(int irq, void *dev_instance)
- {
+-{
 -      u32 val = 0;
 -      int i, mi;
-+      struct ata_host *host = dev_instance;
-+      unsigned int i;
-+      unsigned int handled = 0;
-+      unsigned long flags;
+-
 -      for (i = 0, mi = 0; i < 32 / 4; i++) {
 -              u8 c0 = (val0 >> (i * 4)) & 0xf;
 -              u8 c1 = (val1 >> (i * 4)) & 0xf;
@@ -146220,8 +146196,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 -      done:
 -              val |= merged << (i * 4);
 -      }
-+      spin_lock_irqsave(&host->lock, flags);
+-
 -      return val;
 -}
 -
@@ -146240,6 +146215,46 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 -              NULL,
 -      };
 -      u32 v0, v1;
++      struct piix_host_priv *hpriv = link->ap->host->private_data;
+       if (reg >= ARRAY_SIZE(piix_sidx_map))
+               return -EINVAL;
+-      if (!(ap->flags & ATA_FLAG_SLAVE_POSS)) {
+-              *val = piix_sidpr_read(&ap->link.device[0], reg);
+-              return 0;
+-      }
+-
+-      v0 = piix_sidpr_read(&ap->link.device[0], reg);
+-      v1 = piix_sidpr_read(&ap->link.device[1], reg);
+-
+-      switch (reg) {
+-      case SCR_STATUS:
+-              *val = piix_merge_scr(v0, v1, sstatus_merge_tbl);
+-              break;
+-      case SCR_ERROR:
+-              *val = v0 | v1;
+-              break;
+-      case SCR_CONTROL:
+-              *val = piix_merge_scr(v0, v1, scontrol_merge_tbl);
+-              break;
+-      }
+-
++      piix_sidpr_sel(link, reg);
++      *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA);
+       return 0;
+ }
+-static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val)
++static irqreturn_t piix_interrupt(int irq, void *dev_instance)
+ {
++      struct ata_host *host = dev_instance;
++      unsigned int i;
++      unsigned int handled = 0;
++      unsigned long flags;
++
++      spin_lock_irqsave(&host->lock, flags);
++
 +      for (i = 0; i < host->n_ports; i++) {
 +              struct ata_port *ap = host->ports[i];
 +              struct ata_queued_cmd *qc;
@@ -146253,9 +146268,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +                      handled |= ata_sff_host_intr(ap, qc);
 +                      continue;
 +              }
--      if (reg >= ARRAY_SIZE(piix_sidx_map))
--              return -EINVAL;
++
 +              /*
 +               * Control reaches here if HSM is not expecting IRQ.
 +               * If the controller is actually asserting IRQ line,
@@ -146267,10 +146280,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +               */
 +              if (unlikely(!ap->ioaddr.bmdma_addr))
 +                      continue;
--      if (!(ap->flags & ATA_FLAG_SLAVE_POSS)) {
--              *val = piix_sidpr_read(&ap->link.device[0], reg);
--              return 0;
++
 +              host_stat = ap->ops->bmdma_status(ap);
 +              if (!(host_stat & ATA_DMA_INTR))
 +                      continue;
@@ -146281,32 +146291,16 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +              ap->ops->sff_check_status(ap);
 +              ap->ops->sff_irq_clear(ap);
 +              handled |= 1;
-       }
--      v0 = piix_sidpr_read(&ap->link.device[0], reg);
--      v1 = piix_sidpr_read(&ap->link.device[1], reg);
--
--      switch (reg) {
--      case SCR_STATUS:
--              *val = piix_merge_scr(v0, v1, sstatus_merge_tbl);
--              break;
--      case SCR_ERROR:
--              *val = v0 | v1;
--              break;
--      case SCR_CONTROL:
--              *val = piix_merge_scr(v0, v1, scontrol_merge_tbl);
--              break;
--      }
++      }
++
 +      spin_unlock_irqrestore(&host->lock, flags);
--      return 0;
++
 +      return IRQ_RETVAL(handled);
- }
--static int piix_sidpr_scr_write(struct ata_port *ap, unsigned int reg, u32 val)
++}
++
 +static int piix_sidpr_scr_write(struct ata_link *link,
 +                              unsigned int reg, u32 val)
- {
++{
 +      struct piix_host_priv *hpriv = link->ap->host->private_data;
 +
        if (reg >= ARRAY_SIZE(piix_sidx_map))
@@ -146322,10 +146316,11 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
        return 0;
  }
  
-@@ -1157,6 +1119,28 @@ static int piix_broken_suspend(void)
+@@ -1156,6 +1118,28 @@
+       for (i = 0; i < ARRAY_SIZE(oemstrs); i++)
                if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
                        return 1;
++
 +      /* TECRA M4 sometimes forgets its identify and reports bogus
 +       * DMI information.  As the bogus information is a bit
 +       * generic, match as many entries as possible.  This manual
@@ -146347,11 +146342,10 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +          !strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
 +          !strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
 +              return 1;
-+
        return 0;
  }
-@@ -1363,28 +1347,28 @@ static const int *__devinit piix_init_sa
+@@ -1363,28 +1347,28 @@
        return map;
  }
  
@@ -146387,7 +146381,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
  
        hpriv->sidpr = pcim_iomap_table(pdev)[PIIX_SIDPR_BAR];
  
-@@ -1392,7 +1376,7 @@ static void __devinit piix_init_sidpr(st
+@@ -1392,7 +1376,7 @@
         * Give it a test drive by inhibiting power save modes which
         * we'll do anyway.
         */
@@ -146396,7 +146390,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
  
        /* if IPM is already 3, SCR access is probably working.  Don't
         * un-inhibit power save modes as BIOS might have inhibited
-@@ -1400,18 +1384,30 @@ static void __devinit piix_init_sidpr(st
+@@ -1400,18 +1384,30 @@
         */
        if ((scontrol & 0xf00) != 0x300) {
                scontrol |= 0x300;
@@ -146410,9 +146404,11 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
                                   "SIDPR is available but doesn't work\n");
 -                      return;
 +                      return 0;
-+              }
-+      }
-+
+               }
+       }
+-      host->ports[0]->ops = &piix_sidpr_sata_ops;
+-      host->ports[1]->ops = &piix_sidpr_sata_ops;
 +      /* okay, SCRs available, set ops and ask libata for slave_link */
 +      for (i = 0; i < 2; i++) {
 +              struct ata_port *ap = host->ports[i];
@@ -146423,16 +146419,14 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +                      rc = ata_slave_link_init(ap);
 +                      if (rc)
 +                              return rc;
-               }
-       }
--      host->ports[0]->ops = &piix_sidpr_sata_ops;
--      host->ports[1]->ops = &piix_sidpr_sata_ops;
++              }
++      }
++
 +      return 0;
  }
  
  static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
-@@ -1449,6 +1445,32 @@ static void piix_iocfg_bit18_quirk(struc
+@@ -1449,6 +1445,32 @@
        }
  }
  
@@ -146465,10 +146459,11 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
  /**
   *    piix_init_one - Register PIIX ATA PCI device with kernel services
   *    @pdev: PCI device to register
-@@ -1484,6 +1506,14 @@ static int __devinit piix_init_one(struc
+@@ -1483,6 +1505,14 @@
+       /* no hotplugging support (FIXME) */
        if (!in_module_init)
                return -ENODEV;
++
 +      if (piix_broken_system_poweroff(pdev)) {
 +              piix_port_info[ent->driver_data].flags |=
 +                              ATA_FLAG_NO_POWEROFF_SPINDOWN |
@@ -146476,11 +146471,10 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
 +              dev_info(&pdev->dev, "quirky BIOS, skipping spindown "
 +                              "on poweroff and hibernation\n");
 +      }
-+
        port_info[0] = piix_port_info[ent->driver_data];
        port_info[1] = piix_port_info[ent->driver_data];
-@@ -1521,7 +1551,9 @@ static int __devinit piix_init_one(struc
+@@ -1521,7 +1551,9 @@
        /* initialize controller */
        if (port_flags & ATA_FLAG_SATA) {
                piix_init_pcs(host, piix_map_db_table[ent->driver_data]);
@@ -146491,7 +146485,7 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
        }
  
        /* apply IOCFG bit18 quirk */
-@@ -1547,7 +1579,7 @@ static int __devinit piix_init_one(struc
+@@ -1547,7 +1579,7 @@
        }
  
        pci_set_master(pdev);
@@ -146500,10 +146494,10 @@ diff -purN linux-2.6.27/drivers/ata/ata_piix.c linux-2.6.27.19-5.1/drivers/ata/a
  }
  
  static int __init piix_init(void)
-diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/ata/libata-acpi.c
---- linux-2.6.27/drivers/ata/libata-acpi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-acpi.c      2009-03-25 16:11:13.000000000 +0000
-@@ -120,21 +120,6 @@ static void ata_acpi_associate_ide_port(
+diff -r 9608d5473017 drivers/ata/libata-acpi.c
+--- a/drivers/ata/libata-acpi.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-acpi.c        Wed May 06 16:56:14 2009 +0100
+@@ -120,21 +120,6 @@
                ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
  }
  
@@ -146525,7 +146519,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/at
  /* @ap and @dev are the same as ata_acpi_handle_hotplug() */
  static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)
  {
-@@ -157,7 +142,6 @@ static void ata_acpi_detach_device(struc
+@@ -157,7 +142,6 @@
   * @ap: ATA port ACPI event occurred
   * @dev: ATA device ACPI event occurred (can be NULL)
   * @event: ACPI event which occurred
@@ -146533,7 +146527,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/at
   *
   * All ACPI bay / device realted events end up in this function.  If
   * the event is port-wide @dev is NULL.  If the event is specific to a
-@@ -171,117 +155,100 @@ static void ata_acpi_detach_device(struc
+@@ -171,116 +155,99 @@
   * ACPI notify handler context.  May sleep.
   */
  static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
@@ -146651,13 +146645,11 @@ diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/at
 -static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data)
 +static void ata_acpi_uevent(struct ata_port *ap, struct ata_device *dev,
 +      u32 event)
- {
--      struct ata_device *dev = data;
++{
 +      struct kobject *kobj = NULL;
 +      char event_string[20];
 +      char *envp[] = { event_string, NULL };
--      ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
++
 +      if (dev) {
 +              if (dev->sdev)
 +                      kobj = &dev->sdev->sdev_gendev.kobj;
@@ -146668,36 +146660,39 @@ diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/at
 +              snprintf(event_string, 20, "BAY_EVENT=%d", event);
 +              kobject_uevent_env(kobj, KOBJ_CHANGE, envp);
 +      }
- }
--static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
++}
++
 +static void ata_acpi_ap_uevent(acpi_handle handle, u32 event, void *data)
- {
--      struct ata_port *ap = data;
++{
 +      ata_acpi_uevent(data, NULL, event);
 +}
--      ata_acpi_handle_hotplug(ap, NULL, event, 0);
++
 +static void ata_acpi_dev_uevent(acpi_handle handle, u32 event, void *data)
-+{
-+      struct ata_device *dev = data;
+ {
+       struct ata_device *dev = data;
+-
+-      ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
 +      ata_acpi_uevent(dev->link->ap, dev, event);
  }
  
+-static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
+-{
+-      struct ata_port *ap = data;
 +static struct acpi_dock_ops ata_acpi_dev_dock_ops = {
 +      .handler = ata_acpi_dev_notify_dock,
 +      .uevent = ata_acpi_dev_uevent,
 +};
-+
+-      ata_acpi_handle_hotplug(ap, NULL, event, 0);
+-}
 +static struct acpi_dock_ops ata_acpi_ap_dock_ops = {
 +      .handler = ata_acpi_ap_notify_dock,
 +      .uevent = ata_acpi_ap_uevent,
 +};
-+
  /**
   * ata_acpi_associate - associate ATA host with ACPI objects
-  * @host: target ATA host
-@@ -315,24 +282,18 @@ void ata_acpi_associate(struct ata_host 
+@@ -315,24 +282,18 @@
                        ata_acpi_associate_ide_port(ap);
  
                if (ap->acpi_handle) {
@@ -146724,10 +146719,10 @@ diff -purN linux-2.6.27/drivers/ata/libata-acpi.c linux-2.6.27.19-5.1/drivers/at
                        }
                }
        }
-diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/ata/libata-core.c
---- linux-2.6.27/drivers/ata/libata-core.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-core.c      2009-03-25 16:11:14.000000000 +0000
-@@ -137,7 +137,7 @@ int libata_fua = 0;
+diff -r 9608d5473017 drivers/ata/libata-core.c
+--- a/drivers/ata/libata-core.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-core.c        Wed May 06 16:56:14 2009 +0100
+@@ -137,7 +137,7 @@
  module_param_named(fua, libata_fua, int, 0444);
  MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)");
  
@@ -146736,10 +146731,11 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  module_param_named(ignore_hpa, ata_ignore_hpa, int, 0644);
  MODULE_PARM_DESC(ignore_hpa, "Ignore HPA limit (0=keep BIOS limits, 1=ignore limits, using full disk)");
  
-@@ -163,6 +163,67 @@ MODULE_LICENSE("GPL");
+@@ -162,6 +162,67 @@
+ MODULE_LICENSE("GPL");
  MODULE_VERSION(DRV_VERSION);
  
++
 +/*
 + * Iterator helpers.  Don't use directly.
 + *
@@ -146800,11 +146796,10 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
 +              return &ap->link;
 +      return ap->slave_link;
 +}
-+
  /**
   *    ata_force_cbl - force cable type according to libata.force
-  *    @ap: ATA port of interest
-@@ -206,7 +267,8 @@ void ata_force_cbl(struct ata_port *ap)
+@@ -206,7 +267,8 @@
   *    the host link and all fan-out ports connected via PMP.  If the
   *    device part is specified as 0 (e.g. 1.00:), it specifies the
   *    first fan-out link not the host link.  Device number 15 always
@@ -146814,7 +146809,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
   *
   *    LOCKING:
   *    EH context.
-@@ -214,12 +276,11 @@ void ata_force_cbl(struct ata_port *ap)
+@@ -214,12 +276,11 @@
  static void ata_force_link_limits(struct ata_link *link)
  {
        bool did_spd = false;
@@ -146830,7 +146825,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  
        for (i = ata_force_tbl_size - 1; i >= 0; i--) {
                const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -266,9 +327,9 @@ static void ata_force_xfermask(struct at
+@@ -266,9 +327,9 @@
        int alt_devno = devno;
        int i;
  
@@ -146843,7 +146838,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  
        for (i = ata_force_tbl_size - 1; i >= 0; i--) {
                const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -320,9 +381,9 @@ static void ata_force_horkage(struct ata
+@@ -320,9 +381,9 @@
        int alt_devno = devno;
        int i;
  
@@ -146856,7 +146851,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  
        for (i = 0; i < ata_force_tbl_size; i++) {
                const struct ata_force_ent *fe = &ata_force_tbl[i];
-@@ -551,7 +612,7 @@ u64 ata_tf_read_block(struct ata_taskfil
+@@ -551,7 +612,7 @@
                if (tf->flags & ATA_TFLAG_LBA48) {
                        block |= (u64)tf->hob_lbah << 40;
                        block |= (u64)tf->hob_lbam << 32;
@@ -146865,7 +146860,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                } else
                        block |= (tf->device & 0xf) << 24;
  
-@@ -1207,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_tas
+@@ -1207,7 +1268,7 @@
  
        sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
        sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
@@ -146874,7 +146869,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        sectors |= (tf->lbah & 0xff) << 16;
        sectors |= (tf->lbam & 0xff) << 8;
        sectors |= (tf->lbal & 0xff);
-@@ -2100,6 +2161,10 @@ retry:
+@@ -2100,6 +2161,10 @@
  static inline u8 ata_dev_knobble(struct ata_device *dev)
  {
        struct ata_port *ap = dev->link->ap;
@@ -146885,7 +146880,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
  }
  
-@@ -2428,6 +2493,13 @@ int ata_dev_configure(struct ata_device 
+@@ -2428,6 +2493,13 @@
                }
        }
  
@@ -146899,7 +146894,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        return 0;
  
  err_out_nosup:
-@@ -2681,7 +2753,7 @@ static void sata_print_link_status(struc
+@@ -2681,7 +2753,7 @@
                return;
        sata_scr_read(link, SCR_CONTROL, &scontrol);
  
@@ -146908,7 +146903,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                tmp = (sstatus >> 4) & 0xf;
                ata_link_printk(link, KERN_INFO,
                                "SATA link up %s (SStatus %X SControl %X)\n",
-@@ -3372,6 +3444,12 @@ int ata_wait_ready(struct ata_link *link
+@@ -3372,6 +3444,12 @@
        unsigned long nodev_deadline = ata_deadline(start, ATA_TMOUT_FF_WAIT);
        int warned = 0;
  
@@ -146921,7 +146916,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        if (time_after(nodev_deadline, deadline))
                nodev_deadline = deadline;
  
-@@ -3593,7 +3671,7 @@ int ata_std_prereset(struct ata_link *li
+@@ -3593,7 +3671,7 @@
        }
  
        /* no point in trying softreset on offline link */
@@ -146930,7 +146925,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                ehc->i.action &= ~ATA_EH_SOFTRESET;
  
        return 0;
-@@ -3671,7 +3749,7 @@ int sata_link_hardreset(struct ata_link 
+@@ -3671,7 +3749,7 @@
        if (rc)
                goto out;
        /* if link is offline nothing more to do */
@@ -146939,7 +146934,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                goto out;
  
        /* Link is online.  From this point, -ENODEV too is an error. */
-@@ -3956,6 +4034,7 @@ static const struct ata_blacklist_entry 
+@@ -3956,6 +4034,7 @@
  
        /* Weird ATAPI devices */
        { "TORiSAN DVD-ROM DRD-N216", NULL,     ATA_HORKAGE_MAX_SEC_128 },
@@ -146947,7 +146942,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  
        /* Devices we expect to fail diagnostics */
  
-@@ -3971,6 +4050,73 @@ static const struct ata_blacklist_entry 
+@@ -3971,6 +4050,73 @@
        { "ST380817AS",         "3.42",         ATA_HORKAGE_NONCQ },
        { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
  
@@ -147021,17 +147016,17 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        /* Blacklist entries taken from Silicon Image 3124/3132
           Windows driver .inf file - also several Linux problem reports */
        { "HTS541060G9SA00",    "MB3OC60D",     ATA_HORKAGE_NONCQ, },
-@@ -3998,6 +4144,9 @@ static const struct ata_blacklist_entry 
+@@ -3997,6 +4143,9 @@
+       { "TSSTcorp CDDVDW SH-S202J", "SB01",     ATA_HORKAGE_IVB, },
        { "TSSTcorp CDDVDW SH-S202N", "SB00",     ATA_HORKAGE_IVB, },
        { "TSSTcorp CDDVDW SH-S202N", "SB01",     ATA_HORKAGE_IVB, },
++
 +      /* Devices that do not need bridging limits applied */
 +      { "MTRON MSP-SATA*",            NULL,   ATA_HORKAGE_BRIDGE_OK, },
-+
        /* End Marker */
        { }
- };
-@@ -4369,7 +4518,8 @@ int atapi_check_dma(struct ata_queued_cm
+@@ -4369,7 +4518,8 @@
        /* Don't allow DMA if it isn't multiple of 16 bytes.  Quite a
         * few ATAPI devices choke on such DMA requests.
         */
@@ -147041,7 +147036,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                return 1;
  
        if (ap->ops->check_atapi_dma)
-@@ -4868,10 +5018,8 @@ int sata_scr_valid(struct ata_link *link
+@@ -4868,10 +5018,8 @@
  int sata_scr_read(struct ata_link *link, int reg, u32 *val)
  {
        if (ata_is_host_link(link)) {
@@ -147053,7 +147048,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                return -EOPNOTSUPP;
        }
  
-@@ -4897,10 +5045,8 @@ int sata_scr_read(struct ata_link *link,
+@@ -4897,10 +5045,8 @@
  int sata_scr_write(struct ata_link *link, int reg, u32 val)
  {
        if (ata_is_host_link(link)) {
@@ -147065,7 +147060,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                return -EOPNOTSUPP;
        }
  
-@@ -4925,13 +5071,12 @@ int sata_scr_write(struct ata_link *link
+@@ -4925,13 +5071,12 @@
  int sata_scr_write_flush(struct ata_link *link, int reg, u32 val)
  {
        if (ata_is_host_link(link)) {
@@ -147081,7 +147076,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                        return rc;
                }
                return -EOPNOTSUPP;
-@@ -4941,7 +5086,7 @@ int sata_scr_write_flush(struct ata_link
+@@ -4941,7 +5086,7 @@
  }
  
  /**
@@ -147090,14 +147085,15 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
   *    @link: ATA link to test
   *
   *    Test whether @link is online.  Note that this function returns
-@@ -4952,20 +5097,20 @@ int sata_scr_write_flush(struct ata_link
+@@ -4952,20 +5097,20 @@
   *    None.
   *
   *    RETURNS:
 - *    1 if the port online status is available and online.
-+ *    True if the port online status is available and online.
-  */
+- */
 -int ata_link_online(struct ata_link *link)
++ *    True if the port online status is available and online.
++ */
 +bool ata_phys_link_online(struct ata_link *link)
  {
        u32 sstatus;
@@ -147106,24 +147102,28 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
            (sstatus & 0xf) == 0x3)
 -              return 1;
 -      return 0;
+-}
+-
+-/**
+- *    ata_link_offline - test whether the given link is offline
 +              return true;
 +      return false;
- }
- /**
-- *    ata_link_offline - test whether the given link is offline
++}
++
++/**
 + *    ata_phys_link_offline - test whether the given link is offline
   *    @link: ATA link to test
   *
   *    Test whether @link is offline.  Note that this function
-@@ -4976,16 +5121,68 @@ int ata_link_online(struct ata_link *lin
+@@ -4976,16 +5121,68 @@
   *    None.
   *
   *    RETURNS:
 - *    1 if the port offline status is available and offline.
-+ *    True if the port offline status is available and offline.
-  */
+- */
 -int ata_link_offline(struct ata_link *link)
++ *    True if the port offline status is available and offline.
++ */
 +bool ata_phys_link_offline(struct ata_link *link)
  {
        u32 sstatus;
@@ -147189,7 +147189,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  }
  
  #ifdef CONFIG_PM
-@@ -5127,11 +5324,11 @@ int ata_port_start(struct ata_port *ap)
+@@ -5127,11 +5324,11 @@
   */
  void ata_dev_init(struct ata_device *dev)
  {
@@ -147203,7 +147203,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
        link->sata_spd_limit = link->hw_sata_spd_limit;
        link->sata_spd = 0;
  
-@@ -5259,6 +5456,8 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5259,6 +5456,8 @@
  
  #ifdef CONFIG_ATA_SFF
        INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
@@ -147212,7 +147212,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  #endif
        INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
        INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
-@@ -5294,6 +5493,7 @@ static void ata_host_release(struct devi
+@@ -5294,6 +5493,7 @@
                        scsi_host_put(ap->scsi_host);
  
                kfree(ap->pmp_link);
@@ -147220,10 +147220,12 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                kfree(ap);
                host->ports[i] = NULL;
        }
-@@ -5414,6 +5614,68 @@ struct ata_host *ata_host_alloc_pinfo(st
-       return host;
- }
+@@ -5412,6 +5612,68 @@
+       }
  
+       return host;
++}
++
 +/**
 + *    ata_slave_link_init - initialize slave link
 + *    @ap: port to initialize slave link for
@@ -147284,12 +147286,10 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
 +      ata_link_init(ap, link, 1);
 +      ap->slave_link = link;
 +      return 0;
-+}
-+
+ }
  static void ata_host_stop(struct device *gendev, void *res)
- {
-       struct ata_host *host = dev_get_drvdata(gendev);
-@@ -5640,6 +5902,8 @@ int ata_host_register(struct ata_host *h
+@@ -5640,6 +5902,8 @@
  
                /* init sata_spd_limit to the current value */
                sata_link_init_spd(&ap->link);
@@ -147298,7 +147298,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  
                /* print per-port info to dmesg */
                xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask,
-@@ -5796,7 +6060,7 @@ static void ata_port_detach(struct ata_p
+@@ -5796,7 +6060,7 @@
         * to us.  Restore SControl and disable all existing devices.
         */
        __ata_port_for_each_link(link, ap) {
@@ -147307,7 +147307,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
                ata_link_for_each_dev(dev, link)
                        ata_dev_disable(dev);
        }
-@@ -6260,10 +6524,12 @@ EXPORT_SYMBOL_GPL(ata_base_port_ops);
+@@ -6260,10 +6524,12 @@
  EXPORT_SYMBOL_GPL(sata_port_ops);
  EXPORT_SYMBOL_GPL(ata_dummy_port_ops);
  EXPORT_SYMBOL_GPL(ata_dummy_port_info);
@@ -147320,9 +147320,9 @@ diff -purN linux-2.6.27/drivers/ata/libata-core.c linux-2.6.27.19-5.1/drivers/at
  EXPORT_SYMBOL_GPL(ata_host_start);
  EXPORT_SYMBOL_GPL(ata_host_register);
  EXPORT_SYMBOL_GPL(ata_host_activate);
-diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/libata-eh.c
---- linux-2.6.27/drivers/ata/libata-eh.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-eh.c        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/libata-eh.c
+--- a/drivers/ata/libata-eh.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-eh.c  Wed May 06 16:56:14 2009 +0100
 @@ -33,6 +33,7 @@
   */
  
@@ -147331,7 +147331,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  #include <linux/pci.h>
  #include <scsi/scsi.h>
  #include <scsi/scsi_host.h>
-@@ -457,29 +458,29 @@ static void ata_eh_clear_action(struct a
+@@ -457,29 +458,29 @@
   *    RETURNS:
   *    EH_HANDLED or EH_NOT_HANDLED
   */
@@ -147366,7 +147366,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        }
        spin_unlock_irqrestore(ap->lock, flags);
  
-@@ -604,9 +605,6 @@ void ata_scsi_error(struct Scsi_Host *ho
+@@ -604,9 +605,6 @@
                                if (ata_ncq_enabled(dev))
                                        ehc->saved_ncq_enabled |= 1 << devno;
                        }
@@ -147376,7 +147376,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                }
  
                ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
-@@ -831,7 +829,7 @@ void ata_qc_schedule_eh(struct ata_queue
+@@ -831,7 +829,7 @@
         * Note that ATA_QCFLAG_FAILED is unconditionally set after
         * this function completes.
         */
@@ -147385,7 +147385,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  }
  
  /**
-@@ -1203,7 +1201,10 @@ void ata_eh_about_to_do(struct ata_link 
+@@ -1203,7 +1201,10 @@
  
        ata_eh_clear_action(link, dev, ehi, action);
  
@@ -147397,7 +147397,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                ap->pflags |= ATA_PFLAG_RECOVERED;
  
        spin_unlock_irqrestore(ap->lock, flags);
-@@ -1756,7 +1757,7 @@ static unsigned int ata_eh_speed_down_ve
+@@ -1756,7 +1757,7 @@
  static unsigned int ata_eh_speed_down(struct ata_device *dev,
                                unsigned int eflags, unsigned int err_mask)
  {
@@ -147406,7 +147406,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        int xfer_ok = 0;
        unsigned int verdict;
        unsigned int action = 0;
-@@ -1880,7 +1881,8 @@ static void ata_eh_link_autopsy(struct a
+@@ -1880,7 +1881,8 @@
        for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
                struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
  
@@ -147416,7 +147416,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                        continue;
  
                /* inherit upper level err_mask */
-@@ -1967,6 +1969,28 @@ void ata_eh_autopsy(struct ata_port *ap)
+@@ -1967,6 +1969,28 @@
        ata_port_for_each_link(link, ap)
                ata_eh_link_autopsy(link);
  
@@ -147445,7 +147445,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        /* Autopsy of fanout ports can affect host link autopsy.
         * Perform host link autopsy last.
         */
-@@ -2001,7 +2025,8 @@ static void ata_eh_link_report(struct at
+@@ -2001,7 +2025,8 @@
        for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
                struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
  
@@ -147455,7 +147455,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                    ((qc->flags & ATA_QCFLAG_QUIET) &&
                     qc->err_mask == AC_ERR_DEV))
                        continue;
-@@ -2068,7 +2093,7 @@ static void ata_eh_link_report(struct at
+@@ -2068,7 +2093,7 @@
                char cdb_buf[70] = "";
  
                if (!(qc->flags & ATA_QCFLAG_FAILED) ||
@@ -147464,7 +147464,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                        continue;
  
                if (qc->dma_dir != DMA_NONE) {
-@@ -2160,12 +2185,14 @@ void ata_eh_report(struct ata_port *ap)
+@@ -2160,12 +2185,14 @@
  }
  
  static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset,
@@ -147482,7 +147482,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  
        return reset(link, classes, deadline);
  }
-@@ -2187,17 +2214,20 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2187,17 +2214,20 @@
                 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset)
  {
        struct ata_port *ap = link->ap;
@@ -147504,7 +147504,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  
        /*
         * Prepare to reset
-@@ -2209,17 +2239,21 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2209,17 +2239,21 @@
        if (link->flags & ATA_LFLAG_NO_SRST)
                softreset = NULL;
  
@@ -147531,7 +147531,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  
        ata_link_for_each_dev(dev, link) {
                /* If we issue an SRST then an ATA drive (not ATAPI)
-@@ -2252,8 +2286,30 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2252,8 +2286,30 @@
        }
  
        if (prereset) {
@@ -147564,7 +147564,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                if (rc) {
                        if (rc == -ENOENT) {
                                ata_link_printk(link, KERN_DEBUG,
-@@ -2285,7 +2341,6 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2285,7 +2341,6 @@
        /*
         * Perform reset
         */
@@ -147572,7 +147572,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        if (ata_is_host_link(link))
                ata_eh_freeze_port(ap);
  
-@@ -2297,30 +2352,57 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2297,30 +2352,57 @@
                                        reset == softreset ? "soft" : "hard");
  
                /* mark that this EH session started with reset */
@@ -147589,7 +147589,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
 +                      failed_link = link;
                        goto fail;
 +              }
-+
 +              /* hardreset slave link if existent */
 +              if (slave && reset == hardreset) {
 +                      int tmp;
@@ -147612,7 +147612,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
 +                              goto fail;
 +                      }
 +              }
++
 +              /* perform follow-up SRST if necessary */
                if (reset == hardreset &&
                    ata_eh_followup_srst_needed(link, rc, classes)) {
@@ -147634,7 +147634,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                }
        } else {
                if (verbose)
-@@ -2341,19 +2423,21 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2341,19 +2423,21 @@
                dev->pio_mode = XFER_PIO_0;
                dev->flags &= ~ATA_DFLAG_SLEEPING;
  
@@ -147664,7 +147664,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  
        /* thaw the port */
        if (ata_is_host_link(link))
-@@ -2366,12 +2450,17 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2366,12 +2450,17 @@
         * reset and here.  This race is mediated by cross checking
         * link onlineness and classification result later.
         */
@@ -147683,7 +147683,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        spin_unlock_irqrestore(link->ap->lock, flags);
  
        /* Make sure onlineness and classification result correspond.
-@@ -2381,19 +2470,21 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2381,19 +2470,21 @@
         * link onlineness and classification result, those conditions
         * can be reliably detected and retried.
         */
@@ -147710,7 +147710,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                        rc = -EAGAIN;
                        goto fail;
                }
-@@ -2404,13 +2495,17 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2404,13 +2495,17 @@
  
        /* reset successful, schedule revalidation */
        ata_eh_done(link, NULL, ATA_EH_RESET);
@@ -147729,7 +147729,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
  
        spin_lock_irqsave(ap->lock, flags);
        ap->pflags &= ~ATA_PFLAG_RESETTING;
-@@ -2431,7 +2526,7 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2431,7 +2526,7 @@
        if (time_before(now, deadline)) {
                unsigned long delta = deadline - now;
  
@@ -147738,7 +147738,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                        "reset failed (errno=%d), retrying in %u secs\n",
                        rc, DIV_ROUND_UP(jiffies_to_msecs(delta), 1000));
  
-@@ -2439,8 +2534,13 @@ int ata_eh_reset(struct ata_link *link, 
+@@ -2439,8 +2534,13 @@
                        delta = schedule_timeout_uninterruptible(delta);
        }
  
@@ -147753,7 +147753,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
        if (hardreset)
                reset = hardreset;
        goto retry;
-@@ -2472,7 +2572,7 @@ static int ata_eh_revalidate_and_attach(
+@@ -2472,7 +2572,7 @@
                if ((action & ATA_EH_REVALIDATE) && ata_dev_enabled(dev)) {
                        WARN_ON(dev->class == ATA_DEV_PMP);
  
@@ -147762,7 +147762,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                                rc = -EIO;
                                goto err;
                        }
-@@ -2693,12 +2793,13 @@ static int ata_eh_handle_dev_fail(struct
+@@ -2693,12 +2793,13 @@
                /* give it just one more chance */
                ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
        case -EIO:
@@ -147779,7 +147779,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                }
        }
  
-@@ -2707,7 +2808,7 @@ static int ata_eh_handle_dev_fail(struct
+@@ -2707,7 +2808,7 @@
                ata_dev_disable(dev);
  
                /* detach if offline */
@@ -147788,9 +147788,9 @@ diff -purN linux-2.6.27/drivers/ata/libata-eh.c linux-2.6.27.19-5.1/drivers/ata/
                        ata_eh_detach_dev(dev);
  
                /* schedule probe if necessary */
-diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/ata/libata-scsi.c
---- linux-2.6.27/drivers/ata/libata-scsi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-scsi.c      2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/ata/libata-scsi.c
+--- a/drivers/ata/libata-scsi.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-scsi.c        Wed May 06 16:56:14 2009 +0100
 @@ -46,6 +46,7 @@
  #include <linux/libata.h>
  #include <linux/hdreg.h>
@@ -147799,7 +147799,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/at
  
  #include "libata.h"
  
-@@ -1181,6 +1182,17 @@ static unsigned int ata_scsi_start_stop_
+@@ -1181,6 +1182,17 @@
  
                tf->command = ATA_CMD_VERIFY;   /* READ VERIFY */
        } else {
@@ -147817,7 +147817,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/at
                /* XXX: This is for backward compatibility, will be
                 * removed.  Read Documentation/feature-removal-schedule.txt
                 * for more info.
-@@ -1204,8 +1216,7 @@ static unsigned int ata_scsi_start_stop_
+@@ -1204,8 +1216,7 @@
                                scmd->scsi_done = qc->scsidone;
                                qc->scsidone = ata_delayed_done;
                        }
@@ -147827,7 +147827,7 @@ diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/at
                }
  
                /* Issue ATA STANDBY IMMEDIATE command */
-@@ -1221,10 +1232,13 @@ static unsigned int ata_scsi_start_stop_
+@@ -1221,9 +1232,12 @@
  
        return 0;
  
@@ -147835,17 +147835,16 @@ diff -purN linux-2.6.27/drivers/ata/libata-scsi.c linux-2.6.27.19-5.1/drivers/at
 + invalid_fld:
        ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
        /* "Invalid field in cbd" */
-       return 1;
++      return 1;
 + skip:
 +      scmd->result = SAM_STAT_GOOD;
-+      return 1;
+       return 1;
  }
  
-diff -purN linux-2.6.27/drivers/ata/libata-sff.c linux-2.6.27.19-5.1/drivers/ata/libata-sff.c
---- linux-2.6.27/drivers/ata/libata-sff.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata-sff.c       2009-03-25 16:11:13.000000000 +0000
-@@ -1227,10 +1227,19 @@ fsm_start:
+diff -r 9608d5473017 drivers/ata/libata-sff.c
+--- a/drivers/ata/libata-sff.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata-sff.c Wed May 06 16:56:14 2009 +0100
+@@ -1227,10 +1227,19 @@
                        /* ATA PIO protocol */
                        if (unlikely((status & ATA_DRQ) == 0)) {
                                /* handle BSY=0, DRQ=0 as error */
@@ -147867,10 +147866,10 @@ diff -purN linux-2.6.27/drivers/ata/libata-sff.c linux-2.6.27.19-5.1/drivers/ata
                                        /* HSM violation. Let EH handle this.
                                         * Phantom devices also trigger this
                                         * condition.  Mark hint.
-diff -purN linux-2.6.27/drivers/ata/libata.h linux-2.6.27.19-5.1/drivers/ata/libata.h
---- linux-2.6.27/drivers/ata/libata.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/libata.h   2009-03-25 16:11:14.000000000 +0000
-@@ -70,6 +70,7 @@ extern int atapi_passthru16;
+diff -r 9608d5473017 drivers/ata/libata.h
+--- a/drivers/ata/libata.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/libata.h     Wed May 06 16:56:14 2009 +0100
+@@ -70,6 +70,7 @@
  extern int libata_fua;
  extern int libata_noacpi;
  extern int libata_allow_tpm;
@@ -147878,7 +147877,7 @@ diff -purN linux-2.6.27/drivers/ata/libata.h linux-2.6.27.19-5.1/drivers/ata/lib
  extern void ata_force_cbl(struct ata_port *ap);
  extern u64 ata_tf_to_lba(const struct ata_taskfile *tf);
  extern u64 ata_tf_to_lba48(const struct ata_taskfile *tf);
-@@ -107,6 +108,8 @@ extern void ata_qc_issue(struct ata_queu
+@@ -107,6 +108,8 @@
  extern void __ata_qc_complete(struct ata_queued_cmd *qc);
  extern int atapi_check_dma(struct ata_queued_cmd *qc);
  extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
@@ -147887,7 +147886,7 @@ diff -purN linux-2.6.27/drivers/ata/libata.h linux-2.6.27.19-5.1/drivers/ata/lib
  extern void ata_dev_init(struct ata_device *dev);
  extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
  extern int sata_link_init_spd(struct ata_link *link);
-@@ -152,7 +155,7 @@ extern int ata_bus_probe(struct ata_port
+@@ -152,7 +155,7 @@
  /* libata-eh.c */
  extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
  extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
@@ -147896,9 +147895,9 @@ diff -purN linux-2.6.27/drivers/ata/libata.h linux-2.6.27.19-5.1/drivers/ata/lib
  extern void ata_scsi_error(struct Scsi_Host *host);
  extern void ata_port_wait_eh(struct ata_port *ap);
  extern void ata_eh_fastdrain_timerfn(unsigned long arg);
-diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/ata/pata_hpt366.c
---- linux-2.6.27/drivers/ata/pata_hpt366.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_hpt366.c      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/pata_hpt366.c
+--- a/drivers/ata/pata_hpt366.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_hpt366.c        Wed May 06 16:56:14 2009 +0100
 @@ -30,7 +30,7 @@
  #define DRV_VERSION   "0.6.2"
  
@@ -147908,12 +147907,15 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
        u32     timing;
  };
  
-@@ -183,62 +183,37 @@ static unsigned long hpt366_filter(struc
+@@ -183,41 +183,68 @@
                        mask &= ~(0xF8 << ATA_SHIFT_UDMA);
                if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
                        mask &= ~(0xF0 << ATA_SHIFT_UDMA);
 -      }
--      return ata_bmdma_mode_filter(adev, mask);
++      } else if (adev->class == ATA_DEV_ATAPI)
++              mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
++
+       return ata_bmdma_mode_filter(adev, mask);
 -}
 -
 -/**
@@ -147924,9 +147926,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
 - *    Return the 32bit register programming information for this channel
 - *    that matches the speed provided.
 - */
-+      } else if (adev->class == ATA_DEV_ATAPI)
-+              mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+-
 -static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
 -{
 -      struct hpt_clock *clocks = ap->host->private_data;
@@ -147938,14 +147938,13 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
 -      }
 -      BUG();
 -      return 0xffffffffU;     /* silence compiler warning */
-+      return ata_bmdma_mode_filter(adev, mask);
  }
  
  static int hpt36x_cable_detect(struct ata_port *ap)
  {
--      u8 ata66;
-       struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-+      u8 ata66;
++      struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+       u8 ata66;
+-      struct pci_dev *pdev = to_pci_dev(ap->host->dev);
  
 +      /*
 +       * Each channel of pata_hpt366 occupies separate PCI function
@@ -147956,40 +147955,25 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
 +      if (ata66 & 2)
                return ATA_CBL_PATA40;
        return ATA_CBL_PATA80;
- }
--/**
-- *    hpt366_set_piomode              -       PIO setup
-- *    @ap: ATA interface
-- *    @adev: device on the interface
-- *
-- *    Perform PIO mode setup.
-- */
--
--static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
++}
++
 +static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
 +                          u8 mode)
- {
++{
 +      struct hpt_clock *clocks = ap->host->private_data;
-       struct pci_dev *pdev = to_pci_dev(ap->host->dev);
--      u32 addr1, addr2;
--      u32 reg;
--      u32 mode;
++      struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 +      u32 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
 +      u32 addr2 = 0x51 + 4 * ap->port_no;
 +      u32 mask, reg;
-       u8 fast;
--      addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
--      addr2 = 0x51 + 4 * ap->port_no;
--
-       /* Fast interrupt prediction disable, hold off interrupt disable */
-       pci_read_config_byte(pdev, addr2, &fast);
-       if (fast & 0x80) {
-@@ -246,12 +221,43 @@ static void hpt366_set_piomode(struct at
-               pci_write_config_byte(pdev, addr2, fast);
-       }
++      u8 fast;
++
++      /* Fast interrupt prediction disable, hold off interrupt disable */
++      pci_read_config_byte(pdev, addr2, &fast);
++      if (fast & 0x80) {
++              fast &= ~0x80;
++              pci_write_config_byte(pdev, addr2, fast);
++      }
++
 +      /* determine timing mask and find matching clock entry */
 +      if (mode < XFER_MW_DMA_0)
 +              mask = 0xc1f8ffff;
@@ -148011,31 +147995,43 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
 +       * on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid
 +       * problems handling I/O errors later.
 +       */
-       pci_read_config_dword(pdev, addr1, &reg);
++      pci_read_config_dword(pdev, addr1, &reg);
++      reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
++      pci_write_config_dword(pdev, addr1, reg);
+ }
+ /**
+@@ -230,28 +257,7 @@
+ static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
+ {
+-      struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+-      u32 addr1, addr2;
+-      u32 reg;
+-      u32 mode;
+-      u8 fast;
+-
+-      addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
+-      addr2 = 0x51 + 4 * ap->port_no;
+-
+-      /* Fast interrupt prediction disable, hold off interrupt disable */
+-      pci_read_config_byte(pdev, addr2, &fast);
+-      if (fast & 0x80) {
+-              fast &= ~0x80;
+-              pci_write_config_byte(pdev, addr2, fast);
+-      }
+-
+-      pci_read_config_dword(pdev, addr1, &reg);
 -      mode = hpt36x_find_mode(ap, adev->pio_mode);
 -      mode &= ~0x8000000;     /* No FIFO in PIO */
 -      mode &= ~0x30070000;    /* Leave config bits alone */
 -      reg &= 0x30070000;      /* Strip timing bits */
 -      pci_write_config_dword(pdev, addr1, reg | mode);
-+      reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
-+      pci_write_config_dword(pdev, addr1, reg);
-+}
-+
-+/**
-+ *    hpt366_set_piomode              -       PIO setup
-+ *    @ap: ATA interface
-+ *    @adev: device on the interface
-+ *
-+ *    Perform PIO mode setup.
-+ */
-+
-+static void hpt366_set_piomode(struct ata_port *ap, struct ata_device *adev)
-+{
 +      hpt366_set_mode(ap, adev, adev->pio_mode);
  }
  
  /**
-@@ -265,28 +271,7 @@ static void hpt366_set_piomode(struct at
+@@ -265,28 +271,7 @@
  
  static void hpt366_set_dmamode(struct ata_port *ap, struct ata_device *adev)
  {
@@ -148065,7 +148061,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
  }
  
  static struct scsi_host_template hpt36x_sht = {
-@@ -382,10 +367,10 @@ static int hpt36x_init_one(struct pci_de
+@@ -382,10 +367,10 @@
        /* PCI clocking determines the ATA timing values to use */
        /* info_hpt366 is safe against re-entry so we can scribble on it */
        switch((reg1 & 0x700) >> 8) {
@@ -148078,10 +148074,10 @@ diff -purN linux-2.6.27/drivers/ata/pata_hpt366.c linux-2.6.27.19-5.1/drivers/at
                        hpriv = &hpt366_25;
                        break;
                default:
-diff -purN linux-2.6.27/drivers/ata/pata_it821x.c linux-2.6.27.19-5.1/drivers/ata/pata_it821x.c
---- linux-2.6.27/drivers/ata/pata_it821x.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_it821x.c      2009-03-25 16:11:14.000000000 +0000
-@@ -557,9 +557,8 @@ static unsigned int it821x_read_id(struc
+diff -r 9608d5473017 drivers/ata/pata_it821x.c
+--- a/drivers/ata/pata_it821x.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_it821x.c        Wed May 06 16:56:14 2009 +0100
+@@ -557,9 +557,8 @@
        if (strstr(model_num, "Integrated Technology Express")) {
                /* Set feature bits the firmware neglects */
                id[49] |= 0x0300;       /* LBA, DMA */
@@ -148092,10 +148088,10 @@ diff -purN linux-2.6.27/drivers/ata/pata_it821x.c linux-2.6.27.19-5.1/drivers/at
                id[86] |= 0x0400;       /* LBA48 on */
                id[ATA_ID_MAJOR_VER] |= 0x1F;
        }
-diff -purN linux-2.6.27/drivers/ata/pata_of_platform.c linux-2.6.27.19-5.1/drivers/ata/pata_of_platform.c
---- linux-2.6.27/drivers/ata/pata_of_platform.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_of_platform.c 2009-03-25 16:11:14.000000000 +0000
-@@ -91,6 +91,7 @@ static struct of_device_id pata_of_platf
+diff -r 9608d5473017 drivers/ata/pata_of_platform.c
+--- a/drivers/ata/pata_of_platform.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_of_platform.c   Wed May 06 16:56:14 2009 +0100
+@@ -91,6 +91,7 @@
  MODULE_DEVICE_TABLE(of, pata_of_platform_match);
  
  static struct of_platform_driver pata_of_platform_driver = {
@@ -148103,10 +148099,10 @@ diff -purN linux-2.6.27/drivers/ata/pata_of_platform.c linux-2.6.27.19-5.1/drive
        .name           = "pata_of_platform",
        .match_table    = pata_of_platform_match,
        .probe          = pata_of_platform_probe,
-diff -purN linux-2.6.27/drivers/ata/pata_sch.c linux-2.6.27.19-5.1/drivers/ata/pata_sch.c
---- linux-2.6.27/drivers/ata/pata_sch.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_sch.c 2009-03-25 16:11:14.000000000 +0000
-@@ -83,7 +83,7 @@ static struct ata_port_operations sch_pa
+diff -r 9608d5473017 drivers/ata/pata_sch.c
+--- a/drivers/ata/pata_sch.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_sch.c   Wed May 06 16:56:14 2009 +0100
+@@ -83,7 +83,7 @@
  };
  
  static struct ata_port_info sch_port_info = {
@@ -148115,10 +148111,10 @@ diff -purN linux-2.6.27/drivers/ata/pata_sch.c linux-2.6.27.19-5.1/drivers/ata/p
        .pio_mask       = ATA_PIO4,   /* pio0-4 */
        .mwdma_mask     = ATA_MWDMA2, /* mwdma0-2 */
        .udma_mask      = ATA_UDMA5,  /* udma0-5 */
-diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/pata_via.c
---- linux-2.6.27/drivers/ata/pata_via.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/pata_via.c 2009-03-25 16:11:14.000000000 +0000
-@@ -87,6 +87,10 @@ enum {
+diff -r 9608d5473017 drivers/ata/pata_via.c
+--- a/drivers/ata/pata_via.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/pata_via.c   Wed May 06 16:56:14 2009 +0100
+@@ -87,6 +87,10 @@
        VIA_SATA_PATA   = 0x800, /* SATA/PATA combined configuration */
  };
  
@@ -148129,7 +148125,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
  /*
   * VIA SouthBridge chips.
   */
-@@ -98,12 +102,17 @@ static const struct via_isa_bridge {
+@@ -98,12 +102,17 @@
        u8 rev_max;
        u16 flags;
  } via_isa_bridges[] = {
@@ -148148,7 +148144,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
        { "vt8237a",    PCI_DEVICE_ID_VIA_8237A,    0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
        { "vt8237",     PCI_DEVICE_ID_VIA_8237,     0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
        { "vt8235",     PCI_DEVICE_ID_VIA_8235,     0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
-@@ -123,6 +132,8 @@ static const struct via_isa_bridge {
+@@ -123,6 +132,8 @@
        { "vt82c586",   PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO },
        { "vt82c576",   PCI_DEVICE_ID_VIA_82C576,   0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK },
        { "vt82c576",   PCI_DEVICE_ID_VIA_82C576,   0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID },
@@ -148157,7 +148153,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
        { NULL }
  };
  
-@@ -461,6 +472,7 @@ static int via_init_one(struct pci_dev *
+@@ -461,6 +472,7 @@
        static int printed_version;
        u8 enable;
        u32 timing;
@@ -148165,7 +148161,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
        int rc;
  
        if (!printed_version++)
-@@ -470,9 +482,13 @@ static int via_init_one(struct pci_dev *
+@@ -470,9 +482,13 @@
        if (rc)
                return rc;
  
@@ -148180,7 +148176,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
                if ((isa = pci_get_device(PCI_VENDOR_ID_VIA +
                        !!(config->flags & VIA_BAD_ID),
                        config->id, NULL))) {
-@@ -483,10 +499,6 @@ static int via_init_one(struct pci_dev *
+@@ -483,10 +499,6 @@
                        pci_dev_put(isa);
                }
  
@@ -148191,7 +148187,7 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
        pci_dev_put(isa);
  
        if (!(config->flags & VIA_NO_ENABLES)) {
-@@ -583,11 +595,13 @@ static int via_reinit_one(struct pci_dev
+@@ -583,11 +595,13 @@
  #endif
  
  static const struct pci_device_id via[] = {
@@ -148205,10 +148201,10 @@ diff -purN linux-2.6.27/drivers/ata/pata_via.c linux-2.6.27.19-5.1/drivers/ata/p
  
        { },
  };
-diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/sata_fsl.c
---- linux-2.6.27/drivers/ata/sata_fsl.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_fsl.c 2009-03-25 16:11:13.000000000 +0000
-@@ -469,10 +469,10 @@ static bool sata_fsl_qc_fill_rtf(struct 
+diff -r 9608d5473017 drivers/ata/sata_fsl.c
+--- a/drivers/ata/sata_fsl.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_fsl.c   Wed May 06 16:56:14 2009 +0100
+@@ -469,10 +469,10 @@
        return true;
  }
  
@@ -148222,7 +148218,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
        void __iomem *ssr_base = host_priv->ssr_base;
        unsigned int sc_reg;
  
-@@ -493,10 +493,10 @@ static int sata_fsl_scr_write(struct ata
+@@ -493,10 +493,10 @@
        return 0;
  }
  
@@ -148236,7 +148232,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
        void __iomem *ssr_base = host_priv->ssr_base;
        unsigned int sc_reg;
  
-@@ -645,12 +645,12 @@ static int sata_fsl_port_start(struct at
+@@ -645,12 +645,12 @@
         * Workaround for 8315DS board 3gbps link-up issue,
         * currently limit SATA port to GEN1 speed
         */
@@ -148252,7 +148248,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
        dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n",
                        temp);
  #endif
-@@ -868,7 +868,7 @@ issue_srst:
+@@ -868,7 +868,7 @@
                        ioread32(CQ + hcr_base),
                        ioread32(CA + hcr_base), ioread32(CC + hcr_base));
  
@@ -148261,7 +148257,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
  
                DPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
                DPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
-@@ -972,9 +972,9 @@ static void sata_fsl_error_intr(struct a
+@@ -972,9 +972,9 @@
         * Handle & Clear SError
         */
  
@@ -148273,7 +148269,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
        }
  
        DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n",
-@@ -1091,7 +1091,7 @@ static void sata_fsl_host_intr(struct at
+@@ -1091,7 +1091,7 @@
  
        hstatus = ioread32(hcr_base + HSTATUS);
  
@@ -148282,7 +148278,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
  
        if (unlikely(SError & 0xFFFF0000)) {
                DPRINTK("serror @host_intr : 0x%x\n", SError);
-@@ -1385,6 +1385,7 @@ static struct of_device_id fsl_sata_matc
+@@ -1385,6 +1385,7 @@
  MODULE_DEVICE_TABLE(of, fsl_sata_match);
  
  static struct of_platform_driver fsl_sata_driver = {
@@ -148290,10 +148286,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_fsl.c linux-2.6.27.19-5.1/drivers/ata/s
        .name           = "fsl-sata",
        .match_table    = fsl_sata_match,
        .probe          = sata_fsl_probe,
-diff -purN linux-2.6.27/drivers/ata/sata_inic162x.c linux-2.6.27.19-5.1/drivers/ata/sata_inic162x.c
---- linux-2.6.27/drivers/ata/sata_inic162x.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_inic162x.c    2009-03-25 16:11:14.000000000 +0000
-@@ -269,9 +269,9 @@ static void inic_reset_port(void __iomem
+diff -r 9608d5473017 drivers/ata/sata_inic162x.c
+--- a/drivers/ata/sata_inic162x.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_inic162x.c      Wed May 06 16:56:14 2009 +0100
+@@ -269,9 +269,9 @@
        writeb(0xff, port_base + PORT_IRQ_STAT);
  }
  
@@ -148305,7 +148301,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_inic162x.c linux-2.6.27.19-5.1/drivers/
        void __iomem *addr;
  
        if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
-@@ -286,9 +286,9 @@ static int inic_scr_read(struct ata_port
+@@ -286,9 +286,9 @@
        return 0;
  }
  
@@ -148317,10 +148313,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_inic162x.c linux-2.6.27.19-5.1/drivers/
  
        if (unlikely(sc_reg >= ARRAY_SIZE(scr_map)))
                return -EINVAL;
-diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sata_mv.c
---- linux-2.6.27/drivers/ata/sata_mv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_mv.c  2009-03-25 16:11:14.000000000 +0000
-@@ -493,10 +493,10 @@ struct mv_hw_ops {
+diff -r 9608d5473017 drivers/ata/sata_mv.c
+--- a/drivers/ata/sata_mv.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_mv.c    Wed May 06 16:56:14 2009 +0100
+@@ -493,10 +493,10 @@
        void (*reset_bus)(struct ata_host *host, void __iomem *mmio);
  };
  
@@ -148335,7 +148331,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
  static int mv_port_start(struct ata_port *ap);
  static void mv_port_stop(struct ata_port *ap);
  static int mv_qc_defer(struct ata_queued_cmd *qc);
-@@ -669,8 +669,8 @@ static const struct pci_device_id mv_pci
+@@ -669,8 +669,8 @@
        { PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
        /* RocketRAID 1720/174x have different identifiers */
        { PCI_VDEVICE(TTI, 0x1720), chip_6042 },
@@ -148346,7 +148342,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
  
        { PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
        { PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
-@@ -883,7 +883,7 @@ static void mv_start_dma(struct ata_port
+@@ -883,7 +883,7 @@
                struct mv_host_priv *hpriv = ap->host->private_data;
                int hardport = mv_hardport_from_port(ap->port_no);
                void __iomem *hc_mmio = mv_hc_base_from_port(
@@ -148355,7 +148351,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
                u32 hc_irq_cause, ipending;
  
                /* clear EDMA event indicators, if any */
-@@ -1070,23 +1070,23 @@ static unsigned int mv_scr_offset(unsign
+@@ -1070,23 +1070,23 @@
        return ofs;
  }
  
@@ -148383,7 +148379,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
                return 0;
        } else
                return -EINVAL;
-@@ -2251,11 +2251,11 @@ static unsigned int mv5_scr_offset(unsig
+@@ -2251,11 +2251,11 @@
        return ofs;
  }
  
@@ -148398,7 +148394,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
        unsigned int ofs = mv5_scr_offset(sc_reg_in);
  
        if (ofs != 0xffffffffU) {
-@@ -2265,11 +2265,11 @@ static int mv5_scr_read(struct ata_port 
+@@ -2265,11 +2265,11 @@
                return -EINVAL;
  }
  
@@ -148413,10 +148409,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_mv.c linux-2.6.27.19-5.1/drivers/ata/sa
        unsigned int ofs = mv5_scr_offset(sc_reg_in);
  
        if (ofs != 0xffffffffU) {
-diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sata_nv.c
---- linux-2.6.27/drivers/ata/sata_nv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_nv.c  2009-03-25 16:11:14.000000000 +0000
-@@ -302,15 +302,15 @@ static void nv_ck804_host_stop(struct at
+diff -r 9608d5473017 drivers/ata/sata_nv.c
+--- a/drivers/ata/sata_nv.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_nv.c    Wed May 06 16:56:14 2009 +0100
+@@ -302,15 +302,15 @@
  static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance);
  static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance);
  static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance);
@@ -148436,7 +148432,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
  static int nv_adma_slave_config(struct scsi_device *sdev);
  static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
  static void nv_adma_qc_prep(struct ata_queued_cmd *qc);
-@@ -352,6 +352,7 @@ enum nv_host_type
+@@ -352,6 +352,7 @@
        NFORCE3 = NFORCE2,      /* NF2 == NF3 as far as sata_nv is concerned */
        CK804,
        ADMA,
@@ -148444,7 +148440,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
        SWNCQ,
  };
  
-@@ -363,10 +364,10 @@ static const struct pci_device_id nv_pci
+@@ -363,10 +364,10 @@
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
@@ -148459,7 +148455,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
-@@ -405,17 +406,8 @@ static struct scsi_host_template nv_swnc
+@@ -405,17 +406,8 @@
        .slave_configure        = nv_swncq_slave_config,
  };
  
@@ -148477,7 +148473,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
        .scr_read               = nv_scr_read,
        .scr_write              = nv_scr_write,
  };
-@@ -429,21 +421,38 @@ static struct ata_port_operations nv_gen
+@@ -429,21 +421,38 @@
        .hardreset              = ATA_OP_NULL,
  };
  
@@ -148518,11 +148514,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
  
        .check_atapi_dma        = nv_adma_check_atapi_dma,
        .sff_tf_read            = nv_adma_tf_read,
-@@ -466,8 +475,19 @@ static struct ata_port_operations nv_adm
+@@ -466,8 +475,19 @@
        .host_stop              = nv_adma_host_stop,
  };
  
--static struct ata_port_operations nv_swncq_ops = {
 +/* Kernel bz#12351 reports that when SWNCQ is enabled, for hotplug to
 + * work, hardreset should be used and hardreset can't report proper
 + * signature, which suggests that mcp5x is closer to nf2 as long as
@@ -148530,19 +148525,21 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
 + * nv_noclassify_hardreset().
 + */
 +static struct ata_port_operations nv_mcp5x_ops = {
-       .inherits               = &nv_common_ops,
++      .inherits               = &nv_common_ops,
 +      .hardreset              = nv_noclassify_hardreset,
 +};
 +
-+static struct ata_port_operations nv_swncq_ops = {
+ static struct ata_port_operations nv_swncq_ops = {
+-      .inherits               = &nv_common_ops,
 +      .inherits               = &nv_mcp5x_ops,
  
        .qc_defer               = ata_std_qc_defer,
        .qc_prep                = nv_swncq_qc_prep,
-@@ -530,6 +550,15 @@ static const struct ata_port_info nv_por
+@@ -529,6 +549,15 @@
+               .udma_mask      = NV_UDMA_MASK,
                .port_ops       = &nv_adma_ops,
                .private_data   = NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht),
-       },
++      },
 +      /* MCP5x */
 +      {
 +              .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
@@ -148551,11 +148548,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
 +              .udma_mask      = NV_UDMA_MASK,
 +              .port_ops       = &nv_mcp5x_ops,
 +              .private_data   = NV_PI_PRIV(nv_generic_interrupt, &nv_sht),
-+      },
+       },
        /* SWNCQ */
        {
-               .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
-@@ -1511,24 +1540,35 @@ static irqreturn_t nv_ck804_interrupt(in
+@@ -1511,22 +1540,33 @@
        return ret;
  }
  
@@ -148579,8 +148575,8 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
 -      iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
 +      iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg * 4));
        return 0;
- }
++}
++
 +static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
 +                                 unsigned long deadline)
 +{
@@ -148590,15 +148586,15 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
 +      rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
 +                               &online, NULL);
 +      return online ? -EAGAIN : rc;
-+}
-+
- static void nv_nf2_freeze(struct ata_port *ap)
- {
-       void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
-@@ -1605,21 +1645,6 @@ static void nv_mcp55_thaw(struct ata_por
-       ata_sff_thaw(ap);
  }
  
+ static void nv_nf2_freeze(struct ata_port *ap)
+@@ -1603,21 +1643,6 @@
+       mask |= (NV_INT_MASK_MCP55 << shift);
+       writel(mask, mmio_base + NV_INT_ENABLE_MCP55);
+       ata_sff_thaw(ap);
+-}
+-
 -static int nv_hardreset(struct ata_link *link, unsigned int *class,
 -                      unsigned long deadline)
 -{
@@ -148612,12 +148608,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
 -      if (rc)
 -              return rc;
 -      return -EAGAIN;
--}
--
+ }
  static void nv_adma_error_handler(struct ata_port *ap)
- {
-       struct nv_adma_port_priv *pp = ap->private_data;
-@@ -2218,9 +2243,9 @@ static void nv_swncq_host_interrupt(stru
+@@ -2218,9 +2243,9 @@
        if (!pp->qc_active)
                return;
  
@@ -148629,7 +148623,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
  
        if (ata_stat & ATA_ERR) {
                ata_ehi_clear_desc(ehi);
-@@ -2358,14 +2383,9 @@ static int nv_init_one(struct pci_dev *p
+@@ -2358,14 +2383,9 @@
        if (type == CK804 && adma_enabled) {
                dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n");
                type = ADMA;
@@ -148647,10 +148641,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_nv.c linux-2.6.27.19-5.1/drivers/ata/sa
        }
  
        ppi[0] = &nv_port_info[type];
-diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/ata/sata_promise.c
---- linux-2.6.27/drivers/ata/sata_promise.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_promise.c     2009-03-25 16:11:14.000000000 +0000
-@@ -137,8 +137,8 @@ struct pdc_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_promise.c
+--- a/drivers/ata/sata_promise.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_promise.c       Wed May 06 16:56:14 2009 +0100
+@@ -137,8 +137,8 @@
        dma_addr_t              pkt_dma;
  };
  
@@ -148661,7 +148655,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
  static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
  static int pdc_common_port_start(struct ata_port *ap);
  static int pdc_sata_port_start(struct ata_port *ap);
-@@ -153,6 +153,10 @@ static void pdc_freeze(struct ata_port *
+@@ -153,6 +153,10 @@
  static void pdc_sata_freeze(struct ata_port *ap);
  static void pdc_thaw(struct ata_port *ap);
  static void pdc_sata_thaw(struct ata_port *ap);
@@ -148672,7 +148666,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
  static void pdc_error_handler(struct ata_port *ap);
  static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
  static int pdc_pata_cable_detect(struct ata_port *ap);
-@@ -186,6 +190,7 @@ static struct ata_port_operations pdc_sa
+@@ -186,6 +190,7 @@
        .scr_read               = pdc_sata_scr_read,
        .scr_write              = pdc_sata_scr_write,
        .port_start             = pdc_sata_port_start,
@@ -148680,7 +148674,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
  };
  
  /* First-generation chips need a more restrictive ->check_atapi_dma op */
-@@ -200,6 +205,7 @@ static struct ata_port_operations pdc_pa
+@@ -200,6 +205,7 @@
        .freeze                 = pdc_freeze,
        .thaw                   = pdc_thaw,
        .port_start             = pdc_common_port_start,
@@ -148688,7 +148682,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
  };
  
  static const struct ata_port_info pdc_port_info[] = {
-@@ -386,19 +392,21 @@ static int pdc_sata_cable_detect(struct 
+@@ -386,19 +392,21 @@
        return ATA_CBL_SATA;
  }
  
@@ -148714,7 +148708,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
        return 0;
  }
  
-@@ -691,6 +699,20 @@ static void pdc_sata_thaw(struct ata_por
+@@ -691,6 +699,20 @@
        readl(host_mmio + hotplug_offset); /* flush */
  }
  
@@ -148735,7 +148729,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
  static void pdc_error_handler(struct ata_port *ap)
  {
        if (!(ap->pflags & ATA_PFLAG_FROZEN))
-@@ -731,7 +753,7 @@ static void pdc_error_intr(struct ata_po
+@@ -731,7 +753,7 @@
        if (sata_scr_valid(&ap->link)) {
                u32 serror;
  
@@ -148744,10 +148738,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_promise.c linux-2.6.27.19-5.1/drivers/a
                ehi->serror |= serror;
        }
  
-diff -purN linux-2.6.27/drivers/ata/sata_qstor.c linux-2.6.27.19-5.1/drivers/ata/sata_qstor.c
---- linux-2.6.27/drivers/ata/sata_qstor.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_qstor.c       2009-03-25 16:11:13.000000000 +0000
-@@ -111,8 +111,8 @@ struct qs_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_qstor.c
+--- a/drivers/ata/sata_qstor.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_qstor.c Wed May 06 16:56:14 2009 +0100
+@@ -111,8 +111,8 @@
        qs_state_t              state;
  };
  
@@ -148758,7 +148752,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_qstor.c linux-2.6.27.19-5.1/drivers/ata
  static int qs_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
  static int qs_port_start(struct ata_port *ap);
  static void qs_host_stop(struct ata_host *host);
-@@ -242,11 +242,11 @@ static int qs_prereset(struct ata_link *
+@@ -242,11 +242,11 @@
        return ata_sff_prereset(link, deadline);
  }
  
@@ -148772,7 +148766,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_qstor.c linux-2.6.27.19-5.1/drivers/ata
        return 0;
  }
  
-@@ -256,11 +256,11 @@ static void qs_error_handler(struct ata_
+@@ -256,11 +256,11 @@
        ata_std_error_handler(ap);
  }
  
@@ -148786,10 +148780,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_qstor.c linux-2.6.27.19-5.1/drivers/ata
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/sata_sil.c
---- linux-2.6.27/drivers/ata/sata_sil.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sil.c 2009-03-25 16:11:13.000000000 +0000
-@@ -115,8 +115,8 @@ static int sil_init_one(struct pci_dev *
+diff -r 9608d5473017 drivers/ata/sata_sil.c
+--- a/drivers/ata/sata_sil.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sil.c   Wed May 06 16:56:14 2009 +0100
+@@ -115,8 +115,8 @@
  static int sil_pci_device_resume(struct pci_dev *pdev);
  #endif
  static void sil_dev_config(struct ata_device *dev);
@@ -148800,7 +148794,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/s
  static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed);
  static void sil_freeze(struct ata_port *ap);
  static void sil_thaw(struct ata_port *ap);
-@@ -317,9 +317,9 @@ static inline void __iomem *sil_scr_addr
+@@ -317,9 +317,9 @@
        return NULL;
  }
  
@@ -148812,7 +148806,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/s
  
        if (mmio) {
                *val = readl(mmio);
-@@ -328,9 +328,9 @@ static int sil_scr_read(struct ata_port 
+@@ -328,9 +328,9 @@
        return -EINVAL;
  }
  
@@ -148824,7 +148818,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/s
  
        if (mmio) {
                writel(val, mmio);
-@@ -352,8 +352,8 @@ static void sil_host_intr(struct ata_por
+@@ -352,8 +352,8 @@
                 * controllers continue to assert IRQ as long as
                 * SError bits are pending.  Clear SError immediately.
                 */
@@ -148835,7 +148829,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/s
  
                /* Sometimes spurious interrupts occur, double check
                 * it's PHYRDY CHG.
-@@ -603,11 +603,38 @@ static void sil_init_controller(struct a
+@@ -603,11 +603,38 @@
        }
  }
  
@@ -148875,24 +148869,24 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil.c linux-2.6.27.19-5.1/drivers/ata/s
        struct ata_host *host;
        void __iomem *mmio_base;
        int n_ports, rc;
-@@ -621,6 +648,13 @@ static int sil_init_one(struct pci_dev *
+@@ -620,6 +647,13 @@
+       n_ports = 2;
        if (board_id == sil_3114)
                n_ports = 4;
++
 +      if (sil_broken_system_poweroff(pdev)) {
 +              pi.flags |= ATA_FLAG_NO_POWEROFF_SPINDOWN |
 +                                      ATA_FLAG_NO_HIBERNATE_SPINDOWN;
 +              dev_info(&pdev->dev, "quirky BIOS, skipping spindown "
 +                              "on poweroff and hibernation\n");
 +      }
-+
        host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
        if (!host)
-               return -ENOMEM;
-diff -purN linux-2.6.27/drivers/ata/sata_sil24.c linux-2.6.27.19-5.1/drivers/ata/sata_sil24.c
---- linux-2.6.27/drivers/ata/sata_sil24.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sil24.c       2009-03-25 16:11:13.000000000 +0000
-@@ -340,8 +340,8 @@ struct sil24_port_priv {
+diff -r 9608d5473017 drivers/ata/sata_sil24.c
+--- a/drivers/ata/sata_sil24.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sil24.c Wed May 06 16:56:14 2009 +0100
+@@ -340,8 +340,8 @@
  };
  
  static void sil24_dev_config(struct ata_device *dev);
@@ -148903,7 +148897,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil24.c linux-2.6.27.19-5.1/drivers/ata
  static int sil24_qc_defer(struct ata_queued_cmd *qc);
  static void sil24_qc_prep(struct ata_queued_cmd *qc);
  static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc);
-@@ -504,9 +504,9 @@ static int sil24_scr_map[] = {
+@@ -504,9 +504,9 @@
        [SCR_ACTIVE]    = 3,
  };
  
@@ -148915,7 +148909,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil24.c linux-2.6.27.19-5.1/drivers/ata
  
        if (sc_reg < ARRAY_SIZE(sil24_scr_map)) {
                void __iomem *addr;
-@@ -517,9 +517,9 @@ static int sil24_scr_read(struct ata_por
+@@ -517,9 +517,9 @@
        return -EINVAL;
  }
  
@@ -148927,10 +148921,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_sil24.c linux-2.6.27.19-5.1/drivers/ata
  
        if (sc_reg < ARRAY_SIZE(sil24_scr_map)) {
                void __iomem *addr;
-diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/sata_sis.c
---- linux-2.6.27/drivers/ata/sata_sis.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_sis.c 2009-03-25 16:11:14.000000000 +0000
-@@ -64,8 +64,8 @@ enum {
+diff -r 9608d5473017 drivers/ata/sata_sis.c
+--- a/drivers/ata/sata_sis.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_sis.c   Wed May 06 16:56:14 2009 +0100
+@@ -64,8 +64,8 @@
  };
  
  static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -148941,7 +148935,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
  
  static const struct pci_device_id sis_pci_tbl[] = {
        { PCI_VDEVICE(SI, 0x0180), sis_180 },   /* SiS 964/180 */
-@@ -134,10 +134,11 @@ static unsigned int get_scr_cfg_addr(str
+@@ -134,10 +134,11 @@
        return addr;
  }
  
@@ -148956,7 +148950,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
        u32 val2 = 0;
        u8 pmr;
  
-@@ -158,10 +159,11 @@ static u32 sis_scr_cfg_read(struct ata_p
+@@ -158,10 +159,11 @@
        return 0;
  }
  
@@ -148971,7 +148965,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
        u8 pmr;
  
        if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
-@@ -178,8 +180,9 @@ static int sis_scr_cfg_write(struct ata_
+@@ -178,8 +180,9 @@
        return 0;
  }
  
@@ -148982,7 +148976,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        u8 pmr;
  
-@@ -187,7 +190,7 @@ static int sis_scr_read(struct ata_port 
+@@ -187,7 +190,7 @@
                return -EINVAL;
  
        if (ap->flags & SIS_FLAG_CFGSCR)
@@ -148991,7 +148985,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
  
        pci_read_config_byte(pdev, SIS_PMR, &pmr);
  
-@@ -202,8 +205,9 @@ static int sis_scr_read(struct ata_port 
+@@ -202,8 +205,9 @@
        return 0;
  }
  
@@ -149002,7 +148996,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        u8 pmr;
  
-@@ -213,7 +217,7 @@ static int sis_scr_write(struct ata_port
+@@ -213,7 +217,7 @@
        pci_read_config_byte(pdev, SIS_PMR, &pmr);
  
        if (ap->flags & SIS_FLAG_CFGSCR)
@@ -149011,10 +149005,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_sis.c linux-2.6.27.19-5.1/drivers/ata/s
        else {
                iowrite32(val, ap->ioaddr.scr_addr + (sc_reg * 4));
                if ((pdev->device == 0x0182) || (pdev->device == 0x0183) ||
-diff -purN linux-2.6.27/drivers/ata/sata_svw.c linux-2.6.27.19-5.1/drivers/ata/sata_svw.c
---- linux-2.6.27/drivers/ata/sata_svw.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_svw.c 2009-03-25 16:11:14.000000000 +0000
-@@ -123,20 +123,22 @@ static int k2_sata_check_atapi_dma(struc
+diff -r 9608d5473017 drivers/ata/sata_svw.c
+--- a/drivers/ata/sata_svw.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_svw.c   Wed May 06 16:56:14 2009 +0100
+@@ -123,20 +123,22 @@
        }
  }
  
@@ -149041,10 +149035,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_svw.c linux-2.6.27.19-5.1/drivers/ata/s
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/ata/sata_uli.c linux-2.6.27.19-5.1/drivers/ata/sata_uli.c
---- linux-2.6.27/drivers/ata/sata_uli.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_uli.c 2009-03-25 16:11:13.000000000 +0000
-@@ -57,8 +57,8 @@ struct uli_priv {
+diff -r 9608d5473017 drivers/ata/sata_uli.c
+--- a/drivers/ata/sata_uli.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_uli.c   Wed May 06 16:56:14 2009 +0100
+@@ -57,8 +57,8 @@
  };
  
  static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -149055,7 +149049,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_uli.c linux-2.6.27.19-5.1/drivers/ata/s
  
  static const struct pci_device_id uli_pci_tbl[] = {
        { PCI_VDEVICE(AL, 0x5289), uli_5289 },
-@@ -107,39 +107,39 @@ static unsigned int get_scr_cfg_addr(str
+@@ -107,39 +107,39 @@
        return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg);
  }
  
@@ -149105,9 +149099,9 @@ diff -purN linux-2.6.27/drivers/ata/sata_uli.c linux-2.6.27.19-5.1/drivers/ata/s
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/sata_via.c
---- linux-2.6.27/drivers/ata/sata_via.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_via.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/ata/sata_via.c
+--- a/drivers/ata/sata_via.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_via.c   Wed May 06 16:56:14 2009 +0100
 @@ -44,11 +44,16 @@
  #include <linux/libata.h>
  
@@ -149126,7 +149120,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  };
  
  enum {
-@@ -68,8 +73,11 @@ enum {
+@@ -68,8 +73,11 @@
  };
  
  static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -149140,7 +149134,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  static void svia_noop_freeze(struct ata_port *ap);
  static int vt6420_prereset(struct ata_link *link, unsigned long deadline);
  static int vt6421_pata_cable_detect(struct ata_port *ap);
-@@ -78,12 +86,14 @@ static void vt6421_set_dma_mode(struct a
+@@ -78,12 +86,14 @@
  
  static const struct pci_device_id svia_pci_tbl[] = {
        { PCI_VDEVICE(VIA, 0x5337), vt6420 },
@@ -149159,17 +149153,17 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  
        { }     /* terminate list */
  };
-@@ -103,25 +113,37 @@ static struct scsi_host_template svia_sh
+@@ -103,23 +113,35 @@
        ATA_BMDMA_SHT(DRV_NAME),
  };
  
--static struct ata_port_operations vt6420_sata_ops = {
 +static struct ata_port_operations svia_base_ops = {
-       .inherits               = &ata_bmdma_port_ops,
++      .inherits               = &ata_bmdma_port_ops,
 +      .sff_tf_load            = svia_tf_load,
 +};
 +
-+static struct ata_port_operations vt6420_sata_ops = {
+ static struct ata_port_operations vt6420_sata_ops = {
+-      .inherits               = &ata_bmdma_port_ops,
 +      .inherits               = &svia_base_ops,
        .freeze                 = svia_noop_freeze,
        .prereset               = vt6420_prereset,
@@ -149188,19 +149182,17 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
 +      .inherits               = &svia_base_ops,
        .scr_read               = svia_scr_read,
        .scr_write              = svia_scr_write,
- };
++};
++
 +static struct ata_port_operations vt8251_ops = {
 +      .inherits               = &svia_base_ops,
 +      .hardreset              = sata_std_hardreset,
 +      .scr_read               = vt8251_scr_read,
 +      .scr_write              = vt8251_scr_write,
-+};
-+
+ };
  static const struct ata_port_info vt6420_port_info = {
-       .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
-       .pio_mask       = 0x1f,
-@@ -146,28 +168,137 @@ static struct ata_port_info vt6421_pport
+@@ -146,26 +168,135 @@
        .port_ops       = &vt6421_pata_ops,
  };
  
@@ -149236,7 +149228,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
                return -EINVAL;
 -      iowrite32(val, ap->ioaddr.scr_addr + (4 * sc_reg));
 +      iowrite32(val, link->ap->ioaddr.scr_addr + (4 * sc_reg));
-+      return 0;
+       return 0;
 +}
 +
 +static int vt8251_scr_read(struct ata_link *link, unsigned int scr, u32 *val)
@@ -149285,9 +149277,9 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
 +      }
 +
 +      *val = v;
-       return 0;
- }
++      return 0;
++}
++
 +static int vt8251_scr_write(struct ata_link *link, unsigned int scr, u32 val)
 +{
 +      struct pci_dev *pdev = to_pci_dev(link->ap->host->dev);
@@ -149337,12 +149329,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
 +              tf = &ttf;
 +      }
 +      ata_sff_tf_load(ap, tf);
-+}
-+
+ }
  static void svia_noop_freeze(struct ata_port *ap)
- {
-       /* Some VIA controllers choke if ATA_NIEN is manipulated in
-@@ -210,20 +341,20 @@ static int vt6420_prereset(struct ata_li
+@@ -210,20 +341,20 @@
                goto skip_scr;
  
        /* Resume phy.  This is the old SATA resume sequence */
@@ -149368,7 +149358,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  
        online = (sstatus & 0xf) == 0x3;
  
-@@ -232,7 +363,7 @@ static int vt6420_prereset(struct ata_li
+@@ -232,7 +363,7 @@
                        online ? "up" : "down", sstatus, scontrol);
  
        /* SStatus is read one more time */
@@ -149377,7 +149367,7 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  
        if (!online) {
                /* tell EH to bail */
-@@ -367,6 +498,30 @@ static int vt6421_prepare_host(struct pc
+@@ -367,6 +498,30 @@
        return 0;
  }
  
@@ -149408,21 +149398,21 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
  static void svia_configure(struct pci_dev *pdev)
  {
        u8 tmp8;
-@@ -422,10 +577,10 @@ static int svia_init_one(struct pci_dev 
+@@ -422,10 +577,10 @@
        if (rc)
                return rc;
  
 -      if (board_id == vt6420)
--              bar_sizes = &svia_bar_sizes[0];
--      else
 +      if (board_id == vt6421)
-               bar_sizes = &vt6421_bar_sizes[0];
++              bar_sizes = &vt6421_bar_sizes[0];
 +      else
-+              bar_sizes = &svia_bar_sizes[0];
+               bar_sizes = &svia_bar_sizes[0];
+-      else
+-              bar_sizes = &vt6421_bar_sizes[0];
  
        for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
                if ((pci_resource_start(pdev, i) == 0) ||
-@@ -438,10 +593,19 @@ static int svia_init_one(struct pci_dev 
+@@ -438,10 +593,19 @@
                        return -ENODEV;
                }
  
@@ -149444,10 +149434,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_via.c linux-2.6.27.19-5.1/drivers/ata/s
        if (rc)
                return rc;
  
-diff -purN linux-2.6.27/drivers/ata/sata_vsc.c linux-2.6.27.19-5.1/drivers/ata/sata_vsc.c
---- linux-2.6.27/drivers/ata/sata_vsc.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ata/sata_vsc.c 2009-03-25 16:11:14.000000000 +0000
-@@ -98,20 +98,22 @@ enum {
+diff -r 9608d5473017 drivers/ata/sata_vsc.c
+--- a/drivers/ata/sata_vsc.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ata/sata_vsc.c   Wed May 06 16:56:14 2009 +0100
+@@ -98,20 +98,22 @@
                              VSC_SATA_INT_PHY_CHANGE),
  };
  
@@ -149474,10 +149464,10 @@ diff -purN linux-2.6.27/drivers/ata/sata_vsc.c linux-2.6.27.19-5.1/drivers/ata/s
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/core.c
---- linux-2.6.27/drivers/base/core.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/base/core.c    2009-03-25 16:11:18.000000000 +0000
-@@ -523,11 +523,16 @@ static void klist_children_put(struct kl
+diff -r 9608d5473017 drivers/base/core.c
+--- a/drivers/base/core.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/base/core.c      Wed May 06 16:56:15 2009 +0100
+@@ -523,11 +523,16 @@
   * device_initialize - init device structure.
   * @dev: device.
   *
@@ -149498,7 +149488,7 @@ diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/cor
   */
  void device_initialize(struct device *dev)
  {
-@@ -836,9 +841,13 @@ static void device_remove_sys_dev_entry(
+@@ -836,9 +841,13 @@
   * This is part 2 of device_register(), though may be called
   * separately _iff_ device_initialize() has been called separately.
   *
@@ -149513,7 +149503,7 @@ diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/cor
   */
  int device_add(struct device *dev)
  {
-@@ -965,6 +974,10 @@ done:
+@@ -965,6 +974,10 @@
   * I.e. you should only call the two helpers separately if
   * have a clearly defined need to use and refcount the device
   * before it is added to the hierarchy.
@@ -149524,7 +149514,7 @@ diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/cor
   */
  int device_register(struct device *dev)
  {
-@@ -1243,7 +1256,7 @@ struct device *device_create_vargs(struc
+@@ -1243,7 +1256,7 @@
        return dev;
  
  error:
@@ -149533,10 +149523,10 @@ diff -purN linux-2.6.27/drivers/base/core.c linux-2.6.27.19-5.1/drivers/base/cor
        return ERR_PTR(retval);
  }
  EXPORT_SYMBOL_GPL(device_create_vargs);
-diff -purN linux-2.6.27/drivers/base/sys.c linux-2.6.27.19-5.1/drivers/base/sys.c
---- linux-2.6.27/drivers/base/sys.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/base/sys.c     2009-03-25 16:11:18.000000000 +0000
-@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_de
+diff -r 9608d5473017 drivers/base/sys.c
+--- a/drivers/base/sys.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/base/sys.c       Wed May 06 16:56:15 2009 +0100
+@@ -488,7 +488,8 @@
        if (end == buf)
                return -EINVAL;
        *(unsigned long *)(ea->var) = new;
@@ -149546,7 +149536,7 @@ diff -purN linux-2.6.27/drivers/base/sys.c linux-2.6.27.19-5.1/drivers/base/sys.
  }
  EXPORT_SYMBOL_GPL(sysdev_store_ulong);
  
-@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_devi
+@@ -511,7 +512,8 @@
        if (end == buf || new > INT_MAX || new < INT_MIN)
                return -EINVAL;
        *(int *)(ea->var) = new;
@@ -149556,10 +149546,10 @@ diff -purN linux-2.6.27/drivers/base/sys.c linux-2.6.27.19-5.1/drivers/base/sys.
  }
  EXPORT_SYMBOL_GPL(sysdev_store_int);
  
-diff -purN linux-2.6.27/drivers/block/Kconfig linux-2.6.27.19-5.1/drivers/block/Kconfig
---- linux-2.6.27/drivers/block/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/Kconfig  2009-03-25 16:11:23.000000000 +0000
-@@ -409,6 +409,12 @@ config SUNVDC
+diff -r 9608d5473017 drivers/block/Kconfig
+--- a/drivers/block/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/Kconfig    Wed May 06 16:56:15 2009 +0100
+@@ -409,6 +409,12 @@
          Support for virtual disk devices as a client under Sun
          Logical Domains.
  
@@ -149572,7 +149562,7 @@ diff -purN linux-2.6.27/drivers/block/Kconfig linux-2.6.27.19-5.1/drivers/block/
  source "drivers/s390/block/Kconfig"
  
  config XILINX_SYSACE
-@@ -417,9 +423,9 @@ config XILINX_SYSACE
+@@ -417,9 +423,9 @@
        help
          Include support for the Xilinx SystemACE CompactFlash interface
  
@@ -149584,20 +149574,20 @@ diff -purN linux-2.6.27/drivers/block/Kconfig linux-2.6.27.19-5.1/drivers/block/
        default y
        help
          This driver implements the front-end of the Xen virtual
-diff -purN linux-2.6.27/drivers/block/Makefile linux-2.6.27.19-5.1/drivers/block/Makefile
---- linux-2.6.27/drivers/block/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/Makefile 2009-03-25 16:11:23.000000000 +0000
-@@ -31,4 +31,5 @@ obj-$(CONFIG_BLK_DEV_SX8)    += sx8.o
+diff -r 9608d5473017 drivers/block/Makefile
+--- a/drivers/block/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/Makefile   Wed May 06 16:56:15 2009 +0100
+@@ -31,4 +31,5 @@
  obj-$(CONFIG_BLK_DEV_UB)      += ub.o
  obj-$(CONFIG_BLK_DEV_HD)      += hd.o
  
 -obj-$(CONFIG_XEN_BLKDEV_FRONTEND)     += xen-blkfront.o
 +obj-$(CONFIG_XEN_BLKFRONT)    += xen-blkfront.o
 +obj-$(CONFIG_CIPHER_TWOFISH)  += loop_fish2.o
-diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/cciss.c
---- linux-2.6.27/drivers/block/cciss.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/cciss.c  2009-03-25 16:11:23.000000000 +0000
-@@ -96,6 +96,8 @@ static const struct pci_device_id cciss_
+diff -r 9608d5473017 drivers/block/cciss.c
+--- a/drivers/block/cciss.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/cciss.c    Wed May 06 16:56:15 2009 +0100
+@@ -96,6 +96,8 @@
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3245},
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3247},
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3249},
@@ -149606,7 +149596,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
        {PCI_VENDOR_ID_HP,     PCI_ANY_ID,      PCI_ANY_ID, PCI_ANY_ID,
                PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0},
        {0,}
-@@ -133,6 +135,8 @@ static struct board_type products[] = {
+@@ -133,6 +135,8 @@
        {0x3245103C, "Smart Array P410i", &SA5_access},
        {0x3247103C, "Smart Array P411", &SA5_access},
        {0x3249103C, "Smart Array P812", &SA5_access},
@@ -149615,7 +149605,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
        {0xFFFF103C, "Unknown Smart Array", &SA5_access},
  };
  
-@@ -160,7 +164,7 @@ static int cciss_getgeo(struct block_dev
+@@ -160,7 +164,7 @@
  
  static int cciss_revalidate(struct gendisk *disk);
  static int rebuild_lun_table(ctlr_info_t *h, int first_time);
@@ -149624,7 +149614,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
                           int clear_all);
  
  static void cciss_read_capacity(int ctlr, int logvol, int withirq,
-@@ -1365,6 +1369,7 @@ static void cciss_add_disk(ctlr_info_t *
+@@ -1365,6 +1369,7 @@
        disk->first_minor = drv_index << NWD_SHIFT;
        disk->fops = &cciss_fops;
        disk->private_data = &h->drv[drv_index];
@@ -149632,7 +149622,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
  
        /* Set up queue information */
        blk_queue_bounce_limit(disk->queue, h->pdev->dma_mask);
-@@ -1486,8 +1491,7 @@ static void cciss_update_drive_info(int 
+@@ -1486,8 +1491,7 @@
                 * which keeps the interrupt handler from starting
                 * the queue.
                 */
@@ -149642,7 +149632,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
                h->drv[drv_index].busy_configuring = 0;
        }
  
-@@ -1687,6 +1691,11 @@ static int rebuild_lun_table(ctlr_info_t
+@@ -1687,6 +1691,11 @@
        for (i = 0; i <= h->highest_lun; i++) {
                int j;
                drv_found = 0;
@@ -149654,7 +149644,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
                for (j = 0; j < num_luns; j++) {
                        memcpy(&lunid, &ld_buff->LUN[j][0], 4);
                        lunid = le32_to_cpu(lunid);
-@@ -1700,8 +1709,7 @@ static int rebuild_lun_table(ctlr_info_t
+@@ -1700,8 +1709,7 @@
                        spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
                        h->drv[i].busy_configuring = 1;
                        spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
@@ -149664,7 +149654,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
                        h->drv[i].busy_configuring = 0;
                }
        }
-@@ -1771,15 +1779,19 @@ mem_msg:
+@@ -1771,14 +1779,18 @@
   *             the highest_lun should be left unchanged and the LunID
   *             should not be cleared.
  */
@@ -149679,14 +149669,13 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
  
        if (!capable(CAP_SYS_RAWIO))
                return -EPERM;
++
 +      drv = &h->drv[drv_index];
 +      disk = h->gendisk[drv_index];
-+
        /* make sure logical volume is NOT is use */
        if (clear_all || (h->gendisk[0] == disk)) {
-               if (drv->usage_count > 1)
-@@ -3403,7 +3415,8 @@ static int __devinit cciss_init_one(stru
+@@ -3403,7 +3415,8 @@
        int i;
        int j = 0;
        int rc;
@@ -149696,7 +149685,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
  
        i = alloc_cciss_hba();
        if (i < 0)
-@@ -3509,6 +3522,25 @@ static int __devinit cciss_init_one(stru
+@@ -3509,6 +3522,25 @@
        /* Turn the interrupts on so we can service requests */
        hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON);
  
@@ -149722,7 +149711,7 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
        cciss_procinit(i);
  
        hba[i]->cciss_max_sectors = 2048;
-@@ -3519,6 +3551,7 @@ static int __devinit cciss_init_one(stru
+@@ -3519,6 +3551,7 @@
        return 1;
  
  clean4:
@@ -149730,10 +149719,10 @@ diff -purN linux-2.6.27/drivers/block/cciss.c linux-2.6.27.19-5.1/drivers/block/
  #ifdef CONFIG_CISS_SCSI_TAPE
        kfree(hba[i]->scsi_rejects.complete);
  #endif
-diff -purN linux-2.6.27/drivers/block/cpqarray.c linux-2.6.27.19-5.1/drivers/block/cpqarray.c
---- linux-2.6.27/drivers/block/cpqarray.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/cpqarray.c       2009-03-25 16:11:23.000000000 +0000
-@@ -567,7 +567,12 @@ static int __init cpqarray_init(void)
+diff -r 9608d5473017 drivers/block/cpqarray.c
+--- a/drivers/block/cpqarray.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/cpqarray.c Wed May 06 16:56:15 2009 +0100
+@@ -567,7 +567,12 @@
                        num_cntlrs_reg++;
        }
  
@@ -149747,10 +149736,10 @@ diff -purN linux-2.6.27/drivers/block/cpqarray.c linux-2.6.27.19-5.1/drivers/blo
  }
  
  /* Function to find the first free pointer into our hba[] array */
-diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/loop.c
---- linux-2.6.27/drivers/block/loop.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/loop.c   2009-03-25 16:11:23.000000000 +0000
-@@ -203,6 +203,38 @@ lo_do_transfer(struct loop_device *lo, i
+diff -r 9608d5473017 drivers/block/loop.c
+--- a/drivers/block/loop.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/loop.c     Wed May 06 16:56:15 2009 +0100
+@@ -203,6 +203,38 @@
        return lo->transfer(lo, cmd, rpage, roffs, lpage, loffs, size, rblock);
  }
  
@@ -149789,7 +149778,7 @@ diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/l
  /**
   * do_lo_send_aops - helper for writing data to a loop device
   *
-@@ -214,11 +246,18 @@ static int do_lo_send_aops(struct loop_d
+@@ -214,11 +246,18 @@
  {
        struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
        struct address_space *mapping = file->f_mapping;
@@ -149808,7 +149797,7 @@ diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/l
        index = pos >> PAGE_CACHE_SHIFT;
        offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1);
        bv_offs = bvec->bv_offset;
-@@ -261,6 +300,15 @@ static int do_lo_send_aops(struct loop_d
+@@ -261,6 +300,15 @@
                pos += copied;
        }
        ret = 0;
@@ -149824,7 +149813,7 @@ diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/l
  out:
        mutex_unlock(&mapping->host->i_mutex);
        return ret;
-@@ -475,12 +523,24 @@ static int do_bio_filebacked(struct loop
+@@ -475,12 +523,24 @@
  {
        loff_t pos;
        int ret;
@@ -149849,19 +149838,19 @@ diff -purN linux-2.6.27/drivers/block/loop.c linux-2.6.27.19-5.1/drivers/block/l
        return ret;
  }
  
-@@ -757,6 +817,9 @@ static int loop_set_fd(struct loop_devic
+@@ -756,6 +816,9 @@
        if (!(file->f_mode & FMODE_WRITE))
                lo_flags |= LO_FLAGS_READ_ONLY;
++
 +      if ((file->f_flags & O_SYNC) && (!file->f_op || !file->f_op->fsync))
 +              return -EINVAL;
-+
        error = -EINVAL;
        if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
-               const struct address_space_operations *aops = mapping->a_ops;
-diff -purN linux-2.6.27/drivers/block/loop_fish2.c linux-2.6.27.19-5.1/drivers/block/loop_fish2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/loop_fish2.c     2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/block/loop_fish2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/block/loop_fish2.c       Wed May 06 16:56:15 2009 +0100
 @@ -0,0 +1,625 @@
 +#include <linux/module.h>
 +#include <linux/errno.h>
@@ -150488,10 +150477,10 @@ diff -purN linux-2.6.27/drivers/block/loop_fish2.c linux-2.6.27.19-5.1/drivers/b
 +module_init(loop_fish2_init);
 +module_exit(loop_fish2_exit);
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/block/nbd.c linux-2.6.27.19-5.1/drivers/block/nbd.c
---- linux-2.6.27/drivers/block/nbd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/nbd.c    2009-03-25 16:11:23.000000000 +0000
-@@ -547,6 +547,15 @@ static void do_nbd_request(struct reques
+diff -r 9608d5473017 drivers/block/nbd.c
+--- a/drivers/block/nbd.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/nbd.c      Wed May 06 16:56:15 2009 +0100
+@@ -547,6 +547,15 @@
  
                BUG_ON(lo->magic != LO_MAGIC);
  
@@ -150507,10 +150496,10 @@ diff -purN linux-2.6.27/drivers/block/nbd.c linux-2.6.27.19-5.1/drivers/block/nb
                spin_lock_irq(&lo->queue_lock);
                list_add_tail(&req->queuelist, &lo->waiting_queue);
                spin_unlock_irq(&lo->queue_lock);
-diff -purN linux-2.6.27/drivers/block/ps3disk.c linux-2.6.27.19-5.1/drivers/block/ps3disk.c
---- linux-2.6.27/drivers/block/ps3disk.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/ps3disk.c        2009-03-25 16:11:23.000000000 +0000
-@@ -199,7 +199,8 @@ static void ps3disk_do_request(struct ps
+diff -r 9608d5473017 drivers/block/ps3disk.c
+--- a/drivers/block/ps3disk.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/ps3disk.c  Wed May 06 16:56:15 2009 +0100
+@@ -199,7 +199,8 @@
                if (blk_fs_request(req)) {
                        if (ps3disk_submit_request_sg(dev, req))
                                break;
@@ -150520,7 +150509,7 @@ diff -purN linux-2.6.27/drivers/block/ps3disk.c linux-2.6.27.19-5.1/drivers/bloc
                        if (ps3disk_submit_flush_request(dev, req))
                                break;
                } else {
-@@ -257,7 +258,8 @@ static irqreturn_t ps3disk_interrupt(int
+@@ -257,7 +258,8 @@
                return IRQ_HANDLED;
        }
  
@@ -150530,7 +150519,7 @@ diff -purN linux-2.6.27/drivers/block/ps3disk.c linux-2.6.27.19-5.1/drivers/bloc
                read = 0;
                num_sectors = req->hard_cur_sectors;
                op = "flush";
-@@ -405,7 +407,8 @@ static void ps3disk_prepare_flush(struct
+@@ -405,7 +407,8 @@
  
        dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);
  
@@ -150540,10 +150529,10 @@ diff -purN linux-2.6.27/drivers/block/ps3disk.c linux-2.6.27.19-5.1/drivers/bloc
  }
  
  static unsigned long ps3disk_mask;
-diff -purN linux-2.6.27/drivers/block/virtio_blk.c linux-2.6.27.19-5.1/drivers/block/virtio_blk.c
---- linux-2.6.27/drivers/block/virtio_blk.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/virtio_blk.c     2009-03-25 16:11:22.000000000 +0000
-@@ -84,11 +84,11 @@ static bool do_req(struct request_queue 
+diff -r 9608d5473017 drivers/block/virtio_blk.c
+--- a/drivers/block/virtio_blk.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/virtio_blk.c       Wed May 06 16:56:15 2009 +0100
+@@ -84,11 +84,11 @@
        if (blk_fs_request(vbr->req)) {
                vbr->out_hdr.type = 0;
                vbr->out_hdr.sector = vbr->req->sector;
@@ -150557,10 +150546,10 @@ diff -purN linux-2.6.27/drivers/block/virtio_blk.c linux-2.6.27.19-5.1/drivers/b
        } else {
                /* We don't put anything else in the queue. */
                BUG();
-diff -purN linux-2.6.27/drivers/block/xen-blkfront.c linux-2.6.27.19-5.1/drivers/block/xen-blkfront.c
---- linux-2.6.27/drivers/block/xen-blkfront.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/block/xen-blkfront.c   2009-03-25 16:11:23.000000000 +0000
-@@ -1021,7 +1021,6 @@ static struct xenbus_device_id blkfront_
+diff -r 9608d5473017 drivers/block/xen-blkfront.c
+--- a/drivers/block/xen-blkfront.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/block/xen-blkfront.c     Wed May 06 16:56:15 2009 +0100
+@@ -1021,7 +1021,6 @@
  
  static struct xenbus_driver blkfront = {
        .name = "vbd",
@@ -150568,10 +150557,10 @@ diff -purN linux-2.6.27/drivers/block/xen-blkfront.c linux-2.6.27.19-5.1/drivers
        .ids = blkfront_ids,
        .probe = blkfront_probe,
        .remove = blkfront_remove,
-diff -purN linux-2.6.27/drivers/bluetooth/btsdio.c linux-2.6.27.19-5.1/drivers/bluetooth/btsdio.c
---- linux-2.6.27/drivers/bluetooth/btsdio.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/bluetooth/btsdio.c     2009-03-25 16:11:03.000000000 +0000
-@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdi
+diff -r 9608d5473017 drivers/bluetooth/btsdio.c
+--- a/drivers/bluetooth/btsdio.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/bluetooth/btsdio.c       Wed May 06 16:56:15 2009 +0100
+@@ -91,6 +91,7 @@
  
        err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
        if (err < 0) {
@@ -150579,7 +150568,7 @@ diff -purN linux-2.6.27/drivers/bluetooth/btsdio.c linux-2.6.27.19-5.1/drivers/b
                sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
                return err;
        }
-@@ -152,7 +153,7 @@ static int btsdio_rx_packet(struct btsdi
+@@ -152,7 +153,7 @@
  
        err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
        if (err < 0) {
@@ -150588,10 +150577,10 @@ diff -purN linux-2.6.27/drivers/bluetooth/btsdio.c linux-2.6.27.19-5.1/drivers/b
                return err;
        }
  
-diff -purN linux-2.6.27/drivers/cdrom/Makefile linux-2.6.27.19-5.1/drivers/cdrom/Makefile
---- linux-2.6.27/drivers/cdrom/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cdrom/Makefile 2009-03-25 16:11:30.000000000 +0000
-@@ -9,6 +9,7 @@ obj-$(CONFIG_BLK_DEV_IDECD)    +=          
+diff -r 9608d5473017 drivers/cdrom/Makefile
+--- a/drivers/cdrom/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cdrom/Makefile   Wed May 06 16:56:15 2009 +0100
+@@ -9,6 +9,7 @@
  obj-$(CONFIG_BLK_DEV_SR)      +=              cdrom.o
  obj-$(CONFIG_PARIDE_PCD)      +=              cdrom.o
  obj-$(CONFIG_CDROM_PKTCDVD)   +=              cdrom.o
@@ -150599,10 +150588,10 @@ diff -purN linux-2.6.27/drivers/cdrom/Makefile linux-2.6.27.19-5.1/drivers/cdrom
  
  obj-$(CONFIG_VIOCD)           += viocd.o      cdrom.o
  obj-$(CONFIG_GDROM)           += gdrom.o      cdrom.o
-diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kconfig
---- linux-2.6.27/drivers/char/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/Kconfig   2009-03-25 16:11:21.000000000 +0000
-@@ -624,7 +624,7 @@ config HVC_BEAT
+diff -r 9608d5473017 drivers/char/Kconfig
+--- a/drivers/char/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/Kconfig     Wed May 06 16:56:15 2009 +0100
+@@ -624,7 +624,7 @@
  
  config HVC_XEN
        bool "Xen Hypervisor Console support"
@@ -150611,7 +150600,7 @@ diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kc
        select HVC_DRIVER
        select HVC_IRQ
        default y
-@@ -1026,7 +1026,7 @@ config RAW_DRIVER
+@@ -1026,7 +1026,7 @@
            with the O_DIRECT flag.
  
  config MAX_RAW_DEVS
@@ -150620,7 +150609,7 @@ diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kc
        depends on RAW_DRIVER
        default "256"
        help
-@@ -1037,7 +1037,7 @@ config MAX_RAW_DEVS
+@@ -1037,7 +1037,7 @@
  config HPET
        bool "HPET - High Precision Event Timer" if (X86 || IA64)
        default n
@@ -150629,7 +150618,7 @@ diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kc
        help
          If you say Y here, you will have a miscdevice named "/dev/hpet/".  Each
          open selects one of the timers supported by the HPET.  The timers are
-@@ -1104,5 +1104,10 @@ config DEVPORT
+@@ -1104,5 +1104,10 @@
  
  source "drivers/s390/char/Kconfig"
  
@@ -150640,10 +150629,10 @@ diff -purN linux-2.6.27/drivers/char/Kconfig linux-2.6.27.19-5.1/drivers/char/Kc
 +
  endmenu
  
-diff -purN linux-2.6.27/drivers/char/Makefile linux-2.6.27.19-5.1/drivers/char/Makefile
---- linux-2.6.27/drivers/char/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/Makefile  2009-03-25 16:11:22.000000000 +0000
-@@ -105,6 +105,7 @@ obj-$(CONFIG_IPMI_HANDLER) += ipmi/
+diff -r 9608d5473017 drivers/char/Makefile
+--- a/drivers/char/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/Makefile    Wed May 06 16:56:15 2009 +0100
+@@ -105,6 +105,7 @@
  
  obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
  obj-$(CONFIG_TCG_TPM)         += tpm/
@@ -150651,9 +150640,9 @@ diff -purN linux-2.6.27/drivers/char/Makefile linux-2.6.27.19-5.1/drivers/char/M
  
  obj-$(CONFIG_PS3_FLASH)               += ps3flash.o
  
-diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers/char/agp/intel-agp.c
---- linux-2.6.27/drivers/char/agp/intel-agp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/agp/intel-agp.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/agp/intel-agp.c
+--- a/drivers/char/agp/intel-agp.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/agp/intel-agp.c     Wed May 06 16:56:15 2009 +0100
 @@ -40,6 +40,8 @@
  #define PCI_DEVICE_ID_INTEL_Q45_IG          0x2E12
  #define PCI_DEVICE_ID_INTEL_G45_HB          0x2E20
@@ -150684,7 +150673,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
  
  extern int agp_memory_reserved;
  
-@@ -214,8 +217,8 @@ static int intel_i810_configure(void)
+@@ -214,8 +217,8 @@
        if (agp_bridge->driver->needs_scratch_page) {
                for (i = 0; i < current_size->num_entries; i++) {
                        writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
@@ -150694,7 +150683,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        }
        global_cache_flush();
        return 0;
-@@ -247,6 +250,13 @@ static void *i8xx_alloc_pages(void)
+@@ -247,6 +250,13 @@
        if (page == NULL)
                return NULL;
  
@@ -150708,7 +150697,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        if (set_pages_uc(page, 4) < 0) {
                set_pages_wb(page, 4);
                __free_pages(page, 2);
-@@ -266,6 +276,9 @@ static void i8xx_destroy_pages(void *add
+@@ -266,6 +276,9 @@
  
        page = virt_to_page(addr);
        set_pages_wb(page, 4);
@@ -150718,7 +150707,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        put_page(page);
        __free_pages(page, 2);
        atomic_dec(&agp_bridge->current_memory_agp);
-@@ -525,8 +538,10 @@ static void intel_i830_init_gtt_entries(
+@@ -525,8 +538,10 @@
                size += 4;
        } else if (IS_G4X) {
                /* On 4 series hardware, GTT stolen is separate from graphics
@@ -150731,7 +150720,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        } else {
                /* On previous hardware, the GTT size was just what was
                 * required to map the aperture.
-@@ -559,6 +574,13 @@ static void intel_i830_init_gtt_entries(
+@@ -559,6 +574,13 @@
        } else {
                switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
                case I855_GMCH_GMS_STOLEN_1M:
@@ -150745,7 +150734,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
                        gtt_entries = MB(1) - KB(size);
                        break;
                case I855_GMCH_GMS_STOLEN_4M:
-@@ -773,8 +795,8 @@ static int intel_i830_configure(void)
+@@ -773,8 +795,8 @@
        if (agp_bridge->driver->needs_scratch_page) {
                for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
                        writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
@@ -150755,7 +150744,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        }
  
        global_cache_flush();
-@@ -989,8 +1011,8 @@ static int intel_i915_configure(void)
+@@ -989,8 +1011,8 @@
        if (agp_bridge->driver->needs_scratch_page) {
                for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
                        writel(agp_bridge->scratch_page, intel_private.gtt+i);
@@ -150765,7 +150754,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        }
  
        global_cache_flush();
-@@ -1194,6 +1216,7 @@ static void intel_i965_get_gtt_range(int
+@@ -1194,6 +1216,7 @@
        case PCI_DEVICE_ID_INTEL_IGD_E_HB:
        case PCI_DEVICE_ID_INTEL_Q45_HB:
        case PCI_DEVICE_ID_INTEL_G45_HB:
@@ -150773,7 +150762,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
                *gtt_offset = *gtt_size = MB(2);
                break;
        default:
-@@ -2126,13 +2149,15 @@ static const struct intel_driver_descrip
+@@ -2126,13 +2149,15 @@
        { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33",
                NULL, &intel_g33_driver },
        { PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0,
@@ -150790,7 +150779,7 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        { 0, 0, 0, NULL, NULL, NULL }
  };
  
-@@ -2330,6 +2355,7 @@ static struct pci_device_id agp_intel_pc
+@@ -2330,6 +2355,7 @@
        ID(PCI_DEVICE_ID_INTEL_IGD_E_HB),
        ID(PCI_DEVICE_ID_INTEL_Q45_HB),
        ID(PCI_DEVICE_ID_INTEL_G45_HB),
@@ -150798,10 +150787,10 @@ diff -purN linux-2.6.27/drivers/char/agp/intel-agp.c linux-2.6.27.19-5.1/drivers
        { }
  };
  
-diff -purN linux-2.6.27/drivers/char/applicom.c linux-2.6.27.19-5.1/drivers/char/applicom.c
---- linux-2.6.27/drivers/char/applicom.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/applicom.c        2009-03-25 16:11:22.000000000 +0000
-@@ -712,8 +712,7 @@ static int ac_ioctl(struct inode *inode,
+diff -r 9608d5473017 drivers/char/applicom.c
+--- a/drivers/char/applicom.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/applicom.c  Wed May 06 16:56:15 2009 +0100
+@@ -712,8 +712,7 @@
        
        IndexCard = adgl->num_card-1;
         
@@ -150811,7 +150800,7 @@ diff -purN linux-2.6.27/drivers/char/applicom.c linux-2.6.27.19-5.1/drivers/char
                static int warncount = 10;
                if (warncount) {
                        printk( KERN_WARNING "APPLICOM driver IOCTL, bad board number %d\n",(int)IndexCard+1);
-@@ -832,8 +831,7 @@ static int ac_ioctl(struct inode *inode,
+@@ -832,8 +831,7 @@
                }
                break;
        default:
@@ -150821,9 +150810,9 @@ diff -purN linux-2.6.27/drivers/char/applicom.c linux-2.6.27.19-5.1/drivers/char
                break;
        }
        Dummy = readb(apbs[IndexCard].RamIO + VERS);
-diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.c
---- linux-2.6.27/drivers/char/bsr.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/bsr.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/bsr.c
+--- a/drivers/char/bsr.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/bsr.c       Wed May 06 16:56:15 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/cdev.h>
  #include <linux/list.h>
@@ -150832,7 +150821,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  #include <asm/io.h>
  
  /*
-@@ -60,6 +61,8 @@ struct bsr_dev {
+@@ -60,6 +61,8 @@
        unsigned bsr_num;      /* bsr id number for its type */
        int      bsr_minor;
  
@@ -150841,7 +150830,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
        dev_t    bsr_dev;
        struct cdev bsr_cdev;
        struct device *bsr_device;
-@@ -67,8 +70,8 @@ struct bsr_dev {
+@@ -67,8 +70,8 @@
  
  };
  
@@ -150852,20 +150841,15 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  static struct class *bsr_class;
  static int bsr_major;
  
-@@ -115,15 +118,22 @@ static int bsr_mmap(struct file *filp, s
+@@ -115,15 +118,22 @@
  {
        unsigned long size   = vma->vm_end - vma->vm_start;
        struct bsr_dev *dev = filp->private_data;
 +      int ret;
  
 -      if (size > dev->bsr_len || (size & (PAGE_SIZE-1)))
--              return -EINVAL;
--
--      vma->vm_flags |= (VM_IO | VM_DONTEXPAND);
-       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
--      if (io_remap_pfn_range(vma, vma->vm_start, dev->bsr_addr >> PAGE_SHIFT,
--                             size, vma->vm_page_prot))
++      vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++
 +      /* check for the case of a small BSR device and map one 4k page for it*/
 +      if (dev->bsr_len < PAGE_SIZE && size == PAGE_SIZE)
 +              ret = remap_4k_pfn(vma, vma->vm_start, dev->bsr_addr >> 12,
@@ -150875,13 +150859,18 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
 +                                       dev->bsr_addr >> PAGE_SHIFT,
 +                                       size, vma->vm_page_prot);
 +      else
-+              return -EINVAL;
-+
+               return -EINVAL;
+-      vma->vm_flags |= (VM_IO | VM_DONTEXPAND);
+-      vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+-
+-      if (io_remap_pfn_range(vma, vma->vm_start, dev->bsr_addr >> PAGE_SHIFT,
+-                             size, vma->vm_page_prot))
 +      if (ret)
                return -EAGAIN;
  
        return 0;
-@@ -146,24 +156,25 @@ const static struct file_operations bsr_
+@@ -146,24 +156,25 @@
  
  static void bsr_cleanup_devs(void)
  {
@@ -150914,7 +150903,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  
        bsr_stride = of_get_property(bn, "ibm,lock-stride", &bsr_stride_len);
        bsr_bytes  = of_get_property(bn, "ibm,#lock-bytes", &bsr_bytes_len);
-@@ -171,35 +182,36 @@ static int bsr_create_devs(struct device
+@@ -171,35 +182,36 @@
        if (!bsr_stride || !bsr_bytes ||
            (bsr_stride_len != bsr_bytes_len)) {
                printk(KERN_ERR "bsr of-node has missing/incorrect property\n");
@@ -150938,22 +150927,23 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
                struct resource res;
                int result;
  
+-              result = of_address_to_resource(bn, i, &res);
+-              if (result < 0) {
+-                      printk(KERN_ERR "bsr of-node has invalid reg property\n");
 +              if (!cur) {
 +                      printk(KERN_ERR "Unable to alloc bsr dev\n");
 +                      ret = -ENOMEM;
-+                      goto out_err;
-+              }
-+
-               result = of_address_to_resource(bn, i, &res);
-               if (result < 0) {
--                      printk(KERN_ERR "bsr of-node has invalid reg property\n");
--                      goto out_err;
-+                      printk(KERN_ERR "bsr of-node has invalid reg property, skipping\n");
-+                      kfree(cur);
-+                      continue;
+                       goto out_err;
                }
  
 -              cur->bsr_minor  = i;
++              result = of_address_to_resource(bn, i, &res);
++              if (result < 0) {
++                      printk(KERN_ERR "bsr of-node has invalid reg property, skipping\n");
++                      kfree(cur);
++                      continue;
++              }
++
 +              cur->bsr_minor  = i + total_bsr_devs;
                cur->bsr_addr   = res.start;
                cur->bsr_len    = res.end - res.start + 1;
@@ -150964,7 +150954,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  
                switch(cur->bsr_bytes) {
                case 8:
-@@ -220,14 +232,15 @@ static int bsr_create_devs(struct device
+@@ -220,14 +232,15 @@
                }
  
                cur->bsr_num = bsr_types[cur->bsr_type];
@@ -150982,7 +150972,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  
                cur->bsr_device = device_create_drvdata(bsr_class, NULL,
                                                        cur->bsr_dev,
-@@ -236,16 +249,37 @@ static int bsr_create_devs(struct device
+@@ -236,16 +249,37 @@
                        printk(KERN_ERR "device_create failed for %s\n",
                               cur->bsr_name);
                        cdev_del(&cur->bsr_cdev);
@@ -150993,9 +150983,9 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
 +              bsr_types[cur->bsr_type] = cur->bsr_num + 1;
 +              list_add_tail(&cur->bsr_list, &bsr_devs);
        }
-+      total_bsr_devs += num_bsr_devs;
 +
++      total_bsr_devs += num_bsr_devs;
        return 0;
  
   out_err:
@@ -151021,7 +151011,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  }
  
  static int __init bsr_init(void)
-@@ -255,7 +289,7 @@ static int __init bsr_init(void)
+@@ -255,7 +289,7 @@
        int ret = -ENODEV;
        int result;
  
@@ -151030,7 +151020,7 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
        if (!np)
                goto out_err;
  
-@@ -273,10 +307,10 @@ static int __init bsr_init(void)
+@@ -273,10 +307,10 @@
                goto out_err_2;
        }
  
@@ -151044,9 +151034,9 @@ diff -purN linux-2.6.27/drivers/char/bsr.c linux-2.6.27.19-5.1/drivers/char/bsr.
  
        return 0;
  
-diff -purN linux-2.6.27/drivers/char/cp437.uni linux-2.6.27.19-5.1/drivers/char/cp437.uni
---- linux-2.6.27/drivers/char/cp437.uni        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/cp437.uni 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/cp437.uni
+--- a/drivers/char/cp437.uni   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/cp437.uni   Wed May 06 16:56:15 2009 +0100
 @@ -27,7 +27,7 @@
  0x0c  U+2640
  0x0d  U+266a
@@ -151096,9 +151086,9 @@ diff -purN linux-2.6.27/drivers/char/cp437.uni linux-2.6.27.19-5.1/drivers/char/
  0xef  U+2229
  0xf0  U+2261
  0xf1  U+00b1
-diff -purN linux-2.6.27/drivers/char/crasher.c linux-2.6.27.19-5.1/drivers/char/crasher.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/crasher.c 2009-03-25 16:11:21.000000000 +0000
+diff -r 9608d5473017 drivers/char/crasher.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/crasher.c   Wed May 06 16:56:15 2009 +0100
 @@ -0,0 +1,225 @@
 +/*
 + * crasher.c, it breaks things
@@ -151325,10 +151315,10 @@ diff -purN linux-2.6.27/drivers/char/crasher.c linux-2.6.27.19-5.1/drivers/char/
 +
 +module_init(crasher_init);
 +module_exit(crasher_exit);
-diff -purN linux-2.6.27/drivers/char/hvc_console.c linux-2.6.27.19-5.1/drivers/char/hvc_console.c
---- linux-2.6.27/drivers/char/hvc_console.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hvc_console.c     2009-03-25 16:11:21.000000000 +0000
-@@ -367,13 +367,13 @@ static void hvc_close(struct tty_struct 
+diff -r 9608d5473017 drivers/char/hvc_console.c
+--- a/drivers/char/hvc_console.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hvc_console.c       Wed May 06 16:56:15 2009 +0100
+@@ -367,12 +367,12 @@
        spin_lock_irqsave(&hp->lock, flags);
  
        if (--hp->count == 0) {
@@ -151338,14 +151328,13 @@ diff -purN linux-2.6.27/drivers/char/hvc_console.c linux-2.6.27.19-5.1/drivers/c
                /* We are done with the tty pointer now. */
                hp->tty = NULL;
                spin_unlock_irqrestore(&hp->lock, flags);
++
 +              if (hp->ops->notifier_del)
 +                      hp->ops->notifier_del(hp, hp->data);
-+
                /*
                 * Chain calls chars_in_buffer() and returns immediately if
-                * there is no buffered data otherwise sleeps on a wait queue
-@@ -416,11 +416,11 @@ static void hvc_hangup(struct tty_struct
+@@ -416,10 +416,10 @@
        hp->n_outbuf = 0;
        hp->tty = NULL;
  
@@ -151353,16 +151342,15 @@ diff -purN linux-2.6.27/drivers/char/hvc_console.c linux-2.6.27.19-5.1/drivers/c
 +
        if (hp->ops->notifier_del)
                        hp->ops->notifier_del(hp, hp->data);
--      spin_unlock_irqrestore(&hp->lock, flags);
 -
+-      spin_unlock_irqrestore(&hp->lock, flags);
        while(temp_open_count) {
                --temp_open_count;
-               kref_put(&hp->kref, destroy_hvc_struct);
-diff -purN linux-2.6.27/drivers/char/hw_random/n2-drv.c linux-2.6.27.19-5.1/drivers/char/hw_random/n2-drv.c
---- linux-2.6.27/drivers/char/hw_random/n2-drv.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hw_random/n2-drv.c        2009-03-25 16:11:22.000000000 +0000
-@@ -751,6 +751,7 @@ static struct of_device_id n2rng_match[]
+diff -r 9608d5473017 drivers/char/hw_random/n2-drv.c
+--- a/drivers/char/hw_random/n2-drv.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hw_random/n2-drv.c  Wed May 06 16:56:15 2009 +0100
+@@ -751,6 +751,7 @@
  MODULE_DEVICE_TABLE(of, n2rng_match);
  
  static struct of_platform_driver n2rng_driver = {
@@ -151370,10 +151358,10 @@ diff -purN linux-2.6.27/drivers/char/hw_random/n2-drv.c linux-2.6.27.19-5.1/driv
        .name           = "n2rng",
        .match_table    = n2rng_match,
        .probe          = n2rng_probe,
-diff -purN linux-2.6.27/drivers/char/hw_random/pasemi-rng.c linux-2.6.27.19-5.1/drivers/char/hw_random/pasemi-rng.c
---- linux-2.6.27/drivers/char/hw_random/pasemi-rng.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/hw_random/pasemi-rng.c    2009-03-25 16:11:22.000000000 +0000
-@@ -140,6 +140,7 @@ static struct of_device_id rng_match[] =
+diff -r 9608d5473017 drivers/char/hw_random/pasemi-rng.c
+--- a/drivers/char/hw_random/pasemi-rng.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/hw_random/pasemi-rng.c      Wed May 06 16:56:15 2009 +0100
+@@ -140,6 +140,7 @@
  };
  
  static struct of_platform_driver rng_driver = {
@@ -151381,18 +151369,18 @@ diff -purN linux-2.6.27/drivers/char/hw_random/pasemi-rng.c linux-2.6.27.19-5.1/
        .name           = "pasemi-rng",
        .match_table    = rng_match,
        .probe          = rng_probe,
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_devintf.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_devintf.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_devintf.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_devintf.c       2009-03-25 16:11:21.000000000 +0000
-@@ -957,3 +957,4 @@ module_exit(cleanup_ipmi);
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_devintf.c
+--- a/drivers/char/ipmi/ipmi_devintf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_devintf.c Wed May 06 16:56:15 2009 +0100
+@@ -957,3 +957,4 @@
  MODULE_LICENSE("GPL");
  MODULE_AUTHOR("Corey Minyard <minyard@mvista.com>");
  MODULE_DESCRIPTION("Linux device interface for the IPMI message handler.");
 +MODULE_ALIAS("platform:ipmi_si");
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_msghandler.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_msghandler.c    2009-03-25 16:11:21.000000000 +0000
-@@ -422,9 +422,11 @@ struct ipmi_smi {
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_msghandler.c
+--- a/drivers/char/ipmi/ipmi_msghandler.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_msghandler.c      Wed May 06 16:56:15 2009 +0100
+@@ -422,9 +422,11 @@
  /**
   * The driver model view of the IPMI messaging driver.
   */
@@ -151407,19 +151395,20 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/
  };
  static DEFINE_MUTEX(ipmidriver_mutex);
  
-@@ -2384,9 +2386,9 @@ static int ipmi_bmc_register(ipmi_smi_t 
+@@ -2384,9 +2386,9 @@
         * representing the interfaced BMC already
         */
        if (bmc->guid_set)
 -              old_bmc = ipmi_find_bmc_guid(&ipmidriver, bmc->guid);
-+              old_bmc = ipmi_find_bmc_guid(&ipmidriver.driver, bmc->guid);
-       else
+-      else
 -              old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver,
++              old_bmc = ipmi_find_bmc_guid(&ipmidriver.driver, bmc->guid);
++      else
 +              old_bmc = ipmi_find_bmc_prod_dev_id(&ipmidriver.driver,
                                                    bmc->id.product_id,
                                                    bmc->id.device_id);
  
-@@ -2416,7 +2418,7 @@ static int ipmi_bmc_register(ipmi_smi_t 
+@@ -2416,7 +2418,7 @@
                snprintf(name, sizeof(name),
                         "ipmi_bmc.%4.4x", bmc->id.product_id);
  
@@ -151428,7 +151417,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/
                                                 bmc->id.product_id,
                                                 bmc->id.device_id)) {
                        if (!warn_printed) {
-@@ -2446,7 +2448,7 @@ static int ipmi_bmc_register(ipmi_smi_t 
+@@ -2446,7 +2448,7 @@
                               " Unable to allocate platform device\n");
                        return -ENOMEM;
                }
@@ -151437,7 +151426,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/
                dev_set_drvdata(&bmc->dev->dev, bmc);
                kref_init(&bmc->refcount);
  
-@@ -4247,7 +4249,7 @@ static int ipmi_init_msghandler(void)
+@@ -4247,7 +4249,7 @@
        if (initialized)
                return 0;
  
@@ -151446,7 +151435,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/
        if (rv) {
                printk(KERN_ERR PFX "Could not register IPMI driver\n");
                return rv;
-@@ -4308,7 +4310,7 @@ static __exit void cleanup_ipmi(void)
+@@ -4308,7 +4310,7 @@
        remove_proc_entry(proc_ipmi_root->name, NULL);
  #endif /* CONFIG_PROC_FS */
  
@@ -151455,10 +151444,10 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.27.19-5.1/
  
        initialized = 0;
  
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_si_intf.c       2009-03-25 16:11:21.000000000 +0000
-@@ -114,9 +114,11 @@ static char *si_to_str[] = { "kcs", "smi
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_si_intf.c
+--- a/drivers/char/ipmi/ipmi_si_intf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_si_intf.c Wed May 06 16:56:15 2009 +0100
+@@ -114,9 +114,11 @@
  
  #define DEVICE_NAME "ipmi_si"
  
@@ -151473,7 +151462,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
  };
  
  
-@@ -1150,7 +1152,7 @@ static unsigned int num_slave_addrs;
+@@ -1150,7 +1152,7 @@
  #define IPMI_MEM_ADDR_SPACE 1
  static char *addr_space_to_str[] = { "i/o", "mem" };
  
@@ -151482,7 +151471,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
  
  module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
  MODULE_PARM_DESC(hotmod, "Add and remove interfaces.  See"
-@@ -1572,7 +1574,7 @@ static int check_hotmod_int_op(const cha
+@@ -1572,7 +1574,7 @@
        return 0;
  }
  
@@ -151491,7 +151480,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
  {
        char *str = kstrdup(val, GFP_KERNEL);
        int  rv;
-@@ -2398,6 +2400,7 @@ static struct of_device_id ipmi_match[] 
+@@ -2398,6 +2400,7 @@
  };
  
  static struct of_platform_driver ipmi_of_platform_driver = {
@@ -151499,7 +151488,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
        .name           = "ipmi",
        .match_table    = ipmi_match,
        .probe          = ipmi_of_probe,
-@@ -2868,7 +2871,7 @@ static int try_smi_init(struct smi_info 
+@@ -2868,7 +2871,7 @@
                        goto out_err;
                }
                new_smi->dev = &new_smi->pdev->dev;
@@ -151508,7 +151497,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
  
                rv = platform_device_add(new_smi->pdev);
                if (rv) {
-@@ -2983,7 +2986,7 @@ static __devinit int init_ipmi_si(void)
+@@ -2983,7 +2986,7 @@
        initialized = 1;
  
        /* Register the device drivers. */
@@ -151517,7 +151506,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
        if (rv) {
                printk(KERN_ERR
                       "init_ipmi_si: Unable to register driver: %d\n",
-@@ -3052,7 +3055,7 @@ static __devinit int init_ipmi_si(void)
+@@ -3052,7 +3055,7 @@
  #ifdef CONFIG_PPC_OF
                of_unregister_platform_driver(&ipmi_of_platform_driver);
  #endif
@@ -151526,7 +151515,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
                printk(KERN_WARNING
                       "ipmi_si: Unable to find any System Interface(s)\n");
                return -ENODEV;
-@@ -3151,7 +3154,7 @@ static __exit void cleanup_ipmi_si(void)
+@@ -3151,7 +3154,7 @@
                cleanup_one_si(e);
        mutex_unlock(&smi_infos_lock);
  
@@ -151535,10 +151524,10 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.27.19-5.1/dri
  }
  module_exit(cleanup_ipmi_si);
  
-diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_watchdog.c
---- linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/ipmi/ipmi_watchdog.c      2009-03-25 16:11:21.000000000 +0000
-@@ -196,7 +196,7 @@ static void ipmi_unregister_watchdog(int
+diff -r 9608d5473017 drivers/char/ipmi/ipmi_watchdog.c
+--- a/drivers/char/ipmi/ipmi_watchdog.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/ipmi/ipmi_watchdog.c        Wed May 06 16:56:15 2009 +0100
+@@ -196,7 +196,7 @@
   */
  static int start_now;
  
@@ -151547,7 +151536,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/dr
  {
        char *endp;
        int  l;
-@@ -215,7 +215,7 @@ static int set_param_int(const char *val
+@@ -215,7 +215,7 @@
        return rv;
  }
  
@@ -151556,7 +151545,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/dr
  {
        return sprintf(buffer, "%i", *((int *)kp->arg));
  }
-@@ -227,7 +227,7 @@ static int preaction_op(const char *inva
+@@ -227,7 +227,7 @@
  static int preop_op(const char *inval, char *outval);
  static void check_parms(void);
  
@@ -151565,7 +151554,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/dr
  {
        action_fn  fn = (action_fn) kp->arg;
        int        rv = 0;
-@@ -251,7 +251,7 @@ static int set_param_str(const char *val
+@@ -251,7 +251,7 @@
        return rv;
  }
  
@@ -151574,7 +151563,7 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/dr
  {
        action_fn fn = (action_fn) kp->arg;
        int       rv;
-@@ -263,7 +263,7 @@ static int get_param_str(char *buffer, s
+@@ -263,7 +263,7 @@
  }
  
  
@@ -151583,9 +151572,9 @@ diff -purN linux-2.6.27/drivers/char/ipmi/ipmi_watchdog.c linux-2.6.27.19-5.1/dr
  {
        int rv = param_set_int(val, kp);
        if (rv)
-diff -purN linux-2.6.27/drivers/char/keyboard.c linux-2.6.27.19-5.1/drivers/char/keyboard.c
---- linux-2.6.27/drivers/char/keyboard.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/keyboard.c        2009-03-25 16:11:21.000000000 +0000
+diff -r 9608d5473017 drivers/char/keyboard.c
+--- a/drivers/char/keyboard.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/keyboard.c  Wed May 06 16:56:15 2009 +0100
 @@ -43,6 +43,9 @@
  #include <linux/reboot.h>
  #include <linux/notifier.h>
@@ -151596,7 +151585,7 @@ diff -purN linux-2.6.27/drivers/char/keyboard.c linux-2.6.27.19-5.1/drivers/char
  
  extern void ctrl_alt_del(void);
  
-@@ -1180,6 +1183,22 @@ static void kbd_keycode(unsigned int key
+@@ -1180,6 +1183,22 @@
                        if (keycode < BTN_MISC && printk_ratelimit())
                                printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
  
@@ -151619,10 +151608,10 @@ diff -purN linux-2.6.27/drivers/char/keyboard.c linux-2.6.27.19-5.1/drivers/char
  #ifdef CONFIG_MAGIC_SYSRQ            /* Handle the SysRq Hack */
        if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
                if (!sysrq_down) {
-diff -purN linux-2.6.27/drivers/char/lp.c linux-2.6.27.19-5.1/drivers/char/lp.c
---- linux-2.6.27/drivers/char/lp.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/lp.c      2009-03-25 16:11:21.000000000 +0000
-@@ -626,9 +626,12 @@ static int lp_ioctl(struct inode *inode,
+diff -r 9608d5473017 drivers/char/lp.c
+--- a/drivers/char/lp.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/lp.c        Wed May 06 16:56:15 2009 +0100
+@@ -626,9 +626,12 @@
                                return -EFAULT;
                        break;
                case LPGETSTATUS:
@@ -151635,10 +151624,10 @@ diff -purN linux-2.6.27/drivers/char/lp.c linux-2.6.27.19-5.1/drivers/char/lp.c
  
                        if (copy_to_user(argp, &status, sizeof(int)))
                                return -EFAULT;
-diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.c
---- linux-2.6.27/drivers/char/mem.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/mem.c     2009-03-25 16:11:22.000000000 +0000
-@@ -110,6 +110,7 @@ void __attribute__((weak)) unxlate_dev_m
+diff -r 9608d5473017 drivers/char/mem.c
+--- a/drivers/char/mem.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/mem.c       Wed May 06 16:56:15 2009 +0100
+@@ -110,6 +110,7 @@
  {
  }
  
@@ -151646,7 +151635,7 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  /*
   * This funcion reads the *physical* memory. The f_pos points directly to the 
   * memory location. 
-@@ -254,6 +255,7 @@ static ssize_t write_mem(struct file * f
+@@ -254,6 +255,7 @@
        *ppos += written;
        return written;
  }
@@ -151654,7 +151643,7 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  
  int __attribute__((weak)) phys_mem_access_prot_allowed(struct file *file,
        unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
-@@ -372,6 +374,9 @@ static int mmap_mem(struct file * file, 
+@@ -372,6 +374,9 @@
  static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
  {
        unsigned long pfn;
@@ -151664,21 +151653,21 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  
        /* Turn a kernel-virtual address into a physical page frame */
        pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
-@@ -386,6 +391,13 @@ static int mmap_kmem(struct file * file,
+@@ -385,6 +390,13 @@
+        */
        if (!pfn_valid(pfn))
                return -EIO;
++
 +#ifdef CONFIG_XEN
 +      count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
 +      for (i = 0; i < count; i++)
 +              if ((pfn + i) != mfn_to_local_pfn(pfn_to_mfn(pfn + i)))
 +                      return -EIO;
 +#endif
-+
        vma->vm_pgoff = pfn;
        return mmap_mem(file, vma);
- }
-@@ -702,6 +714,100 @@ static ssize_t splice_write_null(struct 
+@@ -702,6 +714,100 @@
        return splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_null);
  }
  
@@ -151779,7 +151768,7 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  static ssize_t read_zero(struct file * file, char __user * buf, 
                         size_t count, loff_t *ppos)
  {
-@@ -730,15 +836,24 @@ static ssize_t read_zero(struct file * f
+@@ -730,15 +836,24 @@
        }
        return written ? written : -EFAULT;
  }
@@ -151805,7 +151794,7 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  }
  
  static ssize_t write_full(struct file * file, const char __user * buf,
-@@ -802,6 +917,7 @@ static int open_port(struct inode * inod
+@@ -802,6 +917,7 @@
  #define open_kmem     open_mem
  #define open_oldmem   open_mem
  
@@ -151813,7 +151802,7 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  static const struct file_operations mem_fops = {
        .llseek         = memory_lseek,
        .read           = read_mem,
-@@ -810,6 +926,9 @@ static const struct file_operations mem_
+@@ -810,6 +926,9 @@
        .open           = open_mem,
        .get_unmapped_area = get_unmapped_area_mem,
  };
@@ -151823,10 +151812,10 @@ diff -purN linux-2.6.27/drivers/char/mem.c linux-2.6.27.19-5.1/drivers/char/mem.
  
  #ifdef CONFIG_DEVKMEM
  static const struct file_operations kmem_fops = {
-diff -purN linux-2.6.27/drivers/char/n_tty.c linux-2.6.27.19-5.1/drivers/char/n_tty.c
---- linux-2.6.27/drivers/char/n_tty.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/n_tty.c   2009-03-25 16:11:21.000000000 +0000
-@@ -1325,6 +1325,15 @@ do_it_again:
+diff -r 9608d5473017 drivers/char/n_tty.c
+--- a/drivers/char/n_tty.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/n_tty.c     Wed May 06 16:56:15 2009 +0100
+@@ -1325,6 +1325,15 @@
                        tty->minimum_to_wake = (minimum - (b - buf));
  
                if (!input_available_p(tty, 0)) {
@@ -151842,9 +151831,9 @@ diff -purN linux-2.6.27/drivers/char/n_tty.c linux-2.6.27.19-5.1/drivers/char/n_
                        if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
                                retval = -EIO;
                                break;
-diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.c
---- linux-2.6.27/drivers/char/raw.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/raw.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/char/raw.c
+--- a/drivers/char/raw.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/raw.c       Wed May 06 16:56:15 2009 +0100
 @@ -20,6 +20,7 @@
  #include <linux/device.h>
  #include <linux/mutex.h>
@@ -151853,7 +151842,7 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
  
  #include <asm/uaccess.h>
  
-@@ -29,10 +30,15 @@ struct raw_device_data {
+@@ -29,9 +30,14 @@
  };
  
  static struct class *raw_class;
@@ -151861,16 +151850,15 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
 +static struct raw_device_data *raw_devices;
  static DEFINE_MUTEX(raw_mutex);
  static const struct file_operations raw_ctl_fops; /* forward declaration */
++
 +static int max_raw_minors = MAX_RAW_MINORS;
 +
 +module_param(max_raw_minors, int, 0);
 +MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)");
-+
  /*
   * Open/close code for raw IO.
-  *
-@@ -157,7 +163,7 @@ static int raw_ctl_ioctl(struct inode *i
+@@ -157,7 +163,7 @@
                        goto out;
                }
  
@@ -151879,7 +151867,7 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
                        err = -EINVAL;
                        goto out;
                }
-@@ -265,12 +271,26 @@ static int __init raw_init(void)
+@@ -265,12 +271,26 @@
        dev_t dev = MKDEV(RAW_MAJOR, 0);
        int ret;
  
@@ -151908,7 +151896,7 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
        if (ret) {
                kobject_put(&raw_cdev.kobj);
                goto error_region;
-@@ -289,8 +309,9 @@ static int __init raw_init(void)
+@@ -289,8 +309,9 @@
        return 0;
  
  error_region:
@@ -151919,7 +151907,7 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
        return ret;
  }
  
-@@ -299,7 +320,7 @@ static void __exit raw_exit(void)
+@@ -299,7 +320,7 @@
        device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
        class_destroy(raw_class);
        cdev_del(&raw_cdev);
@@ -151928,10 +151916,10 @@ diff -purN linux-2.6.27/drivers/char/raw.c linux-2.6.27.19-5.1/drivers/char/raw.
  }
  
  module_init(raw_init);
-diff -purN linux-2.6.27/drivers/char/selection.c linux-2.6.27.19-5.1/drivers/char/selection.c
---- linux-2.6.27/drivers/char/selection.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/selection.c       2009-03-25 16:11:22.000000000 +0000
-@@ -268,7 +268,7 @@ int set_selection(const struct tiocl_sel
+diff -r 9608d5473017 drivers/char/selection.c
+--- a/drivers/char/selection.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/selection.c Wed May 06 16:56:15 2009 +0100
+@@ -268,7 +268,7 @@
  
        /* Allocate a new buffer before freeing the old one ... */
        multiplier = use_unicode ? 3 : 1;  /* chars can take up to 3 bytes */
@@ -151940,10 +151928,10 @@ diff -purN linux-2.6.27/drivers/char/selection.c linux-2.6.27.19-5.1/drivers/cha
        if (!bp) {
                printk(KERN_WARNING "selection: kmalloc() failed\n");
                clear_selection();
-diff -purN linux-2.6.27/drivers/char/tpm/Kconfig linux-2.6.27.19-5.1/drivers/char/tpm/Kconfig
---- linux-2.6.27/drivers/char/tpm/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/Kconfig       2009-03-25 16:11:20.000000000 +0000
-@@ -57,4 +57,13 @@ config TCG_INFINEON
+diff -r 9608d5473017 drivers/char/tpm/Kconfig
+--- a/drivers/char/tpm/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/Kconfig Wed May 06 16:56:15 2009 +0100
+@@ -57,4 +57,13 @@
          Further information on this driver and the supported hardware
          can be found at http://www.prosec.rub.de/tpm
  
@@ -151957,19 +151945,19 @@ diff -purN linux-2.6.27/drivers/char/tpm/Kconfig linux-2.6.27.19-5.1/drivers/cha
 +        will be called tpm_xenu.
 +
  endif # TCG_TPM
-diff -purN linux-2.6.27/drivers/char/tpm/Makefile linux-2.6.27.19-5.1/drivers/char/tpm/Makefile
---- linux-2.6.27/drivers/char/tpm/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/Makefile      2009-03-25 16:11:20.000000000 +0000
-@@ -9,3 +9,5 @@ obj-$(CONFIG_TCG_TIS) += tpm_tis.o
+diff -r 9608d5473017 drivers/char/tpm/Makefile
+--- a/drivers/char/tpm/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/Makefile        Wed May 06 16:56:15 2009 +0100
+@@ -9,3 +9,5 @@
  obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
  obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
  obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
 +obj-$(CONFIG_TCG_XEN) += tpm_xenu.o
 +tpm_xenu-y = tpm_xen.o tpm_vtpm.o
-diff -purN linux-2.6.27/drivers/char/tpm/tpm.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm.c
---- linux-2.6.27/drivers/char/tpm/tpm.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm.c 2009-03-25 16:11:20.000000000 +0000
-@@ -525,19 +525,19 @@ void tpm_get_timeouts(struct tpm_chip *c
+diff -r 9608d5473017 drivers/char/tpm/tpm.c
+--- a/drivers/char/tpm/tpm.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/tpm.c   Wed May 06 16:56:15 2009 +0100
+@@ -525,19 +525,19 @@
        timeout =
            be32_to_cpu(*((__be32 *) (data + TPM_GET_CAP_RET_UINT32_1_IDX)));
        if (timeout)
@@ -151993,7 +151981,7 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm.c linux-2.6.27.19-5.1/drivers/char/
  
  duration:
        memcpy(data, tpm_cap, sizeof(tpm_cap));
-@@ -554,15 +554,22 @@ duration:
+@@ -554,15 +554,22 @@
                return;
  
        chip->vendor.duration[TPM_SHORT] =
@@ -152019,10 +152007,10 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm.c linux-2.6.27.19-5.1/drivers/char/
                             (*((__be32 *) (data +
                                            TPM_GET_CAP_RET_UINT32_3_IDX))));
  }
-diff -purN linux-2.6.27/drivers/char/tpm/tpm.h linux-2.6.27.19-5.1/drivers/char/tpm/tpm.h
---- linux-2.6.27/drivers/char/tpm/tpm.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm.h 2009-03-25 16:11:20.000000000 +0000
-@@ -107,6 +107,9 @@ struct tpm_chip {
+diff -r 9608d5473017 drivers/char/tpm/tpm.h
+--- a/drivers/char/tpm/tpm.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tpm/tpm.h   Wed May 06 16:56:16 2009 +0100
+@@ -107,6 +107,9 @@
        struct dentry **bios_dir;
  
        struct list_head list;
@@ -152032,10 +152020,11 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm.h linux-2.6.27.19-5.1/drivers/char/
        void (*release) (struct device *);
  };
  
-@@ -124,6 +127,18 @@ static inline void tpm_write_index(int b
+@@ -123,6 +126,18 @@
+       outb(index, base);
        outb(value & 0xFF, base+1);
  }
++
 +#ifdef CONFIG_XEN
 +static inline void *chip_get_private(const struct tpm_chip *chip)
 +{
@@ -152047,13 +152036,12 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm.h linux-2.6.27.19-5.1/drivers/char/
 +      chip->priv = priv;
 +}
 +#endif
-+
  extern void tpm_get_timeouts(struct tpm_chip *);
  extern void tpm_gen_interrupt(struct tpm_chip *);
- extern void tpm_continue_selftest(struct tpm_chip *);
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.c    2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_vtpm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_vtpm.c      Wed May 06 16:56:16 2009 +0100
 @@ -0,0 +1,542 @@
 +/*
 + * Copyright (C) 2006 IBM Corporation
@@ -152597,9 +152585,9 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.c linux-2.6.27.19-5.1/drivers/
 +      tpm_remove_hardware(dev);
 +      kfree(vtpms);
 +}
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.h linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_vtpm.h    2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_vtpm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_vtpm.h      Wed May 06 16:56:16 2009 +0100
 @@ -0,0 +1,55 @@
 +#ifndef TPM_VTPM_H
 +#define TPM_VTPM_H
@@ -152656,9 +152644,9 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm_vtpm.h linux-2.6.27.19-5.1/drivers/
 +}
 +
 +#endif
-diff -purN linux-2.6.27/drivers/char/tpm/tpm_xen.c linux-2.6.27.19-5.1/drivers/char/tpm/tpm_xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tpm/tpm_xen.c     2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/char/tpm/tpm_xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/char/tpm/tpm_xen.c       Wed May 06 16:56:16 2009 +0100
 @@ -0,0 +1,720 @@
 +/*
 + * Copyright (c) 2005, IBM Corporation
@@ -153380,19 +153368,19 @@ diff -purN linux-2.6.27/drivers/char/tpm/tpm_xen.c linux-2.6.27.19-5.1/drivers/c
 +module_init(tpmif_init);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/tty_io.c
---- linux-2.6.27/drivers/char/tty_io.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/tty_io.c  2009-03-25 16:11:22.000000000 +0000
-@@ -136,6 +136,8 @@ LIST_HEAD(tty_drivers);                    /* linked list
+diff -r 9608d5473017 drivers/char/tty_io.c
+--- a/drivers/char/tty_io.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/tty_io.c    Wed May 06 16:56:16 2009 +0100
+@@ -135,6 +135,8 @@
+    vt.c for deeply disgusting hack reasons */
  DEFINE_MUTEX(tty_mutex);
  EXPORT_SYMBOL(tty_mutex);
-+int console_use_vt = 1;
 +
++int console_use_vt = 1;
  #ifdef CONFIG_UNIX98_PTYS
  extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
- static int ptmx_open(struct inode *, struct file *);
-@@ -2200,7 +2202,7 @@ retry_open:
+@@ -2200,7 +2202,7 @@
                goto got_driver;
        }
  #ifdef CONFIG_VT
@@ -153401,7 +153389,7 @@ diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/t
                extern struct tty_driver *console_driver;
                driver = console_driver;
                index = fg_console;
-@@ -2996,7 +2998,7 @@ long tty_ioctl(struct file *file, unsign
+@@ -2996,7 +2998,7 @@
        case TIOCSTI:
                return tiocsti(tty, p);
        case TIOCGWINSZ:
@@ -153410,10 +153398,11 @@ diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/t
        case TIOCSWINSZ:
                return tiocswinsz(tty, real_tty, p);
        case TIOCCONS:
-@@ -3031,6 +3033,21 @@ long tty_ioctl(struct file *file, unsign
+@@ -3030,6 +3032,21 @@
+       case TIOCLINUX:
                return tioclinux(tty, arg);
  #endif
-       /*
++      /*
 +       * Without the real device to which /dev/console is connected,
 +       * blogd can not work.
 +       *      blogd spawns a pty/tty pair,
@@ -153428,11 +153417,10 @@ diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/t
 +              return put_user(ret, (unsigned int __user *)p);
 +      }
 +
-+      /*
+       /*
         * Break handling
         */
-       case TIOCSBRK:  /* Turn break on, unconditionally */
-@@ -3714,6 +3731,8 @@ static int __init tty_init(void)
+@@ -3714,6 +3731,8 @@
  #endif
  
  #ifdef CONFIG_VT
@@ -153441,7 +153429,7 @@ diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/t
        cdev_init(&vc0_cdev, &console_fops);
        if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
            register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
-@@ -3721,6 +3740,7 @@ static int __init tty_init(void)
+@@ -3721,6 +3740,7 @@
        device_create_drvdata(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
  
        vty_init();
@@ -153449,10 +153437,10 @@ diff -purN linux-2.6.27/drivers/char/tty_io.c linux-2.6.27.19-5.1/drivers/char/t
  #endif
        return 0;
  }
-diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
---- linux-2.6.27/drivers/char/vt.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/vt.c      2009-03-25 16:11:20.000000000 +0000
-@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, un
+diff -r 9608d5473017 drivers/char/vt.c
+--- a/drivers/char/vt.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/vt.c        Wed May 06 16:56:16 2009 +0100
+@@ -301,7 +301,7 @@
        d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
        s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));
        scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
@@ -153461,7 +153449,7 @@ diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
                    vc->vc_size_row * nr);
  }
  
-@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc, 
+@@ -319,7 +319,7 @@
        s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
        step = vc->vc_cols * nr;
        scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row);
@@ -153470,7 +153458,7 @@ diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
  }
  
  static void do_update_region(struct vc_data *vc, unsigned long start, int count)
-@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *
+@@ -434,7 +434,6 @@
                      vc->vc_blink, vc->vc_underline,
                      vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
        vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
@@ -153478,7 +153466,7 @@ diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
  }
  
  /* Note: inverting the screen twice should revert to the original state */
-@@ -2287,7 +2286,7 @@ rescan_last_byte:
+@@ -2287,7 +2286,7 @@
                                    continue; /* nothing to display */
                                }
                                /* Glyph not found */
@@ -153487,7 +153475,7 @@ diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
                                    /* In legacy mode use the glyph we get by a 1:1 mapping.
                                       This would make absolutely no sense with Unicode in mind,
                                       but do this for ASCII characters since a font may lack
-@@ -4093,6 +4092,31 @@ void vcs_scr_writew(struct vc_data *vc, 
+@@ -4093,6 +4092,31 @@
        }
  }
  
@@ -153519,87 +153507,87 @@ diff -purN linux-2.6.27/drivers/char/vt.c linux-2.6.27.19-5.1/drivers/char/vt.c
  /*
   *    Visible symbols for modules
   */
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.c       2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/buffer_icap.c
+--- a/drivers/char/xilinx_hwicap/buffer_icap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/buffer_icap.c Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2003-2008 Xilinx Inc.
   *     All rights reserved.
-  *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/buffer_icap.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/buffer_icap.h       2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/buffer_icap.h
+--- a/drivers/char/xilinx_hwicap/buffer_icap.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/buffer_icap.h Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2003-2008 Xilinx Inc.
   *     All rights reserved.
-  *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.c 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/fifo_icap.c
+--- a/drivers/char/xilinx_hwicap/fifo_icap.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/fifo_icap.c   Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2007-2008 Xilinx Inc.
   *     All rights reserved.
-  *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/fifo_icap.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/fifo_icap.h 2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/fifo_icap.h
+--- a/drivers/char/xilinx_hwicap/fifo_icap.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/fifo_icap.h   Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2007-2008 Xilinx Inc.
   *     All rights reserved.
-  *
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.c linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.c
---- linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.c     2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/xilinx_hwicap.c
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c       Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
   *     (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
-  *     (c) Copyright 2007-2008 Xilinx Inc.
-diff -purN linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.h linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.h
---- linux-2.6.27/drivers/char/xilinx_hwicap/xilinx_hwicap.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/char/xilinx_hwicap/xilinx_hwicap.h     2009-03-25 16:11:21.000000000 +0000
-@@ -21,9 +21,6 @@
+diff -r 9608d5473017 drivers/char/xilinx_hwicap/xilinx_hwicap.h
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h       Wed May 06 16:56:16 2009 +0100
+@@ -20,9 +20,6 @@
+  *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
   *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   *     FOR A PARTICULAR PURPOSE.
-  *
+- *
 - *     Xilinx products are not intended for use in life support appliances,
 - *     devices, or systems. Use in such applications is expressly prohibited.
-- *
+  *
   *     (c) Copyright 2003-2007 Xilinx Inc.
   *     All rights reserved.
-  *
-diff -purN linux-2.6.27/drivers/connector/cn_proc.c linux-2.6.27.19-5.1/drivers/connector/cn_proc.c
---- linux-2.6.27/drivers/connector/cn_proc.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/connector/cn_proc.c    2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/connector/cn_proc.c
+--- a/drivers/connector/cn_proc.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/connector/cn_proc.c      Wed May 06 16:56:16 2009 +0100
 @@ -34,7 +34,7 @@
  
  #define CN_PROC_MSG_SIZE (sizeof(struct cn_msg) + sizeof(struct proc_event))
@@ -153609,9 +153597,9 @@ diff -purN linux-2.6.27/drivers/connector/cn_proc.c linux-2.6.27.19-5.1/drivers/
  static struct cb_id cn_proc_event_id = { CN_IDX_PROC, CN_VAL_PROC };
  
  /* proc_event_counts is used as the sequence number of the netlink message */
-diff -purN linux-2.6.27/drivers/cpufreq/Kconfig linux-2.6.27.19-5.1/drivers/cpufreq/Kconfig
---- linux-2.6.27/drivers/cpufreq/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/Kconfig        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/cpufreq/Kconfig
+--- a/drivers/cpufreq/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/Kconfig  Wed May 06 16:56:16 2009 +0100
 @@ -1,5 +1,6 @@
  config CPU_FREQ
        bool "CPU Frequency scaling"
@@ -153619,10 +153607,10 @@ diff -purN linux-2.6.27/drivers/cpufreq/Kconfig linux-2.6.27.19-5.1/drivers/cpuf
        help
          CPU Frequency scaling allows you to change the clock speed of 
          CPUs on the fly. This is a nice method to save power, because 
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq.c
---- linux-2.6.27/drivers/cpufreq/cpufreq.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq.c      2009-03-25 16:11:12.000000000 +0000
-@@ -455,6 +455,7 @@ static ssize_t show_##file_name                            \
+diff -r 9608d5473017 drivers/cpufreq/cpufreq.c
+--- a/drivers/cpufreq/cpufreq.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq.c        Wed May 06 16:56:16 2009 +0100
+@@ -455,6 +455,7 @@
  
  show_one(cpuinfo_min_freq, cpuinfo.min_freq);
  show_one(cpuinfo_max_freq, cpuinfo.max_freq);
@@ -153630,7 +153618,7 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq.c linux-2.6.27.19-5.1/drivers/cp
  show_one(scaling_min_freq, min);
  show_one(scaling_max_freq, max);
  show_one(scaling_cur_freq, cur);
-@@ -660,6 +661,7 @@ __ATTR(_name, 0644, show_##_name, store_
+@@ -660,6 +661,7 @@
  define_one_ro0400(cpuinfo_cur_freq);
  define_one_ro(cpuinfo_min_freq);
  define_one_ro(cpuinfo_max_freq);
@@ -153638,7 +153626,7 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq.c linux-2.6.27.19-5.1/drivers/cp
  define_one_ro(scaling_available_governors);
  define_one_ro(scaling_driver);
  define_one_ro(scaling_cur_freq);
-@@ -673,6 +675,7 @@ define_one_rw(scaling_setspeed);
+@@ -673,6 +675,7 @@
  static struct attribute *default_attrs[] = {
        &cpuinfo_min_freq.attr,
        &cpuinfo_max_freq.attr,
@@ -153646,10 +153634,10 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq.c linux-2.6.27.19-5.1/drivers/cp
        &scaling_min_freq.attr,
        &scaling_max_freq.attr,
        &affected_cpus.attr,
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_conservative.c
---- linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_conservative.c 2009-03-25 16:11:12.000000000 +0000
-@@ -54,7 +54,18 @@ static unsigned int def_sampling_rate;
+diff -r 9608d5473017 drivers/cpufreq/cpufreq_conservative.c
+--- a/drivers/cpufreq/cpufreq_conservative.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq_conservative.c   Wed May 06 16:56:16 2009 +0100
+@@ -54,7 +54,18 @@
                        (MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
  #define MIN_SAMPLING_RATE                     \
                        (def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
@@ -153668,7 +153656,7 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c linux-2.6.27.19-5
  #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER  (1000)
  #define DEF_SAMPLING_DOWN_FACTOR              (1)
  #define MAX_SAMPLING_DOWN_FACTOR              (10)
-@@ -193,12 +204,14 @@ static ssize_t store_sampling_rate(struc
+@@ -193,12 +204,14 @@
        ret = sscanf (buf, "%u", &input);
  
        mutex_lock(&dbs_mutex);
@@ -153686,10 +153674,10 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_conservative.c linux-2.6.27.19-5
        mutex_unlock(&dbs_mutex);
  
        return count;
-diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_ondemand.c
---- linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpufreq/cpufreq_ondemand.c     2009-03-25 16:11:12.000000000 +0000
-@@ -45,9 +45,20 @@ static unsigned int def_sampling_rate;
+diff -r 9608d5473017 drivers/cpufreq/cpufreq_ondemand.c
+--- a/drivers/cpufreq/cpufreq_ondemand.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpufreq/cpufreq_ondemand.c       Wed May 06 16:56:16 2009 +0100
+@@ -45,9 +45,20 @@
                        (MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10))
  #define MIN_SAMPLING_RATE                     \
                        (def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
@@ -153710,7 +153698,7 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.27.19-5.1/d
  
  static void do_dbs_timer(struct work_struct *work);
  
-@@ -219,13 +230,14 @@ static ssize_t store_sampling_rate(struc
+@@ -219,13 +230,14 @@
        ret = sscanf(buf, "%u", &input);
  
        mutex_lock(&dbs_mutex);
@@ -153729,7 +153717,7 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.27.19-5.1/d
        mutex_unlock(&dbs_mutex);
  
        return count;
-@@ -547,6 +559,31 @@ static int cpufreq_governor_dbs(struct c
+@@ -547,6 +559,31 @@
                        if (def_sampling_rate < MIN_STAT_SAMPLING_RATE)
                                def_sampling_rate = MIN_STAT_SAMPLING_RATE;
  
@@ -153761,9 +153749,9 @@ diff -purN linux-2.6.27/drivers/cpufreq/cpufreq_ondemand.c linux-2.6.27.19-5.1/d
                        dbs_tuners_ins.sampling_rate = def_sampling_rate;
                }
                dbs_timer_init(this_dbs_info);
-diff -purN linux-2.6.27/drivers/cpuidle/Kconfig linux-2.6.27.19-5.1/drivers/cpuidle/Kconfig
---- linux-2.6.27/drivers/cpuidle/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/Kconfig        2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/cpuidle/Kconfig
+--- a/drivers/cpuidle/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/Kconfig  Wed May 06 16:56:16 2009 +0100
 @@ -1,6 +1,7 @@
  
  config CPU_IDLE
@@ -153772,10 +153760,10 @@ diff -purN linux-2.6.27/drivers/cpuidle/Kconfig linux-2.6.27.19-5.1/drivers/cpui
        default ACPI
        help
          CPU idle is a generic framework for supporting software-controlled
-diff -purN linux-2.6.27/drivers/cpuidle/cpuidle.c linux-2.6.27.19-5.1/drivers/cpuidle/cpuidle.c
---- linux-2.6.27/drivers/cpuidle/cpuidle.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/cpuidle.c      2009-03-25 16:11:19.000000000 +0000
-@@ -56,7 +56,11 @@ static void cpuidle_idle_call(void)
+diff -r 9608d5473017 drivers/cpuidle/cpuidle.c
+--- a/drivers/cpuidle/cpuidle.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/cpuidle.c        Wed May 06 16:56:16 2009 +0100
+@@ -56,7 +56,11 @@
                if (pm_idle_old)
                        pm_idle_old();
                else
@@ -153787,22 +153775,22 @@ diff -purN linux-2.6.27/drivers/cpuidle/cpuidle.c linux-2.6.27.19-5.1/drivers/cp
                return;
        }
  
-@@ -67,8 +71,11 @@ static void cpuidle_idle_call(void)
+@@ -67,8 +71,11 @@
        target_state = &dev->states[next_state];
  
        /* enter the state and update stats */
--      dev->last_residency = target_state->enter(dev, target_state);
-       dev->last_state = target_state;
-+      dev->last_residency = target_state->enter(dev, target_state);
++      dev->last_state = target_state;
+       dev->last_residency = target_state->enter(dev, target_state);
+-      dev->last_state = target_state;
 +      if (dev->last_state)
 +              target_state = dev->last_state;
 +
        target_state->time += (unsigned long long)dev->last_residency;
        target_state->usage++;
  
-diff -purN linux-2.6.27/drivers/cpuidle/governors/menu.c linux-2.6.27.19-5.1/drivers/cpuidle/governors/menu.c
---- linux-2.6.27/drivers/cpuidle/governors/menu.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/cpuidle/governors/menu.c       2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/cpuidle/governors/menu.c
+--- a/drivers/cpuidle/governors/menu.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/cpuidle/governors/menu.c Wed May 06 16:56:16 2009 +0100
 @@ -15,12 +15,14 @@
  #include <linux/tick.h>
  
@@ -153818,20 +153806,20 @@ diff -purN linux-2.6.27/drivers/cpuidle/governors/menu.c linux-2.6.27.19-5.1/dri
        unsigned int    last_measured_us;
        unsigned int    elapsed_us;
  };
-@@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_de
+@@ -46,6 +48,12 @@
+       /* determine the expected residency time */
        data->expected_us =
                (u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000;
++
 +      /* Recalculate predicted_us based on prediction_history_pct */
 +      data->predicted_us *= PRED_HISTORY_PCT;
 +      data->predicted_us += (100 - PRED_HISTORY_PCT) *
 +                              data->current_predicted_us;
 +      data->predicted_us /= 100;
-+
        /* find the deepest idle state that satisfies our constraints */
        for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) {
-               struct cpuidle_state *s = &dev->states[i];
-@@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_
+@@ -97,7 +105,7 @@
                measured_us = -1;
  
        /* Predict time until next break event */
@@ -153840,10 +153828,10 @@ diff -purN linux-2.6.27/drivers/cpuidle/governors/menu.c linux-2.6.27.19-5.1/dri
  
        if (last_idle_us + BREAK_FUZZ <
            data->expected_us - target->exit_latency) {
-diff -purN linux-2.6.27/drivers/crypto/talitos.c linux-2.6.27.19-5.1/drivers/crypto/talitos.c
---- linux-2.6.27/drivers/crypto/talitos.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/crypto/talitos.c       2009-03-25 16:11:14.000000000 +0000
-@@ -1619,6 +1619,7 @@ static struct of_device_id talitos_match
+diff -r 9608d5473017 drivers/crypto/talitos.c
+--- a/drivers/crypto/talitos.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/crypto/talitos.c Wed May 06 16:56:16 2009 +0100
+@@ -1619,6 +1619,7 @@
  MODULE_DEVICE_TABLE(of, talitos_match);
  
  static struct of_platform_driver talitos_driver = {
@@ -153851,10 +153839,10 @@ diff -purN linux-2.6.27/drivers/crypto/talitos.c linux-2.6.27.19-5.1/drivers/cry
        .name = "talitos",
        .match_table = talitos_match,
        .probe = talitos_probe,
-diff -purN linux-2.6.27/drivers/dca/dca-core.c linux-2.6.27.19-5.1/drivers/dca/dca-core.c
---- linux-2.6.27/drivers/dca/dca-core.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dca/dca-core.c 2009-03-25 16:11:03.000000000 +0000
-@@ -270,6 +270,6 @@ static void __exit dca_exit(void)
+diff -r 9608d5473017 drivers/dca/dca-core.c
+--- a/drivers/dca/dca-core.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dca/dca-core.c   Wed May 06 16:56:16 2009 +0100
+@@ -270,6 +270,6 @@
        dca_sysfs_exit();
  }
  
@@ -153862,10 +153850,10 @@ diff -purN linux-2.6.27/drivers/dca/dca-core.c linux-2.6.27.19-5.1/drivers/dca/d
 +subsys_initcall(dca_init);
  module_exit(dca_exit);
  
-diff -purN linux-2.6.27/drivers/dma/dmaengine.c linux-2.6.27.19-5.1/drivers/dma/dmaengine.c
---- linux-2.6.27/drivers/dma/dmaengine.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/dmaengine.c        2009-03-25 16:11:23.000000000 +0000
-@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma
+diff -r 9608d5473017 drivers/dma/dmaengine.c
+--- a/drivers/dma/dmaengine.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/dmaengine.c  Wed May 06 16:56:16 2009 +0100
+@@ -388,7 +388,10 @@
  
        init_completion(&device->done);
        kref_init(&device->refcount);
@@ -153876,10 +153864,10 @@ diff -purN linux-2.6.27/drivers/dma/dmaengine.c linux-2.6.27.19-5.1/drivers/dma/
  
        /* represent channels in sysfs. Probably want devs too */
        list_for_each_entry(chan, &device->channels, device_node) {
-diff -purN linux-2.6.27/drivers/dma/fsldma.c linux-2.6.27.19-5.1/drivers/dma/fsldma.c
---- linux-2.6.27/drivers/dma/fsldma.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/fsldma.c   2009-03-25 16:11:23.000000000 +0000
-@@ -1036,6 +1036,7 @@ static struct of_device_id of_fsl_dma_ch
+diff -r 9608d5473017 drivers/dma/fsldma.c
+--- a/drivers/dma/fsldma.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/fsldma.c     Wed May 06 16:56:16 2009 +0100
+@@ -1036,6 +1036,7 @@
  };
  
  static struct of_platform_driver of_fsl_dma_chan_driver = {
@@ -153887,7 +153875,7 @@ diff -purN linux-2.6.27/drivers/dma/fsldma.c linux-2.6.27.19-5.1/drivers/dma/fsl
        .name = "of-fsl-dma-channel",
        .match_table = of_fsl_dma_chan_ids,
        .probe = of_fsl_dma_chan_probe,
-@@ -1116,6 +1117,7 @@ static struct of_device_id of_fsl_dma_id
+@@ -1116,6 +1117,7 @@
  };
  
  static struct of_platform_driver of_fsl_dma_driver = {
@@ -153895,10 +153883,10 @@ diff -purN linux-2.6.27/drivers/dma/fsldma.c linux-2.6.27.19-5.1/drivers/dma/fsl
        .name = "of-fsl-dma",
        .match_table = of_fsl_dma_ids,
        .probe = of_fsl_dma_probe,
-diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/ioat_dma.c
---- linux-2.6.27/drivers/dma/ioat_dma.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/ioat_dma.c 2009-03-25 16:11:23.000000000 +0000
-@@ -519,7 +519,7 @@ static dma_cookie_t ioat1_tx_submit(stru
+diff -r 9608d5473017 drivers/dma/ioat_dma.c
+--- a/drivers/dma/ioat_dma.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/ioat_dma.c   Wed May 06 16:56:16 2009 +0100
+@@ -519,7 +519,7 @@
        }
  
        hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
@@ -153907,7 +153895,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
                hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
                if (first != new) {
                        /* move callback into to last desc */
-@@ -611,7 +611,7 @@ static dma_cookie_t ioat2_tx_submit(stru
+@@ -611,7 +611,7 @@
        }
  
        hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS;
@@ -153916,7 +153904,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
                hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN;
                if (first != new) {
                        /* move callback into to last desc */
-@@ -801,6 +801,12 @@ static void ioat_dma_free_chan_resources
+@@ -801,6 +801,12 @@
        struct ioat_desc_sw *desc, *_desc;
        int in_use_descs = 0;
  
@@ -153929,7 +153917,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
        tasklet_disable(&ioat_chan->cleanup_task);
        ioat_dma_memcpy_cleanup(ioat_chan);
  
-@@ -863,6 +869,7 @@ static void ioat_dma_free_chan_resources
+@@ -863,6 +869,7 @@
        ioat_chan->last_completion = ioat_chan->completion_addr = 0;
        ioat_chan->pending = 0;
        ioat_chan->dmacount = 0;
@@ -153937,7 +153925,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
        ioat_chan->watchdog_completion = 0;
        ioat_chan->last_compl_desc_addr_hw = 0;
        ioat_chan->watchdog_tcp_cookie =
-@@ -1332,8 +1339,9 @@ static void ioat_dma_start_null_desc(str
+@@ -1332,8 +1339,9 @@
  
  static void ioat_dma_test_callback(void *dma_async_param)
  {
@@ -153949,7 +153937,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
  }
  
  /**
-@@ -1350,6 +1358,7 @@ static int ioat_dma_self_test(struct ioa
+@@ -1350,6 +1358,7 @@
        dma_addr_t dma_dest, dma_src;
        dma_cookie_t cookie;
        int err = 0;
@@ -153957,7 +153945,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
  
        src = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, GFP_KERNEL);
        if (!src)
-@@ -1389,8 +1398,9 @@ static int ioat_dma_self_test(struct ioa
+@@ -1389,8 +1398,9 @@
        }
  
        async_tx_ack(tx);
@@ -153968,7 +153956,7 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
        cookie = tx->tx_submit(tx);
        if (cookie < 0) {
                dev_err(&device->pdev->dev,
-@@ -1399,7 +1409,8 @@ static int ioat_dma_self_test(struct ioa
+@@ -1399,7 +1409,8 @@
                goto free_resources;
        }
        device->common.device_issue_pending(dma_chan);
@@ -153978,10 +153966,10 @@ diff -purN linux-2.6.27/drivers/dma/ioat_dma.c linux-2.6.27.19-5.1/drivers/dma/i
  
        if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
                                        != DMA_SUCCESS) {
-diff -purN linux-2.6.27/drivers/dma/iop-adma.c linux-2.6.27.19-5.1/drivers/dma/iop-adma.c
---- linux-2.6.27/drivers/dma/iop-adma.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/iop-adma.c 2009-03-25 16:11:23.000000000 +0000
-@@ -85,18 +85,28 @@ iop_adma_run_tx_complete_actions(struct 
+diff -r 9608d5473017 drivers/dma/iop-adma.c
+--- a/drivers/dma/iop-adma.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/iop-adma.c   Wed May 06 16:56:16 2009 +0100
+@@ -85,18 +85,28 @@
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
@@ -154013,10 +154001,10 @@ diff -purN linux-2.6.27/drivers/dma/iop-adma.c linux-2.6.27.19-5.1/drivers/dma/i
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
-diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/iovlock.c
---- linux-2.6.27/drivers/dma/iovlock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/iovlock.c  2009-03-25 16:11:23.000000000 +0000
-@@ -55,7 +55,6 @@ struct dma_pinned_list *dma_pin_iovec_pa
+diff -r 9608d5473017 drivers/dma/iovlock.c
+--- a/drivers/dma/iovlock.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/iovlock.c    Wed May 06 16:56:16 2009 +0100
+@@ -55,7 +55,6 @@
        int nr_iovecs = 0;
        int iovec_len_used = 0;
        int iovec_pages_used = 0;
@@ -154024,7 +154012,7 @@ diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/io
  
        /* don't pin down non-user-based iovecs */
        if (segment_eq(get_fs(), KERNEL_DS))
-@@ -72,23 +71,21 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -72,23 +71,21 @@
        local_list = kmalloc(sizeof(*local_list)
                + (nr_iovecs * sizeof (struct dma_page_list))
                + (iovec_pages_used * sizeof (struct page*)), GFP_KERNEL);
@@ -154036,9 +154024,9 @@ diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/io
  
        /* list of pages starts right after the page list array */
        pages = (struct page **) &local_list->page_list[nr_iovecs];
-+      local_list->nr_iovecs = 0;
 +
++      local_list->nr_iovecs = 0;
        for (i = 0; i < nr_iovecs; i++) {
                struct dma_page_list *page_list = &local_list->page_list[i];
  
@@ -154052,7 +154040,7 @@ diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/io
  
                page_list->nr_pages = num_pages_spanned(&iov[i]);
                page_list->base_address = iov[i].iov_base;
-@@ -109,10 +106,8 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -109,10 +106,8 @@
                        NULL);
                up_read(&current->mm->mmap_sem);
  
@@ -154064,7 +154052,7 @@ diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/io
  
                local_list->nr_iovecs = i + 1;
        }
-@@ -122,7 +117,7 @@ struct dma_pinned_list *dma_pin_iovec_pa
+@@ -122,7 +117,7 @@
  unpin:
        dma_unpin_iovec_pages(local_list);
  out:
@@ -154073,10 +154061,10 @@ diff -purN linux-2.6.27/drivers/dma/iovlock.c linux-2.6.27.19-5.1/drivers/dma/io
  }
  
  void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list)
-diff -purN linux-2.6.27/drivers/dma/mv_xor.c linux-2.6.27.19-5.1/drivers/dma/mv_xor.c
---- linux-2.6.27/drivers/dma/mv_xor.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/dma/mv_xor.c   2009-03-25 16:11:23.000000000 +0000
-@@ -311,17 +311,26 @@ mv_xor_run_tx_complete_actions(struct mv
+diff -r 9608d5473017 drivers/dma/mv_xor.c
+--- a/drivers/dma/mv_xor.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/dma/mv_xor.c     Wed May 06 16:56:16 2009 +0100
+@@ -311,17 +311,26 @@
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
@@ -154106,9 +154094,9 @@ diff -purN linux-2.6.27/drivers/dma/mv_xor.c linux-2.6.27.19-5.1/drivers/dma/mv_
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
-diff -purN linux-2.6.27/drivers/edac/cell_edac.c linux-2.6.27.19-5.1/drivers/edac/cell_edac.c
---- linux-2.6.27/drivers/edac/cell_edac.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/edac/cell_edac.c       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/edac/cell_edac.c
+--- a/drivers/edac/cell_edac.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/edac/cell_edac.c Wed May 06 16:56:16 2009 +0100
 @@ -9,6 +9,7 @@
   */
  #undef DEBUG
@@ -154117,7 +154105,7 @@ diff -purN linux-2.6.27/drivers/edac/cell_edac.c linux-2.6.27.19-5.1/drivers/eda
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/platform_device.h>
-@@ -142,7 +143,7 @@ static void __devinit cell_edac_init_csr
+@@ -142,7 +143,7 @@
                csrow->nr_pages = (r.end - r.start + 1) >> PAGE_SHIFT;
                csrow->last_page = csrow->first_page + csrow->nr_pages - 1;
                csrow->mtype = MEM_XDR;
@@ -154126,19 +154114,19 @@ diff -purN linux-2.6.27/drivers/edac/cell_edac.c linux-2.6.27.19-5.1/drivers/eda
                dev_dbg(mci->dev,
                        "Initialized on node %d, chanmask=0x%x,"
                        " first_page=0x%lx, nr_pages=0x%x\n",
-@@ -164,6 +165,8 @@ static int __devinit cell_edac_probe(str
+@@ -163,6 +164,8 @@
+       regs = cbe_get_cpu_mic_tm_regs(cbe_node_to_cpu(pdev->id));
        if (regs == NULL)
                return -ENODEV;
-+      edac_op_state = EDAC_OPSTATE_POLL;
 +
++      edac_op_state = EDAC_OPSTATE_POLL;
        /* Get channel population */
        reg = in_be64(&regs->mic_mnt_cfg);
-       dev_dbg(&pdev->dev, "MIC_MNT_CFG = 0x%016lx\n", reg);
-diff -purN linux-2.6.27/drivers/firewire/fw-cdev.c linux-2.6.27.19-5.1/drivers/firewire/fw-cdev.c
---- linux-2.6.27/drivers/firewire/fw-cdev.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-cdev.c     2009-03-25 16:11:13.000000000 +0000
-@@ -720,8 +720,8 @@ static int ioctl_create_iso_context(stru
+diff -r 9608d5473017 drivers/firewire/fw-cdev.c
+--- a/drivers/firewire/fw-cdev.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-cdev.c       Wed May 06 16:56:16 2009 +0100
+@@ -720,8 +720,8 @@
  #define GET_PAYLOAD_LENGTH(v) ((v) & 0xffff)
  #define GET_INTERRUPT(v)      (((v) >> 16) & 0x01)
  #define GET_SKIP(v)           (((v) >> 17) & 0x01)
@@ -154149,7 +154137,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-cdev.c linux-2.6.27.19-5.1/drivers/f
  #define GET_HEADER_LENGTH(v)  (((v) >> 24) & 0xff)
  
  static int ioctl_queue_iso(struct client *client, void *buffer)
-@@ -913,7 +913,7 @@ dispatch_ioctl(struct client *client, un
+@@ -913,7 +913,7 @@
                        return -EFAULT;
        }
  
@@ -154158,10 +154146,10 @@ diff -purN linux-2.6.27/drivers/firewire/fw-cdev.c linux-2.6.27.19-5.1/drivers/f
  }
  
  static long
-diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/firewire/fw-ohci.c
---- linux-2.6.27/drivers/firewire/fw-ohci.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-ohci.c     2009-03-25 16:11:13.000000000 +0000
-@@ -226,7 +226,7 @@ static inline struct fw_ohci *fw_ohci(st
+diff -r 9608d5473017 drivers/firewire/fw-ohci.c
+--- a/drivers/firewire/fw-ohci.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-ohci.c       Wed May 06 16:56:16 2009 +0100
+@@ -226,7 +226,7 @@
  #define CONTEXT_DEAD  0x0800
  #define CONTEXT_ACTIVE        0x0400
  
@@ -154170,7 +154158,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/f
  #define OHCI1394_MAX_AT_RESP_RETRIES  0x2
  #define OHCI1394_MAX_PHYS_RESP_RETRIES        0x8
  
-@@ -958,6 +958,7 @@ at_context_queue_packet(struct context *
+@@ -958,6 +958,7 @@
                        packet->ack = RCODE_SEND_ERROR;
                        return -1;
                }
@@ -154178,7 +154166,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/f
  
                d[2].req_count    = cpu_to_le16(packet->payload_length);
                d[2].data_address = cpu_to_le32(payload_bus);
-@@ -1009,7 +1010,6 @@ static int handle_at_packet(struct conte
+@@ -1009,7 +1010,6 @@
        struct driver_data *driver_data;
        struct fw_packet *packet;
        struct fw_ohci *ohci = context->ohci;
@@ -154186,7 +154174,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/f
        int evt;
  
        if (last->transfer_status == 0)
-@@ -1022,9 +1022,8 @@ static int handle_at_packet(struct conte
+@@ -1022,9 +1022,8 @@
                /* This packet was cancelled, just continue. */
                return 1;
  
@@ -154198,31 +154186,31 @@ diff -purN linux-2.6.27/drivers/firewire/fw-ohci.c linux-2.6.27.19-5.1/drivers/f
                                 packet->payload_length, DMA_TO_DEVICE);
  
        evt = le16_to_cpu(last->transfer_status) & 0x1f;
-@@ -1681,6 +1680,10 @@ static int ohci_cancel_packet(struct fw_
+@@ -1680,6 +1679,10 @@
        if (packet->ack != 0)
                goto out;
++
 +      if (packet->payload_bus)
 +              dma_unmap_single(ohci->card.device, packet->payload_bus,
 +                               packet->payload_length, DMA_TO_DEVICE);
-+
        log_ar_at_event('T', packet->speed, packet->header, 0x20);
        driver_data->packet = NULL;
-       packet->ack = RCODE_CANCELLED;
-diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/firewire/fw-sbp2.c
---- linux-2.6.27/drivers/firewire/fw-sbp2.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-sbp2.c     2009-03-25 16:11:13.000000000 +0000
-@@ -172,6 +172,9 @@ struct sbp2_target {
+diff -r 9608d5473017 drivers/firewire/fw-sbp2.c
+--- a/drivers/firewire/fw-sbp2.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-sbp2.c       Wed May 06 16:56:16 2009 +0100
+@@ -171,6 +171,9 @@
+       int dont_block; /* counter for each logical unit */
        int blocked;    /* ditto */
  };
++
 +/* Impossible login_id, to detect logout attempt before successful login */
 +#define INVALID_LOGIN_ID 0x10000
-+
  /*
   * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
-  * provided in the config rom. Most devices do provide a value, which
-@@ -347,21 +350,28 @@ static const struct {
+@@ -347,17 +350,24 @@
                .model                  = ~0,
                .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
        },
@@ -154246,19 +154234,15 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
 +      /* iPod 4th generation */ {
                .firmware_revision      = 0x0a2700,
                .model                  = 0x000021,
-               .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
-       },
-       /* iPod mini */ {
-               .firmware_revision      = 0x0a2700,
-+              .model                  = 0x000022,
 +              .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
 +      },
 +      /* iPod mini */ {
 +              .firmware_revision      = 0x0a2700,
-               .model                  = 0x000023,
++              .model                  = 0x000022,
                .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
        },
-@@ -791,9 +801,20 @@ static void sbp2_release_target(struct k
+       /* iPod mini */ {
+@@ -791,9 +801,20 @@
                        scsi_remove_device(sdev);
                        scsi_device_put(sdev);
                }
@@ -154282,7 +154266,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
                fw_core_remove_address_handler(&lu->address_handler);
                list_del(&lu->link);
                kfree(lu);
-@@ -808,19 +829,20 @@ static void sbp2_release_target(struct k
+@@ -808,19 +829,20 @@
  
  static struct workqueue_struct *sbp2_wq;
  
@@ -154310,7 +154294,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
  }
  
  static void
-@@ -993,6 +1015,7 @@ static int sbp2_add_logical_unit(struct 
+@@ -993,6 +1015,7 @@
  
        lu->tgt      = tgt;
        lu->lun      = lun_entry & 0xffff;
@@ -154318,7 +154302,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
        lu->retries  = 0;
        lu->has_sdev = false;
        lu->blocked  = false;
-@@ -1158,7 +1181,7 @@ static int sbp2_probe(struct device *dev
+@@ -1158,7 +1181,7 @@
  
        /* Do the login in a workqueue so we can easily reschedule retries. */
        list_for_each_entry(lu, &tgt->lu_list, link)
@@ -154327,7 +154311,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
        return 0;
  
   fail_tgt_put:
-@@ -1272,6 +1295,19 @@ static struct fw_driver sbp2_driver = {
+@@ -1272,6 +1295,19 @@
        .id_table = sbp2_id_table,
  };
  
@@ -154347,7 +154331,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
  static unsigned int
  sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data)
  {
-@@ -1351,15 +1387,7 @@ complete_command_orb(struct sbp2_orb *ba
+@@ -1351,15 +1387,7 @@
  
        dma_unmap_single(device->card->device, orb->base.request_bus,
                         sizeof(orb->request), DMA_TO_DEVICE);
@@ -154364,7 +154348,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
  
        orb->cmd->result = result;
        orb->done(orb->cmd);
-@@ -1509,8 +1537,10 @@ static int sbp2_scsi_queuecommand(struct
+@@ -1509,8 +1537,10 @@
        orb->base.request_bus =
                dma_map_single(device->card->device, &orb->request,
                               sizeof(orb->request), DMA_TO_DEVICE);
@@ -154376,10 +154360,10 @@ diff -purN linux-2.6.27/drivers/firewire/fw-sbp2.c linux-2.6.27.19-5.1/drivers/f
  
        sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, lu->generation,
                      lu->command_block_agent_address + SBP2_ORB_POINTER);
-diff -purN linux-2.6.27/drivers/firewire/fw-topology.c linux-2.6.27.19-5.1/drivers/firewire/fw-topology.c
---- linux-2.6.27/drivers/firewire/fw-topology.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-topology.c 2009-03-25 16:11:13.000000000 +0000
-@@ -413,7 +413,7 @@ static void
+diff -r 9608d5473017 drivers/firewire/fw-topology.c
+--- a/drivers/firewire/fw-topology.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-topology.c   Wed May 06 16:56:16 2009 +0100
+@@ -413,7 +413,7 @@
  update_tree(struct fw_card *card, struct fw_node *root)
  {
        struct list_head list0, list1;
@@ -154388,7 +154372,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-topology.c linux-2.6.27.19-5.1/drive
        int i, event;
  
        INIT_LIST_HEAD(&list0);
-@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct
+@@ -485,7 +485,9 @@
                }
  
                node0 = fw_node(node0->link.next);
@@ -154399,10 +154383,10 @@ diff -purN linux-2.6.27/drivers/firewire/fw-topology.c linux-2.6.27.19-5.1/drive
        }
  }
  
-diff -purN linux-2.6.27/drivers/firewire/fw-transaction.c linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.c
---- linux-2.6.27/drivers/firewire/fw-transaction.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.c      2009-03-25 16:11:13.000000000 +0000
-@@ -207,6 +207,7 @@ fw_fill_request(struct fw_packet *packet
+diff -r 9608d5473017 drivers/firewire/fw-transaction.c
+--- a/drivers/firewire/fw-transaction.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-transaction.c        Wed May 06 16:56:16 2009 +0100
+@@ -207,6 +207,7 @@
        packet->speed = speed;
        packet->generation = generation;
        packet->ack = 0;
@@ -154410,7 +154394,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.c linux-2.6.27.19-5.1/dr
  }
  
  /**
-@@ -541,6 +542,8 @@ fw_fill_response(struct fw_packet *respo
+@@ -541,6 +542,8 @@
                BUG();
                return;
        }
@@ -154419,9 +154403,9 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.c linux-2.6.27.19-5.1/dr
  }
  EXPORT_SYMBOL(fw_fill_response);
  
-diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.h
---- linux-2.6.27/drivers/firewire/fw-transaction.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firewire/fw-transaction.h      2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/firewire/fw-transaction.h
+--- a/drivers/firewire/fw-transaction.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firewire/fw-transaction.h        Wed May 06 16:56:16 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/list.h>
  #include <linux/spinlock_types.h>
@@ -154430,7 +154414,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/dr
  #include <linux/workqueue.h>
  
  #define TCODE_IS_READ_REQUEST(tcode)  (((tcode) & ~1) == 4)
-@@ -153,6 +154,7 @@ struct fw_packet {
+@@ -153,6 +154,7 @@
        size_t header_length;
        void *payload;
        size_t payload_length;
@@ -154438,7 +154422,7 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/dr
        u32 timestamp;
  
        /*
-@@ -248,7 +250,7 @@ struct fw_card {
+@@ -248,7 +250,7 @@
        struct fw_node *local_node;
        struct fw_node *root_node;
        struct fw_node *irm_node;
@@ -154447,10 +154431,10 @@ diff -purN linux-2.6.27/drivers/firewire/fw-transaction.h linux-2.6.27.19-5.1/dr
        int gap_count;
        bool beta_repeaters_present;
  
-diff -purN linux-2.6.27/drivers/firmware/dell_rbu.c linux-2.6.27.19-5.1/drivers/firmware/dell_rbu.c
---- linux-2.6.27/drivers/firmware/dell_rbu.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/dell_rbu.c    2009-03-25 16:11:14.000000000 +0000
-@@ -576,7 +576,7 @@ static ssize_t read_rbu_image_type(struc
+diff -r 9608d5473017 drivers/firmware/dell_rbu.c
+--- a/drivers/firmware/dell_rbu.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/dell_rbu.c      Wed May 06 16:56:16 2009 +0100
+@@ -576,7 +576,7 @@
  {
        int size = 0;
        if (!pos)
@@ -154459,7 +154443,7 @@ diff -purN linux-2.6.27/drivers/firmware/dell_rbu.c linux-2.6.27.19-5.1/drivers/
        return size;
  }
  
-@@ -648,7 +648,7 @@ static ssize_t read_rbu_packet_size(stru
+@@ -648,7 +648,7 @@
        int size = 0;
        if (!pos) {
                spin_lock(&rbu_data.lock);
@@ -154468,10 +154452,10 @@ diff -purN linux-2.6.27/drivers/firmware/dell_rbu.c linux-2.6.27.19-5.1/drivers/
                spin_unlock(&rbu_data.lock);
        }
        return size;
-diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/firmware/dmi_scan.c
---- linux-2.6.27/drivers/firmware/dmi_scan.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/dmi_scan.c    2009-03-25 16:11:14.000000000 +0000
-@@ -407,6 +407,27 @@ void __init dmi_scan_machine(void)
+diff -r 9608d5473017 drivers/firmware/dmi_scan.c
+--- a/drivers/firmware/dmi_scan.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/dmi_scan.c      Wed May 06 16:56:16 2009 +0100
+@@ -407,6 +407,27 @@
  }
  
  /**
@@ -154499,7 +154483,7 @@ diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/
   *    dmi_check_system - check system DMI data
   *    @list: array of dmi_system_id structures to match against
   *            All non-null elements of the list must match
-@@ -421,30 +442,45 @@ void __init dmi_scan_machine(void)
+@@ -421,28 +442,43 @@
   */
  int dmi_check_system(const struct dmi_system_id *list)
  {
@@ -154532,8 +154516,8 @@ diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/
        return count;
  }
  EXPORT_SYMBOL(dmi_check_system);
- /**
++
++/**
 + *    dmi_first_match - find dmi_system_id structure matching system DMI data
 + *    @list: array of dmi_system_id structures to match against
 + *            All non-null elements of the list must match
@@ -154556,12 +154540,10 @@ diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/
 +      return NULL;
 +}
 +EXPORT_SYMBOL(dmi_first_match);
-+
-+/**
+ /**
   *    dmi_get_system_info - return DMI data value
-  *    @field: data index (see enum dmi_field)
-  *
-@@ -457,6 +493,17 @@ const char *dmi_get_system_info(int fiel
+@@ -457,6 +493,17 @@
  }
  EXPORT_SYMBOL(dmi_get_system_info);
  
@@ -154579,9 +154561,9 @@ diff -purN linux-2.6.27/drivers/firmware/dmi_scan.c linux-2.6.27.19-5.1/drivers/
  
  /**
   *    dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.
-diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/firmware/memmap.c
---- linux-2.6.27/drivers/firmware/memmap.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/firmware/memmap.c      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/firmware/memmap.c
+--- a/drivers/firmware/memmap.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/firmware/memmap.c        Wed May 06 16:56:16 2009 +0100
 @@ -31,8 +31,8 @@
   * information is necessary as for the resource tree.
   */
@@ -154593,7 +154575,7 @@ diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/fi
        const char              *type;  /* type of the memory range */
        struct list_head        list;   /* entry for the linked list */
        struct kobject          kobj;   /* kobject for each entry */
-@@ -101,7 +101,7 @@ static LIST_HEAD(map_entries);
+@@ -101,7 +101,7 @@
   * Common implementation of firmware_map_add() and firmware_map_add_early()
   * which expects a pre-allocated struct firmware_map_entry.
   **/
@@ -154602,7 +154584,7 @@ diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/fi
                                  const char *type,
                                  struct firmware_map_entry *entry)
  {
-@@ -132,8 +132,7 @@ static int firmware_map_add_entry(resour
+@@ -132,8 +132,7 @@
   *
   * Returns 0 on success, or -ENOMEM if no memory could be allocated.
   **/
@@ -154612,7 +154594,7 @@ diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/fi
  {
        struct firmware_map_entry *entry;
  
-@@ -157,7 +156,7 @@ int firmware_map_add(resource_size_t sta
+@@ -157,7 +156,7 @@
   *
   * Returns 0 on success, or -ENOMEM if no memory could be allocated.
   **/
@@ -154621,7 +154603,7 @@ diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/fi
                                  const char *type)
  {
        struct firmware_map_entry *entry;
-@@ -175,14 +174,12 @@ int __init firmware_map_add_early(resour
+@@ -175,14 +174,12 @@
  
  static ssize_t start_show(struct firmware_map_entry *entry, char *buf)
  {
@@ -154638,10 +154620,10 @@ diff -purN linux-2.6.27/drivers/firmware/memmap.c linux-2.6.27.19-5.1/drivers/fi
  }
  
  static ssize_t type_show(struct firmware_map_entry *entry, char *buf)
-diff -purN linux-2.6.27/drivers/gpio/gpiolib.c linux-2.6.27.19-5.1/drivers/gpio/gpiolib.c
---- linux-2.6.27/drivers/gpio/gpiolib.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpio/gpiolib.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1020,7 +1020,7 @@ int gpio_get_value_cansleep(unsigned gpi
+diff -r 9608d5473017 drivers/gpio/gpiolib.c
+--- a/drivers/gpio/gpiolib.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpio/gpiolib.c   Wed May 06 16:56:16 2009 +0100
+@@ -1020,7 +1020,7 @@
  
        might_sleep_if(extra_checks);
        chip = gpio_to_chip(gpio);
@@ -154650,7 +154632,7 @@ diff -purN linux-2.6.27/drivers/gpio/gpiolib.c linux-2.6.27.19-5.1/drivers/gpio/
  }
  EXPORT_SYMBOL_GPL(gpio_get_value_cansleep);
  
-@@ -1049,7 +1049,7 @@ static void gpiolib_dbg_show(struct seq_
+@@ -1049,7 +1049,7 @@
                        continue;
  
                is_out = test_bit(FLAG_IS_OUT, &gdesc->flags);
@@ -154659,10 +154641,10 @@ diff -purN linux-2.6.27/drivers/gpio/gpiolib.c linux-2.6.27.19-5.1/drivers/gpio/
                        gpio, gdesc->label,
                        is_out ? "out" : "in ",
                        chip->get
-diff -purN linux-2.6.27/drivers/gpu/drm/Kconfig linux-2.6.27.19-5.1/drivers/gpu/drm/Kconfig
---- linux-2.6.27/drivers/gpu/drm/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/Kconfig        2009-03-25 16:11:17.000000000 +0000
-@@ -99,6 +99,13 @@ config DRM_VIA
+diff -r 9608d5473017 drivers/gpu/drm/Kconfig
+--- a/drivers/gpu/drm/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/Kconfig  Wed May 06 16:56:16 2009 +0100
+@@ -99,6 +99,13 @@
          Choose this option if you have a Via unichrome or compatible video
          chipset. If M is selected the module will be called via.
  
@@ -154676,19 +154658,19 @@ diff -purN linux-2.6.27/drivers/gpu/drm/Kconfig linux-2.6.27.19-5.1/drivers/gpu/
  config DRM_SAVAGE
        tristate "Savage video cards"
        depends on DRM
-diff -purN linux-2.6.27/drivers/gpu/drm/Makefile linux-2.6.27.19-5.1/drivers/gpu/drm/Makefile
---- linux-2.6.27/drivers/gpu/drm/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/Makefile       2009-03-25 16:11:18.000000000 +0000
-@@ -23,4 +23,5 @@ obj-$(CONFIG_DRM_I915)  += i915/
+diff -r 9608d5473017 drivers/gpu/drm/Makefile
+--- a/drivers/gpu/drm/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/Makefile Wed May 06 16:56:16 2009 +0100
+@@ -23,4 +23,5 @@
  obj-$(CONFIG_DRM_SIS)   += sis/
  obj-$(CONFIG_DRM_SAVAGE)+= savage/
  obj-$(CONFIG_DRM_VIA) +=via/
 +obj-$(CONFIG_DRM_VIA_CHROME9) +=via_chrome9/
  
-diff -purN linux-2.6.27/drivers/gpu/drm/i915/i915_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/i915/i915_dma.c
---- linux-2.6.27/drivers/gpu/drm/i915/i915_dma.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/i915/i915_dma.c        2009-03-25 16:11:18.000000000 +0000
-@@ -836,7 +836,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
+diff -r 9608d5473017 drivers/gpu/drm/i915/i915_dma.c
+--- a/drivers/gpu/drm/i915/i915_dma.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/i915/i915_dma.c  Wed May 06 16:56:17 2009 +0100
+@@ -836,7 +836,7 @@
        DRM_IOCTL_DEF(DRM_I915_SET_VBLANK_PIPE,  i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY ),
        DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE,  i915_vblank_pipe_get, DRM_AUTH ),
        DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
@@ -154697,10 +154679,10 @@ diff -purN linux-2.6.27/drivers/gpu/drm/i915/i915_dma.c linux-2.6.27.19-5.1/driv
  };
  
  int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_dma.c
---- linux-2.6.27/drivers/gpu/drm/via/via_dma.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_dma.c  2009-03-25 16:11:17.000000000 +0000
-@@ -68,6 +68,15 @@
+diff -r 9608d5473017 drivers/gpu/drm/via/via_dma.c
+--- a/drivers/gpu/drm/via/via_dma.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_dma.c    Wed May 06 16:56:17 2009 +0100
+@@ -68,12 +68,22 @@
        *vb++ = (w2);                           \
        dev_priv->dma_low += 8;
  
@@ -154716,15 +154698,14 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
  static void via_cmdbuf_start(drm_via_private_t * dev_priv);
  static void via_cmdbuf_pause(drm_via_private_t * dev_priv);
  static void via_cmdbuf_reset(drm_via_private_t * dev_priv);
-@@ -75,6 +84,7 @@ static void via_cmdbuf_rewind(drm_via_pr
+ static void via_cmdbuf_rewind(drm_via_private_t * dev_priv);
  static int via_wait_idle(drm_via_private_t * dev_priv);
  static void via_pad_cache(drm_via_private_t * dev_priv, int qwords);
 +
  /*
   * Free space in command buffer.
-  */
-@@ -155,17 +165,35 @@ static inline uint32_t *via_check_dma(dr
+@@ -155,17 +165,35 @@
  
  int via_dma_cleanup(struct drm_device * dev)
  {
@@ -154761,7 +154742,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
        }
  
        return 0;
-@@ -175,6 +203,7 @@ static int via_initialize(struct drm_dev
+@@ -175,6 +203,7 @@
                          drm_via_private_t * dev_priv,
                          drm_via_dma_init_t * init)
  {
@@ -154769,17 +154750,17 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
        if (!dev_priv || !dev_priv->mmio) {
                DRM_ERROR("via_dma_init called before via_map_init\n");
                return -EFAULT;
-@@ -195,6 +224,9 @@ static int via_initialize(struct drm_dev
+@@ -194,6 +223,9 @@
+               DRM_ERROR("AGP DMA is not supported on this chip\n");
                return -EINVAL;
        }
++
 +      for (pnode = via_video_save_head; pnode; pnode = pnode->next)
 +              memcpy(pnode->pvideomem, pnode->psystemmem, pnode->size);
-+
        dev_priv->ring.map.offset = dev->agp->base + init->offset;
        dev_priv->ring.map.size = init->size;
-       dev_priv->ring.map.type = 0;
-@@ -224,6 +256,7 @@ static int via_initialize(struct drm_dev
+@@ -224,6 +256,7 @@
  
        via_cmdbuf_start(dev_priv);
  
@@ -154787,7 +154768,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-@@ -332,12 +365,42 @@ static int via_flush_ioctl(struct drm_de
+@@ -332,16 +365,174 @@
  static int via_cmdbuffer(struct drm_device *dev, void *data, struct drm_file *file_priv)
  {
        drm_via_cmdbuffer_t *cmdbuf = data;
@@ -154831,10 +154812,11 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
        ret = via_dispatch_cmdbuffer(dev, cmdbuf);
        if (ret) {
                return ret;
-@@ -346,6 +409,134 @@ static int via_cmdbuffer(struct drm_devi
-       return 0;
- }
+       }
++
++      return 0;
++}
++
 +int via_cmdbuffer_video_agp(struct drm_device *dev, void *data,
 +      struct drm_file *file_priv)
 +{
@@ -154959,14 +154941,10 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
 +      DRM_WRITEMEMORYBARRIER();
 +      /* fire */
 +      VIA_WRITE(VIA_REG_TRANSPACE, command | HC_HAGPCMNT_MASK);
-+
-+      return 0;
-+}
-+
- static int via_dispatch_pci_cmdbuffer(struct drm_device * dev,
-                                     drm_via_cmdbuffer_t * cmd)
- {
-@@ -735,6 +926,146 @@ static int via_cmdbuf_size(struct drm_de
+       return 0;
+ }
+@@ -735,6 +926,146 @@
        return ret;
  }
  
@@ -155113,7 +155091,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
  struct drm_ioctl_desc via_ioctls[] = {
        DRM_IOCTL_DEF(DRM_VIA_ALLOCMEM, via_mem_alloc, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_VIA_FREEMEM, via_mem_free, DRM_AUTH),
-@@ -742,6 +1073,7 @@ struct drm_ioctl_desc via_ioctls[] = {
+@@ -742,6 +1073,7 @@
        DRM_IOCTL_DEF(DRM_VIA_FB_INIT, via_fb_init, DRM_AUTH|DRM_MASTER),
        DRM_IOCTL_DEF(DRM_VIA_MAP_INIT, via_map_init, DRM_AUTH|DRM_MASTER),
        DRM_IOCTL_DEF(DRM_VIA_DEC_FUTEX, via_decoder_futex, DRM_AUTH),
@@ -155121,7 +155099,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
        DRM_IOCTL_DEF(DRM_VIA_DMA_INIT, via_dma_init, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_VIA_CMDBUFFER, via_cmdbuffer, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_VIA_FLUSH, via_flush_ioctl, DRM_AUTH),
-@@ -749,7 +1081,10 @@ struct drm_ioctl_desc via_ioctls[] = {
+@@ -749,7 +1081,10 @@
        DRM_IOCTL_DEF(DRM_VIA_CMDBUF_SIZE, via_cmdbuf_size, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_VIA_WAIT_IRQ, via_wait_irq, DRM_AUTH),
        DRM_IOCTL_DEF(DRM_VIA_DMA_BLIT, via_dma_blit, DRM_AUTH),
@@ -155133,10 +155111,10 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_dma.c linux-2.6.27.19-5.1/driver
  };
  
  int via_max_ioctl = DRM_ARRAY_SIZE(via_ioctls);
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.c
---- linux-2.6.27/drivers/gpu/drm/via/via_drv.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.c  2009-03-25 16:11:17.000000000 +0000
-@@ -37,10 +37,16 @@ static struct pci_device_id pciidlist[] 
+diff -r 9608d5473017 drivers/gpu/drm/via/via_drv.c
+--- a/drivers/gpu/drm/via/via_drv.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_drv.c    Wed May 06 16:56:17 2009 +0100
+@@ -37,10 +37,16 @@
        viadrv_PCI_IDS
  };
  
@@ -155153,7 +155131,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.c linux-2.6.27.19-5.1/driver
        .load = via_driver_load,
        .unload = via_driver_unload,
        .context_dtor = via_final_context,
-@@ -68,8 +74,10 @@ static struct drm_driver driver = {
+@@ -68,8 +74,10 @@
                 .fasync = drm_fasync,
        },
        .pci_driver = {
@@ -155166,10 +155144,10 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.c linux-2.6.27.19-5.1/driver
        },
  
        .name = DRIVER_NAME,
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.h
---- linux-2.6.27/drivers/gpu/drm/via/via_drv.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_drv.h  2009-03-25 16:11:17.000000000 +0000
-@@ -62,6 +62,7 @@ typedef struct drm_via_private {
+diff -r 9608d5473017 drivers/gpu/drm/via/via_drv.h
+--- a/drivers/gpu/drm/via/via_drv.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_drv.h    Wed May 06 16:56:17 2009 +0100
+@@ -62,6 +62,7 @@
        drm_local_map_t *sarea;
        drm_local_map_t *fb;
        drm_local_map_t *mmio;
@@ -155177,7 +155155,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/driver
        unsigned long agpAddr;
        wait_queue_head_t decoder_queue[VIA_NR_XVMC_LOCKS];
        char *dma_ptr;
-@@ -93,7 +94,13 @@ typedef struct drm_via_private {
+@@ -93,7 +94,13 @@
        unsigned long vram_offset;
        unsigned long agp_offset;
        drm_via_blitq_t blit_queues[VIA_NUM_BLIT_ENGINES];
@@ -155191,7 +155169,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/driver
  } drm_via_private_t;
  
  enum via_family {
-@@ -119,6 +126,8 @@ extern int via_mem_free(struct drm_devic
+@@ -119,6 +126,8 @@
  extern int via_agp_init(struct drm_device *dev, void *data, struct drm_file *file_priv);
  extern int via_map_init(struct drm_device *dev, void *data, struct drm_file *file_priv);
  extern int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_priv);
@@ -155200,7 +155178,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/driver
  extern int via_wait_irq(struct drm_device *dev, void *data, struct drm_file *file_priv);
  extern int via_dma_blit_sync( struct drm_device *dev, void *data, struct drm_file *file_priv );
  extern int via_dma_blit( struct drm_device *dev, void *data, struct drm_file *file_priv );
-@@ -150,4 +159,7 @@ extern void via_lastclose(struct drm_dev
+@@ -150,4 +159,7 @@
  extern void via_dmablit_handler(struct drm_device *dev, int engine, int from_irq);
  extern void via_init_dmablit(struct drm_device *dev);
  
@@ -155208,9 +155186,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_drv.h linux-2.6.27.19-5.1/driver
 +extern int via_drm_suspend(struct pci_dev *dev, pm_message_t state);
 +
  #endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_map.c
---- linux-2.6.27/drivers/gpu/drm/via/via_map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_map.c  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via/via_map.c
+--- a/drivers/gpu/drm/via/via_map.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_map.c    Wed May 06 16:56:17 2009 +0100
 @@ -25,6 +25,7 @@
  #include "via_drm.h"
  #include "via_drv.h"
@@ -155219,7 +155197,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/driver
  static int via_do_init_map(struct drm_device * dev, drm_via_init_t * init)
  {
        drm_via_private_t *dev_priv = dev->dev_private;
-@@ -65,12 +66,35 @@ static int via_do_init_map(struct drm_de
+@@ -65,12 +66,35 @@
        via_init_dmablit(dev);
  
        dev->dev_private = (void *)dev_priv;
@@ -155255,7 +155233,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/driver
  
        return 0;
  }
-@@ -95,6 +119,11 @@ int via_driver_load(struct drm_device *d
+@@ -95,6 +119,11 @@
  {
        drm_via_private_t *dev_priv;
        int ret = 0;
@@ -155267,7 +155245,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/driver
  
        dev_priv = drm_calloc(1, sizeof(drm_via_private_t), DRM_MEM_DRIVER);
        if (dev_priv == NULL)
-@@ -121,3 +150,19 @@ int via_driver_unload(struct drm_device 
+@@ -121,3 +150,19 @@
  
        return 0;
  }
@@ -155287,9 +155265,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_map.c linux-2.6.27.19-5.1/driver
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_mm.c
---- linux-2.6.27/drivers/gpu/drm/via/via_mm.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via/via_mm.c   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via/via_mm.c
+--- a/drivers/gpu/drm/via/via_mm.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/gpu/drm/via/via_mm.c     Wed May 06 16:56:17 2009 +0100
 @@ -30,6 +30,7 @@
  #include "via_drv.h"
  #include "drm_sman.h"
@@ -155298,7 +155276,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
  #define VIA_MM_ALIGN_SHIFT 4
  #define VIA_MM_ALIGN_MASK ( (1 << VIA_MM_ALIGN_SHIFT) - 1)
  
-@@ -56,6 +57,8 @@ int via_agp_init(struct drm_device *dev,
+@@ -56,6 +57,8 @@
        DRM_DEBUG("offset = %u, size = %u\n", agp->offset, agp->size);
        return 0;
  }
@@ -155307,7 +155285,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
  
  int via_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
  {
-@@ -78,6 +81,8 @@ int via_fb_init(struct drm_device *dev, 
+@@ -78,6 +81,8 @@
  
        mutex_unlock(&dev->struct_mutex);
        DRM_DEBUG("offset = %u, size = %u\n", fb->offset, fb->size);
@@ -155316,7 +155294,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
  
        return 0;
  
-@@ -115,6 +120,84 @@ void via_lastclose(struct drm_device *de
+@@ -115,6 +120,84 @@
        mutex_unlock(&dev->struct_mutex);
  }
  
@@ -155401,7 +155379,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
  int via_mem_alloc(struct drm_device *dev, void *data,
                  struct drm_file *file_priv)
  {
-@@ -124,12 +207,13 @@ int via_mem_alloc(struct drm_device *dev
+@@ -124,12 +207,13 @@
        drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
        unsigned long tmpSize;
  
@@ -155417,7 +155395,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
                      dev_priv->agp_initialized)) {
                DRM_ERROR
                    ("Attempt to allocate from uninitialized memory manager.\n");
-@@ -138,15 +222,25 @@ int via_mem_alloc(struct drm_device *dev
+@@ -138,15 +222,25 @@
        }
  
        tmpSize = (mem->size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
@@ -155449,7 +155427,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
        } else {
                mem->offset = 0;
                mem->size = 0;
-@@ -166,6 +260,10 @@ int via_mem_free(struct drm_device *dev,
+@@ -166,6 +260,10 @@
  
        mutex_lock(&dev->struct_mutex);
        ret = drm_sman_free_key(&dev_priv->sman, mem->index);
@@ -155460,7 +155438,7 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
        mutex_unlock(&dev->struct_mutex);
        DRM_DEBUG("free = 0x%lx\n", mem->index);
  
-@@ -192,3 +290,26 @@ void via_reclaim_buffers_locked(struct d
+@@ -192,3 +290,26 @@
        mutex_unlock(&dev->struct_mutex);
        return;
  }
@@ -155487,9 +155465,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via/via_mm.c linux-2.6.27.19-5.1/drivers
 +              return -EINVAL;
 +}
 +EXPORT_SYMBOL(via_fb_free);
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/Makefile linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/Makefile   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/Makefile     Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,8 @@
 +#
 +# Makefile for the drm device driver.  This driver provides support for the
@@ -155500,9 +155478,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/Makefile linux-2.6.27.19-5.1
 +
 +obj-$(CONFIG_DRM_VIA_CHROME9) += via_chrome9.o
 \ No newline at end of file
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h       2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,407 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -155911,9 +155889,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_3d_reg.h linux-2
 +}
 +
 +#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_dma.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,1285 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -157200,9 +157178,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.c linux-2.6.
 +{
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_dma.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,69 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -157273,9 +157251,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_dma.h linux-2.6.
 +extern void via_chrome9_dma_init_inv(struct drm_device *dev);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,950 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -158227,9 +158205,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.c linux-2.6.
 +      return 1;
 +}
 +
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,443 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -158674,9 +158652,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drm.h linux-2.6.
 +
 +
 +#endif                                /* _VIA_CHROME9_DRM_H_ */
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drv.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,224 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -158902,9 +158880,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.c linux-2.6.
 +MODULE_AUTHOR(DRIVER_AUTHOR);
 +MODULE_DESCRIPTION(DRIVER_DESC);
 +MODULE_LICENSE("GPL and additional rights");
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_drv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h    Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,150 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -159056,9 +159034,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_drv.h linux-2.6.
 +#define VIA_CHROME9_WRITE8(reg, val)  DRM_WRITE8(VIA_CHROME9_BASE, reg, val)
 +
 +#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_mm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c     Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,435 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -159495,9 +159473,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.c linux-2.6.2
 +      return 0;
 +}
 +EXPORT_SYMBOL(via_fb_free);
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_mm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h     Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,67 @@
 +/*
 + * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
@@ -159566,9 +159544,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_mm.h linux-2.6.2
 +
 +#endif
 +
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c     2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c       Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,982 @@
 +/*
 +* Copyright 2004 The Unichrome Project. All Rights Reserved.
@@ -160552,9 +160530,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.c linux
 +}
 +
 +#endif
-diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h     2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h       Wed May 06 16:56:17 2009 +0100
 @@ -0,0 +1,61 @@
 +/*
 +* Copyright 2004 The Unichrome Project. All Rights Reserved.
@@ -160617,9 +160595,9 @@ diff -purN linux-2.6.27/drivers/gpu/drm/via_chrome9/via_chrome9_verifier.h linux
 +void via_chrome9_init_command_verifier(void);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/hid/hid-input.c linux-2.6.27.19-5.1/drivers/hid/hid-input.c
---- linux-2.6.27/drivers/hid/hid-input.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/hid-input.c        2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/hid-input.c
+--- a/drivers/hid/hid-input.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/hid-input.c  Wed May 06 16:56:17 2009 +0100
 @@ -32,7 +32,7 @@
  #include <linux/hid.h>
  #include <linux/hid-debug.h>
@@ -160629,10 +160607,10 @@ diff -purN linux-2.6.27/drivers/hid/hid-input.c linux-2.6.27.19-5.1/drivers/hid/
  module_param_named(pb_fnmode, hid_apple_fnmode, int, 0644);
  MODULE_PARM_DESC(pb_fnmode,
                "Mode of fn key on Apple keyboards (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)");
-diff -purN linux-2.6.27/drivers/hid/hidraw.c linux-2.6.27.19-5.1/drivers/hid/hidraw.c
---- linux-2.6.27/drivers/hid/hidraw.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/hidraw.c   2009-03-25 16:11:18.000000000 +0000
-@@ -113,7 +113,7 @@ static ssize_t hidraw_write(struct file 
+diff -r 9608d5473017 drivers/hid/hidraw.c
+--- a/drivers/hid/hidraw.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/hidraw.c     Wed May 06 16:56:17 2009 +0100
+@@ -113,7 +113,7 @@
        if (!dev->hid_output_raw_report)
                return -ENODEV;
  
@@ -160641,21 +160619,21 @@ diff -purN linux-2.6.27/drivers/hid/hidraw.c linux-2.6.27.19-5.1/drivers/hid/hid
                printk(KERN_WARNING "hidraw: pid %d passed too large report\n",
                                task_pid_nr(current));
                return -EINVAL;
-diff -purN linux-2.6.27/drivers/hid/usbhid/hid-core.c linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-core.c
---- linux-2.6.27/drivers/hid/usbhid/hid-core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-core.c  2009-03-25 16:11:18.000000000 +0000
-@@ -44,6 +44,10 @@
+diff -r 9608d5473017 drivers/hid/usbhid/hid-core.c
+--- a/drivers/hid/usbhid/hid-core.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/hid-core.c    Wed May 06 16:56:17 2009 +0100
+@@ -43,6 +43,10 @@
+ #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
  #define DRIVER_DESC "USB HID core driver"
  #define DRIVER_LICENSE "GPL"
++
 +#ifdef        CONFIG_KDB_USB
 +#include <linux/kdb.h>
 +#endif
-+
  static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick",
                                "Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
- /*
-@@ -940,6 +944,15 @@ static void hid_disconnect(struct usb_in
+@@ -940,6 +944,15 @@
  
        usbhid = hid->driver_data;
  
@@ -160671,10 +160649,11 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-core.c linux-2.6.27.19-5.1/driver
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        usb_set_intfdata(intf, NULL);
        set_bit(HID_DISCONNECTED, &usbhid->iofl);
-@@ -1037,6 +1050,21 @@ static int hid_probe(struct usb_interfac
+@@ -1036,6 +1049,21 @@
        printk(": USB HID v%x.%02x %s [%s] on %s\n",
                hid->version >> 8, hid->version & 0xff, c, hid->name, path);
++
 +#ifdef CONFIG_KDB_USB
 +      /* Attach USB keyboards to kdb */
 +      if (!strcmp(c, "Keyboard")) {
@@ -160689,13 +160668,12 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-core.c linux-2.6.27.19-5.1/driver
 +                             "with KDB\n", path);
 +      }
 +#endif /* CONFIG_KDB_USB */
-+
        return 0;
  }
-diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-quirks.c
---- linux-2.6.27/drivers/hid/usbhid/hid-quirks.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/hid-quirks.c        2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/usbhid/hid-quirks.c
+--- a/drivers/hid/usbhid/hid-quirks.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/hid-quirks.c  Wed May 06 16:56:17 2009 +0100
 @@ -83,6 +83,7 @@
  #define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS   0x0232
  #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY  0x030a
@@ -160731,7 +160709,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
  #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
  
  #define USB_VENDOR_ID_SOUNDGRAPH      0x15c2
-@@ -460,6 +462,7 @@ static const struct hid_blacklist {
+@@ -460,6 +462,7 @@
        { USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016, HID_QUIRK_FULLSPEED_INTERVAL },
  
        { USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
@@ -160739,7 +160717,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
        { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_HIDDEV | HID_QUIRK_IGNORE_HIDINPUT },
        { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV, HID_QUIRK_HIDINPUT },
-@@ -485,6 +488,8 @@ static const struct hid_blacklist {
+@@ -485,6 +488,8 @@
        { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20, HID_QUIRK_IGNORE },
@@ -160748,7 +160726,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
        { USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GENERAL_TOUCH, 0x0001, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GENERAL_TOUCH, 0x0002, HID_QUIRK_IGNORE },
-@@ -603,8 +608,6 @@ static const struct hid_blacklist {
+@@ -603,8 +608,6 @@
  
        { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
        { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
@@ -160757,16 +160735,16 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
  
        { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K, HID_QUIRK_MICROSOFT_KEYS },
        { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K, HID_QUIRK_MICROSOFT_KEYS },
-@@ -759,6 +762,8 @@ static const struct hid_rdesc_blacklist 
+@@ -758,6 +761,8 @@
+       { USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE, HID_QUIRK_RDESC_SAMSUNG_REMOTE },
  
        { USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP, HID_QUIRK_RDESC_SUNPLUS_WDESKTOP },
-+      { USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE, HID_QUIRK_RDESC_SONY_VAIO_VGX },
 +
++      { USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE, HID_QUIRK_RDESC_SONY_VAIO_VGX },
        { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
        { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2, HID_QUIRK_RDESC_SWAPPED_MIN_MAX },
-@@ -1131,25 +1136,27 @@ static void usbhid_fixup_button_consumer
+@@ -1131,25 +1136,27 @@
        }
  }
  
@@ -160806,7 +160784,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
        }
  }
  
-@@ -1181,6 +1188,9 @@ static void __usbhid_fixup_report_descri
+@@ -1181,6 +1188,9 @@
  
        if (quirks & HID_QUIRK_RDESC_SUNPLUS_WDESKTOP)
                usbhid_fixup_sunplus_wdesktop(rdesc, rsize);
@@ -160816,9 +160794,9 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.19-5.1/driv
  }
  
  /**
-diff -purN linux-2.6.27/drivers/hid/usbhid/usbkbd.c linux-2.6.27.19-5.1/drivers/hid/usbhid/usbkbd.c
---- linux-2.6.27/drivers/hid/usbhid/usbkbd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hid/usbhid/usbkbd.c    2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/hid/usbhid/usbkbd.c
+--- a/drivers/hid/usbhid/usbkbd.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hid/usbhid/usbkbd.c      Wed May 06 16:56:18 2009 +0100
 @@ -30,6 +30,9 @@
  #include <linux/init.h>
  #include <linux/usb/input.h>
@@ -160829,7 +160807,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/usbkbd.c linux-2.6.27.19-5.1/drivers/
  
  /*
   * Version Information
-@@ -289,6 +292,16 @@ static int usb_kbd_probe(struct usb_inte
+@@ -289,6 +292,16 @@
        usb_fill_int_urb(kbd->irq, dev, pipe,
                         kbd->new, (maxp > 8 ? 8 : maxp),
                         usb_kbd_irq, kbd, endpoint->bInterval);
@@ -160846,7 +160824,7 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/usbkbd.c linux-2.6.27.19-5.1/drivers/
        kbd->irq->transfer_dma = kbd->new_dma;
        kbd->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
  
-@@ -326,6 +339,10 @@ static void usb_kbd_disconnect(struct us
+@@ -326,6 +339,10 @@
  
        usb_set_intfdata(intf, NULL);
        if (kbd) {
@@ -160857,10 +160835,10 @@ diff -purN linux-2.6.27/drivers/hid/usbhid/usbkbd.c linux-2.6.27.19-5.1/drivers/
                usb_kill_urb(kbd->irq);
                input_unregister_device(kbd->dev);
                usb_kbd_free_mem(interface_to_usbdev(intf), kbd);
-diff -purN linux-2.6.27/drivers/hwmon/abituguru3.c linux-2.6.27.19-5.1/drivers/hwmon/abituguru3.c
---- linux-2.6.27/drivers/hwmon/abituguru3.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/abituguru3.c     2009-03-25 16:11:30.000000000 +0000
-@@ -1153,7 +1153,7 @@ static int __init abituguru3_dmi_detect(
+diff -r 9608d5473017 drivers/hwmon/abituguru3.c
+--- a/drivers/hwmon/abituguru3.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/abituguru3.c       Wed May 06 16:56:18 2009 +0100
+@@ -1153,7 +1153,7 @@
  
  static inline int abituguru3_dmi_detect(void)
  {
@@ -160869,9 +160847,9 @@ diff -purN linux-2.6.27/drivers/hwmon/abituguru3.c linux-2.6.27.19-5.1/drivers/h
  }
  
  #endif /* CONFIG_DMI */
-diff -purN linux-2.6.27/drivers/hwmon/dme1737.c linux-2.6.27.19-5.1/drivers/hwmon/dme1737.c
---- linux-2.6.27/drivers/hwmon/dme1737.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/dme1737.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/dme1737.c
+--- a/drivers/hwmon/dme1737.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/dme1737.c  Wed May 06 16:56:18 2009 +0100
 @@ -34,6 +34,7 @@
  #include <linux/hwmon-vid.h>
  #include <linux/err.h>
@@ -160880,7 +160858,7 @@ diff -purN linux-2.6.27/drivers/hwmon/dme1737.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  /* ISA device, if found */
-@@ -2372,6 +2373,10 @@ static int __init dme1737_isa_device_add
+@@ -2372,6 +2373,10 @@
        };
        int err;
  
@@ -160891,9 +160869,9 @@ diff -purN linux-2.6.27/drivers/hwmon/dme1737.c linux-2.6.27.19-5.1/drivers/hwmo
        if (!(pdev = platform_device_alloc("dme1737", addr))) {
                printk(KERN_ERR "dme1737: Failed to allocate device.\n");
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/f71805f.c linux-2.6.27.19-5.1/drivers/hwmon/f71805f.c
---- linux-2.6.27/drivers/hwmon/f71805f.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/f71805f.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/f71805f.c
+--- a/drivers/hwmon/f71805f.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/f71805f.c  Wed May 06 16:56:18 2009 +0100
 @@ -39,6 +39,7 @@
  #include <linux/mutex.h>
  #include <linux/sysfs.h>
@@ -160902,7 +160880,7 @@ diff -purN linux-2.6.27/drivers/hwmon/f71805f.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  static unsigned short force_id;
-@@ -1455,6 +1456,10 @@ static int __init f71805f_device_add(uns
+@@ -1455,6 +1456,10 @@
        }
  
        res.name = pdev->name;
@@ -160913,9 +160891,9 @@ diff -purN linux-2.6.27/drivers/hwmon/f71805f.c linux-2.6.27.19-5.1/drivers/hwmo
        err = platform_device_add_resources(pdev, &res, 1);
        if (err) {
                printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/f71882fg.c linux-2.6.27.19-5.1/drivers/hwmon/f71882fg.c
---- linux-2.6.27/drivers/hwmon/f71882fg.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/f71882fg.c       2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/f71882fg.c
+--- a/drivers/hwmon/f71882fg.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/f71882fg.c Wed May 06 16:56:18 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/hwmon-sysfs.h>
  #include <linux/err.h>
@@ -160924,7 +160902,7 @@ diff -purN linux-2.6.27/drivers/hwmon/f71882fg.c linux-2.6.27.19-5.1/drivers/hwm
  #include <asm/io.h>
  
  #define DRVNAME "f71882fg"
-@@ -892,6 +893,10 @@ static int __init f71882fg_device_add(un
+@@ -892,6 +893,10 @@
                return -ENOMEM;
  
        res.name = f71882fg_pdev->name;
@@ -160935,10 +160913,10 @@ diff -purN linux-2.6.27/drivers/hwmon/f71882fg.c linux-2.6.27.19-5.1/drivers/hwm
        err = platform_device_add_resources(f71882fg_pdev, &res, 1);
        if (err) {
                printk(KERN_ERR DRVNAME ": Device resource addition failed\n");
-diff -purN linux-2.6.27/drivers/hwmon/hwmon-vid.c linux-2.6.27.19-5.1/drivers/hwmon/hwmon-vid.c
---- linux-2.6.27/drivers/hwmon/hwmon-vid.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/hwmon-vid.c      2009-03-25 16:11:30.000000000 +0000
-@@ -180,6 +180,7 @@ static struct vrm_model vrm_models[] = {
+diff -r 9608d5473017 drivers/hwmon/hwmon-vid.c
+--- a/drivers/hwmon/hwmon-vid.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/hwmon-vid.c        Wed May 06 16:56:18 2009 +0100
+@@ -180,6 +180,7 @@
        {X86_VENDOR_AMD, 0x6, ANY, ANY, 90},            /* Athlon Duron etc */
        {X86_VENDOR_AMD, 0xF, 0x3F, ANY, 24},           /* Athlon 64, Opteron */
        {X86_VENDOR_AMD, 0xF, ANY, ANY, 25},            /* NPT family 0Fh */
@@ -160946,9 +160924,9 @@ diff -purN linux-2.6.27/drivers/hwmon/hwmon-vid.c linux-2.6.27.19-5.1/drivers/hw
        {X86_VENDOR_INTEL, 0x6, 0x9, ANY, 13},          /* Pentium M (130 nm) */
        {X86_VENDOR_INTEL, 0x6, 0xB, ANY, 85},          /* Tualatin */
        {X86_VENDOR_INTEL, 0x6, 0xD, ANY, 13},          /* Pentium M (90 nm) */
-diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon/ibmaem.c
---- linux-2.6.27/drivers/hwmon/ibmaem.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/ibmaem.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/ibmaem.c
+--- a/drivers/hwmon/ibmaem.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/ibmaem.c   Wed May 06 16:56:18 2009 +0100
 @@ -88,9 +88,11 @@
  static DEFINE_IDR(aem_idr);
  static DEFINE_SPINLOCK(aem_idr_lock);
@@ -160964,7 +160942,7 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
  };
  
  struct aem_ipmi_data {
-@@ -583,7 +585,7 @@ static int aem_init_aem1_inst(struct aem
+@@ -583,7 +585,7 @@
        data->pdev = platform_device_alloc(DRVNAME, data->id);
        if (!data->pdev)
                goto dev_err;
@@ -160973,7 +160951,7 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
  
        res = platform_device_add(data->pdev);
        if (res)
-@@ -716,7 +718,7 @@ static int aem_init_aem2_inst(struct aem
+@@ -716,7 +718,7 @@
        data->pdev = platform_device_alloc(DRVNAME, data->id);
        if (!data->pdev)
                goto dev_err;
@@ -160982,7 +160960,7 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
  
        res = platform_device_add(data->pdev);
        if (res)
-@@ -1085,7 +1087,7 @@ static int __init aem_init(void)
+@@ -1085,7 +1087,7 @@
  {
        int res;
  
@@ -160991,7 +160969,7 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
        if (res) {
                printk(KERN_ERR "Can't register aem driver\n");
                return res;
-@@ -1097,7 +1099,7 @@ static int __init aem_init(void)
+@@ -1097,7 +1099,7 @@
        return 0;
  
  ipmi_reg_err:
@@ -161000,7 +160978,7 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
        return res;
  
  }
-@@ -1107,7 +1109,7 @@ static void __exit aem_exit(void)
+@@ -1107,7 +1109,7 @@
        struct aem_data *p1, *next1;
  
        ipmi_smi_watcher_unregister(&driver_data.bmc_events);
@@ -161009,9 +160987,9 @@ diff -purN linux-2.6.27/drivers/hwmon/ibmaem.c linux-2.6.27.19-5.1/drivers/hwmon
        list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
                aem_delete(p1);
  }
-diff -purN linux-2.6.27/drivers/hwmon/it87.c linux-2.6.27.19-5.1/drivers/hwmon/it87.c
---- linux-2.6.27/drivers/hwmon/it87.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/it87.c   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/it87.c
+--- a/drivers/hwmon/it87.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/it87.c     Wed May 06 16:56:18 2009 +0100
 @@ -48,6 +48,7 @@
  #include <linux/sysfs.h>
  #include <linux/string.h>
@@ -161020,7 +160998,7 @@ diff -purN linux-2.6.27/drivers/hwmon/it87.c linux-2.6.27.19-5.1/drivers/hwmon/i
  #include <asm/io.h>
  
  #define DRVNAME "it87"
-@@ -1535,6 +1536,10 @@ static int __init it87_device_add(unsign
+@@ -1535,6 +1536,10 @@
        };
        int err;
  
@@ -161031,9 +161009,9 @@ diff -purN linux-2.6.27/drivers/hwmon/it87.c linux-2.6.27.19-5.1/drivers/hwmon/i
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/pc87360.c linux-2.6.27.19-5.1/drivers/hwmon/pc87360.c
---- linux-2.6.27/drivers/hwmon/pc87360.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/pc87360.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/pc87360.c
+--- a/drivers/hwmon/pc87360.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/pc87360.c  Wed May 06 16:56:18 2009 +0100
 @@ -43,6 +43,7 @@
  #include <linux/hwmon-vid.h>
  #include <linux/err.h>
@@ -161042,7 +161020,7 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87360.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  static u8 devid;
-@@ -1425,6 +1426,11 @@ static int __init pc87360_device_add(uns
+@@ -1425,6 +1426,11 @@
                        continue;
                res.start = extra_isa[i];
                res.end = extra_isa[i] + PC87360_EXTENT - 1;
@@ -161054,9 +161032,9 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87360.c linux-2.6.27.19-5.1/drivers/hwmo
                err = platform_device_add_resources(pdev, &res, 1);
                if (err) {
                        printk(KERN_ERR "pc87360: Device resource[%d] "
-diff -purN linux-2.6.27/drivers/hwmon/pc87427.c linux-2.6.27.19-5.1/drivers/hwmon/pc87427.c
---- linux-2.6.27/drivers/hwmon/pc87427.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/pc87427.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/pc87427.c
+--- a/drivers/hwmon/pc87427.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/pc87427.c  Wed May 06 16:56:18 2009 +0100
 @@ -32,6 +32,7 @@
  #include <linux/mutex.h>
  #include <linux/sysfs.h>
@@ -161065,7 +161043,7 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87427.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  static unsigned short force_id;
-@@ -524,6 +525,10 @@ static int __init pc87427_device_add(uns
+@@ -524,6 +525,10 @@
        };
        int err;
  
@@ -161076,9 +161054,9 @@ diff -purN linux-2.6.27/drivers/hwmon/pc87427.c linux-2.6.27.19-5.1/drivers/hwmo
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/sis5595.c linux-2.6.27.19-5.1/drivers/hwmon/sis5595.c
---- linux-2.6.27/drivers/hwmon/sis5595.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/sis5595.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/sis5595.c
+--- a/drivers/hwmon/sis5595.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/sis5595.c  Wed May 06 16:56:18 2009 +0100
 @@ -62,6 +62,7 @@
  #include <linux/jiffies.h>
  #include <linux/mutex.h>
@@ -161087,7 +161065,7 @@ diff -purN linux-2.6.27/drivers/hwmon/sis5595.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  
-@@ -727,6 +728,10 @@ static int __devinit sis5595_device_add(
+@@ -727,6 +728,10 @@
        };
        int err;
  
@@ -161098,9 +161076,9 @@ diff -purN linux-2.6.27/drivers/hwmon/sis5595.c linux-2.6.27.19-5.1/drivers/hwmo
        pdev = platform_device_alloc("sis5595", address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/smsc47b397.c linux-2.6.27.19-5.1/drivers/hwmon/smsc47b397.c
---- linux-2.6.27/drivers/hwmon/smsc47b397.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/smsc47b397.c     2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/smsc47b397.c
+--- a/drivers/hwmon/smsc47b397.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/smsc47b397.c       Wed May 06 16:56:18 2009 +0100
 @@ -36,6 +36,7 @@
  #include <linux/err.h>
  #include <linux/init.h>
@@ -161109,7 +161087,7 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47b397.c linux-2.6.27.19-5.1/drivers/h
  #include <asm/io.h>
  
  static unsigned short force_id;
-@@ -303,6 +304,10 @@ static int __init smsc47b397_device_add(
+@@ -303,6 +304,10 @@
        };
        int err;
  
@@ -161120,9 +161098,9 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47b397.c linux-2.6.27.19-5.1/drivers/h
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/smsc47m1.c linux-2.6.27.19-5.1/drivers/hwmon/smsc47m1.c
---- linux-2.6.27/drivers/hwmon/smsc47m1.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/smsc47m1.c       2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/smsc47m1.c
+--- a/drivers/hwmon/smsc47m1.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/smsc47m1.c Wed May 06 16:56:18 2009 +0100
 @@ -37,6 +37,7 @@
  #include <linux/init.h>
  #include <linux/mutex.h>
@@ -161131,7 +161109,7 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47m1.c linux-2.6.27.19-5.1/drivers/hwm
  #include <asm/io.h>
  
  static unsigned short force_id;
-@@ -705,6 +706,10 @@ static int __init smsc47m1_device_add(un
+@@ -705,6 +706,10 @@
        };
        int err;
  
@@ -161142,9 +161120,9 @@ diff -purN linux-2.6.27/drivers/hwmon/smsc47m1.c linux-2.6.27.19-5.1/drivers/hwm
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/via686a.c linux-2.6.27.19-5.1/drivers/hwmon/via686a.c
---- linux-2.6.27/drivers/hwmon/via686a.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/via686a.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/via686a.c
+--- a/drivers/hwmon/via686a.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/via686a.c  Wed May 06 16:56:18 2009 +0100
 @@ -41,6 +41,7 @@
  #include <linux/init.h>
  #include <linux/mutex.h>
@@ -161153,7 +161131,7 @@ diff -purN linux-2.6.27/drivers/hwmon/via686a.c linux-2.6.27.19-5.1/drivers/hwmo
  #include <asm/io.h>
  
  
-@@ -783,6 +784,10 @@ static int __devinit via686a_device_add(
+@@ -783,6 +784,10 @@
        };
        int err;
  
@@ -161164,9 +161142,9 @@ diff -purN linux-2.6.27/drivers/hwmon/via686a.c linux-2.6.27.19-5.1/drivers/hwmo
        pdev = platform_device_alloc("via686a", address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/vt1211.c linux-2.6.27.19-5.1/drivers/hwmon/vt1211.c
---- linux-2.6.27/drivers/hwmon/vt1211.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/vt1211.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/vt1211.c
+--- a/drivers/hwmon/vt1211.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/vt1211.c   Wed May 06 16:56:18 2009 +0100
 @@ -32,6 +32,7 @@
  #include <linux/err.h>
  #include <linux/mutex.h>
@@ -161175,7 +161153,7 @@ diff -purN linux-2.6.27/drivers/hwmon/vt1211.c linux-2.6.27.19-5.1/drivers/hwmon
  #include <asm/io.h>
  
  static int uch_config = -1;
-@@ -1259,6 +1260,10 @@ static int __init vt1211_device_add(unsi
+@@ -1259,6 +1260,10 @@
        }
  
        res.name = pdev->name;
@@ -161186,9 +161164,9 @@ diff -purN linux-2.6.27/drivers/hwmon/vt1211.c linux-2.6.27.19-5.1/drivers/hwmon
        err = platform_device_add_resources(pdev, &res, 1);
        if (err) {
                printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/vt8231.c linux-2.6.27.19-5.1/drivers/hwmon/vt8231.c
---- linux-2.6.27/drivers/hwmon/vt8231.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/vt8231.c 2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/vt8231.c
+--- a/drivers/hwmon/vt8231.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/vt8231.c   Wed May 06 16:56:18 2009 +0100
 @@ -35,6 +35,7 @@
  #include <linux/hwmon-vid.h>
  #include <linux/err.h>
@@ -161197,7 +161175,7 @@ diff -purN linux-2.6.27/drivers/hwmon/vt8231.c linux-2.6.27.19-5.1/drivers/hwmon
  #include <asm/io.h>
  
  static int force_addr;
-@@ -894,6 +895,10 @@ static int __devinit vt8231_device_add(u
+@@ -894,6 +895,10 @@
        };
        int err;
  
@@ -161208,9 +161186,9 @@ diff -purN linux-2.6.27/drivers/hwmon/vt8231.c linux-2.6.27.19-5.1/drivers/hwmon
        pdev = platform_device_alloc("vt8231", address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/hwmon/w83627ehf.c linux-2.6.27.19-5.1/drivers/hwmon/w83627ehf.c
---- linux-2.6.27/drivers/hwmon/w83627ehf.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/w83627ehf.c      2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/w83627ehf.c
+--- a/drivers/hwmon/w83627ehf.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/w83627ehf.c        Wed May 06 16:56:18 2009 +0100
 @@ -48,6 +48,7 @@
  #include <linux/hwmon-vid.h>
  #include <linux/err.h>
@@ -161219,7 +161197,7 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627ehf.c linux-2.6.27.19-5.1/drivers/hw
  #include <asm/io.h>
  #include "lm75.h"
  
-@@ -1544,6 +1545,11 @@ static int __init sensors_w83627ehf_init
+@@ -1544,6 +1545,11 @@
        res.start = address + IOREGION_OFFSET;
        res.end = address + IOREGION_OFFSET + IOREGION_LENGTH - 1;
        res.flags = IORESOURCE_IO;
@@ -161231,9 +161209,9 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627ehf.c linux-2.6.27.19-5.1/drivers/hw
        err = platform_device_add_resources(pdev, &res, 1);
        if (err) {
                printk(KERN_ERR DRVNAME ": Device resource addition failed "
-diff -purN linux-2.6.27/drivers/hwmon/w83627hf.c linux-2.6.27.19-5.1/drivers/hwmon/w83627hf.c
---- linux-2.6.27/drivers/hwmon/w83627hf.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/hwmon/w83627hf.c       2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/hwmon/w83627hf.c
+--- a/drivers/hwmon/w83627hf.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/hwmon/w83627hf.c Wed May 06 16:56:18 2009 +0100
 @@ -50,6 +50,7 @@
  #include <linux/err.h>
  #include <linux/mutex.h>
@@ -161242,7 +161220,7 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627hf.c linux-2.6.27.19-5.1/drivers/hwm
  #include <asm/io.h>
  #include "lm75.h"
  
-@@ -1793,6 +1794,10 @@ static int __init w83627hf_device_add(un
+@@ -1793,6 +1794,10 @@
        };
        int err;
  
@@ -161253,10 +161231,10 @@ diff -purN linux-2.6.27/drivers/hwmon/w83627hf.c linux-2.6.27.19-5.1/drivers/hwm
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev) {
                err = -ENOMEM;
-diff -purN linux-2.6.27/drivers/i2c/busses/Kconfig linux-2.6.27.19-5.1/drivers/i2c/busses/Kconfig
---- linux-2.6.27/drivers/i2c/busses/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/Kconfig     2009-03-25 16:11:18.000000000 +0000
-@@ -97,6 +97,7 @@ config I2C_I801
+diff -r 9608d5473017 drivers/i2c/busses/Kconfig
+--- a/drivers/i2c/busses/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/Kconfig       Wed May 06 16:56:18 2009 +0100
+@@ -97,6 +97,7 @@
            ICH9
            Tolapai
            ICH10
@@ -161264,9 +161242,9 @@ diff -purN linux-2.6.27/drivers/i2c/busses/Kconfig linux-2.6.27.19-5.1/drivers/i
  
          This driver can also be built as a module.  If so, the module
          will be called i2c-i801.
-diff -purN linux-2.6.27/drivers/i2c/busses/i2c-i801.c linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-i801.c
---- linux-2.6.27/drivers/i2c/busses/i2c-i801.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-i801.c  2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/i2c/busses/i2c-i801.c
+--- a/drivers/i2c/busses/i2c-i801.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/i2c-i801.c    Wed May 06 16:56:18 2009 +0100
 @@ -41,6 +41,7 @@
    Tolapai               0x5032     32     hard     yes     yes     yes
    ICH10                 0x3a30     32     hard     yes     yes     yes
@@ -161275,7 +161253,7 @@ diff -purN linux-2.6.27/drivers/i2c/busses/i2c-i801.c linux-2.6.27.19-5.1/driver
  
    Features supported by this driver:
    Software PEC                     no
-@@ -576,6 +577,7 @@ static struct pci_device_id i801_ids[] =
+@@ -576,6 +577,7 @@
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TOLAPAI_1) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_4) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_5) },
@@ -161283,7 +161261,7 @@ diff -purN linux-2.6.27/drivers/i2c/busses/i2c-i801.c linux-2.6.27.19-5.1/driver
        { 0, }
  };
  
-@@ -599,6 +601,7 @@ static int __devinit i801_probe(struct p
+@@ -599,6 +601,7 @@
        case PCI_DEVICE_ID_INTEL_TOLAPAI_1:
        case PCI_DEVICE_ID_INTEL_ICH10_4:
        case PCI_DEVICE_ID_INTEL_ICH10_5:
@@ -161291,10 +161269,10 @@ diff -purN linux-2.6.27/drivers/i2c/busses/i2c-i801.c linux-2.6.27.19-5.1/driver
                i801_features |= FEATURE_I2C_BLOCK_READ;
                /* fall through */
        case PCI_DEVICE_ID_INTEL_82801DB_3:
-diff -purN linux-2.6.27/drivers/i2c/busses/i2c-ibm_iic.c linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-ibm_iic.c
---- linux-2.6.27/drivers/i2c/busses/i2c-ibm_iic.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/i2c-ibm_iic.c       2009-03-25 16:11:18.000000000 +0000
-@@ -807,6 +807,7 @@ static const struct of_device_id ibm_iic
+diff -r 9608d5473017 drivers/i2c/busses/i2c-ibm_iic.c
+--- a/drivers/i2c/busses/i2c-ibm_iic.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/i2c-ibm_iic.c Wed May 06 16:56:18 2009 +0100
+@@ -807,6 +807,7 @@
  };
  
  static struct of_platform_driver ibm_iic_driver = {
@@ -161302,10 +161280,10 @@ diff -purN linux-2.6.27/drivers/i2c/busses/i2c-ibm_iic.c linux-2.6.27.19-5.1/dri
        .name   = "ibm-iic",
        .match_table = ibm_iic_match,
        .probe  = iic_probe,
-diff -purN linux-2.6.27/drivers/i2c/busses/scx200_i2c.c linux-2.6.27.19-5.1/drivers/i2c/busses/scx200_i2c.c
---- linux-2.6.27/drivers/i2c/busses/scx200_i2c.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/busses/scx200_i2c.c        2009-03-25 16:11:18.000000000 +0000
-@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i
+diff -r 9608d5473017 drivers/i2c/busses/scx200_i2c.c
+--- a/drivers/i2c/busses/scx200_i2c.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/busses/scx200_i2c.c  Wed May 06 16:56:18 2009 +0100
+@@ -81,6 +81,7 @@
  
  static struct i2c_adapter scx200_i2c_ops = {
        .owner             = THIS_MODULE,
@@ -161313,9 +161291,9 @@ diff -purN linux-2.6.27/drivers/i2c/busses/scx200_i2c.c linux-2.6.27.19-5.1/driv
        .id                = I2C_HW_B_SCX200,
        .algo_data         = &scx200_i2c_data,
        .name   = "NatSemi SCx200 I2C",
-diff -purN linux-2.6.27/drivers/i2c/chips/ds1682.c linux-2.6.27.19-5.1/drivers/i2c/chips/ds1682.c
---- linux-2.6.27/drivers/i2c/chips/ds1682.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/i2c/chips/ds1682.c     2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/i2c/chips/ds1682.c
+--- a/drivers/i2c/chips/ds1682.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/i2c/chips/ds1682.c       Wed May 06 16:56:18 2009 +0100
 @@ -56,7 +56,7 @@
  /*
   * Generic counter attributes
@@ -161325,7 +161303,7 @@ diff -purN linux-2.6.27/drivers/i2c/chips/ds1682.c linux-2.6.27.19-5.1/drivers/i
                           char *buf)
  {
        struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
-@@ -82,7 +82,7 @@ static ssize_t ds1682_show(struct device
+@@ -82,7 +82,7 @@
        return sprintf(buf, "%li\n", (long)le32_to_cpu(val));
  }
  
@@ -161334,10 +161312,10 @@ diff -purN linux-2.6.27/drivers/i2c/chips/ds1682.c linux-2.6.27.19-5.1/drivers/i
                            const char *buf, size_t count)
  {
        struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
-diff -purN linux-2.6.27/drivers/ide/ide-lib.c linux-2.6.27.19-5.1/drivers/ide/ide-lib.c
---- linux-2.6.27/drivers/ide/ide-lib.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ide/ide-lib.c  2009-03-25 16:11:23.000000000 +0000
-@@ -177,6 +177,7 @@ void ide_toggle_bounce(ide_drive_t *driv
+diff -r 9608d5473017 drivers/ide/ide-lib.c
+--- a/drivers/ide/ide-lib.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ide/ide-lib.c    Wed May 06 16:56:18 2009 +0100
+@@ -177,6 +177,7 @@
  {
        u64 addr = BLK_BOUNCE_HIGH;     /* dma64_addr_t */
  
@@ -161345,7 +161323,7 @@ diff -purN linux-2.6.27/drivers/ide/ide-lib.c linux-2.6.27.19-5.1/drivers/ide/id
        if (!PCI_DMA_BUS_IS_PHYS) {
                addr = BLK_BOUNCE_ANY;
        } else if (on && drive->media == ide_disk) {
-@@ -185,6 +186,16 @@ void ide_toggle_bounce(ide_drive_t *driv
+@@ -185,6 +186,16 @@
                if (dev && dev->dma_mask)
                        addr = *dev->dma_mask;
        }
@@ -161362,9 +161340,9 @@ diff -purN linux-2.6.27/drivers/ide/ide-lib.c linux-2.6.27.19-5.1/drivers/ide/id
  
        if (drive->queue)
                blk_queue_bounce_limit(drive->queue, addr);
-diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide/pci/it821x.c
---- linux-2.6.27/drivers/ide/pci/it821x.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ide/pci/it821x.c       2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/ide/pci/it821x.c
+--- a/drivers/ide/pci/it821x.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ide/pci/it821x.c Wed May 06 16:56:18 2009 +0100
 @@ -69,6 +69,8 @@
  
  #define DRV_NAME "it821x"
@@ -161374,7 +161352,7 @@ diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide
  struct it821x_dev
  {
        unsigned int smart:1,           /* Are we in smart raid mode */
-@@ -80,6 +82,7 @@ struct it821x_dev
+@@ -80,6 +82,7 @@
        u16     pio[2];                 /* Cached PIO values */
        u16     mwdma[2];               /* Cached MWDMA values */
        u16     udma[2];                /* Cached UDMA values (per drive) */
@@ -161382,7 +161360,7 @@ diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide
  };
  
  #define ATA_66                0
-@@ -586,6 +589,12 @@ static void __devinit init_hwif_it821x(i
+@@ -586,6 +589,12 @@
  
        hwif->ultra_mask = ATA_UDMA6;
        hwif->mwdma_mask = ATA_MWDMA2;
@@ -161395,7 +161373,7 @@ diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide
  }
  
  static void __devinit it8212_disable_raid(struct pci_dev *dev)
-@@ -658,6 +667,8 @@ static int __devinit it821x_init_one(str
+@@ -658,6 +667,8 @@
                return -ENOMEM;
        }
  
@@ -161404,7 +161382,7 @@ diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide
        rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
        if (rc)
                kfree(itdevs);
-@@ -677,6 +688,7 @@ static void __devexit it821x_remove(stru
+@@ -677,6 +688,7 @@
  static const struct pci_device_id it821x_pci_tbl[] = {
        { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
        { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
@@ -161412,10 +161390,10 @@ diff -purN linux-2.6.27/drivers/ide/pci/it821x.c linux-2.6.27.19-5.1/drivers/ide
        { 0, },
  };
  
-diff -purN linux-2.6.27/drivers/ieee1394/nodemgr.c linux-2.6.27.19-5.1/drivers/ieee1394/nodemgr.c
---- linux-2.6.27/drivers/ieee1394/nodemgr.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/nodemgr.c     2009-03-25 16:11:19.000000000 +0000
-@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr12
+diff -r 9608d5473017 drivers/ieee1394/nodemgr.c
+--- a/drivers/ieee1394/nodemgr.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/nodemgr.c       Wed May 06 16:56:18 2009 +0100
+@@ -115,8 +115,14 @@
        return error;
  }
  
@@ -161430,9 +161408,9 @@ diff -purN linux-2.6.27/drivers/ieee1394/nodemgr.c linux-2.6.27.19-5.1/drivers/i
        return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
  }
  
-diff -purN linux-2.6.27/drivers/ieee1394/ohci1394.h linux-2.6.27.19-5.1/drivers/ieee1394/ohci1394.h
---- linux-2.6.27/drivers/ieee1394/ohci1394.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/ohci1394.h    2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/ieee1394/ohci1394.h
+--- a/drivers/ieee1394/ohci1394.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/ohci1394.h      Wed May 06 16:56:18 2009 +0100
 @@ -26,7 +26,7 @@
  
  #define OHCI1394_DRIVER_NAME      "ohci1394"
@@ -161442,10 +161420,10 @@ diff -purN linux-2.6.27/drivers/ieee1394/ohci1394.h linux-2.6.27.19-5.1/drivers/
  #define OHCI1394_MAX_AT_RESP_RETRIES  0x2
  #define OHCI1394_MAX_PHYS_RESP_RETRIES        0x8
  #define OHCI1394_MAX_SELF_ID_ERRORS   16
-diff -purN linux-2.6.27/drivers/ieee1394/sbp2.c linux-2.6.27.19-5.1/drivers/ieee1394/sbp2.c
---- linux-2.6.27/drivers/ieee1394/sbp2.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ieee1394/sbp2.c        2009-03-25 16:11:19.000000000 +0000
-@@ -225,7 +225,7 @@ MODULE_PARM_DESC(workarounds, "Work arou
+diff -r 9608d5473017 drivers/ieee1394/sbp2.c
+--- a/drivers/ieee1394/sbp2.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ieee1394/sbp2.c  Wed May 06 16:56:19 2009 +0100
+@@ -225,7 +225,7 @@
   * independent of the implementation of the ieee1394 nodemgr, the longer format
   * is recommended for future use.
   */
@@ -161454,7 +161432,7 @@ diff -purN linux-2.6.27/drivers/ieee1394/sbp2.c linux-2.6.27.19-5.1/drivers/ieee
  module_param_named(long_ieee1394_id, sbp2_long_sysfs_ieee1394_id, bool, 0644);
  MODULE_PARM_DESC(long_ieee1394_id, "8+3+2 bytes format of ieee1394_id in sysfs "
                 "(default = backwards-compatible = N, SAM-conforming = Y)");
-@@ -395,6 +395,16 @@ static const struct {
+@@ -395,9 +395,24 @@
                .model_id               = SBP2_ROM_VALUE_WILDCARD,
                .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
        },
@@ -161471,22 +161449,18 @@ diff -purN linux-2.6.27/drivers/ieee1394/sbp2.c linux-2.6.27.19-5.1/drivers/ieee
        /* iPod 4th generation */ {
                .firmware_revision      = 0x0a2700,
                .model_id               = 0x000021,
-@@ -402,6 +412,11 @@ static const struct {
-       },
-       /* iPod mini */ {
-               .firmware_revision      = 0x0a2700,
-+              .model_id               = 0x000022,
 +              .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
 +      },
 +      /* iPod mini */ {
 +              .firmware_revision      = 0x0a2700,
-               .model_id               = 0x000023,
++              .model_id               = 0x000022,
                .workarounds            = SBP2_WORKAROUND_FIX_CAPACITY,
        },
-diff -purN linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c linux-2.6.27.19-5.1/drivers/infiniband/hw/cxgb3/iwch_provider.c
---- linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/cxgb3/iwch_provider.c    2009-03-25 16:11:19.000000000 +0000
-@@ -1102,9 +1102,7 @@ static u64 fw_vers_string_to_u64(struct 
+       /* iPod mini */ {
+diff -r 9608d5473017 drivers/infiniband/hw/cxgb3/iwch_provider.c
+--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c      Wed May 06 16:56:19 2009 +0100
+@@ -1102,9 +1102,7 @@
        char *cp, *next;
        unsigned fw_maj, fw_min, fw_mic;
  
@@ -161496,7 +161470,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c linux-2.6.27
  
        next = info.fw_version + 1;
        cp = strsep(&next, ".");
-@@ -1195,9 +1193,7 @@ static ssize_t show_fw_ver(struct device
+@@ -1195,9 +1193,7 @@
        struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
  
        PDBG("%s dev 0x%p\n", __func__, dev);
@@ -161506,7 +161480,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c linux-2.6.27
        return sprintf(buf, "%s\n", info.fw_version);
  }
  
-@@ -1210,9 +1206,7 @@ static ssize_t show_hca(struct device *d
+@@ -1210,9 +1206,7 @@
        struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
  
        PDBG("%s dev 0x%p\n", __func__, dev);
@@ -161516,10 +161490,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/cxgb3/iwch_provider.c linux-2.6.27
        return sprintf(buf, "%s\n", info.driver);
  }
  
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_classes.h      2009-03-25 16:11:20.000000000 +0000
-@@ -128,6 +128,8 @@ struct ehca_shca {
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_classes.h
+--- a/drivers/infiniband/hw/ehca/ehca_classes.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_classes.h        Wed May 06 16:56:19 2009 +0100
+@@ -128,6 +128,8 @@
        /* MR pgsize: bit 0-3 means 4K, 64K, 1M, 16M respectively */
        u32 hca_cap_mr_pgsize;
        int max_mtu;
@@ -161528,7 +161502,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.1
        atomic_t num_cqs;
        atomic_t num_qps;
  };
-@@ -164,6 +166,13 @@ struct ehca_qmap_entry {
+@@ -164,6 +166,13 @@
        u16 reported;
  };
  
@@ -161542,7 +161516,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.1
  struct ehca_qp {
        union {
                struct ib_qp ib_qp;
-@@ -173,8 +182,9 @@ struct ehca_qp {
+@@ -173,8 +182,9 @@
        enum ehca_ext_qp_type ext_type;
        enum ib_qp_state state;
        struct ipz_queue ipz_squeue;
@@ -161553,7 +161527,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.1
        struct h_galpas galpas;
        u32 qkey;
        u32 real_qp_num;
-@@ -204,6 +214,8 @@ struct ehca_qp {
+@@ -204,6 +214,8 @@
        atomic_t nr_events; /* events seen */
        wait_queue_head_t wait_completion;
        int mig_armed;
@@ -161562,7 +161536,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.1
  };
  
  #define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ)
-@@ -233,6 +245,8 @@ struct ehca_cq {
+@@ -233,6 +245,8 @@
        /* mmap counter for resources mapped into user space */
        u32 mm_count_queue;
        u32 mm_count_galpa;
@@ -161571,10 +161545,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6.27.1
  };
  
  enum ehca_mr_flag {
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_cq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_cq.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_cq.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_cq.c   2009-03-25 16:11:20.000000000 +0000
-@@ -132,9 +132,9 @@ struct ib_cq *ehca_create_cq(struct ib_d
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_cq.c
+--- a/drivers/infiniband/hw/ehca/ehca_cq.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_cq.c     Wed May 06 16:56:19 2009 +0100
+@@ -132,9 +132,9 @@
        if (cqe >= 0xFFFFFFFF - 64 - additional_cqe)
                return ERR_PTR(-EINVAL);
  
@@ -161586,20 +161560,20 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_cq.c linux-2.6.27.19-5.1
                ehca_err(device, "To increase the maximum number of CQs "
                        "use the number_of_cqs module parameter.\n");
                return ERR_PTR(-ENOSPC);
-@@ -276,6 +276,9 @@ struct ib_cq *ehca_create_cq(struct ib_d
+@@ -275,6 +275,9 @@
        for (i = 0; i < QP_HASHTAB_LEN; i++)
                INIT_HLIST_HEAD(&my_cq->qp_hashtab[i]);
++
 +      INIT_LIST_HEAD(&my_cq->sqp_err_list);
 +      INIT_LIST_HEAD(&my_cq->rqp_err_list);
-+
        if (context) {
                struct ipz_queue *ipz_queue = &my_cq->ipz_queue;
-               struct ehca_create_cq_resp resp;
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_irq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_irq.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_irq.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_irq.c  2009-03-25 16:11:20.000000000 +0000
-@@ -359,36 +359,48 @@ static void notify_port_conf_change(stru
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_irq.c
+--- a/drivers/infiniband/hw/ehca/ehca_irq.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_irq.c    Wed May 06 16:56:19 2009 +0100
+@@ -359,36 +359,48 @@
        *old_attr = new_attr;
  }
  
@@ -161664,10 +161638,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_irq.c linux-2.6.27.19-5.
                } else {
                        sport->port_state = IB_PORT_DOWN;
                        dispatch_port_event(shca, port, IB_EVENT_PORT_ERR,
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_iverbs.h linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_iverbs.h
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_iverbs.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_iverbs.h       2009-03-25 16:11:20.000000000 +0000
-@@ -197,6 +197,8 @@ void ehca_poll_eqs(unsigned long data);
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_iverbs.h
+--- a/drivers/infiniband/hw/ehca/ehca_iverbs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h Wed May 06 16:56:19 2009 +0100
+@@ -197,6 +197,8 @@
  int ehca_calc_ipd(struct ehca_shca *shca, int port,
                  enum ib_rate path_rate, u32 *ipd);
  
@@ -161676,9 +161650,9 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_iverbs.h linux-2.6.27.19
  #ifdef CONFIG_PPC_64K_PAGES
  void *ehca_alloc_fw_ctrlblock(gfp_t flags);
  void ehca_free_fw_ctrlblock(void *ptr);
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_main.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_main.c
+--- a/drivers/infiniband/hw/ehca/ehca_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_main.c   Wed May 06 16:56:19 2009 +0100
 @@ -44,6 +44,8 @@
  #include <linux/slab.h>
  #endif
@@ -161688,7 +161662,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
  #include "ehca_classes.h"
  #include "ehca_iverbs.h"
  #include "ehca_mrmw.h"
-@@ -366,22 +368,23 @@ static int ehca_sense_attributes(struct 
+@@ -366,22 +368,23 @@
                        shca->hca_cap_mr_pgsize |= pgsize_map[i + 1];
  
        /* Set maximum number of CQs and QPs to calculate EQ size */
@@ -161699,15 +161673,6 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
 -                      "specified by HW", rblock->max_qp);
 -              ret = -EINVAL;
 -              goto sense_attributes1;
--      }
--
--      if (ehca_max_cq == -1)
--              ehca_max_cq = min_t(int, rblock->max_cq, EHCA_MAX_NUM_QUEUES);
--      else if (ehca_max_cq < 1 || ehca_max_cq > rblock->max_cq) {
--              ehca_gen_err("Requested number of CQs is out of range (1 - %i) "
--                      "specified by HW", rblock->max_cq);
--              ret = -EINVAL;
--              goto sense_attributes1;
 +      if (shca->max_num_qps == -1)
 +              shca->max_num_qps = min_t(int, rblock->max_qp,
 +                                        EHCA_MAX_NUM_QUEUES);
@@ -161716,8 +161681,15 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
 +                            "(1 - %i) specified by HW. Value is set to %i",
 +                            rblock->max_qp, rblock->max_qp);
 +              shca->max_num_qps = rblock->max_qp;
-+      }
-+
+       }
+-      if (ehca_max_cq == -1)
+-              ehca_max_cq = min_t(int, rblock->max_cq, EHCA_MAX_NUM_QUEUES);
+-      else if (ehca_max_cq < 1 || ehca_max_cq > rblock->max_cq) {
+-              ehca_gen_err("Requested number of CQs is out of range (1 - %i) "
+-                      "specified by HW", rblock->max_cq);
+-              ret = -EINVAL;
+-              goto sense_attributes1;
 +      if (shca->max_num_cqs == -1)
 +              shca->max_num_cqs = min_t(int, rblock->max_cq,
 +                                        EHCA_MAX_NUM_QUEUES);
@@ -161728,7 +161700,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        }
  
        /* query max MTU from first port -- it's the same for all ports */
-@@ -733,9 +736,13 @@ static int __devinit ehca_probe(struct o
+@@ -733,9 +736,13 @@
                ehca_gen_err("Cannot allocate shca memory.");
                return -ENOMEM;
        }
@@ -161742,7 +161714,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
                spin_lock_init(&shca->sport[i].mod_sqp_lock);
  
-@@ -755,7 +762,7 @@ static int __devinit ehca_probe(struct o
+@@ -755,7 +762,7 @@
                goto probe1;
        }
  
@@ -161751,7 +161723,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        /* create event queues */
        ret = ehca_create_eq(shca, &shca->eq, EHCA_EQ, eq_size);
        if (ret) {
-@@ -927,6 +934,7 @@ MODULE_DEVICE_TABLE(of, ehca_device_tabl
+@@ -927,6 +934,7 @@
  
  static struct of_platform_driver ehca_driver = {
        .name        = "ehca",
@@ -161759,7 +161731,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        .match_table = ehca_device_table,
        .probe       = ehca_probe,
        .remove      = ehca_remove,
-@@ -964,6 +972,39 @@ void ehca_poll_eqs(unsigned long data)
+@@ -964,6 +972,39 @@
        spin_unlock(&shca_list_lock);
  }
  
@@ -161799,7 +161771,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
  static int __init ehca_module_init(void)
  {
        int ret;
-@@ -991,6 +1032,12 @@ static int __init ehca_module_init(void)
+@@ -991,6 +1032,12 @@
                goto module_init2;
        }
  
@@ -161812,17 +161784,17 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        if (ehca_poll_all_eqs != 1) {
                ehca_gen_err("WARNING!!!");
                ehca_gen_err("It is possible to lose interrupts.");
-@@ -1003,6 +1050,9 @@ static int __init ehca_module_init(void)
+@@ -1002,6 +1049,9 @@
+       }
  
        return 0;
++
 +module_init3:
 +      ibmebus_unregister_driver(&ehca_driver);
-+
  module_init2:
        ehca_destroy_slab_caches();
-@@ -1018,6 +1068,8 @@ static void __exit ehca_module_exit(void
+@@ -1018,6 +1068,8 @@
  
        ibmebus_unregister_driver(&ehca_driver);
  
@@ -161831,10 +161803,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6.27.19-5
        ehca_destroy_slab_caches();
  
        ehca_destroy_comp_pool();
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_qp.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_qp.c   2009-03-25 16:11:20.000000000 +0000
-@@ -396,6 +396,50 @@ static void ehca_determine_small_queue(s
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_qp.c
+--- a/drivers/infiniband/hw/ehca/ehca_qp.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_qp.c     Wed May 06 16:56:19 2009 +0100
+@@ -396,6 +396,50 @@
        queue->is_small = (queue->page_size != 0);
  }
  
@@ -161885,7 +161857,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
  /*
   * Create an ib_qp struct that is either a QP or an SRQ, depending on
   * the value of the is_srq parameter. If init_attr and srq_init_attr share
-@@ -407,12 +451,11 @@ static struct ehca_qp *internal_create_q
+@@ -407,12 +451,11 @@
        struct ib_srq_init_attr *srq_init_attr,
        struct ib_udata *udata, int is_srq)
  {
@@ -161899,7 +161871,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        u64 h_ret;
        int is_llqp = 0, has_srq = 0;
        int qp_type, max_send_sge, max_recv_sge, ret;
-@@ -422,9 +465,9 @@ static struct ehca_qp *internal_create_q
+@@ -422,9 +465,9 @@
        u32 swqe_size = 0, rwqe_size = 0, ib_qp_num;
        unsigned long flags;
  
@@ -161911,7 +161883,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
                ehca_err(pd->device, "To increase the maximum number of QPs "
                         "use the number_of_qps module parameter.\n");
                return ERR_PTR(-ENOSPC);
-@@ -457,8 +500,7 @@ static struct ehca_qp *internal_create_q
+@@ -457,8 +500,7 @@
  
        /* handle SRQ base QPs */
        if (init_attr->srq) {
@@ -161921,7 +161893,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
  
                has_srq = 1;
                parms.ext_type = EQPT_SRQBASE;
-@@ -716,15 +758,19 @@ static struct ehca_qp *internal_create_q
+@@ -716,15 +758,19 @@
                                 "and pages ret=%i", ret);
                        goto create_qp_exit2;
                }
@@ -161944,7 +161916,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        }
  
        if (HAS_RQ(my_qp)) {
-@@ -736,6 +782,25 @@ static struct ehca_qp *internal_create_q
+@@ -736,6 +782,25 @@
                                 "and pages ret=%i", ret);
                        goto create_qp_exit4;
                }
@@ -161970,7 +161942,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        }
  
        if (is_srq) {
-@@ -789,6 +854,11 @@ static struct ehca_qp *internal_create_q
+@@ -789,6 +854,11 @@
        if (qp_type == IB_QPT_GSI) {
                h_ret = ehca_define_sqp(shca, my_qp, init_attr);
                if (h_ret != H_SUCCESS) {
@@ -161982,7 +161954,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
                        ret = ehca2ib_return_code(h_ret);
                        goto create_qp_exit6;
                }
-@@ -799,7 +869,7 @@ static struct ehca_qp *internal_create_q
+@@ -799,7 +869,7 @@
                if (ret) {
                        ehca_err(pd->device,
                                 "Couldn't assign qp to send_cq ret=%i", ret);
@@ -161991,7 +161963,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
                }
        }
  
-@@ -825,25 +895,29 @@ static struct ehca_qp *internal_create_q
+@@ -825,17 +895,21 @@
                if (ib_copy_to_udata(udata, &resp, sizeof resp)) {
                        ehca_err(pd->device, "Copy to udata failed");
                        ret = -EINVAL;
@@ -162006,17 +161978,17 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
 +create_qp_exit8:
        ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num);
  
--create_qp_exit6:
 +create_qp_exit7:
-       kfree(my_qp->mod_qp_parm);
-+create_qp_exit6:
++      kfree(my_qp->mod_qp_parm);
++
+ create_qp_exit6:
+-      kfree(my_qp->mod_qp_parm);
 +      if (HAS_RQ(my_qp))
 +              vfree(my_qp->rq_map.map);
-+
  create_qp_exit5:
        if (HAS_RQ(my_qp))
-               ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue);
+@@ -843,7 +917,7 @@
  
  create_qp_exit4:
        if (HAS_SQ(my_qp))
@@ -162025,10 +161997,14 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
  
  create_qp_exit3:
        if (HAS_SQ(my_qp))
-@@ -1035,6 +1109,101 @@ static int prepare_sqe_rts(struct ehca_q
-       return 0;
- }
+@@ -1031,6 +1105,101 @@
+       ehca_dbg(&shca->ib_device, "qp_num=%x flusherr_wqe_cnt=%x",
+                qp_num, (*bad_wqe_cnt)-1);
+       wqe->wqef = 0;
++
++      return 0;
++}
++
 +static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
 +                        struct ehca_queue_map *qmap)
 +{
@@ -162120,14 +162096,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
 +                                      flags);
 +              }
 +      }
-+
-+      return 0;
-+}
-+
- /*
-  * internal_modify_qp with circumvention to handle aqp0 properly
-  * smi_reset2init indicates if this is an internal reset-to-init-call for
-@@ -1539,10 +1708,27 @@ static int internal_modify_qp(struct ib_
+       return 0;
+ }
+@@ -1539,10 +1708,27 @@
                        goto modify_qp_exit2;
                }
        }
@@ -162155,7 +162127,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        }
  
        if (attr_mask & IB_QP_QKEY)
-@@ -1958,6 +2144,16 @@ static int internal_destroy_qp(struct ib
+@@ -1958,6 +2144,16 @@
        idr_remove(&ehca_qp_idr, my_qp->token);
        write_unlock_irqrestore(&ehca_qp_idr_lock, flags);
  
@@ -162172,7 +162144,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        /* now wait until all pending events have completed */
        wait_event(my_qp->wait_completion, !atomic_read(&my_qp->nr_events));
  
-@@ -1983,7 +2179,7 @@ static int internal_destroy_qp(struct ib
+@@ -1983,7 +2179,7 @@
        if (qp_type == IB_QPT_GSI) {
                struct ib_event event;
                ehca_info(dev, "device %s: port %x is inactive.",
@@ -162181,7 +162153,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
                event.device = &shca->ib_device;
                event.event = IB_EVENT_PORT_ERR;
                event.element.port_num = port_num;
-@@ -1991,11 +2187,15 @@ static int internal_destroy_qp(struct ib
+@@ -1991,11 +2187,15 @@
                ib_dispatch_event(&event);
        }
  
@@ -162199,9 +162171,9 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_qp.c linux-2.6.27.19-5.1
        }
        kmem_cache_free(qp_cache, my_qp);
        atomic_dec(&shca->num_qps);
-diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_reqs.c
---- linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/ehca/ehca_reqs.c 2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/infiniband/hw/ehca/ehca_reqs.c
+--- a/drivers/infiniband/hw/ehca/ehca_reqs.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/ehca/ehca_reqs.c   Wed May 06 16:56:19 2009 +0100
 @@ -53,9 +53,25 @@
  /* in RC traffic, insert an empty RDMA READ every this many packets */
  #define ACK_CIRC_THRESHOLD 2000000
@@ -162229,7 +162201,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  {
        u8 cnt_ds;
        if (unlikely((recv_wr->num_sge < 0) ||
-@@ -69,7 +85,7 @@ static inline int ehca_write_rwqe(struct
+@@ -69,7 +85,7 @@
        /* clear wqe header until sglist */
        memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list));
  
@@ -162238,7 +162210,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
        wqe_p->nr_of_data_seg = recv_wr->num_sge;
  
        for (cnt_ds = 0; cnt_ds < recv_wr->num_sge; cnt_ds++) {
-@@ -146,6 +162,7 @@ static inline int ehca_write_swqe(struct
+@@ -146,6 +162,7 @@
        u64 dma_length;
        struct ehca_av *my_av;
        u32 remote_qkey = send_wr->wr.ud.remote_qkey;
@@ -162246,7 +162218,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  
        if (unlikely((send_wr->num_sge < 0) ||
                     (send_wr->num_sge > qp->ipz_squeue.act_nr_of_sg))) {
-@@ -158,11 +175,10 @@ static inline int ehca_write_swqe(struct
+@@ -158,11 +175,10 @@
        /* clear wqe header until sglist */
        memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list));
  
@@ -162261,7 +162233,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  
        switch (send_wr->opcode) {
        case IB_WR_SEND:
-@@ -496,7 +512,9 @@ static int internal_post_recv(struct ehc
+@@ -496,7 +512,9 @@
        struct ehca_wqe *wqe_p;
        int wqe_cnt = 0;
        int ret = 0;
@@ -162271,7 +162243,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  
        if (unlikely(!HAS_RQ(my_qp))) {
                ehca_err(dev, "QP has no RQ  ehca_qp=%p qp_num=%x ext_type=%d",
-@@ -524,8 +542,15 @@ static int internal_post_recv(struct ehc
+@@ -524,8 +542,15 @@
                        }
                        goto post_recv_exit0;
                }
@@ -162288,7 +162260,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
                /*
                 * if something failed,
                 * reset the free entry pointer to the start value
-@@ -540,6 +565,11 @@ static int internal_post_recv(struct ehc
+@@ -540,6 +565,11 @@
                        }
                        goto post_recv_exit0;
                }
@@ -162300,7 +162272,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
                wqe_cnt++;
        } /* eof for cur_recv_wr */
  
-@@ -596,10 +626,12 @@ static const u8 ib_wc_opcode[255] = {
+@@ -596,10 +626,12 @@
  /* internal function to poll one entry of cq */
  static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc)
  {
@@ -162314,7 +162286,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
        int cqe_count = 0, is_error;
  
  repoll:
-@@ -674,27 +706,52 @@ repoll:
+@@ -674,27 +706,52 @@
                goto repoll;
        wc->qp = &my_qp->ib_qp;
  
@@ -162337,11 +162309,6 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
 -                                my_qp->real_qp_num);
 -                      /* found a double cqe, discard it and read next one */
 -                      goto repoll;
--              }
--              wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK;
--              wc->wr_id |= qmap_entry->app_wr_id;
--              qmap_entry->reported = 1;
--      } else
 +              if (HAS_RQ(my_qp))
 +                      ehca_add_to_err_list(my_qp, 0);
 +              my_qp->rq_map.left_to_poll = 0;
@@ -162352,8 +162319,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
 +              /* We got a send completion. */
 +              qmap = &my_qp->sq_map;
 +      else
-               /* We got a receive completion. */
--              wc->wr_id = cqe->work_request_id;
++              /* We got a receive completion. */
 +              qmap = &my_qp->rq_map;
 +
 +      qmap_entry = &qmap->map[qmap_tail_idx];
@@ -162379,12 +162345,18 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
 +                      ehca_add_to_err_list(my_qp, 1);
 +                      if (HAS_RQ(my_qp))
 +                              ehca_add_to_err_list(my_qp, 0);
-+              }
+               }
+-              wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK;
+-              wc->wr_id |= qmap_entry->app_wr_id;
+-              qmap_entry->reported = 1;
+-      } else
+-              /* We got a receive completion. */
+-              wc->wr_id = cqe->work_request_id;
 +      }
  
        /* eval ib_wc_opcode */
        wc->opcode = ib_wc_opcode[cqe->optype]-1;
-@@ -733,13 +790,88 @@ poll_cq_one_exit0:
+@@ -733,13 +790,88 @@
        return ret;
  }
  
@@ -162473,7 +162445,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  
        if (num_entries < 1) {
                ehca_err(cq->device, "Invalid num_entries=%d ehca_cq=%p "
-@@ -749,15 +881,40 @@ int ehca_poll_cq(struct ib_cq *cq, int n
+@@ -749,15 +881,40 @@
        }
  
        spin_lock_irqsave(&my_cq->spinlock, flags);
@@ -162516,10 +162488,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/ehca/ehca_reqs.c linux-2.6.27.19-5
  
  poll_cq_exit0:
        return ret;
-diff -purN linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c linux-2.6.27.19-5.1/drivers/infiniband/hw/mlx4/cq.c
---- linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/mlx4/cq.c        2009-03-25 16:11:19.000000000 +0000
-@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+diff -r 9608d5473017 drivers/infiniband/hw/mlx4/cq.c
+--- a/drivers/infiniband/hw/mlx4/cq.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/mlx4/cq.c  Wed May 06 16:56:19 2009 +0100
+@@ -343,6 +343,7 @@
  {
        struct mlx4_ib_dev *dev = to_mdev(ibcq->device);
        struct mlx4_ib_cq *cq = to_mcq(ibcq);
@@ -162527,7 +162499,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c linux-2.6.27.19-5.1/driv
        int outst_cqe;
        int err;
  
-@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+@@ -376,10 +377,13 @@
                        goto out;
        }
  
@@ -162541,7 +162513,7 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c linux-2.6.27.19-5.1/driv
        if (ibcq->uobject) {
                cq->buf      = cq->resize_buf->buf;
                cq->ibcq.cqe = cq->resize_buf->cqe;
-@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq
+@@ -406,6 +410,7 @@
        goto out;
  
  err_buf:
@@ -162549,10 +162521,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/mlx4/cq.c linux-2.6.27.19-5.1/driv
        if (!ibcq->uobject)
                mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf,
                                    cq->resize_buf->cqe);
-diff -purN linux-2.6.27/drivers/infiniband/hw/mthca/mthca_catas.c linux-2.6.27.19-5.1/drivers/infiniband/hw/mthca/mthca_catas.c
---- linux-2.6.27/drivers/infiniband/hw/mthca/mthca_catas.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/hw/mthca/mthca_catas.c      2009-03-25 16:11:19.000000000 +0000
-@@ -51,7 +51,7 @@ static LIST_HEAD(catas_list);
+diff -r 9608d5473017 drivers/infiniband/hw/mthca/mthca_catas.c
+--- a/drivers/infiniband/hw/mthca/mthca_catas.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/hw/mthca/mthca_catas.c        Wed May 06 16:56:19 2009 +0100
+@@ -51,7 +51,7 @@
  static struct workqueue_struct *catas_wq;
  static struct work_struct catas_work;
  
@@ -162561,10 +162533,10 @@ diff -purN linux-2.6.27/drivers/infiniband/hw/mthca/mthca_catas.c linux-2.6.27.1
  module_param_named(catas_reset_disable, catas_reset_disable, int, 0644);
  MODULE_PARM_DESC(catas_reset_disable, "disable reset on catastrophic event if nonzero");
  
-diff -purN linux-2.6.27/drivers/infiniband/ulp/iser/iscsi_iser.c linux-2.6.27.19-5.1/drivers/infiniband/ulp/iser/iscsi_iser.c
---- linux-2.6.27/drivers/infiniband/ulp/iser/iscsi_iser.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/infiniband/ulp/iser/iscsi_iser.c       2009-03-25 16:11:20.000000000 +0000
-@@ -378,6 +378,7 @@ static void iscsi_iser_session_destroy(s
+diff -r 9608d5473017 drivers/infiniband/ulp/iser/iscsi_iser.c
+--- a/drivers/infiniband/ulp/iser/iscsi_iser.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/infiniband/ulp/iser/iscsi_iser.c Wed May 06 16:56:19 2009 +0100
+@@ -378,6 +378,7 @@
  {
        struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
  
@@ -162572,10 +162544,10 @@ diff -purN linux-2.6.27/drivers/infiniband/ulp/iser/iscsi_iser.c linux-2.6.27.19
        iscsi_host_remove(shost);
        iscsi_host_free(shost);
  }
-diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drivers/input/keyboard/atkbd.c
---- linux-2.6.27/drivers/input/keyboard/atkbd.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/keyboard/atkbd.c 2009-03-25 16:11:13.000000000 +0000
-@@ -834,10 +834,10 @@ static void atkbd_disconnect(struct seri
+diff -r 9608d5473017 drivers/input/keyboard/atkbd.c
+--- a/drivers/input/keyboard/atkbd.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/keyboard/atkbd.c   Wed May 06 16:56:19 2009 +0100
+@@ -834,10 +834,10 @@
  }
  
  /*
@@ -162588,10 +162560,13 @@ diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drive
  {
        const unsigned int forced_release_keys[] = {
                0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93,
-@@ -868,6 +868,38 @@ static void atkbd_hp_keymap_fixup(struct
- }
- /*
+@@ -865,6 +865,38 @@
+               for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
+                       __set_bit(forced_release_keys[i],
+                                       atkbd->force_release_mask);
++}
++
++/*
 + * Inventec system with broken key release on volume keys
 + */
 +static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd)
@@ -162621,13 +162596,10 @@ diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drive
 +              for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
 +                      __set_bit(forced_release_keys[i],
 +                                atkbd->force_release_mask);
-+}
-+
-+/*
-  * atkbd_set_keycode_table() initializes keyboard's keycode table
-  * according to the selected scancode set
-  */
-@@ -1461,13 +1493,22 @@ static int __init atkbd_setup_fixup(cons
+ }
+ /*
+@@ -1461,13 +1493,22 @@
  
  static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
        {
@@ -162637,8 +162609,9 @@ diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drive
                        DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
 -                      DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
 +                      DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
-+              },
-+              .callback = atkbd_setup_fixup,
+               },
+               .callback = atkbd_setup_fixup,
+-              .driver_data = atkbd_latitude_keymap_fixup,
 +              .driver_data = atkbd_dell_laptop_keymap_fixup,
 +      },
 +      {
@@ -162646,17 +162619,17 @@ diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drive
 +              .matches = {
 +                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
 +                      DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
-               },
-               .callback = atkbd_setup_fixup,
--              .driver_data = atkbd_latitude_keymap_fixup,
++              },
++              .callback = atkbd_setup_fixup,
 +              .driver_data = atkbd_dell_laptop_keymap_fixup,
        },
        {
                .ident = "HP 2133",
-@@ -1478,6 +1519,24 @@ static struct dmi_system_id atkbd_dmi_qu
+@@ -1477,6 +1518,24 @@
+               },
                .callback = atkbd_setup_fixup,
                .driver_data = atkbd_hp_keymap_fixup,
-       },
++      },
 +      {
 +              .ident = "Inventec Symphony",
 +              .matches = {
@@ -162674,14 +162647,13 @@ diff -purN linux-2.6.27/drivers/input/keyboard/atkbd.c linux-2.6.27.19-5.1/drive
 +              },
 +              .callback = atkbd_setup_fixup,
 +              .driver_data = atkbd_samsung_keymap_fixup,
-+      },
+       },
        { }
  };
-diff -purN linux-2.6.27/drivers/input/misc/sparcspkr.c linux-2.6.27.19-5.1/drivers/input/misc/sparcspkr.c
---- linux-2.6.27/drivers/input/misc/sparcspkr.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/misc/sparcspkr.c 2009-03-25 16:11:13.000000000 +0000
-@@ -258,6 +258,7 @@ static struct of_device_id bbc_beep_matc
+diff -r 9608d5473017 drivers/input/misc/sparcspkr.c
+--- a/drivers/input/misc/sparcspkr.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/misc/sparcspkr.c   Wed May 06 16:56:19 2009 +0100
+@@ -258,6 +258,7 @@
  };
  
  static struct of_platform_driver bbc_beep_driver = {
@@ -162689,7 +162661,7 @@ diff -purN linux-2.6.27/drivers/input/misc/sparcspkr.c linux-2.6.27.19-5.1/drive
        .name           = "bbcbeep",
        .match_table    = bbc_beep_match,
        .probe          = bbc_beep_probe,
-@@ -337,6 +338,7 @@ static struct of_device_id grover_beep_m
+@@ -337,6 +338,7 @@
  };
  
  static struct of_platform_driver grover_beep_driver = {
@@ -162697,10 +162669,10 @@ diff -purN linux-2.6.27/drivers/input/misc/sparcspkr.c linux-2.6.27.19-5.1/drive
        .name           = "groverbeep",
        .match_table    = grover_beep_match,
        .probe          = grover_beep_probe,
-diff -purN linux-2.6.27/drivers/input/mouse/alps.c linux-2.6.27.19-5.1/drivers/input/mouse/alps.c
---- linux-2.6.27/drivers/input/mouse/alps.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/mouse/alps.c     2009-03-25 16:11:13.000000000 +0000
-@@ -54,6 +54,7 @@ static const struct alps_model_info alps
+diff -r 9608d5473017 drivers/input/mouse/alps.c
+--- a/drivers/input/mouse/alps.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/mouse/alps.c       Wed May 06 16:56:19 2009 +0100
+@@ -54,6 +54,7 @@
        { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
        { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
        { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
@@ -162708,10 +162680,10 @@ diff -purN linux-2.6.27/drivers/input/mouse/alps.c linux-2.6.27.19-5.1/drivers/i
        { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
  };
  
-diff -purN linux-2.6.27/drivers/input/mouse/psmouse-base.c linux-2.6.27.19-5.1/drivers/input/mouse/psmouse-base.c
---- linux-2.6.27/drivers/input/mouse/psmouse-base.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/mouse/psmouse-base.c     2009-03-25 16:11:13.000000000 +0000
-@@ -36,8 +36,8 @@ MODULE_DESCRIPTION(DRIVER_DESC);
+diff -r 9608d5473017 drivers/input/mouse/psmouse-base.c
+--- a/drivers/input/mouse/psmouse-base.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/mouse/psmouse-base.c       Wed May 06 16:56:19 2009 +0100
+@@ -36,8 +36,8 @@
  MODULE_LICENSE("GPL");
  
  static unsigned int psmouse_max_proto = PSMOUSE_AUTO;
@@ -162722,7 +162694,7 @@ diff -purN linux-2.6.27/drivers/input/mouse/psmouse-base.c linux-2.6.27.19-5.1/d
  #define param_check_proto_abbrev(name, p)     __param_check(name, p, unsigned int)
  #define param_set_proto_abbrev                        psmouse_set_maxproto
  #define param_get_proto_abbrev                        psmouse_get_maxproto
-@@ -1573,7 +1573,8 @@ static ssize_t psmouse_attr_set_resoluti
+@@ -1573,7 +1573,8 @@
  }
  
  
@@ -162732,7 +162704,7 @@ diff -purN linux-2.6.27/drivers/input/mouse/psmouse-base.c linux-2.6.27.19-5.1/d
  {
        const struct psmouse_protocol *proto;
  
-@@ -1590,7 +1591,7 @@ static int psmouse_set_maxproto(const ch
+@@ -1590,7 +1591,7 @@
        return 0;
  }
  
@@ -162741,10 +162713,10 @@ diff -purN linux-2.6.27/drivers/input/mouse/psmouse-base.c linux-2.6.27.19-5.1/d
  {
        int type = *((unsigned int *)kp->arg);
  
-diff -purN linux-2.6.27/drivers/input/serio/i8042-sparcio.h linux-2.6.27.19-5.1/drivers/input/serio/i8042-sparcio.h
---- linux-2.6.27/drivers/input/serio/i8042-sparcio.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/i8042-sparcio.h    2009-03-25 16:11:13.000000000 +0000
-@@ -96,6 +96,7 @@ static struct of_device_id sparc_i8042_m
+diff -r 9608d5473017 drivers/input/serio/i8042-sparcio.h
+--- a/drivers/input/serio/i8042-sparcio.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/i8042-sparcio.h      Wed May 06 16:56:19 2009 +0100
+@@ -96,6 +96,7 @@
  MODULE_DEVICE_TABLE(of, sparc_i8042_match);
  
  static struct of_platform_driver sparc_i8042_driver = {
@@ -162752,25 +162724,25 @@ diff -purN linux-2.6.27/drivers/input/serio/i8042-sparcio.h linux-2.6.27.19-5.1/
        .name           = "i8042",
        .match_table    = sparc_i8042_match,
        .probe          = sparc_i8042_probe,
-diff -purN linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h linux-2.6.27.19-5.1/drivers/input/serio/i8042-x86ia64io.h
---- linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/i8042-x86ia64io.h  2009-03-25 16:11:13.000000000 +0000
-@@ -135,6 +135,14 @@ static struct dmi_system_id __initdata i
+diff -r 9608d5473017 drivers/input/serio/i8042-x86ia64io.h
+--- a/drivers/input/serio/i8042-x86ia64io.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/i8042-x86ia64io.h    Wed May 06 16:56:19 2009 +0100
+@@ -133,6 +133,14 @@
+                       DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"),
                        DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
-               },
-       },
++              },
++      },
 +      {
 +              .ident = "Blue FB5601",
 +              .matches = {
 +                      DMI_MATCH(DMI_SYS_VENDOR, "blue"),
 +                      DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"),
 +                      DMI_MATCH(DMI_PRODUCT_VERSION, "M606"),
-+              },
-+      },
+               },
+       },
        { }
- };
-@@ -316,12 +324,47 @@ static struct dmi_system_id __initdata i
+@@ -316,10 +324,45 @@
                },
        },
        {
@@ -162785,8 +162757,8 @@ diff -purN linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h linux-2.6.27.19-5.
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
-               },
-       },
++              },
++      },
 +      {
 +              .ident = "IBM 2656",
 +              .matches = {
@@ -162813,15 +162785,13 @@ diff -purN linux-2.6.27/drivers/input/serio/i8042-x86ia64io.h linux-2.6.27.19-5.
 +              .matches = {
 +                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
 +                      DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
-+              },
-+      },
+               },
+       },
        { }
- };
-diff -purN linux-2.6.27/drivers/input/serio/xilinx_ps2.c linux-2.6.27.19-5.1/drivers/input/serio/xilinx_ps2.c
---- linux-2.6.27/drivers/input/serio/xilinx_ps2.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/serio/xilinx_ps2.c       2009-03-25 16:11:13.000000000 +0000
-@@ -355,6 +355,7 @@ static struct of_device_id xps2_of_match
+diff -r 9608d5473017 drivers/input/serio/xilinx_ps2.c
+--- a/drivers/input/serio/xilinx_ps2.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/serio/xilinx_ps2.c Wed May 06 16:56:19 2009 +0100
+@@ -355,6 +355,7 @@
  MODULE_DEVICE_TABLE(of, xps2_of_match);
  
  static struct of_platform_driver xps2_of_driver = {
@@ -162829,13 +162799,14 @@ diff -purN linux-2.6.27/drivers/input/serio/xilinx_ps2.c linux-2.6.27.19-5.1/dri
        .name           = DRIVER_NAME,
        .match_table    = xps2_of_match,
        .probe          = xps2_of_probe,
-diff -purN linux-2.6.27/drivers/input/touchscreen/Kconfig linux-2.6.27.19-5.1/drivers/input/touchscreen/Kconfig
---- linux-2.6.27/drivers/input/touchscreen/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/Kconfig      2009-03-25 16:11:13.000000000 +0000
-@@ -91,6 +91,18 @@ config TOUCHSCREEN_ELO
+diff -r 9608d5473017 drivers/input/touchscreen/Kconfig
+--- a/drivers/input/touchscreen/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/Kconfig        Wed May 06 16:56:19 2009 +0100
+@@ -90,6 +90,18 @@
          To compile this driver as a module, choose M here: the
          module will be called elo.
++
 +config TOUCHSCREEN_ELOUSB
 +       tristate "Elo USB touchscreens"
 +       select USB
@@ -162847,14 +162818,13 @@ diff -purN linux-2.6.27/drivers/input/touchscreen/Kconfig linux-2.6.27.19-5.1/dr
 +
 +         To compile this driver as a module, choose M here: the
 +         module will be called elousb.
-+
  config TOUCHSCREEN_MTOUCH
        tristate "MicroTouch serial touchscreens"
-       select SERIO
-diff -purN linux-2.6.27/drivers/input/touchscreen/Makefile linux-2.6.27.19-5.1/drivers/input/touchscreen/Makefile
---- linux-2.6.27/drivers/input/touchscreen/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/Makefile     2009-03-25 16:11:13.000000000 +0000
-@@ -12,6 +12,7 @@ obj-$(CONFIG_TOUCHSCREEN_BITSY)              += h360
+diff -r 9608d5473017 drivers/input/touchscreen/Makefile
+--- a/drivers/input/touchscreen/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/Makefile       Wed May 06 16:56:19 2009 +0100
+@@ -12,6 +12,7 @@
  obj-$(CONFIG_TOUCHSCREEN_CORGI)               += corgi_ts.o
  obj-$(CONFIG_TOUCHSCREEN_GUNZE)               += gunze.o
  obj-$(CONFIG_TOUCHSCREEN_ELO)         += elo.o
@@ -162862,9 +162832,9 @@ diff -purN linux-2.6.27/drivers/input/touchscreen/Makefile linux-2.6.27.19-5.1/d
  obj-$(CONFIG_TOUCHSCREEN_FUJITSU)     += fujitsu_ts.o
  obj-$(CONFIG_TOUCHSCREEN_INEXIO)      += inexio.o
  obj-$(CONFIG_TOUCHSCREEN_MIGOR)               += migor_ts.o
-diff -purN linux-2.6.27/drivers/input/touchscreen/elousb.c linux-2.6.27.19-5.1/drivers/input/touchscreen/elousb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/elousb.c     2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/input/touchscreen/elousb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/input/touchscreen/elousb.c       Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,305 @@
 +/*
 + *  Copyright (c) 1999-2001 Vojtech Pavlik
@@ -163171,21 +163141,21 @@ diff -purN linux-2.6.27/drivers/input/touchscreen/elousb.c linux-2.6.27.19-5.1/d
 +
 +module_init(elousb_init);
 +module_exit(elousb_exit);
-diff -purN linux-2.6.27/drivers/input/touchscreen/usbtouchscreen.c linux-2.6.27.19-5.1/drivers/input/touchscreen/usbtouchscreen.c
---- linux-2.6.27/drivers/input/touchscreen/usbtouchscreen.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/touchscreen/usbtouchscreen.c     2009-03-25 16:11:13.000000000 +0000
-@@ -60,6 +60,10 @@ static int swap_xy;
+diff -r 9608d5473017 drivers/input/touchscreen/usbtouchscreen.c
+--- a/drivers/input/touchscreen/usbtouchscreen.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/touchscreen/usbtouchscreen.c       Wed May 06 16:56:19 2009 +0100
+@@ -59,6 +59,10 @@
+ static int swap_xy;
  module_param(swap_xy, bool, 0644);
  MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
++
 +static int hwcalib_xy;
 +module_param(hwcalib_xy, bool, 0644);
 +MODULE_PARM_DESC(hwcalib_xy, "If set hw-calibrated X/Y are used if available");
-+
  /* device specifc data/functions */
  struct usbtouch_usb;
- struct usbtouch_device_info {
-@@ -260,8 +264,13 @@ static int panjit_read_data(struct usbto
+@@ -260,8 +264,13 @@
  
  static int mtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
  {
@@ -163201,23 +163171,23 @@ diff -purN linux-2.6.27/drivers/input/touchscreen/usbtouchscreen.c linux-2.6.27.
        dev->touch = (pkt[2] & 0x40) ? 1 : 0;
  
        return 1;
-@@ -294,6 +303,12 @@ static int mtouch_init(struct usbtouch_u
+@@ -292,6 +301,12 @@
+                       break;
+               if (ret != -EPIPE)
                        return ret;
-       }
++      }
++
 +      /* Default min/max xy are the raw values, override if using hw-calib */
 +      if (hwcalib_xy) {
 +              input_set_abs_params(usbtouch->input, ABS_X, 0, 0xffff, 0, 0);
 +              input_set_abs_params(usbtouch->input, ABS_Y, 0, 0xffff, 0, 0);
-+      }
-+
+       }
        return 0;
- }
- #endif
-diff -purN linux-2.6.27/drivers/input/xen-kbdfront.c linux-2.6.27.19-5.1/drivers/input/xen-kbdfront.c
---- linux-2.6.27/drivers/input/xen-kbdfront.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/input/xen-kbdfront.c   2009-03-25 16:11:13.000000000 +0000
-@@ -325,7 +325,6 @@ static struct xenbus_device_id xenkbd_id
+diff -r 9608d5473017 drivers/input/xen-kbdfront.c
+--- a/drivers/input/xen-kbdfront.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/input/xen-kbdfront.c     Wed May 06 16:56:19 2009 +0100
+@@ -325,7 +325,6 @@
  
  static struct xenbus_driver xenkbd = {
        .name = "vkbd",
@@ -163225,10 +163195,10 @@ diff -purN linux-2.6.27/drivers/input/xen-kbdfront.c linux-2.6.27.19-5.1/drivers
        .ids = xenkbd_ids,
        .probe = xenkbd_probe,
        .remove = xenkbd_remove,
-diff -purN linux-2.6.27/drivers/isdn/hardware/avm/b1isa.c linux-2.6.27.19-5.1/drivers/isdn/hardware/avm/b1isa.c
---- linux-2.6.27/drivers/isdn/hardware/avm/b1isa.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/isdn/hardware/avm/b1isa.c      2009-03-25 16:11:29.000000000 +0000
-@@ -233,10 +233,8 @@ static void __exit b1isa_exit(void)
+diff -r 9608d5473017 drivers/isdn/hardware/avm/b1isa.c
+--- a/drivers/isdn/hardware/avm/b1isa.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/isdn/hardware/avm/b1isa.c        Wed May 06 16:56:19 2009 +0100
+@@ -233,10 +233,8 @@
        int i;
  
        for (i = 0; i < MAX_CARDS; i++) {
@@ -163241,10 +163211,10 @@ diff -purN linux-2.6.27/drivers/isdn/hardware/avm/b1isa.c linux-2.6.27.19-5.1/dr
        }
        unregister_capi_driver(&capi_driver_b1isa);
  }
-diff -purN linux-2.6.27/drivers/leds/leds-cobalt-qube.c linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-qube.c
---- linux-2.6.27/drivers/leds/leds-cobalt-qube.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-qube.c        2009-03-25 16:11:20.000000000 +0000
-@@ -28,7 +28,7 @@ static void qube_front_led_set(struct le
+diff -r 9608d5473017 drivers/leds/leds-cobalt-qube.c
+--- a/drivers/leds/leds-cobalt-qube.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/leds-cobalt-qube.c  Wed May 06 16:56:19 2009 +0100
+@@ -28,7 +28,7 @@
  }
  
  static struct led_classdev qube_front_led = {
@@ -163253,10 +163223,10 @@ diff -purN linux-2.6.27/drivers/leds/leds-cobalt-qube.c linux-2.6.27.19-5.1/driv
        .brightness             = LED_FULL,
        .brightness_set         = qube_front_led_set,
        .default_trigger        = "ide-disk",
-diff -purN linux-2.6.27/drivers/leds/leds-cobalt-raq.c linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-raq.c
---- linux-2.6.27/drivers/leds/leds-cobalt-raq.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/leds-cobalt-raq.c 2009-03-25 16:11:20.000000000 +0000
-@@ -49,7 +49,7 @@ static void raq_web_led_set(struct led_c
+diff -r 9608d5473017 drivers/leds/leds-cobalt-raq.c
+--- a/drivers/leds/leds-cobalt-raq.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/leds-cobalt-raq.c   Wed May 06 16:56:19 2009 +0100
+@@ -49,7 +49,7 @@
  }
  
  static struct led_classdev raq_web_led = {
@@ -163265,7 +163235,7 @@ diff -purN linux-2.6.27/drivers/leds/leds-cobalt-raq.c linux-2.6.27.19-5.1/drive
        .brightness_set = raq_web_led_set,
  };
  
-@@ -70,7 +70,7 @@ static void raq_power_off_led_set(struct
+@@ -70,7 +70,7 @@
  }
  
  static struct led_classdev raq_power_off_led = {
@@ -163274,10 +163244,10 @@ diff -purN linux-2.6.27/drivers/leds/leds-cobalt-raq.c linux-2.6.27.19-5.1/drive
        .brightness_set         = raq_power_off_led_set,
        .default_trigger        = "power-off",
  };
-diff -purN linux-2.6.27/drivers/leds/ledtrig-default-on.c linux-2.6.27.19-5.1/drivers/leds/ledtrig-default-on.c
---- linux-2.6.27/drivers/leds/ledtrig-default-on.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/leds/ledtrig-default-on.c      2009-03-25 16:11:20.000000000 +0000
-@@ -23,7 +23,7 @@ static void defon_trig_activate(struct l
+diff -r 9608d5473017 drivers/leds/ledtrig-default-on.c
+--- a/drivers/leds/ledtrig-default-on.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/leds/ledtrig-default-on.c        Wed May 06 16:56:19 2009 +0100
+@@ -23,7 +23,7 @@
  }
  
  static struct led_trigger defon_led_trigger = {
@@ -163286,10 +163256,10 @@ diff -purN linux-2.6.27/drivers/leds/ledtrig-default-on.c linux-2.6.27.19-5.1/dr
        .activate = defon_trig_activate,
  };
  
-diff -purN linux-2.6.27/drivers/macintosh/Kconfig linux-2.6.27.19-5.1/drivers/macintosh/Kconfig
---- linux-2.6.27/drivers/macintosh/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/Kconfig      2009-03-25 16:11:14.000000000 +0000
-@@ -13,7 +13,7 @@ if MACINTOSH_DRIVERS
+diff -r 9608d5473017 drivers/macintosh/Kconfig
+--- a/drivers/macintosh/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/Kconfig        Wed May 06 16:56:19 2009 +0100
+@@ -13,7 +13,7 @@
  
  config ADB
        bool "Apple Desktop Bus (ADB) support"
@@ -163298,7 +163268,7 @@ diff -purN linux-2.6.27/drivers/macintosh/Kconfig linux-2.6.27.19-5.1/drivers/ma
        help
          Apple Desktop Bus (ADB) support is for support of devices which
          are connected to an ADB port.  ADB devices tend to have 4 pins.
-@@ -253,4 +253,10 @@ config PMAC_RACKMETER
+@@ -253,4 +253,10 @@
          This driver provides some support to control the front panel
            blue LEDs "vu-meter" of the XServer macs.
  
@@ -163309,54 +163279,52 @@ diff -purN linux-2.6.27/drivers/macintosh/Kconfig linux-2.6.27.19-5.1/drivers/ma
 +        call helpdesk
 +
  endif # MACINTOSH_DRIVERS
-diff -purN linux-2.6.27/drivers/macintosh/Makefile linux-2.6.27.19-5.1/drivers/macintosh/Makefile
---- linux-2.6.27/drivers/macintosh/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/Makefile     2009-03-25 16:11:14.000000000 +0000
-@@ -4,6 +4,8 @@
+diff -r 9608d5473017 drivers/macintosh/Makefile
+--- a/drivers/macintosh/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/Makefile       Wed May 06 16:56:19 2009 +0100
+@@ -3,6 +3,8 @@
+ #
  
  # Each configuration option enables a list of files.
-+obj-$(CONFIG_MACONLINUX)      += mol/
 +
++obj-$(CONFIG_MACONLINUX)      += mol/
  obj-$(CONFIG_PPC_PMAC)                += macio_asic.o macio_sysfs.o
  
- obj-$(CONFIG_PMAC_MEDIABAY)   += mediabay.o
-diff -purN linux-2.6.27/drivers/macintosh/adb.c linux-2.6.27.19-5.1/drivers/macintosh/adb.c
---- linux-2.6.27/drivers/macintosh/adb.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/adb.c        2009-03-25 16:11:14.000000000 +0000
-@@ -298,6 +298,10 @@ static int __init adb_init(void)
+diff -r 9608d5473017 drivers/macintosh/adb.c
+--- a/drivers/macintosh/adb.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/adb.c  Wed May 06 16:56:19 2009 +0100
+@@ -296,6 +296,10 @@
+ #ifdef CONFIG_PPC32
        if (!machine_is(chrp) && !machine_is(powermac))
-               return 0;
- #endif
-+#ifdef CONFIG_PPC64
-+      if (!machine_is(powermac))
 +              return 0;
 +#endif
- #ifdef CONFIG_MAC
-       if (!MACH_IS_MAC)
++#ifdef CONFIG_PPC64
++      if (!machine_is(powermac))
                return 0;
-diff -purN linux-2.6.27/drivers/macintosh/adbhid.c linux-2.6.27.19-5.1/drivers/macintosh/adbhid.c
---- linux-2.6.27/drivers/macintosh/adbhid.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/adbhid.c     2009-03-25 16:11:14.000000000 +0000
-@@ -1264,10 +1264,14 @@ init_ms_a3(int id)
+ #endif
+ #ifdef CONFIG_MAC
+diff -r 9608d5473017 drivers/macintosh/adbhid.c
+--- a/drivers/macintosh/adbhid.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/adbhid.c       Wed May 06 16:56:19 2009 +0100
+@@ -1264,8 +1264,12 @@
  
  static int __init adbhid_init(void)
  {
 -#ifndef CONFIG_MAC
 +#ifdef CONFIG_PPC32
        if (!machine_is(chrp) && !machine_is(powermac))
-               return 0;
- #endif
-+#ifdef CONFIG_PPC64
-+      if (!machine_is(powermac))
 +              return 0;
 +#endif
++#ifdef CONFIG_PPC64
++      if (!machine_is(powermac))
+               return 0;
+ #endif
  
-       led_request.complete = 1;
-diff -purN linux-2.6.27/drivers/macintosh/mol/Makefile linux-2.6.27.19-5.1/drivers/macintosh/mol/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/Makefile 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/Makefile   Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,60 @@
 +
 +MOL_OBJS =    \
@@ -163418,9 +163386,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/Makefile linux-2.6.27.19-5.1/drive
 +      grep '^#' tmp-offsets.s >> $@
 +      rm -fv $(obj)/tmp-offsets.*
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/_dev.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_dev.c   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_dev.c     Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,376 @@
 +/*
 + *   Creation Date: <2003/08/20 17:31:44 samuel>
@@ -163798,9 +163766,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_dev.c linux-2.6.27.19-5.1/drivers
 +
 +module_init( dev_register );
 +module_exit( dev_unregister );
-diff -purN linux-2.6.27/drivers/macintosh/mol/_fault.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_fault.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_fault.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_fault.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_fault.c   Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,159 @@
 +/*
 + *   Creation Date: <2002/06/08 21:01:54 samuel>
@@ -163961,9 +163929,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_fault.c linux-2.6.27.19-5.1/drive
 +              | DBG_TRANSL_PAGE_FLAG( val, _PAGE_EXEC );
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/_hostirq.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_hostirq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_hostirq.c       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_hostirq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_hostirq.c Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,116 @@
 +/*
 + *    <hostirq.c>
@@ -164081,9 +164049,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_hostirq.c linux-2.6.27.19-5.1/dri
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/_kuname.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_kuname.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_kuname.c        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_kuname.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_kuname.c  Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,48 @@
 +/*
 + *   Creation Date: <2001/08/15 01:11:01 samuel>
@@ -164133,9 +164101,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_kuname.c linux-2.6.27.19-5.1/driv
 +#endif
 +
 +char *cross_compiling_magic = "-MAGIC-" UTS_RELEASE SMP_STRING ALTIVEC_STRING ;
-diff -purN linux-2.6.27/drivers/macintosh/mol/_misc.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_misc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_misc.c  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_misc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_misc.c    Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,147 @@
 +/*
 + *   Creation Date: <97/05/26 02:10:43 samuel>
@@ -164284,9 +164252,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_misc.c linux-2.6.27.19-5.1/driver
 +{
 +      set_trampoline( old_trampoline );
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/_mmu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/_mmu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/_mmu.c   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/_mmu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/_mmu.c     Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,41 @@
 +/*
 + *   Creation Date: <2002/07/13 13:58:00 samuel>
@@ -164329,9 +164297,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/_mmu.c linux-2.6.27.19-5.1/drivers
 +#endif
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/actions.c linux-2.6.27.19-5.1/drivers/macintosh/mol/actions.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/actions.c        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/actions.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/actions.c  Wed May 06 16:56:19 2009 +0100
 @@ -0,0 +1,548 @@
 +/*
 + *   Creation Date: <2001/04/07 17:33:52 samuel>
@@ -164881,9 +164849,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/actions.c linux-2.6.27.19-5.1/driv
 +      lowmem_free_all();
 +      kfree_cont_mol( code_base );
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/603.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/603.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/603.S  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/603.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/603.S    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,218 @@
 +/*
 + *   Creation Date: <2001/06/15 20:10:49 samuel>
@@ -165103,9 +165071,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/603.S linux-2.6.27.19-5.
 +      rlwinm  r1,r3,9,6,6                     // get load/store bit
 +      addis   r1,r1,0x800                     // Set bit 4 (prot. violation)
 +      b       10b
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/dec.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/dec.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/dec.S  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/dec.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/dec.S    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,228 @@
 +/*
 + *   Creation Date: <2001/06/21 17:10:35 samuel>
@@ -165335,9 +165303,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/dec.S linux-2.6.27.19-5.
 +      BUMP("Linux-DEC")
 +      bl      save_middle_regs
 +      TAKE_EXCEPTION( 0x900 )
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emuaccel.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emuaccel.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emuaccel.S     2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/emuaccel.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/emuaccel.S       Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,188 @@
 +/*
 + *   Creation Date: <2003/01/24 13:54:52 samuel>
@@ -165527,9 +165495,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emuaccel.S linux-2.6.27.
 +      .long   0, 0, 0 /* end marker */
 +
 +      .text
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emulation.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emulation.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/emulation.S    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/emulation.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/emulation.S      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,714 @@
 +/*
 + *   Creation Date: <97/07/26 18:23:02 samuel>
@@ -166245,9 +166213,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/emulation.S linux-2.6.27
 +      .long   K_SPLIT_SR_BASE,        K_USER_SR_BASE,         K_UNMAPPED_SR_BASE,     0       /* PR|DR */
 +      .long   K_SPLIT_SR_BASE,        K_UNMAPPED_SR_BASE,     K_USER_SR_BASE,         0       /* PR|IR */
 +      .long   K_USER_SR_BASE,         K_USER_SR_BASE,         K_USER_SR_BASE,         0       /* PR|DR|IR */
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/entry.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/entry.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/entry.S        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/entry.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/entry.S  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,433 @@
 +/*
 + *   Creation Date: <2001/01/30 00:22:35 samuel>
@@ -166682,9 +166650,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/entry.S linux-2.6.27.19-
 +      mtcrf   MMU_CR_FIELD,r5         // clear FBIT_LoadSegreg and FBIT_PrepareSplitmode
 +      mtspr   DBAT0U,r4
 +      b       1b
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/iopage.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/iopage.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/iopage.S       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/iopage.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/iopage.S Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,89 @@
 +/*
 + *   Creation Date: <97/07/26 18:23:02 samuel>
@@ -166775,9 +166743,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/iopage.S linux-2.6.27.19
 +      // r4 = mphys_ioaddr
 +      // r5 = usr_data
 +      MAC_EXIT( RVEC_IO_WRITE )
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/linux.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/linux.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/linux.S        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/linux.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/linux.S  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,129 @@
 +/*
 + *   Creation Date: <2001/02/24 14:08:28 samuel>
@@ -166908,9 +166876,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/linux.S linux-2.6.27.19-
 +RELOC_LOW_END(xx_store_pte_lowmem)
 +
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/ptintercept.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/ptintercept.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/ptintercept.S  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/ptintercept.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/ptintercept.S    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,303 @@
 +/*
 + *   Creation Date: <2001/03/17 18:00:05 samuel>
@@ -167215,9 +167183,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/ptintercept.S linux-2.6.
 +
 +      LOADI   r3,EXTERN(do_intercept_tlbie_block)
 +      b       call_kernel
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/splitmode.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/splitmode.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/splitmode.S    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/splitmode.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/splitmode.S      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,428 @@
 +/*
 + *   Creation Date: <2000/07/11 03:38:32 samuel>
@@ -167647,9 +167615,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/splitmode.S linux-2.6.27
 +splitmode_lock:
 +      .long   0
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/traps.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/traps.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/traps.S        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/traps.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/traps.S  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,501 @@
 +/*
 + *   Creation Date: <2001/01/27 16:25:14 samuel>
@@ -168152,9 +168120,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/traps.S linux-2.6.27.19-
 +GLOBAL_SYMBOL(__end_bumptable):
 +      .text
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/vsid.S linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/vsid.S
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm-files/vsid.S 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm-files/vsid.S
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm-files/vsid.S   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,123 @@
 +/*
 + *   Creation Date: <2003/03/06 22:03:59 samuel>
@@ -168279,9 +168247,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm-files/vsid.S linux-2.6.27.19-5
 +      BUMP("mtsr_")
 +      b       emulation_done
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/asm_offsets.c linux-2.6.27.19-5.1/drivers/macintosh/mol/asm_offsets.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/asm_offsets.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/asm_offsets.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/asm_offsets.c      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,161 @@
 +/*
 + * This program is used to generate definitions needed by
@@ -168444,9 +168412,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/asm_offsets.c linux-2.6.27.19-5.1/
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/context.c linux-2.6.27.19-5.1/drivers/macintosh/mol/context.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/context.c        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/context.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/context.c  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,99 @@
 +/*
 + *   Creation Date: <1998-11-20 16:18:20 samuel>
@@ -168547,9 +168515,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/context.c linux-2.6.27.19-5.1/driv
 +      vsid += MUNGE_ESID_ADD * (mol_context & 0xf);
 +      return (vsid & VSID_MASK);
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/emu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/emu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/emu.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/emu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/emu.c      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,228 @@
 +/*
 + *   Creation Date: <1998-11-21 16:07:47 samuel>
@@ -168779,9 +168747,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/emu.c linux-2.6.27.19-5.1/drivers/
 +      /* printk("emuaccel_mapin: %08x\n", mphys ); */
 +      return mphys;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/fault.c linux-2.6.27.19-5.1/drivers/macintosh/mol/fault.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/fault.c  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/fault.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/fault.c    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,601 @@
 +/*
 + *   Creation Date: <2002/06/08 20:53:20 samuel>
@@ -169384,9 +169352,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/fault.c linux-2.6.27.19-5.1/driver
 +      *ret_mphys = pb.mphys_page | (va & 0xfff);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/hash.c linux-2.6.27.19-5.1/drivers/macintosh/mol/hash.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/hash.c   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/hash.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/hash.c     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,126 @@
 +/*
 + *   Creation Date: <2004/02/14 11:42:19 samuel>
@@ -169514,9 +169482,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/hash.c linux-2.6.27.19-5.1/drivers
 +      memset( &ptehash, 0, sizeof(ptehash) );
 +      memset( &hs, 0, sizeof(hs) );
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/actions.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/actions.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/actions.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/actions.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/actions.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,177 @@
 +/*
 + *   Creation Date: <2004/01/31 13:08:42 samuel>
@@ -169695,9 +169663,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/actions.h linux-2.6.27.19-
 +
 +
 +#endif   /* _H_ACTIONS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/alloc.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/alloc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/alloc.h  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/alloc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/alloc.h    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,70 @@
 +/*
 + *   Creation Date: <2002/01/13 16:35:18 samuel>
@@ -169769,9 +169737,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/alloc.h linux-2.6.27.19-5.
 +
 +
 +#endif   /* _H_ALLOC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/archinclude.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/archinclude.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/archinclude.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/archinclude.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/archinclude.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,80 @@
 +/*
 + *   Creation Date: <2002/01/12 22:11:51 samuel>
@@ -169853,9 +169821,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/archinclude.h linux-2.6.27
 +
 +
 +#endif   /* _H_ARCHINCLUDE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm.m4 linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm.m4
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm.m4   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asm.m4
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asm.m4     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,141 @@
 +/*  -*- asm -*-
 + *   Creation Date: <2001/12/30 20:08:53 samuel>
@@ -169998,9 +169966,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm.m4 linux-2.6.27.19-5.1
 +])
 +
 +divert(0)dnl
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm_offsets.inc linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm_offsets.inc
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asm_offsets.inc  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asm_offsets.inc
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asm_offsets.inc    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,136 @@
 +/* -*-c-*-
 + *   Creation Date: <2001/10/20 17:51:10 samuel>
@@ -170138,9 +170106,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/asm_offsets.inc linux-2.6.
 +      K_DEF( K_KCALL_ARG2, kcall_args[2] );
 +#endif
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdbg.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdbg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdbg.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmdbg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmdbg.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,184 @@
 +/*
 + *   Creation Date: <2004/01/29 20:12:41 samuel>
@@ -170326,9 +170294,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdbg.h linux-2.6.27.19-5
 +
 +
 +#endif   /* _H_ASMDBG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdefs.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdefs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmdefs.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmdefs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmdefs.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,397 @@
 +/*   -*- asm -*-
 + *
@@ -170727,9 +170695,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmdefs.h linux-2.6.27.19-
 +
 +#endif   /* _H_ASMDEFS */
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmfuncs.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmfuncs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/asmfuncs.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/asmfuncs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/asmfuncs.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,80 @@
 +/*
 + *   Creation Date: <1999/09/26 01:02:58 samuel>
@@ -170811,9 +170779,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/asmfuncs.h linux-2.6.27.19
 +      return pvr==3 || pvr==6 || pvr==7;      /* 603, 603e, 603ev */
 +}
 +#endif   /* _H_ASMFUNCS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/atomic.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/atomic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/atomic.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/atomic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/atomic.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,26 @@
 +/*
 + *   Creation Date: <2004/01/25 17:00:12 samuel>
@@ -170841,9 +170809,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/atomic.h linux-2.6.27.19-5
 +#define atomic_read_mol(x)            atomic_read(x)
 +
 +#endif   /* _H_ATOMIC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/config.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/config.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/config.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,90 @@
 +/* config.h.  Generated from config.h.in by configure.  */
 +/* config.h.in.  Generated from configure.in by autoheader.  */
@@ -170935,9 +170903,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/config.h linux-2.6.27.19-5
 +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
 +   `char[]'. */
 +#define YYTEXT_POINTER 1
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/constants.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/constants.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/constants.h      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/constants.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/constants.h        Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,36 @@
 +/*
 + *   Creation Date: <2001/02/11 18:19:42 samuel>
@@ -170975,9 +170943,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/constants.h linux-2.6.27.1
 +#endif   /* _H_CONSTANTS */
 +
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/context.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/context.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/context.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/context.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/context.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,62 @@
 +/*
 + *   Creation Date: <2004/01/25 17:48:51 samuel>
@@ -171041,9 +171009,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/context.h linux-2.6.27.19-
 +
 +
 +#endif   /* _H_CONTEXT */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/dbg.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/dbg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/dbg.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/dbg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/dbg.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,31 @@
 +/*
 + *   Creation Date: <2004/04/10 22:14:43 samuel>
@@ -171076,9 +171044,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/dbg.h linux-2.6.27.19-5.1/
 +#endif /* CONFIG_MOL_HOSTED */
 +
 +#endif   /* _H_DBG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/debugger.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/debugger.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/debugger.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/debugger.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/debugger.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,96 @@
 +/*
 + *   Creation Date: <1999/02/22 22:46:22 samuel>
@@ -171176,9 +171144,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/debugger.h linux-2.6.27.19
 +extern int    __dbg ea_to_lvptr( ulong ea, int context, char **lvptr, int data_access );
 +
 +#endif   /* _H_DEBUGGER */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/emu.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emu.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emu.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/emu.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/emu.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,29 @@
 +/*
 + *   Creation Date: <2003/01/26 00:45:55 samuel>
@@ -171209,9 +171177,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/emu.h linux-2.6.27.19-5.1/
 +
 +
 +#endif   /* _H_EMU */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/emuaccel_sh.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emuaccel_sh.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/emuaccel_sh.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/emuaccel_sh.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/emuaccel_sh.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,41 @@
 +/*
 + *   Creation Date: <2003/01/25 14:57:36 samuel>
@@ -171254,9 +171222,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/emuaccel_sh.h linux-2.6.27
 +
 +
 +#endif   /* _H_EMUACCEL */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/extralib.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/extralib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/extralib.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/extralib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/extralib.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,70 @@
 +/*
 + *   Creation Date: <1997/07/02 19:52:18 samuel>
@@ -171328,9 +171296,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/extralib.h linux-2.6.27.19
 +#define C_RED           "\33[1;31m"
 +
 +#endif   /* _H_EXTRALIB */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/hash.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/hash.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/hash.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/hash.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/hash.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,36 @@
 +/*
 + *   Creation Date: <2004/02/14 11:45:23 samuel>
@@ -171368,9 +171336,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/hash.h linux-2.6.27.19-5.1
 +
 +
 +#endif   /* _H_HASH */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/kernel_vars.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/kernel_vars.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/kernel_vars.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/kernel_vars.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/kernel_vars.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,225 @@
 +/*
 + *   Creation Date: <97/07/14 15:53:06 samuel>
@@ -171597,9 +171565,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/kernel_vars.h linux-2.6.27
 +
 +#endif /* __ASSEMBLY__ */
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/locks.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/locks.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/locks.h  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/locks.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/locks.h    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,39 @@
 +/*
 + *   Creation Date: <2004/01/25 16:31:13 samuel>
@@ -171640,9 +171608,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/locks.h linux-2.6.27.19-5.
 +
 +
 +#endif   /* _H_LOCKS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mac_registers.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mac_registers.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mac_registers.h  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mac_registers.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mac_registers.h    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,168 @@
 +/*
 + *   Creation Date: <97/06/24 22:25:04 samuel>
@@ -171812,9 +171780,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mac_registers.h linux-2.6.
 +#endif
 +
 +#endif /* _MAC_REGISTERS_H */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/map.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/map.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/map.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/map.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/map.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,43 @@
 +/*
 + *   Creation Date: <2004/03/13 13:25:42 samuel>
@@ -171859,9 +171827,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/map.h linux-2.6.27.19-5.1/
 +#endif
 +
 +#endif   /* _H_MAP */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/misc.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/misc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/misc.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/misc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/misc.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,105 @@
 +/*
 + *   Creation Date: <97/06/16 18:02:12 samuel>
@@ -171968,9 +171936,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/misc.h linux-2.6.27.19-5.1
 +        _x > _y ? _x : _y; })
 +
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,102 @@
 +/*
 + *   Creation Date: <1998-11-11 13:55:49 samuel>
@@ -172074,9 +172042,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu.h linux-2.6.27.19-5.1/
 +
 +#endif   /* __ASSEMBLY__ */
 +#endif   /* _H_MMU */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_contexts.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_contexts.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_contexts.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu_contexts.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu_contexts.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,55 @@
 +/*
 + *   Creation Date: <97/07/17 14:26:14 samuel>
@@ -172133,9 +172101,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_contexts.h linux-2.6.2
 +
 +
 +#endif   /* _H_MMU_CONTEXTS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_mappings.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_mappings.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmu_mappings.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmu_mappings.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmu_mappings.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,48 @@
 +/*
 + *   Creation Date: <1998-10-31 03:11:06 samuel>
@@ -172185,9 +172153,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmu_mappings.h linux-2.6.2
 +#endif
 +
 +#endif   /* _H_MMU_MAPPINGS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmutypes.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmutypes.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mmutypes.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mmutypes.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mmutypes.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,76 @@
 +/*
 + *   Creation Date: <2002/01/13 13:53:14 samuel>
@@ -172265,9 +172233,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mmutypes.h linux-2.6.27.19
 +
 +
 +#endif   /* _H_MMUTYPES */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol-ioctl.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol-ioctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol-ioctl.h      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mol-ioctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mol-ioctl.h        Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,123 @@
 +/*
 + *   Creation Date: <2003/08/26 10:53:07 samuel>
@@ -172392,9 +172360,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol-ioctl.h linux-2.6.27.1
 +#define EMOLSECURITY                  103
 +
 +#endif   /* _H_MOL_IOCTL */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol_config.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mol_config.h     2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mol_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mol_config.h       Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,76 @@
 +/*
 + *   Creation Date: <1999/05/30 15:30:25 samuel>
@@ -172472,9 +172440,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mol_config.h linux-2.6.27.
 +#endif
 +
 +#endif   /* _H_MOL_CONFIG */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/molasm.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molasm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molasm.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/molasm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/molasm.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,138 @@
 +/*   -*- asm -*-
 + *
@@ -172614,9 +172582,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/molasm.h linux-2.6.27.19-5
 +
 +
 +#endif   /* _H_MOLASM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/molversion.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molversion.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/molversion.h     2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/molversion.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/molversion.h       Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,6 @@
 +#define MOL_BUILD_DATE "Okt 13 2007 11:49"
 +#define MOL_VERSION_STR "0.9.73"
@@ -172624,9 +172592,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/molversion.h linux-2.6.27.
 +#define MOL_MAJOR_VERSION 0
 +#define MOL_MINOR_VERSION 9
 +#define MOL_PATCHLEVEL 73
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/mtable.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mtable.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/mtable.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/mtable.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/mtable.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,71 @@
 +/*
 + *   Creation Date: <2002/05/26 15:52:50 samuel>
@@ -172699,9 +172667,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/mtable.h linux-2.6.27.19-5
 +#endif   /* _H_MTABLE */
 +
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/osi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/osi.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,170 @@
 +/*
 + *   Creation Date: <1999/03/18 03:19:43 samuel>
@@ -172873,9 +172841,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi.h linux-2.6.27.19-5.1/
 +#define NUM_OSI_SELECTORS             100     /* remember to increase this... */
 +
 +#endif   /* _H_OSI */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi_calls.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi_calls.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/osi_calls.h      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/osi_calls.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/osi_calls.h        Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,475 @@
 +/*
 + *   Creation Date: <2002/06/16 01:40:57 samuel>
@@ -173352,9 +173320,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/osi_calls.h linux-2.6.27.1
 +static inline _osi_call0( int, OSI_TTYIRQAck, OSI_TTY_IRQ_ACK );
 +
 +#endif   /* _H_OSI_CALLS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/performance.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/performance.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/performance.h    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/performance.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/performance.h      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,71 @@
 +/*
 + *   Creation Date: <2001/04/01 00:44:40 samuel>
@@ -173427,9 +173395,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/performance.h linux-2.6.27
 +#endif
 +
 +#endif   /* _H_PERFORMANCE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/platform.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/platform.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/platform.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/platform.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/platform.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,73 @@
 +/*
 + *   Creation Date: <2001/12/29 19:46:46 samuel>
@@ -173504,9 +173472,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/platform.h linux-2.6.27.19
 +#endif
 +
 +#endif   /* _H_PLATFORM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/processor.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/processor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/processor.h      2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/processor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/processor.h        Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,409 @@
 +/*
 + *   Creation Date: <2000/10/29 01:43:29 samuel>
@@ -173917,9 +173885,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/processor.h linux-2.6.27.1
 +
 +#endif   /* _H_PROCESSOR */
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/prom.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/prom.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/prom.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/prom.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/prom.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,46 @@
 +/*
 + *   Creation Date: <1999/02/22 23:22:17 samuel>
@@ -173967,9 +173935,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/prom.h linux-2.6.27.19-5.1
 +} mol_device_node_t;
 +
 +#endif   /* _H_PROM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/rvec.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/rvec.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/rvec.h   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/rvec.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/rvec.h     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,147 @@
 +/*
 + *   Creation Date: <2001/01/26 21:33:45 samuel>
@@ -174118,9 +174086,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/rvec.h linux-2.6.27.19-5.1
 +#endif /* __KERNEL__ || __MPC107__ */
 +
 +#endif   /* _H_RVEC */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/skiplist.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/skiplist.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/skiplist.h       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/skiplist.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/skiplist.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,87 @@
 +/*
 + *   Creation Date: <2003/03/03 22:59:04 samuel>
@@ -174209,9 +174177,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/skiplist.h linux-2.6.27.19
 +
 +
 +#endif   /* _H_SKIPLIST */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/tlbie.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/tlbie.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/tlbie.h  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/tlbie.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/tlbie.h    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,102 @@
 +/*
 + *   Creation Date: <2003/05/27 16:56:10 samuel>
@@ -174315,9 +174283,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/tlbie.h linux-2.6.27.19-5.
 +
 +
 +#endif   /* _H_TLBIE */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/uaccess.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/uaccess.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/uaccess.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/uaccess.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/uaccess.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,36 @@
 +/*
 + *   Creation Date: <2004/02/01 20:02:11 samuel>
@@ -174355,9 +174323,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/uaccess.h linux-2.6.27.19-
 +
 +
 +#endif   /* _H_UACCESS */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/vector.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/vector.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/vector.h 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/vector.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/vector.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,189 @@
 +/*
 + *   Creation Date: <2003/05/26 00:00:28 samuel>
@@ -174548,9 +174516,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/vector.h linux-2.6.27.19-5
 +
 +#endif         /* MOLMPC */
 +#endif   /* _H_VECTOR */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/version.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/version.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/version.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/version.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/version.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,11 @@
 +
 +#ifndef _H_VERSION
@@ -174563,9 +174531,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/version.h linux-2.6.27.19-
 +                       + MOL_PATCHLEVEL )
 +
 +#endif   /* _H_VERSION */
-diff -purN linux-2.6.27/drivers/macintosh/mol/include/weaksym.h linux-2.6.27.19-5.1/drivers/macintosh/mol/include/weaksym.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/include/weaksym.h        2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/include/weaksym.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/include/weaksym.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,39 @@
 +/*
 + *   Creation Date: <2001/08/02 23:53:57 samuel>
@@ -174606,9 +174574,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/include/weaksym.h linux-2.6.27.19-
 +
 +
 +#endif   /* _H_WEAKSYM */
-diff -purN linux-2.6.27/drivers/macintosh/mol/init.c linux-2.6.27.19-5.1/drivers/macintosh/mol/init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/init.c   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/init.c     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,191 @@
 +/*
 + *   Creation Date: <2002/01/13 20:45:37 samuel>
@@ -174801,9 +174769,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/init.c linux-2.6.27.19-5.1/drivers
 +
 +      return g_sesstab->magic;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/misc.c linux-2.6.27.19-5.1/drivers/macintosh/mol/misc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/misc.c   2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/misc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/misc.c     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,255 @@
 +/*
 + *   Creation Date: <2003/06/06 20:00:52 samuel>
@@ -175060,9 +175028,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/misc.c linux-2.6.27.19-5.1/drivers
 +      }
 +      return ret;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu.c      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,251 @@
 +/*
 + *   Creation Date: <1998-11-11 11:56:45 samuel>
@@ -175315,9 +175283,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/mmu.c linux-2.6.27.19-5.1/drivers/
 +      }
 +      return num_match;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_fb.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_fb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_fb.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_fb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_fb.c   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,186 @@
 +/*
 + *   Creation Date: <1999-12-28 14:03:18 samuel>
@@ -175505,9 +175473,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_fb.c linux-2.6.27.19-5.1/drive
 +      }
 +      return n;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_io.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_io.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_io.c   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,470 @@
 +/*
 + *   Creation Date: <1998-12-02 03:23:31 samuel>
@@ -175979,9 +175947,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_io.c linux-2.6.27.19-5.1/drive
 +      remove_block_trans( kv, m->id );
 +      m->id = 0;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_tracker.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_tracker.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mmu_tracker.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mmu_tracker.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mmu_tracker.c      Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,128 @@
 +/*
 + *   Creation Date: <2000/09/07 20:36:54 samuel>
@@ -176111,9 +176079,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/mmu_tracker.c linux-2.6.27.19-5.1/
 +              printk("set_track_buffer: Bad access\n");
 +      }
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/mtable.c linux-2.6.27.19-5.1/drivers/macintosh/mol/mtable.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/mtable.c 2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/mtable.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/mtable.c   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,960 @@
 +/*
 + *   Creation Date: <2002/05/26 14:46:42 samuel>
@@ -177075,9 +177043,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/mtable.c linux-2.6.27.19-5.1/drive
 +#ifdef UL_DEBUG
 +#include "mtable_dbg.c"
 +#endif
-diff -purN linux-2.6.27/drivers/macintosh/mol/ptaccess.c linux-2.6.27.19-5.1/drivers/macintosh/mol/ptaccess.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/ptaccess.c       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/ptaccess.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/ptaccess.c Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,153 @@
 +/*
 + *   Creation Date: <2001/03/25 18:04:45 samuel>
@@ -177232,9 +177200,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/ptaccess.c linux-2.6.27.19-5.1/dri
 +
 +#endif        /* EMULATE_603 */
 +
-diff -purN linux-2.6.27/drivers/macintosh/mol/sheep.c linux-2.6.27.19-5.1/drivers/macintosh/mol/sheep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/sheep.c  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/sheep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/sheep.c    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,701 @@
 +/*
 + *  sheep_net.c - Linux driver for SheepShaver/Basilisk II networking (access to raw Ethernet packets)
@@ -177937,9 +177905,9 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/sheep.c linux-2.6.27.19-5.1/driver
 +{
 +      (void) misc_deregister( &sheep_net_device );
 +}
-diff -purN linux-2.6.27/drivers/macintosh/mol/skiplist.c linux-2.6.27.19-5.1/drivers/macintosh/mol/skiplist.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/mol/skiplist.c       2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/macintosh/mol/skiplist.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/macintosh/mol/skiplist.c Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,222 @@
 +/*
 + *   Creation Date: <2003/03/03 23:19:47 samuel>
@@ -178163,10 +178131,10 @@ diff -purN linux-2.6.27/drivers/macintosh/mol/skiplist.c linux-2.6.27.19-5.1/dri
 +      for( i=0; i < SKIPLIST_MAX_HEIGHT ; i++ )
 +              sl->root[i] = nilptr;
 +}
-diff -purN linux-2.6.27/drivers/macintosh/smu.c linux-2.6.27.19-5.1/drivers/macintosh/smu.c
---- linux-2.6.27/drivers/macintosh/smu.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/smu.c        2009-03-25 16:11:14.000000000 +0000
-@@ -670,6 +670,7 @@ static struct of_device_id smu_platform_
+diff -r 9608d5473017 drivers/macintosh/smu.c
+--- a/drivers/macintosh/smu.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/smu.c  Wed May 06 16:56:20 2009 +0100
+@@ -670,6 +670,7 @@
  
  static struct of_platform_driver smu_of_platform_driver =
  {
@@ -178174,10 +178142,10 @@ diff -purN linux-2.6.27/drivers/macintosh/smu.c linux-2.6.27.19-5.1/drivers/maci
        .name           = "smu",
        .match_table    = smu_platform_match,
        .probe          = smu_platform_probe,
-diff -purN linux-2.6.27/drivers/macintosh/therm_pm72.c linux-2.6.27.19-5.1/drivers/macintosh/therm_pm72.c
---- linux-2.6.27/drivers/macintosh/therm_pm72.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/therm_pm72.c 2009-03-25 16:11:14.000000000 +0000
-@@ -2220,6 +2220,7 @@ static struct of_device_id fcu_match[] =
+diff -r 9608d5473017 drivers/macintosh/therm_pm72.c
+--- a/drivers/macintosh/therm_pm72.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/therm_pm72.c   Wed May 06 16:56:20 2009 +0100
+@@ -2220,6 +2220,7 @@
  
  static struct of_platform_driver fcu_of_platform_driver = 
  {
@@ -178185,10 +178153,10 @@ diff -purN linux-2.6.27/drivers/macintosh/therm_pm72.c linux-2.6.27.19-5.1/drive
        .name           = "temperature",
        .match_table    = fcu_match,
        .probe          = fcu_of_probe,
-diff -purN linux-2.6.27/drivers/macintosh/therm_windtunnel.c linux-2.6.27.19-5.1/drivers/macintosh/therm_windtunnel.c
---- linux-2.6.27/drivers/macintosh/therm_windtunnel.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/therm_windtunnel.c   2009-03-25 16:11:14.000000000 +0000
-@@ -470,6 +470,7 @@ static struct of_device_id therm_of_matc
+diff -r 9608d5473017 drivers/macintosh/therm_windtunnel.c
+--- a/drivers/macintosh/therm_windtunnel.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/therm_windtunnel.c     Wed May 06 16:56:20 2009 +0100
+@@ -470,6 +470,7 @@
  };
  
  static struct of_platform_driver therm_of_driver = {
@@ -178196,10 +178164,10 @@ diff -purN linux-2.6.27/drivers/macintosh/therm_windtunnel.c linux-2.6.27.19-5.1
        .name           = "temperature",
        .match_table    = therm_of_match,
        .probe          = therm_of_probe,
-diff -purN linux-2.6.27/drivers/macintosh/via-pmu-led.c linux-2.6.27.19-5.1/drivers/macintosh/via-pmu-led.c
---- linux-2.6.27/drivers/macintosh/via-pmu-led.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/macintosh/via-pmu-led.c        2009-03-25 16:11:14.000000000 +0000
-@@ -72,7 +72,7 @@ static void pmu_led_set(struct led_class
+diff -r 9608d5473017 drivers/macintosh/via-pmu-led.c
+--- a/drivers/macintosh/via-pmu-led.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/macintosh/via-pmu-led.c  Wed May 06 16:56:20 2009 +0100
+@@ -72,7 +72,7 @@
  }
  
  static struct led_classdev pmu_led = {
@@ -178208,10 +178176,10 @@ diff -purN linux-2.6.27/drivers/macintosh/via-pmu-led.c linux-2.6.27.19-5.1/driv
  #ifdef CONFIG_ADB_PMU_LED_IDE
        .default_trigger = "ide-disk",
  #endif
-diff -purN linux-2.6.27/drivers/md/Kconfig linux-2.6.27.19-5.1/drivers/md/Kconfig
---- linux-2.6.27/drivers/md/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/Kconfig     2009-03-25 16:11:23.000000000 +0000
-@@ -269,6 +269,14 @@ config DM_DELAY
+diff -r 9608d5473017 drivers/md/Kconfig
+--- a/drivers/md/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/Kconfig       Wed May 06 16:56:20 2009 +0100
+@@ -269,6 +269,14 @@
  
        If unsure, say N.
  
@@ -178226,10 +178194,10 @@ diff -purN linux-2.6.27/drivers/md/Kconfig linux-2.6.27.19-5.1/drivers/md/Kconfi
  config DM_UEVENT
        bool "DM uevents (EXPERIMENTAL)"
        depends on BLK_DEV_DM && EXPERIMENTAL
-diff -purN linux-2.6.27/drivers/md/Makefile linux-2.6.27.19-5.1/drivers/md/Makefile
---- linux-2.6.27/drivers/md/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/Makefile    2009-03-25 16:11:23.000000000 +0000
-@@ -32,9 +32,13 @@ obj-$(CONFIG_BLK_DEV_MD)    += md-mod.o
+diff -r 9608d5473017 drivers/md/Makefile
+--- a/drivers/md/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/Makefile      Wed May 06 16:56:20 2009 +0100
+@@ -32,9 +32,13 @@
  obj-$(CONFIG_BLK_DEV_DM)      += dm-mod.o
  obj-$(CONFIG_DM_CRYPT)                += dm-crypt.o
  obj-$(CONFIG_DM_DELAY)                += dm-delay.o
@@ -178245,10 +178213,10 @@ diff -purN linux-2.6.27/drivers/md/Makefile linux-2.6.27.19-5.1/drivers/md/Makef
  obj-$(CONFIG_DM_ZERO)         += dm-zero.o
  
  quiet_cmd_unroll = UNROLL  $@
-diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitmap.c
---- linux-2.6.27/drivers/md/bitmap.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/bitmap.c    2009-03-25 16:11:23.000000000 +0000
-@@ -110,13 +110,12 @@ static int bitmap_checkpage(struct bitma
+diff -r 9608d5473017 drivers/md/bitmap.c
+--- a/drivers/md/bitmap.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/bitmap.c      Wed May 06 16:56:20 2009 +0100
+@@ -110,13 +110,12 @@
  {
        unsigned char *mappage;
  
@@ -178267,7 +178235,7 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
  
        if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */
                return 0;
-@@ -208,16 +207,19 @@ static void bitmap_checkfree(struct bitm
+@@ -208,15 +207,18 @@
   */
  
  /* IO operations when bitmap is stored near all superblocks */
@@ -178283,13 +178251,12 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
 -      struct page *page = alloc_page(GFP_KERNEL);
        sector_t target;
  
-       if (!page)
-+              page = alloc_page(GFP_KERNEL);
 +      if (!page)
++              page = alloc_page(GFP_KERNEL);
+       if (!page)
                return ERR_PTR(-ENOMEM);
  
-       rdev_for_each(rdev, tmp, mddev) {
-@@ -227,7 +229,9 @@ static struct page *read_sb_page(mddev_t
+@@ -227,7 +229,9 @@
  
                target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
  
@@ -178300,7 +178267,7 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
                        page->index = index;
                        attach_page_buffers(page, NULL); /* so that free_buffer will
                                                          * quietly no-op */
-@@ -544,7 +548,9 @@ static int bitmap_read_sb(struct bitmap 
+@@ -544,7 +548,9 @@
  
                bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
        } else {
@@ -178311,7 +178278,7 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
        }
        if (IS_ERR(bitmap->sb_page)) {
                err = PTR_ERR(bitmap->sb_page);
-@@ -564,7 +570,7 @@ static int bitmap_read_sb(struct bitmap 
+@@ -564,7 +570,7 @@
        else if (le32_to_cpu(sb->version) < BITMAP_MAJOR_LO ||
                 le32_to_cpu(sb->version) > BITMAP_MAJOR_HI)
                reason = "unrecognized superblock version";
@@ -178320,7 +178287,7 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
                reason = "bitmap chunksize too small";
        else if ((1 << ffz(~chunksize)) != chunksize)
                reason = "bitmap chunksize not a power of 2";
-@@ -957,11 +963,18 @@ static int bitmap_init_from_disk(struct 
+@@ -957,11 +963,18 @@
                                 */
                                page = bitmap->sb_page;
                                offset = sizeof(bitmap_super_t);
@@ -178340,7 +178307,7 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
                                offset = 0;
                        }
                        if (IS_ERR(page)) { /* read error */
-@@ -1332,8 +1345,8 @@ void bitmap_endwrite(struct bitmap *bitm
+@@ -1332,8 +1345,8 @@
        }
  }
  
@@ -178351,10 +178318,11 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
  {
        bitmap_counter_t *bmc;
        int rv;
-@@ -1361,6 +1374,30 @@ int bitmap_start_sync(struct bitmap *bit
+@@ -1360,6 +1373,30 @@
+       bitmap->allclean = 0;
        return rv;
  }
++
 +int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks,
 +                    int degraded)
 +{
@@ -178378,14 +178346,13 @@ diff -purN linux-2.6.27/drivers/md/bitmap.c linux-2.6.27.19-5.1/drivers/md/bitma
 +      return rv;
 +}
 +
-+
  void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted)
  {
-       bitmap_counter_t *bmc;
-diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-ioctl.c
---- linux-2.6.27/drivers/md/dm-ioctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-ioctl.c  2009-03-25 16:11:23.000000000 +0000
-@@ -233,7 +233,7 @@ static void __hash_remove(struct hash_ce
+diff -r 9608d5473017 drivers/md/dm-ioctl.c
+--- a/drivers/md/dm-ioctl.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-ioctl.c    Wed May 06 16:56:20 2009 +0100
+@@ -233,7 +233,7 @@
        }
  
        if (hc->new_map)
@@ -178394,7 +178361,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
        dm_put(hc->md);
        free_cell(hc);
  }
-@@ -827,8 +827,8 @@ static int do_resume(struct dm_ioctl *pa
+@@ -827,8 +827,8 @@
  
                r = dm_swap_table(md, new_map);
                if (r) {
@@ -178404,7 +178371,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
                        return r;
                }
  
-@@ -836,8 +836,6 @@ static int do_resume(struct dm_ioctl *pa
+@@ -836,8 +836,6 @@
                        set_disk_ro(dm_disk(md), 0);
                else
                        set_disk_ro(dm_disk(md), 1);
@@ -178413,7 +178380,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
        }
  
        if (dm_suspended(md))
-@@ -1045,6 +1043,12 @@ static int populate_table(struct dm_tabl
+@@ -1045,6 +1043,12 @@
                next = spec->next;
        }
  
@@ -178426,7 +178393,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
        return dm_table_complete(table);
  }
  
-@@ -1069,6 +1073,13 @@ static int table_load(struct dm_ioctl *p
+@@ -1069,6 +1073,13 @@
                goto out;
        }
  
@@ -178440,7 +178407,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
        down_write(&_hash_lock);
        hc = dm_get_mdptr(md);
        if (!hc || hc->md != md) {
-@@ -1080,7 +1091,7 @@ static int table_load(struct dm_ioctl *p
+@@ -1080,7 +1091,7 @@
        }
  
        if (hc->new_map)
@@ -178449,7 +178416,7 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
        hc->new_map = t;
        up_write(&_hash_lock);
  
-@@ -1109,7 +1120,7 @@ static int table_clear(struct dm_ioctl *
+@@ -1109,7 +1120,7 @@
        }
  
        if (hc->new_map) {
@@ -178458,10 +178425,10 @@ diff -purN linux-2.6.27/drivers/md/dm-ioctl.c linux-2.6.27.19-5.1/drivers/md/dm-
                hc->new_map = NULL;
        }
  
-diff -purN linux-2.6.27/drivers/md/dm-kcopyd.c linux-2.6.27.19-5.1/drivers/md/dm-kcopyd.c
---- linux-2.6.27/drivers/md/dm-kcopyd.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-kcopyd.c 2009-03-25 16:11:23.000000000 +0000
-@@ -268,6 +268,17 @@ static void push(struct list_head *jobs,
+diff -r 9608d5473017 drivers/md/dm-kcopyd.c
+--- a/drivers/md/dm-kcopyd.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-kcopyd.c   Wed May 06 16:56:20 2009 +0100
+@@ -268,6 +268,17 @@
        spin_unlock_irqrestore(&kc->job_lock, flags);
  }
  
@@ -178479,7 +178446,7 @@ diff -purN linux-2.6.27/drivers/md/dm-kcopyd.c linux-2.6.27.19-5.1/drivers/md/dm
  /*
   * These three functions process 1 item from the corresponding
   * job list.
-@@ -398,7 +409,7 @@ static int process_jobs(struct list_head
+@@ -398,7 +409,7 @@
                         * We couldn't service this job ATM, so
                         * push this job back onto the list.
                         */
@@ -178488,9 +178455,9 @@ diff -purN linux-2.6.27/drivers/md/dm-kcopyd.c linux-2.6.27.19-5.1/drivers/md/dm
                        break;
                }
  
-diff -purN linux-2.6.27/drivers/md/dm-least-pending.c linux-2.6.27.19-5.1/drivers/md/dm-least-pending.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-least-pending.c  2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-least-pending.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-least-pending.c    Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,256 @@
 +/*
 + * (C) Copyright 2008 Hewlett-Packard Development Company, L.P
@@ -178748,10 +178715,10 @@ diff -purN linux-2.6.27/drivers/md/dm-least-pending.c linux-2.6.27.19-5.1/driver
 +MODULE_AUTHOR("Sakshi Chaitanya Veni <vsakshi@hp.com>");
 +MODULE_LICENSE("GPL");
 +
-diff -purN linux-2.6.27/drivers/md/dm-linear.c linux-2.6.27.19-5.1/drivers/md/dm-linear.c
---- linux-2.6.27/drivers/md/dm-linear.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-linear.c 2009-03-25 16:11:23.000000000 +0000
-@@ -52,6 +52,7 @@ static int linear_ctr(struct dm_target *
+diff -r 9608d5473017 drivers/md/dm-linear.c
+--- a/drivers/md/dm-linear.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-linear.c   Wed May 06 16:56:20 2009 +0100
+@@ -52,6 +52,7 @@
                ti->error = "dm-linear: Device lookup failed";
                goto bad;
        }
@@ -178759,10 +178726,10 @@ diff -purN linux-2.6.27/drivers/md/dm-linear.c linux-2.6.27.19-5.1/drivers/md/dm
  
        ti->private = lc;
        return 0;
-diff -purN linux-2.6.27/drivers/md/dm-log.c linux-2.6.27.19-5.1/drivers/md/dm-log.c
---- linux-2.6.27/drivers/md/dm-log.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-log.c    2009-03-25 16:11:23.000000000 +0000
-@@ -467,6 +467,7 @@ static int create_log_context(struct dm_
+diff -r 9608d5473017 drivers/md/dm-log.c
+--- a/drivers/md/dm-log.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-log.c      Wed May 06 16:56:20 2009 +0100
+@@ -467,6 +467,7 @@
                lc->disk_header = vmalloc(buf_size);
                if (!lc->disk_header) {
                        DMWARN("couldn't allocate disk log buffer");
@@ -178770,7 +178737,7 @@ diff -purN linux-2.6.27/drivers/md/dm-log.c linux-2.6.27.19-5.1/drivers/md/dm-lo
                        kfree(lc);
                        return -ENOMEM;
                }
-@@ -482,6 +483,8 @@ static int create_log_context(struct dm_
+@@ -482,6 +483,8 @@
                DMWARN("couldn't allocate sync bitset");
                if (!dev)
                        vfree(lc->clean_bits);
@@ -178779,7 +178746,7 @@ diff -purN linux-2.6.27/drivers/md/dm-log.c linux-2.6.27.19-5.1/drivers/md/dm-lo
                vfree(lc->disk_header);
                kfree(lc);
                return -ENOMEM;
-@@ -495,6 +498,8 @@ static int create_log_context(struct dm_
+@@ -495,6 +498,8 @@
                vfree(lc->sync_bits);
                if (!dev)
                        vfree(lc->clean_bits);
@@ -178788,9 +178755,9 @@ diff -purN linux-2.6.27/drivers/md/dm-log.c linux-2.6.27.19-5.1/drivers/md/dm-lo
                vfree(lc->disk_header);
                kfree(lc);
                return -ENOMEM;
-diff -purN linux-2.6.27/drivers/md/dm-memcache.c linux-2.6.27.19-5.1/drivers/md/dm-memcache.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-memcache.c       2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-memcache.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-memcache.c Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,301 @@
 +/*
 + * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
@@ -179093,9 +179060,9 @@ diff -purN linux-2.6.27/drivers/md/dm-memcache.c linux-2.6.27.19-5.1/drivers/md/
 +MODULE_DESCRIPTION(DM_NAME " dm memory cache");
 +MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-memcache.h linux-2.6.27.19-5.1/drivers/md/dm-memcache.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-memcache.h       2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-memcache.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-memcache.h Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
@@ -179165,9 +179132,9 @@ diff -purN linux-2.6.27/drivers/md/dm-memcache.h linux-2.6.27.19-5.1/drivers/md/
 +                     struct dm_mem_cache_object *object);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/md/dm-message.c linux-2.6.27.19-5.1/drivers/md/dm-message.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-message.c        2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-message.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-message.c  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,182 @@
 +/*
 + * Copyright (C) 2007,2008 Red Hat Inc. All rights reserved.
@@ -179351,9 +179318,9 @@ diff -purN linux-2.6.27/drivers/md/dm-message.c linux-2.6.27.19-5.1/drivers/md/d
 +MODULE_DESCRIPTION(DM_NAME " device-mapper target message parser");
 +MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-message.h linux-2.6.27.19-5.1/drivers/md/dm-message.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-message.h        2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-message.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-message.h  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,91 @@
 +/*
 + * Copyright (C) 2007,2008 Red Hat, Inc. All rights reserved.
@@ -179446,9 +179413,9 @@ diff -purN linux-2.6.27/drivers/md/dm-message.h linux-2.6.27.19-5.1/drivers/md/d
 +                   int argc, char **argv);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-mpath.c
---- linux-2.6.27/drivers/md/dm-mpath.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-mpath.c  2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-mpath.c
+--- a/drivers/md/dm-mpath.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-mpath.c    Wed May 06 16:56:20 2009 +0100
 @@ -7,8 +7,6 @@
  
  #include "dm.h"
@@ -179458,7 +179425,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  #include "dm-uevent.h"
  
  #include <linux/ctype.h>
-@@ -30,9 +28,12 @@ struct pgpath {
+@@ -30,9 +28,12 @@
        struct list_head list;
  
        struct priority_group *pg;      /* Owning PG */
@@ -179471,7 +179438,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  };
  
  #define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path)
-@@ -62,8 +63,6 @@ struct multipath {
+@@ -62,8 +63,6 @@
        spinlock_t lock;
  
        const char *hw_handler_name;
@@ -179480,7 +179447,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        unsigned nr_priority_groups;
        struct list_head priority_groups;
        unsigned pg_init_required;      /* pg_init needs calling? */
-@@ -82,7 +81,7 @@ struct multipath {
+@@ -82,7 +81,7 @@
        unsigned pg_init_count;         /* Number of times pg_init called */
  
        struct work_struct process_queued_ios;
@@ -179489,7 +179456,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        unsigned queue_size;
  
        struct work_struct trigger_event;
-@@ -99,7 +98,7 @@ struct multipath {
+@@ -99,7 +98,7 @@
   */
  struct dm_mpath_io {
        struct pgpath *pgpath;
@@ -179498,7 +179465,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  };
  
  typedef int (*action_fn) (struct pgpath *pgpath);
-@@ -112,6 +111,7 @@ static struct workqueue_struct *kmultipa
+@@ -112,6 +111,7 @@
  static void process_queued_ios(struct work_struct *work);
  static void trigger_event(struct work_struct *work);
  static void activate_path(struct work_struct *work);
@@ -179506,7 +179473,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
  
  /*-----------------------------------------------
-@@ -122,8 +122,11 @@ static struct pgpath *alloc_pgpath(void)
+@@ -122,8 +122,11 @@
  {
        struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
  
@@ -179520,10 +179487,12 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        return pgpath;
  }
-@@ -133,6 +136,15 @@ static void free_pgpath(struct pgpath *p
+@@ -131,6 +134,15 @@
+ static void free_pgpath(struct pgpath *pgpath)
+ {
        kfree(pgpath);
- }
++}
++
 +static void deactivate_path(struct work_struct *work)
 +{
 +      struct pgpath *pgpath =
@@ -179531,12 +179500,10 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 +
 +      if (pgpath->path.dev)
 +              blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
-+}
-+
+ }
  static struct priority_group *alloc_priority_group(void)
- {
-       struct priority_group *pg;
-@@ -147,19 +159,11 @@ static struct priority_group *alloc_prio
+@@ -147,19 +159,11 @@
  
  static void free_pgpaths(struct list_head *pgpaths, struct dm_target *ti)
  {
@@ -179556,7 +179523,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                free_pgpath(pgpath);
        }
  }
-@@ -185,11 +189,11 @@ static struct multipath *alloc_multipath
+@@ -185,11 +189,11 @@
        m = kzalloc(sizeof(*m), GFP_KERNEL);
        if (m) {
                INIT_LIST_HEAD(&m->priority_groups);
@@ -179569,7 +179536,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache);
                if (!m->mpio_pool) {
                        kfree(m);
-@@ -237,23 +241,29 @@ static void __switch_pg(struct multipath
+@@ -237,15 +241,21 @@
        m->pg_init_count = 0;
  }
  
@@ -179585,15 +179552,15 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                return -ENXIO;
  
        m->current_pgpath = path_to_pgpath(path);
++
 +      if (!m->current_pgpath->path.dev) {
 +              m->current_pgpath = NULL;
 +              return -ENODEV;
 +      }
-+
        if (m->current_pg != pg)
                __switch_pg(m, m->current_pgpath);
+@@ -253,7 +263,7 @@
        return 0;
  }
  
@@ -179602,7 +179569,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  {
        struct priority_group *pg;
        unsigned bypassed = 1;
-@@ -265,12 +275,12 @@ static void __choose_pgpath(struct multi
+@@ -265,12 +275,12 @@
        if (m->next_pg) {
                pg = m->next_pg;
                m->next_pg = NULL;
@@ -179617,7 +179584,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                return;
  
        /*
-@@ -282,7 +292,7 @@ static void __choose_pgpath(struct multi
+@@ -282,7 +292,7 @@
                list_for_each_entry(pg, &m->priority_groups, list) {
                        if (pg->bypassed == bypassed)
                                continue;
@@ -179626,7 +179593,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                                return;
                }
        } while (bypassed--);
-@@ -309,19 +319,21 @@ static int __must_push_back(struct multi
+@@ -309,19 +319,21 @@
                dm_noflush_suspending(m->ti));
  }
  
@@ -179650,7 +179617,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        pgpath = m->current_pgpath;
  
-@@ -331,21 +343,28 @@ static int map_io(struct multipath *m, s
+@@ -331,21 +343,28 @@
        if ((pgpath && m->queue_io) ||
            (!pgpath && m->queue_if_no_path)) {
                /* Queue for the daemon to resubmit */
@@ -179683,7 +179650,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        spin_unlock_irqrestore(&m->lock, flags);
  
-@@ -383,30 +402,31 @@ static void dispatch_queued_ios(struct m
+@@ -383,30 +402,31 @@
  {
        int r;
        unsigned long flags;
@@ -179730,7 +179697,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        }
  }
  
-@@ -414,8 +434,8 @@ static void process_queued_ios(struct wo
+@@ -414,8 +434,8 @@
  {
        struct multipath *m =
                container_of(work, struct multipath, process_queued_ios);
@@ -179741,7 +179708,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        unsigned long flags;
  
        spin_lock_irqsave(&m->lock, flags);
-@@ -424,28 +444,30 @@ static void process_queued_ios(struct wo
+@@ -424,28 +444,30 @@
                goto out;
  
        if (!m->current_pgpath)
@@ -179782,7 +179749,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (!must_queue)
                dispatch_queued_ios(m);
  }
-@@ -558,6 +580,7 @@ static struct pgpath *parse_path(struct 
+@@ -558,6 +580,7 @@
  {
        int r;
        struct pgpath *p;
@@ -179790,7 +179757,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        struct multipath *m = ti->private;
  
        /* we need at least a path arg */
-@@ -570,20 +593,58 @@ static struct pgpath *parse_path(struct 
+@@ -570,19 +593,57 @@
        if (!p)
                return NULL;
  
@@ -179801,14 +179768,8 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (r) {
 -              ti->error = "error getting device";
 -              goto bad;
--      }
 +              unsigned major, minor;
--      if (m->hw_handler_name) {
--              r = scsi_dh_attach(bdev_get_queue(p->path.dev->bdev),
--                                 m->hw_handler_name);
--              if (r < 0) {
--                      dm_put_device(ti, p->path.dev);
++
 +              /* Try to add a failed device */
 +              if (r == -ENXIO && sscanf(path, "%u:%u", &major, &minor) == 2) {
 +                      dev_t dev;
@@ -179827,12 +179788,18 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 +                      p->is_active = 0;
 +              } else {
 +                      ti->error = "error getting device";
-                       goto bad;
-               }
++                      goto bad;
++              }
 +      } else {
 +              memcpy(p->path.pdev, p->path.dev->name, 16);
-+      }
-+
+       }
+-      if (m->hw_handler_name) {
+-              r = scsi_dh_attach(bdev_get_queue(p->path.dev->bdev),
+-                                 m->hw_handler_name);
+-              if (r < 0) {
+-                      dm_put_device(ti, p->path.dev);
+-                      goto bad;
 +      if (p->path.dev) {
 +              struct request_queue *q = bdev_get_queue(p->path.dev->bdev);
 +
@@ -179854,11 +179821,10 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 +              } else {
 +                      /* Play safe and detach hardware handler */
 +                      scsi_dh_detach(q);
-+              }
+               }
        }
  
-       r = ps->type->add_path(ps, &p->path, as->argc, as->argv, &ti->error);
-@@ -592,6 +653,11 @@ static struct pgpath *parse_path(struct 
+@@ -592,6 +653,11 @@
                goto bad;
        }
  
@@ -179870,7 +179836,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        return p;
  
   bad:
-@@ -745,8 +811,8 @@ static int multipath_ctr(struct dm_targe
+@@ -745,8 +811,8 @@
  {
        /* target parameters */
        static struct param _params[] = {
@@ -179881,7 +179847,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        };
  
        int r;
-@@ -821,21 +887,24 @@ static void multipath_dtr(struct dm_targ
+@@ -821,21 +887,24 @@
  }
  
  /*
@@ -179912,7 +179878,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (r < 0 || r == DM_MAPIO_REQUEUE)
                mempool_free(mpio, m->mpio_pool);
  
-@@ -852,13 +921,13 @@ static int fail_path(struct pgpath *pgpa
+@@ -852,13 +921,13 @@
  
        spin_lock_irqsave(&m->lock, flags);
  
@@ -179929,7 +179895,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
        pgpath->fail_count++;
  
        m->nr_valid_paths--;
-@@ -867,9 +936,10 @@ static int fail_path(struct pgpath *pgpa
+@@ -867,9 +936,10 @@
                m->current_pgpath = NULL;
  
        dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti,
@@ -179941,24 +179907,23 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
  out:
        spin_unlock_irqrestore(&m->lock, flags);
-@@ -888,9 +958,15 @@ static int reinstate_path(struct pgpath 
+@@ -888,8 +958,14 @@
  
        spin_lock_irqsave(&m->lock, flags);
  
 -      if (pgpath->path.is_active)
 +      if (pgpath->is_active)
                goto out;
++
 +      if (!pgpath->path.dev) {
 +              DMWARN("Cannot reinstate disabled path %s", pgpath->path.pdev);
 +              r = -ENODEV;
 +              goto out;
 +      }
-+
        if (!pgpath->pg->ps.type->reinstate_path) {
                DMWARN("Reinstate path not supported by path selector %s",
-                      pgpath->pg->ps.type->name);
-@@ -902,14 +978,14 @@ static int reinstate_path(struct pgpath 
+@@ -902,14 +978,14 @@
        if (r)
                goto out;
  
@@ -179975,17 +179940,17 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        queue_work(kmultipathd, &m->trigger_event);
  
-@@ -929,6 +1005,9 @@ static int action_dev(struct multipath *
+@@ -928,6 +1004,9 @@
+       int r = 0;
        struct pgpath *pgpath;
        struct priority_group *pg;
++
 +      if (!dev)
 +              return 0;
-+
        list_for_each_entry(pg, &m->priority_groups, list) {
                list_for_each_entry(pgpath, &pg->pgpaths, list) {
-                       if (pgpath->path.dev == dev)
-@@ -1090,79 +1169,61 @@ static void pg_init_done(struct dm_path 
+@@ -1090,79 +1169,61 @@
                pg->bypassed = 0;
        }
  
@@ -180005,7 +179970,10 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 -              container_of(work, struct multipath, activate_path);
 -      struct dm_path *path;
 -      unsigned long flags;
--
++      int ret = SCSI_DH_DEV_OFFLINED;
++      struct pgpath *pgpath =
++              container_of(work, struct pgpath, activate_path);
 -      spin_lock_irqsave(&m->lock, flags);
 -      path = &m->pgpath_to_activate->path;
 -      m->pgpath_to_activate = NULL;
@@ -180014,10 +179982,6 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 -              return;
 -      ret = scsi_dh_activate(bdev_get_queue(path->dev->bdev));
 -      pg_init_done(path, ret);
-+      int ret = SCSI_DH_DEV_OFFLINED;
-+      struct pgpath *pgpath =
-+              container_of(work, struct pgpath, activate_path);
-+
 +      if (pgpath->path.dev)
 +              ret = scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev));
 +      pg_init_done(&pgpath->path, ret);
@@ -180047,10 +180011,10 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
 -      if (!error)
 +      if (!error && !clone->errors)
                return 0;       /* I/O complete */
+-
 -      if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
 -              return error;
--
        if (error == -EOPNOTSUPP)
                return error;
  
@@ -180094,7 +180058,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                            int error, union map_info *map_context)
  {
        struct multipath *m = ti->private;
-@@ -1171,14 +1232,13 @@ static int multipath_end_io(struct dm_ta
+@@ -1171,14 +1232,13 @@
        struct path_selector *ps;
        int r;
  
@@ -180112,7 +180076,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        return r;
  }
-@@ -1289,8 +1349,8 @@ static int multipath_status(struct dm_ta
+@@ -1289,8 +1349,8 @@
                               pg->ps.type->info_args);
  
                        list_for_each_entry(p, &pg->pgpaths, list) {
@@ -180123,7 +180087,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                                       p->fail_count);
                                if (pg->ps.type->status)
                                        sz += pg->ps.type->status(&pg->ps,
-@@ -1315,7 +1375,7 @@ static int multipath_status(struct dm_ta
+@@ -1315,7 +1375,7 @@
                               pg->ps.type->table_args);
  
                        list_for_each_entry(p, &pg->pgpaths, list) {
@@ -180132,7 +180096,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                                if (pg->ps.type->status)
                                        sz += pg->ps.type->status(&pg->ps,
                                              &p->path, type, result + sz,
-@@ -1395,9 +1455,9 @@ static int multipath_ioctl(struct dm_tar
+@@ -1395,9 +1455,9 @@
        spin_lock_irqsave(&m->lock, flags);
  
        if (!m->current_pgpath)
@@ -180144,7 +180108,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
                bdev = m->current_pgpath->path.dev->bdev;
                fake_dentry.d_inode = bdev->bd_inode;
                fake_file.f_mode = m->current_pgpath->path.dev->mode;
-@@ -1414,6 +1474,75 @@ static int multipath_ioctl(struct dm_tar
+@@ -1414,6 +1474,75 @@
                                         bdev->bd_disk, cmd, arg);
  }
  
@@ -180220,7 +180184,7 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  /*-----------------------------------------------------------------
   * Module setup
   *---------------------------------------------------------------*/
-@@ -1423,13 +1552,14 @@ static struct target_type multipath_targ
+@@ -1423,13 +1552,14 @@
        .module = THIS_MODULE,
        .ctr = multipath_ctr,
        .dtr = multipath_dtr,
@@ -180237,9 +180201,9 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.c linux-2.6.27.19-5.1/drivers/md/dm-
  };
  
  static int __init dm_multipath_init(void)
-diff -purN linux-2.6.27/drivers/md/dm-mpath.h linux-2.6.27.19-5.1/drivers/md/dm-mpath.h
---- linux-2.6.27/drivers/md/dm-mpath.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-mpath.h  2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-mpath.h
+--- a/drivers/md/dm-mpath.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-mpath.h    Wed May 06 16:56:20 2009 +0100
 @@ -12,9 +12,8 @@
  struct dm_dev;
  
@@ -180251,9 +180215,9 @@ diff -purN linux-2.6.27/drivers/md/dm-mpath.h linux-2.6.27.19-5.1/drivers/md/dm-
        void *pscontext;        /* For path-selector use */
  };
  
-diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/drivers/md/dm-path-selector.c
---- linux-2.6.27/drivers/md/dm-path-selector.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-path-selector.c  2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-path-selector.c
+--- a/drivers/md/dm-path-selector.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-path-selector.c    Wed May 06 16:56:20 2009 +0100
 @@ -16,9 +16,7 @@
  
  struct ps_internal {
@@ -180264,7 +180228,7 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/driver
  };
  
  #define pst_to_psi(__pst) container_of((__pst), struct ps_internal, pst)
-@@ -44,12 +42,8 @@ static struct ps_internal *get_path_sele
+@@ -44,12 +42,8 @@
  
        down_read(&_ps_lock);
        psi = __find_path_selector_type(name);
@@ -180279,7 +180243,7 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/driver
        up_read(&_ps_lock);
  
        return psi;
-@@ -83,11 +77,7 @@ void dm_put_path_selector(struct path_se
+@@ -83,11 +77,7 @@
        if (!psi)
                goto out;
  
@@ -180292,7 +180256,7 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/driver
  out:
        up_read(&_ps_lock);
  }
-@@ -135,11 +125,6 @@ int dm_unregister_path_selector(struct p
+@@ -135,11 +125,6 @@
                return -EINVAL;
        }
  
@@ -180304,10 +180268,10 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.c linux-2.6.27.19-5.1/driver
        list_del(&psi->list);
  
        up_write(&_ps_lock);
-diff -purN linux-2.6.27/drivers/md/dm-path-selector.h linux-2.6.27.19-5.1/drivers/md/dm-path-selector.h
---- linux-2.6.27/drivers/md/dm-path-selector.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-path-selector.h  2009-03-25 16:11:23.000000000 +0000
-@@ -56,7 +56,8 @@ struct path_selector_type {
+diff -r 9608d5473017 drivers/md/dm-path-selector.h
+--- a/drivers/md/dm-path-selector.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-path-selector.h    Wed May 06 16:56:20 2009 +0100
+@@ -56,7 +56,8 @@
         * the path fails.
         */
        struct dm_path *(*select_path) (struct path_selector *ps,
@@ -180317,7 +180281,7 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.h linux-2.6.27.19-5.1/driver
  
        /*
         * Notify the selector that a path has failed.
-@@ -75,7 +76,10 @@ struct path_selector_type {
+@@ -75,7 +76,10 @@
        int (*status) (struct path_selector *ps, struct dm_path *path,
                       status_type_t type, char *result, unsigned int maxlen);
  
@@ -180329,9 +180293,9 @@ diff -purN linux-2.6.27/drivers/md/dm-path-selector.h linux-2.6.27.19-5.1/driver
  };
  
  /* Register a path selector */
-diff -purN linux-2.6.27/drivers/md/dm-queue-length.c linux-2.6.27.19-5.1/drivers/md/dm-queue-length.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-queue-length.c   2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-queue-length.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-queue-length.c     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,259 @@
 +/*
 + * Copyright (C) 2004-2005 IBM Corp.  All Rights Reserved.
@@ -180592,10 +180556,10 @@ diff -purN linux-2.6.27/drivers/md/dm-queue-length.c linux-2.6.27.19-5.1/drivers
 +      QL_VERSION ")"
 +);
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-raid1.c linux-2.6.27.19-5.1/drivers/md/dm-raid1.c
---- linux-2.6.27/drivers/md/dm-raid1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid1.c  2009-03-25 16:11:23.000000000 +0000
-@@ -727,9 +727,6 @@ static void fail_mirror(struct mirror *m
+diff -r 9608d5473017 drivers/md/dm-raid1.c
+--- a/drivers/md/dm-raid1.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-raid1.c    Wed May 06 16:56:20 2009 +0100
+@@ -727,9 +727,6 @@
        struct mirror_set *ms = m->ms;
        struct mirror *new;
  
@@ -180605,17 +180569,17 @@ diff -purN linux-2.6.27/drivers/md/dm-raid1.c linux-2.6.27.19-5.1/drivers/md/dm-
        /*
         * error_count is used for nothing more than a
         * simple way to tell if a device has encountered
-@@ -740,6 +737,9 @@ static void fail_mirror(struct mirror *m
-       if (test_and_set_bit(error_type, &m->error_type))
-               return;
+@@ -738,6 +735,9 @@
+       atomic_inc(&m->error_count);
  
-+      if (!errors_handled(ms))
+       if (test_and_set_bit(error_type, &m->error_type))
 +              return;
 +
-       if (m != get_default_mirror(ms))
-               goto out;
++      if (!errors_handled(ms))
+               return;
  
-@@ -1598,6 +1598,7 @@ static void mirror_dtr(struct dm_target 
+       if (m != get_default_mirror(ms))
+@@ -1598,6 +1598,7 @@
  
        del_timer_sync(&ms->timer);
        flush_workqueue(ms->kmirrord_wq);
@@ -180623,9 +180587,9 @@ diff -purN linux-2.6.27/drivers/md/dm-raid1.c linux-2.6.27.19-5.1/drivers/md/dm-
        dm_kcopyd_client_destroy(ms->kcopyd_client);
        destroy_workqueue(ms->kmirrord_wq);
        free_context(ms, ti, ms->nr_mirrors);
-diff -purN linux-2.6.27/drivers/md/dm-raid45.c linux-2.6.27.19-5.1/drivers/md/dm-raid45.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid45.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-raid45.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-raid45.c   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,4516 @@
 +/*
 + * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
@@ -185143,9 +185107,9 @@ diff -purN linux-2.6.27/drivers/md/dm-raid45.c linux-2.6.27.19-5.1/drivers/md/dm
 +MODULE_DESCRIPTION(DM_NAME " raid4/5 target");
 +MODULE_AUTHOR("Heinz Mauelshagen <hjm@redhat.com>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-raid45.h linux-2.6.27.19-5.1/drivers/md/dm-raid45.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-raid45.h 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-raid45.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-raid45.h   Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,28 @@
 +/*
 + * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
@@ -185175,9 +185139,9 @@ diff -purN linux-2.6.27/drivers/md/dm-raid45.h linux-2.6.27.19-5.1/drivers/md/dm
 +};
 +
 +#endif
-diff -purN linux-2.6.27/drivers/md/dm-regions.c linux-2.6.27.19-5.1/drivers/md/dm-regions.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-regions.c        2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-regions.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-regions.c  Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,723 @@
 +/*
 + * Copyright (C) 2003 Sistina Software Limited.
@@ -185902,10 +185866,10 @@ diff -purN linux-2.6.27/drivers/md/dm-regions.c linux-2.6.27.19-5.1/drivers/md/d
 +MODULE_DESCRIPTION(DM_NAME " region hash");
 +MODULE_AUTHOR("Joe Thornber/Heinz Mauelshagen <hjm@redhat.com>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-round-robin.c linux-2.6.27.19-5.1/drivers/md/dm-round-robin.c
---- linux-2.6.27/drivers/md/dm-round-robin.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-round-robin.c    2009-03-25 16:11:23.000000000 +0000
-@@ -160,7 +160,7 @@ static int rr_reinstate_path(struct path
+diff -r 9608d5473017 drivers/md/dm-round-robin.c
+--- a/drivers/md/dm-round-robin.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-round-robin.c      Wed May 06 16:56:20 2009 +0100
+@@ -160,7 +160,7 @@
  }
  
  static struct dm_path *rr_select_path(struct path_selector *ps,
@@ -185914,9 +185878,9 @@ diff -purN linux-2.6.27/drivers/md/dm-round-robin.c linux-2.6.27.19-5.1/drivers/
  {
        struct selector *s = (struct selector *) ps->context;
        struct path_info *pi = NULL;
-diff -purN linux-2.6.27/drivers/md/dm-service-time.c linux-2.6.27.19-5.1/drivers/md/dm-service-time.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-service-time.c   2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-service-time.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/md/dm-service-time.c     Wed May 06 16:56:20 2009 +0100
 @@ -0,0 +1,312 @@
 +/*
 + * Copyright (C) 2007-2008 NEC Corporation.  All Rights Reserved.
@@ -186230,10 +186194,10 @@ diff -purN linux-2.6.27/drivers/md/dm-service-time.c linux-2.6.27.19-5.1/drivers
 +MODULE_DESCRIPTION(DM_NAME " throughput oriented path selector");
 +MODULE_AUTHOR("Kiyoshi Ueda <k-ueda@ct.jp.nec.com>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/md/dm-snap.c linux-2.6.27.19-5.1/drivers/md/dm-snap.c
---- linux-2.6.27/drivers/md/dm-snap.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-snap.c   2009-03-25 16:11:23.000000000 +0000
-@@ -824,8 +824,10 @@ static struct bio *put_pending_exception
+diff -r 9608d5473017 drivers/md/dm-snap.c
+--- a/drivers/md/dm-snap.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-snap.c     Wed May 06 16:56:20 2009 +0100
+@@ -824,8 +824,10 @@
         * the bios for the original write to the origin.
         */
        if (primary_pe &&
@@ -186245,22 +186209,22 @@ diff -purN linux-2.6.27/drivers/md/dm-snap.c linux-2.6.27.19-5.1/drivers/md/dm-s
  
        /*
         * Free the pe if it's not linked to an origin write or if
-@@ -834,12 +836,6 @@ static struct bio *put_pending_exception
+@@ -833,12 +835,6 @@
+        */
        if (!primary_pe || primary_pe != pe)
                free_pending_exception(pe);
+-
 -      /*
 -       * Free the primary pe if nothing references it.
 -       */
 -      if (primary_pe && !atomic_read(&primary_pe->ref_count))
 -              free_pending_exception(primary_pe);
--
        return origin_bios;
  }
-diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-table.c
---- linux-2.6.27/drivers/md/dm-table.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm-table.c  2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm-table.c
+--- a/drivers/md/dm-table.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm-table.c    Wed May 06 16:56:20 2009 +0100
 @@ -1,6 +1,6 @@
  /*
   * Copyright (C) 2001 Sistina Software (UK) Limited.
@@ -186277,10 +186241,11 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  #include <asm/atomic.h>
  
  #define DM_MSG_PREFIX "table"
-@@ -24,6 +25,19 @@
+@@ -23,6 +24,19 @@
+ #define NODE_SIZE L1_CACHE_BYTES
  #define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
  #define CHILDREN_PER_NODE (KEYS_PER_NODE + 1)
++
 +/*
 + * The table has always exactly one reference from either mapped_device->map
 + * or hash_cell->new_map. This reference is not counted in table->holders.
@@ -186293,21 +186258,20 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
 + * When the table is about to be destroyed, we wait for table->holders to
 + * drop to zero.
 + */
-+
  struct dm_table {
        struct mapped_device *md;
-       atomic_t holders;
-@@ -38,6 +52,9 @@ struct dm_table {
+@@ -37,6 +51,9 @@
+       unsigned int num_allocated;
        sector_t *highs;
        struct dm_target *targets;
++
 +      unsigned single_device : 1;
 +      unsigned barrier_supported : 1;
-+
        /*
         * Indicates the rw permissions for the new logical
-        * device.  This should be a combination of FMODE_READ
-@@ -108,6 +125,8 @@ static void combine_restrictions_low(str
+@@ -108,6 +125,8 @@
        lhs->bounce_pfn = min_not_zero(lhs->bounce_pfn, rhs->bounce_pfn);
  
        lhs->no_cluster |= rhs->no_cluster;
@@ -186316,7 +186280,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  }
  
  /*
-@@ -226,7 +245,7 @@ int dm_table_create(struct dm_table **re
+@@ -226,7 +245,7 @@
                return -ENOMEM;
  
        INIT_LIST_HEAD(&t->devices);
@@ -186325,7 +186289,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        if (!num_targets)
                num_targets = KEYS_PER_NODE;
-@@ -255,10 +274,14 @@ static void free_devices(struct list_hea
+@@ -255,9 +274,13 @@
        }
  }
  
@@ -186333,15 +186297,14 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
 +void dm_table_destroy(struct dm_table *t)
  {
        unsigned int i;
++
 +      while (atomic_read(&t->holders))
 +              msleep(1);
 +      smp_mb();
-+
        /* free the indexes (see dm_table_complete) */
        if (t->depth >= 2)
-               vfree(t->index[t->depth - 2]);
-@@ -296,8 +319,8 @@ void dm_table_put(struct dm_table *t)
+@@ -296,8 +319,8 @@
        if (!t)
                return;
  
@@ -186352,7 +186315,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  }
  
  /*
-@@ -400,9 +423,13 @@ static int upgrade_mode(struct dm_dev *d
+@@ -400,9 +423,13 @@
  
        dd_copy = *dd;
  
@@ -186367,7 +186330,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (!r)
                close_dev(&dd_copy, md);
        else
-@@ -446,17 +473,25 @@ static int __table_get_device(struct dm_
+@@ -446,17 +473,25 @@
                dd->mode = mode;
                dd->bdev = NULL;
  
@@ -186381,10 +186344,10 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
                        kfree(dd);
                        return r;
                }
++
 +              if (dd->mode != mode)
 +                      t->mode = dd->mode;
-+
                format_dev_t(dd->name, dev);
  
                atomic_set(&dd->count, 0);
@@ -186395,7 +186358,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
                r = upgrade_mode(dd, mode, t->md);
                if (r)
                        return r;
-@@ -522,18 +557,29 @@ void dm_set_device_limits(struct dm_targ
+@@ -522,17 +557,28 @@
        rs->bounce_pfn = min_not_zero(rs->bounce_pfn, q->bounce_pfn);
  
        rs->no_cluster |= !test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags);
@@ -186414,7 +186377,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  
        if (!r)
                dm_set_device_limits(ti, (*result)->bdev);
++
 +      if (!r) {
 +              /* Only got single device? */
 +              if (t->devices.next->next == &t->devices)
@@ -186422,11 +186385,10 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
 +              else
 +                      t->single_device = 0;
 +      }
-+
        return r;
  }
-@@ -542,6 +588,9 @@ int dm_get_device(struct dm_target *ti, 
+@@ -542,6 +588,9 @@
   */
  void dm_put_device(struct dm_target *ti, struct dm_dev *dd)
  {
@@ -186436,7 +186398,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (atomic_dec_and_test(&dd->count)) {
                close_dev(dd, ti->table->md);
                list_del(&dd->list);
-@@ -663,7 +712,7 @@ static void check_for_valid_limits(struc
+@@ -663,7 +712,7 @@
        if (!rs->max_segment_size)
                rs->max_segment_size = MAX_SEGMENT_SIZE;
        if (!rs->seg_boundary_mask)
@@ -186445,10 +186407,12 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
        if (!rs->bounce_pfn)
                rs->bounce_pfn = -1;
  }
-@@ -731,6 +780,66 @@ int dm_table_add_target(struct dm_table 
+@@ -729,6 +778,66 @@
+       DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);
+       dm_put_target_type(tgt->type);
        return r;
- }
++}
++
 +int dm_table_set_type(struct dm_table *t)
 +{
 +      int i;
@@ -186507,12 +186471,10 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
 +int dm_table_request_based(struct dm_table *t)
 +{
 +      return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
-+}
-+
+ }
  static int setup_indexes(struct dm_table *t)
- {
-       int i;
-@@ -861,6 +970,47 @@ void dm_table_set_restrictions(struct dm
+@@ -861,6 +970,47 @@
        else
                queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, q);
  
@@ -186560,7 +186522,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  }
  
  unsigned int dm_table_get_num_targets(struct dm_table *t)
-@@ -949,6 +1099,20 @@ int dm_table_any_congested(struct dm_tab
+@@ -949,6 +1099,20 @@
        return r;
  }
  
@@ -186581,7 +186543,7 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  void dm_table_unplug_all(struct dm_table *t)
  {
        struct dm_dev *dd;
-@@ -968,6 +1132,16 @@ struct mapped_device *dm_table_get_md(st
+@@ -968,6 +1132,16 @@
        return t->md;
  }
  
@@ -186598,16 +186560,16 @@ diff -purN linux-2.6.27/drivers/md/dm-table.c linux-2.6.27.19-5.1/drivers/md/dm-
  EXPORT_SYMBOL(dm_vcalloc);
  EXPORT_SYMBOL(dm_get_device);
  EXPORT_SYMBOL(dm_put_device);
-@@ -978,3 +1152,5 @@ EXPORT_SYMBOL(dm_table_get_md);
+@@ -978,3 +1152,5 @@
  EXPORT_SYMBOL(dm_table_put);
  EXPORT_SYMBOL(dm_table_get);
  EXPORT_SYMBOL(dm_table_unplug_all);
 +EXPORT_SYMBOL(dm_table_barrier_ok);
 +EXPORT_SYMBOL(dm_table_support_barrier);
-diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
---- linux-2.6.27/drivers/md/dm.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm.c        2009-03-25 16:11:23.000000000 +0000
-@@ -32,6 +32,7 @@ static unsigned int _major = 0;
+diff -r 9608d5473017 drivers/md/dm.c
+--- a/drivers/md/dm.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm.c  Wed May 06 16:56:20 2009 +0100
+@@ -32,6 +32,7 @@
  
  static DEFINE_SPINLOCK(_minor_lock);
  /*
@@ -186615,7 +186577,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
   * One of these is allocated per bio.
   */
  struct dm_io {
-@@ -43,6 +44,7 @@ struct dm_io {
+@@ -43,6 +44,7 @@
  };
  
  /*
@@ -186623,7 +186585,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
   * One of these is allocated per target within a bio.  Hopefully
   * this will be simplified out one day.
   */
-@@ -52,6 +54,31 @@ struct dm_target_io {
+@@ -52,12 +54,45 @@
        union map_info info;
  };
  
@@ -186655,10 +186617,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  union map_info *dm_get_mapinfo(struct bio *bio)
  {
        if (bio && bio->bi_private)
-@@ -59,6 +86,14 @@ union map_info *dm_get_mapinfo(struct bi
+               return &((struct dm_target_io *)bio->bi_private)->info;
        return NULL;
  }
++
 +union map_info *dm_get_rq_mapinfo(struct request *rq)
 +{
 +      if (rq && rq->end_io_data)
@@ -186666,11 +186628,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +      return NULL;
 +}
 +EXPORT_SYMBOL_GPL(dm_get_rq_mapinfo);
-+
  #define MINOR_ALLOCED ((void *)-1)
  
- /*
-@@ -76,7 +111,6 @@ union map_info *dm_get_mapinfo(struct bi
+@@ -76,7 +111,6 @@
   */
  struct dm_wq_req {
        enum {
@@ -186678,7 +186639,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                DM_WQ_FLUSH_DEFERRED,
        } type;
        struct work_struct work;
-@@ -126,6 +160,8 @@ struct mapped_device {
+@@ -126,6 +160,8 @@
  
        struct bio_set *bs;
  
@@ -186687,7 +186648,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        /*
         * Event handling.
         */
-@@ -143,52 +179,74 @@ struct mapped_device {
+@@ -143,52 +179,74 @@
  
        /* forced geometry settings */
        struct hd_geometry geometry;
@@ -186779,7 +186740,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        kmem_cache_destroy(_tio_cache);
        kmem_cache_destroy(_io_cache);
        unregister_blkdev(_major, _name);
-@@ -252,16 +310,25 @@ static void __exit dm_exit(void)
+@@ -252,16 +310,25 @@
  static int dm_blk_open(struct inode *inode, struct file *file)
  {
        struct mapped_device *md;
@@ -186806,7 +186767,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                goto out;
        }
  
-@@ -271,7 +338,7 @@ static int dm_blk_open(struct inode *ino
+@@ -271,7 +338,7 @@
  out:
        spin_unlock(&_minor_lock);
  
@@ -186815,7 +186776,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  }
  
  static int dm_blk_close(struct inode *inode, struct file *file)
-@@ -333,19 +400,25 @@ static int dm_blk_ioctl(struct inode *in
+@@ -333,19 +400,25 @@
        if (!map || !dm_table_get_size(map))
                goto out;
  
@@ -186849,10 +186810,12 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
  out:
        dm_table_put(map);
-@@ -374,6 +447,28 @@ static void free_tio(struct mapped_devic
+@@ -372,6 +445,28 @@
+ static void free_tio(struct mapped_device *md, struct dm_target_io *tio)
+ {
        mempool_free(tio, md->tio_pool);
- }
++}
++
 +static inline struct dm_rq_target_io *alloc_rq_tio(struct mapped_device *md)
 +{
 +      return mempool_alloc(md->tio_pool, GFP_ATOMIC);
@@ -186873,12 +186836,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +                               struct dm_clone_bio_info *info)
 +{
 +      mempool_free(info, md->io_pool);
-+}
-+
+ }
  static void start_io_acct(struct dm_io *io)
- {
-       struct mapped_device *md = io->md;
-@@ -430,12 +525,13 @@ static int queue_io(struct mapped_device
+@@ -430,12 +525,13 @@
  struct dm_table *dm_get_table(struct mapped_device *md)
  {
        struct dm_table *t;
@@ -186894,7 +186855,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
        return t;
  }
-@@ -562,6 +658,265 @@ static void clone_endio(struct bio *bio,
+@@ -562,6 +658,265 @@
        free_tio(md, tio);
  }
  
@@ -187160,7 +187121,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  static sector_t max_io_len(struct mapped_device *md,
                           sector_t sector, struct dm_target *ti)
  {
-@@ -667,6 +1022,13 @@ static struct bio *split_bvec(struct bio
+@@ -667,6 +1022,13 @@
        clone->bi_size = to_bytes(len);
        clone->bi_io_vec->bv_offset = offset;
        clone->bi_io_vec->bv_len = clone->bi_size;
@@ -187174,10 +187135,11 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
        return clone;
  }
-@@ -689,6 +1051,14 @@ static struct bio *clone_bio(struct bio 
+@@ -688,6 +1050,14 @@
+       clone->bi_vcnt = idx + bv_count;
        clone->bi_size = to_bytes(len);
        clone->bi_flags &= ~(1 << BIO_SEG_VALID);
++
 +      if (bio_integrity(bio)) {
 +              bio_integrity_clone(clone, bio, GFP_NOIO, bs);
 +
@@ -187185,11 +187147,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +                      bio_integrity_trim(clone,
 +                                         bio_sector_offset(bio, idx, 0), len);
 +      }
-+
        return clone;
  }
-@@ -803,7 +1173,11 @@ static int __split_bio(struct mapped_dev
+@@ -803,7 +1173,11 @@
        ci.map = dm_get_table(md);
        if (unlikely(!ci.map))
                return -EIO;
@@ -187202,7 +187163,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        ci.md = md;
        ci.bio = bio;
        ci.io = alloc_io(md);
-@@ -880,21 +1254,12 @@ out:
+@@ -880,20 +1254,11 @@
   * The request function that just remaps the bio built up by
   * dm_merge_bvec.
   */
@@ -187212,7 +187173,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        int r = -EIO;
        int rw = bio_data_dir(bio);
        struct mapped_device *md = q->queuedata;
+-
 -      /*
 -       * There is no use in forwarding any barrier request since we can't
 -       * guarantee it is (or can be) handled by the targets correctly.
@@ -187221,11 +187182,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 -              bio_endio(bio, -EOPNOTSUPP);
 -              return 0;
 -      }
--
        down_read(&md->io_lock);
  
-       disk_stat_inc(dm_disk(md), ios[rw]);
-@@ -930,12 +1295,349 @@ out_req:
+@@ -930,12 +1295,349 @@
        return 0;
  }
  
@@ -187575,7 +187535,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                dm_table_unplug_all(map);
                dm_table_put(map);
        }
-@@ -943,16 +1645,26 @@ static void dm_unplug_all(struct request
+@@ -943,16 +1645,26 @@
  
  static int dm_any_congested(void *congested_data, int bdi_bits)
  {
@@ -187584,7 +187544,11 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        struct mapped_device *md = (struct mapped_device *) congested_data;
 -      struct dm_table *map = dm_get_table(md);
 +      struct dm_table *map;
-+
+-      if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
+-              r = bdi_bits;
+-      else
+-              r = dm_table_any_congested(map, bdi_bits);
 +      if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
 +              map = dm_get_table(md);
 +              if (map) {
@@ -187600,16 +187564,12 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +              }
 +      }
  
--      if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
--              r = bdi_bits;
--      else
--              r = dm_table_any_congested(map, bdi_bits);
 -      dm_table_put(map);
++
        return r;
  }
  
-@@ -1069,10 +1781,22 @@ static struct mapped_device *alloc_dev(i
+@@ -1069,10 +1781,22 @@
        INIT_LIST_HEAD(&md->uevent_list);
        spin_lock_init(&md->uevent_lock);
  
@@ -187633,7 +187593,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        md->queue->queuedata = md;
        md->queue->backing_dev_info.congested_fn = dm_any_congested;
        md->queue->backing_dev_info.congested_data = md;
-@@ -1080,18 +1804,9 @@ static struct mapped_device *alloc_dev(i
+@@ -1080,18 +1804,9 @@
        blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY);
        md->queue->unplug_fn = dm_unplug_all;
        blk_queue_merge_bvec(md->queue, dm_merge_bvec);
@@ -187655,7 +187615,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
        md->disk = alloc_disk(1);
        if (!md->disk)
-@@ -1126,12 +1841,6 @@ static struct mapped_device *alloc_dev(i
+@@ -1126,12 +1841,6 @@
  bad_thread:
        put_disk(md->disk);
  bad_disk:
@@ -187668,7 +187628,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        blk_cleanup_queue(md->queue);
  bad_queue:
        free_minor(minor);
-@@ -1153,9 +1862,13 @@ static void free_dev(struct mapped_devic
+@@ -1153,9 +1862,13 @@
                bdput(md->suspended_bdev);
        }
        destroy_workqueue(md->wq);
@@ -187685,7 +187645,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        del_gendisk(md->disk);
        free_minor(minor);
  
-@@ -1201,6 +1914,7 @@ static int __bind(struct mapped_device *
+@@ -1201,6 +1914,7 @@
  {
        struct request_queue *q = md->queue;
        sector_t size;
@@ -187693,7 +187653,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
        size = dm_table_get_size(t);
  
-@@ -1212,16 +1926,34 @@ static int __bind(struct mapped_device *
+@@ -1212,16 +1926,34 @@
  
        if (md->suspended_bdev)
                __set_size(md, size);
@@ -187732,7 +187692,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
        return 0;
  }
-@@ -1229,15 +1961,16 @@ static int __bind(struct mapped_device *
+@@ -1229,15 +1961,16 @@
  static void __unbind(struct mapped_device *md)
  {
        struct dm_table *map = md->map;
@@ -187752,17 +187712,17 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  }
  
  /*
-@@ -1325,8 +2058,8 @@ void dm_put(struct mapped_device *md)
+@@ -1325,8 +2058,8 @@
                        dm_table_presuspend_targets(map);
                        dm_table_postsuspend_targets(map);
                }
--              __unbind(md);
-               dm_table_put(map);
-+              __unbind(md);
++              dm_table_put(map);
+               __unbind(md);
+-              dm_table_put(map);
                free_dev(md);
        }
  }
-@@ -1340,7 +2073,11 @@ static int dm_wait_for_completion(struct
+@@ -1340,7 +2073,11 @@
                set_current_state(TASK_INTERRUPTIBLE);
  
                smp_mb();
@@ -187775,7 +187735,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                        break;
  
                if (signal_pending(current)) {
-@@ -1363,7 +2100,13 @@ static void __flush_deferred_io(struct m
+@@ -1363,7 +2100,13 @@
        struct bio *c;
  
        while ((c = bio_list_pop(&md->deferred))) {
@@ -187790,7 +187750,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                        bio_io_error(c);
        }
  
-@@ -1388,9 +2131,6 @@ static void dm_wq_work(struct work_struc
+@@ -1388,9 +2131,6 @@
  
        down_write(&md->io_lock);
        switch (req->type) {
@@ -187800,10 +187760,12 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        case DM_WQ_FLUSH_DEFERRED:
                __flush_deferred_io(md);
                break;
-@@ -1445,6 +2185,88 @@ out:
+@@ -1443,6 +2183,88 @@
+ out:
+       mutex_unlock(&md->suspend_lock);
        return r;
- }
++}
++
 +static inline void dm_invalidate_flush_suspend(struct mapped_device *md)
 +{
 +      md->suspend_rq.data = (void *)0x1;
@@ -187884,12 +187846,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +      /* Now no user of the suspend_rq */
 +      blk_rq_init(q, rq);
 +      blk_insert_request(q, rq, 0, NULL);
-+}
-+
+ }
  /*
-  * Functions to lock and unlock any filesystem running on the
-  * device.
-@@ -1520,7 +2342,7 @@ int dm_suspend(struct mapped_device *md,
+@@ -1520,7 +2342,7 @@
                if (!md->suspended_bdev) {
                        DMWARN("bdget failed in dm_suspend");
                        r = -ENOMEM;
@@ -187898,7 +187858,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
                }
  
                /*
-@@ -1543,6 +2365,9 @@ int dm_suspend(struct mapped_device *md,
+@@ -1543,6 +2365,9 @@
        add_wait_queue(&md->wait, &wait);
        up_write(&md->io_lock);
  
@@ -187908,7 +187868,7 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        /* unplug */
        if (map)
                dm_table_unplug_all(map);
-@@ -1555,14 +2380,22 @@ int dm_suspend(struct mapped_device *md,
+@@ -1555,13 +2380,21 @@
        down_write(&md->io_lock);
        remove_wait_queue(&md->wait, &wait);
  
@@ -187926,17 +187886,17 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
        /* were we interrupted ? */
        if (r < 0) {
                dm_queue_flush(md, DM_WQ_FLUSH_DEFERRED, NULL);
++
 +              if (dm_request_based(md))
 +                      dm_abort_suspend(md, noflush);
-+
                unlock_fs(md);
                goto out; /* pushback list is already flushed, so skip flush */
-       }
-@@ -1571,14 +2404,6 @@ int dm_suspend(struct mapped_device *md,
+@@ -1570,14 +2403,6 @@
+       dm_table_postsuspend_targets(map);
  
        set_bit(DMF_SUSPENDED, &md->flags);
+-
 -flush_and_out:
 -      if (r && noflush)
 -              /*
@@ -187944,14 +187904,14 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 -               * flush them before return.
 -               */
 -              dm_queue_flush(md, DM_WQ_FLUSH_ALL, NULL);
--
  out:
        if (r && md->suspended_bdev) {
-               bdput(md->suspended_bdev);
-@@ -1611,6 +2436,14 @@ int dm_resume(struct mapped_device *md)
+@@ -1610,6 +2435,14 @@
+               goto out;
  
        dm_queue_flush(md, DM_WQ_FLUSH_DEFERRED, NULL);
++
 +      /*
 +       * Flushing deferred I/Os must be done after targets are resumed
 +       * so that mapping of targets can work correctly.
@@ -187959,11 +187919,10 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +       */
 +      if (dm_request_based(md))
 +              start_queue(md->queue);
-+
        unlock_fs(md);
  
-       if (md->suspended_bdev) {
-@@ -1674,6 +2507,7 @@ struct gendisk *dm_disk(struct mapped_de
+@@ -1674,6 +2507,7 @@
  {
        return md->disk;
  }
@@ -187971,10 +187930,11 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
  
  int dm_suspended(struct mapped_device *md)
  {
-@@ -1691,6 +2525,65 @@ int dm_noflush_suspending(struct dm_targ
+@@ -1690,6 +2524,65 @@
+       return r;
  }
  EXPORT_SYMBOL_GPL(dm_noflush_suspending);
++
 +int dm_init_md_mempool(struct mapped_device *md, int type)
 +{
 +      if (unlikely(type == DM_TYPE_NONE)) {
@@ -188033,13 +187993,12 @@ diff -purN linux-2.6.27/drivers/md/dm.c linux-2.6.27.19-5.1/drivers/md/dm.c
 +
 +      return -ENOMEM;
 +}
-+
  static struct block_device_operations dm_blk_dops = {
        .open = dm_blk_open,
-       .release = dm_blk_close,
-diff -purN linux-2.6.27/drivers/md/dm.h linux-2.6.27.19-5.1/drivers/md/dm.h
---- linux-2.6.27/drivers/md/dm.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/dm.h        2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/md/dm.h
+--- a/drivers/md/dm.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/dm.h  Wed May 06 16:56:20 2009 +0100
 @@ -23,6 +23,13 @@
  #define DM_SUSPEND_NOFLUSH_FLAG               (1 << 1)
  
@@ -188054,7 +188013,7 @@ diff -purN linux-2.6.27/drivers/md/dm.h linux-2.6.27.19-5.1/drivers/md/dm.h
   * List of devices that a metadevice uses and should open/close.
   */
  struct dm_dev {
-@@ -39,22 +46,30 @@ struct dm_table;
+@@ -39,22 +46,30 @@
  /*-----------------------------------------------------------------
   * Internal table functions.
   *---------------------------------------------------------------*/
@@ -188085,7 +188044,7 @@ diff -purN linux-2.6.27/drivers/md/dm.h linux-2.6.27.19-5.1/drivers/md/dm.h
  
  /*-----------------------------------------------------------------
   * A registry of target types.
-@@ -97,10 +112,16 @@ void *dm_vcalloc(unsigned long nmemb, un
+@@ -97,10 +112,16 @@
  union map_info *dm_get_mapinfo(struct bio *bio);
  int dm_open_count(struct mapped_device *md);
  int dm_lock_for_deletion(struct mapped_device *md);
@@ -188102,10 +188061,10 @@ diff -purN linux-2.6.27/drivers/md/dm.h linux-2.6.27.19-5.1/drivers/md/dm.h
 +int dm_init_md_mempool(struct mapped_device *md, int type);
 +
  #endif
-diff -purN linux-2.6.27/drivers/md/linear.c linux-2.6.27.19-5.1/drivers/md/linear.c
---- linux-2.6.27/drivers/md/linear.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/linear.c    2009-03-25 16:11:23.000000000 +0000
-@@ -157,6 +157,8 @@ static linear_conf_t *linear_conf(mddev_
+diff -r 9608d5473017 drivers/md/linear.c
+--- a/drivers/md/linear.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/linear.c      Wed May 06 16:56:20 2009 +0100
+@@ -157,6 +157,8 @@
  
        min_spacing = conf->array_sectors / 2;
        sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
@@ -188114,10 +188073,10 @@ diff -purN linux-2.6.27/drivers/md/linear.c linux-2.6.27.19-5.1/drivers/md/linea
  
        /* min_spacing is the minimum spacing that will fit the hash
         * table in one PAGE.  This may be much smaller than needed.
-diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
---- linux-2.6.27/drivers/md/md.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/md.c        2009-03-25 16:11:23.000000000 +0000
-@@ -1411,6 +1411,38 @@ static int match_mddev_units(mddev_t *md
+diff -r 9608d5473017 drivers/md/md.c
+--- a/drivers/md/md.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/md.c  Wed May 06 16:56:20 2009 +0100
+@@ -1411,6 +1411,38 @@
  
  static LIST_HEAD(pending_raid_disks);
  
@@ -188156,7 +188115,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
  static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev)
  {
        char b[BDEVNAME_SIZE];
-@@ -1454,6 +1486,11 @@ static int bind_rdev_to_array(mdk_rdev_t
+@@ -1454,6 +1486,11 @@
                if (find_rdev_nr(mddev, rdev->desc_nr))
                        return -EBUSY;
        }
@@ -188168,7 +188127,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
        bdevname(rdev->bdev,b);
        while ( (s=strchr(b, '/')) != NULL)
                *s = '!';
-@@ -1474,6 +1511,7 @@ static int bind_rdev_to_array(mdk_rdev_t
+@@ -1474,6 +1511,7 @@
        }
        list_add_rcu(&rdev->same_set, &mddev->disks);
        bd_claim_by_disk(rdev->bdev, rdev->bdev->bd_holder, mddev->gendisk);
@@ -188176,7 +188135,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
        return 0;
  
   fail:
-@@ -2109,8 +2147,6 @@ rdev_size_store(mdk_rdev_t *rdev, const 
+@@ -2109,8 +2147,6 @@
  
        if (strict_strtoull(buf, 10, &size) < 0)
                return -EINVAL;
@@ -188185,19 +188144,20 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
        if (my_mddev->pers && rdev->raid_disk >= 0) {
                if (my_mddev->persistent) {
                        size = super_types[my_mddev->major_version].
-@@ -2121,9 +2157,9 @@ rdev_size_store(mdk_rdev_t *rdev, const 
+@@ -2121,9 +2157,9 @@
                        size = (rdev->bdev->bd_inode->i_size >> 10);
                        size -= rdev->data_offset/2;
                }
 -              if (size < my_mddev->size)
 -                      return -EINVAL; /* component must fit device */
-       }
+-      }
++      }
 +      if (size < my_mddev->size)
 +              return -EINVAL; /* component must fit device */
  
        rdev->size = size;
        if (size > oldsize && my_mddev->external) {
-@@ -2364,6 +2400,15 @@ static void analyze_sbs(mddev_t * mddev)
+@@ -2364,6 +2400,15 @@
  
        i = 0;
        rdev_for_each(rdev, tmp, mddev) {
@@ -188213,7 +188173,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                if (rdev != freshest)
                        if (super_types[mddev->major_version].
                            validate_super(mddev, rdev)) {
-@@ -2730,9 +2775,9 @@ array_state_store(mddev_t *mddev, const 
+@@ -2730,9 +2775,9 @@
                break;
        case read_auto:
                if (mddev->pers) {
@@ -188225,7 +188185,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                                err = restart_array(mddev);
                        if (err == 0) {
                                mddev->ro = 2;
-@@ -2948,7 +2993,13 @@ metadata_store(mddev_t *mddev, const cha
+@@ -2948,7 +2993,13 @@
  {
        int major, minor;
        char *e;
@@ -188240,7 +188200,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                return -EBUSY;
  
        if (cmd_match(buf, "none")) {
-@@ -3023,7 +3074,7 @@ action_store(mddev_t *mddev, const char 
+@@ -3023,7 +3074,7 @@
                        set_bit(MD_RECOVERY_INTR, &mddev->recovery);
                        md_unregister_thread(mddev->sync_thread);
                        mddev->sync_thread = NULL;
@@ -188249,7 +188209,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                }
        } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) ||
                   test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
-@@ -3537,9 +3588,14 @@ static int do_md_run(mddev_t * mddev)
+@@ -3537,9 +3588,14 @@
                        return -EINVAL;
                }
                if (chunk_size < PAGE_SIZE) {
@@ -188264,7 +188224,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                }
  
                /* devices must have minimum size of one chunk */
-@@ -3946,10 +4002,13 @@ static int do_md_stop(mddev_t * mddev, i
+@@ -3946,10 +4002,13 @@
                mddev->barriers_work = 0;
                mddev->safemode = 0;
  
@@ -188278,7 +188238,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
        md_new_event(mddev);
        sysfs_notify(&mddev->kobj, NULL, "array_state");
  out:
-@@ -4452,13 +4511,6 @@ static int hot_add_disk(mddev_t * mddev,
+@@ -4452,13 +4511,6 @@
         * noticed in interrupt contexts ...
         */
  
@@ -188292,7 +188252,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
        rdev->raid_disk = -1;
  
        md_update_sb(mddev, 1);
-@@ -4472,9 +4524,6 @@ static int hot_add_disk(mddev_t * mddev,
+@@ -4472,9 +4524,6 @@
        md_new_event(mddev);
        return 0;
  
@@ -188302,7 +188262,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
  abort_export:
        export_rdev(rdev);
        return err;
-@@ -4487,7 +4536,7 @@ static int set_bitmap_file(mddev_t *mdde
+@@ -4487,7 +4536,7 @@
        if (mddev->pers) {
                if (!mddev->pers->quiesce)
                        return -EBUSY;
@@ -188311,7 +188271,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                        return -EBUSY;
                /* we should be able to change the bitmap.. */
        }
-@@ -4742,7 +4791,7 @@ static int update_array_info(mddev_t *md
+@@ -4742,7 +4791,7 @@
        if ((state ^ info->state) & (1<<MD_SB_BITMAP_PRESENT)) {
                if (mddev->pers->quiesce == NULL)
                        return -EINVAL;
@@ -188320,7 +188280,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                        return -EBUSY;
                if (info->state & (1<<MD_SB_BITMAP_PRESENT)) {
                        /* add the bitmap */
-@@ -6007,7 +6056,8 @@ static int remove_and_add_spares(mddev_t
+@@ -6007,7 +6056,8 @@
                        }
                }
  
@@ -188330,7 +188290,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                rdev_for_each(rdev, rtmp, mddev) {
                        if (rdev->raid_disk >= 0 &&
                            !test_bit(In_sync, &rdev->flags) &&
-@@ -6159,7 +6209,7 @@ void md_check_recovery(mddev_t *mddev)
+@@ -6159,7 +6209,7 @@
                                rdev_for_each(rdev, rtmp, mddev)
                                        rdev->saved_raid_disk = -1;
  
@@ -188339,7 +188299,7 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
                        /* flag recovery needed just to double check */
                        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
                        sysfs_notify(&mddev->kobj, NULL, "sync_action");
-@@ -6407,11 +6457,11 @@ static __exit void md_exit(void)
+@@ -6407,11 +6457,11 @@
  subsys_initcall(md_init);
  module_exit(md_exit)
  
@@ -188353,10 +188313,10 @@ diff -purN linux-2.6.27/drivers/md/md.c linux-2.6.27.19-5.1/drivers/md/md.c
  {
        char *e;
        int num = simple_strtoul(val, &e, 10);
-diff -purN linux-2.6.27/drivers/md/multipath.c linux-2.6.27.19-5.1/drivers/md/multipath.c
---- linux-2.6.27/drivers/md/multipath.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/multipath.c 2009-03-25 16:11:23.000000000 +0000
-@@ -172,7 +172,7 @@ static int multipath_make_request (struc
+diff -r 9608d5473017 drivers/md/multipath.c
+--- a/drivers/md/multipath.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/multipath.c   Wed May 06 16:56:20 2009 +0100
+@@ -172,7 +172,7 @@
        mp_bh->bio = *bio;
        mp_bh->bio.bi_sector += multipath->rdev->data_offset;
        mp_bh->bio.bi_bdev = multipath->rdev->bdev;
@@ -188365,7 +188325,7 @@ diff -purN linux-2.6.27/drivers/md/multipath.c linux-2.6.27.19-5.1/drivers/md/mu
        mp_bh->bio.bi_end_io = multipath_end_request;
        mp_bh->bio.bi_private = mp_bh;
        generic_make_request(&mp_bh->bio);
-@@ -398,7 +398,7 @@ static void multipathd (mddev_t *mddev)
+@@ -398,7 +398,7 @@
                        *bio = *(mp_bh->master_bio);
                        bio->bi_sector += conf->multipaths[mp_bh->path].rdev->data_offset;
                        bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev;
@@ -188374,10 +188334,10 @@ diff -purN linux-2.6.27/drivers/md/multipath.c linux-2.6.27.19-5.1/drivers/md/mu
                        bio->bi_end_io = multipath_end_request;
                        bio->bi_private = mp_bh;
                        generic_make_request(bio);
-diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.c
---- linux-2.6.27/drivers/md/raid1.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid1.c     2009-03-25 16:11:23.000000000 +0000
-@@ -1012,12 +1012,16 @@ static void error(mddev_t *mddev, mdk_rd
+diff -r 9608d5473017 drivers/md/raid1.c
+--- a/drivers/md/raid1.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid1.c       Wed May 06 16:56:20 2009 +0100
+@@ -1012,12 +1012,16 @@
         * else mark the drive as failed
         */
        if (test_bit(In_sync, &rdev->flags)
@@ -188396,7 +188356,7 @@ diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.
        if (test_and_clear_bit(In_sync, &rdev->flags)) {
                unsigned long flags;
                spin_lock_irqsave(&conf->device_lock, flags);
-@@ -1302,9 +1306,6 @@ static void sync_request_write(mddev_t *
+@@ -1302,9 +1306,6 @@
                                        sbio->bi_size = r1_bio->sectors << 9;
                                        sbio->bi_idx = 0;
                                        sbio->bi_phys_segments = 0;
@@ -188406,7 +188366,7 @@ diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.
                                        sbio->bi_flags &= ~(BIO_POOL_MASK - 1);
                                        sbio->bi_flags |= 1 << BIO_UPTODATE;
                                        sbio->bi_next = NULL;
-@@ -1635,7 +1636,8 @@ static void raid1d(mddev_t *mddev)
+@@ -1635,7 +1636,8 @@
                        }
  
                        bio = r1_bio->bios[r1_bio->read_disk];
@@ -188416,7 +188376,7 @@ diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.
                                printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
                                       " read error for block %llu\n",
                                       bdevname(bio->bi_bdev,b),
-@@ -1790,7 +1792,6 @@ static sector_t sync_request(mddev_t *md
+@@ -1790,7 +1792,6 @@
                bio->bi_vcnt = 0;
                bio->bi_idx = 0;
                bio->bi_phys_segments = 0;
@@ -188424,10 +188384,10 @@ diff -purN linux-2.6.27/drivers/md/raid1.c linux-2.6.27.19-5.1/drivers/md/raid1.
                bio->bi_size = 0;
                bio->bi_end_io = NULL;
                bio->bi_private = NULL;
-diff -purN linux-2.6.27/drivers/md/raid10.c linux-2.6.27.19-5.1/drivers/md/raid10.c
---- linux-2.6.27/drivers/md/raid10.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid10.c    2009-03-25 16:11:23.000000000 +0000
-@@ -1132,7 +1132,7 @@ static int raid10_add_disk(mddev_t *mdde
+diff -r 9608d5473017 drivers/md/raid10.c
+--- a/drivers/md/raid10.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid10.c      Wed May 06 16:56:20 2009 +0100
+@@ -1132,7 +1132,7 @@
        if (!enough(conf))
                return -EINVAL;
  
@@ -188436,7 +188396,7 @@ diff -purN linux-2.6.27/drivers/md/raid10.c linux-2.6.27.19-5.1/drivers/md/raid1
                first = last = rdev->raid_disk;
  
        if (rdev->saved_raid_disk >= 0 &&
-@@ -1345,9 +1345,6 @@ static void sync_request_write(mddev_t *
+@@ -1345,9 +1345,6 @@
                tbio->bi_size = r10_bio->sectors << 9;
                tbio->bi_idx = 0;
                tbio->bi_phys_segments = 0;
@@ -188446,7 +188406,7 @@ diff -purN linux-2.6.27/drivers/md/raid10.c linux-2.6.27.19-5.1/drivers/md/raid1
                tbio->bi_flags &= ~(BIO_POOL_MASK - 1);
                tbio->bi_flags |= 1 << BIO_UPTODATE;
                tbio->bi_next = NULL;
-@@ -1947,7 +1944,6 @@ static sector_t sync_request(mddev_t *md
+@@ -1947,7 +1944,6 @@
                bio->bi_vcnt = 0;
                bio->bi_idx = 0;
                bio->bi_phys_segments = 0;
@@ -188454,13 +188414,14 @@ diff -purN linux-2.6.27/drivers/md/raid10.c linux-2.6.27.19-5.1/drivers/md/raid1
                bio->bi_size = 0;
        }
  
-diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.c
---- linux-2.6.27/drivers/md/raid5.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/md/raid5.c     2009-03-25 16:11:23.000000000 +0000
-@@ -101,6 +101,40 @@
+diff -r 9608d5473017 drivers/md/raid5.c
+--- a/drivers/md/raid5.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/md/raid5.c       Wed May 06 16:56:20 2009 +0100
+@@ -100,6 +100,40 @@
+ /* In .bss so it's zeroed */
  const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256)));
  #endif
++
 +/*
 + * We maintain a biased count of active stripes in the bottom 16 bits of
 + * bi_phys_segments, and a count of processed stripes in the upper 16 bits
@@ -188494,11 +188455,10 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
 +{
 +      bio->bi_phys_segments = raid5_bi_phys_segments(bio) || (cnt << 16);
 +}
-+
  static inline int raid6_next_disk(int disk, int raid_disks)
  {
-       disk++;
-@@ -507,7 +541,7 @@ static void ops_complete_biofill(void *s
+@@ -507,7 +541,7 @@
                        while (rbi && rbi->bi_sector <
                                dev->sector + STRIPE_SECTORS) {
                                rbi2 = r5_next_bio(rbi, dev->sector);
@@ -188507,7 +188467,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                        rbi->bi_next = return_bi;
                                        return_bi = rbi;
                                }
-@@ -1725,7 +1759,7 @@ static int add_stripe_bio(struct stripe_
+@@ -1725,7 +1759,7 @@
        if (*bip)
                bi->bi_next = *bip;
        *bip = bi;
@@ -188516,7 +188476,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
        spin_unlock_irq(&conf->device_lock);
        spin_unlock(&sh->lock);
  
-@@ -1819,7 +1853,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1819,7 +1853,7 @@
                        sh->dev[i].sector + STRIPE_SECTORS) {
                        struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
                        clear_bit(BIO_UPTODATE, &bi->bi_flags);
@@ -188525,7 +188485,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                md_write_end(conf->mddev);
                                bi->bi_next = *return_bi;
                                *return_bi = bi;
-@@ -1834,7 +1868,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1834,7 +1868,7 @@
                       sh->dev[i].sector + STRIPE_SECTORS) {
                        struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector);
                        clear_bit(BIO_UPTODATE, &bi->bi_flags);
@@ -188534,7 +188494,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                md_write_end(conf->mddev);
                                bi->bi_next = *return_bi;
                                *return_bi = bi;
-@@ -1858,7 +1892,7 @@ handle_failed_stripe(raid5_conf_t *conf,
+@@ -1858,7 +1892,7 @@
                                struct bio *nextbi =
                                        r5_next_bio(bi, sh->dev[i].sector);
                                clear_bit(BIO_UPTODATE, &bi->bi_flags);
@@ -188543,7 +188503,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                        bi->bi_next = *return_bi;
                                        *return_bi = bi;
                                }
-@@ -2033,7 +2067,7 @@ static void handle_stripe_clean_event(ra
+@@ -2033,7 +2067,7 @@
                                while (wbi && wbi->bi_sector <
                                        dev->sector + STRIPE_SECTORS) {
                                        wbi2 = r5_next_bio(wbi, dev->sector);
@@ -188552,7 +188512,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                                md_write_end(conf->mddev);
                                                wbi->bi_next = *return_bi;
                                                *return_bi = wbi;
-@@ -2814,7 +2848,7 @@ static bool handle_stripe6(struct stripe
+@@ -2814,7 +2848,7 @@
                                copy_data(0, rbi, dev->page, dev->sector);
                                rbi2 = r5_next_bio(rbi, dev->sector);
                                spin_lock_irq(&conf->device_lock);
@@ -188561,7 +188521,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                                        rbi->bi_next = return_bi;
                                        return_bi = rbi;
                                }
-@@ -3155,8 +3189,11 @@ static struct bio *remove_bio_from_retry
+@@ -3155,8 +3189,11 @@
        if(bi) {
                conf->retry_read_aligned_list = bi->bi_next;
                bi->bi_next = NULL;
@@ -188574,7 +188534,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
        }
  
        return bi;
-@@ -3206,8 +3243,7 @@ static int bio_fits_rdev(struct bio *bi)
+@@ -3206,8 +3243,7 @@
        if ((bi->bi_size>>9) > q->max_sectors)
                return 0;
        blk_recount_segments(q, bi);
@@ -188584,7 +188544,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                return 0;
  
        if (q->merge_bvec_fn)
-@@ -3468,7 +3504,7 @@ static int make_request(struct request_q
+@@ -3468,7 +3504,7 @@
                        
        }
        spin_lock_irq(&conf->device_lock);
@@ -188593,7 +188553,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
        spin_unlock_irq(&conf->device_lock);
        if (remaining == 0) {
  
-@@ -3752,7 +3788,7 @@ static int  retry_aligned_read(raid5_con
+@@ -3752,7 +3788,7 @@
                     sector += STRIPE_SECTORS,
                     scnt++) {
  
@@ -188602,7 +188562,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                        /* already done this stripe */
                        continue;
  
-@@ -3760,7 +3796,7 @@ static int  retry_aligned_read(raid5_con
+@@ -3760,7 +3796,7 @@
  
                if (!sh) {
                        /* failed to get a stripe - must wait */
@@ -188611,7 +188571,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                        conf->retry_read_aligned = raid_bio;
                        return handled;
                }
-@@ -3768,7 +3804,7 @@ static int  retry_aligned_read(raid5_con
+@@ -3768,7 +3804,7 @@
                set_bit(R5_ReadError, &sh->dev[dd_idx].flags);
                if (!add_stripe_bio(sh, raid_bio, dd_idx, 0)) {
                        release_stripe(sh);
@@ -188620,7 +188580,7 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
                        conf->retry_read_aligned = raid_bio;
                        return handled;
                }
-@@ -3778,7 +3814,7 @@ static int  retry_aligned_read(raid5_con
+@@ -3778,7 +3814,7 @@
                handled++;
        }
        spin_lock_irq(&conf->device_lock);
@@ -188629,10 +188589,10 @@ diff -purN linux-2.6.27/drivers/md/raid5.c linux-2.6.27.19-5.1/drivers/md/raid5.
        spin_unlock_irq(&conf->device_lock);
        if (remaining == 0)
                bio_endio(raid_bio, 0);
-diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.1/drivers/media/dvb/frontends/s5h1411.c
---- linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/dvb/frontends/s5h1411.c  2009-03-25 16:11:25.000000000 +0000
-@@ -471,6 +471,20 @@ static int s5h1411_set_spectralinversion
+diff -r 9608d5473017 drivers/media/dvb/frontends/s5h1411.c
+--- a/drivers/media/dvb/frontends/s5h1411.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/dvb/frontends/s5h1411.c    Wed May 06 16:56:20 2009 +0100
+@@ -471,6 +471,20 @@
        return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
  }
  
@@ -188653,7 +188613,7 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
  static int s5h1411_enable_modulation(struct dvb_frontend *fe,
                                     fe_modulation_t m)
  {
-@@ -535,7 +549,7 @@ static int s5h1411_set_gpio(struct dvb_f
+@@ -535,7 +549,7 @@
                return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val);
  }
  
@@ -188662,19 +188622,19 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
  {
        struct s5h1411_state *state = fe->demodulator_priv;
  
-@@ -551,6 +565,11 @@ static int s5h1411_sleep(struct dvb_fron
-       return 0;
- }
+@@ -549,6 +563,11 @@
+       }
  
+       return 0;
++}
++
 +static int s5h1411_sleep(struct dvb_frontend *fe)
 +{
 +      return s5h1411_set_powerstate(fe, 1);
-+}
-+
+ }
  static int s5h1411_register_reset(struct dvb_frontend *fe)
- {
-       struct s5h1411_state *state = fe->demodulator_priv;
-@@ -574,9 +593,6 @@ static int s5h1411_set_frontend(struct d
+@@ -574,9 +593,6 @@
  
        s5h1411_enable_modulation(fe, p->u.vsb.modulation);
  
@@ -188684,18 +188644,18 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
        if (fe->ops.tuner_ops.set_params) {
                if (fe->ops.i2c_gate_ctrl)
                        fe->ops.i2c_gate_ctrl(fe, 1);
-@@ -587,6 +603,10 @@ static int s5h1411_set_frontend(struct d
+@@ -586,6 +602,10 @@
+               if (fe->ops.i2c_gate_ctrl)
                        fe->ops.i2c_gate_ctrl(fe, 0);
        }
++
 +      /* Issue a reset to the demod so it knows to resync against the
 +         newly tuned frequency */
 +      s5h1411_softreset(fe);
-+
        return 0;
  }
-@@ -599,7 +619,7 @@ static int s5h1411_init(struct dvb_front
+@@ -599,7 +619,7 @@
  
        dprintk("%s()\n", __func__);
  
@@ -188704,7 +188664,7 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
        s5h1411_register_reset(fe);
  
        for (i = 0; i < ARRAY_SIZE(init_tab); i++)
-@@ -612,10 +632,10 @@ static int s5h1411_init(struct dvb_front
+@@ -612,10 +632,10 @@
  
        if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
                /* Serial */
@@ -188717,7 +188677,7 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
  
        s5h1411_set_spectralinversion(fe, state->config->inversion);
        s5h1411_set_if_freq(fe, state->config->vsb_if);
-@@ -863,6 +883,7 @@ static struct dvb_frontend_ops s5h1411_o
+@@ -863,6 +883,7 @@
        },
  
        .init                 = s5h1411_init,
@@ -188725,24 +188685,24 @@ diff -purN linux-2.6.27/drivers/media/dvb/frontends/s5h1411.c linux-2.6.27.19-5.
        .i2c_gate_ctrl        = s5h1411_i2c_gate_ctrl,
        .set_frontend         = s5h1411_set_frontend,
        .get_frontend         = s5h1411_get_frontend,
-diff -purN linux-2.6.27/drivers/media/dvb/siano/sms-cards.c linux-2.6.27.19-5.1/drivers/media/dvb/siano/sms-cards.c
---- linux-2.6.27/drivers/media/dvb/siano/sms-cards.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/dvb/siano/sms-cards.c    2009-03-25 16:11:25.000000000 +0000
-@@ -42,6 +42,10 @@ struct usb_device_id smsusb_id_table[] =
+diff -r 9608d5473017 drivers/media/dvb/siano/sms-cards.c
+--- a/drivers/media/dvb/siano/sms-cards.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/dvb/siano/sms-cards.c      Wed May 06 16:56:21 2009 +0100
+@@ -41,6 +41,10 @@
+       { USB_DEVICE(0x2040, 0x5500),
                .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
        { USB_DEVICE(0x2040, 0x5510),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
++              .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 +      { USB_DEVICE(0x2040, 0x5520),
 +              .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
 +      { USB_DEVICE(0x2040, 0x5530),
-+              .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
        { USB_DEVICE(0x2040, 0x5580),
                .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
-       { USB_DEVICE(0x2040, 0x5590),
-diff -purN linux-2.6.27/drivers/media/video/au0828/au0828-cards.c linux-2.6.27.19-5.1/drivers/media/video/au0828/au0828-cards.c
---- linux-2.6.27/drivers/media/video/au0828/au0828-cards.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/au0828/au0828-cards.c      2009-03-25 16:11:27.000000000 +0000
-@@ -90,6 +90,7 @@ static void hauppauge_eeprom(struct au08
+diff -r 9608d5473017 drivers/media/video/au0828/au0828-cards.c
+--- a/drivers/media/video/au0828/au0828-cards.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/au0828/au0828-cards.c        Wed May 06 16:56:21 2009 +0100
+@@ -90,6 +90,7 @@
        case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
        case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
        case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */
@@ -188750,7 +188710,7 @@ diff -purN linux-2.6.27/drivers/media/video/au0828/au0828-cards.c linux-2.6.27.1
        case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */
        case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */
                break;
-@@ -198,6 +199,8 @@ struct usb_device_id au0828_usb_id_table
+@@ -198,6 +199,8 @@
                .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
        { USB_DEVICE(0x2040, 0x721b),
                .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
@@ -188759,10 +188719,10 @@ diff -purN linux-2.6.27/drivers/media/video/au0828/au0828-cards.c linux-2.6.27.1
        { USB_DEVICE(0x2040, 0x721f),
                .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
        { USB_DEVICE(0x2040, 0x7280),
-diff -purN linux-2.6.27/drivers/media/video/compat_ioctl32.c linux-2.6.27.19-5.1/drivers/media/video/compat_ioctl32.c
---- linux-2.6.27/drivers/media/video/compat_ioctl32.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/compat_ioctl32.c   2009-03-25 16:11:26.000000000 +0000
-@@ -867,6 +867,7 @@ long v4l_compat_ioctl32(struct file *fil
+diff -r 9608d5473017 drivers/media/video/compat_ioctl32.c
+--- a/drivers/media/video/compat_ioctl32.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/compat_ioctl32.c     Wed May 06 16:56:21 2009 +0100
+@@ -867,6 +867,7 @@
        case VIDIOC_STREAMON32:
        case VIDIOC_STREAMOFF32:
        case VIDIOC_G_PARM:
@@ -188770,7 +188730,7 @@ diff -purN linux-2.6.27/drivers/media/video/compat_ioctl32.c linux-2.6.27.19-5.1
        case VIDIOC_G_STD:
        case VIDIOC_S_STD:
        case VIDIOC_G_TUNER:
-@@ -885,6 +886,8 @@ long v4l_compat_ioctl32(struct file *fil
+@@ -885,6 +886,8 @@
        case VIDIOC_S_INPUT32:
        case VIDIOC_TRY_FMT32:
        case VIDIOC_S_HW_FREQ_SEEK:
@@ -188779,10 +188739,10 @@ diff -purN linux-2.6.27/drivers/media/video/compat_ioctl32.c linux-2.6.27.19-5.1
                ret = do_video_ioctl(file, cmd, arg);
                break;
  
-diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-encoder.c linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-encoder.c
---- linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-encoder.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-encoder.c  2009-03-25 16:11:25.000000000 +0000
-@@ -402,6 +402,10 @@ static int pvr2_encoder_prep_config(stru
+diff -r 9608d5473017 drivers/media/video/pvrusb2/pvrusb2-encoder.c
+--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c    Wed May 06 16:56:21 2009 +0100
+@@ -402,6 +402,10 @@
        ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 0,3,0,0);
        ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4,15,0,0,0);
  
@@ -188793,10 +188753,10 @@ diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-encoder.c linux-2.6.
        return ret;
  }
  
-diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-hdw.c
---- linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/pvrusb2/pvrusb2-hdw.c      2009-03-25 16:11:25.000000000 +0000
-@@ -60,7 +60,6 @@ static struct pvr2_hdw *unit_pointers[PV
+diff -r 9608d5473017 drivers/media/video/pvrusb2/pvrusb2-hdw.c
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c        Wed May 06 16:56:21 2009 +0100
+@@ -60,7 +60,6 @@
  static DEFINE_MUTEX(pvr2_unit_mtx);
  
  static int ctlchg;
@@ -188804,7 +188764,7 @@ diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.27.1
  static int procreload;
  static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 };
  static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 };
-@@ -71,8 +70,6 @@ module_param(ctlchg, int, S_IRUGO|S_IWUS
+@@ -71,8 +70,6 @@
  MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value");
  module_param(init_pause_msec, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay");
@@ -188813,7 +188773,7 @@ diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.27.1
  module_param(procreload, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(procreload,
                 "Attempt init failure recovery with firmware reload");
-@@ -1698,9 +1695,6 @@ static void pvr2_hdw_setup_low(struct pv
+@@ -1698,9 +1695,6 @@
        }
        hdw->fw1_state = FW1_STATE_OK;
  
@@ -188823,10 +188783,10 @@ diff -purN linux-2.6.27/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.27.1
        if (!pvr2_hdw_dev_ok(hdw)) return;
  
        for (idx = 0; idx < hdw->hdw_desc->client_modules.cnt; idx++) {
-diff -purN linux-2.6.27/drivers/media/video/saa7134/saa7134-core.c linux-2.6.27.19-5.1/drivers/media/video/saa7134/saa7134-core.c
---- linux-2.6.27/drivers/media/video/saa7134/saa7134-core.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/saa7134/saa7134-core.c     2009-03-25 16:11:27.000000000 +0000
-@@ -965,7 +965,8 @@ static int __devinit saa7134_initdev(str
+diff -r 9608d5473017 drivers/media/video/saa7134/saa7134-core.c
+--- a/drivers/media/video/saa7134/saa7134-core.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/saa7134/saa7134-core.c       Wed May 06 16:56:21 2009 +0100
+@@ -965,7 +965,8 @@
                       dev->name,(unsigned long long)pci_resource_start(pci_dev,0));
                goto fail1;
        }
@@ -188836,10 +188796,10 @@ diff -purN linux-2.6.27/drivers/media/video/saa7134/saa7134-core.c linux-2.6.27.
        dev->bmmio = (__u8 __iomem *)dev->lmmio;
        if (NULL == dev->lmmio) {
                err = -EIO;
-diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/drivers/media/video/tvaudio.c
---- linux-2.6.27/drivers/media/video/tvaudio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/media/video/tvaudio.c  2009-03-25 16:11:25.000000000 +0000
-@@ -152,7 +152,7 @@ static int chip_write(struct CHIPSTATE *
+diff -r 9608d5473017 drivers/media/video/tvaudio.c
+--- a/drivers/media/video/tvaudio.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/media/video/tvaudio.c    Wed May 06 16:56:21 2009 +0100
+@@ -152,7 +152,7 @@
  {
        unsigned char buffer[2];
  
@@ -188848,7 +188808,7 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n",
                        chip->c->name, val);
                chip->shadow.bytes[1] = val;
-@@ -163,6 +163,13 @@ static int chip_write(struct CHIPSTATE *
+@@ -163,6 +163,13 @@
                        return -1;
                }
        } else {
@@ -188862,7 +188822,7 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n",
                        chip->c->name, subaddr, val);
                chip->shadow.bytes[subaddr+1] = val;
-@@ -177,12 +184,20 @@ static int chip_write(struct CHIPSTATE *
+@@ -177,12 +184,20 @@
        return 0;
  }
  
@@ -188885,10 +188845,11 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                        val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask);
                }
        }
-@@ -228,6 +243,15 @@ static int chip_cmd(struct CHIPSTATE *ch
+@@ -227,6 +242,15 @@
        if (0 == cmd->count)
                return 0;
++
 +      if (cmd->count + cmd->bytes[0] - 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
 +              v4l_info(chip->c,
 +                       "Tried to access a non-existent register range: %d to %d\n",
@@ -188897,11 +188858,10 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
 +      }
 +
 +      /* FIXME: it seems that the shadow bytes are wrong bellow !*/
-+
        /* update our shadow register set; print bytes if (debug > 0) */
        v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:",
-               chip->c->name, name,cmd->bytes[0]);
-@@ -1576,13 +1600,13 @@ static int tvaudio_get_ctrl(struct CHIPS
+@@ -1576,13 +1600,13 @@
                return 0;
        }
        case V4L2_CID_AUDIO_BASS:
@@ -188918,7 +188878,7 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                ctrl->value = chip->treble;
                return 0;
        }
-@@ -1642,16 +1666,15 @@ static int tvaudio_set_ctrl(struct CHIPS
+@@ -1642,16 +1666,15 @@
                return 0;
        }
        case V4L2_CID_AUDIO_BASS:
@@ -188938,7 +188898,7 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                chip->treble = ctrl->value;
                chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble));
  
-@@ -1695,7 +1718,7 @@ static int chip_command(struct i2c_clien
+@@ -1695,7 +1718,7 @@
                                break;
                        case V4L2_CID_AUDIO_BASS:
                        case V4L2_CID_AUDIO_TREBLE:
@@ -188947,7 +188907,7 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                                        return -EINVAL;
                                break;
                        default:
-@@ -1792,7 +1815,7 @@ static int chip_command(struct i2c_clien
+@@ -1792,7 +1815,7 @@
                break;
        case VIDIOC_S_FREQUENCY:
                chip->mode = 0; /* automatic */
@@ -188956,10 +188916,10 @@ diff -purN linux-2.6.27/drivers/media/video/tvaudio.c linux-2.6.27.19-5.1/driver
                        desc->setmode(chip,V4L2_TUNER_MODE_MONO);
                        if (chip->prevmode != V4L2_TUNER_MODE_MONO)
                                chip->prevmode = -1; /* reset previous mode */
-diff -purN linux-2.6.27/drivers/message/fusion/Kconfig linux-2.6.27.19-5.1/drivers/message/fusion/Kconfig
---- linux-2.6.27/drivers/message/fusion/Kconfig        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/Kconfig 2009-03-25 16:11:12.000000000 +0000
-@@ -61,13 +61,25 @@ config FUSION_SAS
+diff -r 9608d5473017 drivers/message/fusion/Kconfig
+--- a/drivers/message/fusion/Kconfig   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/Kconfig   Wed May 06 16:56:21 2009 +0100
+@@ -61,13 +61,25 @@
          LSISAS1078
  
  config FUSION_MAX_SGE
@@ -188987,10 +188947,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/Kconfig linux-2.6.27.19-5.1/drive
          Decreasing this parameter will reduce memory requirements
          on a per controller instance.
  
-diff -purN linux-2.6.27/drivers/message/fusion/Makefile linux-2.6.27.19-5.1/drivers/message/fusion/Makefile
---- linux-2.6.27/drivers/message/fusion/Makefile       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/Makefile        2009-03-25 16:11:12.000000000 +0000
-@@ -1,12 +1,17 @@
+diff -r 9608d5473017 drivers/message/fusion/Makefile
+--- a/drivers/message/fusion/Makefile  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/Makefile  Wed May 06 16:56:21 2009 +0100
+@@ -1,11 +1,16 @@
 -# Fusion MPT drivers; recognized debug defines...
 +#
 +# LSI mpt fusion
@@ -189005,16 +188965,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/Makefile linux-2.6.27.19-5.1/driv
  # enable verbose logging
  # CONFIG_FUSION_LOGGING needs to be enabled in Kconfig
  #EXTRA_CFLAGS += -DMPT_DEBUG_VERBOSE
 -
--#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
 -
+-#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
  obj-$(CONFIG_FUSION_SPI)      += mptbase.o mptscsih.o mptspi.o
  obj-$(CONFIG_FUSION_FC)               += mptbase.o mptscsih.o mptfc.o
- obj-$(CONFIG_FUSION_SAS)      += mptbase.o mptscsih.o mptsas.o
-diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.c linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.c  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/csmi/csmisas.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/csmi/csmisas.c    Wed May 06 16:56:21 2009 +0100
 @@ -0,0 +1,5882 @@
 +/*
 + *  linux/drivers/message/fusion/csmi/csmisas.c
@@ -194898,9 +194857,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.c linux-2.6.27.19-5.
 +      free_pages((unsigned long)karg, memory_pages);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.h linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/csmi/csmisas.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/csmi/csmisas.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/csmi/csmisas.h    Wed May 06 16:56:21 2009 +0100
 @@ -0,0 +1,1621 @@
 +/**************************************************************************
 +
@@ -196523,9 +196482,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/csmi/csmisas.h linux-2.6.27.19-5.
 +#pragma pack()
 +
 +#endif // _CSMI_SAS_H_
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi.h
+--- a/drivers/message/fusion/lsi/mpi.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi.h Wed May 06 16:56:21 2009 +0100
 @@ -6,7 +6,7 @@
   *          Title:  MPI Message independent structures and definitions
   *  Creation Date:  July 27, 2000
@@ -196554,9 +196513,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi.h linux-2.6.27.19-5.1/dri
  #define MPI_HEADER_VERSION_DEV              (0x00)
  #define MPI_HEADER_VERSION_UNIT_MASK        (0xFF00)
  #define MPI_HEADER_VERSION_UNIT_SHIFT       (8)
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_cnfg.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_cnfg.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_cnfg.h
+--- a/drivers/message/fusion/lsi/mpi_cnfg.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_cnfg.h    Wed May 06 16:56:21 2009 +0100
 @@ -6,7 +6,7 @@
   *          Title:  MPI Config message, structures, and Pages
   *  Creation Date:  July 27, 2000
@@ -196587,7 +196546,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
   *  --------------------------------------------------------------------------
   */
  
-@@ -686,6 +700,14 @@ typedef struct _CONFIG_PAGE_MANUFACTURIN
+@@ -686,6 +700,14 @@
  #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA                 (0x01)
  
  /* defines for the ExtFlags field */
@@ -196602,7 +196561,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  #define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA      (0x0008)
  #define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE         (0x0004)
  #define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE        (0x0002)
-@@ -1159,6 +1181,8 @@ typedef struct _CONFIG_PAGE_IOC_6
+@@ -1159,6 +1181,8 @@
  
  /* IOC Page 6 Capabilities Flags */
  
@@ -196611,7 +196570,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  #define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING    (0x00000008)
  
  #define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE       (0x00000006)
-@@ -1428,6 +1452,14 @@ typedef struct _CONFIG_PAGE_BIOS_2
+@@ -1428,6 +1452,14 @@
  #define MPI_BIOSPAGE2_FORM_SAS_WWN                      (0x05)
  #define MPI_BIOSPAGE2_FORM_ENCLOSURE_SLOT               (0x06)
  
@@ -196626,7 +196585,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  
  /****************************************************************************
  *   SCSI Port Config Pages
-@@ -2419,6 +2451,15 @@ typedef struct _RAID_PHYS_DISK1_PATH
+@@ -2419,6 +2451,15 @@
  #define MPI_RAID_PHYSDISK1_FLAG_BROKEN          (0x0002)
  #define MPI_RAID_PHYSDISK1_FLAG_INVALID         (0x0001)
  
@@ -196642,7 +196601,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_1
  {
      CONFIG_PAGE_HEADER              Header;             /* 00h */
-@@ -2426,7 +2467,7 @@ typedef struct _CONFIG_PAGE_RAID_PHYS_DI
+@@ -2426,7 +2467,7 @@
      U8                              PhysDiskNum;        /* 05h */
      U16                             Reserved2;          /* 06h */
      U32                             Reserved1;          /* 08h */
@@ -196651,7 +196610,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  } CONFIG_PAGE_RAID_PHYS_DISK_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_1,
    RaidPhysDiskPage1_t, MPI_POINTER pRaidPhysDiskPage1_t;
  
-@@ -2844,6 +2885,7 @@ typedef struct _CONFIG_PAGE_SAS_DEVICE_0
+@@ -2844,6 +2885,7 @@
  #define MPI_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED            (0x01)
  #define MPI_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED      (0x02)
  #define MPI_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT   (0x03)
@@ -196659,9 +196618,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_cnfg.h linux-2.6.27.19-5.
  /* specific values for SATA Init failures */
  #define MPI_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN                 (0x10)
  #define MPI_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT    (0x11)
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_fc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_fc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_fc.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_fc.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_fc.h
+--- a/drivers/message/fusion/lsi/mpi_fc.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_fc.h      Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2000-2004 LSI Corporation.
@@ -196669,9 +196628,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_fc.h linux-2.6.27.19-5.1/
   *
   *
   *           Name:  mpi_fc.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_history.txt
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_history.txt     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_history.txt
+--- a/drivers/message/fusion/lsi/mpi_history.txt       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_history.txt       Wed May 06 16:56:21 2009 +0100
 @@ -3,28 +3,28 @@
   MPI Header File Change History
   ==============================
@@ -196710,7 +196669,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
  
  
   *  Date      Version   Description
-@@ -96,6 +96,9 @@ mpi.h
+@@ -96,6 +96,9 @@
   *  03-27-06  01.05.11  Bumped MPI_HEADER_VERSION_UNIT.
   *  10-11-06  01.05.12  Bumped MPI_HEADER_VERSION_UNIT.
   *  05-24-07  01.05.13  Bumped MPI_HEADER_VERSION_UNIT.
@@ -196720,7 +196679,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  --------------------------------------------------------------------------
  
  mpi_ioc.h
-@@ -127,7 +130,7 @@ mpi_ioc.h
+@@ -127,7 +130,7 @@
   *  08-08-01  01.02.01  Original release for v1.2 work.
   *                      New format for FWVersion and ProductId in
   *                      MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
@@ -196729,7 +196688,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *                      related structure and defines.
   *                      Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
   *                      Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
-@@ -187,7 +190,7 @@ mpi_ioc.h
+@@ -187,7 +190,7 @@
   *  10-11-06  01.05.12  Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED.
   *                      Added MaxInitiators field to PortFacts reply.
   *                      Added SAS Device Status Change ReasonCode for
@@ -196738,7 +196697,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *                      Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event
   *                      data structure.
   *                      Added new ImageType values for FWDownload and FWUpload
-@@ -199,6 +202,16 @@ mpi_ioc.h
+@@ -199,6 +202,16 @@
   *                      added _MULTI_PORT_DOMAIN.
   *  05-24-07  01.05.14  Added Common Boot Block type to FWDownload Request.
   *                      Added Common Boot Block type to FWUpload Request.
@@ -196755,7 +196714,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  --------------------------------------------------------------------------
  
  mpi_cnfg.h
-@@ -213,7 +226,7 @@ mpi_cnfg.h
+@@ -213,7 +226,7 @@
   *                      Added _RESPONSE_ID_MASK definition to SCSI_PORT_1
   *                      page and updated the page version.
   *                      Added Information field and _INFO_PARAMS_NEGOTIATED
@@ -196764,7 +196723,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  06-22-00  01.00.03  Removed batch controls from LAN_0 page and updated the
   *                      page version.
   *                      Added BucketsRemaining to LAN_1 page, redefined the
-@@ -496,6 +509,20 @@ mpi_cnfg.h
+@@ -496,6 +509,20 @@
   *                      Expander Page 0 Flags field.
   *                      Fixed define for
   *                      MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
@@ -196785,7 +196744,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  --------------------------------------------------------------------------
  
  mpi_init.h
-@@ -661,6 +688,9 @@ mpi_raid.h
+@@ -661,6 +688,9 @@
   *                      _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
   *  02-28-07  01.05.03  Added new RAID Action, Device FW Update Mode, and
   *                      associated defines.
@@ -196795,7 +196754,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  --------------------------------------------------------------------------
  
  mpi_tool.h
-@@ -694,6 +724,10 @@ mpi_sas.h
+@@ -694,6 +724,10 @@
   *                      reply.
   *  10-11-06  01.05.04  Fixed the name of a define for Operation field of SAS IO
   *                      Unit Control request.
@@ -196806,7 +196765,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
   *  --------------------------------------------------------------------------
  
  mpi_type.h
-@@ -709,20 +743,20 @@ mpi_type.h
+@@ -709,20 +743,20 @@
  
  mpi_history.txt         Parts list history
  
@@ -196841,9 +196800,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_history.txt linux-2.6.27.
  
  Filename    01.05.14   01.05.13   01.05.12   01.05.11   01.05.10   01.05.09
  ----------  --------   --------   --------   --------   --------   --------
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_init.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_init.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_init.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_init.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_init.h
+--- a/drivers/message/fusion/lsi/mpi_init.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_init.h    Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2000-2007 LSI Corporation.
@@ -196851,9 +196810,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_init.h linux-2.6.27.19-5.
   *
   *
   *           Name:  mpi_init.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_ioc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_ioc.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_ioc.h
+--- a/drivers/message/fusion/lsi/mpi_ioc.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_ioc.h     Wed May 06 16:56:21 2009 +0100
 @@ -1,12 +1,12 @@
  /*
 - *  Copyright (c) 2000-2007 LSI Corporation.
@@ -196886,7 +196845,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
   *  --------------------------------------------------------------------------
   */
  
-@@ -612,6 +622,8 @@ typedef struct _EVENT_DATA_SAS_DEVICE_ST
+@@ -612,6 +622,8 @@
  #define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL   (0x0B)
  #define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL       (0x0C)
  #define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION        (0x0D)
@@ -196895,7 +196854,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
  
  
  /* SCSI Event data for Queue Full event */
-@@ -708,6 +720,8 @@ typedef struct _MPI_EVENT_DATA_IR2
+@@ -708,6 +720,8 @@
  #define MPI_EVENT_IR2_RC_PD_REMOVED                 (0x05)
  #define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED       (0x06)
  #define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR       (0x07)
@@ -196904,7 +196863,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
  
  /* defines for logical disk states */
  #define MPI_LD_STATE_OPTIMAL                        (0x00)
-@@ -867,6 +881,7 @@ typedef struct _EVENT_DATA_DISCOVERY_ERR
+@@ -867,6 +881,7 @@
  #define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE          (0x00000800)
  #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS            (0x00001000)
  #define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN           (0x00002000)
@@ -196912,7 +196871,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
  
  /* SAS SMP Error Event data */
  
-@@ -902,6 +917,8 @@ typedef struct _EVENT_DATA_SAS_INIT_DEV_
+@@ -902,6 +917,8 @@
  
  /* defines for the ReasonCode field of the SAS Initiator Device Status Change event */
  #define MPI_EVENT_SAS_INIT_RC_ADDED                 (0x01)
@@ -196921,7 +196880,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
  
  /* SAS Initiator Device Table Overflow Event data */
  
-@@ -910,6 +927,7 @@ typedef struct _EVENT_DATA_SAS_INIT_TABL
+@@ -910,6 +927,7 @@
      U8                      MaxInit;                    /* 00h */
      U8                      CurrentInit;                /* 01h */
      U16                     Reserved1;                  /* 02h */
@@ -196929,9 +196888,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_ioc.h linux-2.6.27.19-5.1
  } EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
    MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
    MpiEventDataSasInitTableOverflow_t,
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_lan.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_lan.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_lan.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_lan.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_lan.h
+--- a/drivers/message/fusion/lsi/mpi_lan.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_lan.h     Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2000-2004 LSI Corporation.
@@ -196939,9 +196898,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_lan.h linux-2.6.27.19-5.1
   *
   *
   *           Name:  mpi_lan.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_fc.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_fc.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_log_fc.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_fc.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_log_fc.h
+--- a/drivers/message/fusion/lsi/mpi_log_fc.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_log_fc.h  Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2000-2001 LSI Corporation. All rights reserved.
@@ -196949,9 +196908,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_fc.h linux-2.6.27.19-
   *
   *  NAME:           fc_log.h
   *  SUMMARY:        MPI IocLogInfo definitions for the SYMFC9xx chips
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_sas.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_sas.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_log_sas.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_log_sas.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_log_sas.h
+--- a/drivers/message/fusion/lsi/mpi_log_sas.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_log_sas.h Wed May 06 16:56:21 2009 +0100
 @@ -1,6 +1,6 @@
  /***************************************************************************
   *                                                                         *
@@ -197038,9 +196997,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_log_sas.h linux-2.6.27.19
  
  /****************************************************************************/
  /* Defines for convenience                                                  */
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_raid.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_raid.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_raid.h
+--- a/drivers/message/fusion/lsi/mpi_raid.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_raid.h    Wed May 06 16:56:21 2009 +0100
 @@ -1,12 +1,12 @@
  /*
 - *  Copyright (c) 2001-2007 LSI Corporation.
@@ -197066,7 +197025,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h linux-2.6.27.19-5.
   *  --------------------------------------------------------------------------
   */
  
-@@ -93,6 +96,7 @@ typedef struct _MSG_RAID_ACTION
+@@ -93,6 +96,7 @@
  #define MPI_RAID_ACTION_SET_RESYNC_RATE             (0x13)
  #define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE         (0x14)
  #define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE       (0x15)
@@ -197074,19 +197033,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_raid.h linux-2.6.27.19-5.
  
  /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
  #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC           (0x00000001)
-@@ -105,6 +109,9 @@ typedef struct _MSG_RAID_ACTION
+@@ -104,6 +108,9 @@
  #define MPI_RAID_ACTION_ADATA_KEEP_LBA0             (0x00000000)
  #define MPI_RAID_ACTION_ADATA_ZERO_LBA0             (0x00000002)
++
 +/* ActionDataWord defines for use with MPI_RAID_ACTION_DISABLE_VOLUME action */
 +#define MPI_RAID_ACTION_ADATA_DISABLE_FULL_REBUILD  (0x00000001)
-+
  /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
  #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL        (0x00000001)
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_sas.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_sas.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_sas.h
+--- a/drivers/message/fusion/lsi/mpi_sas.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_sas.h     Wed May 06 16:56:21 2009 +0100
 @@ -1,12 +1,12 @@
  /*
 - *  Copyright (c) 2004-2006 LSI Corporation.
@@ -197122,7 +197081,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1
  #define MPI_SAS_DEVICE_INFO_SEP                 (0x00004000)
  #define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE        (0x00002000)
  #define MPI_SAS_DEVICE_INFO_LSI_DEVICE          (0x00001000)
-@@ -216,7 +222,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -216,7 +222,7 @@
      U8                      ChainOffset;        /* 02h */
      U8                      Function;           /* 03h */
      U16                     DevHandle;          /* 04h */
@@ -197131,7 +197090,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1
      U8                      MsgFlags;           /* 07h */
      U32                     MsgContext;         /* 08h */
      U8                      TargetID;           /* 0Ch */
-@@ -225,7 +231,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -225,7 +231,7 @@
      U8                      PrimFlags;          /* 0Fh */
      U32                     Primitive;          /* 10h */
      U64                     SASAddress;         /* 14h */
@@ -197140,7 +197099,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1
  } MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST,
    SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
  
-@@ -241,6 +247,8 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -241,6 +247,8 @@
  #define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL  (0x0C)
  #define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE       (0x0D)  /* obsolete name */
  #define MPI_SAS_OP_REMOVE_DEVICE                (0x0D)
@@ -197149,7 +197108,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1
  
  /* values for the PrimFlags field */
  #define MPI_SAS_PRIMFLAGS_SINGLE                (0x08)
-@@ -256,7 +264,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_R
+@@ -256,7 +264,7 @@
      U8                      MsgLength;          /* 02h */
      U8                      Function;           /* 03h */
      U16                     DevHandle;          /* 04h */
@@ -197158,9 +197117,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_sas.h linux-2.6.27.19-5.1
      U8                      MsgFlags;           /* 07h */
      U32                     MsgContext;         /* 08h */
      U16                     Reserved4;          /* 0Ch */
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_targ.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_targ.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_targ.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_targ.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_targ.h
+--- a/drivers/message/fusion/lsi/mpi_targ.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_targ.h    Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2000-2004 LSI Corporation.
@@ -197168,9 +197127,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_targ.h linux-2.6.27.19-5.
   *
   *
   *           Name:  mpi_targ.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_tool.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_tool.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_tool.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_tool.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_tool.h
+--- a/drivers/message/fusion/lsi/mpi_tool.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_tool.h    Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  Copyright (c) 2001-2005 LSI Corporation.
@@ -197178,9 +197137,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_tool.h linux-2.6.27.19-5.
   *
   *
   *           Name:  mpi_tool.h
-diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_type.h linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_type.h
---- linux-2.6.27/drivers/message/fusion/lsi/mpi_type.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/lsi/mpi_type.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/lsi/mpi_type.h
+--- a/drivers/message/fusion/lsi/mpi_type.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/lsi/mpi_type.h    Wed May 06 16:56:21 2009 +0100
 @@ -1,12 +1,12 @@
  /*
 - *  Copyright (c) 2000-2004 LSI Corporation.
@@ -197204,9 +197163,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/lsi/mpi_type.h linux-2.6.27.19-5.
   *  --------------------------------------------------------------------------
   */
  
-diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.c
---- linux-2.6.27/drivers/message/fusion/mptbase.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.c       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptbase.c
+--- a/drivers/message/fusion/mptbase.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptbase.c Wed May 06 16:56:21 2009 +0100
 @@ -58,6 +58,7 @@
  #include <linux/delay.h>
  #include <linux/interrupt.h>          /* needed for in_interrupt() proto */
@@ -197215,7 +197174,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  #include <asm/io.h>
  #ifdef CONFIG_MTRR
  #include <asm/mtrr.h>
-@@ -79,19 +80,43 @@ MODULE_VERSION(my_VERSION);
+@@ -79,19 +80,43 @@
  /*
   *  cmd line parameters
   */
@@ -197264,7 +197223,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
  #ifdef MFCNT
  static int mfcounter = 0;
-@@ -102,7 +127,6 @@ static int mfcounter = 0;
+@@ -102,7 +127,6 @@
  /*
   *  Public data...
   */
@@ -197272,7 +197231,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static struct proc_dir_entry *mpt_proc_root_dir;
  
  #define WHOINIT_UNKNOWN               0xAA
-@@ -125,6 +149,8 @@ static struct mpt_pci_driver       *MptDevice
+@@ -125,6 +149,8 @@
  
  static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq);
  
@@ -197281,7 +197240,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  /*
   *  Driver Callback Index's
   */
-@@ -135,8 +161,8 @@ static u8 last_drv_idx;
+@@ -135,8 +161,8 @@
  /*
   *  Forward protos...
   */
@@ -197292,7 +197251,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static int    mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes,
                        u32 *req, int replyBytes, u16 *u16reply, int maxwait,
                        int sleepFlag);
-@@ -167,9 +193,9 @@ static int mpt_GetScsiPortSettings(MPT_A
+@@ -167,9 +193,9 @@
  static int    mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum);
  static void   mpt_read_ioc_pg_1(MPT_ADAPTER *ioc);
  static void   mpt_read_ioc_pg_4(MPT_ADAPTER *ioc);
@@ -197304,7 +197263,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static int    SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp);
  static int    mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag);
  static int    mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init);
-@@ -184,7 +210,6 @@ static int procmpt_iocinfo_read(char *bu
+@@ -184,7 +210,6 @@
  #endif
  static void   mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc);
  
@@ -197312,7 +197271,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static int    ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *evReply, int *evHandlers);
  static void   mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf);
  static void   mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info);
-@@ -193,6 +218,7 @@ static void        mpt_sas_log_info(MPT_ADAPTER
+@@ -193,6 +218,7 @@
  static int    mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
  static void   mpt_inactive_raid_list_free(MPT_ADAPTER *ioc);
  
@@ -197320,7 +197279,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  /* module entry point */
  static int  __init    fusion_init  (void);
  static void __exit    fusion_exit  (void);
-@@ -223,7 +249,16 @@ pci_enable_io_access(struct pci_dev *pde
+@@ -223,7 +249,16 @@
        pci_write_config_word(pdev, PCI_COMMAND, command_reg);
  }
  
@@ -197338,10 +197297,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  {
        int ret = param_set_int(val, kp);
        MPT_ADAPTER *ioc;
-@@ -254,6 +289,56 @@ mpt_get_cb_idx(MPT_DRIVER_CLASS dclass)
- }
- /**
+@@ -251,6 +286,56 @@
+               if (MptDriverClass[cb_idx] == dclass)
+                       return cb_idx;
+       return 0;
++}
++
++/**
 + * mpt_is_discovery_complete - determine if discovery has completed
 + * @ioc: per adatper instance
 + *
@@ -197389,13 +197351,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +          buffer, dma_handle);
 + out:
 +      return rc;
-+}
-+
-+/**
-  *    mpt_fault_reset_work - work performed on workq after ioc fault
-  *    @work: input argument, used to derive ioc
-  *
-@@ -267,23 +352,29 @@ mpt_fault_reset_work(struct work_struct 
+ }
+ /**
+@@ -267,23 +352,29 @@
        int              rc;
        unsigned long    flags;
  
@@ -197429,15 +197388,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
   out:
-@@ -301,7 +392,6 @@ mpt_fault_reset_work(struct work_struct 
+@@ -300,7 +391,6 @@
+                       msecs_to_jiffies(MPT_POLLING_INTERVAL));
        spin_unlock_irqrestore(&ioc->fault_reset_work_lock, flags);
  }
 -
  /*
   *  Process turbo (context) reply...
-  */
-@@ -354,7 +444,7 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa
+@@ -354,7 +444,7 @@
  
        /*  Check for (valid) IO callback!  */
        if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
@@ -197446,7 +197405,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
                                __func__, ioc->name, cb_idx);
                goto out;
-@@ -398,6 +488,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
+@@ -398,6 +488,7 @@
  
        dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Got non-TURBO reply=%p req_idx=%x cb_idx=%x Function=%x\n",
                        ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function));
@@ -197454,7 +197413,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        DBG_DUMP_REPLY_FRAME(ioc, (u32 *)mr);
  
         /*  Check/log IOC log info
-@@ -418,7 +509,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
+@@ -418,7 +509,7 @@
  
        /*  Check for (valid) IO callback!  */
        if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS ||
@@ -197463,25 +197422,27 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                printk(MYIOC_s_WARN_FMT "%s: Invalid cb_idx (%d)!\n",
                                __func__, ioc->name, cb_idx);
                freeme = 0;
-@@ -478,9 +569,9 @@ mpt_interrupt(int irq, void *bus_id)
+@@ -478,9 +569,9 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
 - *    mpt_base_reply - MPT base driver's callback routine
-+ *    mptbase_reply - MPT base driver's callback routine
-  *    @ioc: Pointer to MPT_ADAPTER structure
+- *    @ioc: Pointer to MPT_ADAPTER structure
 - *    @mf: Pointer to original MPT request frame
++ *    mptbase_reply - MPT base driver's callback routine
++ *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @req: Pointer to original MPT request frame
   *    @reply: Pointer to MPT reply frame (NULL if TurboReply)
   *
   *    MPT base driver's callback routine; all base driver
-@@ -491,122 +582,49 @@ mpt_interrupt(int irq, void *bus_id)
+@@ -491,122 +582,49 @@
   *    should be freed, or 0 if it shouldn't.
   */
  static int
 -mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply)
+-{
 +mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
- {
++{
 +      EventNotificationReply_t *pEventReply;
 +      u8 event;
 +      int evHandlers;
@@ -197513,12 +197474,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                      devtverboseprintk(ioc, printk(MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n",
 -                                      ioc->name, evHandlers, results));
 -              }
+-
 -              /*
 -               *      Hmmm...  It seems that EventNotificationReply is an exception
 -               *      to the rule of one reply per request.
 -               */
 -              if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) {
++
 +      switch (reply->u.hdr.Function) {
 +      case MPI_FUNCTION_EVENT_NOTIFICATION:
 +              pEventReply = (EventNotificationReply_t *)reply;
@@ -197637,7 +197599,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        /*
-@@ -702,7 +720,7 @@ mpt_event_register(u8 cb_idx, MPT_EVHAND
+@@ -702,7 +720,7 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
@@ -197646,7 +197608,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
   *    @cb_idx: previously registered callback handle
   *
   *    Each protocol-specific driver should call this routine
-@@ -780,7 +798,7 @@ mpt_device_driver_register(struct mpt_pc
+@@ -780,7 +798,7 @@
                    ioc->pcidev->driver->id_table : NULL;
                if (dd_cbfunc->probe)
                        dd_cbfunc->probe(ioc->pcidev, id);
@@ -197655,15 +197617,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        return 0;
  }
-@@ -809,7 +827,6 @@ mpt_device_driver_deregister(u8 cb_idx)
+@@ -808,7 +826,6 @@
        MptDeviceDriverHandlers[cb_idx] = NULL;
  }
 -
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
-  *    mpt_get_msg_frame - Obtain an MPT request frame from the pool
-@@ -851,7 +868,6 @@ mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER
+@@ -851,7 +868,6 @@
                mf->u.frame.linkage.arg1 = 0;
                mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx;  /* byte */
                req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
@@ -197671,7 +197633,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                req_idx = req_offset / ioc->req_sz;
                mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_idx);
                mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0;
-@@ -901,14 +917,14 @@ mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER
+@@ -901,14 +917,14 @@
        /* ensure values are reset properly! */
        mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx;          /* byte */
        req_offset = (u8 *)mf - (u8 *)ioc->req_frames;
@@ -197688,7 +197650,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mf_dma_addr=%x req_idx=%d "
            "RequestNB=%x\n", ioc->name, mf_dma_addr, req_idx,
            ioc->RequestNB[req_idx]));
-@@ -966,43 +982,145 @@ mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT
+@@ -966,42 +982,144 @@
  
        /*  Put Request back on FreeQ!  */
        spin_lock_irqsave(&ioc->FreeQlock, flags);
@@ -197706,8 +197668,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
+-/**
 - *    mpt_add_sge - Place a simple SGE at address pAddr.
++/**
 + *    mpt_add_sge - Place a simple 32 bit SGE at address pAddr.
   *    @pAddr: virtual address for SGE
   *    @flagslength: SGE flags and data transfer length
@@ -197723,21 +197686,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  {
 -      if (sizeof(dma_addr_t) == sizeof(u64)) {
 -              SGESimple64_t *pSge = (SGESimple64_t *) pAddr;
--              u32 tmp = dma_addr & 0xFFFFFFFF;
 +      SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
 +      pSge->FlagsLength = cpu_to_le32(flagslength);
 +      pSge->Address = cpu_to_le32(dma_addr);
 +}
--              pSge->FlagsLength = cpu_to_le32(flagslength);
--              pSge->Address.Low = cpu_to_le32(tmp);
--              tmp = (u32) ((u64)dma_addr >> 32);
--              pSge->Address.High = cpu_to_le32(tmp);
--      } else {
--              SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
--              pSge->FlagsLength = cpu_to_le32(flagslength);
--              pSge->Address = cpu_to_le32(dma_addr);
++
++
 +/**
 + *    mpt_add_sge_64bit - Place a simple 64 bit SGE at address pAddr.
 + *    @pAddr: virtual address for SGE
@@ -197794,7 +197748,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                          "addr = 0x%llx len = %d\n",
 +                          (unsigned long long)dma_addr,
 +                          MPI_SGE_LENGTH(flagslength));
-       }
++      }
 +
 +      pSge->Address.High = cpu_to_le32(tmp);
 +      pSge->FlagsLength = cpu_to_le32(
@@ -197833,8 +197787,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +mpt_add_chain_64bit(char *pAddr, u8 next, u16 length, dma_addr_t dma_addr)
 +{
 +              SGEChain64_t *pChain = (SGEChain64_t *) pAddr;
-+              u32 tmp = dma_addr & 0xFFFFFFFF;
-+
+               u32 tmp = dma_addr & 0xFFFFFFFF;
+-              pSge->FlagsLength = cpu_to_le32(flagslength);
+-              pSge->Address.Low = cpu_to_le32(tmp);
 +              pChain->Length = cpu_to_le16(length);
 +              pChain->Flags = (MPI_SGE_FLAGS_CHAIN_ELEMENT |
 +                               MPI_SGE_FLAGS_64_BIT_ADDRESSING);
@@ -197842,15 +197798,22 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +              pChain->NextChainOffset = next;
 +
 +              pChain->Address.Low = cpu_to_le32(tmp);
-+              tmp = (u32) ((u64)dma_addr >> 32);
+               tmp = (u32) ((u64)dma_addr >> 32);
+-              pSge->Address.High = cpu_to_le32(tmp);
+-
+-      } else {
+-              SGESimple32_t *pSge = (SGESimple32_t *) pAddr;
+-              pSge->FlagsLength = cpu_to_le32(flagslength);
+-              pSge->Address = cpu_to_le32(dma_addr);
+-      }
+-}
 +              pChain->Address.High = cpu_to_le32(tmp);
- }
++}
 +
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
-  *    mpt_send_handshake_request - Send MPT request via doorbell handshake method.
-@@ -1023,7 +1141,7 @@ mpt_add_sge(char *pAddr, u32 flagslength
+@@ -1023,7 +1141,7 @@
  int
  mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
  {
@@ -197859,7 +197822,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        u8      *req_as_bytes;
        int      ii;
  
-@@ -1038,7 +1156,7 @@ mpt_send_handshake_request(u8 cb_idx, MP
+@@ -1038,7 +1156,7 @@
         * is in proper (pre-alloc'd) request buffer range...
         */
        ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req);
@@ -197868,7 +197831,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;
                mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);
                mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx;
-@@ -1114,7 +1232,6 @@ mpt_send_handshake_request(u8 cb_idx, MP
+@@ -1114,7 +1232,6 @@
   *
   * Returns 0 for success, non-zero for failure.
   */
@@ -197876,7 +197839,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static int
  mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
  {
-@@ -1171,7 +1288,7 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pI
+@@ -1171,7 +1288,7 @@
                            host_page_buffer_sz,
                            &ioc->HostPageBuffer_dma)) != NULL) {
  
@@ -197885,7 +197848,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                                    "host_page_buffer @ %p, dma @ %x, sz=%d bytes\n",
                                    ioc->name, ioc->HostPageBuffer,
                                    (u32)ioc->HostPageBuffer_dma,
-@@ -1195,15 +1312,11 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pI
+@@ -1195,15 +1312,11 @@
        psge = (char *)&ioc_init->HostPageBufferSGE;
        flags_length = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
            MPI_SGE_FLAGS_SYSTEM_ADDRESS |
@@ -197902,7 +197865,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        ioc->facts.HostPageBufferSGE = ioc_init->HostPageBufferSGE;
  
  return 0;
-@@ -1493,7 +1606,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1493,7 +1606,6 @@
        unsigned long    port;
        u32              msize;
        u32              psize;
@@ -197910,10 +197873,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        int              r = -ENODEV;
        struct pci_dev *pdev;
  
-@@ -1509,24 +1621,40 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1509,24 +1621,40 @@
                    "MEM failed\n", ioc->name);
                return r;
        }
+-
+-      pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
+-
+-      if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
+-          && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+-              dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
+-                  ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
+-                  ioc->name));
+-      } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
+-          && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
+-              dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
+-                  ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
+-                  ioc->name));
+-      } else {
+-              printk(MYIOC_s_WARN_FMT "no suitable DMA mask for %s\n",
+-                  ioc->name, pci_name(pdev));
+-              pci_release_selected_regions(pdev, ioc->bars);
+-              return r;
 +      if (sizeof(dma_addr_t) > 4) {
 +              uint64_t required_mask;
 +              required_mask = dma_get_required_mask(&pdev->dev);
@@ -197935,24 +197916,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                          ioc->name, pci_name(pdev));
 +                      return r;
 +              }
--      pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
--
--      if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)
--          && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
--              dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
--                  ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
--                  ioc->name));
--      } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
--          && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
--              dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
--                  ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
--                  ioc->name));
-       } else {
--              printk(MYIOC_s_WARN_FMT "no suitable DMA mask for %s\n",
--                  ioc->name, pci_name(pdev));
--              pci_release_selected_regions(pdev, ioc->bars);
--              return r;
++
++      } else {
 +              if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)
 +                  && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
 +                      ioc->dma_mask = DMA_32BIT_MASK;
@@ -197967,7 +197932,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        mem_phys = msize = 0;
-@@ -1554,7 +1682,7 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1554,7 +1682,7 @@
        mem = ioremap(mem_phys, msize);
        if (mem == NULL) {
                printk(MYIOC_s_ERR_FMT ": ERROR - Unable to map adapter"
@@ -197976,7 +197941,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                return -EINVAL;
        }
        ioc->memmap = mem;
-@@ -1587,7 +1715,6 @@ mpt_mapresources(MPT_ADAPTER *ioc)
+@@ -1587,7 +1715,6 @@
   *
   *    Returns 0 for success, non-zero for failure.
   *
@@ -197984,7 +197949,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
   */
  int
  mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
-@@ -1610,6 +1737,7 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1610,6 +1737,7 @@
  
        ioc->id = mpt_ids++;
        sprintf(ioc->name, "ioc%d", ioc->id);
@@ -197992,7 +197957,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        /*
         * set initial debug level
-@@ -1620,7 +1748,6 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1620,7 +1748,6 @@
        if (mpt_debug_level)
                printk(KERN_INFO "mpt_debug_level=%xh\n", mpt_debug_level);
  
@@ -198000,7 +197965,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        ioc->pcidev = pdev;
        if (mpt_mapresources(ioc)) {
-@@ -1628,14 +1755,34 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1628,14 +1755,34 @@
                return r;
        }
  
@@ -198039,7 +198004,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        /* Initialize the event logging.
         */
-@@ -1648,16 +1795,13 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1648,15 +1795,12 @@
        ioc->mfcnt = 0;
  #endif
  
@@ -198049,15 +198014,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        /* Initilize SCSI Config Data structure
         */
        memset(&ioc->spi_data, 0, sizeof(SpiCfgData));
+-
 -      /* Initialize the running configQ head.
 -       */
 -      INIT_LIST_HEAD(&ioc->configQ);
--
        /* Initialize the fc rport list head.
         */
-       INIT_LIST_HEAD(&ioc->fc_rports);
-@@ -1665,11 +1809,11 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1665,11 +1809,11 @@
        /* Find lookup slot. */
        INIT_LIST_HEAD(&ioc->list);
  
@@ -198071,7 +198035,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        snprintf(ioc->reset_work_q_name, sizeof(ioc->reset_work_q_name),
                 "mpt_poll_%d", ioc->id);
        ioc->reset_work_q =
-@@ -1682,8 +1826,9 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1682,8 +1826,9 @@
                return -ENOMEM;
        }
  
@@ -198083,7 +198047,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
        mpt_get_product_name(pdev->vendor, pdev->device, revision, ioc->prod_name);
-@@ -1703,14 +1848,14 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1703,14 +1848,14 @@
        case MPI_MANUFACTPAGE_DEVICEID_FC929X:
                if (revision < XL_929) {
                        /* 929X Chip Fix. Set Split transactions level
@@ -198101,7 +198065,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        pci_read_config_byte(pdev, 0x6a, &pcixcmd);
                        pcixcmd |= 0x08;
                        pci_write_config_byte(pdev, 0x6a, pcixcmd);
-@@ -1728,6 +1873,7 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1728,6 +1873,7 @@
                ioc->bus_type = FC;
                break;
  
@@ -198109,7 +198073,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        case MPI_MANUFACTPAGE_DEVID_53C1030:
                /* 1030 Chip Fix. Disable Split transactions
                 * for PCIX. Set MOST bits to zero if Rev < C0( = 8).
-@@ -1745,22 +1891,33 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1745,22 +1891,33 @@
        case MPI_MANUFACTPAGE_DEVID_SAS1064:
        case MPI_MANUFACTPAGE_DEVID_SAS1068:
                ioc->errata_flag_1064 = 1;
@@ -198120,9 +198084,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        case MPI_MANUFACTPAGE_DEVID_SAS1068E:
        case MPI_MANUFACTPAGE_DEVID_SAS1078:
                ioc->bus_type = SAS;
-+              break;
-       }
+-      }
+-
 -      if (mpt_msi_enable == -1) {
 -              /* Enable on SAS, disable on FC and SPI */
 -              if (ioc->bus_type == SAS)
@@ -198132,6 +198095,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      } else
 -              /* follow flag: 0 - disable; 1 - enable */
 -              ioc->msi_enable = mpt_msi_enable;
++              break;
++      }
++
 +      switch (ioc->bus_type) {
 +      case SAS:
 +              ioc->msi_enable = mpt_msi_enable_sas;
@@ -198152,7 +198118,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        if (ioc->errata_flag_1064)
                pci_disable_io_access(pdev);
-@@ -1782,10 +1939,17 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1782,10 +1939,17 @@
         */
        mpt_detect_bound_ports(ioc, pdev);
  
@@ -198171,7 +198137,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                list_del(&ioc->list);
                if (ioc->alt_ioc)
-@@ -1796,7 +1960,8 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1796,7 +1960,8 @@
  
                destroy_workqueue(ioc->reset_work_q);
                ioc->reset_work_q = NULL;
@@ -198181,7 +198147,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                kfree(ioc);
                pci_set_drvdata(pdev, NULL);
                return r;
-@@ -1832,7 +1997,6 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1832,7 +1997,6 @@
        if (!ioc->alt_ioc)
                queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work,
                        msecs_to_jiffies(MPT_POLLING_INTERVAL));
@@ -198189,7 +198155,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        return 0;
  }
  
-@@ -1841,14 +2005,13 @@ mpt_attach(struct pci_dev *pdev, const s
+@@ -1841,14 +2005,13 @@
   *    mpt_detach - Remove a PCI intelligent MPT adapter.
   *    @pdev: Pointer to pci_dev structure
   */
@@ -198205,7 +198171,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        struct workqueue_struct *wq;
  
        /*
-@@ -1861,6 +2024,11 @@ mpt_detach(struct pci_dev *pdev)
+@@ -1861,6 +2024,11 @@
        cancel_delayed_work(&ioc->fault_reset_work);
        destroy_workqueue(wq);
  
@@ -198217,7 +198183,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name);
        remove_proc_entry(pname, NULL);
-@@ -1877,20 +2045,7 @@ mpt_detach(struct pci_dev *pdev)
+@@ -1877,20 +2045,7 @@
                }
        }
  
@@ -198238,7 +198204,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  
  /**************************************************************************
-@@ -1923,7 +2078,6 @@ mpt_suspend(struct pci_dev *pdev, pm_mes
+@@ -1923,7 +2078,6 @@
        /* disable interrupts */
        CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);
        ioc->active = 0;
@@ -198246,7 +198212,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        /* Clear any lingering interrupt */
        CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
  
-@@ -1963,6 +2117,22 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1963,6 +2117,22 @@
        if (err)
                return err;
  
@@ -198269,7 +198235,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        printk(MYIOC_s_INFO_FMT "pci-resume: ioc-state=0x%x,doorbell=0x%x\n",
            ioc->name, (mpt_GetIocState(ioc, 1) >> MPI_IOC_STATE_SHIFT),
            CHIPREG_READ32(&ioc->chip->Doorbell));
-@@ -1987,7 +2157,7 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1987,7 +2157,7 @@
        /* bring ioc to operational state */
        printk(MYIOC_s_INFO_FMT "Sending mpt_do_ioc_recovery\n", ioc->name);
        recovery_state = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP,
@@ -198278,7 +198244,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        if (recovery_state != 0)
                printk(MYIOC_s_WARN_FMT "pci-resume: Cannot recover, "
                    "error:[%x]\n", ioc->name, recovery_state);
-@@ -1996,7 +2166,6 @@ mpt_resume(struct pci_dev *pdev)
+@@ -1996,7 +2166,6 @@
                    "pci-resume: success\n", ioc->name);
   out:
        return 0;
@@ -198286,7 +198252,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  #endif
  
-@@ -2045,14 +2214,12 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2045,14 +2214,12 @@
        int      hard;
        int      rc=0;
        int      ii;
@@ -198302,7 +198268,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
            reason == MPT_HOSTEVENT_IOC_BRINGUP ? "bringup" : "recovery");
  
        /* Disable reply interrupts (also blocks FreeQ) */
-@@ -2060,7 +2227,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2060,7 +2227,7 @@
        ioc->active = 0;
  
        if (ioc->alt_ioc) {
@@ -198311,7 +198277,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        reset_alt_ioc_active = 1;
  
                /* Disable alt-IOC's reply interrupts (and FreeQ) for a bit ... */
-@@ -2079,16 +2246,19 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2079,16 +2246,19 @@
  
                        if (reset_alt_ioc_active && ioc->alt_ioc) {
                                /* (re)Enable alt-IOC! (reply interrupt, FreeQ) */
@@ -198326,16 +198292,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                } else {
 -                      printk(MYIOC_s_WARN_FMT "NOT READY!\n", ioc->name);
+-              }
+-              return -1;
 +                      printk(MYIOC_s_WARN_FMT "NOT READY WARNING!\n",
 +                          ioc->name);
-               }
--              return -1;
++              }
 +              ret = -1;
 +              goto out;
        }
  
        /* hard_reset_done = 0 if a soft reset was performed
-@@ -2098,7 +2268,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2098,7 +2268,9 @@
                if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0)
                        alt_ioc_ready = 1;
                else
@@ -198346,7 +198313,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        for (ii=0; ii<5; ii++) {
-@@ -2156,23 +2328,28 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2156,23 +2328,28 @@
                if (ioc->pcidev->irq) {
                        if (ioc->msi_enable && !pci_enable_msi(ioc->pcidev))
                                printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n",
@@ -198380,7 +198347,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                }
        }
  
-@@ -2181,17 +2358,22 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2181,17 +2358,22 @@
         * init as upper addresses are needed for init.
         * If fails, continue with alt-ioc processing
         */
@@ -198404,7 +198371,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                    ioc->alt_ioc->name, rc);
                alt_ioc_ready = 0;
                reset_alt_ioc_active = 0;
-@@ -2201,15 +2383,16 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2201,15 +2383,16 @@
                if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) {
                        alt_ioc_ready = 0;
                        reset_alt_ioc_active = 0;
@@ -198424,7 +198391,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                        /* Controller is not operational, cannot do upload
                         */
-@@ -2238,28 +2421,35 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2238,28 +2421,35 @@
                }
        }
  
@@ -198452,6 +198419,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                  ioc->alt_ioc->name));
 -              CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM);
 -              ioc->alt_ioc->active = 1;
+-      }
+-
+-      /*  Enable MPT base driver management of EventNotification
+-       *  and EventAck handling.
+-       */
+-      if ((ret == 0) && (!ioc->facts.EventState))
+-              (void) SendEventNotification(ioc, 1);   /* 1=Enable EventNotification */
+-
+-      if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState)
+-              (void) SendEventNotification(ioc->alt_ioc, 1);  /* 1=Enable EventNotification */
 +      if (rc == 0) {  /* alt ioc */
 +              if (reset_alt_ioc_active && ioc->alt_ioc) {
 +                      /* (re)Enable alt-IOC! (reply interrupt) */
@@ -198462,31 +198439,24 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                          MPI_HIM_DIM);
 +                      ioc->alt_ioc->active = 1;
 +              }
-       }
--      /*  Enable MPT base driver management of EventNotification
--       *  and EventAck handling.
--       */
--      if ((ret == 0) && (!ioc->facts.EventState))
--              (void) SendEventNotification(ioc, 1);   /* 1=Enable EventNotification */
--
--      if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState)
--              (void) SendEventNotification(ioc->alt_ioc, 1);  /* 1=Enable EventNotification */
++      }
++
  
        /*      Add additional "reason" check before call to GetLanConfigPages
         *      (combined with GetIoUnitPage2 call).  This prevents a somewhat
-@@ -2275,8 +2465,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2275,8 +2465,9 @@
                mutex_init(&ioc->raid_data.inactive_list_mutex);
                INIT_LIST_HEAD(&ioc->raid_data.inactive_list);
  
 -              if (ioc->bus_type == SAS) {
+-
 +              switch (ioc->bus_type) {
++
 +              case SAS:
                        /* clear persistency table */
                        if(ioc->facts.IOCExceptions &
                            MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL) {
-@@ -2290,21 +2481,32 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2290,21 +2481,32 @@
                         */
                        mpt_findImVolumes(ioc);
  
@@ -198514,19 +198484,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                                  "LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
 -                                  ioc->name, a[5], a[4], a[3], a[2], a[1], a[0]));
 -
+-                      }
+-              } else {
 +                                      "LanAddr = %02X:%02X:%02X"
 +                                      ":%02X:%02X:%02X\n",
 +                                      ioc->name, a[5], a[4],
 +                                      a[3], a[2], a[1], a[0]));
-                       }
--              } else {
++                      }
 +                      break;
 +
 +              case SPI:
                        /* Get NVRAM and adapter maximums from SPP 0 and 2
                         */
                        mpt_GetScsiPortSettings(ioc, 0);
-@@ -2323,41 +2525,16 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
+@@ -2323,41 +2525,16 @@
                        mpt_read_ioc_pg_1(ioc);
  
                        mpt_read_ioc_pg_4(ioc);
@@ -198554,8 +198525,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                              rc += mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET);
 -                              handlers++;
 -                      }
-+ out:
+-
 -                      if (alt_ioc_ready && MptResetHandlers[cb_idx]) {
 -                              drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                                  "Calling IOC post_reset handler #%d\n",
@@ -198568,10 +198538,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      }
 -
 - out:
++ out:
++
        if ((ret != 0) && irq_allocated) {
                free_irq(ioc->pci_irq, ioc);
                if (ioc->msi_enable)
-@@ -2389,8 +2566,8 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc,
+@@ -2389,8 +2566,8 @@
  
        dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "PCI device %s devfn=%x/%x,"
            " searching for devfn match on %x or %x\n",
@@ -198582,7 +198554,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        peer = pci_get_slot(pdev->bus, PCI_DEVFN(slot,func-1));
        if (!peer) {
-@@ -2404,16 +2581,20 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc,
+@@ -2404,16 +2581,20 @@
                if (_pcidev == peer) {
                        /* Paranoia checks */
                        if (ioc->alt_ioc != NULL) {
@@ -198595,21 +198567,23 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        } else if (ioc_srch->alt_ioc != NULL) {
 -                              printk(MYIOC_s_WARN_FMT "Oops, already bound to %s!\n",
 -                                      ioc_srch->name, ioc_srch->alt_ioc->name);
+-                              break;
+-                      }
+-                      dprintk(ioc, printk(MYIOC_s_INFO_FMT "FOUND! binding to %s\n",
+-                              ioc->name, ioc_srch->name));
 +                              printk(MYIOC_s_WARN_FMT
 +                                  "Oops, already bound (%s <==> %s)!\n",
 +                                  ioc_srch->name, ioc_srch->name,
 +                                  ioc_srch->alt_ioc->name);
-                               break;
-                       }
--                      dprintk(ioc, printk(MYIOC_s_INFO_FMT "FOUND! binding to %s\n",
--                              ioc->name, ioc_srch->name));
++                              break;
++                      }
 +                      dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                              "FOUND! binding %s <==> %s\n",
 +                              ioc->name, ioc->name, ioc_srch->name));
                        ioc_srch->alt_ioc = ioc;
                        ioc->alt_ioc = ioc_srch;
                }
-@@ -2433,8 +2614,8 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2433,8 +2614,8 @@
        int ret;
  
        if (ioc->cached_fw != NULL) {
@@ -198620,7 +198594,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                if ((ret = mpt_downloadboot(ioc, (MpiFwHeader_t *)
                    ioc->cached_fw, CAN_SLEEP)) < 0) {
                        printk(MYIOC_s_WARN_FMT
-@@ -2443,16 +2624,35 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2443,16 +2624,35 @@
                }
        }
  
@@ -198658,7 +198632,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                pci_free_consistent(ioc->pcidev, sz,
                                ioc->alloc, ioc->alloc_dma);
                ioc->reply_frames = NULL;
-@@ -2482,8 +2682,10 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2482,8 +2682,10 @@
        mpt_inactive_raid_list_free(ioc);
        kfree(ioc->raid_data.pIocPg2);
        kfree(ioc->raid_data.pIocPg3);
@@ -198669,17 +198643,18 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        if (ioc->spi_data.pIocPg4 != NULL) {
                sz = ioc->spi_data.IocPg4Sz;
-@@ -2507,17 +2709,21 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
+@@ -2507,17 +2709,21 @@
                if((ret = mpt_host_page_access_control(ioc,
                    MPI_DB_HPBAC_FREE_BUFFER, NO_SLEEP)) != 0) {
                        printk(MYIOC_s_ERR_FMT
 -                         "host page buffers free failed (%d)!\n",
 -                          ioc->name, ret);
-+                         ": %s: host page buffers free failed (%d)!\n",
-+                          ioc->name, __func__, ret);
-               }
+-              }
 -              dexitprintk(ioc, printk(MYIOC_s_INFO_FMT "HostPageBuffer free  @ %p, sz=%d bytes\n",
 -                      ioc->name, ioc->HostPageBuffer, ioc->HostPageBuffer_sz));
++                         ": %s: host page buffers free failed (%d)!\n",
++                          ioc->name, __func__, ret);
++              }
 +              dexitprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                      "HostPageBuffer free  @ %p, sz=%d bytes\n", ioc->name,
 +                      ioc->HostPageBuffer, ioc->HostPageBuffer_sz));
@@ -198696,7 +198671,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -2558,7 +2764,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
+@@ -2558,7 +2764,8 @@
  #if defined(CONFIG_MTRR) && 0
        if (ioc->mtrr_reg > 0) {
                mtrr_del(ioc->mtrr_reg, 0, 0);
@@ -198706,7 +198681,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  #endif
  
-@@ -2566,8 +2773,9 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
+@@ -2566,8 +2773,9 @@
        list_del(&ioc->list);
  
        sz_last = ioc->alloc_total;
@@ -198718,7 +198693,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        if (ioc->alt_ioc)
                ioc->alt_ioc->alt_ioc = NULL;
-@@ -2646,7 +2854,8 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2646,7 +2854,8 @@
  
        /* Get current [raw] IOC state  */
        ioc_state = mpt_GetIocState(ioc, 0);
@@ -198728,22 +198703,23 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        /*
         *      Check to see if IOC got left/stuck in doorbell handshake
-@@ -2659,8 +2868,13 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2659,8 +2868,13 @@
        }
  
        /* Is it already READY? */
 -      if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY)
+-              return 0;
 +      if (!statefault &&
 +          (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY) {
 +              dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
 +                      "IOC is in READY state\n",
 +                  ioc->name));
-               return 0;
++              return 0;
 +      }
  
        /*
         *      Check to see if IOC is in FAULT state.
-@@ -2668,9 +2882,9 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2668,9 +2882,9 @@
        if ((ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT) {
                statefault = 2;
                printk(MYIOC_s_WARN_FMT "IOC is in FAULT state!!!\n",
@@ -198756,7 +198732,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        /*
-@@ -2686,7 +2900,7 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2686,7 +2900,7 @@
                 * Else, fall through to KickStart case
                 */
                whoinit = (ioc_state & MPI_DOORBELL_WHO_INIT_MASK) >> MPI_DOORBELL_WHO_INIT_SHIFT;
@@ -198765,7 +198741,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        "whoinit 0x%x statefault %d force %d\n",
                        ioc->name, whoinit, statefault, force));
                if (whoinit == MPI_WHOINIT_PCI_PEER)
-@@ -2733,15 +2947,16 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
+@@ -2733,15 +2947,16 @@
  
                ii++; cntdn--;
                if (!cntdn) {
@@ -198785,7 +198761,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                }
  
        }
-@@ -2802,8 +3017,9 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2802,8 +3017,9 @@
  
        /* IOC *must* NOT be in RESET state! */
        if (ioc->last_state == MPI_IOC_STATE_RESET) {
@@ -198797,7 +198773,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                return -44;
        }
  
-@@ -2820,7 +3036,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2820,7 +3036,7 @@
        get_facts.Function = MPI_FUNCTION_IOC_FACTS;
        /* Assert: All other get_facts fields are zero! */
  
@@ -198806,7 +198782,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
            "Sending get IocFacts request req_sz=%d reply_sz=%d\n",
            ioc->name, req_sz, reply_sz));
  
-@@ -2850,6 +3066,9 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2850,6 +3066,9 @@
                }
  
                facts->MsgVersion = le16_to_cpu(facts->MsgVersion);
@@ -198816,7 +198792,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                facts->MsgContext = le32_to_cpu(facts->MsgContext);
                facts->IOCExceptions = le16_to_cpu(facts->IOCExceptions);
                facts->IOCStatus = le16_to_cpu(facts->IOCStatus);
-@@ -2865,7 +3084,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2865,7 +3084,7 @@
                 *      Old: u16{Major(4),Minor(4),SubMinor(8)}
                 *      New: u32{Major(8),Minor(8),Unit(8),Dev(8)}
                 */
@@ -198825,7 +198801,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        /*
                         *      Handle old FC f/w style, convert to new...
                         */
-@@ -2877,9 +3096,11 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2877,9 +3096,11 @@
                        facts->FWVersion.Word = le32_to_cpu(facts->FWVersion.Word);
  
                facts->ProductID = le16_to_cpu(facts->ProductID);
@@ -198837,7 +198813,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                facts->CurrentHostMfaHighAddr =
                                le32_to_cpu(facts->CurrentHostMfaHighAddr);
                facts->GlobalCredits = le16_to_cpu(facts->GlobalCredits);
-@@ -2895,7 +3116,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
+@@ -2895,7 +3116,7 @@
                 * to 14 in MPI-1.01.0x.
                 */
                if (facts->MsgLength >= (offsetof(IOCFactsReply_t,FWImageSize) + 7)/4 &&
@@ -198846,7 +198822,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        facts->FWImageSize = le32_to_cpu(facts->FWImageSize);
                }
  
-@@ -2977,8 +3198,8 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
+@@ -2977,8 +3198,8 @@
  
        /* IOC *must* NOT be in RESET state! */
        if (ioc->last_state == MPI_IOC_STATE_RESET) {
@@ -198857,7 +198833,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                return -4;
        }
  
-@@ -2996,14 +3217,14 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
+@@ -2996,14 +3217,14 @@
        get_pfacts.PortNumber = portnum;
        /* Assert: All other get_pfacts fields are zero! */
  
@@ -198875,7 +198851,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        if (ii != 0)
                return ii;
  
-@@ -3077,7 +3298,8 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
+@@ -3077,7 +3298,8 @@
  
        ioc_init.MaxDevices = (U8)ioc->devices_per_bus;
        ioc_init.MaxBuses = (U8)ioc->number_of_buses;
@@ -198885,7 +198861,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                   ioc->name, ioc->facts.MsgVersion));
        if (ioc->facts.MsgVersion >= MPI_VERSION_01_05) {
                // set MsgVersion and HeaderVersion host driver was built with
-@@ -3091,7 +3313,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
+@@ -3091,7 +3313,7 @@
        }
        ioc_init.ReplyFrameSize = cpu_to_le16(ioc->reply_sz);   /* in BYTES */
  
@@ -198894,7 +198870,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                /* Save the upper 32-bits of the request
                 * (reply) and sense buffers.
                 */
-@@ -3193,18 +3415,19 @@ SendPortEnable(MPT_ADAPTER *ioc, int por
+@@ -3193,18 +3415,19 @@
  /*    port_enable.MsgFlags = 0;               */
  /*    port_enable.MsgContext = 0;             */
  
@@ -198918,7 +198894,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                30 /*seconds*/, sleepFlag);
        }
        return rc;
-@@ -3294,22 +3517,19 @@ mpt_do_upload(MPT_ADAPTER *ioc, int slee
+@@ -3294,21 +3517,18 @@
        FWUpload_t              *prequest;
        FWUploadReply_t         *preply;
        FWUploadTCSGE_t         *ptcsge;
@@ -198937,14 +198913,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        if (mpt_alloc_fw_memory(ioc, ioc->facts.FWImageSize) != 0)
                return -ENOMEM;
+-
 -      dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Image  @ %p[%p], sz=%d[%x] bytes\n",
 -          ioc->name, ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz));
--
        prequest = (sleepFlag == NO_SLEEP) ? kzalloc(ioc->req_sz, GFP_ATOMIC) :
            kzalloc(ioc->req_sz, GFP_KERNEL);
-       if (!prequest) {
-@@ -3326,49 +3546,47 @@ mpt_do_upload(MPT_ADAPTER *ioc, int slee
+@@ -3326,49 +3546,47 @@
  
        prequest->ImageType = MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM;
        prequest->Function = MPI_FUNCTION_FW_UPLOAD;
@@ -198975,10 +198950,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
 -      ii = mpt_handshake_req_reply_wait(ioc, sgeoffset, (u32*)prequest,
 -                              reply_sz, (u16*)preply, 65 /*seconds*/, sleepFlag);
+-
+-      dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Upload completed rc=%x \n", ioc->name, ii));
 +      ii = mpt_handshake_req_reply_wait(ioc, request_size, (u32 *)prequest,
 +          reply_sz, (u16 *)preply, 65 /*seconds*/, sleepFlag);
--      dinitprintk(ioc, printk(MYIOC_s_INFO_FMT ": FW Upload completed rc=%x \n", ioc->name, ii));
++
 +      dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "FW Upload completed "
 +          "rc=%x \n", ioc->name, ii));
  
@@ -198994,6 +198970,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                      if (transfer_sz == sz)
 -                              cmdStatus = 0;
 -              }
+-      }
+-      dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": do_upload cmdStatus=%d \n",
+-                      ioc->name, cmdStatus));
 +              int status;
 +              status = le16_to_cpu(preply->IOCStatus) &
 +                  MPI_IOCSTATUS_MASK;
@@ -199001,9 +198980,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                  ioc->facts.FWImageSize ==
 +                  le32_to_cpu(preply->ActualImageSize))
 +                      cmdStatus = 0;
-       }
--      dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": do_upload cmdStatus=%d \n",
--                      ioc->name, cmdStatus));
++      }
 +      dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "do_upload cmdStatus=%d \n",
 +              ioc->name, cmdStatus));
  
@@ -199017,7 +198994,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                mpt_free_fw_memory(ioc);
        }
        kfree(prequest);
-@@ -3401,10 +3619,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3401,10 +3619,10 @@
        u32                      diagRwData;
        u32                      nextImage;
        u32                      load_addr;
@@ -199030,7 +199007,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
        CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
-@@ -3416,11 +3634,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3416,11 +3634,10 @@
        CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM));
  
        /* wait 1 msec */
@@ -199045,7 +199022,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
        CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER);
-@@ -3433,11 +3650,10 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3433,11 +3650,10 @@
                        break;
                }
                /* wait .1 sec */
@@ -199059,7 +199036,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        if ( count == 30 ) {
-@@ -3455,6 +3671,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3455,6 +3671,7 @@
        CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
  
        /* Set the DiagRwEn and Disable ARM bits */
@@ -199067,7 +199044,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM));
  
        fwSize = (pFwHeader->ImageSize + 3)/4;
-@@ -3468,13 +3685,12 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3468,13 +3685,12 @@
  
        CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress);
        ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "LoadStart addr written 0x%x \n",
@@ -199084,7 +199061,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        nextImage = pFwHeader->NextImageHeaderOffset;
        while (nextImage) {
-@@ -3486,21 +3702,24 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3486,21 +3702,24 @@
                ptrFw = (u32 *)pExtImage;
  
                ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n",
@@ -199114,7 +199091,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue);
  
        /* Clear the internal flash bad bit - autoincrementing register,
-@@ -3517,71 +3736,75 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
+@@ -3517,71 +3736,75 @@
                CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000);
                CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData);
  
@@ -199147,17 +199124,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "diag0val=%x\n",
 +          ioc->name, diag0val));
        CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
--      /* Write 0xFF to reset the sequencer */
--      CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
--
-       if (ioc->bus_type == SAS) {
--              ioc_state = mpt_GetIocState(ioc, 0);
--              if ( (GetIocFacts(ioc, sleepFlag,
--                              MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) {
--                      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "GetIocFacts failed: IocState=%x\n",
--                                      ioc->name, ioc_state));
--                      return -EFAULT;
++
++      if (ioc->bus_type == SAS) {
 +              /* wait 1 sec */
 +              if (sleepFlag == CAN_SLEEP)
 +                      msleep(1000);
@@ -199178,38 +199146,52 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                      diag0val |= MPI_DIAG_CLEAR_FLASH_BAD_SIG;
 +                      CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
 +                      diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-               }
++              }
 +              diag0val &= ~(MPI_DIAG_DISABLE_ARM);
 +              CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
 +              diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
 +              CHIPREG_WRITE32(&ioc->chip->DiagRwAddress, 0x3f000004);
-       }
++      }
+       /* Write 0xFF to reset the sequencer */
+       CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
  
+-      if (ioc->bus_type == SAS) {
+-              ioc_state = mpt_GetIocState(ioc, 0);
+-              if ( (GetIocFacts(ioc, sleepFlag,
+-                              MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) {
+-                      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "GetIocFacts failed: IocState=%x\n",
+-                                      ioc->name, ioc_state));
+-                      return -EFAULT;
+-              }
+-      }
+-
 -      for (count=0; count<HZ*20; count++) {
 -              if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) {
--                      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--                              "downloadboot successful! (count=%d) IocState=%x\n",
--                              ioc->name, count, ioc_state));
--                      if (ioc->bus_type == SAS) {
-+      /* Write 0xFF to reset the sequencer */
-+      CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
-+
 +      for (count = 0; count < 30; count++) {
 +              doorbell = CHIPREG_READ32(&ioc->chip->Doorbell)
 +                  & MPI_IOC_STATE_MASK;
 +              if (doorbell == MPI_IOC_STATE_READY) {
 +                      if (ioc->bus_type == SAS)
-                               return 0;
++                              return 0;
++                      if ((SendIocInit(ioc, sleepFlag)) != 0) {
++                              ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
++                                  "SendIocInit failed\n", ioc->name));
++                              return -EFAULT;
++                      }
+                       ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-                              "downloadboot successful! (count=%d) IocState=%x\n",
+-                              ioc->name, count, ioc_state));
+-                      if (ioc->bus_type == SAS) {
+-                              return 0;
 -                      }
-                       if ((SendIocInit(ioc, sleepFlag)) != 0) {
+-                      if ((SendIocInit(ioc, sleepFlag)) != 0) {
 -                              ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                                      "downloadboot: SendIocInit failed\n",
 -                                      ioc->name));
-+                              ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
-+                                  "SendIocInit failed\n", ioc->name));
-                               return -EFAULT;
-                       }
-                       ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-                              return -EFAULT;
+-                      }
+-                      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                                      "downloadboot: SendIocInit successful\n",
 -                                      ioc->name));
 +                          "SendIocInit successful\n", ioc->name));
@@ -199220,6 +199202,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -              } else {
 -                      mdelay (10);
 -              }
+-      }
+-      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-              "downloadboot failed! IocState=%x\n",ioc->name, ioc_state));
 +              ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                      "looking for READY STATE: doorbell=%x count=%d\n",
 +                      ioc->name, doorbell, count));
@@ -199227,15 +199212,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                      msleep(1000);
 +              else
 +                      mdelay(1000);
-       }
--      ddlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--              "downloadboot failed! IocState=%x\n",ioc->name, ioc_state));
++      }
 +      ddlprintk(ioc, printk(MYIOC_s_WARN_FMT
 +              "downloadboot failed! count=%d\n", ioc->name, count));
        return -EFAULT;
  }
  
-@@ -3618,7 +3841,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3618,7 +3841,7 @@
        u32 ioc_state=0;
        int cnt,cntdn;
  
@@ -199244,7 +199227,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        if (ioc->bus_type == SPI) {
                /* Always issue a Msg Unit Reset first. This will clear some
                 * SCSI bus hang conditions.
-@@ -3636,15 +3859,20 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3636,15 +3859,20 @@
        if (hard_reset_done < 0)
                return hard_reset_done;
  
@@ -199270,7 +199253,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        return hard_reset_done;
                }
                if (sleepFlag == CAN_SLEEP) {
-@@ -3655,7 +3883,7 @@ KickStart(MPT_ADAPTER *ioc, int force, i
+@@ -3655,7 +3883,7 @@
        }
  
        dinitprintk(ioc, printk(MYIOC_s_ERR_FMT "Failed to come READY after reset! IocState=%x\n",
@@ -199279,7 +199262,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        return -1;
  }
  
-@@ -3682,25 +3910,42 @@ static int
+@@ -3682,24 +3910,41 @@
  mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
  {
        u32 diag0val;
@@ -199309,7 +199292,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        msleep(1);
                else
                        mdelay(1);
++
 +              /*
 +               * Call each currently registered protocol IOC reset handler
 +               * with pre-reset indication.
@@ -199321,11 +199304,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                              (*(MptResetHandlers[cb_idx]))
 +                                  (ioc, MPT_IOC_PRE_RESET);
 +              }
-+
                for (count = 0; count < 60; count ++) {
                        doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
-                       doorbell &= MPI_IOC_STATE_MASK;
-@@ -3709,9 +3954,15 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3709,9 +3954,15 @@
                                "looking for READY STATE: doorbell=%x"
                                " count=%d\n",
                                ioc->name, doorbell, count));
@@ -199343,7 +199325,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                        /* wait 1 sec */
                        if (sleepFlag == CAN_SLEEP)
-@@ -3719,16 +3970,22 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3719,16 +3970,22 @@
                        else
                                mdelay(1000);
                }
@@ -199369,7 +199351,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        ioc->name, diag0val, diag1val));
        }
  
-@@ -3748,11 +4005,10 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3748,11 +4005,10 @@
                        CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
  
                        /* wait 100 msec */
@@ -199383,18 +199365,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                        count++;
                        if (count > 20) {
-@@ -3764,14 +4020,16 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3764,14 +4020,16 @@
  
                        diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
  
 -                      dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Wrote magic DiagWriteEn sequence (%x)\n",
 -                                      ioc->name, diag0val));
+-              }
+-
+-              if (ioc->debug_level & MPT_DEBUG) {
 +                      drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                              "Wrote magic DiagWriteEn sequence (%x)\n",
 +                              ioc->name, diag0val));
-               }
--              if (ioc->debug_level & MPT_DEBUG) {
++              }
++
 +              if (ioc->debug_level & MPT_DEBUG_RESET) {
                        if (ioc->alt_ioc)
                                diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic);
@@ -199404,7 +199388,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                                ioc->name, diag0val, diag1val));
                }
                /*
-@@ -3787,8 +4045,8 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3787,8 +4045,8 @@
                 */
                CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER);
                hard_reset_done = 1;
@@ -199415,7 +199399,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                /*
                 * Call each currently registered protocol IOC reset handler
-@@ -3796,25 +4054,14 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3796,25 +4054,14 @@
                 * NOTE: If we're doing _IOC_BRINGUP, there can be no
                 * MptResetHandlers[] registered yet.
                 */
@@ -199436,6 +199420,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                                              r += mpt_signal_reset(cb_idx, ioc->alt_ioc, MPT_IOC_PRE_RESET);
 -                                      }
 -                              }
+-                      }
+-                      /* FIXME?  Examine results here? */
 +              for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
 +                      if (MptResetHandlers[cb_idx]) {
 +                              mpt_signal_reset(cb_idx, ioc,
@@ -199443,12 +199429,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                              if (ioc->alt_ioc)
 +                                      mpt_signal_reset(cb_idx,
 +                                          ioc->alt_ioc, MPT_IOC_PRE_RESET);
-                       }
--                      /* FIXME?  Examine results here? */
++                      }
                }
  
                if (ioc->cached_fw)
-@@ -3834,20 +4081,19 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3834,20 +4081,19 @@
                                        break;
                                }
  
@@ -199473,7 +199458,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                } else {
                        /* Wait for FW to reload and for board
                         * to go to the READY state.
-@@ -3859,25 +4105,39 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3859,25 +4105,39 @@
                                doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
                                doorbell &= MPI_IOC_STATE_MASK;
  
@@ -199483,14 +199468,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                                  " count=%d\n", ioc->name, doorbell, count));
 +
 +                              if (doorbell == MPI_IOC_STATE_READY)
-+                                      break;
+                                       break;
+-                              }
 +
 +                              /*
 +                               * Early out for hard fault
 +                               */
 +                              if (count && doorbell == MPI_IOC_STATE_FAULT)
-                                       break;
--                              }
++                                      break;
  
                                /* wait 1 sec */
 -                              if (sleepFlag == CAN_SLEEP) {
@@ -199500,7 +199485,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                              else
                                        mdelay (1000);
 -                              }
-                       }
+-                      }
++                      }
 +
 +                      if (doorbell != MPI_IOC_STATE_READY)
 +                              printk(MYIOC_s_ERR_FMT "Failed to come READY "
@@ -199520,7 +199506,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        ioc->name, diag0val, diag1val));
        }
  
-@@ -3898,11 +4158,10 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3898,11 +4158,10 @@
                CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
  
                /* wait 100 msec */
@@ -199534,7 +199520,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                count++;
                if (count > 20) {
-@@ -3933,10 +4192,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
+@@ -3933,10 +4192,11 @@
                return -3;
        }
  
@@ -199548,7 +199534,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        ioc->name, diag0val, diag1val));
        }
  
-@@ -3973,7 +4233,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_
+@@ -3973,7 +4233,7 @@
        drsprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending IOC reset(0x%02x)!\n",
                        ioc->name, reset_type));
        CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT);
@@ -199557,7 +199543,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                return r;
  
        /* FW ACK'd request, wait for READY state
-@@ -3988,22 +4248,19 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_
+@@ -3988,22 +4248,19 @@
                        if (sleepFlag != CAN_SLEEP)
                                count *= 10;
  
@@ -199573,32 +199559,37 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        msleep(1);
                } else {
 -                      mdelay (1);     /* 1 msec delay */
-+                      mdelay(1);      /* 1 msec delay */
-               }
-       }
+-              }
+-      }
+-
 -      /* TODO!
 -       *  Cleanup all event stuff for this IOC; re-issue EventNotification
 -       *  request if needed.
 -       */
++                      mdelay(1);      /* 1 msec delay */
++              }
++      }
++
        if (ioc->facts.Function)
                ioc->facts.EventState = 0;
  
-@@ -4059,24 +4316,29 @@ initChainBuffers(MPT_ADAPTER *ioc)
+@@ -4059,24 +4316,29 @@
         * num_sge = num sge in request frame + last chain buffer
         * scale = num sge per chain buffer if no chain element
         */
 -      scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
 -      if (sizeof(dma_addr_t) == sizeof(u64))
 -              num_sge =  scale + (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32));
+-      else
+-              num_sge =  1+ scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32));
+-
+-      if (sizeof(dma_addr_t) == sizeof(u64)) {
 +      scale = ioc->req_sz / ioc->SGE_size;
 +      if (ioc->sg_addr_size == sizeof(u64))
 +              num_sge =  scale + (ioc->req_sz - 60) / ioc->SGE_size;
-       else
--              num_sge =  1+ scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32));
++      else
 +              num_sge =  1 + scale + (ioc->req_sz - 64) / ioc->SGE_size;
--      if (sizeof(dma_addr_t) == sizeof(u64)) {
++
 +      if (ioc->sg_addr_size == sizeof(u64)) {
                numSGE = (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale +
 -                      (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32));
@@ -199623,20 +199614,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        num_chain = 1;
        while (numSGE - num_sge > 0) {
-@@ -4130,13 +4392,36 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
+@@ -4130,12 +4392,35 @@
        dma_addr_t alloc_dma;
        u8 *mem;
        int i, reply_sz, sz, total_size, num_chain;
 +      u64     dma_mask;
--      /*  Prime reply FIFO...  */
++
 +      dma_mask = 0;
  
-+      /*  Prime reply FIFO...  */
+       /*  Prime reply FIFO...  */
+-
        if (ioc->reply_frames == NULL) {
                if ( (num_chain = initChainBuffers(ioc)) < 0)
                        return -1;
++
 +              /*
 +               * 1078 errata workaround for the 36GB limitation
 +               */
@@ -199657,11 +199648,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                                  ioc->name));
 +                      }
 +              }
-+
                total_size = reply_sz = (ioc->reply_sz * ioc->reply_depth);
                dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReplyBuffer sz=%d bytes, ReplyDepth=%d\n",
-                               ioc->name, ioc->reply_sz, ioc->reply_depth));
-@@ -4274,9 +4559,16 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
+@@ -4274,9 +4559,16 @@
                alloc_dma += ioc->reply_sz;
        }
  
@@ -199678,7 +199668,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        if (ioc->alloc != NULL) {
                sz = ioc->alloc_sz;
                pci_free_consistent(ioc->pcidev,
-@@ -4293,6 +4585,13 @@ out_fail:
+@@ -4293,6 +4585,13 @@
                                ioc->sense_buf_pool, ioc->sense_buf_pool_dma);
                ioc->sense_buf_pool = NULL;
        }
@@ -199692,7 +199682,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        return -1;
  }
  
-@@ -4481,18 +4780,18 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int
+@@ -4481,18 +4780,18 @@
        cntdn = 1000 * howlong;
        if (sleepFlag == CAN_SLEEP) {
                while (--cntdn) {
@@ -199713,7 +199703,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        count++;
                }
        }
-@@ -4651,10 +4950,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4651,10 +4950,6 @@
  
                        pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma);
  
@@ -199724,7 +199714,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
                }
  
-@@ -4695,11 +4990,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4695,11 +4990,6 @@
  
                pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage1_alloc, page1_dma);
  
@@ -199736,7 +199726,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        return rc;
-@@ -4719,8 +5009,6 @@ GetLanConfigPages(MPT_ADAPTER *ioc)
+@@ -4719,8 +5009,6 @@
   *
   *    Returns 0 for success, non-zero error
   */
@@ -199745,22 +199735,23 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  int
  mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
  {
-@@ -4728,7 +5016,14 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4728,7 +5016,14 @@
        SasIoUnitControlReply_t         *sasIoUnitCntrReply;
        MPT_FRAME_HDR                   *mf = NULL;
        MPIHeader_t                     *mpi_hdr;
+-
 +      int                             ret = 0;
 +      unsigned long                   timeleft;
 +
 +      mutex_lock(&ioc->mptbase_cmds.mutex);
++
 +      /* init the internal cmd struct */
 +      memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE);
 +      INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status)
  
        /* insure garbage is not sent to fw */
        switch(persist_opcode) {
-@@ -4738,8 +5033,8 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4738,8 +5033,8 @@
                break;
  
        default:
@@ -199771,7 +199762,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        }
  
        printk("%s: persist_opcode=%x\n",__func__, persist_opcode);
-@@ -4748,7 +5043,8 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4748,7 +5043,8 @@
         */
        if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
                printk("%s: no msg frames!\n",__func__);
@@ -199781,7 +199772,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
          }
  
        mpi_hdr = (MPIHeader_t *) mf;
-@@ -4758,27 +5054,43 @@ mptbase_sas_persist_operation(MPT_ADAPTE
+@@ -4758,27 +5054,43 @@
        sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
        sasIoUnitCntrReq->Operation = persist_opcode;
  
@@ -199826,21 +199817,22 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                    sasIoUnitCntrReply->IOCLogInfo);
 -              return -1;
 -      }
+-
+-      printk("%s: success\n",__func__);
+-      return 0;
 +              printk(KERN_WARNING "%s: failed\n", __func__);
 +              ret = -1;
 +      } else
 +              printk(KERN_INFO "%s: success\n", __func__);
 + out:
--      printk("%s: success\n",__func__);
--      return 0;
++
 +      CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status)
 +      mutex_unlock(&ioc->mptbase_cmds.mutex);
 +      return ret;
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5051,8 +5363,8 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc
+@@ -5051,8 +5363,8 @@
                                ioc->spi_data.busType = MPT_HOST_BUS_UNKNOWN;
                                rc = 1;
                                ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -199851,10 +199843,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        } else {
                                /* Save the Port Page 0 data
                                 */
-@@ -5246,9 +5558,73 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTE
+@@ -5246,9 +5558,73 @@
        return 0;
  }
  
+-/**
+- * mpt_inactive_raid_list_free - This clears this link list.
+- * @ioc : pointer to per adapter structure
 +static void
 +mpt_read_ioc_pg_6(MPT_ADAPTER *ioc)
 +{
@@ -199918,16 +199913,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +              pci_free_consistent(ioc->pcidev, iocpage6sz, pIoc6, ioc6_dma);
 +}
 +
- /**
-- * mpt_inactive_raid_list_free - This clears this link list.
-- * @ioc : pointer to per adapter structure
++/**
 +  * mpt_inactive_raid_list_free - This clears this link list.
 +  * @ioc : pointer to per adapter structure
 +  *
   **/
  static void
  mpt_inactive_raid_list_free(MPT_ADAPTER *ioc)
-@@ -5268,11 +5644,13 @@ mpt_inactive_raid_list_free(MPT_ADAPTER 
+@@ -5268,11 +5644,13 @@
  }
  
  /**
@@ -199946,7 +199939,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
   **/
  static void
  mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)
-@@ -5281,10 +5659,12 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5281,10 +5659,12 @@
        ConfigPageHeader_t              hdr;
        dma_addr_t                      dma_handle;
        pRaidVolumePage0_t              buffer = NULL;
@@ -199960,7 +199953,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        memset(&cfg, 0 , sizeof(CONFIGPARMS));
        memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
-@@ -5329,8 +5709,31 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5329,8 +5709,31 @@
                    buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
                        continue;
  
@@ -199993,7 +199986,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        continue;
  
                component_info->volumeID = id;
-@@ -5363,7 +5766,8 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *i
+@@ -5363,7 +5766,8 @@
   *    -ENOMEM if pci_alloc failed
   **/
  int
@@ -200003,17 +199996,18 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  {
        CONFIGPARMS                     cfg;
        ConfigPageHeader_t              hdr;
-@@ -5373,7 +5777,9 @@ mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc,
+@@ -5373,7 +5777,9 @@
  
        memset(&cfg, 0 , sizeof(CONFIGPARMS));
        memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
+-
 +      memset(phys_disk, 0, sizeof(RaidPhysDiskPage0_t));
++
 +      hdr.PageVersion = MPI_RAIDPHYSDISKPAGE0_PAGEVERSION;
        hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
        cfg.cfghdr.hdr = &hdr;
        cfg.physAddr = -1;
-@@ -5420,29 +5826,211 @@ mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc,
+@@ -5420,9 +5826,74 @@
  }
  
  /**
@@ -200023,28 +200017,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 + *    mpt_raid_phys_disk_get_num_paths - returns number paths associated to this phys_num
 + *    @ioc: Pointer to a Adapter Structure
 + *    @phys_disk_num: io unit unique phys disk num generated by the ioc
-  *
-  *    Return:
-- *    0 on success
-- *    -EFAULT if read of config page header fails or data pointer not NULL
-- *    -ENOMEM if pci_alloc failed
++ *
++ *    Return:
 + *    returns number paths
-  **/
- int
--mpt_findImVolumes(MPT_ADAPTER *ioc)
++ **/
++int
 +mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc, u8 phys_disk_num)
- {
--      IOCPage2_t              *pIoc2;
--      u8                      *mem;
--      dma_addr_t               ioc2_dma;
--      CONFIGPARMS              cfg;
--      ConfigPageHeader_t       header;
--      int                      rc = 0;
--      int                      iocpage2sz;
--      int                      i;
--
--      if (!ioc->ir_firmware)
--              return 0;
++{
 +      CONFIGPARMS                     cfg;
 +      ConfigPageHeader_t              hdr;
 +      dma_addr_t                      dma_handle;
@@ -200103,13 +200082,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 + *    @ioc: Pointer to a Adapter Structure
 + *    @phys_disk_num: io unit unique phys disk num generated by the ioc
 + *    @phys_disk: requested payload data returned
-+ *
-+ *    Return:
-+ *    0 on success
-+ *    -EFAULT if read of config page header fails or data pointer not NULL
-+ *    -ENOMEM if pci_alloc failed
-+ **/
-+int
+  *
+  *    Return:
+  *    0 on success
+@@ -5430,6 +5901,123 @@
+  *    -ENOMEM if pci_alloc failed
+  **/
+ int
 +mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num,
 +    RaidPhysDiskPage1_t *phys_disk)
 +{
@@ -200227,23 +200206,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 + *    -ENOMEM if pci_alloc failed
 + **/
 +int
-+mpt_findImVolumes(MPT_ADAPTER *ioc)
-+{
-+      IOCPage2_t              *pIoc2;
-+      u8                      *mem;
-+      dma_addr_t               ioc2_dma;
-+      CONFIGPARMS              cfg;
-+      ConfigPageHeader_t       header;
-+      int                      rc = 0;
-+      int                      iocpage2sz;
-+      int                      i;
-+
-+      if (!ioc->ir_firmware)
-+              return 0;
-       /* Free the old page
-        */
-@@ -5482,16 +6070,22 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
+ mpt_findImVolumes(MPT_ADAPTER *ioc)
+ {
+       IOCPage2_t              *pIoc2;
+@@ -5482,15 +6070,21 @@
        if (!mem)
                goto out;
  
@@ -200254,21 +200220,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +          sizeof(ConfigPageIoc2RaidVol_t), mpt_sort_ioc_pg2, NULL);
        memcpy(mem, (u8 *)pIoc2, iocpage2sz);
        ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
--      mpt_read_ioc_pg_3(ioc);
 -
+-      mpt_read_ioc_pg_3(ioc);
        for (i = 0; i < pIoc2->NumActiveVolumes ; i++)
                mpt_inactive_raid_volumes(ioc,
                    pIoc2->RaidVolume[i].VolumeBus,
                    pIoc2->RaidVolume[i].VolumeID);
++
 +      mpt_read_ioc_pg_3(ioc);
 +      mpt_read_ioc_pg_6(ioc);
-+
   out:
        pci_free_consistent(ioc->pcidev, iocpage2sz, pIoc2, ioc2_dma);
-@@ -5651,6 +6245,9 @@ mpt_read_ioc_pg_1(MPT_ADAPTER *ioc)
+@@ -5651,6 +6245,9 @@
        cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
        if (mpt_config(ioc, &cfg) == 0) {
  
@@ -200278,7 +200243,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                tmp = le32_to_cpu(pIoc1->Flags) & MPI_IOCPAGE1_REPLY_COALESCING;
                if (tmp == MPI_IOCPAGE1_REPLY_COALESCING) {
                        tmp = le32_to_cpu(pIoc1->CoalescingTimeout);
-@@ -5671,24 +6268,22 @@ mpt_read_ioc_pg_1(MPT_ADAPTER *ioc)
+@@ -5671,24 +6268,22 @@
  
                                        cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
                                        if (mpt_config(ioc, &cfg) == 0) {
@@ -200289,17 +200254,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                                        } else {
 -                                              dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                                                              "Reset NVRAM Coalescing Timeout Failed\n",
--                                                              ioc->name));
 +                                              dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Reset NVRAM Coalescing Timeout Failed\n",
 +                                                                      ioc->name));
-                                       }
-                               } else {
++                                      }
++
++                              } else {
++                                      dprintk(ioc, printk(MYIOC_s_WARN_FMT "Reset of Current Coalescing Timeout Failed!\n",
+                                                               ioc->name));
+-                                      }
+-
+-                              } else {
 -                                      dprintk(ioc, printk(MYIOC_s_WARN_FMT
 -                                              "Reset of Current Coalescing Timeout Failed!\n",
 -                                              ioc->name));
-+                                      dprintk(ioc, printk(MYIOC_s_WARN_FMT "Reset of Current Coalescing Timeout Failed!\n",
-+                                                              ioc->name));
                                }
                        }
  
@@ -200310,20 +200277,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                }
        }
  
-@@ -5745,30 +6340,28 @@ mpt_get_manufacturing_pg_0(MPT_ADAPTER *
+@@ -5745,30 +6340,28 @@
   *    SendEventNotification - Send EventNotification (on or off) request to adapter
   *    @ioc: Pointer to MPT_ADAPTER structure
   *    @EvSwitch: Event switch flags
-+ *    @sleepFlag: Specifies whether the process can sleep
-  */
- static int
+- */
+-static int
 -SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch)
-+SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
- {
+-{
 -      EventNotification_t     *evnp;
-+      EventNotification_t     evn;
-+      MPIDefaultReply_t       reply_buf;
+-
 -      evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc);
 -      if (evnp == NULL) {
 -              devtverboseprintk(ioc, printk(MYIOC_s_WARN_FMT "Unable to allocate event request frame!\n",
@@ -200333,49 +200296,58 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      memset(evnp, 0, sizeof(*evnp));
 -
 -      devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp));
-+      memset(&evn, 0, sizeof(EventNotification_t));
-+      memset(&reply_buf, 0, sizeof(MPIDefaultReply_t));
+-
 -      evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION;
 -      evnp->ChainOffset = 0;
 -      evnp->MsgFlags = 0;
 -      evnp->Switch = EvSwitch;
+-
+-      mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
+-
+-      return 0;
++ *    @sleepFlag: Specifies whether the process can sleep
++ */
++static int
++SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
++{
++      EventNotification_t     evn;
++      MPIDefaultReply_t       reply_buf;
++
++      memset(&evn, 0, sizeof(EventNotification_t));
++      memset(&reply_buf, 0, sizeof(MPIDefaultReply_t));
++
 +      evn.Function = MPI_FUNCTION_EVENT_NOTIFICATION;
 +      evn.Switch = EvSwitch;
 +      evn.MsgContext = cpu_to_le32(mpt_base_index << 16);
--      mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
++
 +      devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +          "Sending EventNotification (%d) request %p\n",
 +          ioc->name, EvSwitch, &evn));
--      return 0;
++
 +      return mpt_handshake_req_reply_wait(ioc, sizeof(EventNotification_t),
 +          (u32 *)&evn, sizeof(MPIDefaultReply_t), (u16 *)&reply_buf, 30,
 +          sleepFlag);
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5821,30 +6414,57 @@ int
+@@ -5821,30 +6414,57 @@
  mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
  {
        Config_t        *pReq;
 +      ConfigReply_t   *pReply;
        ConfigExtendedPageHeader_t  *pExtHdr = NULL;
        MPT_FRAME_HDR   *mf;
--      unsigned long    flags;
--      int              ii, rc;
 +      int              ii;
-       int              flagsLength;
--      int              in_isr;
++      int              flagsLength;
 +      long             timeout;
 +      int              ret;
 +      u8               page_type = 0, extend_page;
 +      unsigned long    timeleft;
-+      unsigned long    flags;
-+      u8               issue_hard_reset = 0;
-+      u8               retry_count = 0;
+       unsigned long    flags;
+-      int              ii, rc;
+-      int              flagsLength;
+-      int              in_isr;
+-
 -      /*      Prevent calling wait_event() (below), if caller happens
 -       *      to be in ISR context, because that is fatal!
 -       */
@@ -200383,8 +200355,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      if (in_isr) {
 -              dcprintk(ioc, printk(MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n",
 -                              ioc->name));
++      u8               issue_hard_reset = 0;
++      u8               retry_count = 0;
++
 +      if (in_interrupt())
                return -EPERM;
+-      }
 +
 +      /* don't send a config page during diag reset */
 +      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
@@ -200404,30 +200380,31 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                  ioc->name, __func__, ioc->active,
 +                  mpt_GetIocState(ioc, 0)));
 +              return -EFAULT;
-       }
++      }
++
 + retry_config:
 +      mutex_lock(&ioc->mptbase_cmds.mutex);
 +      /* init the internal cmd struct */
 +      memset(ioc->mptbase_cmds.reply, 0 , MPT_DEFAULT_FRAME_SIZE);
 +      INITIALIZE_MGMT_STATUS(ioc->mptbase_cmds.status)
-+
        /* Get and Populate a free Frame
         */
        if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
 -              dcprintk(ioc, printk(MYIOC_s_WARN_FMT "mpt_config: no msg frames!\n",
 -                              ioc->name));
 -              return -EAGAIN;
+-      }
 +              dcprintk(ioc, printk(MYIOC_s_WARN_FMT
 +              "mpt_config: no msg frames!\n", ioc->name));
 +              ret = -EAGAIN;
 +              goto out;
-       }
++      }
 +
        pReq = (Config_t *)mf;
        pReq->Action = pCfg->action;
        pReq->Reserved = 0;
-@@ -5870,7 +6490,9 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS
+@@ -5870,7 +6490,9 @@
                pReq->ExtPageType = pExtHdr->ExtPageType;
                pReq->Header.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
  
@@ -200438,7 +200415,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                pReq->Header.PageLength = 0;
        }
  
-@@ -5883,78 +6505,90 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS
+@@ -5883,78 +6505,90 @@
        else
                flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
  
@@ -200458,10 +200435,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -
 -              dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending Config request type %d, page %d and action %d\n",
 -                      ioc->name, pReq->Header.PageType, pReq->Header.PageNumber, pReq->Action));
-+              page_type = pReq->Header.PageType;
-+              extend_page = 0;
-       }
+-      }
+-
 -      mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr);
 -
 -      /* Append pCfg pointer to end of mf
@@ -200480,16 +200455,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -              pCfg->timer.expires = jiffies + HZ*10;
 -      else
 -              pCfg->timer.expires = jiffies + HZ*pCfg->timeout;
-+      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+          "Sending Config request type 0x%x, page 0x%x and action %d\n",
-+          ioc->name, page_type, pReq->Header.PageNumber, pReq->Action));
+-
 -      /* Add to end of Q, set timer and then issue this command */
 -      spin_lock_irqsave(&ioc->FreeQlock, flags);
 -      list_add_tail(&pCfg->linkage, &ioc->configQ);
 -      spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 -
 -      add_timer(&pCfg->timer);
++              page_type = pReq->Header.PageType;
++              extend_page = 0;
++      }
++
++      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++          "Sending Config request type 0x%x, page 0x%x and action %d\n",
++          ioc->name, page_type, pReq->Header.PageNumber, pReq->Action));
++
 +      ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr);
 +      timeout = (pCfg->timeout < 15) ? HZ*15 : HZ*pCfg->timeout;
        mpt_put_msg_frame(mpt_base_index, ioc, mf);
@@ -200498,6 +200478,34 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      /* mf has been freed - do not access */
 -
 -      rc = pCfg->status;
+-
+-      return rc;
+-}
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/**
+- *    mpt_timer_expired - Callback for timer process.
+- *    Used only internal config functionality.
+- *    @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
+- */
+-static void
+-mpt_timer_expired(unsigned long data)
+-{
+-      MPT_ADAPTER *ioc = (MPT_ADAPTER *) data;
+-
+-      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired! \n", ioc->name));
+-
+-      /* Perform a FW reload */
+-      if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0)
+-              printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", ioc->name);
+-
+-      /* No more processing.
+-       * Hard reset clean-up will wake up
+-       * process and free all resources.
+-       */
+-      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired complete!\n", ioc->name));
+-
+-      return;
 +      timeleft =
 +          wait_for_completion_timeout(&ioc->mptbase_cmds.done, timeout);
 +      if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
@@ -200513,9 +200521,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                      issue_hard_reset = 1;
 +              goto out;
 +      }
--      return rc;
--}
++
 +      if (!(ioc->mptbase_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
 +              ret = -1;
 +              goto out;
@@ -200533,39 +200539,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +              pCfg->cfghdr.hdr->PageLength = pReply->Header.PageLength;
 +              pCfg->cfghdr.hdr->PageNumber = pReply->Header.PageNumber;
 +              pCfg->cfghdr.hdr->PageType = pReply->Header.PageType;
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- *    mpt_timer_expired - Callback for timer process.
-- *    Used only internal config functionality.
-- *    @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
-- */
--static void
--mpt_timer_expired(unsigned long data)
--{
--      MPT_ADAPTER *ioc = (MPT_ADAPTER *) data;
++
 +      }
--      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired! \n", ioc->name));
++
 +      if (retry_count)
 +              printk(MYIOC_s_INFO_FMT
 +                  "Retry completed ret=0x%x timeleft=%ld\n",
 +                  ioc->name, ret, timeleft);
--      /* Perform a FW reload */
--      if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0)
--              printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", ioc->name);
++
 +      dcprintk(ioc, printk(KERN_DEBUG "IOCStatus=%04xh, IOCLogInfo=%08xh\n",
 +           ret, le32_to_cpu(pReply->IOCLogInfo)));
--      /* No more processing.
--       * Hard reset clean-up will wake up
--       * process and free all resources.
--       */
--      dcprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mpt_timer_expired complete!\n", ioc->name));
++
 + out:
--      return;
++
 +      CLEAR_MGMT_STATUS(ioc->mptbase_cmds.status)
 +      mutex_unlock(&ioc->mptbase_cmds.mutex);
 +      if (issue_hard_reset) {
@@ -200589,7 +200575,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -5968,41 +6602,34 @@ mpt_timer_expired(unsigned long data)
+@@ -5968,41 +6602,34 @@
  static int
  mpt_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
  {
@@ -200626,6 +200612,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                      pCfg->status = MPT_CONFIG_ERROR;
 -                      pCfg->wait_done = 1;
 -                      wake_up(&mpt_waitq);
+-              }
+-              spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 +      switch (reset_phase) {
 +      case MPT_IOC_SETUP_RESET:
 +              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -200650,26 +200638,25 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                      ioc->taskmgmt_cmds.status
 +                          |= MPT_MGMT_STATUS_DID_IOCRESET;
 +                      complete(&ioc->taskmgmt_cmds.done);
-               }
--              spin_unlock_irqrestore(&ioc->FreeQlock, flags);
++              }
 +              break;
 +      default:
 +              break;
        }
  
        return 1;               /* currently means nothing really */
-@@ -6011,10 +6638,6 @@ mpt_ioc_reset(MPT_ADAPTER *ioc, int rese
+@@ -6010,10 +6637,6 @@
  
  #ifdef CONFIG_PROC_FS         /* { */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/*
 - *    procfs (%MPT_PROCFS_MPTBASEDIR/...) support stuff...
 - */
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
   *    procmpt_create - Create %MPT_PROCFS_MPTBASEDIR entries.
-  *
-@@ -6251,7 +6874,6 @@ procmpt_iocinfo_read(char *buf, char **s
+@@ -6251,7 +6874,6 @@
  
  #endif                /* CONFIG_PROC_FS } */
  
@@ -200677,7 +200664,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  static void
  mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc)
  {
-@@ -6319,6 +6941,223 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, 
+@@ -6319,6 +6941,223 @@
  /*
   *    Reset Handling
   */
@@ -200901,7 +200888,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
   *    mpt_HardResetHandler - Generic reset handler
-@@ -6339,8 +7178,10 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, 
+@@ -6339,8 +7178,10 @@
  int
  mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
  {
@@ -200913,7 +200900,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler Entered!\n", ioc->name));
  #ifdef MFCNT
-@@ -6348,67 +7189,85 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i
+@@ -6348,67 +7189,85 @@
        printk("MF count 0x%x !\n", ioc->mfcnt);
  #endif
  
@@ -200926,21 +200913,24 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -      spin_lock_irqsave(&ioc->diagLock, flags);
 -      if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)){
 -              spin_unlock_irqrestore(&ioc->diagLock, flags);
-+      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
-+      if (ioc->ioc_reset_in_progress) {
-+              spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
-               return 0;
+-              return 0;
 -      } else {
 -              ioc->diagPending = 1;
-       }
+-      }
 -      spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+-      /* FIXME: If do_ioc_recovery fails, repeat....
+-       */
++      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
++      if (ioc->ioc_reset_in_progress) {
++              spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
++              return 0;
++      }
 +      ioc->ioc_reset_in_progress = 1;
 +      if (ioc->alt_ioc)
 +          ioc->alt_ioc->ioc_reset_in_progress = 1;
 +      spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
--      /* FIXME: If do_ioc_recovery fails, repeat....
--       */
++
  
        /* The SCSI driver needs to adjust timeouts on all current
         * commands prior to the diagnostic reset being issued.
@@ -200962,33 +200952,47 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 -                                      r += mpt_signal_reset(cb_idx, ioc->alt_ioc, MPT_IOC_SETUP_RESET);
 -                              }
 -                      }
+-              }
+-      }
+-
 +      for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
 +              if (MptResetHandlers[cb_idx]) {
 +                      mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET);
 +                      if (ioc->alt_ioc)
 +                              mpt_signal_reset(cb_idx,
 +                                  ioc->alt_ioc, MPT_IOC_SETUP_RESET);
-               }
-       }
++              }
++      }
++
 +      time_count = jiffies;
        if ((rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag)) != 0) {
 -              printk(MYIOC_s_WARN_FMT "Cannot recover rc = %d!\n", ioc->name, rc);
-+              printk(KERN_WARNING MYNAM
-+                  ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
-+      } else {
-+              if (ioc->hard_resets < -1)
-+                      ioc->hard_resets++;
-       }
+-      }
 -      ioc->reload_fw = 0;
 -      if (ioc->alt_ioc)
 -              ioc->alt_ioc->reload_fw = 0;
+-
 -      spin_lock_irqsave(&ioc->diagLock, flags);
 -      ioc->diagPending = 0;
 -      if (ioc->alt_ioc)
 -              ioc->alt_ioc->diagPending = 0;
 -      spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+-      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler rc = %d!\n", ioc->name, rc));
+-
+-      return rc;
+-}
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-static void
+-EventDescriptionStr(u8 event, u32 evData0, char *evStr)
++              printk(KERN_WARNING MYNAM
++                  ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
++      } else {
++              if (ioc->hard_resets < -1)
++                      ioc->hard_resets++;
++      }
++
 +      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
 +      ioc->ioc_reset_in_progress = 0;
 +      ioc->taskmgmt_quiesce_io = 0;
@@ -200999,8 +201003,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +          ioc->alt_ioc->taskmgmt_in_progress = 0;
 +      }
 +      spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
--      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler rc = %d!\n", ioc->name, rc));
++
 +      for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
 +              if (MptResetHandlers[cb_idx]) {
 +                      mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET);
@@ -201009,18 +201012,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +                                  ioc->alt_ioc, MPT_IOC_POST_RESET);
 +              }
 +      }
++
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +              "HardResetHandler: completed (%d seconds): %s\n",
 +              ioc->name, jiffies_to_msecs(jiffies - time_count)/1000,
 +              ((rc == 0) ? "SUCCESS" : "FAILED")));
-       return rc;
- }
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
++      return rc;
++}
++
 +#ifdef CONFIG_FUSION_LOGGING
- static void
--EventDescriptionStr(u8 event, u32 evData0, char *evStr)
++static void
 +mpt_display_event_info(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply)
  {
        char *ds = NULL;
@@ -201034,19 +201035,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        switch(event) {
        case MPI_EVENT_NONE:
-@@ -6442,9 +7301,9 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6442,9 +7301,9 @@
                if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LIP)
                        ds = "Loop State(LIP) Change";
                else if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LPE)
 -                      ds = "Loop State(LPE) Change";          /* ??? */
-+                      ds = "Loop State(LPE) Change";
-               else
+-              else
 -                      ds = "Loop State(LPB) Change";          /* ??? */
++                      ds = "Loop State(LPE) Change";
++              else
 +                      ds = "Loop State(LPB) Change";
                break;
        case MPI_EVENT_LOGOUT:
                ds = "Logout";
-@@ -6540,6 +7399,11 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6540,6 +7399,11 @@
                            "SAS Device Status Change: Internal Device "
                            "Reset : id=%d channel=%d", id, channel);
                        break;
@@ -201058,19 +201060,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
                        snprintf(evStr, EVENT_DESCR_STR_SZ,
                            "SAS Device Status Change: Internal Task "
-@@ -6560,6 +7424,11 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6558,6 +7422,11 @@
+               case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
+                       snprintf(evStr, EVENT_DESCR_STR_SZ,
                            "SAS Device Status Change: Internal Query "
-                           "Task : id=%d channel=%d", id, channel);
-                       break;
++                          "Task : id=%d channel=%d", id, channel);
++                      break;
 +              case MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION:
 +                      snprintf(evStr, EVENT_DESCR_STR_SZ,
 +                          "SAS Device Status Change: Async Notification "
-+                          "Task : id=%d channel=%d", id, channel);
-+                      break;
+                           "Task : id=%d channel=%d", id, channel);
+                       break;
                default:
-                       snprintf(evStr, EVENT_DESCR_STR_SZ,
-                           "SAS Device Status Change: Unknown: "
-@@ -6644,28 +7513,65 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6644,28 +7513,65 @@
        }
        case MPI_EVENT_IR2:
        {
@@ -201143,7 +201145,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                        break;
                default:
                        ds = "IR2";
-@@ -6689,25 +7595,46 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6689,25 +7595,46 @@
        {
                u8 phy_num = (u8)(evData0);
                u8 port_num = (u8)(evData0 >> 8);
@@ -201181,11 +201183,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                u8 reason = (u8)(evData0);
 -              u8 port_num = (u8)(evData0 >> 8);
 -              u16 handle = le16_to_cpu(evData0 >> 16);
+-
 -              snprintf(evStr, EVENT_DESCR_STR_SZ,
 -                  "SAS Initiator Device Status Change: reason=0x%02x "
 -                  "port=%d handle=0x%04x",
 -                  reason, port_num, handle);
++
 +              switch (reason) {
 +              case MPI_EVENT_SAS_INIT_RC_ADDED:
 +                      ds = "SAS Initiator Status Change: Added";
@@ -201200,7 +201203,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                break;
        }
  
-@@ -6755,6 +7682,24 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6755,6 +7682,24 @@
                break;
        }
  
@@ -201225,10 +201228,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        /*
         *  MPT base "custom" events may be added here...
         */
-@@ -6764,7 +7709,20 @@ EventDescriptionStr(u8 event, u32 evData
+@@ -6764,7 +7709,20 @@
        }
        if (ds)
                strncpy(evStr, ds, EVENT_DESCR_STR_SZ);
+-}
 +
 +
 +      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -201241,12 +201245,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
 +              devtverboseprintk(ioc, printk(" %08x",
 +                  le32_to_cpu(pEventReply->Data[ii])));
 +      devtverboseprintk(ioc, printk(KERN_DEBUG "\n"));
- }
++}
 +#endif
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
-@@ -6782,37 +7740,24 @@ ProcessEventNotification(MPT_ADAPTER *io
+@@ -6782,37 +7740,24 @@
  {
        u16 evDataLen;
        u32 evData0 = 0;
@@ -201288,7 +201292,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  #endif
  
        /*
-@@ -6867,13 +7812,13 @@ ProcessEventNotification(MPT_ADAPTER *io
+@@ -6867,13 +7812,13 @@
         */
        for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
                if (MptEvHandlers[cb_idx]) {
@@ -201305,7 +201309,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        /*
         *  If needed, send (a single) EventAck.
-@@ -6953,8 +7898,6 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 l
+@@ -6953,8 +7898,6 @@
        switch (info) {
        case 0x00010000:
                desc = "bug! MID not found";
@@ -201314,7 +201318,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
                break;
  
        case 0x00020000:
-@@ -7149,7 +8092,6 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 l
+@@ -7149,7 +8092,6 @@
                "Compatibility Error: IME Size Limited to < 2TB", /* 3Dh */
        };
  
@@ -201322,7 +201326,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  /**
   *    mpt_sas_log_info - Log information returned from SAS IOC.
   *    @ioc: Pointer to MPT_ADAPTER structure
-@@ -7229,7 +8171,6 @@ union loginfo_type {
+@@ -7229,7 +8171,6 @@
                        sas_loginfo.dw.code, sas_loginfo.dw.subcode);
  }
  
@@ -201330,7 +201334,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  /**
   *    mpt_iocstatus_info_config - IOCSTATUS information for config pages
   *    @ioc: Pointer to MPT_ADAPTER structure
-@@ -7531,8 +8472,8 @@ mpt_iocstatus_info(MPT_ADAPTER *ioc, u32
+@@ -7531,8 +8472,8 @@
        if (!desc)
                return;
  
@@ -201341,7 +201345,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -7555,18 +8496,23 @@ EXPORT_SYMBOL(mpt_get_msg_frame);
+@@ -7555,18 +8496,23 @@
  EXPORT_SYMBOL(mpt_put_msg_frame);
  EXPORT_SYMBOL(mpt_put_msg_frame_hi_pri);
  EXPORT_SYMBOL(mpt_free_msg_frame);
@@ -201366,7 +201370,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
-@@ -7592,7 +8538,7 @@ fusion_init(void)
+@@ -7592,7 +8538,7 @@
        /*  Register ourselves (mptbase) in order to facilitate
         *  EventNotification handling.
         */
@@ -201375,7 +201379,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
  
        /* Register for hard reset handling callbacks.
         */
-@@ -7614,7 +8560,6 @@ fusion_init(void)
+@@ -7614,7 +8560,6 @@
  static void __exit
  fusion_exit(void)
  {
@@ -201383,9 +201387,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.c linux-2.6.27.19-5.1/dri
        mpt_reset_deregister(mpt_base_index);
  
  #ifdef CONFIG_PROC_FS
-diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.h
---- linux-2.6.27/drivers/message/fusion/mptbase.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptbase.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptbase.h
+--- a/drivers/message/fusion/mptbase.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptbase.h Wed May 06 16:56:21 2009 +0100
 @@ -49,10 +49,6 @@
  #define MPTBASE_H_INCLUDED
  /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -201455,15 +201459,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  
  #ifdef __KERNEL__     /* { */
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -224,7 +239,6 @@ typedef struct _ATTO_CONFIG_PAGE_SCSI_PO
+@@ -223,7 +238,6 @@
+       ATTO_DEVICE_INFO        DeviceSettings[16];     /* 0Ch */
  } fATTO_CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_ATTO_CONFIG_PAGE_SCSI_PORT_2,
    ATTO_SCSIPortPage2_t, MPI_POINTER pATTO_SCSIPortPage2_t;
 -
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /*
-  *  MPT protocol driver defs...
-@@ -372,8 +386,8 @@ typedef struct _VirtTarget {
+@@ -372,8 +386,8 @@
        struct scsi_target      *starget;
        u8                       tflags;
        u8                       ioc_id;
@@ -201474,7 +201478,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        u8                       minSyncFactor; /* 0xFF is async */
        u8                       maxOffset;     /* 0 if async */
        u8                       maxWidth;      /* 0 if narrow, 1 if wide */
-@@ -381,7 +395,7 @@ typedef struct _VirtTarget {
+@@ -381,7 +395,7 @@
        u8                       raidVolume;    /* set, if RAID Volume */
        u8                       type;          /* byte 0 of Inquiry data */
        u8                       deleted;       /* target in process of being removed */
@@ -201483,14 +201487,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  } VirtTarget;
  
  typedef struct _VirtDevice {
-@@ -427,42 +441,33 @@ do { \
+@@ -427,42 +441,33 @@
  } while (0)
  
  
 -/*
 - *    IOCTL structure and associated defines
 - */
--
++#define MPT_MGMT_STATUS_RF_VALID      0x01    /* The Reply Frame is VALID */
++#define MPT_MGMT_STATUS_COMMAND_GOOD  0x02    /* Command Status GOOD */
++#define MPT_MGMT_STATUS_PENDING               0x04    /* command is pending */
++#define MPT_MGMT_STATUS_DID_IOCRESET  0x08    /* IOC Reset occurred */
++#define MPT_MGMT_STATUS_SENSE_VALID   0x10    /* valid sense info */
++#define MPT_MGMT_STATUS_TIMER_ACTIVE  0x20    /* obsolete */
++#define MPT_MGMT_STATUS_FREE_MF               0x40    /* free the mf */
 -#define MPT_IOCTL_STATUS_DID_IOCRESET 0x01    /* IOC Reset occurred on the current*/
 -#define MPT_IOCTL_STATUS_RF_VALID     0x02    /* The Reply Frame is VALID */
 -#define MPT_IOCTL_STATUS_TIMER_ACTIVE 0x04    /* The timer is running */
@@ -201498,9 +201509,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
 -#define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10    /* Command Status GOOD */
 -#define MPT_IOCTL_STATUS_TMTIMER_ACTIVE       0x20    /* The TM timer is running */
 -#define MPT_IOCTL_STATUS_TM_FAILED    0x40    /* User TM request failed */
--
 -#define MPTCTL_RESET_OK                       0x01    /* Issue Bus Reset */
--
++#define INITIALIZE_MGMT_STATUS(status) \
++      status = MPT_MGMT_STATUS_PENDING;
++#define CLEAR_MGMT_STATUS(status) \
++      status = 0;
++#define CLEAR_MGMT_PENDING_STATUS(status) \
++      status &= ~MPT_MGMT_STATUS_PENDING;
++#define SET_MGMT_MSG_CONTEXT(msg_context, value) \
++      msg_context = value;
 -typedef struct _MPT_IOCTL {
 -      struct _MPT_ADAPTER     *ioc;
 -      u8                       ReplyFrame[MPT_DEFAULT_FRAME_SIZE];    /* reply frame data */
@@ -201516,24 +201535,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
 -#define MPT_SAS_MGMT_STATUS_RF_VALID  0x02    /* The Reply Frame is VALID */
 -#define MPT_SAS_MGMT_STATUS_COMMAND_GOOD      0x10    /* Command Status GOOD */
 -#define MPT_SAS_MGMT_STATUS_TM_FAILED 0x40    /* User TM request failed */
-+#define MPT_MGMT_STATUS_RF_VALID      0x01    /* The Reply Frame is VALID */
-+#define MPT_MGMT_STATUS_COMMAND_GOOD  0x02    /* Command Status GOOD */
-+#define MPT_MGMT_STATUS_PENDING               0x04    /* command is pending */
-+#define MPT_MGMT_STATUS_DID_IOCRESET  0x08    /* IOC Reset occurred */
-+#define MPT_MGMT_STATUS_SENSE_VALID   0x10    /* valid sense info */
-+#define MPT_MGMT_STATUS_TIMER_ACTIVE  0x20    /* obsolete */
-+#define MPT_MGMT_STATUS_FREE_MF               0x40    /* free the mf */
-+
-+
-+#define INITIALIZE_MGMT_STATUS(status) \
-+      status = MPT_MGMT_STATUS_PENDING;
-+#define CLEAR_MGMT_STATUS(status) \
-+      status = 0;
-+#define CLEAR_MGMT_PENDING_STATUS(status) \
-+      status &= ~MPT_MGMT_STATUS_PENDING;
-+#define SET_MGMT_MSG_CONTEXT(msg_context, value) \
-+      msg_context = value;
+-
 -typedef struct _MPT_SAS_MGMT {
 +typedef struct _MPT_MGMT {
        struct mutex             mutex;
@@ -201548,7 +201550,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  
  /*
   *  Event Structure and define
-@@ -534,6 +539,7 @@ struct inactive_raid_component_info {
+@@ -534,6 +539,7 @@
  typedef       struct _RaidCfgData {
        IOCPage2_t      *pIocPg2;               /* table of Raid Volumes */
        IOCPage3_t      *pIocPg3;               /* table of physical disks */
@@ -201556,7 +201558,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        struct mutex    inactive_list_mutex;
        struct list_head        inactive_list; /* link list for physical
                                                disk that belong in
-@@ -564,6 +570,10 @@ struct mptfc_rport_info
+@@ -564,6 +570,10 @@
        u8              flags;
  };
  
@@ -201567,7 +201569,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  /*
   *  Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS
   */
-@@ -573,6 +583,10 @@ typedef struct _MPT_ADAPTER
+@@ -573,6 +583,10 @@
        int                      pci_irq;       /* This irq           */
        char                     name[MPT_NAME_LENGTH]; /* "iocN"             */
        char                     prod_name[MPT_NAME_LENGTH];    /* "LSIFC9x9"         */
@@ -201578,7 +201580,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        char                     board_name[16];
        char                     board_assembly[16];
        char                     board_tracer[16];
-@@ -584,8 +598,9 @@ typedef struct _MPT_ADAPTER
+@@ -584,8 +598,9 @@
        SYSIF_REGS __iomem      *chip;          /* == c8817000 (mmap) */
        SYSIF_REGS __iomem      *pio_chip;      /* Programmed IO (downloadboot) */
        u8                       bus_type;
@@ -201590,7 +201592,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        int                      mem_size;      /* mmap memory size */
        int                      number_of_buses;
        int                      devices_per_bus;
-@@ -600,6 +615,10 @@ typedef struct _MPT_ADAPTER
+@@ -600,6 +615,10 @@
        int                      reply_depth;   /* Num Allocated reply frames */
        int                      reply_sz;      /* Reply frame size */
        int                      num_chain;     /* Number of chain buffers */
@@ -201601,7 +201603,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
                /* Pool of buffers for chaining. ReqToChain
                 * and ChainToChain track index of chain buffers.
                 * ChainBuffer (DMA) virt/phys addresses.
-@@ -628,31 +647,28 @@ typedef struct _MPT_ADAPTER
+@@ -628,31 +647,28 @@
        dma_addr_t               sense_buf_pool_dma;
        u32                      sense_buf_low_dma;
        u8                      *HostPageBuffer; /* SAS - host page buffer support */
@@ -201643,7 +201645,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        int                      hs_reply_idx;
  #ifndef MFCNT
        u32                      pad0;
-@@ -665,13 +681,17 @@ typedef struct _MPT_ADAPTER
+@@ -665,13 +681,17 @@
        IOCFactsReply_t          facts;
        PortFactsReply_t         pfacts[2];
        FCPortPage0_t            fc_port_page0[2];
@@ -201664,7 +201666,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        /*
         * Description: errata_flag_1064
         * If a PCIX read occurs within 1 or 2 cycles after the chip receives
-@@ -682,25 +702,48 @@ typedef struct _MPT_ADAPTER
+@@ -682,25 +702,48 @@
        int                      aen_event_read_flag; /* flag to indicate event log was read*/
        u8                       FirstWhoInit;
        u8                       upload_fw;     /* If set, do a fw upload */
@@ -201722,7 +201724,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
        struct work_struct       fc_setup_reset_work;
        struct list_head         fc_rports;
        struct work_struct       fc_lsc_work;
-@@ -709,14 +752,30 @@ typedef struct _MPT_ADAPTER
+@@ -709,14 +752,30 @@
        struct work_struct       fc_rescan_work;
        char                     fc_rescan_work_q_name[20];
        struct workqueue_struct *fc_rescan_work_q;
@@ -201759,27 +201761,26 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  } MPT_ADAPTER;
  
  /*
-@@ -753,13 +812,12 @@ typedef struct _mpt_sge {
+@@ -753,13 +812,12 @@
        dma_addr_t      Address;
  } MptSge_t;
  
 -#define mpt_addr_size() \
 -      ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SGE_FLAGS_64_BIT_ADDRESSING : \
 -              MPI_SGE_FLAGS_32_BIT_ADDRESSING)
--
--#define mpt_msg_flags() \
--      ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
--              MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32)
 +#define mpt_msg_flags(ioc) \
 +      (ioc->sg_addr_size == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
 +              MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32
-+
+-#define mpt_msg_flags() \
+-      ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
+-              MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32)
 +#define MPT_SGE_FLAGS_64_BIT_ADDRESSING \
 +      (MPI_SGE_FLAGS_64_BIT_ADDRESSING << MPI_SGE_FLAGS_SHIFT)
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /*
-@@ -778,26 +836,10 @@ typedef struct _mpt_sge {
+@@ -778,26 +836,10 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
@@ -201806,7 +201807,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  
  #define MPT_HOST_BUS_UNKNOWN          (0xFF)
  #define MPT_HOST_TOO_MANY_TM          (0x05)
-@@ -813,13 +855,6 @@ typedef struct _MPT_LOCAL_REPLY {
+@@ -813,13 +855,6 @@
  #define MPT_NVRAM_WIDE_DISABLE                (0x00100000)
  #define MPT_NVRAM_BOOT_CHOICE         (0x00200000)
  
@@ -201820,7 +201821,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  typedef enum {
        FC,
        SPI,
-@@ -828,63 +863,28 @@ typedef enum {
+@@ -828,63 +863,28 @@
  
  typedef struct _MPT_SCSI_HOST {
        MPT_ADAPTER              *ioc;
@@ -201885,7 +201886,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  } CONFIGPARMS;
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -909,29 +909,40 @@ extern MPT_FRAME_HDR     *mpt_get_msg_frame(
+@@ -909,29 +909,40 @@
  extern void    mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
  extern void    mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
  extern void    mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
@@ -201931,7 +201932,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  #define CAST_U32_TO_PTR(x)    ((void *)(u64)x)
  #define CAST_PTR_TO_U32(x)    ((u32)(u64)x)
  #else
-@@ -956,7 +967,6 @@ extern struct list_head      ioc_list;
+@@ -956,7 +967,6 @@
  #define MPT_SGE_FLAGS_END_OF_BUFFER           (0x40000000)
  #define MPT_SGE_FLAGS_LOCAL_ADDRESS           (0x08000000)
  #define MPT_SGE_FLAGS_DIRECTION                       (0x04000000)
@@ -201939,7 +201940,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
  #define MPT_SGE_FLAGS_END_OF_LIST             (0x01000000)
  
  #define MPT_SGE_FLAGS_TRANSACTION_ELEMENT     (0x00000000)
-@@ -969,14 +979,12 @@ extern struct list_head    ioc_list;
+@@ -969,14 +979,12 @@
         MPT_SGE_FLAGS_END_OF_BUFFER |  \
         MPT_SGE_FLAGS_END_OF_LIST |    \
         MPT_SGE_FLAGS_SIMPLE_ELEMENT | \
@@ -201954,9 +201955,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptbase.h linux-2.6.27.19-5.1/dri
         MPT_TRANSFER_HOST_TO_IOC)
  
  /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.c
---- linux-2.6.27/drivers/message/fusion/mptctl.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptctl.c
+--- a/drivers/message/fusion/mptctl.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptctl.c  Wed May 06 16:56:21 2009 +0100
 @@ -45,6 +45,7 @@
  */
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -201981,7 +201982,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  #define my_NAME               "Fusion MPT misc device (ioctl) driver"
  #define my_VERSION    MPT_LINUX_VERSION_COMMON
-@@ -84,6 +94,7 @@ MODULE_VERSION(my_VERSION);
+@@ -84,6 +94,7 @@
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
  static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS;
@@ -201989,7 +201990,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
  static DECLARE_WAIT_QUEUE_HEAD ( mptctl_wait );
  
-@@ -112,6 +123,42 @@ static int mptctl_do_reset(unsigned long
+@@ -112,6 +123,42 @@
  static int mptctl_hp_hostinfo(unsigned long arg, unsigned int cmd);
  static int mptctl_hp_targetinfo(unsigned long arg);
  
@@ -202032,7 +202033,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  static int  mptctl_probe(struct pci_dev *, const struct pci_device_id *);
  static void mptctl_remove(struct pci_dev *);
  
-@@ -127,10 +174,6 @@ static MptSge_t *kbuf_alloc_2_sgl(int by
+@@ -127,10 +174,6 @@
                struct buflist **blp, dma_addr_t *sglbuf_dma, MPT_ADAPTER *ioc);
  static void kfree_sgl(MptSge_t *sgl, dma_addr_t sgl_dma,
                struct buflist *buflist, MPT_ADAPTER *ioc);
@@ -202043,7 +202044,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
  /*
   * Reset Handler cleanup function
-@@ -183,10 +226,10 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in
+@@ -183,10 +226,10 @@
        int rc = 0;
  
        if (nonblock) {
@@ -202056,7 +202057,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        rc = -ERESTARTSYS;
        }
        return rc;
-@@ -202,131 +245,107 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in
+@@ -202,131 +245,107 @@
  static int
  mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
  {
@@ -202064,31 +202065,25 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -      int sz, req_index;
 -      u16 iocStatus;
 -      u8 cmd;
--
++      char    *sense_data;
++      int     req_index;
++      int     sz;
 -      if (req)
 -               cmd = req->u.hdr.Function;
 -      else
 -              return 1;
 -      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tcompleting mpi function (0x%02X), req=%p, "
 -          "reply=%p\n", ioc->name,  req->u.hdr.Function, req, reply));
--
--      if (ioc->ioctl) {
-+      char    *sense_data;
-+      int     req_index;
-+      int     sz;
--              if (reply==NULL) {
 +      if (!req)
 +              return 0;
  
--                      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply "
--                              "Function=%x!\n", ioc->name, cmd));
+-      if (ioc->ioctl) {
 +      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "completing mpi function "
 +          "(0x%02X), req=%p, reply=%p\n", ioc->name,  req->u.hdr.Function,
 +          req, reply));
  
--                      ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
--                      ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
+-              if (reply==NULL) {
 +      /*
 +       * Handling continuation of the same reply. Processing the first
 +       * reply, and eating the other replys that come later.
@@ -202096,16 +202091,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +      if (ioc->ioctl_cmds.msg_context != req->u.hdr.MsgContext)
 +              goto out_continuation;
  
+-                      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply "
+-                              "Function=%x!\n", ioc->name, cmd));
++      ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
+-                      ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
+-                      ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
++      if (!reply)
++              goto out;
 -                      /* We are done, issue wake up
 -                      */
 -                      ioc->ioctl->wait_done = 1;
 -                      wake_up (&mptctl_wait);
 -                      return 1;
-+      ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
++      ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
++      sz = min(ioc->reply_sz, 4*reply->u.reply.MsgLength);
++      memcpy(ioc->ioctl_cmds.reply, reply, sz);
  
 -              }
-+      if (!reply)
-+              goto out;
++      if (reply->u.reply.IOCStatus || reply->u.reply.IOCLogInfo)
++              dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++                  "iocstatus (0x%04X), loginfo (0x%08X)\n", ioc->name,
++                  le16_to_cpu(reply->u.reply.IOCStatus),
++                  le32_to_cpu(reply->u.reply.IOCLogInfo)));
  
 -              /* Copy the reply frame (which much exist
 -               * for non-SCSI I/O) to the IOC structure.
@@ -202113,9 +202122,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -              memcpy(ioc->ioctl->ReplyFrame, reply,
 -                      min(ioc->reply_sz, 4*reply->u.reply.MsgLength));
 -              ioc->ioctl->status |= MPT_IOCTL_STATUS_RF_VALID;
-+      ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
-+      sz = min(ioc->reply_sz, 4*reply->u.reply.MsgLength);
-+      memcpy(ioc->ioctl_cmds.reply, reply, sz);
++      if ((req->u.hdr.Function == MPI_FUNCTION_SCSI_IO_REQUEST) ||
++              (req->u.hdr.Function
++                       == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) {
  
 -              /* Set the command status to GOOD if IOC Status is GOOD
 -               * OR if SCSI I/O cmd and data underrun or recovered error.
@@ -202123,7 +202132,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -              iocStatus = le16_to_cpu(reply->u.reply.IOCStatus) & MPI_IOCSTATUS_MASK;
 -              if (iocStatus  == MPI_IOCSTATUS_SUCCESS)
 -                      ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
--
++              if (reply->u.sreply.SCSIStatus || reply->u.sreply.SCSIState)
++                      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++                      "scsi_status (0x%02x), scsi_state (0x%02x), "
++                      "tag = (0x%04x), transfer_count (0x%08x)\n", ioc->name,
++                      reply->u.sreply.SCSIStatus,
++                      reply->u.sreply.SCSIState,
++                      le16_to_cpu(reply->u.sreply.TaskTag),
++                      le32_to_cpu(reply->u.sreply.TransferCount)));
 -              if (iocStatus || reply->u.reply.IOCLogInfo)
 -                      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tiocstatus (0x%04X), "
 -                              "loginfo (0x%08X)\n", ioc->name,
@@ -202149,25 +202166,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -                      ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
 -                      }
 -              }
-+      if (reply->u.reply.IOCStatus || reply->u.reply.IOCLogInfo)
-+              dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+                  "iocstatus (0x%04X), loginfo (0x%08X)\n", ioc->name,
-+                  le16_to_cpu(reply->u.reply.IOCStatus),
-+                  le32_to_cpu(reply->u.reply.IOCLogInfo)));
-+
-+      if ((req->u.hdr.Function == MPI_FUNCTION_SCSI_IO_REQUEST) ||
-+              (req->u.hdr.Function
-+                       == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) {
-+
-+              if (reply->u.sreply.SCSIStatus || reply->u.sreply.SCSIState)
-+                      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+                      "scsi_status (0x%02x), scsi_state (0x%02x), "
-+                      "tag = (0x%04x), transfer_count (0x%08x)\n", ioc->name,
-+                      reply->u.sreply.SCSIStatus,
-+                      reply->u.sreply.SCSIState,
-+                      le16_to_cpu(reply->u.sreply.TaskTag),
-+                      le32_to_cpu(reply->u.sreply.TransferCount)));
+-
 -              /* Copy the sense data - if present
 -               */
 -              if ((cmd == MPI_FUNCTION_SCSI_IO_REQUEST) &&
@@ -202191,11 +202190,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
 -              if (cmd == MPI_FUNCTION_SCSI_TASK_MGMT)
 -                      mptctl_free_tm_flags(ioc);
--
--              /* We are done, issue wake up
--               */
--              ioc->ioctl->wait_done = 1;
--              wake_up (&mptctl_wait);
 + out:
 +      /* We are done, issue wake up
 +       */
@@ -202204,8 +202198,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +                      mpt_clear_taskmgmt_in_progress_flag(ioc);
 +              ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
 +              complete(&ioc->ioctl_cmds.done);
-       }
-+
++      }
+-              /* We are done, issue wake up
+-               */
+-              ioc->ioctl->wait_done = 1;
+-              wake_up (&mptctl_wait);
+-      }
 + out_continuation:
 +      if (reply && (reply->u.reply.MsgFlags &
 +          MPI_MSGFLAGS_CONTINUATION_REPLY))
@@ -202238,7 +202237,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -      ioctl->wait_done = 0;
 -      if (ioctl->reset & MPTCTL_RESET_OK)
 -              rc = mptctl_bus_reset(ioctl);
--
++      ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
 -      if (rc) {
 -              /* Issue a reset for this device.
 -               * The IOC is not responding.
@@ -202246,13 +202246,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -              dctlprintk(ioctl->ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
 -                       ioctl->ioc->name));
 -              mpt_HardResetHandler(ioctl->ioc, CAN_SLEEP);
--      }
--      return;
-+      ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+
 +      if (!mr)
 +              goto out;
++
 +      ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
 +      memcpy(ioc->taskmgmt_cmds.reply, mr,
 +          min(MPT_DEFAULT_FRAME_SIZE, 4 * mr->u.reply.MsgLength));
@@ -202262,12 +202258,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +              ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
 +              complete(&ioc->taskmgmt_cmds.done);
 +              return 1;
-+      }
+       }
+-      return;
+-
 +      return 0;
  }
  
  /* mptctl_bus_reset
-@@ -334,132 +353,182 @@ static void mptctl_timeout_expired (MPT_
+@@ -334,132 +353,182 @@
   * Bus reset code.
   *
   */
@@ -202281,32 +202279,33 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +      SCSITaskMgmtReply_t *pScsiTmReply;
        int              ii;
 -      int              retval=0;
--
--
--      ioctl->reset &= ~MPTCTL_RESET_OK;
--
--      if (ioctl->ioc->sh == NULL)
 +      int              retval;
 +      unsigned long    timeout;
 +      unsigned long    time_count;
 +      u16              iocstatus;
-+
 +      /* bus reset is only good for SCSI IO, RAID PASSTHRU */
 +      if (!(function == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH) ||
 +          (function == MPI_FUNCTION_SCSI_IO_REQUEST)) {
 +              dtmprintk(ioc, printk(MYIOC_s_WARN_FMT
 +                      "TaskMgmt, not SCSI_IO!!\n", ioc->name));
-               return -EPERM;
++              return -EPERM;
 +      }
  
--      hd = shost_priv(ioctl->ioc->sh);
--      if (hd == NULL)
+-      ioctl->reset &= ~MPTCTL_RESET_OK;
 +      mutex_lock(&ioc->taskmgmt_cmds.mutex);
 +      if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0) {
 +              mutex_unlock(&ioc->taskmgmt_cmds.mutex);
-               return -EPERM;
++              return -EPERM;
 +      }
  
+-      if (ioctl->ioc->sh == NULL)
+-              return -EPERM;
+-
+-      hd = shost_priv(ioctl->ioc->sh);
+-      if (hd == NULL)
+-              return -EPERM;
+-
 -      /* Single threading ....
 -       */
 -      if (mptctl_set_tm_flags(hd) != 0)
@@ -202337,19 +202336,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        pScsiTm = (SCSITaskMgmt_t *) mf;
 -      pScsiTm->TargetID = ioctl->id;
 -      pScsiTm->Bus = hd->port;        /* 0 */
--      pScsiTm->ChainOffset = 0;
 +      memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
-       pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--      pScsiTm->Reserved = 0;
-       pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
--      pScsiTm->Reserved1 = 0;
-       pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
--
++      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
++      pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
++      pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
 +      pScsiTm->TargetID = 0;
 +      pScsiTm->Bus = 0;
-+      pScsiTm->ChainOffset = 0;
-+      pScsiTm->Reserved = 0;
-+      pScsiTm->Reserved1 = 0;
+       pScsiTm->ChainOffset = 0;
+-      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
+       pScsiTm->Reserved = 0;
+-      pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
+       pScsiTm->Reserved1 = 0;
+-      pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
+-
 +      pScsiTm->TaskMsgContext = 0;
        for (ii= 0; ii < 8; ii++)
                pScsiTm->LUN[ii] = 0;
@@ -202360,10 +202359,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -      pScsiTm->TaskMsgContext = 0;
 -      dtmprintk(ioctl->ioc, printk(MYIOC_s_DEBUG_FMT
 -              "mptctl_bus_reset: issued.\n", ioctl->ioc->name));
--
--      DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf);
--
--      ioctl->wait_done=0;
 +      switch (ioc->bus_type) {
 +      case FC:
 +              timeout = 40;
@@ -202377,13 +202372,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +              break;
 +      }
  
--      if ((ioctl->ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
--          (ioctl->ioc->facts.MsgVersion >= MPI_VERSION_01_05))
--              mpt_put_msg_frame_hi_pri(mptctl_id, ioctl->ioc, mf);
+-      DBG_DUMP_TM_REQUEST_FRAME(ioctl->ioc, (u32 *)mf);
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +              "TaskMgmt type=%d timeout=%ld\n", ioc->name,
 +              MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, timeout));
-+
+-      ioctl->wait_done=0;
+-
+-      if ((ioctl->ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
+-          (ioctl->ioc->facts.MsgVersion >= MPI_VERSION_01_05))
+-              mpt_put_msg_frame_hi_pri(mptctl_id, ioctl->ioc, mf);
 +      INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
 +      CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
 +      time_count = jiffies;
@@ -202412,11 +202410,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -      ii = wait_event_timeout(mptctl_wait,
 -           ioctl->wait_done == 1,
 -           HZ*5 /* 5 second timeout */);
--
--      if(ii <=0 && (ioctl->wait_done != 1 ))  {
--              mpt_free_msg_frame(hd->ioc, mf);
--              ioctl->wait_done = 0;
--              retval = -1; /* return failure */
 +      ii = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, timeout*HZ);
 +      if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
 +              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -202428,33 +202421,18 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +              else
 +                      retval = -1; /* return failure */
 +              goto mptctl_bus_reset_done;
-       }
++      }
  
--mptctl_bus_reset_done:
--
--      mptctl_free_tm_flags(ioctl->ioc);
--      return retval;
--}
--
--static int
--mptctl_set_tm_flags(MPT_SCSI_HOST *hd) {
--      unsigned long flags;
--
--      spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
+-      if(ii <=0 && (ioctl->wait_done != 1 ))  {
+-              mpt_free_msg_frame(hd->ioc, mf);
+-              ioctl->wait_done = 0;
 +      if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
 +              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                  "TaskMgmt failed\n", ioc->name));
 +              retval = -1; /* return failure */
 +              goto mptctl_bus_reset_done;
 +      }
--      if (hd->tmState == TM_STATE_NONE) {
--              hd->tmState = TM_STATE_IN_PROGRESS;
--              hd->tmPending = 1;
--              spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--      } else {
--              spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--              return -EBUSY;
++
 +      pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply;
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +          "TaskMgmt fw_channel = %d, fw_id = %d, task_type=0x%02X, "
@@ -202475,29 +202453,36 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +      else {
 +              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                  "TaskMgmt failed\n", ioc->name));
-+              retval = -1; /* return failure */
+               retval = -1; /* return failure */
        }
  
--      return 0;
-+
+-mptctl_bus_reset_done:
+-      mptctl_free_tm_flags(ioctl->ioc);
 + mptctl_bus_reset_done:
 +      mutex_unlock(&ioc->taskmgmt_cmds.mutex);
 +      CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
-+      return retval;
+       return retval;
  }
  
- static void
--mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+-static int
+-mptctl_set_tm_flags(MPT_SCSI_HOST *hd) {
++static void
 +mptctl_timeout_expired(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf)
- {
--      MPT_SCSI_HOST * hd;
++{
        unsigned long flags;
  
--      hd = shost_priv(ioc->sh);
--      if (hd == NULL)
+-      spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT ": %s\n",
 +              ioc->name, __func__));
-+
+-      if (hd->tmState == TM_STATE_NONE) {
+-              hd->tmState = TM_STATE_IN_PROGRESS;
+-              hd->tmPending = 1;
+-              spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
+-      } else {
+-              spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
+-              return -EBUSY;
 +      if (mpt_fwfault_debug)
 +              mpt_halt_firmware(ioc);
 +      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
@@ -202505,18 +202490,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +              spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
 +              CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status)
 +              mpt_free_msg_frame(ioc, mf);
-               return;
-+      }
++              return;
+       }
 +      spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
  
--      spin_lock_irqsave(&ioc->FreeQlock, flags);
+-      return 0;
+-}
+-static void
+-mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+-{
+-      MPT_SCSI_HOST * hd;
+-      unsigned long flags;
+-
+-      hd = shost_priv(ioc->sh);
+-      if (hd == NULL)
++      if (!mptctl_bus_reset(ioc, mf->u.hdr.Function))
+               return;
  
+-      spin_lock_irqsave(&ioc->FreeQlock, flags);
+-
 -      hd->tmState = TM_STATE_NONE;
 -      hd->tmPending = 0;
 -      spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+      if (!mptctl_bus_reset(ioc, mf->u.hdr.Function))
-+              return;
+-
 -      return;
 +      /* Issue a reset for this device.
 +       * The IOC is not responding.
@@ -202530,7 +202527,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -472,22 +541,23 @@ mptctl_free_tm_flags(MPT_ADAPTER *ioc)
+@@ -472,22 +541,23 @@
  static int
  mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
  {
@@ -202565,7 +202562,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        default:
                break;
        }
-@@ -510,8 +580,6 @@ mptctl_event_process(MPT_ADAPTER *ioc, E
+@@ -510,8 +580,6 @@
                return 1;
  
        /* Raise SIGIO for persistent events.
@@ -202574,7 +202571,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
         */
         if (event == 0x21 ) {
                ioc->aen_event_read_flag=1;
-@@ -548,15 +616,11 @@ static int
+@@ -548,15 +616,11 @@
  mptctl_fasync(int fd, struct file *filep, int mode)
  {
        MPT_ADAPTER     *ioc;
@@ -202591,7 +202588,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  }
  
  static int
-@@ -582,6 +646,7 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -582,6 +646,7 @@
        int ret;
        MPT_ADAPTER *iocp = NULL;
  
@@ -202599,7 +202596,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        if (copy_from_user(&khdr, uhdr, sizeof(khdr))) {
                printk(KERN_ERR MYNAM "%s::mptctl_ioctl() @%d - "
                                "Unable to copy mpt_ioctl_header data @ %p\n",
-@@ -596,17 +661,13 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -596,15 +661,11 @@
        iocnumX = khdr.iocnum & 0xFF;
        if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
            (iocp == NULL)) {
@@ -202610,18 +202607,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +                          "%s::%s @%d - ioc%d not found!\n",
 +                          __FILE__, __func__,  __LINE__, iocnumX);
                return -ENODEV;
-       }
+-      }
+-
 -      if (!iocp->active) {
 -              printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - Controller disabled.\n",
 -                              __FILE__, __LINE__);
 -              return -EFAULT;
--      }
--
+       }
        /* Handle those commands that are just returning
-        * information stored in the driver.
-        * These commands should never time out and are unaffected
-@@ -626,6 +687,25 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -626,6 +687,25 @@
                return mptctl_eventreport(arg);
        } else if (cmd == MPTFWREPLACE) {
                return mptctl_replace_fw(arg);
@@ -202647,7 +202642,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        }
  
        /* All of these commands require an interrupt or
-@@ -644,10 +724,61 @@ __mptctl_ioctl(struct file *file, unsign
+@@ -644,10 +724,61 @@
                ret = mptctl_hp_hostinfo(arg, _IOC_SIZE(cmd));
        else if (cmd == HP_GETTARGETINFO)
                ret = mptctl_hp_targetinfo(arg);
@@ -202710,7 +202705,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        return ret;
  }
-@@ -676,8 +807,10 @@ static int mptctl_do_reset(unsigned long
+@@ -676,8 +807,10 @@
        }
  
        if (mpt_verify_adapter(krinfo.hdr.iocnum, &iocp) < 0) {
@@ -202723,7 +202718,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV; /* (-6) No such device or address */
        }
  
-@@ -763,10 +896,12 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -763,10 +896,12 @@
        int                      sge_offset = 0;
        u16                      iocstat;
        pFWDownloadReply_t       ReplyMsg = NULL;
@@ -202738,7 +202733,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV; /* (-6) No such device or address */
        } else {
  
-@@ -847,7 +982,7 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -847,7 +982,7 @@
         *      64              4
         */
        maxfrags = (iocp->req_sz - sizeof(MPIHeader_t) - sizeof(FWDownloadTCSGE_t))
@@ -202747,7 +202742,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        if (numfrags > maxfrags) {
                ret = -EMLINK;
                goto fwdl_out;
-@@ -875,19 +1010,19 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -875,19 +1010,19 @@
                if (nib == 0 || nib == 3) {
                        ;
                } else if (sgIn->Address) {
@@ -202771,7 +202766,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        }
  
        DBG_DUMP_FW_DOWNLOAD(iocp, (u32 *)mf, numfrags);
-@@ -896,16 +1031,27 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -896,16 +1031,27 @@
         * Finally, perform firmware download.
         */
        ReplyMsg = NULL;
@@ -202783,10 +202778,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 -      ret = wait_event_timeout(mptctl_wait,
 -           iocp->ioctl->wait_done == 1,
 -           HZ*60);
--
--      if(ret <=0 && (iocp->ioctl->wait_done != 1 )) {
--      /* Now we need to reset the board */
--              mptctl_timeout_expired(iocp->ioctl);
 +      timeleft = wait_for_completion_timeout(&iocp->ioctl_cmds.done, HZ*60);
 +      if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
 +              ret = -ETIME;
@@ -202799,14 +202790,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +                      mptctl_timeout_expired(iocp, mf);
 +              goto fwdl_out;
 +      }
-+
+-      if(ret <=0 && (iocp->ioctl->wait_done != 1 )) {
+-      /* Now we need to reset the board */
+-              mptctl_timeout_expired(iocp->ioctl);
 +      if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
 +              printk(MYIOC_s_WARN_FMT "%s: failed\n", iocp->name, __func__);
 +              mpt_free_msg_frame(iocp, mf);
                ret = -ENODATA;
                goto fwdl_out;
        }
-@@ -913,31 +1059,36 @@ mptctl_do_fw_download(int ioc, char __us
+@@ -913,31 +1059,36 @@
        if (sgl)
                kfree_sgl(sgl, sgl_dma, buflist, iocp);
  
@@ -202851,7 +202845,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        return ret;
  }
  
-@@ -1008,7 +1159,7 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1008,7 +1159,7 @@
         *
         */
        sgl = sglbuf;
@@ -202860,7 +202854,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        while (bytes_allocd < bytes) {
                this_alloc = min(alloc_sz, bytes-bytes_allocd);
                buflist[buflist_ent].len = this_alloc;
-@@ -1019,9 +1170,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1019,9 +1170,9 @@
                        alloc_sz = alloc_sz / 2;
                        if (alloc_sz == 0) {
                                printk(MYIOC_s_WARN_FMT "-SG: No can do - "
@@ -202872,7 +202866,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                goto free_and_fail;
                        }
                        continue;
-@@ -1029,7 +1180,10 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1029,7 +1180,10 @@
                        dma_addr_t dma_addr;
  
                        bytes_allocd += this_alloc;
@@ -202884,7 +202878,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        dma_addr = pci_map_single(ioc->pcidev, buflist[buflist_ent].kptr, this_alloc, dir);
                        sgl->Address = dma_addr;
  
-@@ -1044,8 +1198,8 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1044,8 +1198,8 @@
  
                /* Need to chain? */
                if (fragcnt == sg_spill) {
@@ -202895,7 +202889,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        printk(MYIOC_s_WARN_FMT "(freeing %d frags)\n", ioc->name, numfrags);
                        goto free_and_fail;
                }
-@@ -1054,9 +1208,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
+@@ -1054,9 +1208,9 @@
                if (numfrags*8 > MAX_SGL_BYTES){
                        /* GRRRRR... */
                        printk(MYIOC_s_WARN_FMT "-SG: No can do - "
@@ -202907,7 +202901,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        goto free_and_fail;
                }
        }
-@@ -1213,8 +1367,10 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1213,8 +1367,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg->hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -202920,7 +202914,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                kfree(karg);
                return -ENODEV;
        }
-@@ -1222,8 +1378,8 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1222,8 +1378,8 @@
        /* Verify the data transfer size is correct. */
        if (karg->hdr.maxDataSize != data_size) {
                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_getiocinfo - "
@@ -202931,7 +202925,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                kfree(karg);
                return -EFAULT;
        }
-@@ -1275,6 +1431,8 @@ mptctl_getiocinfo (unsigned long arg, un
+@@ -1275,6 +1431,8 @@
        if (ioc->sh) {
                shost_for_each_device(sdev, ioc->sh) {
                        vdevice = sdev->hostdata;
@@ -202940,7 +202934,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        if (vdevice->vtarget->tflags &
                            MPT_TARGET_FLAGS_RAID_COMPONENT)
                                continue;
-@@ -1346,8 +1504,10 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1346,8 +1504,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -202953,7 +202947,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1362,8 +1522,9 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1362,8 +1522,9 @@
        port = karg.hdr.port;
  
        if (maxWordsLeft <= 0) {
@@ -202965,7 +202959,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENOMEM;
        }
  
-@@ -1383,8 +1544,9 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1383,8 +1544,9 @@
         */
        pmem = kzalloc(numBytes, GFP_KERNEL);
        if (!pmem) {
@@ -202977,7 +202971,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENOMEM;
        }
        pdata =  (int *) pmem;
-@@ -1396,6 +1558,8 @@ mptctl_gettargetinfo (unsigned long arg)
+@@ -1396,6 +1558,8 @@
                        if (!maxWordsLeft)
                                continue;
                        vdevice = sdev->hostdata;
@@ -202986,7 +202980,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                        if (vdevice->vtarget->tflags &
                            MPT_TARGET_FLAGS_RAID_COMPONENT)
                                continue;
-@@ -1460,8 +1624,10 @@ mptctl_readtest (unsigned long arg)
+@@ -1460,8 +1624,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -202999,7 +202993,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1521,8 +1687,10 @@ mptctl_eventquery (unsigned long arg)
+@@ -1521,8 +1687,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203012,7 +203006,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1560,8 +1728,10 @@ mptctl_eventenable (unsigned long arg)
+@@ -1560,8 +1728,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203025,7 +203019,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1574,7 +1744,7 @@ mptctl_eventenable (unsigned long arg)
+@@ -1574,7 +1744,7 @@
                ioc->events = kzalloc(sz, GFP_KERNEL);
                if (!ioc->events) {
                        printk(MYIOC_s_ERR_FMT
@@ -203034,7 +203028,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                            ioc->name);
                        return -ENOMEM;
                }
-@@ -1609,13 +1779,15 @@ mptctl_eventreport (unsigned long arg)
+@@ -1609,13 +1779,15 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203053,7 +203047,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        numBytes = karg.hdr.maxDataSize - sizeof(mpt_ioctl_header);
        maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
  
-@@ -1663,8 +1835,10 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1663,8 +1835,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203066,7 +203060,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1694,8 +1868,8 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1694,8 +1868,8 @@
         */
        if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) {
                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_replace_fw - "
@@ -203077,7 +203071,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                mpt_free_fw_memory(ioc);
                return -EFAULT;
        }
-@@ -1712,7 +1886,8 @@ mptctl_replace_fw (unsigned long arg)
+@@ -1712,7 +1886,8 @@
   *
   * Outputs:   None.
   * Return:    0 if successful
@@ -203087,7 +203081,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
   *            -EFAULT if data unavailable
   *            -ENODEV if no such device/adapter
   *            -ETIME  if timer expires
-@@ -1737,8 +1912,10 @@ mptctl_mpt_command (unsigned long arg)
+@@ -1737,8 +1912,10 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203100,7 +203094,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -1752,7 +1929,8 @@ mptctl_mpt_command (unsigned long arg)
+@@ -1752,7 +1929,8 @@
   *
   * Outputs:   None.
   * Return:    0 if successful
@@ -203110,7 +203104,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
   *            -EFAULT if data unavailable
   *            -ENODEV if no such device/adapter
   *            -ETIME  if timer expires
-@@ -1775,8 +1953,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1775,8 +1953,11 @@
        int             sz, rc = 0;
        int             msgContext;
        u16             req_idx;
@@ -203123,7 +203117,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        /* bufIn and bufOut are used for user to kernel space transfers
         */
-@@ -1785,28 +1966,29 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1785,28 +1966,29 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203136,16 +203130,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
 -      if (!ioc->ioctl) {
--              printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
--                      "No memory available during driver init.\n",
--                              __FILE__, __LINE__);
--              return -ENOMEM;
--      } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
 +
 +      spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
 +      if (ioc->ioc_reset_in_progress) {
 +              spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
                printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
+-                      "No memory available during driver init.\n",
+-                              __FILE__, __LINE__);
+-              return -ENOMEM;
+-      } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
+-              printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
 -                      "Busy with IOC Reset \n", __FILE__, __LINE__);
 +                      "Busy with diagnostic reset\n", __FILE__, __LINE__);
                return -EBUSY;
@@ -203164,7 +203158,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        if (sz > ioc->req_sz) {
                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
-@@ -1832,18 +2014,19 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1832,18 +2014,19 @@
                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
                        "Unable to read MF from mpt_ioctl_command struct @ %p\n",
                        ioc->name, __FILE__, __LINE__, mfPtr);
@@ -203187,7 +203181,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        case MPI_FUNCTION_IOC_FACTS:
        case MPI_FUNCTION_PORT_FACTS:
                karg.dataOutSize  = karg.dataInSize = 0;
-@@ -1898,7 +2081,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1898,7 +2081,7 @@
                        }
  
                        pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;
@@ -203196,7 +203190,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
  
                        /* verify that app has not requested
-@@ -1920,6 +2103,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1920,6 +2103,8 @@
                                struct scsi_target *starget = scsi_target(sdev);
                                VirtTarget *vtarget = starget->hostdata;
  
@@ -203205,7 +203199,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                if ((pScsiReq->TargetID == vtarget->id) &&
                                    (pScsiReq->Bus == vtarget->channel) &&
                                    (vtarget->tflags & MPT_TARGET_FLAGS_Q_YES))
-@@ -1940,9 +2125,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1940,9 +2125,6 @@
                        pScsiReq->Control = cpu_to_le32(scsidir | qtag);
                        pScsiReq->DataLength = cpu_to_le32(dataSize);
  
@@ -203215,7 +203209,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                } else {
                        printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
                                "SCSI driver is not loaded. \n",
-@@ -1955,7 +2137,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1955,7 +2137,7 @@
        case MPI_FUNCTION_SMP_PASSTHROUGH:
                /* Check mf->PassthruFlags to determine if
                 * transfer is ImmediateMode or not.
@@ -203224,7 +203218,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                 * Else, we are sending request and response data
                 * in two SGLs at the end of the mf.
                 */
-@@ -1984,7 +2166,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -1984,7 +2166,7 @@
                        int dataSize;
  
                        pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;
@@ -203233,7 +203227,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
  
                        /* verify that app has not requested
-@@ -2019,8 +2201,6 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2019,8 +2201,6 @@
                        pScsiReq->Control = cpu_to_le32(scsidir | qtag);
                        pScsiReq->DataLength = cpu_to_le32(dataSize);
  
@@ -203242,7 +203236,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                } else {
                        printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
                                "SCSI driver is not loaded. \n",
-@@ -2031,20 +2211,17 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2031,20 +2211,17 @@
                break;
  
        case MPI_FUNCTION_SCSI_TASK_MGMT:
@@ -203273,7 +203267,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        case MPI_FUNCTION_IOC_INIT:
                {
-@@ -2054,7 +2231,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2054,12 +2231,17 @@
                        /* Verify that all entries in the IOC INIT match
                         * existing setup (and in LE format).
                         */
@@ -203282,19 +203276,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                high_addr = cpu_to_le32((u32)((u64)ioc->req_frames_dma >> 32));
                                sense_high= cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32));
                        } else {
-@@ -2062,6 +2239,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+                               high_addr = 0;
                                sense_high= 0;
-                       }
++                      }
++
 +                      if (!pInit->MaxDevices && !pInit->MaxBuses) {
 +                              pInit->MaxDevices = ioc->facts.MaxDevices;
 +                              pInit->MaxBuses = ioc->facts.MaxBuses;
-+                      }
-+
+                       }
                        if ((pInit->Flags != 0) || (pInit->MaxDevices != ioc->facts.MaxDevices) ||
-                               (pInit->MaxBuses != ioc->facts.MaxBuses) ||
-                               (pInit->ReplyFrameSize != cpu_to_le16(ioc->reply_sz)) ||
-@@ -2102,7 +2284,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2102,7 +2284,7 @@
  
                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
                        "Illegal request (function 0x%x) \n",
@@ -203303,7 +203295,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                rc = -EFAULT;
                goto done_free_mem;
        }
-@@ -2126,10 +2308,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2126,10 +2308,9 @@
                /* Set up the dataOut memory allocation */
                if (karg.dataOutSize > 0) {
                        if (karg.dataInSize > 0) {
@@ -203316,7 +203308,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                                << MPI_SGE_FLAGS_SHIFT;
                        } else {
                                flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
-@@ -2146,8 +2327,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2146,8 +2327,8 @@
                                /* Set up this SGE.
                                 * Copy to MF and to sglbuf
                                 */
@@ -203327,7 +203319,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
                                /* Copy user data to kernel space.
                                 */
-@@ -2180,17 +2361,24 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2180,17 +2361,24 @@
                                /* Set up this SGE
                                 * Copy to MF and to sglbuf
                                 */
@@ -203356,7 +203348,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
                DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
  
-@@ -2198,53 +2386,58 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2198,53 +2386,58 @@
                    (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
                        mpt_put_msg_frame_hi_pri(mptctl_id, ioc, mf);
                else {
@@ -203410,10 +203402,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +              }
                goto done_free_mem;
        }
++
 +      if (function == MPI_FUNCTION_SCSI_TASK_MGMT)
 +              mutex_unlock(&ioc->taskmgmt_cmds.mutex);
-+
        mf = NULL;
  
        /* If a valid reply frame, copy to the user.
@@ -203437,7 +203429,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                 printk(MYIOC_s_ERR_FMT
                                     "%s@%d::mptctl_do_mpt_command - "
                                 "Unable to write out reply frame %p\n",
-@@ -2257,10 +2450,11 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2257,10 +2450,11 @@
  
        /* If valid sense data, copy to user.
         */
@@ -203451,7 +203443,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                                printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
                                "Unable to write sense data to user %p\n",
                                ioc->name, __FILE__, __LINE__,
-@@ -2274,9 +2468,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2274,9 +2468,8 @@
        /* If the overall status is _GOOD and data in, copy data
         * to user.
         */
@@ -203463,7 +203455,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                if (copy_to_user(karg.dataInBufPtr,
                                 bufIn.kptr, karg.dataInSize)) {
                        printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
-@@ -2289,9 +2482,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
+@@ -2289,9 +2482,8 @@
  
  done_free_mem:
  
@@ -203475,7 +203467,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        /* Free the allocated memory.
         */
-@@ -2320,7 +2512,8 @@ done_free_mem:
+@@ -2320,7 +2512,8 @@
   * Outputs:   None.
   * Return:    0 if successful
   *            -EFAULT if data unavailable
@@ -203485,7 +203477,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
   *            -ENODEV if no such device/adapter
   *            -ETIME  if timer expires
   *            -ENOMEM if memory allocation error
-@@ -2331,16 +2524,17 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2331,16 +2524,17 @@
        hp_host_info_t  __user *uarg = (void __user *) arg;
        MPT_ADAPTER             *ioc;
        struct pci_dev          *pdev;
@@ -203507,7 +203499,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        /* Reset long to int. Should affect IA64 and SPARC only
         */
-@@ -2360,13 +2554,15 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2360,13 +2554,15 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
            (ioc == NULL)) {
@@ -203526,7 +203518,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        /* Fill in the data and return the structure to the calling
         * program
         */
-@@ -2406,42 +2602,9 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2406,42 +2602,9 @@
        karg.fw_version[10] = (ioc->facts.FWVersion.Struct.Dev % 10 ) + '0';
        karg.fw_version[11] = '\0';
  
@@ -203571,7 +203563,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        case MPI_IOC_STATE_OPERATIONAL:
                karg.ioc_status =  HP_STATUS_OK;
                break;
-@@ -2468,12 +2631,12 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2468,12 +2631,12 @@
        karg.soft_resets = 0;
        karg.timeouts = 0;
        if (ioc->sh != NULL) {
@@ -203588,7 +203580,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                }
        }
  
-@@ -2483,15 +2646,17 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2483,15 +2646,17 @@
        if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
                dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
                    ioc->name,__func__));
@@ -203607,7 +203599,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ;
        IstwiRWRequest->NumAddressBytes = 0x01;
        IstwiRWRequest->DataLength = cpu_to_le16(0x04);
-@@ -2501,24 +2666,29 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2501,24 +2666,29 @@
                IstwiRWRequest->DeviceAddr = 0xB0;
  
        pbuf = pci_alloc_consistent(ioc->pcidev, 4, &buf_dma);
@@ -203651,7 +203643,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                goto out;
        }
  
-@@ -2531,10 +2701,13 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2531,10 +2701,13 @@
         *   bays have drives in them
         * pbuf[3] = Checksum (0x100 = (byte0 + byte2 + byte3)
         */
@@ -203666,7 +203658,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        if (pbuf)
                pci_free_consistent(ioc->pcidev, 4, pbuf, buf_dma);
  
-@@ -2547,7 +2720,7 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2547,7 +2720,7 @@
                return -EFAULT;
        }
  
@@ -203675,7 +203667,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
  }
  
-@@ -2557,7 +2730,8 @@ mptctl_hp_hostinfo(unsigned long arg, un
+@@ -2557,7 +2730,8 @@
   * Outputs:   None.
   * Return:    0 if successful
   *            -EFAULT if data unavailable
@@ -203685,7 +203677,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
   *            -ENODEV if no such device/adapter
   *            -ETIME  if timer expires
   *            -ENOMEM if memory allocation error
-@@ -2587,13 +2761,16 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2587,13 +2761,16 @@
  
        if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
                (ioc == NULL)) {
@@ -203698,15 +203690,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
 -      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_hp_targetinfo called.\n",
--          ioc->name));
++
 +      dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +              ": mptctl_hp_targetinfo called.\n",
-+          ioc->name));
+           ioc->name));
+-
        /*  There is nothing to do for FCP parts.
         */
        if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))
-@@ -2685,7 +2862,7 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2685,7 +2862,7 @@
                        pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma);
                }
        }
@@ -203715,7 +203707,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        if (hd != NULL)
                karg.select_timeouts = hd->sel_timeout[karg.hdr.id];
  
-@@ -2703,7 +2880,7 @@ mptctl_hp_targetinfo(unsigned long arg)
+@@ -2703,7 +2880,7 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
@@ -203724,7 +203716,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        .owner =        THIS_MODULE,
        .llseek =       no_llseek,
        .release =      mptctl_release,
-@@ -2743,8 +2920,10 @@ compat_mptfwxfer_ioctl(struct file *filp
+@@ -2743,8 +2920,10 @@
        iocnumX = kfw32.iocnum & 0xFF;
        if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
            (iocp == NULL)) {
@@ -203737,7 +203729,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -2759,7 +2938,7 @@ compat_mptfwxfer_ioctl(struct file *filp
+@@ -2759,7 +2938,7 @@
  
        ret = mptctl_do_fw_download(kfw.iocnum, kfw.bufp, kfw.fwlen);
  
@@ -203746,7 +203738,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        return ret;
  }
-@@ -2783,8 +2962,10 @@ compat_mpt_command(struct file *filp, un
+@@ -2783,8 +2962,10 @@
        iocnumX = karg32.hdr.iocnum & 0xFF;
        if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
            (iocp == NULL)) {
@@ -203759,7 +203751,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
                return -ENODEV;
        }
  
-@@ -2813,7 +2994,7 @@ compat_mpt_command(struct file *filp, un
+@@ -2813,7 +2994,7 @@
         */
        ret = mptctl_do_mpt_command (karg, &uarg->MF);
  
@@ -203768,7 +203760,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  
        return ret;
  }
-@@ -2833,6 +3014,31 @@ static long compat_mpctl_ioctl(struct fi
+@@ -2833,6 +3014,31 @@
        case MPTHARDRESET:
        case HP_GETHOSTINFO:
        case HP_GETTARGETINFO:
@@ -203800,7 +203792,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        case MPTTEST:
                ret = __mptctl_ioctl(f, cmd, arg);
                break;
-@@ -2865,21 +3071,11 @@ static long compat_mpctl_ioctl(struct fi
+@@ -2865,21 +3071,11 @@
  static int
  mptctl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  {
@@ -203824,7 +203816,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        return 0;
  }
  
-@@ -2893,9 +3089,22 @@ mptctl_probe(struct pci_dev *pdev, const
+@@ -2893,9 +3089,22 @@
  static void
  mptctl_remove(struct pci_dev *pdev)
  {
@@ -203848,7 +203840,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
  }
  
  static struct mpt_pci_driver mptctl_driver = {
-@@ -2935,6 +3144,7 @@ static int __init mptctl_init(void)
+@@ -2935,6 +3144,7 @@
                goto out_fail;
        }
  
@@ -203856,7 +203848,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
        mpt_reset_register(mptctl_id, mptctl_ioc_reset);
        mpt_event_register(mptctl_id, mptctl_event_process);
  
-@@ -2956,15 +3166,23 @@ static void mptctl_exit(void)
+@@ -2956,15 +3166,23 @@
  
        /* De-register reset handler from base module */
        mpt_reset_deregister(mptctl_id);
@@ -203881,9 +203873,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.c linux-2.6.27.19-5.1/driv
 +
  module_init(mptctl_init);
  module_exit(mptctl_exit);
-diff -purN linux-2.6.27/drivers/message/fusion/mptctl.h linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.h
---- linux-2.6.27/drivers/message/fusion/mptctl.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptctl.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptctl.h
+--- a/drivers/message/fusion/mptctl.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptctl.h  Wed May 06 16:56:21 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - *  linux/drivers/message/fusion/mptioctl.h
@@ -203891,7 +203883,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.h linux-2.6.27.19-5.1/driv
   *      Fusion MPT misc device (ioctl) driver.
   *      For use with PCI chip/adapter(s):
   *          LSIFC9xx/LSI409xx Fibre Channel
-@@ -460,8 +460,5 @@ typedef struct _hp_target_info {
+@@ -460,8 +460,5 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
@@ -203900,9 +203892,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptctl.h linux-2.6.27.19-5.1/driv
 -
  #endif
  
-diff -purN linux-2.6.27/drivers/message/fusion/mptdebug.h linux-2.6.27.19-5.1/drivers/message/fusion/mptdebug.h
---- linux-2.6.27/drivers/message/fusion/mptdebug.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptdebug.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptdebug.h
+--- a/drivers/message/fusion/mptdebug.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptdebug.h        Wed May 06 16:56:21 2009 +0100
 @@ -17,6 +17,10 @@
   *
   * Example:  (programming for MPT_DEBUG_EVENTS on host 5)
@@ -203946,9 +203938,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptdebug.h linux-2.6.27.19-5.1/dr
  
  /*
   * Verbose logging
-diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drivers/message/fusion/mptfc.c
---- linux-2.6.27/drivers/message/fusion/mptfc.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptfc.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptfc.c
+--- a/drivers/message/fusion/mptfc.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptfc.c   Wed May 06 16:56:21 2009 +0100
 @@ -43,6 +43,7 @@
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
@@ -203968,10 +203960,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
  #include <scsi/scsi.h>
  #include <scsi/scsi_cmnd.h>
-@@ -84,6 +87,14 @@ MODULE_PARM_DESC(mptfc_dev_loss_tmo, " I
+@@ -83,6 +86,14 @@
+                                    " transport to wait for an rport to "
                                     " return following a device loss event."
                                     "  Default=60.");
++
 +static int mpt_sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
 +static int mptfc_set_sdev_queue_depth(const char *val, struct kernel_param *kp);
 +module_param_call(mpt_sdev_queue_depth, mptfc_set_sdev_queue_depth,
@@ -203979,11 +203972,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
 +MODULE_PARM_DESC(mpt_sdev_queue_depth,
 +    " Max Device Queue Depth (default="
 +    __MODULE_STRING(MPT_SCSI_CMD_PER_DEV_HIGH) ")");
-+
  /* scsi-mid layer global parmeter is max_report_luns, which is 511 */
  #define MPTFC_MAX_LUN (16895)
- static int max_lun = MPTFC_MAX_LUN;
-@@ -183,6 +194,34 @@ static struct fc_function_template mptfc
+@@ -183,6 +194,34 @@
        .show_host_symbolic_name = 1,
  };
  
@@ -204018,7 +204010,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  static int
  mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
                          int (*func)(struct scsi_cmnd *SCpnt),
-@@ -194,7 +233,7 @@ mptfc_block_error_handler(struct scsi_cm
+@@ -194,7 +233,7 @@
        struct fc_rport         *rport = starget_to_rport(scsi_target(sdev));
        unsigned long           flags;
        int                     ready;
@@ -204027,7 +204019,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        hd = shost_priv(SCpnt->device->host);
        ioc = hd->ioc;
-@@ -476,6 +515,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int
+@@ -476,6 +515,7 @@
                                if (vtarget) {
                                        vtarget->id = pg0->CurrentTargetID;
                                        vtarget->channel = pg0->CurrentBus;
@@ -204035,7 +204027,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
                                }
                        }
                        *((struct mptfc_rport_info **)rport->dd_data) = ri;
-@@ -560,6 +600,7 @@ mptfc_target_alloc(struct scsi_target *s
+@@ -560,6 +600,7 @@
  
        return rc;
  }
@@ -204043,7 +204035,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  /*
   *    mptfc_dump_lun_info
   *    @ioc
-@@ -589,7 +630,6 @@ mptfc_dump_lun_info(MPT_ADAPTER *ioc, st
+@@ -589,7 +630,6 @@
                (unsigned long long)nn));
  }
  
@@ -204051,7 +204043,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  /*
   *    OS entry point to allow host driver to alloc memory
   *    for each scsi device. Called once per device the bus scan.
-@@ -604,7 +644,7 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -604,7 +644,7 @@
        VirtDevice              *vdevice;
        struct scsi_target      *starget;
        struct fc_rport         *rport;
@@ -204060,7 +204052,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        starget = scsi_target(sdev);
        rport = starget_to_rport(starget);
-@@ -614,11 +654,10 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -614,11 +654,10 @@
  
        hd = shost_priv(sdev->host);
        ioc = hd->ioc;
@@ -204073,7 +204065,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
                return -ENOMEM;
        }
  
-@@ -635,10 +674,7 @@ mptfc_slave_alloc(struct scsi_device *sd
+@@ -635,10 +674,7 @@
        vdevice->lun = sdev->lun;
  
        vtarget->num_luns++;
@@ -204084,7 +204076,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        return 0;
  }
  
-@@ -944,11 +980,12 @@ start_over:
+@@ -944,11 +980,12 @@
        return rc;
  }
  
@@ -204098,7 +204090,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        #define MPTFC_FW_DEVICE_TIMEOUT (1)
        #define MPTFC_FW_IO_PEND_TIMEOUT (1)
-@@ -956,8 +993,9 @@ mptfc_SetFcPortPage1_defaults(MPT_ADAPTE
+@@ -956,8 +993,9 @@
        #define OFF_FLAGS (MPI_FCPORTPAGE1_FLAGS_VERBOSE_RESCAN_EVENTS)
  
        for (ii=0; ii<ioc->facts.NumberOfPorts; ii++) {
@@ -204110,7 +204102,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
                pp1 = ioc->fc_data.fc_port_page1[ii].data;
                if ((pp1->InitiatorDeviceTimeout == MPTFC_FW_DEVICE_TIMEOUT)
                 && (pp1->InitiatorIoPendTimeout == MPTFC_FW_IO_PEND_TIMEOUT)
-@@ -968,8 +1006,11 @@ mptfc_SetFcPortPage1_defaults(MPT_ADAPTE
+@@ -968,8 +1006,11 @@
                pp1->InitiatorIoPendTimeout = MPTFC_FW_IO_PEND_TIMEOUT;
                pp1->Flags &= ~OFF_FLAGS;
                pp1->Flags |= ON_FLAGS;
@@ -204123,7 +204115,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  }
  
  
-@@ -1082,10 +1123,13 @@ mptfc_link_status_change(struct work_str
+@@ -1082,10 +1123,13 @@
  static void
  mptfc_setup_reset(struct work_struct *work)
  {
@@ -204138,7 +204130,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        /* reset about to happen, delete (block) all rports */
        list_for_each_entry(ri, &ioc->fc_rports, list) {
-@@ -1093,6 +1137,12 @@ mptfc_setup_reset(struct work_struct *wo
+@@ -1093,6 +1137,12 @@
                        ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED;
                        fc_remote_port_delete(ri->rport);       /* won't sleep */
                        ri->rport = NULL;
@@ -204151,7 +204143,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
                        pn = (u64)ri->pg0.WWPN.High << 32 |
                             (u64)ri->pg0.WWPN.Low;
-@@ -1111,8 +1161,23 @@ mptfc_rescan_devices(struct work_struct 
+@@ -1111,8 +1161,23 @@
        MPT_ADAPTER             *ioc =
                container_of(work, MPT_ADAPTER, fc_rescan_work);
        int                     ii;
@@ -204175,7 +204167,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        /* start by tagging all ports as missing */
        list_for_each_entry(ri, &ioc->fc_rports, list) {
-@@ -1140,6 +1205,12 @@ mptfc_rescan_devices(struct work_struct 
+@@ -1140,6 +1205,12 @@
                                       MPT_RPORT_INFO_FLAGS_MISSING);
                        fc_remote_port_delete(ri->rport);       /* won't sleep */
                        ri->rport = NULL;
@@ -204188,7 +204180,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
                        pn = (u64)ri->pg0.WWPN.High << 32 |
                             (u64)ri->pg0.WWPN.Low;
-@@ -1238,6 +1309,10 @@ mptfc_probe(struct pci_dev *pdev, const 
+@@ -1238,6 +1309,10 @@
        sh->max_id = ioc->pfacts->MaxDevices;
        sh->max_lun = max_lun;
  
@@ -204199,7 +204191,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        /* Required entry.
         */
        sh->unique_id = ioc->id;
-@@ -1251,17 +1326,15 @@ mptfc_probe(struct pci_dev *pdev, const 
+@@ -1251,17 +1326,15 @@
         * A slightly different algorithm is required for
         * 64bit SGEs.
         */
@@ -204221,7 +204213,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        }
  
        if (numSGE < sh->sg_tablesize) {
-@@ -1290,30 +1363,6 @@ mptfc_probe(struct pci_dev *pdev, const 
+@@ -1290,30 +1363,6 @@
        dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
                 ioc->name, ioc->ScsiLookup));
  
@@ -204252,7 +204244,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        hd->last_queue_full = 0;
  
        sh->transportt = mptfc_transport_template;
-@@ -1326,8 +1375,9 @@ mptfc_probe(struct pci_dev *pdev, const 
+@@ -1326,8 +1375,9 @@
  
        /* initialize workqueue */
  
@@ -204264,7 +204256,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        ioc->fc_rescan_work_q =
                create_singlethread_workqueue(ioc->fc_rescan_work_q_name);
        if (!ioc->fc_rescan_work_q)
-@@ -1340,7 +1390,6 @@ mptfc_probe(struct pci_dev *pdev, const 
+@@ -1340,7 +1390,6 @@
        for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) {
                (void) mptfc_GetFcPortPage0(ioc, ii);
        }
@@ -204272,7 +204264,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
  
        /*
         * scan for rports -
-@@ -1378,9 +1427,6 @@ mptfc_event_process(MPT_ADAPTER *ioc, Ev
+@@ -1378,9 +1427,6 @@
        unsigned long flags;
        int rc=1;
  
@@ -204282,7 +204274,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        if (ioc->sh == NULL ||
                ((hd = shost_priv(ioc->sh)) == NULL))
                return 1;
-@@ -1416,35 +1462,36 @@ mptfc_ioc_reset(MPT_ADAPTER *ioc, int re
+@@ -1416,35 +1462,36 @@
        unsigned long   flags;
  
        rc = mptscsih_ioc_reset(ioc,reset_phase);
@@ -204334,7 +204326,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        }
        return 1;
  }
-@@ -1543,7 +1590,6 @@ mptfc_exit(void)
+@@ -1543,7 +1590,6 @@
  
        mpt_reset_deregister(mptfcDoneCtx);
        mpt_event_deregister(mptfcDoneCtx);
@@ -204342,9 +204334,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptfc.c linux-2.6.27.19-5.1/drive
        mpt_deregister(mptfcInternalCtx);
        mpt_deregister(mptfcTaskCtx);
        mpt_deregister(mptfcDoneCtx);
-diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.c
---- linux-2.6.27/drivers/message/fusion/mptlan.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptlan.c
+--- a/drivers/message/fusion/mptlan.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptlan.c  Wed May 06 16:56:21 2009 +0100
 @@ -6,7 +6,6 @@
   *
   *  Copyright (c) 2000-2008 LSI Corporation
@@ -204353,7 +204345,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
   */
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /*
-@@ -165,6 +164,11 @@ DEFINE_RWLOCK(bad_naa_lock);
+@@ -165,6 +164,11 @@
  #endif
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -204365,7 +204357,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
  /**
   *    lan_reply - Handle all data sent from the hardware.
   *    @ioc: Pointer to MPT_ADAPTER structure
-@@ -190,8 +194,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
+@@ -190,8 +194,7 @@
                u32 tmsg = CAST_PTR_TO_U32(reply);
  
                dioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n",
@@ -204375,7 +204367,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
  
                switch (GET_LAN_FORM(tmsg)) {
  
-@@ -440,6 +443,7 @@ mpt_lan_open(struct net_device *dev)
+@@ -440,6 +443,7 @@
        dlprintk((KERN_INFO MYNAM "/lo: Finished initializing RcvCtl\n"));
  
        mpt_lan_post_receive_buckets(priv);
@@ -204383,7 +204375,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
        printk(KERN_INFO MYNAM ": %s/%s: interface up & active\n",
                        IOC_AND_NETDEV_NAMES_s_s(dev));
  
-@@ -780,6 +784,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -780,6 +784,7 @@
  //                    ctx, skb, skb->data));
  
        mac = skb_mac_header(skb);
@@ -204391,7 +204383,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
  #ifdef QLOGIC_NAA_WORKAROUND
  {
        struct NAA_Hosed *nh;
-@@ -805,6 +810,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -805,6 +810,7 @@
  }
  #endif
  
@@ -204399,7 +204391,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
        pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa         << 16) |
                                                    (mac[0] <<  8) |
                                                    (mac[1] <<  0));
-@@ -828,7 +834,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
+@@ -828,7 +834,7 @@
                          MPI_SGE_FLAGS_END_OF_LIST) << MPI_SGE_FLAGS_SHIFT) |
                        skb->len);
        pSimple->Address.Low = cpu_to_le32((u32) dma);
@@ -204408,7 +204400,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
                pSimple->Address.High = cpu_to_le32((u32) ((u64) dma >> 32));
        else
                pSimple->Address.High = 0;
-@@ -1117,7 +1123,6 @@ mpt_lan_receive_post_reply(struct net_de
+@@ -1117,7 +1123,6 @@
                                            PCI_DMA_FROMDEVICE);
  
                skb_copy_from_linear_data(old_skb, skb_put(skb, len), len);
@@ -204416,7 +204408,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
                pci_dma_sync_single_for_device(mpt_dev->pcidev,
                                               priv->RcvCtl[ctx].dma,
                                               priv->RcvCtl[ctx].len,
-@@ -1295,7 +1300,7 @@ mpt_lan_post_receive_buckets(struct mpt_
+@@ -1295,7 +1300,7 @@
                                  MPI_SGE_FLAGS_SIMPLE_ELEMENT |
                                  MPI_SGE_FLAGS_64_BIT_ADDRESSING) << MPI_SGE_FLAGS_SHIFT) | len);
                        pSimple->Address.Low = cpu_to_le32((u32) priv->RcvCtl[ctx].dma);
@@ -204425,7 +204417,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
                                pSimple->Address.High = cpu_to_le32((u32) ((u64) priv->RcvCtl[ctx].dma >> 32));
                        else
                                pSimple->Address.High = 0;
-@@ -1340,18 +1345,17 @@ static void
+@@ -1340,18 +1345,17 @@
  mpt_lan_post_receive_buckets_work(struct work_struct *work)
  {
        mpt_lan_post_receive_buckets(container_of(work, struct mpt_lan_priv,
@@ -204447,7 +204439,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
        if (!dev)
                return NULL;
  
-@@ -1363,8 +1367,9 @@ mpt_register_lan_device (MPT_ADAPTER *mp
+@@ -1363,8 +1367,9 @@
        priv->mpt_dev = mpt_dev;
        priv->pnum = pnum;
  
@@ -204458,26 +204450,26 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.c linux-2.6.27.19-5.1/driv
        priv->post_buckets_active = 0;
  
        dlprintk((KERN_INFO MYNAM "@%d: bucketlen = %d\n",
-@@ -1387,6 +1392,8 @@ mpt_register_lan_device (MPT_ADAPTER *mp
+@@ -1386,6 +1391,8 @@
+       priv->bucketthresh = priv->max_buckets_out * 2 / 3;
        spin_lock_init(&priv->txfidx_lock);
        spin_lock_init(&priv->rxfidx_lock);
-+      memset(&priv->stats, 0, sizeof(priv->stats));
 +
++      memset(&priv->stats, 0, sizeof(priv->stats));
        /*  Grab pre-fetched LANPage1 stuff. :-) */
        a = (u8 *) &mpt_dev->lan_cnfg_page1.HardwareAddressLow;
+@@ -1420,6 +1427,7 @@
  
-@@ -1421,6 +1428,7 @@ mpt_register_lan_device (MPT_ADAPTER *mp
        dlprintk((KERN_INFO MYNAM ": Finished registering dev "
                "and setting initial values\n"));
 +
        if (register_netdev(dev) != 0) {
                free_netdev(dev);
-               dev = NULL;
-diff -purN linux-2.6.27/drivers/message/fusion/mptlan.h linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.h
---- linux-2.6.27/drivers/message/fusion/mptlan.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptlan.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptlan.h
+--- a/drivers/message/fusion/mptlan.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptlan.h  Wed May 06 16:56:21 2009 +0100
 @@ -6,7 +6,6 @@
   *
   *  Copyright (c) 2000-2008 LSI Corporation
@@ -204502,9 +204494,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptlan.h linux-2.6.27.19-5.1/driv
  
      /* Override mptbase.h by pre-defining these! */
  #define MODULEAUTHOR  "LSI Corporation"
-diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.c
---- linux-2.6.27/drivers/message/fusion/mptsas.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptsas.c
+--- a/drivers/message/fusion/mptsas.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptsas.c  Wed May 06 16:56:21 2009 +0100
 @@ -47,9 +47,11 @@
  #include <linux/kernel.h>
  #include <linux/init.h>
@@ -204526,16 +204518,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  #define my_NAME               "Fusion MPT SAS Host driver"
  #define my_VERSION    MPT_LINUX_VERSION_COMMON
  #define MYNAM         "mptsas"
-@@ -72,6 +73,8 @@
+@@ -71,6 +72,8 @@
+  * Reserved channel for integrated raid
   */
  #define MPTSAS_RAID_CHANNEL   1
-+#define SAS_CONFIG_PAGE_TIMEOUT               30
 +
++#define SAS_CONFIG_PAGE_TIMEOUT               30
  MODULE_AUTHOR(MODULEAUTHOR);
  MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
-@@ -83,6 +86,25 @@ MODULE_PARM_DESC(mpt_pt_clear,
+@@ -83,6 +86,25 @@
                " Clear persistency table: enable=1  "
                "(default=MPTSCSIH_PT_CLEAR=0)");
  
@@ -204561,10 +204553,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  /* scsi-mid layer global parmeter is max_report_luns, which is 511 */
  #define MPTSAS_MAX_LUN (16895)
  static int max_lun = MPTSAS_MAX_LUN;
-@@ -93,8 +115,57 @@ static u8  mptsasDoneCtx = MPT_MAX_PROTOC
+@@ -93,8 +115,57 @@
  static u8     mptsasTaskCtx = MPT_MAX_PROTOCOL_DRIVERS;
  static u8     mptsasInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */
  static u8     mptsasMgmtCtx = MPT_MAX_PROTOCOL_DRIVERS;
+-
+-static void mptsas_hotplug_work(struct work_struct *work);
 +static u8     mptsasDeviceResetCtx = MPT_MAX_PROTOCOL_DRIVERS;
 +
 +static inline void mptsas_set_rphy(MPT_ADAPTER *ioc,
@@ -204603,8 +204597,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      int ret = param_set_int(val, kp);
 +      MPT_ADAPTER *ioc;
 +      struct scsi_device      *sdev;
--static void mptsas_hotplug_work(struct work_struct *work);
++
 +      if (ret)
 +              return ret;
 +
@@ -204620,7 +204613,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
  static void mptsas_print_phy_data(MPT_ADAPTER *ioc,
                                        MPI_SAS_IO_UNIT0_PHY_DATA *phy_data)
-@@ -218,37 +289,184 @@ static void mptsas_print_expander_pg1(MP
+@@ -218,37 +289,184 @@
            le16_to_cpu(pg1->AttachedDevHandle)));
  }
  
@@ -204774,23 +204767,33 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + **/
  static struct mptsas_portinfo *
 -mptsas_get_hba_portinfo(MPT_ADAPTER *ioc)
-+mptsas_find_portinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
- {
+-{
 -      struct list_head        *head = &ioc->sas_topology;
 -      struct mptsas_portinfo  *pi = NULL;
 -
 -      /* always the first entry on sas_topology list */
-+      struct mptsas_portinfo *port_info, *rc = NULL;
-+      int i;
+-
 -      if (!list_empty(head))
 -              pi = list_entry(head->next, struct mptsas_portinfo, list);
+-
+-      return pi;
+-}
+-
+-/*
+- * mptsas_find_portinfo_by_handle
+- *
+- * This function should be called with the sas_topology_mutex already held
+- */
++mptsas_find_portinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
++{
++      struct mptsas_portinfo *port_info, *rc = NULL;
++      int i;
++
 +      if (sas_address >= ioc->hba_port_sas_addr &&
 +          sas_address < (ioc->hba_port_sas_addr +
 +          ioc->hba_port_num_phy))
 +              return ioc->hba_port_info;
--      return pi;
++
 +      mutex_lock(&ioc->sas_topology_mutex);
 +      list_for_each_entry(port_info, &ioc->sas_topology, list)
 +              for (i = 0; i < port_info->num_phys; i++)
@@ -204802,24 +204805,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + out:
 +      mutex_unlock(&ioc->sas_topology_mutex);
 +      return rc;
- }
--/*
-- * mptsas_find_portinfo_by_handle
++}
++
 +/**
 + *    mptsas_find_portinfo_by_handle -
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @handle:
-  *
-- * This function should be called with the sas_topology_mutex already held
-- */
++ *
 + *    This function should be called with the sas_topology_mutex already held
 + *
 + **/
  static struct mptsas_portinfo *
  mptsas_find_portinfo_by_handle(MPT_ADAPTER *ioc, u16 handle)
  {
-@@ -265,9 +483,12 @@ mptsas_find_portinfo_by_handle(MPT_ADAPT
+@@ -265,9 +483,12 @@
        return rc;
  }
  
@@ -204835,7 +204834,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline int
  mptsas_is_end_device(struct mptsas_devinfo * attached)
  {
-@@ -285,7 +506,14 @@ mptsas_is_end_device(struct mptsas_devin
+@@ -285,7 +506,14 @@
                return 0;
  }
  
@@ -204851,7 +204850,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static void
  mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details)
  {
-@@ -308,11 +536,17 @@ mptsas_port_delete(MPT_ADAPTER *ioc, str
+@@ -308,11 +536,17 @@
                if(phy_info->port_details != port_details)
                        continue;
                memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
@@ -204869,7 +204868,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline struct sas_rphy *
  mptsas_get_rphy(struct mptsas_phyinfo *phy_info)
  {
-@@ -322,13 +556,20 @@ mptsas_get_rphy(struct mptsas_phyinfo *p
+@@ -322,13 +556,20 @@
                return NULL;
  }
  
@@ -204892,7 +204891,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        }
  
        if (rphy) {
-@@ -339,6 +580,11 @@ mptsas_set_rphy(MPT_ADAPTER *ioc, struct
+@@ -339,6 +580,11 @@
        }
  }
  
@@ -204904,7 +204903,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline struct sas_port *
  mptsas_get_port(struct mptsas_phyinfo *phy_info)
  {
-@@ -348,6 +594,13 @@ mptsas_get_port(struct mptsas_phyinfo *p
+@@ -348,6 +594,13 @@
                return NULL;
  }
  
@@ -204918,7 +204917,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline void
  mptsas_set_port(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_port *port)
  {
-@@ -362,6 +615,11 @@ mptsas_set_port(MPT_ADAPTER *ioc, struct
+@@ -362,6 +615,11 @@
        }
  }
  
@@ -204930,7 +204929,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline struct scsi_target *
  mptsas_get_starget(struct mptsas_phyinfo *phy_info)
  {
-@@ -371,6 +629,12 @@ mptsas_get_starget(struct mptsas_phyinfo
+@@ -371,6 +629,12 @@
                return NULL;
  }
  
@@ -204943,13 +204942,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static inline void
  mptsas_set_starget(struct mptsas_phyinfo *phy_info, struct scsi_target *
  starget)
-@@ -379,398 +643,757 @@ starget)
+@@ -379,17 +643,297 @@
                phy_info->port_details->starget = starget;
  }
  
 -
 -/*
 - * mptsas_setup_wide_ports
+- *
+- * Updates for new and existing narrow/wide port configuration
+- * in the sas_topology
 +/**
 + *    mptsas_add_device_component -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -204957,48 +204959,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + *    @id:
 + *    @sas_address:
 + *    @device_info:
-  *
-- * Updates for new and existing narrow/wide port configuration
-- * in the sas_topology
-- */
++ *
 + **/
- static void
--mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
++static void
 +mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id,
 +      u64 sas_address, u32 device_info, u16 slot, u64 enclosure_logical_id)
- {
--      struct mptsas_portinfo_details * port_details;
--      struct mptsas_phyinfo *phy_info, *phy_info_cmp;
--      u64     sas_address;
--      int     i, j;
--
--      mutex_lock(&ioc->sas_topology_mutex);
++{
 +      struct sas_device_info  *sas_info, *next;
 +      struct scsi_device      *sdev;
 +      struct scsi_target      *starget;
 +      struct sas_rphy         *rphy;
--      phy_info = port_info->phy_info;
--      for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
--              if (phy_info->attached.handle)
--                      continue;
--              port_details = phy_info->port_details;
--              if (!port_details)
--                      continue;
--              if (port_details->num_phys < 2)
--                      continue;
--              /*
--               * Removing a phy from a port, letting the last
--               * phy be removed by firmware events.
--               */
--              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--                  "%s: [%p]: deleting phy = %d\n",
--                  ioc->name, __func__, port_details, i));
--              port_details->num_phys--;
--              port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
--              memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
--              sas_port_delete_phy(port_details->port, phy_info->phy);
--              phy_info->port_details = NULL;
++
 +      /*
 +       * Delete all matching devices out of the list
 +       */
@@ -205012,81 +204983,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      list_del(&sas_info->list);
 +                      kfree(sas_info);
 +              }
-       }
++      }
++
 +      if (!(sas_info = kzalloc(sizeof(struct sas_device_info), GFP_KERNEL)))
 +              goto out;
 +
-       /*
--       * Populate and refresh the tree
++      /*
 +       * Set Firmware mapping
-        */
--      phy_info = port_info->phy_info;
--      for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
--              sas_address = phy_info->attached.sas_address;
--              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "phy_id=%d sas_address=0x%018llX\n",
--                  ioc->name, i, (unsigned long long)sas_address));
--              if (!sas_address)
--                      continue;
--              port_details = phy_info->port_details;
--              /*
--               * Forming a port
--               */
--              if (!port_details) {
--                      port_details = kzalloc(sizeof(*port_details),
--                              GFP_KERNEL);
--                      if (!port_details)
--                              goto out;
--                      port_details->num_phys = 1;
--                      port_details->port_info = port_info;
--                      if (phy_info->phy_id < 64 )
--                              port_details->phy_bitmask |=
--                                  (1 << phy_info->phy_id);
--                      phy_info->sas_port_add_phy=1;
--                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tForming port\n\t\t"
--                          "phy_id=%d sas_address=0x%018llX\n",
--                          ioc->name, i, (unsigned long long)sas_address));
--                      phy_info->port_details = port_details;
--              }
++       */
 +      sas_info->fw.id = id;
 +      sas_info->fw.channel = channel;
--              if (i == port_info->num_phys - 1)
--                      continue;
--              phy_info_cmp = &port_info->phy_info[i + 1];
--              for (j = i + 1 ; j < port_info->num_phys ; j++,
--                  phy_info_cmp++) {
--                      if (!phy_info_cmp->attached.sas_address)
--                              continue;
--                      if (sas_address != phy_info_cmp->attached.sas_address)
--                              continue;
--                      if (phy_info_cmp->port_details == port_details )
--                              continue;
--                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--                          "\t\tphy_id=%d sas_address=0x%018llX\n",
--                          ioc->name, j, (unsigned long long)
--                          phy_info_cmp->attached.sas_address));
--                      if (phy_info_cmp->port_details) {
--                              port_details->rphy =
--                                  mptsas_get_rphy(phy_info_cmp);
--                              port_details->port =
--                                  mptsas_get_port(phy_info_cmp);
--                              port_details->starget =
--                                  mptsas_get_starget(phy_info_cmp);
--                              port_details->num_phys =
--                                      phy_info_cmp->port_details->num_phys;
--                              if (!phy_info_cmp->port_details->num_phys)
--                                      kfree(phy_info_cmp->port_details);
--                      } else
--                              phy_info_cmp->sas_port_add_phy=1;
--                      /*
--                       * Adding a phy to a port
--                       */
--                      phy_info_cmp->port_details = port_details;
--                      if (phy_info_cmp->phy_id < 64 )
--                              port_details->phy_bitmask |=
--                              (1 << phy_info_cmp->phy_id);
--                      port_details->num_phys++;
++
 +      sas_info->sas_address = sas_address;
 +      sas_info->device_info = device_info;
 +      sas_info->slot = slot;
@@ -205103,61 +205010,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              if (rphy->identify.sas_address == sas_address) {
 +                      sas_info->os.id = starget->id;
 +                      sas_info->os.channel = starget->channel;
-               }
-       }
-  out:
--
--      for (i = 0; i < port_info->num_phys; i++) {
--              port_details = port_info->phy_info[i].port_details;
--              if (!port_details)
--                      continue;
--              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--                  "%s: [%p]: phy_id=%02d num_phys=%02d "
--                  "bitmask=0x%016llX\n", ioc->name, __func__,
--                  port_details, i, port_details->num_phys,
--                  (unsigned long long)port_details->phy_bitmask));
--              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n",
--                  ioc->name, port_details->port, port_details->rphy));
--      }
--      dsaswideprintk(ioc, printk("\n"));
--      mutex_unlock(&ioc->sas_topology_mutex);
++              }
++      }
++
++ out:
 +      mutex_unlock(&ioc->sas_device_info_mutex);
 +      return;
- }
- /**
-- * csmisas_find_vtarget
-- *
-- * @ioc
-- * @volume_id
-- * @volume_bus
++}
++
++/**
 + *    mptsas_add_device_component_by_fw -
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @channel:  fw mapped id's
 + *    @id:
-  *
-  **/
--static VirtTarget *
--mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id)
++ *
++ **/
 +static void
 +mptsas_add_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id)
- {
--      struct scsi_device              *sdev;
--      VirtDevice                      *vdevice;
--      VirtTarget                      *vtarget = NULL;
++{
 +      struct mptsas_devinfo sas_device;
 +      struct mptsas_enclosure enclosure_info;
 +      int rc;
--      shost_for_each_device(sdev, ioc->sh) {
--              if ((vdevice = sdev->hostdata) == NULL)
--                      continue;
--              if (vdevice->vtarget->id == id &&
--                  vdevice->vtarget->channel == channel)
--                      vtarget = vdevice->vtarget;
--      }
--      return vtarget;
++
 +      rc = mptsas_sas_device_pg0(ioc, &sas_device,
 +          (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
 +           MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
@@ -205174,42 +205048,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      mptsas_add_device_component(ioc, sas_device.channel,
 +          sas_device.id, sas_device.sas_address, sas_device.device_info,
 +          sas_device.slot, enclosure_info.enclosure_logical_id);
- }
- /**
-- * mptsas_target_reset
-- *
-- * Issues TARGET_RESET to end device using handshaking method
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- * Returns (1) success
-- *         (0) failure
++}
++
++/**
 + *    mptsas_add_device_component_starget_ir - Handle Integrated RAID, adding
 + *    each individual device to list
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @channel: fw mapped id's
 + *    @id:
-  *
-  **/
--static int
--mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
++ *
++ **/
 +static void
 +mptsas_add_device_component_starget_ir(MPT_ADAPTER *ioc,
 +    struct scsi_target *starget)
- {
--      MPT_FRAME_HDR   *mf;
--      SCSITaskMgmt_t  *pScsiTm;
--
--      if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
--              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
--                  ioc->name,__func__, __LINE__));
--              return 0;
--      }
--
--      /* Format the Request
++{
 +      CONFIGPARMS                     cfg;
 +      ConfigPageHeader_t              hdr;
 +      dma_addr_t                      dma_handle;
@@ -205250,26 +205102,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +
 +      /*
 +       * Adding entry for hidden components
-        */
--      pScsiTm = (SCSITaskMgmt_t *) mf;
--      memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t));
--      pScsiTm->TargetID = id;
--      pScsiTm->Bus = channel;
--      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--      pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
--      pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
++       */
 +      for (i = 0; i < buffer->NumPhysDisks; i++) {
--      DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
++
 +              if (mpt_raid_phys_disk_pg0(ioc,
 +                  buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
 +                      continue;
--      mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
++
 +              mptsas_add_device_component_by_fw(ioc, phys_disk.PhysDiskBus,
 +                  phys_disk.PhysDiskID);
--      return 1;
++
 +              mutex_lock(&ioc->sas_device_info_mutex);
 +              list_for_each_entry(sas_info, &ioc->sas_device_info_list,
 +                  list) {
@@ -205311,49 +205153,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      if (buffer)
 +              pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
 +                  dma_handle);
- }
- /**
-- * mptsas_target_reset_queue
-- *
-- * Receive request for TARGET_RESET after recieving an firmware
-- * event NOT_RESPONDING_EVENT, then put command in link list
-- * and queue if task_queue already in use.
-- *
-- * @ioc
-- * @sas_event_data
++}
++
++/**
 + *    mptsas_add_device_component_starget -
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @starget:
-  *
-  **/
- static void
--mptsas_target_reset_queue(MPT_ADAPTER *ioc,
--    EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
++ *
++ **/
++static void
 +mptsas_add_device_component_starget(MPT_ADAPTER *ioc,
 +    struct scsi_target *starget)
- {
--      MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
--      VirtTarget *vtarget = NULL;
--      struct mptsas_target_reset_event *target_reset_list;
--      u8              id, channel;
--
--      id = sas_event_data->TargetID;
--      channel = sas_event_data->Bus;
++{
 +      VirtTarget              *vtarget;
 +      struct sas_rphy         *rphy;
 +      struct mptsas_phyinfo *phy_info = NULL;
 +      struct mptsas_enclosure enclosure_info;
--      if (!(vtarget = mptsas_find_vtarget(ioc, channel, id)))
++
 +      rphy = dev_to_rphy(starget->dev.parent);
 +      vtarget = starget->hostdata;
 +      phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
 +                  rphy->identify.sas_address);
 +      if (!phy_info)
-               return;
--      vtarget->deleted = 1; /* block IO */
++              return;
++
 +      memset(&enclosure_info, 0, sizeof(struct mptsas_enclosure));
 +      mptsas_sas_enclosure_pg0(ioc, &enclosure_info,
 +          (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE <<
@@ -205378,13 +205201,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +mptsas_del_device_component_by_os(MPT_ADAPTER *ioc, u8 channel, u8 id)
 +{
 +      struct sas_device_info  *sas_info, *next;
--      target_reset_list = kzalloc(sizeof(*target_reset_list),
--          GFP_ATOMIC);
--      if (!target_reset_list) {
--              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
--                  ioc->name,__func__, __LINE__));
--              return;
++
 +      /*
 +       * Set is_cached flag
 +       */
@@ -205392,15 +205209,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              list) {
 +              if (sas_info->os.channel == channel && sas_info->os.id == id)
 +                      sas_info->is_cached = 1;
-       }
++      }
 +}
--      memcpy(&target_reset_list->sas_event_data, sas_event_data,
--              sizeof(*sas_event_data));
--      list_add_tail(&target_reset_list->list, &hd->target_reset_list);
--
--      if (hd->resetPending)
--              return;
++
 +/**
 + *    mptsas_del_device_components - Cleaning the list
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -205410,256 +205221,189 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +mptsas_del_device_components(MPT_ADAPTER *ioc)
 +{
 +      struct sas_device_info  *sas_info, *next;
--      if (mptsas_target_reset(ioc, channel, id)) {
--              target_reset_list->target_reset_issued = 1;
--              hd->resetPending = 1;
++
 +      mutex_lock(&ioc->sas_device_info_mutex);
 +      list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list,
 +              list) {
 +              list_del(&sas_info->list);
 +              kfree(sas_info);
-       }
++      }
 +      mutex_unlock(&ioc->sas_device_info_mutex);
- }
- /**
-- * mptsas_dev_reset_complete
++}
++
++/**
 + *    mptsas_setup_wide_ports - Updates for new and existing narrow/wide port
 + *    configuration
 + *    in the sas_topology
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @port_info:
-  *
-- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT,
-- * enable work queue to finish off removing device from upper layers.
-- * then send next TARGET_RESET in the queue.
-- *
-- * @ioc
-- *
-- **/
-+ */
++ *
+  */
  static void
--mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
-+mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
+ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
  {
--      MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
--        struct list_head *head = &hd->target_reset_list;
--      struct mptsas_target_reset_event *target_reset_list;
--      struct mptsas_hotplug_event *ev;
--      EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data;
--      u8              id, channel;
--      __le64          sas_address;
+-      struct mptsas_portinfo_details * port_details;
 +      struct mptsas_portinfo_details *port_details;
-+      struct mptsas_phyinfo *phy_info, *phy_info_cmp;
-+      u64     sas_address;
-+      int     i, j;
--      if (list_empty(head))
--              return;
-+      mutex_lock(&ioc->sas_topology_mutex);
--      target_reset_list = list_entry(head->next, struct mptsas_target_reset_event, list);
-+      phy_info = port_info->phy_info;
-+      for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-+              if (phy_info->attached.handle)
-+                      continue;
-+              port_details = phy_info->port_details;
-+              if (!port_details)
-+                      continue;
-+              if (port_details->num_phys < 2)
-+                      continue;
--      sas_event_data = &target_reset_list->sas_event_data;
--      id = sas_event_data->TargetID;
--      channel = sas_event_data->Bus;
--      hd->resetPending = 0;
-+              /*
-+               * Removing a phy from a port, letting the last
-+               * phy be removed by firmware events.
-+               */
-+              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+       struct mptsas_phyinfo *phy_info, *phy_info_cmp;
+       u64     sas_address;
+       int     i, j;
+@@ -405,16 +949,20 @@
+                       continue;
+               if (port_details->num_phys < 2)
+                       continue;
++
+               /*
+                * Removing a phy from a port, letting the last
+                * phy be removed by firmware events.
+                */
+               dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-                  "%s: [%p]: deleting phy = %d\n",
+-                  ioc->name, __func__, port_details, i));
 +                      "%s: [%p]: deleting phy = %d\n",
 +                      ioc->name, __func__, port_details, i));
-+              port_details->num_phys--;
+               port_details->num_phys--;
+-              port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
 +              port_details->phy_bitmask &= ~(1 << phy_info->phy_id);
-+              memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
+               memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
 +              devtprintk(ioc, dev_printk(KERN_DEBUG, &phy_info->phy->dev,
 +                  MYIOC_s_FMT "delete phy %d, phy-obj (0x%p)\n", ioc->name,
 +                   phy_info->phy_id, phy_info->phy));
-+              sas_port_delete_phy(port_details->port, phy_info->phy);
-+              phy_info->port_details = NULL;
-+      }
-       /*
--       * retry target reset
-+       * Populate and refresh the tree
-        */
--      if (!target_reset_list->target_reset_issued) {
--              if (mptsas_target_reset(ioc, channel, id)) {
--                      target_reset_list->target_reset_issued = 1;
--                      hd->resetPending = 1;
-+      phy_info = port_info->phy_info;
-+      for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
-+              sas_address = phy_info->attached.sas_address;
+               sas_port_delete_phy(port_details->port, phy_info->phy);
+               phy_info->port_details = NULL;
+       }
+@@ -425,8 +973,9 @@
+       phy_info = port_info->phy_info;
+       for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
+               sas_address = phy_info->attached.sas_address;
+-              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "phy_id=%d sas_address=0x%018llX\n",
+-                  ioc->name, i, (unsigned long long)sas_address));
 +              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                      "phy_id=%d sas_address=0x%018llX\n",
 +                      ioc->name, i, (unsigned long long)sas_address));
-+              if (!sas_address)
-+                      continue;
-+              port_details = phy_info->port_details;
-+              /*
-+               * Forming a port
-+               */
-+              if (!port_details) {
+               if (!sas_address)
+                       continue;
+               port_details = phy_info->port_details;
+@@ -434,19 +983,20 @@
+                * Forming a port
+                */
+               if (!port_details) {
+-                      port_details = kzalloc(sizeof(*port_details),
 +                      port_details = kzalloc(sizeof(struct mptsas_portinfo_details),
-+                              GFP_KERNEL);
-+                      if (!port_details)
-+                              goto out;
-+                      port_details->num_phys = 1;
-+                      port_details->port_info = port_info;
+                               GFP_KERNEL);
+                       if (!port_details)
+                               goto out;
+                       port_details->num_phys = 1;
+                       port_details->port_info = port_info;
+-                      if (phy_info->phy_id < 64 )
 +                      if (phy_info->phy_id < 64)
-+                              port_details->phy_bitmask |=
-+                                  (1 << phy_info->phy_id);
+                               port_details->phy_bitmask |=
+                                   (1 << phy_info->phy_id);
+-                      phy_info->sas_port_add_phy=1;
+-                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tForming port\n\t\t"
+-                          "phy_id=%d sas_address=0x%018llX\n",
+-                          ioc->name, i, (unsigned long long)sas_address));
 +                      phy_info->sas_port_add_phy = 1;
 +                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                              "\t\tForming port\n\t\t"
 +                              "phy_id=%d sas_address=0x%018llX\n", ioc->name,
 +                              i, (unsigned long long) sas_address));
-+                      phy_info->port_details = port_details;
-+              }
-+
-+              if (i == port_info->num_phys - 1)
-+                      continue;
-+              phy_info_cmp = &port_info->phy_info[i + 1];
-+              for (j = i + 1 ; j < port_info->num_phys ; j++,
-+                  phy_info_cmp++) {
-+                      if (!phy_info_cmp->attached.sas_address)
-+                              continue;
-+                      if (sas_address != phy_info_cmp->attached.sas_address)
-+                              continue;
+                       phy_info->port_details = port_details;
+               }
+@@ -459,7 +1009,7 @@
+                               continue;
+                       if (sas_address != phy_info_cmp->attached.sas_address)
+                               continue;
+-                      if (phy_info_cmp->port_details == port_details )
 +                      if (phy_info_cmp->port_details == port_details)
-+                              continue;
-+                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+                          "\t\tphy_id=%d sas_address=0x%018llX\n",
-+                          ioc->name, j, (unsigned long long)
-+                          phy_info_cmp->attached.sas_address));
-+                      if (phy_info_cmp->port_details) {
-+                              port_details->rphy =
-+                                  mptsas_get_rphy(phy_info_cmp);
-+                              port_details->port =
-+                                  mptsas_get_port(phy_info_cmp);
-+                              port_details->starget =
-+                                  mptsas_get_starget(phy_info_cmp);
-+                              port_details->num_phys =
-+                                      phy_info_cmp->port_details->num_phys;
-+                              if (!phy_info_cmp->port_details->num_phys)
-+                                      kfree(phy_info_cmp->port_details);
-+                      } else
+                               continue;
+                       dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+                           "\t\tphy_id=%d sas_address=0x%018llX\n",
+@@ -477,12 +1027,12 @@
+                               if (!phy_info_cmp->port_details->num_phys)
+                                       kfree(phy_info_cmp->port_details);
+                       } else
+-                              phy_info_cmp->sas_port_add_phy=1;
 +                              phy_info_cmp->sas_port_add_phy = 1;
-+                      /*
-+                       * Adding a phy to a port
-+                       */
-+                      phy_info_cmp->port_details = port_details;
+                       /*
+                        * Adding a phy to a port
+                        */
+                       phy_info_cmp->port_details = port_details;
+-                      if (phy_info_cmp->phy_id < 64 )
 +                      if (phy_info_cmp->phy_id < 64)
-+                              port_details->phy_bitmask |=
-+                              (1 << phy_info_cmp->phy_id);
-+                      port_details->num_phys++;
-               }
--              return;
-       }
--      /*
--       * enable work queue to remove device from upper layers
--       */
--      list_del(&target_reset_list->list);
-+ out:
--      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--      if (!ev) {
--              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
--                  ioc->name,__func__, __LINE__));
--              return;
-+      for (i = 0; i < port_info->num_phys; i++) {
-+              port_details = port_info->phy_info[i].port_details;
-+              if (!port_details)
-+                      continue;
-+              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+                  "%s: [%p]: phy_id=%02d num_phys=%02d "
-+                  "bitmask=0x%016llX\n", ioc->name, __func__,
-+                  port_details, i, port_details->num_phys,
-+                  (unsigned long long)port_details->phy_bitmask));
+                               port_details->phy_bitmask |=
+                               (1 << phy_info_cmp->phy_id);
+                       port_details->num_phys++;
+@@ -500,19 +1050,19 @@
+                   "bitmask=0x%016llX\n", ioc->name, __func__,
+                   port_details, i, port_details->num_phys,
+                   (unsigned long long)port_details->phy_bitmask));
+-              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\t\tport = %p rphy=%p\n",
+-                  ioc->name, port_details->port, port_details->rphy));
 +              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                      "\t\tport = %p rphy=%p\n",
 +                      ioc->name, port_details->port, port_details->rphy));
        }
-+      dsaswideprintk(ioc, printk("\n"));
-+      mutex_unlock(&ioc->sas_topology_mutex);
-+}
-+
-+/**
+       dsaswideprintk(ioc, printk("\n"));
+       mutex_unlock(&ioc->sas_topology_mutex);
+ }
+ /**
+- * csmisas_find_vtarget
+- *
+- * @ioc
+- * @volume_id
+- * @volume_bus
 + *    mptsas_find_vtarget - obtain vtarget object for non-raid devices
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @channel:
 + *    @id:
-+ *
-+ **/
-+static VirtTarget *
-+mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+      struct scsi_device              *sdev;
-+      VirtDevice                      *vdevice;
-+      VirtTarget                      *vtarget = NULL;
+  *
+  **/
+ static VirtTarget *
+@@ -523,7 +1073,12 @@
+       VirtTarget                      *vtarget = NULL;
  
--      INIT_WORK(&ev->work, mptsas_hotplug_work);
--      ev->ioc = ioc;
--      ev->handle = le16_to_cpu(sas_event_data->DevHandle);
--      ev->parent_handle =
--          le16_to_cpu(sas_event_data->ParentDevHandle);
--      ev->channel = channel;
--      ev->id =id;
--      ev->phy_id = sas_event_data->PhyNum;
--      memcpy(&sas_address, &sas_event_data->SASAddress,
--          sizeof(__le64));
--      ev->sas_address = le64_to_cpu(sas_address);
--      ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo);
--      ev->event_type = MPTSAS_DEL_DEVICE;
--      schedule_work(&ev->work);
--      kfree(target_reset_list);
-+      shost_for_each_device(sdev, ioc->sh) {
+       shost_for_each_device(sdev, ioc->sh) {
+-              if ((vdevice = sdev->hostdata) == NULL)
 +              if ((vdevice = sdev->hostdata) == NULL ||
 +                      (vdevice->vtarget == NULL))
 +                      continue;
 +              if ((vdevice->vtarget->tflags &
 +                  MPT_TARGET_FLAGS_RAID_COMPONENT ||
 +                  vdevice->vtarget->raidVolume))
-+                      continue;
-+              if (vdevice->vtarget->id == id &&
-+                  vdevice->vtarget->channel == channel)
-+                      vtarget = vdevice->vtarget;
-+      }
-+      return vtarget;
-+}
+                       continue;
+               if (vdevice->vtarget->id == id &&
+                   vdevice->vtarget->channel == channel)
+@@ -532,17 +1087,56 @@
+       return vtarget;
+ }
  
--      /*
--       * issue target reset to next device in the queue
--       */
+-/**
+- * mptsas_target_reset
+- *
+- * Issues TARGET_RESET to end device using handshaking method
+- *
+- * @ioc
+- * @channel
+- * @id
+- *
+- * Returns (1) success
+- *         (0) failure
 +static void
 +mptsas_queue_device_delete(MPT_ADAPTER *ioc,
 +    MpiEventDataSasDeviceStatusChange_t *sas_event_data)
 +{
 +      struct fw_event_work *fw_event;
 +      int sz;
--      head = &hd->target_reset_list;
--      if (list_empty(head))
++
 +      sz = offsetof(struct fw_event_work, event_data) +
 +          sizeof(MpiEventDataSasDeviceStatusChange_t);
 +      fw_event = kzalloc(sz, GFP_ATOMIC);
 +      if (!fw_event) {
 +              printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n",
 +                  ioc->name, __func__, __LINE__);
-               return;
++              return;
 +      }
 +      memcpy(fw_event->event_data, sas_event_data,
 +          sizeof(MpiEventDataSasDeviceStatusChange_t));
@@ -205667,57 +205411,47 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      fw_event->ioc = ioc;
 +      mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1));
 +}
--      target_reset_list = list_entry(head->next, struct mptsas_target_reset_event,
--          list);
--
--      sas_event_data = &target_reset_list->sas_event_data;
--      id = sas_event_data->TargetID;
--      channel = sas_event_data->Bus;
++
 +static void
 +mptsas_queue_rescan(MPT_ADAPTER *ioc)
 +{
 +      struct fw_event_work *fw_event;
 +      int sz;
--      if (mptsas_target_reset(ioc, channel, id)) {
--              target_reset_list->target_reset_issued = 1;
--              hd->resetPending = 1;
++
 +      sz = offsetof(struct fw_event_work, event_data);
 +      fw_event = kzalloc(sz, GFP_ATOMIC);
 +      if (!fw_event) {
 +              printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n",
 +                  ioc->name, __func__, __LINE__);
 +              return;
-       }
++      }
 +      fw_event->event = -1;
 +      fw_event->ioc = ioc;
 +      mptsas_add_fw_event(ioc, fw_event, msecs_to_jiffies(1));
- }
++}
 +
- /**
-- * mptsas_taskmgmt_complete
++
++/**
 + *    mptsas_target_reset - Issues TARGET_RESET to end device using
 + *    handshaking method
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @channel:
 + *    @id:
-  *
-- * @ioc
-- * @mf
-- * @mr
++ *
 + *    Returns (1) success
 + *            (0) failure
   *
   **/
  static int
--mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+      MPT_FRAME_HDR   *mf;
-+      SCSITaskMgmt_t  *pScsiTm;
-+
+@@ -551,16 +1145,23 @@
+       MPT_FRAME_HDR   *mf;
+       SCSITaskMgmt_t  *pScsiTm;
+-      if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+-              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
+-                  ioc->name,__func__, __LINE__));
+-              return 0;
+-      }
 +      if (mpt_set_taskmgmt_in_progress_flag(ioc) != 0)
 +              return 0;
 +
@@ -205730,26 +205464,39 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
 +              ioc->name, mf));
-+
-+      /* Format the Request
-+       */
-+      pScsiTm = (SCSITaskMgmt_t *) mf;
+       /* Format the Request
+        */
+       pScsiTm = (SCSITaskMgmt_t *) mf;
+-      memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t));
 +      memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
-+      pScsiTm->TargetID = id;
-+      pScsiTm->Bus = channel;
-+      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-+      pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
-+      pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
-+
-+      DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
-+
+       pScsiTm->TargetID = id;
+       pScsiTm->Bus = channel;
+       pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
+@@ -569,21 +1170,27 @@
+       DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)mf);
+-      mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +         "TaskMgmt type=%d (sas device delete) fw_channel = %d fw_id = %d)\n",
 +         ioc->name, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, channel, id));
 +
 +      mpt_put_msg_frame_hi_pri(mptsasDeviceResetCtx, ioc, mf);
-+
-+      return 1;
+       return 1;
+-}
+-
+-/**
+- * mptsas_target_reset_queue
+- *
+- * Receive request for TARGET_RESET after recieving an firmware
+- * event NOT_RESPONDING_EVENT, then put command in link list
+- * and queue if task_queue already in use.
+- *
+- * @ioc
+- * @sas_event_data
+- *
 +
 + out_fail:
 +
@@ -205764,62 +205511,91 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + * Receive request for TARGET_RESET after
 + * recieving an firmware event NOT_RESPONDING_EVENT, then put command in
 + * link list and queue if task_queue already in use.
-+ **/
-+static void
-+mptsas_target_reset_queue(MPT_ADAPTER *ioc,
-+    EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
+  **/
+ static void
+ mptsas_target_reset_queue(MPT_ADAPTER *ioc,
+@@ -591,22 +1198,23 @@
  {
--      mptsas_dev_reset_complete(ioc);
--      return mptscsih_taskmgmt_complete(ioc, mf, mr);
-+      MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
-+      VirtTarget *vtarget = NULL;
+       MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
+       VirtTarget *vtarget = NULL;
+-      struct mptsas_target_reset_event *target_reset_list;
 +      struct mptsas_target_reset_event        *target_reset_list;
-+      u8              id, channel;
-+
-+      id = sas_event_data->TargetID;
-+      channel = sas_event_data->Bus;
-+
+       u8              id, channel;
+       id = sas_event_data->TargetID;
+       channel = sas_event_data->Bus;
+-      if (!(vtarget = mptsas_find_vtarget(ioc, channel, id)))
+-              return;
+-
+-      vtarget->deleted = 1; /* block IO */
+-
+-      target_reset_list = kzalloc(sizeof(*target_reset_list),
 +      if ((vtarget = mptsas_find_vtarget(ioc, channel, id))) {
 +              if (!ioc->disable_hotplug_remove)
 +                      vtarget->deleted = 1; /* block IO */
 +      }
 +
 +      target_reset_list = kzalloc(sizeof(struct mptsas_target_reset_event),
-+          GFP_ATOMIC);
-+      if (!target_reset_list) {
+           GFP_ATOMIC);
+       if (!target_reset_list) {
+-              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
+-                  ioc->name,__func__, __LINE__));
 +              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
 +                      "%s, failed to allocate mem @%d..!!\n",
 +                      ioc->name, __func__, __LINE__));
-+              return;
-+      }
-+
-+      memcpy(&target_reset_list->sas_event_data, sas_event_data,
-+              sizeof(*sas_event_data));
-+      list_add_tail(&target_reset_list->list, &hd->target_reset_list);
-+
+               return;
+       }
+@@ -614,84 +1222,99 @@
+               sizeof(*sas_event_data));
+       list_add_tail(&target_reset_list->list, &hd->target_reset_list);
+-      if (hd->resetPending)
+-              return;
+-
+-      if (mptsas_target_reset(ioc, channel, id)) {
 +      target_reset_list->time_count = jiffies;
 +
 +      if (mptsas_target_reset(ioc, channel, id))
-+              target_reset_list->target_reset_issued = 1;
- }
- /**
-- * mptscsih_ioc_reset
+               target_reset_list->target_reset_issued = 1;
+-              hd->resetPending = 1;
+-      }
+-}
+-
+-/**
+- * mptsas_dev_reset_complete
+- *
+- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT,
+- * enable work queue to finish off removing device from upper layers.
+- * then send next TARGET_RESET in the queue.
+- *
+- * @ioc
+- *
+- **/
+-static void
+-mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
++}
++
++/**
 + *    mptsas_taskmgmt_complete - Completion for TARGET_RESET after
 + *    NOT_RESPONDING_EVENT, enable work queue to finish off removing device
 + *    from upper layers. then send next TARGET_RESET in the queue.
 + *    @ioc: Pointer to MPT_ADAPTER structure
-  *
-- * @ioc
-- * @reset_phase
++ *
 + **/
 +static int
 +mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+{
-+      MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
+ {
+       MPT_SCSI_HOST   *hd = shost_priv(ioc->sh);
+-        struct list_head *head = &hd->target_reset_list;
+-      struct mptsas_target_reset_event *target_reset_list;
+-      struct mptsas_hotplug_event *ev;
+-      EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data;
 +      struct list_head *head = &hd->target_reset_list;
 +      struct mptsas_target_reset_event        *target_reset_list;
-+      u8              id, channel;
+       u8              id, channel;
+-      __le64          sas_address;
 +      SCSITaskMgmtReply_t *pScsiTmReply;
 +
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt completed: "
@@ -205860,8 +205636,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      }
 +
 +      mpt_clear_taskmgmt_in_progress_flag(ioc);
-+
-+      if (list_empty(head))
+       if (list_empty(head))
+-              return;
+-
+-      target_reset_list = list_entry(head->next, struct mptsas_target_reset_event, list);
+-
+-      sas_event_data = &target_reset_list->sas_event_data;
+-      id = sas_event_data->TargetID;
+-      channel = sas_event_data->Bus;
+-      hd->resetPending = 0;
 +              return 1;
 +
 +      target_reset_list = list_entry(head->next,
@@ -205875,31 +205659,68 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      id = pScsiTmReply->TargetID;
 +      channel = pScsiTmReply->Bus;
 +      target_reset_list->time_count = jiffies;
-+
-+      /*
-+       * retry target reset
-+       */
-+      if (!target_reset_list->target_reset_issued) {
+       /*
+        * retry target reset
+        */
+       if (!target_reset_list->target_reset_issued) {
+-              if (mptsas_target_reset(ioc, channel, id)) {
 +              if (mptsas_target_reset(ioc, channel, id))
-+                      target_reset_list->target_reset_issued = 1;
+                       target_reset_list->target_reset_issued = 1;
+-                      hd->resetPending = 1;
+-              }
+-              return;
 +              return 1;
-+      }
-+
-+      /*
-+       * enable work queue to remove device from upper layers
-+       */
-+      list_del(&target_reset_list->list);
+       }
+       /*
+        * enable work queue to remove device from upper layers
+        */
+       list_del(&target_reset_list->list);
+-
+-      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-      if (!ev) {
+-              dfailprintk(ioc, printk(MYIOC_s_WARN_FMT "%s, failed to allocate mem @%d..!!\n",
+-                  ioc->name,__func__, __LINE__));
+-              return;
+-      }
+-
+-      INIT_WORK(&ev->work, mptsas_hotplug_work);
+-      ev->ioc = ioc;
+-      ev->handle = le16_to_cpu(sas_event_data->DevHandle);
+-      ev->parent_handle =
+-          le16_to_cpu(sas_event_data->ParentDevHandle);
+-      ev->channel = channel;
+-      ev->id =id;
+-      ev->phy_id = sas_event_data->PhyNum;
+-      memcpy(&sas_address, &sas_event_data->SASAddress,
+-          sizeof(__le64));
+-      ev->sas_address = le64_to_cpu(sas_address);
+-      ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo);
+-      ev->event_type = MPTSAS_DEL_DEVICE;
+-      schedule_work(&ev->work);
+-      kfree(target_reset_list);
 +      if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
 +              mptsas_queue_device_delete(ioc,
 +                  &target_reset_list->sas_event_data);
 +
-+
-+      /*
-+       * issue target reset to next device in the queue
-+       */
-+
-+      head = &hd->target_reset_list;
-+      if (list_empty(head))
+       /*
+        * issue target reset to next device in the queue
+@@ -699,78 +1322,78 @@
+       head = &hd->target_reset_list;
+       if (list_empty(head))
+-              return;
+-
+-      target_reset_list = list_entry(head->next, struct mptsas_target_reset_event,
+-          list);
+-
+-      sas_event_data = &target_reset_list->sas_event_data;
+-      id = sas_event_data->TargetID;
+-      channel = sas_event_data->Bus;
+-
+-      if (mptsas_target_reset(ioc, channel, id)) {
 +              return 1;
 +
 +      target_reset_list = list_entry(head->next,
@@ -205910,7 +205731,31 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      target_reset_list->time_count = jiffies;
 +
 +      if (mptsas_target_reset(ioc, channel, id))
-+              target_reset_list->target_reset_issued = 1;
+               target_reset_list->target_reset_issued = 1;
+-              hd->resetPending = 1;
+-      }
+-}
+-
+-/**
+- * mptsas_taskmgmt_complete
+- *
+- * @ioc
+- * @mf
+- * @mr
+- *
+- **/
+-static int
+-mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
+-{
+-      mptsas_dev_reset_complete(ioc);
+-      return mptscsih_taskmgmt_complete(ioc, mf, mr);
+-}
+-
+-/**
+- * mptscsih_ioc_reset
+- *
+- * @ioc
+- * @reset_phase
 +
 +      return 1;
 +}
@@ -205930,9 +205775,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        int rc;
  
        rc = mptscsih_ioc_reset(ioc, reset_phase);
-+      if ((ioc->bus_type != SAS) || (!rc))
-+              return rc;
+-
 -      if (ioc->bus_type != SAS)
 -              goto out;
 -
@@ -205941,6 +205784,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 -
 -      if (!ioc->sh || !ioc->sh->hostdata)
 -              goto out;
++      if ((ioc->bus_type != SAS) || (!rc))
++              return rc;
++
        hd = shost_priv(ioc->sh);
        if (!hd->ioc)
                goto out;
@@ -205993,7 +205839,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure,
                u32 form, u32 form_specific)
-@@ -793,7 +1416,7 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *io
+@@ -793,7 +1416,7 @@
        cfg.pageAddr = form + form_specific;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
@@ -206002,7 +205848,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -836,19 +1459,341 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *io
+@@ -836,19 +1459,341 @@
        return error;
  }
  
@@ -206304,12 +206150,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_slave_configure(struct scsi_device *sdev)
  {
+-
+-      if (sdev->channel == MPTSAS_RAID_CHANNEL)
+-              goto out;
 +      struct Scsi_Host        *host = sdev->host;
 +      MPT_SCSI_HOST           *hd = shost_priv(host);
 +      MPT_ADAPTER             *ioc = hd->ioc;
 +      VirtDevice              *vdevice = sdev->hostdata;
--      if (sdev->channel == MPTSAS_RAID_CHANNEL)
++
 +
 +      if (vdevice->vtarget->deleted) {
 +              sdev_printk(KERN_INFO, sdev, "clearing deleted flag\n");
@@ -206322,17 +206170,18 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +       */
 +      if (sdev->channel == MPTSAS_RAID_CHANNEL) {
 +              mptsas_add_device_component_starget_ir(ioc, scsi_target(sdev));
-               goto out;
++              goto out;
 +      }
  
        sas_read_port_mode_page(sdev);
  
+- out:
 +      mptsas_add_device_component_starget(ioc, scsi_target(sdev));
 +
 +      if (sdev->type == TYPE_TAPE &&
 +          (ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_TLR))
 +              mptsas_issue_tlr(hd, sdev);
-  out:
++ out:
 +
        return mptscsih_slave_configure(sdev);
  }
@@ -206345,7 +206194,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_target_alloc(struct scsi_target *starget)
  {
-@@ -875,9 +1820,14 @@ mptsas_target_alloc(struct scsi_target *
+@@ -875,9 +1820,14 @@
         * RAID volumes placed beyond the last expected port.
         */
        if (starget->channel == MPTSAS_RAID_CHANNEL) {
@@ -206361,7 +206210,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                goto out;
        }
  
-@@ -886,18 +1836,26 @@ mptsas_target_alloc(struct scsi_target *
+@@ -886,18 +1836,26 @@
        list_for_each_entry(p, &ioc->sas_topology, list) {
                for (i = 0; i < p->num_phys; i++) {
                        if (p->phy_info[i].attached.sas_address !=
@@ -206371,7 +206220,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                        id = p->phy_info[i].attached.id;
                        channel = p->phy_info[i].attached.channel;
                        mptsas_set_starget(&p->phy_info[i], starget);
++
 +                      starget_printk(KERN_INFO, starget, MYIOC_s_FMT
 +                      "add device: fw_channel %d, fw_id %d, phy %d,"
 +                      " sas_addr 0x%llx\n",
@@ -206379,7 +206228,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      p->phy_info[i].attached.id,
 +                      p->phy_info[i].attached.phy_id,
 +                      (unsigned long long)p->phy_info[i].attached.sas_address);
-+
                        /*
                         * Exposing hidden raid components
                         */
@@ -206390,7 +206239,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                                vtarget->tflags |=
                                    MPT_TARGET_FLAGS_RAID_COMPONENT;
                                p->phy_info[i].attached.phys_disk_num = id;
-@@ -918,6 +1876,11 @@ mptsas_target_alloc(struct scsi_target *
+@@ -918,6 +1876,11 @@
        return 0;
  }
  
@@ -206402,7 +206251,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static void
  mptsas_target_destroy(struct scsi_target *starget)
  {
-@@ -926,11 +1889,14 @@ mptsas_target_destroy(struct scsi_target
+@@ -926,10 +1889,13 @@
        struct sas_rphy         *rphy;
        struct mptsas_portinfo  *p;
        int                      i;
@@ -206411,14 +206260,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        if (!starget->hostdata)
                return;
++
 +      mptsas_del_device_component_by_os(ioc, starget->channel,
 +          starget->id);
-+
        if (starget->channel == MPTSAS_RAID_CHANNEL)
                goto out;
-@@ -940,8 +1906,16 @@ mptsas_target_destroy(struct scsi_target
+@@ -940,8 +1906,16 @@
                        if (p->phy_info[i].attached.sas_address !=
                                        rphy->identify.sas_address)
                                continue;
@@ -206437,7 +206285,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                }
        }
  
-@@ -950,7 +1924,11 @@ mptsas_target_destroy(struct scsi_target
+@@ -950,7 +1924,11 @@
        starget->hostdata = NULL;
  }
  
@@ -206450,7 +206298,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_slave_alloc(struct scsi_device *sdev)
  {
-@@ -961,17 +1939,20 @@ mptsas_slave_alloc(struct scsi_device *s
+@@ -961,17 +1939,20 @@
        VirtDevice              *vdevice;
        struct scsi_target      *starget;
        int                     i;
@@ -206473,7 +206321,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (sdev->channel == MPTSAS_RAID_CHANNEL)
                goto out;
  
-@@ -1005,9 +1986,17 @@ mptsas_slave_alloc(struct scsi_device *s
+@@ -1005,9 +1986,17 @@
        return 0;
  }
  
@@ -206491,15 +206339,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        VirtDevice      *vdevice = SCpnt->device->hostdata;
  
        if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) {
-@@ -1016,9 +2005,13 @@ mptsas_qcmd(struct scsi_cmnd *SCpnt, voi
+@@ -1016,9 +2005,13 @@
                return 0;
        }
  
 -//    scsi_print_command(SCpnt);
+-
+-      return mptscsih_qcmd(SCpnt,done);
 +      hd = shost_priv(SCpnt->device->host);
 +      ioc = hd->ioc;
--      return mptscsih_qcmd(SCpnt,done);
++
 +      if (ioc->sas_discovery_quiesce_io)
 +              return SCSI_MLQUEUE_HOST_BUSY;
 +
@@ -206507,7 +206356,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  }
  
  
-@@ -1049,6 +2042,11 @@ static struct scsi_host_template mptsas_
+@@ -1049,6 +2042,11 @@
        .shost_attrs                    = mptscsih_host_attrs,
  };
  
@@ -206519,7 +206368,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int mptsas_get_linkerrors(struct sas_phy *phy)
  {
        MPT_ADAPTER *ioc = phy_to_ioc(phy);
-@@ -1058,7 +2056,6 @@ static int mptsas_get_linkerrors(struct 
+@@ -1058,7 +2056,6 @@
        dma_addr_t dma_handle;
        int error;
  
@@ -206527,7 +206376,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (!scsi_is_sas_phy_local(phy))
                return -EINVAL;
  
-@@ -1075,7 +2072,7 @@ static int mptsas_get_linkerrors(struct 
+@@ -1075,7 +2072,7 @@
        cfg.pageAddr = phy->identify.phy_identifier;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
@@ -206536,7 +206385,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -1111,19 +2108,37 @@ static int mptsas_get_linkerrors(struct 
+@@ -1111,19 +2108,37 @@
        return error;
  }
  
@@ -206560,6 +206409,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        }
 -      complete(&ioc->sas_mgmt.done);
 -      return 1;
+-}
+-
 +
 +      if (ioc->sas_mgmt.status & MPT_MGMT_STATUS_PENDING) {
 +              ioc->sas_mgmt.status &= ~MPT_MGMT_STATUS_PENDING;
@@ -206567,8 +206418,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              return 1;
 +      }
 +      return 0;
- }
++}
++
 +/**
 + *    mptsas_phy_reset -
 + *    @phy:
@@ -206578,7 +206429,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int mptsas_phy_reset(struct sas_phy *phy, int hard_reset)
  {
        MPT_ADAPTER *ioc = phy_to_ioc(phy);
-@@ -1134,7 +2149,6 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1134,7 +2149,6 @@
        unsigned long timeleft;
        int error = -ERESTARTSYS;
  
@@ -206586,7 +206437,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (!scsi_is_sas_phy_local(phy))
                return -EINVAL;
  
-@@ -1160,21 +2174,24 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1160,21 +2174,24 @@
                MPI_SAS_OP_PHY_HARD_RESET : MPI_SAS_OP_PHY_LINK_RESET;
        req->PhyNum = phy->identify.phy_identifier;
  
@@ -206619,7 +206470,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                error = -ENXIO;
                goto out_unlock;
        }
-@@ -1191,11 +2208,18 @@ static int mptsas_phy_reset(struct sas_p
+@@ -1191,11 +2208,18 @@
        error = 0;
  
   out_unlock:
@@ -206638,7 +206489,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
  {
-@@ -1224,12 +2248,18 @@ mptsas_get_enclosure_identifier(struct s
+@@ -1224,12 +2248,18 @@
        memset(&enclosure_info, 0, sizeof(struct mptsas_enclosure));
        error = mptsas_sas_enclosure_pg0(ioc, &enclosure_info,
                        (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE <<
@@ -206658,7 +206509,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_get_bay_identifier(struct sas_rphy *rphy)
  {
-@@ -1269,14 +2299,16 @@ static int mptsas_smp_handler(struct Scs
+@@ -1269,14 +2299,16 @@
        u64 sas_address = 0;
  
        if (!rsp) {
@@ -206677,7 +206528,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                    ioc->name, __func__, req->bio->bi_vcnt, req->data_len,
                    rsp->bio->bi_vcnt, rsp->data_len);
                return -EINVAL;
-@@ -1304,7 +2336,7 @@ static int mptsas_smp_handler(struct Scs
+@@ -1304,7 +2336,7 @@
                struct mptsas_portinfo *port_info;
  
                mutex_lock(&ioc->sas_topology_mutex);
@@ -206686,7 +206537,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                if (port_info && port_info->phy_info)
                        sas_address =
                                port_info->phy_info[0].phy->identify.sas_address;
-@@ -1317,41 +2349,58 @@ static int mptsas_smp_handler(struct Scs
+@@ -1317,41 +2349,58 @@
                (((int *) mf) + (offsetof(SmpPassthroughRequest_t, SGL) / 4));
  
        /* request */
@@ -206727,8 +206578,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (!dma_addr_in)
 -              goto unmap;
 -      mpt_add_sge(psge, flagsLength, dma_addr_in);
+-
 +              goto out_unmap;
++
 +      ioc->add_sge(psge, flagsLength, dma_addr_in);
 +
 +      INITIALIZE_MGMT_STATUS(ioc->sas_mgmt.status)
@@ -206741,6 +206593,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 -              mpt_HardResetHandler(ioc, CAN_SLEEP);
 -              ret = -ETIMEDOUT;
 -              goto unmap;
+-      }
 +      if (!(ioc->sas_mgmt.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
 +              ret = -ETIME;
 +              mpt_free_msg_frame(ioc, mf);
@@ -206752,7 +206605,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                              mpt_HardResetHandler(ioc, CAN_SLEEP);
 +              }
 +              goto out_unmap;
-       }
++      }
 +
        mf = NULL;
  
@@ -206761,7 +206614,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                SmpPassthroughReply_t *smprep;
  
                smprep = (SmpPassthroughReply_t *)ioc->sas_mgmt.reply;
-@@ -1360,11 +2409,12 @@ static int mptsas_smp_handler(struct Scs
+@@ -1360,11 +2409,12 @@
                req->data_len = 0;
                rsp->data_len -= smprep->ResponseDataLength;
        } else {
@@ -206776,7 +206629,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (dma_addr_out)
                pci_unmap_single(ioc->pcidev, dma_addr_out, req->data_len,
                                 PCI_DMA_BIDIRECTIONAL);
-@@ -1375,6 +2425,7 @@ put_mf:
+@@ -1375,6 +2425,7 @@
        if (mf)
                mpt_free_msg_frame(ioc, mf);
  out_unlock:
@@ -206784,7 +206637,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        mutex_unlock(&ioc->sas_mgmt.mutex);
  out:
        return ret;
-@@ -1390,6 +2441,12 @@ static struct sas_function_template mpts
+@@ -1390,6 +2441,12 @@
  
  static struct scsi_transport_template *mptsas_transport_template;
  
@@ -206797,7 +206650,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
  {
-@@ -1412,7 +2469,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1412,7 +2469,7 @@
        cfg.pageAddr = 0;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
@@ -206806,7 +206659,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -1438,7 +2495,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1438,7 +2495,7 @@
  
        port_info->num_phys = buffer->NumPhys;
        port_info->phy_info = kcalloc(port_info->num_phys,
@@ -206815,19 +206668,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (!port_info->phy_info) {
                error = -ENOMEM;
                goto out_free_consistent;
-@@ -1459,6 +2516,8 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
+@@ -1459,15 +2516,22 @@
                port_info->phy_info[i].portinfo = port_info;
                port_info->phy_info[i].handle =
                    le16_to_cpu(buffer->PhyData[i].ControllerDevHandle);
+-      }
+-
+- out_free_consistent:
+-      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+-                          buffer, dma_handle);
+- out:
+-      return error;
+-}
+-
 +              port_info->phy_info[i].port_flags =
 +                  buffer->PhyData[i].PortFlags;
-       }
-  out_free_consistent:
-@@ -1468,6 +2527,11 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc,
-       return error;
- }
++      }
++
++ out_free_consistent:
++      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++                          buffer, dma_handle);
++ out:
++      return error;
++}
++
 +/**
 + *    mptsas_sas_io_unit_pg1 -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -206836,7 +206700,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
  {
-@@ -1483,11 +2547,11 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
+@@ -1483,11 +2547,11 @@
  
        cfg.cfghdr.ehdr = &hdr;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
@@ -206849,7 +206713,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -1525,6 +2589,14 @@ mptsas_sas_io_unit_pg1(MPT_ADAPTER *ioc)
+@@ -1525,6 +2589,14 @@
        return error;
  }
  
@@ -206864,7 +206728,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
                u32 form, u32 form_specific)
-@@ -1545,12 +2617,12 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
+@@ -1545,12 +2617,12 @@
  
        cfg.cfghdr.ehdr = &hdr;
        cfg.dir = 0;    /* read */
@@ -206878,19 +206742,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -1581,6 +2653,8 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
+@@ -1581,14 +2653,24 @@
        phy_info->programmed_link_rate = buffer->ProgrammedLinkRate;
        phy_info->identify.handle = le16_to_cpu(buffer->OwnerDevHandle);
        phy_info->attached.handle = le16_to_cpu(buffer->AttachedDevHandle);
+-
+- out_free_consistent:
+-      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+-                          buffer, dma_handle);
+- out:
+-      return error;
+-}
+-
 +      phy_info->change_count = buffer->ChangeCount;
 +      phy_info->phy_info = le32_to_cpu(buffer->PhyInfo);
-  out_free_consistent:
-       pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
-@@ -1589,6 +2663,14 @@ mptsas_sas_phy_pg0(MPT_ADAPTER *ioc, str
-       return error;
- }
++
++ out_free_consistent:
++      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++                          buffer, dma_handle);
++ out:
++      return error;
++}
++
 +/**
 + *    mptsas_sas_device_pg0 -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -206902,7 +206775,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info,
                u32 form, u32 form_specific)
-@@ -1600,10 +2682,6 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, 
+@@ -1600,10 +2682,6 @@
        __le64 sas_address;
        int error=0;
  
@@ -206913,37 +206786,72 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
        hdr.ExtPageLength = 0;
        hdr.PageNumber = 0;
-@@ -1617,9 +2695,8 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, 
+@@ -1617,33 +2695,39 @@
        cfg.physAddr = -1;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
 -      cfg.timeout = 10;
 +      cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
--      memset(device_info, 0, sizeof(struct mptsas_devinfo));
-       error = mpt_config(ioc, &cfg);
-       if (error)
-               goto out;
-@@ -1639,11 +2716,18 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, 
-       cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-       error = mpt_config(ioc, &cfg);
++
++      error = mpt_config(ioc, &cfg);
++      if (error)
++              goto out;
++      if (!hdr.ExtPageLength) {
++              error = -ENXIO;
++              goto out;
++      }
++
++      buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++                                    &dma_handle);
++      if (!buffer) {
++              error = -ENOMEM;
++              goto out;
++      }
++
++      cfg.physAddr = dma_handle;
++      cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
++
++      error = mpt_config(ioc, &cfg);
 +
 +      if (error == MPI_IOCSTATUS_CONFIG_INVALID_PAGE) {
 +              error = -ENODEV;
 +              goto out_free_consistent;
 +      }
 +
-       if (error)
-               goto out_free_consistent;
-       mptsas_print_device_pg0(ioc, buffer);
++      if (error)
++              goto out_free_consistent;
++
++      mptsas_print_device_pg0(ioc, buffer);
  
-+      memset(device_info, 0, sizeof(struct mptsas_devinfo));
+       memset(device_info, 0, sizeof(struct mptsas_devinfo));
+-      error = mpt_config(ioc, &cfg);
+-      if (error)
+-              goto out;
+-      if (!hdr.ExtPageLength) {
+-              error = -ENXIO;
+-              goto out;
+-      }
+-
+-      buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+-                                    &dma_handle);
+-      if (!buffer) {
+-              error = -ENOMEM;
+-              goto out;
+-      }
+-
+-      cfg.physAddr = dma_handle;
+-      cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
+-
+-      error = mpt_config(ioc, &cfg);
+-      if (error)
+-              goto out_free_consistent;
+-
+-      mptsas_print_device_pg0(ioc, buffer);
+-
        device_info->handle = le16_to_cpu(buffer->DevHandle);
        device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle);
        device_info->handle_enclosure =
-@@ -1666,6 +2750,14 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, 
+@@ -1666,6 +2750,14 @@
        return error;
  }
  
@@ -206958,28 +206866,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info,
                u32 form, u32 form_specific)
-@@ -1675,7 +2767,9 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1675,7 +2767,9 @@
        SasExpanderPage0_t *buffer;
        dma_addr_t dma_handle;
        int i, error;
+-
 +      __le64 sas_address;
++
 +      memset(port_info, 0, sizeof(struct mptsas_portinfo));
        hdr.PageVersion = MPI_SASEXPANDER0_PAGEVERSION;
        hdr.ExtPageLength = 0;
        hdr.PageNumber = 0;
-@@ -1689,9 +2783,8 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1689,9 +2783,8 @@
        cfg.pageAddr = form + form_specific;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
 -      cfg.timeout = 10;
-+      cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
+-
 -      memset(port_info, 0, sizeof(struct mptsas_portinfo));
++      cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
++
        error = mpt_config(ioc, &cfg);
        if (error)
                goto out;
-@@ -1712,27 +2805,32 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
+@@ -1712,36 +2805,49 @@
        cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
  
        error = mpt_config(ioc, &cfg);
@@ -206987,14 +206897,17 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 -              goto out_free_consistent;
 -
 -      if (!buffer->NumPhys) {
+-              error = -ENODEV;
+-              goto out_free_consistent;
+-      }
 +      if (error == MPI_IOCSTATUS_CONFIG_INVALID_PAGE) {
-               error = -ENODEV;
-               goto out_free_consistent;
-       }
-+      if (error)
++              error = -ENODEV;
 +              goto out_free_consistent;
++      }
 +
++      if (error)
++              goto out_free_consistent;
        /* save config data */
 -      port_info->num_phys = buffer->NumPhys;
 +      port_info->num_phys = (buffer->NumPhys) ? buffer->NumPhys : 1;
@@ -207011,17 +206924,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                port_info->phy_info[i].portinfo = port_info;
                port_info->phy_info[i].handle =
                    le16_to_cpu(buffer->DevHandle);
+-      }
+-
+- out_free_consistent:
+-      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+-                          buffer, dma_handle);
+- out:
+-      return error;
+-}
+-
 +              port_info->phy_info[i].identify.sas_address =
 +                  le64_to_cpu(sas_address);
 +              port_info->phy_info[i].identify.handle_parent =
 +                  le16_to_cpu(buffer->ParentDevHandle);
-       }
-  out_free_consistent:
-@@ -1742,6 +2840,14 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc
-       return error;
- }
++      }
++
++ out_free_consistent:
++      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++                          buffer, dma_handle);
++ out:
++      return error;
++}
++
 +/**
 + *    mptsas_sas_expander_pg1 -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -207033,7 +206957,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
                u32 form, u32 form_specific)
-@@ -1752,11 +2858,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1752,11 +2858,7 @@
        dma_addr_t dma_handle;
        int error=0;
  
@@ -207046,7 +206970,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        hdr.ExtPageLength = 0;
        hdr.PageNumber = 1;
        hdr.Reserved1 = 0;
-@@ -1769,7 +2871,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1769,7 +2871,7 @@
        cfg.pageAddr = form + form_specific;
        cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
        cfg.dir = 0;    /* read */
@@ -207055,7 +206979,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        error = mpt_config(ioc, &cfg);
        if (error)
-@@ -1791,6 +2893,11 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1791,6 +2893,11 @@
        cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
  
        error = mpt_config(ioc, &cfg);
@@ -207067,19 +206991,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        if (error)
                goto out_free_consistent;
  
-@@ -1805,6 +2912,8 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
+@@ -1805,14 +2912,22 @@
        phy_info->hw_link_rate = buffer->HwLinkRate;
        phy_info->identify.handle = le16_to_cpu(buffer->OwnerDevHandle);
        phy_info->attached.handle = le16_to_cpu(buffer->AttachedDevHandle);
+-
+- out_free_consistent:
+-      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
+-                          buffer, dma_handle);
+- out:
+-      return error;
+-}
+-
 +      phy_info->change_count = buffer->ChangeCount;
 +      phy_info->phy_info = le32_to_cpu(buffer->PhyInfo);
-  out_free_consistent:
-       pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
-@@ -1813,6 +2922,12 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc
-       return error;
- }
++
++ out_free_consistent:
++      pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
++                          buffer, dma_handle);
++ out:
++      return error;
++}
++
 +/**
 + *    mptsas_parse_device_info -
 + *    @identify:
@@ -207089,7 +207022,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static void
  mptsas_parse_device_info(struct sas_identify *identify,
                struct mptsas_devinfo *device_info)
-@@ -1872,6 +2987,13 @@ mptsas_parse_device_info(struct sas_iden
+@@ -1872,6 +2987,13 @@
        }
  }
  
@@ -207103,7 +207036,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int mptsas_probe_one_phy(struct device *dev,
                struct mptsas_phyinfo *phy_info, int index, int local)
  {
-@@ -1995,7 +3117,6 @@ static int mptsas_probe_one_phy(struct d
+@@ -1995,7 +3117,6 @@
        ioc = phy_to_ioc(phy_info->phy);
  
        if (phy_info->sas_port_add_phy) {
@@ -207111,20 +207044,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                if (!port) {
                        port = sas_port_alloc_num(dev);
                        if (!port) {
-@@ -2010,14 +3131,16 @@ static int mptsas_probe_one_phy(struct d
+@@ -2010,14 +3131,16 @@
                                goto out;
                        }
                        mptsas_set_port(ioc, phy_info, port);
 -                      dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                          "sas_port_alloc: port=%p dev=%p port_id=%d\n",
 -                          ioc->name, port, dev, port->port_identifier));
+-              }
+-              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sas_port_add_phy: phy_id=%d\n",
+-                  ioc->name, phy_info->phy_id));
 +                      devtprintk(ioc, dev_printk(KERN_DEBUG, &port->dev,
 +                          MYIOC_s_FMT "add port %d, sas_addr (0x%llx)\n",
 +                          ioc->name, port->port_identifier,
 +                          (unsigned long long)phy_info->attached.sas_address));
-               }
--              dsaswideprintk(ioc, printk(MYIOC_s_DEBUG_FMT "sas_port_add_phy: phy_id=%d\n",
--                  ioc->name, phy_info->phy_id));
++              }
                sas_port_add_phy(port, phy_info->phy);
                phy_info->sas_port_add_phy = 0;
 +              devtprintk(ioc, dev_printk(KERN_DEBUG, &phy_info->phy->dev,
@@ -207133,7 +207067,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        }
  
        if (!mptsas_get_rphy(phy_info) && port && !port->rphy) {
-@@ -2027,30 +3150,24 @@ static int mptsas_probe_one_phy(struct d
+@@ -2027,30 +3150,24 @@
                struct sas_identify identify;
  
                parent = dev->parent->parent;
@@ -207171,7 +207105,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
                } else if (scsi_is_sas_rphy(parent)) {
                        struct sas_rphy *parent_rphy = dev_to_rphy(parent);
-@@ -2096,14 +3213,20 @@ static int mptsas_probe_one_phy(struct d
+@@ -2096,14 +3213,20 @@
        return error;
  }
  
@@ -207194,7 +207128,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                goto out;
  
        error = mptsas_sas_io_unit_pg0(ioc, hba);
-@@ -2112,9 +3235,10 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2112,9 +3235,10 @@
  
        mptsas_sas_io_unit_pg1(ioc);
        mutex_lock(&ioc->sas_topology_mutex);
@@ -207207,7 +207141,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                list_add_tail(&port_info->list, &ioc->sas_topology);
        } else {
                for (i = 0; i < hba->num_phys; i++) {
-@@ -2124,21 +3248,30 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2124,21 +3248,30 @@
                                hba->phy_info[i].handle;
                        port_info->phy_info[i].port_id =
                                hba->phy_info[i].port_id;
@@ -207240,7 +207174,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                port_info->phy_info[i].identify.phy_id =
                    port_info->phy_info[i].phy_id = i;
                if (port_info->phy_info[i].attached.handle)
-@@ -2163,249 +3296,12 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
+@@ -2163,249 +3296,12 @@
        return error;
  }
  
@@ -207343,11 +207277,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 -/*
 - * mptsas_delete_expander_phys
 - *
-+/**
-+ *    mptsas_find_phyinfo_by_sas_address -
-+ *    @ioc: Pointer to MPT_ADAPTER structure
-+ *    @sas_address:
-  *
+- *
 - * This will traverse topology, and remove expanders
 - * that are no longer present
 - */
@@ -207491,11 +207421,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 -      kfree(ev);
 -}
 -
++/**
++ *    mptsas_find_phyinfo_by_sas_address -
++ *    @ioc: Pointer to MPT_ADAPTER structure
++ *    @sas_address:
++ *
 + **/
  static struct mptsas_phyinfo *
  mptsas_find_phyinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address)
  {
-@@ -2430,686 +3326,1889 @@ mptsas_find_phyinfo_by_sas_address(MPT_A
+@@ -2430,69 +3326,85 @@
        return phy_info;
  }
  
@@ -207509,29 +207444,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + **/
  static struct mptsas_phyinfo *
 -mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u8 channel, u8 id)
+-{
+-      struct mptsas_portinfo *port_info;
+-      struct mptsas_phyinfo *phy_info = NULL;
+-      int i;
+-
 +mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 phys_disk_num,
 +      u8 channel, u8 id)
- {
++{
 +      struct mptsas_phyinfo *phy_info;
-       struct mptsas_portinfo *port_info;
--      struct mptsas_phyinfo *phy_info = NULL;
++      struct mptsas_portinfo *port_info;
 +      RaidPhysDiskPage1_t *phys_disk = NULL;
 +      int num_paths;
 +      u64 sas_address = 0;
-       int i;
--      mutex_lock(&ioc->sas_topology_mutex);
--      list_for_each_entry(port_info, &ioc->sas_topology, list) {
--              for (i = 0; i < port_info->num_phys; i++) {
--                      if (!mptsas_is_end_device(
--                              &port_info->phy_info[i].attached))
--                              continue;
--                      if (port_info->phy_info[i].attached.id != id)
--                              continue;
--                      if (port_info->phy_info[i].attached.channel != channel)
--                              continue;
--                      phy_info = &port_info->phy_info[i];
--                      break;
++      int i;
++
 +      phy_info = NULL;
 +      if (!ioc->raid_data.pIocPg3)
 +              return NULL;
@@ -207555,23 +207482,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
 +                          sas_address);
 +                      goto out;
-               }
-       }
--      mutex_unlock(&ioc->sas_topology_mutex);
--      return phy_info;
--}
--static struct mptsas_phyinfo *
--mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--      struct mptsas_portinfo *port_info;
--      struct mptsas_phyinfo *phy_info = NULL;
--      int i;
++              }
++      }
++
 + out:
 +      kfree(phys_disk);
 +      if (phy_info)
 +              return phy_info;
++
 +      /*
 +       * Extra code to handle RAID0 case, where the sas_address is not updated
 +       * in phys_disk_page_1 when hotswapped
@@ -207583,14 +207501,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
                        if (!mptsas_is_end_device(
                                &port_info->phy_info[i].attached))
                                continue;
-                       if (port_info->phy_info[i].attached.phys_disk_num == ~0)
-                               continue;
--                      if (port_info->phy_info[i].attached.phys_disk_num != id)
+-                      if (port_info->phy_info[i].attached.id != id)
 -                              continue;
 -                      if (port_info->phy_info[i].attached.channel != channel)
 -                              continue;
 -                      phy_info = &port_info->phy_info[i];
 -                      break;
++                      if (port_info->phy_info[i].attached.phys_disk_num == ~0)
++                              continue;
 +                      if (port_info->phy_info[i].attached.phys_disk_num ==
 +                          phys_disk_num &&
 +                          port_info->phy_info[i].attached.id == id &&
@@ -207602,37 +207520,70 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        return phy_info;
  }
  
+-static struct mptsas_phyinfo *
+-mptsas_find_phyinfo_by_phys_disk_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
+-{
+-      struct mptsas_portinfo *port_info;
+-      struct mptsas_phyinfo *phy_info = NULL;
+-      int i;
+-
+-      mutex_lock(&ioc->sas_topology_mutex);
+-      list_for_each_entry(port_info, &ioc->sas_topology, list) {
+-              for (i = 0; i < port_info->num_phys; i++) {
+-                      if (!mptsas_is_end_device(
+-                              &port_info->phy_info[i].attached))
+-                              continue;
+-                      if (port_info->phy_info[i].attached.phys_disk_num == ~0)
+-                              continue;
+-                      if (port_info->phy_info[i].attached.phys_disk_num != id)
+-                              continue;
+-                      if (port_info->phy_info[i].attached.channel != channel)
+-                              continue;
+-                      phy_info = &port_info->phy_info[i];
+-                      break;
+-              }
+-      }
+-      mutex_unlock(&ioc->sas_topology_mutex);
+-      return phy_info;
+-}
+-
 -/*
 - * Work queue thread to clear the persitency table
 - */
+-static void
+-mptsas_persist_clear_table(struct work_struct *work)
+-{
+-      MPT_ADAPTER *ioc = container_of(work, MPT_ADAPTER, sas_persist_task);
+-
+-      mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
+-}
+-
 +/**
 + *    mptsas_reprobe_lun -
 + *    @sdev:
 + *    @data:
 + *
 + **/
-+static void
-+mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
-+{
-+      int rc;
-+
-+      sdev->no_uld_attach = data ? 1 : 0;
-+      rc = scsi_device_reprobe(sdev);
-+}
-+
+ static void
+ mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
+ {
+@@ -2502,6 +3414,12 @@
+       rc = scsi_device_reprobe(sdev);
+ }
 +/**
 + *    mptsas_reprobe_target -
 + *    @starget:
 + *    @uld_attach:
 + *
 + **/
-+static void
-+mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
-+{
-+      starget_for_each_device(starget, uld_attach ? (void *)1 : NULL,
-+                      mptsas_reprobe_lun);
-+}
-+
+ static void
+ mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
+ {
+@@ -2509,6 +3427,14 @@
+                       mptsas_reprobe_lun);
+ }
 +/**
 + *    mptsas_adding_inactive_raid_components -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -207641,57 +207592,45 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + *
 + *
 + **/
-+static void
-+mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
-+{
-+      CONFIGPARMS                     cfg;
-+      ConfigPageHeader_t              hdr;
-+      dma_addr_t                      dma_handle;
-+      pRaidVolumePage0_t              buffer = NULL;
-+      RaidPhysDiskPage0_t             phys_disk;
-+      int                             i;
+ static void
+ mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
+ {
+@@ -2518,7 +3444,8 @@
+       pRaidVolumePage0_t              buffer = NULL;
+       RaidPhysDiskPage0_t             phys_disk;
+       int                             i;
+-      struct mptsas_hotplug_event     *ev;
 +      struct mptsas_phyinfo           *phy_info;
 +      struct mptsas_devinfo           sas_device;
-+
-+      memset(&cfg, 0 , sizeof(CONFIGPARMS));
-+      memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
-+      hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-+      cfg.pageAddr = (channel << 8) + id;
-+      cfg.cfghdr.hdr = &hdr;
-+      cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
+       memset(&cfg, 0 , sizeof(CONFIGPARMS));
+       memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
+@@ -2526,6 +3453,7 @@
+       cfg.pageAddr = (channel << 8) + id;
+       cfg.cfghdr.hdr = &hdr;
+       cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
 +      cfg.timeout = SAS_CONFIG_PAGE_TIMEOUT;
-+
-+      if (mpt_config(ioc, &cfg) != 0)
-+              goto out;
-+
-+      if (!hdr.PageLength)
-+              goto out;
-+
-+      buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
-+          &dma_handle);
-+
-+      if (!buffer)
-+              goto out;
-+
-+      cfg.physAddr = dma_handle;
-+      cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+      if (mpt_config(ioc, &cfg) != 0)
-+              goto out;
-+
-+      if (!(buffer->VolumeStatus.Flags &
-+          MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE))
-+              goto out;
-+
-+      if (!buffer->NumPhysDisks)
-+              goto out;
-+
-+      for (i = 0; i < buffer->NumPhysDisks; i++) {
-+
-+              if (mpt_raid_phys_disk_pg0(ioc,
-+                  buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
-+                      continue;
-+
+       if (mpt_config(ioc, &cfg) != 0)
+               goto out;
+@@ -2558,20 +3486,16 @@
+                   buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
+                       continue;
+-              ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-              if (!ev) {
+-                      printk(MYIOC_s_WARN_FMT "mptsas: lost hotplug event\n", ioc->name);
+-                      goto out;
+-              }
+-
+-              INIT_WORK(&ev->work, mptsas_hotplug_work);
+-              ev->ioc = ioc;
+-              ev->id = phys_disk.PhysDiskID;
+-              ev->channel = phys_disk.PhysDiskBus;
+-              ev->phys_disk_num_valid = 1;
+-              ev->phys_disk_num = phys_disk.PhysDiskNum;
+-              ev->event_type = MPTSAS_ADD_DEVICE;
+-              schedule_work(&ev->work);
 +              if (mptsas_sas_device_pg0(ioc, &sas_device,
 +                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
 +                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
@@ -207702,13 +207641,24 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
 +                  sas_device.sas_address);
 +              mptsas_add_end_device(ioc, phy_info);
-+      }
-+
-+ out:
-+      if (buffer)
-+              pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
-+                  dma_handle);
-+}
+       }
+  out:
+@@ -2579,421 +3503,619 @@
+               pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
+                   dma_handle);
+ }
+-/*
+- * Work queue thread to handle SAS hotplug events
+- */
+-static void
+-mptsas_hotplug_work(struct work_struct *work)
+-{
+-      struct mptsas_hotplug_event *ev =
+-              container_of(work, struct mptsas_hotplug_event, work);
+-
+-      MPT_ADAPTER *ioc = ev->ioc;
+-      struct mptsas_phyinfo *phy_info;
 +
 +/**
 + *    mptsas_add_end_device - report a new end device to sas transport layer
@@ -207721,10 +207671,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +static int
 +mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info)
 +{
-+      struct sas_rphy *rphy;
-+      struct sas_port *port;
-+      struct sas_identify identify;
-+      char *ds = NULL;
+       struct sas_rphy *rphy;
+       struct sas_port *port;
+-      struct scsi_device *sdev;
+-      struct scsi_target * starget;
+       struct sas_identify identify;
+       char *ds = NULL;
 +      u8 fw_id;
 +
 +      if (!phy_info) {
@@ -207920,8 +207872,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +{
 +      struct mptsas_phyinfo *phy_info;
 +      struct scsi_target *starget;
-+      struct mptsas_devinfo sas_device;
-+      VirtTarget *vtarget;
+       struct mptsas_devinfo sas_device;
+       VirtTarget *vtarget;
+-      VirtDevice *vdevice;
+-
+-      mutex_lock(&ioc->sas_discovery_mutex);
+-      switch (ev->event_type) {
 +      enum device_state state;
 +      int i;
 +
@@ -207974,8 +207930,118 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      mptsas_add_end_device(ioc, phy_info);
 +              break;
 +
-+      case MPTSAS_DEL_DEVICE:
-+
+       case MPTSAS_DEL_DEVICE:
+-              phy_info = NULL;
+-              if (ev->phys_disk_num_valid) {
+-                      if (ev->hidden_raid_component){
+-                              if (mptsas_sas_device_pg0(ioc, &sas_device,
+-                                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+-                                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+-                                  (ev->channel << 8) + ev->id)) {
+-                                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                                      "%s: exit at line=%d\n", ioc->name,
+-                                              __func__, __LINE__));
+-                                      break;
+-                              }
+-                              phy_info = mptsas_find_phyinfo_by_sas_address(
+-                                  ioc, sas_device.sas_address);
+-                      }else
+-                              phy_info = mptsas_find_phyinfo_by_phys_disk_num(
+-                                  ioc, ev->channel, ev->phys_disk_num);
+-              }
+-
+-              if (!phy_info)
+-                      phy_info = mptsas_find_phyinfo_by_target(ioc,
+-                          ev->channel, ev->id);
+-
+-              /*
+-               * Sanity checks, for non-existing phys and remote rphys.
+-               */
+-              if (!phy_info){
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break;
+-              }
+-              if (!phy_info->port_details) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break;
+-              }
+-              rphy = mptsas_get_rphy(phy_info);
+-              if (!rphy) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break;
+-              }
+-
+-              port = mptsas_get_port(phy_info);
+-              if (!port) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break;
+-              }
+-
+-              starget = mptsas_get_starget(phy_info);
+-              if (starget) {
+-                      vtarget = starget->hostdata;
+-
+-                      if (!vtarget) {
+-                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                                      "%s: exit at line=%d\n", ioc->name,
+-                                      __func__, __LINE__));
+-                              break;
+-                      }
+-
+-                      /*
+-                       * Handling  RAID components
+-                       */
+-                      if (ev->phys_disk_num_valid &&
+-                          ev->hidden_raid_component) {
+-                              printk(MYIOC_s_INFO_FMT
+-                                  "RAID Hidding: channel=%d, id=%d, "
+-                                  "physdsk %d \n", ioc->name, ev->channel,
+-                                  ev->id, ev->phys_disk_num);
+-                              vtarget->id = ev->phys_disk_num;
+-                              vtarget->tflags |=
+-                                  MPT_TARGET_FLAGS_RAID_COMPONENT;
+-                              mptsas_reprobe_target(starget, 1);
+-                              phy_info->attached.phys_disk_num =
+-                                  ev->phys_disk_num;
+-                      break;
+-                      }
+-              }
+-
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_SSP_TARGET)
+-                      ds = "ssp";
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_STP_TARGET)
+-                      ds = "stp";
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_SATA_DEVICE)
+-                      ds = "sata";
+-
+-              printk(MYIOC_s_INFO_FMT
+-                     "removing %s device, channel %d, id %d, phy %d\n",
+-                     ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
+-              dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT
+-                  "delete port (%d)\n", ioc->name, port->port_identifier);
+-              sas_port_delete(port);
+-              mptsas_port_delete(ioc, phy_info->port_details);
+-              break;
+-      case MPTSAS_ADD_DEVICE:
+-
+-              if (ev->phys_disk_num_valid)
+-                      mpt_findImVolumes(ioc);
+-
+-              /*
+-               * Refresh sas device pg0 data
+-               */
 +              if (!ioc->disable_hotplug_remove) {
 +                      phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
 +                          hot_plug_info->sas_address);
@@ -207995,9 +208061,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +
 +      case MPTSAS_ADD_PHYSDISK_REPROBE:
 +
-+              if (mptsas_sas_device_pg0(ioc, &sas_device,
-+                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
-+                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+               if (mptsas_sas_device_pg0(ioc, &sas_device,
+                   (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
+                    MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
+-                      (ev->channel << 8) + ev->id)) {
 +                  (hot_plug_info->channel << 8) + hot_plug_info->id)) {
 +                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
 +                      "%s: fw_id=%d exit at line=%d\n", ioc->name,
@@ -208051,23 +208118,112 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
 +                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
 +                      (hot_plug_info->channel << 8) + hot_plug_info->id)) {
-+                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+                               dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                                      "%s: exit at line=%d\n", ioc->name,
+-                                      __func__, __LINE__));
+-                      break;
+-              }
+-
+-              __mptsas_discovery_work(ioc);
 +                                  "%s: fw_id=%d exit at line=%d\n",
 +                                  ioc->name, __func__,
 +                                  hot_plug_info->id, __LINE__));
 +                      break;
 +              }
-+
-+              phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
-+                              sas_device.sas_address);
+               phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
+                               sas_device.sas_address);
+-
+-              if (!phy_info || !phy_info->port_details) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
 +              if (!phy_info) {
 +                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
 +                          "%s: fw_id=%d exit at line=%d\n", ioc->name,
 +                          __func__, hot_plug_info->id, __LINE__));
-+                      break;
-+              }
-+
-+              starget = mptsas_get_starget(phy_info);
+                       break;
+               }
+               starget = mptsas_get_starget(phy_info);
+-              if (starget && (!ev->hidden_raid_component)){
+-
+-                      vtarget = starget->hostdata;
+-
+-                      if (!vtarget) {
+-                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                                  "%s: exit at line=%d\n", ioc->name,
+-                                  __func__, __LINE__));
+-                              break;
+-                      }
+-                      /*
+-                       * Handling  RAID components
+-                       */
+-                      if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
+-                              printk(MYIOC_s_INFO_FMT
+-                                  "RAID Exposing: channel=%d, id=%d, "
+-                                  "physdsk %d \n", ioc->name, ev->channel,
+-                                  ev->id, ev->phys_disk_num);
+-                              vtarget->tflags &=
+-                                  ~MPT_TARGET_FLAGS_RAID_COMPONENT;
+-                              vtarget->id = ev->id;
+-                              mptsas_reprobe_target(starget, 0);
+-                              phy_info->attached.phys_disk_num = ~0;
+-                      }
+-                      break;
+-              }
+-
+-              if (mptsas_get_rphy(phy_info)) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      if (ev->channel) printk("%d\n", __LINE__);
+-                      break;
+-              }
+-
+-              port = mptsas_get_port(phy_info);
+-              if (!port) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break;
+-              }
+-              memcpy(&phy_info->attached, &sas_device,
+-                  sizeof(struct mptsas_devinfo));
+-
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_SSP_TARGET)
+-                      ds = "ssp";
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_STP_TARGET)
+-                      ds = "stp";
+-              if (phy_info->attached.device_info &
+-                  MPI_SAS_DEVICE_INFO_SATA_DEVICE)
+-                      ds = "sata";
+-
+-              printk(MYIOC_s_INFO_FMT
+-                     "attaching %s device, channel %d, id %d, phy %d\n",
+-                     ioc->name, ds, ev->channel, ev->id, ev->phy_id);
+-
+-              mptsas_parse_device_info(&identify, &phy_info->attached);
+-              rphy = sas_end_device_alloc(port);
+-              if (!rphy) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      break; /* non-fatal: an rphy can be added later */
+-              }
+-
+-              rphy->identify = identify;
+-              if (sas_rphy_add(rphy)) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
+-                              "%s: exit at line=%d\n", ioc->name,
+-                              __func__, __LINE__));
+-                      sas_rphy_free(rphy);
+-                      break;
+-              }
+-              mptsas_set_rphy(ioc, phy_info, rphy);
+-              break;
 +              if (!starget) {
 +                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
 +                          "%s: fw_id=%d exit at line=%d\n", ioc->name,
@@ -208106,7 +208262,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  hot_plug_info->channel, hot_plug_info->id);
 +              break;
 +
-+      case MPTSAS_ADD_RAID:
+       case MPTSAS_ADD_RAID:
+-              sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
+-                  ev->id, 0);
+-              if (sdev) {
+-                      scsi_device_put(sdev);
+-                      break;
+-              }
+-              printk(MYIOC_s_INFO_FMT
+-                     "attaching raid volume, channel %d, id %d\n",
+-                     ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
+-              scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0);
+-              mpt_findImVolumes(ioc);
+-              break;
 +
 +              mpt_findImVolumes(ioc);
 +              printk(MYIOC_s_INFO_FMT "attaching raid volume, channel %d, "
@@ -208116,7 +208284,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  hot_plug_info->id, 0);
 +              break;
 +
-+      case MPTSAS_DEL_RAID:
+       case MPTSAS_DEL_RAID:
+-              sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
+-                  ev->id, 0);
+-              if (!sdev)
+-                      break;
+-              printk(MYIOC_s_INFO_FMT
+-                     "removing raid volume, channel %d, id %d\n",
+-                     ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
+-              vdevice = sdev->hostdata;
+-              scsi_remove_device(sdev);
+-              scsi_device_put(sdev);
+-              mpt_findImVolumes(ioc);
+-              break;
 +
 +              mpt_findImVolumes(ioc);
 +              printk(MYIOC_s_INFO_FMT "removing raid volume, channel %d, "
@@ -208126,10 +208306,28 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              scsi_device_put(hot_plug_info->sdev);
 +              break;
 +
-+      case MPTSAS_ADD_INACTIVE_VOLUME:
+       case MPTSAS_ADD_INACTIVE_VOLUME:
 +
 +              mpt_findImVolumes(ioc);
-+              mptsas_adding_inactive_raid_components(ioc,
+               mptsas_adding_inactive_raid_components(ioc,
+-                  ev->channel, ev->id);
+-              break;
+-      case MPTSAS_IGNORE_EVENT:
+-      default:
+-              break;
+-      }
+-
+-      mutex_unlock(&ioc->sas_discovery_mutex);
+-      kfree(ev);
+-}
+-
+-static void
+-mptsas_send_sas_event(MPT_ADAPTER *ioc,
+-              EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
+-{
+-      struct mptsas_hotplug_event *ev;
+-      u32 device_info = le32_to_cpu(sas_event_data->DeviceInfo);
+-      __le64 sas_address;
 +                  hot_plug_info->channel, hot_plug_info->id);
 +              break;
 +
@@ -208161,10 +208359,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      sas_event_data = (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)
 +          fw_event->event_data;
 +      device_info = le32_to_cpu(sas_event_data->DeviceInfo);
-+
-+      if ((device_info &
-+           (MPI_SAS_DEVICE_INFO_SSP_TARGET |
-+            MPI_SAS_DEVICE_INFO_STP_TARGET |
+       if ((device_info &
+            (MPI_SAS_DEVICE_INFO_SSP_TARGET |
+             MPI_SAS_DEVICE_INFO_STP_TARGET |
+-            MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0)
+-              return;
 +            MPI_SAS_DEVICE_INFO_SATA_DEVICE)) == 0) {
 +              mptsas_free_fw_event(ioc, fw_event);
 +              return;
@@ -208177,35 +208377,102 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              mptsas_free_fw_event(ioc, fw_event);
 +              return;
 +      }
-+
-+      switch (sas_event_data->ReasonCode) {
-+      case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
-+      case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
+       switch (sas_event_data->ReasonCode) {
+       case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
+-
+-              mptsas_target_reset_queue(ioc, sas_event_data);
+-              break;
+-
+       case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
+-              ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-              if (!ev) {
+-                      printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
+-                      break;
+-              }
+-
+-              INIT_WORK(&ev->work, mptsas_hotplug_work);
+-              ev->ioc = ioc;
+-              ev->handle = le16_to_cpu(sas_event_data->DevHandle);
+-              ev->parent_handle =
+-                  le16_to_cpu(sas_event_data->ParentDevHandle);
+-              ev->channel = sas_event_data->Bus;
+-              ev->id = sas_event_data->TargetID;
+-              ev->phy_id = sas_event_data->PhyNum;
 +              memset(&hot_plug_info, 0, sizeof(struct mptsas_hotplug_event));
 +              hot_plug_info.handle = le16_to_cpu(sas_event_data->DevHandle);
 +              hot_plug_info.channel = sas_event_data->Bus;
 +              hot_plug_info.id = sas_event_data->TargetID;
 +              hot_plug_info.phy_id = sas_event_data->PhyNum;
-+              memcpy(&sas_address, &sas_event_data->SASAddress,
+               memcpy(&sas_address, &sas_event_data->SASAddress,
+-                  sizeof(__le64));
+-              ev->sas_address = le64_to_cpu(sas_address);
+-              ev->device_info = device_info;
+-
 +                  sizeof(u64));
 +              hot_plug_info.sas_address = le64_to_cpu(sas_address);
 +              hot_plug_info.device_info = device_info;
-+              if (sas_event_data->ReasonCode &
-+                  MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
+               if (sas_event_data->ReasonCode &
+                   MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
+-                      ev->event_type = MPTSAS_ADD_DEVICE;
 +                      hot_plug_info.event_type = MPTSAS_ADD_DEVICE;
-+              else
+               else
+-                      ev->event_type = MPTSAS_DEL_DEVICE;
+-              schedule_work(&ev->work);
+-              break;
 +                      hot_plug_info.event_type = MPTSAS_DEL_DEVICE;
 +              mptsas_hotplug_work(ioc, fw_event, &hot_plug_info);
 +              break;
 +
-+      case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
+       case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
+-      /*
+-       * Persistent table is full.
+-       */
+-              INIT_WORK(&ioc->sas_persist_task,
+-                  mptsas_persist_clear_table);
+-              schedule_work(&ioc->sas_persist_task);
+-              break;
+-      /*
+-       * TODO, handle other events
+-       */
 +              mptbase_sas_persist_operation(ioc,
 +                  MPI_SAS_OP_CLEAR_NOT_PRESENT);
 +              mptsas_free_fw_event(ioc, fw_event);
 +              break;
 +
-+      case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
-+      case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
+       case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
+-      case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
+       case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
+-      case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
+-      case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
+-      case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
+-      case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
+-      default:
+-              break;
+-      }
+-}
+-static void
+-mptsas_send_raid_event(MPT_ADAPTER *ioc,
+-              EVENT_DATA_RAID *raid_event_data)
+-{
+-      struct mptsas_hotplug_event *ev;
+-      int status = le32_to_cpu(raid_event_data->SettingsStatus);
+-      int state = (status >> 8) & 0xff;
+-
+-      if (ioc->bus_type != SAS)
+-              return;
+-
+-      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-      if (!ev) {
+-              printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
+-              return;
+-      }
+-
+-      INIT_WORK(&ev->work, mptsas_hotplug_work);
+-      ev->ioc = ioc;
+-      ev->id = raid_event_data->VolumeID;
+-      ev->channel = raid_event_data->VolumeBus;
+-      ev->event_type = MPTSAS_IGNORE_EVENT;
 +      default:
 +              mptsas_free_fw_event(ioc, fw_event);
 +              break;
@@ -208257,18 +208524,30 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      devtprintk(ioc, printk(MYIOC_s_INFO_FMT "Entering %s: "
 +          "ReasonCode=%02x\n", ioc->name, __func__,
 +          raid_event_data->ReasonCode));
-+
-+      switch (raid_event_data->ReasonCode) {
-+      case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
+       switch (raid_event_data->ReasonCode) {
+       case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
+-              ev->phys_disk_num_valid = 1;
+-              ev->phys_disk_num = raid_event_data->PhysDiskNum;
+-              ev->event_type = MPTSAS_ADD_DEVICE;
 +              hot_plug_info.event_type = MPTSAS_DEL_PHYSDISK_REPROBE;
-+              break;
-+      case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
+               break;
+       case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
+-              ev->phys_disk_num_valid = 1;
+-              ev->phys_disk_num = raid_event_data->PhysDiskNum;
+-              ev->hidden_raid_component = 1;
+-              ev->event_type = MPTSAS_DEL_DEVICE;
 +              hot_plug_info.event_type = MPTSAS_ADD_PHYSDISK_REPROBE;
-+              break;
-+      case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
-+              switch (state) {
-+              case MPI_PD_STATE_ONLINE:
-+              case MPI_PD_STATE_NOT_COMPATIBLE:
+               break;
+       case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
+               switch (state) {
+               case MPI_PD_STATE_ONLINE:
+               case MPI_PD_STATE_NOT_COMPATIBLE:
+-                      ev->phys_disk_num_valid = 1;
+-                      ev->phys_disk_num = raid_event_data->PhysDiskNum;
+-                      ev->hidden_raid_component = 1;
+-                      ev->event_type = MPTSAS_ADD_DEVICE;
+-                      break;
 +                      mpt_raid_phys_disk_pg0(ioc,
 +                          raid_event_data->PhysDiskNum, &phys_disk);
 +                      hot_plug_info.id = phys_disk.PhysDiskID;
@@ -208276,30 +208555,35 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      hot_plug_info.event_type = MPTSAS_ADD_PHYSDISK;
 +                      break;
 +              case MPI_PD_STATE_FAILED:
-+              case MPI_PD_STATE_MISSING:
-+              case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
-+              case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
-+              case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
+               case MPI_PD_STATE_MISSING:
+               case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
+               case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
+               case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
+-                      ev->phys_disk_num_valid = 1;
+-                      ev->phys_disk_num = raid_event_data->PhysDiskNum;
+-                      ev->event_type = MPTSAS_DEL_DEVICE;
 +                      hot_plug_info.event_type = MPTSAS_DEL_PHYSDISK;
-+                      break;
-+              default:
-+                      break;
-+              }
-+              break;
-+      case MPI_EVENT_RAID_RC_VOLUME_DELETED:
+                       break;
+               default:
+                       break;
+               }
+               break;
+       case MPI_EVENT_RAID_RC_VOLUME_DELETED:
+-              ev->event_type = MPTSAS_DEL_RAID;
 +              if (!sdev)
 +                      break;
 +              vdevice->vtarget->deleted = 1; /* block IO */
 +              hot_plug_info.event_type = MPTSAS_DEL_RAID;
-+              break;
-+      case MPI_EVENT_RAID_RC_VOLUME_CREATED:
+               break;
+       case MPI_EVENT_RAID_RC_VOLUME_CREATED:
+-              ev->event_type = MPTSAS_ADD_RAID;
 +              if (sdev) {
 +                      scsi_device_put(sdev);
 +                      break;
 +              }
 +              hot_plug_info.event_type = MPTSAS_ADD_RAID;
-+              break;
-+      case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
+               break;
+       case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
 +              if (!(status & MPI_RAIDVOL0_STATUS_FLAG_ENABLED)) {
 +                      if (!sdev)
 +                              break;
@@ -208307,29 +208591,61 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      hot_plug_info.event_type = MPTSAS_DEL_RAID;
 +                      break;
 +              }
-+              switch (state) {
-+              case MPI_RAIDVOL0_STATUS_STATE_FAILED:
-+              case MPI_RAIDVOL0_STATUS_STATE_MISSING:
+               switch (state) {
+               case MPI_RAIDVOL0_STATUS_STATE_FAILED:
+               case MPI_RAIDVOL0_STATUS_STATE_MISSING:
+-                      ev->event_type = MPTSAS_DEL_RAID;
 +                      if (!sdev)
 +                              break;
 +                      vdevice->vtarget->deleted = 1; /* block IO */
 +                      hot_plug_info.event_type = MPTSAS_DEL_RAID;
-+                      break;
-+              case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
-+              case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
+                       break;
+               case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
+               case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
+-                      ev->event_type = MPTSAS_ADD_RAID;
 +                      if (sdev) {
 +                              scsi_device_put(sdev);
 +                              break;
 +                      }
 +                      hot_plug_info.event_type = MPTSAS_ADD_RAID;
-+                      break;
-+              default:
-+                      break;
-+              }
-+              break;
-+      default:
-+              break;
-+      }
+                       break;
+               default:
+                       break;
+@@ -3002,114 +4124,1091 @@
+       default:
+               break;
+       }
+-      schedule_work(&ev->work);
+-}
+-
+-static void
+-mptsas_send_discovery_event(MPT_ADAPTER *ioc,
+-      EVENT_DATA_SAS_DISCOVERY *discovery_data)
+-{
+-      struct mptsas_discovery_event *ev;
+-
+-      /*
+-       * DiscoveryStatus
+-       *
+-       * This flag will be non-zero when firmware
+-       * kicks off discovery, and return to zero
+-       * once its completed.
+-       */
+-      if (discovery_data->DiscoveryStatus)
+-              return;
+-
+-      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-      if (!ev)
+-              return;
+-      INIT_WORK(&ev->work, mptsas_discovery_work);
+-      ev->ioc = ioc;
+-      schedule_work(&ev->work);
+-};
+-
+-/*
+- * mptsas_send_ir2_event - handle exposing hidden disk when
+- * an inactive raid volume is added
+- *
 +
 +      if (hot_plug_info.event_type != MPTSAS_IGNORE_EVENT)
 +              mptsas_hotplug_work(ioc, fw_event, &hot_plug_info);
@@ -208616,18 +208932,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  ioc->sas_index, 0);
 +}
 +
- static void
--mptsas_persist_clear_table(struct work_struct *work)
++static void
 +mptsas_expander_event_add(MPT_ADAPTER *ioc,
 +    MpiEventDataSasExpanderStatusChange_t *expander_data)
- {
--      MPT_ADAPTER *ioc = container_of(work, MPT_ADAPTER, sas_persist_task);
++{
 +      struct mptsas_portinfo *port_info;
 +      int i;
 +      __le64 sas_address;
--      mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
--}
++
 +      port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_KERNEL);
 +      if (!port_info)
 +              BUG();
@@ -208647,59 +208959,58 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              port_info->phy_info[i].identify.handle_parent =
 +                  le16_to_cpu(expander_data->ParentDevHandle);
 +      }
--static void
--mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
--{
--      int rc;
++
 +      mutex_lock(&ioc->sas_topology_mutex);
 +      list_add_tail(&port_info->list, &ioc->sas_topology);
 +      mutex_unlock(&ioc->sas_topology_mutex);
--      sdev->no_uld_attach = data ? 1 : 0;
--      rc = scsi_device_reprobe(sdev);
--}
++
 +      printk(MYIOC_s_INFO_FMT "add expander: num_phys %d, "
 +          "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys,
 +          (unsigned long long)sas_address);
--static void
--mptsas_reprobe_target(struct scsi_target *starget, int uld_attach)
--{
--      starget_for_each_device(starget, uld_attach ? (void *)1 : NULL,
--                      mptsas_reprobe_lun);
++
 +      mptsas_expander_refresh(ioc, port_info);
- }
++}
++
 +/**
 + * mptsas_delete_expander_siblings - remove siblings attached to expander
-+ * @ioc: Pointer to MPT_ADAPTER structure
+  * @ioc: Pointer to MPT_ADAPTER structure
+- * @ir2_data
+- *
+- */
+-static void
+-mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data)
+-{
+-      struct mptsas_hotplug_event *ev;
+-
+-      if (ir2_data->ReasonCode !=
+-          MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED)
+-              return;
+-
+-      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
+-      if (!ev)
+-              return;
+-
+-      INIT_WORK(&ev->work, mptsas_hotplug_work);
+-      ev->ioc = ioc;
+-      ev->id = ir2_data->TargetID;
+-      ev->channel = ir2_data->Bus;
+-      ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME;
+-
+-      schedule_work(&ev->work);
+-};
+-
 + * @parent: the parent port_info object
 + * @expander: the expander port_info object
 + **/
- static void
--mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id)
++static void
 +mptsas_delete_expander_siblings(MPT_ADAPTER *ioc, struct mptsas_portinfo
 +    *parent, struct mptsas_portinfo *expander)
- {
--      CONFIGPARMS                     cfg;
--      ConfigPageHeader_t              hdr;
--      dma_addr_t                      dma_handle;
--      pRaidVolumePage0_t              buffer = NULL;
--      RaidPhysDiskPage0_t             phys_disk;
--      int                             i;
--      struct mptsas_hotplug_event     *ev;
++{
 +      struct mptsas_phyinfo *phy_info;
 +      struct mptsas_portinfo *port_info;
 +      struct sas_rphy *rphy;
 +      int i;
--      memset(&cfg, 0 , sizeof(CONFIGPARMS));
--      memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
--      hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
--      cfg.pageAddr = (channel << 8) + id;
--      cfg.cfghdr.hdr = &hdr;
--      cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
++
 +      phy_info = expander->phy_info;
 +      for (i = 0; i < expander->num_phys; i++, phy_info++) {
 +              if (!(rphy = mptsas_get_rphy(phy_info)))
@@ -208707,9 +209018,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              if (rphy->identify.device_type == SAS_END_DEVICE)
 +                      mptsas_del_end_device(ioc, phy_info);
 +      }
--      if (mpt_config(ioc, &cfg) != 0)
--              goto out;
++
 +      phy_info = expander->phy_info;
 +      for (i = 0; i < expander->num_phys; i++, phy_info++) {
 +              if (!(rphy = mptsas_get_rphy(phy_info)))
@@ -208728,27 +209037,19 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              }
 +      }
 +}
--      if (!hdr.PageLength)
--              goto out;
--      buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
--          &dma_handle);
++
++
 +/**
 + *    mptsas_expander_delete - remove this expander
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @port_info: expander port_info struct
 + *
 + **/
--      if (!buffer)
--              goto out;
++
 +static void
 +mptsas_expander_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
 +{
--      cfg.physAddr = dma_handle;
--      cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
++
 +      struct mptsas_portinfo *parent;
 +      int             i;
 +      u64             expander_sas_address;
@@ -208756,33 +209057,22 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      struct mptsas_portinfo buffer;
 +      struct mptsas_portinfo_details *port_details;
 +      struct sas_port *port;
--      if (mpt_config(ioc, &cfg) != 0)
--              goto out;
++
 +      if (!port_info)
 +              return;
--      if (!(buffer->VolumeStatus.Flags &
--          MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE))
--              goto out;
++
 +      /* see if expander is still there before deleting */
 +      mptsas_sas_expander_pg0(ioc, &buffer,
 +          (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
 +          MPI_SAS_EXPAND_PGAD_FORM_SHIFT),
 +          port_info->phy_info[0].identify.handle);
--      if (!buffer->NumPhysDisks)
--              goto out;
++
 +      if (buffer.num_phys) {
 +              kfree(buffer.phy_info);
 +              return;
 +      }
--      for (i = 0; i < buffer->NumPhysDisks; i++) {
--              if (mpt_raid_phys_disk_pg0(ioc,
--                  buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
--                      continue;
++
++
 +      /*
 +       * Obtain the port_info instance to the parent port
 +       */
@@ -208794,11 +209084,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      mptsas_delete_expander_siblings(ioc, parent, port_info);
 +      if (!parent)
 +              goto out;
--              ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--              if (!ev) {
--                      printk(MYIOC_s_WARN_FMT "mptsas: lost hotplug event\n", ioc->name);
--                      goto out;
++
 +      /*
 +       * Delete rphys in the parent that point
 +       * to this expander.
@@ -208814,16 +209100,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              if (!port) {
 +                      port = mptsas_get_port(phy_info);
 +                      port_details = phy_info->port_details;
-               }
--
--              INIT_WORK(&ev->work, mptsas_hotplug_work);
--              ev->ioc = ioc;
--              ev->id = phys_disk.PhysDiskID;
--              ev->channel = phys_disk.PhysDiskBus;
--              ev->phys_disk_num_valid = 1;
--              ev->phys_disk_num = phys_disk.PhysDiskNum;
--              ev->event_type = MPTSAS_ADD_DEVICE;
--              schedule_work(&ev->work);
++              }
 +              dev_printk(KERN_DEBUG, &phy_info->phy->dev,
 +                  MYIOC_s_FMT "delete phy %d, phy-obj (0x%p)\n", ioc->name,
 +                  phy_info->phy_id, phy_info->phy);
@@ -208836,12 +209113,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  (unsigned long long)expander_sas_address);
 +              sas_port_delete(port);
 +              mptsas_port_delete(ioc, port_details);
-       }
--
-  out:
--      if (buffer)
--              pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
--                  dma_handle);
++      }
++ out:
 +
 +      printk(MYIOC_s_INFO_FMT "delete expander: num_phys %d, "
 +          "sas_addr (0x%llx)\n",  ioc->name, port_info->num_phys,
@@ -208853,9 +209126,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      list_del(&port_info->list);
 +      kfree(port_info->phy_info);
 +      kfree(port_info);
- }
--/*
-- * Work queue thread to handle SAS hotplug events
++}
 +
 +
 +/**
@@ -208866,30 +209137,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + *
 + * This function handles adding, removing, and refreshing
 + * device handles within the expander objects.
-  */
- static void
--mptsas_hotplug_work(struct work_struct *work)
++ */
++static void
 +mptsas_send_expander_event(struct fw_event_work *fw_event)
- {
--      struct mptsas_hotplug_event *ev =
--              container_of(work, struct mptsas_hotplug_event, work);
++{
 +      MPT_ADAPTER *ioc;
 +      MpiEventDataSasExpanderStatusChange_t *expander_data;
 +      struct mptsas_portinfo *port_info;
 +      __le64 sas_address;
 +      int i;
--      MPT_ADAPTER *ioc = ev->ioc;
--      struct mptsas_phyinfo *phy_info;
--      struct sas_rphy *rphy;
--      struct sas_port *port;
--      struct scsi_device *sdev;
--      struct scsi_target * starget;
--      struct sas_identify identify;
--      char *ds = NULL;
--      struct mptsas_devinfo sas_device;
--      VirtTarget *vtarget;
--      VirtDevice *vdevice;
++
 +      ioc = fw_event->ioc;
 +      expander_data = (MpiEventDataSasExpanderStatusChange_t *)
 +          fw_event->event_data;
@@ -208913,35 +209170,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      } else if (expander_data->ReasonCode ==
 +          MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING)
 +              mptsas_expander_delete(ioc, port_info);
--      mutex_lock(&ioc->sas_discovery_mutex);
--      switch (ev->event_type) {
--      case MPTSAS_DEL_DEVICE:
++
 +      mptsas_free_fw_event(ioc, fw_event);
 +}
--              phy_info = NULL;
--              if (ev->phys_disk_num_valid) {
--                      if (ev->hidden_raid_component){
--                              if (mptsas_sas_device_pg0(ioc, &sas_device,
--                                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
--                                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
--                                  (ev->channel << 8) + ev->id)) {
--                                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                                      "%s: exit at line=%d\n", ioc->name,
--                                              __func__, __LINE__));
--                                      break;
--                              }
--                              phy_info = mptsas_find_phyinfo_by_sas_address(
--                                  ioc, sas_device.sas_address);
--                      }else
--                              phy_info = mptsas_find_phyinfo_by_phys_disk_num(
--                                  ioc, ev->channel, ev->phys_disk_num);
--              }
--              if (!phy_info)
--                      phy_info = mptsas_find_phyinfo_by_target(ioc,
--                          ev->channel, ev->id);
++
++
 +/**
 + * mptsas_expander_add -
 + * @ioc: Pointer to MPT_ADAPTER structure
@@ -208953,41 +209186,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +{
 +      struct mptsas_portinfo buffer, *port_info;
 +      int i;
--              /*
--               * Sanity checks, for non-existing phys and remote rphys.
--               */
--              if (!phy_info){
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
--              }
--              if (!phy_info->port_details) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
--              }
--              rphy = mptsas_get_rphy(phy_info);
--              if (!rphy) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
--              }
++
 +      if ((mptsas_sas_expander_pg0(ioc, &buffer,
 +          (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
 +          MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle)))
 +              return NULL;
--              port = mptsas_get_port(phy_info);
--              if (!port) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
--              }
++
 +      port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_ATOMIC);
 +      if (!port_info) {
 +              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
@@ -209008,10 +209212,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      mptsas_expander_refresh(ioc, port_info);
 +      return port_info;
 +}
--              starget = mptsas_get_starget(phy_info);
--              if (starget) {
--                      vtarget = starget->hostdata;
++
 +static void
 +mptsas_send_link_status_event(struct fw_event_work *fw_event)
 +{
@@ -209022,32 +209223,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      __le64 sas_address;
 +      u8 phy_num;
 +      u8 link_rate;
--                      if (!vtarget) {
--                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                                      "%s: exit at line=%d\n", ioc->name,
--                                      __func__, __LINE__));
--                              break;
--                      }
++
 +      ioc = fw_event->ioc;
 +      link_data = (MpiEventDataSasPhyLinkStatus_t *)fw_event->event_data;
--                      /*
--                       * Handling  RAID components
--                       */
--                      if (ev->phys_disk_num_valid &&
--                          ev->hidden_raid_component) {
--                              printk(MYIOC_s_INFO_FMT
--                                  "RAID Hidding: channel=%d, id=%d, "
--                                  "physdsk %d \n", ioc->name, ev->channel,
--                                  ev->id, ev->phys_disk_num);
--                              vtarget->id = ev->phys_disk_num;
--                              vtarget->tflags |=
--                                  MPT_TARGET_FLAGS_RAID_COMPONENT;
--                              mptsas_reprobe_target(starget, 1);
--                              phy_info->attached.phys_disk_num =
--                                  ev->phys_disk_num;
--                      break;
++
 +      memcpy(&sas_address, &link_data->SASAddress, sizeof(__le64));
 +      sas_address = le64_to_cpu(sas_address);
 +      link_rate = link_data->LinkRates >> 4;
@@ -209069,9 +209248,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                                  le16_to_cpu(link_data->DevHandle));
 +                              if (port_info)
 +                                      goto out;
-                       }
++                      }
 +                      goto out;
-               }
++              }
 +              if (port_info == ioc->hba_port_info)
 +                      mptsas_probe_hba_phys(ioc);
 +              else
@@ -209091,41 +209270,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + out:
 +      mptsas_free_fw_event(ioc, fw_event);
 +}
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_SSP_TARGET)
--                      ds = "ssp";
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_STP_TARGET)
--                      ds = "stp";
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_SATA_DEVICE)
--                      ds = "sata";
--
--              printk(MYIOC_s_INFO_FMT
--                     "removing %s device, channel %d, id %d, phy %d\n",
--                     ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
--              dev_printk(KERN_DEBUG, &port->dev, MYIOC_s_FMT
--                  "delete port (%d)\n", ioc->name, port->port_identifier);
--              sas_port_delete(port);
--              mptsas_port_delete(ioc, phy_info->port_details);
--              break;
--      case MPTSAS_ADD_DEVICE:
--
--              if (ev->phys_disk_num_valid)
--                      mpt_findImVolumes(ioc);
--              /*
--               * Refresh sas device pg0 data
--               */
--              if (mptsas_sas_device_pg0(ioc, &sas_device,
--                  (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
--                   MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
--                      (ev->channel << 8) + ev->id)) {
--                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                                      "%s: exit at line=%d\n", ioc->name,
--                                      __func__, __LINE__));
--                      break;
++
++
 +static void
 +mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
 +{
@@ -209161,18 +209307,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                              channel = MPTSAS_RAID_CHANNEL;
 +                              goto out;
 +                      }
-               }
--
--              __mptsas_discovery_work(ioc);
--
--              phy_info = mptsas_find_phyinfo_by_sas_address(ioc,
--                              sas_device.sas_address);
--
--              if (!phy_info || !phy_info->port_details) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
++              }
 +      } else {
 +              list_for_each_entry(sas_info, &ioc->sas_device_info_list,
 +                  list) {
@@ -209186,35 +209321,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                              channel = sas_info->os.channel;
 +                              goto out;
 +                      }
-               }
--              starget = mptsas_get_starget(phy_info);
--              if (starget && (!ev->hidden_raid_component)){
++              }
++
 +      }
--                      vtarget = starget->hostdata;
++
 + out:
 +      mutex_unlock(&ioc->sas_device_info_mutex);
--                      if (!vtarget) {
--                              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                                  "%s: exit at line=%d\n", ioc->name,
--                                  __func__, __LINE__));
--                              break;
--                      }
--                      /*
--                       * Handling  RAID components
--                       */
--                      if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
--                              printk(MYIOC_s_INFO_FMT
--                                  "RAID Exposing: channel=%d, id=%d, "
--                                  "physdsk %d \n", ioc->name, ev->channel,
--                                  ev->id, ev->phys_disk_num);
--                              vtarget->tflags &=
--                                  ~MPT_TARGET_FLAGS_RAID_COMPONENT;
--                              vtarget->id = ev->id;
--                              mptsas_reprobe_target(starget, 0);
--                              phy_info->attached.phys_disk_num = ~0;
++
 +      if (id != -1) {
 +              shost_for_each_device(sdev, ioc->sh) {
 +                      if (sdev->id == id && sdev->channel == channel) {
@@ -209239,40 +209352,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                              else if (depth == 0)
 +                                      sdev_printk(KERN_INFO, sdev,
 +                                      "Queue depth not changed yet\n");
-                       }
--                      break;
--              }
--
--              if (mptsas_get_rphy(phy_info)) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      if (ev->channel) printk("%d\n", __LINE__);
--                      break;
-               }
++                      }
++              }
 +      }
--              port = mptsas_get_port(phy_info);
--              if (!port) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break;
--              }
--              memcpy(&phy_info->attached, &sas_device,
--                  sizeof(struct mptsas_devinfo));
++
 +      mptsas_free_fw_event(ioc, fw_event);
 +}
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_SSP_TARGET)
--                      ds = "ssp";
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_STP_TARGET)
--                      ds = "stp";
--              if (phy_info->attached.device_info &
--                  MPI_SAS_DEVICE_INFO_SATA_DEVICE)
--                      ds = "sata";
++
 +/**
 + * mptsas_firmware_event_work - work thread for processing fw events
 + * @work: work queue payload containing info describing the event
@@ -209295,81 +209381,32 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              mptsas_free_fw_event(ioc, fw_event);
 +              return;
 +      }
--              printk(MYIOC_s_INFO_FMT
--                     "attaching %s device, channel %d, id %d, phy %d\n",
--                     ioc->name, ds, ev->channel, ev->id, ev->phy_id);
++
 +      /* events handling turned off during host reset */
 +      if (ioc->fw_events_off) {
 +              mptsas_free_fw_event(ioc, fw_event);
 +              return;
 +      }
--              mptsas_parse_device_info(&identify, &phy_info->attached);
--              rphy = sas_end_device_alloc(port);
--              if (!rphy) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      break; /* non-fatal: an rphy can be added later */
--              }
++
 +      devtprintk(ioc, printk(MYIOC_s_INFO_FMT "%s: fw_event=(0x%p), "
 +          "event = (0x%02x)\n", ioc->name, __func__, fw_event,
 +          (fw_event->event & 0xFF)));
--              rphy->identify = identify;
--              if (sas_rphy_add(rphy)) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
--                              "%s: exit at line=%d\n", ioc->name,
--                              __func__, __LINE__));
--                      sas_rphy_free(rphy);
--                      break;
--              }
--              mptsas_set_rphy(ioc, phy_info, rphy);
++
 +      switch (fw_event->event) {
 +      case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
 +              mptsas_send_sas_event(fw_event);
-               break;
--      case MPTSAS_ADD_RAID:
--              sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
--                  ev->id, 0);
--              if (sdev) {
--                      scsi_device_put(sdev);
--                      break;
--              }
--              printk(MYIOC_s_INFO_FMT
--                     "attaching raid volume, channel %d, id %d\n",
--                     ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
--              scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0);
--              mpt_findImVolumes(ioc);
++              break;
 +      case MPI_EVENT_INTEGRATED_RAID:
 +              mptsas_send_raid_event(fw_event);
-               break;
--      case MPTSAS_DEL_RAID:
--              sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
--                  ev->id, 0);
--              if (!sdev)
--                      break;
--              printk(MYIOC_s_INFO_FMT
--                     "removing raid volume, channel %d, id %d\n",
--                     ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
--              vdevice = sdev->hostdata;
--              scsi_remove_device(sdev);
--              scsi_device_put(sdev);
--              mpt_findImVolumes(ioc);
++              break;
 +      case MPI_EVENT_IR2:
 +              mptsas_send_ir2_event(fw_event);
-               break;
--      case MPTSAS_ADD_INACTIVE_VOLUME:
--              mptsas_adding_inactive_raid_components(ioc,
--                  ev->channel, ev->id);
++              break;
 +      case MPI_EVENT_PERSISTENT_TABLE_FULL:
 +              mptbase_sas_persist_operation(ioc,
 +                  MPI_SAS_OP_CLEAR_NOT_PRESENT);
 +              mptsas_free_fw_event(ioc, fw_event);
-               break;
--      case MPTSAS_IGNORE_EVENT:
--      default:
++              break;
 +      case MPI_EVENT_SAS_BROADCAST_PRIMITIVE:
 +              mptsas_broadcast_primative_work(fw_event);
 +              break;
@@ -209381,49 +209418,48 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              break;
 +      case MPI_EVENT_QUEUE_FULL:
 +              mptsas_handle_queue_full_event(fw_event);
-               break;
-       }
--
--      mutex_unlock(&ioc->sas_discovery_mutex);
--      kfree(ev);
- }
--static void
--mptsas_send_sas_event(MPT_ADAPTER *ioc,
--              EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
--{
--      struct mptsas_hotplug_event *ev;
--      u32 device_info = le32_to_cpu(sas_event_data->DeviceInfo);
--      __le64 sas_address;
--      if ((device_info &
--           (MPI_SAS_DEVICE_INFO_SSP_TARGET |
--            MPI_SAS_DEVICE_INFO_STP_TARGET |
--            MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0)
--              return;
++              break;
++      }
++}
++
++
 +/**
 + *    mptsas_event_process -
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @reply:
 + *
 + **/
-+static int
-+mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
-+{
+ static int
+ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
+ {
+-      int rc=1;
+-      u8 event = le32_to_cpu(reply->Event) & 0xFF;
+-
+-      if (!ioc->sh)
+-              goto out;
+-
+-      /*
+-       * sas_discovery_ignore_events
+-       *
+-       * This flag is to prevent anymore processing of
+-       * sas events once mptsas_remove function is called.
+-       */
+-      if (ioc->sas_discovery_ignore_events) {
+-              rc = mptscsih_event_process(ioc, reply);
+-              goto out;
+-      }
+-
 +      u32 event = le32_to_cpu(reply->Event);
 +      int sz, event_data_sz;
 +      struct fw_event_work *fw_event;
 +      unsigned long delay;
--      switch (sas_event_data->ReasonCode) {
--      case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
++
 +      /* events turned off due to host reset or driver unloading */
 +      if (ioc->fw_events_off)
 +              return 0;
--              mptsas_target_reset_queue(ioc, sas_event_data);
++
 +      delay = msecs_to_jiffies(1);
-+      switch (event) {
+       switch (event) {
 +      case MPI_EVENT_SAS_BROADCAST_PRIMITIVE:
 +      {
 +              EVENT_DATA_SAS_BROADCAST_PRIMITIVE *broadcast_event_data =
@@ -209434,63 +209470,36 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              if (ioc->broadcast_aen_busy)
 +                      return 0;
 +              ioc->broadcast_aen_busy = 1;
-               break;
++              break;
 +      }
-+      case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
+       case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
+-              mptsas_send_sas_event(ioc,
+-                      (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data);
+-              break;
 +      {
 +              EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data =
 +                  (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data;
--      case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
--              ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--              if (!ev) {
--                      printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
--                      break;
++
 +              if (sas_event_data->ReasonCode ==
 +                  MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING) {
 +                      mptsas_target_reset_queue(ioc, sas_event_data);
 +                      return 0;
-               }
++              }
 +              break;
 +      }
 +      case MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE:
 +      {
 +              MpiEventDataSasExpanderStatusChange_t *expander_data =
 +                  (MpiEventDataSasExpanderStatusChange_t *)reply->Data;
--              INIT_WORK(&ev->work, mptsas_hotplug_work);
--              ev->ioc = ioc;
--              ev->handle = le16_to_cpu(sas_event_data->DevHandle);
--              ev->parent_handle =
--                  le16_to_cpu(sas_event_data->ParentDevHandle);
--              ev->channel = sas_event_data->Bus;
--              ev->id = sas_event_data->TargetID;
--              ev->phy_id = sas_event_data->PhyNum;
--              memcpy(&sas_address, &sas_event_data->SASAddress,
--                  sizeof(__le64));
--              ev->sas_address = le64_to_cpu(sas_address);
--              ev->device_info = device_info;
++
 +              if (ioc->old_sas_discovery_protocal)
 +                      return 0;
--              if (sas_event_data->ReasonCode &
--                  MPI_EVENT_SAS_DEV_STAT_RC_ADDED)
--                      ev->event_type = MPTSAS_ADD_DEVICE;
--              else
--                      ev->event_type = MPTSAS_DEL_DEVICE;
--              schedule_work(&ev->work);
++
 +              if (expander_data->ReasonCode ==
 +                  MPI_EVENT_SAS_EXP_RC_NOT_RESPONDING &&
 +                  ioc->device_missing_delay)
 +                      delay = HZ * ioc->device_missing_delay;
-               break;
--      case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
--      /*
--       * Persistent table is full.
--       */
--              INIT_WORK(&ioc->sas_persist_task,
--                  mptsas_persist_clear_table);
--              schedule_work(&ioc->sas_persist_task);
++              break;
 +      }
 +      case MPI_EVENT_SAS_DISCOVERY:
 +      {
@@ -209504,24 +209513,36 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      mptsas_queue_rescan(ioc);
 +              return 0;
 +      }
-+      case MPI_EVENT_INTEGRATED_RAID:
-+      case MPI_EVENT_PERSISTENT_TABLE_FULL:
-+      case MPI_EVENT_IR2:
+       case MPI_EVENT_INTEGRATED_RAID:
+-              mptsas_send_raid_event(ioc,
+-                      (EVENT_DATA_RAID *)reply->Data);
+-              break;
+       case MPI_EVENT_PERSISTENT_TABLE_FULL:
+-              INIT_WORK(&ioc->sas_persist_task,
+-                  mptsas_persist_clear_table);
+-              schedule_work(&ioc->sas_persist_task);
+-              break;
+-       case MPI_EVENT_SAS_DISCOVERY:
+-              mptsas_send_discovery_event(ioc,
+-                      (EVENT_DATA_SAS_DISCOVERY *)reply->Data);
+-              break;
+       case MPI_EVENT_IR2:
+-              mptsas_send_ir2_event(ioc,
+-                  (PTR_MPI_EVENT_DATA_IR2)reply->Data);
+-              break;
+-      default:
+-              rc = mptscsih_event_process(ioc, reply);
+-              break;
+-      }
+- out:
+-
+-      return rc;
+-}
+-
 +      case MPI_EVENT_SAS_PHY_LINK_STATUS:
 +      case MPI_EVENT_QUEUE_FULL:
-               break;
--      /*
--       * TODO, handle other events
--       */
--      case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
--      case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
--      case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
--      case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
--      case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
--      case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
--      case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
-       default:
--              break;
++              break;
++      default:
 +              return 0;
 +      }
 +
@@ -209533,32 +209554,25 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              printk(MYIOC_s_WARN_FMT "%s: failed at (line=%d)\n", ioc->name,
 +                  __func__, __LINE__);
 +              return 0;
-       }
++      }
 +      memcpy(fw_event->event_data, reply->Data, event_data_sz);
 +      fw_event->event = event;
 +      fw_event->ioc = ioc;
 +      mptsas_add_fw_event(ioc, fw_event, delay);
 +      return 0;
- }
--static void
--mptsas_send_raid_event(MPT_ADAPTER *ioc,
--              EVENT_DATA_RAID *raid_event_data)
++}
 +
 +
 +/* Delete a volume when no longer listed in ioc pg2
 + */
 +static void mptsas_volume_delete(MPT_ADAPTER *ioc, u8 id)
- {
--      struct mptsas_hotplug_event *ev;
--      int status = le32_to_cpu(raid_event_data->SettingsStatus);
--      int state = (status >> 8) & 0xff;
++{
 +      struct scsi_device *sdev;
 +      int i;
--      if (ioc->bus_type != SAS)
++
 +      sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, id, 0);
 +      if (!sdev)
-               return;
++              return;
 +      if (!ioc->raid_data.pIocPg2)
 +              goto out;
 +      if (!ioc->raid_data.pIocPg2->NumActiveVolumes)
@@ -209584,12 +209598,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +      VirtTarget *vtarget = NULL;
 +      struct mptsas_phyinfo *phy_info;
 +      u8 found_expander;
--      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--      if (!ev) {
--              printk(MYIOC_s_WARN_FMT "lost hotplug event\n", ioc->name);
++
 +      if (ioc->disable_hotplug_remove)
-               return;
++              return;
 +
 +      mpt_findImVolumes(ioc);
 +
@@ -209620,48 +209631,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      }
 +              } else
 +                      mptsas_volume_delete(ioc, sas_info->fw.id);
-       }
--      INIT_WORK(&ev->work, mptsas_hotplug_work);
--      ev->ioc = ioc;
--      ev->id = raid_event_data->VolumeID;
--      ev->channel = raid_event_data->VolumeBus;
--      ev->event_type = MPTSAS_IGNORE_EVENT;
++      }
++
 +      /* expanders */
 + redo_expander_scan:
 +      list_for_each_entry(port_info, &ioc->sas_topology, list) {
--      switch (raid_event_data->ReasonCode) {
--      case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
--              ev->phys_disk_num_valid = 1;
--              ev->phys_disk_num = raid_event_data->PhysDiskNum;
--              ev->event_type = MPTSAS_ADD_DEVICE;
--              break;
--      case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
--              ev->phys_disk_num_valid = 1;
--              ev->phys_disk_num = raid_event_data->PhysDiskNum;
--              ev->hidden_raid_component = 1;
--              ev->event_type = MPTSAS_DEL_DEVICE;
--              break;
--      case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
--              switch (state) {
--              case MPI_PD_STATE_ONLINE:
--              case MPI_PD_STATE_NOT_COMPATIBLE:
--                      ev->phys_disk_num_valid = 1;
--                      ev->phys_disk_num = raid_event_data->PhysDiskNum;
--                      ev->hidden_raid_component = 1;
--                      ev->event_type = MPTSAS_ADD_DEVICE;
--                      break;
--              case MPI_PD_STATE_MISSING:
--              case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
--              case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
--              case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
--                      ev->phys_disk_num_valid = 1;
--                      ev->phys_disk_num = raid_event_data->PhysDiskNum;
--                      ev->event_type = MPTSAS_DEL_DEVICE;
--                      break;
--              default:
--                      break;
++
 +              if (port_info->phy_info &&
 +                  (!(port_info->phy_info[0].identify.device_info &
 +                  MPI_SAS_DEVICE_INFO_SMP_TARGET)))
@@ -209679,74 +209654,32 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                              found_expander = 1;
 +                      }
 +                      kfree(buffer.phy_info);
-               }
--              break;
--      case MPI_EVENT_RAID_RC_VOLUME_DELETED:
--              ev->event_type = MPTSAS_DEL_RAID;
--              break;
--      case MPI_EVENT_RAID_RC_VOLUME_CREATED:
--              ev->event_type = MPTSAS_ADD_RAID;
--              break;
--      case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
--              switch (state) {
--              case MPI_RAIDVOL0_STATUS_STATE_FAILED:
--              case MPI_RAIDVOL0_STATUS_STATE_MISSING:
--                      ev->event_type = MPTSAS_DEL_RAID;
--                      break;
--              case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
--              case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
--                      ev->event_type = MPTSAS_ADD_RAID;
--                      break;
--              default:
--                      break;
++              }
 +
 +              if (!found_expander) {
 +                      mptsas_expander_delete(ioc, port_info);
 +                      goto redo_expander_scan;
-               }
--              break;
--      default:
--              break;
-       }
--      schedule_work(&ev->work);
- }
++              }
++      }
++}
++
 +/**
 + *    mptsas_probe_expanders - adding expanders
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *
 + **/
- static void
--mptsas_send_discovery_event(MPT_ADAPTER *ioc,
--      EVENT_DATA_SAS_DISCOVERY *discovery_data)
++static void
 +mptsas_probe_expanders(MPT_ADAPTER *ioc)
- {
--      struct mptsas_discovery_event *ev;
++{
 +      struct mptsas_portinfo buffer, *port_info;
 +      u32                     handle;
 +      int i;
--      /*
--       * DiscoveryStatus
--       *
--       * This flag will be non-zero when firmware
--       * kicks off discovery, and return to zero
--       * once its completed.
--       */
--      if (discovery_data->DiscoveryStatus)
--              return;
++
 +      handle = 0xFFFF;
 +      while (!mptsas_sas_expander_pg0(ioc, &buffer,
 +          (MPI_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE <<
 +           MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle)) {
--      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--      if (!ev)
--              return;
--      INIT_WORK(&ev->work, mptsas_discovery_work);
--      ev->ioc = ioc;
--      schedule_work(&ev->work);
--};
++
 +              handle = buffer.phy_info[0].handle;
 +              port_info = mptsas_find_portinfo_by_sas_address(ioc,
 +                  buffer.phy_info[0].identify.sas_address);
@@ -209783,29 +209716,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +              mptsas_expander_refresh(ioc, port_info);
 +      }
 +}
--/*
-- * mptsas_send_ir2_event - handle exposing hidden disk when
-- * an inactive raid volume is added
-- *
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @ir2_data
-- *
-- */
- static void
--mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data)
++
++static void
 +mptsas_probe_devices(MPT_ADAPTER *ioc)
- {
--      struct mptsas_hotplug_event *ev;
++{
 +      u16 retry_count;
 +      u16 handle;
 +      struct mptsas_devinfo sas_device;
 +      struct mptsas_phyinfo *phy_info;
 +      enum device_state state;
--      if (ir2_data->ReasonCode !=
--          MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED)
--              return;
++
 +      handle = 0xFFFF;
 +      while (!(mptsas_sas_device_pg0(ioc, &sas_device,
 +          MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE, handle))) {
@@ -209817,24 +209737,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                    MPI_SAS_DEVICE_INFO_STP_TARGET |
 +                    MPI_SAS_DEVICE_INFO_SATA_DEVICE)) == 0)
 +                      continue;
--      ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
--      if (!ev)
--              return;
++
 +              phy_info = mptsas_refreshing_device_handles(ioc, &sas_device);
 +              if (!phy_info)
 +                      continue;
--      INIT_WORK(&ev->work, mptsas_hotplug_work);
--      ev->ioc = ioc;
--      ev->id = ir2_data->TargetID;
--      ev->channel = ir2_data->Bus;
--      ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME;
++
 +              if (mptsas_get_rphy(phy_info))
 +                      continue;
--      schedule_work(&ev->work);
--};
++
 +              state = DEVICE_RETRY;
 +              retry_count = 0;
 +              while (state == DEVICE_RETRY) {
@@ -209846,9 +209756,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                      mptsas_add_end_device(ioc, phy_info);
 +      }
 +}
--static int
--mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
++
 +/**
 + *    mptsas_scan_sas_topology -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -209857,54 +209765,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 + **/
 +static void
 +mptsas_scan_sas_topology(MPT_ADAPTER *ioc)
- {
--      int rc=1;
--      u8 event = le32_to_cpu(reply->Event) & 0xFF;
++{
 +      struct scsi_device *sdev;
 +      int i;
--      if (!ioc->sh)
--              goto out;
++
 +      mptsas_probe_hba_phys(ioc);
 +      mptsas_probe_expanders(ioc);
 +      mptsas_probe_devices(ioc);
-       /*
--       * sas_discovery_ignore_events
--       *
--       * This flag is to prevent anymore processing of
--       * sas events once mptsas_remove function is called.
--       */
--      if (ioc->sas_discovery_ignore_events) {
--              rc = mptscsih_event_process(ioc, reply);
--              goto out;
--      }
--
--      switch (event) {
--      case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
--              mptsas_send_sas_event(ioc,
--                      (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data);
--              break;
--      case MPI_EVENT_INTEGRATED_RAID:
--              mptsas_send_raid_event(ioc,
--                      (EVENT_DATA_RAID *)reply->Data);
--              break;
--      case MPI_EVENT_PERSISTENT_TABLE_FULL:
--              INIT_WORK(&ioc->sas_persist_task,
--                  mptsas_persist_clear_table);
--              schedule_work(&ioc->sas_persist_task);
--              break;
--       case MPI_EVENT_SAS_DISCOVERY:
--              mptsas_send_discovery_event(ioc,
--                      (EVENT_DATA_SAS_DISCOVERY *)reply->Data);
--              break;
--      case MPI_EVENT_IR2:
--              mptsas_send_ir2_event(ioc,
--                  (PTR_MPI_EVENT_DATA_IR2)reply->Data);
--              break;
--      default:
--              rc = mptscsih_event_process(ioc, reply);
--              break;
++
++      /*
 +        Reporting RAID volumes.
 +      */
 +      if (!ioc->ir_firmware || !ioc->raid_data.pIocPg2 ||
@@ -209921,12 +209790,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
 +                  ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID);
 +              scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL,
 +                  ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0);
-       }
-- out:
--
--      return rc;
- }
++      }
++}
++
 +/**
 + *    mptsas_probe -
 + *    @pdev:
@@ -209936,7 +209802,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int
  mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  {
-@@ -3129,6 +5228,7 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3129,6 +5228,7 @@
                return r;
  
        ioc = pci_get_drvdata(pdev);
@@ -209944,7 +209810,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        ioc->DoneCtx = mptsasDoneCtx;
        ioc->TaskCtx = mptsasTaskCtx;
        ioc->InternalCtx = mptsasInternalCtx;
-@@ -3173,7 +5273,7 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3173,7 +5273,7 @@
                        ioc->name);
                error = -1;
                goto out_mptsas_probe;
@@ -209953,7 +209819,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        spin_lock_irqsave(&ioc->FreeQlock, flags);
  
-@@ -3187,10 +5287,9 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3187,10 +5287,9 @@
  
        /* set 16 byte cdb's */
        sh->max_cmd_len = 16;
@@ -209965,19 +209831,18 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        sh->transportt = mptsas_transport_template;
  
        /* Required entry.
-@@ -3199,10 +5298,10 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3199,9 +5298,9 @@
  
        INIT_LIST_HEAD(&ioc->sas_topology);
        mutex_init(&ioc->sas_topology_mutex);
 -      mutex_init(&ioc->sas_discovery_mutex);
        mutex_init(&ioc->sas_mgmt.mutex);
        init_completion(&ioc->sas_mgmt.done);
 +
        /* Verify that we won't exceed the maximum
         * number of chain buffers
-        * We can optimize:  ZZ = req_sz/sizeof(SGE)
-@@ -3212,17 +5311,16 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3212,17 +5311,16 @@
         * A slightly different algorithm is required for
         * 64bit SGEs.
         */
@@ -210000,7 +209865,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        }
  
        if (numSGE < sh->sg_tablesize) {
-@@ -3250,34 +5348,18 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3250,34 +5348,18 @@
        dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
                 ioc->name, ioc->ScsiLookup));
  
@@ -210044,7 +209909,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
  
        if (ioc->sas_data.ptClear==1) {
-@@ -3292,8 +5374,11 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3292,8 +5374,11 @@
                goto out_mptsas_probe;
        }
  
@@ -210057,7 +209922,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        return 0;
  
   out_mptsas_probe:
-@@ -3302,13 +5387,23 @@ mptsas_probe(struct pci_dev *pdev, const
+@@ -3302,13 +5387,23 @@
        return error;
  }
  
@@ -210083,7 +209948,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        sas_remove_host(ioc->sh);
  
        mutex_lock(&ioc->sas_topology_mutex);
-@@ -3316,11 +5411,12 @@ static void __devexit mptsas_remove(stru
+@@ -3316,11 +5411,12 @@
                list_del(&p->list);
                for (i = 0 ; i < p->num_phys ; i++)
                        mptsas_port_delete(ioc, p->phy_info[i].port_details);
@@ -210097,7 +209962,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
        mptscsih_remove(pdev);
  }
  
-@@ -3352,6 +5448,10 @@ static struct pci_driver mptsas_driver =
+@@ -3352,6 +5448,10 @@
  #endif
  };
  
@@ -210108,7 +209973,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static int __init
  mptsas_init(void)
  {
-@@ -3365,10 +5465,12 @@ mptsas_init(void)
+@@ -3365,10 +5465,12 @@
                return -ENODEV;
  
        mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER);
@@ -210122,7 +209987,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  
        mpt_event_register(mptsasDoneCtx, mptsas_event_process);
        mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset);
-@@ -3380,6 +5482,10 @@ mptsas_init(void)
+@@ -3380,6 +5482,10 @@
        return error;
  }
  
@@ -210133,7 +209998,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  static void __exit
  mptsas_exit(void)
  {
-@@ -3393,6 +5499,7 @@ mptsas_exit(void)
+@@ -3393,6 +5499,7 @@
        mpt_deregister(mptsasInternalCtx);
        mpt_deregister(mptsasTaskCtx);
        mpt_deregister(mptsasDoneCtx);
@@ -210141,9 +210006,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.c linux-2.6.27.19-5.1/driv
  }
  
  module_init(mptsas_init);
-diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.h
---- linux-2.6.27/drivers/message/fusion/mptsas.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptsas.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptsas.h
+--- a/drivers/message/fusion/mptsas.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptsas.h  Wed May 06 16:56:21 2009 +0100
 @@ -50,9 +50,10 @@
  /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
@@ -210157,7 +210022,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/driv
  };
  
  enum mptsas_hotplug_action {
-@@ -61,11 +62,37 @@ enum mptsas_hotplug_action {
+@@ -61,11 +62,37 @@
        MPTSAS_ADD_RAID,
        MPTSAS_DEL_RAID,
        MPTSAS_ADD_INACTIVE_VOLUME,
@@ -210196,7 +210061,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/driv
        MPT_ADAPTER             *ioc;
        enum mptsas_hotplug_action event_type;
        u64                     sas_address;
-@@ -73,17 +100,28 @@ struct mptsas_hotplug_event {
+@@ -73,17 +100,28 @@
        u8                      id;
        u32                     device_info;
        u16                     handle;
@@ -210229,7 +210094,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/driv
  
  /*
   * SAS topology structures
-@@ -113,32 +151,35 @@ struct mptsas_devinfo {
+@@ -113,32 +151,35 @@
   * Specific details on ports, wide/narrow
   */
  struct mptsas_portinfo_details{
@@ -210274,14 +210139,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptsas.h linux-2.6.27.19-5.1/driv
        struct mptsas_phyinfo *phy_info;
  };
  
-@@ -156,3 +197,4 @@ struct mptsas_enclosure {
+@@ -156,3 +197,4 @@
  
  /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  #endif
 +
-diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.c
---- linux-2.6.27/drivers/message/fusion/mptscsih.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptscsih.c
+--- a/drivers/message/fusion/mptscsih.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptscsih.c        Wed May 06 16:56:21 2009 +0100
 @@ -53,7 +53,9 @@
  #include <linux/delay.h>      /* for mdelay */
  #include <linux/interrupt.h>  /* needed for in_interrupt() proto */
@@ -210292,7 +210157,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
  #include <scsi/scsi.h>
  #include <scsi/scsi_cmnd.h>
-@@ -77,10 +79,15 @@ MODULE_LICENSE("GPL");
+@@ -77,10 +79,15 @@
  MODULE_VERSION(my_VERSION);
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210309,7 +210174,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i);
  static void   mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd);
  static int    SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *scmd);
-@@ -92,17 +99,11 @@ static int mptscsih_AddSGE(MPT_ADAPTER *
+@@ -92,17 +99,11 @@
                                 SCSIIORequest_t *pReq, int req_idx);
  static void   mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx);
  static void   mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
@@ -210329,14 +210194,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
  void          mptscsih_remove(struct pci_dev *);
  void          mptscsih_shutdown(struct pci_dev *);
-@@ -111,81 +112,15 @@ int              mptscsih_suspend(struct pci_dev *p
+@@ -111,81 +112,15 @@
  int           mptscsih_resume(struct pci_dev *pdev);
  #endif
  
 -#define SNS_LEN(scp)  SCSI_SENSE_BUFFERSIZE
 -
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /**
 - *    mptscsih_add_sge - Place a simple SGE at address pAddr.
 - *    @pAddr: virtual address for SGE
 - *    @flagslength: SGE flags and data transfer length
@@ -210364,8 +210229,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -      }
 -} /* mptscsih_add_sge() */
 -
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-/**
 - *    mptscsih_add_chain - Place a chain SGE at address pAddr.
 - *    @pAddr: virtual address for SGE
 - *    @next: nextChainOffset value (u32's)
@@ -210412,7 +210277,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static inline int
  mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex)
  {
-@@ -195,7 +130,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER 
+@@ -195,7 +130,7 @@
        int chain_idx;
  
        dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT "getFreeChainBuffer called\n",
@@ -210421,7 +210286,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        spin_lock_irqsave(&ioc->FreeQlock, flags);
        if (!list_empty(&ioc->FreeChainQ)) {
                int offset;
-@@ -207,13 +142,16 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER 
+@@ -207,13 +142,16 @@
                chain_idx = offset / ioc->req_sz;
                rc = SUCCESS;
                dsgprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -210442,7 +210307,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        }
        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
  
-@@ -222,7 +160,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER 
+@@ -222,7 +160,7 @@
  } /* mptscsih_getFreeChainBuffer() */
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210451,7 +210316,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_AddSGE - Add a SGE (plus chain buffers) to the
   *    SCSIIORequest_t Message Frame.
   *    @ioc: Pointer to MPT_ADAPTER structure
-@@ -230,7 +168,7 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER 
+@@ -230,7 +168,7 @@
   *    @pReq: Pointer to SCSIIORequest_t structure
   *
   *    Returns ...
@@ -210460,7 +210325,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static int
  mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
                SCSIIORequest_t *pReq, int req_idx)
-@@ -281,10 +219,10 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct
+@@ -281,10 +219,10 @@
         */
  
  nextSGEset:
@@ -210473,7 +210338,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /* Get first (num - 1) SG elements
         * Skip any SG entries with a length of 0
-@@ -299,11 +237,11 @@ nextSGEset:
+@@ -299,11 +237,11 @@
                }
  
                v2 = sg_dma_address(sg);
@@ -210488,7 +210353,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                sg_done++;
        }
  
-@@ -320,12 +258,8 @@ nextSGEset:
+@@ -320,12 +258,8 @@
                thisxfer = sg_dma_len(sg);
  
                v2 = sg_dma_address(sg);
@@ -210503,7 +210368,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                sg_done++;
  
                if (chainSge) {
-@@ -334,7 +268,8 @@ nextSGEset:
+@@ -334,7 +268,8 @@
                         * Update the chain element
                         * Offset and Length fields.
                         */
@@ -210513,7 +210378,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                } else {
                        /* The current buffer is the original MF
                         * and there is no Chain buffer.
-@@ -367,7 +302,7 @@ nextSGEset:
+@@ -367,7 +302,7 @@
                 * set properly).
                 */
                if (sg_done) {
@@ -210522,7 +210387,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        sgflags = le32_to_cpu(*ptmp);
                        sgflags |= MPT_SGE_FLAGS_LAST_ELEMENT;
                        *ptmp = cpu_to_le32(sgflags);
-@@ -381,8 +316,9 @@ nextSGEset:
+@@ -381,8 +316,9 @@
                         * Old chain element is now complete.
                         */
                        u8 nextChain = (u8) (sgeOffset >> 2);
@@ -210534,7 +210399,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                } else {
                        /* The original MF buffer requires a chain buffer -
                         * set the offset.
-@@ -592,14 +528,16 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -592,14 +528,16 @@
        }
  
        scsi_print_command(sc);
@@ -210558,7 +210423,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        printk(MYIOC_s_DEBUG_FMT "\tiocstatus = %s (0x%04x), "
            "scsi_status = %s (0x%02x), scsi_state = (0x%02x)\n",
            ioc->name, desc, ioc_status, desc1, pScsiReply->SCSIStatus,
-@@ -625,7 +563,7 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -625,7 +563,7 @@
  #endif
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210567,7 +210432,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_io_done - Main SCSI IO callback routine registered to
   *    Fusion MPT (base) driver
   *    @ioc: Pointer to MPT_ADAPTER structure
-@@ -638,7 +576,7 @@ mptscsih_info_scsiio(MPT_ADAPTER *ioc, s
+@@ -638,7 +576,7 @@
   *    load/init time via the mpt_register() API call.
   *
   *    Returns 1 indicating alloc'd request frame ptr should be freed.
@@ -210576,7 +210441,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
  {
-@@ -651,14 +589,15 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -651,14 +589,15 @@
        VirtTarget       *vtarget;
  
        hd = shost_priv(ioc->sh);
@@ -210596,7 +210461,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                    "req_idx=%x req_idx_MR=%x mf=%p mr=%p sc=%p\n",
                    ioc->name, req_idx, req_idx_MR, mf, mr,
                    mptscsih_get_scsi_lookup(ioc, req_idx_MR));
-@@ -693,7 +632,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -693,7 +632,7 @@
  
        if((ioc->facts.MsgVersion >= MPI_VERSION_01_05) && pScsiReply){
                dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT
@@ -210605,7 +210470,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        ioc->name, mf, mr, sc, req_idx, pScsiReply->TaskTag));
        }else{
                dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-@@ -706,6 +645,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -706,6 +645,7 @@
                ;
        } else {
                u32      xfer_cnt;
@@ -210613,7 +210478,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                u16      status;
                u8       scsi_state, scsi_status;
                u32      log_info;
-@@ -716,6 +656,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -716,6 +656,7 @@
                xfer_cnt = le32_to_cpu(pScsiReply->TransferCount);
                scsi_set_resid(sc, scsi_bufflen(sc) - xfer_cnt);
                log_info = le32_to_cpu(pScsiReply->IOCLogInfo);
@@ -210621,7 +210486,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
                /*
                 *  if we get a data underrun indication, yet no data was
-@@ -733,20 +674,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -733,20 +674,9 @@
                if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID)
                        mptscsih_copy_sense_data(sc, hd, mf, pScsiReply);
  
@@ -210643,7 +210508,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        /* CHECKME!
                         * Maybe: DRIVER_BUSY | SUGGEST_RETRY | DID_SOFT_ERROR (retry)
                         * But not: DID_BUS_BUSY lest one risk
-@@ -771,7 +701,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -771,7 +701,6 @@
                        if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF)
                                hd->sel_timeout[pScsiReq->TargetID]++;
  
@@ -210651,7 +210516,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        if (!vdevice)
                                break;
                        vtarget = vdevice->vtarget;
-@@ -793,14 +722,12 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -793,14 +722,12 @@
                                        }
                                }
                        } else if (ioc->bus_type == FC) {
@@ -210672,7 +210537,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                                sc->result = DID_ERROR << 16;
                                break;
                        }
-@@ -810,12 +737,16 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -810,12 +737,16 @@
                         */
  
                case MPI_IOCSTATUS_SCSI_TASK_TERMINATED:        /* 0x0048 */
@@ -210690,7 +210555,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        break;
  
                case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH:      /* 0x0049 */
-@@ -824,9 +755,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -824,9 +755,6 @@
                                sc->result=DID_SOFT_ERROR << 16;
                        else /* Sufficient data transfer occurred */
                                sc->result = (DID_OK << 16) | scsi_status;
@@ -210700,7 +210565,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        break;
  
                case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN:          /* 0x0045 */
-@@ -835,11 +763,34 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -835,11 +763,34 @@
                         *  precedence!
                         */
                        sc->result = (DID_OK << 16) | scsi_status;
@@ -210739,7 +210604,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                                if (xfer_cnt < sc->underflow) {
                                        if (scsi_status == SAM_STAT_BUSY)
                                                sc->result = SAM_STAT_BUSY;
-@@ -848,7 +799,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -848,7 +799,7 @@
                                }
                                if (scsi_state & (MPI_SCSI_STATE_AUTOSENSE_FAILED | MPI_SCSI_STATE_NO_SCSI_STATUS)) {
                                        /* What to do?
@@ -210748,21 +210613,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                                        sc->result = DID_SOFT_ERROR << 16;
                                }
                                else if (scsi_state & MPI_SCSI_STATE_TERMINATED) {
-@@ -857,13 +808,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -856,13 +807,6 @@
+                                       sc->result = DID_RESET << 16;
                                }
                        }
+-
 -
 -                      dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                          "  sc->underflow={report ERR if < %02xh bytes xfer'd}\n",
 -                          ioc->name, sc->underflow));
 -                      dreplyprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -                          "  ActBytesXferd=%02xh\n", ioc->name, xfer_cnt));
--
                        /* Report Queue Full
                         */
-                       if (scsi_status == MPI_SCSI_STATUS_TASK_SET_FULL)
-@@ -879,6 +823,44 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -879,6 +823,44 @@
                        if (scsi_state == 0) {
                                ;
                        } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) {
@@ -210807,7 +210672,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                                /*
                                 * If running against circa 200003dd 909 MPT f/w,
                                 * may get this (AUTOSENSE_VALID) for actual TASK_SET_FULL
-@@ -890,7 +872,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -890,7 +872,7 @@
  
                        }
                        else if (scsi_state &
@@ -210816,7 +210681,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                           ) {
                                /*
                                 * What to do?
-@@ -926,7 +908,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -926,7 +908,6 @@
                case MPI_IOCSTATUS_INVALID_SGL:                 /* 0x0003 */
                case MPI_IOCSTATUS_INTERNAL_ERROR:              /* 0x0004 */
                case MPI_IOCSTATUS_RESERVED:                    /* 0x0005 */
@@ -210824,7 +210689,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                case MPI_IOCSTATUS_INVALID_FIELD:               /* 0x0007 */
                case MPI_IOCSTATUS_INVALID_STATE:               /* 0x0008 */
                case MPI_IOCSTATUS_SCSI_IO_DATA_ERROR:          /* 0x0046 */
-@@ -957,7 +938,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -957,7 +938,7 @@
        return 1;
  }
  
@@ -210833,7 +210698,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_flush_running_cmds - For each command found, search
   *            Scsi_Host instance taskQ and reply to OS.
   *            Called only if recovering from a FW reload.
-@@ -966,7 +947,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
+@@ -966,7 +947,7 @@
   *    Returns: None.
   *
   *    Must be called while new I/Os are being queued.
@@ -210842,7 +210707,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static void
  mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
  {
-@@ -992,14 +973,14 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS
+@@ -992,14 +973,14 @@
                scsi_dma_unmap(sc);
                sc->result = DID_RESET << 16;
                sc->host_scribble = NULL;
@@ -210861,7 +210726,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_search_running_cmds - Delete any commands associated
   *            with the specified target and lun. Function called only
   *            when a lun is disable by mid-layer.
-@@ -1012,15 +993,15 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS
+@@ -1012,15 +993,15 @@
   *    Returns: None.
   *
   *    Called from slave_destroy.
@@ -210880,7 +210745,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        unsigned long   flags;
  
        spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
-@@ -1030,8 +1011,11 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1030,8 +1011,11 @@
                        mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii);
                        if (mf == NULL)
                                continue;
@@ -210894,7 +210759,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                         */
                        if (vdevice->vtarget->tflags &
                            MPT_TARGET_FLAGS_RAID_COMPONENT && mf->Function !=
-@@ -1053,9 +1037,11 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1053,9 +1037,11 @@
                        scsi_dma_unmap(sc);
                        sc->host_scribble = NULL;
                        sc->result = DID_NO_CONNECT << 16;
@@ -210909,7 +210774,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        sc->scsi_done(sc);
                        spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
                }
-@@ -1067,7 +1053,7 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1067,7 +1053,7 @@
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210918,7 +210783,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_report_queue_full - Report QUEUE_FULL status returned
   *    from a SCSI target device.
   *    @sc: Pointer to scsi_cmnd structure
-@@ -1077,12 +1063,12 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
+@@ -1077,12 +1063,12 @@
   *    This routine periodically reports QUEUE_FULL status returned from a
   *    SCSI target device.  It reports this to the console via kernel
   *    printk() API call, not more than once every 10 seconds.
@@ -210933,7 +210798,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        MPT_ADAPTER     *ioc;
  
        if (sc->device == NULL)
-@@ -1100,12 +1086,12 @@ mptscsih_report_queue_full(struct scsi_c
+@@ -1100,12 +1086,12 @@
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210948,7 +210813,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  void
  mptscsih_remove(struct pci_dev *pdev)
  {
-@@ -1151,10 +1137,10 @@ mptscsih_remove(struct pci_dev *pdev)
+@@ -1151,10 +1137,10 @@
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210961,7 +210826,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  void
  mptscsih_shutdown(struct pci_dev *pdev)
  {
-@@ -1162,11 +1148,11 @@ mptscsih_shutdown(struct pci_dev *pdev)
+@@ -1162,11 +1148,11 @@
  
  #ifdef CONFIG_PM
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210975,7 +210840,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_suspend(struct pci_dev *pdev, pm_message_t state)
  {
-@@ -1179,11 +1165,11 @@ mptscsih_suspend(struct pci_dev *pdev, p
+@@ -1179,11 +1165,11 @@
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -210989,7 +210854,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_resume(struct pci_dev *pdev)
  {
-@@ -1205,7 +1191,7 @@ mptscsih_resume(struct pci_dev *pdev)
+@@ -1205,7 +1191,7 @@
   *    (linux scsi_host_template.info routine)
   *
   *    Returns pointer to buffer where information was written.
@@ -210998,7 +210863,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  const char *
  mptscsih_info(struct Scsi_Host *SChost)
  {
-@@ -1338,7 +1324,7 @@ mptscsih_proc_info(struct Scsi_Host *hos
+@@ -1338,7 +1324,7 @@
   *    from a linux scsi_cmnd request and send it to the IOC.
   *
   *    Returns 0. (rtn value discarded by linux scsi mid-layer)
@@ -211007,7 +210872,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
  {
-@@ -1346,7 +1332,6 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1346,7 +1332,6 @@
        MPT_FRAME_HDR           *mf;
        SCSIIORequest_t         *pScsiReq;
        VirtDevice              *vdevice = SCpnt->device->hostdata;
@@ -211015,7 +210880,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        u32      datalen;
        u32      scsictl;
        u32      scsidir;
-@@ -1357,24 +1342,20 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1357,24 +1342,20 @@
  
        hd = shost_priv(SCpnt->device->host);
        ioc = hd->ioc;
@@ -211042,7 +210907,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                return SCSI_MLQUEUE_HOST_BUSY;
        }
  
-@@ -1422,7 +1403,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1422,7 +1403,7 @@
        pScsiReq->CDBLength = SCpnt->cmd_len;
        pScsiReq->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
        pScsiReq->Reserved = 0;
@@ -211051,7 +210916,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        int_to_scsilun(SCpnt->device->lun, (struct scsi_lun *)pScsiReq->LUN);
        pScsiReq->Control = cpu_to_le32(scsictl);
  
-@@ -1448,8 +1429,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1448,8 +1429,8 @@
         */
        if (datalen == 0) {
                /* Add a NULL SGE */
@@ -211062,7 +210927,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        } else {
                /* Add a 32 or 64 bit SGE */
                if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS)
-@@ -1472,7 +1453,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1472,7 +1453,7 @@
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -211071,7 +210936,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
   *    mptscsih_freeChainBuffers - Function to free chain buffers associated
   *    with a SCSI IO request
   *    @hd: Pointer to the MPT_SCSI_HOST instance
-@@ -1480,7 +1461,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
+@@ -1480,7 +1461,7 @@
   *
   *    Called if SG chain buffer allocation fails and mptscsih callbacks.
   *    No return.
@@ -211080,153 +210945,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static void
  mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx)
  {
-@@ -1527,243 +1508,466 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i
+@@ -1527,118 +1508,297 @@
   */
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- *    mptscsih_TMHandler - Generic handler for SCSI Task Management.
-- *    @hd: Pointer to MPT SCSI HOST structure
-- *    @type: Task Management type
-- *    @channel: channel number for task management
-- *    @id: Logical Target ID for reset (if appropriate)
-- *    @lun: Logical Unit for reset (if appropriate)
-- *    @ctx2abort: Context for the task to be aborted (if appropriate)
-- *    @timeout: timeout for task management control
-- *
-- *    Fall through to mpt_HardResetHandler if: not operational, too many
-- *    failed TM requests or handshake failure.
-- *
-- *    Remark: Currently invoked from a non-interrupt thread (_bh).
-- *
-- *    Note: With old EH code, at most 1 SCSI TaskMgmt function per IOC
-- *    will be active.
-- *
-- *    Returns 0 for SUCCESS, or %FAILED.
-- **/
--int
--mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
--{
--      MPT_ADAPTER     *ioc;
--      int              rc = -1;
--      u32              ioc_raw_state;
--      unsigned long    flags;
--
--      ioc = hd->ioc;
--      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler Entered!\n", ioc->name));
--
--      // SJR - CHECKME - Can we avoid this here?
--      // (mpt_HardResetHandler has this check...)
--      spin_lock_irqsave(&ioc->diagLock, flags);
--      if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) {
--              spin_unlock_irqrestore(&ioc->diagLock, flags);
--              return FAILED;
--      }
--      spin_unlock_irqrestore(&ioc->diagLock, flags);
--
--      /*  Wait a fixed amount of time for the TM pending flag to be cleared.
--       *  If we time out and not bus reset, then we return a FAILED status
--       *  to the caller.
--       *  The call to mptscsih_tm_pending_wait() will set the pending flag
--       *  if we are
--       *  successful. Otherwise, reload the FW.
--       */
--      if (mptscsih_tm_pending_wait(hd) == FAILED) {
--              if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
--                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler abort: "
--                         "Timed out waiting for last TM (%d) to complete! \n",
--                         ioc->name, hd->tmPending));
--                      return FAILED;
--              } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
--                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler target "
--                              "reset: Timed out waiting for last TM (%d) "
--                              "to complete! \n", ioc->name,
--                              hd->tmPending));
--                      return FAILED;
--              } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
--                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler bus reset: "
--                         "Timed out waiting for last TM (%d) to complete! \n",
--                        ioc->name, hd->tmPending));
--                      return FAILED;
--              }
--      } else {
--              spin_lock_irqsave(&ioc->FreeQlock, flags);
--              hd->tmPending |=  (1 << type);
--              spin_unlock_irqrestore(&ioc->FreeQlock, flags);
--      }
--
--      ioc_raw_state = mpt_GetIocState(ioc, 0);
--
--      if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) {
--              printk(MYIOC_s_WARN_FMT
--                      "TM Handler for type=%x: IOC Not operational (0x%x)!\n",
--                      ioc->name, type, ioc_raw_state);
--              printk(MYIOC_s_WARN_FMT " Issuing HardReset!!\n", ioc->name);
--              if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0)
--                      printk(MYIOC_s_WARN_FMT "TMHandler: HardReset "
--                          "FAILED!!\n", ioc->name);
--              return FAILED;
--      }
--
--      if (ioc_raw_state & MPI_DOORBELL_ACTIVE) {
--              printk(MYIOC_s_WARN_FMT
--                      "TM Handler for type=%x: ioc_state: "
--                      "DOORBELL_ACTIVE (0x%x)!\n",
--                      ioc->name, type, ioc_raw_state);
--              return FAILED;
--      }
--
--      /* Isse the Task Mgmt request.
--       */
--      if (hd->hard_resets < -1)
--              hd->hard_resets++;
--
--      rc = mptscsih_IssueTaskMgmt(hd, type, channel, id, lun,
--          ctx2abort, timeout);
--      if (rc)
--              printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n",
--                     ioc->name);
--      else
--              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issue of TaskMgmt Successful!\n",
--                         ioc->name));
--
--      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
--                      "TMHandler rc = %d!\n", ioc->name, rc));
--
--      return rc;
--}
--
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/**
-- *    mptscsih_IssueTaskMgmt - Generic send Task Management function.
-- *    @hd: Pointer to MPT_SCSI_HOST structure
-- *    @type: Task Management type
-- *    @channel: channel number for task management
-- *    @id: Logical Target ID for reset (if appropriate)
-- *    @lun: Logical Unit for reset (if appropriate)
-- *    @ctx2abort: Context for the task to be aborted (if appropriate)
-- *    @timeout: timeout for task management control
-- *
-- *    Remark: _HardResetHandler can be invoked from an interrupt thread (timer)
-- *    or a non-interrupt thread.  In the former, must not call schedule().
-- *
-- *    Not all fields are meaningfull for all task types.
-- *
-- *    Returns 0 for SUCCESS, or FAILED.
-- *
-- **/
++/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 +
- static int
--mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
++static int
 +mptscsih_scandv_bus_reset(MPT_ADAPTER *ioc)
- {
-       MPT_FRAME_HDR   *mf;
-       SCSITaskMgmt_t  *pScsiTm;
++{
++      MPT_FRAME_HDR   *mf;
++      SCSITaskMgmt_t  *pScsiTm;
 +      SCSITaskMgmtReply_t *pScsiTmReply;
-       int              ii;
-       int              retval;
--      MPT_ADAPTER     *ioc = hd->ioc;
++      int              ii;
++      int              retval;
 +      unsigned long    timeout;
 +      unsigned long    time_count;
 +      u16              iocstatus;
@@ -211236,59 +210968,36 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              mutex_unlock(&ioc->taskmgmt_cmds.mutex);
 +              return -EPERM;
 +      }
--      /* Return Fail to calling function if no message frames available.
++
 +      /* Send request
-        */
-       if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
--              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n",
--                              ioc->name));
--              return FAILED;
++       */
++      if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
 +              dtmprintk(ioc, printk(MYIOC_s_WARN_FMT
 +                      "TaskMgmt, no msg frames!!\n", ioc->name));
 +              mpt_clear_taskmgmt_in_progress_flag(ioc);
 +              retval = -ENOMEM;
 +              goto out;
-       }
--      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt request @ %p\n",
--                      ioc->name, mf));
--      /* Format the Request
--       */
++      }
++
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
 +              ioc->name, mf));
 +
-       pScsiTm = (SCSITaskMgmt_t *) mf;
--      pScsiTm->TargetID = id;
--      pScsiTm->Bus = channel;
--      pScsiTm->ChainOffset = 0;
++      pScsiTm = (SCSITaskMgmt_t *) mf;
 +      memset(pScsiTm, 0, sizeof(SCSITaskMgmt_t));
-       pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--
++      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
 +      pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS;
 +      pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
 +      pScsiTm->TargetID = 0;
 +      pScsiTm->Bus = 0;
 +      pScsiTm->ChainOffset = 0;
-       pScsiTm->Reserved = 0;
--      pScsiTm->TaskType = type;
-       pScsiTm->Reserved1 = 0;
--      pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
--                    ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
--
--      int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
--
--      for (ii=0; ii < 7; ii++)
++      pScsiTm->Reserved = 0;
++      pScsiTm->Reserved1 = 0;
 +      pScsiTm->TaskMsgContext = 0;
 +      for (ii = 0; ii < 8; ii++)
 +              pScsiTm->LUN[ii] = 0;
 +      for (ii = 0; ii < 7; ii++)
-               pScsiTm->Reserved2[ii] = 0;
--      pScsiTm->TaskMsgContext = ctx2abort;
--
--      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt: ctx2abort (0x%08x) "
--              "type=%d\n", ioc->name, ctx2abort, type));
++              pScsiTm->Reserved2[ii] = 0;
++
 +      switch (ioc->bus_type) {
 +      case FC:
 +              timeout = 40;
@@ -211301,27 +211010,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              timeout = 10;
 +              break;
 +      }
--      DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
++
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +              "TaskMgmt type=%d timeout=%ld\n", ioc->name,
 +              MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, timeout));
++
 +      INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
 +      CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
 +      retval = 0;
 +      time_count = jiffies;
-       if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
-           (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
-               mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
-       else {
-               retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
--                      sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
--              if (retval) {
--                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "send_handshake FAILED!"
--                      " (hd %p, ioc %p, mf %p, rc=%d) \n", ioc->name, hd,
--                      ioc, mf, retval));
--                      goto fail_out;
++      if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
++          (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
++              mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
++      else {
++              retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
 +                  sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
 +              if (retval != 0) {
 +                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
@@ -211330,19 +211032,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +                              ioc, mf, retval));
 +                      mpt_clear_taskmgmt_in_progress_flag(ioc);
 +                      goto out;
-               }
-       }
--      if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) {
--              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "task management request TIMED OUT!"
--                      " (hd %p, ioc %p, mf %p) \n", ioc->name, hd,
--                      ioc, mf));
--              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
--                       ioc->name));
--              retval = mpt_HardResetHandler(ioc, CAN_SLEEP);
--              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rc=%d \n",
--                       ioc->name, retval));
--              goto fail_out;
++              }
++      }
++
 +      /* Now wait for the command to complete */
 +      ii = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done, timeout*HZ);
 +      if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
@@ -211352,25 +211044,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              mpt_clear_taskmgmt_in_progress_flag(ioc);
 +              retval = -1; /* return failure */
 +              goto out;
-       }
--      /*
--       * Handle success case, see if theres a non-zero ioc_status.
--       */
--      if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS ||
--         hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
--         hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED)
--              retval = 0;
--      else
--              retval = FAILED;
++      }
++
 +      if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
 +              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +                  "TaskMgmt failed\n", ioc->name));
 +              retval = -1; /* return failure */
 +              goto out;
 +      }
--      return retval;
++
 +      pScsiTmReply = (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply;
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +          "TaskMgmt fw_channel = %d, fw_id = %d, task_type = 0x%02X,\n"
@@ -211381,17 +211063,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +          le32_to_cpu(pScsiTmReply->IOCLogInfo),
 +          pScsiTmReply->ResponseCode,
 +          le32_to_cpu(pScsiTmReply->TerminationCount)));
-- fail_out:
++
 +      iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK;
--      /*
--       * Free task management mf, and corresponding tm flags
--       */
--      mpt_free_msg_frame(ioc, mf);
--      hd->tmPending = 0;
--      hd->tmState = TM_STATE_NONE;
--      return FAILED;
++
 +      if (iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
 +         iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED ||
 +         iocstatus == MPI_IOCSTATUS_SUCCESS)
@@ -211406,14 +211080,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +      mutex_unlock(&ioc->taskmgmt_cmds.mutex);
 +      CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
 +      return retval;
- }
--static int
--mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
++}
++
 +int
 +mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
- {
--      switch (ioc->bus_type) {
++{
 +      MPT_SCSI_HOST   *hd;
 +
 +      if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL))
@@ -211532,28 +211203,57 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +}
 +
 +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/**
+ /**
+- *    mptscsih_TMHandler - Generic handler for SCSI Task Management.
+- *    @hd: Pointer to MPT SCSI HOST structure
+- *    @type: Task Management type
+- *    @channel: channel number for task management
+- *    @id: Logical Target ID for reset (if appropriate)
+- *    @lun: Logical Unit for reset (if appropriate)
+- *    @ctx2abort: Context for the task to be aborted (if appropriate)
+- *    @timeout: timeout for task management control
 + *    mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver
 + *    @ioc: Pointer to MPT_ADAPTER structure
 + *    @mf: Pointer to SCSI task mgmt request frame
 + *    @mr: Pointer to SCSI task mgmt reply frame
-+ *
+  *
+- *    Fall through to mpt_HardResetHandler if: not operational, too many
+- *    failed TM requests or handshake failure.
 + *    This routine is called from mptbase.c::mpt_interrupt() at the completion
 + *    of any SCSI task management request.
 + *    This routine is registered with the MPT (base) driver at driver
 + *    load/init time via the mpt_register() API call.
-+ *
+  *
+- *    Remark: Currently invoked from a non-interrupt thread (_bh).
+- *
+- *    Note: With old EH code, at most 1 SCSI TaskMgmt function per IOC
+- *    will be active.
+- *
+- *    Returns 0 for SUCCESS, or %FAILED.
 + *    Returns 1 indicating alloc'd request frame ptr should be freed.
-+ **/
-+int
+  **/
+ int
+-mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
 +mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf,
 +    MPT_FRAME_HDR *mr)
-+{
+ {
+-      MPT_ADAPTER     *ioc;
+-      int              rc = -1;
+-      u32              ioc_raw_state;
+-      unsigned long    flags;
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt completed (mf=%p, mr=%p)\n",
 +          ioc->name, mf, mr));
-+
+-      ioc = hd->ioc;
+-      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler Entered!\n", ioc->name));
 +      ioc->taskmgmt_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+
+-      // SJR - CHECKME - Can we avoid this here?
+-      // (mpt_HardResetHandler has this check...)
+-      spin_lock_irqsave(&ioc->diagLock, flags);
+-      if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) {
+-              spin_unlock_irqrestore(&ioc->diagLock, flags);
+-              return FAILED;
 +      if (!mr)
 +              goto out;
 +
@@ -211566,37 +211266,101 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
 +              complete(&ioc->taskmgmt_cmds.done);
 +              return 1;
-+      }
+       }
+-      spin_unlock_irqrestore(&ioc->diagLock, flags);
+-
+-      /*  Wait a fixed amount of time for the TM pending flag to be cleared.
+-       *  If we time out and not bus reset, then we return a FAILED status
+-       *  to the caller.
+-       *  The call to mptscsih_tm_pending_wait() will set the pending flag
+-       *  if we are
+-       *  successful. Otherwise, reload the FW.
+-       */
+-      if (mptscsih_tm_pending_wait(hd) == FAILED) {
+-              if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
+-                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler abort: "
+-                         "Timed out waiting for last TM (%d) to complete! \n",
+-                         ioc->name, hd->tmPending));
+-                      return FAILED;
+-              } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
+-                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler target "
+-                              "reset: Timed out waiting for last TM (%d) "
+-                              "to complete! \n", ioc->name,
+-                              hd->tmPending));
+-                      return FAILED;
+-              } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
+-                      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TMHandler bus reset: "
+-                         "Timed out waiting for last TM (%d) to complete! \n",
+-                        ioc->name, hd->tmPending));
+-                      return FAILED;
+-              }
+-      } else {
+-              spin_lock_irqsave(&ioc->FreeQlock, flags);
+-              hd->tmPending |=  (1 << type);
+-              spin_unlock_irqrestore(&ioc->FreeQlock, flags);
+-      }
+-
+-      ioc_raw_state = mpt_GetIocState(ioc, 0);
+-
+-      if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) {
+-              printk(MYIOC_s_WARN_FMT
+-                      "TM Handler for type=%x: IOC Not operational (0x%x)!\n",
+-                      ioc->name, type, ioc_raw_state);
+-              printk(MYIOC_s_WARN_FMT " Issuing HardReset!!\n", ioc->name);
+-              if (mpt_HardResetHandler(ioc, CAN_SLEEP) < 0)
+-                      printk(MYIOC_s_WARN_FMT "TMHandler: HardReset "
+-                          "FAILED!!\n", ioc->name);
+-              return FAILED;
+-      }
+-
+-      if (ioc_raw_state & MPI_DOORBELL_ACTIVE) {
+-              printk(MYIOC_s_WARN_FMT
+-                      "TM Handler for type=%x: ioc_state: "
+-                      "DOORBELL_ACTIVE (0x%x)!\n",
+-                      ioc->name, type, ioc_raw_state);
+-              return FAILED;
+-      }
+-
+-      /* Isse the Task Mgmt request.
+-       */
+-      if (hd->hard_resets < -1)
+-              hd->hard_resets++;
+-
+-      rc = mptscsih_IssueTaskMgmt(hd, type, channel, id, lun,
+-          ctx2abort, timeout);
+-      if (rc)
+-              printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n",
+-                     ioc->name);
+-      else
+-              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Issue of TaskMgmt Successful!\n",
+-                         ioc->name));
+-
+-      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-                      "TMHandler rc = %d!\n", ioc->name, rc));
+-
+-      return rc;
 +      return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/**
-+ *    mptscsih_IssueTaskMgmt - Generic send Task Management function.
-+ *    @hd: Pointer to MPT_SCSI_HOST structure
-+ *    @type: Task Management type
-+ *    @channel: channel number for task management
-+ *    @id: Logical Target ID for reset (if appropriate)
-+ *    @lun: Logical Unit for reset (if appropriate)
-+ *    @ctx2abort: Context for the task to be aborted (if appropriate)
-+ *    @timeout: timeout for task management control
-+ *
-+ *    Remark: _HardResetHandler can be invoked from an interrupt thread (timer)
-+ *    or a non-interrupt thread.  In the former, must not call schedule().
-+ *
-+ *    Not all fields are meaningfull for all task types.
-+ *
-+ *    Returns 0 for SUCCESS, or FAILED.
-+ *
-+ **/
+ }
+-
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /**
+@@ -1659,23 +1819,61 @@
+  *    Returns 0 for SUCCESS, or FAILED.
+  *
+  **/
+-static int
+-mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout)
 +int
 +mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun,
 +    int ctx2abort, ulong timeout)
-+{
+ {
+-      MPT_FRAME_HDR   *mf;
 +      MPT_FRAME_HDR   *mf = NULL;
-+      SCSITaskMgmt_t  *pScsiTm;
-+      int              ii;
-+      int              retval;
+       SCSITaskMgmt_t  *pScsiTm;
+       int              ii;
+       int              retval;
+-      MPT_ADAPTER     *ioc = hd->ioc;
 +      MPT_ADAPTER     *ioc = hd->ioc;
 +      unsigned long    timeleft;
 +      u8               issue_hard_reset;
@@ -211632,65 +211396,81 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              retval = FAILED;
 +              goto out;
 +      }
-+
-+      /* Return Fail to calling function if no message frames available.
-+       */
-+      if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+       /* Return Fail to calling function if no message frames available.
+        */
+       if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
+-              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n",
+-                              ioc->name));
+-              return FAILED;
 +              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
 +                      "TaskMgmt no msg frames!!\n",
 +                      ioc->name));
 +              retval = FAILED;
 +              mpt_clear_taskmgmt_in_progress_flag(ioc);
 +              goto out;
-+      }
+       }
+-      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt request @ %p\n",
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt request (mf=%p)\n",
-+                      ioc->name, mf));
-+
-+      /* Format the Request
-+       */
-+      pScsiTm = (SCSITaskMgmt_t *) mf;
-+      pScsiTm->TargetID = id;
-+      pScsiTm->Bus = channel;
-+      pScsiTm->ChainOffset = 0;
-+      pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-+
-+      pScsiTm->Reserved = 0;
-+      pScsiTm->TaskType = type;
-+      pScsiTm->Reserved1 = 0;
-+      pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
+                       ioc->name, mf));
+       /* Format the Request
+@@ -1690,67 +1888,73 @@
+       pScsiTm->TaskType = type;
+       pScsiTm->Reserved1 = 0;
+       pScsiTm->MsgFlags = (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)
+-                    ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
 +              ? MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION : 0;
-+
-+      int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
-+
+       int_to_scsilun(lun, (struct scsi_lun *)pScsiTm->LUN);
+-      for (ii=0; ii < 7; ii++)
 +      for (ii = 0; ii < 7; ii++)
-+              pScsiTm->Reserved2[ii] = 0;
-+
-+      pScsiTm->TaskMsgContext = ctx2abort;
-+
+               pScsiTm->Reserved2[ii] = 0;
+       pScsiTm->TaskMsgContext = ctx2abort;
+-      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "IssueTaskMgmt: ctx2abort (0x%08x) "
+-              "type=%d\n", ioc->name, ctx2abort, type));
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "TaskMgmt: ctx2abort (0x%08x) "
 +          "task_type = 0x%02X, timeout = %ld\n", ioc->name, ctx2abort,
 +          type, timeout));
-+
-+      DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
-+
+       DBG_DUMP_TM_REQUEST_FRAME(ioc, (u32 *)pScsiTm);
 +      INITIALIZE_MGMT_STATUS(ioc->taskmgmt_cmds.status)
 +      time_count = jiffies;
-+      if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
-+          (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
-+              mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
-+      else {
-+              retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
+       if ((ioc->facts.IOCCapabilities & MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q) &&
+           (ioc->facts.MsgVersion >= MPI_VERSION_01_05))
+               mpt_put_msg_frame_hi_pri(ioc->TaskCtx, ioc, mf);
+       else {
+               retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
+-                      sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP);
 +                      sizeof(SCSITaskMgmt_t), (u32 *)pScsiTm, CAN_SLEEP);
-+              if (retval) {
+               if (retval) {
+-                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "send_handshake FAILED!"
+-                      " (hd %p, ioc %p, mf %p, rc=%d) \n", ioc->name, hd,
+-                      ioc, mf, retval));
+-                      goto fail_out;
 +                      dfailprintk(ioc, printk(MYIOC_s_ERR_FMT
 +                              "TaskMgmt handshake FAILED!"
 +                              " (mf=%p, rc=%d) \n", ioc->name, mf, retval));
 +                      mpt_free_msg_frame(ioc, mf);
 +                      mpt_clear_taskmgmt_in_progress_flag(ioc);
 +                      goto out;
-+              }
-+      }
-+
+               }
+       }
+-      if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) {
+-              dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "task management request TIMED OUT!"
+-                      " (hd %p, ioc %p, mf %p) \n", ioc->name, hd,
+-                      ioc, mf));
+-              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Calling HardReset! \n",
+-                       ioc->name));
+-              retval = mpt_HardResetHandler(ioc, CAN_SLEEP);
+-              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "rc=%d \n",
+-                       ioc->name, retval));
+-              goto fail_out;
 +      timeleft = wait_for_completion_timeout(&ioc->taskmgmt_cmds.done,
 +          timeout*HZ);
 +      if (!(ioc->taskmgmt_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
@@ -211702,11 +211482,20 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +                      goto out;
 +              issue_hard_reset = 1;
 +              goto out;
-+      }
-+
+       }
+-      /*
+-       * Handle success case, see if theres a non-zero ioc_status.
+-       */
+-      if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS ||
+-         hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
+-         hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED)
+-              retval = 0;
+-      else
+-              retval = FAILED;
 +      retval = mptscsih_taskmgmt_reply(ioc, type,
 +          (SCSITaskMgmtReply_t *) ioc->taskmgmt_cmds.reply);
-+
 +      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 +          "TaskMgmt completed (%d seconds)\n",
 +          ioc->name, jiffies_to_msecs(jiffies - time_count)/1000));
@@ -211724,13 +211513,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +
 +      retval = (retval == 0) ? 0 : FAILED;
 +      mutex_unlock(&ioc->taskmgmt_cmds.mutex);
-+      return retval;
-+}
-+
-+static int
-+mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
-+{
-+      switch (ioc->bus_type) {
+       return retval;
+-
+- fail_out:
+-
+-      /*
+-       * Free task management mf, and corresponding tm flags
+-       */
+-      mpt_free_msg_frame(ioc, mf);
+-      hd->tmPending = 0;
+-      hd->tmState = TM_STATE_NONE;
+-      return FAILED;
+ }
+ static int
+@@ -1760,10 +1964,10 @@
        case FC:
                return 40;
        case SAS:
@@ -211743,7 +211540,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        }
  }
  
-@@ -1786,7 +1990,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1786,7 +1990,7 @@
        int              retval;
        VirtDevice       *vdevice;
        ulong            sn = SCpnt->serial_number;
@@ -211752,7 +211549,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /* If we can't locate our host adapter structure, return FAILED status.
         */
-@@ -1810,7 +2014,21 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1810,7 +2014,21 @@
                    ioc->name, SCpnt));
                SCpnt->result = DID_NO_CONNECT << 16;
                SCpnt->scsi_done(SCpnt);
@@ -211775,7 +211572,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                goto out;
        }
  
-@@ -1825,27 +2043,23 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1825,27 +2043,23 @@
                goto out;
        }
  
@@ -211814,7 +211611,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /* Most important!  Set TaskMsgContext to SCpnt's MsgContext!
         * (the IO to be ABORT'd)
-@@ -1856,25 +2070,31 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
+@@ -1856,25 +2070,31 @@
         */
        mf = MPT_INDEX_2_MFPTR(ioc, scpnt_idx);
        ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext;
@@ -211856,7 +211653,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -1907,14 +2127,9 @@ mptscsih_dev_reset(struct scsi_cmnd * SC
+@@ -1907,14 +2127,9 @@
               ioc->name, SCpnt);
        scsi_print_command(SCpnt);
  
@@ -211872,7 +211669,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                goto out;
        }
  
-@@ -1925,12 +2140,12 @@ mptscsih_dev_reset(struct scsi_cmnd * SC
+@@ -1925,12 +2140,12 @@
                goto out;
        }
  
@@ -211889,7 +211686,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
            ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
  
        if (retval == 0)
-@@ -1955,12 +2170,12 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
+@@ -1955,12 +2170,12 @@
        MPT_SCSI_HOST   *hd;
        int              retval;
        VirtDevice       *vdevice;
@@ -211904,7 +211701,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                   "Can't locate host! (sc=%p)\n", SCpnt);
                return FAILED;
        }
-@@ -1970,11 +2185,13 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
+@@ -1970,11 +2185,13 @@
               ioc->name, SCpnt);
        scsi_print_command(SCpnt);
  
@@ -211921,7 +211718,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
            vdevice->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(ioc));
  
        printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n",
-@@ -1999,8 +2216,9 @@ int
+@@ -1999,8 +2216,9 @@
  mptscsih_host_reset(struct scsi_cmnd *SCpnt)
  {
        MPT_SCSI_HOST *  hd;
@@ -211933,7 +211730,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /*  If we can't locate the host to reset, then we failed. */
        if ((hd = shost_priv(SCpnt->device->host)) == NULL){
-@@ -2011,237 +2229,29 @@ mptscsih_host_reset(struct scsi_cmnd *SC
+@@ -2011,237 +2229,29 @@
  
        ioc = hd->ioc;
        printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
@@ -211963,7 +211760,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        printk(MYIOC_s_INFO_FMT "host reset: %s (sc=%p)\n",
            ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
+-
 -      return retval;
 -}
 -
@@ -211994,7 +211791,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -              spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 -              msleep(250);
 -      } while (--loop_count);
--
        return status;
  }
  
@@ -212077,7 +211874,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 - *    load/init time via the mpt_register() API call.
 - *
 - *    Returns 1 indicating alloc'd request frame ptr should be freed.
-- **/
++ *    This is anyones guess quite frankly.
+  **/
 -int
 -mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
 -{
@@ -212174,13 +211972,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/*
-  *    This is anyones guess quite frankly.
+- *    This is anyones guess quite frankly.
 - */
-+ **/
  int
  mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev,
                sector_t capacity, int geom[])
-@@ -2278,26 +2288,68 @@ mptscsih_bios_param(struct scsi_device *
+@@ -2278,24 +2288,66 @@
        return 0;
  }
  
@@ -212210,8 +212007,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        rc = 1;
                        goto out;
                }
-       }
++      }
++
 +      if (ioc->bus_type != SAS)
 +              goto out;
 +
@@ -212248,12 +212045,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +                      }
 +              }
 +              kfree(phys_disk);
-+      }
-+
+       }
        /*
-        * Check inactive list for matching phys disks
-        */
-@@ -2311,7 +2363,7 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, 
+@@ -2311,7 +2363,7 @@
                    (component_info->d.PhysDiskBus == channel))
                        rc = 1;
        }
@@ -212262,7 +212057,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
   out:
        return rc;
-@@ -2322,19 +2374,60 @@ u8
+@@ -2322,17 +2374,58 @@
  mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
  {
        struct inactive_raid_component_info *component_info;
@@ -212282,8 +212077,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                        rc = ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum;
                        goto out;
                }
-       }
++      }
++
 +      if (ioc->bus_type != SAS)
 +              goto out;
 +
@@ -212320,12 +212115,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +                      }
 +              }
 +              kfree(phys_disk);
-+      }
-+
+       }
        /*
-        * Check inactive list for matching phys disks
-        */
-@@ -2355,10 +2448,10 @@ mptscsih_raid_id_to_num(MPT_ADAPTER *ioc
+@@ -2355,10 +2448,10 @@
  }
  EXPORT_SYMBOL(mptscsih_raid_id_to_num);
  
@@ -212338,7 +212131,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  void
  mptscsih_slave_destroy(struct scsi_device *sdev)
  {
-@@ -2370,23 +2463,25 @@ mptscsih_slave_destroy(struct scsi_devic
+@@ -2370,23 +2463,25 @@
  
        starget = scsi_target(sdev);
        vtarget = starget->hostdata;
@@ -212368,7 +212161,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
  {
-@@ -2401,15 +2496,16 @@ mptscsih_change_queue_depth(struct scsi_
+@@ -2401,15 +2496,16 @@
        vtarget = starget->hostdata;
  
        if (ioc->bus_type == SPI) {
@@ -212390,7 +212183,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        if (qdepth > max_depth)
                qdepth = max_depth;
-@@ -2419,15 +2515,24 @@ mptscsih_change_queue_depth(struct scsi_
+@@ -2419,15 +2515,24 @@
                tagged = MSG_SIMPLE_TAG;
  
        scsi_adjust_queue_depth(sdev, tagged, qdepth);
@@ -212417,7 +212210,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  int
  mptscsih_slave_configure(struct scsi_device *sdev)
  {
-@@ -2436,52 +2541,37 @@ mptscsih_slave_configure(struct scsi_dev
+@@ -2436,52 +2541,37 @@
        VirtDevice              *vdevice;
        struct scsi_target      *starget;
        MPT_SCSI_HOST           *hd = shost_priv(sh);
@@ -212483,7 +212276,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static void
  mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
  {
-@@ -2502,7 +2592,11 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2502,7 +2592,11 @@
                /* Copy the sense received into the scsi command block. */
                req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
                sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC));
@@ -212496,7 +212289,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
                /* Log SMART data (asc = 0x5D, non-IM case only) if required.
                 */
-@@ -2521,10 +2615,10 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2521,10 +2615,10 @@
                                ioc->events[idx].data[1] = (sense_data[13] << 8) | sense_data[12];
  
                                ioc->eventContext++;
@@ -212510,7 +212303,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                                        vdevice->vtarget->tflags |=
                                            MPT_TARGET_FLAGS_LED_ON;
                                }
-@@ -2532,20 +2626,22 @@ mptscsih_copy_sense_data(struct scsi_cmn
+@@ -2532,20 +2626,22 @@
                }
        } else {
                dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Hmmm... SenseData len=0! (?)\n",
@@ -212521,40 +212314,40 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
  /**
   * mptscsih_get_scsi_lookup
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @i: index into the array
-  *
-  * retrieves scmd entry from ScsiLookup[] array list
-  *
-+ * @ioc: Pointer to MPT_ADAPTER structure
-+ * @i: index into the array
 + *
-  * Returns the scsi_cmd pointer
++ * retrieves scmd entry from ScsiLookup[] array list
 + *
+  * @ioc: Pointer to MPT_ADAPTER structure
+  * @i: index into the array
+  *
+- * retrieves scmd entry from ScsiLookup[] array list
++ * Returns the scsi_cmd pointer
+  *
+- * Returns the scsi_cmd pointer
   **/
 -static struct scsi_cmnd *
 +struct scsi_cmnd *
  mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i)
  {
        unsigned long   flags;
-@@ -2560,12 +2656,14 @@ mptscsih_get_scsi_lookup(MPT_ADAPTER *io
+@@ -2560,12 +2656,14 @@
  
  /**
   * mptscsih_getclear_scsi_lookup
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @i: index into the array
-  *
-  * retrieves and clears scmd entry from ScsiLookup[] array list
-  *
-+ * @ioc: Pointer to MPT_ADAPTER structure
-+ * @i: index into the array
 + *
-  * Returns the scsi_cmd pointer
++ * retrieves and clears scmd entry from ScsiLookup[] array list
 + *
+  * @ioc: Pointer to MPT_ADAPTER structure
+  * @i: index into the array
+  *
+- * retrieves and clears scmd entry from ScsiLookup[] array list
++ * Returns the scsi_cmd pointer
+  *
+- * Returns the scsi_cmd pointer
   **/
  static struct scsi_cmnd *
  mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i)
-@@ -2602,10 +2700,14 @@ mptscsih_set_scsi_lookup(MPT_ADAPTER *io
+@@ -2602,10 +2700,14 @@
  }
  
  /**
@@ -212572,7 +212365,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static int
  SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *sc)
  {
-@@ -2627,380 +2729,233 @@ SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, st
+@@ -2627,378 +2729,231 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  int
@@ -212581,12 +212374,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  {
 -      MPT_SCSI_HOST   *hd;
 -      unsigned long    flags;
--
++      u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
 -      dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -          ": IOC %s_reset routed to SCSI host driver!\n",
 -          ioc->name, reset_phase==MPT_IOC_SETUP_RESET ? "setup" : (
 -          reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post")));
--
++      devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++          "MPT event (=%02Xh) routed to SCSI host driver!\n",
++          ioc->name, event));
 -      /* If a FW reload request arrives after base installed but
 -       * before all scsi hosts have been attached, then an alt_ioc
 -       * may have a NULL sh pointer.
@@ -212663,13 +212460,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -                      wake_up(&hd->scandv_waitq);
 -                      hd->cmdPtr = NULL;
 -              }
-+      u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
+-
 -              dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Post-Reset complete.\n", ioc->name));
-+      devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+          "MPT event (=%02Xh) routed to SCSI host driver!\n",
-+          ioc->name, event));
+-
 -      }
 +      if ((event == MPI_EVENT_IOC_BUS_RESET ||
 +          event == MPI_EVENT_EXT_BUS_RESET) &&
@@ -212722,13 +212515,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +      pReq->MsgFlags = 0;
 +      pReq->Reserved2 = 0;
 +      pReq->ActionDataWord = 0; /* Reserved for this action */
-+
-+      ioc->add_sge((char *)&pReq->ActionDataSGE,
-+              MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
-+
-+      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+              "RAID Volume action=%x channel=%d id=%d\n",
-+              ioc->name, pReq->Action, channel, id));
  
 -      switch (event) {
 -      case MPI_EVENT_UNIT_ATTENTION:                  /* 03 */
@@ -212741,7 +212527,13 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -              break;
 -      case MPI_EVENT_LOGOUT:                          /* 09 */
 -              /* FIXME! */
--              break;
++      ioc->add_sge((char *)&pReq->ActionDataSGE,
++              MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
++
++      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++              "RAID Volume action=%x channel=%d id=%d\n",
++              ioc->name, pReq->Action, channel, id));
++
 +      INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
 +      mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
 +      timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ);
@@ -212760,28 +212552,15 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +              }
 +              goto out;
 +      }
--      case MPI_EVENT_RESCAN:                          /* 06 */
--              break;
++
 +      ret = ioc->internal_cmds.completion_code;
--              /*
--               *  CHECKME! Don't think we need to do
--               *  anything for these, but...
--               */
--      case MPI_EVENT_LINK_STATUS_CHANGE:              /* 07 */
--      case MPI_EVENT_LOOP_STATE_CHANGE:               /* 08 */
--              /*
--               *  CHECKME!  Falling thru...
--               */
--              break;
++
 + out:
 +      CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
 +      mutex_unlock(&ioc->internal_cmds.mutex);
 +      return ret;
 +}
--      case MPI_EVENT_INTEGRATED_RAID:                 /* 0B */
++
 +/**
 + *    mptscsih_get_completion_code -
 + *    @ioc: Pointer to MPT_ADAPTER structure
@@ -212813,20 +212592,31 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +
 +      case MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE:       /* 0x0043 */
 +              completion_code = MPT_SCANDV_SELECTION_TIMEOUT;
-+              break;
-+
+               break;
+-      case MPI_EVENT_RESCAN:                          /* 06 */
 +      case MPI_IOCSTATUS_SCSI_IO_DATA_ERROR:          /* 0x0046 */
 +      case MPI_IOCSTATUS_SCSI_TASK_TERMINATED:        /* 0x0048 */
 +      case MPI_IOCSTATUS_SCSI_IOC_TERMINATED:         /* 0x004B */
 +      case MPI_IOCSTATUS_SCSI_EXT_TERMINATED:         /* 0x004C */
 +              completion_code = MPT_SCANDV_DID_RESET;
-+              break;
-+
+               break;
+-              /*
+-               *  CHECKME! Don't think we need to do
+-               *  anything for these, but...
+-               */
+-      case MPI_EVENT_LINK_STATUS_CHANGE:              /* 07 */
+-      case MPI_EVENT_LOOP_STATE_CHANGE:               /* 08 */
+-              /*
+-               *  CHECKME!  Falling thru...
+-               */
 +      case MPI_IOCSTATUS_BUSY:
 +      case MPI_IOCSTATUS_INSUFFICIENT_RESOURCES:
 +              completion_code = MPT_SCANDV_BUSY;
-+              break;
-+
+               break;
+-      case MPI_EVENT_INTEGRATED_RAID:                 /* 0B */
 +      case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN:          /* 0x0045 */
 +      case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR:        /* 0x0040 */
 +      case MPI_IOCSTATUS_SUCCESS:                     /* 0x0000 */
@@ -212875,26 +212665,41 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -      }
  
 -      return 1;               /* currently means nothing really */
--}
 +      }       /* switch(status) */
++
++      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++          "  completionCode set to %08xh\n", ioc->name, completion_code));
++      return completion_code;
+ }
  
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/*
 - *  Bus Scan and Domain Validation functionality ...
 - */
-+      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+          "  completionCode set to %08xh\n", ioc->name, completion_code));
-+      return completion_code;
-+}
++/**
++ *    mptscsih_scandv_complete -
++ *    @ioc: Pointer to MPT_ADAPTER structure
++ *    @req:
++ *    @reply:
++ *
++ **/
++int
++mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req,
++    MPT_FRAME_HDR *reply)
++{
++      SCSIIORequest_t *pReq;
++      SCSIIOReply_t   *pReply;
++      u8               cmd;
++      u16              req_idx;
++      u8              *sense_data;
++      int              sz;
  
 -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/*
 - *    mptscsih_scandv_complete - Scan and DV callback routine registered
 - *    to Fustion MPT (base) driver.
 - *
-+/**
-+ *    mptscsih_scandv_complete -
-  *    @ioc: Pointer to MPT_ADAPTER structure
+- *    @ioc: Pointer to MPT_ADAPTER structure
 - *    @mf: Pointer to original MPT request frame
 - *    @mr: Pointer to MPT reply frame (NULL if TurboReply)
 - *
@@ -212904,27 +212709,22 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 - *    load/init time via the mpt_register() API call.
 - *
 - *    Returns 1 indicating alloc'd request frame ptr should be freed.
-+ *    @req:
-+ *    @reply:
-  *
+- *
 - *    Remark: Sets a completion code and (possibly) saves sense data
 - *    in the IOC member localReply structure.
 - *    Used ONLY for DV and other internal commands.
 - */
-+ **/
- int
+-int
 -mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req,
-+    MPT_FRAME_HDR *reply)
- {
+-{
 -      MPT_SCSI_HOST   *hd;
-       SCSIIORequest_t *pReq;
+-      SCSIIORequest_t *pReq;
 -      int              completionCode;
-+      SCSIIOReply_t   *pReply;
-+      u8               cmd;
-       u16              req_idx;
-+      u8              *sense_data;
-+      int              sz;
+-      u16              req_idx;
++      ioc->internal_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
++      ioc->internal_cmds.completion_code = MPT_SCANDV_GOOD;
++      if (!reply)
++              goto out;
  
 -      hd = shost_priv(ioc->sh);
 -
@@ -212934,20 +212734,6 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -                      "ScanDvComplete, %s req frame ptr! (=%p)\n",
 -                              ioc->name, mf?"BAD":"NULL", (void *) mf);
 -              goto wakeup;
--      }
--
--      del_timer(&hd->timer);
--      req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--      mptscsih_set_scsi_lookup(ioc, req_idx, NULL);
--      pReq = (SCSIIORequest_t *) mf;
-+      ioc->internal_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
-+      ioc->internal_cmds.completion_code = MPT_SCANDV_GOOD;
-+      if (!reply)
-+              goto out;
--      if (mf != hd->cmdPtr) {
--              printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n",
--                              ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
 +      pReply = (SCSIIOReply_t *) reply;
 +      pReq = (SCSIIORequest_t *) req;
 +      ioc->internal_cmds.completion_code =
@@ -212966,6 +212752,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +                  MPT_SENSE_BUFFER_ALLOC);
 +              memcpy(ioc->internal_cmds.sense, sense_data, sz);
        }
+-
+-      del_timer(&hd->timer);
+-      req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
+-      mptscsih_set_scsi_lookup(ioc, req_idx, NULL);
+-      pReq = (SCSIIORequest_t *) mf;
+-
+-      if (mf != hd->cmdPtr) {
+-              printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n",
+-                              ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
+-      }
 -      hd->cmdPtr = NULL;
 -
 -      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScanDvComplete (mf=%p,mr=%p,idx=%d)\n",
@@ -213094,8 +212890,8 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +      complete(&ioc->internal_cmds.done);
        return 1;
  }
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-
+-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 -/*    mptscsih_timer_expired - Call back for timer process.
 - *    Used only for dv functionality.
 - *    @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
@@ -213140,12 +212936,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -      return;
 -}
 -
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
-  *    mptscsih_do_cmd - Do internal command.
-  *    @hd: MPT_SCSI_HOST pointer
-@@ -3019,28 +2974,33 @@ mptscsih_timer_expired(unsigned long dat
+@@ -3019,28 +2974,33 @@
   *               0 if good
   *
   *             > 0 if command complete but some type of completion error.
@@ -213191,7 +212985,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /* Set command specific information
         */
-@@ -3050,13 +3010,13 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3050,13 +3010,13 @@
                dir = MPI_SCSIIO_CONTROL_READ;
                CDB[0] = cmd;
                CDB[4] = io->size;
@@ -213207,7 +213001,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                break;
  
        case START_STOP:
-@@ -3064,7 +3024,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3064,7 +3024,7 @@
                dir = MPI_SCSIIO_CONTROL_READ;
                CDB[0] = cmd;
                CDB[4] = 1;     /*Spin up the disk */
@@ -213216,7 +213010,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                break;
  
        case REQUEST_SENSE:
-@@ -3072,7 +3032,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3072,7 +3032,7 @@
                CDB[0] = cmd;
                CDB[4] = io->size;
                dir = MPI_SCSIIO_CONTROL_READ;
@@ -213225,7 +213019,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                break;
  
        case READ_BUFFER:
-@@ -3091,7 +3051,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3091,7 +3051,7 @@
                CDB[6] = (io->size >> 16) & 0xFF;
                CDB[7] = (io->size >>  8) & 0xFF;
                CDB[8] = io->size & 0xFF;
@@ -213234,7 +213028,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                break;
  
        case WRITE_BUFFER:
-@@ -3106,21 +3066,21 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3106,21 +3066,21 @@
                CDB[6] = (io->size >> 16) & 0xFF;
                CDB[7] = (io->size >>  8) & 0xFF;
                CDB[8] = io->size & 0xFF;
@@ -213259,7 +213053,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
                break;
  
        case SYNCHRONIZE_CACHE:
-@@ -3128,20 +3088,42 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3128,20 +3088,42 @@
                dir = MPI_SCSIIO_CONTROL_READ;
                CDB[0] = cmd;
  //            CDB[1] = 0x02;  /* set immediate bit */
@@ -213307,7 +213101,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        }
  
        pScsiReq = (SCSIIORequest_t *) mf;
-@@ -3164,14 +3146,10 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3164,14 +3146,10 @@
  
        pScsiReq->CDBLength = cmdLen;
        pScsiReq->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
@@ -213323,7 +213117,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        if (io->flags & MPT_ICFLAG_TAGGED_CMD)
                pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_SIMPLEQ);
        else
-@@ -3179,74 +3157,61 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3179,74 +3157,61 @@
  
        if (cmd == REQUEST_SENSE) {
                pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED);
@@ -213343,7 +213137,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
 -      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "Sending Command 0x%x for (%d:%d:%d)\n",
 -                      ioc->name, cmd, io->channel, io->id, io->lun));
--
++      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++          "%s: Sending Command 0x%02x for fw_channel=%d fw_id=%d lun=%d\n",
++          ioc->name, __func__, cmd, io->channel, io->id, io->lun));
 -      if (dir == MPI_SCSIIO_CONTROL_READ) {
 -              mpt_add_sge((char *) &pScsiReq->SGL,
 -                      MPT_SGE_FLAGS_SSIMPLE_READ | io->size,
@@ -213352,13 +213149,46 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -              mpt_add_sge((char *) &pScsiReq->SGL,
 -                      MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size,
 -                      io->data_dma);
--      }
--
++      if (dir == MPI_SCSIIO_CONTROL_READ)
++              ioc->add_sge((char *) &pScsiReq->SGL,
++                  MPT_SGE_FLAGS_SSIMPLE_READ | io->size, io->data_dma);
++      else
++              ioc->add_sge((char *) &pScsiReq->SGL,
++                  MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size, io->data_dma);
++
++      INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
++      mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
++      timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done,
++          timeout*HZ);
++      if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
++              ret = MPT_SCANDV_DID_RESET;
++              dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++                  "%s: TIMED OUT for cmd=0x%02x\n", ioc->name, __func__,
++                  cmd));
++              if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
++                      mpt_free_msg_frame(ioc, mf);
++                      goto out;
++              }
++              if (!timeleft) {
++                      if (!mptscsih_scandv_bus_reset(ioc))
++                              goto out;
++                      printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
++                          ioc->name, __func__);
++                      if (mpt_SoftResetHandler(ioc, CAN_SLEEP) != 0)
++                              mpt_HardResetHandler(ioc, CAN_SLEEP);
++                      mpt_free_msg_frame(ioc, mf);
++              }
++              goto out;
+       }
 -      /* The ISR will free the request frame, but we need
 -       * the information to initialize the target. Duplicate.
 -       */
 -      memcpy(&ReqCopy, pScsiReq, sizeof(SCSIIORequest_t));
--
++      ret = ioc->internal_cmds.completion_code;
++      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: success, rc=0x%02x\n",
++                      ioc->name, __func__, ret));
 -      /* Issue this command after:
 -       *      finish init
 -       *      add timer
@@ -213375,20 +213205,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -       * FW reload occurs
 -       */
 -      hd->cmdPtr = mf;
-+      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+          "%s: Sending Command 0x%02x for fw_channel=%d fw_id=%d lun=%d\n",
-+          ioc->name, __func__, cmd, io->channel, io->id, io->lun));
-+
-+      if (dir == MPI_SCSIIO_CONTROL_READ)
-+              ioc->add_sge((char *) &pScsiReq->SGL,
-+                  MPT_SGE_FLAGS_SSIMPLE_READ | io->size, io->data_dma);
-+      else
-+              ioc->add_sge((char *) &pScsiReq->SGL,
-+                  MPT_SGE_FLAGS_SSIMPLE_WRITE | io->size, io->data_dma);
+-
 -      add_timer(&hd->timer);
-+      INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
-       mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
+-      mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
 -      wait_event(hd->scandv_waitq, hd->scandv_wait_done);
 -
 -      if (hd->pLocal) {
@@ -213406,34 +213225,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 -              /* This should never happen. */
 -              ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "_do_cmd: Null pLocal!!!\n",
 -                              ioc->name));
-+      timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done,
-+          timeout*HZ);
-+      if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
-+              ret = MPT_SCANDV_DID_RESET;
-+              dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-+                  "%s: TIMED OUT for cmd=0x%02x\n", ioc->name, __func__,
-+                  cmd));
-+              if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
-+                      mpt_free_msg_frame(ioc, mf);
-+                      goto out;
-+              }
-+              if (!timeleft) {
-+                      if (!mptscsih_scandv_bus_reset(ioc))
-+                              goto out;
-+                      printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-+                          ioc->name, __func__);
-+                      if (mpt_SoftResetHandler(ioc, CAN_SLEEP) != 0)
-+                              mpt_HardResetHandler(ioc, CAN_SLEEP);
-+                      mpt_free_msg_frame(ioc, mf);
-+              }
-+              goto out;
-       }
+-      }
+-
 -      return rc;
-+      ret = ioc->internal_cmds.completion_code;
-+      devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: success, rc=0x%02x\n",
-+                      ioc->name, __func__, ret));
-+
 + out:
 +      CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
 +      mutex_unlock(&ioc->internal_cmds.mutex);
@@ -213441,7 +213235,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  }
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -3260,9 +3225,11 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
+@@ -3260,9 +3225,11 @@
   *
   */
  static void
@@ -213454,7 +213248,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  
        /* Ignore hidden raid components, this is handled when the command
         * is sent to the volume
-@@ -3274,23 +3241,24 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
+@@ -3274,23 +3241,24 @@
            !vdevice->configured_lun)
                return;
  
@@ -213485,7 +213279,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  static ssize_t
  mptscsih_version_fw_show(struct device *dev, struct device_attribute *attr,
                         char *buf)
-@@ -3464,13 +3432,47 @@ mptscsih_debug_level_store(struct device
+@@ -3464,12 +3432,46 @@
                return -EINVAL;
  
        ioc->debug_level = val;
@@ -213497,7 +213291,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
  }
  static DEVICE_ATTR(debug_level, S_IRUGO | S_IWUSR,
        mptscsih_debug_level_show, mptscsih_debug_level_store);
++
 +static ssize_t
 +mptscsih_disable_hotplug_remove_show(struct device *dev,
 +    struct device_attribute *attr, char *buf)
@@ -213531,11 +213325,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +static DEVICE_ATTR(disable_hotplug_remove, S_IRUGO | S_IWUSR,
 +      mptscsih_disable_hotplug_remove_show,
 +      mptscsih_disable_hotplug_remove_store);
-+
  struct device_attribute *mptscsih_host_attrs[] = {
        &dev_attr_version_fw,
-       &dev_attr_version_bios,
-@@ -3484,6 +3486,7 @@ struct device_attribute *mptscsih_host_a
+@@ -3484,6 +3486,7 @@
        &dev_attr_io_delay,
        &dev_attr_device_delay,
        &dev_attr_debug_level,
@@ -213543,7 +213336,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
        NULL,
  };
  EXPORT_SYMBOL(mptscsih_host_attrs);
-@@ -3510,7 +3513,9 @@ EXPORT_SYMBOL(mptscsih_scandv_complete);
+@@ -3510,7 +3513,9 @@
  EXPORT_SYMBOL(mptscsih_event_process);
  EXPORT_SYMBOL(mptscsih_ioc_reset);
  EXPORT_SYMBOL(mptscsih_change_queue_depth);
@@ -213556,9 +213349,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.c linux-2.6.27.19-5.1/dr
 +EXPORT_SYMBOL(mptscsih_get_scsi_lookup);
 +EXPORT_SYMBOL(mptscsih_taskmgmt_response_code);
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.h
---- linux-2.6.27/drivers/message/fusion/mptscsih.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptscsih.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptscsih.h
+--- a/drivers/message/fusion/mptscsih.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptscsih.h        Wed May 06 16:56:21 2009 +0100
 @@ -60,6 +60,7 @@
  #define MPT_SCANDV_SELECTION_TIMEOUT  (0x00000008)
  #define MPT_SCANDV_ISSUE_SENSE                (0x00000010)
@@ -213567,14 +213360,14 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/dr
  
  #define MPT_SCANDV_MAX_RETRIES                (10)
  
-@@ -71,6 +72,7 @@
+@@ -70,6 +71,7 @@
+ #define MPT_ICFLAG_TAGGED_CMD 0x10    /* Do tagged IO */
  #define MPT_ICFLAG_DID_RESET  0x20    /* Bus Reset occurred with this command */
  #define MPT_ICFLAG_RESERVED   0x40    /* Reserved has been issued */
 +
  #define MPT_SCSI_CMD_PER_DEV_HIGH     64
  #define MPT_SCSI_CMD_PER_DEV_LOW      32
 @@ -84,9 +86,11 @@
  #define MPTSCSIH_DOMAIN_VALIDATION      1
  #define MPTSCSIH_MAX_WIDTH              1
@@ -213587,7 +213380,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/dr
  #endif
  
  typedef struct _internal_cmd {
-@@ -112,7 +116,7 @@ extern int mptscsih_resume(struct pci_de
+@@ -112,7 +116,7 @@
  extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
  extern const char * mptscsih_info(struct Scsi_Host *SChost);
  extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *));
@@ -213596,7 +213389,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/dr
  extern int mptscsih_slave_configure(struct scsi_device *device);
  extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
  extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
-@@ -125,8 +129,13 @@ extern int mptscsih_scandv_complete(MPT_
+@@ -125,8 +129,13 @@
  extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
  extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
  extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
@@ -213612,9 +213405,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptscsih.h linux-2.6.27.19-5.1/dr
 +    u8 id);
 +extern struct scsi_cmnd * mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
 +extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code);
-diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/drivers/message/fusion/mptspi.c
---- linux-2.6.27/drivers/message/fusion/mptspi.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/mptspi.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/mptspi.c
+--- a/drivers/message/fusion/mptspi.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/message/fusion/mptspi.c  Wed May 06 16:56:21 2009 +0100
 @@ -53,8 +53,10 @@
  #include <linux/delay.h>      /* for mdelay */
  #include <linux/interrupt.h>  /* needed for in_interrupt() proto */
@@ -213626,7 +213419,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  
  #include <scsi/scsi.h>
  #include <scsi/scsi_cmnd.h>
-@@ -83,6 +85,11 @@ static int mpt_saf_te = MPTSCSIH_SAF_TE;
+@@ -83,6 +85,11 @@
  module_param(mpt_saf_te, int, 0);
  MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1  (default=MPTSCSIH_SAF_TE=0)");
  
@@ -213638,7 +213431,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static void mptspi_write_offset(struct scsi_target *, int);
  static void mptspi_write_width(struct scsi_target *, int);
  static int mptspi_write_spi_device_pg1(struct scsi_target *,
-@@ -95,12 +102,12 @@ static u8 mptspiTaskCtx = MPT_MAX_PROTOC
+@@ -95,12 +102,12 @@
  static u8     mptspiInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */
  
  /**
@@ -213653,7 +213446,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
   *    data, adapter capabilities, and NVRAM settings.
   **/
  static void
-@@ -131,7 +138,7 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST 
+@@ -131,7 +138,7 @@
                if (scsi_device_sync(sdev)) {
                        factor = pspi_data->minSyncFactor;
                        if (!scsi_device_dt(sdev))
@@ -213662,7 +213455,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                        else {
                                if (!scsi_device_ius(sdev) &&
                                    !scsi_device_qas(sdev))
-@@ -209,6 +216,10 @@ mptspi_setTargetNegoParms(MPT_SCSI_HOST 
+@@ -209,6 +216,10 @@
        target->maxOffset = offset;
        target->maxWidth = width;
  
@@ -213673,7 +213466,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO;
  
        /* Disable unused features.
-@@ -262,7 +273,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, 
+@@ -262,7 +273,7 @@
         */
        if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
                dfailprintk(ioc, printk(MYIOC_s_WARN_FMT
@@ -213682,7 +213475,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                return -EAGAIN;
        }
  
-@@ -300,7 +311,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, 
+@@ -300,7 +311,7 @@
        flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE |
                (IOCPage4Ptr->Header.PageLength + ii) * 4;
  
@@ -213691,7 +213484,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  
        ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
                "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
-@@ -371,7 +382,7 @@ mptspi_initTarget(MPT_SCSI_HOST *hd, Vir
+@@ -371,7 +382,7 @@
   *            non-zero = true
   *            zero = false
   *
@@ -213700,7 +213493,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static int
  mptspi_is_raid(struct _MPT_SCSI_HOST *hd, u32 id)
  {
-@@ -399,12 +410,11 @@ static int mptspi_target_alloc(struct sc
+@@ -399,12 +410,11 @@
        struct Scsi_Host *shost = dev_to_shost(&starget->dev);
        struct _MPT_SCSI_HOST *hd = shost_priv(shost);
        VirtTarget              *vtarget;
@@ -213714,7 +213507,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        vtarget = kzalloc(sizeof(VirtTarget), GFP_KERNEL);
        if (!vtarget)
                return -ENOMEM;
-@@ -471,9 +481,12 @@ mptspi_target_destroy(struct scsi_target
+@@ -471,9 +481,12 @@
  static void
  mptspi_print_write_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
  {
@@ -213729,7 +213522,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
            ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
            ((ii >> 8) & 0xFF), ((ii >> 16) & 0xFF),
            ii & MPI_SCSIDEVPAGE0_NP_IU ? "IU ": "",
-@@ -483,7 +496,7 @@ mptspi_print_write_nego(struct _MPT_SCSI
+@@ -483,7 +496,7 @@
            ii & MPI_SCSIDEVPAGE0_NP_WR_FLOW ? "WRFLOW ": "",
            ii & MPI_SCSIDEVPAGE0_NP_RD_STRM ? "RDSTRM ": "",
            ii & MPI_SCSIDEVPAGE0_NP_RTI ? "RTI ": "",
@@ -213738,7 +213531,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  }
  
  /**
-@@ -496,9 +509,12 @@ mptspi_print_write_nego(struct _MPT_SCSI
+@@ -496,9 +509,12 @@
  static void
  mptspi_print_read_nego(struct _MPT_SCSI_HOST *hd, struct scsi_target *starget, u32 ii)
  {
@@ -213753,7 +213546,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
            ii & MPI_SCSIDEVPAGE0_NP_WIDE ? "Wide ": "",
            ((ii >> 8) & 0xFF), ((ii >> 16) & 0xFF),
            ii & MPI_SCSIDEVPAGE0_NP_IU ? "IU ": "",
-@@ -508,7 +524,7 @@ mptspi_print_read_nego(struct _MPT_SCSI_
+@@ -508,7 +524,7 @@
            ii & MPI_SCSIDEVPAGE0_NP_WR_FLOW ? "WRFLOW ": "",
            ii & MPI_SCSIDEVPAGE0_NP_RD_STRM ? "RDSTRM ": "",
            ii & MPI_SCSIDEVPAGE0_NP_RTI ? "RTI ": "",
@@ -213762,7 +213555,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  }
  
  static int mptspi_read_spi_device_pg0(struct scsi_target *starget,
-@@ -557,9 +573,11 @@ static int mptspi_read_spi_device_pg0(st
+@@ -557,9 +573,11 @@
        cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
        cfg.dir = 0;
        cfg.pageAddr = starget->id;
@@ -213775,7 +213568,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                goto out_free;
        }
        err = 0;
-@@ -614,64 +632,11 @@ static void mptspi_read_parameters(struc
+@@ -614,64 +632,11 @@
        spi_width(starget) = (nego & MPI_SCSIDEVPAGE0_NP_WIDE) ? 1 : 0;
  }
  
@@ -213841,7 +213634,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        MPT_ADAPTER *ioc = hd->ioc;
  
        /* no DV on RAID devices */
-@@ -679,11 +644,20 @@ static void mptspi_dv_device(struct _MPT
+@@ -679,11 +644,20 @@
            mptspi_is_raid(hd, sdev->id))
                return;
  
@@ -213864,7 +213657,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                return;
        }
  
-@@ -693,8 +667,8 @@ static void mptspi_dv_device(struct _MPT
+@@ -693,8 +667,8 @@
  
        if (sdev->channel == 1 &&
            mptscsih_quiesce_raid(hd, 0, vtarget->channel, vtarget->id) < 0)
@@ -213875,7 +213668,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  
        mptspi_read_parameters(sdev->sdev_target);
        spi_display_xfer_agreement(sdev->sdev_target);
-@@ -716,7 +690,7 @@ static int mptspi_slave_alloc(struct scs
+@@ -716,7 +690,7 @@
        vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
        if (!vdevice) {
                printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
@@ -213884,7 +213677,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                return -ENOMEM;
        }
  
-@@ -738,21 +712,13 @@ static int mptspi_slave_configure(struct
+@@ -738,20 +712,12 @@
  {
        struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host);
        VirtTarget *vtarget = scsi_target(sdev)->hostdata;
@@ -213897,17 +213690,16 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
 -
        if (ret)
                return ret;
+-
 -      ddvprintk(hd->ioc, printk(MYIOC_s_DEBUG_FMT "id=%d min_period=0x%02x"
 -              " max_offset=0x%02x max_width=%d\n", hd->ioc->name,
 -              sdev->id, spi_min_period(scsi_target(sdev)),
 -              spi_max_offset(scsi_target(sdev)),
 -              spi_max_width(scsi_target(sdev))));
--
        if ((sdev->channel == 1 ||
             !(mptspi_is_raid(hd, sdev->id))) &&
-           !spi_initial_dv(sdev->sdev_target))
-@@ -887,8 +853,8 @@ static int mptspi_write_spi_device_pg1(s
+@@ -887,8 +853,8 @@
        mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters));
  
        if (mpt_config(ioc, &cfg)) {
@@ -213918,7 +213710,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                goto out_free;
        }
        err = 0;
-@@ -963,14 +929,15 @@ static void mptspi_write_dt(struct scsi_
+@@ -963,13 +929,14 @@
        if (spi_period(starget) == -1)
                mptspi_read_parameters(starget);
  
@@ -213932,22 +213724,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        spi_dt(starget) = dt;
  
        nego = mptspi_getRP(starget);
 -
        pg1.RequestedParameters = cpu_to_le32(nego);
        pg1.Reserved = 0;
-       pg1.Configuration = 0;
-@@ -986,9 +953,6 @@ static void mptspi_write_iu(struct scsi_
+@@ -985,9 +952,6 @@
        if (spi_period(starget) == -1)
                mptspi_read_parameters(starget);
+-
 -      if (!iu && spi_period(starget) < 9)
 -              spi_period(starget) = 9;
--
        spi_iu(starget) = iu;
  
-       nego = mptspi_getRP(starget);
-@@ -1030,9 +994,11 @@ static void mptspi_write_qas(struct scsi
+@@ -1030,9 +994,11 @@
        struct _MPT_SCSI_HOST *hd = shost_priv(shost);
        VirtTarget *vtarget = starget->hostdata;
        u32 nego;
@@ -213961,7 +213752,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                spi_qas(starget) = 0;
        else
                spi_qas(starget) = qas;
-@@ -1053,8 +1019,8 @@ static void mptspi_write_width(struct sc
+@@ -1053,8 +1019,8 @@
  
        if (!width) {
                spi_dt(starget) = 0;
@@ -213972,7 +213763,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        }
  
        spi_width(starget) = width;
-@@ -1074,7 +1040,8 @@ struct work_queue_wrapper {
+@@ -1074,7 +1040,8 @@
        int                     disk;
  };
  
@@ -213982,7 +213773,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  {
        struct work_queue_wrapper *wqw =
                container_of(work, struct work_queue_wrapper, work);
-@@ -1213,9 +1180,9 @@ static struct pci_device_id mptspi_pci_t
+@@ -1213,9 +1180,9 @@
  MODULE_DEVICE_TABLE(pci, mptspi_pci_table);
  
  
@@ -213994,7 +213785,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static void
  mptspi_dv_renegotiate_work(struct work_struct *work)
  {
-@@ -1261,32 +1228,33 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_H
+@@ -1261,32 +1228,33 @@
        schedule_work(&wqw->work);
  }
  
@@ -214039,7 +213830,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static int
  mptspi_resume(struct pci_dev *pdev)
  {
-@@ -1303,13 +1271,13 @@ mptspi_resume(struct pci_dev *pdev)
+@@ -1303,13 +1271,13 @@
  
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -214055,7 +213846,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static int
  mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  {
-@@ -1423,19 +1391,18 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1423,18 +1391,17 @@
         * A slightly different algorithm is required for
         * 64bit SGEs.
         */
@@ -214075,12 +213866,11 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
 -                sizeof(u32));
 +                (ioc->req_sz - 64) / ioc->SGE_size;
        }
 +
        if (numSGE < sh->sg_tablesize) {
                /* Reset this value */
-               dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-@@ -1444,11 +1411,11 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1444,10 +1411,10 @@
                sh->sg_tablesize = numSGE;
        }
  
@@ -214088,13 +213878,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
 -
        hd = shost_priv(sh);
        hd->ioc = ioc;
-+      spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 +
++      spin_unlock_irqrestore(&ioc->FreeQlock, flags);
        /* SCSI needs scsi_cmnd lookup table!
         * (with size equal to req_depth*PtrSz!)
-        */
-@@ -1462,39 +1429,12 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1462,39 +1429,12 @@
        dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
                 ioc->name, ioc->ScsiLookup));
  
@@ -214104,7 +213893,12 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
 -      hd->tmState = TM_STATE_NONE;
 -      hd->resetPending = 0;
 -      hd->abortSCpnt = NULL;
--
++      ioc->sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
++      ioc->spi_data.Saf_Te = mpt_saf_te;
++      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
++          "saf_te %x\n", ioc->name, mpt_saf_te));
++      ioc->spi_data.noQas = mpt_qas ? 0 : MPT_TARGET_NO_NEGO_QAS;
 -      /* Clear the pointer used to store
 -       * single-threaded commands, i.e., those
 -       * issued during a bus scan, dv and
@@ -214120,24 +213914,21 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
 -      hd->timer.data = (unsigned long) hd;
 -      hd->timer.function = mptscsih_timer_expired;
 -
-+      ioc->sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
-       ioc->spi_data.Saf_Te = mpt_saf_te;
+-      ioc->spi_data.Saf_Te = mpt_saf_te;
 -
 -      hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
-       ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
+-      ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
 -              "saf_te %x\n",
 -              ioc->name,
 -              mpt_saf_te));
 -      ioc->spi_data.noQas = 0;
-+          "saf_te %x\n", ioc->name, mpt_saf_te));
-+      ioc->spi_data.noQas = mpt_qas ? 0 : MPT_TARGET_NO_NEGO_QAS;
+-
 -      init_waitqueue_head(&hd->scandv_waitq);
 -      hd->scandv_wait_done = 0;
        hd->last_queue_full = 0;
        hd->spi_pending = 0;
  
-@@ -1514,7 +1454,7 @@ mptspi_probe(struct pci_dev *pdev, const
+@@ -1514,7 +1454,7 @@
         * issue internal bus reset
         */
        if (ioc->spi_data.bus_reset)
@@ -214146,7 +213937,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
                    MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
                    0, 0, 0, 0, 5);
  
-@@ -1544,7 +1484,7 @@ static struct pci_driver mptspi_driver =
+@@ -1544,7 +1484,7 @@
   *    mptspi_init - Register MPT adapter(s) as SCSI host(s) with SCSI mid-layer.
   *
   *    Returns 0 for success, non-zero for failure.
@@ -214155,7 +213946,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static int __init
  mptspi_init(void)
  {
-@@ -1574,7 +1514,8 @@ mptspi_init(void)
+@@ -1574,7 +1514,8 @@
  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  /**
   *    mptspi_exit - Unregisters MPT adapter(s)
@@ -214165,7 +213956,7 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
  static void __exit
  mptspi_exit(void)
  {
-@@ -1582,7 +1523,6 @@ mptspi_exit(void)
+@@ -1582,7 +1523,6 @@
  
        mpt_reset_deregister(mptspiDoneCtx);
        mpt_event_deregister(mptspiDoneCtx);
@@ -214173,9 +213964,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/mptspi.c linux-2.6.27.19-5.1/driv
        mpt_deregister(mptspiInternalCtx);
        mpt_deregister(mptspiTaskCtx);
        mpt_deregister(mptspiDoneCtx);
-diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.c linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.c   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/rejected_ioctls/diag_buffer.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/rejected_ioctls/diag_buffer.c     Wed May 06 16:56:21 2009 +0100
 @@ -0,0 +1,675 @@
 +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 +/* REGISTER DIAG BUFFER Routine.
@@ -214852,9 +214643,9 @@ diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.c lin
 +      SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0);
 +      return rc;
 +}
-diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.h linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/message/fusion/rejected_ioctls/diag_buffer.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/message/fusion/rejected_ioctls/diag_buffer.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/message/fusion/rejected_ioctls/diag_buffer.h     Wed May 06 16:56:21 2009 +0100
 @@ -0,0 +1,107 @@
 +#define MPTDIAGREGISTER       \
 +      _IOWR(MPT_MAGIC_NUMBER, 26, mpt_diag_register_t)
@@ -214963,10 +214754,10 @@ diff -purN linux-2.6.27/drivers/message/fusion/rejected_ioctls/diag_buffer.h lin
 +      mpt_ioctl_header        hdr;
 +      MPI_FW_DIAG_READ_BUFFER data;
 +} mpt_diag_read_buffer_t;
-diff -purN linux-2.6.27/drivers/misc/Kconfig linux-2.6.27.19-5.1/drivers/misc/Kconfig
---- linux-2.6.27/drivers/misc/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/Kconfig   2009-03-25 16:11:30.000000000 +0000
-@@ -245,6 +245,17 @@ config MSI_LAPTOP
+diff -r 9608d5473017 drivers/misc/Kconfig
+--- a/drivers/misc/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/Kconfig     Wed May 06 16:56:21 2009 +0100
+@@ -245,6 +245,17 @@
  
          If you have an MSI S270 laptop, say Y or M here.
  
@@ -214984,7 +214775,7 @@ diff -purN linux-2.6.27/drivers/misc/Kconfig linux-2.6.27.19-5.1/drivers/misc/Kc
  config COMPAL_LAPTOP
        tristate "Compal Laptop Extras"
        depends on X86
-@@ -427,7 +438,7 @@ config ENCLOSURE_SERVICES
+@@ -427,7 +438,7 @@
  config SGI_XP
        tristate "Support communication between SGI SSIs"
        depends on NET
@@ -214993,7 +214784,7 @@ diff -purN linux-2.6.27/drivers/misc/Kconfig linux-2.6.27.19-5.1/drivers/misc/Kc
        select IA64_UNCACHED_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
        select GENERIC_ALLOCATOR if IA64_GENERIC || IA64_SGI_SN2
        select SGI_GRU if (IA64_GENERIC || IA64_SGI_UV || X86_64) && SMP
-@@ -454,7 +465,7 @@ config HP_ILO
+@@ -454,7 +465,7 @@
  
  config SGI_GRU
        tristate "SGI GRU driver"
@@ -215002,10 +214793,10 @@ diff -purN linux-2.6.27/drivers/misc/Kconfig linux-2.6.27.19-5.1/drivers/misc/Kc
        default n
        select MMU_NOTIFIER
        ---help---
-diff -purN linux-2.6.27/drivers/misc/Makefile linux-2.6.27.19-5.1/drivers/misc/Makefile
---- linux-2.6.27/drivers/misc/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/Makefile  2009-03-25 16:11:30.000000000 +0000
-@@ -23,6 +23,7 @@ obj-$(CONFIG_SGI_IOC4)               += ioc4.o
+diff -r 9608d5473017 drivers/misc/Makefile
+--- a/drivers/misc/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/Makefile    Wed May 06 16:56:21 2009 +0100
+@@ -23,6 +23,7 @@
  obj-$(CONFIG_SONY_LAPTOP)     += sony-laptop.o
  obj-$(CONFIG_THINKPAD_ACPI)   += thinkpad_acpi.o
  obj-$(CONFIG_FUJITSU_LAPTOP)  += fujitsu-laptop.o
@@ -215013,10 +214804,10 @@ diff -purN linux-2.6.27/drivers/misc/Makefile linux-2.6.27.19-5.1/drivers/misc/M
  obj-$(CONFIG_EEPROM_93CX6)    += eeprom_93cx6.o
  obj-$(CONFIG_INTEL_MENLOW)    += intel_menlow.o
  obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
-diff -purN linux-2.6.27/drivers/misc/acer-wmi.c linux-2.6.27.19-5.1/drivers/misc/acer-wmi.c
---- linux-2.6.27/drivers/misc/acer-wmi.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/acer-wmi.c        2009-03-25 16:11:30.000000000 +0000
-@@ -1242,6 +1242,12 @@ static int __init acer_wmi_init(void)
+diff -r 9608d5473017 drivers/misc/acer-wmi.c
+--- a/drivers/misc/acer-wmi.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/acer-wmi.c  Wed May 06 16:56:22 2009 +0100
+@@ -1242,6 +1242,12 @@
  
        set_quirks();
  
@@ -215029,10 +214820,10 @@ diff -purN linux-2.6.27/drivers/misc/acer-wmi.c linux-2.6.27.19-5.1/drivers/misc
        if (platform_driver_register(&acer_platform_driver)) {
                printk(ACER_ERR "Unable to register platform driver.\n");
                goto error_platform_register;
-diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/misc/asus-laptop.c
---- linux-2.6.27/drivers/misc/asus-laptop.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/asus-laptop.c     2009-03-25 16:11:30.000000000 +0000
-@@ -139,6 +139,7 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG
+diff -r 9608d5473017 drivers/misc/asus-laptop.c
+--- a/drivers/misc/asus-laptop.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/asus-laptop.c       Wed May 06 16:56:22 2009 +0100
+@@ -139,6 +139,7 @@
            "\\_SB.PCI0.PX40.ECD0._Q10",        /* L3C */
            "\\_SB.PCI0.PX40.EC0.Q10",  /* M1A */
            "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */
@@ -215040,7 +214831,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
            "\\_SB.PCI0.PX40.Q10",      /* S1x */
            "\\Q10");           /* A2x, L2D, L3D, M2E */
  
-@@ -280,7 +281,7 @@ static int write_acpi_int(acpi_handle ha
+@@ -280,7 +281,7 @@
  
  static int read_wireless_status(int mask)
  {
@@ -215049,7 +214840,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        acpi_status rv = AE_OK;
  
        if (!wireless_status_handle)
-@@ -297,7 +298,7 @@ static int read_wireless_status(int mask
+@@ -297,7 +298,7 @@
  
  static int read_gps_status(void)
  {
@@ -215058,7 +214849,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        acpi_status rv = AE_OK;
  
        rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
-@@ -350,7 +351,7 @@ static void write_status(acpi_handle han
+@@ -350,7 +351,7 @@
        static void object##_led_set(struct led_classdev *led_cdev,     \
                                     enum led_brightness value)         \
        {                                                               \
@@ -215067,7 +214858,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
                queue_work(led_workqueue, &object##_led_work);          \
        }                                                               \
        static void object##_led_update(struct work_struct *ignored)    \
-@@ -404,7 +405,7 @@ static void lcd_blank(int blank)
+@@ -404,7 +405,7 @@
  
  static int read_brightness(struct backlight_device *bd)
  {
@@ -215076,7 +214867,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        acpi_status rv = AE_OK;
  
        rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
-@@ -455,7 +456,7 @@ static ssize_t show_infos(struct device 
+@@ -455,7 +456,7 @@
                          struct device_attribute *attr, char *page)
  {
        int len = 0;
@@ -215085,7 +214876,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        char buf[16];           //enough for all info
        acpi_status rv = AE_OK;
  
-@@ -603,7 +604,7 @@ static void set_display(int value)
+@@ -603,7 +604,7 @@
  
  static int read_display(void)
  {
@@ -215094,7 +214885,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        acpi_status rv = AE_OK;
  
        /* In most of the case, we know how to set the display, but sometime
-@@ -849,7 +850,7 @@ static int asus_hotk_get_info(void)
+@@ -849,7 +850,7 @@
  {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *model = NULL;
@@ -215103,7 +214894,7 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
        char *string = NULL;
        acpi_status status;
  
-@@ -1207,9 +1208,13 @@ static int __init asus_laptop_init(void)
+@@ -1207,9 +1208,13 @@
  
        dev = acpi_get_physical_device(hotk->device->handle);
  
@@ -215120,10 +214911,10 @@ diff -purN linux-2.6.27/drivers/misc/asus-laptop.c linux-2.6.27.19-5.1/drivers/m
  
        result = asus_led_init(dev);
        if (result)
-diff -purN linux-2.6.27/drivers/misc/compal-laptop.c linux-2.6.27.19-5.1/drivers/misc/compal-laptop.c
---- linux-2.6.27/drivers/misc/compal-laptop.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/compal-laptop.c   2009-03-25 16:11:30.000000000 +0000
-@@ -326,12 +326,14 @@ static int __init compal_init(void)
+diff -r 9608d5473017 drivers/misc/compal-laptop.c
+--- a/drivers/misc/compal-laptop.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/compal-laptop.c     Wed May 06 16:56:22 2009 +0100
+@@ -326,12 +326,14 @@
  
        /* Register backlight stuff */
  
@@ -215143,10 +214934,10 @@ diff -purN linux-2.6.27/drivers/misc/compal-laptop.c linux-2.6.27.19-5.1/drivers
  
        ret = platform_driver_register(&compal_driver);
        if (ret)
-diff -purN linux-2.6.27/drivers/misc/eeepc-laptop.c linux-2.6.27.19-5.1/drivers/misc/eeepc-laptop.c
---- linux-2.6.27/drivers/misc/eeepc-laptop.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/eeepc-laptop.c    2009-03-25 16:11:30.000000000 +0000
-@@ -204,7 +204,7 @@ static int write_acpi_int(acpi_handle ha
+diff -r 9608d5473017 drivers/misc/eeepc-laptop.c
+--- a/drivers/misc/eeepc-laptop.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/eeepc-laptop.c      Wed May 06 16:56:22 2009 +0100
+@@ -204,7 +204,7 @@
  static int read_acpi_int(acpi_handle handle, const char *method, int *val)
  {
        acpi_status status;
@@ -215155,7 +214946,7 @@ diff -purN linux-2.6.27/drivers/misc/eeepc-laptop.c linux-2.6.27.19-5.1/drivers/
  
        status = acpi_evaluate_integer(handle, (char *)method, NULL, &result);
        if (ACPI_FAILURE(status)) {
-@@ -381,7 +381,8 @@ static void notify_wlan(u32 *event)
+@@ -381,7 +381,8 @@
  static void notify_brn(void)
  {
        struct backlight_device *bd = eeepc_backlight_device;
@@ -215165,7 +214956,7 @@ diff -purN linux-2.6.27/drivers/misc/eeepc-laptop.c linux-2.6.27.19-5.1/drivers/
  }
  
  static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data)
-@@ -635,9 +636,15 @@ static int __init eeepc_laptop_init(void
+@@ -635,9 +636,15 @@
                return -ENODEV;
        }
        dev = acpi_get_physical_device(ehotk->device->handle);
@@ -215184,10 +214975,10 @@ diff -purN linux-2.6.27/drivers/misc/eeepc-laptop.c linux-2.6.27.19-5.1/drivers/
        result = eeepc_hwmon_init(dev);
        if (result)
                goto fail_hwmon;
-diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/drivers/misc/fujitsu-laptop.c
---- linux-2.6.27/drivers/misc/fujitsu-laptop.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/fujitsu-laptop.c  2009-03-25 16:11:30.000000000 +0000
-@@ -224,7 +224,7 @@ static int set_lcd_level_alt(int level)
+diff -r 9608d5473017 drivers/misc/fujitsu-laptop.c
+--- a/drivers/misc/fujitsu-laptop.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/fujitsu-laptop.c    Wed May 06 16:56:22 2009 +0100
+@@ -224,7 +224,7 @@
  
  static int get_lcd_level(void)
  {
@@ -215196,7 +214987,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
        acpi_status status = AE_OK;
  
        vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n");
-@@ -246,7 +246,7 @@ static int get_lcd_level(void)
+@@ -246,7 +246,7 @@
  
  static int get_max_brightness(void)
  {
@@ -215205,7 +214996,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
        acpi_status status = AE_OK;
  
        vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n");
-@@ -263,7 +263,7 @@ static int get_max_brightness(void)
+@@ -263,7 +263,7 @@
  
  static int get_lcd_level_alt(void)
  {
@@ -215214,7 +215005,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
        acpi_status status = AE_OK;
  
        vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n");
-@@ -384,7 +384,7 @@ static ssize_t store_lcd_level(struct de
+@@ -384,7 +384,7 @@
  
  static int get_irb(void)
  {
@@ -215223,7 +215014,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
        acpi_status status = AE_OK;
  
        vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n");
-@@ -455,7 +455,7 @@ static int dmi_check_cb_s6410(const stru
+@@ -455,7 +455,7 @@
        return 0;
  }
  
@@ -215232,7 +215023,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
        {
         .ident = "Fujitsu Siemens",
         .matches = {
-@@ -970,16 +970,16 @@ static int __init fujitsu_init(void)
+@@ -970,16 +970,16 @@
  
        /* Register backlight stuff */
  
@@ -215259,7 +215050,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
  
        ret = platform_driver_register(&fujitsupf_driver);
        if (ret)
-@@ -1015,7 +1015,8 @@ fail_hotkey:
+@@ -1015,7 +1015,8 @@
  
  fail_backlight:
  
@@ -215269,7 +215060,7 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
  
  fail_platform_device2:
  
-@@ -1042,7 +1043,8 @@ static void __exit fujitsu_cleanup(void)
+@@ -1042,7 +1043,8 @@
                           &fujitsupf_attribute_group);
        platform_device_unregister(fujitsu->pf_device);
        platform_driver_unregister(&fujitsupf_driver);
@@ -215279,10 +215070,10 @@ diff -purN linux-2.6.27/drivers/misc/fujitsu-laptop.c linux-2.6.27.19-5.1/driver
  
        acpi_bus_unregister_driver(&acpi_fujitsu_driver);
  
-diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hpilo.c
---- linux-2.6.27/drivers/misc/hpilo.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/hpilo.c   2009-03-25 16:11:30.000000000 +0000
-@@ -207,7 +207,7 @@ static void ilo_ccb_close(struct pci_dev
+diff -r 9608d5473017 drivers/misc/hpilo.c
+--- a/drivers/misc/hpilo.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/hpilo.c     Wed May 06 16:56:22 2009 +0100
+@@ -207,7 +207,7 @@
                  &device_ccb->recv_ctrl);
  
        /* give iLO some time to process stop request */
@@ -215291,7 +215082,7 @@ diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hp
                doorbell_set(driver_ccb);
                udelay(1);
                if (!(ioread32(&device_ccb->send_ctrl) & (1 << CTRL_BITPOS_A))
-@@ -309,7 +309,7 @@ static int ilo_ccb_open(struct ilo_hwinf
+@@ -309,7 +309,7 @@
        doorbell_clr(driver_ccb);
  
        /* make sure iLO is really handling requests */
@@ -215300,7 +215091,7 @@ diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hp
                if (ilo_pkt_dequeue(hw, driver_ccb, SENDQ, &pkt_id, NULL, NULL))
                        break;
                udelay(1);
-@@ -326,7 +326,7 @@ static int ilo_ccb_open(struct ilo_hwinf
+@@ -326,7 +326,7 @@
  
        return 0;
  free:
@@ -215309,7 +215100,7 @@ diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hp
  out:
        return error;
  }
-@@ -758,7 +758,7 @@ static void __exit ilo_exit(void)
+@@ -758,7 +758,7 @@
        class_destroy(ilo_class);
  }
  
@@ -215318,9 +215109,9 @@ diff -purN linux-2.6.27/drivers/misc/hpilo.c linux-2.6.27.19-5.1/drivers/misc/hp
  MODULE_ALIAS(ILO_NAME);
  MODULE_DESCRIPTION(ILO_NAME);
  MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>");
-diff -purN linux-2.6.27/drivers/misc/hpilo.h linux-2.6.27.19-5.1/drivers/misc/hpilo.h
---- linux-2.6.27/drivers/misc/hpilo.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/hpilo.h   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/hpilo.h
+--- a/drivers/misc/hpilo.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/hpilo.h     Wed May 06 16:56:22 2009 +0100
 @@ -19,6 +19,8 @@
  #define MAX_ILO_DEV   1
  /* max number of files */
@@ -215330,10 +215121,10 @@ diff -purN linux-2.6.27/drivers/misc/hpilo.h linux-2.6.27.19-5.1/drivers/misc/hp
  
  /*
   * Per device, used to track global memory allocations.
-diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/misc/intel_menlow.c
---- linux-2.6.27/drivers/misc/intel_menlow.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/intel_menlow.c    2009-03-25 16:11:30.000000000 +0000
-@@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(
+diff -r 9608d5473017 drivers/misc/intel_menlow.c
+--- a/drivers/misc/intel_menlow.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/intel_menlow.c      Wed May 06 16:56:22 2009 +0100
+@@ -57,7 +57,7 @@
  {
        struct acpi_device *device = cdev->devdata;
        acpi_handle handle = device->handle;
@@ -215342,7 +215133,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        struct acpi_object_list arg_list;
        union acpi_object arg;
        acpi_status status = AE_OK;
-@@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(stru
+@@ -90,7 +90,7 @@
  {
        struct acpi_device *device = cdev->devdata;
        acpi_handle handle = device->handle;
@@ -215351,7 +215142,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        struct acpi_object_list arg_list;
        union acpi_object arg;
        acpi_status status = AE_OK;
-@@ -104,7 +104,7 @@ static int memory_get_cur_bandwidth(stru
+@@ -104,7 +104,7 @@
        if (ACPI_FAILURE(status))
                return -EFAULT;
  
@@ -215360,7 +215151,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
  }
  
  static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
-@@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(stru
+@@ -115,7 +115,7 @@
        struct acpi_object_list arg_list;
        union acpi_object arg;
        acpi_status status;
@@ -215369,7 +215160,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        unsigned long max_state;
  
        if (memory_get_int_max_bandwidth(cdev, &max_state))
-@@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(stru
+@@ -131,7 +131,7 @@
  
        status =
            acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list,
@@ -215378,7 +215169,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
  
        printk(KERN_INFO
               "Bandwidth value was %d: status is %d\n", state, status);
-@@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lo
+@@ -252,7 +252,8 @@
   * @auxtype : AUX0/AUX1
   * @buf: syfs buffer
   */
@@ -215388,7 +215179,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
  {
        acpi_status status;
  
-@@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handl
+@@ -260,7 +261,7 @@
                return -EINVAL;
  
        status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0,
@@ -215397,7 +215188,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        if (ACPI_FAILURE(status))
                return -EIO;
  
-@@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handl
+@@ -282,13 +283,13 @@
        struct acpi_object_list args = {
                1, &arg
        };
@@ -215413,7 +215204,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        if (ACPI_FAILURE(status))
                return -EIO;
        if ((index && value < temp) || (!index && value > temp))
-@@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handl
+@@ -296,7 +297,7 @@
  
        arg.integer.value = value;
        status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0,
@@ -215422,7 +215213,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        if (ACPI_FAILURE(status))
                return -EIO;
  
-@@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *
+@@ -312,7 +313,7 @@
                         struct device_attribute *dev_attr, char *buf)
  {
        struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
@@ -215431,7 +215222,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        int result;
  
        result = sensor_get_auxtrip(attr->handle, 0, &value);
-@@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *
+@@ -324,7 +325,7 @@
                         struct device_attribute *dev_attr, char *buf)
  {
        struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
@@ -215440,7 +215231,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
        int result;
  
        result = sensor_get_auxtrip(attr->handle, 1, &value);
-@@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct 
+@@ -376,7 +377,7 @@
                                 struct device_attribute *attr, char *buf)
  {
        acpi_status status;
@@ -215449,7 +215240,7 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
  
        status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled);
        if (ACPI_FAILURE(status))
-@@ -492,7 +493,7 @@ static int __init intel_menlow_module_in
+@@ -492,7 +493,7 @@
  {
        int result = -ENODEV;
        acpi_status status;
@@ -215458,10 +215249,10 @@ diff -purN linux-2.6.27/drivers/misc/intel_menlow.c linux-2.6.27.19-5.1/drivers/
  
        if (acpi_disabled)
                return result;
-diff -purN linux-2.6.27/drivers/misc/ioc4.c linux-2.6.27.19-5.1/drivers/misc/ioc4.c
---- linux-2.6.27/drivers/misc/ioc4.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/ioc4.c    2009-03-25 16:11:30.000000000 +0000
-@@ -269,6 +269,17 @@ ioc4_variant(struct ioc4_driver_data *id
+diff -r 9608d5473017 drivers/misc/ioc4.c
+--- a/drivers/misc/ioc4.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/ioc4.c      Wed May 06 16:56:23 2009 +0100
+@@ -269,6 +269,17 @@
        return IOC4_VARIANT_PCI_RT;
  }
  
@@ -215479,7 +215270,7 @@ diff -purN linux-2.6.27/drivers/misc/ioc4.c linux-2.6.27.19-5.1/drivers/misc/ioc
  /* Adds a new instance of an IOC4 card */
  static int
  ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
-@@ -378,6 +389,22 @@ ioc4_probe(struct pci_dev *pdev, const s
+@@ -378,6 +389,22 @@
        }
        mutex_unlock(&ioc4_mutex);
  
@@ -215502,10 +215293,10 @@ diff -purN linux-2.6.27/drivers/misc/ioc4.c linux-2.6.27.19-5.1/drivers/misc/ioc
        return 0;
  
  out_misc_region:
-diff -purN linux-2.6.27/drivers/misc/msi-laptop.c linux-2.6.27.19-5.1/drivers/misc/msi-laptop.c
---- linux-2.6.27/drivers/misc/msi-laptop.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/msi-laptop.c      2009-03-25 16:11:30.000000000 +0000
-@@ -347,12 +347,16 @@ static int __init msi_init(void)
+diff -r 9608d5473017 drivers/misc/msi-laptop.c
+--- a/drivers/misc/msi-laptop.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/msi-laptop.c        Wed May 06 16:56:23 2009 +0100
+@@ -347,12 +347,16 @@
  
        /* Register backlight stuff */
  
@@ -215528,9 +215319,9 @@ diff -purN linux-2.6.27/drivers/misc/msi-laptop.c linux-2.6.27.19-5.1/drivers/mi
  
        ret = platform_driver_register(&msipf_driver);
        if (ret)
-diff -purN linux-2.6.27/drivers/misc/panasonic-laptop.c linux-2.6.27.19-5.1/drivers/misc/panasonic-laptop.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/panasonic-laptop.c        2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/panasonic-laptop.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/misc/panasonic-laptop.c  Wed May 06 16:56:23 2009 +0100
 @@ -0,0 +1,767 @@
 +/*
 + *  Panasonic HotKey and LCD brightness control driver
@@ -216299,9 +216090,9 @@ diff -purN linux-2.6.27/drivers/misc/panasonic-laptop.c linux-2.6.27.19-5.1/driv
 +
 +module_init(acpi_pcc_init);
 +module_exit(acpi_pcc_exit);
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/Makefile linux-2.6.27.19-5.1/drivers/misc/sgi-xp/Makefile
---- linux-2.6.27/drivers/misc/sgi-xp/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/Makefile   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/Makefile
+--- a/drivers/misc/sgi-xp/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/Makefile     Wed May 06 16:56:23 2009 +0100
 @@ -5,14 +5,14 @@
  obj-$(CONFIG_SGI_XP)          += xp.o
  xp-y                          := xp_main.o
@@ -216319,9 +216110,9 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/Makefile linux-2.6.27.19-5.1/drivers
  xpc-$(CONFIG_IA64_SGI_UV)     += xpc_uv.o
  xpc-$(CONFIG_X86_64)          += xpc_uv.o
  
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp.h linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp.h
---- linux-2.6.27/drivers/misc/sgi-xp/xp.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp.h       2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp.h
+--- a/drivers/misc/sgi-xp/xp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp.h Wed May 06 16:56:23 2009 +0100
 @@ -19,7 +19,11 @@
  #include <asm/system.h>
  #include <asm/sn/arch.h>      /* defines is_shub1() and is_shub2() */
@@ -216334,7 +216125,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp.h linux-2.6.27.19-5.1/drivers/mis
  #endif
  #ifdef CONFIG_X86_64
  #include <asm/genapic.h>
-@@ -190,9 +194,10 @@ enum xp_retval {
+@@ -190,9 +194,10 @@
        xpGruSendMqError,       /* 59: gru send message queue related error */
  
        xpBadChannelNumber,     /* 60: invalid channel number */
@@ -216347,7 +216138,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp.h linux-2.6.27.19-5.1/drivers/mis
  };
  
  /*
-@@ -341,6 +346,8 @@ extern unsigned long (*xp_pa) (void *);
+@@ -341,6 +346,8 @@
  extern enum xp_retval (*xp_remote_memcpy) (unsigned long, const unsigned long,
                       size_t);
  extern int (*xp_cpu_to_nasid) (int);
@@ -216356,27 +216147,27 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp.h linux-2.6.27.19-5.1/drivers/mis
  
  extern u64 xp_nofault_PIOR_target;
  extern int xp_nofault_PIOR(void *);
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_main.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_main.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_main.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_main.c  2009-03-25 16:11:30.000000000 +0000
-@@ -51,6 +51,13 @@ EXPORT_SYMBOL_GPL(xp_remote_memcpy);
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_main.c
+--- a/drivers/misc/sgi-xp/xp_main.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_main.c    Wed May 06 16:56:23 2009 +0100
+@@ -50,6 +50,13 @@
  int (*xp_cpu_to_nasid) (int cpuid);
  EXPORT_SYMBOL_GPL(xp_cpu_to_nasid);
++
 +enum xp_retval (*xp_expand_memprotect) (unsigned long phys_addr,
 +                                      unsigned long size);
 +EXPORT_SYMBOL_GPL(xp_expand_memprotect);
 +enum xp_retval (*xp_restrict_memprotect) (unsigned long phys_addr,
 +                                        unsigned long size);
 +EXPORT_SYMBOL_GPL(xp_restrict_memprotect);
-+
  /*
   * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level
-  * users of XPC.
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_sn2.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_sn2.c   2009-03-25 16:11:30.000000000 +0000
-@@ -120,6 +120,38 @@ xp_cpu_to_nasid_sn2(int cpuid)
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_sn2.c
+--- a/drivers/misc/sgi-xp/xp_sn2.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_sn2.c     Wed May 06 16:56:23 2009 +0100
+@@ -120,6 +120,38 @@
        return cpuid_to_nasid(cpuid);
  }
  
@@ -216415,7 +216206,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c linux-2.6.27.19-5.1/drivers
  enum xp_retval
  xp_init_sn2(void)
  {
-@@ -132,6 +164,8 @@ xp_init_sn2(void)
+@@ -132,6 +164,8 @@
        xp_pa = xp_pa_sn2;
        xp_remote_memcpy = xp_remote_memcpy_sn2;
        xp_cpu_to_nasid = xp_cpu_to_nasid_sn2;
@@ -216424,9 +216215,9 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_sn2.c linux-2.6.27.19-5.1/drivers
  
        return xp_register_nofault_code_sn2();
  }
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_uv.c
---- linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xp_uv.c    2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xp_uv.c
+--- a/drivers/misc/sgi-xp/xp_uv.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xp_uv.c      Wed May 06 16:56:23 2009 +0100
 @@ -15,6 +15,11 @@
  
  #include <linux/device.h>
@@ -216439,7 +216230,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c linux-2.6.27.19-5.1/drivers/
  #include "../sgi-gru/grukservices.h"
  #include "xp.h"
  
-@@ -49,18 +54,79 @@ xp_cpu_to_nasid_uv(int cpuid)
+@@ -49,18 +54,79 @@
        return UV_PNODE_TO_NASID(uv_cpu_to_pnode(cpuid));
  }
  
@@ -216521,9 +216312,9 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xp_uv.c linux-2.6.27.19-5.1/drivers/
  
        return xpSuccess;
  }
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc.h linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc.h
---- linux-2.6.27/drivers/misc/sgi-xp/xpc.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc.h      2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc.h
+--- a/drivers/misc/sgi-xp/xpc.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc.h        Wed May 06 16:56:23 2009 +0100
 @@ -3,7 +3,7 @@
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
@@ -216533,7 +216324,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc.h linux-2.6.27.19-5.1/drivers/mi
   */
  
  /*
-@@ -181,6 +181,18 @@ struct xpc_vars_part_sn2 {
+@@ -181,6 +181,18 @@
                                  xpc_nasid_mask_nlongs))
  
  /*
@@ -216552,7 +216343,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc.h linux-2.6.27.19-5.1/drivers/mi
   * The activate_mq is used to send/receive GRU messages that affect XPC's
   * heartbeat, partition active state, and channel state. This is UV only.
   */
-@@ -502,7 +514,8 @@ struct xpc_channel_uv {
+@@ -502,7 +514,8 @@
                                                /* partition's notify mq */
  
        struct xpc_send_msg_slot_uv *send_msg_slots;
@@ -216562,10 +216353,10 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc.h linux-2.6.27.19-5.1/drivers/mi
  
        struct xpc_fifo_head_uv msg_slot_free_list;
        struct xpc_fifo_head_uv recv_msg_list;  /* deliverable payloads */
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_main.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_main.c 2009-03-25 16:11:30.000000000 +0000
-@@ -1104,7 +1104,7 @@ xpc_do_exit(enum xp_retval reason)
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_main.c
+--- a/drivers/misc/sgi-xp/xpc_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_main.c   Wed May 06 16:56:23 2009 +0100
+@@ -1104,7 +1104,7 @@
  
        if (is_shub())
                xpc_exit_sn2();
@@ -216574,7 +216365,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c linux-2.6.27.19-5.1/drive
                xpc_exit_uv();
  }
  
-@@ -1363,7 +1363,7 @@ out_2:
+@@ -1363,7 +1363,7 @@
  out_1:
        if (is_shub())
                xpc_exit_sn2();
@@ -216583,10 +216374,10 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_main.c linux-2.6.27.19-5.1/drive
                xpc_exit_uv();
        return ret;
  }
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_sn2.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_sn2.c  2009-03-25 16:11:30.000000000 +0000
-@@ -553,22 +553,17 @@ static u64 xpc_prot_vec_sn2[MAX_NUMNODES
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_sn2.c
+--- a/drivers/misc/sgi-xp/xpc_sn2.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_sn2.c    Wed May 06 16:56:23 2009 +0100
+@@ -553,22 +553,17 @@
  static enum xp_retval
  xpc_allow_amo_ops_sn2(struct amo *amos_page)
  {
@@ -216614,7 +216405,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
  }
  
  /*
-@@ -904,7 +899,7 @@ xpc_update_partition_info_sn2(struct xpc
+@@ -904,7 +899,7 @@
        dev_dbg(xpc_part, "  remote_vars_pa = 0x%016lx\n",
                part_sn2->remote_vars_pa);
  
@@ -216623,7 +216414,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
        dev_dbg(xpc_part, "  last_heartbeat = 0x%016lx\n",
                part->last_heartbeat);
  
-@@ -1841,6 +1836,7 @@ xpc_process_msg_chctl_flags_sn2(struct x
+@@ -1841,6 +1836,7 @@
                 */
                xpc_clear_remote_msgqueue_flags_sn2(ch);
  
@@ -216631,7 +216422,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
                ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put;
  
                dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, "
-@@ -1939,7 +1935,7 @@ xpc_get_deliverable_payload_sn2(struct x
+@@ -1939,7 +1935,7 @@
                        break;
  
                get = ch_sn2->w_local_GP.get;
@@ -216640,7 +216431,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
                if (get == ch_sn2->w_remote_GP.put)
                        break;
  
-@@ -1961,11 +1957,13 @@ xpc_get_deliverable_payload_sn2(struct x
+@@ -1961,11 +1957,13 @@
  
                        msg = xpc_pull_remote_msg_sn2(ch, get);
  
@@ -216658,7 +216449,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
                        break;
                }
  
-@@ -2058,7 +2056,7 @@ xpc_allocate_msg_sn2(struct xpc_channel 
+@@ -2058,7 +2056,7 @@
        while (1) {
  
                put = ch_sn2->w_local_GP.put;
@@ -216667,7 +216458,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
                if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) {
  
                        /* There are available message entries. We need to try
-@@ -2191,7 +2189,7 @@ xpc_send_payload_sn2(struct xpc_channel 
+@@ -2191,7 +2189,7 @@
         * The preceding store of msg->flags must occur before the following
         * load of local_GP->put.
         */
@@ -216676,7 +216467,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
  
        /* see if the message is next in line to be sent, if so send it */
  
-@@ -2292,7 +2290,7 @@ xpc_received_payload_sn2(struct xpc_chan
+@@ -2292,7 +2290,7 @@
         * The preceding store of msg->flags must occur before the following
         * load of local_GP->get.
         */
@@ -216685,9 +216476,9 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_sn2.c linux-2.6.27.19-5.1/driver
  
        /*
         * See if this message is next in line to be acknowledged as having
-diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_uv.c
---- linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sgi-xp/xpc_uv.c   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/misc/sgi-xp/xpc_uv.c
+--- a/drivers/misc/sgi-xp/xpc_uv.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sgi-xp/xpc_uv.c     Wed May 06 16:56:23 2009 +0100
 @@ -3,7 +3,7 @@
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
@@ -216713,24 +216504,24 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  #include "../sgi-gru/gru.h"
  #include "../sgi-gru/grukservices.h"
  #include "xpc.h"
-@@ -27,15 +35,17 @@ static atomic64_t xpc_heartbeat_uv;
+@@ -27,15 +35,17 @@
  static DECLARE_BITMAP(xpc_heartbeating_to_mask_uv, XP_MAX_NPARTITIONS_UV);
  
  #define XPC_ACTIVATE_MSG_SIZE_UV      (1 * GRU_CACHE_LINE_BYTES)
--#define XPC_NOTIFY_MSG_SIZE_UV                (2 * GRU_CACHE_LINE_BYTES)
 +#define XPC_ACTIVATE_MQ_SIZE_UV               (4 * XP_MAX_NPARTITIONS_UV * \
 +                                       XPC_ACTIVATE_MSG_SIZE_UV)
 +#define XPC_ACTIVATE_IRQ_NAME         "xpc_activate"
++
+ #define XPC_NOTIFY_MSG_SIZE_UV                (2 * GRU_CACHE_LINE_BYTES)
++#define XPC_NOTIFY_MQ_SIZE_UV         (4 * XP_MAX_NPARTITIONS_UV * \
++                                       XPC_NOTIFY_MSG_SIZE_UV)
++#define XPC_NOTIFY_IRQ_NAME           "xpc_notify"
  
 -#define XPC_ACTIVATE_MQ_SIZE_UV       (4 * XP_MAX_NPARTITIONS_UV * \
 -                               XPC_ACTIVATE_MSG_SIZE_UV)
 -#define XPC_NOTIFY_MQ_SIZE_UV (4 * XP_MAX_NPARTITIONS_UV * \
 -                               XPC_NOTIFY_MSG_SIZE_UV)
-+#define XPC_NOTIFY_MSG_SIZE_UV                (2 * GRU_CACHE_LINE_BYTES)
-+#define XPC_NOTIFY_MQ_SIZE_UV         (4 * XP_MAX_NPARTITIONS_UV * \
-+                                       XPC_NOTIFY_MSG_SIZE_UV)
-+#define XPC_NOTIFY_IRQ_NAME           "xpc_notify"
+-
 -static void *xpc_activate_mq_uv;
 -static void *xpc_notify_mq_uv;
 +static struct xpc_gru_mq_uv *xpc_activate_mq_uv;
@@ -216738,7 +216529,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  
  static int
  xpc_setup_partitions_sn_uv(void)
-@@ -52,62 +62,209 @@ xpc_setup_partitions_sn_uv(void)
+@@ -52,62 +62,209 @@
        return 0;
  }
  
@@ -216852,7 +216643,9 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
        struct page *page;
 -      void *mq;
 +      struct xpc_gru_mq_uv *mq;
-+
+-      nid = cpu_to_node(cpuid);
+-      mq_order = get_order(mq_size);
 +      mq = kmalloc(sizeof(struct xpc_gru_mq_uv), GFP_KERNEL);
 +      if (mq == NULL) {
 +              dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to kmalloc() "
@@ -216860,9 +216653,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
 +              ret = -ENOMEM;
 +              goto out_1;
 +      }
--      nid = cpu_to_node(cpuid);
--      mq_order = get_order(mq_size);
++
 +      pg_order = get_order(mq_size);
 +      mq->order = pg_order + PAGE_SHIFT;
 +      mq_size = 1UL << mq->order;
@@ -216956,16 +216747,16 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
 +      mq_size = 1UL << mq->order;
 +      ret = xp_restrict_memprotect(xp_pa(mq->address), mq_size);
 +      BUG_ON(ret != xpSuccess);
-+
+-      free_irq(irq, NULL);
 +      /* unregister irq handler and release mq irq/vector mapping */
 +      free_irq(mq->irq, NULL);
 +      xpc_release_gru_mq_irq_uv(mq);
  
--      free_irq(irq, NULL);
+-      free_pages((unsigned long)mq, get_order(mq_size));
 +      /* disable generation of irq when GRU mq op occurs to this mq */
 +      xpc_gru_mq_watchlist_free_uv(mq);
--      free_pages((unsigned long)mq, get_order(mq_size));
++
 +      pg_order = mq->order - PAGE_SHIFT;
 +      free_pages((unsigned long)mq->address, pg_order);
 +
@@ -216973,7 +216764,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  }
  
  static enum xp_retval
-@@ -402,7 +559,10 @@ xpc_handle_activate_IRQ_uv(int irq, void
+@@ -402,7 +559,10 @@
        struct xpc_partition *part;
        int wakeup_hb_checker = 0;
  
@@ -216985,7 +216776,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  
                partid = msg_hdr->partid;
                if (partid < 0 || partid >= XP_MAX_NPARTITIONS_UV) {
-@@ -418,7 +578,7 @@ xpc_handle_activate_IRQ_uv(int irq, void
+@@ -418,7 +578,7 @@
                        }
                }
  
@@ -216994,7 +216785,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
        }
  
        if (wakeup_hb_checker)
-@@ -482,7 +642,7 @@ xpc_send_local_activate_IRQ_uv(struct xp
+@@ -482,7 +642,7 @@
        struct xpc_partition_uv *part_uv = &part->sn.uv;
  
        /*
@@ -217003,7 +216794,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
         * !!! message our way by doing what the activate IRQ handler would
         * !!! do had one really been sent.
         */
-@@ -500,14 +660,39 @@ static enum xp_retval
+@@ -500,14 +660,39 @@
  xpc_get_partition_rsvd_page_pa_uv(void *buf, u64 *cookie, unsigned long *rp_pa,
                                  size_t *len)
  {
@@ -217046,7 +216837,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
        return 0;
  }
  
-@@ -825,8 +1010,8 @@ xpc_allocate_recv_msg_slot_uv(struct xpc
+@@ -825,8 +1010,8 @@
                        continue;
  
                for (entry = 0; entry < nentries; entry++) {
@@ -217057,7 +216848,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  
                        msg_slot->hdr.msg_slot_number = entry;
                }
-@@ -1123,9 +1308,8 @@ xpc_handle_notify_mq_msg_uv(struct xpc_p
+@@ -1123,9 +1308,8 @@
        /* we're dealing with a normal message sent via the notify_mq */
        ch_uv = &ch->sn.uv;
  
@@ -217069,7 +216860,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
  
        BUG_ON(msg->hdr.msg_slot_number != msg_slot->hdr.msg_slot_number);
        BUG_ON(msg_slot->hdr.size != 0);
-@@ -1238,7 +1422,7 @@ xpc_send_payload_uv(struct xpc_channel *
+@@ -1238,7 +1422,7 @@
                atomic_inc(&ch->n_to_notify);
  
                msg_slot->key = key;
@@ -217078,7 +216869,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
                msg_slot->func = func;
  
                if (ch->flags & XPC_C_DISCONNECTING) {
-@@ -1411,22 +1595,18 @@ xpc_init_uv(void)
+@@ -1411,22 +1595,18 @@
                return -E2BIG;
        }
  
@@ -217110,7 +216901,7 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
        }
  
        return 0;
-@@ -1435,9 +1615,6 @@ xpc_init_uv(void)
+@@ -1435,9 +1615,6 @@
  void
  xpc_exit_uv(void)
  {
@@ -217122,10 +216913,10 @@ diff -purN linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c linux-2.6.27.19-5.1/drivers
 +      xpc_destroy_gru_mq_uv(xpc_notify_mq_uv);
 +      xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
  }
-diff -purN linux-2.6.27/drivers/misc/sony-laptop.c linux-2.6.27.19-5.1/drivers/misc/sony-laptop.c
---- linux-2.6.27/drivers/misc/sony-laptop.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/sony-laptop.c     2009-03-25 16:11:30.000000000 +0000
-@@ -1038,7 +1038,11 @@ static int sony_nc_add(struct acpi_devic
+diff -r 9608d5473017 drivers/misc/sony-laptop.c
+--- a/drivers/misc/sony-laptop.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/sony-laptop.c       Wed May 06 16:56:23 2009 +0100
+@@ -1038,7 +1038,11 @@
                goto outinput;
        }
  
@@ -217138,7 +216929,7 @@ diff -purN linux-2.6.27/drivers/misc/sony-laptop.c linux-2.6.27.19-5.1/drivers/m
                sony_backlight_device = backlight_device_register("sony", NULL,
                                                                  NULL,
                                                                  &sony_backlight_ops);
-@@ -2315,8 +2319,10 @@ end:
+@@ -2315,8 +2319,10 @@
   */
  static int sony_pic_disable(struct acpi_device *device)
  {
@@ -217151,10 +216942,10 @@ diff -purN linux-2.6.27/drivers/misc/sony-laptop.c linux-2.6.27.19-5.1/drivers/m
                return -ENXIO;
  
        dprintk("Device disabled\n");
-diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers/misc/thinkpad_acpi.c
---- linux-2.6.27/drivers/misc/thinkpad_acpi.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/misc/thinkpad_acpi.c   2009-03-25 16:11:30.000000000 +0000
-@@ -240,6 +240,7 @@ static struct {
+diff -r 9608d5473017 drivers/misc/thinkpad_acpi.c
+--- a/drivers/misc/thinkpad_acpi.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/misc/thinkpad_acpi.c     Wed May 06 16:56:23 2009 +0100
+@@ -240,6 +240,7 @@
        u32 light_status:1;
        u32 bright_16levels:1;
        u32 bright_acpimode:1;
@@ -217162,7 +216953,7 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
        u32 wan:1;
        u32 fan_ctrl_status_undef:1;
        u32 input_device_registered:1;
-@@ -2353,6 +2354,9 @@ err_exit:
+@@ -2353,6 +2354,9 @@
        return (res < 0)? res : 1;
  }
  
@@ -217172,7 +216963,7 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
  static void hotkey_notify(struct ibm_struct *ibm, u32 event)
  {
        u32 hkey;
-@@ -2391,6 +2395,28 @@ static void hotkey_notify(struct ibm_str
+@@ -2391,6 +2395,28 @@
                case 1:
                        /* 0x1000-0x1FFF: key presses */
                        scancode = hkey & 0xfff;
@@ -217201,7 +216992,7 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
                        if (scancode > 0 && scancode < 0x21) {
                                scancode--;
                                if (!(hotkey_source_mask & (1 << scancode))) {
-@@ -4770,7 +4796,6 @@ enum {
+@@ -4770,7 +4796,6 @@
        TP_EC_BACKLIGHT_MAPSW = 0x20,
  };
  
@@ -217209,7 +217000,7 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
  static int brightness_mode;
  static unsigned int brightness_enable = 2; /* 2 = auto, 0 = no, 1 = yes */
  
-@@ -4909,7 +4934,7 @@ static struct backlight_ops ibm_backligh
+@@ -4909,7 +4934,7 @@
  static int __init brightness_init(struct ibm_init_struct *iibm)
  {
        int b;
@@ -217218,7 +217009,7 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
        vdbg_printk(TPACPI_DBG_INIT, "initializing brightness subdriver\n");
  
        mutex_init(&brightness_mutex);
-@@ -4921,16 +4946,32 @@ static int __init brightness_init(struct
+@@ -4921,16 +4946,32 @@
         */
        b = tpacpi_check_std_acpi_brightness_support();
        if (b > 0) {
@@ -217261,9 +217052,9 @@ diff -purN linux-2.6.27/drivers/misc/thinkpad_acpi.c linux-2.6.27.19-5.1/drivers
                }
        }
  
-diff -purN linux-2.6.27/drivers/mmc/card/block.c linux-2.6.27.19-5.1/drivers/mmc/card/block.c
---- linux-2.6.27/drivers/mmc/card/block.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mmc/card/block.c       2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 drivers/mmc/card/block.c
+--- a/drivers/mmc/card/block.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mmc/card/block.c Wed May 06 16:56:23 2009 +0100
 @@ -29,6 +29,7 @@
  #include <linux/blkdev.h>
  #include <linux/mutex.h>
@@ -217272,7 +217063,7 @@ diff -purN linux-2.6.27/drivers/mmc/card/block.c linux-2.6.27.19-5.1/drivers/mmc
  
  #include <linux/mmc/card.h>
  #include <linux/mmc/host.h>
-@@ -532,6 +533,8 @@ static int mmc_blk_probe(struct mmc_card
+@@ -532,6 +533,8 @@
        struct mmc_blk_data *md;
        int err;
  
@@ -217281,7 +217072,7 @@ diff -purN linux-2.6.27/drivers/mmc/card/block.c linux-2.6.27.19-5.1/drivers/mmc
        /*
         * Check that the card supports the command class(es) we need.
         */
-@@ -546,10 +549,11 @@ static int mmc_blk_probe(struct mmc_card
+@@ -546,10 +549,11 @@
        if (err)
                goto out;
  
@@ -217296,10 +217087,10 @@ diff -purN linux-2.6.27/drivers/mmc/card/block.c linux-2.6.27.19-5.1/drivers/mmc
  
        mmc_set_drvdata(card, md);
        add_disk(md->disk);
-diff -purN linux-2.6.27/drivers/mmc/core/core.c linux-2.6.27.19-5.1/drivers/mmc/core/core.c
---- linux-2.6.27/drivers/mmc/core/core.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mmc/core/core.c        2009-03-25 16:11:30.000000000 +0000
-@@ -280,7 +280,11 @@ void mmc_set_data_timeout(struct mmc_dat
+diff -r 9608d5473017 drivers/mmc/core/core.c
+--- a/drivers/mmc/core/core.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mmc/core/core.c  Wed May 06 16:56:23 2009 +0100
+@@ -280,7 +280,11 @@
                        (card->host->ios.clock / 1000);
  
                if (data->flags & MMC_DATA_WRITE)
@@ -217312,10 +217103,10 @@ diff -purN linux-2.6.27/drivers/mmc/core/core.c linux-2.6.27.19-5.1/drivers/mmc/
                else
                        limit_us = 100000;
  
-diff -purN linux-2.6.27/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.27.19-5.1/drivers/mtd/chips/cfi_cmdset_0002.c
---- linux-2.6.27/drivers/mtd/chips/cfi_cmdset_0002.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/chips/cfi_cmdset_0002.c    2009-03-25 16:11:20.000000000 +0000
-@@ -362,19 +362,6 @@ struct mtd_info *cfi_cmdset_0002(struct 
+diff -r 9608d5473017 drivers/mtd/chips/cfi_cmdset_0002.c
+--- a/drivers/mtd/chips/cfi_cmdset_0002.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/chips/cfi_cmdset_0002.c      Wed May 06 16:56:23 2009 +0100
+@@ -362,19 +362,6 @@
                /* Set the default CFI lock/unlock addresses */
                cfi->addr_unlock1 = 0x555;
                cfi->addr_unlock2 = 0x2aa;
@@ -217335,10 +217126,10 @@ diff -purN linux-2.6.27/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.27.19-5.1/
  
        } /* CFI mode */
        else if (cfi->cfi_mode == CFI_MODE_JEDEC) {
-diff -purN linux-2.6.27/drivers/mtd/chips/jedec_probe.c linux-2.6.27.19-5.1/drivers/mtd/chips/jedec_probe.c
---- linux-2.6.27/drivers/mtd/chips/jedec_probe.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/chips/jedec_probe.c        2009-03-25 16:11:20.000000000 +0000
-@@ -1808,9 +1808,7 @@ static inline u32 jedec_read_mfr(struct 
+diff -r 9608d5473017 drivers/mtd/chips/jedec_probe.c
+--- a/drivers/mtd/chips/jedec_probe.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/chips/jedec_probe.c  Wed May 06 16:56:23 2009 +0100
+@@ -1808,9 +1808,7 @@
         * several first banks can contain 0x7f instead of actual ID
         */
        do {
@@ -217349,7 +217140,7 @@ diff -purN linux-2.6.27/drivers/mtd/chips/jedec_probe.c linux-2.6.27.19-5.1/driv
                mask = (1 << (cfi->device_type * 8)) - 1;
                result = map_read(map, base + ofs);
                bank++;
-@@ -1824,7 +1822,7 @@ static inline u32 jedec_read_id(struct m
+@@ -1824,7 +1822,7 @@
  {
        map_word result;
        unsigned long mask;
@@ -217358,7 +217149,7 @@ diff -purN linux-2.6.27/drivers/mtd/chips/jedec_probe.c linux-2.6.27.19-5.1/driv
        mask = (1 << (cfi->device_type * 8)) -1;
        result = map_read(map, base + ofs);
        return result.x[0] & mask;
-@@ -2067,8 +2065,8 @@ static int jedec_probe_chip(struct map_i
+@@ -2067,8 +2065,8 @@
  
        }
        /* Ensure the unlock addresses we try stay inside the map */
@@ -217369,34 +217160,34 @@ diff -purN linux-2.6.27/drivers/mtd/chips/jedec_probe.c linux-2.6.27.19-5.1/driv
        if (    ((base + probe_offset1 + map_bankwidth(map)) >= map->size) ||
                ((base + probe_offset2 + map_bankwidth(map)) >= map->size))
                goto retry;
-diff -purN linux-2.6.27/drivers/mtd/devices/Kconfig linux-2.6.27.19-5.1/drivers/mtd/devices/Kconfig
---- linux-2.6.27/drivers/mtd/devices/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/Kconfig    2009-03-25 16:11:20.000000000 +0000
-@@ -99,6 +99,13 @@ config MTD_PHRAM
+diff -r 9608d5473017 drivers/mtd/devices/Kconfig
+--- a/drivers/mtd/devices/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/devices/Kconfig      Wed May 06 16:56:23 2009 +0100
+@@ -98,6 +98,13 @@
+         Use this driver to access physical memory that the kernel proper
          doesn't have access to, memory beyond the mem=xxx limit, nvram,
          memory on the video card, etc...
++
 +config MTD_PS3VRAM
 +      tristate "PS3 video RAM"
 +      depends on FB_PS3
 +      help
 +        This driver allows you to use excess PS3 video RAM as volatile
 +        storage or system swap.
-+
  config MTD_LART
        tristate "28F160xx flash driver for LART"
-       depends on SA1100_LART
-diff -purN linux-2.6.27/drivers/mtd/devices/Makefile linux-2.6.27.19-5.1/drivers/mtd/devices/Makefile
---- linux-2.6.27/drivers/mtd/devices/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/Makefile   2009-03-25 16:11:20.000000000 +0000
-@@ -16,3 +16,4 @@ obj-$(CONFIG_MTD_LART)               += lart.o
+diff -r 9608d5473017 drivers/mtd/devices/Makefile
+--- a/drivers/mtd/devices/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/devices/Makefile     Wed May 06 16:56:23 2009 +0100
+@@ -16,3 +16,4 @@
  obj-$(CONFIG_MTD_BLOCK2MTD)   += block2mtd.o
  obj-$(CONFIG_MTD_DATAFLASH)   += mtd_dataflash.o
  obj-$(CONFIG_MTD_M25P80)      += m25p80.o
 +obj-$(CONFIG_MTD_PS3VRAM)     += ps3vram.o
-diff -purN linux-2.6.27/drivers/mtd/devices/ps3vram.c linux-2.6.27.19-5.1/drivers/mtd/devices/ps3vram.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/devices/ps3vram.c  2009-03-25 16:11:20.000000000 +0000
+diff -r 9608d5473017 drivers/mtd/devices/ps3vram.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/mtd/devices/ps3vram.c    Wed May 06 16:56:23 2009 +0100
 @@ -0,0 +1,776 @@
 +/**
 + * ps3vram - Use extra PS3 video ram as MTD block device.
@@ -218174,10 +217965,10 @@ diff -purN linux-2.6.27/drivers/mtd/devices/ps3vram.c linux-2.6.27.19-5.1/driver
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Jim Paris <jim@jtan.com>");
 +MODULE_DESCRIPTION("MTD driver for PS3 video RAM");
-diff -purN linux-2.6.27/drivers/mtd/ftl.c linux-2.6.27.19-5.1/drivers/mtd/ftl.c
---- linux-2.6.27/drivers/mtd/ftl.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/ftl.c      2009-03-25 16:11:20.000000000 +0000
-@@ -1005,6 +1005,29 @@ static int ftl_writesect(struct mtd_blkt
+diff -r 9608d5473017 drivers/mtd/ftl.c
+--- a/drivers/mtd/ftl.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/ftl.c        Wed May 06 16:56:23 2009 +0100
+@@ -1005,6 +1005,29 @@
        return ftl_write((void *)dev, buf, block, 1);
  }
  
@@ -218207,7 +217998,7 @@ diff -purN linux-2.6.27/drivers/mtd/ftl.c linux-2.6.27.19-5.1/drivers/mtd/ftl.c
  /*====================================================================*/
  
  static void ftl_freepart(partition_t *part)
-@@ -1069,6 +1092,7 @@ static struct mtd_blktrans_ops ftl_tr = 
+@@ -1069,6 +1092,7 @@
        .blksize        = SECTOR_SIZE,
        .readsect       = ftl_readsect,
        .writesect      = ftl_writesect,
@@ -218215,10 +218006,10 @@ diff -purN linux-2.6.27/drivers/mtd/ftl.c linux-2.6.27.19-5.1/drivers/mtd/ftl.c
        .getgeo         = ftl_getgeo,
        .add_mtd        = ftl_add_mtd,
        .remove_dev     = ftl_remove_dev,
-diff -purN linux-2.6.27/drivers/mtd/maps/physmap_of.c linux-2.6.27.19-5.1/drivers/mtd/maps/physmap_of.c
---- linux-2.6.27/drivers/mtd/maps/physmap_of.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/maps/physmap_of.c  2009-03-25 16:11:20.000000000 +0000
-@@ -281,6 +281,7 @@ static struct of_device_id of_flash_matc
+diff -r 9608d5473017 drivers/mtd/maps/physmap_of.c
+--- a/drivers/mtd/maps/physmap_of.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/maps/physmap_of.c    Wed May 06 16:56:23 2009 +0100
+@@ -281,6 +281,7 @@
  MODULE_DEVICE_TABLE(of, of_flash_match);
  
  static struct of_platform_driver of_flash_driver = {
@@ -218226,10 +218017,10 @@ diff -purN linux-2.6.27/drivers/mtd/maps/physmap_of.c linux-2.6.27.19-5.1/driver
        .name           = "of-flash",
        .match_table    = of_flash_match,
        .probe          = of_flash_probe,
-diff -purN linux-2.6.27/drivers/mtd/maps/sun_uflash.c linux-2.6.27.19-5.1/drivers/mtd/maps/sun_uflash.c
---- linux-2.6.27/drivers/mtd/maps/sun_uflash.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/maps/sun_uflash.c  2009-03-25 16:11:20.000000000 +0000
-@@ -151,6 +151,7 @@ static struct of_device_id uflash_match[
+diff -r 9608d5473017 drivers/mtd/maps/sun_uflash.c
+--- a/drivers/mtd/maps/sun_uflash.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/maps/sun_uflash.c    Wed May 06 16:56:23 2009 +0100
+@@ -151,6 +151,7 @@
  MODULE_DEVICE_TABLE(of, uflash_match);
  
  static struct of_platform_driver uflash_driver = {
@@ -218237,10 +218028,10 @@ diff -purN linux-2.6.27/drivers/mtd/maps/sun_uflash.c linux-2.6.27.19-5.1/driver
        .name           = UFLASH_DEVNAME,
        .match_table    = uflash_match,
        .probe          = uflash_probe,
-diff -purN linux-2.6.27/drivers/mtd/mtd_blkdevs.c linux-2.6.27.19-5.1/drivers/mtd/mtd_blkdevs.c
---- linux-2.6.27/drivers/mtd/mtd_blkdevs.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/mtd_blkdevs.c      2009-03-25 16:11:20.000000000 +0000
-@@ -32,6 +32,14 @@ struct mtd_blkcore_priv {
+diff -r 9608d5473017 drivers/mtd/mtd_blkdevs.c
+--- a/drivers/mtd/mtd_blkdevs.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/mtd_blkdevs.c        Wed May 06 16:56:23 2009 +0100
+@@ -32,6 +32,14 @@
        spinlock_t queue_lock;
  };
  
@@ -218255,18 +218046,18 @@ diff -purN linux-2.6.27/drivers/mtd/mtd_blkdevs.c linux-2.6.27.19-5.1/drivers/mt
  static int do_blktrans_request(struct mtd_blktrans_ops *tr,
                               struct mtd_blktrans_dev *dev,
                               struct request *req)
-@@ -44,6 +52,10 @@ static int do_blktrans_request(struct mt
+@@ -43,6 +51,10 @@
+       nsect = req->current_nr_sectors << 9 >> tr->blkshift;
  
        buf = req->buffer;
++
 +      if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
 +          req->cmd[0] == REQ_LB_OP_DISCARD)
 +              return !tr->discard(dev, block, nsect);
-+
        if (!blk_fs_request(req))
                return 0;
-@@ -367,6 +379,10 @@ int register_mtd_blktrans(struct mtd_blk
+@@ -367,6 +379,10 @@
  
        tr->blkcore_priv->rq->queuedata = tr;
        blk_queue_hardsect_size(tr->blkcore_priv->rq, tr->blksize);
@@ -218277,10 +218068,10 @@ diff -purN linux-2.6.27/drivers/mtd/mtd_blkdevs.c linux-2.6.27.19-5.1/drivers/mt
        tr->blkshift = ffs(tr->blksize) - 1;
  
        tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
-diff -purN linux-2.6.27/drivers/mtd/nand/fsl_elbc_nand.c linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_elbc_nand.c
---- linux-2.6.27/drivers/mtd/nand/fsl_elbc_nand.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_elbc_nand.c       2009-03-25 16:11:20.000000000 +0000
-@@ -1079,6 +1079,7 @@ static const struct of_device_id fsl_elb
+diff -r 9608d5473017 drivers/mtd/nand/fsl_elbc_nand.c
+--- a/drivers/mtd/nand/fsl_elbc_nand.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/fsl_elbc_nand.c Wed May 06 16:56:23 2009 +0100
+@@ -1079,6 +1079,7 @@
  static struct of_platform_driver fsl_elbc_ctrl_driver = {
        .driver = {
                .name   = "fsl-elbc",
@@ -218288,10 +218079,10 @@ diff -purN linux-2.6.27/drivers/mtd/nand/fsl_elbc_nand.c linux-2.6.27.19-5.1/dri
        },
        .match_table = fsl_elbc_match,
        .probe = fsl_elbc_ctrl_probe,
-diff -purN linux-2.6.27/drivers/mtd/nand/fsl_upm.c linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_upm.c
---- linux-2.6.27/drivers/mtd/nand/fsl_upm.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/fsl_upm.c     2009-03-25 16:11:20.000000000 +0000
-@@ -267,6 +267,7 @@ static struct of_device_id of_fun_match[
+diff -r 9608d5473017 drivers/mtd/nand/fsl_upm.c
+--- a/drivers/mtd/nand/fsl_upm.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/fsl_upm.c       Wed May 06 16:56:23 2009 +0100
+@@ -267,6 +267,7 @@
  MODULE_DEVICE_TABLE(of, of_fun_match);
  
  static struct of_platform_driver of_fun_driver = {
@@ -218299,10 +218090,10 @@ diff -purN linux-2.6.27/drivers/mtd/nand/fsl_upm.c linux-2.6.27.19-5.1/drivers/m
        .name           = "fsl,upm-nand",
        .match_table    = of_fun_match,
        .probe          = fun_probe,
-diff -purN linux-2.6.27/drivers/mtd/nand/pasemi_nand.c linux-2.6.27.19-5.1/drivers/mtd/nand/pasemi_nand.c
---- linux-2.6.27/drivers/mtd/nand/pasemi_nand.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/mtd/nand/pasemi_nand.c 2009-03-25 16:11:20.000000000 +0000
-@@ -220,6 +220,7 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_matc
+diff -r 9608d5473017 drivers/mtd/nand/pasemi_nand.c
+--- a/drivers/mtd/nand/pasemi_nand.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/mtd/nand/pasemi_nand.c   Wed May 06 16:56:23 2009 +0100
+@@ -220,6 +220,7 @@
  
  static struct of_platform_driver pasemi_nand_driver =
  {
@@ -218310,10 +218101,10 @@ diff -purN linux-2.6.27/drivers/mtd/nand/pasemi_nand.c linux-2.6.27.19-5.1/drive
        .name           = (char*)driver_name,
        .match_table    = pasemi_nand_match,
        .probe          = pasemi_nand_probe,
-diff -purN linux-2.6.27/drivers/net/3c505.c linux-2.6.27.19-5.1/drivers/net/3c505.c
---- linux-2.6.27/drivers/net/3c505.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/3c505.c    2009-03-25 16:11:05.000000000 +0000
-@@ -493,21 +493,27 @@ static bool receive_pcb(struct net_devic
+diff -r 9608d5473017 drivers/net/3c505.c
+--- a/drivers/net/3c505.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/3c505.c      Wed May 06 16:56:23 2009 +0100
+@@ -493,21 +493,27 @@
        }
        /* read the data */
        spin_lock_irqsave(&adapter->lock, flags);
@@ -218351,10 +218142,10 @@ diff -purN linux-2.6.27/drivers/net/3c505.c linux-2.6.27.19-5.1/drivers/net/3c50
  
        /* safety check total length vs data length */
        if (total_length != (pcb->length + 2)) {
-diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kconfig
---- linux-2.6.27/drivers/net/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/Kconfig    2009-03-25 16:11:04.000000000 +0000
-@@ -1840,6 +1840,17 @@ config NE_H8300
+diff -r 9608d5473017 drivers/net/Kconfig
+--- a/drivers/net/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/Kconfig      Wed May 06 16:56:23 2009 +0100
+@@ -1840,6 +1840,17 @@
          Say Y here if you want to use the NE2000 compatible
          controller on the Renesas H8/300 processor.
  
@@ -218372,7 +218163,7 @@ diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kcon
  source "drivers/net/fs_enet/Kconfig"
  
  endif # NET_ETHERNET
-@@ -2046,6 +2057,7 @@ config R8169
+@@ -2046,6 +2057,7 @@
        tristate "Realtek 8169 gigabit ethernet support"
        depends on PCI
        select CRC32
@@ -218380,7 +218171,7 @@ diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kcon
        ---help---
          Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter.
  
-@@ -2380,7 +2392,6 @@ config EHEA
+@@ -2380,7 +2392,6 @@
  config IXGBE
        tristate "Intel(R) 10GbE PCI Express adapters support"
        depends on PCI && INET
@@ -218388,10 +218179,11 @@ diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kcon
        ---help---
          This driver supports Intel(R) 10GbE PCI Express family of
          adapters.  For more information on how to identify your adapter, go
-@@ -2396,6 +2407,26 @@ config IXGBE
+@@ -2395,6 +2406,26 @@
          To compile this driver as a module, choose M here. The module
          will be called ixgbe.
++
 +config IXGBE_LRO
 +      bool "Use software LRO"
 +      depends on IXGBE && INET
@@ -218411,11 +218203,10 @@ diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kcon
 +       driver.
 +
 +       If unsure, say N.
-+
  config IXGB
        tristate "Intel(R) PRO/10GbE support"
-       depends on PCI
-@@ -2514,9 +2545,9 @@ source "drivers/atm/Kconfig"
+@@ -2514,9 +2545,9 @@
  
  source "drivers/s390/net/Kconfig"
  
@@ -218427,10 +218218,10 @@ diff -purN linux-2.6.27/drivers/net/Kconfig linux-2.6.27.19-5.1/drivers/net/Kcon
        default y
        help
          The network device frontend driver allows the kernel to
-diff -purN linux-2.6.27/drivers/net/Makefile linux-2.6.27.19-5.1/drivers/net/Makefile
---- linux-2.6.27/drivers/net/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/Makefile   2009-03-25 16:11:07.000000000 +0000
-@@ -15,6 +15,7 @@ obj-$(CONFIG_EHEA) += ehea/
+diff -r 9608d5473017 drivers/net/Makefile
+--- a/drivers/net/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/Makefile     Wed May 06 16:56:23 2009 +0100
+@@ -15,6 +15,7 @@
  obj-$(CONFIG_CAN) += can/
  obj-$(CONFIG_BONDING) += bonding/
  obj-$(CONFIG_ATL1) += atlx/
@@ -218438,7 +218229,7 @@ diff -purN linux-2.6.27/drivers/net/Makefile linux-2.6.27.19-5.1/drivers/net/Mak
  obj-$(CONFIG_ATL1E) += atl1e/
  obj-$(CONFIG_GIANFAR) += gianfar_driver.o
  obj-$(CONFIG_TEHUTI) += tehuti.o
-@@ -141,7 +142,7 @@ obj-$(CONFIG_PPPOL2TP) += pppox.o pppol2
+@@ -141,7 +142,7 @@
  obj-$(CONFIG_SLIP) += slip.o
  obj-$(CONFIG_SLHC) += slhc.o
  
@@ -218447,10 +218238,10 @@ diff -purN linux-2.6.27/drivers/net/Makefile linux-2.6.27.19-5.1/drivers/net/Mak
  
  obj-$(CONFIG_DUMMY) += dummy.o
  obj-$(CONFIG_IFB) += ifb.o
-diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_hw.c linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_hw.c
---- linux-2.6.27/drivers/net/atl1e/atl1e_hw.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_hw.c   2009-03-25 16:11:07.000000000 +0000
-@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw 
+diff -r 9608d5473017 drivers/net/atl1e/atl1e_hw.c
+--- a/drivers/net/atl1e/atl1e_hw.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atl1e/atl1e_hw.c     Wed May 06 16:56:24 2009 +0100
+@@ -163,9 +163,6 @@
   * atl1e_hash_mc_addr
   *  purpose
   *      set hash value for a multicast address
@@ -218460,7 +218251,7 @@ diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_hw.c linux-2.6.27.19-5.1/drivers
   */
  u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
  {
-@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *
+@@ -174,7 +171,6 @@
        int i;
  
        crc32 = ether_crc_le(6, mc_addr);
@@ -218468,10 +218259,10 @@ diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_hw.c linux-2.6.27.19-5.1/drivers
        for (i = 0; i < 32; i++)
                value |= (((crc32 >> i) & 1) << (31 - i));
  
-diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_main.c linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_main.c
---- linux-2.6.27/drivers/net/atl1e/atl1e_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atl1e/atl1e_main.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2390,9 +2390,7 @@ static int __devinit atl1e_probe(struct 
+diff -r 9608d5473017 drivers/net/atl1e/atl1e_main.c
+--- a/drivers/net/atl1e/atl1e_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atl1e/atl1e_main.c   Wed May 06 16:56:24 2009 +0100
+@@ -2390,9 +2390,7 @@
        }
  
        /* Init GPHY as early as possible due to power saving issue  */
@@ -218481,17 +218272,17 @@ diff -purN linux-2.6.27/drivers/net/atl1e/atl1e_main.c linux-2.6.27.19-5.1/drive
        /* reset the controller to
         * put the device in a known good starting state */
        err = atl1e_reset_hw(&adapter->hw);
-diff -purN linux-2.6.27/drivers/net/atlx/Makefile linux-2.6.27.19-5.1/drivers/net/atlx/Makefile
---- linux-2.6.27/drivers/net/atlx/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/Makefile      2009-03-25 16:11:04.000000000 +0000
-@@ -1 +1,3 @@
+diff -r 9608d5473017 drivers/net/atlx/Makefile
+--- a/drivers/net/atlx/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/Makefile        Wed May 06 16:56:24 2009 +0100
+@@ -1,1 +1,3 @@
  obj-$(CONFIG_ATL1)    += atl1.o
 +obj-$(CONFIG_ATL2)    += atl2.o
 +
-diff -purN linux-2.6.27/drivers/net/atlx/atl1.c linux-2.6.27.19-5.1/drivers/net/atlx/atl1.c
---- linux-2.6.27/drivers/net/atlx/atl1.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl1.c        2009-03-25 16:11:04.000000000 +0000
-@@ -2317,7 +2317,8 @@ static void atl1_tx_queue(struct atl1_ad
+diff -r 9608d5473017 drivers/net/atlx/atl1.c
+--- a/drivers/net/atlx/atl1.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/atl1.c  Wed May 06 16:56:24 2009 +0100
+@@ -2317,7 +2317,8 @@
                if (tpd != ptpd)
                        memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
                tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
@@ -218501,7 +218292,7 @@ diff -purN linux-2.6.27/drivers/net/atlx/atl1.c linux-2.6.27.19-5.1/drivers/net/
                        TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
  
                /*
-@@ -2426,8 +2427,8 @@ static int atl1_xmit_frame(struct sk_buf
+@@ -2426,8 +2427,8 @@
                vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
                        ((vlan_tag >> 9) & 0x8);
                ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
@@ -218512,10 +218303,10 @@ diff -purN linux-2.6.27/drivers/net/atlx/atl1.c linux-2.6.27.19-5.1/drivers/net/
        }
  
        tso = atl1_tso(adapter, skb, ptpd);
-diff -purN linux-2.6.27/drivers/net/atlx/atl1.h linux-2.6.27.19-5.1/drivers/net/atlx/atl1.h
---- linux-2.6.27/drivers/net/atlx/atl1.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl1.h        2009-03-25 16:11:04.000000000 +0000
-@@ -504,7 +504,7 @@ struct rx_free_desc {
+diff -r 9608d5473017 drivers/net/atlx/atl1.h
+--- a/drivers/net/atlx/atl1.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/atlx/atl1.h  Wed May 06 16:56:24 2009 +0100
+@@ -504,7 +504,7 @@
  #define TPD_PKTNT_MASK                0x0001
  #define TPD_PKTINT_SHIFT      15
  #define TPD_VLANTAG_MASK      0xFFFF
@@ -218524,9 +218315,9 @@ diff -purN linux-2.6.27/drivers/net/atlx/atl1.h linux-2.6.27.19-5.1/drivers/net/
  
  /* tpd word 3 bits 0:13 */
  #define TPD_EOP_MASK          0x0001
-diff -purN linux-2.6.27/drivers/net/atlx/atl2.c linux-2.6.27.19-5.1/drivers/net/atlx/atl2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl2.c        2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/atlx/atl2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/atlx/atl2.c  Wed May 06 16:56:24 2009 +0100
 @@ -0,0 +1,3127 @@
 +/*
 + * Copyright(c) 2006 - 2007 Atheros Corporation. All rights reserved.
@@ -221655,9 +221446,9 @@ diff -purN linux-2.6.27/drivers/net/atlx/atl2.c linux-2.6.27.19-5.1/drivers/net/
 +              adapter->hw.MediaType = (u16)(opt.def);
 +#endif
 +}
-diff -purN linux-2.6.27/drivers/net/atlx/atl2.h linux-2.6.27.19-5.1/drivers/net/atlx/atl2.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/atlx/atl2.h        2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/atlx/atl2.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/atlx/atl2.h  Wed May 06 16:56:24 2009 +0100
 @@ -0,0 +1,530 @@
 +/* atl2.h -- atl2 driver definitions
 + *
@@ -222189,10 +221980,10 @@ diff -purN linux-2.6.27/drivers/net/atlx/atl2.h linux-2.6.27.19-5.1/drivers/net/
 +};
 +
 +#endif /* _ATL2_H_ */
-diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.c
---- linux-2.6.27/drivers/net/bnx2.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2.c     2009-03-25 16:11:06.000000000 +0000
-@@ -89,6 +89,7 @@ typedef enum {
+diff -r 9608d5473017 drivers/net/bnx2.c
+--- a/drivers/net/bnx2.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2.c       Wed May 06 16:56:24 2009 +0100
+@@ -89,6 +89,7 @@
        BCM5709,
        BCM5709S,
        BCM5716,
@@ -222200,7 +221991,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  } board_t;
  
  /* indexed by board_t, above */
-@@ -105,6 +106,7 @@ static struct {
+@@ -105,6 +106,7 @@
        { "Broadcom NetXtreme II BCM5709 1000Base-T" },
        { "Broadcom NetXtreme II BCM5709 1000Base-SX" },
        { "Broadcom NetXtreme II BCM5716 1000Base-T" },
@@ -222208,7 +221999,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        };
  
  static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_tbl) = {
-@@ -128,6 +130,8 @@ static DEFINE_PCI_DEVICE_TABLE(bnx2_pci_
+@@ -128,6 +130,8 @@
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5709S },
        { PCI_VENDOR_ID_BROADCOM, 0x163b,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5716 },
@@ -222217,7 +222008,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        { 0, }
  };
  
-@@ -543,9 +547,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
+@@ -543,9 +547,9 @@
                for (j = 0; j < bp->rx_max_pg_ring; j++) {
                        if (rxr->rx_pg_desc_ring[j])
                                pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
@@ -222230,7 +222021,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
                }
                if (rxr->rx_pg_ring)
                        vfree(rxr->rx_pg_ring);
-@@ -2472,7 +2476,7 @@ bnx2_alloc_rx_page(struct bnx2 *bp, stru
+@@ -2472,7 +2476,7 @@
        struct sw_pg *rx_pg = &rxr->rx_pg_ring[index];
        struct rx_bd *rxbd =
                &rxr->rx_pg_desc_ring[RX_RING(index)][RX_IDX(index)];
@@ -222239,7 +222030,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  
        if (!page)
                return -ENOMEM;
-@@ -2497,7 +2501,7 @@ bnx2_free_rx_page(struct bnx2 *bp, struc
+@@ -2497,7 +2501,7 @@
        pci_unmap_page(bp->pdev, pci_unmap_addr(rx_pg, mapping), PAGE_SIZE,
                       PCI_DMA_FROMDEVICE);
  
@@ -222248,7 +222039,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        rx_pg->page = NULL;
  }
  
-@@ -2828,9 +2832,7 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2
+@@ -2828,9 +2832,7 @@
                        }
  
                        frag_size -= frag_len;
@@ -222259,7 +222050,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  
                        pg_prod = NEXT_RX_BD(pg_prod);
                        pg_cons = RX_PG_RING_IDX(NEXT_RX_BD(pg_cons));
-@@ -3250,6 +3252,9 @@ bnx2_set_rx_mode(struct net_device *dev)
+@@ -3250,6 +3252,9 @@
        struct dev_addr_list *uc_ptr;
        int i;
  
@@ -222269,10 +222060,13 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        spin_lock_bh(&bp->phy_lock);
  
        rx_mode = bp->rx_mode & ~(BNX2_EMAC_RX_MODE_PROMISCUOUS |
-@@ -5075,6 +5080,21 @@ bnx2_init_nic(struct bnx2 *bp, int reset
- }
- static int
+@@ -5072,6 +5077,21 @@
+               bnx2_remote_phy_event(bp);
+       spin_unlock_bh(&bp->phy_lock);
+       return 0;
++}
++
++static int
 +bnx2_shutdown_chip(struct bnx2 *bp)
 +{
 +      u32 reset_code;
@@ -222285,13 +222079,10 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
 +              reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
 +
 +      return bnx2_reset_chip(bp, reset_code);
-+}
-+
-+static int
- bnx2_test_registers(struct bnx2 *bp)
- {
-       int ret;
-@@ -5508,6 +5528,9 @@ bnx2_test_link(struct bnx2 *bp)
+ }
+ static int
+@@ -5508,6 +5528,9 @@
  {
        u32 bmsr;
  
@@ -222301,7 +222092,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) {
                if (bp->link_up)
                        return 0;
-@@ -6097,20 +6120,13 @@ static int
+@@ -6097,20 +6120,13 @@
  bnx2_close(struct net_device *dev)
  {
        struct bnx2 *bp = netdev_priv(dev);
@@ -222323,7 +222114,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        bnx2_free_irq(bp);
        bnx2_free_skbs(bp);
        bnx2_free_mem(bp);
-@@ -6479,6 +6495,9 @@ bnx2_nway_reset(struct net_device *dev)
+@@ -6479,6 +6495,9 @@
        struct bnx2 *bp = netdev_priv(dev);
        u32 bmcr;
  
@@ -222333,7 +222124,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        if (!(bp->autoneg & AUTONEG_SPEED)) {
                return -EINVAL;
        }
-@@ -6534,6 +6553,9 @@ bnx2_get_eeprom(struct net_device *dev, 
+@@ -6534,6 +6553,9 @@
        struct bnx2 *bp = netdev_priv(dev);
        int rc;
  
@@ -222343,17 +222134,17 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        /* parameters already validated in ethtool_get_eeprom */
  
        rc = bnx2_nvram_read(bp, eeprom->offset, eebuf, eeprom->len);
-@@ -6548,6 +6570,9 @@ bnx2_set_eeprom(struct net_device *dev, 
+@@ -6547,6 +6569,9 @@
+ {
        struct bnx2 *bp = netdev_priv(dev);
        int rc;
++
 +      if (!netif_running(dev))
 +              return -EAGAIN;
-+
        /* parameters already validated in ethtool_set_eeprom */
  
-       rc = bnx2_nvram_write(bp, eeprom->offset, eebuf, eeprom->len);
-@@ -6712,11 +6737,11 @@ bnx2_set_pauseparam(struct net_device *d
+@@ -6712,11 +6737,11 @@
                bp->autoneg &= ~AUTONEG_FLOW_CTRL;
        }
  
@@ -222370,7 +222161,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  
        return 0;
  }
-@@ -6907,6 +6932,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6907,6 +6932,8 @@
  {
        struct bnx2 *bp = netdev_priv(dev);
  
@@ -222379,7 +222170,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS);
        if (etest->flags & ETH_TEST_FL_OFFLINE) {
                int i;
-@@ -6926,9 +6953,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6926,9 +6953,8 @@
                if ((buf[2] = bnx2_test_loopback(bp)) != 0)
                        etest->flags |= ETH_TEST_FL_FAILED;
  
@@ -222391,7 +222182,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
                else {
                        bnx2_init_nic(bp, 1);
                        bnx2_netif_start(bp);
-@@ -6956,6 +6982,8 @@ bnx2_self_test(struct net_device *dev, s
+@@ -6956,6 +6982,8 @@
                etest->flags |= ETH_TEST_FL_FAILED;
  
        }
@@ -222400,7 +222191,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  }
  
  static void
-@@ -7021,6 +7049,8 @@ bnx2_phys_id(struct net_device *dev, u32
+@@ -7021,6 +7049,8 @@
        int i;
        u32 save;
  
@@ -222409,7 +222200,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        if (data == 0)
                data = 2;
  
-@@ -7045,6 +7075,10 @@ bnx2_phys_id(struct net_device *dev, u32
+@@ -7045,6 +7075,10 @@
        }
        REG_WR(bp, BNX2_EMAC_LED, 0);
        REG_WR(bp, BNX2_MISC_CFG, save);
@@ -222420,7 +222211,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        return 0;
  }
  
-@@ -7781,7 +7815,6 @@ bnx2_suspend(struct pci_dev *pdev, pm_me
+@@ -7781,7 +7815,6 @@
  {
        struct net_device *dev = pci_get_drvdata(pdev);
        struct bnx2 *bp = netdev_priv(dev);
@@ -222428,7 +222219,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
  
        /* PCI register 4 needs to be saved whether netif_running() or not.
         * MSI address and data need to be saved if using MSI and
-@@ -7795,13 +7828,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_me
+@@ -7795,13 +7828,7 @@
        bnx2_netif_stop(bp);
        netif_device_detach(dev);
        del_timer_sync(&bp->timer);
@@ -222443,9 +222234,9 @@ diff -purN linux-2.6.27/drivers/net/bnx2.c linux-2.6.27.19-5.1/drivers/net/bnx2.
        bnx2_free_skbs(bp);
        bnx2_set_power_state(bp, pci_choose_state(pdev, state));
        return 0;
-diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2x.h
---- linux-2.6.27/drivers/net/bnx2x.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x.h    2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x.h
+--- a/drivers/net/bnx2x.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x.h      Wed May 06 16:56:24 2009 +0100
 @@ -1,6 +1,6 @@
  /* bnx2x.h: Broadcom Everest network driver.
   *
@@ -222454,18 +222245,18 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
   *
   * 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
-@@ -20,6 +20,11 @@
+@@ -19,6 +19,11 @@
+ /* define this to make the driver freeze on error to allow getting debug info
   * (you will need to reboot afterwards) */
  /* #define BNX2X_STOP_ON_ERROR */
++
 +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 +#define BCM_VLAN                      1
 +#endif
 +
-+
  /* error/debug prints */
  
- #define DRV_MODULE_NAME               "bnx2x"
 @@ -78,11 +83,6 @@
  #endif
  
@@ -222478,7 +222269,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
  #define U64_LO(x)                     (u32)(((u64)(x)) & 0xffffffff)
  #define U64_HI(x)                     (u32)(((u64)(x)) >> 32)
  #define HILO_U64(hi, lo)              ((((u64)(hi)) << 32) + (lo))
-@@ -150,6 +150,9 @@ struct sw_rx_page {
+@@ -150,6 +150,9 @@
  
  #define PAGES_PER_SGE_SHIFT           0
  #define PAGES_PER_SGE                 (1 << PAGES_PER_SGE_SHIFT)
@@ -222488,7 +222279,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
  
  #define BCM_RX_ETH_PAYLOAD_ALIGN      64
  
-@@ -268,14 +271,7 @@ struct bnx2x_fastpath {
+@@ -268,14 +271,7 @@
  
  #define bnx2x_fp(bp, nr, var)         (bp->fp[nr].var)
  
@@ -222504,7 +222295,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
  
  
  /* MC hsi */
-@@ -736,7 +732,7 @@ struct bnx2x {
+@@ -736,7 +732,7 @@
        struct bnx2x_fastpath   fp[MAX_CONTEXT];
        void __iomem            *regview;
        void __iomem            *doorbells;
@@ -222513,7 +222304,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
  
        struct net_device       *dev;
        struct pci_dev          *pdev;
-@@ -801,6 +797,8 @@ struct bnx2x {
+@@ -801,6 +797,8 @@
  #define TPA_ENABLE_FLAG                       0x80
  #define NO_MCP_FLAG                   0x100
  #define BP_NOMCP(bp)                  (bp->flags & NO_MCP_FLAG)
@@ -222522,7 +222313,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
  
        int                     func;
  #define BP_PORT(bp)                   (bp->func % PORT_MAX)
-@@ -811,7 +809,7 @@ struct bnx2x {
+@@ -811,7 +809,7 @@
        int                     pm_cap;
        int                     pcie_cap;
  
@@ -222531,10 +222322,10 @@ diff -purN linux-2.6.27/drivers/net/bnx2x.h linux-2.6.27.19-5.1/drivers/net/bnx2
        struct work_struct      reset_task;
  
        struct timer_list       timer;
-diff -purN linux-2.6.27/drivers/net/bnx2x_init.h linux-2.6.27.19-5.1/drivers/net/bnx2x_init.h
---- linux-2.6.27/drivers/net/bnx2x_init.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_init.h       2009-03-25 16:11:03.000000000 +0000
-@@ -564,14 +564,15 @@ static const struct arb_line write_arb_a
+diff -r 9608d5473017 drivers/net/bnx2x_init.h
+--- a/drivers/net/bnx2x_init.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_init.h Wed May 06 16:56:24 2009 +0100
+@@ -564,14 +564,15 @@
  
  static void bnx2x_init_pxp(struct bnx2x *bp)
  {
@@ -222554,16 +222345,16 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_init.h linux-2.6.27.19-5.1/drivers/net
  
        if (r_order > MAX_RD_ORD) {
                DP(NETIF_MSG_HW, "read order of %d  order adjusted to %d\n",
-diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net/bnx2x_link.c
---- linux-2.6.27/drivers/net/bnx2x_link.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_link.c       2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_link.c
+--- a/drivers/net/bnx2x_link.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_link.c Wed May 06 16:56:24 2009 +0100
 @@ -1,4 +1,4 @@
 -/* Copyright 2008 Broadcom Corporation
 +/* Copyright 2008-2009 Broadcom Corporation
   *
   * Unless you and Broadcom execute a separate written software license
   * agreement governing use of this software, this software is licensed to you
-@@ -317,6 +317,9 @@ static u8 bnx2x_emac_enable(struct link_
+@@ -317,6 +317,9 @@
                val &= ~0x810;
        EMAC_WR(bp, EMAC_REG_EMAC_MODE, val);
  
@@ -222573,7 +222364,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
        /* enable emac for jumbo packets */
        EMAC_WR(bp, EMAC_REG_EMAC_RX_MTU_SIZE,
                (EMAC_RX_MTU_SIZE_JUMBO_ENA |
-@@ -1609,7 +1612,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1609,7 +1612,7 @@
                                      u32 gp_status)
  {
        struct bnx2x *bp = params->bp;
@@ -222582,7 +222373,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
        u8 rc = 0;
        vars->link_status = 0;
  
-@@ -1629,7 +1632,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1629,7 +1632,7 @@
  
                switch (gp_status & GP_STATUS_SPEED_MASK) {
                case GP_STATUS_10M:
@@ -222591,7 +222382,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        if (vars->duplex == DUPLEX_FULL)
                                vars->link_status |= LINK_10TFD;
                        else
-@@ -1637,7 +1640,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1637,7 +1640,7 @@
                        break;
  
                case GP_STATUS_100M:
@@ -222600,7 +222391,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        if (vars->duplex == DUPLEX_FULL)
                                vars->link_status |= LINK_100TXFD;
                        else
-@@ -1646,7 +1649,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1646,7 +1649,7 @@
  
                case GP_STATUS_1G:
                case GP_STATUS_1G_KX:
@@ -222609,7 +222400,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        if (vars->duplex == DUPLEX_FULL)
                                vars->link_status |= LINK_1000TFD;
                        else
-@@ -1654,7 +1657,7 @@ static u8 bnx2x_link_settings_status(str
+@@ -1654,7 +1657,7 @@
                        break;
  
                case GP_STATUS_2_5G:
@@ -222618,7 +222409,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        if (vars->duplex == DUPLEX_FULL)
                                vars->link_status |= LINK_2500TFD;
                        else
-@@ -1671,32 +1674,32 @@ static u8 bnx2x_link_settings_status(str
+@@ -1671,32 +1674,32 @@
                case GP_STATUS_10G_KX4:
                case GP_STATUS_10G_HIG:
                case GP_STATUS_10G_CX4:
@@ -222657,7 +222448,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        vars->link_status |= LINK_16GTFD;
                        break;
  
-@@ -1708,6 +1711,15 @@ static u8 bnx2x_link_settings_status(str
+@@ -1708,6 +1711,15 @@
                        break;
                }
  
@@ -222673,7 +222464,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                vars->link_status |= LINK_STATUS_SERDES_LINK;
  
                if ((params->req_line_speed == SPEED_AUTO_NEG) &&
-@@ -3571,7 +3583,7 @@ static void bnx2x_set_xgxs_loopback(stru
+@@ -3571,7 +3583,7 @@
                               (MDIO_REG_BANK_CL73_IEEEB0 +
                                (MDIO_CL73_IEEEB0_CL73_AN_CONTROL & 0xf)),
                               0x6041);
@@ -222682,7 +222473,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                /* set aer mmd back */
                bnx2x_set_aer_mmd(params, vars);
  
-@@ -3870,9 +3882,15 @@ static u8 bnx2x_link_initialize(struct l
+@@ -3870,9 +3882,15 @@
        }
  
        if (vars->phy_flags & PHY_XGXS_FLAG) {
@@ -222700,7 +222491,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
                        vars->phy_flags |= PHY_SGMII_FLAG;
                } else {
                        vars->phy_flags &= ~PHY_SGMII_FLAG;
-@@ -4194,6 +4212,11 @@ static u8 bnx2x_update_link_down(struct 
+@@ -4194,6 +4212,11 @@
        /* activate nig drain */
        REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 1);
  
@@ -222712,7 +222503,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
        /* reset BigMac */
        bnx2x_bmac_rx_disable(bp, params->port);
        REG_WR(bp, GRCBASE_MISC +
-@@ -4238,6 +4261,7 @@ static u8 bnx2x_update_link_up(struct li
+@@ -4238,6 +4261,7 @@
  
        /* update shared memory */
        bnx2x_update_mng(params, vars->link_status);
@@ -222720,7 +222511,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
        return rc;
  }
  /* This function should called upon link interrupt */
-@@ -4276,6 +4300,9 @@ u8 bnx2x_link_update(struct link_params 
+@@ -4276,6 +4300,9 @@
          REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK10G + port*0x68),
          REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK_STATUS + port*0x68));
  
@@ -222730,24 +222521,25 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_link.c linux-2.6.27.19-5.1/drivers/net
        ext_phy_type = XGXS_EXT_PHY_TYPE(params->ext_phy_config);
  
        /* Check external link change only for non-direct */
-@@ -4377,10 +4404,11 @@ static u8 bnx2x_8073_common_init_phy(str
+@@ -4377,10 +4404,11 @@
                              ext_phy_addr[port],
                              MDIO_PMA_DEVAD,
                              MDIO_PMA_REG_ROM_VER1, &fw_ver1);
 -              if (fw_ver1 == 0) {
-+              if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
-                       DP(NETIF_MSG_LINK,
+-                      DP(NETIF_MSG_LINK,
 -                               "bnx2x_8073_common_init_phy port %x "
 -                               "fw Download failed\n", port);
++              if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
++                      DP(NETIF_MSG_LINK,
 +                               "bnx2x_8073_common_init_phy port %x:"
 +                               "Download failed. fw version = 0x%x\n",
 +                               port, fw_ver1);
                        return -EINVAL;
                }
  
-diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net/bnx2x_main.c
---- linux-2.6.27/drivers/net/bnx2x_main.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_main.c       2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_main.c
+--- a/drivers/net/bnx2x_main.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_main.c Wed May 06 16:56:24 2009 +0100
 @@ -1,6 +1,6 @@
  /* bnx2x_main.c: Broadcom Everest network driver.
   *
@@ -222778,7 +222570,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  #define BNX2X_BC_VER          0x040200
  
  /* Time in jiffies before concluding the transmitter is hung */
-@@ -71,7 +69,7 @@ static char version[] __devinitdata =
+@@ -71,7 +69,7 @@
        DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
  
  MODULE_AUTHOR("Eliezer Tamir");
@@ -222787,7 +222579,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  MODULE_LICENSE("GPL");
  MODULE_VERSION(DRV_MODULE_VERSION);
  
-@@ -95,6 +93,7 @@ MODULE_PARM_DESC(debug, "default debug m
+@@ -95,6 +93,7 @@
  module_param(use_multi, int, 0);
  MODULE_PARM_DESC(use_multi, "use per-CPU queues");
  #endif
@@ -222795,7 +222587,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
  enum bnx2x_board_type {
        BCM57710 = 0,
-@@ -649,15 +648,16 @@ static void bnx2x_int_disable(struct bnx
+@@ -649,15 +648,16 @@
                BNX2X_ERR("BUG! proper val not read from IGU!\n");
  }
  
@@ -222815,7 +222607,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        /* make sure all ISRs are done */
        if (msix) {
-@@ -670,7 +670,8 @@ static void bnx2x_int_disable_sync(struc
+@@ -670,7 +670,8 @@
                synchronize_irq(bp->pdev->irq);
  
        /* make sure sp_task is not running */
@@ -222825,10 +222617,11 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  }
  
  /* fast path */
-@@ -732,6 +733,24 @@ static u16 bnx2x_ack_int(struct bnx2x *b
+@@ -731,6 +732,24 @@
+ /*
   * fast path service functions
   */
++
 +static inline int bnx2x_has_tx_work(struct bnx2x_fastpath *fp)
 +{
 +      u16 tx_cons_sb;
@@ -222846,11 +222639,10 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
 +      return (fp->tx_pkt_prod != fp->tx_pkt_cons);
 +
 +}
-+
  /* free skb in the packet ring at pos idx
   * return idx of last bd freed
-  */
-@@ -971,7 +990,7 @@ static inline void bnx2x_free_rx_sge(str
+@@ -971,7 +990,7 @@
                return;
  
        pci_unmap_page(bp->pdev, pci_unmap_addr(sw_buf, mapping),
@@ -222859,7 +222651,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        __free_pages(page, PAGES_PER_SGE_SHIFT);
  
        sw_buf->page = NULL;
-@@ -999,7 +1018,7 @@ static inline int bnx2x_alloc_rx_sge(str
+@@ -999,7 +1018,7 @@
        if (unlikely(page == NULL))
                return -ENOMEM;
  
@@ -222868,7 +222660,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                               PCI_DMA_FROMDEVICE);
        if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
                __free_pages(page, PAGES_PER_SGE_SHIFT);
-@@ -1095,9 +1114,9 @@ static void bnx2x_update_sge_prod(struct
+@@ -1095,9 +1114,9 @@
                                  struct eth_fast_path_rx_cqe *fp_cqe)
  {
        struct bnx2x *bp = fp->bp;
@@ -222880,7 +222672,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        u16 last_max, last_elem, first_elem;
        u16 delta = 0;
        u16 i;
-@@ -1202,22 +1221,22 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1202,22 +1221,22 @@
                               u16 cqe_idx)
  {
        struct sw_rx_page *rx_pg, old_rx_pg;
@@ -222907,7 +222699,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                BNX2X_ERR("SGL length is too long: %d. CQE index is %d\n",
                          pages, cqe_idx);
                BNX2X_ERR("fp_cqe->pkt_len = %d  fp_cqe->len_on_bd = %d\n",
-@@ -1233,9 +1252,8 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1233,9 +1252,8 @@
  
                /* FW gives the indices of the SGE as if the ring is an array
                   (meaning that "next" element will consume 2 indices) */
@@ -222918,7 +222710,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                old_rx_pg = *rx_pg;
  
                /* If we fail to allocate a substitute page, we simply stop
-@@ -1248,7 +1266,7 @@ static int bnx2x_fill_frag_skb(struct bn
+@@ -1248,7 +1266,7 @@
  
                /* Unmap the page as we r going to pass it to the stack */
                pci_unmap_page(bp->pdev, pci_unmap_addr(&old_rx_pg, mapping),
@@ -222927,7 +222719,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
                /* Add one frag and update the appropriate fields in the skb */
                skb_fill_page_desc(skb, j, old_rx_pg.page, 0, frag_len);
-@@ -1281,6 +1299,13 @@ static void bnx2x_tpa_stop(struct bnx2x 
+@@ -1281,6 +1299,13 @@
        if (likely(new_skb)) {
                /* fix ip xsum and give it to the stack */
                /* (no need to map the new skb) */
@@ -222941,7 +222733,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
                prefetch(skb);
                prefetch(((char *)(skb)) + 128);
-@@ -1305,6 +1330,12 @@ static void bnx2x_tpa_stop(struct bnx2x 
+@@ -1305,6 +1330,12 @@
                        struct iphdr *iph;
  
                        iph = (struct iphdr *)skb->data;
@@ -222954,7 +222746,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                        iph->check = 0;
                        iph->check = ip_fast_csum((u8 *)iph, iph->ihl);
                }
-@@ -1312,9 +1343,8 @@ static void bnx2x_tpa_stop(struct bnx2x 
+@@ -1312,9 +1343,8 @@
                if (!bnx2x_fill_frag_skb(bp, fp, skb,
                                         &cqe->fast_path_cqe, cqe_idx)) {
  #ifdef BCM_VLAN
@@ -222966,7 +222758,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                                vlan_hwaccel_receive_skb(skb, bp->vlgrp,
                                                le16_to_cpu(cqe->fast_path_cqe.
                                                            vlan_tag));
-@@ -1355,11 +1385,23 @@ static inline void bnx2x_update_rx_prod(
+@@ -1355,10 +1385,22 @@
        rx_prods.cqe_prod = rx_comp_prod;
        rx_prods.sge_prod = rx_sge_prod;
  
@@ -222984,13 +222776,12 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                REG_WR(bp, BAR_TSTRORM_INTMEM +
                       TSTORM_RX_PRODS_OFFSET(BP_PORT(bp), FP_CL_ID(fp)) + i*4,
                       ((u32 *)&rx_prods)[i]);
-+      mmiowb(); /* keep prod updates ordered */
 +
++      mmiowb(); /* keep prod updates ordered */
        DP(NETIF_MSG_RX_STATUS,
           "Wrote: bd_prod %u  cqe_prod %u  sge_prod %u\n",
-          bd_prod, rx_comp_prod, rx_sge_prod);
-@@ -1415,7 +1457,7 @@ static int bnx2x_rx_int(struct bnx2x_fas
+@@ -1415,7 +1457,7 @@
                DP(NETIF_MSG_RX_STATUS, "CQE type %x  err %x  status %x"
                   "  queue %x  vlan %x  len %u\n", CQE_TYPE(cqe_fp_flags),
                   cqe_fp_flags, cqe->fast_path_cqe.status_flags,
@@ -222999,7 +222790,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                   le16_to_cpu(cqe->fast_path_cqe.vlan_tag),
                   le16_to_cpu(cqe->fast_path_cqe.pkt_len));
  
-@@ -1547,7 +1589,7 @@ reuse_rx:
+@@ -1547,7 +1589,7 @@
                }
  
  #ifdef BCM_VLAN
@@ -223008,7 +222799,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                    (le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) &
                     PARSING_FLAGS_VLAN))
                        vlan_hwaccel_receive_skb(skb, bp->vlgrp,
-@@ -1581,7 +1623,6 @@ next_cqe:
+@@ -1581,7 +1623,6 @@
        /* Update producers */
        bnx2x_update_rx_prod(bp, fp, bd_prod_fw, sw_comp_prod,
                             fp->rx_sge_prod);
@@ -223016,7 +222807,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        fp->rx_pkt += rx_pkt;
        fp->rx_calls++;
-@@ -1662,7 +1703,7 @@ static irqreturn_t bnx2x_interrupt(int i
+@@ -1662,7 +1703,7 @@
  
  
        if (unlikely(status & 0x1)) {
@@ -223025,7 +222816,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
                status &= ~0x1;
                if (!status)
-@@ -1889,7 +1930,8 @@ static int bnx2x_set_spio(struct bnx2x *
+@@ -1889,7 +1930,8 @@
  
  static void bnx2x_calc_fc_adv(struct bnx2x *bp)
  {
@@ -223035,7 +222826,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        case MDIO_COMBO_IEEE0_AUTO_NEG_ADV_PAUSE_NONE:
                bp->port.advertising &= ~(ADVERTISED_Asym_Pause |
                                          ADVERTISED_Pause);
-@@ -1959,10 +2001,11 @@ static u8 bnx2x_initial_phy_init(struct 
+@@ -1959,10 +2001,11 @@
                rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars);
                bnx2x_release_phy_lock(bp);
  
@@ -223048,7 +222839,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
                return rc;
        }
-@@ -2222,9 +2265,7 @@ static void bnx2x_link_attn(struct bnx2x
+@@ -2222,9 +2265,7 @@
        /* Make sure that we are synced with the current statistics */
        bnx2x_stats_handle(bp, STATS_EVENT_STOP);
  
@@ -223058,7 +222849,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        if (bp->link_vars.link_up) {
  
-@@ -2473,6 +2514,8 @@ static void bnx2x_attn_int_asserted(stru
+@@ -2473,6 +2514,8 @@
        if (asserted & ATTN_HARD_WIRED_MASK) {
                if (asserted & ATTN_NIG_FOR_FUNC) {
  
@@ -223067,7 +222858,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                        /* save nig interrupt mask */
                        bp->nig_mask = REG_RD(bp, nig_int_mask_addr);
                        REG_WR(bp, nig_int_mask_addr, 0);
-@@ -2528,8 +2571,10 @@ static void bnx2x_attn_int_asserted(stru
+@@ -2528,8 +2571,10 @@
        REG_WR(bp, hc_addr, asserted);
  
        /* now set back the mask */
@@ -223079,7 +222870,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  }
  
  static inline void bnx2x_attn_int_deasserted0(struct bnx2x *bp, u32 attn)
-@@ -2797,8 +2842,10 @@ static void bnx2x_attn_int_deasserted(st
+@@ -2797,8 +2842,10 @@
  static void bnx2x_attn_int(struct bnx2x *bp)
  {
        /* read local copy of bits */
@@ -223092,7 +222883,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        u32 attn_state = bp->attn_state;
  
        /* look for changed bits */
-@@ -2822,7 +2869,7 @@ static void bnx2x_attn_int(struct bnx2x 
+@@ -2822,7 +2869,7 @@
  
  static void bnx2x_sp_task(struct work_struct *work)
  {
@@ -223101,7 +222892,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        u16 status;
  
  
-@@ -2846,7 +2893,7 @@ static void bnx2x_sp_task(struct work_st
+@@ -2846,7 +2893,7 @@
        if (status & 0x2)
                bp->stats_pending = 0;
  
@@ -223110,7 +222901,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                     IGU_INT_NOP, 1);
        bnx2x_ack_sb(bp, DEF_SB_ID, USTORM_ID, le16_to_cpu(bp->def_u_idx),
                     IGU_INT_NOP, 1);
-@@ -2877,7 +2924,7 @@ static irqreturn_t bnx2x_msix_sp_int(int
+@@ -2877,7 +2924,7 @@
                return IRQ_HANDLED;
  #endif
  
@@ -223119,7 +222910,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        return IRQ_HANDLED;
  }
-@@ -2894,7 +2941,7 @@ static irqreturn_t bnx2x_msix_sp_int(int
+@@ -2894,7 +2941,7 @@
  #define ADD_64(s_hi, a_hi, s_lo, a_lo) \
        do { \
                s_lo += a_lo; \
@@ -223128,7 +222919,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        } while (0)
  
  /* difference = minuend - subtrahend */
-@@ -4498,7 +4545,7 @@ static void bnx2x_init_context(struct bn
+@@ -4498,7 +4545,7 @@
  
  static void bnx2x_init_ind_table(struct bnx2x *bp)
  {
@@ -223137,7 +222928,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        int i;
  
        if (!is_multi(bp))
-@@ -4507,10 +4554,8 @@ static void bnx2x_init_ind_table(struct 
+@@ -4507,10 +4554,8 @@
        DP(NETIF_MSG_IFUP, "Initializing indirection table\n");
        for (i = 0; i < TSTORM_INDIRECTION_TABLE_SIZE; i++)
                REG_WR8(bp, BAR_TSTRORM_INTMEM +
@@ -223150,7 +222941,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  }
  
  static void bnx2x_set_client_config(struct bnx2x *bp)
-@@ -4519,12 +4564,12 @@ static void bnx2x_set_client_config(stru
+@@ -4519,12 +4564,12 @@
        int port = BP_PORT(bp);
        int i;
  
@@ -223165,7 +222956,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                tstorm_client.config_flags |=
                                TSTORM_ETH_CLIENT_CONFIG_VLAN_REMOVAL_ENABLE;
                DP(NETIF_MSG_IFUP, "vlan removal enabled\n");
-@@ -4533,7 +4578,7 @@ static void bnx2x_set_client_config(stru
+@@ -4533,7 +4578,7 @@
  
        if (bp->flags & TPA_ENABLE_FLAG) {
                tstorm_client.max_sges_for_packet =
@@ -223174,7 +222965,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                tstorm_client.max_sges_for_packet =
                        ((tstorm_client.max_sges_for_packet +
                          PAGES_PER_SGE - 1) & (~(PAGES_PER_SGE - 1))) >>
-@@ -4716,10 +4761,11 @@ static void bnx2x_init_internal_func(str
+@@ -4716,10 +4761,11 @@
                         bp->e1hov);
        }
  
@@ -223190,7 +222981,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        for_each_queue(bp, i) {
                struct bnx2x_fastpath *fp = &bp->fp[i];
  
-@@ -4787,6 +4833,15 @@ static void bnx2x_nic_init(struct bnx2x 
+@@ -4787,6 +4833,15 @@
        bnx2x_init_context(bp);
        bnx2x_init_internal(bp, load_code);
        bnx2x_init_ind_table(bp);
@@ -223206,7 +222997,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        bnx2x_int_enable(bp);
  }
  
-@@ -5103,12 +5158,21 @@ static void enable_blocks_attention(stru
+@@ -5103,12 +5158,21 @@
  }
  
  
@@ -223228,7 +223019,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff);
        REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, 0xfffc);
  
-@@ -5136,7 +5200,6 @@ static int bnx2x_init_common(struct bnx2
+@@ -5136,7 +5200,6 @@
        REG_WR(bp, PXP2_REG_RQ_SRC_ENDIAN_M, 1);
        REG_WR(bp, PXP2_REG_RQ_CDU_ENDIAN_M, 1);
        REG_WR(bp, PXP2_REG_RQ_DBG_ENDIAN_M, 1);
@@ -223236,7 +223027,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
  /*    REG_WR(bp, PXP2_REG_RD_PBF_SWAP_MODE, 1); */
        REG_WR(bp, PXP2_REG_RD_QM_SWAP_MODE, 1);
-@@ -5214,6 +5277,7 @@ static int bnx2x_init_common(struct bnx2
+@@ -5214,6 +5277,7 @@
        }
  
        bnx2x_init_block(bp, PRS_COMMON_START, PRS_COMMON_END);
@@ -223244,14 +223035,15 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        /* set NIC mode */
        REG_WR(bp, PRS_REG_NIC_MODE, 1);
        if (CHIP_IS_E1H(bp))
-@@ -6086,11 +6150,11 @@ static void bnx2x_netif_start(struct bnx
+@@ -6086,11 +6150,11 @@
        }
  }
  
 -static void bnx2x_netif_stop(struct bnx2x *bp)
-+static void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw)
- {
+-{
 -      bnx2x_int_disable_sync(bp);
++static void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw)
++{
 +      bnx2x_int_disable_sync(bp, disable_hw);
 +      bnx2x_napi_disable(bp);
        if (netif_running(bp->dev)) {
@@ -223259,7 +223051,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                netif_tx_disable(bp->dev);
                bp->dev->trans_start = jiffies; /* prevent tx timeout */
        }
-@@ -6110,7 +6174,7 @@ static void bnx2x_set_mac_addr_e1(struct
+@@ -6110,7 +6174,7 @@
         * multicast 64-127:port0 128-191:port1
         */
        config->hdr.length_6b = 2;
@@ -223268,7 +223060,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        config->hdr.client_id = BP_CL_ID(bp);
        config->hdr.reserved1 = 0;
  
-@@ -6274,7 +6338,7 @@ static void bnx2x_set_rx_mode(struct net
+@@ -6274,13 +6338,84 @@
  static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
  {
        u32 load_code;
@@ -223277,60 +223069,24 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  #ifdef BNX2X_STOP_ON_ERROR
        if (unlikely(bp->panic))
                return -EPERM;
-@@ -6282,48 +6346,6 @@ static int bnx2x_nic_load(struct bnx2x *
+ #endif
  
        bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
--      /* Send LOAD_REQUEST command to MCP
--         Returns the type of LOAD command:
--         if it is the first port to be initialized
--         common blocks should be initialized, otherwise - not
--      */
--      if (!BP_NOMCP(bp)) {
--              load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
--              if (!load_code) {
--                      BNX2X_ERR("MCP response failure, aborting\n");
--                      return -EBUSY;
--              }
--              if (load_code == FW_MSG_CODE_DRV_LOAD_REFUSED)
--                      return -EBUSY; /* other port in diagnostic mode */
--
--      } else {
--              int port = BP_PORT(bp);
--
--              DP(NETIF_MSG_IFUP, "NO MCP load counts before us %d, %d, %d\n",
--                 load_count[0], load_count[1], load_count[2]);
--              load_count[0]++;
--              load_count[1 + port]++;
--              DP(NETIF_MSG_IFUP, "NO MCP new load counts       %d, %d, %d\n",
--                 load_count[0], load_count[1], load_count[2]);
--              if (load_count[0] == 1)
--                      load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
--              else if (load_count[1 + port] == 1)
--                      load_code = FW_MSG_CODE_DRV_LOAD_PORT;
--              else
--                      load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
--      }
--
--      if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
--          (load_code == FW_MSG_CODE_DRV_LOAD_PORT))
--              bp->port.pmf = 1;
--      else
--              bp->port.pmf = 0;
--      DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
--
--      /* if we can't use MSI-X we only need one fp,
--       * so try to enable MSI-X with the requested number of fp's
--       * and fallback to inta with one fp
--       */
-       if (use_inta) {
-               bp->num_queues = 1;
-@@ -6338,7 +6360,15 @@ static int bnx2x_nic_load(struct bnx2x *
-               else
-                       bp->num_queues = 1;
--              if (bnx2x_enable_msix(bp)) {
++
++      if (use_inta) {
++              bp->num_queues = 1;
++
++      } else {
++              if ((use_multi > 1) && (use_multi <= BP_MAX_QUEUES(bp)))
++                      /* user requested number */
++                      bp->num_queues = use_multi;
++
++              else if (use_multi)
++                      bp->num_queues = min_t(u32, num_online_cpus(),
++                                             BP_MAX_QUEUES(bp));
++              else
++                      bp->num_queues = 1;
++
 +              DP(NETIF_MSG_IFUP,
 +                 "set number of queues to %d\n", bp->num_queues);
 +
@@ -223340,22 +223096,21 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
 +               */
 +              rc = bnx2x_enable_msix(bp);
 +              if (rc) {
-                       /* failed to enable MSI-X */
-                       bp->num_queues = 1;
-                       if (use_multi)
-@@ -6346,8 +6376,6 @@ static int bnx2x_nic_load(struct bnx2x *
-                                         " to enable MSI-X\n");
-               }
-       }
--      DP(NETIF_MSG_IFUP,
--         "set number of queues to %d\n", bp->num_queues);
-       if (bnx2x_alloc_mem(bp))
-               return -ENOMEM;
-@@ -6356,30 +6384,85 @@ static int bnx2x_nic_load(struct bnx2x *
-               bnx2x_fp(bp, i, disable_tpa) =
-                                       ((bp->flags & TPA_ENABLE_FLAG) == 0);
++                      /* failed to enable MSI-X */
++                      bp->num_queues = 1;
++                      if (use_multi)
++                              BNX2X_ERR("Multi requested but failed"
++                                        " to enable MSI-X\n");
++              }
++      }
++
++      if (bnx2x_alloc_mem(bp))
++              return -ENOMEM;
++
++      for_each_queue(bp, i)
++              bnx2x_fp(bp, i, disable_tpa) =
++                                      ((bp->flags & TPA_ENABLE_FLAG) == 0);
++
 +      for_each_queue(bp, i)
 +              netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
 +                             bnx2x_poll, 128);
@@ -223373,37 +223128,32 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
 +#endif
 +      bnx2x_napi_enable(bp);
 +
-       if (bp->flags & USING_MSIX_FLAG) {
-               rc = bnx2x_req_msix_irqs(bp);
-               if (rc) {
-                       pci_disable_msix(bp->pdev);
--                      goto load_error;
++      if (bp->flags & USING_MSIX_FLAG) {
++              rc = bnx2x_req_msix_irqs(bp);
++              if (rc) {
++                      pci_disable_msix(bp->pdev);
 +                      goto load_error1;
-               }
++              }
 +              printk(KERN_INFO PFX "%s: using MSI-X\n", bp->dev->name);
-       } else {
-               bnx2x_ack_int(bp);
-               rc = bnx2x_req_irq(bp);
-               if (rc) {
--                      BNX2X_ERR("IRQ request failed, aborting\n");
--                      goto load_error;
++      } else {
++              bnx2x_ack_int(bp);
++              rc = bnx2x_req_irq(bp);
++              if (rc) {
 +                      BNX2X_ERR("IRQ request failed  rc %d, aborting\n", rc);
 +                      goto load_error1;
-               }
-       }
++              }
++      }
  
--      for_each_queue(bp, i)
--              netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
--                             bnx2x_poll, 128);
-+      /* Send LOAD_REQUEST command to MCP
-+         Returns the type of LOAD command:
-+         if it is the first port to be initialized
-+         common blocks should be initialized, otherwise - not
-+      */
-+      if (!BP_NOMCP(bp)) {
-+              load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
-+              if (!load_code) {
-+                      BNX2X_ERR("MCP response failure, aborting\n");
+       /* Send LOAD_REQUEST command to MCP
+          Returns the type of LOAD command:
+@@ -6291,10 +6426,13 @@
+               load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ);
+               if (!load_code) {
+                       BNX2X_ERR("MCP response failure, aborting\n");
+-                      return -EBUSY;
+-              }
+-              if (load_code == FW_MSG_CODE_DRV_LOAD_REFUSED)
+-                      return -EBUSY; /* other port in diagnostic mode */
 +                      rc = -EBUSY;
 +                      goto load_error2;
 +              }
@@ -223411,31 +223161,68 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
 +                      rc = -EBUSY; /* other port in diagnostic mode */
 +                      goto load_error2;
 +              }
-+
-+      } else {
-+              int port = BP_PORT(bp);
-+
-+              DP(NETIF_MSG_IFUP, "NO MCP load counts before us %d, %d, %d\n",
-+                 load_count[0], load_count[1], load_count[2]);
-+              load_count[0]++;
-+              load_count[1 + port]++;
-+              DP(NETIF_MSG_IFUP, "NO MCP new load counts       %d, %d, %d\n",
-+                 load_count[0], load_count[1], load_count[2]);
-+              if (load_count[0] == 1)
-+                      load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
-+              else if (load_count[1 + port] == 1)
-+                      load_code = FW_MSG_CODE_DRV_LOAD_PORT;
-+              else
-+                      load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
-+      }
-+
-+      if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
-+          (load_code == FW_MSG_CODE_DRV_LOAD_PORT))
-+              bp->port.pmf = 1;
-+      else
-+              bp->port.pmf = 0;
-+      DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
  
+       } else {
+               int port = BP_PORT(bp);
+@@ -6320,66 +6458,11 @@
+               bp->port.pmf = 0;
+       DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
+-      /* if we can't use MSI-X we only need one fp,
+-       * so try to enable MSI-X with the requested number of fp's
+-       * and fallback to inta with one fp
+-       */
+-      if (use_inta) {
+-              bp->num_queues = 1;
+-
+-      } else {
+-              if ((use_multi > 1) && (use_multi <= BP_MAX_QUEUES(bp)))
+-                      /* user requested number */
+-                      bp->num_queues = use_multi;
+-
+-              else if (use_multi)
+-                      bp->num_queues = min_t(u32, num_online_cpus(),
+-                                             BP_MAX_QUEUES(bp));
+-              else
+-                      bp->num_queues = 1;
+-
+-              if (bnx2x_enable_msix(bp)) {
+-                      /* failed to enable MSI-X */
+-                      bp->num_queues = 1;
+-                      if (use_multi)
+-                              BNX2X_ERR("Multi requested but failed"
+-                                        " to enable MSI-X\n");
+-              }
+-      }
+-      DP(NETIF_MSG_IFUP,
+-         "set number of queues to %d\n", bp->num_queues);
+-
+-      if (bnx2x_alloc_mem(bp))
+-              return -ENOMEM;
+-
+-      for_each_queue(bp, i)
+-              bnx2x_fp(bp, i, disable_tpa) =
+-                                      ((bp->flags & TPA_ENABLE_FLAG) == 0);
+-
+-      if (bp->flags & USING_MSIX_FLAG) {
+-              rc = bnx2x_req_msix_irqs(bp);
+-              if (rc) {
+-                      pci_disable_msix(bp->pdev);
+-                      goto load_error;
+-              }
+-      } else {
+-              bnx2x_ack_int(bp);
+-              rc = bnx2x_req_irq(bp);
+-              if (rc) {
+-                      BNX2X_ERR("IRQ request failed, aborting\n");
+-                      goto load_error;
+-              }
+-      }
+-
+-      for_each_queue(bp, i)
+-              netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
+-                             bnx2x_poll, 128);
+-
        /* Initialize HW */
        rc = bnx2x_init_hw(bp, load_code);
        if (rc) {
@@ -223445,26 +223232,28 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        }
  
        /* Setup NIC internals and enable interrupts */
-@@ -6391,25 +6474,16 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6391,25 +6474,16 @@
                if (!load_code) {
                        BNX2X_ERR("MCP response failure, aborting\n");
                        rc = -EBUSY;
 -                      goto load_rings_free;
+-              }
+-      }
+-
+-      bnx2x_stats_init(bp);
 +                      goto load_error3;
-               }
-       }
++              }
++      }
  
--      bnx2x_stats_init(bp);
--
        bp->state = BNX2X_STATE_OPENING_WAIT4_PORT;
+-
 -      /* Enable Rx interrupt handling before sending the ramrod
 -         as it's completed on Rx FP queue */
 -      bnx2x_napi_enable(bp);
 -
 -      /* Enable interrupt handling */
 -      atomic_set(&bp->intr_sem, 0);
--
        rc = bnx2x_setup_leading(bp);
        if (rc) {
                BNX2X_ERR("Setup leading failed!\n");
@@ -223473,7 +223262,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        }
  
        if (CHIP_IS_E1H(bp))
-@@ -6422,7 +6496,7 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6422,7 +6496,7 @@
                for_each_nondefault_queue(bp, i) {
                        rc = bnx2x_setup_multi(bp, i);
                        if (rc)
@@ -223482,7 +223271,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                }
  
        if (CHIP_IS_E1(bp))
-@@ -6438,18 +6512,18 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6438,18 +6512,18 @@
        case LOAD_NORMAL:
                /* Tx queue should be only reenabled */
                netif_wake_queue(bp->dev);
@@ -223504,7 +223293,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                bnx2x_set_rx_mode(bp->dev);
                bp->state = BNX2X_STATE_DIAG;
                break;
-@@ -6467,18 +6541,24 @@ static int bnx2x_nic_load(struct bnx2x *
+@@ -6467,18 +6541,24 @@
  
        return 0;
  
@@ -223535,7 +223324,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        bnx2x_free_mem(bp);
  
        /* TBD we really need to reset the chip
-@@ -6552,6 +6632,7 @@ static int bnx2x_stop_leading(struct bnx
+@@ -6552,6 +6632,7 @@
                }
                cnt--;
                msleep(1);
@@ -223543,7 +223332,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        }
        bp->state = BNX2X_STATE_CLOSING_WAIT4_UNLOAD;
        bp->fp[0].state = BNX2X_FP_STATE_CLOSED;
-@@ -6603,14 +6684,6 @@ static void bnx2x_reset_port(struct bnx2
+@@ -6603,14 +6684,6 @@
        /* TODO: Close Doorbell port? */
  }
  
@@ -223558,7 +223347,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  static void bnx2x_reset_chip(struct bnx2x *bp, u32 reset_code)
  {
        DP(BNX2X_MSG_MCP, "function %d  reset_code %x\n",
-@@ -6650,21 +6723,23 @@ static int bnx2x_nic_unload(struct bnx2x
+@@ -6650,21 +6723,23 @@
        bp->rx_mode = BNX2X_RX_MODE_NONE;
        bnx2x_set_storm_rx_mode(bp);
  
@@ -223586,17 +223375,17 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
                        bnx2x_tx_int(fp, 1000);
                        if (!cnt) {
-@@ -6685,9 +6760,6 @@ static int bnx2x_nic_unload(struct bnx2x
+@@ -6684,9 +6759,6 @@
+       }
        /* Give HW time to discard old tx messages */
        msleep(1);
+-
 -      /* Release IRQs */
 -      bnx2x_free_irq(bp);
--
        if (CHIP_IS_E1(bp)) {
                struct mac_configuration_cmd *config =
-                                               bnx2x_sp(bp, mcast_config);
-@@ -6790,11 +6862,14 @@ unload_error:
+@@ -6790,11 +6862,14 @@
        /* Report UNLOAD_DONE to MCP */
        if (!BP_NOMCP(bp))
                bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE);
@@ -223611,7 +223400,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        bnx2x_free_mem(bp);
  
        bp->state = BNX2X_STATE_CLOSED;
-@@ -6847,10 +6922,6 @@ static void __devinit bnx2x_undi_unload(
+@@ -6847,10 +6922,6 @@
                 */
                bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
                val = REG_RD(bp, DORQ_REG_NORM_CID_OFST);
@@ -223622,7 +223411,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                if (val == 0x7) {
                        u32 reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS;
                        /* save our func */
-@@ -6858,6 +6929,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6858,6 +6929,9 @@
                        u32 swap_en;
                        u32 swap_val;
  
@@ -223632,17 +223421,17 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                        BNX2X_DEV_INFO("UNDI is active! reset device\n");
  
                        /* try unload UNDI on port 0 */
-@@ -6883,6 +6957,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6882,6 +6956,9 @@
                                bnx2x_fw_command(bp, reset_code);
                        }
++
 +                      /* now it's safe to release the lock */
 +                      bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
-+
                        REG_WR(bp, (BP_PORT(bp) ? HC_REG_CONFIG_1 :
                                    HC_REG_CONFIG_0), 0x1000);
-@@ -6927,7 +7004,9 @@ static void __devinit bnx2x_undi_unload(
+@@ -6927,7 +7004,9 @@
                        bp->fw_seq =
                               (SHMEM_RD(bp, func_mb[bp->func].drv_mb_header) &
                                DRV_MSG_SEQ_NUMBER_MASK);
@@ -223653,7 +223442,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        }
  }
  
-@@ -6944,7 +7023,7 @@ static void __devinit bnx2x_get_common_h
+@@ -6944,7 +7023,7 @@
        id |= ((val & 0xf) << 12);
        val = REG_RD(bp, MISC_REG_CHIP_METAL);
        id |= ((val & 0xff) << 4);
@@ -223662,7 +223451,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        id |= (val & 0xf);
        bp->common.chip_id = id;
        bp->link_params.chip_id = bp->common.chip_id;
-@@ -7501,7 +7580,7 @@ static int __devinit bnx2x_init_bp(struc
+@@ -7501,7 +7580,7 @@
  
        mutex_init(&bp->port.phy_mutex);
  
@@ -223671,7 +223460,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        INIT_WORK(&bp->reset_task, bnx2x_reset_task);
  
        rc = bnx2x_get_hwinfo(bp);
-@@ -8076,6 +8155,9 @@ static int bnx2x_get_eeprom(struct net_d
+@@ -8076,6 +8155,9 @@
        struct bnx2x *bp = netdev_priv(dev);
        int rc;
  
@@ -223681,17 +223470,17 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n"
           DP_LEVEL "  magic 0x%x  offset 0x%x (%d)  len 0x%x (%d)\n",
           eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset,
-@@ -8243,6 +8325,9 @@ static int bnx2x_set_eeprom(struct net_d
+@@ -8242,6 +8324,9 @@
+ {
        struct bnx2x *bp = netdev_priv(dev);
        int rc;
++
 +      if (!netif_running(dev))
 +              return -EAGAIN;
-+
        DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n"
           DP_LEVEL "  magic 0x%x  offset 0x%x (%d)  len 0x%x (%d)\n",
-          eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset,
-@@ -8675,18 +8760,17 @@ static int bnx2x_run_loopback(struct bnx
+@@ -8675,18 +8760,17 @@
  
        if (loopback_mode == BNX2X_MAC_LOOPBACK) {
                bp->link_params.loopback_mode = LOOPBACK_BMAC;
@@ -223715,7 +223504,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        } else
                return -EINVAL;
  
-@@ -8724,6 +8808,8 @@ static int bnx2x_run_loopback(struct bnx
+@@ -8724,6 +8808,8 @@
        tx_bd->general_data = ((UNICAST_ADDRESS <<
                                ETH_TX_BD_ETH_ADDR_TYPE_SHIFT) | 1);
  
@@ -223724,7 +223513,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        fp->hw_tx_prods->bds_prod =
                cpu_to_le16(le16_to_cpu(fp->hw_tx_prods->bds_prod) + 1);
        mb(); /* FW restriction: must not reorder writing nbd and packets */
-@@ -8776,7 +8862,6 @@ test_loopback_rx_exit:
+@@ -8776,7 +8862,6 @@
        /* Update producers */
        bnx2x_update_rx_prod(bp, fp, fp->rx_bd_prod, fp->rx_comp_prod,
                             fp->rx_sge_prod);
@@ -223732,7 +223521,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
  test_loopback_exit:
        bp->link_params.loopback_mode = LOOPBACK_NONE;
-@@ -8791,7 +8876,8 @@ static int bnx2x_test_loopback(struct bn
+@@ -8791,7 +8876,8 @@
        if (!netif_running(bp->dev))
                return BNX2X_LOOPBACK_FAILED;
  
@@ -223742,7 +223531,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        if (bnx2x_run_loopback(bp, BNX2X_MAC_LOOPBACK, link_up)) {
                DP(NETIF_MSG_PROBE, "MAC loopback failed\n");
-@@ -8803,6 +8889,7 @@ static int bnx2x_test_loopback(struct bn
+@@ -8803,6 +8889,7 @@
                rc |= BNX2X_PHY_LOOPBACK_FAILED;
        }
  
@@ -223750,7 +223539,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        bnx2x_netif_start(bp);
  
        return rc;
-@@ -8876,7 +8963,10 @@ static int bnx2x_test_intr(struct bnx2x 
+@@ -8876,7 +8963,10 @@
                return -ENODEV;
  
        config->hdr.length_6b = 0;
@@ -223762,7 +223551,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        config->hdr.client_id = BP_CL_ID(bp);
        config->hdr.reserved1 = 0;
  
-@@ -9241,6 +9331,18 @@ static int bnx2x_set_power_state(struct 
+@@ -9241,6 +9331,18 @@
        return 0;
  }
  
@@ -223781,7 +223570,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  /*
   * net_device service functions
   */
-@@ -9251,7 +9353,6 @@ static int bnx2x_poll(struct napi_struct
+@@ -9251,7 +9353,6 @@
                                                 napi);
        struct bnx2x *bp = fp->bp;
        int work_done = 0;
@@ -223789,7 +223578,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
  #ifdef BNX2X_STOP_ON_ERROR
        if (unlikely(bp->panic))
-@@ -9264,19 +9365,12 @@ static int bnx2x_poll(struct napi_struct
+@@ -9264,19 +9365,12 @@
  
        bnx2x_update_fpsb_idx(fp);
  
@@ -223811,7 +223600,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        /* must not complete if we consumed full budget */
        if ((work_done < budget) && !BNX2X_HAS_WORK(fp)) {
-@@ -9387,6 +9481,7 @@ static inline u32 bnx2x_xmit_type(struct
+@@ -9387,6 +9481,7 @@
        return rc;
  }
  
@@ -223819,7 +223608,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  /* check if packet requires linearization (packet is too fragmented) */
  static int bnx2x_pkt_req_lin(struct bnx2x *bp, struct sk_buff *skb,
                             u32 xmit_type)
-@@ -9464,6 +9559,7 @@ exit_lbl:
+@@ -9464,6 +9559,7 @@
  
        return to_copy;
  }
@@ -223827,7 +223616,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
  /* called with netif_tx_lock
   * bnx2x_tx_int() runs without netif_tx_lock unless it needs to call
-@@ -9504,6 +9600,7 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9504,6 +9600,7 @@
           skb->ip_summed, skb->protocol, ipv6_hdr(skb)->nexthdr,
           ip_hdr(skb)->protocol, skb_shinfo(skb)->gso_type, xmit_type);
  
@@ -223835,7 +223624,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        /* First, check if we need to linearize the skb
           (due to FW restrictions) */
        if (bnx2x_pkt_req_lin(bp, skb, xmit_type)) {
-@@ -9516,6 +9613,7 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9516,6 +9613,7 @@
                        return NETDEV_TX_OK;
                }
        }
@@ -223843,7 +223632,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        /*
        Please read carefully. First we use one BD which we mark as start,
-@@ -9547,11 +9645,14 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9547,11 +9645,14 @@
           "sending pkt %u @%p  next_idx %u  bd %u @%p\n",
           pkt_prod, tx_buf, fp->tx_pkt_prod, bd_prod, tx_bd);
  
@@ -223859,7 +223648,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                tx_bd->vlan = cpu_to_le16(pkt_prod);
  
        if (xmit_type) {
-@@ -9703,6 +9804,15 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9703,6 +9804,15 @@
  
        DP(NETIF_MSG_TX_QUEUED, "doorbell: nbd %d  bd %u\n", nbd, bd_prod);
  
@@ -223875,7 +223664,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        fp->hw_tx_prods->bds_prod =
                cpu_to_le16(le16_to_cpu(fp->hw_tx_prods->bds_prod) + nbd);
        mb(); /* FW restriction: must not reorder writing nbd and packets */
-@@ -9716,6 +9826,9 @@ static int bnx2x_start_xmit(struct sk_bu
+@@ -9716,6 +9826,9 @@
        dev->trans_start = jiffies;
  
        if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
@@ -223885,16 +223674,16 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                netif_stop_queue(dev);
                bp->eth_stats.driver_xoff++;
                if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
-@@ -9731,6 +9844,8 @@ static int bnx2x_open(struct net_device 
+@@ -9730,6 +9843,8 @@
+ static int bnx2x_open(struct net_device *dev)
  {
        struct bnx2x *bp = netdev_priv(dev);
-+      netif_carrier_off(dev);
 +
++      netif_carrier_off(dev);
        bnx2x_set_power_state(bp, PCI_D0);
  
-       return bnx2x_nic_load(bp, LOAD_OPEN);
-@@ -9814,7 +9929,7 @@ static void bnx2x_set_rx_mode(struct net
+@@ -9814,7 +9929,7 @@
                                for (; i < old; i++) {
                                        if (CAM_IS_INVALID(config->
                                                           config_table[i])) {
@@ -223903,7 +223692,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
                                                break;
                                        }
                                        /* invalidate */
-@@ -9988,6 +10103,16 @@ static void bnx2x_vlan_rx_register(struc
+@@ -9988,6 +10103,16 @@
        struct bnx2x *bp = netdev_priv(dev);
  
        bp->vlgrp = vlgrp;
@@ -223920,7 +223709,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        if (netif_running(dev))
                bnx2x_set_client_config(bp);
  }
-@@ -10139,6 +10264,7 @@ static int __devinit bnx2x_init_dev(stru
+@@ -10139,6 +10264,7 @@
                dev->features |= NETIF_F_HIGHDMA;
  #ifdef BCM_VLAN
        dev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
@@ -223928,7 +223717,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  #endif
        dev->features |= (NETIF_F_TSO | NETIF_F_TSO_ECN);
        dev->features |= NETIF_F_TSO6;
-@@ -10203,8 +10329,6 @@ static int __devinit bnx2x_init_one(stru
+@@ -10203,8 +10329,6 @@
                return -ENOMEM;
        }
  
@@ -223937,30 +223726,31 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
        bp = netdev_priv(dev);
        bp->msglevel = debug;
  
-@@ -10214,17 +10338,15 @@ static int __devinit bnx2x_init_one(stru
+@@ -10214,17 +10338,15 @@
                return rc;
        }
  
--      rc = register_netdev(dev);
--      if (rc) {
--              dev_err(&pdev->dev, "Cannot register net device\n");
--              goto init_one_exit;
--      }
--
-       pci_set_drvdata(pdev, dev);
-       rc = bnx2x_init_bp(bp);
++      pci_set_drvdata(pdev, dev);
++
++      rc = bnx2x_init_bp(bp);
 +      if (rc)
 +              goto init_one_exit;
 +
-+      rc = register_netdev(dev);
+       rc = register_netdev(dev);
        if (rc) {
+               dev_err(&pdev->dev, "Cannot register net device\n");
+-              goto init_one_exit;
+-      }
+-
+-      pci_set_drvdata(pdev, dev);
+-
+-      rc = bnx2x_init_bp(bp);
+-      if (rc) {
 -              unregister_netdev(dev);
-+              dev_err(&pdev->dev, "Cannot register net device\n");
                goto init_one_exit;
        }
  
-@@ -10346,6 +10468,76 @@ static int bnx2x_resume(struct pci_dev *
+@@ -10346,6 +10468,76 @@
        return rc;
  }
  
@@ -224037,7 +223827,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  /**
   * bnx2x_io_error_detected - called when PCI error is detected
   * @pdev: Pointer to PCI device
-@@ -10365,7 +10557,7 @@ static pci_ers_result_t bnx2x_io_error_d
+@@ -10365,7 +10557,7 @@
        netif_device_detach(dev);
  
        if (netif_running(dev))
@@ -224046,7 +223836,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        pci_disable_device(pdev);
  
-@@ -10420,8 +10612,10 @@ static void bnx2x_io_resume(struct pci_d
+@@ -10420,8 +10612,10 @@
  
        rtnl_lock();
  
@@ -224058,7 +223848,7 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  
        netif_device_attach(dev);
  
-@@ -10446,12 +10640,20 @@ static struct pci_driver bnx2x_pci_drive
+@@ -10446,12 +10640,20 @@
  
  static int __init bnx2x_init(void)
  {
@@ -224079,9 +223869,9 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_main.c linux-2.6.27.19-5.1/drivers/net
  }
  
  module_init(bnx2x_init);
-diff -purN linux-2.6.27/drivers/net/bnx2x_reg.h linux-2.6.27.19-5.1/drivers/net/bnx2x_reg.h
---- linux-2.6.27/drivers/net/bnx2x_reg.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bnx2x_reg.h        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/bnx2x_reg.h
+--- a/drivers/net/bnx2x_reg.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bnx2x_reg.h  Wed May 06 16:56:24 2009 +0100
 @@ -1,6 +1,6 @@
  /* bnx2x_reg.h: Broadcom Everest network driver.
   *
@@ -224090,10 +223880,10 @@ diff -purN linux-2.6.27/drivers/net/bnx2x_reg.h linux-2.6.27.19-5.1/drivers/net/
   *
   * 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
-diff -purN linux-2.6.27/drivers/net/bonding/bond_alb.c linux-2.6.27.19-5.1/drivers/net/bonding/bond_alb.c
---- linux-2.6.27/drivers/net/bonding/bond_alb.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bonding/bond_alb.c 2009-03-25 16:11:04.000000000 +0000
-@@ -167,11 +167,14 @@ static void tlb_clear_slave(struct bondi
+diff -r 9608d5473017 drivers/net/bonding/bond_alb.c
+--- a/drivers/net/bonding/bond_alb.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bonding/bond_alb.c   Wed May 06 16:56:24 2009 +0100
+@@ -167,11 +167,14 @@
        /* clear slave from tx_hashtbl */
        tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
  
@@ -224113,10 +223903,10 @@ diff -purN linux-2.6.27/drivers/net/bonding/bond_alb.c linux-2.6.27.19-5.1/drive
        }
  
        tlb_init_slave(slave);
-diff -purN linux-2.6.27/drivers/net/bonding/bond_main.c linux-2.6.27.19-5.1/drivers/net/bonding/bond_main.c
---- linux-2.6.27/drivers/net/bonding/bond_main.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/bonding/bond_main.c        2009-03-25 16:11:04.000000000 +0000
-@@ -2370,6 +2370,9 @@ static void bond_miimon_commit(struct bo
+diff -r 9608d5473017 drivers/net/bonding/bond_main.c
+--- a/drivers/net/bonding/bond_main.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/bonding/bond_main.c  Wed May 06 16:56:24 2009 +0100
+@@ -2370,6 +2370,9 @@
                        continue;
  
                case BOND_LINK_DOWN:
@@ -224126,10 +223916,10 @@ diff -purN linux-2.6.27/drivers/net/bonding/bond_main.c linux-2.6.27.19-5.1/driv
                        slave->link = BOND_LINK_DOWN;
  
                        if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||
-diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/net/cxgb3/adapter.h
---- linux-2.6.27/drivers/net/cxgb3/adapter.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/adapter.h    2009-03-25 16:11:05.000000000 +0000
-@@ -54,7 +54,6 @@ struct port_info {
+diff -r 9608d5473017 drivers/net/cxgb3/adapter.h
+--- a/drivers/net/cxgb3/adapter.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/adapter.h      Wed May 06 16:56:24 2009 +0100
+@@ -54,7 +54,6 @@
        struct adapter *adapter;
        struct vlan_group *vlan_grp;
        struct sge_qset *qs;
@@ -224137,7 +223927,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/
        u8 port_id;
        u8 rx_csum_offload;
        u8 nqsets;
-@@ -64,6 +63,7 @@ struct port_info {
+@@ -64,6 +63,7 @@
        struct link_config link_config;
        struct net_device_stats netstats;
        int activity;
@@ -224145,7 +223935,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/
  };
  
  enum {                                /* adapter flags */
-@@ -241,6 +241,7 @@ struct adapter {
+@@ -241,6 +241,7 @@
        unsigned int check_task_cnt;
        struct delayed_work adap_check_task;
        struct work_struct ext_intr_handler_task;
@@ -224153,7 +223943,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/
  
        struct dentry *debugfs_root;
  
-@@ -282,9 +283,11 @@ int t3_offload_tx(struct t3cdev *tdev, s
+@@ -282,9 +283,11 @@
  void t3_os_ext_intr_handler(struct adapter *adapter);
  void t3_os_link_changed(struct adapter *adapter, int port_id, int link_status,
                        int speed, int duplex, int fc);
@@ -224165,10 +223955,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/adapter.h linux-2.6.27.19-5.1/drivers/
  void t3_free_sge_resources(struct adapter *adap);
  void t3_sge_err_intr_handler(struct adapter *adapter);
  irq_handler_t t3_intr_handler(struct adapter *adap, int polling);
-diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/net/cxgb3/ael1002.c
---- linux-2.6.27/drivers/net/cxgb3/ael1002.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/ael1002.c    2009-03-25 16:11:05.000000000 +0000
-@@ -33,17 +33,57 @@
+diff -r 9608d5473017 drivers/net/cxgb3/ael1002.c
+--- a/drivers/net/cxgb3/ael1002.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/ael1002.c      Wed May 06 16:56:24 2009 +0100
+@@ -33,16 +33,56 @@
  #include "regs.h"
  
  enum {
@@ -224208,7 +223998,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      unsigned short clear_bits;
 +      unsigned short set_bits;
  };
++
 +static int set_phy_regs(struct cphy *phy, const struct reg_val *rv)
 +{
 +      int err;
@@ -224224,11 +224014,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      }
 +      return err;
 +}
-+
  static void ael100x_txon(struct cphy *phy)
  {
-       int tx_on_gpio = phy->addr == 0 ? F_GPIO7_OUT_VAL : F_GPIO2_OUT_VAL;
-@@ -84,23 +124,23 @@ static int ael1002_intr_noop(struct cphy
+@@ -84,23 +124,23 @@
        return 0;
  }
  
@@ -224264,7 +224053,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
        }
        if (speed)
                *speed = SPEED_10000;
-@@ -115,15 +155,18 @@ static struct cphy_ops ael1002_ops = {
+@@ -115,47 +155,23 @@
        .intr_disable = ael1002_intr_noop,
        .intr_clear = ael1002_intr_noop,
        .intr_handler = ael1002_intr_noop,
@@ -224287,42 +224076,70 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
  }
  
  static int ael1006_reset(struct cphy *phy, int wait)
-@@ -131,72 +174,985 @@ static int ael1006_reset(struct cphy *ph
+ {
        return t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait);
+-}
+-
+-static int ael1006_intr_enable(struct cphy *phy)
+-{
+-      return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
+-}
+-
+-static int ael1006_intr_disable(struct cphy *phy)
+-{
+-      return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
+-}
+-
+-static int ael1006_intr_clear(struct cphy *phy)
+-{
+-      u32 val;
+-
+-      return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
+-}
+-
+-static int ael1006_intr_handler(struct cphy *phy)
+-{
+-      unsigned int status;
+-      int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
+-
+-      if (err)
+-              return err;
+-      return (status & 1) ? cphy_cause_link_change : 0;
  }
  
--static int ael1006_intr_enable(struct cphy *phy)
-+static int ael1006_power_down(struct cphy *phy, int enable)
-+{
-+      return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
-+                                 BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
-+}
-+
-+static struct cphy_ops ael1006_ops = {
-+      .reset = ael1006_reset,
+ static int ael1006_power_down(struct cphy *phy, int enable)
+@@ -166,37 +182,977 @@
+ static struct cphy_ops ael1006_ops = {
+       .reset = ael1006_reset,
+-      .intr_enable = ael1006_intr_enable,
+-      .intr_disable = ael1006_intr_disable,
+-      .intr_clear = ael1006_intr_clear,
+-      .intr_handler = ael1006_intr_handler,
+-      .get_link_status = ael100x_get_link_status,
 +      .intr_enable = t3_phy_lasi_intr_enable,
 +      .intr_disable = t3_phy_lasi_intr_disable,
 +      .intr_clear = t3_phy_lasi_intr_clear,
 +      .intr_handler = t3_phy_lasi_intr_handler,
 +      .get_link_status = get_link_status_r,
-+      .power_down = ael1006_power_down,
-+};
-+
+       .power_down = ael1006_power_down,
+ };
+-void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
+-                       int phy_addr, const struct mdio_ops *mdio_ops)
 +int t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
 +                           int phy_addr, const struct mdio_ops *mdio_ops)
  {
--      return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
+-      cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops);
 +      cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops,
 +                SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE,
 +                 "10GBASE-SR");
-+      ael100x_txon(phy);
+       ael100x_txon(phy);
 +      return 0;
- }
--static int ael1006_intr_disable(struct cphy *phy)
++}
++
 +static int ael2005_setup_sr_edc(struct cphy *phy)
- {
--      return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
++{
 +      static struct reg_val regs[] = {
 +              { MDIO_DEV_PMA_PMD, 0xc003, 0xffff, 0x181 },
 +              { MDIO_DEV_PMA_PMD, 0xc010, 0xffff, 0x448a },
@@ -224616,12 +224433,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      if (!err)
 +              phy->priv = edc_sr;
 +      return err;
- }
--static int ael1006_intr_clear(struct cphy *phy)
++}
++
 +static int ael2005_setup_twinax_edc(struct cphy *phy, int modtype)
- {
--      u32 val;
++{
 +      static struct reg_val regs[] = {
 +              { MDIO_DEV_PMA_PMD, 0xc04a, 0xffff, 0x5a00 },
 +              { 0, 0, 0, 0 }
@@ -225008,29 +224823,24 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +              return err;
 +
 +      msleep(50);
--      return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
++
 +      for (i = 0; i < ARRAY_SIZE(twinax_edc) && !err; i += 2)
 +              err = mdio_write(phy, MDIO_DEV_PMA_PMD, twinax_edc[i],
 +                               twinax_edc[i + 1]);
 +      if (!err)
 +              phy->priv = edc_twinax;
 +      return err;
- }
--static int ael1006_intr_handler(struct cphy *phy)
++}
++
 +static int ael2005_i2c_rd(struct cphy *phy, int dev_addr, int word_addr)
- {
--      unsigned int status;
--      int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
++{
 +      int i, err;
 +      unsigned int stat, data;
++
 +      err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL_I2C_CTRL,
 +                       (dev_addr << 8) | (1 << 8) | word_addr);
-       if (err)
-               return err;
--      return (status & 1) ? cphy_cause_link_change : 0;
++      if (err)
++              return err;
 +
 +      for (i = 0; i < 5; i++) {
 +              msleep(1);
@@ -225048,13 +224858,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      CH_WARN(phy->adapter, "PHY %u I2C read of addr %u timed out\n",
 +              phy->addr, word_addr);
 +      return -ETIMEDOUT;
- }
--static int ael1006_power_down(struct cphy *phy, int enable)
++}
++
 +static int get_module_type(struct cphy *phy, int delay_ms)
- {
--      return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
--                                 BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
++{
 +      int v;
 +      unsigned int stat;
 +
@@ -225098,16 +224905,8 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      }
 +unknown:
 +      return phy_modtype_unknown;
- }
--static struct cphy_ops ael1006_ops = {
--      .reset = ael1006_reset,
--      .intr_enable = ael1006_intr_enable,
--      .intr_disable = ael1006_intr_disable,
--      .intr_clear = ael1006_intr_clear,
--      .intr_handler = ael1006_intr_handler,
--      .get_link_status = ael100x_get_link_status,
--      .power_down = ael1006_power_down,
++}
++
 +static int ael2005_intr_enable(struct cphy *phy)
 +{
 +      int err = mdio_write(phy, MDIO_DEV_PMA_PMD, AEL2005_GPIO_CTRL, 0x200);
@@ -225236,15 +225035,11 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +      .intr_handler    = ael2005_intr_handler,
 +      .get_link_status = get_link_status_r,
 +      .power_down      = ael1002_power_down,
- };
--void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
--                       int phy_addr, const struct mdio_ops *mdio_ops)
++};
++
 +int t3_ael2005_phy_prep(struct cphy *phy, struct adapter *adapter,
 +                      int phy_addr, const struct mdio_ops *mdio_ops)
- {
--      cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops);
--      ael100x_txon(phy);
++{
 +      cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops,
 +                SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE |
 +                SUPPORTED_IRQ, "10GBASE-R");
@@ -225307,7 +225102,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
  
        /*
         * Some cards where the PHY is supposed to be at address 0 actually
-@@ -205,6 +1161,7 @@ void t3_qt2045_phy_prep(struct cphy *phy
+@@ -205,6 +1161,7 @@
        if (!phy_addr && !mdio_read(phy, MDIO_DEV_PMA_PMD, MII_BMSR, &stat) &&
            stat == 0xffff)
                phy->addr = 1;
@@ -225315,7 +225110,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
  }
  
  static int xaui_direct_reset(struct cphy *phy, int wait)
-@@ -250,8 +1207,11 @@ static struct cphy_ops xaui_direct_ops =
+@@ -250,8 +1207,11 @@
        .power_down = xaui_direct_power_down,
  };
  
@@ -225330,10 +225125,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/ael1002.c linux-2.6.27.19-5.1/drivers/
 +                "10GBASE-CX4");
 +      return 0;
  }
-diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/net/cxgb3/common.h
---- linux-2.6.27/drivers/net/cxgb3/common.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/common.h     2009-03-25 16:11:05.000000000 +0000
-@@ -193,22 +193,13 @@ struct mdio_ops {
+diff -r 9608d5473017 drivers/net/cxgb3/common.h
+--- a/drivers/net/cxgb3/common.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/common.h       Wed May 06 16:56:24 2009 +0100
+@@ -193,20 +193,11 @@
  struct adapter_info {
        unsigned char nports;   /* # of ports */
        unsigned char phy_base_addr;    /* MDIO PHY base address */
@@ -225345,19 +225140,17 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
        unsigned long caps;     /* adapter capabilities */
        const struct mdio_ops *mdio_ops;        /* MDIO operations */
        const char *desc;       /* product description */
- };
+-};
+-
 -struct port_type_info {
 -      void (*phy_prep)(struct cphy *phy, struct adapter *adapter,
 -                       int phy_addr, const struct mdio_ops *ops);
 -      unsigned int caps;
 -      const char *desc;
--};
--
+ };
  struct mc5_stats {
-       unsigned long parity_err;
-       unsigned long active_rgn_full;
-@@ -358,6 +349,7 @@ struct qset_params {               /* SGE queue set p
+@@ -358,6 +349,7 @@
        unsigned int jumbo_size;        /* # of entries in jumbo free list */
        unsigned int txq_size[SGE_TXQ_PER_SET]; /* Tx queue sizes */
        unsigned int cong_thres;        /* FL congestion threshold */
@@ -225365,7 +225158,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
  };
  
  struct sge_params {
-@@ -525,12 +517,25 @@ enum {
+@@ -525,12 +517,25 @@
        MAC_RXFIFO_SIZE = 32768
  };
  
@@ -225393,7 +225186,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
  };
  
  /* PHY loopback direction */
-@@ -542,12 +547,23 @@ enum {
+@@ -542,12 +547,23 @@
  /* PHY interrupt types */
  enum {
        cphy_cause_link_change = 1,
@@ -225419,7 +225212,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
        int (*reset)(struct cphy *phy, int wait);
  
        int (*intr_enable)(struct cphy *phy);
-@@ -568,8 +584,12 @@ struct cphy_ops {
+@@ -568,8 +584,12 @@
  
  /* A PHY instance */
  struct cphy {
@@ -225433,7 +225226,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
        unsigned long fifo_errors;      /* FIFO over/under-flows */
        const struct cphy_ops *ops;     /* PHY operations */
        int (*mdio_read)(struct adapter *adapter, int phy_addr, int mmd_addr,
-@@ -594,10 +614,13 @@ static inline int mdio_write(struct cphy
+@@ -594,10 +614,13 @@
  /* Convenience initializer */
  static inline void cphy_init(struct cphy *phy, struct adapter *adapter,
                             int phy_addr, struct cphy_ops *phy_ops,
@@ -225441,15 +225234,15 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
 +                           const struct mdio_ops *mdio_ops,
 +                            unsigned int caps, const char *desc)
  {
--      phy->adapter = adapter;
-       phy->addr = phy_addr;
++      phy->addr = phy_addr;
 +      phy->caps = caps;
-+      phy->adapter = adapter;
+       phy->adapter = adapter;
+-      phy->addr = phy_addr;
 +      phy->desc = desc;
        phy->ops = phy_ops;
        if (mdio_ops) {
                phy->mdio_read = mdio_ops->read;
-@@ -668,7 +691,12 @@ int t3_mdio_change_bits(struct cphy *phy
+@@ -668,7 +691,12 @@
                        unsigned int set);
  int t3_phy_reset(struct cphy *phy, int mmd, int wait);
  int t3_phy_advertise(struct cphy *phy, unsigned int advert);
@@ -225462,7 +225255,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
  
  void t3_intr_enable(struct adapter *adapter);
  void t3_intr_disable(struct adapter *adapter);
-@@ -698,6 +726,7 @@ int t3_check_fw_version(struct adapter *
+@@ -698,6 +726,7 @@
  int t3_init_hw(struct adapter *adapter, u32 fw_params);
  void mac_prep(struct cmac *mac, struct adapter *adapter, int index);
  void early_hw_init(struct adapter *adapter, const struct adapter_info *ai);
@@ -225470,7 +225263,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
  int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
                    int reset);
  int t3_replay_prep_adapter(struct adapter *adapter);
-@@ -774,14 +803,16 @@ int t3_sge_read_rspq(struct adapter *ada
+@@ -774,14 +803,16 @@
  int t3_sge_cqcntxt_op(struct adapter *adapter, unsigned int id, unsigned int op,
                      unsigned int credits);
  
@@ -225497,10 +225290,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/common.h linux-2.6.27.19-5.1/drivers/n
 +int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
 +                          int phy_addr, const struct mdio_ops *mdio_ops);
  #endif                                /* __CHELSIO_COMMON_H */
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ctl_defs.h linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ctl_defs.h
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_ctl_defs.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ctl_defs.h     2009-03-25 16:11:05.000000000 +0000
-@@ -57,6 +57,9 @@ enum {
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_ctl_defs.h
+--- a/drivers/net/cxgb3/cxgb3_ctl_defs.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h       Wed May 06 16:56:24 2009 +0100
+@@ -57,6 +57,9 @@
        RDMA_GET_MIB            = 19,
  
        GET_RX_PAGE_INFO        = 50,
@@ -225510,23 +225303,23 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ctl_defs.h linux-2.6.27.19-5.1/d
  };
  
  /*
-@@ -86,6 +89,12 @@ struct iff_mac {
+@@ -84,6 +87,12 @@
+       struct net_device *dev; /* the net_device */
+       const unsigned char *mac_addr;  /* MAC address to lookup */
        u16 vlan_tag;
- };
++};
++
 +/* Structure used to request a port's iSCSI IPv4 address */
 +struct iscsi_ipv4addr {
 +      struct net_device *dev; /* the net_device */
 +      __be32 ipv4addr;        /* the return iSCSI IPv4 address */
-+};
-+
- struct pci_dev;
+ };
  
- /*
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ioctl.h linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ioctl.h
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_ioctl.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_ioctl.h        2009-03-25 16:11:05.000000000 +0000
-@@ -92,6 +92,8 @@ struct ch_qset_params {
+ struct pci_dev;
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_ioctl.h
+--- a/drivers/net/cxgb3/cxgb3_ioctl.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_ioctl.h  Wed May 06 16:56:24 2009 +0100
+@@ -92,6 +92,8 @@
        int32_t polling;
        int32_t lro;
        int32_t cong_thres;
@@ -225535,9 +225328,9 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_ioctl.h linux-2.6.27.19-5.1/driv
  };
  
  struct ch_pktsched_params {
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_main.c
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_main.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_main.c
+--- a/drivers/net/cxgb3/cxgb3_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_main.c   Wed May 06 16:56:24 2009 +0100
 @@ -44,6 +44,7 @@
  #include <linux/rtnetlink.h>
  #include <linux/firmware.h>
@@ -225546,7 +225339,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  #include <asm/uaccess.h>
  
  #include "common.h"
-@@ -208,6 +209,31 @@ void t3_os_link_changed(struct adapter *
+@@ -208,6 +209,31 @@
        }
  }
  
@@ -225578,7 +225371,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  static void cxgb_set_rxmode(struct net_device *dev)
  {
        struct t3_rx_mode rm;
-@@ -274,10 +300,10 @@ static void name_msix_vecs(struct adapte
+@@ -274,10 +300,10 @@
  
                for (i = 0; i < pi->nqsets; i++, msi_idx++) {
                        snprintf(adap->msix_info[msi_idx].desc, n,
@@ -225591,10 +225384,12 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  }
  
  static int request_msix_data_irqs(struct adapter *adap)
-@@ -306,6 +332,22 @@ static int request_msix_data_irqs(struct
+@@ -304,6 +330,22 @@
+               }
+       }
        return 0;
- }
++}
++
 +static void free_irq_resources(struct adapter *adapter)
 +{
 +      if (adapter->flags & USING_MSIX) {
@@ -225609,12 +225404,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
 +                               &adapter->sge.qs[i]);
 +      } else
 +              free_irq(adapter->pdev->irq, adapter);
-+}
-+
+ }
  static int await_mgmt_replies(struct adapter *adap, unsigned long init_cnt,
-                             unsigned long n)
- {
-@@ -453,6 +495,36 @@ static void enable_all_napi(struct adapt
+@@ -453,6 +495,36 @@
  }
  
  /**
@@ -225651,7 +225444,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
   *    setup_sge_qsets - configure SGE Tx/Rx/response queues
   *    @adap: the adapter
   *
-@@ -473,12 +545,15 @@ static int setup_sge_qsets(struct adapte
+@@ -473,12 +545,15 @@
                struct port_info *pi = netdev_priv(dev);
  
                pi->qs = &adap->sge.qs[pi->first_qset];
@@ -225668,7 +225461,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                                t3_free_sge_resources(adap);
                                return err;
                        }
-@@ -687,6 +762,47 @@ static struct attribute *offload_attrs[]
+@@ -687,6 +762,47 @@
  
  static struct attribute_group offload_attr_group = {.attrs = offload_attrs };
  
@@ -225716,7 +225509,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  /*
   * Sends an sk_buff to an offload queue driver
   * after dealing with any active network taps.
-@@ -739,11 +855,12 @@ static void init_port_mtus(struct adapte
+@@ -739,11 +855,12 @@
        t3_write_reg(adapter, A_TP_MTU_PORT_TABLE, mtus);
  }
  
@@ -225730,7 +225523,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
        skb = alloc_skb(sizeof(*req), GFP_KERNEL | __GFP_NOFAIL);
        req = (struct mngt_pktsched_wr *)skb_put(skb, sizeof(*req));
-@@ -754,20 +871,28 @@ static void send_pktsched_cmd(struct ada
+@@ -754,20 +871,28 @@
        req->min = lo;
        req->max = hi;
        req->binding = port;
@@ -225765,7 +225558,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  }
  
  #define FW_FNAME "t3fw-%d.%d.%d.bin"
-@@ -891,6 +1016,13 @@ static int cxgb_up(struct adapter *adap)
+@@ -891,6 +1016,13 @@
                                goto out;
                }
  
@@ -225779,7 +225572,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                err = t3_init_hw(adap, 0);
                if (err)
                        goto out;
-@@ -946,9 +1078,16 @@ static int cxgb_up(struct adapter *adap)
+@@ -946,9 +1078,16 @@
                t3_write_reg(adap, A_TP_INT_ENABLE, 0x7fbfffff);
        }
  
@@ -225799,7 +225592,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
  out:
        return err;
-@@ -967,19 +1106,7 @@ static void cxgb_down(struct adapter *ad
+@@ -967,19 +1106,7 @@
        t3_intr_disable(adapter);
        spin_unlock_irq(&adapter->work_lock);
  
@@ -225820,7 +225613,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        flush_workqueue(cxgb3_wq);      /* wait for external IRQ handler */
        quiesce_rx(adapter);
  }
-@@ -1078,6 +1205,7 @@ static int cxgb_open(struct net_device *
+@@ -1078,6 +1205,7 @@
                if (err)
                        printk(KERN_WARNING
                               "Could not initialize offload capabilities\n");
@@ -225828,7 +225621,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        }
  
        link_start(dev);
-@@ -1100,9 +1228,12 @@ static int cxgb_close(struct net_device 
+@@ -1100,9 +1228,12 @@
        netif_carrier_off(dev);
        t3_mac_disable(&pi->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX);
  
@@ -225843,7 +225636,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
        if (!(adapter->open_device_map & PORT_MASK))
                cancel_rearming_delayed_workqueue(cxgb3_wq,
-@@ -1251,8 +1382,10 @@ static void get_drvinfo(struct net_devic
+@@ -1251,8 +1382,10 @@
        u32 fw_vers = 0;
        u32 tp_vers = 0;
  
@@ -225854,7 +225647,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
        strcpy(info->driver, DRV_NAME);
        strcpy(info->version, DRV_VERSION);
-@@ -1284,8 +1417,8 @@ static unsigned long collect_sge_port_st
+@@ -1284,8 +1417,8 @@
        int i;
        unsigned long tot = 0;
  
@@ -225865,7 +225658,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        return tot;
  }
  
-@@ -1485,11 +1618,22 @@ static int speed_duplex_to_caps(int spee
+@@ -1485,11 +1618,22 @@
  
  static int set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
  {
@@ -225890,7 +225683,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
        if (cmd->autoneg == AUTONEG_DISABLE) {
                int cap = speed_duplex_to_caps(cmd->speed, cmd->duplex);
-@@ -1565,11 +1709,10 @@ static int set_rx_csum(struct net_device
+@@ -1565,11 +1709,10 @@
  
        p->rx_csum_offload = data;
        if (!data) {
@@ -225903,7 +225696,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        }
        return 0;
  }
-@@ -1724,6 +1867,25 @@ static void get_wol(struct net_device *d
+@@ -1724,6 +1867,25 @@
        memset(&wol->sopass, 0, sizeof(wol->sopass));
  }
  
@@ -225929,7 +225722,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  static const struct ethtool_ops cxgb_ethtool_ops = {
        .get_settings = get_settings,
        .set_settings = set_settings,
-@@ -1753,6 +1915,8 @@ static const struct ethtool_ops cxgb_eth
+@@ -1753,6 +1915,8 @@
        .get_regs = get_regs,
        .get_wol = get_wol,
        .set_tso = ethtool_op_set_tso,
@@ -225938,7 +225731,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  };
  
  static int in_range(int val, int lo, int hi)
-@@ -1775,6 +1939,8 @@ static int cxgb_extension_ioctl(struct n
+@@ -1775,6 +1939,8 @@
                int i;
                struct qset_params *q;
                struct ch_qset_params t;
@@ -225947,7 +225740,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
                if (!capable(CAP_NET_ADMIN))
                        return -EPERM;
-@@ -1797,6 +1963,16 @@ static int cxgb_extension_ioctl(struct n
+@@ -1797,12 +1963,36 @@
                        || !in_range(t.rspq_size, MIN_RSPQ_ENTRIES,
                                        MAX_RSPQ_ENTRIES))
                        return -EINVAL;
@@ -225964,10 +225757,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                if ((adapter->flags & FULL_INIT_DONE) &&
                        (t.rspq_size >= 0 || t.fl_size[0] >= 0 ||
                        t.fl_size[1] >= 0 || t.txq_size[0] >= 0 ||
-@@ -1804,6 +1980,20 @@ static int cxgb_extension_ioctl(struct n
+                       t.txq_size[1] >= 0 || t.txq_size[2] >= 0 ||
                        t.polling >= 0 || t.cong_thres >= 0))
                        return -EBUSY;
++
 +              /* Allow setting of any available qset when offload enabled */
 +              if (test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) {
 +                      q1 = 0;
@@ -225981,11 +225774,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
 +                      return -EINVAL;
 +              if (t.qset_idx > q1 + nqsets - 1)
 +                      return -EINVAL;
-+
                q = &adapter->params.sge.qset[t.qset_idx];
  
-               if (t.rspq_size >= 0)
-@@ -1843,23 +2033,34 @@ static int cxgb_extension_ioctl(struct n
+@@ -1843,23 +2033,34 @@
                                }
                        }
                }
@@ -226027,7 +225819,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                t.rspq_size = q->rspq_size;
                t.txq_size[0] = q->txq_size[0];
                t.txq_size[1] = q->txq_size[1];
-@@ -1870,6 +2071,12 @@ static int cxgb_extension_ioctl(struct n
+@@ -1870,6 +2071,12 @@
                t.lro = q->lro;
                t.intr_lat = q->coalesce_usecs;
                t.cong_thres = q->cong_thres;
@@ -226040,7 +225832,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
                if (copy_to_user(useraddr, &t, sizeof(t)))
                        return -EFAULT;
-@@ -2117,7 +2324,7 @@ static int cxgb_ioctl(struct net_device 
+@@ -2117,7 +2324,7 @@
                        mmd = data->phy_id >> 8;
                        if (!mmd)
                                mmd = MDIO_DEV_PCS;
@@ -226049,7 +225841,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                                return -EINVAL;
  
                        ret =
-@@ -2143,7 +2350,7 @@ static int cxgb_ioctl(struct net_device 
+@@ -2143,7 +2350,7 @@
                        mmd = data->phy_id >> 8;
                        if (!mmd)
                                mmd = MDIO_DEV_PCS;
@@ -226058,7 +225850,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                                return -EINVAL;
  
                        ret =
-@@ -2215,8 +2422,8 @@ static void t3_synchronize_rx(struct ada
+@@ -2215,8 +2422,8 @@
  {
        int i;
  
@@ -226069,7 +225861,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  
                spin_lock_irq(&q->lock);
                spin_unlock_irq(&q->lock);
-@@ -2290,7 +2497,7 @@ static void check_link_status(struct ada
+@@ -2290,7 +2497,7 @@
                struct net_device *dev = adapter->port[i];
                struct port_info *p = netdev_priv(dev);
  
@@ -226078,7 +225870,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                        t3_link_changed(adapter, i);
        }
  }
-@@ -2355,10 +2562,10 @@ static void t3_adap_check_task(struct wo
+@@ -2355,10 +2562,10 @@
                check_t3b2_mac(adapter);
  
        /* Schedule the next check update if any port is active. */
@@ -226091,7 +225883,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  }
  
  /*
-@@ -2403,6 +2610,96 @@ void t3_os_ext_intr_handler(struct adapt
+@@ -2403,6 +2610,96 @@
        spin_unlock(&adapter->work_lock);
  }
  
@@ -226188,7 +225980,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  void t3_fatal_err(struct adapter *adapter)
  {
        unsigned int fw_status[4];
-@@ -2413,7 +2710,11 @@ void t3_fatal_err(struct adapter *adapte
+@@ -2413,7 +2710,11 @@
                t3_write_reg(adapter, A_XGM_RX_CTRL, 0);
                t3_write_reg(adapter, XGM_REG(A_XGM_TX_CTRL, 1), 0);
                t3_write_reg(adapter, XGM_REG(A_XGM_RX_CTRL, 1), 0);
@@ -226200,12 +225992,13 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        }
        CH_ALERT(adapter, "encountered fatal error, operation suspended\n");
        if (!t3_cim_ctl_blk_read(adapter, 0xa0, 4, fw_status))
-@@ -2435,23 +2736,9 @@ static pci_ers_result_t t3_io_error_dete
+@@ -2435,23 +2736,9 @@
                                             pci_channel_state_t state)
  {
        struct adapter *adapter = pci_get_drvdata(pdev);
 -      int i;
--
++      int ret;
 -      /* Stop all ports */
 -      for_each_port(adapter, i) {
 -              struct net_device *netdev = adapter->port[i];
@@ -226219,14 +226012,13 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
 -              offload_close(&adapter->tdev);
 -
 -      adapter->flags &= ~FULL_INIT_DONE;
-+      int ret;
+-
 -      pci_disable_device(pdev);
 +      ret = t3_adapter_error(adapter, 0);
  
        /* Request a slot reset. */
        return PCI_ERS_RESULT_NEED_RESET;
-@@ -2467,22 +2754,9 @@ static pci_ers_result_t t3_io_slot_reset
+@@ -2467,22 +2754,9 @@
  {
        struct adapter *adapter = pci_get_drvdata(pdev);
  
@@ -226237,12 +226029,12 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
 -      }
 -      pci_set_master(pdev);
 -      pci_restore_state(pdev);
--
--      /* Free sge resources */
--      t3_free_sge_resources(adapter);
 +      if (!t3_reenable_adapter(adapter))
 +              return PCI_ERS_RESULT_RECOVERED;
  
+-      /* Free sge resources */
+-      t3_free_sge_resources(adapter);
+-
 -      if (t3_replay_prep_adapter(adapter))
 -              goto err;
 -
@@ -226251,16 +226043,16 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        return PCI_ERS_RESULT_DISCONNECT;
  }
  
-@@ -2496,22 +2770,8 @@ err:
+@@ -2496,22 +2770,8 @@
  static void t3_io_resume(struct pci_dev *pdev)
  {
        struct adapter *adapter = pci_get_drvdata(pdev);
 -      int i;
--
 -      /* Restart the ports */
 -      for_each_port(adapter, i) {
 -              struct net_device *netdev = adapter->port[i];
+-
 -              if (netif_running(netdev)) {
 -                      if (cxgb_open(netdev)) {
 -                              dev_err(&pdev->dev,
@@ -226275,10 +226067,11 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
  }
  
  static struct pci_error_handlers t3_err_handler = {
-@@ -2520,6 +2780,42 @@ static struct pci_error_handlers t3_err_
+@@ -2519,6 +2779,42 @@
+       .slot_reset = t3_io_slot_reset,
        .resume = t3_io_resume,
  };
++
 +/*
 + * Set the number of qsets based on the number of CPUs and the number of ports,
 + * not to exceed the number of available qsets, assuming there are enough qsets
@@ -226314,11 +226107,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
 +                       "Port %d using %d queue sets.\n", i, nqsets);
 +      }
 +}
-+
  static int __devinit cxgb_enable_msix(struct adapter *adap)
  {
-       struct msix_entry entries[SGE_QSETS + 1];
-@@ -2564,7 +2860,7 @@ static void __devinit print_port_info(st
+@@ -2564,7 +2860,7 @@
                if (!test_bit(i, &adap->registered_device_map))
                        continue;
                printk(KERN_INFO "%s: %s %s %sNIC (rev %d) %s%s\n",
@@ -226327,7 +226119,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                       is_offload(adap) ? "R" : "", adap->params.rev, buf,
                       (adap->flags & USING_MSIX) ? " MSI-X" :
                       (adap->flags & USING_MSI) ? " MSI" : "");
-@@ -2660,6 +2956,7 @@ static int __devinit init_one(struct pci
+@@ -2660,6 +2956,7 @@
  
        INIT_LIST_HEAD(&adapter->adapter_list);
        INIT_WORK(&adapter->ext_intr_handler_task, ext_intr_task);
@@ -226335,7 +226127,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        INIT_DELAYED_WORK(&adapter->adap_check_task, t3_adap_check_task);
  
        for (i = 0; i < ai->nports; ++i) {
-@@ -2677,9 +2974,6 @@ static int __devinit init_one(struct pci
+@@ -2677,9 +2974,6 @@
                pi = netdev_priv(netdev);
                pi->adapter = adapter;
                pi->rx_csum_offload = 1;
@@ -226345,7 +226137,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                pi->port_id = i;
                netif_carrier_off(netdev);
                netdev->irq = pdev->irq;
-@@ -2756,6 +3050,8 @@ static int __devinit init_one(struct pci
+@@ -2756,6 +3050,8 @@
        else if (msi > 0 && pci_enable_msi(pdev) == 0)
                adapter->flags |= USING_MSI;
  
@@ -226354,7 +226146,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
        err = sysfs_create_group(&adapter->port[0]->dev.kobj,
                                 &cxgb3_attr_group);
  
-@@ -2801,6 +3097,7 @@ static void __devexit remove_one(struct 
+@@ -2801,6 +3097,7 @@
                    if (test_bit(i, &adapter->registered_device_map))
                        unregister_netdev(adapter->port[i]);
  
@@ -226362,10 +226154,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_main.c linux-2.6.27.19-5.1/drive
                t3_free_sge_resources(adapter);
                cxgb_disable_msi(adapter);
  
-diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_offload.c
---- linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/cxgb3_offload.c      2009-03-25 16:11:05.000000000 +0000
-@@ -182,7 +182,9 @@ static struct net_device *get_iff_from_m
+diff -r 9608d5473017 drivers/net/cxgb3/cxgb3_offload.c
+--- a/drivers/net/cxgb3/cxgb3_offload.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/cxgb3_offload.c        Wed May 06 16:56:24 2009 +0100
+@@ -182,7 +182,9 @@
  static int cxgb_ulp_iscsi_ctl(struct adapter *adapter, unsigned int req,
                              void *data)
  {
@@ -226375,7 +226167,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c linux-2.6.27.19-5.1/dr
        struct ulp_iscsi_info *uiip = data;
  
        switch (req) {
-@@ -191,31 +193,36 @@ static int cxgb_ulp_iscsi_ctl(struct ada
+@@ -191,31 +193,36 @@
                uiip->llimit = t3_read_reg(adapter, A_ULPRX_ISCSI_LLIMIT);
                uiip->ulimit = t3_read_reg(adapter, A_ULPRX_ISCSI_ULIMIT);
                uiip->tagmask = t3_read_reg(adapter, A_ULPRX_ISCSI_TAGMASK);
@@ -226425,7 +226217,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c linux-2.6.27.19-5.1/dr
                                t3_write_reg(adapter, A_ULPRX_ISCSI_PSZ, val);
                }
                break;
-@@ -407,6 +414,18 @@ static int cxgb_offload_ctl(struct t3cde
+@@ -407,6 +414,18 @@
                rx_page_info->page_size = tp->rx_pg_size;
                rx_page_info->num = tp->rx_num_pgs;
                break;
@@ -226444,23 +226236,23 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/cxgb3_offload.c linux-2.6.27.19-5.1/dr
        default:
                return -EOPNOTSUPP;
        }
-diff -purN linux-2.6.27/drivers/net/cxgb3/regs.h linux-2.6.27.19-5.1/drivers/net/cxgb3/regs.h
---- linux-2.6.27/drivers/net/cxgb3/regs.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/regs.h       2009-03-25 16:11:05.000000000 +0000
-@@ -573,6 +573,10 @@
+diff -r 9608d5473017 drivers/net/cxgb3/regs.h
+--- a/drivers/net/cxgb3/regs.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/regs.h Wed May 06 16:56:24 2009 +0100
+@@ -572,6 +572,10 @@
+ #define S_GPIO10    10
  #define V_GPIO10(x) ((x) << S_GPIO10)
  #define F_GPIO10    V_GPIO10(1U)
++
 +#define S_GPIO9    9
 +#define V_GPIO9(x) ((x) << S_GPIO9)
 +#define F_GPIO9    V_GPIO9(1U)
-+
  #define S_GPIO7    7
  #define V_GPIO7(x) ((x) << S_GPIO7)
- #define F_GPIO7    V_GPIO7(1U)
-diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/cxgb3/sge.c
---- linux-2.6.27/drivers/net/cxgb3/sge.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/sge.c        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/sge.c
+--- a/drivers/net/cxgb3/sge.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/sge.c  Wed May 06 16:56:24 2009 +0100
 @@ -36,6 +36,7 @@
  #include <linux/ip.h>
  #include <linux/tcp.h>
@@ -226469,7 +226261,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
  #include "common.h"
  #include "regs.h"
  #include "sge_defs.h"
-@@ -351,7 +352,8 @@ static void free_rx_bufs(struct pci_dev 
+@@ -351,7 +352,8 @@
                pci_unmap_single(pdev, pci_unmap_addr(d, dma_addr),
                                 q->buf_size, PCI_DMA_FROMDEVICE);
                if (q->use_pages) {
@@ -226479,7 +226271,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
                        d->pg_chunk.page = NULL;
                } else {
                        kfree_skb(d->skb);
-@@ -583,7 +585,7 @@ static void t3_reset_qset(struct sge_qse
+@@ -583,7 +585,7 @@
        memset(q->fl, 0, sizeof(struct sge_fl) * SGE_RXQ_PER_SET);
        memset(q->txq, 0, sizeof(struct sge_txq) * SGE_TXQ_PER_SET);
        q->txq_stopped = 0;
@@ -226488,17 +226280,17 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
        kfree(q->lro_frag_tbl);
        q->lro_nfrags = q->lro_frag_len = 0;
  }
-@@ -603,9 +605,6 @@ static void t3_free_qset(struct adapter 
+@@ -602,9 +604,6 @@
+ {
        int i;
        struct pci_dev *pdev = adapter->pdev;
+-
 -      if (q->tx_reclaim_timer.function)
 -              del_timer_sync(&q->tx_reclaim_timer);
--
        for (i = 0; i < SGE_RXQ_PER_SET; ++i)
                if (q->fl[i].desc) {
-                       spin_lock_irq(&adapter->sge.reg_lock);
-@@ -1859,6 +1858,53 @@ static void restart_tx(struct sge_qset *
+@@ -1859,6 +1858,53 @@
  }
  
  /**
@@ -226552,7 +226344,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
   *    rx_eth - process an ingress ethernet packet
   *    @adap: the adapter
   *    @rq: the response queue that received the packet
-@@ -1882,7 +1928,7 @@ static void rx_eth(struct adapter *adap,
+@@ -1882,7 +1928,7 @@
        pi = netdev_priv(skb->dev);
        if (pi->rx_csum_offload && p->csum_valid && p->csum == htons(0xffff) &&
            !p->fragment) {
@@ -226561,7 +226353,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
                skb->ip_summed = CHECKSUM_UNNECESSARY;
        } else
                skb->ip_summed = CHECKSUM_NONE;
-@@ -1897,16 +1943,28 @@ static void rx_eth(struct adapter *adap,
+@@ -1897,16 +1943,28 @@
                                                             grp,
                                                             ntohs(p->vlan),
                                                             p);
@@ -226593,7 +226385,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
        } else
                netif_rx(skb);
  }
-@@ -1937,38 +1995,6 @@ static inline int lro_frame_ok(const str
+@@ -1937,38 +1995,6 @@
                eh->h_proto == htons(ETH_P_IP) && ih->ihl == (sizeof(*ih) >> 2);
  }
  
@@ -226632,17 +226424,17 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
  static int t3_get_lro_header(void **eh,  void **iph, void **tcph,
                             u64 *hdr_flags, void *priv)
  {
-@@ -1981,9 +2007,6 @@ static int t3_get_lro_header(void **eh, 
+@@ -1980,9 +2006,6 @@
+       *eh = (struct ethhdr *)(cpl + 1);
        *iph = (struct iphdr *)((struct ethhdr *)*eh + 1);
        *tcph = (struct tcphdr *)((struct iphdr *)*iph + 1);
+-
 -       if (!lro_segment_ok(*tcph))
 -              return -1;
--
        *hdr_flags = LRO_IPV4 | LRO_TCP;
        return 0;
- }
-@@ -2075,6 +2098,7 @@ static void init_lro_mgr(struct sge_qset
+@@ -2075,6 +2098,7 @@
  {
        lro_mgr->dev = qs->netdev;
        lro_mgr->features = LRO_F_NAPI;
@@ -226650,7 +226442,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
        lro_mgr->ip_summed = CHECKSUM_UNNECESSARY;
        lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY;
        lro_mgr->max_desc = T3_MAX_LRO_SES;
-@@ -2246,8 +2270,7 @@ no_mem:
+@@ -2246,8 +2270,7 @@
                } else if ((len = ntohl(r->len_cq)) != 0) {
                        struct sge_fl *fl;
  
@@ -226660,7 +226452,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
  
                        fl = (len & F_RSPD_FLQ) ? &qs->fl[1] : &qs->fl[0];
                        if (fl->use_pages) {
-@@ -2878,9 +2901,7 @@ int t3_sge_alloc_qset(struct adapter *ad
+@@ -2878,9 +2901,7 @@
        struct net_lro_mgr *lro_mgr = &q->lro_mgr;
  
        init_qset_cntxt(q, id);
@@ -226671,10 +226463,13 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
  
        q->fl[0].desc = alloc_ring(adapter->pdev, p->fl_size,
                                   sizeof(struct rx_desc),
-@@ -3043,6 +3064,24 @@ err:
- }
- /**
+@@ -3040,6 +3061,24 @@
+ err:
+       t3_free_qset(adapter, q);
+       return ret;
++}
++
++/**
 + *    t3_stop_sge_timers - stop SGE timer call backs
 + *    @adap: the adapter
 + *
@@ -226690,16 +226485,13 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/sge.c linux-2.6.27.19-5.1/drivers/net/
 +              if (q->tx_reclaim_timer.function)
 +                      del_timer_sync(&q->tx_reclaim_timer);
 +      }
-+}
-+
-+/**
-  *    t3_free_sge_resources - free SGE resources
-  *    @adap: the adapter
-  *
-diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/net/cxgb3/t3_hw.c
---- linux-2.6.27/drivers/net/cxgb3/t3_hw.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/t3_hw.c      2009-03-25 16:11:05.000000000 +0000
-@@ -194,21 +194,18 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi
+ }
+ /**
+diff -r 9608d5473017 drivers/net/cxgb3/t3_hw.c
+--- a/drivers/net/cxgb3/t3_hw.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/t3_hw.c        Wed May 06 16:56:24 2009 +0100
+@@ -194,21 +194,18 @@
  static void mi1_init(struct adapter *adap, const struct adapter_info *ai)
  {
        u32 clkdiv = adap->params.vpd.cclk / (2 * adap->params.vpd.mdc) - 1;
@@ -226726,7 +226518,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  {
        int ret;
        u32 addr = V_REGADDR(reg_addr) | V_PHYADDR(phy_addr);
-@@ -217,16 +214,17 @@ static int mi1_read(struct adapter *adap
+@@ -217,16 +214,17 @@
                return -EINVAL;
  
        mutex_lock(&adapter->mdio_lock);
@@ -226746,7 +226538,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
                     int reg_addr, unsigned int val)
  {
        int ret;
-@@ -236,37 +234,51 @@ static int mi1_write(struct adapter *ada
+@@ -236,18 +234,36 @@
                return -EINVAL;
  
        mutex_lock(&adapter->mdio_lock);
@@ -226766,8 +226558,8 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
 +      t3_mi1_read,
 +      t3_mi1_write
  };
- /*
++
++/*
 + * Performs the address cycle for clause 45 PHYs.
 + * Must be called with the MDIO_LOCK held.
 + */
@@ -226783,11 +226575,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
 +      return t3_wait_op_done(adapter, A_MI1_OP, F_BUSY, 0,
 +                             MDIO_ATTEMPTS, 10);
 +}
-+
-+/*
+ /*
   * MI1 read/write operations for indirect-addressed PHYs.
-  */
- static int mi1_ext_read(struct adapter *adapter, int phy_addr, int mmd_addr,
+@@ -256,17 +272,13 @@
                        int reg_addr, unsigned int *valp)
  {
        int ret;
@@ -226807,7 +226598,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
                if (!ret)
                        *valp = t3_read_reg(adapter, A_MI1_DATA);
        }
-@@ -278,18 +290,14 @@ static int mi1_ext_write(struct adapter 
+@@ -278,18 +290,14 @@
                         int reg_addr, unsigned int val)
  {
        int ret;
@@ -226828,7 +226619,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        }
        mutex_unlock(&adapter->mdio_lock);
        return ret;
-@@ -400,6 +408,29 @@ int t3_phy_advertise(struct cphy *phy, u
+@@ -400,6 +408,29 @@
  }
  
  /**
@@ -226858,7 +226649,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
   *    t3_set_phy_speed_duplex - force PHY speed and duplex
   *    @phy: the PHY to operate on
   *    @speed: requested PHY speed
-@@ -434,27 +465,52 @@ int t3_set_phy_speed_duplex(struct cphy 
+@@ -434,27 +465,52 @@
        return mdio_write(phy, 0, MII_BMCR, ctl);
  }
  
@@ -226922,7 +226713,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
         &mi1_mdio_ext_ops, "Chelsio T320"},
  };
  
-@@ -467,29 +523,23 @@ const struct adapter_info *t3_get_adapte
+@@ -467,28 +523,22 @@
        return id < ARRAY_SIZE(t3_adap_info) ? &t3_adap_info[id] : NULL;
  }
  
@@ -226958,14 +226749,13 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
 +      { t3_ael1006_phy_prep },
 +      { NULL },
  };
+-
 -#undef CAPS_1G
 -#undef CAPS_10G
--
  #define VPD_ENTRY(name, len) \
        u8 name##_kword[2]; u8 name##_len; u8 name##_data[len]
-@@ -522,7 +572,7 @@ struct t3_vpd {
+@@ -522,7 +572,7 @@
        u32 pad;                /* for multiple-of-4 sizing and alignment */
  };
  
@@ -226974,7 +226764,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  #define EEPROM_STAT_ADDR  0x4000
  #define VPD_BASE          0xc00
  
-@@ -1132,6 +1182,15 @@ void t3_link_changed(struct adapter *ada
+@@ -1132,6 +1182,15 @@
  
        phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc);
  
@@ -226990,7 +226780,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        if (link_ok != lc->link_ok && adapter->params.rev > 0 &&
            uses_xaui(adapter)) {
                if (link_ok)
-@@ -1142,10 +1201,6 @@ void t3_link_changed(struct adapter *ada
+@@ -1142,10 +1201,6 @@
        lc->link_ok = link_ok;
        lc->speed = speed < 0 ? SPEED_INVALID : speed;
        lc->duplex = duplex < 0 ? DUPLEX_INVALID : duplex;
@@ -227001,7 +226791,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  
        if (link_ok && speed >= 0 && lc->autoneg == AUTONEG_ENABLE) {
                /* Set MAC speed, duplex, and flow control to match PHY. */
-@@ -1191,7 +1246,6 @@ int t3_link_start(struct cphy *phy, stru
+@@ -1191,7 +1246,6 @@
                                                   fc);
                        /* Also disables autoneg */
                        phy->ops->set_speed_duplex(phy, lc->speed, lc->duplex);
@@ -227009,7 +226799,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
                } else
                        phy->ops->autoneg_enable(phy);
        } else {
-@@ -1221,7 +1275,7 @@ struct intr_info {
+@@ -1221,7 +1275,7 @@
        unsigned int mask;      /* bits to check in interrupt status */
        const char *msg;        /* message to print or NULL */
        short stat_idx;         /* stat counter to increment or -1 */
@@ -227018,7 +226808,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  };
  
  /**
-@@ -1682,25 +1736,23 @@ static int mac_intr_handler(struct adapt
+@@ -1682,25 +1736,23 @@
   */
  int t3_phy_intr_handler(struct adapter *adapter)
  {
@@ -227048,7 +226838,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
                }
        }
  
-@@ -1763,6 +1815,17 @@ int t3_slow_intr_handler(struct adapter 
+@@ -1763,6 +1815,17 @@
        return 1;
  }
  
@@ -227066,7 +226856,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  /**
   *    t3_intr_enable - enable interrupts
   *    @adapter: the adapter whose interrupts should be enabled
-@@ -1805,10 +1868,8 @@ void t3_intr_enable(struct adapter *adap
+@@ -1805,10 +1868,8 @@
                t3_write_reg(adapter, A_ULPTX_INT_ENABLE, ULPTX_INTR_MASK);
        }
  
@@ -227079,7 +226869,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        if (is_pcie(adapter))
                t3_write_reg(adapter, A_PCIE_INT_ENABLE, PCIE_INTR_MASK);
        else
-@@ -3329,6 +3390,8 @@ int t3_init_hw(struct adapter *adapter, 
+@@ -3329,6 +3390,8 @@
        init_hw_for_avail_ports(adapter, adapter->params.nports);
        t3_sge_init(adapter, &adapter->params.sge);
  
@@ -227088,7 +226878,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        t3_write_reg(adapter, A_CIM_HOST_ACC_DATA, vpd->uclk | fw_params);
        t3_write_reg(adapter, A_CIM_BOOT_CFG,
                     V_BOOTADDR(FW_FLASH_BOOT_ADDR >> 2));
-@@ -3488,7 +3551,7 @@ void early_hw_init(struct adapter *adapt
+@@ -3488,7 +3551,7 @@
   * Older PCIe cards lose their config space during reset, PCI-X
   * ones don't.
   */
@@ -227097,7 +226887,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  {
        int i, save_and_restore_pcie =
            adapter->params.rev < T3_REV_B2 && is_pcie(adapter);
-@@ -3556,7 +3619,7 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3556,7 +3619,7 @@
                    int reset)
  {
        int ret;
@@ -227106,7 +226896,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  
        get_pci_mode(adapter, &adapter->params.pci);
  
-@@ -3620,16 +3683,24 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3620,16 +3683,24 @@
  
        for_each_port(adapter, i) {
                u8 hw_addr[6];
@@ -227117,17 +226907,17 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
 -                      ++j;
 +              while (!adapter->params.vpd.port_type[++j])
 +                      ;
-+
+-              p->port_type = &port_types[adapter->params.vpd.port_type[j]];
+-              p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
+-                                     ai->mdio_ops);
 +              pti = &port_types[adapter->params.vpd.port_type[j]];
 +              if (!pti->phy_prep) {
 +                      CH_ALERT(adapter, "Invalid port type index %d\n",
 +                               adapter->params.vpd.port_type[j]);
 +                      return -EINVAL;
 +              }
--              p->port_type = &port_types[adapter->params.vpd.port_type[j]];
--              p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
--                                     ai->mdio_ops);
++
 +              ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 +                                  ai->mdio_ops);
 +              if (ret)
@@ -227137,7 +226927,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
  
                /*
                 * The VPD EEPROM stores the base Ethernet address for the
-@@ -3643,9 +3714,9 @@ int t3_prep_adapter(struct adapter *adap
+@@ -3643,9 +3714,9 @@
                       ETH_ALEN);
                memcpy(adapter->port[i]->perm_addr, hw_addr,
                       ETH_ALEN);
@@ -227149,7 +226939,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
                        adapter->params.linkpoll_period = 10;
        }
  
-@@ -3661,7 +3732,7 @@ void t3_led_ready(struct adapter *adapte
+@@ -3661,7 +3732,7 @@
  int t3_replay_prep_adapter(struct adapter *adapter)
  {
        const struct adapter_info *ai = adapter->params.info;
@@ -227158,7 +226948,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        int ret;
  
        early_hw_init(adapter, ai);
-@@ -3670,15 +3741,17 @@ int t3_replay_prep_adapter(struct adapte
+@@ -3670,15 +3741,17 @@
                return ret;
  
        for_each_port(adapter, i) {
@@ -227181,9 +226971,9 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/t3_hw.c linux-2.6.27.19-5.1/drivers/ne
        }
  
  return 0;
-diff -purN linux-2.6.27/drivers/net/cxgb3/version.h linux-2.6.27.19-5.1/drivers/net/cxgb3/version.h
---- linux-2.6.27/drivers/net/cxgb3/version.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/version.h    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/version.h
+--- a/drivers/net/cxgb3/version.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/version.h      Wed May 06 16:56:24 2009 +0100
 @@ -35,7 +35,7 @@
  #define DRV_DESC "Chelsio T3 Network Driver"
  #define DRV_NAME "cxgb3"
@@ -227193,9 +226983,9 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/version.h linux-2.6.27.19-5.1/drivers/
  
  /* Firmware version */
  #define FW_VERSION_MAJOR 7
-diff -purN linux-2.6.27/drivers/net/cxgb3/vsc8211.c linux-2.6.27.19-5.1/drivers/net/cxgb3/vsc8211.c
---- linux-2.6.27/drivers/net/cxgb3/vsc8211.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/cxgb3/vsc8211.c    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/cxgb3/vsc8211.c
+--- a/drivers/net/cxgb3/vsc8211.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/cxgb3/vsc8211.c      Wed May 06 16:56:25 2009 +0100
 @@ -33,28 +33,40 @@
  
  /* VSC8211 PHY specific registers. */
@@ -227249,7 +227039,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/vsc8211.c linux-2.6.27.19-5.1/drivers/
                           VSC_INTR_NEG_DONE)
  #define INTR_MASK (CFG_CHG_INTR_MASK | VSC_INTR_TX_FIFO | VSC_INTR_RX_FIFO | \
                   VSC_INTR_ENABLE)
-@@ -184,6 +196,112 @@ static int vsc8211_get_link_status(struc
+@@ -184,6 +196,112 @@
        return 0;
  }
  
@@ -227362,7 +227152,7 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/vsc8211.c linux-2.6.27.19-5.1/drivers/
  static int vsc8211_power_down(struct cphy *cphy, int enable)
  {
        return t3_mdio_change_bits(cphy, 0, MII_BMCR, BMCR_PDOWN,
-@@ -221,8 +339,66 @@ static struct cphy_ops vsc8211_ops = {
+@@ -221,8 +339,66 @@
        .power_down = vsc8211_power_down,
  };
  
@@ -227432,10 +227222,10 @@ diff -purN linux-2.6.27/drivers/net/cxgb3/vsc8211.c linux-2.6.27.19-5.1/drivers/
 +      udelay(5); /* delay after reset before next SMI */
 +      return 0;
  }
-diff -purN linux-2.6.27/drivers/net/e1000/e1000_ethtool.c linux-2.6.27.19-5.1/drivers/net/e1000/e1000_ethtool.c
---- linux-2.6.27/drivers/net/e1000/e1000_ethtool.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000/e1000_ethtool.c      2009-03-25 16:11:03.000000000 +0000
-@@ -1774,7 +1774,8 @@ static void e1000_get_wol(struct net_dev
+diff -r 9608d5473017 drivers/net/e1000/e1000_ethtool.c
+--- a/drivers/net/e1000/e1000_ethtool.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000/e1000_ethtool.c        Wed May 06 16:56:25 2009 +0100
+@@ -1774,7 +1774,8 @@
  
        /* this function will set ->supported = 0 and return 1 if wol is not
         * supported by this hardware */
@@ -227445,7 +227235,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_ethtool.c linux-2.6.27.19-5.1/dr
                return;
  
        /* apply any specific unsupported masks here */
-@@ -1811,7 +1812,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1811,7 +1812,8 @@
        if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
                return -EOPNOTSUPP;
  
@@ -227455,18 +227245,18 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_ethtool.c linux-2.6.27.19-5.1/dr
                return wol->wolopts ? -EOPNOTSUPP : 0;
  
        switch (hw->device_id) {
-@@ -1838,6 +1840,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1837,6 +1839,8 @@
+               adapter->wol |= E1000_WUFC_BC;
        if (wol->wolopts & WAKE_MAGIC)
                adapter->wol |= E1000_WUFC_MAG;
-+      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 +
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
        return 0;
  }
-diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drivers/net/e1000/e1000_main.c
---- linux-2.6.27/drivers/net/e1000/e1000_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000/e1000_main.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000/e1000_main.c
+--- a/drivers/net/e1000/e1000_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000/e1000_main.c   Wed May 06 16:56:25 2009 +0100
 @@ -31,7 +31,7 @@
  
  char e1000_driver_name[] = "e1000";
@@ -227476,7 +227266,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
  const char e1000_driver_version[] = DRV_VERSION;
  static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
  
-@@ -927,7 +927,7 @@ static int __devinit e1000_probe(struct 
+@@ -927,7 +927,7 @@
                err = pci_enable_device(pdev);
        } else {
                bars = pci_select_bars(pdev, IORESOURCE_MEM);
@@ -227485,7 +227275,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
        }
        if (err)
                return err;
-@@ -1180,6 +1180,7 @@ static int __devinit e1000_probe(struct 
+@@ -1180,6 +1180,7 @@
  
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
@@ -227493,7 +227283,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
  
        /* print bus type/speed/width info */
        DPRINTK(PROBE, INFO, "(PCI%s:%s:%s) ",
-@@ -3834,7 +3835,7 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -3834,7 +3835,7 @@
        struct e1000_hw *hw = &adapter->hw;
        u32 rctl, icr = er32(ICR);
  
@@ -227502,7 +227292,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
                return IRQ_NONE;  /* Not our interrupt */
  
        /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
-@@ -4347,12 +4348,8 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -4347,12 +4348,8 @@
                        pci_unmap_page(pdev, ps_page_dma->ps_page_dma[j],
                                        PAGE_SIZE, PCI_DMA_FROMDEVICE);
                        ps_page_dma->ps_page_dma[j] = 0;
@@ -227516,7 +227306,7 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
                }
  
                /* strip the ethernet crc, problem is we're using pages now so
-@@ -4551,7 +4548,7 @@ static void e1000_alloc_rx_buffers_ps(st
+@@ -4551,7 +4548,7 @@
                        if (j < adapter->rx_ps_pages) {
                                if (likely(!ps_page->ps_page[j])) {
                                        ps_page->ps_page[j] =
@@ -227525,9 +227315,9 @@ diff -purN linux-2.6.27/drivers/net/e1000/e1000_main.c linux-2.6.27.19-5.1/drive
                                        if (unlikely(!ps_page->ps_page[j])) {
                                                adapter->alloc_rx_buff_failed++;
                                                goto no_buffers;
-diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/net/e1000e/82571.c
---- linux-2.6.27/drivers/net/e1000e/82571.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/82571.c     2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/82571.c
+--- a/drivers/net/e1000e/82571.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/82571.c       Wed May 06 16:56:25 2009 +0100
 @@ -38,6 +38,7 @@
   * 82573V Gigabit Ethernet Controller (Copper)
   * 82573E Gigabit Ethernet Controller (Copper)
@@ -227545,7 +227335,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
  static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
  static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
  static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
-@@ -63,6 +66,8 @@ static s32 e1000_fix_nvm_checksum_82571(
+@@ -63,6 +66,8 @@
  static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
  static s32 e1000_setup_link_82571(struct e1000_hw *hw);
  static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
@@ -227554,7 +227344,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
  
  /**
   *  e1000_init_phy_params_82571 - Init PHY func ptrs.
-@@ -92,6 +97,9 @@ static s32 e1000_init_phy_params_82571(s
+@@ -92,6 +97,9 @@
        case e1000_82573:
                phy->type                = e1000_phy_m88;
                break;
@@ -227564,18 +227354,18 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
        default:
                return -E1000_ERR_PHY;
                break;
-@@ -111,6 +119,10 @@ static s32 e1000_init_phy_params_82571(s
-               if (phy->id != M88E1111_I_PHY_ID)
-                       return -E1000_ERR_PHY;
+@@ -109,6 +117,10 @@
                break;
-+      case e1000_82574:
-+              if (phy->id != BME1000_E_PHY_ID_R2)
+       case e1000_82573:
+               if (phy->id != M88E1111_I_PHY_ID)
 +                      return -E1000_ERR_PHY;
 +              break;
-       default:
-               return -E1000_ERR_PHY;
++      case e1000_82574:
++              if (phy->id != BME1000_E_PHY_ID_R2)
+                       return -E1000_ERR_PHY;
                break;
-@@ -150,6 +162,7 @@ static s32 e1000_init_nvm_params_82571(s
+       default:
+@@ -150,6 +162,7 @@
  
        switch (hw->mac.type) {
        case e1000_82573:
@@ -227583,7 +227373,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                if (((eecd >> 15) & 0x3) == 0x3) {
                        nvm->type = e1000_nvm_flash_hw;
                        nvm->word_size = 2048;
-@@ -245,6 +258,17 @@ static s32 e1000_init_mac_params_82571(s
+@@ -245,6 +258,17 @@
                break;
        }
  
@@ -227601,7 +227391,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
        return 0;
  }
  
-@@ -330,6 +354,8 @@ static s32 e1000_get_variants_82571(stru
+@@ -330,6 +354,8 @@
  static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
  {
        struct e1000_phy_info *phy = &hw->phy;
@@ -227610,10 +227400,11 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
  
        switch (hw->mac.type) {
        case e1000_82571:
-@@ -345,6 +371,20 @@ static s32 e1000_get_phy_id_82571(struct
+@@ -344,6 +370,20 @@
+               break;
        case e1000_82573:
                return e1000e_get_phy_id(hw);
-               break;
++              break;
 +      case e1000_82574:
 +              ret_val = e1e_rphy(hw, PHY_ID1, &phy_id);
 +              if (ret_val)
@@ -227627,11 +227418,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
 +
 +              phy->id |= (u32)(phy_id);
 +              phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
-+              break;
+               break;
        default:
                return -E1000_ERR_PHY;
-               break;
-@@ -421,7 +461,7 @@ static s32 e1000_acquire_nvm_82571(struc
+@@ -421,7 +461,7 @@
        if (ret_val)
                return ret_val;
  
@@ -227640,7 +227430,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                ret_val = e1000e_acquire_nvm(hw);
  
        if (ret_val)
-@@ -461,6 +501,7 @@ static s32 e1000_write_nvm_82571(struct 
+@@ -461,6 +501,7 @@
  
        switch (hw->mac.type) {
        case e1000_82573:
@@ -227648,7 +227438,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
                break;
        case e1000_82571:
-@@ -735,7 +776,7 @@ static s32 e1000_reset_hw_82571(struct e
+@@ -735,7 +776,7 @@
         * Must acquire the MDIO ownership before MAC reset.
         * Ownership defaults to firmware after a reset.
         */
@@ -227657,7 +227447,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                extcnf_ctrl = er32(EXTCNF_CTRL);
                extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
  
-@@ -776,7 +817,7 @@ static s32 e1000_reset_hw_82571(struct e
+@@ -776,7 +817,7 @@
         * Need to wait for Phy configuration completion before accessing
         * NVM and Phy.
         */
@@ -227666,7 +227456,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                msleep(25);
  
        /* Clear any pending interrupt events. */
-@@ -843,7 +884,7 @@ static s32 e1000_init_hw_82571(struct e1
+@@ -843,7 +884,7 @@
        ew32(TXDCTL(0), reg_data);
  
        /* ...for both queues. */
@@ -227675,7 +227465,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                reg_data = er32(TXDCTL(1));
                reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
                           E1000_TXDCTL_FULL_TX_DESC_WB |
-@@ -918,19 +959,34 @@ static void e1000_initialize_hw_bits_825
+@@ -918,19 +959,34 @@
        }
  
        /* Device Control */
@@ -227712,7 +227502,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
  }
  
  /**
-@@ -947,7 +1003,7 @@ void e1000e_clear_vfta(struct e1000_hw *
+@@ -947,7 +1003,7 @@
        u32 vfta_offset = 0;
        u32 vfta_bit_in_reg = 0;
  
@@ -227721,10 +227511,13 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                if (hw->mng_cookie.vlan_id != 0) {
                        /*
                         * The VFTA is a 4096b bit-field, each identifying
-@@ -976,6 +1032,48 @@ void e1000e_clear_vfta(struct e1000_hw *
- }
- /**
+@@ -973,6 +1029,48 @@
+               E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
+               e1e_flush();
+       }
++}
++
++/**
 + *  e1000_check_mng_mode_82574 - Check manageability is enabled
 + *  @hw: pointer to the HW structure
 + *
@@ -227764,13 +227557,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
 +      ew32(LEDCTL, ctrl);
 +
 +      return 0;
-+}
-+
-+/**
-  *  e1000_update_mc_addr_list_82571 - Update Multicast addresses
-  *  @hw: pointer to the HW structure
-  *  @mc_addr_list: array of multicast addresses to program
-@@ -1018,7 +1116,8 @@ static s32 e1000_setup_link_82571(struct
+ }
+ /**
+@@ -1018,7 +1116,8 @@
         * the default flow control setting, so we explicitly
         * set it to full.
         */
@@ -227780,7 +227570,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                hw->fc.type = e1000_fc_full;
  
        return e1000e_setup_link(hw);
-@@ -1045,6 +1144,7 @@ static s32 e1000_setup_copper_link_82571
+@@ -1045,6 +1144,7 @@
  
        switch (hw->phy.type) {
        case e1000_phy_m88:
@@ -227788,7 +227578,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                ret_val = e1000e_copper_link_setup_m88(hw);
                break;
        case e1000_phy_igp_2:
-@@ -1114,11 +1214,10 @@ static s32 e1000_valid_led_default_82571
+@@ -1114,11 +1214,10 @@
                return ret_val;
        }
  
@@ -227802,7 +227592,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
                *data = ID_LED_DEFAULT;
  
        return 0;
-@@ -1265,13 +1364,13 @@ static void e1000_clear_hw_cntrs_82571(s
+@@ -1265,13 +1364,13 @@
  }
  
  static struct e1000_mac_operations e82571_mac_ops = {
@@ -227818,10 +227608,12 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
        .led_off                = e1000e_led_off_generic,
        .update_mc_addr_list    = e1000_update_mc_addr_list_82571,
        .reset_hw               = e1000_reset_hw_82571,
-@@ -1312,6 +1411,22 @@ static struct e1000_phy_operations e82_p
+@@ -1310,6 +1409,22 @@
+       .set_d0_lplu_state      = e1000_set_d0_lplu_state_82571,
+       .set_d3_lplu_state      = e1000e_set_d3_lplu_state,
        .write_phy_reg          = e1000e_write_phy_reg_m88,
- };
++};
++
 +static struct e1000_phy_operations e82_phy_ops_bm = {
 +      .acquire_phy            = e1000_get_hw_semaphore_82571,
 +      .check_reset_block      = e1000e_check_reset_block_generic,
@@ -227836,12 +227628,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
 +      .set_d0_lplu_state      = e1000_set_d0_lplu_state_82571,
 +      .set_d3_lplu_state      = e1000e_set_d3_lplu_state,
 +      .write_phy_reg          = e1000e_write_phy_reg_bm2,
-+};
-+
+ };
  static struct e1000_nvm_operations e82571_nvm_ops = {
-       .acquire_nvm            = e1000_acquire_nvm_82571,
-       .read_nvm               = e1000e_read_nvm_eerd,
-@@ -1375,3 +1490,21 @@ struct e1000_info e1000_82573_info = {
+@@ -1375,3 +1490,21 @@
        .nvm_ops                = &e82571_nvm_ops,
  };
  
@@ -227863,9 +227653,9 @@ diff -purN linux-2.6.27/drivers/net/e1000e/82571.c linux-2.6.27.19-5.1/drivers/n
 +      .nvm_ops                = &e82571_nvm_ops,
 +};
 +
-diff -purN linux-2.6.27/drivers/net/e1000e/defines.h linux-2.6.27.19-5.1/drivers/net/e1000e/defines.h
---- linux-2.6.27/drivers/net/e1000e/defines.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/defines.h   2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/defines.h
+--- a/drivers/net/e1000e/defines.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/defines.h     Wed May 06 16:56:25 2009 +0100
 @@ -71,9 +71,11 @@
  #define E1000_CTRL_EXT_RO_DIS    0x00020000 /* Relaxed Ordering disable */
  #define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
@@ -227933,10 +227723,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/defines.h linux-2.6.27.19-5.1/drivers
  #define E1000_EECD_SIZE      0x00000200 /* NVM Size (0=64 word 1=256 word) */
  /* NVM Addressing bits based on type (0-small, 1-large) */
  #define E1000_EECD_ADDR_BITS 0x00000400
-diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/net/e1000e/e1000.h
---- linux-2.6.27/drivers/net/e1000e/e1000.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/e1000.h     2009-03-25 16:11:07.000000000 +0000
-@@ -62,6 +62,11 @@ struct e1000_info;
+diff -r 9608d5473017 drivers/net/e1000e/e1000.h
+--- a/drivers/net/e1000e/e1000.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/e1000.h       Wed May 06 16:56:25 2009 +0100
+@@ -62,6 +62,11 @@
        e_printk(KERN_NOTICE, adapter, format, ## arg)
  
  
@@ -227948,7 +227738,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  /* Tx/Rx descriptor defines */
  #define E1000_DEFAULT_TXD             256
  #define E1000_MAX_TXD                 4096
-@@ -95,9 +100,11 @@ enum e1000_boards {
+@@ -95,9 +100,11 @@
        board_82571,
        board_82572,
        board_82573,
@@ -227960,20 +227750,20 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  };
  
  struct e1000_queue_stats {
-@@ -146,6 +153,12 @@ struct e1000_ring {
+@@ -145,6 +152,12 @@
        /* array of buffer information structs */
        struct e1000_buffer *buffer_info;
++
 +      char name[IFNAMSIZ + 5];
 +      u32 ims_val;
 +      u32 itr_val;
 +      u16 itr_register;
 +      int set_itr;
-+
        struct sk_buff *rx_skb_top;
  
-       struct e1000_queue_stats stats;
-@@ -273,6 +286,9 @@ struct e1000_adapter {
+@@ -273,6 +286,9 @@
        u32 test_icr;
  
        u32 msg_enable;
@@ -227983,7 +227773,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  
        u32 eeprom_wol;
        u32 wol;
-@@ -283,6 +299,7 @@ struct e1000_adapter {
+@@ -283,6 +299,7 @@
        unsigned long led_status;
  
        unsigned int flags;
@@ -227991,7 +227781,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
        struct work_struct downshift_task;
        struct work_struct update_phy_task;
  };
-@@ -290,6 +307,7 @@ struct e1000_adapter {
+@@ -290,6 +307,7 @@
  struct e1000_info {
        enum e1000_mac_type     mac;
        unsigned int            flags;
@@ -227999,7 +227789,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
        u32                     pba;
        s32                     (*get_variants)(struct e1000_adapter *);
        struct e1000_mac_operations *mac_ops;
-@@ -308,6 +326,7 @@ struct e1000_info {
+@@ -308,6 +326,7 @@
  #define FLAG_HAS_JUMBO_FRAMES             (1 << 7)
  #define FLAG_READ_ONLY_NVM                (1 << 8)
  #define FLAG_IS_ICH                       (1 << 9)
@@ -228007,17 +227797,17 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  #define FLAG_HAS_SMART_POWER_DOWN         (1 << 11)
  #define FLAG_IS_QUAD_PORT_A               (1 << 12)
  #define FLAG_IS_QUAD_PORT                 (1 << 13)
-@@ -330,6 +349,9 @@ struct e1000_info {
+@@ -329,6 +348,9 @@
+ #define FLAG_TSO_FORCE                    (1 << 29)
  #define FLAG_RX_RESTART_NOW               (1 << 30)
  #define FLAG_MSI_TEST_FAILED              (1 << 31)
++
 +/* CRC Stripping defines */
 +#define FLAG2_CRC_STRIPPING               (1 << 0)
-+
  #define E1000_RX_DESC_PS(R, i)            \
        (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
- #define E1000_GET_DESC(R, i, type)    (&(((struct type *)((R).desc))[i]))
-@@ -366,6 +388,8 @@ extern int e1000e_setup_tx_resources(str
+@@ -366,6 +388,8 @@
  extern void e1000e_free_rx_resources(struct e1000_adapter *adapter);
  extern void e1000e_free_tx_resources(struct e1000_adapter *adapter);
  extern void e1000e_update_stats(struct e1000_adapter *adapter);
@@ -228026,7 +227816,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  
  extern unsigned int copybreak;
  
-@@ -374,8 +398,10 @@ extern char *e1000e_get_hw_dev_name(stru
+@@ -374,8 +398,10 @@
  extern struct e1000_info e1000_82571_info;
  extern struct e1000_info e1000_82572_info;
  extern struct e1000_info e1000_82573_info;
@@ -228037,7 +227827,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  extern struct e1000_info e1000_es2_info;
  
  extern s32 e1000e_read_pba_num(struct e1000_hw *hw, u32 *pba_num);
-@@ -449,10 +475,13 @@ extern s32 e1000e_get_cable_length_m88(s
+@@ -449,10 +475,13 @@
  extern s32 e1000e_get_phy_info_m88(struct e1000_hw *hw);
  extern s32 e1000e_read_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 *data);
  extern s32 e1000e_write_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 data);
@@ -228051,7 +227841,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  extern void e1000e_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl);
  extern s32 e1000e_write_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 data);
  extern s32 e1000e_read_kmrn_reg(struct e1000_hw *hw, u32 offset, u16 *data);
-@@ -523,7 +552,12 @@ static inline s32 e1000_get_phy_info(str
+@@ -523,7 +552,12 @@
        return hw->phy.ops.get_phy_info(hw);
  }
  
@@ -228065,10 +227855,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/e1000.h linux-2.6.27.19-5.1/drivers/n
  extern bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw);
  extern s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length);
  
-diff -purN linux-2.6.27/drivers/net/e1000e/es2lan.c linux-2.6.27.19-5.1/drivers/net/e1000e/es2lan.c
---- linux-2.6.27/drivers/net/e1000e/es2lan.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/es2lan.c    2009-03-25 16:11:07.000000000 +0000
-@@ -1247,7 +1247,7 @@ static void e1000_clear_hw_cntrs_80003es
+diff -r 9608d5473017 drivers/net/e1000e/es2lan.c
+--- a/drivers/net/e1000e/es2lan.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/es2lan.c      Wed May 06 16:56:25 2009 +0100
+@@ -1247,7 +1247,7 @@
  }
  
  static struct e1000_mac_operations es2_mac_ops = {
@@ -228077,10 +227867,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/es2lan.c linux-2.6.27.19-5.1/drivers/
        /* check_for_link dependent on media type */
        .cleanup_led            = e1000e_cleanup_led_generic,
        .clear_hw_cntrs         = e1000_clear_hw_cntrs_80003es2lan,
-diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers/net/e1000e/ethtool.c
---- linux-2.6.27/drivers/net/e1000e/ethtool.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/ethtool.c   2009-03-25 16:11:07.000000000 +0000
-@@ -575,6 +575,7 @@ static int e1000_set_eeprom(struct net_d
+diff -r 9608d5473017 drivers/net/e1000e/ethtool.c
+--- a/drivers/net/e1000e/ethtool.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/ethtool.c     Wed May 06 16:56:25 2009 +0100
+@@ -575,6 +575,7 @@
         * and flush shadow RAM for 82573 controllers
         */
        if ((ret_val == 0) && ((first_word <= NVM_CHECKSUM_REG) ||
@@ -228088,7 +227878,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
                               (hw->mac.type == e1000_82573)))
                e1000e_update_nvm_checksum(hw);
  
-@@ -786,8 +787,10 @@ static int e1000_reg_test(struct e1000_a
+@@ -786,8 +787,10 @@
                toggle = 0x7FFFF3FF;
                break;
        case e1000_82573:
@@ -228099,7 +227889,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
                toggle = 0x7FFFF033;
                break;
        default:
-@@ -840,7 +843,9 @@ static int e1000_reg_test(struct e1000_a
+@@ -840,7 +843,9 @@
        REG_PATTERN_TEST(E1000_TIDV, 0x0000FFFF, 0x0000FFFF);
        for (i = 0; i < mac->rar_entry_count; i++)
                REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1),
@@ -228110,7 +227900,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
  
        for (i = 0; i < mac->mta_reg_count; i++)
                REG_PATTERN_TEST_ARRAY(E1000_MTA, i, 0xFFFFFFFF, 0xFFFFFFFF);
-@@ -891,10 +896,18 @@ static int e1000_intr_test(struct e1000_
+@@ -891,10 +896,18 @@
        u32 shared_int = 1;
        u32 irq = adapter->pdev->irq;
        int i;
@@ -228130,7 +227920,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
        /* Hook up test interrupt handler just for this test */
        if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name,
                         netdev)) {
-@@ -902,7 +915,8 @@ static int e1000_intr_test(struct e1000_
+@@ -902,7 +915,8 @@
        } else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
                 netdev->name, netdev)) {
                *data = 1;
@@ -228140,7 +227930,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
        }
        e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared"));
  
-@@ -912,12 +926,23 @@ static int e1000_intr_test(struct e1000_
+@@ -912,11 +926,22 @@
  
        /* Test each interrupt */
        for (i = 0; i < 10; i++) {
@@ -228149,7 +227939,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
 -
                /* Interrupt to test */
                mask = 1 << i;
++
 +              if (adapter->flags & FLAG_IS_ICH) {
 +                      switch (mask) {
 +                      case E1000_ICR_RXSEQ:
@@ -228163,11 +227953,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
 +                              break;
 +                      }
 +              }
-+
                if (!shared_int) {
                        /*
-                        * Disable the interrupt to be reported in
-@@ -981,7 +1006,14 @@ static int e1000_intr_test(struct e1000_
+@@ -981,7 +1006,14 @@
        /* Unhook test interrupt handler */
        free_irq(irq, netdev);
  
@@ -228183,7 +227972,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
  }
  
  static void e1000_free_desc_rings(struct e1000_adapter *adapter)
-@@ -1681,7 +1713,8 @@ static void e1000_get_wol(struct net_dev
+@@ -1681,7 +1713,8 @@
        wol->supported = 0;
        wol->wolopts = 0;
  
@@ -228193,7 +227982,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
                return;
  
        wol->supported = WAKE_UCAST | WAKE_MCAST |
-@@ -1719,7 +1752,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1719,7 +1752,8 @@
        if (wol->wolopts & WAKE_MAGICSECURE)
                return -EOPNOTSUPP;
  
@@ -228203,16 +227992,16 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
                return wol->wolopts ? -EOPNOTSUPP : 0;
  
        /* these settings will always override what we currently have */
-@@ -1738,6 +1772,8 @@ static int e1000_set_wol(struct net_devi
+@@ -1737,6 +1771,8 @@
+               adapter->wol |= E1000_WUFC_LNKC;
        if (wol->wolopts & WAKE_ARP)
                adapter->wol |= E1000_WUFC_ARP;
-+      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 +
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
        return 0;
  }
-@@ -1762,11 +1798,13 @@ static void e1000_led_blink_callback(uns
+@@ -1762,11 +1798,13 @@
  static int e1000_phys_id(struct net_device *netdev, u32 data)
  {
        struct e1000_adapter *adapter = netdev_priv(netdev);
@@ -228227,7 +228016,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
                if (!adapter->blink_timer.function) {
                        init_timer(&adapter->blink_timer);
                        adapter->blink_timer.function =
-@@ -1776,16 +1814,16 @@ static int e1000_phys_id(struct net_devi
+@@ -1776,16 +1814,16 @@
                mod_timer(&adapter->blink_timer, jiffies);
                msleep_interruptible(data * 1000);
                del_timer_sync(&adapter->blink_timer);
@@ -228249,10 +228038,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ethtool.c linux-2.6.27.19-5.1/drivers
  
        return 0;
  }
-diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/e1000e/hw.h
---- linux-2.6.27/drivers/net/e1000e/hw.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/hw.h        2009-03-25 16:11:07.000000000 +0000
-@@ -65,7 +65,11 @@ enum e1e_registers {
+diff -r 9608d5473017 drivers/net/e1000e/hw.h
+--- a/drivers/net/e1000e/hw.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/hw.h  Wed May 06 16:56:25 2009 +0100
+@@ -65,7 +65,11 @@
        E1000_ICS      = 0x000C8, /* Interrupt Cause Set - WO */
        E1000_IMS      = 0x000D0, /* Interrupt Mask Set - RW */
        E1000_IMC      = 0x000D8, /* Interrupt Mask Clear - WO */
@@ -228264,7 +228053,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
        E1000_RCTL     = 0x00100, /* Rx Control - RW */
        E1000_FCTTV    = 0x00170, /* Flow Control Transmit Timer Value - RW */
        E1000_TXCW     = 0x00178, /* Tx Configuration Word - RW */
-@@ -83,6 +87,7 @@ enum e1e_registers {
+@@ -83,6 +87,7 @@
        E1000_EEMNGCTL = 0x01010, /* MNG EEprom Control */
        E1000_EEWR     = 0x0102C, /* EEPROM Write Register - RW */
        E1000_FLOP     = 0x0103C, /* FLASH Opcode Register */
@@ -228272,7 +228061,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
        E1000_ERT      = 0x02008, /* Early Rx Threshold - RW */
        E1000_FCRTL    = 0x02160, /* Flow Control Receive Threshold Low - RW */
        E1000_FCRTH    = 0x02168, /* Flow Control Receive Threshold High - RW */
-@@ -332,6 +337,7 @@ enum e1e_registers {
+@@ -332,6 +337,7 @@
  #define E1000_DEV_ID_82573E                   0x108B
  #define E1000_DEV_ID_82573E_IAMT              0x108C
  #define E1000_DEV_ID_82573L                   0x109A
@@ -228280,7 +228069,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
  
  #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT   0x1096
  #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT   0x1098
-@@ -346,6 +352,7 @@ enum e1e_registers {
+@@ -346,6 +352,7 @@
  #define E1000_DEV_ID_ICH8_IFE_G                       0x10C5
  #define E1000_DEV_ID_ICH8_IGP_M                       0x104D
  #define E1000_DEV_ID_ICH9_IGP_AMT             0x10BD
@@ -228288,7 +228077,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
  #define E1000_DEV_ID_ICH9_IGP_M_AMT           0x10F5
  #define E1000_DEV_ID_ICH9_IGP_M                       0x10BF
  #define E1000_DEV_ID_ICH9_IGP_M_V             0x10CB
-@@ -356,6 +363,10 @@ enum e1e_registers {
+@@ -356,6 +363,10 @@
  #define E1000_DEV_ID_ICH10_R_BM_LM            0x10CC
  #define E1000_DEV_ID_ICH10_R_BM_LF            0x10CD
  #define E1000_DEV_ID_ICH10_R_BM_V             0x10CE
@@ -228299,7 +228088,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
  
  #define E1000_FUNC_1 1
  
-@@ -363,9 +374,11 @@ enum e1000_mac_type {
+@@ -363,9 +374,11 @@
        e1000_82571,
        e1000_82572,
        e1000_82573,
@@ -228311,7 +228100,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
  };
  
  enum e1000_media_type {
-@@ -696,8 +709,7 @@ struct e1000_host_mng_command_info {
+@@ -696,8 +709,7 @@
  
  /* Function pointers and static data for the MAC. */
  struct e1000_mac_operations {
@@ -228321,9 +228110,9 @@ diff -purN linux-2.6.27/drivers/net/e1000e/hw.h linux-2.6.27.19-5.1/drivers/net/
        s32  (*check_for_link)(struct e1000_hw *);
        s32  (*cleanup_led)(struct e1000_hw *);
        void (*clear_hw_cntrs)(struct e1000_hw *);
-diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers/net/e1000e/ich8lan.c
---- linux-2.6.27/drivers/net/e1000e/ich8lan.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/ich8lan.c   2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/e1000e/ich8lan.c
+--- a/drivers/net/e1000e/ich8lan.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/ich8lan.c     Wed May 06 16:56:25 2009 +0100
 @@ -43,7 +43,9 @@
   * 82567LM-2 Gigabit Network Connection
   * 82567LF-2 Gigabit Network Connection
@@ -228335,7 +228124,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
   */
  
  #include <linux/netdevice.h>
-@@ -171,12 +173,15 @@ static s32 e1000_check_polarity_ife_ich8
+@@ -171,12 +173,15 @@
  static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank);
  static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw,
                                                u32 offset, u8 byte);
@@ -228351,10 +228140,13 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
  
  static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg)
  {
-@@ -448,6 +453,22 @@ static void e1000_release_swflag_ich8lan
- }
+@@ -445,6 +450,22 @@
  
- /**
+       nvm_owner = -1;
+       mutex_unlock(&nvm_mutex);
++}
++
++/**
 + *  e1000_check_mng_mode_ich8lan - Checks management mode
 + *  @hw: pointer to the HW structure
 + *
@@ -228368,13 +228160,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
 +
 +      return (fwsm & E1000_FWSM_MODE_MASK) ==
 +              (E1000_ICH_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT);
-+}
-+
-+/**
-  *  e1000_check_reset_block_ich8lan - Check if PHY reset is blocked
-  *  @hw: pointer to the HW structure
-  *
-@@ -928,6 +949,56 @@ static s32 e1000_set_d3_lplu_state_ich8l
+ }
+ /**
+@@ -928,6 +949,56 @@
  }
  
  /**
@@ -228431,7 +228220,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
   *  e1000_read_nvm_ich8lan - Read word(s) from the NVM
   *  @hw: pointer to the HW structure
   *  @offset: The offset (in bytes) of the word(s) to read.
-@@ -943,6 +1014,7 @@ static s32 e1000_read_nvm_ich8lan(struct
+@@ -943,6 +1014,7 @@
        struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
        u32 act_offset;
        s32 ret_val;
@@ -228439,7 +228228,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
        u16 i, word;
  
        if ((offset >= nvm->word_size) || (words > nvm->word_size - offset) ||
-@@ -955,10 +1027,11 @@ static s32 e1000_read_nvm_ich8lan(struct
+@@ -955,10 +1027,11 @@
        if (ret_val)
                return ret_val;
  
@@ -228455,7 +228244,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
        act_offset += offset;
  
        for (i = 0; i < words; i++) {
-@@ -1106,6 +1179,29 @@ static s32 e1000_read_flash_word_ich8lan
+@@ -1106,6 +1179,29 @@
  }
  
  /**
@@ -228485,7 +228274,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
   *  e1000_read_flash_data_ich8lan - Read byte or word from NVM
   *  @hw: pointer to the HW structure
   *  @offset: The offset (in bytes) of the byte or word to read.
-@@ -1236,7 +1332,7 @@ static s32 e1000_update_nvm_checksum_ich
+@@ -1236,7 +1332,7 @@
  {
        struct e1000_nvm_info *nvm = &hw->nvm;
        struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
@@ -228494,7 +228283,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
        s32 ret_val;
        u16 data;
  
-@@ -1256,7 +1352,11 @@ static s32 e1000_update_nvm_checksum_ich
+@@ -1256,7 +1352,11 @@
         * write to bank 0 etc.  We also need to erase the segment that
         * is going to be written
         */
@@ -228507,7 +228296,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
                new_bank_offset = nvm->flash_bank_size;
                old_bank_offset = 0;
                e1000_erase_flash_bank_ich8lan(hw, 1);
-@@ -1791,12 +1891,17 @@ static s32 e1000_reset_hw_ich8lan(struct
+@@ -1791,12 +1891,17 @@
                ctrl |= E1000_CTRL_PHY_RST;
        }
        ret_val = e1000_acquire_swflag_ich8lan(hw);
@@ -228527,7 +228316,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
  
        ret_val = e1000e_get_auto_rd_done(hw);
        if (ret_val) {
-@@ -2267,13 +2372,14 @@ void e1000e_gig_downshift_workaround_ich
+@@ -2267,13 +2372,14 @@
   *  'LPLU Enabled' and 'Gig Disable' to force link speed negotiation
   *  to a lower speed.
   *
@@ -228544,7 +228333,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
                phy_ctrl = er32(PHY_CTRL);
                phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU |
                            E1000_PHY_CTRL_GBE_DISABLE;
-@@ -2331,6 +2437,39 @@ static s32 e1000_led_off_ich8lan(struct 
+@@ -2331,6 +2437,39 @@
  }
  
  /**
@@ -228584,7 +228373,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
   *  e1000_clear_hw_cntrs_ich8lan - Clear statistical counters
   *  @hw: pointer to the HW structure
   *
-@@ -2360,7 +2499,7 @@ static void e1000_clear_hw_cntrs_ich8lan
+@@ -2360,7 +2499,7 @@
  }
  
  static struct e1000_mac_operations ich8_mac_ops = {
@@ -228593,7 +228382,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
        .check_for_link         = e1000e_check_for_copper_link,
        .cleanup_led            = e1000_cleanup_led_ich8lan,
        .clear_hw_cntrs         = e1000_clear_hw_cntrs_ich8lan,
-@@ -2380,7 +2519,7 @@ static struct e1000_phy_operations ich8_
+@@ -2380,7 +2519,7 @@
        .check_reset_block      = e1000_check_reset_block_ich8lan,
        .commit_phy             = NULL,
        .force_speed_duplex     = e1000_phy_force_speed_duplex_ich8lan,
@@ -228602,7 +228391,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
        .get_cable_length       = e1000e_get_cable_length_igp_2,
        .get_phy_info           = e1000_get_phy_info_ich8lan,
        .read_phy_reg           = e1000e_read_phy_reg_igp,
-@@ -2435,3 +2574,20 @@ struct e1000_info e1000_ich9_info = {
+@@ -2435,3 +2574,20 @@
        .nvm_ops                = &ich8_nvm_ops,
  };
  
@@ -228623,10 +228412,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/ich8lan.c linux-2.6.27.19-5.1/drivers
 +      .phy_ops                = &ich8_phy_ops,
 +      .nvm_ops                = &ich8_nvm_ops,
 +};
-diff -purN linux-2.6.27/drivers/net/e1000e/lib.c linux-2.6.27.19-5.1/drivers/net/e1000e/lib.c
---- linux-2.6.27/drivers/net/e1000e/lib.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/lib.c       2009-03-25 16:11:07.000000000 +0000
-@@ -2222,17 +2222,18 @@ static s32 e1000_mng_enable_host_if(stru
+diff -r 9608d5473017 drivers/net/e1000e/lib.c
+--- a/drivers/net/e1000e/lib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/lib.c Wed May 06 16:56:25 2009 +0100
+@@ -2222,17 +2222,18 @@
  }
  
  /**
@@ -228648,10 +228437,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/lib.c linux-2.6.27.19-5.1/drivers/net
  }
  
  /**
-diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/net/e1000e/netdev.c
---- linux-2.6.27/drivers/net/e1000e/netdev.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/netdev.c    2009-03-25 16:11:07.000000000 +0000
-@@ -55,9 +55,11 @@ static const struct e1000_info *e1000_in
+diff -r 9608d5473017 drivers/net/e1000e/netdev.c
+--- a/drivers/net/e1000e/netdev.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/netdev.c      Wed May 06 16:56:25 2009 +0100
+@@ -55,9 +55,11 @@
        [board_82571]           = &e1000_82571_info,
        [board_82572]           = &e1000_82572_info,
        [board_82573]           = &e1000_82573_info,
@@ -228663,7 +228452,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  };
  
  #ifdef DEBUG
-@@ -256,7 +258,7 @@ static void e1000_alloc_rx_buffers_ps(st
+@@ -256,7 +258,7 @@
                                continue;
                        }
                        if (!ps_page->page) {
@@ -228672,18 +228461,18 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
                                if (!ps_page->page) {
                                        adapter->alloc_rx_buff_failed++;
                                        goto no_buffers;
-@@ -497,6 +499,10 @@ static bool e1000_clean_rx_irq(struct e1
+@@ -496,6 +498,10 @@
+                       buffer_info->skb = skb;
                        goto next_desc;
                }
++
 +              /* adjust length to remove Ethernet CRC */
 +              if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
 +                      length -= 4;
-+
                total_rx_bytes += length;
                total_rx_packets++;
-@@ -802,6 +808,10 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -802,6 +808,10 @@
                        pci_dma_sync_single_for_device(pdev, ps_page->dma,
                                PAGE_SIZE, PCI_DMA_FROMDEVICE);
  
@@ -228694,7 +228483,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
                        skb_put(skb, l1);
                        goto copydone;
                } /* if */
-@@ -816,13 +826,16 @@ static bool e1000_clean_rx_irq_ps(struct
+@@ -816,12 +826,15 @@
                        pci_unmap_page(pdev, ps_page->dma, PAGE_SIZE,
                                       PCI_DMA_FROMDEVICE);
                        ps_page->dma = 0;
@@ -228704,18 +228493,18 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
 -                      skb->len += length;
 -                      skb->data_len += length;
 -                      skb->truesize += length;
-               }
+-              }
++              }
++
 +              /* strip the ethernet crc, problem is we're using pages now so
 +               * this whole operation can get a little cpu intensive
 +               */
 +              if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
 +                      pskb_trim(skb, skb->len - 4);
-+
  copydone:
                total_rx_bytes += skb->len;
-               total_rx_packets++;
-@@ -1187,8 +1200,8 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1187,8 +1200,8 @@
        struct net_device *netdev = data;
        struct e1000_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
@@ -228725,7 +228514,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        if (!icr)
                return IRQ_NONE;  /* Not our interrupt */
  
-@@ -1244,6 +1257,263 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1244,6 +1257,263 @@
        return IRQ_HANDLED;
  }
  
@@ -228989,19 +228778,32 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  /**
   * e1000_request_irq - initialize interrupts
   *
-@@ -1253,29 +1523,33 @@ static irqreturn_t e1000_intr(int irq, v
+@@ -1253,28 +1523,32 @@
  static int e1000_request_irq(struct e1000_adapter *adapter)
  {
        struct net_device *netdev = adapter->netdev;
 -      int irq_flags = IRQF_SHARED;
-       int err;
+-      int err;
+-
 -      if (!(adapter->flags & FLAG_MSI_TEST_FAILED)) {
 -              err = pci_enable_msi(adapter->pdev);
 -              if (!err) {
 -                      adapter->flags |= FLAG_MSI_ENABLED;
 -                      irq_flags = 0;
 -              }
+-      }
+-
+-      err = request_irq(adapter->pdev->irq,
+-                        ((adapter->flags & FLAG_MSI_ENABLED) ?
+-                              &e1000_intr_msi : &e1000_intr),
+-                        irq_flags, netdev->name, netdev);
+-      if (err) {
+-              if (adapter->flags & FLAG_MSI_ENABLED) {
+-                      pci_disable_msi(adapter->pdev);
+-                      adapter->flags &= ~FLAG_MSI_ENABLED;
+-              }
++      int err;
++
 +      if (adapter->msix_entries) {
 +              err = e1000_request_msix(adapter);
 +              if (!err)
@@ -229010,44 +228812,30 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
 +              e1000e_reset_interrupt_capability(adapter);
 +              adapter->int_mode = E1000E_INT_MODE_MSI;
 +              e1000e_set_interrupt_capability(adapter);
-       }
++      }
 +      if (adapter->flags & FLAG_MSI_ENABLED) {
 +              err = request_irq(adapter->pdev->irq, &e1000_intr_msi, 0,
 +                                netdev->name, netdev);
 +              if (!err)
 +                      return err;
--      err = request_irq(adapter->pdev->irq,
--                        ((adapter->flags & FLAG_MSI_ENABLED) ?
--                              &e1000_intr_msi : &e1000_intr),
--                        irq_flags, netdev->name, netdev);
--      if (err) {
--              if (adapter->flags & FLAG_MSI_ENABLED) {
--                      pci_disable_msi(adapter->pdev);
--                      adapter->flags &= ~FLAG_MSI_ENABLED;
--              }
--              e_err("Unable to allocate interrupt, Error: %d\n", err);
++
 +              /* fall back to legacy interrupt */
 +              e1000e_reset_interrupt_capability(adapter);
 +              adapter->int_mode = E1000E_INT_MODE_LEGACY;
-       }
++      }
++
 +      err = request_irq(adapter->pdev->irq, &e1000_intr, IRQF_SHARED,
 +                        netdev->name, netdev);
 +      if (err)
-+              e_err("Unable to allocate interrupt, Error: %d\n", err);
-+
+               e_err("Unable to allocate interrupt, Error: %d\n", err);
+-      }
        return err;
  }
-@@ -1283,11 +1557,21 @@ static void e1000_free_irq(struct e1000_
+@@ -1283,11 +1557,21 @@
  {
        struct net_device *netdev = adapter->netdev;
  
--      free_irq(adapter->pdev->irq, netdev);
--      if (adapter->flags & FLAG_MSI_ENABLED) {
--              pci_disable_msi(adapter->pdev);
--              adapter->flags &= ~FLAG_MSI_ENABLED;
 +      if (adapter->msix_entries) {
 +              int vector = 0;
 +
@@ -229060,13 +228848,17 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
 +              /* Other Causes interrupt vector */
 +              free_irq(adapter->msix_entries[vector].vector, netdev);
 +              return;
-       }
++      }
 +
-+      free_irq(adapter->pdev->irq, netdev);
+       free_irq(adapter->pdev->irq, netdev);
+-      if (adapter->flags & FLAG_MSI_ENABLED) {
+-              pci_disable_msi(adapter->pdev);
+-              adapter->flags &= ~FLAG_MSI_ENABLED;
+-      }
  }
  
  /**
-@@ -1298,6 +1582,8 @@ static void e1000_irq_disable(struct e10
+@@ -1298,6 +1582,8 @@
        struct e1000_hw *hw = &adapter->hw;
  
        ew32(IMC, ~0);
@@ -229075,7 +228867,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        e1e_flush();
        synchronize_irq(adapter->pdev->irq);
  }
-@@ -1309,7 +1595,12 @@ static void e1000_irq_enable(struct e100
+@@ -1309,7 +1595,12 @@
  {
        struct e1000_hw *hw = &adapter->hw;
  
@@ -229089,7 +228881,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        e1e_flush();
  }
  
-@@ -1559,9 +1850,8 @@ void e1000e_free_rx_resources(struct e10
+@@ -1559,9 +1850,8 @@
   *      traffic pattern.  Constants in this function were computed
   *      based on theoretical maximum wire speed and thresholds were set based
   *      on testing data as well as attempting to minimize response time
@@ -229101,20 +228893,21 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
   **/
  static unsigned int e1000_update_itr(struct e1000_adapter *adapter,
                                     u16 itr_setting, int packets,
-@@ -1669,11 +1959,37 @@ set_itr_now:
+@@ -1669,8 +1959,34 @@
                             min(adapter->itr + (new_itr >> 2), new_itr) :
                             new_itr;
                adapter->itr = new_itr;
 -              ew32(ITR, 1000000000 / (new_itr * 256));
+-      }
 +              adapter->rx_ring->itr_val = new_itr;
 +              if (adapter->msix_entries)
 +                      adapter->rx_ring->set_itr = 1;
 +              else
 +                      ew32(ITR, 1000000000 / (new_itr * 256));
-       }
- }
- /**
++      }
++}
++
++/**
 + * e1000_alloc_queues - Allocate memory for all rings
 + * @adapter: board private structure to initialize
 + **/
@@ -229134,13 +228927,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
 +      kfree(adapter->rx_ring);
 +      kfree(adapter->tx_ring);
 +      return -ENOMEM;
-+}
-+
-+/**
-  * e1000_clean - NAPI Rx polling callback
-  * @napi: struct associated with this polling callback
-  * @budget: amount of packets driver is allowed to process this poll
-@@ -1681,12 +1997,17 @@ set_itr_now:
+ }
+ /**
+@@ -1681,11 +1997,16 @@
  static int e1000_clean(struct napi_struct *napi, int budget)
  {
        struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
@@ -229150,15 +228940,14 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        /* Must NOT use netdev_priv macro here. */
        adapter = poll_dev->priv;
++
 +      if (adapter->msix_entries &&
 +          !(adapter->rx_ring->ims_val & adapter->tx_ring->ims_val))
 +              goto clean_rx;
-+
        /*
         * e1000_clean is called per-cpu.  This lock protects
-        * tx_ring from being cleaned by multiple cpus
-@@ -1698,6 +2019,7 @@ static int e1000_clean(struct napi_struc
+@@ -1698,6 +2019,7 @@
                spin_unlock(&adapter->tx_queue_lock);
        }
  
@@ -229166,7 +228955,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        adapter->clean_rx(adapter, &work_done, budget);
  
        if (tx_cleaned)
-@@ -1708,7 +2030,10 @@ static int e1000_clean(struct napi_struc
+@@ -1708,7 +2030,10 @@
                if (adapter->itr_setting & 3)
                        e1000_set_itr(adapter);
                netif_rx_complete(poll_dev, napi);
@@ -229178,7 +228967,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        }
  
        return work_done;
-@@ -1987,8 +2312,12 @@ static void e1000_setup_rctl(struct e100
+@@ -1987,8 +2312,12 @@
        else
                rctl |= E1000_RCTL_LPE;
  
@@ -229193,7 +228982,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        /* Setup buffer sizes */
        rctl &= ~E1000_RCTL_SZ_4096;
-@@ -2504,6 +2833,8 @@ int e1000e_up(struct e1000_adapter *adap
+@@ -2504,6 +2833,8 @@
        clear_bit(__E1000_DOWN, &adapter->state);
  
        napi_enable(&adapter->napi);
@@ -229202,24 +228991,25 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        e1000_irq_enable(adapter);
  
        /* fire a link change interrupt to start the watchdog */
-@@ -2587,13 +2918,10 @@ static int __devinit e1000_sw_init(struc
+@@ -2587,13 +2918,10 @@
        adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
        adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
  
 -      adapter->tx_ring = kzalloc(sizeof(struct e1000_ring), GFP_KERNEL);
 -      if (!adapter->tx_ring)
 -              goto err;
-+      e1000e_set_interrupt_capability(adapter);
+-
 -      adapter->rx_ring = kzalloc(sizeof(struct e1000_ring), GFP_KERNEL);
 -      if (!adapter->rx_ring)
 -              goto err;
++      e1000e_set_interrupt_capability(adapter);
++
 +      if (e1000_alloc_queues(adapter))
 +              return -ENOMEM;
  
        spin_lock_init(&adapter->tx_queue_lock);
  
-@@ -2602,12 +2930,6 @@ static int __devinit e1000_sw_init(struc
+@@ -2602,12 +2930,6 @@
  
        set_bit(__E1000_DOWN, &adapter->state);
        return 0;
@@ -229232,7 +229022,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  }
  
  /**
-@@ -2649,6 +2971,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2649,6 +2971,7 @@
  
        /* free the real vector and request a test handler */
        e1000_free_irq(adapter);
@@ -229240,7 +229030,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        /* Assume that the test fails, if it succeeds then the test
         * MSI irq handler will unset this flag */
-@@ -2679,6 +3002,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2679,6 +3002,7 @@
        rmb();
  
        if (adapter->flags & FLAG_MSI_TEST_FAILED) {
@@ -229248,7 +229038,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
                err = -EIO;
                e_info("MSI interrupt test failed!\n");
        }
-@@ -2692,7 +3016,7 @@ static int e1000_test_msi_interrupt(stru
+@@ -2692,7 +3016,7 @@
        /* okay so the test worked, restore settings */
        e_dbg("%s: MSI interrupt test succeeded!\n", netdev->name);
  msi_test_failed:
@@ -229257,7 +229047,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        e1000_request_irq(adapter);
        return err;
  }
-@@ -2802,7 +3126,7 @@ static int e1000_open(struct net_device 
+@@ -2802,7 +3126,7 @@
         * ignore e1000e MSI messages, which means we need to test our MSI
         * interrupt now
         */
@@ -229266,7 +229056,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
                err = e1000_test_msi(adapter);
                if (err) {
                        e_err("Interrupt allocation failed\n");
-@@ -2997,7 +3321,8 @@ void e1000e_update_stats(struct e1000_ad
+@@ -2997,7 +3321,8 @@
  
        adapter->stats.algnerrc += er32(ALGNERRC);
        adapter->stats.rxerrc += er32(RXERRC);
@@ -229276,10 +229066,11 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        adapter->stats.cexterr += er32(CEXTERR);
        adapter->stats.tsctc += er32(TSCTC);
        adapter->stats.tsctfc += er32(TSCTFC);
-@@ -3193,6 +3518,27 @@ static void e1000_watchdog_task(struct w
+@@ -3192,6 +3517,27 @@
+                                                  &adapter->link_speed,
                                                   &adapter->link_duplex);
                        e1000_print_link_info(adapter);
-                       /*
++                      /*
 +                       * On supported PHYs, check for duplex mismatch only
 +                       * if link has autonegotiated at 10/100 half
 +                       */
@@ -229300,11 +229091,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
 +                                             "link gets many collisions.\n");
 +                      }
 +
-+                      /*
+                       /*
                         * tweak tx_queue_len according to speed/duplex
                         * and adjust the timeout factor
-                        */
-@@ -3307,7 +3653,10 @@ link_up:
+@@ -3307,7 +3653,10 @@
        }
  
        /* Cause software interrupt to ensure Rx ring is cleaned */
@@ -229316,7 +229106,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        /* Force detection of hung controller every watchdog period */
        adapter->detect_tx_hung = 1;
-@@ -4024,6 +4373,7 @@ static int e1000_suspend(struct pci_dev 
+@@ -4024,6 +4373,7 @@
                e1000e_down(adapter);
                e1000_free_irq(adapter);
        }
@@ -229324,7 +229114,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        retval = pci_save_state(pdev);
        if (retval)
-@@ -4150,6 +4500,7 @@ static int e1000_resume(struct pci_dev *
+@@ -4150,6 +4500,7 @@
        pci_enable_wake(pdev, PCI_D3hot, 0);
        pci_enable_wake(pdev, PCI_D3cold, 0);
  
@@ -229332,7 +229122,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        if (netif_running(netdev)) {
                err = e1000_request_irq(adapter);
                if (err)
-@@ -4412,6 +4763,7 @@ static int __devinit e1000_probe(struct 
+@@ -4412,6 +4763,7 @@
        adapter->ei = ei;
        adapter->pba = ei->pba;
        adapter->flags = ei->flags;
@@ -229340,7 +229130,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        adapter->hw.adapter = adapter;
        adapter->hw.mac.type = ei->mac;
        adapter->msg_enable = (1 << NETIF_MSG_DRV | NETIF_MSG_PROBE) - 1;
-@@ -4616,6 +4968,7 @@ static int __devinit e1000_probe(struct 
+@@ -4616,6 +4968,7 @@
  
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
@@ -229348,7 +229138,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
  
        /* reset the hardware with the new settings */
        e1000e_reset(adapter);
-@@ -4702,6 +5055,7 @@ static void __devexit e1000_remove(struc
+@@ -4702,6 +5055,7 @@
        if (!e1000_check_reset_block(&adapter->hw))
                e1000_phy_hw_reset(&adapter->hw);
  
@@ -229356,7 +229146,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        kfree(adapter->tx_ring);
        kfree(adapter->rx_ring);
  
-@@ -4743,6 +5097,8 @@ static struct pci_device_id e1000_pci_tb
+@@ -4743,6 +5097,8 @@
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82573E_IAMT), board_82573 },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82573L), board_82573 },
  
@@ -229365,7 +229155,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_DPT),
          board_80003es2lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_80003ES2LAN_COPPER_SPT),
-@@ -4765,6 +5121,7 @@ static struct pci_device_id e1000_pci_tb
+@@ -4765,6 +5121,7 @@
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_AMT), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_C), board_ich9lan },
@@ -229373,20 +229163,20 @@ diff -purN linux-2.6.27/drivers/net/e1000e/netdev.c linux-2.6.27.19-5.1/drivers/
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V), board_ich9lan },
-@@ -4773,6 +5130,9 @@ static struct pci_device_id e1000_pci_tb
+@@ -4772,6 +5129,9 @@
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF), board_ich9lan },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_V), board_ich9lan },
++
 +      { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LM), board_ich10lan },
 +      { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_D_BM_LF), board_ich10lan },
-+
        { }     /* terminate list */
  };
- MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
-diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/net/e1000e/param.c
---- linux-2.6.27/drivers/net/e1000e/param.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/param.c     2009-03-25 16:11:07.000000000 +0000
-@@ -114,6 +114,15 @@ E1000_PARAM(InterruptThrottleRate, "Inte
+diff -r 9608d5473017 drivers/net/e1000e/param.c
+--- a/drivers/net/e1000e/param.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/param.c       Wed May 06 16:56:25 2009 +0100
+@@ -114,6 +114,15 @@
  #define DEFAULT_ITR 3
  #define MAX_ITR 100000
  #define MIN_ITR 100
@@ -229402,10 +229192,11 @@ diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/n
  
  /*
   * Enable Smart Power Down of the PHY
-@@ -142,6 +151,16 @@ E1000_PARAM(KumeranLockLoss, "Enable Kum
+@@ -141,6 +150,16 @@
+  * Default Value: 1 (enabled)
   */
  E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
++
 +/*
 + * Enable CRC Stripping
 + *
@@ -229415,11 +229206,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/n
 + */
 +E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
 +                          "the CRC");
-+
  struct e1000_option {
        enum { enable_option, range_option, list_option } type;
-       const char *name;
-@@ -361,6 +380,24 @@ void __devinit e1000e_check_options(stru
+@@ -361,6 +380,24 @@
                        adapter->itr = 20000;
                }
        }
@@ -229444,10 +229234,12 @@ diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/n
        { /* Smart Power Down */
                const struct e1000_option opt = {
                        .type = enable_option,
-@@ -377,6 +414,21 @@ void __devinit e1000e_check_options(stru
+@@ -375,6 +412,21 @@
+                       if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN)
+                           && spd)
                                adapter->flags |= FLAG_SMART_POWER_DOWN;
-               }
-       }
++              }
++      }
 +      { /* CRC Stripping */
 +              const struct e1000_option opt = {
 +                      .type = enable_option,
@@ -229461,15 +229253,13 @@ diff -purN linux-2.6.27/drivers/net/e1000e/param.c linux-2.6.27.19-5.1/drivers/n
 +                      e1000_validate_option(&crc_stripping, &opt, adapter);
 +                      if (crc_stripping == OPTION_ENABLED)
 +                              adapter->flags2 |= FLAG2_CRC_STRIPPING;
-+              }
-+      }
+               }
+       }
        { /* Kumeran Lock Loss Workaround */
-               const struct e1000_option opt = {
-                       .type = enable_option,
-diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net/e1000e/phy.c
---- linux-2.6.27/drivers/net/e1000e/phy.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/e1000e/phy.c       2009-03-25 16:11:07.000000000 +0000
-@@ -476,7 +476,9 @@ s32 e1000e_copper_link_setup_m88(struct 
+diff -r 9608d5473017 drivers/net/e1000e/phy.c
+--- a/drivers/net/e1000e/phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/e1000e/phy.c Wed May 06 16:56:25 2009 +0100
+@@ -476,7 +476,9 @@
        if (ret_val)
                return ret_val;
  
@@ -229480,10 +229270,14 @@ diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net
                /*
                 * Force TX_CLK in the Extended PHY Specific Control Register
                 * to 25MHz clock.
-@@ -504,6 +506,18 @@ s32 e1000e_copper_link_setup_m88(struct 
-                       return ret_val;
-       }
+@@ -500,6 +502,18 @@
+                                    M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X);
+               }
+               ret_val = e1e_wphy(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
++              if (ret_val)
++                      return ret_val;
++      }
++
 +      if ((phy->type == e1000_phy_bm) && (phy->id == BME1000_E_PHY_ID_R2)) {
 +              /* Set PHY page 0, register 29 to 0x0003 */
 +              ret_val = e1e_wphy(hw, 29, 0x0003);
@@ -229492,14 +229286,10 @@ diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net
 +
 +              /* Set PHY page 0, register 30 to 0x0000 */
 +              ret_val = e1e_wphy(hw, 30, 0x0000);
-+              if (ret_val)
-+                      return ret_val;
-+      }
-+
-       /* Commit the changes. */
-       ret_val = e1000e_commit_phy(hw);
-       if (ret_val)
-@@ -1720,6 +1734,91 @@ s32 e1000e_get_cfg_done(struct e1000_hw 
+               if (ret_val)
+                       return ret_val;
+       }
+@@ -1720,6 +1734,91 @@
        return 0;
  }
  
@@ -229591,7 +229381,7 @@ diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net
  /* Internal function pointers */
  
  /**
-@@ -1969,6 +2068,99 @@ out:
+@@ -1969,6 +2068,99 @@
  }
  
  /**
@@ -229691,9 +229481,9 @@ diff -purN linux-2.6.27/drivers/net/e1000e/phy.c linux-2.6.27.19-5.1/drivers/net
   *  e1000_access_phy_wakeup_reg_bm - Read BM PHY wakeup register
   *  @hw: pointer to the HW structure
   *  @offset: register offset to be read or written
-diff -purN linux-2.6.27/drivers/net/ehea/ehea.h linux-2.6.27.19-5.1/drivers/net/ehea/ehea.h
---- linux-2.6.27/drivers/net/ehea/ehea.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea.h        2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/ehea/ehea.h
+--- a/drivers/net/ehea/ehea.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea.h  Wed May 06 16:56:25 2009 +0100
 @@ -40,13 +40,13 @@
  #include <asm/io.h>
  
@@ -229710,10 +229500,10 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea.h linux-2.6.27.19-5.1/drivers/net/
  
  #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
        | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_main.c
---- linux-2.6.27/drivers/net/ehea/ehea_main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_main.c   2009-03-25 16:11:04.000000000 +0000
-@@ -111,6 +111,19 @@ static int __devinit ehea_probe_adapter(
+diff -r 9608d5473017 drivers/net/ehea/ehea_main.c
+--- a/drivers/net/ehea/ehea_main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_main.c     Wed May 06 16:56:25 2009 +0100
+@@ -111,6 +111,19 @@
  
  static int __devexit ehea_remove(struct of_device *dev);
  
@@ -229733,7 +229523,7 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers
  static struct of_device_id ehea_device_table[] = {
        {
                .name = "lhea",
-@@ -118,10 +131,10 @@ static struct of_device_id ehea_device_t
+@@ -118,10 +131,10 @@
        },
        {},
  };
@@ -229745,7 +229535,7 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers
        .match_table = ehea_device_table,
        .probe = ehea_probe_adapter,
        .remove = ehea_remove,
-@@ -2863,7 +2876,7 @@ static void ehea_rereg_mrs(struct work_s
+@@ -2863,7 +2876,7 @@
        struct ehea_adapter *adapter;
  
        mutex_lock(&dlpar_mem_lock);
@@ -229754,21 +229544,21 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers
  
        list_for_each_entry(adapter, &adapter_list, list)
                if (adapter->active_ports) {
-@@ -2900,13 +2913,6 @@ static void ehea_rereg_mrs(struct work_s
+@@ -2899,13 +2912,6 @@
+                               goto out;
                        }
                }
+-
 -      ehea_destroy_busmap();
 -      ret = ehea_create_busmap();
 -      if (ret) {
 -              ehea_error("creating ehea busmap failed");
 -              goto out;
 -      }
--
        clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags);
  
-       list_for_each_entry(adapter, &adapter_list, list)
-@@ -3519,9 +3525,23 @@ void ehea_crash_handler(void)
+@@ -3519,9 +3525,23 @@
  static int ehea_mem_notifier(struct notifier_block *nb,
                               unsigned long action, void *data)
  {
@@ -229794,10 +229584,10 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_main.c linux-2.6.27.19-5.1/drivers
                ehea_rereg_mrs(NULL);
                break;
        default:
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_phyp.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_phyp.c
---- linux-2.6.27/drivers/net/ehea/ehea_phyp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_phyp.c   2009-03-25 16:11:04.000000000 +0000
-@@ -535,7 +535,7 @@ u64 ehea_h_query_ehea(const u64 adapter_
+diff -r 9608d5473017 drivers/net/ehea/ehea_phyp.c
+--- a/drivers/net/ehea/ehea_phyp.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_phyp.c     Wed May 06 16:56:25 2009 +0100
+@@ -535,7 +535,7 @@
                                       cb_logaddr,              /* R5 */
                                       0, 0, 0, 0, 0);          /* R6-R10 */
  #ifdef DEBUG
@@ -229806,10 +229596,10 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_phyp.c linux-2.6.27.19-5.1/drivers
  #endif
        return hret;
  }
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.c
---- linux-2.6.27/drivers/net/ehea/ehea_qmr.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.c    2009-03-25 16:11:04.000000000 +0000
-@@ -567,7 +567,7 @@ static inline int ehea_calc_index(unsign
+diff -r 9608d5473017 drivers/net/ehea/ehea_qmr.c
+--- a/drivers/net/ehea/ehea_qmr.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_qmr.c      Wed May 06 16:56:25 2009 +0100
+@@ -567,7 +567,7 @@
  static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,
                                     int dir)
  {
@@ -229818,7 +229608,7 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
                ehea_top_bmap->dir[dir] =
                        kzalloc(sizeof(struct ehea_dir_bmap), GFP_KERNEL);
                if (!ehea_top_bmap->dir[dir])
-@@ -578,7 +578,7 @@ static inline int ehea_init_top_bmap(str
+@@ -578,7 +578,7 @@
  
  static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
  {
@@ -229827,7 +229617,7 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
                ehea_bmap->top[top] =
                        kzalloc(sizeof(struct ehea_top_bmap), GFP_KERNEL);
                if (!ehea_bmap->top[top])
-@@ -587,52 +587,171 @@ static inline int ehea_init_bmap(struct 
+@@ -587,52 +587,171 @@
        return ehea_init_top_bmap(ehea_bmap->top[top], dir);
  }
  
@@ -229842,32 +229632,20 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
 +static void ehea_rebuild_busmap(void)
  {
 -      unsigned long i, mr_len, start_section, end_section;
--      start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
--      end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
--      mr_len = *(unsigned long *)arg;
 +      u64 vaddr = EHEA_BUSMAP_START;
 +      int top, dir, idx;
--      ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
--      if (!ehea_bmap)
--              return -ENOMEM;
++
 +      for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
 +              struct ehea_top_bmap *ehea_top;
 +              int valid_dir_entries = 0;
--      for (i = start_section; i < end_section; i++) {
--              int ret;
--              int top, dir, idx;
--              u64 vaddr;
++
 +              if (!ehea_bmap->top[top])
 +                      continue;
 +              ehea_top = ehea_bmap->top[top];
 +              for (dir = 0; dir < EHEA_MAP_ENTRIES; dir++) {
 +                      struct ehea_dir_bmap *ehea_dir;
 +                      int valid_entries = 0;
--              top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
--              dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
++
 +                      if (!ehea_top->dir[dir])
 +                              continue;
 +                      valid_dir_entries++;
@@ -229890,37 +229668,33 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
 +              }
 +      }
 +}
--              ret = ehea_init_bmap(ehea_bmap, top, dir);
--              if(ret)
--                      return ret;
++
 +static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add)
 +{
 +      unsigned long i, start_section, end_section;
--              idx = i & EHEA_INDEX_MASK;
--              vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
++
 +      if (!nr_pages)
 +              return 0;
--              ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
++
 +      if (!ehea_bmap) {
 +              ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
 +              if (!ehea_bmap)
 +                      return -ENOMEM;
-       }
--      mr_len += nr_pages * PAGE_SIZE;
--      *(unsigned long *)arg = mr_len;
-+      start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
-+      end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
++      }
++
+       start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
+       end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
+-      mr_len = *(unsigned long *)arg;
 +      /* Mark entries as valid or invalid only; address is assigned later */
 +      for (i = start_section; i < end_section; i++) {
 +              u64 flag;
 +              int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
 +              int dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
 +              int idx = i & EHEA_INDEX_MASK;
-+
+-      ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
+-      if (!ehea_bmap)
+-              return -ENOMEM;
 +              if (add) {
 +                      int ret = ehea_init_bmap(ehea_bmap, top, dir);
 +                      if (ret)
@@ -229936,8 +229710,28 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
 +                      ehea_mr_len -= EHEA_SECTSIZE;
 +              }
  
+-      for (i = start_section; i < end_section; i++) {
+-              int ret;
+-              int top, dir, idx;
+-              u64 vaddr;
+-
+-              top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
+-              dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
+-
+-              ret = ehea_init_bmap(ehea_bmap, top, dir);
+-              if(ret)
+-                      return ret;
+-
+-              idx = i & EHEA_INDEX_MASK;
+-              vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
+-
+-              ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
 +              ehea_bmap->top[top]->dir[dir]->ent[idx] = flag;
-+      }
+       }
+-
+-      mr_len += nr_pages * PAGE_SIZE;
+-      *(unsigned long *)arg = mr_len;
+-
 +      ehea_rebuild_busmap(); /* Assign contiguous addresses for mr */
        return 0;
  }
@@ -230025,9 +229819,9 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.c linux-2.6.27.19-5.1/drivers/
                                   ehea_create_busmap_callback);
        mutex_unlock(&ehea_busmap_mutex);
        return ret;
-diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.h linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.h
---- linux-2.6.27/drivers/net/ehea/ehea_qmr.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ehea/ehea_qmr.h    2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/ehea/ehea_qmr.h
+--- a/drivers/net/ehea/ehea_qmr.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ehea/ehea_qmr.h      Wed May 06 16:56:25 2009 +0100
 @@ -40,6 +40,9 @@
  #define EHEA_PAGESIZE          (1UL << EHEA_PAGESHIFT)
  #define EHEA_SECTSIZE          (1UL << 24)
@@ -230038,7 +229832,7 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.h linux-2.6.27.19-5.1/drivers/
  
  #if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
  #error eHEA module cannot work if kernel sectionsize < ehea sectionsize
-@@ -378,6 +381,8 @@ int ehea_rem_mr(struct ehea_mr *mr);
+@@ -378,6 +381,8 @@
  
  void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle);
  
@@ -230047,10 +229841,10 @@ diff -purN linux-2.6.27/drivers/net/ehea/ehea_qmr.h linux-2.6.27.19-5.1/drivers/
  int ehea_create_busmap(void);
  void ehea_destroy_busmap(void);
  u64 ehea_map_vaddr(void *caddr);
-diff -purN linux-2.6.27/drivers/net/fec_mpc52xx_phy.c linux-2.6.27.19-5.1/drivers/net/fec_mpc52xx_phy.c
---- linux-2.6.27/drivers/net/fec_mpc52xx_phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fec_mpc52xx_phy.c  2009-03-25 16:11:05.000000000 +0000
-@@ -185,6 +185,7 @@ static struct of_device_id mpc52xx_fec_m
+diff -r 9608d5473017 drivers/net/fec_mpc52xx_phy.c
+--- a/drivers/net/fec_mpc52xx_phy.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fec_mpc52xx_phy.c    Wed May 06 16:56:25 2009 +0100
+@@ -185,6 +185,7 @@
  };
  
  struct of_platform_driver mpc52xx_fec_mdio_driver = {
@@ -230058,10 +229852,10 @@ diff -purN linux-2.6.27/drivers/net/fec_mpc52xx_phy.c linux-2.6.27.19-5.1/driver
        .name = "mpc5200b-fec-phy",
        .probe = mpc52xx_fec_mdio_probe,
        .remove = mpc52xx_fec_mdio_remove,
-diff -purN linux-2.6.27/drivers/net/fs_enet/fs_enet-main.c linux-2.6.27.19-5.1/drivers/net/fs_enet/fs_enet-main.c
---- linux-2.6.27/drivers/net/fs_enet/fs_enet-main.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/fs_enet-main.c     2009-03-25 16:11:08.000000000 +0000
-@@ -1192,6 +1192,7 @@ static struct of_device_id fs_enet_match
+diff -r 9608d5473017 drivers/net/fs_enet/fs_enet-main.c
+--- a/drivers/net/fs_enet/fs_enet-main.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/fs_enet-main.c       Wed May 06 16:56:25 2009 +0100
+@@ -1192,6 +1192,7 @@
  };
  
  static struct of_platform_driver fs_enet_driver = {
@@ -230069,10 +229863,10 @@ diff -purN linux-2.6.27/drivers/net/fs_enet/fs_enet-main.c linux-2.6.27.19-5.1/d
        .name   = "fs_enet",
        .match_table = fs_enet_match,
        .probe = fs_enet_probe,
-diff -purN linux-2.6.27/drivers/net/fs_enet/mii-bitbang.c linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-bitbang.c
---- linux-2.6.27/drivers/net/fs_enet/mii-bitbang.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-bitbang.c      2009-03-25 16:11:08.000000000 +0000
-@@ -249,6 +249,7 @@ static struct of_device_id fs_enet_mdio_
+diff -r 9608d5473017 drivers/net/fs_enet/mii-bitbang.c
+--- a/drivers/net/fs_enet/mii-bitbang.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/mii-bitbang.c        Wed May 06 16:56:25 2009 +0100
+@@ -249,6 +249,7 @@
  };
  
  static struct of_platform_driver fs_enet_bb_mdio_driver = {
@@ -230080,10 +229874,10 @@ diff -purN linux-2.6.27/drivers/net/fs_enet/mii-bitbang.c linux-2.6.27.19-5.1/dr
        .name = "fsl-bb-mdio",
        .match_table = fs_enet_mdio_bb_match,
        .probe = fs_enet_mdio_probe,
-diff -purN linux-2.6.27/drivers/net/fs_enet/mii-fec.c linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-fec.c
---- linux-2.6.27/drivers/net/fs_enet/mii-fec.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/fs_enet/mii-fec.c  2009-03-25 16:11:08.000000000 +0000
-@@ -218,6 +218,7 @@ static struct of_device_id fs_enet_mdio_
+diff -r 9608d5473017 drivers/net/fs_enet/mii-fec.c
+--- a/drivers/net/fs_enet/mii-fec.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/fs_enet/mii-fec.c    Wed May 06 16:56:25 2009 +0100
+@@ -218,6 +218,7 @@
  };
  
  static struct of_platform_driver fs_enet_fec_mdio_driver = {
@@ -230091,10 +229885,10 @@ diff -purN linux-2.6.27/drivers/net/fs_enet/mii-fec.c linux-2.6.27.19-5.1/driver
        .name = "fsl-fec-mdio",
        .match_table = fs_enet_mdio_fec_match,
        .probe = fs_enet_mdio_probe,
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/core.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/core.c
---- linux-2.6.27/drivers/net/ibm_newemac/core.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/core.c 2009-03-25 16:11:07.000000000 +0000
-@@ -2923,6 +2923,7 @@ static struct of_device_id emac_match[] 
+diff -r 9608d5473017 drivers/net/ibm_newemac/core.c
+--- a/drivers/net/ibm_newemac/core.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/core.c   Wed May 06 16:56:25 2009 +0100
+@@ -2923,6 +2923,7 @@
  };
  
  static struct of_platform_driver emac_driver = {
@@ -230102,10 +229896,10 @@ diff -purN linux-2.6.27/drivers/net/ibm_newemac/core.c linux-2.6.27.19-5.1/drive
        .name = "emac",
        .match_table = emac_match,
  
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/mal.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/mal.c
---- linux-2.6.27/drivers/net/ibm_newemac/mal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/mal.c  2009-03-25 16:11:07.000000000 +0000
-@@ -724,6 +724,7 @@ static struct of_device_id mal_platform_
+diff -r 9608d5473017 drivers/net/ibm_newemac/mal.c
+--- a/drivers/net/ibm_newemac/mal.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/mal.c    Wed May 06 16:56:25 2009 +0100
+@@ -724,6 +724,7 @@
  };
  
  static struct of_platform_driver mal_of_driver = {
@@ -230113,10 +229907,10 @@ diff -purN linux-2.6.27/drivers/net/ibm_newemac/mal.c linux-2.6.27.19-5.1/driver
        .name = "mcmal",
        .match_table = mal_platform_match,
  
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/rgmii.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/rgmii.c
---- linux-2.6.27/drivers/net/ibm_newemac/rgmii.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/rgmii.c        2009-03-25 16:11:07.000000000 +0000
-@@ -317,6 +317,7 @@ static struct of_device_id rgmii_match[]
+diff -r 9608d5473017 drivers/net/ibm_newemac/rgmii.c
+--- a/drivers/net/ibm_newemac/rgmii.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/rgmii.c  Wed May 06 16:56:25 2009 +0100
+@@ -317,6 +317,7 @@
  };
  
  static struct of_platform_driver rgmii_driver = {
@@ -230124,10 +229918,10 @@ diff -purN linux-2.6.27/drivers/net/ibm_newemac/rgmii.c linux-2.6.27.19-5.1/driv
        .name = "emac-rgmii",
        .match_table = rgmii_match,
  
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/tah.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/tah.c
---- linux-2.6.27/drivers/net/ibm_newemac/tah.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/tah.c  2009-03-25 16:11:07.000000000 +0000
-@@ -165,6 +165,7 @@ static struct of_device_id tah_match[] =
+diff -r 9608d5473017 drivers/net/ibm_newemac/tah.c
+--- a/drivers/net/ibm_newemac/tah.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/tah.c    Wed May 06 16:56:25 2009 +0100
+@@ -165,6 +165,7 @@
  };
  
  static struct of_platform_driver tah_driver = {
@@ -230135,10 +229929,10 @@ diff -purN linux-2.6.27/drivers/net/ibm_newemac/tah.c linux-2.6.27.19-5.1/driver
        .name = "emac-tah",
        .match_table = tah_match,
  
-diff -purN linux-2.6.27/drivers/net/ibm_newemac/zmii.c linux-2.6.27.19-5.1/drivers/net/ibm_newemac/zmii.c
---- linux-2.6.27/drivers/net/ibm_newemac/zmii.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ibm_newemac/zmii.c 2009-03-25 16:11:07.000000000 +0000
-@@ -311,6 +311,7 @@ static struct of_device_id zmii_match[] 
+diff -r 9608d5473017 drivers/net/ibm_newemac/zmii.c
+--- a/drivers/net/ibm_newemac/zmii.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ibm_newemac/zmii.c   Wed May 06 16:56:25 2009 +0100
+@@ -311,6 +311,7 @@
  };
  
  static struct of_platform_driver zmii_driver = {
@@ -230146,10 +229940,10 @@ diff -purN linux-2.6.27/drivers/net/ibm_newemac/zmii.c linux-2.6.27.19-5.1/drive
        .name = "emac-zmii",
        .match_table = zmii_match,
  
-diff -purN linux-2.6.27/drivers/net/igb/igb.h linux-2.6.27.19-5.1/drivers/net/igb/igb.h
---- linux-2.6.27/drivers/net/igb/igb.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb.h  2009-03-25 16:11:08.000000000 +0000
-@@ -294,6 +294,8 @@ struct igb_adapter {
+diff -r 9608d5473017 drivers/net/igb/igb.h
+--- a/drivers/net/igb/igb.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb.h    Wed May 06 16:56:25 2009 +0100
+@@ -294,6 +294,8 @@
        unsigned int lro_flushed;
        unsigned int lro_no_desc;
  #endif
@@ -230158,7 +229952,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb.h linux-2.6.27.19-5.1/drivers/net/ig
  };
  
  #define IGB_FLAG_HAS_MSI           (1 << 0)
-@@ -325,6 +327,8 @@ extern void igb_reset(struct igb_adapter
+@@ -325,6 +327,8 @@
  extern int igb_set_spd_dplx(struct igb_adapter *, u16);
  extern int igb_setup_tx_resources(struct igb_adapter *, struct igb_ring *);
  extern int igb_setup_rx_resources(struct igb_adapter *, struct igb_ring *);
@@ -230167,10 +229961,10 @@ diff -purN linux-2.6.27/drivers/net/igb/igb.h linux-2.6.27.19-5.1/drivers/net/ig
  extern void igb_update_stats(struct igb_adapter *);
  extern void igb_set_ethtool_ops(struct net_device *);
  
-diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/drivers/net/igb/igb_ethtool.c
---- linux-2.6.27/drivers/net/igb/igb_ethtool.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb_ethtool.c  2009-03-25 16:11:08.000000000 +0000
-@@ -714,15 +714,13 @@ static void igb_get_ringparam(struct net
+diff -r 9608d5473017 drivers/net/igb/igb_ethtool.c
+--- a/drivers/net/igb/igb_ethtool.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb_ethtool.c    Wed May 06 16:56:25 2009 +0100
+@@ -714,15 +714,13 @@
                              struct ethtool_ringparam *ring)
  {
        struct igb_adapter *adapter = netdev_priv(netdev);
@@ -230188,7 +229982,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
        ring->rx_mini_pending = 0;
        ring->rx_jumbo_pending = 0;
  }
-@@ -731,12 +729,9 @@ static int igb_set_ringparam(struct net_
+@@ -731,12 +729,9 @@
                             struct ethtool_ringparam *ring)
  {
        struct igb_adapter *adapter = netdev_priv(netdev);
@@ -230203,7 +229997,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
  
        if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
                return -EINVAL;
-@@ -749,12 +744,19 @@ static int igb_set_ringparam(struct net_
+@@ -749,11 +744,18 @@
        new_tx_count = min(new_tx_count, (u32)IGB_MAX_TXD);
        new_tx_count = ALIGN(new_tx_count, REQ_TX_DESCRIPTOR_MULTIPLE);
  
@@ -230214,18 +230008,17 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
                /* nothing to do */
                return 0;
        }
++
 +      if (adapter->num_tx_queues > adapter->num_rx_queues)
 +              temp_ring = vmalloc(adapter->num_tx_queues * sizeof(struct igb_ring));
 +      else
 +              temp_ring = vmalloc(adapter->num_rx_queues * sizeof(struct igb_ring));
 +      if (!temp_ring)
 +              return -ENOMEM;
-+
        while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
                msleep(1);
-@@ -766,62 +768,55 @@ static int igb_set_ringparam(struct net_
+@@ -766,62 +768,55 @@
         * because the ISRs in MSI-X mode get passed pointers
         * to the tx and rx ring structs.
         */
@@ -230278,10 +230071,11 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
        }
  
        if (new_rx_count != adapter->rx_ring->count) {
--              for (i = 0; i < adapter->num_rx_queues; i++) {
 +              memcpy(temp_ring, adapter->rx_ring,
 +                     adapter->num_rx_queues * sizeof(struct igb_ring));
++
+               for (i = 0; i < adapter->num_rx_queues; i++) {
+-
 -                      old_rx_buf = adapter->rx_ring[i].buffer_info;
 -                      old_desc = adapter->rx_ring[i].desc;
 -                      old_size = adapter->rx_ring[i].size;
@@ -230293,7 +230087,6 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
 -                      adapter->rx_ring[i].count = new_rx_count;
 -                      err = igb_setup_rx_resources(adapter,
 -                                                   &adapter->rx_ring[i]);
-+              for (i = 0; i < adapter->num_rx_queues; i++) {
 +                      temp_ring[i].count = new_rx_count;
 +                      err = igb_setup_rx_resources(adapter, &temp_ring[i]);
                        if (err) {
@@ -230323,7 +230116,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
        }
  
        err = 0;
-@@ -830,6 +825,7 @@ err_setup:
+@@ -830,6 +825,7 @@
                igb_up(adapter);
  
        clear_bit(__IGB_RESETTING, &adapter->state);
@@ -230331,7 +230124,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
        return err;
  }
  
-@@ -1776,7 +1772,8 @@ static void igb_get_wol(struct net_devic
+@@ -1776,7 +1772,8 @@
  
        /* this function will set ->supported = 0 and return 1 if wol is not
         * supported by this hardware */
@@ -230341,7 +230134,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
                return;
  
        /* apply any specific unsupported masks here */
-@@ -1805,7 +1802,8 @@ static int igb_set_wol(struct net_device
+@@ -1805,7 +1802,8 @@
        if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
                return -EOPNOTSUPP;
  
@@ -230351,16 +230144,16 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
                return wol->wolopts ? -EOPNOTSUPP : 0;
  
        switch (hw->device_id) {
-@@ -1825,6 +1823,8 @@ static int igb_set_wol(struct net_device
+@@ -1824,6 +1822,8 @@
+               adapter->wol |= E1000_WUFC_BC;
        if (wol->wolopts & WAKE_MAGIC)
                adapter->wol |= E1000_WUFC_MAG;
-+      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
 +
++      device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
        return 0;
  }
-@@ -2025,6 +2025,10 @@ static struct ethtool_ops igb_ethtool_op
+@@ -2025,6 +2025,10 @@
        .get_ethtool_stats      = igb_get_ethtool_stats,
        .get_coalesce           = igb_get_coalesce,
        .set_coalesce           = igb_set_coalesce,
@@ -230371,10 +230164,10 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_ethtool.c linux-2.6.27.19-5.1/driver
  };
  
  void igb_set_ethtool_ops(struct net_device *netdev)
-diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/net/igb/igb_main.c
---- linux-2.6.27/drivers/net/igb/igb_main.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/igb/igb_main.c     2009-03-25 16:11:08.000000000 +0000
-@@ -75,8 +75,6 @@ static int igb_setup_all_tx_resources(st
+diff -r 9608d5473017 drivers/net/igb/igb_main.c
+--- a/drivers/net/igb/igb_main.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/igb/igb_main.c       Wed May 06 16:56:25 2009 +0100
+@@ -75,8 +75,6 @@
  static int igb_setup_all_rx_resources(struct igb_adapter *);
  static void igb_free_all_tx_resources(struct igb_adapter *);
  static void igb_free_all_rx_resources(struct igb_adapter *);
@@ -230383,7 +230176,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
  void igb_update_stats(struct igb_adapter *);
  static int igb_probe(struct pci_dev *, const struct pci_device_id *);
  static void __devexit igb_remove(struct pci_dev *pdev);
-@@ -258,11 +256,13 @@ static int igb_alloc_queues(struct igb_a
+@@ -258,11 +256,13 @@
  
        for (i = 0; i < adapter->num_tx_queues; i++) {
                struct igb_ring *ring = &(adapter->tx_ring[i]);
@@ -230397,7 +230190,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
                ring->adapter = adapter;
                ring->queue_index = i;
                ring->itr_register = E1000_ITR;
-@@ -1220,6 +1220,7 @@ static int __devinit igb_probe(struct pc
+@@ -1220,6 +1220,7 @@
  
        /* initialize the wol settings based on the eeprom settings */
        adapter->wol = adapter->eeprom_wol;
@@ -230405,7 +230198,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
  
        /* reset the hardware with the new settings */
        igb_reset(adapter);
-@@ -1373,6 +1374,8 @@ static int __devinit igb_sw_init(struct 
+@@ -1373,6 +1374,8 @@
  
        pci_read_config_word(pdev, PCI_COMMAND, &hw->bus.pci_cmd_word);
  
@@ -230414,7 +230207,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
        adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE;
        adapter->rx_ps_hdr_size = 0; /* disable packet split */
        adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
-@@ -1961,7 +1964,7 @@ static void igb_configure_rx(struct igb_
+@@ -1961,7 +1964,7 @@
   *
   * Free all transmit software resources
   **/
@@ -230423,7 +230216,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
  {
        struct pci_dev *pdev = tx_ring->adapter->pdev;
  
-@@ -2061,7 +2064,7 @@ static void igb_clean_all_tx_rings(struc
+@@ -2061,7 +2064,7 @@
   *
   * Free all receive software resources
   **/
@@ -230432,7 +230225,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
  {
        struct pci_dev *pdev = rx_ring->adapter->pdev;
  
-@@ -3882,7 +3885,7 @@ static bool igb_clean_rx_irq_adv(struct 
+@@ -3882,7 +3885,7 @@
                                       PAGE_SIZE / 2, PCI_DMA_FROMDEVICE);
                        buffer_info->page_dma = 0;
  
@@ -230441,7 +230234,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
                                                buffer_info->page,
                                                buffer_info->page_offset,
                                                length);
-@@ -3892,11 +3895,6 @@ static bool igb_clean_rx_irq_adv(struct 
+@@ -3892,11 +3895,6 @@
                                buffer_info->page = NULL;
                        else
                                get_page(buffer_info->page);
@@ -230453,7 +230246,7 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
                }
  send_up:
                i++;
-@@ -3990,7 +3988,7 @@ static void igb_alloc_rx_buffers_adv(str
+@@ -3990,7 +3988,7 @@
  
                if (adapter->rx_ps_hdr_size && !buffer_info->page_dma) {
                        if (!buffer_info->page) {
@@ -230462,10 +230255,10 @@ diff -purN linux-2.6.27/drivers/net/igb/igb_main.c linux-2.6.27.19-5.1/drivers/n
                                if (!buffer_info->page) {
                                        adapter->alloc_rx_buff_failed++;
                                        goto no_buffers;
-diff -purN linux-2.6.27/drivers/net/irda/irda-usb.c linux-2.6.27.19-5.1/drivers/net/irda/irda-usb.c
---- linux-2.6.27/drivers/net/irda/irda-usb.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/irda/irda-usb.c    2009-03-25 16:11:04.000000000 +0000
-@@ -1075,7 +1075,7 @@ static int stir421x_patch_device(struct 
+diff -r 9608d5473017 drivers/net/irda/irda-usb.c
+--- a/drivers/net/irda/irda-usb.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/irda/irda-usb.c      Wed May 06 16:56:25 2009 +0100
+@@ -1075,7 +1075,7 @@
  {
        unsigned int i;
        int ret;
@@ -230474,10 +230267,10 @@ diff -purN linux-2.6.27/drivers/net/irda/irda-usb.c linux-2.6.27.19-5.1/drivers/
        const struct firmware *fw;
        const unsigned char *fw_version_ptr; /* pointer to version string */
        unsigned long fw_version = 0;
-diff -purN linux-2.6.27/drivers/net/ixgb/ixgb_main.c linux-2.6.27.19-5.1/drivers/net/ixgb/ixgb_main.c
---- linux-2.6.27/drivers/net/ixgb/ixgb_main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgb/ixgb_main.c   2009-03-25 16:11:05.000000000 +0000
-@@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *
+diff -r 9608d5473017 drivers/net/ixgb/ixgb_main.c
+--- a/drivers/net/ixgb/ixgb_main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgb/ixgb_main.c     Wed May 06 16:56:25 2009 +0100
+@@ -977,15 +977,17 @@
  
        for (i = 0; i < rx_ring->count; i++) {
                buffer_info = &rx_ring->buffer_info[i];
@@ -230498,18 +230291,18 @@ diff -purN linux-2.6.27/drivers/net/ixgb/ixgb_main.c linux-2.6.27.19-5.1/drivers
                        buffer_info->skb = NULL;
                }
        }
-diff -purN linux-2.6.27/drivers/net/ixgbe/Makefile linux-2.6.27.19-5.1/drivers/net/ixgbe/Makefile
---- linux-2.6.27/drivers/net/ixgbe/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/Makefile     2009-03-25 16:11:05.000000000 +0000
-@@ -34,3 +34,5 @@ obj-$(CONFIG_IXGBE) += ixgbe.o
+diff -r 9608d5473017 drivers/net/ixgbe/Makefile
+--- a/drivers/net/ixgbe/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/Makefile       Wed May 06 16:56:25 2009 +0100
+@@ -34,3 +34,5 @@
  
  ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
                ixgbe_82598.o ixgbe_phy.o
 +
 +ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_nl.o
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe.h      2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe.h
+--- a/drivers/net/ixgbe/ixgbe.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe.h        Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -230527,7 +230320,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
    e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
    Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  
-@@ -32,17 +31,21 @@
+@@ -32,16 +31,20 @@
  #include <linux/types.h>
  #include <linux/pci.h>
  #include <linux/netdevice.h>
@@ -230546,12 +230339,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
  #include <linux/dca.h>
  #endif
--#define IXGBE_ERR(args...) printk(KERN_ERR "ixgbe: " args)
 -
+-#define IXGBE_ERR(args...) printk(KERN_ERR "ixgbe: " args)
  #define PFX "ixgbe: "
  #define DPRINTK(nlevel, klevel, fmt, args...) \
-       ((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \
 @@ -58,23 +61,14 @@
  #define IXGBE_MAX_RXD                    4096
  #define IXGBE_MIN_RXD                      64
@@ -230579,7 +230371,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  #define IXGBE_MIN_FCPAUSE                   0
  #define IXGBE_MAX_FCPAUSE              0xFFFF
  
-@@ -83,14 +77,12 @@
+@@ -83,13 +77,11 @@
  #define IXGBE_RXBUFFER_128   128    /* Used for packet split */
  #define IXGBE_RXBUFFER_256   256    /* Used for packet split */
  #define IXGBE_RXBUFFER_2048  2048
@@ -230588,27 +230380,25 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  #define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_256
  
  #define MAXIMUM_ETHERNET_VLAN_SIZE (ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN)
+-
 -/* How many Tx Descriptors do we need to call netif_wake_queue? */
 -#define IXGBE_TX_QUEUE_WAKE 16
--
  /* How many Rx Buffers do we bundle into one write to the hardware ? */
  #define IXGBE_RX_BUFFER_WRITE 16      /* Must be power of 2 */
-@@ -99,11 +91,9 @@
+@@ -99,10 +91,8 @@
  #define IXGBE_TX_FLAGS_TSO            (u32)(1 << 2)
  #define IXGBE_TX_FLAGS_IPV4           (u32)(1 << 3)
  #define IXGBE_TX_FLAGS_VLAN_MASK      0xffff0000
 +#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000
  #define IXGBE_TX_FLAGS_VLAN_SHIFT     16
+-
 -#define IXGBE_MAX_LRO_DESCRIPTORS       8
 -#define IXGBE_MAX_LRO_AGGREGATE         32
--
  /* wrapper around a pointer to a socket buffer,
   * so a DMA handle can be stored along with the buffer */
- struct ixgbe_tx_buffer {
-@@ -119,6 +109,7 @@ struct ixgbe_rx_buffer {
+@@ -119,6 +109,7 @@
        dma_addr_t dma;
        struct page *page;
        dma_addr_t page_dma;
@@ -230616,7 +230406,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  };
  
  struct ixgbe_queue_stats {
-@@ -148,28 +139,30 @@ struct ixgbe_ring {
+@@ -148,28 +139,30 @@
  
        u16 reg_idx; /* holds the special value that gets the hardware register
                      * offset associated with this ring, which is different
@@ -230655,18 +230445,18 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  #define IXGBE_MAX_RSS_INDICES  16
  #define IXGBE_MAX_VMDQ_INDICES 16
  struct ixgbe_ring_feature {
-@@ -180,6 +173,10 @@ struct ixgbe_ring_feature {
+@@ -179,6 +172,10 @@
  #define MAX_RX_QUEUES 64
  #define MAX_TX_QUEUES 32
++
 +#define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
 +                             ? 8 : 1)
 +#define MAX_TX_PACKET_BUFFERS MAX_RX_PACKET_BUFFERS
-+
  /* MAX_MSIX_Q_VECTORS of these are allocated,
   * but we only use one per queue-specific vector.
-  */
-@@ -190,8 +187,8 @@ struct ixgbe_q_vector {
+@@ -190,8 +187,8 @@
        DECLARE_BITMAP(txr_idx, MAX_TX_QUEUES); /* Tx ring indices */
        u8 rxr_count;     /* Rx ring count assigned to this vector */
        u8 txr_count;     /* Tx ring count assigned to this vector */
@@ -230677,7 +230467,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
        u32 eitr;
  };
  
-@@ -228,10 +225,12 @@ struct ixgbe_adapter {
+@@ -228,10 +225,12 @@
        struct timer_list watchdog_timer;
        struct vlan_group *vlgrp;
        u16 bd_number;
@@ -230691,7 +230481,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  
        /* Interrupt Throttle Rate */
        u32 itr_setting;
-@@ -240,7 +239,9 @@ struct ixgbe_adapter {
+@@ -240,7 +239,9 @@
  
        /* TX */
        struct ixgbe_ring *tx_ring;     /* One per active queue */
@@ -230701,7 +230491,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
        u64 lsc_int;
        u64 hw_tso_ctxt;
        u64 hw_tso6_ctxt;
-@@ -249,12 +250,10 @@ struct ixgbe_adapter {
+@@ -249,12 +250,10 @@
  
        /* RX */
        struct ixgbe_ring *rx_ring;     /* One per active queue */
@@ -230715,7 +230505,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
        int num_msix_vectors;
        struct ixgbe_ring_feature ring_feature[3];
        struct msix_entry *msix_entries;
-@@ -267,15 +266,30 @@ struct ixgbe_adapter {
+@@ -267,15 +266,30 @@
         * thus the additional *_CAPABLE flags.
         */
        u32 flags;
@@ -230755,7 +230545,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  
        /* OS defined structs */
        struct net_device *netdev;
-@@ -288,20 +302,32 @@ struct ixgbe_adapter {
+@@ -288,20 +302,32 @@
        struct ixgbe_hw_stats stats;
  
        /* Interrupt Throttle Rate */
@@ -230791,7 +230581,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  };
  
  enum ixgbe_boards {
-@@ -309,6 +335,13 @@ enum ixgbe_boards {
+@@ -309,6 +335,13 @@
  };
  
  extern struct ixgbe_info ixgbe_82598_info;
@@ -230805,30 +230595,30 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe.h linux-2.6.27.19-5.1/drivers/ne
  
  extern char ixgbe_driver_name[];
  extern const char ixgbe_driver_version[];
-@@ -317,11 +350,14 @@ extern int ixgbe_up(struct ixgbe_adapter
+@@ -317,11 +350,14 @@
  extern void ixgbe_down(struct ixgbe_adapter *adapter);
  extern void ixgbe_reinit_locked(struct ixgbe_adapter *adapter);
  extern void ixgbe_reset(struct ixgbe_adapter *adapter);
--extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
- extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
++extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
++extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
++extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
+ extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
+-extern void ixgbe_set_ethtool_ops(struct net_device *netdev);
 -extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
 -                                  struct ixgbe_ring *rxdr);
 -extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
 -                                  struct ixgbe_ring *txdr);
 -
-+extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern int ixgbe_setup_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_free_rx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_free_tx_resources(struct ixgbe_adapter *, struct ixgbe_ring *);
-+extern void ixgbe_update_stats(struct ixgbe_adapter *adapter);
 +extern void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter);
 +extern int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter);
 +void ixgbe_napi_add_all(struct ixgbe_adapter *adapter);
 +void ixgbe_napi_del_all(struct ixgbe_adapter *adapter);
  #endif /* _IXGBE_H_ */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_82598.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_82598.c        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_82598.c
+--- a/drivers/net/ixgbe/ixgbe_82598.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_82598.c  Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -230873,7 +230663,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 -                                             bool autoneg,
 -                                             bool autoneg_wait_to_complete);
 -static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);
--
 +static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw,
 +                                               ixgbe_link_speed speed,
 +                                               bool autoneg,
@@ -230881,6 +230670,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
 +                                     u8 *eeprom_data);
  
+-
 +/**
 + */
  static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
@@ -230888,17 +230678,27 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 -      hw->mac.num_rx_queues = IXGBE_82598_MAX_RX_QUEUES;
 -      hw->mac.num_tx_queues = IXGBE_82598_MAX_TX_QUEUES;
 -      hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES;
--
++      struct ixgbe_mac_info *mac = &hw->mac;
++      struct ixgbe_phy_info *phy = &hw->phy;
++      s32 ret_val = 0;
++      u16 list_offset, data_offset;
 -      /* PHY ops are filled in by default properly for Fiber only */
 -      if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper) {
 -              hw->mac.ops.setup_link = &ixgbe_setup_copper_link_82598;
 -              hw->mac.ops.setup_link_speed = &ixgbe_setup_copper_link_speed_82598;
 -              hw->mac.ops.get_link_settings =
 -                              &ixgbe_get_copper_link_settings_82598;
--
++      /* Call PHY identify routine to get the phy type */
++      ixgbe_identify_phy_generic(hw);
 -              /* Call PHY identify routine to get the phy type */
 -              ixgbe_identify_phy(hw);
--
++      /* PHY Init */
++      switch (phy->type) {
++      case ixgbe_phy_nl:
++              phy->ops.reset = &ixgbe_reset_phy_nl;
 -              switch (hw->phy.type) {
 -              case ixgbe_phy_tn:
 -                      hw->phy.ops.setup_link = &ixgbe_setup_tnx_phy_link;
@@ -230908,19 +230708,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 -                      break;
 -              default:
 -                      break;
-+      struct ixgbe_mac_info *mac = &hw->mac;
-+      struct ixgbe_phy_info *phy = &hw->phy;
-+      s32 ret_val = 0;
-+      u16 list_offset, data_offset;
-+
-+      /* Call PHY identify routine to get the phy type */
-+      ixgbe_identify_phy_generic(hw);
-+
-+      /* PHY Init */
-+      switch (phy->type) {
-+      case ixgbe_phy_nl:
-+              phy->ops.reset = &ixgbe_reset_phy_nl;
-+
 +              /* Call SFP+ identify routine to get the SFP+ module type */
 +              ret_val = phy->ops.identify_sfp(hw);
 +              if (ret_val != 0)
@@ -230928,7 +230715,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +              else if (hw->phy.sfp_type == ixgbe_sfp_type_unknown) {
 +                      ret_val = IXGBE_ERR_SFP_NOT_SUPPORTED;
 +                      goto out;
-+              }
+               }
 +
 +              /* Check to see if SFP+ module is supported */
 +              ret_val = ixgbe_get_sfp_init_sequence_offsets(hw,
@@ -230937,7 +230724,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +              if (ret_val != 0) {
 +                      ret_val = IXGBE_ERR_SFP_NOT_SUPPORTED;
 +                      goto out;
-               }
++              }
 +              break;
 +      case ixgbe_phy_tn:
 +              phy->ops.check_link = &ixgbe_check_phy_link_tnx;
@@ -230985,7 +230772,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  {
        s32 status = 0;
        s32 autoc_reg;
-@@ -145,15 +170,16 @@ static s32 ixgbe_get_link_settings_82598
+@@ -145,15 +170,16 @@
  }
  
  /**
@@ -231006,7 +230793,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  {
        s32 status = IXGBE_ERR_LINK_SETUP;
        u16 speed_ability;
-@@ -161,9 +187,9 @@ static s32 ixgbe_get_copper_link_setting
+@@ -161,9 +187,9 @@
        *speed = 0;
        *autoneg = true;
  
@@ -231019,7 +230806,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  
        if (status == 0) {
                if (speed_ability & IXGBE_MDIO_PHY_SPEED_10G)
-@@ -191,9 +217,13 @@ static enum ixgbe_media_type ixgbe_get_m
+@@ -191,9 +217,13 @@
        case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
        case IXGBE_DEV_ID_82598EB_CX4:
        case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
@@ -231034,10 +230821,13 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
                media_type = ixgbe_media_type_copper;
                break;
        default:
-@@ -205,6 +235,122 @@ static enum ixgbe_media_type ixgbe_get_m
- }
+@@ -202,6 +232,122 @@
      }
  
- /**
+       return media_type;
++}
++
++/**
 + *  ixgbe_setup_fc_82598 - Configure flow control settings
 + *  @hw: pointer to hardware structure
 + *  @packetbuf_num: packet buffer number (0-7)
@@ -231151,13 +230941,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +      IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1));
 +
 +      return 0;
-+}
-+
-+/**
-  *  ixgbe_setup_mac_link_82598 - Configures MAC link settings
-  *  @hw: pointer to hardware structure
-  *
-@@ -248,8 +394,7 @@ static s32 ixgbe_setup_mac_link_82598(st
+ }
+ /**
+@@ -248,8 +394,7 @@
                        }
                        if (!(links_reg & IXGBE_LINKS_KX_AN_COMP)) {
                                status = IXGBE_ERR_AUTONEG_NOT_COMPLETE;
@@ -231167,7 +230954,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
                        }
                }
        }
-@@ -259,8 +404,8 @@ static s32 ixgbe_setup_mac_link_82598(st
+@@ -259,8 +404,8 @@
         * case we get disconnected and then reconnected into a different hub
         * or switch with different Flow Control capabilities.
         */
@@ -231178,7 +230965,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  
        /* Add delay to filter out noises during initial link setup */
        msleep(50);
-@@ -273,29 +418,87 @@ static s32 ixgbe_setup_mac_link_82598(st
+@@ -273,28 +418,86 @@
   *  @hw: pointer to hardware structure
   *  @speed: pointer to link speed
   *  @link_up: true is link is up, false otherwise
@@ -231195,8 +230982,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
        u32 links_reg;
 +      u32 i;
 +      u16 link_reg, adapt_comp_reg;
--      links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
++
 +      /*
 +       * SERDES PHY requires us to read link status from register 0xC79F.
 +       * Bit 0 set indicates link is up/ready; clear indicates link down.
@@ -231232,16 +231018,17 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +                      else
 +                              *link_up = false;
 +              }
++
++              if (*link_up == false)
++                      goto out;
++      }
  
+       links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
+-
 -      if (links_reg & IXGBE_LINKS_UP)
 -              *link_up = true;
 -      else
 -              *link_up = false;
-+              if (*link_up == false)
-+                      goto out;
-+      }
-+
-+      links_reg = IXGBE_READ_REG(hw, IXGBE_LINKS);
 +      if (link_up_wait_to_complete) {
 +              for (i = 0; i < IXGBE_LINK_UP_TIME; i++) {
 +                      if (links_reg & IXGBE_LINKS_UP) {
@@ -231268,12 +231055,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +out:
        return 0;
  }
 +
  /**
   *  ixgbe_setup_mac_link_speed_82598 - Set MAC link speed
-  *  @hw: pointer to hardware structure
-@@ -306,18 +509,18 @@ static s32 ixgbe_check_mac_link_82598(st
+@@ -306,18 +509,18 @@
   *  Set the link speed in the AUTOC register and restarts link.
   **/
  static s32 ixgbe_setup_mac_link_speed_82598(struct ixgbe_hw *hw,
@@ -231297,7 +231083,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
                /* BX mode - Autonegotiate 1G */
                if (!(hw->mac.link_attach_type & IXGBE_AUTOC_1G_PMA_PMD))
                        hw->mac.link_mode_select = IXGBE_AUTOC_LMS_1G_AN;
-@@ -336,7 +539,7 @@ static s32 ixgbe_setup_mac_link_speed_82
+@@ -336,7 +539,7 @@
                 * ixgbe_hw This will write the AUTOC register based on the new
                 * stored values
                 */
@@ -231306,7 +231092,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
        }
  
        return status;
-@@ -354,18 +557,17 @@ static s32 ixgbe_setup_mac_link_speed_82
+@@ -354,18 +557,17 @@
   **/
  static s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw)
  {
@@ -231329,7 +231115,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  
        return status;
  }
-@@ -379,23 +581,23 @@ static s32 ixgbe_setup_copper_link_82598
+@@ -379,23 +581,23 @@
   *
   *  Sets the link speed in the AUTOC register in the MAC and restarts link.
   **/
@@ -231361,7 +231147,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  
        return status;
  }
-@@ -404,7 +606,7 @@ static s32 ixgbe_setup_copper_link_speed
+@@ -404,7 +606,7 @@
   *  ixgbe_reset_hw_82598 - Performs hardware reset
   *  @hw: pointer to hardware structure
   *
@@ -231370,7 +231156,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
   *  clears all interrupts, performing a PHY reset, and performing a link (MAC)
   *  reset.
   **/
-@@ -418,35 +620,44 @@ static s32 ixgbe_reset_hw_82598(struct i
+@@ -418,35 +620,44 @@
        u8  analog_val;
  
        /* Call adapter stop to disable tx/rx and clear interrupts */
@@ -231429,7 +231215,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
  
        /*
         * Prevent the PCI-E bus from from hanging by disabling PCI-E master
-@@ -499,29 +710,401 @@ static s32 ixgbe_reset_hw_82598(struct i
+@@ -499,29 +710,401 @@
                IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
        } else {
                hw->mac.link_attach_type =
@@ -231442,10 +231228,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
        /* Store the permanent mac address */
 -      ixgbe_get_mac_addr(hw, hw->mac.perm_addr);
 +      hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
-+
-+      return status;
-+}
-+
+       return status;
+ }
 +/**
 + *  ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address
 + *  @hw: pointer to hardware struct
@@ -231650,7 +231436,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +      IXGBE_WRITE_REG(hw, IXGBE_ATLASCTL, atlas_ctl);
 +      IXGBE_WRITE_FLUSH(hw);
 +      udelay(10);
++
 +      return 0;
 +}
 +
@@ -231714,9 +231500,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +      }
 +
 +out:
-       return status;
- }
++      return status;
++}
++
 +/**
 + *  ixgbe_get_supported_physical_layer_82598 - Returns physical layer type
 + *  @hw: pointer to hardware structure
@@ -231787,10 +231573,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +      .read_analog_reg8       = &ixgbe_read_analog_reg8_82598,
 +      .write_analog_reg8      = &ixgbe_write_analog_reg8_82598,
        .setup_link             = &ixgbe_setup_mac_link_82598,
--      .check_link             = &ixgbe_check_mac_link_82598,
-       .setup_link_speed       = &ixgbe_setup_mac_link_speed_82598,
++      .setup_link_speed       = &ixgbe_setup_mac_link_speed_82598,
+       .check_link             = &ixgbe_check_mac_link_82598,
+-      .setup_link_speed       = &ixgbe_setup_mac_link_speed_82598,
 -      .get_link_settings      = &ixgbe_get_link_settings_82598,
-+      .check_link             = &ixgbe_check_mac_link_82598,
 +      .get_link_capabilities  = &ixgbe_get_link_capabilities_82598,
 +      .led_on                 = &ixgbe_led_on_generic,
 +      .led_off                = &ixgbe_led_off_generic,
@@ -231836,9 +231622,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_82598.c linux-2.6.27.19-5.1/driv
 +      .phy_ops                = &phy_ops_82598,
  };
  
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_common.c
+--- a/drivers/net/ixgbe/ixgbe_common.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_common.c Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -231890,7 +231676,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  @hw: pointer to hardware structure
   *
   *  Starts the hardware by filling the bus info structure and media type, clears
-@@ -54,7 +61,7 @@ static void ixgbe_add_mc_addr(struct ixg
+@@ -54,7 +61,7 @@
   *  table, VLAN filter table, calls routine to set up link and flow control
   *  settings, and leaves transmit and receive units disabled and uninitialized
   **/
@@ -231899,7 +231685,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 ctrl_ext;
  
-@@ -62,22 +69,22 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw)
+@@ -62,22 +69,22 @@
        hw->phy.media_type = hw->mac.ops.get_media_type(hw);
  
        /* Identify the PHY */
@@ -231926,7 +231712,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
        /* Set No Snoop Disable */
        ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
-@@ -92,34 +99,34 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw)
+@@ -92,34 +99,34 @@
  }
  
  /**
@@ -231968,7 +231754,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u16 i = 0;
  
-@@ -191,7 +198,36 @@ static s32 ixgbe_clear_hw_cntrs(struct i
+@@ -191,7 +198,36 @@
  }
  
  /**
@@ -232006,7 +231792,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  @hw: pointer to hardware structure
   *  @mac_addr: Adapter MAC address
   *
-@@ -199,7 +235,7 @@ static s32 ixgbe_clear_hw_cntrs(struct i
+@@ -199,7 +235,7 @@
   *  A reset of the adapter must be performed prior to calling this function
   *  in order for the MAC address to have been loaded from the EEPROM into RAR0
   **/
@@ -232015,7 +231801,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 rar_high;
        u32 rar_low;
-@@ -217,30 +253,8 @@ s32 ixgbe_get_mac_addr(struct ixgbe_hw *
+@@ -217,30 +253,8 @@
        return 0;
  }
  
@@ -232047,7 +231833,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  @hw: pointer to hardware structure
   *
   *  Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts,
-@@ -248,7 +262,7 @@ s32 ixgbe_read_part_num(struct ixgbe_hw 
+@@ -248,7 +262,7 @@
   *  the shared code and drivers to determine if the adapter is in a stopped
   *  state and should not touch the hardware.
   **/
@@ -232056,7 +231842,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 number_of_queues;
        u32 reg_val;
-@@ -264,6 +278,7 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -264,6 +278,7 @@
        reg_val = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
        reg_val &= ~(IXGBE_RXCTRL_RXEN);
        IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, reg_val);
@@ -232064,7 +231850,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        msleep(2);
  
        /* Clear interrupt mask to stop from interrupts being generated */
-@@ -273,7 +288,7 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -273,7 +288,7 @@
        IXGBE_READ_REG(hw, IXGBE_EICR);
  
        /* Disable the transmit unit.  Each queue must be disabled. */
@@ -232073,7 +231859,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        for (i = 0; i < number_of_queues; i++) {
                reg_val = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i));
                if (reg_val & IXGBE_TXDCTL_ENABLE) {
-@@ -282,15 +297,22 @@ s32 ixgbe_stop_adapter(struct ixgbe_hw *
+@@ -282,15 +297,22 @@
                }
        }
  
@@ -232098,7 +231884,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
  
-@@ -304,11 +326,11 @@ s32 ixgbe_led_on(struct ixgbe_hw *hw, u3
+@@ -304,11 +326,11 @@
  }
  
  /**
@@ -232112,7 +231898,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
  
-@@ -321,15 +343,14 @@ s32 ixgbe_led_off(struct ixgbe_hw *hw, u
+@@ -321,15 +343,14 @@
        return 0;
  }
  
@@ -232130,7 +231916,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
        u32 eec;
-@@ -337,6 +358,9 @@ s32 ixgbe_init_eeprom(struct ixgbe_hw *h
+@@ -337,6 +358,9 @@
  
        if (eeprom->type == ixgbe_eeprom_uninitialized) {
                eeprom->type = ixgbe_eeprom_none;
@@ -232140,7 +231926,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
                /*
                 * Check for EEPROM present first.
-@@ -369,18 +393,85 @@ s32 ixgbe_init_eeprom(struct ixgbe_hw *h
+@@ -369,17 +393,84 @@
  }
  
  /**
@@ -232217,18 +232003,17 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        u32 eerd;
        s32 status;
++
 +      hw->eeprom.ops.init_params(hw);
 +
 +      if (offset >= hw->eeprom.word_size) {
 +              status = IXGBE_ERR_EEPROM;
 +              goto out;
 +      }
-+
        eerd = (offset << IXGBE_EEPROM_READ_ADDR_SHIFT) +
               IXGBE_EEPROM_READ_REG_START;
-@@ -389,10 +480,11 @@ s32 ixgbe_read_eeprom(struct ixgbe_hw *h
+@@ -389,10 +480,11 @@
  
        if (status == 0)
                *data = (IXGBE_READ_REG(hw, IXGBE_EERD) >>
@@ -232241,10 +232026,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        return status;
  }
  
-@@ -420,6 +512,58 @@ static s32 ixgbe_poll_eeprom_eerd_done(s
- }
- /**
+@@ -415,6 +507,58 @@
+                       break;
+               }
+               udelay(5);
++      }
++      return status;
++}
++
++/**
 + *  ixgbe_acquire_eeprom - Acquire EEPROM using bit-bang
 + *  @hw: pointer to hardware structure
 + *
@@ -232292,15 +232082,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 +              IXGBE_WRITE_REG(hw, IXGBE_EEC, eec);
 +              IXGBE_WRITE_FLUSH(hw);
 +              udelay(1);
-+      }
-+      return status;
-+}
-+
-+/**
-  *  ixgbe_get_eeprom_semaphore - Get hardware semaphore
-  *  @hw: pointer to hardware structure
-  *
-@@ -475,7 +619,7 @@ static s32 ixgbe_get_eeprom_semaphore(st
+       }
+       return status;
+ }
+@@ -475,7 +619,7 @@
                 */
                if (i >= timeout) {
                        hw_dbg(hw, "Driver can't access the Eeprom - Semaphore "
@@ -232309,7 +232094,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
                        ixgbe_release_eeprom_semaphore(hw);
                        status = IXGBE_ERR_EEPROM;
                }
-@@ -503,6 +647,217 @@ static void ixgbe_release_eeprom_semapho
+@@ -503,6 +647,217 @@
  }
  
  /**
@@ -232527,7 +232312,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  ixgbe_calc_eeprom_checksum - Calculates and returns the checksum
   *  @hw: pointer to hardware structure
   **/
-@@ -517,7 +872,7 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -517,7 +872,7 @@
  
        /* Include 0x0-0x3F in the checksum */
        for (i = 0; i < IXGBE_EEPROM_CHECKSUM; i++) {
@@ -232536,7 +232321,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
                        hw_dbg(hw, "EEPROM read failed\n");
                        break;
                }
-@@ -526,15 +881,15 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -526,15 +881,15 @@
  
        /* Include all data from pointers except for the fw pointer */
        for (i = IXGBE_PCIE_ANALOG_PTR; i < IXGBE_FW_PTR; i++) {
@@ -232555,7 +232340,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
                                        checksum += word;
                                }
                        }
-@@ -547,14 +902,15 @@ static u16 ixgbe_calc_eeprom_checksum(st
+@@ -547,14 +902,15 @@
  }
  
  /**
@@ -232573,7 +232358,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
        s32 status;
        u16 checksum;
-@@ -565,12 +921,12 @@ s32 ixgbe_validate_eeprom_checksum(struc
+@@ -565,12 +921,12 @@
         * not continue or we could be in for a very long wait while every
         * EEPROM read fails
         */
@@ -232588,10 +232373,18 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
                /*
                 * Verify read checksum from EEPROM is the same as
-@@ -590,6 +946,33 @@ s32 ixgbe_validate_eeprom_checksum(struc
- }
- /**
+@@ -582,6 +938,33 @@
+               /* If the user cares, return the calculated checksum */
+               if (checksum_val)
+                       *checksum_val = checksum;
++      } else {
++              hw_dbg(hw, "EEPROM read failed\n");
++      }
++
++      return status;
++}
++
++/**
 + *  ixgbe_update_eeprom_checksum_generic - Updates the EEPROM checksum
 + *  @hw: pointer to hardware structure
 + **/
@@ -232611,18 +232404,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 +              checksum = ixgbe_calc_eeprom_checksum(hw);
 +              status = hw->eeprom.ops.write(hw, IXGBE_EEPROM_CHECKSUM,
 +                                          checksum);
-+      } else {
-+              hw_dbg(hw, "EEPROM read failed\n");
-+      }
-+
-+      return status;
-+}
-+
-+/**
-  *  ixgbe_validate_mac_addr - Validate MAC address
-  *  @mac_addr: pointer to MAC address.
-  *
-@@ -607,61 +990,140 @@ s32 ixgbe_validate_mac_addr(u8 *mac_addr
+       } else {
+               hw_dbg(hw, "EEPROM read failed\n");
+       }
+@@ -607,61 +990,140 @@
                status = IXGBE_ERR_INVALID_MAC_ADDR;
        /* Reject the zero address */
        else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 &&
@@ -232637,10 +232422,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 - *  ixgbe_set_rar - Set RX address register
 + *  ixgbe_set_rar_generic - Set Rx address register
   *  @hw: pointer to hardware structure
-- *  @addr: Address to put into receive address register
-  *  @index: Receive address register to write
++ *  @index: Receive address register to write
+  *  @addr: Address to put into receive address register
+- *  @index: Receive address register to write
 - *  @vind: Vind to set RAR to
-+ *  @addr: Address to put into receive address register
 + *  @vmdq: VMDq "set" or "pool" index
   *  @enable_addr: set flag that address is active
   *
@@ -232662,13 +232447,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 -                 ((u32)addr[1] << 8) |
 -                 ((u32)addr[2] << 16) |
 -                 ((u32)addr[3] << 24));
--
++      /* setup VMDq pool selection before this RAR gets enabled */
++      hw->mac.ops.set_vmdq(hw, index, vmdq);
 -      rar_high = ((u32)addr[4] |
 -                  ((u32)addr[5] << 8) |
 -                  ((vind << IXGBE_RAH_VIND_SHIFT) & IXGBE_RAH_VIND_MASK));
-+      /* setup VMDq pool selection before this RAR gets enabled */
-+      hw->mac.ops.set_vmdq(hw, index, vmdq);
-+
 +      /* Make sure we are using a valid rar index range */
 +      if (index < rar_entries) {
 +              /*
@@ -232789,7 +232573,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
        /*
         * If the current mac address is valid, assume it is a software override
-@@ -671,29 +1133,30 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -671,29 +1133,30 @@
        if (ixgbe_validate_mac_addr(hw->mac.addr) ==
            IXGBE_ERR_INVALID_MAC_ADDR) {
                /* Get the MAC address from the RAR0 for later reference */
@@ -232829,7 +232613,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        for (i = 1; i < rar_entries; i++) {
                IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
                IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
-@@ -705,9 +1168,113 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -705,9 +1168,113 @@
        IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, hw->mac.mc_filter_type);
  
        hw_dbg(hw, " Clearing MTA\n");
@@ -232944,7 +232728,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        return 0;
  }
  
-@@ -720,7 +1287,7 @@ static s32 ixgbe_init_rx_addrs(struct ix
+@@ -720,7 +1287,7 @@
   *  bit-vector to set in the multicast table. The hardware uses 12 bits, from
   *  incoming rx multicast addresses, to determine the bit-vector to check in
   *  the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set
@@ -232953,7 +232737,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  to mc_filter_type.
   **/
  static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
-@@ -728,19 +1295,19 @@ static s32 ixgbe_mta_vector(struct ixgbe
+@@ -728,19 +1295,19 @@
        u32 vector = 0;
  
        switch (hw->mac.mc_filter_type) {
@@ -232978,7 +232762,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
                hw_dbg(hw, "MC filter type param set incorrectly\n");
                break;
        }
-@@ -794,21 +1361,22 @@ static void ixgbe_set_mta(struct ixgbe_h
+@@ -794,21 +1361,22 @@
   **/
  static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr)
  {
@@ -233008,7 +232792,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
                hw->addr_ctrl.rar_used_count++;
                hw->addr_ctrl.mc_addr_in_rar_count++;
        } else {
-@@ -819,22 +1387,23 @@ static void ixgbe_add_mc_addr(struct ixg
+@@ -819,22 +1387,23 @@
  }
  
  /**
@@ -233038,7 +232822,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
        /*
         * Set the new number of MC addresses that we are being requested to
-@@ -846,7 +1415,8 @@ s32 ixgbe_update_mc_addr_list(struct ixg
+@@ -846,7 +1415,8 @@
        hw->addr_ctrl.mta_in_use = 0;
  
        /* Zero out the other receive addresses. */
@@ -233048,7 +232832,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
        for (i = hw->addr_ctrl.rar_used_count; i < rar_entries; i++) {
                IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
                IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
-@@ -854,186 +1424,67 @@ s32 ixgbe_update_mc_addr_list(struct ixg
+@@ -854,186 +1424,67 @@
  
        /* Clear the MTA */
        hw_dbg(hw, " Clearing MTA\n");
@@ -233088,41 +232872,58 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  {
 -      u32 offset;
 -      u32 vlanbyte;
--
++      u32 i;
++      u32 rar_entries = hw->mac.num_rar_entries;
++      struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
 -      for (offset = 0; offset < IXGBE_VLAN_FILTER_TBL_SIZE; offset++)
 -              IXGBE_WRITE_REG(hw, IXGBE_VFTA(offset), 0);
--
++      if (a->mc_addr_in_rar_count > 0)
++              for (i = (rar_entries - a->mc_addr_in_rar_count);
++                   i < rar_entries; i++)
++                      ixgbe_enable_rar(hw, i);
 -      for (vlanbyte = 0; vlanbyte < 4; vlanbyte++)
 -              for (offset = 0; offset < IXGBE_VLAN_FILTER_TBL_SIZE; offset++)
 -                      IXGBE_WRITE_REG(hw, IXGBE_VFTAVIND(vlanbyte, offset),
 -                                      0);
--
--      return 0;
--}
-+      u32 i;
-+      u32 rar_entries = hw->mac.num_rar_entries;
-+      struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
++      if (a->mta_in_use > 0)
++              IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE |
++                              hw->mac.mc_filter_type);
  
--/**
+       return 0;
+ }
+ /**
 - *  ixgbe_set_vfta - Set VLAN filter table
-- *  @hw: pointer to hardware structure
++ *  ixgbe_disable_mc_generic - Disable multicast address in RAR
+  *  @hw: pointer to hardware structure
 - *  @vlan: VLAN id to write to VLAN filter
 - *  @vind: VMDq output index that maps queue to VLAN id in VFTA
 - *  @vlan_on: boolean flag to turn on/off VLAN in VFTA
-- *
+  *
 - *  Turn on/off specified VLAN in the VLAN filter table.
-- **/
++ *  Disables multicast address in RAR and the use of the multicast hash table.
+  **/
 -s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind,
 -                 bool vlan_on)
--{
++s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw)
+ {
 -      u32 VftaIndex;
 -      u32 BitOffset;
 -      u32 VftaReg;
 -      u32 VftaByte;
--
++      u32 i;
++      u32 rar_entries = hw->mac.num_rar_entries;
++      struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
 -      /* Determine 32-bit word position in array */
 -      VftaIndex = (vlan >> 5) & 0x7F;   /* upper seven bits */
--
++      if (a->mc_addr_in_rar_count > 0)
++              for (i = (rar_entries - a->mc_addr_in_rar_count);
++                   i < rar_entries; i++)
++                      ixgbe_disable_rar(hw, i);
 -      /* Determine the location of the (VMD) queue index */
 -      VftaByte =  ((vlan >> 3) & 0x03); /* bits (4:3) indicating byte array */
 -      BitOffset = (vlan & 0x7) << 2;    /* lower 3 bits indicate nibble */
@@ -233144,31 +232945,20 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 -              /* Turn off this VLAN id */
 -              VftaReg &= ~(1 << BitOffset);
 -      IXGBE_WRITE_REG(hw, IXGBE_VFTA(VftaIndex), VftaReg);
-+      if (a->mc_addr_in_rar_count > 0)
-+              for (i = (rar_entries - a->mc_addr_in_rar_count);
-+                   i < rar_entries; i++)
-+                      ixgbe_enable_rar(hw, i);
-+
-+      if (a->mta_in_use > 0)
-+              IXGBE_WRITE_REG(hw, IXGBE_MCSTCTRL, IXGBE_MCSTCTRL_MFE |
-+                              hw->mac.mc_filter_type);
-       return 0;
- }
- /**
+-
+-      return 0;
+-}
+-
+-/**
 - *  ixgbe_setup_fc - Configure flow control settings
-+ *  ixgbe_disable_mc_generic - Disable multicast address in RAR
-  *  @hw: pointer to hardware structure
+- *  @hw: pointer to hardware structure
 - *  @packetbuf_num: packet buffer number (0-7)
-  *
+- *
 - *  Configures the flow control settings based on SW configuration.
 - *  This function is used for 802.3x flow control configuration only.
-+ *  Disables multicast address in RAR and the use of the multicast hash table.
-  **/
+- **/
 -s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
-+s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw)
- {
+-{
 -      u32 frctl_reg;
 -      u32 rmcs_reg;
 -
@@ -233233,10 +233023,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 -      /* Enable 802.3x based flow control settings. */
 -      IXGBE_WRITE_REG(hw, IXGBE_FCTRL, frctl_reg);
 -      IXGBE_WRITE_REG(hw, IXGBE_RMCS, rmcs_reg);
-+      u32 i;
-+      u32 rar_entries = hw->mac.num_rar_entries;
-+      struct ixgbe_addr_filter_info *a = &hw->addr_ctrl;
+-
 -      /*
 -       * We need to set up the Receive Threshold high and low water
 -       * marks as well as (optionally) enabling the transmission of
@@ -233253,11 +233040,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 -              IXGBE_WRITE_REG(hw, IXGBE_FCRTH(packetbuf_num),
 -                              (hw->fc.high_water)|IXGBE_FCRTH_FCEN);
 -      }
-+      if (a->mc_addr_in_rar_count > 0)
-+              for (i = (rar_entries - a->mc_addr_in_rar_count);
-+                   i < rar_entries; i++)
-+                      ixgbe_disable_rar(hw, i);
+-
 -      IXGBE_WRITE_REG(hw, IXGBE_FCTTV(0), hw->fc.pause_time);
 -      IXGBE_WRITE_REG(hw, IXGBE_FCRTV, (hw->fc.pause_time >> 1));
 +      if (a->mta_in_use > 0)
@@ -233265,7 +233048,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
        return 0;
  }
-@@ -1049,13 +1500,24 @@ s32 ixgbe_setup_fc(struct ixgbe_hw *hw, 
+@@ -1049,13 +1500,24 @@
   **/
  s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw)
  {
@@ -233295,7 +233078,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
  
        for (i = 0; i < IXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
                if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO)) {
-@@ -1070,11 +1532,11 @@ s32 ixgbe_disable_pcie_master(struct ixg
+@@ -1070,11 +1532,11 @@
  
  
  /**
@@ -233310,7 +233093,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  function (CSR, PHY0, PHY1, EEPROM, Flash)
   **/
  s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask)
-@@ -1116,9 +1578,9 @@ s32 ixgbe_acquire_swfw_sync(struct ixgbe
+@@ -1116,9 +1578,9 @@
  /**
   *  ixgbe_release_swfw_sync - Release SWFW semaphore
   *  @hw: pointer to hardware structure
@@ -233322,7 +233105,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
   *  function (CSR, PHY0, PHY1, EEPROM, Flash)
   **/
  void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask)
-@@ -1135,45 +1597,3 @@ void ixgbe_release_swfw_sync(struct ixgb
+@@ -1135,45 +1597,3 @@
        ixgbe_release_eeprom_semaphore(hw);
  }
  
@@ -233368,9 +233151,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.c linux-2.6.27.19-5.1/dri
 -      return 0;
 -}
 -
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_common.h       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_common.h
+--- a/drivers/net/ixgbe/ixgbe_common.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_common.h Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -233397,22 +233180,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/dri
 -s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr);
 -s32 ixgbe_stop_adapter(struct ixgbe_hw *hw);
 -s32 ixgbe_read_part_num(struct ixgbe_hw *hw, u32 *part_num);
--
--s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index);
--s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index);
--
--s32 ixgbe_init_eeprom(struct ixgbe_hw *hw);
--s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data);
--s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val);
--
--s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind,
--                u32 enable_addr);
--s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
--                            u32 mc_addr_count, u32 pad);
--s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on);
--s32 ixgbe_validate_mac_addr(u8 *mac_addr);
--
--s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packtetbuf_num);
 +s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw);
 +s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
 +s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw);
@@ -233421,10 +233188,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/dri
 +s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr);
 +s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw);
 +s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);
-+
+-s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index);
+-s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index);
 +s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);
 +s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);
-+
+-s32 ixgbe_init_eeprom(struct ixgbe_hw *hw);
+-s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data);
+-s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val);
 +s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);
 +s32 ixgbe_read_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 *data);
 +s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset,
@@ -233432,7 +233204,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/dri
 +s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw,
 +                                           u16 *checksum_val);
 +s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw);
-+
+-s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vind,
+-                u32 enable_addr);
+-s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
+-                            u32 mc_addr_count, u32 pad);
+-s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on);
 +s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
 +                          u32 enable_addr);
 +s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index);
@@ -233444,8 +233221,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/dri
 +                                      u32 addr_count, ixgbe_mc_addr_itr func);
 +s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw);
 +s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw);
-+s32 ixgbe_validate_mac_addr(u8 *mac_addr);
++
+ s32 ixgbe_validate_mac_addr(u8 *mac_addr);
+-
+-s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packtetbuf_num);
+-
  s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask);
  void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask);
  s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
@@ -233457,9 +233237,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_common.h linux-2.6.27.19-5.1/dri
  
  #define IXGBE_WRITE_REG(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
  
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb.c    Wed May 06 16:56:25 2009 +0100
 @@ -0,0 +1,332 @@
 +/*******************************************************************************
 +
@@ -233793,9 +233573,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.c linux-2.6.27.19-5.1/driver
 +      return ret;
 +}
 +
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb.h    Wed May 06 16:56:25 2009 +0100
 @@ -0,0 +1,189 @@
 +/*******************************************************************************
 +
@@ -233986,9 +233766,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb.h linux-2.6.27.19-5.1/driver
 +#define MAX_CREDIT              4095 /* Maximum credit supported: 256KB * 1204 / 64B */
 +
 +#endif /* _DCB_CONFIG_H */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.c    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_82598.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_82598.c      Wed May 06 16:56:25 2009 +0100
 @@ -0,0 +1,398 @@
 +/*******************************************************************************
 +
@@ -234388,9 +234168,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.c linux-2.6.27.19-5.1/
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_82598.h    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_82598.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_82598.h      Wed May 06 16:56:25 2009 +0100
 @@ -0,0 +1,98 @@
 +/*******************************************************************************
 +
@@ -234490,9 +234270,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_82598.h linux-2.6.27.19-5.1/
 +                            struct ixgbe_dcb_config *config);
 +
 +#endif /* _DCB_82598_CONFIG_H */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_nl.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_nl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_dcb_nl.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_dcb_nl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c Wed May 06 16:56:25 2009 +0100
 @@ -0,0 +1,639 @@
 +/*******************************************************************************
 +
@@ -235133,9 +234913,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_dcb_nl.c linux-2.6.27.19-5.1/dri
 +      .setbcnrp       = ixgbe_dcbnl_setbcnrp
 +};
 +
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_ethtool.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_ethtool.c      2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_ethtool.c
+--- a/drivers/net/ixgbe/ixgbe_ethtool.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_ethtool.c        Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -235153,7 +234933,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
    e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
    Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  
-@@ -48,7 +47,7 @@ struct ixgbe_stats {
+@@ -48,7 +47,7 @@
  };
  
  #define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \
@@ -235162,7 +234942,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  static struct ixgbe_stats ixgbe_gstrings_stats[] = {
        {"rx_packets", IXGBE_STAT(net_stats.rx_packets)},
        {"tx_packets", IXGBE_STAT(net_stats.tx_packets)},
-@@ -90,19 +89,31 @@ static struct ixgbe_stats ixgbe_gstrings
+@@ -90,19 +89,31 @@
        {"rx_header_split", IXGBE_STAT(rx_hdr_split)},
        {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)},
        {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)},
@@ -235200,7 +234980,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-@@ -114,7 +125,7 @@ static int ixgbe_get_settings(struct net
+@@ -114,7 +125,7 @@
        ecmd->transceiver = XCVR_EXTERNAL;
        if (hw->phy.media_type == ixgbe_media_type_copper) {
                ecmd->supported |= (SUPPORTED_1000baseT_Full |
@@ -235209,7 +234989,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  
                ecmd->advertising = (ADVERTISED_TP | ADVERTISED_Autoneg);
                if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
-@@ -126,14 +137,15 @@ static int ixgbe_get_settings(struct net
+@@ -126,14 +137,15 @@
        } else {
                ecmd->supported |= SUPPORTED_FIBRE;
                ecmd->advertising = (ADVERTISED_10000baseT_Full |
@@ -235228,7 +235008,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
                ecmd->duplex = DUPLEX_FULL;
        } else {
                ecmd->speed = -1;
-@@ -144,10 +156,12 @@ static int ixgbe_get_settings(struct net
+@@ -144,10 +156,12 @@
  }
  
  static int ixgbe_set_settings(struct net_device *netdev,
@@ -235242,10 +235022,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  
        switch (hw->phy.media_type) {
        case ixgbe_media_type_fiber:
-@@ -156,6 +170,31 @@ static int ixgbe_set_settings(struct net
+@@ -155,6 +169,31 @@
+                   (ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL))
                        return -EINVAL;
                /* in this case we currently only support 10Gb/FULL */
-               break;
++              break;
 +      case ixgbe_media_type_copper:
 +              /* 10000/copper and 1000/copper must autoneg
 +               * this function does not support any duplex forcing, but can
@@ -235270,11 +235051,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
 +                              "setup link failed with code %d\n", err);
 +                      hw->mac.ops.setup_link_speed(hw, old, true, true);
 +              }
-+              break;
+               break;
        default:
                break;
-       }
-@@ -164,7 +203,7 @@ static int ixgbe_set_settings(struct net
+@@ -164,7 +203,7 @@
  }
  
  static void ixgbe_get_pauseparam(struct net_device *netdev,
@@ -235283,7 +235063,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-@@ -182,7 +221,7 @@ static void ixgbe_get_pauseparam(struct 
+@@ -182,7 +221,7 @@
  }
  
  static int ixgbe_set_pauseparam(struct net_device *netdev,
@@ -235292,7 +235072,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-@@ -233,15 +272,15 @@ static int ixgbe_set_rx_csum(struct net_
+@@ -233,15 +272,15 @@
  
  static u32 ixgbe_get_tx_csum(struct net_device *netdev)
  {
@@ -235311,7 +235091,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  
        return 0;
  }
-@@ -281,7 +320,7 @@ static int ixgbe_get_regs_len(struct net
+@@ -281,7 +320,7 @@
  #define IXGBE_GET_STAT(_A_, _R_) _A_->stats._R_
  
  static void ixgbe_get_regs(struct net_device *netdev,
@@ -235320,7 +235100,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-@@ -315,7 +354,9 @@ static void ixgbe_get_regs(struct net_de
+@@ -315,7 +354,9 @@
        regs_buff[17] = IXGBE_READ_REG(hw, IXGBE_GRC);
  
        /* Interrupt */
@@ -235331,7 +235111,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[19] = IXGBE_READ_REG(hw, IXGBE_EICS);
        regs_buff[20] = IXGBE_READ_REG(hw, IXGBE_EIMS);
        regs_buff[21] = IXGBE_READ_REG(hw, IXGBE_EIMC);
-@@ -325,7 +366,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -325,7 +366,7 @@
        regs_buff[25] = IXGBE_READ_REG(hw, IXGBE_IVAR(0));
        regs_buff[26] = IXGBE_READ_REG(hw, IXGBE_MSIXT);
        regs_buff[27] = IXGBE_READ_REG(hw, IXGBE_MSIXPBA);
@@ -235340,7 +235120,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[29] = IXGBE_READ_REG(hw, IXGBE_GPIE);
  
        /* Flow Control */
-@@ -371,7 +412,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -371,7 +412,7 @@
                regs_buff[482 + i] = IXGBE_READ_REG(hw, IXGBE_RAL(i));
        for (i = 0; i < 16; i++)
                regs_buff[498 + i] = IXGBE_READ_REG(hw, IXGBE_RAH(i));
@@ -235349,7 +235129,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[515] = IXGBE_READ_REG(hw, IXGBE_FCTRL);
        regs_buff[516] = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
        regs_buff[517] = IXGBE_READ_REG(hw, IXGBE_MCSTCTRL);
-@@ -419,7 +460,6 @@ static void ixgbe_get_regs(struct net_de
+@@ -419,7 +460,6 @@
        regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM);
        regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT);
  
@@ -235357,7 +235137,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS);
        regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS);
        regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS);
-@@ -539,21 +579,17 @@ static void ixgbe_get_regs(struct net_de
+@@ -539,21 +579,17 @@
        /* Diagnostic */
        regs_buff[1071] = IXGBE_READ_REG(hw, IXGBE_RDSTATCTL);
        for (i = 0; i < 8; i++)
@@ -235385,7 +235165,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[1100] = IXGBE_READ_REG(hw, IXGBE_TDPROBE);
        regs_buff[1101] = IXGBE_READ_REG(hw, IXGBE_TXBUFCTRL);
        regs_buff[1102] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA0);
-@@ -566,7 +602,7 @@ static void ixgbe_get_regs(struct net_de
+@@ -566,7 +602,7 @@
        regs_buff[1109] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA2);
        regs_buff[1110] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA3);
        for (i = 0; i < 8; i++)
@@ -235394,7 +235174,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        regs_buff[1119] = IXGBE_READ_REG(hw, IXGBE_RFVAL);
        regs_buff[1120] = IXGBE_READ_REG(hw, IXGBE_MDFTC1);
        regs_buff[1121] = IXGBE_READ_REG(hw, IXGBE_MDFTC2);
-@@ -585,7 +621,7 @@ static int ixgbe_get_eeprom_len(struct n
+@@ -585,7 +621,7 @@
  }
  
  static int ixgbe_get_eeprom(struct net_device *netdev,
@@ -235403,7 +235183,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_hw *hw = &adapter->hw;
-@@ -608,8 +644,8 @@ static int ixgbe_get_eeprom(struct net_d
+@@ -608,8 +644,8 @@
                return -ENOMEM;
  
        for (i = 0; i < eeprom_len; i++) {
@@ -235414,7 +235194,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
                        break;
        }
  
-@@ -624,7 +660,7 @@ static int ixgbe_get_eeprom(struct net_d
+@@ -624,7 +660,7 @@
  }
  
  static void ixgbe_get_drvinfo(struct net_device *netdev,
@@ -235423,7 +235203,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
  
-@@ -637,7 +673,7 @@ static void ixgbe_get_drvinfo(struct net
+@@ -637,7 +673,7 @@
  }
  
  static void ixgbe_get_ringparam(struct net_device *netdev,
@@ -235432,7 +235212,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_ring *tx_ring = adapter->tx_ring;
-@@ -654,15 +690,12 @@ static void ixgbe_get_ringparam(struct n
+@@ -654,15 +690,12 @@
  }
  
  static int ixgbe_set_ringparam(struct net_device *netdev,
@@ -235451,7 +235231,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  
        if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
                return -EINVAL;
-@@ -681,6 +714,15 @@ static int ixgbe_set_ringparam(struct ne
+@@ -681,6 +714,15 @@
                return 0;
        }
  
@@ -235467,7 +235247,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
                msleep(1);
  
-@@ -693,66 +735,61 @@ static int ixgbe_set_ringparam(struct ne
+@@ -693,66 +735,61 @@
         * to the tx and rx ring structs.
         */
        if (new_tx_count != adapter->tx_ring->count) {
@@ -235519,10 +235299,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        }
  
        if (new_rx_count != adapter->rx_ring->count) {
--              for (i = 0; i < adapter->num_rx_queues; i++) {
 +              memcpy(temp_ring, adapter->rx_ring,
 +                     adapter->num_rx_queues * sizeof(struct ixgbe_ring));
++
+               for (i = 0; i < adapter->num_rx_queues; i++) {
+-
 -                      old_rx_buf = adapter->rx_ring[i].rx_buffer_info;
 -                      old_desc = adapter->rx_ring[i].desc;
 -                      old_size = adapter->rx_ring[i].size;
@@ -235534,7 +235315,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
 -                      adapter->rx_ring[i].count = new_rx_count;
 -                      err = ixgbe_setup_rx_resources(adapter,
 -                                                     &adapter->rx_ring[i]);
-+              for (i = 0; i < adapter->num_rx_queues; i++) {
 +                      temp_ring[i].count = new_rx_count;
 +                      err = ixgbe_setup_rx_resources(adapter, &temp_ring[i]);
                        if (err) {
@@ -235549,12 +235329,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
 +                              }
                                goto err_setup;
                        }
--
++              }
 -                      vfree(old_rx_buf);
 -                      pci_free_consistent(adapter->pdev, old_size, old_desc,
 -                                          old_dma);
-               }
-+
+-              }
 +              for (i = 0; i < adapter->num_rx_queues; i++)
 +                      ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
 +
@@ -235572,7 +235352,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
                ixgbe_up(adapter);
  
        clear_bit(__IXGBE_RESETTING, &adapter->state);
-@@ -770,20 +807,31 @@ static int ixgbe_get_sset_count(struct n
+@@ -770,20 +807,31 @@
  }
  
  static void ixgbe_get_ethtool_stats(struct net_device *netdev,
@@ -235606,7 +235386,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        }
        for (j = 0; j < adapter->num_tx_queues; j++) {
                queue_stat = (u64 *)&adapter->tx_ring[j].stats;
-@@ -792,24 +840,28 @@ static void ixgbe_get_ethtool_stats(stru
+@@ -792,24 +840,28 @@
                i += k;
        }
        for (j = 0; j < adapter->num_rx_queues; j++) {
@@ -235643,7 +235423,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        int i;
  
        switch (stringset) {
-@@ -831,14 +883,28 @@ static void ixgbe_get_strings(struct net
+@@ -831,14 +883,28 @@
                        sprintf(p, "rx_queue_%u_bytes", i);
                        p += ETH_GSTRING_LEN;
                }
@@ -235674,7 +235454,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
  {
        wol->supported = 0;
        wol->wolopts = 0;
-@@ -859,16 +925,17 @@ static int ixgbe_nway_reset(struct net_d
+@@ -859,16 +925,17 @@
  static int ixgbe_phys_id(struct net_device *netdev, u32 data)
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
@@ -235695,7 +235475,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
                msleep_interruptible(200);
        }
  
-@@ -879,67 +946,75 @@ static int ixgbe_phys_id(struct net_devi
+@@ -879,67 +946,75 @@
  }
  
  static int ixgbe_get_coalesce(struct net_device *netdev,
@@ -235708,14 +235488,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
 -              ec->rx_coalesce_usecs = adapter->rx_eitr;
 -      else
 -              ec->rx_coalesce_usecs = 1000000 / adapter->rx_eitr;
--
++      ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
 -      if (adapter->tx_eitr < IXGBE_MIN_ITR_USECS)
 -              ec->tx_coalesce_usecs = adapter->tx_eitr;
 -      else
 -              ec->tx_coalesce_usecs = 1000000 / adapter->tx_eitr;
 -
-       ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
-+
+-      ec->tx_max_coalesced_frames_irq = adapter->tx_ring[0].work_limit;
 +      /* only valid if in constant ITR mode */
 +      switch (adapter->itr_setting) {
 +      case 0:
@@ -235813,7 +235593,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        .get_settings           = ixgbe_get_settings,
        .set_settings           = ixgbe_set_settings,
        .get_drvinfo            = ixgbe_get_drvinfo,
-@@ -966,7 +1041,7 @@ static struct ethtool_ops ixgbe_ethtool_
+@@ -966,7 +1041,7 @@
        .set_tso                = ixgbe_set_tso,
        .get_strings            = ixgbe_get_strings,
        .phys_id                = ixgbe_phys_id,
@@ -235822,9 +235602,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_ethtool.c linux-2.6.27.19-5.1/dr
        .get_ethtool_stats      = ixgbe_get_ethtool_stats,
        .get_coalesce           = ixgbe_get_coalesce,
        .set_coalesce           = ixgbe_set_coalesce,
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_main.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_main.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_main.c
+--- a/drivers/net/ixgbe/ixgbe_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_main.c   Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -235847,9 +235627,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  char ixgbe_driver_name[] = "ixgbe";
  static const char ixgbe_driver_string[] =
 -      "Intel(R) 10 Gigabit PCI Express Network Driver";
-+                              "Intel(R) 10 Gigabit PCI Express Network Driver";
+-
 -#define DRV_VERSION "1.3.18-k4"
++                              "Intel(R) 10 Gigabit PCI Express Network Driver";
++
 +#define DRV_VERSION "1.3.30-k2"
  const char ixgbe_driver_version[] = DRV_VERSION;
 -static const char ixgbe_copyright[] =
@@ -235862,7 +235643,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  };
  
  /* ixgbe_pci_tbl - PCI Device ID Table
-@@ -70,19 +68,29 @@ static struct pci_device_id ixgbe_pci_tb
+@@ -70,9 +68,19 @@
         board_82598 },
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT),
         board_82598 },
@@ -235871,7 +235652,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4),
         board_82598 },
        {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT),
-        board_82598 },
++       board_82598 },
 +      {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT),
 +       board_82598 },
 +      {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM),
@@ -235879,10 +235660,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_XF_LR),
 +       board_82598 },
 +      {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM),
-+       board_82598 },
+        board_82598 },
  
        /* required last entry */
-       {0, }
+@@ -80,9 +88,9 @@
  };
  MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl);
  
@@ -235894,7 +235675,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  static struct notifier_block dca_notifier = {
        .notifier_call = ixgbe_notify_dca,
        .next          = NULL,
-@@ -104,7 +112,7 @@ static void ixgbe_release_hw_control(str
+@@ -104,7 +112,7 @@
        /* Let firmware take over control of h/w */
        ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
        IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT,
@@ -235903,7 +235684,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  static void ixgbe_get_hw_control(struct ixgbe_adapter *adapter)
-@@ -114,24 +122,11 @@ static void ixgbe_get_hw_control(struct 
+@@ -114,24 +122,11 @@
        /* Let firmware know the driver has taken over */
        ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
        IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT,
@@ -235920,9 +235701,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      struct ixgbe_adapter *adapter = hw->back;
 -      struct net_device *netdev = adapter->netdev;
 -      return netdev->name;
-+                      ctrl_ext | IXGBE_CTRL_EXT_DRV_LOAD);
- }
+-}
 -#endif
++                      ctrl_ext | IXGBE_CTRL_EXT_DRV_LOAD);
++}
  
  static void ixgbe_set_ivar(struct ixgbe_adapter *adapter, u16 int_alloc_entry,
 -                         u8 msix_vector)
@@ -235930,7 +235712,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        u32 ivar, index;
  
-@@ -144,13 +139,12 @@ static void ixgbe_set_ivar(struct ixgbe_
+@@ -144,13 +139,12 @@
  }
  
  static void ixgbe_unmap_and_free_tx_resource(struct ixgbe_adapter *adapter,
@@ -235948,16 +235730,17 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                tx_buffer_info->dma = 0;
        }
        if (tx_buffer_info->skb) {
-@@ -161,107 +155,120 @@ static void ixgbe_unmap_and_free_tx_reso
+@@ -161,107 +155,120 @@
  }
  
  static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
 -                                     struct ixgbe_ring *tx_ring,
 -                                     unsigned int eop,
 -                                     union ixgbe_adv_tx_desc *eop_desc)
+-{
 +                                       struct ixgbe_ring *tx_ring,
 +                                       unsigned int eop)
- {
++{
 +      struct ixgbe_hw *hw = &adapter->hw;
 +      u32 head, tail;
 +
@@ -236028,16 +235811,18 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
   **/
  static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
 -                                  struct ixgbe_ring *tx_ring)
-+                               struct ixgbe_ring *tx_ring)
- {
+-{
 -      struct net_device *netdev = adapter->netdev;
 -      union ixgbe_adv_tx_desc *tx_desc, *eop_desc;
-+      union ixgbe_adv_tx_desc *tx_desc;
-       struct ixgbe_tx_buffer *tx_buffer_info;
+-      struct ixgbe_tx_buffer *tx_buffer_info;
 -      unsigned int i, eop;
 -      bool cleaned = false;
 -      unsigned int total_tx_bytes = 0, total_tx_packets = 0;
 -
++                               struct ixgbe_ring *tx_ring)
++{
++      union ixgbe_adv_tx_desc *tx_desc;
++      struct ixgbe_tx_buffer *tx_buffer_info;
 +      struct net_device *netdev = adapter->netdev;
 +      struct sk_buff *skb;
 +      unsigned int i;
@@ -236059,11 +235844,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, i);
                        tx_buffer_info = &tx_ring->tx_buffer_info[i];
 -                      cleaned = (i == eop);
-+                      skb = tx_buffer_info->skb;
+-
 -                      tx_ring->stats.bytes += tx_buffer_info->length;
 -                      if (cleaned) {
 -                              struct sk_buff *skb = tx_buffer_info->skb;
++                      skb = tx_buffer_info->skb;
++
 +                      if (skb) {
                                unsigned int segs, bytecount;
 +
@@ -236074,10 +235860,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -                                          skb->len;
 -                              total_tx_packets += segs;
 -                              total_tx_bytes += bytecount;
+-                      }
 +                                          skb->len;
 +                              total_packets += segs;
 +                              total_bytes += bytecount;
-                       }
++                      }
 +
                        ixgbe_unmap_and_free_tx_resource(adapter,
 -                                                       tx_buffer_info);
@@ -236088,7 +235875,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        if (i == tx_ring->count)
                                i = 0;
 -              }
+-
 -              tx_ring->stats.packets++;
 -
 -              eop = tx_ring->tx_buffer_info[i].next_to_watch;
@@ -236098,6 +235885,8 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -              if (total_tx_packets >= tx_ring->work_limit)
 -                      break;
 -      }
+-
++
 +                      count++;
 +                      if (count == tx_ring->count)
 +                              goto done_cleaning;
@@ -236109,7 +235898,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +              if (head == oldhead)
 +                      goto done_cleaning;
 +      } /* while (1) */
++
 +done_cleaning:
        tx_ring->next_to_clean = i;
  
@@ -236121,21 +235910,34 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                /* Make sure that anybody stopping the queue after this
                 * sees the new next_to_clean.
                 */
-@@ -269,59 +276,68 @@ static bool ixgbe_clean_tx_irq(struct ix
+@@ -269,59 +276,68 @@
                if (__netif_subqueue_stopped(netdev, tx_ring->queue_index) &&
                    !test_bit(__IXGBE_DOWN, &adapter->state)) {
                        netif_wake_subqueue(netdev, tx_ring->queue_index);
 -                      adapter->restart_queue++;
-+                      ++adapter->restart_queue;
-               }
-       }
+-              }
+-      }
+-
 -      if (adapter->detect_tx_hung)
 -              if (ixgbe_check_tx_hang(adapter, tx_ring, eop, eop_desc))
 -                      netif_stop_subqueue(netdev, tx_ring->queue_index);
 -
 -      if (total_tx_packets >= tx_ring->work_limit)
 -              IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, tx_ring->eims_value);
+-
+-      tx_ring->total_bytes += total_tx_bytes;
+-      tx_ring->total_packets += total_tx_packets;
+-      adapter->net_stats.tx_bytes += total_tx_bytes;
+-      adapter->net_stats.tx_packets += total_tx_packets;
+-      cleaned = total_tx_packets ? true : false;
+-      return cleaned;
+-}
+-
+-#ifdef CONFIG_DCA
++                      ++adapter->restart_queue;
++              }
++      }
++
 +      if (adapter->detect_tx_hung) {
 +              if (ixgbe_check_tx_hang(adapter, tx_ring, i)) {
 +                      /* schedule immediate reset if we believe we hung */
@@ -236145,13 +235947,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                      ixgbe_tx_timeout(adapter->netdev);
 +              }
 +      }
--      tx_ring->total_bytes += total_tx_bytes;
--      tx_ring->total_packets += total_tx_packets;
--      adapter->net_stats.tx_bytes += total_tx_bytes;
--      adapter->net_stats.tx_packets += total_tx_packets;
--      cleaned = total_tx_packets ? true : false;
--      return cleaned;
++
 +      /* re-arm the interrupt */
 +      if ((total_packets >= tx_ring->work_limit) ||
 +          (count == tx_ring->count))
@@ -236164,9 +235960,8 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      adapter->net_stats.tx_bytes += total_bytes;
 +      adapter->net_stats.tx_packets += total_packets;
 +      return (total_packets ? true : false);
- }
--#ifdef CONFIG_DCA
++}
++
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
  static void ixgbe_update_rx_dca(struct ixgbe_adapter *adapter,
 -                              struct ixgbe_ring *rxr)
@@ -236175,9 +235970,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        u32 rxctrl;
        int cpu = get_cpu();
 -      int q = rxr - adapter->rx_ring;
-+      int q = rx_ring - adapter->rx_ring;
+-
 -      if (rxr->cpu != cpu) {
++      int q = rx_ring - adapter->rx_ring;
++
 +      if (rx_ring->cpu != cpu) {
                rxctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_DCA_RXCTRL(q));
                rxctrl &= ~IXGBE_DCA_RXCTRL_CPUID_MASK;
@@ -236199,9 +235995,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        u32 txctrl;
        int cpu = get_cpu();
 -      int q = txr - adapter->tx_ring;
-+      int q = tx_ring - adapter->tx_ring;
+-
 -      if (txr->cpu != cpu) {
++      int q = tx_ring - adapter->tx_ring;
++
 +      if (tx_ring->cpu != cpu) {
                txctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_DCA_TXCTRL(q));
                txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK;
@@ -236214,7 +236011,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
        put_cpu();
  }
-@@ -351,11 +367,14 @@ static int __ixgbe_notify_dca(struct dev
+@@ -351,11 +367,14 @@
  
        switch (event) {
        case DCA_PROVIDER_ADD:
@@ -236230,7 +236027,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        ixgbe_setup_dca(adapter);
                        break;
                }
-@@ -372,7 +391,7 @@ static int __ixgbe_notify_dca(struct dev
+@@ -372,7 +391,7 @@
        return 0;
  }
  
@@ -236239,7 +236036,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  /**
   * ixgbe_receive_skb - Send a completed packet up the stack
   * @adapter: board private structure
-@@ -382,16 +401,17 @@ static int __ixgbe_notify_dca(struct dev
+@@ -382,16 +401,17 @@
   * @rx_desc: rx descriptor
   **/
  static void ixgbe_receive_skb(struct ixgbe_adapter *adapter,
@@ -236260,7 +236057,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        lro_vlan_hwaccel_receive_skb(&ring->lro_mgr, skb,
                                                     adapter->vlgrp, tag,
                                                     rx_desc);
-@@ -399,18 +419,21 @@ static void ixgbe_receive_skb(struct ixg
+@@ -399,18 +419,21 @@
                        lro_receive_skb(&ring->lro_mgr, skb, rx_desc);
                ring->lro_used = true;
        } else {
@@ -236278,13 +236075,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        else
                                netif_rx(skb);
                }
+-      }
 +#ifdef CONFIG_IXGBE_LRO
-       }
++      }
 +#endif
  }
  
  /**
-@@ -420,14 +443,12 @@ static void ixgbe_receive_skb(struct ixg
+@@ -420,14 +443,12 @@
   * @skb: skb currently being received and modified
   **/
  static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
@@ -236302,24 +236100,27 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                return;
  
        /* if IP and error */
-@@ -455,37 +476,45 @@ static inline void ixgbe_rx_checksum(str
+@@ -455,37 +476,45 @@
   * @adapter: address of board private structure
   **/
  static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
 -                                     struct ixgbe_ring *rx_ring,
 -                                     int cleaned_count)
+-{
+-      struct net_device *netdev = adapter->netdev;
+-      struct pci_dev *pdev = adapter->pdev;
 +                                   struct ixgbe_ring *rx_ring,
 +                                   int cleaned_count)
- {
--      struct net_device *netdev = adapter->netdev;
-       struct pci_dev *pdev = adapter->pdev;
++{
++      struct pci_dev *pdev = adapter->pdev;
 +      struct net_device *netdev = adapter->netdev;
        union ixgbe_adv_rx_desc *rx_desc;
 -      struct ixgbe_rx_buffer *rx_buffer_info;
 -      struct sk_buff *skb;
-+      struct ixgbe_rx_buffer *bi;
-       unsigned int i;
+-      unsigned int i;
 -      unsigned int bufsz = adapter->rx_buf_len + NET_IP_ALIGN;
++      struct ixgbe_rx_buffer *bi;
++      unsigned int i;
 +      unsigned int bufsz = rx_ring->rx_buf_len + NET_IP_ALIGN;
  
        i = rx_ring->next_to_use;
@@ -236335,6 +236136,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -                      if (!rx_buffer_info->page) {
 -                              adapter->alloc_rx_page_failed++;
 -                              goto no_buffers;
+-                      }
+-                      rx_buffer_info->page_dma =
+-                          pci_map_page(pdev, rx_buffer_info->page,
+-                                       0, PAGE_SIZE, PCI_DMA_FROMDEVICE);
+-              }
+-
+-              if (!rx_buffer_info->skb) {
+-                      skb = netdev_alloc_skb(netdev, bufsz);
 +              if (!bi->page_dma &&
 +                  (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED)) {
 +                      if (!bi->page) {
@@ -236347,26 +236156,21 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                      } else {
 +                              /* use a half page if we're re-using */
 +                              bi->page_offset ^= (PAGE_SIZE / 2);
-                       }
--                      rx_buffer_info->page_dma =
--                          pci_map_page(pdev, rx_buffer_info->page,
--                                       0, PAGE_SIZE, PCI_DMA_FROMDEVICE);
++                      }
 +
 +                      bi->page_dma = pci_map_page(pdev, bi->page,
 +                                                  bi->page_offset,
 +                                                  (PAGE_SIZE / 2),
 +                                                  PCI_DMA_FROMDEVICE);
-               }
--              if (!rx_buffer_info->skb) {
--                      skb = netdev_alloc_skb(netdev, bufsz);
++              }
++
 +              if (!bi->skb) {
 +                      struct sk_buff *skb = netdev_alloc_skb(adapter->netdev,
 +                                                             bufsz);
  
                        if (!skb) {
                                adapter->alloc_rx_buff_failed++;
-@@ -499,28 +528,25 @@ static void ixgbe_alloc_rx_buffers(struc
+@@ -499,28 +528,25 @@
                         */
                        skb_reserve(skb, NET_IP_ALIGN);
  
@@ -236385,11 +236189,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -                          cpu_to_le64(rx_buffer_info->page_dma);
 -                      rx_desc->read.hdr_addr =
 -                                      cpu_to_le64(rx_buffer_info->dma);
-+                      rx_desc->read.pkt_addr = cpu_to_le64(bi->page_dma);
-+                      rx_desc->read.hdr_addr = cpu_to_le64(bi->dma);
-               } else {
+-              } else {
 -                      rx_desc->read.pkt_addr =
 -                                      cpu_to_le64(rx_buffer_info->dma);
++                      rx_desc->read.pkt_addr = cpu_to_le64(bi->page_dma);
++                      rx_desc->read.hdr_addr = cpu_to_le64(bi->dma);
++              } else {
 +                      rx_desc->read.pkt_addr = cpu_to_le64(bi->dma);
                }
  
@@ -236397,13 +236202,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                if (i == rx_ring->count)
                        i = 0;
 -              rx_buffer_info = &rx_ring->rx_buffer_info[i];
+-      }
 +              bi = &rx_ring->rx_buffer_info[i];
-       }
++      }
 +
  no_buffers:
        if (rx_ring->next_to_use != i) {
                rx_ring->next_to_use = i;
-@@ -538,46 +564,54 @@ no_buffers:
+@@ -538,46 +564,54 @@
        }
  }
  
@@ -236420,10 +236226,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  static bool ixgbe_clean_rx_irq(struct ixgbe_adapter *adapter,
 -                             struct ixgbe_ring *rx_ring,
 -                             int *work_done, int work_to_do)
+-{
+-      struct net_device *netdev = adapter->netdev;
 +                               struct ixgbe_ring *rx_ring,
 +                               int *work_done, int work_to_do)
- {
--      struct net_device *netdev = adapter->netdev;
++{
        struct pci_dev *pdev = adapter->pdev;
        union ixgbe_adv_rx_desc *rx_desc, *next_rxd;
        struct ixgbe_rx_buffer *rx_buffer_info, *next_buffer;
@@ -236469,7 +236276,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
                cleaned = true;
                skb = rx_buffer_info->skb;
-@@ -586,22 +620,26 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -586,22 +620,26 @@
  
                if (len && !skb_shinfo(skb)->nr_frags) {
                        pci_unmap_single(pdev, rx_buffer_info->dma,
@@ -236506,7 +236313,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                }
  
                i++;
-@@ -620,6 +658,7 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -620,6 +658,7 @@
                        rx_buffer_info->skb = next_buffer->skb;
                        rx_buffer_info->dma = next_buffer->dma;
                        next_buffer->skb = skb;
@@ -236514,7 +236321,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        adapter->non_eop_descs++;
                        goto next_desc;
                }
-@@ -635,9 +674,9 @@ static bool ixgbe_clean_rx_irq(struct ix
+@@ -635,9 +674,9 @@
                total_rx_bytes += skb->len;
                total_rx_packets++;
  
@@ -236526,7 +236333,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
  next_desc:
                rx_desc->wb.upper.status_error = 0;
-@@ -655,10 +694,12 @@ next_desc:
+@@ -655,19 +694,18 @@
                staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
        }
  
@@ -236539,17 +236346,16 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        rx_ring->next_to_clean = i;
        cleaned_count = IXGBE_DESC_UNUSED(rx_ring);
-@@ -666,9 +707,6 @@ next_desc:
        if (cleaned_count)
                ixgbe_alloc_rx_buffers(adapter, rx_ring, cleaned_count);
+-
 -      adapter->net_stats.rx_bytes += total_rx_bytes;
 -      adapter->net_stats.rx_packets += total_rx_packets;
--
        rx_ring->total_packets += total_rx_packets;
        rx_ring->total_bytes += total_rx_bytes;
-       adapter->net_stats.rx_bytes += total_rx_bytes;
-@@ -700,43 +738,43 @@ static void ixgbe_configure_msix(struct 
+@@ -700,43 +738,43 @@
                q_vector = &adapter->q_vector[v_idx];
                /* XXX for_each_bit(...) */
                r_idx = find_first_bit(q_vector->rxr_idx,
@@ -236575,11 +236381,13 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        r_idx = find_next_bit(q_vector->txr_idx,
 -                                            adapter->num_tx_queues,
 -                                            r_idx + 1);
+-              }
+-
+-              /* if this is a tx only vector use half the irq (tx) rate */
 +                                            adapter->num_tx_queues,
 +                                            r_idx + 1);
-               }
--              /* if this is a tx only vector use half the irq (tx) rate */
++              }
++
 +              /* if this is a tx only vector halve the interrupt rate */
                if (q_vector->txr_count && !q_vector->rxr_count)
 -                      q_vector->eitr = adapter->tx_eitr;
@@ -236606,7 +236414,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask);
  }
  
-@@ -766,8 +804,8 @@ enum latency_range {
+@@ -766,8 +804,8 @@
   *      parameter (see ixgbe_param.c)
   **/
  static u8 ixgbe_update_itr(struct ixgbe_adapter *adapter,
@@ -236617,7 +236425,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        unsigned int retval = itr_setting;
        u32 timepassed_us;
-@@ -814,40 +852,40 @@ static void ixgbe_set_itr_msix(struct ix
+@@ -814,40 +852,40 @@
        u32 new_itr;
        u8 current_itr, ret_itr;
        int i, r_idx, v_idx = ((void *)q_vector - (void *)(adapter->q_vector)) /
@@ -236664,15 +236472,17 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                                  q_vector->rx_itr - 1 : ret_itr);
                r_idx = find_next_bit(q_vector->rxr_idx, adapter->num_rx_queues,
 -                                    r_idx + 1);
-+                                    r_idx + 1);
-       }
+-      }
+-
 -      current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
++                                    r_idx + 1);
++      }
++
 +      current_itr = max(q_vector->rx_itr, q_vector->tx_itr);
  
        switch (current_itr) {
        /* counts and packets in update_itr are dependent on these numbers */
-@@ -871,13 +909,38 @@ static void ixgbe_set_itr_msix(struct ix
+@@ -871,13 +909,38 @@
                itr_reg = EITR_INTS_PER_SEC_TO_REG(new_itr);
                /* must write high and low 16 bits to reset counter */
                DPRINTK(TX_ERR, DEBUG, "writing eitr(%d): %08X\n", v_idx,
@@ -236712,7 +236522,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  static irqreturn_t ixgbe_msix_lsc(int irq, void *data)
  {
        struct net_device *netdev = data;
-@@ -885,11 +948,10 @@ static irqreturn_t ixgbe_msix_lsc(int ir
+@@ -885,11 +948,10 @@
        struct ixgbe_hw *hw = &adapter->hw;
        u32 eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
  
@@ -236728,7 +236538,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        if (!test_bit(__IXGBE_DOWN, &adapter->state))
                IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
-@@ -901,7 +963,7 @@ static irqreturn_t ixgbe_msix_clean_tx(i
+@@ -901,7 +963,7 @@
  {
        struct ixgbe_q_vector *q_vector = data;
        struct ixgbe_adapter  *adapter = q_vector->adapter;
@@ -236737,7 +236547,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        int i, r_idx;
  
        if (!q_vector->txr_count)
-@@ -909,16 +971,16 @@ static irqreturn_t ixgbe_msix_clean_tx(i
+@@ -909,16 +971,16 @@
  
        r_idx = find_first_bit(q_vector->txr_idx, adapter->num_tx_queues);
        for (i = 0; i < q_vector->txr_count; i++) {
@@ -236747,11 +236557,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
                if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
 -                      ixgbe_update_tx_dca(adapter, txr);
-+                      ixgbe_update_tx_dca(adapter, tx_ring);
- #endif
+-#endif
 -              txr->total_bytes = 0;
 -              txr->total_packets = 0;
 -              ixgbe_clean_tx_irq(adapter, txr);
++                      ixgbe_update_tx_dca(adapter, tx_ring);
++#endif
 +              tx_ring->total_bytes = 0;
 +              tx_ring->total_packets = 0;
 +              ixgbe_clean_tx_irq(adapter, tx_ring);
@@ -236761,16 +236572,18 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
  
        return IRQ_HANDLED;
-@@ -933,18 +995,26 @@ static irqreturn_t ixgbe_msix_clean_rx(i
+@@ -933,18 +995,26 @@
  {
        struct ixgbe_q_vector *q_vector = data;
        struct ixgbe_adapter  *adapter = q_vector->adapter;
 -      struct ixgbe_ring  *rxr;
 +      struct ixgbe_ring  *rx_ring;
        int r_idx;
+-
+-      r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
 +      int i;
-       r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
++
++      r_idx = find_first_bit(q_vector->rxr_idx, adapter->num_rx_queues);
 +      for (i = 0;  i < q_vector->rxr_count; i++) {
 +              rx_ring = &(adapter->rx_ring[r_idx]);
 +              rx_ring->total_bytes = 0;
@@ -236793,7 +236606,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        netif_rx_schedule(adapter->netdev, &q_vector->napi);
  
        return IRQ_HANDLED;
-@@ -963,39 +1033,90 @@ static irqreturn_t ixgbe_msix_clean_many
+@@ -963,39 +1033,90 @@
   * @napi: napi struct with our devices info in it
   * @budget: amount of work driver is allowed to do this pass, in packets
   *
@@ -236818,10 +236631,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
        if (adapter->flags & IXGBE_FLAG_DCA_ENABLED)
 -              ixgbe_update_rx_dca(adapter, rxr);
-+              ixgbe_update_rx_dca(adapter, rx_ring);
- #endif
+-#endif
+-
 -      ixgbe_clean_rx_irq(adapter, rxr, &work_done, budget);
++              ixgbe_update_rx_dca(adapter, rx_ring);
++#endif
++
 +      ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget);
  
        /* If all Rx work done, exit the polling mode */
@@ -236893,7 +236708,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        a->q_vector[v_idx].adapter = a;
        set_bit(r_idx, a->q_vector[v_idx].rxr_idx);
-@@ -1004,7 +1125,7 @@ static inline void map_vector_to_rxq(str
+@@ -1004,7 +1125,7 @@
  }
  
  static inline void map_vector_to_txq(struct ixgbe_adapter *a, int v_idx,
@@ -236902,7 +236717,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        a->q_vector[v_idx].adapter = a;
        set_bit(r_idx, a->q_vector[v_idx].txr_idx);
-@@ -1024,7 +1145,7 @@ static inline void map_vector_to_txq(str
+@@ -1024,7 +1145,7 @@
   * mapping configurations in here.
   **/
  static int ixgbe_map_rings_to_vectors(struct ixgbe_adapter *adapter,
@@ -236911,7 +236726,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        int v_start = 0;
        int rxr_idx = 0, txr_idx = 0;
-@@ -1101,28 +1222,28 @@ static int ixgbe_request_msix_irqs(struc
+@@ -1101,28 +1222,28 @@
                goto out;
  
  #define SET_HANDLER(_v) ((!(_v)->rxr_count) ? &ixgbe_msix_clean_tx : \
@@ -236950,7 +236765,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        if (err) {
                DPRINTK(PROBE, ERR,
                        "request_irq for msix_lsc failed: %d\n", err);
-@@ -1134,7 +1255,7 @@ static int ixgbe_request_msix_irqs(struc
+@@ -1134,7 +1255,7 @@
  free_queue_irqs:
        for (i = vector - 1; i >= 0; i--)
                free_irq(adapter->msix_entries[--vector].vector,
@@ -236959,7 +236774,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
        pci_disable_msix(adapter->pdev);
        kfree(adapter->msix_entries);
-@@ -1152,16 +1273,16 @@ static void ixgbe_set_itr(struct ixgbe_a
+@@ -1152,16 +1273,16 @@
        struct ixgbe_ring *rx_ring = &adapter->rx_ring[0];
        struct ixgbe_ring *tx_ring = &adapter->tx_ring[0];
  
@@ -236971,6 +236786,8 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -                                           q_vector->rx_eitr,
 -                                           rx_ring->total_packets,
 -                                           rx_ring->total_bytes);
+-
+-      current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
 +      q_vector->tx_itr = ixgbe_update_itr(adapter, new_itr,
 +                                          q_vector->tx_itr,
 +                                          tx_ring->total_packets,
@@ -236979,13 +236796,12 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                                          q_vector->rx_itr,
 +                                          rx_ring->total_packets,
 +                                          rx_ring->total_bytes);
--      current_itr = max(q_vector->rx_eitr, q_vector->tx_eitr);
++
 +      current_itr = max(q_vector->rx_itr, q_vector->tx_itr);
  
        switch (current_itr) {
        /* counts and packets in update_itr are dependent on these numbers */
-@@ -1206,19 +1327,21 @@ static irqreturn_t ixgbe_intr(int irq, v
+@@ -1206,19 +1327,21 @@
        struct ixgbe_hw *hw = &adapter->hw;
        u32 eicr;
  
@@ -237005,8 +236821,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -              adapter->lsc_int++;
 -              if (!test_bit(__IXGBE_DOWN, &adapter->state))
 -                      mod_timer(&adapter->watchdog_timer, jiffies);
-       }
+-      }
+-
++      }
++
 +      if (eicr & IXGBE_EICR_LSC)
 +              ixgbe_check_lsc(adapter);
 +
@@ -237014,7 +236832,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        if (netif_rx_schedule_prep(netdev, &adapter->q_vector[0].napi)) {
                adapter->tx_ring[0].total_packets = 0;
-@@ -1261,10 +1384,10 @@ static int ixgbe_request_irq(struct ixgb
+@@ -1261,10 +1384,10 @@
                err = ixgbe_request_msix_irqs(adapter);
        } else if (adapter->flags & IXGBE_FLAG_MSI_ENABLED) {
                err = request_irq(adapter->pdev->irq, &ixgbe_intr, 0,
@@ -237027,7 +236845,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
  
        if (err)
-@@ -1288,7 +1411,7 @@ static void ixgbe_free_irq(struct ixgbe_
+@@ -1288,7 +1411,7 @@
                i--;
                for (; i >= 0; i--) {
                        free_irq(adapter->msix_entries[i].vector,
@@ -237036,7 +236854,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                }
  
                ixgbe_reset_q_vectors(adapter);
-@@ -1322,6 +1445,8 @@ static inline void ixgbe_irq_enable(stru
+@@ -1322,6 +1445,8 @@
  {
        u32 mask;
        mask = IXGBE_EIMS_ENABLE_MASK;
@@ -237045,7 +236863,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
        IXGBE_WRITE_FLUSH(&adapter->hw);
  }
-@@ -1335,7 +1460,7 @@ static void ixgbe_configure_msi_and_lega
+@@ -1335,7 +1460,7 @@
        struct ixgbe_hw *hw = &adapter->hw;
  
        IXGBE_WRITE_REG(hw, IXGBE_EITR(0),
@@ -237054,7 +236872,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        ixgbe_set_ivar(adapter, IXGBE_IVAR_RX_QUEUE(0), 0);
        ixgbe_set_ivar(adapter, IXGBE_IVAR_TX_QUEUE(0), 0);
-@@ -1347,26 +1472,31 @@ static void ixgbe_configure_msi_and_lega
+@@ -1347,26 +1472,31 @@
  }
  
  /**
@@ -237093,7 +236911,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), tdlen);
                IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0);
                IXGBE_WRITE_REG(hw, IXGBE_TDT(j), 0);
-@@ -1375,20 +1505,66 @@ static void ixgbe_configure_tx(struct ix
+@@ -1375,20 +1505,66 @@
                /* Disable Tx Head Writeback RO bit, since this hoses
                 * bookkeeping if things aren't delivered in order.
                 */
@@ -237101,12 +236919,17 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +              txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(j));
                txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN;
 -              IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl);
-+              IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl);
-       }
- }
+-      }
+-}
+-
 -#define PAGE_USE_COUNT(S) (((S) >> PAGE_SHIFT) + \
 -                      (((S) & (PAGE_SIZE - 1)) ? 1 : 0))
+-
+-#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT                       2
++              IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(j), txctrl);
++      }
++}
++
 +#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT       2
 +
 +static void ixgbe_configure_srrctl(struct ixgbe_adapter *adapter, int index)
@@ -237126,8 +236949,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      rx_ring = &adapter->rx_ring[queue0];
 +
 +      srrctl = IXGBE_READ_REG(&adapter->hw, IXGBE_SRRCTL(index));
--#define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT                       2
++
 +      srrctl &= ~IXGBE_SRRCTL_BSIZEHDR_MASK;
 +      srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK;
 +
@@ -237166,7 +236988,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
   * @tcph: pointer to tcp header structure
   * @hdr_flags: pointer to header flags
   * @priv: private data
-@@ -1399,8 +1575,8 @@ static int ixgbe_get_skb_hdr(struct sk_b
+@@ -1399,8 +1575,8 @@
        union ixgbe_adv_rx_desc *rx_desc = priv;
  
        /* Verify that this is a valid IPv4 TCP packet */
@@ -237177,21 +236999,22 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                return -1;
  
        /* Set network headers */
-@@ -1412,8 +1588,12 @@ static int ixgbe_get_skb_hdr(struct sk_b
+@@ -1412,8 +1588,12 @@
        return 0;
  }
  
+-/**
+- * ixgbe_configure_rx - Configure 8254x Receive Unit after Reset
 +#endif /* CONFIG_IXGBE_LRO */
 +#define PAGE_USE_COUNT(S) (((S) >> PAGE_SHIFT) + \
 +                           (((S) & (PAGE_SIZE - 1)) ? 1 : 0))
 +
- /**
-- * ixgbe_configure_rx - Configure 8254x Receive Unit after Reset
++/**
 + * ixgbe_configure_rx - Configure 8259x Receive Unit after Reset
   * @adapter: board private structure
   *
   * Configure the Rx unit of the MAC after a reset.
-@@ -1426,25 +1606,26 @@ static void ixgbe_configure_rx(struct ix
+@@ -1426,25 +1606,26 @@
        int max_frame = netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
        int i, j;
        u32 rdlen, rxctrl, rxcsum;
@@ -237227,7 +237050,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
  
        fctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
-@@ -1461,28 +1642,6 @@ static void ixgbe_configure_rx(struct ix
+@@ -1461,28 +1642,6 @@
  
        pages = PAGE_USE_COUNT(adapter->netdev->mtu);
  
@@ -237256,7 +237079,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        rdlen = adapter->rx_ring[0].count * sizeof(union ixgbe_adv_rx_desc);
        /* disable receives while setting up the descriptors */
        rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
-@@ -1492,25 +1651,47 @@ static void ixgbe_configure_rx(struct ix
+@@ -1492,25 +1651,47 @@
         * the Base and Length of the Rx Descriptor Ring */
        for (i = 0; i < adapter->num_rx_queues; i++) {
                rdba = adapter->rx_ring[i].dma;
@@ -237323,7 +237146,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
                /* Fill out redirection table */
-@@ -1525,22 +1706,20 @@ static void ixgbe_configure_rx(struct ix
+@@ -1525,22 +1706,20 @@
                }
  
                /* Fill out hash function seeds */
@@ -237356,7 +237179,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc);
        }
  
-@@ -1562,7 +1741,7 @@ static void ixgbe_configure_rx(struct ix
+@@ -1562,7 +1741,7 @@
  }
  
  static void ixgbe_vlan_rx_register(struct net_device *netdev,
@@ -237365,10 +237188,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        u32 ctrl;
-@@ -1571,6 +1750,16 @@ static void ixgbe_vlan_rx_register(struc
+@@ -1570,6 +1749,16 @@
+       if (!test_bit(__IXGBE_DOWN, &adapter->state))
                ixgbe_irq_disable(adapter);
        adapter->vlgrp = grp;
++
 +      /*
 +       * For a DCB driver, always enable VLAN tag stripping so we can
 +       * still receive traffic from a DCB-enabled host even if we're
@@ -237378,11 +237202,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      ctrl |= IXGBE_VLNCTRL_VME;
 +      ctrl &= ~IXGBE_VLNCTRL_CFIEN;
 +      IXGBE_WRITE_REG(&adapter->hw, IXGBE_VLNCTRL, ctrl);
-+
        if (grp) {
                /* enable VLAN tag insert/strip */
-               ctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_VLNCTRL);
-@@ -1586,14 +1775,16 @@ static void ixgbe_vlan_rx_register(struc
+@@ -1586,14 +1775,16 @@
  static void ixgbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
@@ -237400,7 +237223,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        if (!test_bit(__IXGBE_DOWN, &adapter->state))
                ixgbe_irq_disable(adapter);
-@@ -1604,7 +1795,7 @@ static void ixgbe_vlan_rx_kill_vid(struc
+@@ -1604,7 +1795,7 @@
                ixgbe_irq_enable(adapter);
  
        /* remove VID from filter table */
@@ -237409,13 +237232,27 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
-@@ -1621,23 +1812,37 @@ static void ixgbe_restore_vlan(struct ix
+@@ -1621,23 +1812,37 @@
        }
  }
  
+-/**
+- * ixgbe_set_multi - Multicast and Promiscuous mode set
+- * @netdev: network interface device structure
+- *
+- * The set_multi entry point is called whenever the multicast address
+- * list or the network interface flags are updated.  This routine is
+- * responsible for configuring the hardware for proper multicast,
+- * promiscuous mode, and all-multi behavior.
+- **/
+-static void ixgbe_set_multi(struct net_device *netdev)
+-{
+-      struct ixgbe_adapter *adapter = netdev_priv(netdev);
+-      struct ixgbe_hw *hw = &adapter->hw;
 +static u8 *ixgbe_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, u32 *vmdq)
 +{
-+      struct dev_mc_list *mc_ptr;
+       struct dev_mc_list *mc_ptr;
+-      u8 *mta_list;
 +      u8 *addr = *mc_addr_ptr;
 +      *vmdq = 0;
 +
@@ -237428,27 +237265,19 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      return addr;
 +}
 +
- /**
-- * ixgbe_set_multi - Multicast and Promiscuous mode set
++/**
 + * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set
-  * @netdev: network interface device structure
-  *
-- * The set_multi entry point is called whenever the multicast address
-- * list or the network interface flags are updated.  This routine is
-- * responsible for configuring the hardware for proper multicast,
-- * promiscuous mode, and all-multi behavior.
++ * @netdev: network interface device structure
++ *
 + * The set_rx_method entry point is called whenever the unicast/multicast
 + * address list or the network interface flags are updated.  This routine is
 + * responsible for configuring the hardware for proper unicast, multicast and
 + * promiscuous mode.
-  **/
--static void ixgbe_set_multi(struct net_device *netdev)
++ **/
 +static void ixgbe_set_rx_mode(struct net_device *netdev)
- {
-       struct ixgbe_adapter *adapter = netdev_priv(netdev);
-       struct ixgbe_hw *hw = &adapter->hw;
--      struct dev_mc_list *mc_ptr;
--      u8 *mta_list;
++{
++      struct ixgbe_adapter *adapter = netdev_priv(netdev);
++      struct ixgbe_hw *hw = &adapter->hw;
        u32 fctrl, vlnctrl;
 -      int i;
 +      u8 *addr_list = NULL;
@@ -237456,7 +237285,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        /* Check for Promiscuous and All Multicast modes */
  
-@@ -1645,6 +1850,7 @@ static void ixgbe_set_multi(struct net_d
+@@ -1645,6 +1850,7 @@
        vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
  
        if (netdev->flags & IFF_PROMISC) {
@@ -237464,7 +237293,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
                vlnctrl &= ~IXGBE_VLNCTRL_VFE;
        } else {
-@@ -1655,33 +1861,25 @@ static void ixgbe_set_multi(struct net_d
+@@ -1655,33 +1861,25 @@
                        fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
                }
                vlnctrl |= IXGBE_VLNCTRL_VFE;
@@ -237512,7 +237341,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter)
-@@ -1695,10 +1893,16 @@ static void ixgbe_napi_enable_all(struct
+@@ -1695,10 +1893,16 @@
                q_vectors = 1;
  
        for (q_idx = 0; q_idx < q_vectors; q_idx++) {
@@ -237530,7 +237359,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
  }
  
-@@ -1720,20 +1924,69 @@ static void ixgbe_napi_disable_all(struc
+@@ -1720,20 +1924,69 @@
        }
  }
  
@@ -237602,7 +237431,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
-@@ -1751,7 +2004,7 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1751,7 +2004,7 @@
            (adapter->flags & IXGBE_FLAG_MSI_ENABLED)) {
                if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
                        gpie = (IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_EIAME |
@@ -237611,7 +237440,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                } else {
                        /* MSI only */
                        gpie = 0;
-@@ -1767,6 +2020,13 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1767,6 +2020,13 @@
                IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE);
        }
  
@@ -237625,7 +237454,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD);
        if (max_frame != (mhadd >> IXGBE_MHADD_MFS_SHIFT)) {
                mhadd &= ~IXGBE_MHADD_MFS_MASK;
-@@ -1778,6 +2038,8 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1778,6 +2038,8 @@
        for (i = 0; i < adapter->num_tx_queues; i++) {
                j = adapter->tx_ring[i].reg_idx;
                txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(j));
@@ -237634,7 +237463,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                txdctl |= IXGBE_TXDCTL_ENABLE;
                IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j), txdctl);
        }
-@@ -1812,6 +2074,8 @@ static int ixgbe_up_complete(struct ixgb
+@@ -1812,6 +2074,8 @@
  
        /* bring the link up in the watchdog, this could race with our first
         * link up interrupt but shouldn't be a problem */
@@ -237643,7 +237472,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        mod_timer(&adapter->watchdog_timer, jiffies);
        return 0;
  }
-@@ -1836,50 +2100,14 @@ int ixgbe_up(struct ixgbe_adapter *adapt
+@@ -1836,50 +2100,14 @@
  
  void ixgbe_reset(struct ixgbe_adapter *adapter)
  {
@@ -237683,8 +237512,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -              if (err)
 -                      return err;
 -      }
-+      hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
+-
 -      ixgbe_reset(adapter);
 -
 -      if (netif_running(netdev))
@@ -237693,12 +237521,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      netif_device_attach(netdev);
 -
 -      return 0;
- }
+-}
 -#endif
++      hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
++
++}
  
  /**
   * ixgbe_clean_rx_ring - Free Rx Buffers per Queue
-@@ -1887,7 +2115,7 @@ static int ixgbe_resume(struct pci_dev *
+@@ -1887,7 +2115,7 @@
   * @rx_ring: ring to free buffers from
   **/
  static void ixgbe_clean_rx_ring(struct ixgbe_adapter *adapter,
@@ -237707,7 +237538,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct pci_dev *pdev = adapter->pdev;
        unsigned long size;
-@@ -1901,8 +2129,8 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1901,8 +2129,8 @@
                rx_buffer_info = &rx_ring->rx_buffer_info[i];
                if (rx_buffer_info->dma) {
                        pci_unmap_single(pdev, rx_buffer_info->dma,
@@ -237718,7 +237549,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        rx_buffer_info->dma = 0;
                }
                if (rx_buffer_info->skb) {
-@@ -1911,12 +2139,12 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1911,12 +2139,12 @@
                }
                if (!rx_buffer_info->page)
                        continue;
@@ -237734,7 +237565,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
  
        size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
-@@ -1938,7 +2166,7 @@ static void ixgbe_clean_rx_ring(struct i
+@@ -1938,7 +2166,7 @@
   * @tx_ring: ring to be cleaned
   **/
  static void ixgbe_clean_tx_ring(struct ixgbe_adapter *adapter,
@@ -237743,7 +237574,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct ixgbe_tx_buffer *tx_buffer_info;
        unsigned long size;
-@@ -1991,75 +2219,64 @@ static void ixgbe_clean_all_tx_rings(str
+@@ -1991,75 +2219,64 @@
  void ixgbe_down(struct ixgbe_adapter *adapter)
  {
        struct net_device *netdev = adapter->netdev;
@@ -237771,10 +237602,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      IXGBE_WRITE_FLUSH(hw);
        msleep(10);
  
--      ixgbe_irq_disable(adapter);
 +      netif_tx_stop_all_queues(netdev);
 +
-+      ixgbe_irq_disable(adapter);
+       ixgbe_irq_disable(adapter);
  
        ixgbe_napi_disable_all(adapter);
 +
@@ -237791,7 +237621,8 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        netif_carrier_off(netdev);
 -      netif_tx_stop_all_queues(netdev);
+-
++
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
 +      if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
 +              adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
@@ -237819,21 +237650,13 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      if (netif_running(netdev)) {
 -              ixgbe_down(adapter);
 -              ixgbe_free_irq(adapter);
-+#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
-+      /* since we reset the hardware DCA settings were cleared */
-+      if (dca_add_requester(&adapter->pdev->dev) == 0) {
-+              adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
-+              /* always use CB2 mode, difference is masked
-+               * in the CB driver */
-+              IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2);
-+              ixgbe_setup_dca(adapter);
-       }
+-      }
 -
 -#ifdef CONFIG_PM
 -      retval = pci_save_state(pdev);
 -      if (retval)
 -              return retval;
- #endif
+-#endif
 -
 -      pci_enable_wake(pdev, PCI_D3hot, 0);
 -      pci_enable_wake(pdev, PCI_D3cold, 0);
@@ -237850,10 +237673,20 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -static void ixgbe_shutdown(struct pci_dev *pdev)
 -{
 -      ixgbe_suspend(pdev, PMSG_SUSPEND);
++#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
++      /* since we reset the hardware DCA settings were cleared */
++      if (dca_add_requester(&adapter->pdev->dev) == 0) {
++              adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
++              /* always use CB2 mode, difference is masked
++               * in the CB driver */
++              IXGBE_WRITE_REG(hw, IXGBE_DCA_CTRL, 2);
++              ixgbe_setup_dca(adapter);
++      }
++#endif
  }
  
  /**
-@@ -2072,11 +2289,11 @@ static void ixgbe_shutdown(struct pci_de
+@@ -2072,11 +2289,11 @@
  static int ixgbe_poll(struct napi_struct *napi, int budget)
  {
        struct ixgbe_q_vector *q_vector = container_of(napi,
@@ -237861,14 +237694,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                                                struct ixgbe_q_vector, napi);
        struct ixgbe_adapter *adapter = q_vector->adapter;
 -      int tx_cleaned = 0, work_done = 0;
-+      int tx_cleaned, work_done = 0;
+-
 -#ifdef CONFIG_DCA
++      int tx_cleaned, work_done = 0;
++
 +#if defined(CONFIG_DCA) || defined(CONFIG_DCA_MODULE)
        if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
                ixgbe_update_tx_dca(adapter, adapter->tx_ring);
                ixgbe_update_rx_dca(adapter, adapter->rx_ring);
-@@ -2092,12 +2309,11 @@ static int ixgbe_poll(struct napi_struct
+@@ -2092,12 +2309,11 @@
        /* If budget not fully consumed, exit the polling mode */
        if (work_done < budget) {
                netif_rx_complete(adapter->netdev, napi);
@@ -237882,7 +237716,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        return work_done;
  }
  
-@@ -2118,13 +2334,82 @@ static void ixgbe_reset_task(struct work
+@@ -2118,13 +2334,82 @@
        struct ixgbe_adapter *adapter;
        adapter = container_of(work, struct ixgbe_adapter, reset_task);
  
@@ -237966,7 +237800,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        int err, vector_threshold;
  
-@@ -2143,7 +2428,7 @@ static void ixgbe_acquire_msix_vectors(s
+@@ -2143,7 +2428,7 @@
         */
        while (vectors >= vector_threshold) {
                err = pci_enable_msix(adapter->pdev, adapter->msix_entries,
@@ -237975,7 +237809,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                if (!err) /* Success in acquiring all requested vectors. */
                        break;
                else if (err < 0)
-@@ -2161,55 +2446,15 @@ static void ixgbe_acquire_msix_vectors(s
+@@ -2161,78 +2446,62 @@
                adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
                kfree(adapter->msix_entries);
                adapter->msix_entries = NULL;
@@ -237994,10 +237828,22 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -{
 -      int nrq, ntq;
 -      int feature_mask = 0, rss_i, rss_m;
--
--      /* Number of supported queues */
--      switch (adapter->hw.mac.type) {
--      case ixgbe_mac_82598EB:
++/**
++ * ixgbe_cache_ring_register - Descriptor ring to register mapping
++ * @adapter: board private structure to initialize
++ *
++ * Once we know the feature-set enabled for the device, we'll cache
++ * the register offset the descriptor ring is assigned to.
++ **/
++static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
++{
++      int feature_mask = 0, rss_i;
++      int i, txr_idx, rxr_idx;
++      int dcb_i;
+       /* Number of supported queues */
+       switch (adapter->hw.mac.type) {
+       case ixgbe_mac_82598EB:
 -              rss_i = adapter->ring_feature[RING_F_RSS].indices;
 -              rss_m = 0;
 -              feature_mask |= IXGBE_FLAG_RSS_ENABLED;
@@ -238030,23 +237876,24 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      adapter->num_tx_queues = ntq;
 -}
 -
- /**
-  * ixgbe_cache_ring_register - Descriptor ring to register mapping
-  * @adapter: board private structure to initialize
-@@ -2219,20 +2464,44 @@ static void __devinit ixgbe_set_num_queu
-  **/
- static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
- {
+-/**
+- * ixgbe_cache_ring_register - Descriptor ring to register mapping
+- * @adapter: board private structure to initialize
+- *
+- * Once we know the feature-set enabled for the device, we'll cache
+- * the register offset the descriptor ring is assigned to.
+- **/
+-static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
+-{
 -      /* TODO: Remove all uses of the indices in the cases where multiple
 -       *       features are OR'd together, if the feature set makes sense.
 -       */
-       int feature_mask = 0, rss_i;
-       int i, txr_idx, rxr_idx;
-+      int dcb_i;
-       /* Number of supported queues */
-       switch (adapter->hw.mac.type) {
-       case ixgbe_mac_82598EB:
+-      int feature_mask = 0, rss_i;
+-      int i, txr_idx, rxr_idx;
+-
+-      /* Number of supported queues */
+-      switch (adapter->hw.mac.type) {
+-      case ixgbe_mac_82598EB:
 +              dcb_i = adapter->ring_feature[RING_F_DCB].indices;
                rss_i = adapter->ring_feature[RING_F_RSS].indices;
                txr_idx = 0;
@@ -238081,7 +237928,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                case (IXGBE_FLAG_RSS_ENABLED):
                        for (i = 0; i < adapter->num_rx_queues; i++)
                                adapter->rx_ring[i].reg_idx = i;
-@@ -2257,26 +2526,27 @@ static void __devinit ixgbe_cache_ring_r
+@@ -2257,26 +2526,27 @@
   * number of queues at compile-time.  The polling_netdev array is
   * intended for Multiqueue, but should work fine with a single queue.
   **/
@@ -238107,14 +237954,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +              adapter->tx_ring[i].count = adapter->tx_ring_count;
                adapter->tx_ring[i].queue_index = i;
        }
-+
-       for (i = 0; i < adapter->num_rx_queues; i++) {
+-      for (i = 0; i < adapter->num_rx_queues; i++) {
 -              adapter->rx_ring[i].count = IXGBE_DEFAULT_RXD;
++
++      for (i = 0; i < adapter->num_rx_queues; i++) {
 +              adapter->rx_ring[i].count = adapter->rx_ring_count;
                adapter->rx_ring[i].queue_index = i;
        }
  
-@@ -2297,26 +2567,19 @@ err_tx_ring_allocation:
+@@ -2297,17 +2567,10 @@
   * Attempt to configure the interrupts using the best available
   * capabilities of the hardware and the kernel.
   **/
@@ -238124,17 +237972,16 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        int err = 0;
        int vector, v_budget;
-       /*
+-
+-      /*
 -       * Set the default interrupt throttle rate.
 -       */
 -      adapter->rx_eitr = (1000000 / IXGBE_DEFAULT_ITR_RX_USECS);
 -      adapter->tx_eitr = (1000000 / IXGBE_DEFAULT_ITR_TX_USECS);
--
--      /*
+       /*
         * It's easy to be greedy for MSI-X vectors, but it really
-        * doesn't do us much good if we have a lot more vectors
-        * than CPU's.  So let's be conservative and only ask for
+@@ -2316,7 +2579,7 @@
         * (roughly) twice the number of vectors as there are CPU's.
         */
        v_budget = min(adapter->num_rx_queues + adapter->num_tx_queues,
@@ -238143,7 +237990,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        /*
         * At the same time, hardware can only support a maximum of
-@@ -2330,8 +2593,9 @@ static int __devinit ixgbe_set_interrupt
+@@ -2330,8 +2593,9 @@
        /* A failure in MSI-X entry allocation isn't fatal, but it does
         * mean we disable MSI-X capabilities of the adapter. */
        adapter->msix_entries = kcalloc(v_budget,
@@ -238154,7 +238001,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
                ixgbe_set_num_queues(adapter);
                kfree(adapter->tx_ring);
-@@ -2339,7 +2603,7 @@ static int __devinit ixgbe_set_interrupt
+@@ -2339,7 +2603,7 @@
                err = ixgbe_alloc_queues(adapter);
                if (err) {
                        DPRINTK(PROBE, ERR, "Unable to allocate memory "
@@ -238163,7 +238010,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        goto out;
                }
  
-@@ -2360,7 +2624,7 @@ try_msi:
+@@ -2360,7 +2624,7 @@
                adapter->flags |= IXGBE_FLAG_MSI_ENABLED;
        } else {
                DPRINTK(HW, DEBUG, "Unable to allocate MSI interrupt, "
@@ -238172,7 +238019,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                /* reset err */
                err = 0;
        }
-@@ -2372,7 +2636,7 @@ out:
+@@ -2372,7 +2636,7 @@
        return err;
  }
  
@@ -238181,7 +238028,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
                adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
-@@ -2396,7 +2660,7 @@ static void ixgbe_reset_interrupt_capabi
+@@ -2396,7 +2660,7 @@
   * - Hardware queue count (num_*_queues)
   *   - defined by miscellaneous hardware support/features (RSS, etc.)
   **/
@@ -238190,7 +238037,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        int err;
  
-@@ -2416,9 +2680,9 @@ static int __devinit ixgbe_init_interrup
+@@ -2416,9 +2680,9 @@
        }
  
        DPRINTK(DRV, INFO, "Multiqueue %s: Rx Queue count = %u, "
@@ -238203,7 +238050,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        set_bit(__IXGBE_DOWN, &adapter->state);
  
-@@ -2432,6 +2696,56 @@ err_alloc_queues:
+@@ -2432,6 +2696,56 @@
  }
  
  /**
@@ -238260,7 +238107,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
   * ixgbe_sw_init - Initialize general software structures (struct ixgbe_adapter)
   * @adapter: board private structure to initialize
   *
-@@ -2444,34 +2758,72 @@ static int __devinit ixgbe_sw_init(struc
+@@ -2444,34 +2758,72 @@
        struct ixgbe_hw *hw = &adapter->hw;
        struct pci_dev *pdev = adapter->pdev;
        unsigned int rss;
@@ -238349,7 +238196,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                dev_err(&pdev->dev, "EEPROM initialization failed\n");
                return -EIO;
        }
-@@ -2487,105 +2839,160 @@ static int __devinit ixgbe_sw_init(struc
+@@ -2487,169 +2839,43 @@
  /**
   * ixgbe_setup_tx_resources - allocate Tx resources (Descriptors)
   * @adapter: board private structure
@@ -238382,6 +238229,88 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        /* round up to nearest 4K */
 -      txdr->size = txdr->count * sizeof(union ixgbe_adv_tx_desc);
 -      txdr->size = ALIGN(txdr->size, 4096);
+-
+-      txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
+-      if (!txdr->desc) {
+-              vfree(txdr->tx_buffer_info);
+-              DPRINTK(PROBE, ERR,
+-                      "Memory allocation failed for the tx desc ring\n");
+-              return -ENOMEM;
+-      }
+-
+-      txdr->next_to_use = 0;
+-      txdr->next_to_clean = 0;
+-      txdr->work_limit = txdr->count;
+-
+-      return 0;
+-}
+-
+-/**
+- * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
+- * @adapter: board private structure
+- * @rxdr:    rx descriptor ring (for a specific queue) to setup
+- *
+- * Returns 0 on success, negative on failure
+- **/
+-int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
+-                           struct ixgbe_ring *rxdr)
+-{
+-      struct pci_dev *pdev = adapter->pdev;
+-      int size;
+-
+-      size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
+-      rxdr->lro_mgr.lro_arr = vmalloc(size);
+-      if (!rxdr->lro_mgr.lro_arr)
+-              return -ENOMEM;
+-      memset(rxdr->lro_mgr.lro_arr, 0, size);
+-
+-      size = sizeof(struct ixgbe_rx_buffer) * rxdr->count;
+-      rxdr->rx_buffer_info = vmalloc(size);
+-      if (!rxdr->rx_buffer_info) {
+-              DPRINTK(PROBE, ERR,
+-                      "vmalloc allocation failed for the rx desc ring\n");
+-              goto alloc_failed;
+-      }
+-      memset(rxdr->rx_buffer_info, 0, size);
+-
+-      /* Round up to nearest 4K */
+-      rxdr->size = rxdr->count * sizeof(union ixgbe_adv_rx_desc);
+-      rxdr->size = ALIGN(rxdr->size, 4096);
+-
+-      rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);
+-
+-      if (!rxdr->desc) {
+-              DPRINTK(PROBE, ERR,
+-                      "Memory allocation failed for the rx desc ring\n");
+-              vfree(rxdr->rx_buffer_info);
+-              goto alloc_failed;
+-      }
+-
+-      rxdr->next_to_clean = 0;
+-      rxdr->next_to_use = 0;
+-
+-      return 0;
+-
+-alloc_failed:
+-      vfree(rxdr->lro_mgr.lro_arr);
+-      rxdr->lro_mgr.lro_arr = NULL;
+-      return -ENOMEM;
+-}
+-
+-/**
+- * ixgbe_free_tx_resources - Free Tx Resources per Queue
+- * @adapter: board private structure
+- * @tx_ring: Tx descriptor ring for a specific queue
+- *
+- * Free all transmit software resources
+- **/
+-static void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
+-                                  struct ixgbe_ring *tx_ring)
+-{
+-      struct pci_dev *pdev = adapter->pdev;
+-
+-      ixgbe_clean_tx_ring(adapter, tx_ring);
+-
 +      tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc) +
 +                      sizeof(u32);
 +      tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -238390,47 +238319,90 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                                           &tx_ring->dma);
 +      if (!tx_ring->desc)
 +              goto err;
--      txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
--      if (!txdr->desc) {
--              vfree(txdr->tx_buffer_info);
--              DPRINTK(PROBE, ERR,
--                      "Memory allocation failed for the tx desc ring\n");
--              return -ENOMEM;
--      }
++
 +      tx_ring->next_to_use = 0;
 +      tx_ring->next_to_clean = 0;
 +      tx_ring->work_limit = tx_ring->count;
 +      return 0;
--      txdr->next_to_use = 0;
--      txdr->next_to_clean = 0;
--      txdr->work_limit = txdr->count;
++
 +err:
-+      vfree(tx_ring->tx_buffer_info);
-+      tx_ring->tx_buffer_info = NULL;
+       vfree(tx_ring->tx_buffer_info);
+       tx_ring->tx_buffer_info = NULL;
+-
+-      pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma);
+-
+-      tx_ring->desc = NULL;
+-}
+-
+-/**
+- * ixgbe_free_all_tx_resources - Free Tx Resources for All Queues
+- * @adapter: board private structure
+- *
+- * Free all transmit software resources
+- **/
+-static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter)
+-{
+-      int i;
+-
+-      for (i = 0; i < adapter->num_tx_queues; i++)
+-              ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]);
+-}
+-
+-/**
+- * ixgbe_free_rx_resources - Free Rx Resources
+- * @adapter: board private structure
+- * @rx_ring: ring to clean the resources from
+- *
+- * Free all receive software resources
+- **/
+-static void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
+-                                  struct ixgbe_ring *rx_ring)
+-{
+-      struct pci_dev *pdev = adapter->pdev;
+-
+-      vfree(rx_ring->lro_mgr.lro_arr);
+-      rx_ring->lro_mgr.lro_arr = NULL;
+-
+-      ixgbe_clean_rx_ring(adapter, rx_ring);
+-
+-      vfree(rx_ring->rx_buffer_info);
+-      rx_ring->rx_buffer_info = NULL;
+-
+-      pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
+-
+-      rx_ring->desc = NULL;
+-}
+-
+-/**
+- * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
+- * @adapter: board private structure
+- *
+- * Free all receive software resources
+- **/
+-static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
+-{
+-      int i;
+-
+-      for (i = 0; i < adapter->num_rx_queues; i++)
+-              ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
 +      DPRINTK(PROBE, ERR, "Unable to allocate memory for the transmit "
 +                          "descriptor ring\n");
 +      return -ENOMEM;
-+}
+ }
  
--      return 0;
-+/**
-+ * ixgbe_setup_all_tx_resources - allocate all queues Tx resources
-+ * @adapter: board private structure
-+ *
-+ * If this function returns with an error, then it's possible one or
-+ * more of the rings is populated (while the rest are not).  It is the
-+ * callers duty to clean those orphaned rings.
-+ *
-+ * Return 0 on success, negative on failure
-+ **/
-+static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
-+{
-+      int i, err = 0;
-+
-+      for (i = 0; i < adapter->num_tx_queues; i++) {
-+              err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
+ /**
+@@ -2668,14 +2894,68 @@
+       for (i = 0; i < adapter->num_tx_queues; i++) {
+               err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
+-              if (err) {
+-                      DPRINTK(PROBE, ERR,
+-                              "Allocation for Tx Queue %u failed\n", i);
+-                      break;
+-              }
+-      }
+-
+-      return err;
 +              if (!err)
 +                      continue;
 +              DPRINTK(PROBE, ERR, "Allocation for Tx Queue %u failed\n", i);
@@ -238438,101 +238410,76 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      }
 +
 +      return err;
- }
- /**
-  * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
-  * @adapter: board private structure
-- * @rxdr:    rx descriptor ring (for a specific queue) to setup
++}
++
++/**
++ * ixgbe_setup_rx_resources - allocate Rx resources (Descriptors)
++ * @adapter: board private structure
 + * @rx_ring:    rx descriptor ring (for a specific queue) to setup
-  *
-  * Returns 0 on success, negative on failure
-  **/
- int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
--                           struct ixgbe_ring *rxdr)
++ *
++ * Returns 0 on success, negative on failure
++ **/
++int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
 +                             struct ixgbe_ring *rx_ring)
- {
-       struct pci_dev *pdev = adapter->pdev;
-       int size;
++{
++      struct pci_dev *pdev = adapter->pdev;
++      int size;
++
 +#ifdef CONFIG_IXGBE_LRO
-       size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
--      rxdr->lro_mgr.lro_arr = vmalloc(size);
--      if (!rxdr->lro_mgr.lro_arr)
++      size = sizeof(struct net_lro_desc) * IXGBE_MAX_LRO_DESCRIPTORS;
 +      rx_ring->lro_mgr.lro_arr = vmalloc(size);
 +      if (!rx_ring->lro_mgr.lro_arr)
-               return -ENOMEM;
--      memset(rxdr->lro_mgr.lro_arr, 0, size);
--
--      size = sizeof(struct ixgbe_rx_buffer) * rxdr->count;
--      rxdr->rx_buffer_info = vmalloc(size);
--      if (!rxdr->rx_buffer_info) {
++              return -ENOMEM;
 +      memset(rx_ring->lro_mgr.lro_arr, 0, size);
 +#endif
 +      size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count;
 +      rx_ring->rx_buffer_info = vmalloc(size);
 +      if (!rx_ring->rx_buffer_info) {
-               DPRINTK(PROBE, ERR,
--                      "vmalloc allocation failed for the rx desc ring\n");
++              DPRINTK(PROBE, ERR,
 +                      "vmalloc allocation failed for the rx desc ring\n");
-               goto alloc_failed;
-       }
--      memset(rxdr->rx_buffer_info, 0, size);
++              goto alloc_failed;
++      }
 +      memset(rx_ring->rx_buffer_info, 0, size);
-       /* Round up to nearest 4K */
--      rxdr->size = rxdr->count * sizeof(union ixgbe_adv_rx_desc);
--      rxdr->size = ALIGN(rxdr->size, 4096);
++
++      /* Round up to nearest 4K */
 +      rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
 +      rx_ring->size = ALIGN(rx_ring->size, 4096);
--      rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);
++
 +      rx_ring->desc = pci_alloc_consistent(pdev, rx_ring->size, &rx_ring->dma);
--      if (!rxdr->desc) {
++
 +      if (!rx_ring->desc) {
-               DPRINTK(PROBE, ERR,
--                      "Memory allocation failed for the rx desc ring\n");
--              vfree(rxdr->rx_buffer_info);
++              DPRINTK(PROBE, ERR,
 +                      "Memory allocation failed for the rx desc ring\n");
 +              vfree(rx_ring->rx_buffer_info);
-               goto alloc_failed;
-       }
--      rxdr->next_to_clean = 0;
--      rxdr->next_to_use = 0;
++              goto alloc_failed;
++      }
++
 +      rx_ring->next_to_clean = 0;
 +      rx_ring->next_to_use = 0;
-       return 0;
- alloc_failed:
--      vfree(rxdr->lro_mgr.lro_arr);
--      rxdr->lro_mgr.lro_arr = NULL;
++
++      return 0;
++
++alloc_failed:
 +#ifdef CONFIG_IXGBE_LRO
 +      vfree(rx_ring->lro_mgr.lro_arr);
 +      rx_ring->lro_mgr.lro_arr = NULL;
 +#endif
-       return -ENOMEM;
++      return -ENOMEM;
  }
  
  /**
-+ * ixgbe_setup_all_rx_resources - allocate all queues Rx resources
-+ * @adapter: board private structure
-+ *
-+ * If this function returns with an error, then it's possible one or
-+ * more of the rings is populated (while the rest are not).  It is the
-+ * callers duty to clean those orphaned rings.
-+ *
-+ * Return 0 on success, negative on failure
-+ **/
-+
-+static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
-+{
-+      int i, err = 0;
-+
-+      for (i = 0; i < adapter->num_rx_queues; i++) {
-+              err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
+@@ -2695,14 +2975,90 @@
+       for (i = 0; i < adapter->num_rx_queues; i++) {
+               err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
+-              if (err) {
+-                      DPRINTK(PROBE, ERR,
+-                              "Allocation for Rx Queue %u failed\n", i);
+-                      break;
+-              }
+-      }
+-
+-      return err;
 +              if (!err)
 +                      continue;
 +              DPRINTK(PROBE, ERR, "Allocation for Rx Queue %u failed\n", i);
@@ -238543,122 +238490,84 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +}
 +
 +/**
-  * ixgbe_free_tx_resources - Free Tx Resources per Queue
-  * @adapter: board private structure
-  * @tx_ring: Tx descriptor ring for a specific queue
-  *
-  * Free all transmit software resources
-  **/
--static void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
--                                  struct ixgbe_ring *tx_ring)
++ * ixgbe_free_tx_resources - Free Tx Resources per Queue
++ * @adapter: board private structure
++ * @tx_ring: Tx descriptor ring for a specific queue
++ *
++ * Free all transmit software resources
++ **/
 +void ixgbe_free_tx_resources(struct ixgbe_adapter *adapter,
 +                             struct ixgbe_ring *tx_ring)
- {
-       struct pci_dev *pdev = adapter->pdev;
-@@ -2620,89 +3027,38 @@ static void ixgbe_free_all_tx_resources(
-  *
-  * Free all receive software resources
-  **/
--static void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
--                                  struct ixgbe_ring *rx_ring)
++{
++      struct pci_dev *pdev = adapter->pdev;
++
++      ixgbe_clean_tx_ring(adapter, tx_ring);
++
++      vfree(tx_ring->tx_buffer_info);
++      tx_ring->tx_buffer_info = NULL;
++
++      pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma);
++
++      tx_ring->desc = NULL;
++}
++
++/**
++ * ixgbe_free_all_tx_resources - Free Tx Resources for All Queues
++ * @adapter: board private structure
++ *
++ * Free all transmit software resources
++ **/
++static void ixgbe_free_all_tx_resources(struct ixgbe_adapter *adapter)
++{
++      int i;
++
++      for (i = 0; i < adapter->num_tx_queues; i++)
++              ixgbe_free_tx_resources(adapter, &adapter->tx_ring[i]);
++}
++
++/**
++ * ixgbe_free_rx_resources - Free Rx Resources
++ * @adapter: board private structure
++ * @rx_ring: ring to clean the resources from
++ *
++ * Free all receive software resources
++ **/
 +void ixgbe_free_rx_resources(struct ixgbe_adapter *adapter,
 +                             struct ixgbe_ring *rx_ring)
- {
-       struct pci_dev *pdev = adapter->pdev;
++{
++      struct pci_dev *pdev = adapter->pdev;
++
 +#ifdef CONFIG_IXGBE_LRO
-       vfree(rx_ring->lro_mgr.lro_arr);
-       rx_ring->lro_mgr.lro_arr = NULL;
++      vfree(rx_ring->lro_mgr.lro_arr);
++      rx_ring->lro_mgr.lro_arr = NULL;
 +#endif
-       ixgbe_clean_rx_ring(adapter, rx_ring);
-       vfree(rx_ring->rx_buffer_info);
-       rx_ring->rx_buffer_info = NULL;
--      pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
--
--      rx_ring->desc = NULL;
--}
--
--/**
-- * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
-- * @adapter: board private structure
-- *
-- * Free all receive software resources
-- **/
--static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
--{
--      int i;
--
--      for (i = 0; i < adapter->num_rx_queues; i++)
--              ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
--}
--
--/**
-- * ixgbe_setup_all_tx_resources - allocate all queues Tx resources
-- * @adapter: board private structure
-- *
-- * If this function returns with an error, then it's possible one or
-- * more of the rings is populated (while the rest are not).  It is the
-- * callers duty to clean those orphaned rings.
-- *
-- * Return 0 on success, negative on failure
-- **/
--static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
--{
--      int i, err = 0;
--
--      for (i = 0; i < adapter->num_tx_queues; i++) {
--              err = ixgbe_setup_tx_resources(adapter, &adapter->tx_ring[i]);
--              if (err) {
--                      DPRINTK(PROBE, ERR,
--                              "Allocation for Tx Queue %u failed\n", i);
--                      break;
--              }
--      }
++
++      ixgbe_clean_rx_ring(adapter, rx_ring);
++
++      vfree(rx_ring->rx_buffer_info);
++      rx_ring->rx_buffer_info = NULL;
++
 +      pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma);
--      return err;
++
 +      rx_ring->desc = NULL;
- }
- /**
-- * ixgbe_setup_all_rx_resources - allocate all queues Rx resources
++}
++
++/**
 + * ixgbe_free_all_rx_resources - Free Rx Resources for All Queues
-  * @adapter: board private structure
-  *
-- * If this function returns with an error, then it's possible one or
-- * more of the rings is populated (while the rest are not).  It is the
-- * callers duty to clean those orphaned rings.
-- *
-- * Return 0 on success, negative on failure
++ * @adapter: board private structure
++ *
 + * Free all receive software resources
-  **/
--
--static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
++ **/
 +static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
- {
--      int i, err = 0;
--
--      for (i = 0; i < adapter->num_rx_queues; i++) {
--              err = ixgbe_setup_rx_resources(adapter, &adapter->rx_ring[i]);
--              if (err) {
--                      DPRINTK(PROBE, ERR,
--                              "Allocation for Rx Queue %u failed\n", i);
--                      break;
--              }
--      }
++{
 +      int i;
--      return err;
++
 +      for (i = 0; i < adapter->num_rx_queues; i++)
 +              ixgbe_free_rx_resources(adapter, &adapter->rx_ring[i]);
  }
  
  /**
-@@ -2717,12 +3073,12 @@ static int ixgbe_change_mtu(struct net_d
+@@ -2717,12 +3073,12 @@
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
  
@@ -238674,10 +238583,13 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        /* must set new MTU before calling down or up */
        netdev->mtu = new_mtu;
  
-@@ -2817,6 +3173,135 @@ static int ixgbe_close(struct net_device
- }
+@@ -2814,6 +3170,135 @@
+       ixgbe_release_hw_control(adapter);
  
- /**
+       return 0;
++}
++
++/**
 + * ixgbe_napi_add_all - prep napi structs for use
 + * @adapter: private struct
 + * helper function to napi_add each possible q_vector->napi
@@ -238804,13 +238716,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +static void ixgbe_shutdown(struct pci_dev *pdev)
 +{
 +      ixgbe_suspend(pdev, PMSG_SUSPEND);
-+}
-+
-+/**
-  * ixgbe_update_stats - Update the board statistics counters.
-  * @adapter: board private structure
-  **/
-@@ -2834,6 +3319,18 @@ void ixgbe_update_stats(struct ixgbe_ada
+ }
+ /**
+@@ -2834,6 +3319,18 @@
                adapter->stats.mpc[i] += mpc;
                total_mpc += adapter->stats.mpc[i];
                adapter->stats.rnbc[i] += IXGBE_READ_REG(hw, IXGBE_RNBC(i));
@@ -238829,7 +238738,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        }
        adapter->stats.gprc += IXGBE_READ_REG(hw, IXGBE_GPRC);
        /* work around hardware counting issue */
-@@ -2889,7 +3386,7 @@ void ixgbe_update_stats(struct ixgbe_ada
+@@ -2889,7 +3386,7 @@
  
        /* Rx Errors */
        adapter->net_stats.rx_errors = adapter->stats.crcerrs +
@@ -238838,29 +238747,74 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        adapter->net_stats.rx_dropped = 0;
        adapter->net_stats.rx_length_errors = adapter->stats.rlec;
        adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs;
-@@ -2903,27 +3400,74 @@ void ixgbe_update_stats(struct ixgbe_ada
+@@ -2903,73 +3400,105 @@
  static void ixgbe_watchdog(unsigned long data)
  {
        struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data;
+-      struct net_device *netdev = adapter->netdev;
+-      bool link_up;
+-      u32 link_speed = 0;
+-
+-      adapter->hw.mac.ops.check_link(&adapter->hw, &(link_speed), &link_up);
+-
+-      if (link_up) {
+-              if (!netif_carrier_ok(netdev)) {
+-                      u32 frctl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
+-                      u32 rmcs = IXGBE_READ_REG(&adapter->hw, IXGBE_RMCS);
+-#define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
+-#define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
+-                      DPRINTK(LINK, INFO, "NIC Link is Up %s, "
+-                              "Flow Control: %s\n",
+-                              (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
+-                               "10 Gbps" :
+-                               (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
+-                                "1 Gbps" : "unknown speed")),
+-                              ((FLOW_RX && FLOW_TX) ? "RX/TX" :
+-                               (FLOW_RX ? "RX" :
+-                               (FLOW_TX ? "TX" : "None"))));
+-
+-                      netif_carrier_on(netdev);
+-                      netif_tx_wake_all_queues(netdev);
+-              } else {
+-                      /* Force detection of hung controller */
+-                      adapter->detect_tx_hung = true;
+-              }
+-      } else {
+-              if (netif_carrier_ok(netdev)) {
+-                      DPRINTK(LINK, INFO, "NIC Link is Down\n");
+-                      netif_carrier_off(netdev);
+-                      netif_tx_stop_all_queues(netdev);
+-              }
+-      }
+-
+-      ixgbe_update_stats(adapter);
+-
 +      struct ixgbe_hw *hw = &adapter->hw;
 +
 +      /* Do the watchdog outside of interrupt context due to the lovely
 +       * delays that some of the newer hardware requires */
-+      if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
-+              /* Cause software interrupt to ensure rx rings are cleaned */
-+              if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
-+                      u32 eics =
-+                       (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
+       if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
+               /* Cause software interrupt to ensure rx rings are cleaned */
+               if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
+                       u32 eics =
+                        (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
+-                      IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, eics);
+-              } else {
+-                      /* for legacy and MSI interrupts don't set any bits that
 +                      IXGBE_WRITE_REG(hw, IXGBE_EICS, eics);
 +              } else {
 +                      /* For legacy and MSI interrupts don't set any bits that
-+                       * are enabled for EIAM, because this operation would
-+                       * set *both* EIMS and EICS for any bit in EIAM */
+                        * are enabled for EIAM, because this operation would
+                        * set *both* EIMS and EICS for any bit in EIAM */
+-                      IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS,
+-                                   (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
 +                      IXGBE_WRITE_REG(hw, IXGBE_EICS,
 +                                    (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
-+              }
-+              /* Reset the timer */
-+              mod_timer(&adapter->watchdog_timer,
+               }
+               /* Reset the timer */
+               mod_timer(&adapter->watchdog_timer,
+-                        round_jiffies(jiffies + 2 * HZ));
+-      }
 +                        round_jiffies(jiffies + 2 * HZ));
 +      }
 +
@@ -238876,14 +238830,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      struct ixgbe_adapter *adapter = container_of(work,
 +                                                   struct ixgbe_adapter,
 +                                                   watchdog_task);
-       struct net_device *netdev = adapter->netdev;
--      bool link_up;
--      u32 link_speed = 0;
++      struct net_device *netdev = adapter->netdev;
 +      struct ixgbe_hw *hw = &adapter->hw;
 +      u32 link_speed = adapter->link_speed;
 +      bool link_up = adapter->link_up;
--      adapter->hw.mac.ops.check_link(&adapter->hw, &(link_speed), &link_up);
++
 +      adapter->flags |= IXGBE_FLAG_IN_WATCHDOG_TASK;
 +
 +      if (adapter->flags & IXGBE_FLAG_NEED_LINK_UPDATE) {
@@ -238897,24 +238848,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +              adapter->link_up = link_up;
 +              adapter->link_speed = link_speed;
 +      }
-       if (link_up) {
-               if (!netif_carrier_ok(netdev)) {
--                      u32 frctl = IXGBE_READ_REG(&adapter->hw, IXGBE_FCTRL);
--                      u32 rmcs = IXGBE_READ_REG(&adapter->hw, IXGBE_RMCS);
++
++      if (link_up) {
++              if (!netif_carrier_ok(netdev)) {
 +                      u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
 +                      u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS);
- #define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
- #define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
-                       DPRINTK(LINK, INFO, "NIC Link is Up %s, "
--                              "Flow Control: %s\n",
--                              (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
--                               "10 Gbps" :
--                               (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
--                                "1 Gbps" : "unknown speed")),
--                              ((FLOW_RX && FLOW_TX) ? "RX/TX" :
--                               (FLOW_RX ? "RX" :
--                               (FLOW_TX ? "TX" : "None"))));
++#define FLOW_RX (frctl & IXGBE_FCTRL_RFCE)
++#define FLOW_TX (rmcs & IXGBE_RMCS_TFCE_802_3X)
++                      DPRINTK(LINK, INFO, "NIC Link is Up %s, "
 +                              "Flow Control: %s\n",
 +                              (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
 +                               "10 Gbps" :
@@ -238923,40 +238864,24 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +                              ((FLOW_RX && FLOW_TX) ? "RX/TX" :
 +                               (FLOW_RX ? "RX" :
 +                               (FLOW_TX ? "TX" : "None"))));
-                       netif_carrier_on(netdev);
-                       netif_tx_wake_all_queues(netdev);
-@@ -2932,6 +3476,8 @@ static void ixgbe_watchdog(unsigned long
-                       adapter->detect_tx_hung = true;
-               }
-       } else {
++
++                      netif_carrier_on(netdev);
++                      netif_tx_wake_all_queues(netdev);
++              } else {
++                      /* Force detection of hung controller */
++                      adapter->detect_tx_hung = true;
++              }
++      } else {
 +              adapter->link_up = false;
 +              adapter->link_speed = 0;
-               if (netif_carrier_ok(netdev)) {
-                       DPRINTK(LINK, INFO, "NIC Link is Down\n");
-                       netif_carrier_off(netdev);
-@@ -2940,36 +3486,19 @@ static void ixgbe_watchdog(unsigned long
-       }
-       ixgbe_update_stats(adapter);
--
--      if (!test_bit(__IXGBE_DOWN, &adapter->state)) {
--              /* Cause software interrupt to ensure rx rings are cleaned */
--              if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
--                      u32 eics =
--                       (1 << (adapter->num_msix_vectors - NON_Q_VECTORS)) - 1;
--                      IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, eics);
--              } else {
--                      /* for legacy and MSI interrupts don't set any bits that
--                       * are enabled for EIAM, because this operation would
--                       * set *both* EIMS and EICS for any bit in EIAM */
--                      IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS,
--                                   (IXGBE_EICS_TCP_TIMER | IXGBE_EICS_OTHER));
--              }
--              /* Reset the timer */
--              mod_timer(&adapter->watchdog_timer,
--                        round_jiffies(jiffies + 2 * HZ));
--      }
++              if (netif_carrier_ok(netdev)) {
++                      DPRINTK(LINK, INFO, "NIC Link is Down\n");
++                      netif_carrier_off(netdev);
++                      netif_tx_stop_all_queues(netdev);
++              }
++      }
++
++      ixgbe_update_stats(adapter);
 +      adapter->flags &= ~IXGBE_FLAG_IN_WATCHDOG_TASK;
  }
  
@@ -238977,7 +238902,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        if (skb_is_gso(skb)) {
                if (skb_header_cloned(skb)) {
-@@ -2985,16 +3514,16 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -2985,16 +3514,16 @@
                        iph->tot_len = 0;
                        iph->check = 0;
                        tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
@@ -238999,7 +238924,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        adapter->hw_tso6_ctxt++;
                }
  
-@@ -3008,7 +3537,7 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3008,7 +3537,7 @@
                        vlan_macip_lens |=
                            (tx_flags & IXGBE_TX_FLAGS_VLAN_MASK);
                vlan_macip_lens |= ((skb_network_offset(skb)) <<
@@ -239008,7 +238933,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                *hdr_len += skb_network_offset(skb);
                vlan_macip_lens |=
                    (skb_transport_header(skb) - skb_network_header(skb));
-@@ -3018,8 +3547,8 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3018,8 +3547,8 @@
                context_desc->seqnum_seed = 0;
  
                /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
@@ -239019,7 +238944,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
                if (skb->protocol == htons(ETH_P_IP))
                        type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
-@@ -3027,9 +3556,11 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3027,9 +3556,11 @@
                context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
  
                /* MSS L4LEN IDX */
@@ -239032,7 +238957,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                context_desc->mss_l4len_idx = cpu_to_le32(mss_l4len_idx);
  
                tx_buffer_info->time_stamp = jiffies;
-@@ -3046,8 +3577,8 @@ static int ixgbe_tso(struct ixgbe_adapte
+@@ -3046,8 +3577,8 @@
  }
  
  static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
@@ -239043,7 +238968,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct ixgbe_adv_tx_context_desc *context_desc;
        unsigned int i;
-@@ -3064,16 +3595,16 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3064,16 +3595,16 @@
                        vlan_macip_lens |=
                            (tx_flags & IXGBE_TX_FLAGS_VLAN_MASK);
                vlan_macip_lens |= (skb_network_offset(skb) <<
@@ -239063,7 +238988,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
                if (skb->ip_summed == CHECKSUM_PARTIAL) {
                        switch (skb->protocol) {
-@@ -3081,16 +3612,14 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3081,16 +3612,14 @@
                                type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
                                if (ip_hdr(skb)->protocol == IPPROTO_TCP)
                                        type_tucmd_mlhl |=
@@ -239082,7 +239007,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        default:
                                if (unlikely(net_ratelimit())) {
                                        DPRINTK(PROBE, WARNING,
-@@ -3102,10 +3631,12 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3102,10 +3631,12 @@
                }
  
                context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
@@ -239095,7 +239020,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                adapter->hw_csum_tx_good++;
                i++;
                if (i == tx_ring->count)
-@@ -3114,12 +3645,13 @@ static bool ixgbe_tx_csum(struct ixgbe_a
+@@ -3114,12 +3645,13 @@
  
                return true;
        }
@@ -239111,7 +239036,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct ixgbe_tx_buffer *tx_buffer_info;
        unsigned int len = skb->len;
-@@ -3137,8 +3669,8 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3137,8 +3669,8 @@
  
                tx_buffer_info->length = size;
                tx_buffer_info->dma = pci_map_single(adapter->pdev,
@@ -239122,7 +239047,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                tx_buffer_info->time_stamp = jiffies;
                tx_buffer_info->next_to_watch = i;
  
-@@ -3163,9 +3695,10 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3163,9 +3695,10 @@
  
                        tx_buffer_info->length = size;
                        tx_buffer_info->dma = pci_map_page(adapter->pdev,
@@ -239136,7 +239061,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                        tx_buffer_info->time_stamp = jiffies;
                        tx_buffer_info->next_to_watch = i;
  
-@@ -3188,8 +3721,8 @@ static int ixgbe_tx_map(struct ixgbe_ada
+@@ -3188,8 +3721,8 @@
  }
  
  static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
@@ -239147,13 +239072,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        union ixgbe_adv_tx_desc *tx_desc = NULL;
        struct ixgbe_tx_buffer *tx_buffer_info;
-@@ -3208,15 +3741,17 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3208,15 +3741,17 @@
                cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE;
  
                olinfo_status |= IXGBE_TXD_POPTS_TXSM <<
 -                                              IXGBE_ADVTXD_POPTS_SHIFT;
+-
 +                               IXGBE_ADVTXD_POPTS_SHIFT;
++
 +              /* use index 1 context for tso */
 +              olinfo_status |= (1 << IXGBE_ADVTXD_IDX_SHIFT);
                if (tx_flags & IXGBE_TX_FLAGS_IPV4)
@@ -239168,7 +239094,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        olinfo_status |= ((paylen - hdr_len) << IXGBE_ADVTXD_PAYLEN_SHIFT);
  
-@@ -3226,9 +3761,8 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3226,9 +3761,8 @@
                tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, i);
                tx_desc->read.buffer_addr = cpu_to_le64(tx_buffer_info->dma);
                tx_desc->read.cmd_type_len =
@@ -239179,7 +239105,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                i++;
                if (i == tx_ring->count)
                        i = 0;
-@@ -3249,7 +3783,7 @@ static void ixgbe_tx_queue(struct ixgbe_
+@@ -3249,7 +3783,7 @@
  }
  
  static int __ixgbe_maybe_stop_tx(struct net_device *netdev,
@@ -239188,7 +239114,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
  
-@@ -3265,61 +3799,60 @@ static int __ixgbe_maybe_stop_tx(struct 
+@@ -3265,60 +3799,59 @@
                return -EBUSY;
  
        /* A reprieve! - use start_queue because it doesn't call schedule */
@@ -239230,6 +239156,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      if (skb->len <= 0) {
 -              dev_kfree_skb(skb);
 -              return NETDEV_TX_OK;
+-      }
+-      mss = skb_shinfo(skb)->gso_size;
+-
+-      if (mss)
 +      if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
 +              tx_flags |= vlan_tx_tag_get(skb);
 +              if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
@@ -239242,20 +239172,18 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +              tx_flags |= (skb->queue_mapping << 13);
 +              tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
 +              tx_flags |= IXGBE_TX_FLAGS_VLAN;
-       }
--      mss = skb_shinfo(skb)->gso_size;
--
--      if (mss)
--              count++;
--      else if (skb->ip_summed == CHECKSUM_PARTIAL)
++      }
 +      /* three things can cause us to need a context descriptor */
 +      if (skb_is_gso(skb) ||
 +          (skb->ip_summed == CHECKSUM_PARTIAL) ||
 +          (tx_flags & IXGBE_TX_FLAGS_VLAN))
                count++;
+-      else if (skb->ip_summed == CHECKSUM_PARTIAL)
+-              count++;
+-
 -      count += TXD_USE_COUNT(len);
 -      for (f = 0; f < nr_frags; f++)
++
 +      count += TXD_USE_COUNT(skb_headlen(skb));
 +      for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
                count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
@@ -239263,15 +239191,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        if (ixgbe_maybe_stop_tx(netdev, tx_ring, count)) {
                adapter->tx_busy++;
                return NETDEV_TX_BUSY;
-       }
+-      }
 -      if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
 -              tx_flags |= IXGBE_TX_FLAGS_VLAN;
 -              tx_flags |= (vlan_tx_tag_get(skb) << IXGBE_TX_FLAGS_VLAN_SHIFT);
--      }
+       }
  
        if (skb->protocol == htons(ETH_P_IP))
-               tx_flags |= IXGBE_TX_FLAGS_IPV4;
-@@ -3333,12 +3866,12 @@ static int ixgbe_xmit_frame(struct sk_bu
+@@ -3333,12 +3866,12 @@
        if (tso)
                tx_flags |= IXGBE_TX_FLAGS_TSO;
        else if (ixgbe_tx_csum(adapter, tx_ring, skb, tx_flags) &&
@@ -239287,7 +239214,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        netdev->trans_start = jiffies;
  
-@@ -3372,15 +3905,16 @@ static struct net_device_stats *ixgbe_ge
+@@ -3372,15 +3905,16 @@
  static int ixgbe_set_mac(struct net_device *netdev, void *p)
  {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
@@ -239299,14 +239226,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
 -      memcpy(adapter->hw.mac.addr, addr->sa_data, netdev->addr_len);
-+      memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
+-
 -      ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV);
++      memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
++
 +      hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
  
        return 0;
  }
-@@ -3404,28 +3938,23 @@ static void ixgbe_netpoll(struct net_dev
+@@ -3404,28 +3938,23 @@
  #endif
  
  /**
@@ -239315,17 +239243,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 - * helper function to napi_add each possible q_vector->napi
 - */
 -static void ixgbe_napi_add_all(struct ixgbe_adapter *adapter)
-+ * ixgbe_link_config - set up initial link with default speed and duplex
-+ * @hw: pointer to private hardware struct
-+ *
-+ * Returns 0 on success, negative on failure
-+ **/
-+static int ixgbe_link_config(struct ixgbe_hw *hw)
- {
+-{
 -      int i, q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
 -      int (*poll)(struct napi_struct *, int);
-+      u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
+-
 -      if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
 -              poll = &ixgbe_clean_rxonly;
 -      } else {
@@ -239333,14 +239254,24 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -              /* only one q_vector for legacy modes */
 -              q_vectors = 1;
 -      }
-+      /* must always autoneg for both 1G and 10G link */
-+      hw->mac.autoneg = true;
+-
 -      for (i = 0; i < q_vectors; i++) {
 -              struct ixgbe_q_vector *q_vector = &adapter->q_vector[i];
 -              netif_napi_add(adapter->netdev, &q_vector->napi,
 -                             (*poll), 64);
 -      }
++ * ixgbe_link_config - set up initial link with default speed and duplex
++ * @hw: pointer to private hardware struct
++ *
++ * Returns 0 on success, negative on failure
++ **/
++static int ixgbe_link_config(struct ixgbe_hw *hw)
++{
++      u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
++
++      /* must always autoneg for both 1G and 10G link */
++      hw->mac.autoneg = true;
++
 +      if ((hw->mac.type == ixgbe_mac_82598EB) &&
 +          (hw->phy.media_type == ixgbe_media_type_copper))
 +              autoneg = IXGBE_LINK_SPEED_82598_AUTONEG;
@@ -239349,7 +239280,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  /**
-@@ -3440,17 +3969,16 @@ static void ixgbe_napi_add_all(struct ix
+@@ -3440,17 +3969,16 @@
   * and a hardware reset occur.
   **/
  static int __devinit ixgbe_probe(struct pci_dev *pdev,
@@ -239369,7 +239300,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        err = pci_enable_device(pdev);
        if (err)
-@@ -3465,7 +3993,7 @@ static int __devinit ixgbe_probe(struct 
+@@ -3465,7 +3993,7 @@
                        err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
                        if (err) {
                                dev_err(&pdev->dev, "No usable DMA "
@@ -239378,7 +239309,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                                goto err_dma;
                        }
                }
-@@ -3498,10 +4026,8 @@ static int __devinit ixgbe_probe(struct 
+@@ -3498,10 +4026,8 @@
        hw->back = adapter;
        adapter->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1;
  
@@ -239391,7 +239322,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        if (!hw->hw_addr) {
                err = -EIO;
                goto err_ioremap;
-@@ -3516,7 +4042,8 @@ static int __devinit ixgbe_probe(struct 
+@@ -3516,7 +4042,8 @@
        netdev->stop = &ixgbe_close;
        netdev->hard_start_xmit = &ixgbe_xmit_frame;
        netdev->get_stats = &ixgbe_get_stats;
@@ -239401,7 +239332,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        netdev->set_mac_address = &ixgbe_set_mac;
        netdev->change_mtu = &ixgbe_change_mtu;
        ixgbe_set_ethtool_ops(netdev);
-@@ -3530,51 +4057,88 @@ static int __devinit ixgbe_probe(struct 
+@@ -3530,51 +4057,88 @@
  #endif
        strcpy(netdev->name, pci_name(pdev));
  
@@ -239409,14 +239340,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      netdev->mem_end = mmio_start + mmio_len;
 -
        adapter->bd_number = cards_found;
+-
 -      /* PCI config space info */
 -      hw->vendor_id = pdev->vendor;
 -      hw->device_id = pdev->device;
 -      hw->revision_id = pdev->revision;
 -      hw->subsystem_vendor_id = pdev->subsystem_vendor;
 -      hw->subsystem_device_id = pdev->subsystem_device;
--
        /* Setup hw api */
        memcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops));
        hw->mac.type  = ii->mac;
@@ -239451,9 +239382,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 +      } else if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
 +              DPRINTK(PROBE, ERR, "failed to load because an "
 +                      "unsupported SFP+ module type was detected.\n");
-+              goto err_hw_init;
-+      } else if (err) {
                goto err_hw_init;
++      } else if (err) {
++              goto err_hw_init;
 +      }
  
        /* setup the private structure */
@@ -239473,12 +239404,13 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -                         NETIF_F_HW_VLAN_TX |
 -                         NETIF_F_HW_VLAN_RX |
 -                         NETIF_F_HW_VLAN_FILTER;
+-
+-      netdev->features |= NETIF_F_LRO;
 +                         NETIF_F_IP_CSUM |
 +                         NETIF_F_HW_VLAN_TX |
 +                         NETIF_F_HW_VLAN_RX |
 +                         NETIF_F_HW_VLAN_FILTER;
--      netdev->features |= NETIF_F_LRO;
++
 +      netdev->features |= NETIF_F_IPV6_CSUM;
        netdev->features |= NETIF_F_TSO;
        netdev->features |= NETIF_F_TSO6;
@@ -239491,14 +239423,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
 -      netdev->vlan_features |= NETIF_F_HW_CSUM;
 +      netdev->vlan_features |= NETIF_F_IP_CSUM;
        netdev->vlan_features |= NETIF_F_SG;
++
 +      if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
 +              adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
 +
 +#ifdef CONFIG_IXGBE_DCB
 +      netdev->dcbnl_ops = &dcbnl_ops;
 +#endif /* CONFIG_IXGBE_DCB */
-+
        if (pci_using_dac)
                netdev->features |= NETIF_F_HIGHDMA;
  
@@ -239508,7 +239440,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                dev_err(&pdev->dev, "The EEPROM Checksum Is Not Valid\n");
                err = -EIO;
                goto err_eeprom;
-@@ -3583,7 +4147,8 @@ static int __devinit ixgbe_probe(struct 
+@@ -3583,7 +4147,8 @@
        memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len);
        memcpy(netdev->perm_addr, hw->mac.perm_addr, netdev->addr_len);
  
@@ -239518,7 +239450,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                err = -EIO;
                goto err_eeprom;
        }
-@@ -3593,13 +4158,7 @@ static int __devinit ixgbe_probe(struct 
+@@ -3593,13 +4158,7 @@
        adapter->watchdog_timer.data = (unsigned long)adapter;
  
        INIT_WORK(&adapter->reset_task, ixgbe_reset_task);
@@ -239533,7 +239465,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        err = ixgbe_init_interrupt_scheme(adapter);
        if (err)
-@@ -3610,32 +4169,39 @@ static int __devinit ixgbe_probe(struct 
+@@ -3610,32 +4169,39 @@
        link_speed = link_status & IXGBE_PCI_LINK_SPEED;
        link_width = link_status & IXGBE_PCI_LINK_WIDTH;
        dev_info(&pdev->dev, "(PCI Express:%s:%s) "
@@ -239591,7 +239523,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        netif_carrier_off(netdev);
        netif_tx_stop_all_queues(netdev);
-@@ -3647,7 +4213,7 @@ static int __devinit ixgbe_probe(struct 
+@@ -3647,7 +4213,7 @@
        if (err)
                goto err_register;
  
@@ -239600,7 +239532,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        if (dca_add_requester(&pdev->dev) == 0) {
                adapter->flags |= IXGBE_FLAG_DCA_ENABLED;
                /* always use CB2 mode, difference is masked
-@@ -3667,6 +4233,9 @@ err_hw_init:
+@@ -3667,6 +4233,9 @@
  err_sw_init:
        ixgbe_reset_interrupt_capability(adapter);
  err_eeprom:
@@ -239610,7 +239542,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        iounmap(hw->hw_addr);
  err_ioremap:
        free_netdev(netdev);
-@@ -3693,11 +4262,16 @@ static void __devexit ixgbe_remove(struc
+@@ -3693,11 +4262,16 @@
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
  
        set_bit(__IXGBE_DOWN, &adapter->state);
@@ -239629,7 +239561,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
                adapter->flags &= ~IXGBE_FLAG_DCA_ENABLED;
                dca_remove_requester(&pdev->dev);
-@@ -3705,7 +4279,8 @@ static void __devexit ixgbe_remove(struc
+@@ -3705,7 +4279,8 @@
        }
  
  #endif
@@ -239639,7 +239571,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
        ixgbe_reset_interrupt_capability(adapter);
  
-@@ -3715,6 +4290,7 @@ static void __devexit ixgbe_remove(struc
+@@ -3715,6 +4290,7 @@
        pci_release_regions(pdev);
  
        DPRINTK(PROBE, INFO, "complete\n");
@@ -239647,7 +239579,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        kfree(adapter->tx_ring);
        kfree(adapter->rx_ring);
  
-@@ -3732,7 +4308,7 @@ static void __devexit ixgbe_remove(struc
+@@ -3732,7 +4308,7 @@
   * this device has been detected.
   */
  static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
@@ -239656,7 +239588,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  {
        struct net_device *netdev = pci_get_drvdata(pdev);
        struct ixgbe_adapter *adapter = netdev->priv;
-@@ -3743,7 +4319,7 @@ static pci_ers_result_t ixgbe_io_error_d
+@@ -3743,7 +4319,7 @@
                ixgbe_down(adapter);
        pci_disable_device(pdev);
  
@@ -239665,7 +239597,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
        return PCI_ERS_RESULT_NEED_RESET;
  }
  
-@@ -3760,7 +4336,7 @@ static pci_ers_result_t ixgbe_io_slot_re
+@@ -3760,7 +4336,7 @@
  
        if (pci_enable_device(pdev)) {
                DPRINTK(PROBE, ERR,
@@ -239674,7 +239606,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
                return PCI_ERS_RESULT_DISCONNECT;
        }
        pci_set_master(pdev);
-@@ -3794,7 +4370,6 @@ static void ixgbe_io_resume(struct pci_d
+@@ -3794,7 +4370,6 @@
        }
  
        netif_device_attach(netdev);
@@ -239682,7 +239614,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  }
  
  static struct pci_error_handlers ixgbe_err_handler = {
-@@ -3824,19 +4399,18 @@ static struct pci_driver ixgbe_driver = 
+@@ -3824,19 +4399,18 @@
   **/
  static int __init ixgbe_init_module(void)
  {
@@ -239699,13 +239631,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  #endif
 -      ret = pci_register_driver(&ixgbe_driver);
 -      return ret;
+-}
 +      return pci_register_driver(&ixgbe_driver);
- }
++}
 +
  module_init(ixgbe_init_module);
  
  /**
-@@ -3847,24 +4421,24 @@ module_init(ixgbe_init_module);
+@@ -3847,24 +4421,24 @@
   **/
  static void __exit ixgbe_exit_module(void)
  {
@@ -239735,9 +239668,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_main.c linux-2.6.27.19-5.1/drive
  
  module_exit(ixgbe_exit_module);
  
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.c
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_phy.c
+--- a/drivers/net/ixgbe/ixgbe_phy.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_phy.c    Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -239804,7 +239737,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
        return status;
  }
  
-@@ -73,10 +76,8 @@ static bool ixgbe_validate_phy_addr(stru
+@@ -73,10 +76,8 @@
        bool valid = false;
  
        hw->phy.addr = phy_addr;
@@ -239817,7 +239750,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
        if (phy_id != 0xFFFF && phy_id != 0x0)
                valid = true;
-@@ -95,21 +96,18 @@ static s32 ixgbe_get_phy_id(struct ixgbe
+@@ -95,21 +96,18 @@
        u16 phy_id_high = 0;
        u16 phy_id_low = 0;
  
@@ -239845,7 +239778,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
        return status;
  }
  
-@@ -129,6 +127,9 @@ static enum ixgbe_phy_type ixgbe_get_phy
+@@ -129,6 +127,9 @@
        case QT2022_PHY_ID:
                phy_type = ixgbe_phy_qt;
                break;
@@ -239855,7 +239788,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
        default:
                phy_type = ixgbe_phy_unknown;
                break;
-@@ -138,32 +139,31 @@ static enum ixgbe_phy_type ixgbe_get_phy
+@@ -138,32 +139,31 @@
  }
  
  /**
@@ -239896,7 +239829,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
        u32 data;
        s32 status = 0;
        u16 gssr;
-@@ -179,9 +179,9 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -179,9 +179,9 @@
        if (status == 0) {
                /* Setup and write the address cycle command */
                command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
@@ -239909,7 +239842,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
                IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
  
-@@ -190,7 +190,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -190,7 +190,7 @@
                 * The MDI Command bit will clear when the operation is
                 * complete
                 */
@@ -239918,7 +239851,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                        udelay(10);
  
                        command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-@@ -210,9 +210,9 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -210,9 +210,9 @@
                         * command
                         */
                        command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
@@ -239931,7 +239864,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
                        IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
  
-@@ -221,7 +221,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -221,7 +221,7 @@
                         * completed. The MDI Command bit will clear when the
                         * operation is complete
                         */
@@ -239940,7 +239873,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                                udelay(10);
  
                                command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-@@ -231,8 +231,7 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -231,8 +231,7 @@
                        }
  
                        if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
@@ -239950,7 +239883,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                                status = IXGBE_ERR_PHY;
                        } else {
                                /*
-@@ -247,22 +246,22 @@ s32 ixgbe_read_phy_reg(struct ixgbe_hw *
+@@ -247,22 +246,22 @@
  
                ixgbe_release_swfw_sync(hw, gssr);
        }
@@ -239977,7 +239910,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
        s32 status = 0;
        u16 gssr;
  
-@@ -280,9 +279,9 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -280,9 +279,9 @@
  
                /* Setup and write the address cycle command */
                command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
@@ -239990,7 +239923,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
                IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
  
-@@ -291,19 +290,19 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -291,19 +290,19 @@
                 * The MDI Command bit will clear when the operation is
                 * complete
                 */
@@ -240015,7 +239948,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
                if (status == 0) {
                        /*
-@@ -311,9 +310,9 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -311,9 +310,9 @@
                         * command
                         */
                        command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
@@ -240028,7 +239961,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  
                        IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
  
-@@ -322,20 +321,19 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -322,20 +321,19 @@
                         * completed. The MDI Command bit will clear when the
                         * operation is complete
                         */
@@ -240054,7 +239987,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                }
  
                ixgbe_release_swfw_sync(hw, gssr);
-@@ -345,67 +343,54 @@ static s32 ixgbe_write_phy_reg(struct ix
+@@ -345,67 +343,54 @@
  }
  
  /**
@@ -240108,18 +240041,16 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
 -                IXGBE_MDIO_AUTO_NEG_CONTROL,
 -                IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
 -                &autoneg_reg);
--
++      hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
++                           IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);
 -      autoneg_reg |= autoneg_restart_mask;
--
++      autoneg_reg |= IXGBE_MII_RESTART;
 -      ixgbe_write_phy_reg(hw,
 -                IXGBE_MDIO_AUTO_NEG_CONTROL,
 -                IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
 -                autoneg_reg);
-+      hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
-+                           IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);
-+
-+      autoneg_reg |= IXGBE_MII_RESTART;
-+
 +      hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
 +                            IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);
  
@@ -240142,7 +240073,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                        status = 0;
                        break;
                }
-@@ -418,14 +403,299 @@ s32 ixgbe_setup_tnx_phy_link(struct ixgb
+@@ -418,14 +403,299 @@
  }
  
  /**
@@ -240445,7 +240376,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
  {
        s32 status = 0;
        u32 time_out;
-@@ -445,21 +715,20 @@ s32 ixgbe_check_tnx_phy_link(struct ixgb
+@@ -445,21 +715,20 @@
         */
        for (time_out = 0; time_out < max_time_out; time_out++) {
                udelay(10);
@@ -240475,7 +240406,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
                }
        }
  
-@@ -467,28 +736,19 @@ s32 ixgbe_check_tnx_phy_link(struct ixgb
+@@ -467,28 +736,19 @@
  }
  
  /**
@@ -240497,26 +240428,26 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.c linux-2.6.27.19-5.1/driver
 -       * speed.
 -       */
 -      hw->phy.autoneg_advertised = 0;
--
++      s32 status = 0;
 -      if (speed & IXGBE_LINK_SPEED_10GB_FULL)
 -              hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_10GB_FULL;
 -      if (speed & IXGBE_LINK_SPEED_1GB_FULL)
 -              hw->phy.autoneg_advertised |= IXGBE_LINK_SPEED_1GB_FULL;
-+      s32 status = 0;
--      /* Setup link based on the new speed settings */
--      ixgbe_setup_tnx_phy_link(hw);
 +      status = hw->phy.ops.read_reg(hw, TNX_FW_REV,
 +                                    IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
 +                                    firmware_version);
  
--      return 0;
+-      /* Setup link based on the new speed settings */
+-      ixgbe_setup_tnx_phy_link(hw);
 +      return status;
- }
-+
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_phy.h  2009-03-25 16:11:05.000000000 +0000
++}
+-      return 0;
+-}
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_phy.h
+--- a/drivers/net/ixgbe/ixgbe_phy.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_phy.h    Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -240624,9 +240555,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_phy.h linux-2.6.27.19-5.1/driver
 +                                      u16 *list_offset,
 +                                      u16 *data_offset);
  #endif /* _IXGBE_PHY_H_ */
-diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_type.h
---- linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ixgbe/ixgbe_type.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/ixgbe/ixgbe_type.h
+--- a/drivers/net/ixgbe/ixgbe_type.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ixgbe/ixgbe_type.h   Wed May 06 16:56:25 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************************
  
@@ -240786,15 +240717,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  #define IXGBE_WUPL      0x05900
  #define IXGBE_WUPM      0x05A00 /* wake up pkt memory 0x5A00-0x5A7C */
  #define IXGBE_FHFT      0x09000 /* Flex host filter table 9000-93FC */
-@@ -170,6 +189,8 @@
+@@ -169,6 +188,8 @@
+ #define IXGBE_TDTQ2TCSR(_i)     (0x0622C + ((_i) * 0x40)) /* 8 of these (0-7) */
  #define IXGBE_TDPT2TCCR(_i)     (0x0CD20 + ((_i) * 4)) /* 8 of these (0-7) */
  #define IXGBE_TDPT2TCSR(_i)     (0x0CD40 + ((_i) * 4)) /* 8 of these (0-7) */
 +
 +
  /* Stats registers */
  #define IXGBE_CRCERRS   0x04000
- #define IXGBE_ILLERRC   0x04004
 @@ -224,7 +245,7 @@
  #define IXGBE_XEC       0x04120
  
@@ -240905,7 +240836,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +#define IXGBE_MDIO_PHY_SPEED_ABILITY   0x4 /* Speed Ability Reg */
  #define IXGBE_MDIO_PHY_SPEED_10G       0x0001 /* 10G capable */
  #define IXGBE_MDIO_PHY_SPEED_1G        0x0010 /* 1G capable */
++
 +#define IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR     0xC30A /* PHY_XS SDA/SCL Address Reg */
 +#define IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA     0xC30B /* PHY_XS SDA/SCL Data Reg */
 +#define IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT     0xC30C /* PHY_XS SDA/SCL Status Reg */
@@ -240917,7 +240848,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +#define IXGBE_MII_RESTART              0x200
 +#define IXGBE_MII_AUTONEG_COMPLETE     0x20
 +#define IXGBE_MII_AUTONEG_REG          0x0
-+
  #define IXGBE_PHY_REVISION_MASK        0xFFFFFFF0
  #define IXGBE_MAX_PHY_ADDR             32
  
@@ -241041,14 +240972,14 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  #define IXGBE_IMIR_PORT_IM_EN     0x00010000  /* TCP port enable */
  #define IXGBE_IMIR_PORT_BP        0x00020000  /* TCP port check bypass */
  #define IXGBE_IMIREXT_SIZE_BP     0x00001000  /* Packet size bypass */
-@@ -623,6 +678,7 @@
+@@ -622,6 +677,7 @@
+ #define IXGBE_VLNCTRL_CFIEN     0x20000000  /* bit 29 */
  #define IXGBE_VLNCTRL_VFE       0x40000000  /* bit 30 */
  #define IXGBE_VLNCTRL_VME       0x80000000  /* bit 31 */
 +
  #define IXGBE_ETHERNET_IEEE_VLAN_TYPE 0x8100  /* 802.1q protocol */
  
- /* STATUS Bit Masks */
 @@ -670,16 +726,16 @@
  #define IXGBE_AUTOC_AN_RESTART  0x00001000
  #define IXGBE_AUTOC_FLU         0x00000001
@@ -241199,8 +241130,15 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  #define IXGBE_RXDADV_PKTTYPE_UDP        0x00000200 /* UDP hdr present */
  #define IXGBE_RXDADV_PKTTYPE_SCTP       0x00000400 /* SCTP hdr present */
  #define IXGBE_RXDADV_PKTTYPE_NFS        0x00000800 /* NFS hdr present */
--
- /* Masks to determine if packets should be dropped due to frame errors */
++/* Masks to determine if packets should be dropped due to frame errors */
++#define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
++                                      IXGBE_RXD_ERR_CE | \
++                                      IXGBE_RXD_ERR_LE | \
++                                      IXGBE_RXD_ERR_PE | \
++                                      IXGBE_RXD_ERR_OSE | \
++                                      IXGBE_RXD_ERR_USE)
+-/* Masks to determine if packets should be dropped due to frame errors */
 -#define IXGBE_RXD_ERR_FRAME_ERR_MASK (\
 -                                    IXGBE_RXD_ERR_CE | \
 -                                    IXGBE_RXD_ERR_LE | \
@@ -241214,13 +241152,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 -                                    IXGBE_RXDADV_ERR_PE | \
 -                                    IXGBE_RXDADV_ERR_OSE | \
 -                                    IXGBE_RXDADV_ERR_USE)
-+#define IXGBE_RXD_ERR_FRAME_ERR_MASK ( \
-+                                      IXGBE_RXD_ERR_CE | \
-+                                      IXGBE_RXD_ERR_LE | \
-+                                      IXGBE_RXD_ERR_PE | \
-+                                      IXGBE_RXD_ERR_OSE | \
-+                                      IXGBE_RXD_ERR_USE)
-+
 +#define IXGBE_RXDADV_ERR_FRAME_ERR_MASK ( \
 +                                      IXGBE_RXDADV_ERR_CE | \
 +                                      IXGBE_RXDADV_ERR_LE | \
@@ -241238,7 +241169,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  /* Transmit Descriptor - Legacy */
  struct ixgbe_legacy_tx_desc {
        u64 buffer_addr;       /* Address of the descriptor's data buffer */
-@@ -1007,15 +1064,15 @@ struct ixgbe_legacy_tx_desc {
+@@ -1007,15 +1064,15 @@
                __le32 data;
                struct {
                        __le16 length;    /* Data buffer length */
@@ -241258,7 +241189,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
                        __le16 vlan;
                } fields;
        } upper;
-@@ -1024,7 +1081,7 @@ struct ixgbe_legacy_tx_desc {
+@@ -1024,7 +1081,7 @@
  /* Transmit Descriptor - Advanced */
  union ixgbe_adv_tx_desc {
        struct {
@@ -241267,7 +241198,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
                __le32 cmd_type_len;
                __le32 olinfo_status;
        } read;
-@@ -1039,9 +1096,9 @@ union ixgbe_adv_tx_desc {
+@@ -1039,9 +1096,9 @@
  struct ixgbe_legacy_rx_desc {
        __le64 buffer_addr; /* Address of the descriptor's data buffer */
        __le16 length;      /* Length of data DMAed into data buffer */
@@ -241280,7 +241211,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
        __le16 vlan;
  };
  
-@@ -1053,15 +1110,18 @@ union ixgbe_adv_rx_desc {
+@@ -1053,15 +1110,18 @@
        } read;
        struct {
                struct {
@@ -241303,7 +241234,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
                                } csum_ip;
                        } hi_dword;
                } lower;
-@@ -1082,49 +1142,69 @@ struct ixgbe_adv_tx_context_desc {
+@@ -1082,49 +1142,69 @@
  };
  
  /* Adv Transmit Descriptor Config Masks */
@@ -241395,7 +241326,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  
  
  enum ixgbe_eeprom_type {
-@@ -1143,14 +1223,39 @@ enum ixgbe_phy_type {
+@@ -1143,14 +1223,39 @@
        ixgbe_phy_unknown = 0,
        ixgbe_phy_tn,
        ixgbe_phy_qt,
@@ -241437,7 +241368,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  };
  
  /* Flow Control Settings */
-@@ -1167,6 +1272,8 @@ struct ixgbe_addr_filter_info {
+@@ -1167,6 +1272,8 @@
        u32 rar_used_count;
        u32 mc_addr_in_rar_count;
        u32 mta_in_use;
@@ -241446,7 +241377,7 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  };
  
  /* Flow control parameters */
-@@ -1242,57 +1349,120 @@ struct ixgbe_hw_stats {
+@@ -1242,57 +1349,120 @@
  /* forward declaration */
  struct ixgbe_hw;
  
@@ -241523,20 +241454,6 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
        s32 (*setup_link)(struct ixgbe_hw *);
 -      s32 (*check_link)(struct ixgbe_hw *, u32 *, bool *);
 -      s32 (*setup_link_speed)(struct ixgbe_hw *, u32, bool, bool);
--};
--
--struct ixgbe_mac_info {
--      struct ixgbe_mac_operations     ops;
--      enum ixgbe_mac_type             type;
--      u8                              addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
--      u8                              perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
--      s32                             mc_filter_type;
--      u32                             num_rx_queues;
--      u32                             num_tx_queues;
--      u32                             num_rx_addrs;
--      u32                             link_attach_type;
--      u32                             link_mode_select;
--      bool                            link_settings_loaded;
 +      s32 (*setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool,
 +                              bool);
 +      s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *);
@@ -241545,12 +241462,9 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +      s32 (*write_i2c_byte)(struct ixgbe_hw *, u8, u8, u8);
 +      s32 (*read_i2c_eeprom)(struct ixgbe_hw *, u8 , u8 *);
 +      s32 (*write_i2c_eeprom)(struct ixgbe_hw *, u8, u8);
- };
- struct ixgbe_eeprom_info {
--      enum ixgbe_eeprom_type          type;
--      u16                             word_size;
--      u16                             address_bits;
++};
++
++struct ixgbe_eeprom_info {
 +      struct ixgbe_eeprom_operations  ops;
 +      enum ixgbe_eeprom_type          type;
 +      u32                             semaphore_delay;
@@ -241558,17 +241472,24 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +      u16                             address_bits;
  };
  
--struct ixgbe_phy_info {
--      struct ixgbe_phy_operations     ops;
+ struct ixgbe_mac_info {
+-      struct ixgbe_mac_operations     ops;
+-      enum ixgbe_mac_type             type;
+-      u8                              addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
+-      u8                              perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
+-      s32                             mc_filter_type;
+-      u32                             num_rx_queues;
+-      u32                             num_tx_queues;
+-      u32                             num_rx_addrs;
+-      u32                             link_attach_type;
+-      u32                             link_mode_select;
+-      bool                            link_settings_loaded;
+-};
 -
--      enum ixgbe_phy_type             type;
--      u32                             addr;
--      u32                             id;
--      u32                             revision;
--      enum ixgbe_media_type           media_type;
--      u32                             autoneg_advertised;
--      bool                            autoneg_wait_to_complete;
-+struct ixgbe_mac_info {
+-struct ixgbe_eeprom_info {
+-      enum ixgbe_eeprom_type          type;
+-      u16                             word_size;
+-      u16                             address_bits;
 +      struct ixgbe_mac_operations     ops;
 +      enum ixgbe_mac_type             type;
 +      u8                              addr[IXGBE_ETH_LENGTH_OF_ADDRESS];
@@ -241586,11 +241507,22 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +      bool                            autoneg_failed;
  };
  
+ struct ixgbe_phy_info {
+-      struct ixgbe_phy_operations     ops;
+-
+-      enum ixgbe_phy_type             type;
+-      u32                             addr;
+-      u32                             id;
+-      u32                             revision;
+-      enum ixgbe_media_type           media_type;
+-      u32                             autoneg_advertised;
+-      bool                            autoneg_wait_to_complete;
+-};
+-
 -struct ixgbe_info {
 -      enum ixgbe_mac_type             mac;
 -      s32                             (*get_invariants)(struct ixgbe_hw *);
 -      struct ixgbe_mac_operations     *mac_ops;
-+struct ixgbe_phy_info {
 +      struct ixgbe_phy_operations     ops;
 +      enum ixgbe_phy_type             type;
 +      u32                             addr;
@@ -241604,10 +241536,11 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  };
  
  struct ixgbe_hw {
-@@ -1311,6 +1481,15 @@ struct ixgbe_hw {
+@@ -1310,6 +1480,15 @@
+       u8                              revision_id;
        bool                            adapter_stopped;
  };
++
 +struct ixgbe_info {
 +      enum ixgbe_mac_type             mac;
 +      s32                             (*get_invariants)(struct ixgbe_hw *);
@@ -241616,11 +241549,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
 +      struct ixgbe_phy_operations     *phy_ops;
 +};
 +
-+
  /* Error Codes */
  #define IXGBE_ERR_EEPROM                        -1
- #define IXGBE_ERR_EEPROM_CHECKSUM               -2
-@@ -1329,6 +1508,9 @@ struct ixgbe_hw {
+@@ -1329,6 +1508,9 @@
  #define IXGBE_ERR_RESET_FAILED                  -15
  #define IXGBE_ERR_SWFW_SYNC                     -16
  #define IXGBE_ERR_PHY_ADDR_INVALID              -17
@@ -241630,10 +241562,10 @@ diff -purN linux-2.6.27/drivers/net/ixgbe/ixgbe_type.h linux-2.6.27.19-5.1/drive
  #define IXGBE_NOT_IMPLEMENTED                   0x7FFFFFFF
  
  #endif /* _IXGBE_TYPE_H_ */
-diff -purN linux-2.6.27/drivers/net/mlx4/catas.c linux-2.6.27.19-5.1/drivers/net/mlx4/catas.c
---- linux-2.6.27/drivers/net/mlx4/catas.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/mlx4/catas.c       2009-03-25 16:11:04.000000000 +0000
-@@ -45,7 +45,7 @@ static LIST_HEAD(catas_list);
+diff -r 9608d5473017 drivers/net/mlx4/catas.c
+--- a/drivers/net/mlx4/catas.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/mlx4/catas.c Wed May 06 16:56:25 2009 +0100
+@@ -45,7 +45,7 @@
  static struct workqueue_struct *catas_wq;
  static struct work_struct catas_work;
  
@@ -241642,10 +241574,10 @@ diff -purN linux-2.6.27/drivers/net/mlx4/catas.c linux-2.6.27.19-5.1/drivers/net
  module_param(internal_err_reset, int, 0644);
  MODULE_PARM_DESC(internal_err_reset,
                 "Reset device on internal errors if non-zero (default 1)");
-diff -purN linux-2.6.27/drivers/net/myri_sbus.c linux-2.6.27.19-5.1/drivers/net/myri_sbus.c
---- linux-2.6.27/drivers/net/myri_sbus.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/myri_sbus.c        2009-03-25 16:11:04.000000000 +0000
-@@ -1150,6 +1150,7 @@ static struct of_device_id myri_sbus_mat
+diff -r 9608d5473017 drivers/net/myri_sbus.c
+--- a/drivers/net/myri_sbus.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/myri_sbus.c  Wed May 06 16:56:25 2009 +0100
+@@ -1150,6 +1150,7 @@
  MODULE_DEVICE_TABLE(of, myri_sbus_match);
  
  static struct of_platform_driver myri_sbus_driver = {
@@ -241653,9 +241585,9 @@ diff -purN linux-2.6.27/drivers/net/myri_sbus.c linux-2.6.27.19-5.1/drivers/net/
        .name           = "myri",
        .match_table    = myri_sbus_match,
        .probe          = myri_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic.h
---- linux-2.6.27/drivers/net/netxen/netxen_nic.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic.h        2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic.h
+--- a/drivers/net/netxen/netxen_nic.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic.h  Wed May 06 16:56:25 2009 +0100
 @@ -146,7 +146,7 @@
  
  #define MAX_RX_BUFFER_LENGTH          1760
@@ -241681,7 +241613,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  #define MAX_RCVSTATUS_DESCRIPTORS     MAX_RCV_DESCRIPTORS
  #define MAX_JUMBO_RCV_DESC    MAX_JUMBO_RCV_DESCRIPTORS
  #define MAX_RCV_DESC          MAX_RCV_DESCRIPTORS
-@@ -308,27 +308,16 @@ struct netxen_ring_ctx {
+@@ -308,27 +308,16 @@
  #define netxen_set_cmd_desc_ctxid(cmd_desc, var)      \
        ((cmd_desc)->port_ctxid |= ((var) << 4 & 0xF0))
  
@@ -241691,7 +241623,9 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
 -#define netxen_set_cmd_desc_opcode(cmd_desc, val)     \
 -      (cmd_desc)->flags_opcode = ((cmd_desc)->flags_opcode & \
 -              ~cpu_to_le16((u16)0x3f << 7)) | cpu_to_le16(((val) & 0x3f) << 7)
--
++#define netxen_set_tx_port(_desc, _port) \
++      (_desc)->port_ctxid = ((_port) & 0xf) | (((_port) << 4) & 0xf0)
 -#define netxen_set_cmd_desc_num_of_buff(cmd_desc, val)        \
 -      (cmd_desc)->num_of_buffers_total_length = \
 -              ((cmd_desc)->num_of_buffers_total_length & \
@@ -241701,25 +241635,21 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
 -              ((cmd_desc)->num_of_buffers_total_length & \
 -              ~cpu_to_le32((u32)0xffffff << 8)) | \
 -              cpu_to_le32(((val) & 0xffffff) << 8)
--
++#define netxen_set_tx_flags_opcode(_desc, _flags, _opcode) \
++      (_desc)->flags_opcode = \
++      cpu_to_le16(((_flags) & 0x7f) | (((_opcode) & 0x3f) << 7))
 -#define netxen_get_cmd_desc_opcode(cmd_desc)  \
 -      ((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003f)
 -#define netxen_get_cmd_desc_totallength(cmd_desc)     \
 -      ((le32_to_cpu((cmd_desc)->num_of_buffers_total_length) >> 8) & 0xffffff)
-+#define netxen_set_tx_port(_desc, _port) \
-+      (_desc)->port_ctxid = ((_port) & 0xf) | (((_port) << 4) & 0xf0)
-+
-+#define netxen_set_tx_flags_opcode(_desc, _flags, _opcode) \
-+      (_desc)->flags_opcode = \
-+      cpu_to_le16(((_flags) & 0x7f) | (((_opcode) & 0x3f) << 7))
-+
 +#define netxen_set_tx_frags_len(_desc, _frags, _len) \
 +      (_desc)->num_of_buffers_total_length = \
 +      cpu_to_le32(((_frags) & 0xff) | (((_len) & 0xffffff) << 8))
  
  struct cmd_desc_type0 {
        u8 tcp_hdr_offset;      /* For LSO only */
-@@ -510,7 +499,8 @@ typedef enum {
+@@ -510,7 +499,8 @@
        NETXEN_BRDTYPE_P3_10G_SFP_CT = 0x002a,
        NETXEN_BRDTYPE_P3_10G_SFP_QT = 0x002b,
        NETXEN_BRDTYPE_P3_10G_CX4 = 0x0031,
@@ -241729,7 +241659,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  
  } netxen_brdtype_t;
  
-@@ -757,7 +747,7 @@ extern char netxen_nic_driver_name[];
+@@ -757,7 +747,7 @@
   */
  struct netxen_skb_frag {
        u64 dma;
@@ -241738,7 +241668,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  };
  
  #define _netxen_set_bits(config_word, start, bits, val)       {\
-@@ -783,13 +773,7 @@ struct netxen_skb_frag {
+@@ -783,13 +773,7 @@
  struct netxen_cmd_buffer {
        struct sk_buff *skb;
        struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD + 1];
@@ -241753,7 +241683,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  };
  
  /* In rx_buffer, we do not need multiple fragments as is a single buffer */
-@@ -876,7 +860,6 @@ struct nx_host_rds_ring {
+@@ -876,7 +860,6 @@
        u32 skb_size;
        struct netxen_rx_buffer *rx_buf_arr;    /* rx buffers for receive   */
        struct list_head free_list;
@@ -241761,7 +241691,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  };
  
  /*
-@@ -995,31 +978,31 @@ struct netxen_recv_context {
+@@ -995,31 +978,31 @@
   */
  
  typedef struct {
@@ -241811,7 +241741,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
        u8  reserved[128];      /* reserve space for future expansion*/
        /* MUST BE 64-bit aligned.
           The following is packed:
-@@ -1029,24 +1012,24 @@ typedef struct {
+@@ -1029,24 +1012,24 @@
  } nx_hostrq_rx_ctx_t;
  
  typedef struct {
@@ -241847,7 +241777,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
        u8  phys_port;          /* Physical id of port */
        u8  virt_port;          /* Virtual/Logical id of port */
        u8  reserved[128];      /* save space for future expansion */
-@@ -1072,34 +1055,34 @@ typedef struct {
+@@ -1072,34 +1055,34 @@
   */
  
  typedef struct {
@@ -241899,7 +241829,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
        u8  phys_port;          /* Physical id of port */
        u8  virt_port;          /* Virtual/Logical id of port */
        nx_cardrsp_cds_ring_t cds_ring; /* Card cds settings */
-@@ -1202,9 +1185,9 @@ enum {
+@@ -1202,9 +1185,9 @@
  #define VPORT_MISS_MODE_ACCEPT_MULTI  2 /* accept unmatched multicast */
  
  typedef struct {
@@ -241912,7 +241842,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  } nx_nic_req_t;
  
  typedef struct {
-@@ -1486,8 +1469,6 @@ void netxen_release_tx_buffers(struct ne
+@@ -1486,8 +1469,6 @@
  
  void netxen_initialize_adapter_ops(struct netxen_adapter *adapter);
  int netxen_init_firmware(struct netxen_adapter *adapter);
@@ -241921,7 +241851,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  void netxen_nic_clear_stats(struct netxen_adapter *adapter);
  void netxen_watchdog_task(struct work_struct *work);
  void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx,
-@@ -1496,6 +1477,7 @@ int netxen_process_cmd_ring(struct netxe
+@@ -1496,6 +1477,7 @@
  u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max);
  void netxen_p2_nic_set_multi(struct net_device *netdev);
  void netxen_p3_nic_set_multi(struct net_device *netdev);
@@ -241929,10 +241859,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic.h linux-2.6.27.19-5.1/driv
  int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32);
  int netxen_config_intr_coalesce(struct netxen_adapter *adapter);
  
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ctx.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ctx.c    2009-03-25 16:11:07.000000000 +0000
-@@ -76,7 +76,7 @@ netxen_api_unlock(struct netxen_adapter 
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_ctx.c
+--- a/drivers/net/netxen/netxen_nic_ctx.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_ctx.c      Wed May 06 16:56:25 2009 +0100
+@@ -76,7 +76,7 @@
  static u32
  netxen_poll_rsp(struct netxen_adapter *adapter)
  {
@@ -241941,7 +241871,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
        int     timeout = 0;
  
        do {
-@@ -86,10 +86,7 @@ netxen_poll_rsp(struct netxen_adapter *a
+@@ -86,10 +86,7 @@
                if (++timeout > NX_OS_CRB_RETRY_COUNT)
                        return NX_CDRP_RSP_TIMEOUT;
  
@@ -241953,7 +241883,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
        } while (!NX_CDRP_IS_RSP(rsp));
  
        return rsp;
-@@ -109,20 +106,16 @@ netxen_issue_cmd(struct netxen_adapter *
+@@ -109,20 +106,16 @@
        if (netxen_api_lock(adapter))
                return NX_RCODE_TIMEOUT;
  
@@ -241979,7 +241909,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
        rsp = netxen_poll_rsp(adapter);
  
-@@ -133,7 +126,6 @@ netxen_issue_cmd(struct netxen_adapter *
+@@ -133,7 +126,6 @@
                rcode = NX_RCODE_TIMEOUT;
        } else if (rsp == NX_CDRP_RSP_FAIL) {
                netxen_nic_read_w1(adapter, NX_ARG1_CRB_OFFSET, &rcode);
@@ -241987,7 +241917,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
                printk(KERN_ERR "%s: failed card response code:0x%x\n",
                                netxen_nic_driver_name, rcode);
-@@ -183,7 +175,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -183,7 +175,7 @@
  
        int i, nrds_rings, nsds_rings;
        size_t rq_size, rsp_size;
@@ -241996,7 +241926,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
        int err;
  
-@@ -225,11 +217,14 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -225,11 +217,14 @@
  
        prq->num_rds_rings = cpu_to_le16(nrds_rings);
        prq->num_sds_rings = cpu_to_le16(nsds_rings);
@@ -242014,7 +241944,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
        for (i = 0; i < nrds_rings; i++) {
  
-@@ -241,17 +236,14 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -241,17 +236,14 @@
                prq_rds[i].buff_size = cpu_to_le64(rds_ring->dma_size);
        }
  
@@ -242035,7 +241965,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
        phys_addr = hostrq_phys_addr;
        err = netxen_issue_cmd(adapter,
-@@ -269,9 +261,9 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -269,9 +261,9 @@
  
  
        prsp_rds = ((nx_cardrsp_rds_ring_t *)
@@ -242047,7 +241977,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
                rds_ring = &recv_ctx->rds_rings[i];
  
                reg = le32_to_cpu(prsp_rds[i].host_producer_crb);
-@@ -279,7 +271,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -279,7 +271,7 @@
        }
  
        prsp_sds = ((nx_cardrsp_sds_ring_t *)
@@ -242056,7 +241986,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
        reg = le32_to_cpu(prsp_sds[0].host_consumer_crb);
        recv_ctx->crb_sts_consumer = NETXEN_NIC_REG(reg - 0x200);
  
-@@ -288,7 +280,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_ad
+@@ -288,7 +280,7 @@
  
        recv_ctx->state = le32_to_cpu(prsp->host_ctx_state);
        recv_ctx->context_id = le16_to_cpu(prsp->context_id);
@@ -242065,10 +241995,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ctx.c linux-2.6.27.19-5.1/
  
  out_free_rsp:
        pci_free_consistent(adapter->pdev, rsp_size, prsp, cardrsp_phys_addr);
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ethtool.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_ethtool.c        2009-03-25 16:11:07.000000000 +0000
-@@ -136,11 +136,9 @@ netxen_nic_get_settings(struct net_devic
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_ethtool.c
+--- a/drivers/net/netxen/netxen_nic_ethtool.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_ethtool.c  Wed May 06 16:56:25 2009 +0100
+@@ -136,11 +136,9 @@
  
                ecmd->port = PORT_TP;
  
@@ -242083,7 +242013,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
  
        } else if (adapter->ahw.board_type == NETXEN_NIC_XGBE) {
                u32 val;
-@@ -171,7 +169,7 @@ netxen_nic_get_settings(struct net_devic
+@@ -171,7 +169,7 @@
        } else
                return -EIO;
  
@@ -242092,7 +242022,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
        ecmd->transceiver = XCVR_EXTERNAL;
  
        switch ((netxen_brdtype_t) boardinfo->board_type) {
-@@ -180,13 +178,13 @@ netxen_nic_get_settings(struct net_devic
+@@ -180,13 +178,13 @@
        case NETXEN_BRDTYPE_P3_REF_QG:
        case NETXEN_BRDTYPE_P3_4_GB:
        case NETXEN_BRDTYPE_P3_4_GB_MM:
@@ -242107,7 +242037,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
                ecmd->supported |= SUPPORTED_TP;
                ecmd->advertising |= ADVERTISED_TP;
                ecmd->port = PORT_TP;
-@@ -204,16 +202,33 @@ netxen_nic_get_settings(struct net_devic
+@@ -204,15 +202,32 @@
                ecmd->port = PORT_FIBRE;
                ecmd->autoneg = AUTONEG_DISABLE;
                break;
@@ -242123,7 +242053,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
                ecmd->advertising |= ADVERTISED_FIBRE;
                ecmd->port = PORT_FIBRE;
                ecmd->autoneg = AUTONEG_DISABLE;
-               break;
++              break;
 +      case NETXEN_BRDTYPE_P3_10G_TP:
 +              if (adapter->ahw.board_type == NETXEN_NIC_XGBE) {
 +                      ecmd->autoneg = AUTONEG_DISABLE;
@@ -242138,11 +242068,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
 +                              (ADVERTISED_TP | ADVERTISED_Autoneg);
 +                      ecmd->port = PORT_TP;
 +              }
-+              break;
+               break;
        default:
                printk(KERN_ERR "netxen-nic: Unsupported board model %d\n",
-                      (netxen_brdtype_t) boardinfo->board_type);
-@@ -546,7 +561,10 @@ netxen_nic_get_ringparam(struct net_devi
+@@ -546,7 +561,10 @@
        }
        ring->tx_pending = adapter->max_tx_desc_count;
  
@@ -242154,10 +242083,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_ethtool.c linux-2.6.27.19-
        ring->tx_max_pending = MAX_CMD_DESCRIPTORS_HOST;
        ring->rx_jumbo_max_pending = MAX_JUMBO_RCV_DESCRIPTORS;
        ring->rx_mini_max_pending = 0;
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_hw.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_hw.c     2009-03-25 16:11:07.000000000 +0000
-@@ -503,17 +503,15 @@ netxen_send_cmd_descs(struct netxen_adap
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_hw.c
+--- a/drivers/net/netxen/netxen_nic_hw.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_hw.c       Wed May 06 16:56:25 2009 +0100
+@@ -503,17 +503,15 @@
  
        i = 0;
  
@@ -242177,7 +242106,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
                /* adapter->ahw.cmd_desc_head[producer] = *cmd_desc; */
                memcpy(&adapter->ahw.cmd_desc_head[producer],
-@@ -531,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adap
+@@ -531,6 +529,8 @@
  
        netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer);
  
@@ -242186,7 +242115,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
        return 0;
  }
  
-@@ -539,16 +539,19 @@ static int nx_p3_sre_macaddr_change(stru
+@@ -539,16 +539,19 @@
  {
        struct netxen_adapter *adapter = (struct netxen_adapter *)dev->priv;
        nx_nic_req_t req;
@@ -242213,7 +242142,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
        rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
        if (rv != 0) {
-@@ -612,18 +615,35 @@ send_fw_cmd:
+@@ -612,16 +615,33 @@
  int netxen_p3_nic_set_promisc(struct netxen_adapter *adapter, u32 mode)
  {
        nx_nic_req_t req;
@@ -242234,8 +242163,8 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
        return netxen_send_cmd_descs(adapter,
                                (struct cmd_desc_type0 *)&req, 1);
- }
++}
++
 +void netxen_p3_free_mac_list(struct netxen_adapter *adapter)
 +{
 +      nx_mac_list_t *cur, *next;
@@ -242247,12 +242176,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
 +              kfree(cur);
 +              cur = next;
 +      }
-+}
-+
- #define       NETXEN_CONFIG_INTR_COALESCE     3
+ }
  
- /*
-@@ -632,13 +652,15 @@ int netxen_p3_nic_set_promisc(struct net
+ #define       NETXEN_CONFIG_INTR_COALESCE     3
+@@ -632,13 +652,15 @@
  int netxen_config_intr_coalesce(struct netxen_adapter *adapter)
  {
        nx_nic_req_t req;
@@ -242271,7 +242198,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
        memcpy(&req.words[0], &adapter->coal, sizeof(adapter->coal));
  
-@@ -772,13 +794,10 @@ int netxen_p3_get_mac_addr(struct netxen
+@@ -772,13 +794,10 @@
        adapter->hw_read_wx(adapter, crbaddr, &mac_lo, 4);
        adapter->hw_read_wx(adapter, crbaddr+4, &mac_hi, 4);
  
@@ -242287,7 +242214,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
        return 0;
  }
-@@ -937,7 +956,7 @@ int netxen_load_firmware(struct netxen_a
+@@ -937,7 +956,7 @@
  {
        int i;
        u32 data, size = 0;
@@ -242296,7 +242223,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
  
        size = (NETXEN_IMAGE_START - NETXEN_BOOTLD_START)/4;
  
-@@ -949,10 +968,8 @@ int netxen_load_firmware(struct netxen_a
+@@ -949,10 +968,8 @@
                if (netxen_rom_fast_read(adapter, flashaddr, (int *)&data) != 0)
                        return -EIO;
  
@@ -242308,7 +242235,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
        }
        msleep(1);
  
-@@ -2034,7 +2051,13 @@ int netxen_nic_get_board_info(struct net
+@@ -2034,7 +2051,13 @@
                rv = -1;
        }
  
@@ -242323,7 +242250,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
        switch ((netxen_brdtype_t) boardinfo->board_type) {
        case NETXEN_BRDTYPE_P2_SB35_4G:
                adapter->ahw.board_type = NETXEN_NIC_GBE;
-@@ -2053,7 +2076,6 @@ int netxen_nic_get_board_info(struct net
+@@ -2053,7 +2076,6 @@
        case NETXEN_BRDTYPE_P3_10G_SFP_QT:
        case NETXEN_BRDTYPE_P3_10G_XFP:
        case NETXEN_BRDTYPE_P3_10000_BASE_T:
@@ -242331,21 +242258,20 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
                adapter->ahw.board_type = NETXEN_NIC_XGBE;
                break;
        case NETXEN_BRDTYPE_P1_BD:
-@@ -2063,9 +2085,12 @@ int netxen_nic_get_board_info(struct net
+@@ -2063,8 +2085,11 @@
        case NETXEN_BRDTYPE_P3_REF_QG:
        case NETXEN_BRDTYPE_P3_4_GB:
        case NETXEN_BRDTYPE_P3_4_GB_MM:
 -
                adapter->ahw.board_type = NETXEN_NIC_GBE;
-               break;
++              break;
 +      case NETXEN_BRDTYPE_P3_10G_TP:
 +              adapter->ahw.board_type = (adapter->portnum < 2) ?
 +                      NETXEN_NIC_XGBE : NETXEN_NIC_GBE;
-+              break;
+               break;
        default:
                printk("%s: Unknown(%x)\n", netxen_nic_driver_name,
-                      boardinfo->board_type);
-@@ -2110,12 +2135,16 @@ void netxen_nic_set_link_parameters(stru
+@@ -2110,12 +2135,16 @@
  {
        __u32 status;
        __u32 autoneg;
@@ -242365,7 +242291,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
                adapter->hw_read_wx(adapter,
                                NETXEN_PORT_MODE_ADDR, &port_mode, 4);
                if (port_mode == NETXEN_PORT_MODE_802_3_AP) {
-@@ -2141,7 +2170,7 @@ void netxen_nic_set_link_parameters(stru
+@@ -2141,7 +2170,7 @@
                                        adapter->link_speed = SPEED_1000;
                                        break;
                                default:
@@ -242374,7 +242300,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
                                        break;
                                }
                                switch (netxen_get_phy_duplex(status)) {
-@@ -2164,7 +2193,7 @@ void netxen_nic_set_link_parameters(stru
+@@ -2164,7 +2193,7 @@
                                goto link_down;
                } else {
                      link_down:
@@ -242383,10 +242309,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_hw.c linux-2.6.27.19-5.1/d
                        adapter->link_duplex = -1;
                }
        }
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_init.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_init.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_init.c   2009-03-25 16:11:07.000000000 +0000
-@@ -308,7 +308,6 @@ int netxen_alloc_sw_resources(struct net
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_init.c
+--- a/drivers/net/netxen/netxen_nic_init.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_init.c     Wed May 06 16:56:25 2009 +0100
+@@ -308,7 +308,6 @@
                        }
                        memset(rds_ring->rx_buf_arr, 0, RCV_BUFFSIZE);
                        INIT_LIST_HEAD(&rds_ring->free_list);
@@ -242394,7 +242320,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                        /*
                         * Now go through all of them, set reference handles
                         * and put them in the queues.
-@@ -439,6 +438,8 @@ static int netxen_wait_rom_done(struct n
+@@ -439,6 +438,8 @@
        long timeout = 0;
        long done = 0;
  
@@ -242403,21 +242329,21 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
        while (done == 0) {
                done = netxen_nic_reg_read(adapter, NETXEN_ROMUSB_GLB_STATUS);
                done &= 2;
-@@ -533,12 +534,9 @@ static int do_rom_fast_write(struct netx
+@@ -533,12 +534,9 @@
  static int do_rom_fast_read(struct netxen_adapter *adapter,
                            int addr, int *valp)
  {
 -      cond_resched();
 -
        netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ADDRESS, addr);
--      netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
++      netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
+       netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
 -      udelay(100);            /* prevent bursting on CRB */
-       netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
-+      netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 3);
+-      netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
        netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_INSTR_OPCODE, 0xb);
        if (netxen_wait_rom_done(adapter)) {
                printk("Error waiting for rom done\n");
-@@ -546,7 +544,7 @@ static int do_rom_fast_read(struct netxe
+@@ -546,7 +544,7 @@
        }
        /* reset abyte_cnt and dummy_byte_cnt */
        netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_ABYTE_CNT, 0);
@@ -242426,7 +242352,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
        netxen_nic_reg_write(adapter, NETXEN_ROMUSB_ROM_DUMMY_BYTE_CNT, 0);
  
        *valp = netxen_nic_reg_read(adapter, NETXEN_ROMUSB_ROM_RDATA);
-@@ -884,14 +882,16 @@ int netxen_flash_unlock(struct netxen_ad
+@@ -884,14 +882,16 @@
  int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
  {
        int addr, val;
@@ -242445,7 +242371,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
  
        if (verbose) {
                if (netxen_rom_fast_read(adapter, NETXEN_BOARDTYPE, &val) == 0)
-@@ -910,7 +910,7 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -910,7 +910,7 @@
  
        if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {
                if (netxen_rom_fast_read(adapter, 0, &n) != 0 ||
@@ -242454,7 +242380,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                        netxen_rom_fast_read(adapter, 4, &n) != 0) {
                        printk(KERN_ERR "%s: ERROR Reading crb_init area: "
                                        "n: %08x\n", netxen_nic_driver_name, n);
-@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -947,8 +947,10 @@
        }
        for (i = 0; i < n; i++) {
                if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 ||
@@ -242466,7 +242392,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
  
                buf[i].addr = addr;
                buf[i].data = val;
-@@ -975,6 +977,14 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -975,6 +977,14 @@
                        /* do not reset PCI */
                        if (off == (ROMUSB_GLB + 0xbc))
                                continue;
@@ -242481,7 +242407,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                        if (off == (NETXEN_CRB_PEG_NET_1 + 0x18))
                                buf[i].data = 0x1020;
                        /* skip the function enable register */
-@@ -992,23 +1002,21 @@ int netxen_pinit_from_rom(struct netxen_
+@@ -992,23 +1002,21 @@
                        continue;
                }
  
@@ -242509,7 +242435,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
        }
        kfree(buf);
  
-@@ -1277,7 +1285,7 @@ static void netxen_process_rcv(struct ne
+@@ -1277,7 +1285,7 @@
  
                dev_kfree_skb_any(skb);
                for (i = 0; i < nr_frags; i++) {
@@ -242518,7 +242444,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                        skb = netxen_process_rxbuf(adapter,
                                        rds_ring, index, cksum);
                        if (skb)
-@@ -1430,7 +1438,6 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1430,7 +1438,6 @@
        struct rcv_desc *pdesc;
        struct netxen_rx_buffer *buffer;
        int count = 0;
@@ -242526,7 +242452,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
        netxen_ctx_msg msg = 0;
        dma_addr_t dma;
        struct list_head *head;
-@@ -1438,7 +1445,6 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1438,7 +1445,6 @@
        rds_ring = &recv_ctx->rds_rings[ringid];
  
        producer = rds_ring->producer;
@@ -242534,7 +242460,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
        head = &rds_ring->free_list;
  
        /* We can start writing rx descriptors into the phantom memory. */
-@@ -1446,39 +1452,37 @@ void netxen_post_rx_buffers(struct netxe
+@@ -1446,39 +1452,37 @@
  
                skb = dev_alloc_skb(rds_ring->skb_size);
                if (unlikely(!skb)) {
@@ -242590,7 +242516,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                rds_ring->producer = producer;
                        /* Window = 1 */
                adapter->pci_write_normalize(adapter,
-@@ -1517,49 +1521,50 @@ static void netxen_post_rx_buffers_nodb(
+@@ -1517,49 +1521,50 @@
        struct rcv_desc *pdesc;
        struct netxen_rx_buffer *buffer;
        int count = 0;
@@ -242656,9 +242582,9 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_init.c linux-2.6.27.19-5.1
                rds_ring->producer = producer;
                        /* Window = 1 */
                adapter->pci_write_normalize(adapter,
-diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_main.c
---- linux-2.6.27/drivers/net/netxen/netxen_nic_main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/netxen/netxen_nic_main.c   2009-03-25 16:11:07.000000000 +0000
+diff -r 9608d5473017 drivers/net/netxen/netxen_nic_main.c
+--- a/drivers/net/netxen/netxen_nic_main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/netxen/netxen_nic_main.c     Wed May 06 16:56:25 2009 +0100
 @@ -39,7 +39,9 @@
  #include "netxen_nic_phan_reg.h"
  
@@ -242669,7 +242595,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
  MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver");
  MODULE_LICENSE("GPL");
-@@ -241,8 +243,8 @@ static void netxen_check_options(struct 
+@@ -241,14 +243,22 @@
        case NETXEN_BRDTYPE_P3_REF_QG:
        case NETXEN_BRDTYPE_P3_4_GB:
        case NETXEN_BRDTYPE_P3_4_GB_MM:
@@ -242680,22 +242606,21 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
                break;
  
        case NETXEN_BRDTYPE_P2_SB35_4G:
-@@ -251,6 +253,14 @@ static void netxen_check_options(struct 
+       case NETXEN_BRDTYPE_P2_SB31_2G:
+               adapter->msix_supported = 0;
                adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
-               break;
++              break;
++
 +      case NETXEN_BRDTYPE_P3_10G_TP:
 +              adapter->msix_supported = !!use_msi_x;
 +              if (adapter->ahw.board_type == NETXEN_NIC_XGBE)
 +                      adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_10G;
 +              else
 +                      adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
-+              break;
-+
+               break;
        default:
-               adapter->msix_supported = 0;
-               adapter->max_rx_desc_count = MAX_RCV_DESCRIPTORS_1G;
-@@ -271,10 +281,15 @@ static void netxen_check_options(struct 
+@@ -271,10 +281,15 @@
  static int
  netxen_check_hw_init(struct netxen_adapter *adapter, int first_boot)
  {
@@ -242712,7 +242637,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
                /* PCI bus master workaround */
                adapter->hw_read_wx(adapter,
-@@ -294,18 +309,26 @@ netxen_check_hw_init(struct netxen_adapt
+@@ -294,18 +309,26 @@
                        /* clear the register for future unloads/loads */
                        adapter->pci_write_normalize(adapter,
                                        NETXEN_CAM_RAM(0x1fc), 0);
@@ -242748,7 +242673,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  }
  
  static void netxen_set_port_mode(struct netxen_adapter *adapter)
-@@ -773,8 +796,8 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -773,8 +796,8 @@
                                                CRB_CMDPEG_STATE, 0);
                        netxen_pinit_from_rom(adapter, 0);
                        msleep(1);
@@ -242758,7 +242683,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
                if (NX_IS_REVISION_P3(revision_id))
                        netxen_pcie_strap_init(adapter);
-@@ -790,13 +813,6 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -790,13 +813,6 @@
  
                }
  
@@ -242772,7 +242697,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
                err = netxen_initialize_adapter_offload(adapter);
                if (err)
                        goto err_out_iounmap;
-@@ -810,7 +826,9 @@ netxen_nic_probe(struct pci_dev *pdev, c
+@@ -810,7 +826,9 @@
                adapter->pci_write_normalize(adapter, CRB_DRIVER_VERSION, i);
  
                /* Handshake with the card before we register the devices. */
@@ -242783,7 +242708,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
        }       /* first_driver */
  
-@@ -914,6 +932,7 @@ err_out_disable_msi:
+@@ -914,6 +932,7 @@
        if (adapter->flags & NETXEN_NIC_MSI_ENABLED)
                pci_disable_msi(pdev);
  
@@ -242791,7 +242716,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
        if (first_driver)
                netxen_free_adapter_offload(adapter);
  
-@@ -957,6 +976,9 @@ static void __devexit netxen_nic_remove(
+@@ -957,6 +976,9 @@
                netxen_free_hw_resources(adapter);
                netxen_release_rx_buffers(adapter);
                netxen_free_sw_resources(adapter);
@@ -242801,7 +242726,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
        }
  
        if (adapter->portnum == 0)
-@@ -972,8 +994,10 @@ static void __devexit netxen_nic_remove(
+@@ -972,8 +994,10 @@
  
        iounmap(adapter->ahw.db_base);
        iounmap(adapter->ahw.pci_base0);
@@ -242814,7 +242739,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-@@ -1126,29 +1150,72 @@ static int netxen_nic_close(struct net_d
+@@ -1126,29 +1150,72 @@
        return 0;
  }
  
@@ -242825,17 +242750,16 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
 -      if (desc->mss) {
 -              desc->total_hdr_length = (sizeof(struct ethhdr) +
 -                                        ip_hdrlen(skb) + tcp_hdrlen(skb));
--
++      bool tso = false;
++      u8 opcode = TX_ETHER_PKT;
++      __be16 protocol = skb->protocol;
++      u16 flags = 0;
 -              if ((NX_IS_REVISION_P3(adapter->ahw.revision_id)) &&
 -                              (skb->protocol == htons(ETH_P_IPV6)))
 -                      netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO6);
 -              else
 -                      netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO);
-+      bool tso = false;
-+      u8 opcode = TX_ETHER_PKT;
-+      __be16 protocol = skb->protocol;
-+      u16 flags = 0;
-+
 +      if (protocol == __constant_htons(ETH_P_8021Q)) {
 +              struct vlan_ethhdr *vh = (struct vlan_ethhdr *)skb->data;
 +              protocol = vh->h_vlan_encapsulated_proto;
@@ -242903,7 +242827,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  }
  
  static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
-@@ -1156,33 +1223,22 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1156,33 +1223,22 @@
        struct netxen_adapter *adapter = netdev_priv(netdev);
        struct netxen_hardware_context *hw = &adapter->ahw;
        unsigned int first_seg_len = skb->len - skb->data_len;
@@ -242944,7 +242868,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
        producer = adapter->cmd_producer;
        smp_mb();
-@@ -1194,34 +1250,26 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1194,34 +1250,26 @@
        }
  
        /* Copy the descriptors into the hardware    */
@@ -242989,7 +242913,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
        hwdesc->buffer1_length = cpu_to_le16(first_seg_len);
        hwdesc->addr_buffer1 = cpu_to_le64(buffrag->dma);
  
-@@ -1229,7 +1277,6 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1229,7 +1277,6 @@
                struct skb_frag_struct *frag;
                int len, temp_len;
                unsigned long offset;
@@ -242997,7 +242921,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
                /* move to next desc. if there is a need */
                if ((i & 0x3) == 0) {
-@@ -1245,8 +1292,12 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1245,8 +1292,12 @@
                offset = frag->page_offset;
  
                temp_len = len;
@@ -243011,7 +242935,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
  
                buffrag++;
                buffrag->dma = temp_dma;
-@@ -1274,16 +1325,12 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1274,16 +1325,12 @@
        }
        producer = get_next_index(producer, num_txd);
  
@@ -243030,19 +242954,19 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
                if (hdr_len > (sizeof(struct cmd_desc_type0) - 2)) {
                        first_hdr_len = sizeof(struct cmd_desc_type0) - 2;
                        more_hdr = 1;
-@@ -1325,6 +1372,11 @@ static int netxen_nic_xmit_frame(struct 
+@@ -1324,6 +1371,11 @@
+       adapter->stats.xmitcalled++;
        netdev->trans_start = jiffies;
  
-       return NETDEV_TX_OK;
++      return NETDEV_TX_OK;
 +
 +drop_packet:
 +      adapter->stats.txdropped++;
 +      dev_kfree_skb_any(skb);
-+      return NETDEV_TX_OK;
+       return NETDEV_TX_OK;
  }
  
- static int netxen_nic_check_temp(struct netxen_adapter *adapter)
-@@ -1396,6 +1448,8 @@ static void netxen_nic_handle_phy_intr(s
+@@ -1396,6 +1448,8 @@
                        netif_carrier_off(netdev);
                        netif_stop_queue(netdev);
                }
@@ -243051,7 +242975,7 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
        } else if (!adapter->ahw.linkup && linkup) {
                printk(KERN_INFO "%s: %s NIC Link is up\n",
                       netxen_nic_driver_name, netdev->name);
-@@ -1404,6 +1458,8 @@ static void netxen_nic_handle_phy_intr(s
+@@ -1404,6 +1458,8 @@
                        netif_carrier_on(netdev);
                        netif_wake_queue(netdev);
                }
@@ -243060,10 +242984,10 @@ diff -purN linux-2.6.27/drivers/net/netxen/netxen_nic_main.c linux-2.6.27.19-5.1
        }
  }
  
-diff -purN linux-2.6.27/drivers/net/niu.c linux-2.6.27.19-5.1/drivers/net/niu.c
---- linux-2.6.27/drivers/net/niu.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/niu.c      2009-03-25 16:11:07.000000000 +0000
-@@ -51,8 +51,7 @@ MODULE_VERSION(DRV_MODULE_VERSION);
+diff -r 9608d5473017 drivers/net/niu.c
+--- a/drivers/net/niu.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/niu.c        Wed May 06 16:56:25 2009 +0100
+@@ -51,8 +51,7 @@
  #ifndef readq
  static u64 readq(void __iomem *reg)
  {
@@ -243073,7 +242997,7 @@ diff -purN linux-2.6.27/drivers/net/niu.c linux-2.6.27.19-5.1/drivers/net/niu.c
  }
  
  static void writeq(u64 val, void __iomem *reg)
-@@ -9140,6 +9139,7 @@ static struct of_device_id niu_match[] =
+@@ -9140,6 +9139,7 @@
  MODULE_DEVICE_TABLE(of, niu_match);
  
  static struct of_platform_driver niu_of_driver = {
@@ -243081,10 +243005,10 @@ diff -purN linux-2.6.27/drivers/net/niu.c linux-2.6.27.19-5.1/drivers/net/niu.c
        .name           = "niu",
        .match_table    = niu_match,
        .probe          = niu_of_probe,
-diff -purN linux-2.6.27/drivers/net/pcmcia/axnet_cs.c linux-2.6.27.19-5.1/drivers/net/pcmcia/axnet_cs.c
---- linux-2.6.27/drivers/net/pcmcia/axnet_cs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pcmcia/axnet_cs.c  2009-03-25 16:11:06.000000000 +0000
-@@ -787,6 +787,7 @@ static struct pcmcia_device_id axnet_ids
+diff -r 9608d5473017 drivers/net/pcmcia/axnet_cs.c
+--- a/drivers/net/pcmcia/axnet_cs.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pcmcia/axnet_cs.c    Wed May 06 16:56:25 2009 +0100
+@@ -787,6 +787,7 @@
        PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),
        PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),
        PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),
@@ -243092,10 +243016,10 @@ diff -purN linux-2.6.27/drivers/net/pcmcia/axnet_cs.c linux-2.6.27.19-5.1/driver
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),
-diff -purN linux-2.6.27/drivers/net/pcmcia/pcnet_cs.c linux-2.6.27.19-5.1/drivers/net/pcmcia/pcnet_cs.c
---- linux-2.6.27/drivers/net/pcmcia/pcnet_cs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pcmcia/pcnet_cs.c  2009-03-25 16:11:06.000000000 +0000
-@@ -1697,7 +1697,6 @@ static struct pcmcia_device_id pcnet_ids
+diff -r 9608d5473017 drivers/net/pcmcia/pcnet_cs.c
+--- a/drivers/net/pcmcia/pcnet_cs.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pcmcia/pcnet_cs.c    Wed May 06 16:56:25 2009 +0100
+@@ -1697,7 +1697,6 @@
        PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8),
        PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76),
        PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e),
@@ -243103,10 +243027,10 @@ diff -purN linux-2.6.27/drivers/net/pcmcia/pcnet_cs.c linux-2.6.27.19-5.1/driver
        PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f),
        PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1),
        PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
-diff -purN linux-2.6.27/drivers/net/phy/broadcom.c linux-2.6.27.19-5.1/drivers/net/phy/broadcom.c
---- linux-2.6.27/drivers/net/phy/broadcom.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/phy/broadcom.c     2009-03-25 16:11:07.000000000 +0000
-@@ -402,14 +402,29 @@ static struct phy_driver bcm5481_driver 
+diff -r 9608d5473017 drivers/net/phy/broadcom.c
+--- a/drivers/net/phy/broadcom.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/phy/broadcom.c       Wed May 06 16:56:25 2009 +0100
+@@ -402,14 +402,29 @@
  };
  
  static struct phy_driver bcm5482_driver = {
@@ -243138,7 +243062,7 @@ diff -purN linux-2.6.27/drivers/net/phy/broadcom.c linux-2.6.27.19-5.1/drivers/n
        .ack_interrupt  = bcm54xx_ack_interrupt,
        .config_intr    = bcm54xx_config_intr,
        .driver         = { .owner = THIS_MODULE },
-@@ -437,8 +452,13 @@ static int __init broadcom_init(void)
+@@ -437,8 +452,13 @@
        ret = phy_driver_register(&bcm5482_driver);
        if (ret)
                goto out_5482;
@@ -243152,10 +243076,10 @@ diff -purN linux-2.6.27/drivers/net/phy/broadcom.c linux-2.6.27.19-5.1/drivers/n
  out_5482:
        phy_driver_unregister(&bcm5481_driver);
  out_5481:
-diff -purN linux-2.6.27/drivers/net/phy/mdio-ofgpio.c linux-2.6.27.19-5.1/drivers/net/phy/mdio-ofgpio.c
---- linux-2.6.27/drivers/net/phy/mdio-ofgpio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/phy/mdio-ofgpio.c  2009-03-25 16:11:07.000000000 +0000
-@@ -185,6 +185,7 @@ static struct of_device_id mdio_ofgpio_m
+diff -r 9608d5473017 drivers/net/phy/mdio-ofgpio.c
+--- a/drivers/net/phy/mdio-ofgpio.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/phy/mdio-ofgpio.c    Wed May 06 16:56:26 2009 +0100
+@@ -185,6 +185,7 @@
  };
  
  static struct of_platform_driver mdio_ofgpio_driver = {
@@ -243163,10 +243087,10 @@ diff -purN linux-2.6.27/drivers/net/phy/mdio-ofgpio.c linux-2.6.27.19-5.1/driver
        .name = "mdio-gpio",
        .match_table = mdio_ofgpio_match,
        .probe = mdio_ofgpio_probe,
-diff -purN linux-2.6.27/drivers/net/pppol2tp.c linux-2.6.27.19-5.1/drivers/net/pppol2tp.c
---- linux-2.6.27/drivers/net/pppol2tp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/pppol2tp.c 2009-03-25 16:11:07.000000000 +0000
-@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socke
+diff -r 9608d5473017 drivers/net/pppol2tp.c
+--- a/drivers/net/pppol2tp.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/pppol2tp.c   Wed May 06 16:56:26 2009 +0100
+@@ -1353,6 +1353,7 @@
                        kfree_skb(skb);
                        sock_put(sk);
                }
@@ -243174,9 +243098,9 @@ diff -purN linux-2.6.27/drivers/net/pppol2tp.c linux-2.6.27.19-5.1/drivers/net/p
        }
  
        release_sock(sk);
-diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r6040.c
---- linux-2.6.27/drivers/net/r6040.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/r6040.c    2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/r6040.c
+--- a/drivers/net/r6040.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/r6040.c      Wed May 06 16:56:26 2009 +0100
 @@ -49,8 +49,8 @@
  #include <asm/processor.h>
  
@@ -243188,7 +243112,7 @@ diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r604
  
  /* PHY CHIP Address */
  #define PHY1_ADDR     1       /* For MAC1 */
-@@ -214,7 +214,7 @@ static int r6040_phy_read(void __iomem *
+@@ -214,7 +214,7 @@
        /* Wait for the read bit to be cleared */
        while (limit--) {
                cmd = ioread16(ioaddr + MMDIO);
@@ -243197,7 +243121,7 @@ diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r604
                        break;
        }
  
-@@ -233,7 +233,7 @@ static void r6040_phy_write(void __iomem
+@@ -233,7 +233,7 @@
        /* Wait for the write bit to be cleared */
        while (limit--) {
                cmd = ioread16(ioaddr + MMDIO);
@@ -243206,7 +243130,7 @@ diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r604
                        break;
        }
  }
-@@ -681,8 +681,10 @@ static irqreturn_t r6040_interrupt(int i
+@@ -681,8 +681,10 @@
        struct net_device *dev = dev_id;
        struct r6040_private *lp = netdev_priv(dev);
        void __iomem *ioaddr = lp->base;
@@ -243218,7 +243142,7 @@ diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r604
        /* Mask off RDC MAC interrupt */
        iowrite16(MSK_INT, ioaddr + MIER);
        /* Read MISR status and clear */
-@@ -702,7 +704,7 @@ static irqreturn_t r6040_interrupt(int i
+@@ -702,13 +704,16 @@
                        dev->stats.rx_fifo_errors++;
  
                /* Mask off RX interrupt */
@@ -243227,20 +243151,19 @@ diff -purN linux-2.6.27/drivers/net/r6040.c linux-2.6.27.19-5.1/drivers/net/r604
                netif_rx_schedule(dev, &lp->napi);
        }
  
-@@ -710,6 +712,9 @@ static irqreturn_t r6040_interrupt(int i
+       /* TX interrupt request */
        if (status & TX_INTS)
                r6040_tx(dev);
++
 +      /* Restore RDC MAC interrupt */
 +      iowrite16(misr, ioaddr + MIER);
-+
        return IRQ_HANDLED;
  }
-diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r8169.c
---- linux-2.6.27/drivers/net/r8169.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/r8169.c    2009-03-25 16:11:04.000000000 +0000
-@@ -61,6 +61,7 @@ static const int multicast_filter_limit 
+diff -r 9608d5473017 drivers/net/r8169.c
+--- a/drivers/net/r8169.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/r8169.c      Wed May 06 16:56:26 2009 +0100
+@@ -61,6 +61,7 @@
  /* MAC address length */
  #define MAC_ADDR_LEN  6
  
@@ -243248,7 +243171,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  #define RX_FIFO_THRESH        7       /* 7 means NO threshold, Rx buffer level before first PCI xfer. */
  #define RX_DMA_BURST  6       /* Maximum PCI burst, '6' is 1024 */
  #define TX_DMA_BURST  6       /* Maximum PCI burst, '6' is 1024 */
-@@ -95,6 +96,10 @@ enum mac_version {
+@@ -95,6 +96,10 @@
        RTL_GIGA_MAC_VER_04 = 0x04, // 8169SB
        RTL_GIGA_MAC_VER_05 = 0x05, // 8110SCd
        RTL_GIGA_MAC_VER_06 = 0x06, // 8110SCe
@@ -243259,7 +243182,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb
        RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be
        RTL_GIGA_MAC_VER_13 = 0x0d, // 8101Eb
-@@ -121,6 +126,10 @@ static const struct {
+@@ -121,6 +126,10 @@
        _R("RTL8169sb/8110sb",  RTL_GIGA_MAC_VER_04, 0xff7e1880), // 8169SB
        _R("RTL8169sc/8110sc",  RTL_GIGA_MAC_VER_05, 0xff7e1880), // 8110SCd
        _R("RTL8169sc/8110sc",  RTL_GIGA_MAC_VER_06, 0xff7e1880), // 8110SCe
@@ -243270,7 +243193,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        _R("RTL8168b/8111b",    RTL_GIGA_MAC_VER_11, 0xff7e1880), // PCI-E
        _R("RTL8168b/8111b",    RTL_GIGA_MAC_VER_12, 0xff7e1880), // PCI-E
        _R("RTL8101e",          RTL_GIGA_MAC_VER_13, 0xff7e1880), // PCI-E 8139
-@@ -196,9 +205,6 @@ enum rtl_registers {
+@@ -196,9 +205,6 @@
        Config5         = 0x56,
        MultiIntr       = 0x5c,
        PHYAR           = 0x60,
@@ -243280,10 +243203,12 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        PHYstatus       = 0x6c,
        RxMaxSize       = 0xda,
        CPlusCmd        = 0xe0,
-@@ -212,6 +218,32 @@ enum rtl_registers {
+@@ -210,6 +216,32 @@
+       FuncEventMask   = 0xf4,
+       FuncPresetState = 0xf8,
        FuncForceEvent  = 0xfc,
- };
++};
++
 +enum rtl8110_registers {
 +      TBICSR                  = 0x64,
 +      TBI_ANAR                = 0x68,
@@ -243308,12 +243233,10 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
 +      DBG_REG                 = 0xd1,
 +#define       FIX_NAK_1                       (1 << 4)
 +#define       FIX_NAK_2                       (1 << 3)
-+};
-+
+ };
  enum rtl_register_content {
-       /* InterruptStatusBits */
-       SYSErr          = 0x8000,
-@@ -265,7 +297,13 @@ enum rtl_register_content {
+@@ -265,7 +297,13 @@
        TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */
  
        /* Config1 register p.24 */
@@ -243327,7 +243250,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        PMEnable        = (1 << 0),     /* Power Management Enable */
  
        /* Config2 register p. 25 */
-@@ -275,6 +313,7 @@ enum rtl_register_content {
+@@ -275,6 +313,7 @@
        /* Config3 register p.25 */
        MagicPacket     = (1 << 5),     /* Wake up when receives a Magic Packet */
        LinkUp          = (1 << 4),     /* Wake up when the cable connection is re-established */
@@ -243335,7 +243258,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  
        /* Config5 register p.27 */
        BWF             = (1 << 6),     /* Accept Broadcast wakeup frame */
-@@ -292,7 +331,16 @@ enum rtl_register_content {
+@@ -292,7 +331,16 @@
        TBINwComplete   = 0x01000000,
  
        /* CPlusCmd p.31 */
@@ -243353,7 +243276,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        RxVlan          = (1 << 6),
        RxChkSum        = (1 << 5),
        PCIDAC          = (1 << 4),
-@@ -370,8 +418,9 @@ struct ring_info {
+@@ -370,8 +418,9 @@
  };
  
  enum features {
@@ -243365,7 +243288,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  };
  
  struct rtl8169_private {
-@@ -406,13 +455,16 @@ struct rtl8169_private {
+@@ -406,13 +455,16 @@
        struct vlan_group *vlgrp;
  #endif
        int (*set_speed)(struct net_device *, u8 autoneg, u16 speed, u8 duplex);
@@ -243383,10 +243306,13 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  };
  
  MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
-@@ -482,6 +534,94 @@ static int mdio_read(void __iomem *ioadd
-       return value;
- }
+@@ -479,6 +531,94 @@
+               }
+               udelay(25);
+       }
++      return value;
++}
++
 +static void mdio_patch(void __iomem *ioaddr, int reg_addr, int value)
 +{
 +      mdio_write(ioaddr, reg_addr, mdio_read(ioaddr, reg_addr) | value);
@@ -243472,13 +243398,10 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
 +              udelay(10);
 +      }
 +
-+      return value;
-+}
-+
- static void rtl8169_irq_mask_and_ack(void __iomem *ioaddr)
- {
-       RTL_W16(IntrMask, 0x0000);
-@@ -705,8 +845,12 @@ static int rtl8169_set_speed_xmii(struct
+       return value;
+ }
+@@ -705,8 +845,12 @@
                }
        }
  
@@ -243493,7 +243416,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
            (tp->mac_version == RTL_GIGA_MAC_VER_14) ||
            (tp->mac_version == RTL_GIGA_MAC_VER_15) ||
            (tp->mac_version == RTL_GIGA_MAC_VER_16)) {
-@@ -720,9 +864,13 @@ static int rtl8169_set_speed_xmii(struct
+@@ -720,9 +864,13 @@
  
        auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
  
@@ -243510,7 +243433,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
                mdio_write(ioaddr, 0x1f, 0x0000);
                mdio_write(ioaddr, 0x0e, 0x0000);
        }
-@@ -850,7 +998,7 @@ static int rtl8169_rx_vlan_skb(struct rt
+@@ -850,7 +998,7 @@
  
  #endif
  
@@ -243519,7 +243442,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  {
        struct rtl8169_private *tp = netdev_priv(dev);
        void __iomem *ioaddr = tp->mmio_addr;
-@@ -867,65 +1015,29 @@ static void rtl8169_gset_tbi(struct net_
+@@ -867,65 +1015,29 @@
  
        cmd->speed = SPEED_1000;
        cmd->duplex = DUPLEX_FULL; /* Always set */
@@ -243533,7 +243456,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        struct rtl8169_private *tp = netdev_priv(dev);
 -      void __iomem *ioaddr = tp->mmio_addr;
 -      u8 status;
--
 -      cmd->supported = SUPPORTED_10baseT_Half |
 -                       SUPPORTED_10baseT_Full |
 -                       SUPPORTED_100baseT_Half |
@@ -243569,7 +243492,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
 -              cmd->advertising |= ADVERTISED_Asym_Pause;
 -      if (status & RxFlowCtrl)
 -              cmd->advertising |= ADVERTISED_Pause;
+-
 -      cmd->duplex = ((status & _1000bpsF) || (status & FullDup)) ?
 -                    DUPLEX_FULL : DUPLEX_HALF;
 +      return mii_ethtool_gset(&tp->mii, cmd);
@@ -243592,7 +243515,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  }
  
  static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,
-@@ -1116,8 +1228,17 @@ static void rtl8169_get_mac_version(stru
+@@ -1116,8 +1228,17 @@
                { 0x7c800000, 0x30000000,       RTL_GIGA_MAC_VER_11 },
  
                /* 8101 family. */
@@ -243610,7 +243533,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
                { 0x7c800000, 0x34000000,       RTL_GIGA_MAC_VER_16 },
                /* FIXME: where did these entries come from ? -- FR */
                { 0xfc800000, 0x38800000,       RTL_GIGA_MAC_VER_15 },
-@@ -1279,6 +1400,22 @@ static void rtl8168cx_hw_phy_config(void
+@@ -1279,6 +1400,22 @@
        rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
  }
  
@@ -243633,19 +243556,19 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  static void rtl_hw_phy_config(struct net_device *dev)
  {
        struct rtl8169_private *tp = netdev_priv(dev);
-@@ -1296,6 +1433,11 @@ static void rtl_hw_phy_config(struct net
+@@ -1295,6 +1432,11 @@
+               break;
        case RTL_GIGA_MAC_VER_04:
                rtl8169sb_hw_phy_config(ioaddr);
-               break;
++              break;
 +      case RTL_GIGA_MAC_VER_07:
 +      case RTL_GIGA_MAC_VER_08:
 +      case RTL_GIGA_MAC_VER_09:
 +              rtl8102e_hw_phy_config(ioaddr);
-+              break;
+               break;
        case RTL_GIGA_MAC_VER_18:
                rtl8168cp_hw_phy_config(ioaddr);
-               break;
-@@ -1513,7 +1655,7 @@ static const struct rtl_cfg_info {
+@@ -1513,7 +1655,7 @@
        unsigned int align;
        u16 intr_event;
        u16 napi_event;
@@ -243654,7 +243577,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  } rtl_cfg_infos [] = {
        [RTL_CFG_0] = {
                .hw_start       = rtl_hw_start_8169,
-@@ -1522,7 +1664,7 @@ static const struct rtl_cfg_info {
+@@ -1522,7 +1664,7 @@
                .intr_event     = SYSErr | LinkChg | RxOverflow |
                                  RxFIFOOver | TxErr | TxOK | RxOK | RxErr,
                .napi_event     = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow,
@@ -243663,7 +243586,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        },
        [RTL_CFG_1] = {
                .hw_start       = rtl_hw_start_8168,
-@@ -1531,7 +1673,7 @@ static const struct rtl_cfg_info {
+@@ -1531,7 +1673,7 @@
                .intr_event     = SYSErr | LinkChg | RxOverflow |
                                  TxErr | TxOK | RxOK | RxErr,
                .napi_event     = TxErr | TxOK | RxOK | RxOverflow,
@@ -243672,7 +243595,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        },
        [RTL_CFG_2] = {
                .hw_start       = rtl_hw_start_8101,
-@@ -1540,7 +1682,7 @@ static const struct rtl_cfg_info {
+@@ -1540,7 +1682,7 @@
                .intr_event     = SYSErr | LinkChg | RxOverflow | PCSTimeout |
                                  RxFIFOOver | TxErr | TxOK | RxOK | RxErr,
                .napi_event     = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow,
@@ -243681,7 +243604,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        }
  };
  
-@@ -1552,7 +1694,7 @@ static unsigned rtl_try_msi(struct pci_d
+@@ -1552,7 +1694,7 @@
        u8 cfg2;
  
        cfg2 = RTL_R8(Config2) & ~MSIEnable;
@@ -243690,7 +243613,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
                if (pci_enable_msi(pdev)) {
                        dev_info(&pdev->dev, "no MSI. Back to INTx.\n");
                } else {
-@@ -1578,6 +1720,7 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1578,6 +1720,7 @@
        const struct rtl_cfg_info *cfg = rtl_cfg_infos + ent->driver_data;
        const unsigned int region = cfg->region;
        struct rtl8169_private *tp;
@@ -243698,10 +243621,11 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        struct net_device *dev;
        void __iomem *ioaddr;
        unsigned int i;
-@@ -1602,6 +1745,14 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1601,6 +1744,14 @@
+       tp->dev = dev;
        tp->pci_dev = pdev;
        tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);
++
 +      mii = &tp->mii;
 +      mii->dev = dev;
 +      mii->mdio_read = rtl_mdio_read;
@@ -243709,22 +243633,21 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
 +      mii->phy_id_mask = 0x1f;
 +      mii->reg_num_mask = 0x1f;
 +      mii->supports_gmii = !!(cfg->features & RTL_FEATURE_GMII);
-+
        /* enable device (incl. PCI PM wakeup and hotplug setup) */
        rc = pci_enable_device(pdev);
-       if (rc < 0) {
-@@ -1670,6 +1821,10 @@ rtl8169_init_one(struct pci_dev *pdev, c
+@@ -1669,6 +1820,10 @@
+               rc = -EIO;
                goto err_out_free_res_4;
        }
++
 +      tp->pcie_cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
 +      if (!tp->pcie_cap && netif_msg_probe(tp))
 +              dev_info(&pdev->dev, "no PCI Express capability\n");
-+
        /* Unneeded ? Don't mess with Mrs. Murphy. */
        rtl8169_irq_mask_and_ack(ioaddr);
-@@ -2061,12 +2216,51 @@ static void rtl_hw_start_8169(struct net
+@@ -2061,12 +2216,51 @@
        RTL_W16(IntrMask, tp->intr_event);
  }
  
@@ -243777,7 +243700,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  
        RTL_W8(Cfg9346, Cfg9346_Unlock);
  
-@@ -2080,10 +2274,7 @@ static void rtl_hw_start_8168(struct net
+@@ -2080,10 +2274,7 @@
  
        RTL_W16(CPlusCmd, tp->cp_cmd);
  
@@ -243789,7 +243712,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  
        RTL_W16(IntrMitigate, 0x5151);
  
-@@ -2099,8 +2290,6 @@ static void rtl_hw_start_8168(struct net
+@@ -2099,8 +2290,6 @@
  
        RTL_R8(IntrMask);
  
@@ -243798,10 +243721,12 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        rtl_set_rx_mode(dev);
  
        RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
-@@ -2110,6 +2299,70 @@ static void rtl_hw_start_8168(struct net
-       RTL_W16(IntrMask, tp->intr_event);
- }
+@@ -2108,6 +2297,70 @@
+       RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000);
  
+       RTL_W16(IntrMask, tp->intr_event);
++}
++
 +#define R810X_CPCMD_QUIRK_MASK (\
 +      EnableBist | \
 +      Mac_dbgo_oe | \
@@ -243864,12 +243789,10 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
 +      rtl_hw_start_8102e_2(ioaddr, pdev);
 +
 +      rtl_ephy_write(ioaddr, 0x03, 0xc2f9);
-+}
-+
+ }
  static void rtl_hw_start_8101(struct net_device *dev)
- {
-       struct rtl8169_private *tp = netdev_priv(dev);
-@@ -2118,8 +2371,26 @@ static void rtl_hw_start_8101(struct net
+@@ -2118,8 +2371,26 @@
  
        if ((tp->mac_version == RTL_GIGA_MAC_VER_13) ||
            (tp->mac_version == RTL_GIGA_MAC_VER_16)) {
@@ -243898,16 +243821,16 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
        }
  
        RTL_W8(Cfg9346, Cfg9346_Unlock);
-@@ -2143,8 +2414,6 @@ static void rtl_hw_start_8101(struct net
+@@ -2142,8 +2413,6 @@
+       RTL_W8(Cfg9346, Cfg9346_Lock);
  
        RTL_R8(IntrMask);
--      RTL_W32(RxMissed, 0);
 -
+-      RTL_W32(RxMissed, 0);
        rtl_set_rx_mode(dev);
  
-       RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
-@@ -2922,6 +3191,17 @@ static int rtl8169_poll(struct napi_stru
+@@ -2922,6 +3191,17 @@
        return work_done;
  }
  
@@ -243925,7 +243848,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  static void rtl8169_down(struct net_device *dev)
  {
        struct rtl8169_private *tp = netdev_priv(dev);
-@@ -2939,9 +3219,7 @@ core_down:
+@@ -2939,9 +3219,7 @@
  
        rtl8169_asic_down(ioaddr);
  
@@ -243936,7 +243859,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  
        spin_unlock_irq(&tp->lock);
  
-@@ -3063,8 +3341,7 @@ static struct net_device_stats *rtl8169_
+@@ -3063,8 +3341,7 @@
  
        if (netif_running(dev)) {
                spin_lock_irqsave(&tp->lock, flags);
@@ -243946,7 +243869,7 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
                spin_unlock_irqrestore(&tp->lock, flags);
        }
  
-@@ -3089,8 +3366,7 @@ static int rtl8169_suspend(struct pci_de
+@@ -3089,8 +3366,7 @@
  
        rtl8169_asic_down(ioaddr);
  
@@ -243956,10 +243879,10 @@ diff -purN linux-2.6.27/drivers/net/r8169.c linux-2.6.27.19-5.1/drivers/net/r816
  
        spin_unlock_irq(&tp->lock);
  
-diff -purN linux-2.6.27/drivers/net/sfc/Kconfig linux-2.6.27.19-5.1/drivers/net/sfc/Kconfig
---- linux-2.6.27/drivers/net/sfc/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/Kconfig        2009-03-25 16:11:05.000000000 +0000
-@@ -12,3 +12,13 @@ config SFC
+diff -r 9608d5473017 drivers/net/sfc/Kconfig
+--- a/drivers/net/sfc/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/Kconfig  Wed May 06 16:56:26 2009 +0100
+@@ -12,3 +12,13 @@
  
          To compile this driver as a module, choose M here.  The module
          will be called sfc.
@@ -243973,21 +243896,21 @@ diff -purN linux-2.6.27/drivers/net/sfc/Kconfig linux-2.6.27.19-5.1/drivers/net/
 +      tristate "Solarflare Solarstorm SFC4000 resource driver"
 +      help
 +        This module provides the SFC resource manager driver.
-diff -purN linux-2.6.27/drivers/net/sfc/Makefile linux-2.6.27.19-5.1/drivers/net/sfc/Makefile
---- linux-2.6.27/drivers/net/sfc/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/Makefile       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/Makefile
+--- a/drivers/net/sfc/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/Makefile Wed May 06 16:56:26 2009 +0100
 @@ -1,5 +1,7 @@
  sfc-y                 += efx.o falcon.o tx.o rx.o falcon_xmac.o \
                           selftest.o ethtool.o xfp_phy.o \
                           mdio_10g.o tenxpress.o boards.o sfe4001.o
--
 +sfc-$(CONFIG_SFC_DRIVERLINK) += driverlink.o
- obj-$(CONFIG_SFC)     += sfc.o
-+
++obj-$(CONFIG_SFC)     += sfc.o
+-obj-$(CONFIG_SFC)     += sfc.o
 +obj-$(CONFIG_SFC_RESOURCE) += sfc_resource/
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink.c linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.c   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink.c     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,366 @@
 +/****************************************************************************
 + * Driver for Solarflare Solarstorm network controllers and boards
@@ -244355,9 +244278,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/driverlink.c linux-2.6.27.19-5.1/drivers
 +
 +      mutex_unlock(&efx_driverlink_lock);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink.h linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,66 @@
 +/****************************************************************************
 + * Driver for Solarflare Solarstorm network controllers and boards
@@ -244425,9 +244348,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/driverlink.h linux-2.6.27.19-5.1/drivers
 +#endif /* CONFIG_SFC_DRIVERLINK */
 +
 +#endif /* EFX_DRIVERLINK_H */
-diff -purN linux-2.6.27/drivers/net/sfc/driverlink_api.h linux-2.6.27.19-5.1/drivers/net/sfc/driverlink_api.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/driverlink_api.h       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/driverlink_api.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/driverlink_api.h Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,303 @@
 +/****************************************************************************
 + * Driver for Solarflare Solarstorm network controllers and boards
@@ -244732,10 +244655,10 @@ diff -purN linux-2.6.27/drivers/net/sfc/driverlink_api.h linux-2.6.27.19-5.1/dri
 +              break;
 +
 +#endif /* EFX_DRIVERLINK_API_H */
-diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sfc/efx.c
---- linux-2.6.27/drivers/net/sfc/efx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/efx.c  2009-03-25 16:11:05.000000000 +0000
-@@ -1427,6 +1427,11 @@ static int efx_change_mtu(struct net_dev
+diff -r 9608d5473017 drivers/net/sfc/efx.c
+--- a/drivers/net/sfc/efx.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/efx.c    Wed May 06 16:56:26 2009 +0100
+@@ -1427,6 +1427,11 @@
  
        efx_stop_all(efx);
  
@@ -244747,7 +244670,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
        EFX_LOG(efx, "changing MTU to %d\n", new_mtu);
  
        efx_fini_channels(efx);
-@@ -1435,6 +1440,10 @@ static int efx_change_mtu(struct net_dev
+@@ -1435,6 +1440,10 @@
        if (rc)
                goto fail;
  
@@ -244758,7 +244681,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
        efx_start_all(efx);
        return rc;
  
-@@ -1587,6 +1596,25 @@ static void efx_unregister_netdev(struct
+@@ -1587,6 +1596,25 @@
   * Device reset and suspend
   *
   **************************************************************************/
@@ -244784,7 +244707,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
  
  /* The final hardware and software finalisation before reset. */
  static int efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd)
-@@ -1649,8 +1677,8 @@ static int efx_reset(struct efx_nic *efx
+@@ -1649,8 +1677,8 @@
        enum reset_type method = efx->reset_pending;
        int rc;
  
@@ -244794,7 +244717,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
  
        /* If we're not RUNNING then don't reset. Leave the reset_pending
         * flag set so that efx_pci_probe_main will be retried */
-@@ -1717,6 +1745,7 @@ static int efx_reset(struct efx_nic *efx
+@@ -1717,6 +1745,7 @@
        efx_start_all(efx);
  
   unlock_rtnl:
@@ -244802,7 +244725,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
        rtnl_unlock();
        return 0;
  
-@@ -1729,6 +1758,7 @@ static int efx_reset(struct efx_nic *efx
+@@ -1729,6 +1758,7 @@
        efx->state = STATE_DISABLED;
  
        mutex_unlock(&efx->mac_lock);
@@ -244810,7 +244733,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
        rtnl_unlock();
        efx_unregister_netdev(efx);
        efx_fini_port(efx);
-@@ -1871,6 +1901,11 @@ static int efx_init_struct(struct efx_ni
+@@ -1871,6 +1901,11 @@
        mutex_init(&efx->mac_lock);
        efx->phy_op = &efx_dummy_phy_operations;
        efx->mii.dev = net_dev;
@@ -244822,7 +244745,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
        INIT_WORK(&efx->reconfigure_work, efx_reconfigure_work);
        atomic_set(&efx->netif_stop_count, 1);
  
-@@ -1990,6 +2025,7 @@ static void efx_pci_remove(struct pci_de
+@@ -1990,6 +2025,7 @@
        efx = pci_get_drvdata(pci_dev);
        if (!efx)
                return;
@@ -244830,7 +244753,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
  
        /* Mark the NIC as fini, then stop the interface */
        rtnl_lock();
-@@ -2157,8 +2193,15 @@ static int __devinit efx_pci_probe(struc
+@@ -2157,8 +2193,15 @@
  
        EFX_LOG(efx, "initialisation successful\n");
  
@@ -244846,9 +244769,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/efx.c linux-2.6.27.19-5.1/drivers/net/sf
   fail5:
        efx_pci_remove_main(efx);
   fail4:
-diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net/sfc/falcon.c
---- linux-2.6.27/drivers/net/sfc/falcon.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/falcon.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/falcon.c
+--- a/drivers/net/sfc/falcon.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/falcon.c Wed May 06 16:56:26 2009 +0100
 @@ -37,11 +37,16 @@
  /**
   * struct falcon_nic_data - Falcon NIC state
@@ -244866,7 +244789,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
        struct pci_dev *pci_dev2;
        struct i2c_algo_bit_data i2c_data;
  };
-@@ -322,8 +327,13 @@ static int falcon_alloc_special_buffer(s
+@@ -322,8 +327,13 @@
        memset(buffer->addr, 0xff, len);
  
        /* Select new buffer ID */
@@ -244880,7 +244803,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
  
        EFX_LOG(efx, "allocating special buffers %d-%d at %llx+%x "
                "(virt %p phys %lx)\n", buffer->index,
-@@ -1115,10 +1125,12 @@ static void falcon_handle_driver_event(s
+@@ -1115,10 +1125,12 @@
        case TX_DESCQ_FLS_DONE_EV_DECODE:
                EFX_TRACE(efx, "channel %d TXQ %d flushed\n",
                          channel->channel, ev_sub_data);
@@ -244893,7 +244816,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
                break;
        case EVQ_INIT_DONE_EV_DECODE:
                EFX_LOG(efx, "channel %d EVQ %d initialised\n",
-@@ -1127,14 +1139,17 @@ static void falcon_handle_driver_event(s
+@@ -1127,14 +1139,17 @@
        case SRM_UPD_DONE_EV_DECODE:
                EFX_TRACE(efx, "channel %d SRAM update done\n",
                          channel->channel);
@@ -244911,7 +244834,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
                break;
        case RX_RECOVERY_EV_DECODE:
                EFX_ERR(efx, "channel %d seen DRIVER RX_RESET event. "
-@@ -1159,6 +1174,7 @@ static void falcon_handle_driver_event(s
+@@ -1159,6 +1174,7 @@
                EFX_TRACE(efx, "channel %d unknown driver event code %d "
                          "data %04x\n", channel->channel, ev_sub_code,
                          ev_sub_data);
@@ -244919,7 +244842,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
                break;
        }
  }
-@@ -2371,6 +2387,61 @@ static int falcon_probe_nvconfig(struct 
+@@ -2371,6 +2387,61 @@
        return rc;
  }
  
@@ -244981,7 +244904,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
  /* Probe the NIC variant (revision, ASIC vs FPGA, function count, port
   * count, port speed).  Set workaround and feature flags accordingly.
   */
-@@ -2403,10 +2474,12 @@ static int falcon_probe_nic_variant(stru
+@@ -2403,10 +2474,12 @@
                        EFX_ERR(efx, "1G mode not supported\n");
                        return -ENODEV;
                }
@@ -244994,7 +244917,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
                break;
  
        default:
-@@ -2472,6 +2545,10 @@ int falcon_probe_nic(struct efx_nic *efx
+@@ -2472,6 +2545,10 @@
        if (rc)
                goto fail5;
  
@@ -245005,7 +244928,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
        /* Initialise I2C adapter */
        efx->i2c_adap.owner = THIS_MODULE;
        nic_data->i2c_data = falcon_i2c_bit_operations;
-@@ -2481,10 +2558,14 @@ int falcon_probe_nic(struct efx_nic *efx
+@@ -2481,10 +2558,14 @@
        strlcpy(efx->i2c_adap.name, "SFC4000 GPIO", sizeof(efx->i2c_adap.name));
        rc = i2c_bit_add_bus(&efx->i2c_adap);
        if (rc)
@@ -245021,7 +244944,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
   fail5:
        falcon_free_buffer(efx, &efx->irq_status);
   fail4:
-@@ -2675,6 +2756,9 @@ void falcon_remove_nic(struct efx_nic *e
+@@ -2675,6 +2756,9 @@
        /* Tear down the private nic state */
        kfree(efx->nic_data);
        efx->nic_data = NULL;
@@ -245031,9 +244954,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/falcon.c linux-2.6.27.19-5.1/drivers/net
  }
  
  void falcon_update_nic_stats(struct efx_nic *efx)
-diff -purN linux-2.6.27/drivers/net/sfc/net_driver.h linux-2.6.27.19-5.1/drivers/net/sfc/net_driver.h
---- linux-2.6.27/drivers/net/sfc/net_driver.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/net_driver.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/net_driver.h
+--- a/drivers/net/sfc/net_driver.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/net_driver.h     Wed May 06 16:56:26 2009 +0100
 @@ -30,6 +30,7 @@
  
  #include "enum.h"
@@ -245042,7 +244965,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/net_driver.h linux-2.6.27.19-5.1/drivers
  
  #define EFX_MAX_LRO_DESCRIPTORS 8
  #define EFX_MAX_LRO_AGGR MAX_SKB_FRAGS
-@@ -676,6 +677,12 @@ union efx_multicast_hash {
+@@ -676,6 +677,12 @@
   * @loopback_mode: Loopback status
   * @loopback_modes: Supported loopback mode bitmask
   * @loopback_selftest: Offline self-test private state
@@ -245055,7 +244978,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/net_driver.h linux-2.6.27.19-5.1/drivers
   *
   * The @priv field of the corresponding &struct net_device points to
   * this.
-@@ -752,6 +759,15 @@ struct efx_nic {
+@@ -752,6 +759,15 @@
        unsigned int loopback_modes;
  
        void *loopback_selftest;
@@ -245071,10 +244994,10 @@ diff -purN linux-2.6.27/drivers/net/sfc/net_driver.h linux-2.6.27.19-5.1/drivers
  };
  
  static inline int efx_dev_registered(struct efx_nic *efx)
-diff -purN linux-2.6.27/drivers/net/sfc/rx.c linux-2.6.27.19-5.1/drivers/net/sfc/rx.c
---- linux-2.6.27/drivers/net/sfc/rx.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/rx.c   2009-03-25 16:11:05.000000000 +0000
-@@ -549,8 +549,22 @@ static inline void efx_rx_packet__check_
+diff -r 9608d5473017 drivers/net/sfc/rx.c
+--- a/drivers/net/sfc/rx.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/rx.c     Wed May 06 16:56:26 2009 +0100
+@@ -549,8 +549,22 @@
  static inline void efx_rx_packet_lro(struct efx_channel *channel,
                                     struct efx_rx_buffer *rx_buf)
  {
@@ -245097,7 +245020,7 @@ diff -purN linux-2.6.27/drivers/net/sfc/rx.c linux-2.6.27.19-5.1/drivers/net/sfc
  
        /* Pass the skb/page into the LRO engine */
        if (rx_buf->page) {
-@@ -686,6 +700,7 @@ void __efx_rx_packet(struct efx_channel 
+@@ -686,6 +700,7 @@
                     struct efx_rx_buffer *rx_buf, int checksummed)
  {
        struct efx_nic *efx = channel->efx;
@@ -245105,10 +245028,13 @@ diff -purN linux-2.6.27/drivers/net/sfc/rx.c linux-2.6.27.19-5.1/drivers/net/sfc
        struct sk_buff *skb;
        int lro = efx->net_dev->features & NETIF_F_LRO;
  
-@@ -723,6 +738,16 @@ void __efx_rx_packet(struct efx_channel 
-               goto done;
+@@ -720,6 +735,16 @@
        }
+       if (likely(checksummed && lro)) {
+               efx_rx_packet_lro(channel, rx_buf);
++              goto done;
++      }
++
 +      /* Allow callback to veto the packet */
 +      veto = EFX_DL_CALLBACK(efx, rx_packet, rx_buf->data, rx_buf->len);
 +      if (unlikely(veto)) {
@@ -245116,15 +245042,12 @@ diff -purN linux-2.6.27/drivers/net/sfc/rx.c linux-2.6.27.19-5.1/drivers/net/sfc
 +                         efx->dl_cb_dev.rx_packet->driver->name);
 +              /* Free the buffer now */
 +              efx_free_rx_buffer(efx, rx_buf);
-+              goto done;
-+      }
-+
-       /* Form an skb if required */
-       if (rx_buf->page) {
-               int hdr_len = min(rx_buf->len, EFX_SKB_HEADERS);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/Makefile linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/Makefile  2009-03-25 16:11:05.000000000 +0000
+               goto done;
+       }
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/Makefile    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,14 @@
 +obj-$(CONFIG_SFC_RESOURCE) := sfc_resource.o
 +
@@ -245140,9 +245063,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/Makefile linux-2.6.27.19-5.
 +      iobufset_resource.o resource_manager.o resources.o \
 +      vi_resource_alloc.o vi_resource_event.o vi_resource_flush.o \
 +      vi_resource_manager.o driver_object.o kernel_compat.o
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/assert_valid.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/assert_valid.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/assert_valid.c    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/assert_valid.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/assert_valid.c      Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,92 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -245236,9 +245159,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/assert_valid.c linux-2.6.27
 +EXPORT_SYMBOL(efrm_resource_assert_valid);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buddy.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buddy.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buddy.c   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/buddy.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/buddy.c     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,220 @@
 +
 +/****************************************************************************
@@ -245460,9 +245383,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buddy.c linux-2.6.27.19-5.1
 +                  ("buddy - free %x merged into order %d", addr, order););
 +      efrm_buddy_free_list_add(b, order, addr);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buffer_table.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buffer_table.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/buffer_table.c    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/buffer_table.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/buffer_table.c      Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,209 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -245673,17 +245596,16 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/buffer_table.c linux-2.6.27
 +      EFRM_FOR_EACH_NIC(nic_i, nic)
 +          efhw_nic_buffer_table_commit(nic);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h  2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,68 @@
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h   Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,188 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
 + *          resource management for Xen backend, OpenOnload, etc
 + *           (including support for SFE4001 10GBT NIC)
 + *
-+ * This file provides EtherFabric NIC hardware interface common
-+ * definitions.
++ * This file provides EtherFabric NIC hardware interface.
 + *
 + * Copyright 2005-2007: Solarflare Communications Inc,
 + *                      9501 Jeronimo Road, Suite 250,
@@ -245693,6 +245615,12 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/com
 + *                      <linux-xen-drivers@solarflare.com>
 + *                      <onload-dev@solarflare.com>
 + *
++ * Certain parts of the driver were implemented by
++ *          Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
++ *          OKTET Labs Ltd, Russia,
++ *          http://oktetlabs.ru, <info@oktetlabs.ru>
++ *          by request of Solarflare Communications
++ *
 + *
 + * This program is free software; you can redistribute it and/or modify it
 + * under the terms of the GNU General Public License version 2 as published
@@ -245709,52 +245637,665 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/com
 + ****************************************************************************
 + */
 +
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++#ifndef __CI_DRIVER_EFAB_HARDWARE_H__
++#define __CI_DRIVER_EFAB_HARDWARE_H__
++
++#include "ci/driver/efab/hardware/workarounds.h"
++#include <ci/efhw/hardware_sysdep.h>
++
 +
 +/*----------------------------------------------------------------------------
 + *
-+ * EtherFabric constants
++ * Common EtherFabric definitions
 + *
 + *---------------------------------------------------------------------------*/
 +
-+#define EFHW_1K               0x00000400u
-+#define EFHW_2K               0x00000800u
-+#define EFHW_4K               0x00001000u
-+#define EFHW_8K               0x00002000u
-+#define EFHW_16K      0x00004000u
-+#define EFHW_32K      0x00008000u
-+#define EFHW_64K      0x00010000u
-+#define EFHW_128K     0x00020000u
-+#define EFHW_256K     0x00040000u
-+#define EFHW_512K     0x00080000u
-+#define EFHW_1M               0x00100000u
-+#define EFHW_2M               0x00200000u
-+#define EFHW_4M               0x00400000u
-+#define EFHW_8M               0x00800000u
-+#define EFHW_16M      0x01000000u
-+#define EFHW_32M      0x02000000u
-+#define EFHW_48M      0x03000000u
-+#define EFHW_64M      0x04000000u
-+#define EFHW_128M     0x08000000u
-+#define EFHW_256M     0x10000000u
-+#define EFHW_512M     0x20000000u
-+#define EFHW_1G       0x40000000u
-+#define EFHW_2G               0x80000000u
-+#define EFHW_4G               0x100000000ULL
-+#define EFHW_8G               0x200000000ULL
++#include <ci/efhw/debug.h>
++#include <ci/efhw/common.h>
++#include <ci/driver/efab/hardware/common.h>
 +
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h      2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,1147 @@
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric varients
++ *
++ *---------------------------------------------------------------------------*/
++
++#include <ci/driver/efab/hardware/falcon.h>
++
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric Portable Hardware Layer defines
++ *
++ *---------------------------------------------------------------------------*/
++
++  /*-------------- Initialisation ------------ */
++#define efhw_nic_close_hardware(nic) \
++      ((nic)->efhw_func->close_hardware(nic))
++
++#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr, non_irq_evq) \
++      ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr), \
++                                       (non_irq_evq)))
++
++/*-------------- Interrupt support  ------------ */
++/** Handle interrupt.  Return 0 if not handled, 1 if handled. */
++#define efhw_nic_interrupt(nic) \
++      ((nic)->efhw_func->interrupt(nic))
++
++#define efhw_nic_interrupt_enable(nic) \
++      ((nic)->efhw_func->interrupt_enable(nic))
++
++#define efhw_nic_interrupt_disable(nic) \
++      ((nic)->efhw_func->interrupt_disable(nic))
++
++#define efhw_nic_set_interrupt_moderation(nic, evq, val)                 \
++      ((nic)->efhw_func->set_interrupt_moderation(nic, evq, val))
++
++/*-------------- Event support  ------------ */
++
++#define efhw_nic_event_queue_enable(nic, evq, size, q_base, buf_base,   \
++                                  interrupting)                       \
++      ((nic)->efhw_func->event_queue_enable((nic), (evq), (size), (q_base), \
++                                            (buf_base), (interrupting)))
++
++#define efhw_nic_event_queue_disable(nic, evq, timer_only) \
++      ((nic)->efhw_func->event_queue_disable(nic, evq, timer_only))
++
++#define efhw_nic_wakeup_request(nic, q_base, index, evq) \
++      ((nic)->efhw_func->wakeup_request(nic, q_base, index, evq))
++
++#define efhw_nic_sw_event(nic, data, ev) \
++      ((nic)->efhw_func->sw_event(nic, data, ev))
++
++/*-------------- Filter support  ------------ */
++#define efhw_nic_ipfilter_set(nic, type, index, dmaq,         \
++                            saddr, sport, daddr, dport)       \
++      ((nic)->efhw_func->ipfilter_set(nic, type, index, dmaq, \
++                                      saddr, sport, daddr, dport))
++
++#define efhw_nic_ipfilter_clear(nic, index) \
++      ((nic)->efhw_func->ipfilter_clear(nic, index))
++
++/*-------------- DMA support  ------------ */
++#define efhw_nic_dmaq_tx_q_init(nic, dmaq, evq, owner, tag,           \
++                              dmaq_size, index, flags)                \
++      ((nic)->efhw_func->dmaq_tx_q_init(nic, dmaq, evq, owner, tag,   \
++                                        dmaq_size, index, flags))
++
++#define efhw_nic_dmaq_rx_q_init(nic, dmaq, evq, owner, tag,           \
++                              dmaq_size, index, flags) \
++      ((nic)->efhw_func->dmaq_rx_q_init(nic, dmaq, evq, owner, tag,   \
++                                        dmaq_size, index, flags))
++
++#define efhw_nic_dmaq_tx_q_disable(nic, dmaq) \
++      ((nic)->efhw_func->dmaq_tx_q_disable(nic, dmaq))
++
++#define efhw_nic_dmaq_rx_q_disable(nic, dmaq) \
++      ((nic)->efhw_func->dmaq_rx_q_disable(nic, dmaq))
++
++#define efhw_nic_flush_tx_dma_channel(nic, dmaq) \
++      ((nic)->efhw_func->flush_tx_dma_channel(nic, dmaq))
++
++#define efhw_nic_flush_rx_dma_channel(nic, dmaq) \
++      ((nic)->efhw_func->flush_rx_dma_channel(nic, dmaq))
++
++/*-------------- MAC Low level interface ---- */
++#define efhw_gmac_get_mac_addr(nic) \
++      ((nic)->gmac->get_mac_addr((nic)->gmac))
++
++/*-------------- Buffer table -------------- */
++#define efhw_nic_buffer_table_set(nic, addr, bufsz, region,           \
++                                own_id, buf_id)                       \
++      ((nic)->efhw_func->buffer_table_set(nic, addr, bufsz, region,   \
++                                          own_id, buf_id))
++
++#define efhw_nic_buffer_table_set_n(nic, buf_id, addr, bufsz,         \
++                                  region, n_pages, own_id) \
++      ((nic)->efhw_func->buffer_table_set_n(nic, buf_id, addr, bufsz, \
++                                            region, n_pages, own_id))
++
++#define efhw_nic_buffer_table_clear(nic, id, num) \
++      ((nic)->efhw_func->buffer_table_clear(nic, id, num))
++
++#define efhw_nic_buffer_table_commit(nic) \
++      ((nic)->efhw_func->buffer_table_commit(nic))
++
++/*-------------- New filter API ------------ */
++#define efhw_nic_filter_set(nic, spec, index_out) \
++      ((nic)->efhw_func->filter_set(nic, spec, index_out))
++
++#define efhw_nic_filter_clear(nic, type, index_out) \
++      ((nic)->efhw_func->filter_clear(nic, type, index_out))
++
++
++/* --- DMA --- */
++#define EFHW_DMA_ADDRMASK             (0xffffffffffffffffULL)
++
++/* --- Buffers --- */
++#define EFHW_BUFFER_ADDR              FALCON_BUFFER_4K_ADDR
++#define EFHW_BUFFER_PAGE              FALCON_BUFFER_4K_PAGE
++#define EFHW_BUFFER_OFF                       FALCON_BUFFER_4K_OFF
++
++/* --- Filters --- */
++#define EFHW_IP_FILTER_NUM            FALCON_FILTER_TBL_NUM
++
++#define EFHW_MAX_PAGE_SIZE            FALCON_MAX_PAGE_SIZE
++
++#if PAGE_SIZE <= EFHW_MAX_PAGE_SIZE
++#define EFHW_NIC_PAGE_SIZE PAGE_SIZE
++#else
++#define EFHW_NIC_PAGE_SIZE EFHW_MAX_PAGE_SIZE
++#endif
++#define EFHW_NIC_PAGE_MASK (~(EFHW_NIC_PAGE_SIZE-1))
++
++#endif /* __CI_DRIVER_EFAB_HARDWARE_H__ */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/common.h    Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,68 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
 + *          resource management for Xen backend, OpenOnload, etc
 + *           (including support for SFE4001 10GBT NIC)
 + *
-+ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) core register
++ * This file provides EtherFabric NIC hardware interface common
++ * definitions.
++ *
++ * Copyright 2005-2007: Solarflare Communications Inc,
++ *                      9501 Jeronimo Road, Suite 250,
++ *                      Irvine, CA 92618, USA
++ *
++ * Developed and maintained by Solarflare Communications:
++ *                      <linux-xen-drivers@solarflare.com>
++ *                      <onload-dev@solarflare.com>
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ ****************************************************************************
++ */
++
++#ifndef __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++#define __CI_DRIVER_EFAB_HARDWARE_COMMON_H__
++
++/*----------------------------------------------------------------------------
++ *
++ * EtherFabric constants
++ *
++ *---------------------------------------------------------------------------*/
++
++#define EFHW_1K               0x00000400u
++#define EFHW_2K               0x00000800u
++#define EFHW_4K               0x00001000u
++#define EFHW_8K               0x00002000u
++#define EFHW_16K      0x00004000u
++#define EFHW_32K      0x00008000u
++#define EFHW_64K      0x00010000u
++#define EFHW_128K     0x00020000u
++#define EFHW_256K     0x00040000u
++#define EFHW_512K     0x00080000u
++#define EFHW_1M               0x00100000u
++#define EFHW_2M               0x00200000u
++#define EFHW_4M               0x00400000u
++#define EFHW_8M               0x00800000u
++#define EFHW_16M      0x01000000u
++#define EFHW_32M      0x02000000u
++#define EFHW_48M      0x03000000u
++#define EFHW_64M      0x04000000u
++#define EFHW_128M     0x08000000u
++#define EFHW_256M     0x10000000u
++#define EFHW_512M     0x20000000u
++#define EFHW_1G       0x40000000u
++#define EFHW_2G               0x80000000u
++#define EFHW_4G               0x100000000ULL
++#define EFHW_8G               0x200000000ULL
++
++#endif /* __CI_DRIVER_EFAB_HARDWARE_COMMON_H__ */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h    Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,422 @@
++/****************************************************************************
++ * Driver for Solarflare network controllers -
++ *          resource management for Xen backend, OpenOnload, etc
++ *           (including support for SFE4001 10GBT NIC)
++ *
++ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) specific
++ * definitions.
++ *
++ * Copyright 2005-2007: Solarflare Communications Inc,
++ *                      9501 Jeronimo Road, Suite 250,
++ *                      Irvine, CA 92618, USA
++ *
++ * Developed and maintained by Solarflare Communications:
++ *                      <linux-xen-drivers@solarflare.com>
++ *                      <onload-dev@solarflare.com>
++ *
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ ****************************************************************************
++ */
++
++#ifndef __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
++#define __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
++
++/*----------------------------------------------------------------------------
++ * Compile options
++ *---------------------------------------------------------------------------*/
++
++/* Falcon has an 8K maximum page size. */
++#define FALCON_MAX_PAGE_SIZE EFHW_8K
++
++/* include the register definitions */
++#include <ci/driver/efab/hardware/falcon/falcon_core.h>
++#include <ci/driver/efab/hardware/falcon/falcon_desc.h>
++#include <ci/driver/efab/hardware/falcon/falcon_event.h>
++#include <ci/driver/efab/hardware/falcon/falcon_intr_vec.h>
++
++#define FALCON_DMA_TX_DESC_BYTES      8
++#define FALCON_DMA_RX_PHYS_DESC_BYTES 8
++#define FALCON_DMA_RX_BUF_DESC_BYTES  4
++
++
++/* ---- efhw_event_t helpers --- */
++
++#ifndef EFHW_IS_LITTLE_ENDIAN
++#error This needs lots of cpu_to_le64s() in
++#endif
++
++/*!\ TODO look at whether there is an efficiency gain to be had by
++  treating the event codes to 32bit masks as is done for EF1
++
++  These masks apply to the full 64 bits of the event to extract the
++  event code - followed by the common event codes to expect
++ */
++#define __FALCON_OPEN_MASK(WIDTH)  ((((uint64_t)1) << (WIDTH)) - 1)
++#define FALCON_EVENT_CODE_MASK \
++      (__FALCON_OPEN_MASK(EV_CODE_WIDTH) << EV_CODE_LBN)
++#define FALCON_EVENT_EV_Q_ID_MASK \
++      (__FALCON_OPEN_MASK(DRIVER_EV_EVQ_ID_WIDTH) << DRIVER_EV_EVQ_ID_LBN)
++#define FALCON_EVENT_TX_FLUSH_Q_ID_MASK \
++      (__FALCON_OPEN_MASK(DRIVER_EV_TX_DESCQ_ID_WIDTH) << \
++       DRIVER_EV_TX_DESCQ_ID_LBN)
++#define FALCON_EVENT_RX_FLUSH_Q_ID_MASK \
++      (__FALCON_OPEN_MASK(DRIVER_EV_RX_DESCQ_ID_WIDTH) << \
++       DRIVER_EV_RX_DESCQ_ID_LBN)
++#define FALCON_EVENT_DRV_SUBCODE_MASK \
++      (__FALCON_OPEN_MASK(DRIVER_EV_SUB_CODE_WIDTH) << \
++       DRIVER_EV_SUB_CODE_LBN)
++
++#define FALCON_EVENT_FMT         "[ev:%x:%08x:%08x]"
++#define FALCON_EVENT_PRI_ARG(e) \
++      ((unsigned)(((e).u64 & FALCON_EVENT_CODE_MASK) >> EV_CODE_LBN)), \
++      ((unsigned)((e).u64 >> 32)), ((unsigned)((e).u64 & 0xFFFFFFFF))
++
++#define FALCON_EVENT_CODE(evp)                ((evp)->u64 & FALCON_EVENT_CODE_MASK)
++#define FALCON_EVENT_WAKE_EVQ_ID(evp) \
++      (((evp)->u64 & FALCON_EVENT_EV_Q_ID_MASK) >> DRIVER_EV_EVQ_ID_LBN)
++#define FALCON_EVENT_TX_FLUSH_Q_ID(evp) \
++      (((evp)->u64 & FALCON_EVENT_TX_FLUSH_Q_ID_MASK) >> \
++       DRIVER_EV_TX_DESCQ_ID_LBN)
++#define FALCON_EVENT_RX_FLUSH_Q_ID(evp) \
++      (((evp)->u64 & FALCON_EVENT_RX_FLUSH_Q_ID_MASK) >> \
++       DRIVER_EV_RX_DESCQ_ID_LBN)
++#define FALCON_EVENT_DRIVER_SUBCODE(evp) \
++      (((evp)->u64 & FALCON_EVENT_DRV_SUBCODE_MASK) >> \
++       DRIVER_EV_SUB_CODE_LBN)
++
++#define FALCON_EVENT_CODE_CHAR        ((uint64_t)DRIVER_EV_DECODE << EV_CODE_LBN)
++#define FALCON_EVENT_CODE_SW  ((uint64_t)DRV_GEN_EV_DECODE << EV_CODE_LBN)
++
++
++/* so this is the size in bytes of an awful lot of things */
++#define FALCON_REGISTER128          (16)
++
++/* we define some unique dummy values as a debug aid */
++#ifdef _WIN32
++#define FALCON_ATOMIC_BASE            0xdeadbeef00000000ui64
++#else
++#define FALCON_ATOMIC_BASE            0xdeadbeef00000000ULL
++#endif
++#define FALCON_ATOMIC_UPD_REG         (FALCON_ATOMIC_BASE | 0x1)
++#define FALCON_ATOMIC_PTR_TBL_REG     (FALCON_ATOMIC_BASE | 0x2)
++#define FALCON_ATOMIC_SRPM_UDP_EVQ_REG        (FALCON_ATOMIC_BASE | 0x3)
++#define FALCON_ATOMIC_RX_FLUSH_DESCQ  (FALCON_ATOMIC_BASE | 0x4)
++#define FALCON_ATOMIC_TX_FLUSH_DESCQ  (FALCON_ATOMIC_BASE | 0x5)
++#define FALCON_ATOMIC_INT_EN_REG      (FALCON_ATOMIC_BASE | 0x6)
++#define FALCON_ATOMIC_TIMER_CMD_REG   (FALCON_ATOMIC_BASE | 0x7)
++#define FALCON_ATOMIC_PACE_REG                (FALCON_ATOMIC_BASE | 0x8)
++#define FALCON_ATOMIC_INT_ACK_REG     (FALCON_ATOMIC_BASE | 0x9)
++/* XXX It crashed with odd value in FALCON_ATOMIC_INT_ADR_REG */
++#define FALCON_ATOMIC_INT_ADR_REG     (FALCON_ATOMIC_BASE | 0xa)
++
++/*----------------------------------------------------------------------------
++ *
++ * PCI control blocks for Falcon -
++ *          (P) primary is for NET
++ *          (S) secondary is for CHAR
++ *
++ *---------------------------------------------------------------------------*/
++
++#define FALCON_P_CTR_AP_BAR   2
++#define FALCON_S_CTR_AP_BAR   0
++#define FALCON_S_DEVID                0x6703
++
++
++/*----------------------------------------------------------------------------
++ *
++ * Falcon constants
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Note: the following constants have moved to values in struct efhw_nic:
++ *   FALCON_EVQ_TBL_NUM  ->  nic->num_evqs
++ *   FALCON_DMAQ_NUM     ->  nic->num_dmaqs
++ *   FALCON_TIMERS_NUM   ->  nic->num_times
++ * These replacement constants are used as sanity checks in assertions in
++ * certain functions that don't have access to struct efhw_nic.
++ */
++#define FALCON_DMAQ_NUM_SANITY          (EFHW_4K)
++#define FALCON_EVQ_TBL_NUM_SANITY       (EFHW_4K)
++#define FALCON_TIMERS_NUM_SANITY        (EFHW_4K)
++
++/* This value is an upper limit on the total number of filter table
++ * entries.  The actual size of filter table is determined at runtime, as
++ * it can vary.
++ */
++#define FALCON_FILTER_TBL_NUM         (EFHW_8K)
++
++/* max number of buffers which can be pushed before commiting */
++#define FALCON_BUFFER_UPD_MAX         (128)
++
++/* We can tell falcon to write its RX buffers in 32 byte quantums,
++   and since we pad packets 2 bytes to the right we can't use
++   a full page (not unless we use jumbo mode for all queues)
++
++   NOTE: tests/nic/dma.c assumes that the value here is the real NIC
++   value, so we explicitly round it down to the nearest 32 bytes */
++
++/* #define FALCON_RX_USR_BUF_SIZE    round_down(4096-2,32) */
++#define FALCON_RX_USR_BUF_SIZE                4064
++
++#define FALCON_EVQ_RPTR_REG_P0                0x400
++
++/*----------------------------------------------------------------------------
++ *
++ * Falcon requires user-space descriptor pushes to be:
++ *    dword[0-2]; wiob(); dword[3]
++ *
++ * Driver register access must be locked against other threads from
++ * the same driver but can be in any order: i.e dword[0-3]; wiob()
++ *
++ * The following helpers ensure that valid dword orderings are exercised
++ *
++ *---------------------------------------------------------------------------*/
++
++/* A union to allow writting 64bit values as 32bit values, without
++ * hitting the compilers aliasing rules. We hope the compiler optimises
++ * away the copy's anyway */
++union __u64to32 {
++      uint64_t u64;
++      struct {
++#ifdef EFHW_IS_LITTLE_ENDIAN
++              uint32_t a;
++              uint32_t b;
++#else
++              uint32_t b;
++              uint32_t a;
++#endif
++      } s;
++};
++
++static inline void
++falcon_write_ddd_d(volatile char __iomem *kva,
++                 uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3)
++{
++      writel(d0, kva + 0);
++      writel(d1, kva + 4);
++      writel(d2, kva + 8);
++      mmiowb();
++      writel(d3, kva + 12);
++}
++
++static inline void falcon_write_q(volatile char __iomem *kva, uint64_t q)
++{
++      union __u64to32 u;
++      u.u64 = q;
++
++      writel(u.s.a, kva);
++      mmiowb();
++      writel(u.s.b, kva + 4);
++}
++
++static inline void falcon_read_q(volatile char __iomem *addr, uint64_t *q0)
++{
++      /* It is essential that we read dword0 first, so that
++       * the shadow register is updated with the latest value
++       * and we get a self consistent value.
++       */
++      union __u64to32 u;
++      u.s.a = readl(addr);
++      rmb();
++      u.s.b = readl(addr + 4);
++
++      *q0 = u.u64;
++}
++
++static inline void
++falcon_write_qq(volatile char __iomem *kva, uint64_t q0, uint64_t q1)
++{
++      writeq(q0, kva + 0);
++      falcon_write_q(kva + 8, q1);
++}
++
++static inline void
++falcon_read_qq(volatile char __iomem *addr, uint64_t *q0, uint64_t *q1)
++{
++      falcon_read_q(addr, q0);
++      *q1 = readq(addr + 8);
++}
++
++
++
++/*----------------------------------------------------------------------------
++ *
++ * Buffer virtual addresses (4K buffers)
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Form a buffer virtual address from buffer ID and offset.  If the offset
++** is larger than the buffer size, then the buffer indexed will be
++** calculated appropriately.  It is the responsibility of the caller to
++** ensure that they have valid buffers programmed at that address.
++*/
++#define FALCON_VADDR_8K_S     (13)
++#define FALCON_VADDR_4K_S     (12)
++#define FALCON_VADDR_M                0xfffff /* post shift mask  */
++
++#define FALCON_BUFFER_8K_ADDR(id, off)        (((id) << FALCON_VADDR_8K_S) + (off))
++#define FALCON_BUFFER_8K_PAGE(vaddr) \
++      (((vaddr) >> FALCON_VADDR_8K_S) & FALCON_VADDR_M)
++#define FALCON_BUFFER_8K_OFF(vaddr) \
++      ((vaddr) & __FALCON_MASK32(FALCON_VADDR_8K_S))
++
++#define FALCON_BUFFER_4K_ADDR(id, off)        (((id) << FALCON_VADDR_4K_S) + (off))
++#define FALCON_BUFFER_4K_PAGE(vaddr) \
++      (((vaddr) >> FALCON_VADDR_4K_S) & FALCON_VADDR_M)
++#define FALCON_BUFFER_4K_OFF(vaddr) \
++      ((vaddr) & __FALCON_MASK32(FALCON_VADDR_4K_S))
++
++/*----------------------------------------------------------------------------
++ *
++ * Timer helpers
++ *
++ *---------------------------------------------------------------------------*/
++
++static inline int falcon_timer_page_addr(uint idx)
++{
++
++      EFHW_ASSERT(TIMER_CMD_REG_KER_OFST ==
++                  (TIMER_CMD_REG_PAGE4_OFST - 4 * EFHW_8K));
++
++      EFHW_ASSERT(idx < FALCON_TIMERS_NUM_SANITY);
++
++      if (idx < 4)
++              return TIMER_CMD_REG_KER_OFST + (idx * EFHW_8K);
++      else if (idx < 1024)
++              return TIMER_CMD_REG_PAGE4_OFST + ((idx - 4) * EFHW_8K);
++      else
++              return TIMER_CMD_REG_PAGE123K_OFST + ((idx - 1024) * EFHW_8K);
++}
++
++#define FALCON_TIMER_PAGE_MASK                (EFHW_8K-1)
++
++static inline int falcon_timer_page_offset(uint idx)
++{
++      return falcon_timer_page_addr(idx) & FALCON_TIMER_PAGE_MASK;
++}
++
++/*----------------------------------------------------------------------------
++ *
++ * DMA Queue helpers
++ *
++ *---------------------------------------------------------------------------*/
++
++/* iSCSI queue for A1; see bug 5427 for more details. */
++#define FALCON_A1_ISCSI_DMAQ 4
++
++/*! returns an address within a bar of the TX DMA doorbell */
++static inline uint falcon_tx_dma_page_addr(uint dmaq_idx)
++{
++      uint page;
++
++      EFHW_ASSERT((((TX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
++                   (((TX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1)))));
++
++      EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
++
++      if (dmaq_idx < 1024)
++              page = TX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
++      else
++              page =
++                  TX_DESC_UPD_REG_PAGE123K_OFST +
++                  ((dmaq_idx - 1024) * EFHW_8K);
++
++      return page;
++}
++
++/*! returns an address within a bar of the RX DMA doorbell */
++static inline uint falcon_rx_dma_page_addr(uint dmaq_idx)
++{
++      uint page;
++
++      EFHW_ASSERT((((RX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
++                   ((RX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1))));
++
++      EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
++
++      if (dmaq_idx < 1024)
++              page = RX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
++      else
++              page =
++                  RX_DESC_UPD_REG_PAGE123K_OFST +
++                  ((dmaq_idx - 1024) * EFHW_8K);
++
++      return page;
++}
++
++/*! "page"=NIC-dependent register set size */
++#define FALCON_DMA_PAGE_MASK  (EFHW_8K-1)
++
++/*! returns an address within a bar of the start of the "page"
++    containing the TX DMA doorbell */
++static inline int falcon_tx_dma_page_base(uint dma_idx)
++{
++      return falcon_tx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an address within a bar of the start of the "page"
++    containing the RX DMA doorbell */
++static inline int falcon_rx_dma_page_base(uint dma_idx)
++{
++      return falcon_rx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an offset within a "page" of the TX DMA doorbell */
++static inline int falcon_tx_dma_page_offset(uint dma_idx)
++{
++      return falcon_tx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
++}
++
++/*! returns an offset within a "page" of the RX DMA doorbell */
++static inline int falcon_rx_dma_page_offset(uint dma_idx)
++{
++      return falcon_rx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
++}
++
++/*----------------------------------------------------------------------------
++ *
++ * Events
++ *
++ *---------------------------------------------------------------------------*/
++
++/* Falcon nails down the event queue mappings */
++#define FALCON_EVQ_KERNEL0   (0)      /* hardwired for net driver */
++#define FALCON_EVQ_CHAR      (4)      /* char driver's event queue      */
++
++/* reserved by the drivers */
++#define FALCON_EVQ_TBL_RESERVED          (8)
++
++/* default DMA-Q sizes */
++#define FALCON_DMA_Q_DEFAULT_TX_SIZE  512
++
++#define FALCON_DMA_Q_DEFAULT_RX_SIZE  512
++
++#define FALCON_DMA_Q_DEFAULT_MMAP \
++      (FALCON_DMA_Q_DEFAULT_TX_SIZE * (FALCON_DMA_TX_DESC_BYTES * 2))
++
++/*----------------------------------------------------------------------------
++ *
++ * DEBUG - Analyser trigger
++ *
++ *---------------------------------------------------------------------------*/
++
++static inline void
++falcon_deadbeef(volatile char __iomem *efhw_kva, unsigned what)
++{
++      writel(what, efhw_kva + 0x300);
++      mmiowb();
++}
++#endif /* __CI_DRIVER_EFAB_HARDWARE_FALCON_H__ */
++/*! \cidoxg_end */
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_core.h        Wed May 06 16:56:26 2009 +0100
+@@ -0,0 +1,1147 @@
++/****************************************************************************
++ * Driver for Solarflare network controllers -
++ *          resource management for Xen backend, OpenOnload, etc
++ *           (including support for SFE4001 10GBT NIC)
++ *
++ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) core register
 + * definitions.
 + *
 + * Copyright 2005-2007: Solarflare Communications Inc,
@@ -246896,9 +247437,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/fal
 +#define EE_VPD_SW_DATA_REG_OFST 0x160 /* VPD access SW data register */
 +  #define EE_VPD_CYC_DAT_LBN 0
 +  #define EE_VPD_CYC_DAT_WIDTH 32
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h      2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_desc.h        Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,75 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -246975,9 +247516,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/fal
 +  #define TX_USR_BUF_ID_WIDTH 20
 +  #define TX_USR_BYTE_OFS_LBN 0
 +  #define TX_USR_BYTE_OFS_WIDTH 13
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_event.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,155 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -247134,9 +247675,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/fal
 +  #define DRV_GEN_EV_CODE_WIDTH 4
 +  #define DRV_GEN_EV_DATA_LBN 0
 +  #define DRV_GEN_EV_DATA_WIDTH 60
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon/falcon_intr_vec.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,44 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -247182,435 +247723,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/fal
 +#define DW2_OFST 0x8 /* Double-word 2: Fatal interrupts */
 +  #define FATAL_INT_LBN 0
 +  #define FATAL_INT_WIDTH 1
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/falcon.h  2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,422 @@
-+/****************************************************************************
-+ * Driver for Solarflare network controllers -
-+ *          resource management for Xen backend, OpenOnload, etc
-+ *           (including support for SFE4001 10GBT NIC)
-+ *
-+ * This file provides EtherFabric NIC - EFXXXX (aka Falcon) specific
-+ * definitions.
-+ *
-+ * Copyright 2005-2007: Solarflare Communications Inc,
-+ *                      9501 Jeronimo Road, Suite 250,
-+ *                      Irvine, CA 92618, USA
-+ *
-+ * Developed and maintained by Solarflare Communications:
-+ *                      <linux-xen-drivers@solarflare.com>
-+ *                      <onload-dev@solarflare.com>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-+ ****************************************************************************
-+ */
-+
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_FALCON_H__
-+
-+/*----------------------------------------------------------------------------
-+ * Compile options
-+ *---------------------------------------------------------------------------*/
-+
-+/* Falcon has an 8K maximum page size. */
-+#define FALCON_MAX_PAGE_SIZE EFHW_8K
-+
-+/* include the register definitions */
-+#include <ci/driver/efab/hardware/falcon/falcon_core.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_desc.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_event.h>
-+#include <ci/driver/efab/hardware/falcon/falcon_intr_vec.h>
-+
-+#define FALCON_DMA_TX_DESC_BYTES      8
-+#define FALCON_DMA_RX_PHYS_DESC_BYTES 8
-+#define FALCON_DMA_RX_BUF_DESC_BYTES  4
-+
-+
-+/* ---- efhw_event_t helpers --- */
-+
-+#ifndef EFHW_IS_LITTLE_ENDIAN
-+#error This needs lots of cpu_to_le64s() in
-+#endif
-+
-+/*!\ TODO look at whether there is an efficiency gain to be had by
-+  treating the event codes to 32bit masks as is done for EF1
-+
-+  These masks apply to the full 64 bits of the event to extract the
-+  event code - followed by the common event codes to expect
-+ */
-+#define __FALCON_OPEN_MASK(WIDTH)  ((((uint64_t)1) << (WIDTH)) - 1)
-+#define FALCON_EVENT_CODE_MASK \
-+      (__FALCON_OPEN_MASK(EV_CODE_WIDTH) << EV_CODE_LBN)
-+#define FALCON_EVENT_EV_Q_ID_MASK \
-+      (__FALCON_OPEN_MASK(DRIVER_EV_EVQ_ID_WIDTH) << DRIVER_EV_EVQ_ID_LBN)
-+#define FALCON_EVENT_TX_FLUSH_Q_ID_MASK \
-+      (__FALCON_OPEN_MASK(DRIVER_EV_TX_DESCQ_ID_WIDTH) << \
-+       DRIVER_EV_TX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_RX_FLUSH_Q_ID_MASK \
-+      (__FALCON_OPEN_MASK(DRIVER_EV_RX_DESCQ_ID_WIDTH) << \
-+       DRIVER_EV_RX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_DRV_SUBCODE_MASK \
-+      (__FALCON_OPEN_MASK(DRIVER_EV_SUB_CODE_WIDTH) << \
-+       DRIVER_EV_SUB_CODE_LBN)
-+
-+#define FALCON_EVENT_FMT         "[ev:%x:%08x:%08x]"
-+#define FALCON_EVENT_PRI_ARG(e) \
-+      ((unsigned)(((e).u64 & FALCON_EVENT_CODE_MASK) >> EV_CODE_LBN)), \
-+      ((unsigned)((e).u64 >> 32)), ((unsigned)((e).u64 & 0xFFFFFFFF))
-+
-+#define FALCON_EVENT_CODE(evp)                ((evp)->u64 & FALCON_EVENT_CODE_MASK)
-+#define FALCON_EVENT_WAKE_EVQ_ID(evp) \
-+      (((evp)->u64 & FALCON_EVENT_EV_Q_ID_MASK) >> DRIVER_EV_EVQ_ID_LBN)
-+#define FALCON_EVENT_TX_FLUSH_Q_ID(evp) \
-+      (((evp)->u64 & FALCON_EVENT_TX_FLUSH_Q_ID_MASK) >> \
-+       DRIVER_EV_TX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_RX_FLUSH_Q_ID(evp) \
-+      (((evp)->u64 & FALCON_EVENT_RX_FLUSH_Q_ID_MASK) >> \
-+       DRIVER_EV_RX_DESCQ_ID_LBN)
-+#define FALCON_EVENT_DRIVER_SUBCODE(evp) \
-+      (((evp)->u64 & FALCON_EVENT_DRV_SUBCODE_MASK) >> \
-+       DRIVER_EV_SUB_CODE_LBN)
-+
-+#define FALCON_EVENT_CODE_CHAR        ((uint64_t)DRIVER_EV_DECODE << EV_CODE_LBN)
-+#define FALCON_EVENT_CODE_SW  ((uint64_t)DRV_GEN_EV_DECODE << EV_CODE_LBN)
-+
-+
-+/* so this is the size in bytes of an awful lot of things */
-+#define FALCON_REGISTER128          (16)
-+
-+/* we define some unique dummy values as a debug aid */
-+#ifdef _WIN32
-+#define FALCON_ATOMIC_BASE            0xdeadbeef00000000ui64
-+#else
-+#define FALCON_ATOMIC_BASE            0xdeadbeef00000000ULL
-+#endif
-+#define FALCON_ATOMIC_UPD_REG         (FALCON_ATOMIC_BASE | 0x1)
-+#define FALCON_ATOMIC_PTR_TBL_REG     (FALCON_ATOMIC_BASE | 0x2)
-+#define FALCON_ATOMIC_SRPM_UDP_EVQ_REG        (FALCON_ATOMIC_BASE | 0x3)
-+#define FALCON_ATOMIC_RX_FLUSH_DESCQ  (FALCON_ATOMIC_BASE | 0x4)
-+#define FALCON_ATOMIC_TX_FLUSH_DESCQ  (FALCON_ATOMIC_BASE | 0x5)
-+#define FALCON_ATOMIC_INT_EN_REG      (FALCON_ATOMIC_BASE | 0x6)
-+#define FALCON_ATOMIC_TIMER_CMD_REG   (FALCON_ATOMIC_BASE | 0x7)
-+#define FALCON_ATOMIC_PACE_REG                (FALCON_ATOMIC_BASE | 0x8)
-+#define FALCON_ATOMIC_INT_ACK_REG     (FALCON_ATOMIC_BASE | 0x9)
-+/* XXX It crashed with odd value in FALCON_ATOMIC_INT_ADR_REG */
-+#define FALCON_ATOMIC_INT_ADR_REG     (FALCON_ATOMIC_BASE | 0xa)
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * PCI control blocks for Falcon -
-+ *          (P) primary is for NET
-+ *          (S) secondary is for CHAR
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#define FALCON_P_CTR_AP_BAR   2
-+#define FALCON_S_CTR_AP_BAR   0
-+#define FALCON_S_DEVID                0x6703
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Falcon constants
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Note: the following constants have moved to values in struct efhw_nic:
-+ *   FALCON_EVQ_TBL_NUM  ->  nic->num_evqs
-+ *   FALCON_DMAQ_NUM     ->  nic->num_dmaqs
-+ *   FALCON_TIMERS_NUM   ->  nic->num_times
-+ * These replacement constants are used as sanity checks in assertions in
-+ * certain functions that don't have access to struct efhw_nic.
-+ */
-+#define FALCON_DMAQ_NUM_SANITY          (EFHW_4K)
-+#define FALCON_EVQ_TBL_NUM_SANITY       (EFHW_4K)
-+#define FALCON_TIMERS_NUM_SANITY        (EFHW_4K)
-+
-+/* This value is an upper limit on the total number of filter table
-+ * entries.  The actual size of filter table is determined at runtime, as
-+ * it can vary.
-+ */
-+#define FALCON_FILTER_TBL_NUM         (EFHW_8K)
-+
-+/* max number of buffers which can be pushed before commiting */
-+#define FALCON_BUFFER_UPD_MAX         (128)
-+
-+/* We can tell falcon to write its RX buffers in 32 byte quantums,
-+   and since we pad packets 2 bytes to the right we can't use
-+   a full page (not unless we use jumbo mode for all queues)
-+
-+   NOTE: tests/nic/dma.c assumes that the value here is the real NIC
-+   value, so we explicitly round it down to the nearest 32 bytes */
-+
-+/* #define FALCON_RX_USR_BUF_SIZE    round_down(4096-2,32) */
-+#define FALCON_RX_USR_BUF_SIZE                4064
-+
-+#define FALCON_EVQ_RPTR_REG_P0                0x400
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Falcon requires user-space descriptor pushes to be:
-+ *    dword[0-2]; wiob(); dword[3]
-+ *
-+ * Driver register access must be locked against other threads from
-+ * the same driver but can be in any order: i.e dword[0-3]; wiob()
-+ *
-+ * The following helpers ensure that valid dword orderings are exercised
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* A union to allow writting 64bit values as 32bit values, without
-+ * hitting the compilers aliasing rules. We hope the compiler optimises
-+ * away the copy's anyway */
-+union __u64to32 {
-+      uint64_t u64;
-+      struct {
-+#ifdef EFHW_IS_LITTLE_ENDIAN
-+              uint32_t a;
-+              uint32_t b;
-+#else
-+              uint32_t b;
-+              uint32_t a;
-+#endif
-+      } s;
-+};
-+
-+static inline void
-+falcon_write_ddd_d(volatile char __iomem *kva,
-+                 uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3)
-+{
-+      writel(d0, kva + 0);
-+      writel(d1, kva + 4);
-+      writel(d2, kva + 8);
-+      mmiowb();
-+      writel(d3, kva + 12);
-+}
-+
-+static inline void falcon_write_q(volatile char __iomem *kva, uint64_t q)
-+{
-+      union __u64to32 u;
-+      u.u64 = q;
-+
-+      writel(u.s.a, kva);
-+      mmiowb();
-+      writel(u.s.b, kva + 4);
-+}
-+
-+static inline void falcon_read_q(volatile char __iomem *addr, uint64_t *q0)
-+{
-+      /* It is essential that we read dword0 first, so that
-+       * the shadow register is updated with the latest value
-+       * and we get a self consistent value.
-+       */
-+      union __u64to32 u;
-+      u.s.a = readl(addr);
-+      rmb();
-+      u.s.b = readl(addr + 4);
-+
-+      *q0 = u.u64;
-+}
-+
-+static inline void
-+falcon_write_qq(volatile char __iomem *kva, uint64_t q0, uint64_t q1)
-+{
-+      writeq(q0, kva + 0);
-+      falcon_write_q(kva + 8, q1);
-+}
-+
-+static inline void
-+falcon_read_qq(volatile char __iomem *addr, uint64_t *q0, uint64_t *q1)
-+{
-+      falcon_read_q(addr, q0);
-+      *q1 = readq(addr + 8);
-+}
-+
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Buffer virtual addresses (4K buffers)
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Form a buffer virtual address from buffer ID and offset.  If the offset
-+** is larger than the buffer size, then the buffer indexed will be
-+** calculated appropriately.  It is the responsibility of the caller to
-+** ensure that they have valid buffers programmed at that address.
-+*/
-+#define FALCON_VADDR_8K_S     (13)
-+#define FALCON_VADDR_4K_S     (12)
-+#define FALCON_VADDR_M                0xfffff /* post shift mask  */
-+
-+#define FALCON_BUFFER_8K_ADDR(id, off)        (((id) << FALCON_VADDR_8K_S) + (off))
-+#define FALCON_BUFFER_8K_PAGE(vaddr) \
-+      (((vaddr) >> FALCON_VADDR_8K_S) & FALCON_VADDR_M)
-+#define FALCON_BUFFER_8K_OFF(vaddr) \
-+      ((vaddr) & __FALCON_MASK32(FALCON_VADDR_8K_S))
-+
-+#define FALCON_BUFFER_4K_ADDR(id, off)        (((id) << FALCON_VADDR_4K_S) + (off))
-+#define FALCON_BUFFER_4K_PAGE(vaddr) \
-+      (((vaddr) >> FALCON_VADDR_4K_S) & FALCON_VADDR_M)
-+#define FALCON_BUFFER_4K_OFF(vaddr) \
-+      ((vaddr) & __FALCON_MASK32(FALCON_VADDR_4K_S))
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Timer helpers
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+static inline int falcon_timer_page_addr(uint idx)
-+{
-+
-+      EFHW_ASSERT(TIMER_CMD_REG_KER_OFST ==
-+                  (TIMER_CMD_REG_PAGE4_OFST - 4 * EFHW_8K));
-+
-+      EFHW_ASSERT(idx < FALCON_TIMERS_NUM_SANITY);
-+
-+      if (idx < 4)
-+              return TIMER_CMD_REG_KER_OFST + (idx * EFHW_8K);
-+      else if (idx < 1024)
-+              return TIMER_CMD_REG_PAGE4_OFST + ((idx - 4) * EFHW_8K);
-+      else
-+              return TIMER_CMD_REG_PAGE123K_OFST + ((idx - 1024) * EFHW_8K);
-+}
-+
-+#define FALCON_TIMER_PAGE_MASK                (EFHW_8K-1)
-+
-+static inline int falcon_timer_page_offset(uint idx)
-+{
-+      return falcon_timer_page_addr(idx) & FALCON_TIMER_PAGE_MASK;
-+}
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * DMA Queue helpers
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* iSCSI queue for A1; see bug 5427 for more details. */
-+#define FALCON_A1_ISCSI_DMAQ 4
-+
-+/*! returns an address within a bar of the TX DMA doorbell */
-+static inline uint falcon_tx_dma_page_addr(uint dmaq_idx)
-+{
-+      uint page;
-+
-+      EFHW_ASSERT((((TX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
-+                   (((TX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1)))));
-+
-+      EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
-+
-+      if (dmaq_idx < 1024)
-+              page = TX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
-+      else
-+              page =
-+                  TX_DESC_UPD_REG_PAGE123K_OFST +
-+                  ((dmaq_idx - 1024) * EFHW_8K);
-+
-+      return page;
-+}
-+
-+/*! returns an address within a bar of the RX DMA doorbell */
-+static inline uint falcon_rx_dma_page_addr(uint dmaq_idx)
-+{
-+      uint page;
-+
-+      EFHW_ASSERT((((RX_DESC_UPD_REG_PAGE123K_OFST) & (EFHW_8K - 1)) ==
-+                   ((RX_DESC_UPD_REG_PAGE4_OFST) & (EFHW_8K - 1))));
-+
-+      EFHW_ASSERT(dmaq_idx < FALCON_DMAQ_NUM_SANITY);
-+
-+      if (dmaq_idx < 1024)
-+              page = RX_DESC_UPD_REG_PAGE4_OFST + ((dmaq_idx - 4) * EFHW_8K);
-+      else
-+              page =
-+                  RX_DESC_UPD_REG_PAGE123K_OFST +
-+                  ((dmaq_idx - 1024) * EFHW_8K);
-+
-+      return page;
-+}
-+
-+/*! "page"=NIC-dependent register set size */
-+#define FALCON_DMA_PAGE_MASK  (EFHW_8K-1)
-+
-+/*! returns an address within a bar of the start of the "page"
-+    containing the TX DMA doorbell */
-+static inline int falcon_tx_dma_page_base(uint dma_idx)
-+{
-+      return falcon_tx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an address within a bar of the start of the "page"
-+    containing the RX DMA doorbell */
-+static inline int falcon_rx_dma_page_base(uint dma_idx)
-+{
-+      return falcon_rx_dma_page_addr(dma_idx) & ~FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an offset within a "page" of the TX DMA doorbell */
-+static inline int falcon_tx_dma_page_offset(uint dma_idx)
-+{
-+      return falcon_tx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*! returns an offset within a "page" of the RX DMA doorbell */
-+static inline int falcon_rx_dma_page_offset(uint dma_idx)
-+{
-+      return falcon_rx_dma_page_addr(dma_idx) & FALCON_DMA_PAGE_MASK;
-+}
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Events
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+/* Falcon nails down the event queue mappings */
-+#define FALCON_EVQ_KERNEL0   (0)      /* hardwired for net driver */
-+#define FALCON_EVQ_CHAR      (4)      /* char driver's event queue      */
-+
-+/* reserved by the drivers */
-+#define FALCON_EVQ_TBL_RESERVED          (8)
-+
-+/* default DMA-Q sizes */
-+#define FALCON_DMA_Q_DEFAULT_TX_SIZE  512
-+
-+#define FALCON_DMA_Q_DEFAULT_RX_SIZE  512
-+
-+#define FALCON_DMA_Q_DEFAULT_MMAP \
-+      (FALCON_DMA_Q_DEFAULT_TX_SIZE * (FALCON_DMA_TX_DESC_BYTES * 2))
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * DEBUG - Analyser trigger
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+static inline void
-+falcon_deadbeef(volatile char __iomem *efhw_kva, unsigned what)
-+{
-+      writel(what, efhw_kva + 0x300);
-+      mmiowb();
-+}
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_FALCON_H__ */
-+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/workarounds.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,67 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -247679,201 +247794,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware/wor
 +#endif /* B0/A01 */
 +
 +#endif /* __CI_DRIVER_EFAB_WORKAROUNDS_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/efab/hardware.h 2009-03-25 16:11:05.000000000 +0000
-@@ -0,0 +1,188 @@
-+/****************************************************************************
-+ * Driver for Solarflare network controllers -
-+ *          resource management for Xen backend, OpenOnload, etc
-+ *           (including support for SFE4001 10GBT NIC)
-+ *
-+ * This file provides EtherFabric NIC hardware interface.
-+ *
-+ * Copyright 2005-2007: Solarflare Communications Inc,
-+ *                      9501 Jeronimo Road, Suite 250,
-+ *                      Irvine, CA 92618, USA
-+ *
-+ * Developed and maintained by Solarflare Communications:
-+ *                      <linux-xen-drivers@solarflare.com>
-+ *                      <onload-dev@solarflare.com>
-+ *
-+ * Certain parts of the driver were implemented by
-+ *          Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
-+ *          OKTET Labs Ltd, Russia,
-+ *          http://oktetlabs.ru, <info@oktetlabs.ru>
-+ *          by request of Solarflare Communications
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-+ ****************************************************************************
-+ */
-+
-+#ifndef __CI_DRIVER_EFAB_HARDWARE_H__
-+#define __CI_DRIVER_EFAB_HARDWARE_H__
-+
-+#include "ci/driver/efab/hardware/workarounds.h"
-+#include <ci/efhw/hardware_sysdep.h>
-+
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * Common EtherFabric definitions
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#include <ci/efhw/debug.h>
-+#include <ci/efhw/common.h>
-+#include <ci/driver/efab/hardware/common.h>
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * EtherFabric varients
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+#include <ci/driver/efab/hardware/falcon.h>
-+
-+/*----------------------------------------------------------------------------
-+ *
-+ * EtherFabric Portable Hardware Layer defines
-+ *
-+ *---------------------------------------------------------------------------*/
-+
-+  /*-------------- Initialisation ------------ */
-+#define efhw_nic_close_hardware(nic) \
-+      ((nic)->efhw_func->close_hardware(nic))
-+
-+#define efhw_nic_init_hardware(nic, ev_handlers, mac_addr, non_irq_evq) \
-+      ((nic)->efhw_func->init_hardware((nic), (ev_handlers), (mac_addr), \
-+                                       (non_irq_evq)))
-+
-+/*-------------- Interrupt support  ------------ */
-+/** Handle interrupt.  Return 0 if not handled, 1 if handled. */
-+#define efhw_nic_interrupt(nic) \
-+      ((nic)->efhw_func->interrupt(nic))
-+
-+#define efhw_nic_interrupt_enable(nic) \
-+      ((nic)->efhw_func->interrupt_enable(nic))
-+
-+#define efhw_nic_interrupt_disable(nic) \
-+      ((nic)->efhw_func->interrupt_disable(nic))
-+
-+#define efhw_nic_set_interrupt_moderation(nic, evq, val)                 \
-+      ((nic)->efhw_func->set_interrupt_moderation(nic, evq, val))
-+
-+/*-------------- Event support  ------------ */
-+
-+#define efhw_nic_event_queue_enable(nic, evq, size, q_base, buf_base,   \
-+                                  interrupting)                       \
-+      ((nic)->efhw_func->event_queue_enable((nic), (evq), (size), (q_base), \
-+                                            (buf_base), (interrupting)))
-+
-+#define efhw_nic_event_queue_disable(nic, evq, timer_only) \
-+      ((nic)->efhw_func->event_queue_disable(nic, evq, timer_only))
-+
-+#define efhw_nic_wakeup_request(nic, q_base, index, evq) \
-+      ((nic)->efhw_func->wakeup_request(nic, q_base, index, evq))
-+
-+#define efhw_nic_sw_event(nic, data, ev) \
-+      ((nic)->efhw_func->sw_event(nic, data, ev))
-+
-+/*-------------- Filter support  ------------ */
-+#define efhw_nic_ipfilter_set(nic, type, index, dmaq,         \
-+                            saddr, sport, daddr, dport)       \
-+      ((nic)->efhw_func->ipfilter_set(nic, type, index, dmaq, \
-+                                      saddr, sport, daddr, dport))
-+
-+#define efhw_nic_ipfilter_clear(nic, index) \
-+      ((nic)->efhw_func->ipfilter_clear(nic, index))
-+
-+/*-------------- DMA support  ------------ */
-+#define efhw_nic_dmaq_tx_q_init(nic, dmaq, evq, owner, tag,           \
-+                              dmaq_size, index, flags)                \
-+      ((nic)->efhw_func->dmaq_tx_q_init(nic, dmaq, evq, owner, tag,   \
-+                                        dmaq_size, index, flags))
-+
-+#define efhw_nic_dmaq_rx_q_init(nic, dmaq, evq, owner, tag,           \
-+                              dmaq_size, index, flags) \
-+      ((nic)->efhw_func->dmaq_rx_q_init(nic, dmaq, evq, owner, tag,   \
-+                                        dmaq_size, index, flags))
-+
-+#define efhw_nic_dmaq_tx_q_disable(nic, dmaq) \
-+      ((nic)->efhw_func->dmaq_tx_q_disable(nic, dmaq))
-+
-+#define efhw_nic_dmaq_rx_q_disable(nic, dmaq) \
-+      ((nic)->efhw_func->dmaq_rx_q_disable(nic, dmaq))
-+
-+#define efhw_nic_flush_tx_dma_channel(nic, dmaq) \
-+      ((nic)->efhw_func->flush_tx_dma_channel(nic, dmaq))
-+
-+#define efhw_nic_flush_rx_dma_channel(nic, dmaq) \
-+      ((nic)->efhw_func->flush_rx_dma_channel(nic, dmaq))
-+
-+/*-------------- MAC Low level interface ---- */
-+#define efhw_gmac_get_mac_addr(nic) \
-+      ((nic)->gmac->get_mac_addr((nic)->gmac))
-+
-+/*-------------- Buffer table -------------- */
-+#define efhw_nic_buffer_table_set(nic, addr, bufsz, region,           \
-+                                own_id, buf_id)                       \
-+      ((nic)->efhw_func->buffer_table_set(nic, addr, bufsz, region,   \
-+                                          own_id, buf_id))
-+
-+#define efhw_nic_buffer_table_set_n(nic, buf_id, addr, bufsz,         \
-+                                  region, n_pages, own_id) \
-+      ((nic)->efhw_func->buffer_table_set_n(nic, buf_id, addr, bufsz, \
-+                                            region, n_pages, own_id))
-+
-+#define efhw_nic_buffer_table_clear(nic, id, num) \
-+      ((nic)->efhw_func->buffer_table_clear(nic, id, num))
-+
-+#define efhw_nic_buffer_table_commit(nic) \
-+      ((nic)->efhw_func->buffer_table_commit(nic))
-+
-+/*-------------- New filter API ------------ */
-+#define efhw_nic_filter_set(nic, spec, index_out) \
-+      ((nic)->efhw_func->filter_set(nic, spec, index_out))
-+
-+#define efhw_nic_filter_clear(nic, type, index_out) \
-+      ((nic)->efhw_func->filter_clear(nic, type, index_out))
-+
-+
-+/* --- DMA --- */
-+#define EFHW_DMA_ADDRMASK             (0xffffffffffffffffULL)
-+
-+/* --- Buffers --- */
-+#define EFHW_BUFFER_ADDR              FALCON_BUFFER_4K_ADDR
-+#define EFHW_BUFFER_PAGE              FALCON_BUFFER_4K_PAGE
-+#define EFHW_BUFFER_OFF                       FALCON_BUFFER_4K_OFF
-+
-+/* --- Filters --- */
-+#define EFHW_IP_FILTER_NUM            FALCON_FILTER_TBL_NUM
-+
-+#define EFHW_MAX_PAGE_SIZE            FALCON_MAX_PAGE_SIZE
-+
-+#if PAGE_SIZE <= EFHW_MAX_PAGE_SIZE
-+#define EFHW_NIC_PAGE_SIZE PAGE_SIZE
-+#else
-+#define EFHW_NIC_PAGE_SIZE EFHW_MAX_PAGE_SIZE
-+#endif
-+#define EFHW_NIC_PAGE_MASK (~(EFHW_NIC_PAGE_SIZE-1))
-+
-+#endif /* __CI_DRIVER_EFAB_HARDWARE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,273 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248148,9 +248071,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/efx_vi.h
 +                          int *length);
 +
 +#endif /* __CI_DRIVER_RESOURCE_EFX_VI_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_efhw_nic.h Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,69 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248221,9 +248144,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/driver/resource/linux_ef
 +  container_of(_efhw_nic, struct linux_efhw_nic, efrm_nic.efhw_nic)
 +
 +#endif /* __CI_DRIVER_RESOURCE_LINUX_RESOURCE__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/checks.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/checks.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/checks.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/checks.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/checks.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,118 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248343,9 +248266,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/checks.h linux-2.6.
 +      EFHW_ASSERT(((LBN) >= 0) && (((LBN)+(WIDTH)) <= 64))
 +
 +#endif /* __CI_EFHW_CHECK_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,93 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248440,9 +248363,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common.h linux-2.6.
 +                                                   support */
 +
 +#endif /* __CI_EFHW_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,61 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248505,9 +248428,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h lin
 +#endif
 +
 +#endif /* __CI_EFHW_COMMON_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/debug.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/debug.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/debug.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,84 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248593,9 +248516,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/debug.h linux-2.6.2
 +#endif
 +
 +#endif /* __CI_EFHW_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,43 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -248640,9 +248563,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_config.h linux
 +#define EFHW_MAX_NR_DEVS 5    /* max number of efhw devices supported */
 +
 +#endif /* __CI_EFHW_EFAB_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h      2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h        Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,382 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249026,9 +248949,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/efhw_types.h linux-
 +
 +
 +#endif /* __CI_EFHW_EFHW_TYPES_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/eventq.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,72 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249102,9 +249025,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq.h linux-2.6.
 +                                    efhw_event_t *);
 +
 +#endif /* __CI_EFHW_EVENTQ_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,77 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249183,9 +249106,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/eventq_macros.h lin
 +      (EFHW_IS_EVENT(EFHW_EVENT_PTR(evq, s, 1)))
 +
 +#endif /* __CI_EFHW_EVENTQ_MACROS_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/falcon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,94 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249281,9 +249204,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon.h linux-2.6.
 +extern void falcon_nic_filter_dtor(struct efhw_nic *nic);
 +
 +#endif /* __CI_EFHW_FALCON_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,58 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249343,9 +249266,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/falcon_hash.h linux
 +                   unsigned int n_search, unsigned int nfilters);
 +
 +#endif /* __CI_EFHW_FALCON_HASH_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,69 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249416,9 +249339,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/hardware_sysdep.h l
 +#endif
 +
 +#endif /* __CI_EFHW_HARDWARE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/iopage.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,58 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249478,9 +249401,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage.h linux-2.6.
 +extern void efhw_iopages_free(struct efhw_nic *, struct efhw_iopages *p);
 +
 +#endif /* __CI_DRIVER_RESOURCE_IOPAGE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h      Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,190 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249672,9 +249595,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/iopage_types.h linu
 +}
 +
 +#endif /* __CI_EFHW_IOPAGE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/nic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/nic.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/nic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/nic.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,62 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249738,9 +249661,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/nic.h linux-2.6.27.
 +extern void efhw_nic_close_interrupts(struct efhw_nic *nic);
 +
 +#endif /* __CI_EFHW_NIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/public.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/public.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/public.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/public.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/public.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,104 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249846,9 +249769,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/public.h linux-2.6.
 +                           uint32_t *udp_full, uint32_t *udp_wild);
 +
 +#endif /* __CI_EFHW_PUBLIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,55 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249905,9 +249828,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efhw/sysdep.h linux-2.6.
 +#define spin_lock_destroy(l_)  do {} while (0)
 +
 +#endif /* __CI_EFHW_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/buddy.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,68 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -249977,9 +249900,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buddy.h linux-2.6.2
 +
 +
 +#endif /* __CI_EFRM_BUDDY_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h      Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,81 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250062,9 +249985,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/buffer_table.h linu
 +
 +
 +#endif /* __CI_EFRM_BUFFER_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/debug.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/debug.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/debug.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,78 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250144,9 +250067,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/debug.h linux-2.6.2
 +#endif
 +
 +#endif /* __CI_EFRM_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,89 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250237,9 +250160,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/driver_private.h li
 +extern void efrm_resources_fini(void);
 +
 +#endif /* __CI_EFRM_DRIVER_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,32 @@
 +#ifndef __EFRM_CLIENT_H__
 +#define __EFRM_CLIENT_H__
@@ -250273,9 +250196,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_client.h linux
 +
 +
 +#endif  /* __EFRM_CLIENT_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h  Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,26 @@
 +#ifndef __EFRM_NIC_H__
 +#define __EFRM_NIC_H__
@@ -250303,9 +250226,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/efrm_nic.h linux-2.
 +
 +
 +#endif  /* __EFRM_NIC_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/filter.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/filter.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/filter.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/filter.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/filter.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,122 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250429,9 +250352,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/filter.h linux-2.6.
 +
 +#endif /* __CI_EFRM_FILTER_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h  Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,110 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250543,9 +250466,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/iobufset.h linux-2.
 +}
 +
 +#endif /* __CI_EFRM_IOBUFSET_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,104 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250651,9 +250574,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_set.h linux-2.6
 +              if (efrm_nic_set_read((_set), (_nic_i)))
 +
 +#endif /* __CI_EFRM_NIC_SET_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,98 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250753,9 +250676,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/nic_table.h linux-2
 +                  efrm_nic_set_read((_set), (_i)))
 +
 +#endif /* __CI_EFRM_NIC_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/private.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/private.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/private.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/private.h   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,118 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250875,9 +250798,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/private.h linux-2.6
 +
 +
 +#endif /* __CI_EFRM_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource.h        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/resource.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/resource.h  Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,119 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -250998,9 +250921,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource.h linux-2.
 +
 +
 +#endif /* __CI_EFRM_RESOURCE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,104 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251106,9 +251029,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/resource_id.h linux
 +                                              "<invalid>")
 +
 +#endif /* __CI_DRIVER_EFRM_RESOURCE_ID_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,46 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251156,9 +251079,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep.h linux-2.6.
 +#include <ci/efrm/sysdep_linux.h>
 +
 +#endif /* __CI_EFRM_SYSDEP_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h    2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h      Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,93 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251253,9 +251176,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/sysdep_linux.h linu
 +}
 +
 +#endif /* __CI_EFRM_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,157 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251414,9 +251337,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource.h linux
 +
 +
 +#endif /* __CI_EFRM_VI_RESOURCE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,155 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251573,9 +251496,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_manager
 +}
 +
 +#endif /* __CI_DRIVER_EFAB_VI_RESOURCE_MANAGER_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private.h       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,65 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251642,9 +251565,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/ci/efrm/vi_resource_private
 +extern void efrm_handle_sram_event(struct efhw_nic *nic);
 +
 +#endif /* __CI_EFRM_VI_RESOURCE_PRIVATE_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driver_object.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driver_object.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driver_object.c   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/driver_object.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/driver_object.c     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,328 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -251974,9 +251897,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driver_object.c linux-2.6.2
 +      return client->nic;
 +}
 +EXPORT_SYMBOL(efrm_client_get_nic);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driverlink_new.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driverlink_new.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/driverlink_new.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/driverlink_new.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/driverlink_new.c    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,260 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -252238,9 +252161,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/driverlink_new.c linux-2.6.
 +              break;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efrm_internal.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efrm_internal.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efrm_internal.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/efrm_internal.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/efrm_internal.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,41 @@
 +#ifndef __EFRM_INTERNAL_H__
 +#define __EFRM_INTERNAL_H__
@@ -252283,9 +252206,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efrm_internal.h linux-2.6.2
 +
 +
 +#endif  /* __EFRM_INTERNAL_H__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efx_vi_shm.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efx_vi_shm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/efx_vi_shm.c      2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/efx_vi_shm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/efx_vi_shm.c        Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,707 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -252994,9 +252917,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/efx_vi_shm.c linux-2.6.27.1
 +      return 0;
 +}
 +EXPORT_SYMBOL(efx_vi_hw_resource_get_phys);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/eventq.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/eventq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/eventq.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/eventq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/eventq.c    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,321 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -253319,9 +253242,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/eventq.c linux-2.6.27.19-5.
 +                         false);
 +      return count;
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/falcon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/falcon.c    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,2525 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -255848,9 +255771,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon.c linux-2.6.27.19-5.
 +};
 +
 +
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon_hash.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon_hash.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/falcon_hash.c     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/falcon_hash.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/falcon_hash.c       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,159 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256011,9 +255934,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/falcon_hash.c linux-2.6.27.
 +      return (hash1 + (n_search * hash2)) & (nfilters - 1);
 +}
 +
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/filter_resource.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/filter_resource.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/filter_resource.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/filter_resource.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/filter_resource.c   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,250 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256265,9 +256188,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/filter_resource.c linux-2.6
 +      return filter_resource(rs);
 +}
 +EXPORT_SYMBOL(efrm_filter_resource_from_resource);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iobufset_resource.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iobufset_resource.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iobufset_resource.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/iobufset_resource.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/iobufset_resource.c Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,404 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256673,9 +256596,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iobufset_resource.c linux-2
 +      kfree(efrm_iobufset_manager);
 +      return rc;
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iopage.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iopage.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/iopage.c  2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/iopage.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/iopage.c    Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,103 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256780,9 +256703,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/iopage.c linux-2.6.27.19-5.
 +      efrm_dma_free_coherent(&lnic->pci_dev->dev, bytes,
 +                             (void *)p->kva, p->dma_addr);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.c   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_compat.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.c     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,118 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256902,9 +256825,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.c linux-2.6.2
 +
 +      dma_free_coherent(dev, size, ptr, dma_addr);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_compat.h   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_compat.h     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,70 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -256976,9 +256899,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_compat.h linux-2.6.2
 +
 +
 +#endif /* DRIVER_LINUX_RESOURCE_KERNEL_COMPAT_H */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_proc.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_proc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kernel_proc.c     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kernel_proc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kernel_proc.c       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,109 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -257089,9 +257012,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kernel_proc.c linux-2.6.27.
 +
 +      return count ? strlen(buf) : 0;
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kfifo.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kfifo.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/kfifo.c   2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/kfifo.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/kfifo.c     Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,208 @@
 +/*
 + * A simple kernel FIFO implementation.
@@ -257301,9 +257224,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/kfifo.c linux-2.6.27.19-5.1
 +EXPORT_SYMBOL(__kfifo_get);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/linux_resource_internal.h linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/linux_resource_internal.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/linux_resource_internal.h 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/linux_resource_internal.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/linux_resource_internal.h   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,76 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -257381,9 +257304,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/linux_resource_internal.h l
 +extern void efrm_uninstall_proc_entries(void);
 +
 +#endif  /* __LINUX_RESOURCE_INTERNAL__ */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/nic.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/nic.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/nic.c     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/nic.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/nic.c       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,174 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -257559,9 +257482,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/nic.c linux-2.6.27.19-5.1/d
 +
 +      EFHW_TRACE("%s: DONE", __func__);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_driver.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_driver.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_driver.c 2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resource_driver.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resource_driver.c   Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,600 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -258163,9 +258086,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_driver.c linux-2.6
 +
 +module_init(init_sfc_resource);
 +module_exit(cleanup_sfc_resource);
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_manager.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_manager.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resource_manager.c        2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resource_manager.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resource_manager.c  Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,145 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -258312,9 +258235,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resource_manager.c linux-2.
 +/*
 + * vi: sw=8:ai:aw
 + */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resources.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resources.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/resources.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/resources.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/resources.c Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,94 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -258410,9 +258333,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/resources.c linux-2.6.27.19
 +
 +      efrm_buffer_table_dtor();
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_alloc.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_alloc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_alloc.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_alloc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_alloc.c Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,820 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -259234,9 +259157,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_alloc.c linux-2
 +      efrm_vi_rm_detach_evq(virs);
 +      efrm_vi_rm_drop_ref(virs);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_event.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_event.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_event.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_event.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_event.c Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,250 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -259488,9 +259411,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_event.c linux-2
 +  if (nic->buf_commit_outstanding > 0)
 +    nic->buf_commit_outstanding--;
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_flush.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_flush.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_flush.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_flush.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_flush.c Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,483 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -259975,9 +259898,9 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_flush.c linux-2
 +/*
 + * vi: sw=8:ai:aw
 + */
-diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_manager.c linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_manager.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/sfc_resource/vi_resource_manager.c     2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/sfc/sfc_resource/vi_resource_manager.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/net/sfc/sfc_resource/vi_resource_manager.c       Wed May 06 16:56:26 2009 +0100
 @@ -0,0 +1,231 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -260210,10 +260133,10 @@ diff -purN linux-2.6.27/drivers/net/sfc/sfc_resource/vi_resource_manager.c linux
 +{
 +      efrm_create_or_destroy_vi_resource_manager(&rm, NULL, true);
 +}
-diff -purN linux-2.6.27/drivers/net/sfc/tx.c linux-2.6.27.19-5.1/drivers/net/sfc/tx.c
---- linux-2.6.27/drivers/net/sfc/tx.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sfc/tx.c   2009-03-25 16:11:05.000000000 +0000
-@@ -368,7 +368,21 @@ inline int efx_xmit(struct efx_nic *efx,
+diff -r 9608d5473017 drivers/net/sfc/tx.c
+--- a/drivers/net/sfc/tx.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sfc/tx.c     Wed May 06 16:56:26 2009 +0100
+@@ -368,7 +368,21 @@
  int efx_hard_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
  {
        struct efx_nic *efx = net_dev->priv;
@@ -260236,25 +260159,25 @@ diff -purN linux-2.6.27/drivers/net/sfc/tx.c linux-2.6.27.19-5.1/drivers/net/sfc
  }
  
  void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
-diff -purN linux-2.6.27/drivers/net/skfp/skfddi.c linux-2.6.27.19-5.1/drivers/net/skfp/skfddi.c
---- linux-2.6.27/drivers/net/skfp/skfddi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/skfp/skfddi.c      2009-03-25 16:11:06.000000000 +0000
-@@ -998,9 +998,9 @@ static int skfp_ioctl(struct net_device 
+diff -r 9608d5473017 drivers/net/skfp/skfddi.c
+--- a/drivers/net/skfp/skfddi.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/skfp/skfddi.c        Wed May 06 16:56:26 2009 +0100
+@@ -998,9 +998,9 @@
                break;
        case SKFP_CLR_STATS:    /* Zero out the driver statistics */
                if (!capable(CAP_NET_ADMIN)) {
--                      memset(&lp->MacStat, 0, sizeof(lp->MacStat));
--              } else {
-                       status = -EPERM;
++                      status = -EPERM;
 +              } else {
-+                      memset(&lp->MacStat, 0, sizeof(lp->MacStat));
+                       memset(&lp->MacStat, 0, sizeof(lp->MacStat));
+-              } else {
+-                      status = -EPERM;
                }
                break;
        default:
-diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.c
---- linux-2.6.27/drivers/net/sky2.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sky2.c     2009-03-25 16:11:03.000000000 +0000
-@@ -1272,7 +1272,7 @@ static struct sk_buff *sky2_rx_alloc(str
+diff -r 9608d5473017 drivers/net/sky2.c
+--- a/drivers/net/sky2.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sky2.c       Wed May 06 16:56:27 2009 +0100
+@@ -1272,7 +1272,7 @@
        }
  
        for (i = 0; i < sky2->rx_nfrags; i++) {
@@ -260263,7 +260186,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
  
                if (!page)
                        goto free_partial;
-@@ -1403,9 +1403,6 @@ static int sky2_up(struct net_device *de
+@@ -1403,9 +1403,6 @@
  
        }
  
@@ -260273,7 +260196,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
        netif_carrier_off(dev);
  
        /* must be power of 2 */
-@@ -1484,6 +1481,9 @@ static int sky2_up(struct net_device *de
+@@ -1484,6 +1481,9 @@
        sky2_write32(hw, B0_IMSK, imask);
  
        sky2_set_multicast(dev);
@@ -260283,7 +260206,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
        return 0;
  
  err_out:
-@@ -2141,8 +2141,8 @@ static struct sk_buff *receive_copy(stru
+@@ -2141,8 +2141,8 @@
  }
  
  /* Adjust length of skb with fragments to match received data */
@@ -260294,7 +260217,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
  {
        int i, num_frags;
        unsigned int size;
-@@ -2159,15 +2159,11 @@ static void skb_put_frags(struct sk_buff
+@@ -2159,15 +2159,11 @@
  
                if (length == 0) {
                        /* don't need this page */
@@ -260312,7 +260235,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
                        length -= size;
                }
        }
-@@ -2194,7 +2190,7 @@ static struct sk_buff *receive_new(struc
+@@ -2194,7 +2190,7 @@
        sky2_rx_map_skb(sky2->hw->pdev, re, hdr_space);
  
        if (skb_shinfo(skb)->nr_frags)
@@ -260321,7 +260244,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
        else
                skb_put(skb, length);
        return skb;
-@@ -3034,7 +3030,8 @@ static int sky2_set_wol(struct net_devic
+@@ -3034,7 +3030,8 @@
        struct sky2_port *sky2 = netdev_priv(dev);
        struct sky2_hw *hw = sky2->hw;
  
@@ -260331,16 +260254,16 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
                return -EOPNOTSUPP;
  
        sky2->wol = wol->wolopts;
-@@ -3045,6 +3042,8 @@ static int sky2_set_wol(struct net_devic
+@@ -3044,6 +3041,8 @@
+           hw->chip_id == CHIP_ID_YUKON_FE_P)
                sky2_write32(hw, B0_CTST, sky2->wol
                             ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF);
-+      device_set_wakeup_enable(&hw->pdev->dev, sky2->wol);
 +
++      device_set_wakeup_enable(&hw->pdev->dev, sky2->wol);
        if (!netif_running(dev))
                sky2_wol_init(sky2);
-       return 0;
-@@ -4166,18 +4165,6 @@ static int __devinit sky2_test_msi(struc
+@@ -4166,18 +4165,6 @@
        return err;
  }
  
@@ -260359,7 +260282,7 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
  /* This driver supports yukon2 chipset only */
  static const char *sky2_name(u8 chipid, char *buf, int sz)
  {
-@@ -4238,7 +4225,7 @@ static int __devinit sky2_probe(struct p
+@@ -4238,7 +4225,7 @@
                }
        }
  
@@ -260368,10 +260291,10 @@ diff -purN linux-2.6.27/drivers/net/sky2.c linux-2.6.27.19-5.1/drivers/net/sky2.
  
        err = -ENOMEM;
        hw = kzalloc(sizeof(*hw), GFP_KERNEL);
-diff -purN linux-2.6.27/drivers/net/starfire.c linux-2.6.27.19-5.1/drivers/net/starfire.c
---- linux-2.6.27/drivers/net/starfire.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/starfire.c 2009-03-25 16:11:03.000000000 +0000
-@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device
+diff -r 9608d5473017 drivers/net/starfire.c
+--- a/drivers/net/starfire.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/starfire.c   Wed May 06 16:56:27 2009 +0100
+@@ -1509,6 +1509,11 @@
                desc->status = 0;
                np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
        }
@@ -260383,10 +260306,10 @@ diff -purN linux-2.6.27/drivers/net/starfire.c linux-2.6.27.19-5.1/drivers/net/s
        writew(np->rx_done, np->base + CompletionQConsumerIdx);
  
   out:
-diff -purN linux-2.6.27/drivers/net/sunbmac.c linux-2.6.27.19-5.1/drivers/net/sunbmac.c
---- linux-2.6.27/drivers/net/sunbmac.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunbmac.c  2009-03-25 16:11:08.000000000 +0000
-@@ -1305,6 +1305,7 @@ static struct of_device_id bigmac_sbus_m
+diff -r 9608d5473017 drivers/net/sunbmac.c
+--- a/drivers/net/sunbmac.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunbmac.c    Wed May 06 16:56:27 2009 +0100
+@@ -1305,6 +1305,7 @@
  MODULE_DEVICE_TABLE(of, bigmac_sbus_match);
  
  static struct of_platform_driver bigmac_sbus_driver = {
@@ -260394,10 +260317,10 @@ diff -purN linux-2.6.27/drivers/net/sunbmac.c linux-2.6.27.19-5.1/drivers/net/su
        .name           = "sunbmac",
        .match_table    = bigmac_sbus_match,
        .probe          = bigmac_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sungem.c linux-2.6.27.19-5.1/drivers/net/sungem.c
---- linux-2.6.27/drivers/net/sungem.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sungem.c   2009-03-25 16:11:07.000000000 +0000
-@@ -2205,6 +2205,8 @@ static int gem_do_start(struct net_devic
+diff -r 9608d5473017 drivers/net/sungem.c
+--- a/drivers/net/sungem.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sungem.c     Wed May 06 16:56:27 2009 +0100
+@@ -2205,6 +2205,8 @@
  
        gp->running = 1;
  
@@ -260406,16 +260329,16 @@ diff -purN linux-2.6.27/drivers/net/sungem.c linux-2.6.27.19-5.1/drivers/net/sun
        if (gp->lstate == link_up) {
                netif_carrier_on(gp->dev);
                gem_set_link_modes(gp);
-@@ -2222,6 +2224,8 @@ static int gem_do_start(struct net_devic
+@@ -2221,6 +2223,8 @@
                spin_lock_irqsave(&gp->lock, flags);
                spin_lock(&gp->tx_lock);
-+              napi_disable(&gp->napi);
 +
++              napi_disable(&gp->napi);
                gp->running =  0;
                gem_reset(gp);
-               gem_clean_rings(gp);
-@@ -2322,8 +2326,6 @@ static int gem_open(struct net_device *d
+@@ -2322,8 +2326,6 @@
        if (!gp->asleep)
                rc = gem_do_start(dev);
        gp->opened = (rc == 0);
@@ -260424,7 +260347,7 @@ diff -purN linux-2.6.27/drivers/net/sungem.c linux-2.6.27.19-5.1/drivers/net/sun
  
        mutex_unlock(&gp->pm_mutex);
  
-@@ -2460,8 +2462,6 @@ static int gem_resume(struct pci_dev *pd
+@@ -2460,8 +2462,6 @@
  
                /* Re-attach net device */
                netif_device_attach(dev);
@@ -260433,10 +260356,10 @@ diff -purN linux-2.6.27/drivers/net/sungem.c linux-2.6.27.19-5.1/drivers/net/sun
        }
  
        spin_lock_irqsave(&gp->lock, flags);
-diff -purN linux-2.6.27/drivers/net/sunhme.c linux-2.6.27.19-5.1/drivers/net/sunhme.c
---- linux-2.6.27/drivers/net/sunhme.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunhme.c   2009-03-25 16:11:05.000000000 +0000
-@@ -3336,6 +3336,7 @@ static struct of_device_id hme_sbus_matc
+diff -r 9608d5473017 drivers/net/sunhme.c
+--- a/drivers/net/sunhme.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunhme.c     Wed May 06 16:56:27 2009 +0100
+@@ -3336,6 +3336,7 @@
  MODULE_DEVICE_TABLE(of, hme_sbus_match);
  
  static struct of_platform_driver hme_sbus_driver = {
@@ -260444,10 +260367,10 @@ diff -purN linux-2.6.27/drivers/net/sunhme.c linux-2.6.27.19-5.1/drivers/net/sun
        .name           = "hme",
        .match_table    = hme_sbus_match,
        .probe          = hme_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sunlance.c linux-2.6.27.19-5.1/drivers/net/sunlance.c
---- linux-2.6.27/drivers/net/sunlance.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunlance.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1583,6 +1583,7 @@ static struct of_device_id sunlance_sbus
+diff -r 9608d5473017 drivers/net/sunlance.c
+--- a/drivers/net/sunlance.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunlance.c   Wed May 06 16:56:27 2009 +0100
+@@ -1583,6 +1583,7 @@
  MODULE_DEVICE_TABLE(of, sunlance_sbus_match);
  
  static struct of_platform_driver sunlance_sbus_driver = {
@@ -260455,10 +260378,10 @@ diff -purN linux-2.6.27/drivers/net/sunlance.c linux-2.6.27.19-5.1/drivers/net/s
        .name           = "sunlance",
        .match_table    = sunlance_sbus_match,
        .probe          = sunlance_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/sunqe.c linux-2.6.27.19-5.1/drivers/net/sunqe.c
---- linux-2.6.27/drivers/net/sunqe.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/sunqe.c    2009-03-25 16:11:03.000000000 +0000
-@@ -983,6 +983,7 @@ static struct of_device_id qec_sbus_matc
+diff -r 9608d5473017 drivers/net/sunqe.c
+--- a/drivers/net/sunqe.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/sunqe.c      Wed May 06 16:56:27 2009 +0100
+@@ -983,6 +983,7 @@
  MODULE_DEVICE_TABLE(of, qec_sbus_match);
  
  static struct of_platform_driver qec_sbus_driver = {
@@ -260466,10 +260389,10 @@ diff -purN linux-2.6.27/drivers/net/sunqe.c linux-2.6.27.19-5.1/drivers/net/sunq
        .name           = "qec",
        .match_table    = qec_sbus_match,
        .probe          = qec_sbus_probe,
-diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
---- linux-2.6.27/drivers/net/tg3.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tg3.c      2009-03-25 16:11:05.000000000 +0000
-@@ -205,7 +205,10 @@ static struct pci_device_id tg3_pci_tbl[
+diff -r 9608d5473017 drivers/net/tg3.c
+--- a/drivers/net/tg3.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tg3.c        Wed May 06 16:56:27 2009 +0100
+@@ -205,7 +205,10 @@
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5723)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761E)},
@@ -260481,7 +260404,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
-@@ -990,7 +993,14 @@ static int tg3_mdio_init(struct tg3 *tp)
+@@ -990,7 +993,14 @@
  
        phydev = tp->mdio_bus.phy_map[PHY_ADDR];
  
@@ -260497,7 +260420,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
        case TG3_PHY_ID_BCM50610:
                phydev->interface = PHY_INTERFACE_MODE_RGMII;
                if (tp->tg3_flags3 & TG3_FLG3_RGMII_STD_IBND_DISABLE)
-@@ -5812,6 +5822,7 @@ static int tg3_chip_reset(struct tg3 *tp
+@@ -5812,6 +5822,7 @@
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260505,7 +260428,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                tw32(GRC_FASTBOOT_PC, 0);
-@@ -7112,6 +7123,7 @@ static int tg3_reset_hw(struct tg3 *tp, 
+@@ -7112,6 +7123,7 @@
                return err;
  
        if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
@@ -260513,7 +260436,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761 &&
            GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785) {
                /* This value is determined during the probe time DMA
-@@ -7353,6 +7365,7 @@ static int tg3_reset_hw(struct tg3 *tp, 
+@@ -7353,6 +7365,7 @@
                      RDMAC_MODE_LNGREAD_ENAB);
  
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260521,7 +260444,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                rdmac_mode |= RDMAC_MODE_BD_SBD_CRPT_ENAB |
                              RDMAC_MODE_MBUF_RBD_CRPT_ENAB |
-@@ -7525,6 +7538,7 @@ static int tg3_reset_hw(struct tg3 *tp, 
+@@ -7525,6 +7538,7 @@
        if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) ||
            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) ||
            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) ||
@@ -260529,7 +260452,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) ||
            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785))
                val |= WDMAC_MODE_STATUS_TAG_FIX;
-@@ -7589,6 +7603,7 @@ static int tg3_reset_hw(struct tg3 *tp, 
+@@ -7589,6 +7603,7 @@
        tp->rx_mode = RX_MODE_ENABLE;
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260537,7 +260460,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE;
-@@ -9144,6 +9159,7 @@ static int tg3_set_tso(struct net_device
+@@ -9144,6 +9159,7 @@
                        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
                            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
                             GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) ||
@@ -260545,7 +260468,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                                dev->features |= NETIF_F_TSO_ECN;
                } else
-@@ -9402,6 +9418,7 @@ static int tg3_set_tx_csum(struct net_de
+@@ -9402,6 +9418,7 @@
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260553,7 +260476,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                ethtool_op_set_tx_ipv6_csum(dev, data);
-@@ -9924,6 +9941,7 @@ static int tg3_test_memory(struct tg3 *t
+@@ -9924,6 +9941,7 @@
                if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260561,7 +260484,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                        mem_tbl = mem_tbl_5755;
-@@ -10132,6 +10150,7 @@ static int tg3_test_loopback(struct tg3 
+@@ -10132,6 +10150,7 @@
                return TG3_LOOPBACK_FAILED;
  
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260569,7 +260492,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
                int i;
-@@ -10161,6 +10180,7 @@ static int tg3_test_loopback(struct tg3 
+@@ -10161,6 +10180,7 @@
                err |= TG3_MAC_LOOPBACK_FAILED;
  
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260577,7 +260500,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
                tw32(TG3_CPMU_CTRL, cpmuctrl);
-@@ -10811,6 +10831,7 @@ static void __devinit tg3_nvram_init(str
+@@ -10811,6 +10831,7 @@
                        tg3_get_5755_nvram_info(tp);
                else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
                         GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260585,7 +260508,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                         GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                        tg3_get_5787_nvram_info(tp);
                else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
-@@ -11141,6 +11162,7 @@ static int tg3_nvram_write_block_buffere
+@@ -11141,6 +11162,7 @@
                    (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) &&
                    (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) &&
                    (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784) &&
@@ -260593,7 +260516,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                    (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761) &&
                    (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785) &&
                    (tp->nvram_jedecnum == JEDEC_ST) &&
-@@ -11317,9 +11339,10 @@ static void __devinit tg3_get_eeprom_hw_
+@@ -11317,9 +11339,10 @@
                if (val & VCPU_CFGSHDW_ASPM_DBNC)
                        tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
                if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
@@ -260606,7 +260529,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                return;
        }
  
-@@ -11449,9 +11472,10 @@ static void __devinit tg3_get_eeprom_hw_
+@@ -11449,9 +11472,10 @@
                        tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
  
                if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) &&
@@ -260619,7 +260542,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
  
                if (cfg2 & (1 << 17))
                        tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING;
-@@ -11903,7 +11927,7 @@ static int __devinit tg3_get_invariants(
+@@ -11903,7 +11927,7 @@
  
                pci_read_config_dword(tp->pdev, TG3PCI_PRODID_ASICREV,
                                      &prod_id_asic_rev);
@@ -260628,7 +260551,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
        }
  
        /* Wrong chip ID in 5752 A0. This code can be removed later
-@@ -12057,6 +12081,7 @@ static int __devinit tg3_get_invariants(
+@@ -12057,6 +12081,7 @@
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260636,7 +260559,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 ||
-@@ -12079,6 +12104,7 @@ static int __devinit tg3_get_invariants(
+@@ -12079,6 +12104,7 @@
                if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260644,7 +260567,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
-@@ -12283,6 +12309,7 @@ static int __devinit tg3_get_invariants(
+@@ -12283,6 +12309,7 @@
        }
  
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260652,7 +260575,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785) {
                tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT;
-@@ -12371,6 +12398,7 @@ static int __devinit tg3_get_invariants(
+@@ -12371,6 +12398,7 @@
                if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260660,7 +260583,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
                        if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 &&
                            tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722)
-@@ -12539,6 +12567,7 @@ static int __devinit tg3_get_invariants(
+@@ -12539,6 +12567,7 @@
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260668,7 +260591,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
-@@ -13161,6 +13190,7 @@ static char * __devinit tg3_phy_string(s
+@@ -13161,6 +13190,7 @@
        case PHY_ID_BCM5756:    return "5722/5756";
        case PHY_ID_BCM5906:    return "5906";
        case PHY_ID_BCM5761:    return "5761";
@@ -260676,7 +260599,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
        case PHY_ID_BCM8002:    return "8002/serdes";
        case 0:                 return "serdes";
        default:                return "unknown";
-@@ -13467,6 +13497,7 @@ static int __devinit tg3_init_one(struct
+@@ -13467,6 +13497,7 @@
                if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
                    (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 &&
                     GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5784_AX) ||
@@ -260684,7 +260607,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                        GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                        dev->features |= NETIF_F_TSO_ECN;
        }
-@@ -13533,6 +13564,7 @@ static int __devinit tg3_init_one(struct
+@@ -13533,6 +13564,7 @@
                if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -260692,9 +260615,9 @@ diff -purN linux-2.6.27/drivers/net/tg3.c linux-2.6.27.19-5.1/drivers/net/tg3.c
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
                    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785)
                        dev->features |= NETIF_F_IPV6_CSUM;
-diff -purN linux-2.6.27/drivers/net/tg3.h linux-2.6.27.19-5.1/drivers/net/tg3.h
---- linux-2.6.27/drivers/net/tg3.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tg3.h      2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/tg3.h
+--- a/drivers/net/tg3.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tg3.h        Wed May 06 16:56:27 2009 +0100
 @@ -38,6 +38,10 @@
  #define  TG3PCI_DEVICE_TIGON3_2                0x1645 /* BCM5701 */
  #define  TG3PCI_DEVICE_TIGON3_3                0x1646 /* BCM5702 */
@@ -260714,7 +260637,7 @@ diff -purN linux-2.6.27/drivers/net/tg3.h linux-2.6.27.19-5.1/drivers/net/tg3.h
  #define  GET_CHIP_REV(CHIP_REV_ID)    ((CHIP_REV_ID) >> 8)
  #define   CHIPREV_5700_AX              0x70
  #define   CHIPREV_5700_BX              0x71
-@@ -2581,14 +2586,16 @@ struct tg3 {
+@@ -2581,14 +2586,16 @@
  #define PHY_ID_BCM5761                        0xbc050fd0
  #define PHY_ID_BCM5906                        0xdc00ac40
  #define PHY_ID_BCM8002                        0x60010140
@@ -260733,10 +260656,10 @@ diff -purN linux-2.6.27/drivers/net/tg3.h linux-2.6.27.19-5.1/drivers/net/tg3.h
  
  
        u32                             led_ctrl;
-diff -purN linux-2.6.27/drivers/net/tulip/tulip_core.c linux-2.6.27.19-5.1/drivers/net/tulip/tulip_core.c
---- linux-2.6.27/drivers/net/tulip/tulip_core.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tulip/tulip_core.c 2009-03-25 16:11:04.000000000 +0000
-@@ -1788,6 +1788,10 @@ static void __devexit tulip_remove_one (
+diff -r 9608d5473017 drivers/net/tulip/tulip_core.c
+--- a/drivers/net/tulip/tulip_core.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tulip/tulip_core.c   Wed May 06 16:56:27 2009 +0100
+@@ -1788,6 +1788,10 @@
                return;
  
        tp = netdev_priv(dev);
@@ -260747,10 +260670,10 @@ diff -purN linux-2.6.27/drivers/net/tulip/tulip_core.c linux-2.6.27.19-5.1/drive
        unregister_netdev(dev);
        pci_free_consistent (pdev,
                             sizeof (struct tulip_rx_desc) * RX_RING_SIZE +
-diff -purN linux-2.6.27/drivers/net/tun.c linux-2.6.27.19-5.1/drivers/net/tun.c
---- linux-2.6.27/drivers/net/tun.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/tun.c      2009-03-25 16:11:04.000000000 +0000
-@@ -157,10 +157,16 @@ static int update_filter(struct tap_filt
+diff -r 9608d5473017 drivers/net/tun.c
+--- a/drivers/net/tun.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/tun.c        Wed May 06 16:56:27 2009 +0100
+@@ -157,10 +157,16 @@
  
        nexact = n;
  
@@ -260769,10 +260692,10 @@ diff -purN linux-2.6.27/drivers/net/tun.c linux-2.6.27.19-5.1/drivers/net/tun.c
  
        /* For ALLMULTI just set the mask to all ones.
         * This overrides the mask populated above. */
-diff -purN linux-2.6.27/drivers/net/ucc_geth.c linux-2.6.27.19-5.1/drivers/net/ucc_geth.c
---- linux-2.6.27/drivers/net/ucc_geth.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ucc_geth.c 2009-03-25 16:11:07.000000000 +0000
-@@ -4083,6 +4083,7 @@ static struct of_device_id ucc_geth_matc
+diff -r 9608d5473017 drivers/net/ucc_geth.c
+--- a/drivers/net/ucc_geth.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ucc_geth.c   Wed May 06 16:56:27 2009 +0100
+@@ -4083,6 +4083,7 @@
  MODULE_DEVICE_TABLE(of, ucc_geth_match);
  
  static struct of_platform_driver ucc_geth_driver = {
@@ -260780,10 +260703,10 @@ diff -purN linux-2.6.27/drivers/net/ucc_geth.c linux-2.6.27.19-5.1/drivers/net/u
        .name           = DRV_NAME,
        .match_table    = ucc_geth_match,
        .probe          = ucc_geth_probe,
-diff -purN linux-2.6.27/drivers/net/ucc_geth_mii.c linux-2.6.27.19-5.1/drivers/net/ucc_geth_mii.c
---- linux-2.6.27/drivers/net/ucc_geth_mii.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/ucc_geth_mii.c     2009-03-25 16:11:04.000000000 +0000
-@@ -268,6 +268,7 @@ static struct of_device_id uec_mdio_matc
+diff -r 9608d5473017 drivers/net/ucc_geth_mii.c
+--- a/drivers/net/ucc_geth_mii.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/ucc_geth_mii.c       Wed May 06 16:56:27 2009 +0100
+@@ -268,6 +268,7 @@
  };
  
  static struct of_platform_driver uec_mdio_driver = {
@@ -260791,10 +260714,10 @@ diff -purN linux-2.6.27/drivers/net/ucc_geth_mii.c linux-2.6.27.19-5.1/drivers/n
        .name   = MII_DRV_NAME,
        .probe  = uec_mdio_probe,
        .remove = uec_mdio_remove,
-diff -purN linux-2.6.27/drivers/net/usb/asix.c linux-2.6.27.19-5.1/drivers/net/usb/asix.c
---- linux-2.6.27/drivers/net/usb/asix.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/usb/asix.c 2009-03-25 16:11:07.000000000 +0000
-@@ -1444,6 +1444,18 @@ static const struct usb_device_id       produc
+diff -r 9608d5473017 drivers/net/usb/asix.c
+--- a/drivers/net/usb/asix.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/usb/asix.c   Wed May 06 16:56:27 2009 +0100
+@@ -1444,6 +1444,18 @@
        // Apple USB Ethernet Adapter
        USB_DEVICE(0x05ac, 0x1402),
        .driver_info = (unsigned long) &ax88772_info,
@@ -260813,10 +260736,10 @@ diff -purN linux-2.6.27/drivers/net/usb/asix.c linux-2.6.27.19-5.1/drivers/net/u
  },
        { },            // END
  };
-diff -purN linux-2.6.27/drivers/net/usb/hso.c linux-2.6.27.19-5.1/drivers/net/usb/hso.c
---- linux-2.6.27/drivers/net/usb/hso.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/usb/hso.c  2009-03-25 16:11:07.000000000 +0000
-@@ -2047,7 +2047,7 @@ static void hso_create_rfkill(struct hso
+diff -r 9608d5473017 drivers/net/usb/hso.c
+--- a/drivers/net/usb/hso.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/usb/hso.c    Wed May 06 16:56:27 2009 +0100
+@@ -2047,7 +2047,7 @@
        char *rfkn;
  
        hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
@@ -260825,9 +260748,9 @@ diff -purN linux-2.6.27/drivers/net/usb/hso.c linux-2.6.27.19-5.1/drivers/net/us
        if (!hso_net->rfkill) {
                dev_err(dev, "%s - Out of memory", __func__);
                return;
-diff -purN linux-2.6.27/drivers/net/virtio_net.c linux-2.6.27.19-5.1/drivers/net/virtio_net.c
---- linux-2.6.27/drivers/net/virtio_net.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/virtio_net.c       2009-03-25 16:11:05.000000000 +0000
+diff -r 9608d5473017 drivers/net/virtio_net.c
+--- a/drivers/net/virtio_net.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/virtio_net.c Wed May 06 16:56:27 2009 +0100
 @@ -24,6 +24,7 @@
  #include <linux/virtio.h>
  #include <linux/virtio_net.h>
@@ -260836,7 +260759,7 @@ diff -purN linux-2.6.27/drivers/net/virtio_net.c linux-2.6.27.19-5.1/drivers/net
  
  static int napi_weight = 128;
  module_param(napi_weight, int, 0444);
-@@ -33,7 +34,7 @@ module_param(csum, bool, 0444);
+@@ -33,7 +34,7 @@
  module_param(gso, bool, 0444);
  
  /* FIXME: MTU in config. */
@@ -260845,10 +260768,10 @@ diff -purN linux-2.6.27/drivers/net/virtio_net.c linux-2.6.27.19-5.1/drivers/net
  
  struct virtnet_info
  {
-diff -purN linux-2.6.27/drivers/net/wireless/Kconfig linux-2.6.27.19-5.1/drivers/net/wireless/Kconfig
---- linux-2.6.27/drivers/net/wireless/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/Kconfig   2009-03-25 16:11:08.000000000 +0000
-@@ -461,7 +461,6 @@ config AIRO_CS
+diff -r 9608d5473017 drivers/net/wireless/Kconfig
+--- a/drivers/net/wireless/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/Kconfig     Wed May 06 16:56:27 2009 +0100
+@@ -461,7 +461,6 @@
        depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211
        select WIRELESS_EXT
        select CRYPTO
@@ -260856,10 +260779,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/Kconfig linux-2.6.27.19-5.1/drivers
        ---help---
          This is the standard Linux driver to support Cisco/Aironet PCMCIA
          802.11 wireless cards.  This driver is the same as the Aironet
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.c
---- linux-2.6.27/drivers/net/wireless/ath5k/base.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.c      2009-03-25 16:11:09.000000000 +0000
-@@ -294,9 +294,9 @@ static inline u64 ath5k_extend_tsf(struc
+diff -r 9608d5473017 drivers/net/wireless/ath5k/base.c
+--- a/drivers/net/wireless/ath5k/base.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/base.c        Wed May 06 16:56:28 2009 +0100
+@@ -294,9 +294,9 @@
  }
  
  /* Interrupt handling */
@@ -260871,7 +260794,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  static irqreturn_t ath5k_intr(int irq, void *dev_id);
  static void   ath5k_tasklet_reset(unsigned long data);
  
-@@ -584,7 +584,7 @@ ath5k_pci_suspend(struct pci_dev *pdev, 
+@@ -584,7 +584,7 @@
  
        ath5k_led_off(sc);
  
@@ -260880,7 +260803,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  
        free_irq(pdev->irq, sc);
        pci_save_state(pdev);
-@@ -599,8 +599,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
+@@ -599,8 +599,7 @@
  {
        struct ieee80211_hw *hw = pci_get_drvdata(pdev);
        struct ath5k_softc *sc = hw->priv;
@@ -260890,7 +260813,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  
        pci_restore_state(pdev);
  
-@@ -621,21 +620,11 @@ ath5k_pci_resume(struct pci_dev *pdev)
+@@ -621,20 +620,10 @@
                goto err_no_irq;
        }
  
@@ -260899,7 +260822,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
        if (err)
                goto err_irq;
        ath5k_led_enable(sc);
+-
 -      /*
 -       * Reset the key cache since some parts do not
 -       * reset the contents on initial power up or resume.
@@ -260909,11 +260832,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
 -       */
 -      for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
 -              ath5k_hw_reset_key(ah, i);
--
        return 0;
  err_irq:
-       free_irq(pdev->irq, sc);
-@@ -657,7 +646,6 @@ ath5k_attach(struct pci_dev *pdev, struc
+@@ -657,7 +646,6 @@
        struct ath5k_softc *sc = hw->priv;
        struct ath5k_hw *ah = sc->ah;
        u8 mac[ETH_ALEN];
@@ -260921,21 +260843,21 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
        int ret;
  
        ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
-@@ -676,13 +664,6 @@ ath5k_attach(struct pci_dev *pdev, struc
+@@ -674,13 +662,6 @@
+               goto err;
+       if (ret > 0)
                __set_bit(ATH_STAT_MRRETRY, sc->status);
-       /*
+-
+-      /*
 -       * Reset the key cache since some parts do not
 -       * reset the contents on initial power up.
 -       */
 -      for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
 -              ath5k_hw_reset_key(ah, i);
--
--      /*
+       /*
         * Collect the channel list.  The 802.11 layer
-        * is resposible for filtering this list based
-        * on settings like the phy mode and regulatory
-@@ -2197,12 +2178,18 @@ ath5k_beacon_config(struct ath5k_softc *
+@@ -2197,11 +2178,17 @@
  \********************/
  
  static int
@@ -260947,16 +260869,15 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
 +      int ret, i;
  
        mutex_lock(&sc->lock);
++
 +      if (is_resume && !test_bit(ATH_STAT_STARTED, sc->status))
 +              goto out_ok;
 +
 +      __clear_bit(ATH_STAT_STARTED, sc->status);
-+
        ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "mode %d\n", sc->opmode);
  
-       /*
-@@ -2220,7 +2207,7 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2220,7 +2207,7 @@
         */
        sc->curchan = sc->hw->conf.channel;
        sc->curband = &sc->sbands[sc->curchan->band];
@@ -260965,7 +260886,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
        if (ret) {
                ATH5K_ERR(sc, "unable to reset hardware: %d\n", ret);
                goto done;
-@@ -2229,7 +2216,14 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2229,7 +2216,14 @@
         * This is needed only to setup initial state
         * but it's best done after a reset.
         */
@@ -260981,7 +260902,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  
        /*
         * Setup the hardware after reset: the key cache
-@@ -2249,13 +2243,17 @@ ath5k_init(struct ath5k_softc *sc)
+@@ -2249,13 +2243,17 @@
                AR5K_INT_RXORN | AR5K_INT_FATAL | AR5K_INT_GLOBAL |
                AR5K_INT_MIB;
  
@@ -261001,7 +260922,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
        ret = 0;
  done:
        mmiowb();
-@@ -2310,7 +2308,7 @@ ath5k_stop_locked(struct ath5k_softc *sc
+@@ -2310,7 +2308,7 @@
   * stop is preempted).
   */
  static int
@@ -261010,7 +260931,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  {
        int ret;
  
-@@ -2341,6 +2339,9 @@ ath5k_stop_hw(struct ath5k_softc *sc)
+@@ -2341,6 +2339,9 @@
                }
        }
        ath5k_txbuf_free(sc, sc->bbuf);
@@ -261020,7 +260941,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
        mmiowb();
        mutex_unlock(&sc->lock);
  
-@@ -2719,12 +2720,12 @@ err:
+@@ -2719,12 +2720,12 @@
  
  static int ath5k_start(struct ieee80211_hw *hw)
  {
@@ -261035,10 +260956,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.c linux-2.6.27.19-5.1/dr
  }
  
  static int ath5k_add_interface(struct ieee80211_hw *hw,
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.h linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.h
---- linux-2.6.27/drivers/net/wireless/ath5k/base.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/base.h      2009-03-25 16:11:09.000000000 +0000
-@@ -132,11 +132,12 @@ struct ath5k_softc {
+diff -r 9608d5473017 drivers/net/wireless/ath5k/base.h
+--- a/drivers/net/wireless/ath5k/base.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/base.h        Wed May 06 16:56:28 2009 +0100
+@@ -132,11 +132,12 @@
        size_t                  desc_len;       /* size of TX/RX descriptors */
        u16                     cachelsz;       /* cache line size */
  
@@ -261052,23 +260973,24 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/base.h linux-2.6.27.19-5.1/dr
  
        unsigned int            filter_flags;   /* HW flags, AR5K_RX_FILTER_* */
        unsigned int            curmode;        /* current phy mode */
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/hw.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/hw.c
---- linux-2.6.27/drivers/net/wireless/ath5k/hw.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/hw.c        2009-03-25 16:11:09.000000000 +0000
-@@ -826,9 +826,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, 
+diff -r 9608d5473017 drivers/net/wireless/ath5k/hw.c
+--- a/drivers/net/wireless/ath5k/hw.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/hw.c  Wed May 06 16:56:28 2009 +0100
+@@ -826,9 +826,10 @@
                mdelay(1);
  
                /*
 -               * Write some more initial register settings
-+               * Write some more initial register settings for revised chips
-                */
+-               */
 -              if (ah->ah_version == AR5K_AR5212) {
++               * Write some more initial register settings for revised chips
++               */
 +              if (ah->ah_version == AR5K_AR5212 &&
 +                  ah->ah_phy_revision > 0x41) {
                        ath5k_hw_reg_write(ah, 0x0002a002, 0x982c);
  
                        if (channel->hw_value == CHANNEL_G)
-@@ -847,19 +848,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, 
+@@ -847,19 +848,10 @@
                        else
                                ath5k_hw_reg_write(ah, 0x00000000, 0x994c);
  
@@ -261092,7 +261014,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/hw.c linux-2.6.27.19-5.1/driv
  
                        /* Just write 0x9b5 ? */
                        /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */
-@@ -1139,9 +1131,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, 
+@@ -1139,9 +1131,7 @@
         *
         * XXX: Find an interval that's OK for all cards...
         */
@@ -261103,10 +261025,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/hw.c linux-2.6.27.19-5.1/driv
  
        /*
         * Reset queues and start beacon timers at the end of the reset routine
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/initvals.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/initvals.c
---- linux-2.6.27/drivers/net/wireless/ath5k/initvals.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/initvals.c  2009-03-25 16:11:09.000000000 +0000
-@@ -810,6 +810,8 @@ static const struct ath5k_ini_mode ar521
+diff -r 9608d5473017 drivers/net/wireless/ath5k/initvals.c
+--- a/drivers/net/wireless/ath5k/initvals.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/initvals.c    Wed May 06 16:56:28 2009 +0100
+@@ -810,6 +810,8 @@
                { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
        { AR5K_PHY(642),
                { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } },
@@ -261115,10 +261037,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/initvals.c linux-2.6.27.19-5.
        { 0xa23c,
                { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } },
  };
-diff -purN linux-2.6.27/drivers/net/wireless/ath5k/phy.c linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/phy.c
---- linux-2.6.27/drivers/net/wireless/ath5k/phy.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath5k/phy.c       2009-03-25 16:11:09.000000000 +0000
-@@ -2193,9 +2193,7 @@ static int ath5k_hw_rf5110_calibrate(str
+diff -r 9608d5473017 drivers/net/wireless/ath5k/phy.c
+--- a/drivers/net/wireless/ath5k/phy.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath5k/phy.c Wed May 06 16:56:28 2009 +0100
+@@ -2193,9 +2193,7 @@
                return ret;
        }
  
@@ -261129,10 +261051,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath5k/phy.c linux-2.6.27.19-5.1/dri
  
        /*
         * Re-enable RX/TX and beacons
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/core.h linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/core.h
---- linux-2.6.27/drivers/net/wireless/ath9k/core.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/core.h      2009-03-25 16:11:09.000000000 +0000
-@@ -316,7 +316,7 @@ void ath_descdma_cleanup(struct ath_soft
+diff -r 9608d5473017 drivers/net/wireless/ath9k/core.h
+--- a/drivers/net/wireless/ath9k/core.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/core.h        Wed May 06 16:56:28 2009 +0100
+@@ -316,7 +316,7 @@
  #define ATH_RX_TIMEOUT           40      /* 40 milliseconds */
  #define WME_NUM_TID              16
  #define IEEE80211_BAR_CTL_TID_M  0xF000  /* tid mask */
@@ -261141,10 +261063,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/core.h linux-2.6.27.19-5.1/dr
  
  enum ATH_RX_TYPE {
        ATH_RX_NON_CONSUMED = 0,
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/hw.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/hw.c
---- linux-2.6.27/drivers/net/wireless/ath9k/hw.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/hw.c        2009-03-25 16:11:09.000000000 +0000
-@@ -729,7 +729,7 @@ ath9k_hw_eeprom_set_board_values(struct 
+diff -r 9608d5473017 drivers/net/wireless/ath9k/hw.c
+--- a/drivers/net/wireless/ath9k/hw.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/hw.c  Wed May 06 16:56:28 2009 +0100
+@@ -729,7 +729,7 @@
                                          AR_AN_TOP2_LOCALBIAS,
                                          AR_AN_TOP2_LOCALBIAS_S,
                                          pModal->local_bias);
@@ -261153,10 +261075,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/hw.c linux-2.6.27.19-5.1/driv
                        pModal->force_xpaon);
                REG_RMW_FIELD(ah, AR_PHY_XPA_CFG, AR_PHY_FORCE_XPA_CFG,
                              pModal->force_xpaon);
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/main.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/main.c
---- linux-2.6.27/drivers/net/wireless/ath9k/main.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/main.c      2009-03-25 16:11:09.000000000 +0000
-@@ -1007,6 +1007,11 @@ static int ath9k_ampdu_action(struct iee
+diff -r 9608d5473017 drivers/net/wireless/ath9k/main.c
+--- a/drivers/net/wireless/ath9k/main.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/main.c        Wed May 06 16:56:28 2009 +0100
+@@ -1007,6 +1007,11 @@
        return ret;
  }
  
@@ -261168,7 +261090,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/main.c linux-2.6.27.19-5.1/dr
  static struct ieee80211_ops ath9k_ops = {
        .tx                 = ath9k_tx,
        .start              = ath9k_start,
-@@ -1031,7 +1036,8 @@ static struct ieee80211_ops ath9k_ops = 
+@@ -1031,7 +1036,8 @@
        .get_tsf            = ath9k_get_tsf,
        .reset_tsf          = ath9k_reset_tsf,
        .tx_last_beacon     = NULL,
@@ -261178,10 +261100,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/main.c linux-2.6.27.19-5.1/dr
  };
  
  void ath_get_beaconconfig(struct ath_softc *sc,
-diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/recv.c
---- linux-2.6.27/drivers/net/wireless/ath9k/recv.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ath9k/recv.c      2009-03-25 16:11:09.000000000 +0000
-@@ -52,7 +52,7 @@ static void ath_rx_buf_link(struct ath_s
+diff -r 9608d5473017 drivers/net/wireless/ath9k/recv.c
+--- a/drivers/net/wireless/ath9k/recv.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ath9k/recv.c        Wed May 06 16:56:28 2009 +0100
+@@ -52,7 +52,7 @@
        /* setup rx descriptors */
        ath9k_hw_setuprxdesc(ah,
                             ds,
@@ -261190,7 +261112,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/dr
                             0);
  
        if (sc->sc_rxlink == NULL)
-@@ -1011,7 +1011,7 @@ int ath_rx_tasklet(struct ath_softc *sc,
+@@ -1011,7 +1011,7 @@
  
                pci_dma_sync_single_for_cpu(sc->pdev,
                                            bf->bf_buf_addr,
@@ -261199,7 +261121,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/dr
                                            PCI_DMA_FROMDEVICE);
                pci_unmap_single(sc->pdev,
                                 bf->bf_buf_addr,
-@@ -1303,8 +1303,7 @@ dma_addr_t ath_skb_map_single(struct ath
+@@ -1303,8 +1303,7 @@
         * NB: do NOT use skb->len, which is 0 on initialization.
         * Use skb's entire data area instead.
         */
@@ -261209,7 +261131,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/dr
        return *pa;
  }
  
-@@ -1314,6 +1313,5 @@ void ath_skb_unmap_single(struct ath_sof
+@@ -1314,6 +1313,5 @@
                          dma_addr_t *pa)
  {
        /* Unmap skb's entire data area */
@@ -261217,10 +261139,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ath9k/recv.c linux-2.6.27.19-5.1/dr
 -              skb_end_pointer(skb) - skb->head, direction);
 +      pci_unmap_single(sc->pdev, *pa, sc->sc_rxbufsize, direction);
  }
-diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/leds.c linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/leds.c
---- linux-2.6.27/drivers/net/wireless/b43legacy/leds.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/leds.c  2009-03-25 16:11:08.000000000 +0000
-@@ -146,12 +146,12 @@ static void b43legacy_map_led(struct b43
+diff -r 9608d5473017 drivers/net/wireless/b43legacy/leds.c
+--- a/drivers/net/wireless/b43legacy/leds.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/b43legacy/leds.c    Wed May 06 16:56:28 2009 +0100
+@@ -146,12 +146,12 @@
        case B43legacy_LED_TRANSFER:
        case B43legacy_LED_APTRANSFER:
                snprintf(name, sizeof(name),
@@ -261235,7 +261157,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/leds.c linux-2.6.27.19-5.
                b43legacy_register_led(dev, &dev->led_rx, name,
                                 ieee80211_get_rx_led_name(hw),
                                 led_index, activelow);
-@@ -161,7 +161,7 @@ static void b43legacy_map_led(struct b43
+@@ -161,7 +161,7 @@
        case B43legacy_LED_RADIO_B:
        case B43legacy_LED_MODE_BG:
                snprintf(name, sizeof(name),
@@ -261244,7 +261166,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/leds.c linux-2.6.27.19-5.
                b43legacy_register_led(dev, &dev->led_radio, name,
                                 b43legacy_rfkill_led_name(dev),
                                 led_index, activelow);
-@@ -172,7 +172,7 @@ static void b43legacy_map_led(struct b43
+@@ -172,7 +172,7 @@
        case B43legacy_LED_WEIRD:
        case B43legacy_LED_ASSOC:
                snprintf(name, sizeof(name),
@@ -261253,10 +261175,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/leds.c linux-2.6.27.19-5.
                b43legacy_register_led(dev, &dev->led_assoc, name,
                                 ieee80211_get_assoc_led_name(hw),
                                 led_index, activelow);
-diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/xmit.c linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/xmit.c
---- linux-2.6.27/drivers/net/wireless/b43legacy/xmit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/b43legacy/xmit.c  2009-03-25 16:11:08.000000000 +0000
-@@ -626,7 +626,7 @@ void b43legacy_handle_hwtxstatus(struct 
+diff -r 9608d5473017 drivers/net/wireless/b43legacy/xmit.c
+--- a/drivers/net/wireless/b43legacy/xmit.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/b43legacy/xmit.c    Wed May 06 16:56:28 2009 +0100
+@@ -626,7 +626,7 @@
        tmp = hw->count;
        status.frame_count = (tmp >> 4);
        status.rts_count = (tmp & 0x0F);
@@ -261265,10 +261187,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/b43legacy/xmit.c linux-2.6.27.19-5.
        status.supp_reason = ((tmp & 0x1C) >> 2);
        status.pm_indicated = !!(tmp & 0x80);
        status.intermediate = !!(tmp & 0x40);
-diff -purN linux-2.6.27/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.27.19-5.1/drivers/net/wireless/hostap/hostap_wlan.h
---- linux-2.6.27/drivers/net/wireless/hostap/hostap_wlan.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/hostap/hostap_wlan.h      2009-03-25 16:11:08.000000000 +0000
-@@ -918,9 +918,12 @@ struct hostap_interface {
+diff -r 9608d5473017 drivers/net/wireless/hostap/hostap_wlan.h
+--- a/drivers/net/wireless/hostap/hostap_wlan.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/hostap/hostap_wlan.h        Wed May 06 16:56:28 2009 +0100
+@@ -918,9 +918,12 @@
  
  /*
   * TX meta data - stored in skb->cb buffer, so this must not be increased over
@@ -261282,10 +261204,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.27.1
        u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */
        u8 rate; /* transmit rate */
  #define HOSTAP_TX_FLAGS_WDS BIT(0)
-diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.c
---- linux-2.6.27/drivers/net/wireless/ipw2200.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.c 2009-03-25 16:11:08.000000000 +0000
-@@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(str
+diff -r 9608d5473017 drivers/net/wireless/ipw2200.c
+--- a/drivers/net/wireless/ipw2200.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ipw2200.c   Wed May 06 16:56:28 2009 +0100
+@@ -4346,7 +4346,8 @@
                return;
        }
  
@@ -261295,7 +261217,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drive
                /* Stop scan to keep fw from getting
                 * stuck (only if we aren't roaming --
                 * otherwise we'll never scan more than 2 or 3
-@@ -6276,6 +6277,20 @@ static void ipw_add_scan_channels(struct
+@@ -6276,6 +6277,20 @@
        }
  }
  
@@ -261316,7 +261238,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drive
  static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
  {
        struct ipw_scan_request_ext scan;
-@@ -6319,16 +6334,16 @@ static int ipw_request_scan_helper(struc
+@@ -6319,16 +6334,16 @@
        scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));
  
        if (type == IW_SCAN_TYPE_PASSIVE) {
@@ -261337,7 +261259,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drive
                scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
                        cpu_to_le16(30);
        else
-@@ -6338,7 +6353,8 @@ static int ipw_request_scan_helper(struc
+@@ -6338,7 +6353,8 @@
        scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =
                cpu_to_le16(20);
  
@@ -261347,7 +261269,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drive
        scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);
  
  #ifdef CONFIG_IPW2200_MONITOR
-@@ -10190,6 +10206,11 @@ static int ipw_tx_skb(struct ipw_priv *p
+@@ -10190,6 +10206,11 @@
        u16 remaining_bytes;
        int fc;
  
@@ -261359,10 +261281,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.c linux-2.6.27.19-5.1/drive
        hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
        switch (priv->ieee->iw_mode) {
        case IW_MODE_ADHOC:
-diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.h linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.h
---- linux-2.6.27/drivers/net/wireless/ipw2200.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/ipw2200.h 2009-03-25 16:11:08.000000000 +0000
-@@ -244,6 +244,7 @@ enum connection_manager_assoc_states {
+diff -r 9608d5473017 drivers/net/wireless/ipw2200.h
+--- a/drivers/net/wireless/ipw2200.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/ipw2200.h   Wed May 06 16:56:28 2009 +0100
+@@ -244,6 +244,7 @@
  #define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED       31
  
  #define HOST_NOTIFICATION_STATUS_BEACON_MISSING         1
@@ -261370,10 +261292,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/ipw2200.h linux-2.6.27.19-5.1/drive
  #define IPW_MB_ROAMING_THRESHOLD_MIN                    1
  #define IPW_MB_ROAMING_THRESHOLD_DEFAULT                8
  #define IPW_MB_ROAMING_THRESHOLD_MAX                    30
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-led.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-led.c    2009-03-25 16:11:08.000000000 +0000
-@@ -317,7 +317,7 @@ int iwl3945_led_register(struct iwl3945_
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945-led.c
+--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c      Wed May 06 16:56:28 2009 +0100
+@@ -317,7 +317,7 @@
  
        trigger = ieee80211_get_radio_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_RADIO].name,
@@ -261382,7 +261304,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27
                 wiphy_name(priv->hw->wiphy));
  
        priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
-@@ -333,7 +333,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -333,7 +333,7 @@
  
        trigger = ieee80211_get_assoc_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
@@ -261391,7 +261313,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl3945_led_register_led(priv,
-@@ -350,7 +350,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -350,7 +350,7 @@
  
        trigger = ieee80211_get_rx_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_RX].name,
@@ -261400,7 +261322,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl3945_led_register_led(priv,
-@@ -366,7 +366,7 @@ int iwl3945_led_register(struct iwl3945_
+@@ -366,7 +366,7 @@
  
        trigger = ieee80211_get_tx_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_TX].name,
@@ -261409,10 +261331,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-led.c linux-2.6.27
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl3945_led_register_led(priv,
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945-rs.c     2009-03-25 16:11:08.000000000 +0000
-@@ -652,7 +652,8 @@ static void rs_get_rate(void *priv_rate,
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c       Wed May 06 16:56:28 2009 +0100
+@@ -652,7 +652,8 @@
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
        struct sta_info *sta;
@@ -261422,7 +261344,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c linux-2.6.27.
        struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate;
        DECLARE_MAC_BUF(mac);
  
-@@ -661,6 +662,8 @@ static void rs_get_rate(void *priv_rate,
+@@ -661,6 +662,8 @@
        rcu_read_lock();
  
        sta = sta_info_get(local, hdr->addr1);
@@ -261431,7 +261353,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c linux-2.6.27.
  
        /* Send management frames and broadcast/multicast data using lowest
         * rate. */
-@@ -669,12 +672,14 @@ static void rs_get_rate(void *priv_rate,
+@@ -669,12 +672,14 @@
            is_multicast_ether_addr(hdr->addr1) ||
            !sta || !sta->rate_ctrl_priv) {
                IWL_DEBUG_RATE("leave: No STA priv data to update!\n");
@@ -261448,10 +261370,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945-rs.c linux-2.6.27.
        index = min(sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1);
  
        if (sband->band == IEEE80211_BAND_5GHZ)
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-3945.h        2009-03-25 16:11:08.000000000 +0000
-@@ -893,6 +893,7 @@ struct iwl3945_priv {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-3945.h
+--- a/drivers/net/wireless/iwlwifi/iwl-3945.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-3945.h  Wed May 06 16:56:28 2009 +0100
+@@ -893,6 +893,7 @@
        struct delayed_work alive_start;
        struct delayed_work activity_timer;
        struct delayed_work thermal_periodic;
@@ -261459,10 +261381,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-3945.h linux-2.6.27.19-
        struct delayed_work gather_stats;
        struct delayed_work scan_check;
        struct delayed_work post_associate;
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000-hw.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000-hw.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000-hw.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000-hw.h     2009-03-25 16:11:08.000000000 +0000
-@@ -129,6 +129,13 @@ struct iwl5000_shared {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-5000-hw.h
+--- a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h       Wed May 06 16:56:28 2009 +0100
+@@ -129,6 +129,13 @@
        __le32 padding2;
  } __attribute__ ((packed));
  
@@ -261476,10 +261398,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000-hw.h linux-2.6.27.
  
  #endif /* __iwl_5000_hw_h__ */
  
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-5000.c        2009-03-25 16:11:08.000000000 +0000
-@@ -445,48 +445,6 @@ static int iwl5000_send_Xtal_calib(struc
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-5000.c
+--- a/drivers/net/wireless/iwlwifi/iwl-5000.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c  Wed May 06 16:56:28 2009 +0100
+@@ -445,48 +445,6 @@
                                sizeof(cal_cmd), &cal_cmd);
  }
  
@@ -261528,7 +261450,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.27.19-
  static int iwl5000_send_calib_cfg(struct iwl_priv *priv)
  {
        struct iwl5000_calib_cfg_cmd calib_cfg_cmd;
-@@ -511,33 +469,30 @@ static void iwl5000_rx_calib_result(stru
+@@ -511,33 +469,30 @@
        struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
        struct iwl5000_calib_hdr *hdr = (struct iwl5000_calib_hdr *)pkt->u.raw;
        int len = le32_to_cpu(pkt->len) & FH_RSCSR_FRAME_SIZE_MSK;
@@ -261570,7 +261492,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.27.19-
  }
  
  static void iwl5000_rx_calib_complete(struct iwl_priv *priv,
-@@ -832,7 +787,7 @@ static int iwl5000_alive_notify(struct i
+@@ -832,7 +787,7 @@
        iwl5000_send_Xtal_calib(priv);
  
        if (priv->ucode_type == UCODE_RT)
@@ -261579,23 +261501,22 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.27.19-
  
        return 0;
  }
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn-rs.c      2009-03-25 16:11:08.000000000 +0000
-@@ -795,9 +795,12 @@ static void rs_tx_status(void *priv_rate
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c        Wed May 06 16:56:28 2009 +0100
+@@ -795,8 +795,11 @@
        u8 active_index = 0;
        __le16 fc = hdr->frame_control;
        s32 tpt = 0;
 +      struct ieee80211_supported_band *sband;
  
        IWL_DEBUG_RATE_LIMIT("get frame ack response, update rate scale window\n");
-+      sband = local->hw.wiphy->bands[info->band];
 +
++      sband = local->hw.wiphy->bands[info->band];
        if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
                return;
-@@ -965,7 +968,8 @@ static void rs_tx_status(void *priv_rate
+@@ -965,7 +968,8 @@
        }
  
        /* See if there's a better rate or modulation mode to try. */
@@ -261605,7 +261526,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.27.1
  out:
        rcu_read_unlock();
        return;
-@@ -2090,19 +2094,25 @@ static void rs_get_rate(void *priv_rate,
+@@ -2090,19 +2094,25 @@
        __le16 fc;
        struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
        struct iwl_lq_sta *lq_sta;
@@ -261632,10 +261553,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn-rs.c linux-2.6.27.1
                goto out;
        }
  
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-03-25 16:11:08.000000000 +0000
-@@ -1334,16 +1334,6 @@ static void iwl_setup_rx_handlers(struct
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-agn.c
+--- a/drivers/net/wireless/iwlwifi/iwl-agn.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c   Wed May 06 16:56:28 2009 +0100
+@@ -1334,16 +1334,6 @@
        priv->cfg->ops->lib->rx_handler_setup(priv);
  }
  
@@ -261652,7 +261573,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  /**
   * iwl_rx_handle - Main entry function for receiving responses from uCode
   *
-@@ -1384,7 +1374,7 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1384,7 +1374,7 @@
  
                rxq->queue[i] = NULL;
  
@@ -261661,7 +261582,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                                            priv->hw_params.rx_buf_size,
                                            PCI_DMA_FROMDEVICE);
                pkt = (struct iwl_rx_packet *)rxb->skb->data;
-@@ -1436,8 +1426,8 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1436,8 +1426,8 @@
                        rxb->skb = NULL;
                }
  
@@ -261672,7 +261593,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                                 PCI_DMA_FROMDEVICE);
                spin_lock_irqsave(&rxq->lock, flags);
                list_add_tail(&rxb->list, &priv->rxq.rx_used);
-@@ -1449,7 +1439,7 @@ void iwl_rx_handle(struct iwl_priv *priv
+@@ -1449,7 +1439,7 @@
                        count++;
                        if (count >= 8) {
                                priv->rxq.read = i;
@@ -261681,7 +261602,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                                count = 0;
                        }
                }
-@@ -1653,11 +1643,17 @@ static void iwl4965_irq_tasklet(struct i
+@@ -1653,11 +1643,17 @@
                                hw_rf_kill ? "disable radio":"enable radio");
  
                /* driver only loads ucode once setting the interface up.
@@ -261704,7 +261625,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
                handled |= CSR_INT_BIT_RF_KILL;
        }
-@@ -2090,7 +2086,6 @@ static void iwl_alive_start(struct iwl_p
+@@ -2090,7 +2086,6 @@
                iwl4965_error_recovery(priv);
  
        iwl_power_update_mode(priv, 1);
@@ -261712,7 +261633,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
                iwl4965_set_mode(priv, priv->iw_mode);
-@@ -2342,6 +2337,7 @@ static void iwl_bg_alive_start(struct wo
+@@ -2342,6 +2337,7 @@
        mutex_lock(&priv->mutex);
        iwl_alive_start(priv);
        mutex_unlock(&priv->mutex);
@@ -261720,7 +261641,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  }
  
  static void iwl4965_bg_rf_kill(struct work_struct *work)
-@@ -2359,7 +2355,8 @@ static void iwl4965_bg_rf_kill(struct wo
+@@ -2359,7 +2355,8 @@
                IWL_DEBUG(IWL_DL_RF_KILL,
                          "HW and/or SW RF Kill no longer active, restarting "
                          "device\n");
@@ -261730,7 +261651,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                        queue_work(priv->workqueue, &priv->restart);
        } else {
                /* make sure mac80211 stop sending Tx frame */
-@@ -2486,6 +2483,7 @@ static void iwl4965_post_associate(struc
+@@ -2486,6 +2483,7 @@
        if (!priv->vif || !priv->is_open)
                return;
  
@@ -261738,7 +261659,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        iwl_scan_cancel_timeout(priv, 200);
  
        conf = ieee80211_get_hw_conf(priv->hw);
-@@ -2503,8 +2501,7 @@ static void iwl4965_post_associate(struc
+@@ -2503,8 +2501,7 @@
  
        priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
  
@@ -261748,39 +261669,42 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        iwl_set_rxon_chain(priv);
        priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
-@@ -2550,10 +2547,6 @@ static void iwl4965_post_associate(struc
+@@ -2550,18 +2547,19 @@
                break;
        }
  
--      /* Enable Rx differential gain and sensitivity calibrations */
--      iwl_chain_noise_reset(priv);
--      priv->start_calib = 1;
--
-       if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
-               priv->assoc_station_added = 1;
-@@ -2561,7 +2554,12 @@ static void iwl4965_post_associate(struc
-       iwl_activate_qos(priv, 0);
-       spin_unlock_irqrestore(&priv->lock, flags);
--      iwl_power_update_mode(priv, 0);
-+      iwl_power_enable_management(priv);
++      if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
++              priv->assoc_station_added = 1;
 +
-+      /* Enable Rx differential gain and sensitivity calibrations */
-+      iwl_chain_noise_reset(priv);
-+      priv->start_calib = 1;
++      spin_lock_irqsave(&priv->lock, flags);
++      iwl_activate_qos(priv, 0);
++      spin_unlock_irqrestore(&priv->lock, flags);
 +
++      iwl_power_enable_management(priv);
++
+       /* Enable Rx differential gain and sensitivity calibrations */
+       iwl_chain_noise_reset(priv);
+       priv->start_calib = 1;
+-      if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
+-              priv->assoc_station_added = 1;
+-
+-      spin_lock_irqsave(&priv->lock, flags);
+-      iwl_activate_qos(priv, 0);
+-      spin_unlock_irqrestore(&priv->lock, flags);
+-
+-      iwl_power_update_mode(priv, 0);
        /* we have just associated, don't start scan too early */
        priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
  }
-@@ -2602,31 +2600,9 @@ static int iwl4965_mac_start(struct ieee
+@@ -2602,30 +2600,8 @@
  {
        struct iwl_priv *priv = hw->priv;
        int ret;
 -      u16 pci_cmd;
-       IWL_DEBUG_MAC80211("enter\n");
+-
+-      IWL_DEBUG_MAC80211("enter\n");
+-
 -      if (pci_enable_device(priv->pci_dev)) {
 -              IWL_ERROR("Fail to pci_enable_device\n");
 -              return -ENODEV;
@@ -261801,11 +261725,12 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
 -              IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
 -              goto out_disable_msi;
 -      }
--
++
++      IWL_DEBUG_MAC80211("enter\n");
        /* we should be verifying the device is ready to be opened */
        mutex_lock(&priv->mutex);
-@@ -2639,7 +2615,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2639,7 +2615,7 @@
                if (ret) {
                        IWL_ERROR("Could not read microcode: %d\n", ret);
                        mutex_unlock(&priv->mutex);
@@ -261814,7 +261739,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                }
        }
  
-@@ -2650,7 +2626,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2650,7 +2626,7 @@
        iwl_rfkill_set_hw_state(priv);
  
        if (ret)
@@ -261823,7 +261748,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        if (iwl_is_rfkill(priv))
                goto out;
-@@ -2669,8 +2645,7 @@ static int iwl4965_mac_start(struct ieee
+@@ -2669,8 +2645,7 @@
                if (!test_bit(STATUS_READY, &priv->status)) {
                        IWL_ERROR("START_ALIVE timeout after %dms.\n",
                                jiffies_to_msecs(UCODE_READY_TIMEOUT));
@@ -261833,7 +261758,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                }
        }
  
-@@ -2678,15 +2653,6 @@ out:
+@@ -2678,15 +2653,6 @@
        priv->is_open = 1;
        IWL_DEBUG_MAC80211("leave\n");
        return 0;
@@ -261849,7 +261774,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  }
  
  static void iwl4965_mac_stop(struct ieee80211_hw *hw)
-@@ -2714,10 +2680,10 @@ static void iwl4965_mac_stop(struct ieee
+@@ -2714,10 +2680,10 @@
        iwl4965_down(priv);
  
        flush_workqueue(priv->workqueue);
@@ -261864,7 +261789,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        IWL_DEBUG_MAC80211("leave\n");
  }
-@@ -3212,18 +3178,26 @@ static int iwl4965_mac_hw_scan(struct ie
+@@ -3212,18 +3178,26 @@
                goto out_unlock;
        }
  
@@ -261897,7 +261822,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        if (len) {
                IWL_DEBUG_SCAN("direct scan for %s [%d]\n ",
                               iwl_escape_essid(ssid, len), (int)len);
-@@ -3266,7 +3240,11 @@ static void iwl4965_mac_update_tkip_key(
+@@ -3266,7 +3240,11 @@
                return;
        }
  
@@ -261910,7 +261835,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
        key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
-@@ -3546,6 +3524,16 @@ static void iwl4965_mac_reset_tsf(struct
+@@ -3546,6 +3524,16 @@
        /* Per mac80211.h: This is only used in IBSS mode... */
        if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) {
  
@@ -261927,7 +261852,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                IWL_DEBUG_MAC80211("leave - not in IBSS\n");
                mutex_unlock(&priv->mutex);
                return;
-@@ -4083,6 +4071,7 @@ static void iwl_setup_deferred_work(stru
+@@ -4083,6 +4071,7 @@
        /* FIXME : remove when resolved PENDING */
        INIT_WORK(&priv->scan_completed, iwl_bg_scan_completed);
        iwl_setup_scan_deferred_work(priv);
@@ -261935,7 +261860,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        if (priv->cfg->ops->lib->setup_deferred_work)
                priv->cfg->ops->lib->setup_deferred_work(priv);
-@@ -4102,6 +4091,7 @@ static void iwl_cancel_deferred_work(str
+@@ -4102,6 +4091,7 @@
  
        cancel_delayed_work_sync(&priv->init_alive_start);
        cancel_delayed_work(&priv->scan_check);
@@ -261943,7 +261868,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        cancel_delayed_work(&priv->alive_start);
        cancel_work_sync(&priv->beacon_update);
        del_timer_sync(&priv->statistics_periodic);
-@@ -4161,6 +4151,7 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4161,6 +4151,7 @@
        struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
        unsigned long flags;
        DECLARE_MAC_BUF(mac);
@@ -261951,7 +261876,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        /************************
         * 1. Allocating HW data
-@@ -4204,13 +4195,13 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4204,13 +4195,13 @@
  
        pci_set_master(pdev);
  
@@ -261969,7 +261894,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
                /* both attempts failed: */
                if (err) {
                        printk(KERN_WARNING "%s: No suitable DMA available.\n",
-@@ -4305,26 +4296,36 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4305,26 +4296,36 @@
        iwl4965_disable_interrupts(priv);
        spin_unlock_irqrestore(&priv->lock, flags);
  
@@ -261985,10 +261910,11 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        if (err) {
                IWL_ERROR("failed to create sysfs device attributes\n");
 -              goto out_uninit_drv;
+-      }
+-
 +              goto out_free_irq;
-       }
++      }
  
--
        iwl_setup_deferred_work(priv);
        iwl_setup_rx_handlers(priv);
  
@@ -262015,16 +261941,17 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        err = iwl_setup_mac(priv);
        if (err)
                goto out_remove_sysfs;
-@@ -4333,15 +4334,28 @@ static int iwl4965_pci_probe(struct pci_
+@@ -4332,16 +4333,29 @@
+       err = iwl_dbgfs_register(priv, DRV_NAME);
        if (err)
                IWL_ERROR("failed to create debugfs files\n");
++
 +      /* If platform's RF_KILL switch is NOT set to KILL */
 +      if (iwl_read32(priv, CSR_GP_CNTRL) & CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
 +              clear_bit(STATUS_RF_KILL_HW, &priv->status);
 +      else
 +              set_bit(STATUS_RF_KILL_HW, &priv->status);
-+
        err = iwl_rfkill_init(priv);
        if (err)
                IWL_ERROR("Unable to initialize RFKILL system. "
@@ -262044,7 +261971,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
   out_uninit_drv:
        iwl_uninit_drv(priv);
   out_free_eeprom:
-@@ -4413,6 +4427,8 @@ static void __devexit iwl4965_pci_remove
+@@ -4413,6 +4427,8 @@
        destroy_workqueue(priv->workqueue);
        priv->workqueue = NULL;
  
@@ -262053,7 +261980,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        pci_iounmap(pdev, priv->hw_base);
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-@@ -4438,6 +4454,8 @@ static int iwl4965_pci_suspend(struct pc
+@@ -4438,6 +4454,8 @@
                priv->is_open = 1;
        }
  
@@ -262062,7 +261989,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
        pci_set_power_state(pdev, PCI_D3hot);
  
        return 0;
-@@ -4448,6 +4466,9 @@ static int iwl4965_pci_resume(struct pci
+@@ -4448,6 +4466,9 @@
        struct iwl_priv *priv = pci_get_drvdata(pdev);
  
        pci_set_power_state(pdev, PCI_D0);
@@ -262072,13 +261999,14 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-agn.c linux-2.6.27.19-5
  
        if (priv->is_open)
                iwl4965_mac_start(priv->hw);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-calib.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-calib.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-calib.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-calib.c       2009-03-25 16:11:08.000000000 +0000
-@@ -66,6 +66,66 @@
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-calib.c
+--- a/drivers/net/wireless/iwlwifi/iwl-calib.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-calib.c Wed May 06 16:56:28 2009 +0100
+@@ -65,6 +65,66 @@
+ #include "iwl-dev.h"
  #include "iwl-core.h"
  #include "iwl-calib.h"
++
 +/*****************************************************************************
 + * INIT calibrations framework
 + *****************************************************************************/
@@ -262138,24 +262066,23 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-calib.c linux-2.6.27.19
 +/*****************************************************************************
 + * RUNTIME calibrations framework
 + *****************************************************************************/
-+
  /* "false alarms" are signals that our DSP tries to lock onto,
   *   but then determines that they are either noise, or transmissions
-  *   from a distant wireless network (also "noise", really) that get
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.c        2009-03-25 16:11:08.000000000 +0000
-@@ -290,6 +290,9 @@ void iwl_clear_stations_table(struct iwl
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-core.c
+--- a/drivers/net/wireless/iwlwifi/iwl-core.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-core.c  Wed May 06 16:56:28 2009 +0100
+@@ -289,6 +289,9 @@
        priv->num_stations = 0;
        memset(priv->stations, 0, sizeof(priv->stations));
++
 +      /* clean ucode key table bit map */
 +      priv->ucode_key_table = 0;
-+
        spin_unlock_irqrestore(&priv->sta_lock, flags);
  }
- EXPORT_SYMBOL(iwl_clear_stations_table);
-@@ -646,8 +649,14 @@ void iwl_set_rxon_ht(struct iwl_priv *pr
+@@ -646,8 +649,14 @@
        struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
        u32 val;
  
@@ -262171,7 +262098,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.27.19-
  
        /* Set up channel bandwidth:  20 MHz only, or 20/40 mixed if fat ok */
        if (iwl_is_fat_tx_allowed(priv, NULL))
-@@ -950,22 +959,6 @@ err:
+@@ -950,22 +959,6 @@
  }
  EXPORT_SYMBOL(iwl_init_drv);
  
@@ -262194,7 +262121,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.27.19-
  int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
  {
        int ret = 0;
-@@ -993,10 +986,9 @@ int iwl_set_tx_power(struct iwl_priv *pr
+@@ -993,10 +986,9 @@
  }
  EXPORT_SYMBOL(iwl_set_tx_power);
  
@@ -262206,10 +262133,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.c linux-2.6.27.19-
        iwlcore_free_geos(priv);
        iwl_free_channel_map(priv);
        kfree(priv->scan);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-core.h        2009-03-25 16:11:08.000000000 +0000
-@@ -186,7 +186,6 @@ struct ieee80211_hw *iwl_alloc_all(struc
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-core.h
+--- a/drivers/net/wireless/iwlwifi/iwl-core.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-core.h  Wed May 06 16:56:28 2009 +0100
+@@ -186,7 +186,6 @@
  void iwl_hw_detect(struct iwl_priv *priv);
  
  void iwl_clear_stations_table(struct iwl_priv *priv);
@@ -262217,7 +262144,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h linux-2.6.27.19-
  void iwl_reset_qos(struct iwl_priv *priv);
  void iwl_set_rxon_chain(struct iwl_priv *priv);
  int iwl_set_rxon_channel(struct iwl_priv *priv,
-@@ -291,6 +290,13 @@ int iwl_scan_initiate(struct iwl_priv *p
+@@ -291,6 +290,13 @@
  void iwl_setup_rx_scan_handlers(struct iwl_priv *priv);
  void iwl_setup_scan_deferred_work(struct iwl_priv *priv);
  
@@ -262231,10 +262158,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-core.h linux-2.6.27.19-
  /*****************************************************
   *   S e n d i n g     H o s t     C o m m a n d s   *
   *****************************************************/
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-dev.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-dev.h 2009-03-25 16:11:08.000000000 +0000
-@@ -89,7 +89,8 @@ extern struct iwl_cfg iwl5100_abg_cfg;
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-dev.h
+--- a/drivers/net/wireless/iwlwifi/iwl-dev.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-dev.h   Wed May 06 16:56:28 2009 +0100
+@@ -89,7 +89,8 @@
  #define       DEFAULT_LONG_RETRY_LIMIT  4U
  
  struct iwl_rx_mem_buffer {
@@ -262244,7 +262171,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5
        struct sk_buff *skb;
        struct list_head list;
  };
-@@ -745,13 +746,10 @@ struct statistics_general_data {
+@@ -745,13 +746,10 @@
        u32 beacon_energy_c;
  };
  
@@ -262262,7 +262189,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5
  };
  
  enum ucode_type {
-@@ -813,6 +811,7 @@ enum {
+@@ -813,6 +811,7 @@
  
  
  #define IWL_MAX_NUM_QUEUES    20 /* FIXME: do dynamic allocation */
@@ -262270,7 +262197,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5
  
  struct iwl_priv {
  
-@@ -857,7 +856,7 @@ struct iwl_priv {
+@@ -857,7 +856,7 @@
        s32 last_temperature;
  
        /* init calibration results */
@@ -262279,7 +262206,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5
  
        /* Scan related variables */
        unsigned long last_scan_jiffies;
-@@ -1047,6 +1046,7 @@ struct iwl_priv {
+@@ -1047,6 +1046,7 @@
  
        struct tasklet_struct irq_tasklet;
  
@@ -262287,10 +262214,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.27.19-5
        struct delayed_work init_alive_start;
        struct delayed_work alive_start;
        struct delayed_work scan_check;
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-led.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-led.c 2009-03-25 16:11:08.000000000 +0000
-@@ -353,7 +353,7 @@ int iwl_leds_register(struct iwl_priv *p
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-led.c
+--- a/drivers/net/wireless/iwlwifi/iwl-led.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-led.c   Wed May 06 16:56:28 2009 +0100
+@@ -353,7 +353,7 @@
  
        trigger = ieee80211_get_radio_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_RADIO].name,
@@ -262299,7 +262226,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5
                 wiphy_name(priv->hw->wiphy));
  
        priv->led[IWL_LED_TRG_RADIO].led_on = iwl4965_led_on_reg;
-@@ -367,7 +367,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -367,7 +367,7 @@
  
        trigger = ieee80211_get_assoc_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_ASSOC].name,
@@ -262308,7 +262235,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_ASSOC],
-@@ -383,7 +383,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -383,7 +383,7 @@
  
        trigger = ieee80211_get_rx_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_RX].name,
@@ -262317,7 +262244,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_RX],
-@@ -398,7 +398,7 @@ int iwl_leds_register(struct iwl_priv *p
+@@ -398,7 +398,7 @@
  
        trigger = ieee80211_get_tx_led_name(priv->hw);
        snprintf(priv->led[IWL_LED_TRG_TX].name,
@@ -262326,10 +262253,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-led.c linux-2.6.27.19-5
                 wiphy_name(priv->hw->wiphy));
  
        ret = iwl_leds_register_led(priv, &priv->led[IWL_LED_TRG_TX],
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.c       2009-03-25 16:11:08.000000000 +0000
-@@ -324,7 +324,7 @@ EXPORT_SYMBOL(iwl_power_update_mode);
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-power.c
+--- a/drivers/net/wireless/iwlwifi/iwl-power.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-power.c Wed May 06 16:56:28 2009 +0100
+@@ -324,7 +324,7 @@
   * this will be usefull for rate scale to disable PM during heavy
   * Tx/Rx activities
   */
@@ -262338,7 +262265,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c linux-2.6.27.19
  {
        u16 prev_mode;
        int ret = 0;
-@@ -337,6 +337,11 @@ int iwl_power_disable_management(struct 
+@@ -337,6 +337,11 @@
        ret = iwl_power_update_mode(priv, 0);
        priv->power_data.power_disabled = 1;
        priv->power_data.user_power_setting = prev_mode;
@@ -262350,7 +262277,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c linux-2.6.27.19
  
        return ret;
  }
-@@ -431,3 +436,35 @@ int iwl_power_temperature_change(struct 
+@@ -431,3 +436,35 @@
        return ret;
  }
  EXPORT_SYMBOL(iwl_power_temperature_change);
@@ -262386,10 +262313,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.c linux-2.6.27.19
 +      cancel_delayed_work(&priv->set_power_save);
 +}
 +EXPORT_SYMBOL(iwl_power_cancel_timeout);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.h linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.h
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-power.h       2009-03-25 16:11:08.000000000 +0000
-@@ -78,8 +78,10 @@ struct iwl_power_mgr {
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-power.h
+--- a/drivers/net/wireless/iwlwifi/iwl-power.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-power.h Wed May 06 16:56:28 2009 +0100
+@@ -78,8 +78,10 @@
        u8 power_disabled; /* flag to disable using power saving level */
  };
  
@@ -262401,10 +262328,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-power.h linux-2.6.27.19
  int iwl_power_enable_management(struct iwl_priv *priv);
  int iwl_power_set_user_mode(struct iwl_priv *priv, u16 mode);
  int iwl_power_set_system_mode(struct iwl_priv *priv, u16 mode);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-rx.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-rx.c  2009-03-25 16:11:08.000000000 +0000
-@@ -204,7 +204,7 @@ int iwl_rx_queue_restock(struct iwl_priv
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-rx.c
+--- a/drivers/net/wireless/iwlwifi/iwl-rx.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-rx.c    Wed May 06 16:56:28 2009 +0100
+@@ -204,7 +204,7 @@
                list_del(element);
  
                /* Point to Rx buffer via next RBD in circular buffer */
@@ -262413,7 +262340,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.
                rxq->queue[rxq->write] = rxb;
                rxq->write = (rxq->write + 1) & RX_QUEUE_MASK;
                rxq->free_count--;
-@@ -245,34 +245,52 @@ void iwl_rx_allocate(struct iwl_priv *pr
+@@ -245,34 +245,52 @@
        struct list_head *element;
        struct iwl_rx_mem_buffer *rxb;
        unsigned long flags;
@@ -262479,7 +262406,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.
  }
  EXPORT_SYMBOL(iwl_rx_allocate);
  
-@@ -300,8 +318,8 @@ void iwl_rx_queue_free(struct iwl_priv *
+@@ -300,8 +318,8 @@
        for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) {
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
@@ -262490,7 +262417,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.
                                         PCI_DMA_FROMDEVICE);
                        dev_kfree_skb(rxq->pool[i].skb);
                }
-@@ -354,8 +372,8 @@ void iwl_rx_queue_reset(struct iwl_priv 
+@@ -354,8 +372,8 @@
                 * to an SKB, so we need to unmap and free potential storage */
                if (rxq->pool[i].skb != NULL) {
                        pci_unmap_single(priv->pci_dev,
@@ -262501,10 +262428,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-rx.c linux-2.6.27.19-5.
                                         PCI_DMA_FROMDEVICE);
                        priv->alloc_rxb_skb--;
                        dev_kfree_skb(rxq->pool[i].skb);
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-scan.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-scan.c        2009-03-25 16:11:08.000000000 +0000
-@@ -464,11 +464,6 @@ void iwl_init_scan_params(struct iwl_pri
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-scan.c
+--- a/drivers/net/wireless/iwlwifi/iwl-scan.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-scan.c  Wed May 06 16:56:28 2009 +0100
+@@ -464,11 +464,6 @@
  
  int iwl_scan_initiate(struct iwl_priv *priv)
  {
@@ -262516,7 +262443,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c linux-2.6.27.19-
        if (!iwl_is_ready_rf(priv)) {
                IWL_DEBUG_SCAN("Aborting scan due to not ready.\n");
                return -EIO;
-@@ -480,8 +475,7 @@ int iwl_scan_initiate(struct iwl_priv *p
+@@ -480,8 +475,7 @@
        }
  
        if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
@@ -262526,7 +262453,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c linux-2.6.27.19-
                return -EAGAIN;
        }
  
-@@ -710,7 +704,7 @@ static void iwl_bg_request_scan(struct w
+@@ -710,7 +704,7 @@
        u16 cmd_len;
        enum ieee80211_band band;
        u8 n_probes = 2;
@@ -262535,10 +262462,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-scan.c linux-2.6.27.19-
  
        conf = ieee80211_get_hw_conf(priv->hw);
  
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-sta.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-sta.c 2009-03-25 16:11:08.000000000 +0000
-@@ -475,7 +475,7 @@ static int iwl_get_free_ucode_key_index(
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-sta.c
+--- a/drivers/net/wireless/iwlwifi/iwl-sta.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-sta.c   Wed May 06 16:56:28 2009 +0100
+@@ -475,7 +475,7 @@
                if (!test_and_set_bit(i, &priv->ucode_key_table))
                        return i;
  
@@ -262547,7 +262474,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5
  }
  
  int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
-@@ -620,6 +620,9 @@ static int iwl_set_wep_dynamic_key_info(
+@@ -620,6 +620,9 @@
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
  
@@ -262557,7 +262484,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5
        priv->stations[sta_id].sta.key.key_flags = key_flags;
        priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
        priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
-@@ -637,6 +640,7 @@ static int iwl_set_ccmp_dynamic_key_info
+@@ -637,6 +640,7 @@
  {
        unsigned long flags;
        __le16 key_flags = 0;
@@ -262565,7 +262492,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5
  
        key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK);
        key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
-@@ -664,14 +668,18 @@ static int iwl_set_ccmp_dynamic_key_info
+@@ -664,14 +668,18 @@
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
  
@@ -262586,34 +262513,34 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-sta.c linux-2.6.27.19-5
  }
  
  static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
-@@ -696,6 +704,9 @@ static int iwl_set_tkip_dynamic_key_info
+@@ -695,6 +703,9 @@
+                                iwl_get_free_ucode_key_index(priv);
        /* else, we are overriding an existing key => no need to allocated room
         * in uCode. */
++
 +      WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
 +              "no space for new kew");
-+
        /* This copy is acutally not needed: we get the key with each TX */
        memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
-@@ -734,6 +745,13 @@ int iwl_remove_dynamic_key(struct iwl_pr
-               return 0;
-       }
-+      if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
-+              IWL_WARNING("Removing wrong key %d 0x%x\n",
-+                          keyconf->keyidx, key_flags);
+@@ -730,6 +741,13 @@
+                * been replaced by another one with different index.
+                * Don't do anything and return ok
+                */
 +              spin_unlock_irqrestore(&priv->sta_lock, flags);
 +              return 0;
 +      }
 +
-       if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
-               &priv->ucode_key_table))
-               IWL_ERROR("index %d not used in uCode key table.\n",
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-tx.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-tx.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-tx.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl-tx.c  2009-03-25 16:11:08.000000000 +0000
-@@ -1192,10 +1192,9 @@ void iwl_tx_cmd_complete(struct iwl_priv
++      if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
++              IWL_WARNING("Removing wrong key %d 0x%x\n",
++                          keyconf->keyidx, key_flags);
+               spin_unlock_irqrestore(&priv->sta_lock, flags);
+               return 0;
+       }
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl-tx.c
+--- a/drivers/net/wireless/iwlwifi/iwl-tx.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl-tx.c    Wed May 06 16:56:29 2009 +0100
+@@ -1192,10 +1192,9 @@
        /* If a Tx command is being handled and it isn't in the actual
         * command queue then there a command routing bug has been introduced
         * in the queue management code. */
@@ -262627,10 +262554,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl-tx.c linux-2.6.27.19-5.
  
        cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge);
        cmd = priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index];
-diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl3945-base.c
---- linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/iwlwifi/iwl3945-base.c    2009-03-25 16:11:08.000000000 +0000
-@@ -5761,7 +5761,6 @@ static void iwl3945_alive_start(struct i
+diff -r 9608d5473017 drivers/net/wireless/iwlwifi/iwl3945-base.c
+--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c      Wed May 06 16:56:29 2009 +0100
+@@ -5761,7 +5761,6 @@
        if (priv->error_recovering)
                iwl3945_error_recovery(priv);
  
@@ -262638,7 +262565,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        return;
  
   restart:
-@@ -6006,6 +6005,7 @@ static void iwl3945_bg_alive_start(struc
+@@ -6006,6 +6005,7 @@
        mutex_lock(&priv->mutex);
        iwl3945_alive_start(priv);
        mutex_unlock(&priv->mutex);
@@ -262646,7 +262573,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
  }
  
  static void iwl3945_bg_rf_kill(struct work_struct *work)
-@@ -6023,7 +6023,8 @@ static void iwl3945_bg_rf_kill(struct wo
+@@ -6023,7 +6023,8 @@
                IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL,
                          "HW and/or SW RF Kill no longer active, restarting "
                          "device\n");
@@ -262656,10 +262583,12 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
                        queue_work(priv->workqueue, &priv->restart);
        } else {
  
-@@ -6040,6 +6041,25 @@ static void iwl3945_bg_rf_kill(struct wo
-       iwl3945_rfkill_set_hw_state(priv);
- }
+@@ -6038,6 +6039,25 @@
  
+       mutex_unlock(&priv->mutex);
+       iwl3945_rfkill_set_hw_state(priv);
++}
++
 +static void iwl3945_rfkill_poll(struct work_struct *data)
 +{
 +      struct iwl3945_priv *priv =
@@ -262677,12 +262606,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
 +      queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
 +                         round_jiffies_relative(2 * HZ));
 +
-+}
-+
+ }
  static void iwl3945_bg_set_monitor(struct work_struct *work)
- {
-       struct iwl3945_priv *priv = container_of(work,
-@@ -6259,6 +6279,11 @@ static void iwl3945_bg_request_scan(stru
+@@ -6259,6 +6279,11 @@
                                direct_mask,
                                (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
  
@@ -262694,10 +262621,11 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        cmd.len += le16_to_cpu(scan->tx_cmd.len) +
            scan->channel_count * sizeof(struct iwl3945_scan_channel);
        cmd.data = scan;
-@@ -6476,20 +6501,6 @@ static int iwl3945_mac_start(struct ieee
+@@ -6475,20 +6500,6 @@
+       int ret;
  
        IWL_DEBUG_MAC80211("enter\n");
+-
 -      if (pci_enable_device(priv->pci_dev)) {
 -              IWL_ERROR("Fail to pci_enable_device\n");
 -              return -ENODEV;
@@ -262711,11 +262639,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
 -              IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq);
 -              goto out_disable_msi;
 -      }
--
        /* we should be verifying the device is ready to be opened */
        mutex_lock(&priv->mutex);
-@@ -6534,15 +6545,15 @@ static int iwl3945_mac_start(struct ieee
+@@ -6534,15 +6545,15 @@
                }
        }
  
@@ -262735,7 +262662,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        priv->is_open = 0;
        IWL_DEBUG_MAC80211("leave - failed\n");
        return ret;
-@@ -6574,10 +6585,10 @@ static void iwl3945_mac_stop(struct ieee
+@@ -6574,10 +6585,10 @@
        iwl3945_down(priv);
  
        flush_workqueue(priv->workqueue);
@@ -262750,7 +262677,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
  
        IWL_DEBUG_MAC80211("leave\n");
  }
-@@ -7771,6 +7782,7 @@ static void iwl3945_setup_deferred_work(
+@@ -7771,6 +7782,7 @@
        INIT_DELAYED_WORK(&priv->init_alive_start, iwl3945_bg_init_alive_start);
        INIT_DELAYED_WORK(&priv->alive_start, iwl3945_bg_alive_start);
        INIT_DELAYED_WORK(&priv->scan_check, iwl3945_bg_scan_check);
@@ -262758,7 +262685,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
  
        iwl3945_hw_setup_deferred_work(priv);
  
-@@ -7983,6 +7995,15 @@ static int iwl3945_pci_probe(struct pci_
+@@ -7983,6 +7995,15 @@
        iwl3945_disable_interrupts(priv);
        spin_unlock_irqrestore(&priv->lock, flags);
  
@@ -262774,7 +262701,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        err = sysfs_create_group(&pdev->dev.kobj, &iwl3945_attribute_group);
        if (err) {
                IWL_ERROR("failed to create sysfs device attributes\n");
-@@ -8032,14 +8053,16 @@ static int iwl3945_pci_probe(struct pci_
+@@ -8032,13 +8053,15 @@
  
        priv->hw->conf.beacon_int = 100;
        priv->mac80211_registered = 1;
@@ -262785,15 +262712,14 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        if (err)
                IWL_ERROR("Unable to initialize RFKILL system. "
                                  "Ignoring error: %d\n", err);
++
 +      /* Start monitoring the killswitch */
 +      queue_delayed_work(priv->workqueue, &priv->rfkill_poll,
 +                         2 * HZ);
-+
        return 0;
  
-  out_free_geos:
-@@ -8050,9 +8073,12 @@ static int iwl3945_pci_probe(struct pci_
+@@ -8050,9 +8073,12 @@
        sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
  
   out_release_irq:
@@ -262806,7 +262732,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
  
   out_iounmap:
        pci_iounmap(pdev, priv->hw_base);
-@@ -8093,6 +8119,8 @@ static void __devexit iwl3945_pci_remove
+@@ -8093,6 +8119,8 @@
        sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);
  
        iwl3945_rfkill_unregister(priv);
@@ -262815,7 +262741,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        iwl3945_dealloc_ucode_pci(priv);
  
        if (priv->rxq.bd)
-@@ -8114,6 +8142,9 @@ static void __devexit iwl3945_pci_remove
+@@ -8114,6 +8142,9 @@
        destroy_workqueue(priv->workqueue);
        priv->workqueue = NULL;
  
@@ -262825,7 +262751,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        pci_iounmap(pdev, priv->hw_base);
        pci_release_regions(pdev);
        pci_disable_device(pdev);
-@@ -8139,7 +8170,8 @@ static int iwl3945_pci_suspend(struct pc
+@@ -8139,7 +8170,8 @@
                iwl3945_mac_stop(priv->hw);
                priv->is_open = 1;
        }
@@ -262835,7 +262761,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
        pci_set_power_state(pdev, PCI_D3hot);
  
        return 0;
-@@ -8150,6 +8182,8 @@ static int iwl3945_pci_resume(struct pci
+@@ -8150,6 +8182,8 @@
        struct iwl3945_priv *priv = pci_get_drvdata(pdev);
  
        pci_set_power_state(pdev, PCI_D0);
@@ -262844,10 +262770,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/iwlwifi/iwl3945-base.c linux-2.6.27
  
        if (priv->is_open)
                iwl3945_mac_start(priv->hw);
-diff -purN linux-2.6.27/drivers/net/wireless/libertas/main.c linux-2.6.27.19-5.1/drivers/net/wireless/libertas/main.c
---- linux-2.6.27/drivers/net/wireless/libertas/main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/libertas/main.c   2009-03-25 16:11:09.000000000 +0000
-@@ -1196,7 +1196,13 @@ void lbs_remove_card(struct lbs_private 
+diff -r 9608d5473017 drivers/net/wireless/libertas/main.c
+--- a/drivers/net/wireless/libertas/main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/libertas/main.c     Wed May 06 16:56:29 2009 +0100
+@@ -1196,7 +1196,13 @@
        cancel_delayed_work_sync(&priv->scan_work);
        cancel_delayed_work_sync(&priv->assoc_work);
        cancel_work_sync(&priv->mcast_work);
@@ -262861,15 +262787,15 @@ diff -purN linux-2.6.27/drivers/net/wireless/libertas/main.c linux-2.6.27.19-5.1
  
        if (priv->psmode == LBS802_11POWERMODEMAX_PSP) {
                priv->psmode = LBS802_11POWERMODECAM;
-@@ -1314,14 +1320,26 @@ void lbs_stop_card(struct lbs_private *p
+@@ -1314,14 +1320,26 @@
                device_remove_file(&dev->dev, &dev_attr_lbs_rtap);
        }
  
--      /* Flush pending command nodes */
 +      /* Delete the timeout of the currently processing command */
-       del_timer_sync(&priv->command_timer);
++      del_timer_sync(&priv->command_timer);
 +
-+      /* Flush pending command nodes */
+       /* Flush pending command nodes */
+-      del_timer_sync(&priv->command_timer);
        spin_lock_irqsave(&priv->driver_lock, flags);
 +      lbs_deb_main("clearing pending commands\n");
        list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
@@ -262889,10 +262815,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/libertas/main.c linux-2.6.27.19-5.1
        spin_unlock_irqrestore(&priv->driver_lock, flags);
  
        unregister_netdev(dev);
-diff -purN linux-2.6.27/drivers/net/wireless/libertas/scan.c linux-2.6.27.19-5.1/drivers/net/wireless/libertas/scan.c
---- linux-2.6.27/drivers/net/wireless/libertas/scan.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/libertas/scan.c   2009-03-25 16:11:09.000000000 +0000
-@@ -598,8 +598,8 @@ static int lbs_process_bss(struct bss_de
+diff -r 9608d5473017 drivers/net/wireless/libertas/scan.c
+--- a/drivers/net/wireless/libertas/scan.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/libertas/scan.c     Wed May 06 16:56:29 2009 +0100
+@@ -598,8 +598,8 @@
  
                switch (elem->id) {
                case MFIE_TYPE_SSID:
@@ -262903,10 +262829,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/libertas/scan.c linux-2.6.27.19-5.1
                        lbs_deb_scan("got SSID IE: '%s', len %u\n",
                                     escape_essid(bss->ssid, bss->ssid_len),
                                     bss->ssid_len);
-diff -purN linux-2.6.27/drivers/net/wireless/p54/p54usb.c linux-2.6.27.19-5.1/drivers/net/wireless/p54/p54usb.c
---- linux-2.6.27/drivers/net/wireless/p54/p54usb.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/p54/p54usb.c      2009-03-25 16:11:08.000000000 +0000
-@@ -53,6 +53,7 @@ static struct usb_device_id p54u_table[]
+diff -r 9608d5473017 drivers/net/wireless/p54/p54usb.c
+--- a/drivers/net/wireless/p54/p54usb.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/p54/p54usb.c        Wed May 06 16:56:29 2009 +0100
+@@ -53,6 +53,7 @@
        {USB_DEVICE(0x050d, 0x7050)},   /* Belkin F5D7050 ver 1000 */
        {USB_DEVICE(0x0572, 0x2000)},   /* Cohiba Proto board */
        {USB_DEVICE(0x0572, 0x2002)},   /* Cohiba Proto board */
@@ -262914,10 +262840,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/p54/p54usb.c linux-2.6.27.19-5.1/dr
        {USB_DEVICE(0x0707, 0xee13)},   /* SMC 2862W-G version 2 */
        {USB_DEVICE(0x083a, 0x4521)},   /* Siemens Gigaset USB Adapter 54 version 2 */
        {USB_DEVICE(0x0846, 0x4240)},   /* Netgear WG111 (v2) */
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2400pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2400pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2400pci.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2400pci.c        2009-03-25 16:11:09.000000000 +0000
-@@ -1241,7 +1241,7 @@ static irqreturn_t rt2400pci_interrupt(i
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2400pci.c
+--- a/drivers/net/wireless/rt2x00/rt2400pci.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2400pci.c  Wed May 06 16:56:29 2009 +0100
+@@ -1241,7 +1241,7 @@
        if (!reg)
                return IRQ_NONE;
  
@@ -262926,10 +262852,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2400pci.c linux-2.6.27.19-
                return IRQ_HANDLED;
  
        /*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2500pci.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500pci.c        2009-03-25 16:11:09.000000000 +0000
-@@ -1377,7 +1377,7 @@ static irqreturn_t rt2500pci_interrupt(i
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2500pci.c
+--- a/drivers/net/wireless/rt2x00/rt2500pci.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2500pci.c  Wed May 06 16:56:29 2009 +0100
+@@ -1377,7 +1377,7 @@
        if (!reg)
                return IRQ_NONE;
  
@@ -262938,10 +262864,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500pci.c linux-2.6.27.19-
                return IRQ_HANDLED;
  
        /*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2500usb.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2500usb.c        2009-03-25 16:11:09.000000000 +0000
-@@ -1297,7 +1297,7 @@ static void rt2500usb_beacondone(struct 
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2500usb.c
+--- a/drivers/net/wireless/rt2x00/rt2500usb.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2500usb.c  Wed May 06 16:56:29 2009 +0100
+@@ -1297,7 +1297,7 @@
        struct queue_entry *entry = (struct queue_entry *)urb->context;
        struct queue_entry_priv_usb_bcn *bcn_priv = entry->priv_data;
  
@@ -262950,10 +262876,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2500usb.c linux-2.6.27.19-
                return;
  
        /*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00.h linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00.h
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00.h   2009-03-25 16:11:09.000000000 +0000
-@@ -599,14 +599,14 @@ enum rt2x00_flags {
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00.h
+--- a/drivers/net/wireless/rt2x00/rt2x00.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00.h     Wed May 06 16:56:29 2009 +0100
+@@ -599,14 +599,14 @@
        /*
         * Device state flags
         */
@@ -262976,10 +262902,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00.h linux-2.6.27.19-5.1
  
        /*
         * Driver features
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00config.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00config.c     2009-03-25 16:11:09.000000000 +0000
-@@ -121,7 +121,7 @@ void rt2x00lib_config_antenna(struct rt2
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00config.c
+--- a/drivers/net/wireless/rt2x00/rt2x00config.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00config.c       Wed May 06 16:56:29 2009 +0100
+@@ -121,7 +121,7 @@
         * Antenna setup changes require the RX to be disabled,
         * else the changes will be ignored by the device.
         */
@@ -262988,7 +262914,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c linux-2.6.27.
                rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK);
  
        /*
-@@ -136,7 +136,7 @@ void rt2x00lib_config_antenna(struct rt2
+@@ -136,7 +136,7 @@
        rt2x00dev->link.ant.active.rx = libconf.ant.rx;
        rt2x00dev->link.ant.active.tx = libconf.ant.tx;
  
@@ -262997,9 +262923,9 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00config.c linux-2.6.27.
                rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK);
  }
  
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00dev.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00dev.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00dev.c
+--- a/drivers/net/wireless/rt2x00/rt2x00dev.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00dev.c  Wed May 06 16:56:29 2009 +0100
 @@ -34,7 +34,7 @@
   */
  void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev)
@@ -263009,7 +262935,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        /*
-@@ -94,8 +94,8 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -94,8 +94,8 @@
         * Don't enable the radio twice.
         * And check if the hardware button has been disabled.
         */
@@ -263020,7 +262946,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return 0;
  
        /*
-@@ -117,7 +117,7 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -117,7 +117,7 @@
        rt2x00leds_led_radio(rt2x00dev, true);
        rt2x00led_led_activity(rt2x00dev, true);
  
@@ -263029,7 +262955,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        /*
         * Enable RX.
-@@ -134,7 +134,7 @@ int rt2x00lib_enable_radio(struct rt2x00
+@@ -134,7 +134,7 @@
  
  void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
  {
@@ -263038,7 +262964,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        /*
-@@ -354,7 +354,7 @@ static void rt2x00lib_link_tuner(struct 
+@@ -354,7 +354,7 @@
         * When the radio is shutting down we should
         * immediately cease all link tuning.
         */
@@ -263047,7 +262973,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        /*
-@@ -431,7 +431,7 @@ static void rt2x00lib_intf_scheduled_ite
+@@ -431,7 +431,7 @@
         * note that in the spinlock protected area above the delayed_flags
         * have been cleared correctly.
         */
@@ -263056,7 +262982,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        if (delayed_flags & DELAYED_UPDATE_BEACON)
-@@ -484,7 +484,7 @@ static void rt2x00lib_beacondone_iter(vo
+@@ -484,7 +484,7 @@
  
  void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
  {
@@ -263065,7 +262991,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw,
-@@ -563,7 +563,7 @@ void rt2x00lib_txdone(struct queue_entry
+@@ -563,7 +563,7 @@
  
        rt2x00dev->ops->lib->init_txentry(rt2x00dev, entry);
  
@@ -263074,7 +263000,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
        rt2x00queue_index_inc(entry->queue, Q_INDEX_DONE);
  
        /*
-@@ -878,7 +878,7 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -878,7 +878,7 @@
  
  static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev)
  {
@@ -263083,17 +263009,17 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                ieee80211_unregister_hw(rt2x00dev->hw);
  
        if (likely(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ])) {
-@@ -894,6 +894,9 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -893,6 +893,9 @@
+ {
        struct hw_mode_spec *spec = &rt2x00dev->spec;
        int status;
++
 +      if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags))
 +              return 0;
-+
        /*
         * Initialize HW modes.
-        */
-@@ -915,7 +918,7 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -915,7 +918,7 @@
                return status;
        }
  
@@ -263102,7 +263028,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        return 0;
  }
-@@ -925,7 +928,7 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -925,7 +928,7 @@
   */
  static void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev)
  {
@@ -263111,7 +263037,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        /*
-@@ -948,7 +951,7 @@ static int rt2x00lib_initialize(struct r
+@@ -948,7 +951,7 @@
  {
        int status;
  
@@ -263120,7 +263046,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return 0;
  
        /*
-@@ -967,7 +970,7 @@ static int rt2x00lib_initialize(struct r
+@@ -967,7 +970,7 @@
                return status;
        }
  
@@ -263129,7 +263055,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        /*
         * Register the extra components.
-@@ -981,7 +984,7 @@ int rt2x00lib_start(struct rt2x00_dev *r
+@@ -981,7 +984,7 @@
  {
        int retval;
  
@@ -263138,7 +263064,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return 0;
  
        /*
-@@ -1012,15 +1015,15 @@ int rt2x00lib_start(struct rt2x00_dev *r
+@@ -1012,15 +1015,15 @@
        rt2x00dev->intf_sta_count = 0;
        rt2x00dev->intf_associated = 0;
  
@@ -263157,7 +263083,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return;
  
        /*
-@@ -1032,8 +1035,6 @@ void rt2x00lib_stop(struct rt2x00_dev *r
+@@ -1032,8 +1035,6 @@
        rt2x00dev->intf_ap_count = 0;
        rt2x00dev->intf_sta_count = 0;
        rt2x00dev->intf_associated = 0;
@@ -263166,7 +263092,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  }
  
  /*
-@@ -1088,7 +1089,7 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1088,7 +1089,7 @@
        rt2x00rfkill_allocate(rt2x00dev);
        rt2x00debug_register(rt2x00dev);
  
@@ -263175,7 +263101,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        return 0;
  
-@@ -1101,7 +1102,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_probe_dev);
+@@ -1101,7 +1102,7 @@
  
  void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
  {
@@ -263184,7 +263110,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        /*
         * Disable radio.
-@@ -1146,14 +1147,15 @@ int rt2x00lib_suspend(struct rt2x00_dev 
+@@ -1146,14 +1147,15 @@
        int retval;
  
        NOTICE(rt2x00dev, "Going to sleep.\n");
@@ -263203,7 +263129,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        /*
         * Disable radio.
-@@ -1225,7 +1227,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1225,7 +1227,7 @@
        /*
         * Only continue if mac80211 had open interfaces.
         */
@@ -263212,7 +263138,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
                return 0;
  
        /*
-@@ -1252,7 +1254,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1252,7 +1254,7 @@
        /*
         * We are ready again to receive requests from mac80211.
         */
@@ -263221,7 +263147,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
  
        /*
         * It is possible that during that mac80211 has attempted
-@@ -1272,7 +1274,7 @@ int rt2x00lib_resume(struct rt2x00_dev *
+@@ -1272,7 +1274,7 @@
        return 0;
  
  exit:
@@ -263230,10 +263156,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00dev.c linux-2.6.27.19-
        rt2x00lib_uninitialize(rt2x00dev);
        rt2x00debug_deregister(rt2x00dev);
  
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00leds.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00leds.c       2009-03-25 16:11:09.000000000 +0000
-@@ -149,7 +149,7 @@ void rt2x00leds_register(struct rt2x00_d
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00leds.c
+--- a/drivers/net/wireless/rt2x00/rt2x00leds.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00leds.c Wed May 06 16:56:29 2009 +0100
+@@ -149,7 +149,7 @@
                 rt2x00dev->ops->name, wiphy_name(rt2x00dev->hw->wiphy));
  
        if (rt2x00dev->led_radio.flags & LED_INITIALIZED) {
@@ -263242,7 +263168,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c linux-2.6.27.19
  
                retval = rt2x00leds_register_led(rt2x00dev,
                                                 &rt2x00dev->led_radio,
-@@ -159,7 +159,7 @@ void rt2x00leds_register(struct rt2x00_d
+@@ -159,7 +159,7 @@
        }
  
        if (rt2x00dev->led_assoc.flags & LED_INITIALIZED) {
@@ -263251,7 +263177,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c linux-2.6.27.19
  
                retval = rt2x00leds_register_led(rt2x00dev,
                                                 &rt2x00dev->led_assoc,
-@@ -169,7 +169,7 @@ void rt2x00leds_register(struct rt2x00_d
+@@ -169,7 +169,7 @@
        }
  
        if (rt2x00dev->led_qual.flags & LED_INITIALIZED) {
@@ -263260,10 +263186,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00leds.c linux-2.6.27.19
  
                retval = rt2x00leds_register_led(rt2x00dev,
                                                 &rt2x00dev->led_qual,
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00mac.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00mac.c        2009-03-25 16:11:09.000000000 +0000
-@@ -106,7 +106,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00mac.c
+--- a/drivers/net/wireless/rt2x00/rt2x00mac.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00mac.c  Wed May 06 16:56:29 2009 +0100
+@@ -106,7 +106,7 @@
         * Note that we can only stop the TX queues inside the TX path
         * due to possible race conditions in mac80211.
         */
@@ -263272,7 +263198,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                ieee80211_stop_queues(hw);
                dev_kfree_skb_any(skb);
                return NETDEV_TX_OK;
-@@ -168,7 +168,7 @@ int rt2x00mac_start(struct ieee80211_hw 
+@@ -168,7 +168,7 @@
  {
        struct rt2x00_dev *rt2x00dev = hw->priv;
  
@@ -263281,7 +263207,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                return 0;
  
        return rt2x00lib_start(rt2x00dev);
-@@ -179,7 +179,7 @@ void rt2x00mac_stop(struct ieee80211_hw 
+@@ -179,7 +179,7 @@
  {
        struct rt2x00_dev *rt2x00dev = hw->priv;
  
@@ -263290,7 +263216,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                return;
  
        rt2x00lib_stop(rt2x00dev);
-@@ -199,8 +199,8 @@ int rt2x00mac_add_interface(struct ieee8
+@@ -199,8 +199,8 @@
         * Don't allow interfaces to be added
         * the device has disappeared.
         */
@@ -263301,7 +263227,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                return -ENODEV;
  
        switch (conf->type) {
-@@ -249,7 +249,7 @@ int rt2x00mac_add_interface(struct ieee8
+@@ -249,7 +249,7 @@
         */
        for (i = 0; i < queue->limit; i++) {
                entry = &queue->entries[i];
@@ -263310,7 +263236,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                        break;
        }
  
-@@ -303,7 +303,7 @@ void rt2x00mac_remove_interface(struct i
+@@ -303,7 +303,7 @@
         * either the device has disappeared or when
         * no interface is present.
         */
@@ -263319,7 +263245,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
            (conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) ||
            (conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count))
                return;
-@@ -317,7 +317,7 @@ void rt2x00mac_remove_interface(struct i
+@@ -317,7 +317,7 @@
         * Release beacon entry so it is available for
         * new interfaces again.
         */
@@ -263328,7 +263254,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
  
        /*
         * Make sure the bssid and mac address registers
-@@ -337,14 +337,14 @@ int rt2x00mac_config(struct ieee80211_hw
+@@ -337,14 +337,14 @@
         * Mac80211 might be calling this function while we are trying
         * to remove the device or perhaps suspending it.
         */
@@ -263345,7 +263271,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                if (!conf->radio_enabled)
                        rt2x00lib_disable_radio(rt2x00dev);
                else
-@@ -359,14 +359,14 @@ int rt2x00mac_config(struct ieee80211_hw
+@@ -359,14 +359,14 @@
         * initialized.
         */
        force_reconfig =
@@ -263362,7 +263288,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON);
        else if (conf->radio_enabled)
                return rt2x00lib_enable_radio(rt2x00dev);
-@@ -388,7 +388,7 @@ int rt2x00mac_config_interface(struct ie
+@@ -388,7 +388,7 @@
         * Mac80211 might be calling this function while we are trying
         * to remove the device or perhaps suspending it.
         */
@@ -263371,10 +263297,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00mac.c linux-2.6.27.19-
                return 0;
  
        spin_lock(&intf->lock);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00queue.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00queue.c      2009-03-25 16:11:09.000000000 +0000
-@@ -309,7 +309,7 @@ int rt2x00queue_write_tx_frame(struct da
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00queue.c
+--- a/drivers/net/wireless/rt2x00/rt2x00queue.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00queue.c        Wed May 06 16:56:29 2009 +0100
+@@ -309,7 +309,7 @@
        if (unlikely(rt2x00queue_full(queue)))
                return -EINVAL;
  
@@ -263383,7 +263309,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c linux-2.6.27.1
                ERROR(queue->rt2x00dev,
                      "Arrived at non-free entry in the non-full queue %d.\n"
                      "Please file bug report to %s.\n",
-@@ -333,14 +333,14 @@ int rt2x00queue_write_tx_frame(struct da
+@@ -333,14 +333,14 @@
        skbdesc->entry = entry;
  
        if (unlikely(queue->rt2x00dev->ops->lib->write_tx_data(entry))) {
@@ -263400,10 +263326,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00queue.c linux-2.6.27.1
  
        rt2x00queue_index_inc(queue, Q_INDEX);
        rt2x00queue_write_tx_descriptor(entry, &txdesc);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00rfkill.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00rfkill.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00rfkill.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00rfkill.c     2009-03-25 16:11:09.000000000 +0000
-@@ -41,16 +41,16 @@ static int rt2x00rfkill_toggle_radio(voi
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00rfkill.c
+--- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c       Wed May 06 16:56:29 2009 +0100
+@@ -41,16 +41,16 @@
        /*
         * Only continue if there are enabled interfaces.
         */
@@ -263423,10 +263349,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00rfkill.c linux-2.6.27.
                rt2x00lib_disable_radio(rt2x00dev);
        } else {
                WARNING(rt2x00dev, "Received unexpected rfkill state %d.\n",
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt2x00usb.c        2009-03-25 16:11:09.000000000 +0000
-@@ -163,7 +163,7 @@ static void rt2x00usb_interrupt_txdone(s
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt2x00usb.c
+--- a/drivers/net/wireless/rt2x00/rt2x00usb.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt2x00usb.c  Wed May 06 16:56:29 2009 +0100
+@@ -163,7 +163,7 @@
        struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
        struct txdone_entry_desc txdesc;
  
@@ -263435,7 +263361,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-
            !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
                return;
  
-@@ -232,7 +232,7 @@ static inline void rt2x00usb_kick_tx_ent
+@@ -232,7 +232,7 @@
  {
        struct queue_entry_priv_usb *entry_priv = entry->priv_data;
  
@@ -263444,7 +263370,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-
                usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
  }
  
-@@ -283,7 +283,7 @@ static void rt2x00usb_interrupt_rxdone(s
+@@ -283,7 +283,7 @@
        struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
        u8 rxd[32];
  
@@ -263453,7 +263379,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-
            !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
                return;
  
-@@ -293,7 +293,7 @@ static void rt2x00usb_interrupt_rxdone(s
+@@ -293,7 +293,7 @@
         * a problem.
         */
        if (urb->actual_length < entry->queue->desc_size || urb->status) {
@@ -263462,7 +263388,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-
                usb_submit_urb(urb, GFP_ATOMIC);
                return;
        }
-@@ -361,7 +361,7 @@ void rt2x00usb_init_rxentry(struct rt2x0
+@@ -361,7 +361,7 @@
                          entry->skb->data, entry->skb->len,
                          rt2x00usb_interrupt_rxdone, entry);
  
@@ -263471,10 +263397,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt2x00usb.c linux-2.6.27.19-
        usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
  }
  EXPORT_SYMBOL_GPL(rt2x00usb_init_rxentry);
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt61pci.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt61pci.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt61pci.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt61pci.c  2009-03-25 16:11:09.000000000 +0000
-@@ -1860,7 +1860,7 @@ static irqreturn_t rt61pci_interrupt(int
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt61pci.c
+--- a/drivers/net/wireless/rt2x00/rt61pci.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt61pci.c    Wed May 06 16:56:29 2009 +0100
+@@ -1860,7 +1860,7 @@
        if (!reg && !reg_mcu)
                return IRQ_NONE;
  
@@ -263483,10 +263409,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt61pci.c linux-2.6.27.19-5.
                return IRQ_HANDLED;
  
        /*
-diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt73usb.c linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt73usb.c
---- linux-2.6.27/drivers/net/wireless/rt2x00/rt73usb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rt2x00/rt73usb.c  2009-03-25 16:11:09.000000000 +0000
-@@ -2113,6 +2113,7 @@ static struct usb_device_id rt73usb_devi
+diff -r 9608d5473017 drivers/net/wireless/rt2x00/rt73usb.c
+--- a/drivers/net/wireless/rt2x00/rt73usb.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rt2x00/rt73usb.c    Wed May 06 16:56:29 2009 +0100
+@@ -2113,6 +2113,7 @@
        /* Linksys */
        { USB_DEVICE(0x13b1, 0x0020), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x13b1, 0x0023), USB_DEVICE_DATA(&rt73usb_ops) },
@@ -263494,10 +263420,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rt2x00/rt73usb.c linux-2.6.27.19-5.
        /* MSI */
        { USB_DEVICE(0x0db0, 0x6877), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x0db0, 0x6874), USB_DEVICE_DATA(&rt73usb_ops) },
-diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_dev.c linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_dev.c
---- linux-2.6.27/drivers/net/wireless/rtl8187_dev.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_dev.c     2009-03-25 16:11:09.000000000 +0000
-@@ -33,10 +33,13 @@ MODULE_LICENSE("GPL");
+diff -r 9608d5473017 drivers/net/wireless/rtl8187_dev.c
+--- a/drivers/net/wireless/rtl8187_dev.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rtl8187_dev.c       Wed May 06 16:56:29 2009 +0100
+@@ -33,10 +33,13 @@
  static struct usb_device_id rtl8187_table[] __devinitdata = {
        /* Asus */
        {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187},
@@ -263511,7 +263437,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_dev.c linux-2.6.27.19-5.1/d
        /* Netgear */
        {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187},
        {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187},
-@@ -45,6 +48,9 @@ static struct usb_device_id rtl8187_tabl
+@@ -45,6 +48,9 @@
        {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187},
        /* Sitecom */
        {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187},
@@ -263521,7 +263447,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_dev.c linux-2.6.27.19-5.1/d
        {}
  };
  
-@@ -257,6 +263,7 @@ static int rtl8187_tx(struct ieee80211_h
+@@ -257,6 +263,7 @@
  
        usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, ep),
                          buf, skb->len, rtl8187_tx_cb, skb);
@@ -263529,10 +263455,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_dev.c linux-2.6.27.19-5.1/d
        rc = usb_submit_urb(urb, GFP_ATOMIC);
        if (rc < 0) {
                usb_free_urb(urb);
-diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_rtl8225.c
---- linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/rtl8187_rtl8225.c 2009-03-25 16:11:09.000000000 +0000
-@@ -287,7 +287,10 @@ static void rtl8225_rf_set_tx_power(stru
+diff -r 9608d5473017 drivers/net/wireless/rtl8187_rtl8225.c
+--- a/drivers/net/wireless/rtl8187_rtl8225.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/rtl8187_rtl8225.c   Wed May 06 16:56:29 2009 +0100
+@@ -287,7 +287,10 @@
        ofdm_power = priv->channels[channel - 1].hw_value >> 4;
  
        cck_power = min(cck_power, (u8)11);
@@ -263544,7 +263470,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c linux-2.6.27.19-5
  
        rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK,
                         rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1);
-@@ -540,7 +543,10 @@ static void rtl8225z2_rf_set_tx_power(st
+@@ -540,7 +543,10 @@
        cck_power += priv->txpwr_base & 0xF;
        cck_power = min(cck_power, (u8)35);
  
@@ -263556,10 +263482,10 @@ diff -purN linux-2.6.27/drivers/net/wireless/rtl8187_rtl8225.c linux-2.6.27.19-5
        ofdm_power += priv->txpwr_base >> 4;
        ofdm_power = min(ofdm_power, (u8)35);
  
-diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_rf.c linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_rf.c
---- linux-2.6.27/drivers/net/wireless/zd1211rw/zd_rf.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_rf.c  2009-03-25 16:11:08.000000000 +0000
-@@ -86,6 +86,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 t
+diff -r 9608d5473017 drivers/net/wireless/zd1211rw/zd_rf.c
+--- a/drivers/net/wireless/zd1211rw/zd_rf.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/zd1211rw/zd_rf.c    Wed May 06 16:56:29 2009 +0100
+@@ -86,6 +86,7 @@
        case AL7230B_RF:
                r = zd_rf_init_al7230b(rf);
                break;
@@ -263567,9 +263493,9 @@ diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_rf.c linux-2.6.27.19-5.
        case UW2453_RF:
                r = zd_rf_init_uw2453(rf);
                break;
-diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_usb.c
---- linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/wireless/zd1211rw/zd_usb.c 2009-03-25 16:11:08.000000000 +0000
+diff -r 9608d5473017 drivers/net/wireless/zd1211rw/zd_usb.c
+--- a/drivers/net/wireless/zd1211rw/zd_usb.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/wireless/zd1211rw/zd_usb.c   Wed May 06 16:56:29 2009 +0100
 @@ -37,6 +37,7 @@
  static struct usb_device_id usb_ids[] = {
        /* ZD1211 */
@@ -263578,7 +263504,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c linux-2.6.27.19-5
        { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
-@@ -61,6 +62,7 @@ static struct usb_device_id usb_ids[] = 
+@@ -61,6 +62,7 @@
        { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 },
        /* ZD1211B */
        { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
@@ -263586,7 +263512,7 @@ diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c linux-2.6.27.19-5
        { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
        { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B },
        { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B },
-@@ -82,6 +84,7 @@ static struct usb_device_id usb_ids[] = 
+@@ -82,6 +84,7 @@
        { USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B },
        { USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B },
        { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B },
@@ -263594,9 +263520,9 @@ diff -purN linux-2.6.27/drivers/net/wireless/zd1211rw/zd_usb.c linux-2.6.27.19-5
        /* "Driverless" devices that need ejecting */
        { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
        { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
-diff -purN linux-2.6.27/drivers/net/xen-netfront.c linux-2.6.27.19-5.1/drivers/net/xen-netfront.c
---- linux-2.6.27/drivers/net/xen-netfront.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/net/xen-netfront.c     2009-03-25 16:11:04.000000000 +0000
+diff -r 9608d5473017 drivers/net/xen-netfront.c
+--- a/drivers/net/xen-netfront.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/net/xen-netfront.c       Wed May 06 16:56:29 2009 +0100
 @@ -36,8 +36,6 @@
  #include <linux/skbuff.h>
  #include <linux/ethtool.h>
@@ -263606,10 +263532,12 @@ diff -purN linux-2.6.27/drivers/net/xen-netfront.c linux-2.6.27.19-5.1/drivers/n
  #include <linux/moduleparam.h>
  #include <linux/mm.h>
  #include <net/ip.h>
-@@ -765,45 +763,6 @@ static RING_IDX xennet_fill_frags(struct
-       return cons;
- }
+@@ -763,45 +761,6 @@
  
+       shinfo->nr_frags = nr_frags;
+       return cons;
+-}
+-
 -static int skb_checksum_setup(struct sk_buff *skb)
 -{
 -      struct iphdr *iph;
@@ -263647,12 +263575,10 @@ diff -purN linux-2.6.27/drivers/net/xen-netfront.c linux-2.6.27.19-5.1/drivers/n
 -
 -out:
 -      return err;
--}
--
+ }
  static int handle_incoming_queue(struct net_device *dev,
-                                struct sk_buff_head *rxq)
- {
-@@ -1784,7 +1743,6 @@ static int __devexit xennet_remove(struc
+@@ -1784,7 +1743,6 @@
  
  static struct xenbus_driver netfront = {
        .name = "vif",
@@ -263660,21 +263586,21 @@ diff -purN linux-2.6.27/drivers/net/xen-netfront.c linux-2.6.27.19-5.1/drivers/n
        .ids = netfront_ids,
        .probe = netfront_probe,
        .remove = __devexit_p(xennet_remove),
-diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drivers/oprofile/buffer_sync.c
---- linux-2.6.27/drivers/oprofile/buffer_sync.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/buffer_sync.c 2009-03-25 16:11:13.000000000 +0000
-@@ -6,6 +6,10 @@
+diff -r 9608d5473017 drivers/oprofile/buffer_sync.c
+--- a/drivers/oprofile/buffer_sync.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/buffer_sync.c   Wed May 06 16:56:29 2009 +0100
+@@ -5,6 +5,10 @@
+  * @remark Read the file COPYING
   *
   * @author John Levon <levon@movementarian.org>
-  *
++ *
 + * Modified by Aravind Menon for Xen
 + * These modifications are:
 + * Copyright (C) 2005 Hewlett-Packard Co.
-+ *
+  *
   * This is the core of the buffer management. Each
   * CPU buffer is processed and entered into the
-  * global event buffer. Such processing is necessary
-@@ -40,6 +44,9 @@ static cpumask_t marked_cpus = CPU_MASK_
+@@ -40,6 +44,9 @@
  static DEFINE_SPINLOCK(task_mortuary);
  static void process_task_mortuary(void);
  
@@ -263684,7 +263610,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
  
  /* Take ownership of the task struct and place it on the
   * list for processing. Only after two full buffer syncs
-@@ -148,6 +155,13 @@ static void end_sync(void)
+@@ -148,6 +155,13 @@
  int sync_start(void)
  {
        int err;
@@ -263698,7 +263624,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
  
        start_cpu_work();
  
-@@ -274,15 +288,33 @@ static void add_cpu_switch(int i)
+@@ -274,15 +288,33 @@
        last_cookie = INVALID_COOKIE;
  }
  
@@ -263738,7 +263664,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
  static void
  add_user_ctx_switch(struct task_struct const * task, unsigned long cookie)
  {
-@@ -347,9 +379,9 @@ static int add_us_sample(struct mm_struc
+@@ -347,9 +379,9 @@
   * for later lookup from userspace.
   */
  static int
@@ -263750,7 +263676,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
                add_sample_entry(s->eip, s->event);
                return 1;
        } else if (mm) {
-@@ -495,15 +527,24 @@ void sync_buffer(int cpu)
+@@ -495,14 +527,23 @@
        struct mm_struct *mm = NULL;
        struct task_struct * new;
        unsigned long cookie = 0;
@@ -263764,7 +263690,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
        mutex_lock(&buffer_mutex);
   
        add_cpu_switch(cpu);
++
 +#ifdef CONFIG_XEN
 +      /* We need to assign the first samples in this CPU buffer to the
 +         same domain that we were processing at the last sync_buffer */
@@ -263772,11 +263698,10 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
 +              add_domain_switch(cpu_current_domain[cpu]);
 +      }
 +#endif
-+
        /* Remember, only we can modify tail_pos */
  
-       available = get_slots(cpu_buf);
-@@ -511,16 +552,20 @@ void sync_buffer(int cpu)
+@@ -511,16 +552,20 @@
        for (i = 0; i < available; ++i) {
                struct op_sample * s = &cpu_buf->buffer[cpu_buf->tail_pos];
   
@@ -263802,7 +263727,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
                        } else {
                                struct mm_struct * oldmm = mm;
  
-@@ -534,8 +579,18 @@ void sync_buffer(int cpu)
+@@ -534,8 +579,18 @@
                                add_user_ctx_switch(new, cookie);
                        }
                } else {
@@ -263822,7 +263747,7 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
                                if (state == sb_bt_start) {
                                        state = sb_bt_ignore;
                                        atomic_inc(&oprofile_stats.bt_lost_no_mapping);
-@@ -547,7 +602,38 @@ void sync_buffer(int cpu)
+@@ -547,7 +602,38 @@
        }
        release_mm(mm);
  
@@ -263861,21 +263786,21 @@ diff -purN linux-2.6.27/drivers/oprofile/buffer_sync.c linux-2.6.27.19-5.1/drive
 +      mutex_unlock(&buffer_mutex);
 +}
 +
-diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.c
---- linux-2.6.27/drivers/oprofile/cpu_buffer.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.c  2009-03-25 16:11:13.000000000 +0000
-@@ -6,6 +6,10 @@
+diff -r 9608d5473017 drivers/oprofile/cpu_buffer.c
+--- a/drivers/oprofile/cpu_buffer.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/cpu_buffer.c    Wed May 06 16:56:29 2009 +0100
+@@ -5,6 +5,10 @@
+  * @remark Read the file COPYING
   *
   * @author John Levon <levon@movementarian.org>
-  *
++ *
 + * Modified by Aravind Menon for Xen
 + * These modifications are:
 + * Copyright (C) 2005 Hewlett-Packard Co.
-+ *
+  *
   * Each CPU has a local buffer that stores PC value/event
   * pairs. We also log context switches when we notice them.
-  * Eventually each CPU's buffer is processed into the global
-@@ -34,16 +38,35 @@ static void wq_sync_buffer(struct work_s
+@@ -34,14 +38,33 @@
  #define DEFAULT_TIMER_EXPIRE (HZ / 10)
  static int work_enabled;
  
@@ -263894,8 +263819,8 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
                vfree(per_cpu(cpu_buffer, i).buffer);
                per_cpu(cpu_buffer, i).buffer = NULL;
        }
- }
++}
++
 +unsigned long oprofile_get_cpu_buffer_size(void)
 +{
 +      return fs_cpu_buffer_size;
@@ -263907,12 +263832,10 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
 +              = &__get_cpu_var(cpu_buffer);
 +
 +      cpu_buf->sample_lost_overflow++;
-+}
-+
+ }
  int alloc_cpu_buffers(void)
- {
-       int i;
-@@ -59,7 +82,7 @@ int alloc_cpu_buffers(void)
+@@ -59,7 +82,7 @@
                        goto fail;
   
                b->last_task = NULL;
@@ -263921,7 +263844,7 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
                b->tracing = 0;
                b->buffer_size = buffer_size;
                b->tail_pos = 0;
-@@ -117,7 +140,7 @@ void cpu_buffer_reset(struct oprofile_cp
+@@ -117,7 +140,7 @@
         * collected will populate the buffer with proper
         * values to initialize the buffer
         */
@@ -263930,7 +263853,7 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
        cpu_buf->last_task = NULL;
  }
  
-@@ -167,13 +190,13 @@ add_code(struct oprofile_cpu_buffer * bu
+@@ -167,13 +190,13 @@
   * because of the head/tail separation of the writer and reader
   * of the CPU buffer.
   *
@@ -263948,7 +263871,7 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
  {
        struct task_struct * task;
  
-@@ -189,18 +212,18 @@ static int log_sample(struct oprofile_cp
+@@ -189,18 +212,18 @@
                return 0;
        }
  
@@ -263973,7 +263896,7 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
                cpu_buf->last_task = task;
                add_code(cpu_buf, (unsigned long)task);
        }
-@@ -284,6 +307,27 @@ void oprofile_add_trace(unsigned long pc
+@@ -284,6 +307,27 @@
        add_sample(cpu_buf, pc, 0);
  }
  
@@ -264001,10 +263924,10 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.c linux-2.6.27.19-5.1/driver
  /*
   * This serves to avoid cpu buffer overflow, and makes sure
   * the task mortuary progresses
-diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.h linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.h
---- linux-2.6.27/drivers/oprofile/cpu_buffer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/cpu_buffer.h  2009-03-25 16:11:13.000000000 +0000
-@@ -37,7 +37,7 @@ struct oprofile_cpu_buffer {
+diff -r 9608d5473017 drivers/oprofile/cpu_buffer.h
+--- a/drivers/oprofile/cpu_buffer.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/cpu_buffer.h    Wed May 06 16:56:29 2009 +0100
+@@ -37,7 +37,7 @@
        volatile unsigned long tail_pos;
        unsigned long buffer_size;
        struct task_struct * last_task;
@@ -264013,7 +263936,7 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.h linux-2.6.27.19-5.1/driver
        int tracing;
        struct op_sample * buffer;
        unsigned long sample_received;
-@@ -53,7 +53,10 @@ DECLARE_PER_CPU(struct oprofile_cpu_buff
+@@ -53,7 +53,10 @@
  void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf);
  
  /* transient events for the CPU buffer -> event buffer */
@@ -264026,10 +263949,10 @@ diff -purN linux-2.6.27/drivers/oprofile/cpu_buffer.h linux-2.6.27.19-5.1/driver
 +#define CPU_DOMAIN_SWITCH       4
  
  #endif /* OPROFILE_CPU_BUFFER_H */
-diff -purN linux-2.6.27/drivers/oprofile/event_buffer.h linux-2.6.27.19-5.1/drivers/oprofile/event_buffer.h
---- linux-2.6.27/drivers/oprofile/event_buffer.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/event_buffer.h        2009-03-25 16:11:13.000000000 +0000
-@@ -17,12 +17,22 @@ int alloc_event_buffer(void);
+diff -r 9608d5473017 drivers/oprofile/event_buffer.h
+--- a/drivers/oprofile/event_buffer.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/event_buffer.h  Wed May 06 16:56:29 2009 +0100
+@@ -17,11 +17,21 @@
  
  void free_event_buffer(void);
   
@@ -264045,16 +263968,15 @@ diff -purN linux-2.6.27/drivers/oprofile/event_buffer.h linux-2.6.27.19-5.1/driv
  
  #define INVALID_COOKIE ~0UL
  #define NO_COOKIE 0UL
++
 +/* Constant used to refer to coordinator domain (Xen) */
 +#define COORDINATOR_DOMAIN -1
-+
  extern const struct file_operations event_buffer_fops;
   
- /* mutex between sync_cpu_buffers() and the
-diff -purN linux-2.6.27/drivers/oprofile/oprof.c linux-2.6.27.19-5.1/drivers/oprofile/oprof.c
---- linux-2.6.27/drivers/oprofile/oprof.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprof.c       2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/oprofile/oprof.c
+--- a/drivers/oprofile/oprof.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprof.c Wed May 06 16:56:29 2009 +0100
 @@ -5,6 +5,10 @@
   * @remark Read the file COPYING
   *
@@ -264066,10 +263988,11 @@ diff -purN linux-2.6.27/drivers/oprofile/oprof.c linux-2.6.27.19-5.1/drivers/opr
   */
  
  #include <linux/kernel.h>
-@@ -33,6 +37,34 @@ static DEFINE_MUTEX(start_mutex);
+@@ -32,6 +36,34 @@
+    1 - use the timer int mechanism regardless
   */
  static int timer = 0;
++
 +#ifdef CONFIG_XEN
 +int oprofile_set_active(int active_domains[], unsigned int adomains)
 +{
@@ -264097,14 +264020,13 @@ diff -purN linux-2.6.27/drivers/oprofile/oprof.c linux-2.6.27.19-5.1/drivers/opr
 +      return err;
 +}
 +#endif
-+
  int oprofile_setup(void)
  {
-       int err;
-diff -purN linux-2.6.27/drivers/oprofile/oprof.h linux-2.6.27.19-5.1/drivers/oprofile/oprof.h
---- linux-2.6.27/drivers/oprofile/oprof.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprof.h       2009-03-25 16:11:13.000000000 +0000
-@@ -35,5 +35,8 @@ void oprofile_create_files(struct super_
+diff -r 9608d5473017 drivers/oprofile/oprof.h
+--- a/drivers/oprofile/oprof.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprof.h Wed May 06 16:56:29 2009 +0100
+@@ -35,5 +35,8 @@
  void oprofile_timer_init(struct oprofile_operations * ops);
  
  int oprofile_set_backtrace(unsigned long depth);
@@ -264113,9 +264035,9 @@ diff -purN linux-2.6.27/drivers/oprofile/oprof.h linux-2.6.27.19-5.1/drivers/opr
 +int oprofile_set_passive(int passive_domains[], unsigned int pdomains);
   
  #endif /* OPROF_H */
-diff -purN linux-2.6.27/drivers/oprofile/oprofile_files.c linux-2.6.27.19-5.1/drivers/oprofile/oprofile_files.c
---- linux-2.6.27/drivers/oprofile/oprofile_files.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/oprofile/oprofile_files.c      2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/oprofile/oprofile_files.c
+--- a/drivers/oprofile/oprofile_files.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/oprofile/oprofile_files.c        Wed May 06 16:56:29 2009 +0100
 @@ -5,15 +5,21 @@
   * @remark Read the file COPYING
   *
@@ -264139,7 +264061,7 @@ diff -purN linux-2.6.27/drivers/oprofile/oprofile_files.c linux-2.6.27.19-5.1/dr
  unsigned long fs_buffer_size = 131072;
  unsigned long fs_cpu_buffer_size = 8192;
  unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */
-@@ -117,11 +123,208 @@ static ssize_t dump_write(struct file * 
+@@ -117,11 +123,208 @@
  static const struct file_operations dump_fops = {
        .write          = dump_write,
  };
@@ -264349,10 +264271,10 @@ diff -purN linux-2.6.27/drivers/oprofile/oprofile_files.c linux-2.6.27.19-5.1/dr
        oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
        oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
        oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
-diff -purN linux-2.6.27/drivers/parport/parport_serial.c linux-2.6.27.19-5.1/drivers/parport/parport_serial.c
---- linux-2.6.27/drivers/parport/parport_serial.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/parport/parport_serial.c       2009-03-25 16:11:18.000000000 +0000
-@@ -64,12 +64,19 @@ struct parport_pc_pci {
+diff -r 9608d5473017 drivers/parport/parport_serial.c
+--- a/drivers/parport/parport_serial.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/parport/parport_serial.c Wed May 06 16:56:29 2009 +0100
+@@ -64,12 +64,19 @@
  
  static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma)
  {
@@ -264372,10 +264294,10 @@ diff -purN linux-2.6.27/drivers/parport/parport_serial.c linux-2.6.27.19-5.1/dri
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/parport/parport_sunbpp.c linux-2.6.27.19-5.1/drivers/parport/parport_sunbpp.c
---- linux-2.6.27/drivers/parport/parport_sunbpp.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/parport/parport_sunbpp.c       2009-03-25 16:11:18.000000000 +0000
-@@ -389,6 +389,7 @@ static struct of_device_id bpp_match[] =
+diff -r 9608d5473017 drivers/parport/parport_sunbpp.c
+--- a/drivers/parport/parport_sunbpp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/parport/parport_sunbpp.c Wed May 06 16:56:29 2009 +0100
+@@ -389,6 +389,7 @@
  MODULE_DEVICE_TABLE(of, bpp_match);
  
  static struct of_platform_driver bpp_sbus_driver = {
@@ -264383,20 +264305,20 @@ diff -purN linux-2.6.27/drivers/parport/parport_sunbpp.c linux-2.6.27.19-5.1/dri
        .name           = "bpp",
        .match_table    = bpp_match,
        .probe          = bpp_probe,
-diff -purN linux-2.6.27/drivers/pci/Kconfig linux-2.6.27.19-5.1/drivers/pci/Kconfig
---- linux-2.6.27/drivers/pci/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/Kconfig    2009-03-25 16:11:12.000000000 +0000
-@@ -21,6 +21,9 @@ config PCI_MSI
+diff -r 9608d5473017 drivers/pci/Kconfig
+--- a/drivers/pci/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/Kconfig      Wed May 06 16:56:29 2009 +0100
+@@ -20,6 +20,9 @@
+          entire system.
  
           If you don't know what to do here, say N.
++
 +config PCI_REASSIGN
 +      bool
-+
  config PCI_LEGACY
        bool "Enable deprecated pci_find_* API"
-       depends on PCI
-@@ -45,7 +48,7 @@ config PCI_DEBUG
+@@ -45,7 +48,7 @@
  config HT_IRQ
        bool "Interrupts on hypertransport devices"
        default y
@@ -264405,9 +264327,9 @@ diff -purN linux-2.6.27/drivers/pci/Kconfig linux-2.6.27.19-5.1/drivers/pci/Kcon
        help
           This allows native hypertransport devices to use interrupts.
  
-diff -purN linux-2.6.27/drivers/pci/Makefile linux-2.6.27.19-5.1/drivers/pci/Makefile
---- linux-2.6.27/drivers/pci/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/Makefile   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/Makefile
+--- a/drivers/pci/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/Makefile     Wed May 06 16:56:29 2009 +0100
 @@ -4,6 +4,7 @@
  
  obj-y         += access.o bus.o probe.o remove.o pci.o quirks.o slot.o \
@@ -264416,18 +264338,18 @@ diff -purN linux-2.6.27/drivers/pci/Makefile linux-2.6.27.19-5.1/drivers/pci/Mak
  obj-$(CONFIG_PROC_FS) += proc.o
  
  # Build PCI Express stuff if needed
-@@ -26,6 +27,8 @@ obj-$(CONFIG_HT_IRQ) += htirq.o
+@@ -25,6 +26,8 @@
  # Build Intel IOMMU support
  obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
-+obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
 +
++obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
  #
  # Some architectures use the generic PCI setup functions
- #
-diff -purN linux-2.6.27/drivers/pci/dma_remapping.h linux-2.6.27.19-5.1/drivers/pci/dma_remapping.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/dma_remapping.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/dma_remapping.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/dma_remapping.h      Wed May 06 16:56:29 2009 +0100
 @@ -0,0 +1,157 @@
 +#ifndef _DMA_REMAPPING_H
 +#define _DMA_REMAPPING_H
@@ -264586,9 +264508,9 @@ diff -purN linux-2.6.27/drivers/pci/dma_remapping.h linux-2.6.27.19-5.1/drivers/
 +#endif /* !CONFIG_DMAR_GFX_WA */
 +
 +#endif
-diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.c
---- linux-2.6.27/drivers/pci/dmar.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/dmar.c     2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/dmar.c
+--- a/drivers/pci/dmar.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/dmar.c       Wed May 06 16:56:29 2009 +0100
 @@ -19,13 +19,16 @@
   * Author: Shaohua Li <shaohua.li@intel.com>
   * Author: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
@@ -264615,19 +264537,19 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
  
  static struct acpi_table_header * __initdata dmar_tbl;
  
-@@ -53,11 +55,6 @@ static void __init dmar_register_drhd_un
+@@ -51,11 +53,6 @@
+               list_add_tail(&drhd->list, &dmar_drhd_units);
+       else
                list_add(&drhd->list, &dmar_drhd_units);
- }
+-}
+-
 -static void __init dmar_register_rmrr_unit(struct dmar_rmrr_unit *rmrr)
 -{
 -      list_add(&rmrr->list, &dmar_rmrr_units);
--}
--
+ }
  static int __init dmar_parse_one_dev_scope(struct acpi_dmar_device_scope *scope,
-                                          struct pci_dev **dev, u16 segment)
- {
-@@ -172,19 +169,37 @@ dmar_parse_one_drhd(struct acpi_dmar_hea
+@@ -172,19 +169,37 @@
        struct acpi_dmar_hardware_unit *drhd;
        struct dmar_drhd_unit *dmaru;
        int ret = 0;
@@ -264667,7 +264589,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
                                &dmaru->devices_cnt, &dmaru->devices,
                                drhd->segment);
        else {
-@@ -197,37 +212,59 @@ dmar_parse_one_drhd(struct acpi_dmar_hea
+@@ -197,37 +212,59 @@
                include_all = 1;
        }
  
@@ -264680,7 +264602,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +      }
        return ret;
  }
++
 +#ifdef CONFIG_DMAR
 +LIST_HEAD(dmar_rmrr_units);
 +
@@ -264689,7 +264611,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +      list_add(&rmrr->list, &dmar_rmrr_units);
 +}
 +
-+
  static int __init
  dmar_parse_one_rmrr(struct acpi_dmar_header *header)
  {
@@ -264735,7 +264657,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
  
  static void __init
  dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
-@@ -253,6 +290,25 @@ dmar_table_print_dmar_entry(struct acpi_
+@@ -253,6 +290,25 @@
  }
  
  /**
@@ -264761,20 +264683,20 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
   * parse_dmar_table - parses the DMA reporting table
   */
  static int __init
-@@ -262,6 +318,12 @@ parse_dmar_table(void)
+@@ -261,6 +317,12 @@
+       struct acpi_table_dmar *dmar;
        struct acpi_dmar_header *entry_header;
        int ret = 0;
++
 +      /*
 +       * Do it again, earlier dmar_tbl mapping could be mapped with
 +       * fixed map.
 +       */
 +      dmar_table_detect();
-+
        dmar = (struct acpi_table_dmar *)dmar_tbl;
        if (!dmar)
-               return -ENODEV;
-@@ -284,7 +346,9 @@ parse_dmar_table(void)
+@@ -284,7 +346,9 @@
                        ret = dmar_parse_one_drhd(entry_header);
                        break;
                case ACPI_DMAR_TYPE_RESERVED_MEMORY:
@@ -264784,7 +264706,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
                        break;
                default:
                        printk(KERN_WARNING PREFIX
-@@ -300,15 +364,77 @@ parse_dmar_table(void)
+@@ -300,15 +364,77 @@
        return ret;
  }
  
@@ -264792,8 +264714,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +                        struct pci_dev *dev)
 +{
 +      int index;
--int __init dmar_table_init(void)
++
 +      while (dev) {
 +              for (index = 0; index < cnt; index++)
 +                      if (dev == devices[index])
@@ -264821,10 +264742,10 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +}
 +
 +int __init dmar_dev_scope_init(void)
- {
++{
 +      struct dmar_drhd_unit *drhd, *drhd_n;
 +      int ret = -ENODEV;
++
 +      list_for_each_entry_safe(drhd, drhd_n, &dmar_drhd_units, list) {
 +              ret = dmar_parse_dev(drhd);
 +              if (ret)
@@ -264845,17 +264766,18 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +      return ret;
 +}
 +
-+
-+int __init dmar_table_init(void)
-+{
+ int __init dmar_table_init(void)
+ {
 +      static int dmar_table_initialized;
-       int ret;
++      int ret;
  
+-      int ret;
 +      if (dmar_table_initialized)
 +              return 0;
 +
 +      dmar_table_initialized = 1;
-+
        ret = parse_dmar_table();
        if (ret) {
 -              printk(KERN_INFO PREFIX "parse DMAR table failure.\n");
@@ -264864,7 +264786,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
                return ret;
        }
  
-@@ -317,27 +443,269 @@ int __init dmar_table_init(void)
+@@ -317,27 +443,269 @@
                return -ENODEV;
        }
  
@@ -264875,15 +264797,13 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +              return -ENODEV;
 +      }
 +#endif
++
 +#ifdef CONFIG_INTR_REMAP
 +      parse_ioapics_under_ir();
 +#endif
-       return 0;
- }
--/**
-- * early_dmar_detect - checks to see if the platform supports DMAR devices
++      return 0;
++}
++
 +void __init detect_intel_iommu(void)
 +{
 +      int ret;
@@ -264991,21 +264911,16 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +
 +/*
 + * Reclaim all the submitted descriptors which have completed its work.
-  */
--int __init early_dmar_detect(void)
++ */
 +static inline void reclaim_free_desc(struct q_inval *qi)
- {
--      acpi_status status = AE_OK;
++{
 +      while (qi->desc_status[qi->free_tail] == QI_DONE) {
 +              qi->desc_status[qi->free_tail] = QI_FREE;
 +              qi->free_tail = (qi->free_tail + 1) % QI_LENGTH;
 +              qi->free_cnt++;
 +      }
 +}
--      /* if we could find DMAR table, then there are DMAR devices */
--      status = acpi_get_table(ACPI_SIG_DMAR, 0,
--                              (struct acpi_table_header **)&dmar_tbl);
++
 +/*
 + * Submit the queued invalidation descriptor to the remapping
 + * hardware unit and wait for its completion.
@@ -265016,10 +264931,7 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +      struct qi_desc *hw, wait_desc;
 +      int wait_index, index;
 +      unsigned long flags;
--      if (ACPI_SUCCESS(status) && !dmar_tbl) {
--              printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
--              status = AE_NOT_FOUND;
++
 +      if (!qi)
 +              return;
 +
@@ -265030,9 +264942,8 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +              spin_unlock(&qi->q_lock);
 +              cpu_relax();
 +              spin_lock(&qi->q_lock);
-       }
--      return (ACPI_SUCCESS(status) ? 1 : 0);
++      }
++
 +      index = qi->free_head;
 +      wait_index = (index + 1) % QI_LENGTH;
 +
@@ -265143,12 +265054,31 @@ diff -purN linux-2.6.27/drivers/pci/dmar.c linux-2.6.27.19-5.1/drivers/pci/dmar.
 +      /* Make sure hardware complete it */
 +      IOMMU_WAIT_OP(iommu, DMAR_GSTS_REG, readl, (sts & DMA_GSTS_QIES), sts);
 +      spin_unlock_irqrestore(&iommu->register_lock, flags);
-+
-+      return 0;
+       return 0;
  }
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp.h
---- linux-2.6.27/drivers/pci/hotplug/acpiphp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp.h  2009-03-25 16:11:12.000000000 +0000
+-
+-/**
+- * early_dmar_detect - checks to see if the platform supports DMAR devices
+- */
+-int __init early_dmar_detect(void)
+-{
+-      acpi_status status = AE_OK;
+-
+-      /* if we could find DMAR table, then there are DMAR devices */
+-      status = acpi_get_table(ACPI_SIG_DMAR, 0,
+-                              (struct acpi_table_header **)&dmar_tbl);
+-
+-      if (ACPI_SUCCESS(status) && !dmar_tbl) {
+-              printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
+-              status = AE_NOT_FOUND;
+-      }
+-
+-      return (ACPI_SUCCESS(status) ? 1 : 0);
+-}
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp.h
+--- a/drivers/pci/hotplug/acpiphp.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp.h    Wed May 06 16:56:30 2009 +0100
 @@ -50,9 +50,6 @@
  #define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
  #define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
@@ -265159,24 +265089,23 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp.h linux-2.6.27.19-5.1/driver
  struct acpiphp_bridge;
  struct acpiphp_slot;
  
-@@ -63,9 +60,13 @@ struct slot {
+@@ -63,8 +60,12 @@
        struct hotplug_slot     *hotplug_slot;
        struct acpiphp_slot     *acpi_slot;
        struct hotplug_slot_info info;
 -      char name[SLOT_NAME_SIZE];
  };
++
 +static inline const char *slot_name(struct slot *slot)
 +{
 +      return hotplug_slot_name(slot->hotplug_slot);
 +}
-+
  /*
   * struct acpiphp_bridge - PCI bridge information
-  *
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_core.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_core.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_core.c
+--- a/drivers/pci/hotplug/acpiphp_core.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_core.c       Wed May 06 16:56:30 2009 +0100
 @@ -44,6 +44,9 @@
  
  #define MY_NAME       "acpiphp"
@@ -265187,7 +265116,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  static int debug;
  int acpiphp_debug;
  
-@@ -84,7 +87,6 @@ static struct hotplug_slot_ops acpi_hotp
+@@ -84,7 +87,6 @@
        .get_adapter_status     = get_adapter_status,
  };
  
@@ -265195,7 +265124,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  /**
   * acpiphp_register_attention - set attention LED callback
   * @info: must be completely filled with LED callbacks
-@@ -136,7 +138,7 @@ static int enable_slot(struct hotplug_sl
+@@ -136,7 +138,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265204,7 +265133,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        /* enable the specified slot */
        return acpiphp_enable_slot(slot->acpi_slot);
-@@ -154,7 +156,7 @@ static int disable_slot(struct hotplug_s
+@@ -154,7 +156,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -265213,7 +265142,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        /* disable the specified slot */
        retval = acpiphp_disable_slot(slot->acpi_slot);
-@@ -177,7 +179,7 @@ static int disable_slot(struct hotplug_s
+@@ -177,7 +179,7 @@
   {
        int retval = -ENODEV;
  
@@ -265222,7 +265151,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
   
        if (attention_info && try_module_get(attention_info->owner)) {
                retval = attention_info->set_attn(hotplug_slot, status);
-@@ -200,7 +202,7 @@ static int get_power_status(struct hotpl
+@@ -200,7 +202,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265231,7 +265160,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        *value = acpiphp_get_power_status(slot->acpi_slot);
  
-@@ -222,7 +224,7 @@ static int get_attention_status(struct h
+@@ -222,7 +224,7 @@
  {
        int retval = -EINVAL;
  
@@ -265240,7 +265169,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        if (attention_info && try_module_get(attention_info->owner)) {
                retval = attention_info->get_attn(hotplug_slot, value);
-@@ -245,7 +247,7 @@ static int get_latch_status(struct hotpl
+@@ -245,7 +247,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265249,7 +265178,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        *value = acpiphp_get_latch_status(slot->acpi_slot);
  
-@@ -265,7 +267,7 @@ static int get_adapter_status(struct hot
+@@ -265,7 +267,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265258,7 +265187,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        *value = acpiphp_get_adapter_status(slot->acpi_slot);
  
-@@ -299,7 +301,7 @@ static void release_slot(struct hotplug_
+@@ -299,7 +301,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265267,7 +265196,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        kfree(slot->hotplug_slot);
        kfree(slot);
-@@ -310,6 +312,7 @@ int acpiphp_register_hotplug_slot(struct
+@@ -310,6 +312,7 @@
  {
        struct slot *slot;
        int retval = -ENOMEM;
@@ -265275,16 +265204,16 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        slot = kzalloc(sizeof(*slot), GFP_KERNEL);
        if (!slot)
-@@ -321,8 +324,6 @@ int acpiphp_register_hotplug_slot(struct
+@@ -320,8 +323,6 @@
+               goto error_slot;
  
        slot->hotplug_slot->info = &slot->info;
--      slot->hotplug_slot->name = slot->name;
 -
+-      slot->hotplug_slot->name = slot->name;
        slot->hotplug_slot->private = slot;
        slot->hotplug_slot->release = &release_slot;
-       slot->hotplug_slot->ops = &acpi_hotplug_slot_ops;
-@@ -336,11 +337,12 @@ int acpiphp_register_hotplug_slot(struct
+@@ -336,11 +337,12 @@
        slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
  
        acpiphp_slot->slot = slot;
@@ -265299,7 +265228,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
        if (retval == -EBUSY)
                goto error_hpslot;
        if (retval) {
-@@ -348,7 +350,7 @@ int acpiphp_register_hotplug_slot(struct
+@@ -348,7 +350,7 @@
                goto error_hpslot;
        }
  
@@ -265308,7 +265237,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        return 0;
  error_hpslot:
-@@ -365,7 +367,7 @@ void acpiphp_unregister_hotplug_slot(str
+@@ -365,7 +367,7 @@
        struct slot *slot = acpiphp_slot->slot;
        int retval = 0;
  
@@ -265317,10 +265246,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_core.c linux-2.6.27.19-5.1/d
  
        retval = pci_hp_deregister(slot->hotplug_slot);
        if (retval)
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_glue.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_glue.c     2009-03-25 16:11:12.000000000 +0000
-@@ -169,7 +169,9 @@ static int post_dock_fixups(struct notif
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_glue.c
+--- a/drivers/pci/hotplug/acpiphp_glue.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_glue.c       Wed May 06 16:56:30 2009 +0100
+@@ -169,7 +169,9 @@
  }
  
  
@@ -265331,7 +265260,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
  
  /* callback routine to register each ACPI PCI slot object */
  static acpi_status
-@@ -180,7 +182,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -180,7 +182,7 @@
        struct acpiphp_func *newfunc;
        acpi_handle tmp;
        acpi_status status = AE_OK;
@@ -265340,7 +265269,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        int device, function, retval;
  
        status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
-@@ -285,7 +287,7 @@ register_slot(acpi_handle handle, u32 lv
+@@ -285,7 +287,7 @@
                 */
                newfunc->flags &= ~FUNC_HAS_EJ0;
                if (register_hotplug_dock_device(handle,
@@ -265349,7 +265278,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
                        dbg("failed to register dock device\n");
  
                /* we need to be notified when dock events happen
-@@ -528,7 +530,7 @@ find_p2p_bridge(acpi_handle handle, u32 
+@@ -528,7 +530,7 @@
  {
        acpi_status status;
        acpi_handle dummy_handle;
@@ -265358,7 +265287,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        int device, function;
        struct pci_dev *dev;
        struct pci_bus *pci_bus = context;
-@@ -573,7 +575,7 @@ find_p2p_bridge(acpi_handle handle, u32 
+@@ -573,7 +575,7 @@
  static int add_bridge(acpi_handle handle)
  {
        acpi_status status;
@@ -265367,7 +265296,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        int seg, bus;
        acpi_handle dummy_handle;
        struct pci_bus *pci_bus;
-@@ -767,7 +769,7 @@ static int get_gsi_base(acpi_handle hand
+@@ -767,7 +769,7 @@
  {
        acpi_status status;
        int result = -1;
@@ -265376,7 +265305,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
        union acpi_object *obj;
        void *table;
-@@ -808,7 +810,7 @@ static acpi_status
+@@ -808,7 +810,7 @@
  ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
        acpi_status status;
@@ -265385,7 +265314,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        acpi_handle tmp;
        struct pci_dev *pdev;
        u32 gsi_base;
-@@ -872,7 +874,7 @@ static acpi_status
+@@ -872,7 +874,7 @@
  ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv)
  {
        acpi_status status;
@@ -265394,7 +265323,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        acpi_handle tmp;
        u32 gsi_base;
        struct acpiphp_ioapic *pos, *n, *ioapic = NULL;
-@@ -1264,7 +1266,7 @@ static int disable_device(struct acpiphp
+@@ -1264,7 +1266,7 @@
  static unsigned int get_slot_status(struct acpiphp_slot *slot)
  {
        acpi_status status;
@@ -265403,10 +265332,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.27.19-5.1/d
        u32 dvid;
        struct list_head *l;
        struct acpiphp_func *func;
-diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_ibm.c
---- linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/acpiphp_ibm.c      2009-03-25 16:11:12.000000000 +0000
-@@ -183,7 +183,7 @@ static int ibm_set_attention_status(stru
+diff -r 9608d5473017 drivers/pci/hotplug/acpiphp_ibm.c
+--- a/drivers/pci/hotplug/acpiphp_ibm.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/acpiphp_ibm.c        Wed May 06 16:56:30 2009 +0100
+@@ -183,7 +183,7 @@
        union acpi_object args[2]; 
        struct acpi_object_list params = { .pointer = args, .count = 2 };
        acpi_status stat; 
@@ -265415,7 +265344,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c linux-2.6.27.19-5.1/dr
        union apci_descriptor *ibm_slot;
  
        ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
-@@ -204,7 +204,7 @@ static int ibm_set_attention_status(stru
+@@ -204,7 +204,7 @@
                err("APLS evaluation failed:  0x%08x\n", stat);
                return -ENODEV;
        } else if (!rc) {
@@ -265424,9 +265353,9 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/acpiphp_ibm.c linux-2.6.27.19-5.1/dr
                return -ERANGE;
        }
        return 0;
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug.h
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug.h     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug.h
+--- a/drivers/pci/hotplug/cpci_hotplug.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug.h       Wed May 06 16:56:30 2009 +0100
 @@ -30,6 +30,7 @@
  
  #include <linux/types.h>
@@ -265435,7 +265364,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.27.19-5.1/d
  
  /* PICMG 2.1 R2.0 HS CSR bits: */
  #define HS_CSR_INS    0x0080
-@@ -69,6 +70,11 @@ struct cpci_hp_controller {
+@@ -69,6 +70,11 @@
        struct cpci_hp_controller_ops *ops;
  };
  
@@ -265447,10 +265376,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug.h linux-2.6.27.19-5.1/d
  extern int cpci_hp_register_controller(struct cpci_hp_controller *controller);
  extern int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
  extern int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_core.c
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_core.c        2009-03-25 16:11:12.000000000 +0000
-@@ -108,7 +108,7 @@ enable_slot(struct hotplug_slot *hotplug
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug_core.c
+--- a/drivers/pci/hotplug/cpci_hotplug_core.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug_core.c  Wed May 06 16:56:30 2009 +0100
+@@ -108,7 +108,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval = 0;
  
@@ -265459,7 +265388,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  
        if (controller->ops->set_power)
                retval = controller->ops->set_power(slot, 1);
-@@ -121,25 +121,23 @@ disable_slot(struct hotplug_slot *hotplu
+@@ -121,25 +121,23 @@
        struct slot *slot = hotplug_slot->private;
        int retval = 0;
  
@@ -265490,7 +265419,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
                retval = -ENODEV;
                goto disable_error;
        }
-@@ -214,7 +212,6 @@ static void release_slot(struct hotplug_
+@@ -214,7 +212,6 @@
        struct slot *slot = hotplug_slot->private;
  
        kfree(slot->hotplug_slot->info);
@@ -265498,7 +265427,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
        kfree(slot->hotplug_slot);
        if (slot->dev)
                pci_dev_put(slot->dev);
-@@ -222,12 +219,6 @@ static void release_slot(struct hotplug_
+@@ -222,12 +219,6 @@
  }
  
  #define SLOT_NAME_SIZE        6
@@ -265511,7 +265440,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  
  int
  cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
-@@ -235,7 +226,7 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -235,7 +226,7 @@
        struct slot *slot;
        struct hotplug_slot *hotplug_slot;
        struct hotplug_slot_info *info;
@@ -265520,7 +265449,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
        int status = -ENOMEM;
        int i;
  
-@@ -262,34 +253,31 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -262,34 +253,31 @@
                        goto error_hpslot;
                hotplug_slot->info = info;
  
@@ -265562,7 +265491,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  
                /* Add slot to our internal list */
                down_write(&list_rwsem);
-@@ -298,8 +286,6 @@ cpci_hp_register_bus(struct pci_bus *bus
+@@ -298,8 +286,6 @@
                up_write(&list_rwsem);
        }
        return 0;
@@ -265571,7 +265500,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  error_info:
        kfree(info);
  error_hpslot:
-@@ -327,7 +313,7 @@ cpci_hp_unregister_bus(struct pci_bus *b
+@@ -327,7 +313,7 @@
                        list_del(&slot->slot_list);
                        slots--;
  
@@ -265580,7 +265509,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
                        status = pci_hp_deregister(slot->hotplug_slot);
                        if (status) {
                                err("pci_hp_deregister failed with error %d",
-@@ -379,11 +365,10 @@ init_slots(int clear_ins)
+@@ -379,11 +365,10 @@
                return -1;
        }
        list_for_each_entry(slot, &slot_list, slot_list) {
@@ -265594,7 +265523,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
                dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
                if (dev) {
                        if (update_adapter_status(slot->hotplug_slot, 1))
-@@ -414,8 +399,7 @@ check_slots(void)
+@@ -414,8 +399,7 @@
        }
        extracted = inserted = 0;
        list_for_each_entry(slot, &slot_list, slot_list) {
@@ -265604,7 +265533,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
                if (cpci_check_and_clear_ins(slot)) {
                        /*
                         * Some broken hardware (e.g. PLX 9054AB) asserts
-@@ -423,35 +407,34 @@ check_slots(void)
+@@ -423,35 +407,34 @@
                         */
                        if (slot->dev) {
                                warn("slot %s already inserted",
@@ -265647,7 +265576,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  
                        if (update_latch_status(slot->hotplug_slot, 1))
                                warn("failure to update latch file");
-@@ -464,18 +447,18 @@ check_slots(void)
+@@ -464,18 +447,18 @@
                        /* GSM, debug */
                        hs_csr = cpci_get_hs_csr(slot);
                        dbg("%s - slot %s HS_CSR (3) = %04x",
@@ -265669,7 +265598,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
  
                        if (!slot->extracting) {
                                if (update_latch_status(slot->hotplug_slot, 0)) {
-@@ -493,7 +476,7 @@ check_slots(void)
+@@ -493,7 +476,7 @@
                                 * bother trying to tell the driver or not?
                                 */
                                err("card in slot %s was improperly removed",
@@ -265678,10 +265607,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_core.c linux-2.6.27.19-
                                if (update_adapter_status(slot->hotplug_slot, 0))
                                        warn("failure to update adapter file");
                                slot->extracting = 0;
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_pci.c
---- linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpci_hotplug_pci.c 2009-03-25 16:11:12.000000000 +0000
-@@ -209,7 +209,7 @@ int cpci_led_on(struct slot* slot)
+diff -r 9608d5473017 drivers/pci/hotplug/cpci_hotplug_pci.c
+--- a/drivers/pci/hotplug/cpci_hotplug_pci.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpci_hotplug_pci.c   Wed May 06 16:56:30 2009 +0100
+@@ -209,7 +209,7 @@
                                              hs_cap + 2,
                                              hs_csr)) {
                        err("Could not set LOO for slot %s",
@@ -265690,7 +265619,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c linux-2.6.27.19-5
                        return -ENODEV;
                }
        }
-@@ -238,7 +238,7 @@ int cpci_led_off(struct slot* slot)
+@@ -238,7 +238,7 @@
                                              hs_cap + 2,
                                              hs_csr)) {
                        err("Could not clear LOO for slot %s",
@@ -265699,10 +265628,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpci_hotplug_pci.c linux-2.6.27.19-5
                        return -ENODEV;
                }
        }
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp.h
---- linux-2.6.27/drivers/pci/hotplug/cpqphp.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp.h   2009-03-25 16:11:12.000000000 +0000
-@@ -449,6 +449,11 @@ extern u8 cpqhp_disk_irq;
+diff -r 9608d5473017 drivers/pci/hotplug/cpqphp.h
+--- a/drivers/pci/hotplug/cpqphp.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpqphp.h     Wed May 06 16:56:30 2009 +0100
+@@ -449,6 +449,11 @@
  
  /* inline functions */
  
@@ -265714,7 +265643,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp.h linux-2.6.27.19-5.1/drivers
  /*
   * return_resource
   *
-@@ -696,14 +701,6 @@ static inline int get_presence_status(st
+@@ -696,14 +701,6 @@
        return presence_save;
  }
  
@@ -265729,10 +265658,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp.h linux-2.6.27.19-5.1/drivers
  static inline int wait_for_ctrl_irq(struct controller *ctrl)
  {
          DECLARE_WAITQUEUE(wait, current);
-diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp_core.c
---- linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/cpqphp_core.c      2009-03-25 16:11:12.000000000 +0000
-@@ -315,14 +315,15 @@ static void release_slot(struct hotplug_
+diff -r 9608d5473017 drivers/pci/hotplug/cpqphp_core.c
+--- a/drivers/pci/hotplug/cpqphp_core.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/cpqphp_core.c        Wed May 06 16:56:30 2009 +0100
+@@ -315,13 +315,14 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -265744,13 +265673,12 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
        kfree(slot->hotplug_slot);
        kfree(slot);
  }
-+#define SLOT_NAME_SIZE 10
 +
++#define SLOT_NAME_SIZE 10
  static int ctrl_slot_setup(struct controller *ctrl,
                        void __iomem *smbios_start,
-                       void __iomem *smbios_table)
-@@ -335,6 +336,7 @@ static int ctrl_slot_setup(struct contro
+@@ -335,6 +336,7 @@
        u8 slot_number;
        u8 ctrl_slot;
        u32 tempdword;
@@ -265758,7 +265686,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
        void __iomem *slot_entry= NULL;
        int result = -ENOMEM;
  
-@@ -363,16 +365,12 @@ static int ctrl_slot_setup(struct contro
+@@ -363,16 +365,12 @@
                if (!hotplug_slot->info)
                        goto error_hpslot;
                hotplug_slot_info = hotplug_slot->info;
@@ -265776,7 +265704,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
                slot_entry = get_SMBIOS_entry(smbios_start, smbios_table, 9,
                                        slot_entry);
-@@ -418,9 +416,9 @@ static int ctrl_slot_setup(struct contro
+@@ -418,9 +416,9 @@
                /* register this slot with the hotplug pci core */
                hotplug_slot->release = &release_slot;
                hotplug_slot->private = slot;
@@ -265788,7 +265716,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
                hotplug_slot_info->power_status = get_slot_enabled(ctrl, slot);
                hotplug_slot_info->attention_status =
                        cpq_get_attention_status(ctrl, slot);
-@@ -435,11 +433,12 @@ static int ctrl_slot_setup(struct contro
+@@ -435,11 +433,12 @@
                                slot->number, ctrl->slot_device_offset,
                                slot_number);
                result = pci_hp_register(hotplug_slot,
@@ -265804,7 +265732,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
                }
                
                slot->next = ctrl->slot;
-@@ -451,8 +450,6 @@ static int ctrl_slot_setup(struct contro
+@@ -451,8 +450,6 @@
        }
  
        return 0;
@@ -265813,7 +265741,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  error_info:
        kfree(hotplug_slot_info);
  error_hpslot:
-@@ -638,7 +635,7 @@ static int set_attention_status (struct 
+@@ -638,7 +635,7 @@
        u8 device;
        u8 function;
  
@@ -265822,7 +265750,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
                return -ENODEV;
-@@ -665,7 +662,7 @@ static int process_SI(struct hotplug_slo
+@@ -665,7 +662,7 @@
        u8 device;
        u8 function;
  
@@ -265831,7 +265759,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
                return -ENODEV;
-@@ -697,7 +694,7 @@ static int process_SS(struct hotplug_slo
+@@ -697,7 +694,7 @@
        u8 device;
        u8 function;
  
@@ -265840,7 +265768,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1)
                return -ENODEV;
-@@ -720,7 +717,7 @@ static int hardware_test(struct hotplug_
+@@ -720,7 +717,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265849,7 +265777,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        return cpqhp_hardware_test(ctrl, value);        
  }
-@@ -731,7 +728,7 @@ static int get_power_status(struct hotpl
+@@ -731,7 +728,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265858,7 +265786,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = get_slot_enabled(ctrl, slot);
        return 0;
-@@ -742,7 +739,7 @@ static int get_attention_status(struct h
+@@ -742,7 +739,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
        
@@ -265867,7 +265795,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = cpq_get_attention_status(ctrl, slot);
        return 0;
-@@ -753,7 +750,7 @@ static int get_latch_status(struct hotpl
+@@ -753,7 +750,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265876,7 +265804,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = cpq_get_latch_status(ctrl, slot);
  
-@@ -765,7 +762,7 @@ static int get_adapter_status(struct hot
+@@ -765,7 +762,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265885,7 +265813,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = get_presence_status(ctrl, slot);
  
-@@ -777,7 +774,7 @@ static int get_max_bus_speed (struct hot
+@@ -777,7 +774,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265894,7 +265822,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = ctrl->speed_capability;
  
-@@ -789,7 +786,7 @@ static int get_cur_bus_speed (struct hot
+@@ -789,7 +786,7 @@
        struct slot *slot = hotplug_slot->private;
        struct controller *ctrl = slot->ctrl;
  
@@ -265903,10 +265831,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/cpqphp_core.c linux-2.6.27.19-5.1/dr
  
        *value = ctrl->speed;
  
-diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/drivers/pci/hotplug/fakephp.c
---- linux-2.6.27/drivers/pci/hotplug/fakephp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/fakephp.c  2009-03-25 16:11:12.000000000 +0000
-@@ -66,7 +66,6 @@ struct dummy_slot {
+diff -r 9608d5473017 drivers/pci/hotplug/fakephp.c
+--- a/drivers/pci/hotplug/fakephp.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/fakephp.c    Wed May 06 16:56:30 2009 +0100
+@@ -66,7 +66,6 @@
        struct pci_dev *dev;
        struct work_struct remove_work;
        unsigned long removed;
@@ -265914,7 +265842,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/driver
  };
  
  static int debug;
-@@ -96,10 +95,13 @@ static void dummy_release(struct hotplug
+@@ -96,10 +95,13 @@
        kfree(dslot);
  }
  
@@ -265928,7 +265856,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/driver
        int retval = -ENOMEM;
        static int count = 1;
  
-@@ -119,19 +121,18 @@ static int add_slot(struct pci_dev *dev)
+@@ -119,19 +121,18 @@
        if (!dslot)
                goto error_info;
  
@@ -265951,7 +265879,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/driver
        dslot->slot = slot;
        dslot->dev = pci_dev_get(dev);
        list_add (&dslot->node, &slot_list);
-@@ -167,10 +168,11 @@ static void remove_slot(struct dummy_slo
+@@ -167,10 +168,11 @@
  {
        int retval;
  
@@ -265965,7 +265893,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/driver
  }
  
  /* called from the single-threaded workqueue handler to remove a slot */
-@@ -308,7 +310,7 @@ static int disable_slot(struct hotplug_s
+@@ -308,7 +310,7 @@
                return -ENODEV;
        dslot = slot->private;
  
@@ -265974,10 +265902,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/fakephp.c linux-2.6.27.19-5.1/driver
  
        for (func = 7; func >= 0; func--) {
                dev = pci_get_slot(dslot->dev->bus, dslot->dev->devfn + func);
-diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp.h
---- linux-2.6.27/drivers/pci/hotplug/ibmphp.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp.h   2009-03-25 16:11:12.000000000 +0000
-@@ -707,17 +707,16 @@ struct slot {
+diff -r 9608d5473017 drivers/pci/hotplug/ibmphp.h
+--- a/drivers/pci/hotplug/ibmphp.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/ibmphp.h     Wed May 06 16:56:30 2009 +0100
+@@ -707,17 +707,16 @@
        u8 device;
        u8 number;
        u8 real_physical_slot_num;
@@ -265997,10 +265925,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp.h linux-2.6.27.19-5.1/drivers
        struct bus_info *bus_on;
        struct list_head ibm_slot_list;
        u8 status;
-diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp_ebda.c
---- linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/ibmphp_ebda.c      2009-03-25 16:11:12.000000000 +0000
-@@ -620,11 +620,14 @@ static u8 calculate_first_slot (u8 slot_
+diff -r 9608d5473017 drivers/pci/hotplug/ibmphp_ebda.c
+--- a/drivers/pci/hotplug/ibmphp_ebda.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/ibmphp_ebda.c        Wed May 06 16:56:30 2009 +0100
+@@ -620,11 +620,14 @@
        return first_slot + 1;
  
  }
@@ -266016,7 +265944,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
        int which = 0; /* rxe = 1, chassis = 0 */
        u8 number = 1; /* either chassis or rxe # */
        u8 first_slot = 1;
-@@ -736,7 +739,6 @@ static void release_slot(struct hotplug_
+@@ -736,7 +739,6 @@
  
        slot = hotplug_slot->private;
        kfree(slot->hotplug_slot->info);
@@ -266024,7 +265952,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
        kfree(slot->hotplug_slot);
        slot->ctrl = NULL;
        slot->bus_on = NULL;
-@@ -768,6 +770,7 @@ static int __init ebda_rsrc_controller (
+@@ -768,6 +770,7 @@
        int rc;
        struct slot *tmp_slot;
        struct list_head *list;
@@ -266032,7 +265960,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
  
        addr = hpc_list_ptr->phys_addr;
        for (ctlr = 0; ctlr < hpc_list_ptr->num_ctlrs; ctlr++) {
-@@ -931,12 +934,6 @@ static int __init ebda_rsrc_controller (
+@@ -931,12 +934,6 @@
                                goto error_no_hp_info;
                        }
  
@@ -266045,7 +265973,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
                        tmp_slot = kzalloc(sizeof(*tmp_slot), GFP_KERNEL);
                        if (!tmp_slot) {
                                rc = -ENOMEM;
-@@ -1000,9 +997,9 @@ static int __init ebda_rsrc_controller (
+@@ -1000,9 +997,9 @@
        list_for_each (list, &ibmphp_slot_head) {
                tmp_slot = list_entry (list, struct slot, ibm_slot_list);
  
@@ -266057,7 +265985,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
        }
  
        print_ebda_hpc ();
-@@ -1012,8 +1009,6 @@ static int __init ebda_rsrc_controller (
+@@ -1012,8 +1009,6 @@
  error:
        kfree (hp_slot_ptr->private);
  error_no_slot:
@@ -266066,9 +265994,9 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/ibmphp_ebda.c linux-2.6.27.19-5.1/dr
        kfree (hp_slot_ptr->info);
  error_no_hp_info:
        kfree (hp_slot_ptr);
-diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pci_hotplug_core.c
---- linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pci_hotplug_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/pci_hotplug_core.c
+--- a/drivers/pci/hotplug/pci_hotplug_core.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pci_hotplug_core.c   Wed May 06 16:56:30 2009 +0100
 @@ -37,6 +37,7 @@
  #include <linux/init.h>
  #include <linux/mount.h>
@@ -266077,7 +266005,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
  #include <linux/pci.h>
  #include <linux/pci_hotplug.h>
  #include <asm/uaccess.h>
-@@ -61,7 +62,7 @@ static int debug;
+@@ -61,7 +62,7 @@
  //////////////////////////////////////////////////////////////////
  
  static LIST_HEAD(pci_hotplug_slot_list);
@@ -266086,7 +266014,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
  
  /* these strings match up with the values in pci_bus_speed */
  static char *pci_bus_speed_strings[] = {
-@@ -530,16 +531,12 @@ static struct hotplug_slot *get_slot_fro
+@@ -530,16 +531,12 @@
        struct hotplug_slot *slot;
        struct list_head *tmp;
  
@@ -266106,7 +266034,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
  }
  
  /**
-@@ -547,13 +544,15 @@ out:
+@@ -547,13 +544,15 @@
   * @bus: bus this slot is on
   * @slot: pointer to the &struct hotplug_slot to register
   * @slot_nr: slot number
@@ -266123,7 +266051,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
  {
        int result;
        struct pci_slot *pci_slot;
-@@ -568,48 +567,29 @@ int pci_hp_register(struct hotplug_slot 
+@@ -568,48 +567,29 @@
                return -EINVAL;
        }
  
@@ -266180,7 +266108,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
        return result;
  }
  
-@@ -630,21 +610,23 @@ int pci_hp_deregister(struct hotplug_slo
+@@ -630,21 +610,23 @@
        if (!hotplug)
                return -ENODEV;
  
@@ -266209,18 +266137,19 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pci_hotplug_core.c linux-2.6.27.19-5
  
        return 0;
  }
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp.h
---- linux-2.6.27/drivers/pci/hotplug/pciehp.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp.h   2009-03-25 16:11:12.000000000 +0000
-@@ -61,15 +61,13 @@ extern struct workqueue_struct *pciehp_w
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp.h
+--- a/drivers/pci/hotplug/pciehp.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp.h     Wed May 06 16:56:30 2009 +0100
+@@ -61,15 +61,13 @@
  struct slot {
        u8 bus;
        u8 device;
--      u32 number;
-       u8 state;
++      u8 state;
++      u8 hp_slot;
+       u32 number;
+-      u8 state;
 -      struct timer_list task_event;
-       u8 hp_slot;
-+      u32 number;
+-      u8 hp_slot;
        struct controller *ctrl;
        struct hpc_ops *hpc_ops;
        struct hotplug_slot *hotplug_slot;
@@ -266229,7 +266158,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp.h linux-2.6.27.19-5.1/drivers
        unsigned long last_emi_toggle;
        struct delayed_work work;       /* work for button event */
        struct mutex lock;
-@@ -161,6 +159,11 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -161,6 +159,11 @@
  int pciehp_disable_slot(struct slot *p_slot);
  int pcie_enable_notification(struct controller *ctrl);
  
@@ -266241,10 +266170,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp.h linux-2.6.27.19-5.1/drivers
  static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
  {
        struct slot *slot;
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_core.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_core.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_core.c      2009-03-25 16:11:12.000000000 +0000
-@@ -126,8 +126,10 @@ static int set_lock_status(struct hotplu
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_core.c
+--- a/drivers/pci/hotplug/pciehp_core.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_core.c        Wed May 06 16:56:30 2009 +0100
+@@ -126,8 +126,10 @@
        mutex_lock(&slot->ctrl->crit_sect);
  
        /* has it been >1 sec since our last toggle? */
@@ -266256,7 +266185,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        /* see what our current state is */
        retval = get_lock_status(hotplug_slot, &value);
-@@ -180,7 +182,8 @@ static struct hotplug_slot_attribute hot
+@@ -180,7 +182,8 @@
   */
  static void release_slot(struct hotplug_slot *hotplug_slot)
  {
@@ -266266,7 +266195,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        kfree(hotplug_slot->info);
        kfree(hotplug_slot);
-@@ -191,7 +194,7 @@ static int init_slots(struct controller 
+@@ -191,7 +194,7 @@
        struct slot *slot;
        struct hotplug_slot *hotplug_slot;
        struct hotplug_slot_info *info;
@@ -266275,7 +266204,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
        int retval = -ENOMEM;
  
        list_for_each_entry(slot, &ctrl->slot_list, slot_list) {
-@@ -205,39 +208,27 @@ static int init_slots(struct controller 
+@@ -205,39 +208,27 @@
  
                /* register this slot with the hotplug pci core */
                hotplug_slot->info = info;
@@ -266283,23 +266212,34 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
                hotplug_slot->private = slot;
                hotplug_slot->release = &release_slot;
                hotplug_slot->ops = &pciehp_hotplug_slot_ops;
--              get_power_status(hotplug_slot, &info->power_status);
--              get_attention_status(hotplug_slot, &info->attention_status);
--              get_latch_status(hotplug_slot, &info->latch_status);
--              get_adapter_status(hotplug_slot, &info->adapter_status);
-               slot->hotplug_slot = hotplug_slot;
++              slot->hotplug_slot = hotplug_slot;
 +              snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
-               dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
-                   "slot_device_offset=%x\n", slot->bus, slot->device,
-                   slot->hp_slot, slot->number, ctrl->slot_device_offset);
--duplicate_name:
-               retval = pci_hp_register(hotplug_slot,
-                                        ctrl->pci_dev->subordinate,
--                                       slot->device);
++
++              dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
++                  "slot_device_offset=%x\n", slot->bus, slot->device,
++                  slot->hp_slot, slot->number, ctrl->slot_device_offset);
++              retval = pci_hp_register(hotplug_slot,
++                                       ctrl->pci_dev->subordinate,
 +                                       slot->device,
 +                                       name);
-               if (retval) {
++              if (retval) {
++                      err("pci_hp_register failed with error %d\n", retval);
++                      goto error_info;
++              }
+               get_power_status(hotplug_slot, &info->power_status);
+               get_attention_status(hotplug_slot, &info->attention_status);
+               get_latch_status(hotplug_slot, &info->latch_status);
+               get_adapter_status(hotplug_slot, &info->adapter_status);
+-              slot->hotplug_slot = hotplug_slot;
+-
+-              dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
+-                  "slot_device_offset=%x\n", slot->bus, slot->device,
+-                  slot->hp_slot, slot->number, ctrl->slot_device_offset);
+-duplicate_name:
+-              retval = pci_hp_register(hotplug_slot,
+-                                       ctrl->pci_dev->subordinate,
+-                                       slot->device);
+-              if (retval) {
 -                      /*
 -                       * If slot N already exists, we'll try to create
 -                       * slot N-1, N-2 ... N-M, until we overflow.
@@ -266312,17 +266252,13 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
 -                              else
 -                                      err("duplicate slot name overflow\n");
 -                      }
-                       err("pci_hp_register failed with error %d\n", retval);
-                       goto error_info;
-               }
-+              get_power_status(hotplug_slot, &info->power_status);
-+              get_attention_status(hotplug_slot, &info->attention_status);
-+              get_latch_status(hotplug_slot, &info->latch_status);
-+              get_adapter_status(hotplug_slot, &info->adapter_status);
+-                      err("pci_hp_register failed with error %d\n", retval);
+-                      goto error_info;
+-              }
                /* create additional sysfs entries */
                if (EMI(ctrl)) {
                        retval = sysfs_create_file(&hotplug_slot->pci_slot->kobj,
-@@ -278,7 +269,7 @@ static int set_attention_status(struct h
+@@ -278,7 +269,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -266331,7 +266267,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        hotplug_slot->info->attention_status = status;
  
-@@ -293,7 +284,7 @@ static int enable_slot(struct hotplug_sl
+@@ -293,7 +284,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -266340,7 +266276,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        return pciehp_sysfs_enable_slot(slot);
  }
-@@ -303,7 +294,7 @@ static int disable_slot(struct hotplug_s
+@@ -303,7 +294,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -266349,7 +266285,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        return pciehp_sysfs_disable_slot(slot);
  }
-@@ -313,7 +304,7 @@ static int get_power_status(struct hotpl
+@@ -313,7 +304,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266358,7 +266294,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_power_status(slot, value);
        if (retval < 0)
-@@ -327,7 +318,7 @@ static int get_attention_status(struct h
+@@ -327,7 +318,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266367,7 +266303,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_attention_status(slot, value);
        if (retval < 0)
-@@ -341,7 +332,7 @@ static int get_latch_status(struct hotpl
+@@ -341,7 +332,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266376,7 +266312,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_latch_status(slot, value);
        if (retval < 0)
-@@ -355,7 +346,7 @@ static int get_adapter_status(struct hot
+@@ -355,7 +346,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266385,7 +266321,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_adapter_status(slot, value);
        if (retval < 0)
-@@ -370,7 +361,7 @@ static int get_max_bus_speed(struct hotp
+@@ -370,7 +361,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266394,7 +266330,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_max_bus_speed(slot, value);
        if (retval < 0)
-@@ -384,7 +375,7 @@ static int get_cur_bus_speed(struct hotp
+@@ -384,7 +375,7 @@
        struct slot *slot = hotplug_slot->private;
        int retval;
  
@@ -266403,10 +266339,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
        if (retval < 0)
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_ctrl.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_ctrl.c      2009-03-25 16:11:12.000000000 +0000
-@@ -65,7 +65,7 @@ u8 pciehp_handle_attention_button(struct
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_ctrl.c
+--- a/drivers/pci/hotplug/pciehp_ctrl.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_ctrl.c        Wed May 06 16:56:30 2009 +0100
+@@ -65,7 +65,7 @@
        /*
         *  Button pressed - See if need to TAKE ACTION!!!
         */
@@ -266415,7 +266351,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
        event_type = INT_BUTTON_PRESS;
  
        queue_interrupt_event(p_slot, event_type);
-@@ -86,13 +86,13 @@ u8 pciehp_handle_switch_change(struct sl
+@@ -86,13 +86,13 @@
                /*
                 * Switch opened
                 */
@@ -266431,7 +266367,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_SWITCH_CLOSE;
        }
  
-@@ -117,13 +117,13 @@ u8 pciehp_handle_presence_change(struct 
+@@ -117,13 +117,13 @@
                /*
                 * Card Present
                 */
@@ -266447,7 +266383,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_PRESENCE_OFF;
        }
  
-@@ -143,13 +143,13 @@ u8 pciehp_handle_power_fault(struct slot
+@@ -143,13 +143,13 @@
                /*
                 * power fault Cleared
                 */
@@ -266463,7 +266399,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_POWER_FAULT;
                info("power fault bit %x set\n", 0);
        }
-@@ -404,11 +404,11 @@ static void handle_button_press_event(st
+@@ -404,11 +404,11 @@
                if (getstatus) {
                        p_slot->state = BLINKINGOFF_STATE;
                        info("PCI slot #%s - powering off due to button "
@@ -266477,7 +266413,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                }
                /* blink green LED and turn off amber */
                if (PWR_LED(ctrl))
-@@ -425,7 +425,7 @@ static void handle_button_press_event(st
+@@ -425,7 +425,7 @@
                 * press the attention again before the 5 sec. limit
                 * expires to cancel hot-add or hot-remove
                 */
@@ -266486,7 +266422,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                dbg("%s: button cancel\n", __func__);
                cancel_delayed_work(&p_slot->work);
                if (p_slot->state == BLINKINGOFF_STATE) {
-@@ -438,7 +438,7 @@ static void handle_button_press_event(st
+@@ -438,7 +438,7 @@
                if (ATTN_LED(ctrl))
                        p_slot->hpc_ops->set_attention_status(p_slot, 0);
                info("PCI slot #%s - action canceled due to button press\n",
@@ -266495,7 +266431,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                p_slot->state = STATIC_STATE;
                break;
        case POWEROFF_STATE:
-@@ -448,7 +448,7 @@ static void handle_button_press_event(st
+@@ -448,7 +448,7 @@
                 * this means that the previous attention button action
                 * to hot-add or hot-remove is undergoing
                 */
@@ -266504,7 +266440,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                update_slot_info(p_slot);
                break;
        default:
-@@ -529,7 +529,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -529,7 +529,7 @@
        rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
        if (rc || !getstatus) {
                info("%s: no adapter on slot(%s)\n", __func__,
@@ -266513,7 +266449,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                mutex_unlock(&p_slot->ctrl->crit_sect);
                return -ENODEV;
        }
-@@ -537,7 +537,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -537,7 +537,7 @@
                rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
                if (rc || getstatus) {
                        info("%s: latch open on slot(%s)\n", __func__,
@@ -266522,7 +266458,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -ENODEV;
                }
-@@ -547,7 +547,7 @@ int pciehp_enable_slot(struct slot *p_sl
+@@ -547,7 +547,7 @@
                rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
                if (rc || getstatus) {
                        info("%s: already enabled on slot(%s)\n", __func__,
@@ -266531,7 +266467,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -EINVAL;
                }
-@@ -582,7 +582,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -582,7 +582,7 @@
                ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
                if (ret || !getstatus) {
                        info("%s: no adapter on slot(%s)\n", __func__,
@@ -266540,7 +266476,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -ENODEV;
                }
-@@ -592,7 +592,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -592,7 +592,7 @@
                ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
                if (ret || getstatus) {
                        info("%s: latch open on slot(%s)\n", __func__,
@@ -266549,7 +266485,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -ENODEV;
                }
-@@ -602,7 +602,7 @@ int pciehp_disable_slot(struct slot *p_s
+@@ -602,7 +602,7 @@
                ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
                if (ret || !getstatus) {
                        info("%s: already disabled slot(%s)\n", __func__,
@@ -266558,7 +266494,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -EINVAL;
                }
-@@ -632,14 +632,14 @@ int pciehp_sysfs_enable_slot(struct slot
+@@ -632,14 +632,14 @@
                break;
        case POWERON_STATE:
                info("Slot %s is already in powering on state\n",
@@ -266576,7 +266512,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                break;
        }
        mutex_unlock(&p_slot->lock);
-@@ -664,14 +664,14 @@ int pciehp_sysfs_disable_slot(struct slo
+@@ -664,14 +664,14 @@
                break;
        case POWEROFF_STATE:
                info("Slot %s is already in powering off state\n",
@@ -266594,10 +266530,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_ctrl.c linux-2.6.27.19-5.1/dr
                break;
        }
        mutex_unlock(&p_slot->lock);
-diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_hpc.c linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_hpc.c
---- linux-2.6.27/drivers/pci/hotplug/pciehp_hpc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/pciehp_hpc.c       2009-03-25 16:11:12.000000000 +0000
-@@ -1044,7 +1044,6 @@ static int pcie_init_slot(struct control
+diff -r 9608d5473017 drivers/pci/hotplug/pciehp_hpc.c
+--- a/drivers/pci/hotplug/pciehp_hpc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/pciehp_hpc.c Wed May 06 16:56:30 2009 +0100
+@@ -1044,7 +1044,6 @@
        slot->device = ctrl->slot_device_offset + slot->hp_slot;
        slot->hpc_ops = ctrl->hpc_ops;
        slot->number = ctrl->first_slot;
@@ -266605,9 +266541,9 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/pciehp_hpc.c linux-2.6.27.19-5.1/dri
        mutex_init(&slot->lock);
        INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
        list_add(&slot->slot_list, &ctrl->slot_list);
-diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/rpadlpar_core.c
---- linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/rpadlpar_core.c    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/hotplug/rpadlpar_core.c
+--- a/drivers/pci/hotplug/rpadlpar_core.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/rpadlpar_core.c      Wed May 06 16:56:30 2009 +0100
 @@ -14,6 +14,8 @@
   *      as published by the Free Software Foundation; either version
   *      2 of the License, or (at your option) any later version.
@@ -266617,7 +266553,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/
  #include <linux/init.h>
  #include <linux/pci.h>
  #include <linux/string.h>
-@@ -155,16 +157,15 @@ static void dlpar_pci_add_bus(struct dev
+@@ -155,16 +157,15 @@
            dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
                of_scan_pci_bridge(dn, dev);
  
@@ -266640,7 +266576,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/
  }
  
  static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn)
-@@ -206,22 +207,19 @@ static int dlpar_add_pci_slot(char *drc_
+@@ -206,22 +207,19 @@
  static int dlpar_remove_root_bus(struct pci_controller *phb)
  {
        struct pci_bus *phb_bus;
@@ -266669,16 +266605,16 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/
  }
  
  static int dlpar_remove_phb(char *drc_name, struct device_node *dn)
-@@ -233,6 +231,8 @@ static int dlpar_remove_phb(char *drc_na
+@@ -232,6 +230,8 @@
        if (!pcibios_find_pci_bus(dn))
                return -EINVAL;
-+      pr_debug("PCI: Removing PHB %s...\n", dn->full_name);
 +
++      pr_debug("PCI: Removing PHB %s...\n", dn->full_name);
        /* If pci slot is hotplugable, use hotplug to remove it */
        slot = find_php_slot(dn);
-       if (slot) {
-@@ -378,25 +378,36 @@ int dlpar_remove_pci_slot(char *drc_name
+@@ -378,25 +378,36 @@
        if (!bus)
                return -EINVAL;
  
@@ -266700,10 +266636,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/
 -      } else
 -              pcibios_remove_pci_devices(bus);
 +      }
-+
 +      /* Remove all devices below slot */
 +      pcibios_remove_pci_devices(bus);
++
 +      /* Unmap PCI IO space */
        if (pcibios_unmap_io_space(bus)) {
                printk(KERN_ERR "%s: failed to unmap bus range\n",
@@ -266718,10 +266654,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpadlpar_core.c linux-2.6.27.19-5.1/
        pci_remove_bus_device(bus->self);
        return 0;
  }
-diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/drivers/pci/hotplug/rpaphp_slot.c
---- linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/rpaphp_slot.c      2009-03-25 16:11:12.000000000 +0000
-@@ -43,7 +43,7 @@ static void rpaphp_release_slot(struct h
+diff -r 9608d5473017 drivers/pci/hotplug/rpaphp_slot.c
+--- a/drivers/pci/hotplug/rpaphp_slot.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/rpaphp_slot.c        Wed May 06 16:56:30 2009 +0100
+@@ -43,7 +43,7 @@
  void dealloc_slot_struct(struct slot *slot)
  {
        kfree(slot->hotplug_slot->info);
@@ -266730,7 +266666,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/dr
        kfree(slot->hotplug_slot);
        kfree(slot);
  }
-@@ -63,11 +63,9 @@ struct slot *alloc_slot_struct(struct de
+@@ -63,11 +63,9 @@
                                           GFP_KERNEL);
        if (!slot->hotplug_slot->info)
                goto error_hpslot;
@@ -266744,7 +266680,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/dr
        slot->dn = dn;
        slot->index = drc_index;
        slot->power_domain = power_domain;
-@@ -137,7 +135,7 @@ int rpaphp_register_slot(struct slot *sl
+@@ -137,7 +135,7 @@
                slotno = PCI_SLOT(PCI_DN(slot->dn->child)->devfn);
        else
                slotno = -1;
@@ -266753,7 +266689,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/dr
        if (retval) {
                err("pci_hp_register failed with error %d\n", retval);
                return retval;
-@@ -147,9 +145,5 @@ int rpaphp_register_slot(struct slot *sl
+@@ -147,9 +145,5 @@
        list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
        info("Slot [%s] registered\n", slot->name);
        return 0;
@@ -266763,10 +266699,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/rpaphp_slot.c linux-2.6.27.19-5.1/dr
 -      return retval;
  }
  
-diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/drivers/pci/hotplug/sgi_hotplug.c
---- linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/sgi_hotplug.c      2009-03-25 16:11:12.000000000 +0000
-@@ -161,7 +161,8 @@ static int sn_pci_bus_valid(struct pci_b
+diff -r 9608d5473017 drivers/pci/hotplug/sgi_hotplug.c
+--- a/drivers/pci/hotplug/sgi_hotplug.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/sgi_hotplug.c        Wed May 06 16:56:30 2009 +0100
+@@ -161,7 +161,8 @@
  }
  
  static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot,
@@ -266776,7 +266712,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
  {
        struct pcibus_info *pcibus_info;
        struct slot *slot;
-@@ -173,15 +174,9 @@ static int sn_hp_slot_private_alloc(stru
+@@ -173,15 +174,9 @@
                return -ENOMEM;
        bss_hotplug_slot->private = slot;
  
@@ -266793,7 +266729,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
                pci_domain_nr(pci_bus),
                ((u16)pcibus_info->pbi_buscommon.bs_persist_busnum),
                device + 1);
-@@ -418,7 +413,7 @@ static int enable_slot(struct hotplug_sl
+@@ -418,7 +413,7 @@
        /*
         * Add the slot's devices to the ACPI infrastructure */
        if (SN_ACPI_BASE_SUPPORT() && ssdt) {
@@ -266802,7 +266738,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
                struct acpi_device *pdevice;
                struct acpi_device *device;
                acpi_handle phandle;
-@@ -510,7 +505,7 @@ static int disable_slot(struct hotplug_s
+@@ -510,7 +505,7 @@
        /* free the ACPI resources for the slot */
        if (SN_ACPI_BASE_SUPPORT() &&
              PCI_CONTROLLER(slot->pci_bus)->acpi_handle) {
@@ -266811,7 +266747,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
                struct acpi_device *device;
                acpi_handle phandle;
                acpi_handle chandle = NULL;
-@@ -608,7 +603,6 @@ static inline int get_power_status(struc
+@@ -608,7 +603,6 @@
  static void sn_release_slot(struct hotplug_slot *bss_hotplug_slot)
  {
        kfree(bss_hotplug_slot->info);
@@ -266819,7 +266755,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
        kfree(bss_hotplug_slot->private);
        kfree(bss_hotplug_slot);
  }
-@@ -618,6 +612,7 @@ static int sn_hotplug_slot_register(stru
+@@ -618,6 +612,7 @@
        int device;
        struct pci_slot *pci_slot;
        struct hotplug_slot *bss_hotplug_slot;
@@ -266827,7 +266763,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
        int rc = 0;
  
        /*
-@@ -645,15 +640,14 @@ static int sn_hotplug_slot_register(stru
+@@ -645,15 +640,14 @@
                }
  
                if (sn_hp_slot_private_alloc(bss_hotplug_slot,
@@ -266845,10 +266781,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/sgi_hotplug.c linux-2.6.27.19-5.1/dr
                if (rc)
                        goto register_err;
  
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp.h linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp.h
---- linux-2.6.27/drivers/pci/hotplug/shpchp.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp.h   2009-03-25 16:11:12.000000000 +0000
-@@ -69,15 +69,13 @@ struct slot {
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp.h
+--- a/drivers/pci/hotplug/shpchp.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp.h     Wed May 06 16:56:30 2009 +0100
+@@ -69,15 +69,13 @@
        u8 state;
        u8 presence_save;
        u8 pwr_save;
@@ -266865,22 +266801,22 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp.h linux-2.6.27.19-5.1/drivers
  };
  
  struct event_info {
-@@ -169,6 +167,11 @@ extern void cleanup_slots(struct control
+@@ -168,6 +166,11 @@
+ extern void cleanup_slots(struct controller *ctrl);
  extern void shpchp_queue_pushbutton_work(struct work_struct *work);
  extern int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
++
 +static inline const char *slot_name(struct slot *slot)
 +{
 +      return hotplug_slot_name(slot->hotplug_slot);
 +}
-+
  #ifdef CONFIG_ACPI
  #include <linux/pci-acpi.h>
- static inline int get_hp_params_from_firmware(struct pci_dev *dev,
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_core.c
---- linux-2.6.27/drivers/pci/hotplug/shpchp_core.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_core.c      2009-03-25 16:11:12.000000000 +0000
-@@ -89,7 +89,7 @@ static void release_slot(struct hotplug_
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp_core.c
+--- a/drivers/pci/hotplug/shpchp_core.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp_core.c        Wed May 06 16:56:30 2009 +0100
+@@ -89,7 +89,7 @@
  {
        struct slot *slot = hotplug_slot->private;
  
@@ -266889,7 +266825,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        kfree(slot->hotplug_slot->info);
        kfree(slot->hotplug_slot);
-@@ -101,8 +101,9 @@ static int init_slots(struct controller 
+@@ -101,8 +101,9 @@
        struct slot *slot;
        struct hotplug_slot *hotplug_slot;
        struct hotplug_slot_info *info;
@@ -266900,7 +266836,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        for (i = 0; i < ctrl->num_slots; i++) {
                slot = kzalloc(sizeof(*slot), GFP_KERNEL);
-@@ -119,8 +120,6 @@ static int init_slots(struct controller 
+@@ -119,8 +120,6 @@
                        goto error_hpslot;
                hotplug_slot->info = info;
  
@@ -266909,27 +266845,36 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
                slot->hp_slot = i;
                slot->ctrl = ctrl;
                slot->bus = ctrl->pci_dev->subordinate->number;
-@@ -133,37 +132,24 @@ static int init_slots(struct controller 
+@@ -133,36 +132,23 @@
                /* register this slot with the hotplug pci core */
                hotplug_slot->private = slot;
                hotplug_slot->release = &release_slot;
 -              snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number);
 +              snprintf(name, SLOT_NAME_SIZE, "%d", slot->number);
                hotplug_slot->ops = &shpchp_hotplug_slot_ops;
++
++              dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
++                  "slot_device_offset=%x\n", slot->bus, slot->device,
++                  slot->hp_slot, slot->number, ctrl->slot_device_offset);
++              retval = pci_hp_register(slot->hotplug_slot,
++                              ctrl->pci_dev->subordinate, slot->device, name);
++              if (retval) {
++                      err("pci_hp_register failed with error %d\n", retval);
++                      goto error_info;
++              }
  
--              get_power_status(hotplug_slot, &info->power_status);
--              get_attention_status(hotplug_slot, &info->attention_status);
--              get_latch_status(hotplug_slot, &info->latch_status);
--              get_adapter_status(hotplug_slot, &info->adapter_status);
+               get_power_status(hotplug_slot, &info->power_status);
+               get_attention_status(hotplug_slot, &info->attention_status);
+               get_latch_status(hotplug_slot, &info->latch_status);
+               get_adapter_status(hotplug_slot, &info->adapter_status);
 -
-               dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
-                   "slot_device_offset=%x\n", slot->bus, slot->device,
-                   slot->hp_slot, slot->number, ctrl->slot_device_offset);
+-              dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x "
+-                  "slot_device_offset=%x\n", slot->bus, slot->device,
+-                  slot->hp_slot, slot->number, ctrl->slot_device_offset);
 -duplicate_name:
-               retval = pci_hp_register(slot->hotplug_slot,
+-              retval = pci_hp_register(slot->hotplug_slot,
 -                              ctrl->pci_dev->subordinate, slot->device);
-+                              ctrl->pci_dev->subordinate, slot->device, name);
-               if (retval) {
+-              if (retval) {
 -                      /*
 -                       * If slot N already exists, we'll try to create
 -                       * slot N-1, N-2 ... N-M, until we overflow.
@@ -266942,19 +266887,13 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
 -                              else
 -                                      err("duplicate slot name overflow\n");
 -                      }
-                       err("pci_hp_register failed with error %d\n", retval);
-                       goto error_info;
-               }
+-                      err("pci_hp_register failed with error %d\n", retval);
+-                      goto error_info;
+-              }
  
-+              get_power_status(hotplug_slot, &info->power_status);
-+              get_attention_status(hotplug_slot, &info->attention_status);
-+              get_latch_status(hotplug_slot, &info->latch_status);
-+              get_adapter_status(hotplug_slot, &info->adapter_status);
-+
                list_add(&slot->slot_list, &ctrl->slot_list);
        }
-@@ -201,7 +187,7 @@ static int set_attention_status (struct 
+@@ -201,7 +187,7 @@
  {
        struct slot *slot = get_slot(hotplug_slot);
  
@@ -266963,7 +266902,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        hotplug_slot->info->attention_status = status;
        slot->hpc_ops->set_attention_status(slot, status);
-@@ -213,7 +199,7 @@ static int enable_slot (struct hotplug_s
+@@ -213,7 +199,7 @@
  {
        struct slot *slot = get_slot(hotplug_slot);
  
@@ -266972,7 +266911,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        return shpchp_sysfs_enable_slot(slot);
  }
-@@ -222,7 +208,7 @@ static int disable_slot (struct hotplug_
+@@ -222,7 +208,7 @@
  {
        struct slot *slot = get_slot(hotplug_slot);
  
@@ -266981,7 +266920,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        return shpchp_sysfs_disable_slot(slot);
  }
-@@ -232,7 +218,7 @@ static int get_power_status (struct hotp
+@@ -232,7 +218,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -266990,7 +266929,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_power_status(slot, value);
        if (retval < 0)
-@@ -246,7 +232,7 @@ static int get_attention_status (struct 
+@@ -246,7 +232,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -266999,7 +266938,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_attention_status(slot, value);
        if (retval < 0)
-@@ -260,7 +246,7 @@ static int get_latch_status (struct hotp
+@@ -260,7 +246,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -267008,7 +266947,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_latch_status(slot, value);
        if (retval < 0)
-@@ -274,7 +260,7 @@ static int get_adapter_status (struct ho
+@@ -274,7 +260,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -267017,7 +266956,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_adapter_status(slot, value);
        if (retval < 0)
-@@ -289,7 +275,7 @@ static int get_max_bus_speed(struct hotp
+@@ -289,7 +275,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -267026,7 +266965,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_max_bus_speed(slot, value);
        if (retval < 0)
-@@ -303,7 +289,7 @@ static int get_cur_bus_speed (struct hot
+@@ -303,7 +289,7 @@
        struct slot *slot = get_slot(hotplug_slot);
        int retval;
  
@@ -267035,10 +266974,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_core.c linux-2.6.27.19-5.1/dr
  
        retval = slot->hpc_ops->get_cur_bus_speed(slot, value);
        if (retval < 0)
-diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_ctrl.c
---- linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/hotplug/shpchp_ctrl.c      2009-03-25 16:11:12.000000000 +0000
-@@ -70,7 +70,7 @@ u8 shpchp_handle_attention_button(u8 hp_
+diff -r 9608d5473017 drivers/pci/hotplug/shpchp_ctrl.c
+--- a/drivers/pci/hotplug/shpchp_ctrl.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/hotplug/shpchp_ctrl.c        Wed May 06 16:56:30 2009 +0100
+@@ -70,7 +70,7 @@
        /*
         *  Button pressed - See if need to TAKE ACTION!!!
         */
@@ -267047,7 +266986,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
        event_type = INT_BUTTON_PRESS;
  
        queue_interrupt_event(p_slot, event_type);
-@@ -98,7 +98,7 @@ u8 shpchp_handle_switch_change(u8 hp_slo
+@@ -98,7 +98,7 @@
                /*
                 * Switch opened
                 */
@@ -267056,7 +266995,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_SWITCH_OPEN;
                if (p_slot->pwr_save && p_slot->presence_save) {
                        event_type = INT_POWER_FAULT;
-@@ -108,7 +108,7 @@ u8 shpchp_handle_switch_change(u8 hp_slo
+@@ -108,7 +108,7 @@
                /*
                 *  Switch closed
                 */
@@ -267065,7 +267004,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_SWITCH_CLOSE;
        }
  
-@@ -135,13 +135,13 @@ u8 shpchp_handle_presence_change(u8 hp_s
+@@ -135,13 +135,13 @@
                /*
                 * Card Present
                 */
@@ -267081,7 +267020,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_PRESENCE_OFF;
        }
  
-@@ -164,14 +164,14 @@ u8 shpchp_handle_power_fault(u8 hp_slot,
+@@ -164,14 +164,14 @@
                /*
                 * Power fault Cleared
                 */
@@ -267098,7 +267037,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                event_type = INT_POWER_FAULT;
                /* set power fault status for this board */
                p_slot->status = 0xFF;
-@@ -493,11 +493,11 @@ static void handle_button_press_event(st
+@@ -493,11 +493,11 @@
                if (getstatus) {
                        p_slot->state = BLINKINGOFF_STATE;
                        info("PCI slot #%s - powering off due to button "
@@ -267112,7 +267051,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                }
                /* blink green LED and turn off amber */
                p_slot->hpc_ops->green_led_blink(p_slot);
-@@ -512,7 +512,7 @@ static void handle_button_press_event(st
+@@ -512,7 +512,7 @@
                 * press the attention again before the 5 sec. limit
                 * expires to cancel hot-add or hot-remove
                 */
@@ -267121,7 +267060,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                dbg("%s: button cancel\n", __func__);
                cancel_delayed_work(&p_slot->work);
                if (p_slot->state == BLINKINGOFF_STATE)
-@@ -521,7 +521,7 @@ static void handle_button_press_event(st
+@@ -521,7 +521,7 @@
                        p_slot->hpc_ops->green_led_off(p_slot);
                p_slot->hpc_ops->set_attention_status(p_slot, 0);
                info("PCI slot #%s - action canceled due to button press\n",
@@ -267130,7 +267069,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                p_slot->state = STATIC_STATE;
                break;
        case POWEROFF_STATE:
-@@ -531,7 +531,7 @@ static void handle_button_press_event(st
+@@ -531,7 +531,7 @@
                 * this means that the previous attention button action
                 * to hot-add or hot-remove is undergoing
                 */
@@ -267139,7 +267078,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                update_slot_info(p_slot);
                break;
        default:
-@@ -574,17 +574,17 @@ static int shpchp_enable_slot (struct sl
+@@ -574,17 +574,17 @@
        mutex_lock(&p_slot->ctrl->crit_sect);
        rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
        if (rc || !getstatus) {
@@ -267160,7 +267099,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                goto out;
        }
  
-@@ -633,17 +633,17 @@ static int shpchp_disable_slot (struct s
+@@ -633,17 +633,17 @@
  
        rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
        if (rc || !getstatus) {
@@ -267181,7 +267120,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                goto out;
        }
  
-@@ -671,14 +671,14 @@ int shpchp_sysfs_enable_slot(struct slot
+@@ -671,14 +671,14 @@
                break;
        case POWERON_STATE:
                info("Slot %s is already in powering on state\n",
@@ -267199,7 +267138,7 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                break;
        }
        mutex_unlock(&p_slot->lock);
-@@ -703,14 +703,14 @@ int shpchp_sysfs_disable_slot(struct slo
+@@ -703,14 +703,14 @@
                break;
        case POWEROFF_STATE:
                info("Slot %s is already in powering off state\n",
@@ -267217,10 +267156,10 @@ diff -purN linux-2.6.27/drivers/pci/hotplug/shpchp_ctrl.c linux-2.6.27.19-5.1/dr
                break;
        }
        mutex_unlock(&p_slot->lock);
-diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pci/intel-iommu.c
---- linux-2.6.27/drivers/pci/intel-iommu.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intel-iommu.c      2009-03-25 16:11:12.000000000 +0000
-@@ -49,8 +49,6 @@
+diff -r 9608d5473017 drivers/pci/intel-iommu.c
+--- a/drivers/pci/intel-iommu.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/intel-iommu.c        Wed May 06 16:56:30 2009 +0100
+@@ -49,16 +49,12 @@
  
  #define DEFAULT_DOMAIN_ADDRESS_WIDTH 48
  
@@ -267229,16 +267168,15 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  #define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1)
  
  
-@@ -58,8 +56,6 @@ static void flush_unmaps_timeout(unsigne
+ static void flush_unmaps_timeout(unsigned long data);
  
  DEFINE_TIMER(unmap_timer,  flush_unmaps_timeout, 0, 0);
--static struct intel_iommu *g_iommus;
 -
+-static struct intel_iommu *g_iommus;
  #define HIGH_WATER_MARK 250
  struct deferred_flush_tables {
-       int next;
-@@ -72,6 +68,8 @@ static struct deferred_flush_tables *def
+@@ -72,6 +68,8 @@
  /* bitmap for indexing intel_iommus */
  static int g_num_of_iommus;
  
@@ -267247,7 +267185,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  static DEFINE_SPINLOCK(async_umap_flush_lock);
  static LIST_HEAD(unmaps_to_do);
  
-@@ -80,7 +78,7 @@ static long list_size;
+@@ -80,7 +78,7 @@
  
  static void domain_remove_dev_info(struct dmar_domain *domain);
  
@@ -267256,21 +267194,21 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  static int __initdata dmar_map_gfx = 1;
  static int dmar_forcedac;
  static int intel_iommu_strict;
-@@ -185,13 +183,6 @@ void free_iova_mem(struct iova *iova)
+@@ -183,13 +181,6 @@
+ void free_iova_mem(struct iova *iova)
+ {
        kmem_cache_free(iommu_iova_cache, iova);
- }
+-}
+-
 -static inline void __iommu_flush_cache(
 -      struct intel_iommu *iommu, void *addr, int size)
 -{
 -      if (!ecap_coherent(iommu->ecap))
 -              clflush_cache_range(addr, size);
--}
--
+ }
  /* Gets context entry for a given bus and devfn */
- static struct context_entry * device_to_context_entry(struct intel_iommu *iommu,
-               u8 bus, u8 devfn)
-@@ -488,19 +479,6 @@ static int iommu_alloc_root_entry(struct
+@@ -488,19 +479,6 @@
        return 0;
  }
  
@@ -267290,7 +267228,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  static void iommu_set_root_entry(struct intel_iommu *iommu)
  {
        void *addr;
-@@ -527,7 +505,7 @@ static void iommu_flush_write_buffer(str
+@@ -527,7 +505,7 @@
        u32 val;
        unsigned long flag;
  
@@ -267299,7 +267237,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
                return;
        val = iommu->gcmd | DMA_GCMD_WBF;
  
-@@ -990,6 +968,8 @@ static int iommu_init_domains(struct int
+@@ -990,6 +968,8 @@
                return -ENOMEM;
        }
  
@@ -267308,7 +267246,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
        /*
         * if Caching mode is set, then invalid translations are tagged
         * with domainid 0. Hence we need to pre-allocate it.
-@@ -998,62 +978,15 @@ static int iommu_init_domains(struct int
+@@ -998,61 +978,14 @@
                set_bit(0, iommu->domain_ids);
        return 0;
  }
@@ -267318,7 +267256,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
 -      int ret;
 -      int map_size;
 -      u32 ver;
--
 -      iommu->reg = ioremap(drhd->reg_base_addr, PAGE_SIZE_4K);
 -      if (!iommu->reg) {
 -              printk(KERN_ERR "IOMMU: can't map the region\n");
@@ -267326,7 +267264,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
 -      }
 -      iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG);
 -      iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG);
+-
 -      /* the registers might be more than one page */
 -      map_size = max_t(int, ecap_max_iotlb_offset(iommu->ecap),
 -              cap_max_fault_reg_offset(iommu->cap));
@@ -267366,14 +267304,13 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  {
        struct dmar_domain *domain;
        int i;
+-
 -      if (!iommu)
 -              return;
--
        i = find_first_bit(iommu->domain_ids, cap_ndoms(iommu->cap));
        for (; i < cap_ndoms(iommu->cap); ) {
-               domain = iommu->domains[i];
-@@ -1078,10 +1011,6 @@ static void free_iommu(struct intel_iomm
+@@ -1078,10 +1011,6 @@
  
        /* free context mapping */
        free_context_table(iommu);
@@ -267384,7 +267321,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  }
  
  static struct dmar_domain * iommu_alloc_domain(struct intel_iommu *iommu)
-@@ -1426,37 +1355,6 @@ find_domain(struct pci_dev *pdev)
+@@ -1426,37 +1355,6 @@
        return NULL;
  }
  
@@ -267422,7 +267359,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  /* domain is initialized */
  static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
  {
-@@ -1729,8 +1627,6 @@ int __init init_dmars(void)
+@@ -1729,20 +1627,12 @@
         * endfor
         */
        for_each_drhd_unit(drhd) {
@@ -267431,20 +267368,19 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
                g_num_of_iommus++;
                /*
                 * lock not needed as this is only incremented in the single
-@@ -1739,12 +1635,6 @@ int __init init_dmars(void)
+                * threaded kernel __init code path all other access are read
+                * only
                 */
-       }
+-      }
+-
 -      g_iommus = kzalloc(g_num_of_iommus * sizeof(*iommu), GFP_KERNEL);
 -      if (!g_iommus) {
 -              ret = -ENOMEM;
 -              goto error;
--      }
--
+       }
        deferred_flush = kzalloc(g_num_of_iommus *
-               sizeof(struct deferred_flush_tables), GFP_KERNEL);
-       if (!deferred_flush) {
-@@ -1752,16 +1642,15 @@ int __init init_dmars(void)
+@@ -1752,16 +1642,15 @@
                goto error;
        }
  
@@ -267466,7 +267402,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  
                /*
                 * TBD:
-@@ -1845,7 +1734,6 @@ error:
+@@ -1845,7 +1734,6 @@
                iommu = drhd->iommu;
                free_iommu(iommu);
        }
@@ -267474,7 +267410,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
        return ret;
  }
  
-@@ -2002,7 +1890,10 @@ static void flush_unmaps(void)
+@@ -2002,7 +1890,10 @@
        /* just flush them all */
        for (i = 0; i < g_num_of_iommus; i++) {
                if (deferred_flush[i].next) {
@@ -267486,7 +267422,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
                        for (j = 0; j < deferred_flush[i].next; j++) {
                                __free_iova(&deferred_flush[i].domain[j]->iovad,
                                                deferred_flush[i].iova[j]);
-@@ -2032,7 +1923,8 @@ static void add_unmap(struct dmar_domain
+@@ -2032,7 +1923,8 @@
        if (list_size == HIGH_WATER_MARK)
                flush_unmaps();
  
@@ -267496,7 +267432,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
        next = deferred_flush[iommu_id].next;
        deferred_flush[iommu_id].domain[next] = dom;
        deferred_flush[iommu_id].iova[next] = iova;
-@@ -2367,19 +2259,6 @@ static struct dmi_system_id __initdata i
+@@ -2367,19 +2259,6 @@
        { }
  };
  
@@ -267516,16 +267452,13 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
  static void __init init_no_remapping_devices(void)
  {
        struct dmar_drhd_unit *drhd;
-@@ -2426,12 +2305,19 @@ int __init intel_iommu_init(void)
+@@ -2426,11 +2305,18 @@
  {
        int ret = 0;
  
--      if (no_iommu || swiotlb || dmar_disabled)
--              return -ENODEV;
--
-       if (dmar_table_init())
-               return  -ENODEV;
++      if (dmar_table_init())
++              return  -ENODEV;
++
 +      if (dmar_dev_scope_init())
 +              return  -ENODEV;
 +
@@ -267533,13 +267466,15 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
 +       * Check the need for DMA-remapping initialization now.
 +       * Above initialization will also be used by Interrupt-remapping.
 +       */
-+      if (no_iommu || swiotlb || dmar_disabled)
-+              return -ENODEV;
-+
+       if (no_iommu || swiotlb || dmar_disabled)
+               return -ENODEV;
+-
+-      if (dmar_table_init())
+-              return  -ENODEV;
        iommu_init_mempool();
        dmar_init_reserved_ranges();
-@@ -2453,3 +2339,12 @@ int __init intel_iommu_init(void)
+@@ -2453,3 +2339,12 @@
        return 0;
  }
  
@@ -267552,9 +267487,9 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.c linux-2.6.27.19-5.1/drivers/pc
 +}
 +
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
-diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pci/intel-iommu.h
---- linux-2.6.27/drivers/pci/intel-iommu.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intel-iommu.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intel-iommu.h
+--- a/drivers/pci/intel-iommu.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/intel-iommu.h        Wed May 06 16:56:30 2009 +0100
 @@ -27,19 +27,8 @@
  #include <linux/sysdev.h>
  #include "iova.h"
@@ -267589,7 +267524,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
  
  #define OFFSET_STRIDE         (9)
  /*
-@@ -126,6 +120,10 @@ static inline void dmar_writeq(void __io
+@@ -126,6 +120,10 @@
  #define ecap_max_iotlb_offset(e) \
        (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16)
  #define ecap_coherent(e)      ((e) & 0x1)
@@ -267600,7 +267535,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
  
  
  /* IOTLB_REG */
-@@ -141,6 +139,17 @@ static inline void dmar_writeq(void __io
+@@ -141,6 +139,17 @@
  #define DMA_TLB_IH_NONLEAF (((u64)1) << 6)
  #define DMA_TLB_MAX_SIZE (0x3f)
  
@@ -267618,7 +267553,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
  /* PMEN_REG */
  #define DMA_PMEN_EPM (((u32)1)<<31)
  #define DMA_PMEN_PRS (((u32)1)<<0)
-@@ -151,6 +160,9 @@ static inline void dmar_writeq(void __io
+@@ -151,6 +160,9 @@
  #define DMA_GCMD_SFL (((u32)1) << 29)
  #define DMA_GCMD_EAFL (((u32)1) << 28)
  #define DMA_GCMD_WBF (((u32)1) << 27)
@@ -267628,7 +267563,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
  
  /* GSTS_REG */
  #define DMA_GSTS_TES (((u32)1) << 31)
-@@ -158,6 +170,9 @@ static inline void dmar_writeq(void __io
+@@ -158,6 +170,9 @@
  #define DMA_GSTS_FLS (((u32)1) << 29)
  #define DMA_GSTS_AFLS (((u32)1) << 28)
  #define DMA_GSTS_WBFS (((u32)1) << 27)
@@ -267638,7 +267573,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
  
  /* CCMD_REG */
  #define DMA_CCMD_ICC (((u64)1) << 63)
-@@ -187,158 +202,106 @@ static inline void dmar_writeq(void __io
+@@ -187,158 +202,106 @@
  #define dma_frcd_source_id(c) (c & 0xffff)
  #define dma_frcd_page_addr(d) (d & (((u64)-1) << 12)) /* low 64 bit */
  
@@ -267664,17 +267599,8 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 -static inline void set_root_value(struct root_entry *root, unsigned long value)
 -{
 -      root->val |= value & PAGE_MASK_4K;
--}
 +#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) /* 10sec */
--struct context_entry;
--static inline struct context_entry *
--get_context_addr_from_root(struct root_entry *root)
--{
--      return (struct context_entry *)
--              (root_present(root)?phys_to_virt(
--              root->val & PAGE_MASK_4K):
--              NULL);
++
 +#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
 +{\
 +      cycles_t start_time = get_cycles();\
@@ -267688,6 +267614,17 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 +      }\
  }
  
+-struct context_entry;
+-static inline struct context_entry *
+-get_context_addr_from_root(struct root_entry *root)
+-{
+-      return (struct context_entry *)
+-              (root_present(root)?phys_to_virt(
+-              root->val & PAGE_MASK_4K):
+-              NULL);
+-}
++#define QI_LENGTH     256     /* queue length */
 -/*
 - * low 64 bits:
 - * 0: present
@@ -267725,8 +267662,7 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 -#define context_set_domain_id(c, val) \
 -      do {(c).hi |= ((val) & ((1 << 16) - 1)) << 8;} while (0)
 -#define context_clear_entry(c) do {(c).lo = 0; (c).hi = 0;} while (0)
-+#define QI_LENGTH     256     /* queue length */
+-
 -/*
 - * 0: readable
 - * 1: writable
@@ -267737,16 +267673,12 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 - */
 -struct dma_pte {
 -      u64 val;
-+enum {
-+      QI_FREE,
-+      QI_IN_USE,
-+      QI_DONE
- };
+-};
 -#define dma_clear_pte(p)      do {(p).val = 0;} while (0)
 -
 -#define DMA_PTE_READ (1)
 -#define DMA_PTE_WRITE (2)
+-
 -#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while (0)
 -#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while (0)
 -#define dma_set_pte_prot(p, prot) \
@@ -267768,6 +267700,26 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 -      struct dma_pte  *pgd;           /* virtual address */
 -      spinlock_t      mapping_lock;   /* page table lock */
 -      int             gaw;            /* max guest address width */
+-
+-      /* adjusted guest address width, 0 is level 2 30-bit */
+-      int             agaw;
+-
+-#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
+-      int             flags;
++enum {
++      QI_FREE,
++      QI_IN_USE,
++      QI_DONE
+ };
+-/* PCI domain-device relationship */
+-struct device_domain_info {
+-      struct list_head link;  /* link to domain siblings */
+-      struct list_head global; /* link to global list */
+-      u8 bus;                 /* PCI bus numer */
+-      u8 devfn;               /* PCI devfn number */
+-      struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
+-      struct dmar_domain *domain; /* pointer to domain */
 +#define QI_CC_TYPE            0x1
 +#define QI_IOTLB_TYPE         0x2
 +#define QI_DIOTLB_TYPE                0x3
@@ -267777,26 +267729,15 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 +#define QI_IEC_SELECTIVE      (((u64)1) << 4)
 +#define QI_IEC_IIDEX(idx)     (((u64)(idx & 0xffff) << 32))
 +#define QI_IEC_IM(m)          (((u64)(m & 0x1f) << 27))
--      /* adjusted guest address width, 0 is level 2 30-bit */
--      int             agaw;
++
 +#define QI_IWD_STATUS_DATA(d) (((u64)d) << 32)
 +#define QI_IWD_STATUS_WRITE   (((u64)1) << 5)
--#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
--      int             flags;
++
 +struct qi_desc {
 +      u64 low, high;
  };
  
--/* PCI domain-device relationship */
--struct device_domain_info {
--      struct list_head link;  /* link to domain siblings */
--      struct list_head global; /* link to global list */
--      u8 bus;                 /* PCI bus numer */
--      u8 devfn;               /* PCI devfn number */
--      struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
--      struct dmar_domain *domain; /* pointer to domain */
+-extern int init_dmars(void);
 +struct q_inval {
 +      spinlock_t      q_lock;
 +      struct qi_desc  *desc;          /* invalidation queue */
@@ -267804,9 +267745,8 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 +      int             free_head;      /* first free entry */
 +      int             free_tail;      /* last free entry */
 +      int             free_cnt;
- };
--extern int init_dmars(void);
++};
++
 +#ifdef CONFIG_INTR_REMAP
 +/* 1MB - maximum possible interrupt remapping table size */
 +#define INTR_REMAP_PAGE_ORDER 8
@@ -267823,18 +267763,18 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
        void __iomem    *reg; /* Pointer to hardware regs, virtual addr */
        u64             cap;
        u64             ecap;
--      unsigned long   *domain_ids; /* bitmap of domains */
--      struct dmar_domain **domains; /* ptr to domains */
-       int             seg;
-       u32             gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
--      spinlock_t      lock; /* protect context, domain ids */
-       spinlock_t      register_lock; /* protect register handling */
++      int             seg;
++      u32             gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
++      spinlock_t      register_lock; /* protect register handling */
 +      int             seq_id; /* sequence id of the iommu */
 +
 +#ifdef CONFIG_DMAR
-+      unsigned long   *domain_ids; /* bitmap of domains */
-+      struct dmar_domain **domains; /* ptr to domains */
-+      spinlock_t      lock; /* protect context, domain ids */
+       unsigned long   *domain_ids; /* bitmap of domains */
+       struct dmar_domain **domains; /* ptr to domains */
+-      int             seg;
+-      u32             gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
+       spinlock_t      lock; /* protect context, domain ids */
+-      spinlock_t      register_lock; /* protect register handling */
        struct root_entry *root_entry; /* virtual address */
  
        unsigned int irq;
@@ -267868,9 +267808,9 @@ diff -purN linux-2.6.27/drivers/pci/intel-iommu.h linux-2.6.27.19-5.1/drivers/pc
 +
 +extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
  #endif
-diff -purN linux-2.6.27/drivers/pci/intr_remapping.c linux-2.6.27.19-5.1/drivers/pci/intr_remapping.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intr_remapping.c   2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intr_remapping.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/intr_remapping.c     Wed May 06 16:56:30 2009 +0100
 @@ -0,0 +1,471 @@
 +#include <linux/dmar.h>
 +#include <linux/spinlock.h>
@@ -268343,9 +268283,9 @@ diff -purN linux-2.6.27/drivers/pci/intr_remapping.c linux-2.6.27.19-5.1/drivers
 +
 +      return ir_supported;
 +}
-diff -purN linux-2.6.27/drivers/pci/intr_remapping.h linux-2.6.27.19-5.1/drivers/pci/intr_remapping.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/intr_remapping.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/intr_remapping.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/intr_remapping.h     Wed May 06 16:56:30 2009 +0100
 @@ -0,0 +1,8 @@
 +#include "intel-iommu.h"
 +
@@ -268355,9 +268295,9 @@ diff -purN linux-2.6.27/drivers/pci/intr_remapping.h linux-2.6.27.19-5.1/drivers
 +};
 +
 +#define IR_X2APIC_MODE(mode) (mode ? (1 << 11) : 0)
-diff -purN linux-2.6.27/drivers/pci/msi-xen.c linux-2.6.27.19-5.1/drivers/pci/msi-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/msi-xen.c  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/msi-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/msi-xen.c    Wed May 06 16:56:30 2009 +0100
 @@ -0,0 +1,790 @@
 +/*
 + * File:      msi.c
@@ -269149,10 +269089,10 @@ diff -purN linux-2.6.27/drivers/pci/msi-xen.c linux-2.6.27.19-5.1/drivers/pci/ms
 +      INIT_LIST_HEAD(&dev->msi_list);
 +#endif
 +}
-diff -purN linux-2.6.27/drivers/pci/msi.c linux-2.6.27.19-5.1/drivers/pci/msi.c
---- linux-2.6.27/drivers/pci/msi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/msi.c      2009-03-25 16:11:12.000000000 +0000
-@@ -757,6 +757,17 @@ void pci_no_msi(void)
+diff -r 9608d5473017 drivers/pci/msi.c
+--- a/drivers/pci/msi.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/msi.c        Wed May 06 16:56:30 2009 +0100
+@@ -757,6 +757,17 @@
        pci_msi_enable = 0;
  }
  
@@ -269170,19 +269110,19 @@ diff -purN linux-2.6.27/drivers/pci/msi.c linux-2.6.27.19-5.1/drivers/pci/msi.c
  void pci_msi_init_pci_dev(struct pci_dev *dev)
  {
        INIT_LIST_HEAD(&dev->msi_list);
-diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/pci-acpi.c
---- linux-2.6.27/drivers/pci/pci-acpi.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-acpi.c 2009-03-25 16:11:12.000000000 +0000
-@@ -35,6 +35,8 @@ struct acpi_osc_args {
+diff -r 9608d5473017 drivers/pci/pci-acpi.c
+--- a/drivers/pci/pci-acpi.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-acpi.c   Wed May 06 16:56:30 2009 +0100
+@@ -34,6 +34,8 @@
+       u32 capbuf[3];
        u32 query_result;
  };
-+static DEFINE_MUTEX(pci_acpi_lock);
 +
++static DEFINE_MUTEX(pci_acpi_lock);
  static struct acpi_osc_data *acpi_get_osc_data(acpi_handle handle)
  {
-       struct acpi_osc_data *data;
-@@ -118,32 +120,19 @@ out_kfree:
+@@ -118,24 +120,11 @@
        return status;
  }
  
@@ -269196,7 +269136,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
 -      acpi_handle tmp;
 +      u32 support_set;
        struct acpi_osc_args osc_args;
+-
 -      status = acpi_get_handle(handle, "_OSC", &tmp);
 -      if (ACPI_FAILURE(status))
 -              return status;
@@ -269206,10 +269146,10 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
 -              printk(KERN_ERR "acpi osc data array is full\n");
 -              return AE_ERROR;
 -      }
--
        /* do _OSC query for all possible controls */
        support_set = osc_data->support_set | (flags & OSC_SUPPORT_MASKS);
-       osc_args.capbuf[OSC_QUERY_TYPE] = OSC_QUERY_ENABLE;
+@@ -143,7 +132,7 @@
        osc_args.capbuf[OSC_SUPPORT_TYPE] = support_set;
        osc_args.capbuf[OSC_CONTROL_TYPE] = OSC_CONTROL_MASKS;
  
@@ -269218,7 +269158,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
        if (ACPI_SUCCESS(status)) {
                osc_data->support_set = support_set;
                osc_data->query_result = osc_args.query_result;
-@@ -153,22 +142,35 @@ static acpi_status acpi_query_osc(acpi_h
+@@ -153,22 +142,35 @@
        return status;
  }
  
@@ -269244,14 +269184,14 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
 +      acpi_handle tmp;
 +      struct acpi_osc_data *osc_data;
 +      int rc = 0;
-+
-+      status = acpi_get_handle(handle, "_OSC", &tmp);
-+      if (ACPI_FAILURE(status))
-+              return -ENOTTY;
  
 -      acpi_get_devices(hid, acpi_query_osc,
 -                       (void *)(unsigned long)flags, NULL);
 -      return AE_OK;
++      status = acpi_get_handle(handle, "_OSC", &tmp);
++      if (ACPI_FAILURE(status))
++              return -ENOTTY;
++
 +      mutex_lock(&pci_acpi_lock);
 +      osc_data = acpi_get_osc_data(handle);
 +      if (!osc_data) {
@@ -269267,7 +269207,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
  }
  
  /**
-@@ -190,19 +192,30 @@ acpi_status pci_osc_control_set(acpi_han
+@@ -190,19 +192,30 @@
        if (ACPI_FAILURE(status))
                return status;
  
@@ -269304,7 +269244,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
  
        control_set = osc_data->control_set | ctrlset;
        osc_args.capbuf[OSC_QUERY_TYPE] = 0;
-@@ -211,7 +224,8 @@ acpi_status pci_osc_control_set(acpi_han
+@@ -211,7 +224,8 @@
        status = acpi_run_osc(handle, &osc_args);
        if (ACPI_SUCCESS(status))
                osc_data->control_set = control_set;
@@ -269314,10 +269254,10 @@ diff -purN linux-2.6.27/drivers/pci/pci-acpi.c linux-2.6.27.19-5.1/drivers/pci/p
        return status;
  }
  EXPORT_SYMBOL(pci_osc_control_set);
-diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci/pci-driver.c
---- linux-2.6.27/drivers/pci/pci-driver.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-driver.c       2009-03-25 16:11:12.000000000 +0000
-@@ -287,6 +287,14 @@ static void pci_device_shutdown(struct d
+diff -r 9608d5473017 drivers/pci/pci-driver.c
+--- a/drivers/pci/pci-driver.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-driver.c Wed May 06 16:56:30 2009 +0100
+@@ -287,6 +287,14 @@
  
  #ifdef CONFIG_PM_SLEEP
  
@@ -269332,7 +269272,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
  /*
   * Default "suspend" method for devices that have no driver provided suspend,
   * or not even a driver at all.
-@@ -304,14 +312,22 @@ static void pci_default_pm_suspend(struc
+@@ -304,14 +312,22 @@
  
  /*
   * Default "resume" method for devices that have no driver provided resume,
@@ -269359,7 +269299,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
        /* if the device was enabled before suspend, reenable */
        retval = pci_reenable_device(pci_dev);
        /*
-@@ -358,10 +374,12 @@ static int pci_legacy_resume(struct devi
+@@ -358,10 +374,12 @@
        struct pci_dev * pci_dev = to_pci_dev(dev);
        struct pci_driver * drv = pci_dev->driver;
  
@@ -269375,7 +269315,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
        return error;
  }
  
-@@ -407,10 +425,8 @@ static int pci_pm_suspend(struct device 
+@@ -407,10 +425,8 @@
                if (drv->pm->suspend) {
                        error = drv->pm->suspend(dev);
                        suspend_report_result(drv->pm->suspend, error);
@@ -269387,19 +269327,19 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                error = pci_legacy_suspend(dev, PMSG_SUSPEND);
        }
        pci_fixup_device(pci_fixup_suspend, pci_dev);
-@@ -429,8 +445,10 @@ static int pci_pm_suspend_noirq(struct d
+@@ -429,8 +445,10 @@
                        error = drv->pm->suspend_noirq(dev);
                        suspend_report_result(drv->pm->suspend_noirq, error);
                }
--      } else {
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
-+      } else {
++              error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
+       } else {
+-              error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
 +              pci_default_pm_suspend(pci_dev);
        }
  
        return error;
-@@ -440,15 +458,17 @@ static int pci_pm_resume(struct device *
+@@ -440,15 +458,17 @@
  {
        struct pci_dev *pci_dev = to_pci_dev(dev);
        struct device_driver *drv = dev->driver;
@@ -269411,29 +269351,29 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
        if (drv && drv->pm) {
 -              error = drv->pm->resume ? drv->pm->resume(dev) :
 -                      pci_default_pm_resume(pci_dev);
--      } else {
 +              if (drv->pm->resume)
 +                      error = drv->pm->resume(dev);
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_resume(dev);
-+      } else {
++              error = pci_legacy_resume(dev);
+       } else {
+-              error = pci_legacy_resume(dev);
 +              error = pci_default_pm_resume_late(pci_dev);
        }
  
        return error;
-@@ -465,8 +485,10 @@ static int pci_pm_resume_noirq(struct de
+@@ -465,8 +485,10 @@
        if (drv && drv->pm) {
                if (drv->pm->resume_noirq)
                        error = drv->pm->resume_noirq(dev);
--      } else {
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_resume_early(dev);
-+      } else {
++              error = pci_legacy_resume_early(dev);
+       } else {
+-              error = pci_legacy_resume_early(dev);
 +              pci_default_pm_resume_early(pci_dev);
        }
  
        return error;
-@@ -493,10 +515,8 @@ static int pci_pm_freeze(struct device *
+@@ -493,10 +515,8 @@
                if (drv->pm->freeze) {
                        error = drv->pm->freeze(dev);
                        suspend_report_result(drv->pm->freeze, error);
@@ -269445,19 +269385,19 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                error = pci_legacy_suspend(dev, PMSG_FREEZE);
                pci_fixup_device(pci_fixup_suspend, pci_dev);
        }
-@@ -515,8 +535,10 @@ static int pci_pm_freeze_noirq(struct de
+@@ -515,8 +535,10 @@
                        error = drv->pm->freeze_noirq(dev);
                        suspend_report_result(drv->pm->freeze_noirq, error);
                }
--      } else {
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
-+      } else {
++              error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
+       } else {
+-              error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
 +              pci_default_pm_suspend(pci_dev);
        }
  
        return error;
-@@ -524,14 +546,15 @@ static int pci_pm_freeze_noirq(struct de
+@@ -524,14 +546,15 @@
  
  static int pci_pm_thaw(struct device *dev)
  {
@@ -269475,7 +269415,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                error = pci_legacy_resume(dev);
        }
  
-@@ -547,7 +570,7 @@ static int pci_pm_thaw_noirq(struct devi
+@@ -547,7 +570,7 @@
        if (drv && drv->pm) {
                if (drv->pm->thaw_noirq)
                        error = drv->pm->thaw_noirq(dev);
@@ -269484,7 +269424,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                pci_fixup_device(pci_fixup_resume_early, pci_dev);
                error = pci_legacy_resume_early(dev);
        }
-@@ -557,17 +580,18 @@ static int pci_pm_thaw_noirq(struct devi
+@@ -557,17 +580,18 @@
  
  static int pci_pm_poweroff(struct device *dev)
  {
@@ -269505,7 +269445,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                error = pci_legacy_suspend(dev, PMSG_HIBERNATE);
        }
  
-@@ -585,7 +609,7 @@ static int pci_pm_poweroff_noirq(struct 
+@@ -585,7 +609,7 @@
                        error = drv->pm->poweroff_noirq(dev);
                        suspend_report_result(drv->pm->poweroff_noirq, error);
                }
@@ -269514,7 +269454,7 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
                error = pci_legacy_suspend_late(dev, PMSG_HIBERNATE);
        }
  
-@@ -596,13 +620,15 @@ static int pci_pm_restore(struct device 
+@@ -596,13 +620,15 @@
  {
        struct pci_dev *pci_dev = to_pci_dev(dev);
        struct device_driver *drv = dev->driver;
@@ -269524,32 +269464,32 @@ diff -purN linux-2.6.27/drivers/pci/pci-driver.c linux-2.6.27.19-5.1/drivers/pci
        if (drv && drv->pm) {
 -              error = drv->pm->restore ? drv->pm->restore(dev) :
 -                      pci_default_pm_resume(pci_dev);
--      } else {
 +              if (drv->pm->restore)
 +                      error = drv->pm->restore(dev);
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_resume(dev);
-+      } else {
++              error = pci_legacy_resume(dev);
+       } else {
+-              error = pci_legacy_resume(dev);
 +              error = pci_default_pm_resume_late(pci_dev);
        }
        pci_fixup_device(pci_fixup_resume, pci_dev);
  
-@@ -620,8 +646,10 @@ static int pci_pm_restore_noirq(struct d
+@@ -620,8 +646,10 @@
        if (drv && drv->pm) {
                if (drv->pm->restore_noirq)
                        error = drv->pm->restore_noirq(dev);
--      } else {
 +      } else if (pci_has_legacy_pm_support(pci_dev)) {
-               error = pci_legacy_resume_early(dev);
-+      } else {
++              error = pci_legacy_resume_early(dev);
+       } else {
+-              error = pci_legacy_resume_early(dev);
 +              pci_default_pm_resume_early(pci_dev);
        }
        pci_fixup_device(pci_fixup_resume_early, pci_dev);
  
-diff -purN linux-2.6.27/drivers/pci/pci-sysfs.c linux-2.6.27.19-5.1/drivers/pci/pci-sysfs.c
---- linux-2.6.27/drivers/pci/pci-sysfs.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci-sysfs.c        2009-03-25 16:11:12.000000000 +0000
-@@ -694,8 +694,8 @@ pci_read_rom(struct kobject *kobj, struc
+diff -r 9608d5473017 drivers/pci/pci-sysfs.c
+--- a/drivers/pci/pci-sysfs.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci-sysfs.c  Wed May 06 16:56:30 2009 +0100
+@@ -694,8 +694,8 @@
                return -EINVAL;
        
        rom = pci_map_rom(pdev, &size); /* size starts out as PCI window size */
@@ -269560,10 +269500,10 @@ diff -purN linux-2.6.27/drivers/pci/pci-sysfs.c linux-2.6.27.19-5.1/drivers/pci/
                
        if (off >= size)
                count = 0;
-diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
---- linux-2.6.27/drivers/pci/pci.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci.c      2009-03-25 16:11:12.000000000 +0000
-@@ -353,7 +353,12 @@ pci_find_parent_resource(const struct pc
+diff -r 9608d5473017 drivers/pci/pci.c
+--- a/drivers/pci/pci.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci.c        Wed May 06 16:56:30 2009 +0100
+@@ -353,7 +353,12 @@
   * Restore the BAR values for a given device, so as to make it
   * accessible by its driver.
   */
@@ -269576,7 +269516,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
  pci_restore_bars(struct pci_dev *dev)
  {
        int i, numres;
-@@ -636,19 +641,14 @@ static int pci_save_pcie_state(struct pc
+@@ -636,19 +641,14 @@
        int pos, i = 0;
        struct pci_cap_saved_state *save_state;
        u16 *cap;
@@ -269597,7 +269537,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
                return -ENOMEM;
        }
        cap = (u16 *)&save_state->data[0];
-@@ -657,9 +657,7 @@ static int pci_save_pcie_state(struct pc
+@@ -657,9 +657,7 @@
        pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &cap[i++]);
        pci_read_config_word(dev, pos + PCI_EXP_SLTCTL, &cap[i++]);
        pci_read_config_word(dev, pos + PCI_EXP_RTCTL, &cap[i++]);
@@ -269608,7 +269548,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
        return 0;
  }
  
-@@ -684,30 +682,21 @@ static void pci_restore_pcie_state(struc
+@@ -684,30 +682,21 @@
  
  static int pci_save_pcix_state(struct pci_dev *dev)
  {
@@ -269643,7 +269583,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
        return 0;
  }
  
-@@ -726,6 +715,50 @@ static void pci_restore_pcix_state(struc
+@@ -726,6 +715,50 @@
        pci_write_config_word(dev, pos + PCI_X_CMD, cap[i++]);
  }
  
@@ -269694,7 +269634,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
  
  /**
   * pci_save_state - save the PCI configuration space of a device before suspending
-@@ -1871,6 +1904,19 @@ static void __devinit pci_no_domains(voi
+@@ -1871,6 +1904,19 @@
  #endif
  }
  
@@ -269714,10 +269654,10 @@ diff -purN linux-2.6.27/drivers/pci/pci.c linux-2.6.27.19-5.1/drivers/pci/pci.c
  static int __devinit pci_init(void)
  {
        struct pci_dev *dev = NULL;
-diff -purN linux-2.6.27/drivers/pci/pci.h linux-2.6.27.19-5.1/drivers/pci/pci.h
---- linux-2.6.27/drivers/pci/pci.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pci.h      2009-03-25 16:11:12.000000000 +0000
-@@ -35,6 +35,7 @@ struct pci_platform_pm_ops {
+diff -r 9608d5473017 drivers/pci/pci.h
+--- a/drivers/pci/pci.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pci.h        Wed May 06 16:56:30 2009 +0100
+@@ -35,6 +35,7 @@
  
  extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
  extern void pci_pm_init(struct pci_dev *dev);
@@ -269725,7 +269665,7 @@ diff -purN linux-2.6.27/drivers/pci/pci.h linux-2.6.27.19-5.1/drivers/pci/pci.h
  
  extern int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val);
  extern int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val);
-@@ -144,3 +145,9 @@ struct pci_slot_attribute {
+@@ -144,3 +145,9 @@
  };
  #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr)
  
@@ -269735,10 +269675,10 @@ diff -purN linux-2.6.27/drivers/pci/pci.h linux-2.6.27.19-5.1/drivers/pci/pci.h
 +#else
 +#define is_reassigndev(dev) 0
 +#endif
-diff -purN linux-2.6.27/drivers/pci/pcie/aer/aerdrv_acpi.c linux-2.6.27.19-5.1/drivers/pci/pcie/aer/aerdrv_acpi.c
---- linux-2.6.27/drivers/pci/pcie/aer/aerdrv_acpi.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/aer/aerdrv_acpi.c     2009-03-25 16:11:13.000000000 +0000
-@@ -38,7 +38,6 @@ int aer_osc_setup(struct pcie_device *pc
+diff -r 9608d5473017 drivers/pci/pcie/aer/aerdrv_acpi.c
+--- a/drivers/pci/pcie/aer/aerdrv_acpi.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/aer/aerdrv_acpi.c       Wed May 06 16:56:30 2009 +0100
+@@ -38,7 +38,6 @@
  
        handle = acpi_find_root_bridge_handle(pdev);
        if (handle) {
@@ -269746,9 +269686,9 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aer/aerdrv_acpi.c linux-2.6.27.19-5.1/d
                status = pci_osc_control_set(handle,
                                        OSC_PCI_EXPRESS_AER_CONTROL |
                                        OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL);
-diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/pcie/aspm.c
---- linux-2.6.27/drivers/pci/pcie/aspm.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/aspm.c        2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/pcie/aspm.c
+--- a/drivers/pci/pcie/aspm.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/aspm.c  Wed May 06 16:56:30 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/pm.h>
  #include <linux/init.h>
@@ -269757,7 +269697,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  #include <linux/pci-aspm.h>
  #include "../pci.h"
  
-@@ -32,6 +33,11 @@ struct endpoint_state {
+@@ -32,6 +33,11 @@
  struct pcie_link_state {
        struct list_head sibiling;
        struct pci_dev *pdev;
@@ -269769,7 +269709,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  
        /* ASPM state */
        unsigned int support_state;
-@@ -124,7 +130,7 @@ static void pcie_set_clock_pm(struct pci
+@@ -124,7 +130,7 @@
        link_state->clk_pm_enabled = !!enable;
  }
  
@@ -269778,7 +269718,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  {
        int pos;
        u32 reg32;
-@@ -148,10 +154,26 @@ static void pcie_check_clock_pm(struct p
+@@ -148,10 +154,26 @@
                if (!(reg16 & PCI_EXP_LNKCTL_CLKREQ_EN))
                        enabled = 0;
        }
@@ -269807,7 +269747,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  }
  
  /*
-@@ -161,11 +183,12 @@ static void pcie_check_clock_pm(struct p
+@@ -161,11 +183,12 @@
   */
  static void pcie_aspm_configure_common_clock(struct pci_dev *pdev)
  {
@@ -269822,7 +269762,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        /*
         * all functions of a slot should have the same Slot Clock
         * Configuration, so just check one function
-@@ -191,16 +214,19 @@ static void pcie_aspm_configure_common_c
+@@ -191,16 +214,19 @@
                child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP);
                pci_read_config_word(child_dev, child_pos + PCI_EXP_LNKCTL,
                        &reg16);
@@ -269842,7 +269782,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        if (same_clock)
                reg16 |= PCI_EXP_LNKCTL_CCC;
        else
-@@ -212,12 +238,30 @@ static void pcie_aspm_configure_common_c
+@@ -212,11 +238,29 @@
        pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);
  
        /* Wait for link training end */
@@ -269854,7 +269794,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
                if (!(reg16 & PCI_EXP_LNKSTA_LT))
                        break;
                cpu_relax();
-       }
++      }
 +      /* training failed -> recover */
 +      if ((jiffies - start_jiffies) >= HZ) {
 +              dev_printk (KERN_ERR, &pdev->dev, "ASPM: Could not configure"
@@ -269870,11 +269810,10 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
 +                      i++;
 +              }
 +              pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, parent_reg);
-+      }
+       }
  }
  
- /*
-@@ -396,9 +440,9 @@ static unsigned int pcie_aspm_check_stat
+@@ -396,9 +440,9 @@
  {
        struct pci_dev *child_dev;
  
@@ -269886,7 +269825,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) {
                if (child_dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) {
                        /*
-@@ -439,6 +483,9 @@ static void __pcie_aspm_config_link(stru
+@@ -439,6 +483,9 @@
        int valid = 1;
        struct pcie_link_state *link_state = pdev->link_state;
  
@@ -269896,7 +269835,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        /*
         * if the downstream component has pci bridge function, don't do ASPM
         * now
-@@ -470,20 +517,52 @@ static void __pcie_aspm_config_link(stru
+@@ -470,20 +517,52 @@
        link_state->enabled_state = state;
  }
  
@@ -269954,7 +269893,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  }
  
  /*
-@@ -547,6 +626,7 @@ void pcie_aspm_init_link_state(struct pc
+@@ -547,6 +626,7 @@
        unsigned int state;
        struct pcie_link_state *link_state;
        int error = 0;
@@ -269962,7 +269901,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  
        if (aspm_disabled || !pdev->is_pcie || pdev->link_state)
                return;
-@@ -557,29 +637,58 @@ void pcie_aspm_init_link_state(struct pc
+@@ -557,28 +637,57 @@
        if (list_empty(&pdev->subordinate->devices))
                goto out;
  
@@ -269975,11 +269914,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        link_state = kzalloc(sizeof(*link_state), GFP_KERNEL);
        if (!link_state)
                goto unlock_out;
--      pdev->link_state = link_state;
--
--      pcie_aspm_configure_common_clock(pdev);
--      pcie_aspm_cap_init(pdev);
++
 +      link_state->downstream_has_switch = pcie_aspm_downstream_has_switch(pdev);
 +      INIT_LIST_HEAD(&link_state->children);
 +      INIT_LIST_HEAD(&link_state->link);
@@ -269994,12 +269929,17 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
 +              list_add(&link_state->link, &parent_link_state->children);
 +              link_state->parent = parent_link_state;
 +      }
++
+       pdev->link_state = link_state;
  
+-      pcie_aspm_configure_common_clock(pdev);
+-
+-      pcie_aspm_cap_init(pdev);
+-
 -      /* config link state to avoid BIOS error */
 -      state = pcie_aspm_check_state(pdev, policy_to_aspm_state(pdev));
 -      __pcie_aspm_config_link(pdev, state);
-+      pdev->link_state = link_state;
+-
 -      pcie_check_clock_pm(pdev);
 +      if (!blacklist) {
 +              pcie_aspm_configure_common_clock(pdev);
@@ -270013,7 +269953,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  
        link_state->pdev = pdev;
        list_add(&link_state->sibiling, &link_list);
++
 +      if (link_state->downstream_has_switch) {
 +              /*
 +               * If link has switch, delay the link config. The leaf link
@@ -270027,11 +269967,10 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
 +                      policy_to_aspm_state(pdev));
 +
 +      pcie_check_clock_pm(pdev, blacklist);
-+
  unlock_out:
        if (error)
-               free_link_state(pdev);
-@@ -604,14 +713,15 @@ void pcie_aspm_exit_link_state(struct pc
+@@ -604,14 +713,15 @@
  
        /*
         * All PCIe functions are in one slot, remove one function will remove
@@ -270049,7 +269988,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
        /* Clock PM is for endpoint device */
  
        free_link_state(parent);
-@@ -834,24 +944,15 @@ void pcie_no_aspm(void)
+@@ -834,24 +944,15 @@
                aspm_disabled = 1;
  }
  
@@ -270067,26 +270006,26 @@ diff -purN linux-2.6.27/drivers/pci/pcie/aspm.c linux-2.6.27.19-5.1/drivers/pci/
  {
 -      pcie_osc_support_set(OSC_ACTIVE_STATE_PWR_SUPPORT|
 -              OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
--}
++       return !aspm_disabled;
+ }
 -#else
 -static inline void pcie_aspm_platform_init(void) { }
 -#endif
--
++EXPORT_SYMBOL(pcie_aspm_enabled);
 -static int __init pcie_aspm_init(void)
 -{
 -      if (aspm_disabled)
 -              return 0;
 -      pcie_aspm_platform_init();
 -      return 0;
-+       return !aspm_disabled;
- }
-+EXPORT_SYMBOL(pcie_aspm_enabled);
+-}
+-
 -fs_initcall(pcie_aspm_init);
-diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drivers/pci/pcie/portdrv_pci.c
---- linux-2.6.27/drivers/pci/pcie/portdrv_pci.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/pcie/portdrv_pci.c 2009-03-25 16:11:13.000000000 +0000
-@@ -41,7 +41,6 @@ static int pcie_portdrv_restore_config(s
+diff -r 9608d5473017 drivers/pci/pcie/portdrv_pci.c
+--- a/drivers/pci/pcie/portdrv_pci.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/pcie/portdrv_pci.c   Wed May 06 16:56:30 2009 +0100
+@@ -41,7 +41,6 @@
  {
        int retval;
  
@@ -270094,7 +270033,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drive
        retval = pci_enable_device(dev);
        if (retval)
                return retval;
-@@ -52,11 +51,18 @@ static int pcie_portdrv_restore_config(s
+@@ -52,11 +51,18 @@
  #ifdef CONFIG_PM
  static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state)
  {
@@ -270117,7 +270056,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drive
  }
  
  static int pcie_portdrv_resume(struct pci_dev *dev)
-@@ -66,6 +72,8 @@ static int pcie_portdrv_resume(struct pc
+@@ -66,6 +72,8 @@
  }
  #else
  #define pcie_portdrv_suspend NULL
@@ -270126,7 +270065,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drive
  #define pcie_portdrv_resume NULL
  #endif
  
-@@ -221,6 +229,7 @@ static pci_ers_result_t pcie_portdrv_slo
+@@ -221,6 +229,7 @@
  
        /* If fatal, restore cfg space for possible link reset at upstream */
        if (dev->error_state == pci_channel_io_frozen) {
@@ -270134,7 +270073,7 @@ diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drive
                pcie_portdrv_restore_config(dev);
                pci_enable_pcie_error_reporting(dev);
        }
-@@ -283,6 +292,8 @@ static struct pci_driver pcie_portdriver
+@@ -283,6 +292,8 @@
        .remove         = pcie_portdrv_remove,
  
        .suspend        = pcie_portdrv_suspend,
@@ -270143,10 +270082,10 @@ diff -purN linux-2.6.27/drivers/pci/pcie/portdrv_pci.c linux-2.6.27.19-5.1/drive
        .resume         = pcie_portdrv_resume,
  
        .err_handler    = &pcie_portdrv_err_handler,
-diff -purN linux-2.6.27/drivers/pci/probe.c linux-2.6.27.19-5.1/drivers/pci/probe.c
---- linux-2.6.27/drivers/pci/probe.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/probe.c    2009-03-25 16:11:12.000000000 +0000
-@@ -219,7 +219,7 @@ static inline enum pci_bar_type decode_b
+diff -r 9608d5473017 drivers/pci/probe.c
+--- a/drivers/pci/probe.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/probe.c      Wed May 06 16:56:30 2009 +0100
+@@ -219,7 +219,7 @@
  
        res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
  
@@ -270155,7 +270094,7 @@ diff -purN linux-2.6.27/drivers/pci/probe.c linux-2.6.27.19-5.1/drivers/pci/prob
                return pci_bar_mem64;
        return pci_bar_mem32;
  }
-@@ -1028,6 +1028,9 @@ void pci_device_add(struct pci_dev *dev,
+@@ -1028,6 +1028,9 @@
        /* Fix up broken headers */
        pci_fixup_device(pci_fixup_header, dev);
  
@@ -270165,13 +270104,14 @@ diff -purN linux-2.6.27/drivers/pci/probe.c linux-2.6.27.19-5.1/drivers/pci/prob
        /* Initialize power management of the device */
        pci_pm_init(dev);
  
-diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/quirks.c
---- linux-2.6.27/drivers/pci/quirks.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/quirks.c   2009-03-25 16:11:12.000000000 +0000
-@@ -24,6 +24,52 @@
+diff -r 9608d5473017 drivers/pci/quirks.c
+--- a/drivers/pci/quirks.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/quirks.c     Wed May 06 16:56:30 2009 +0100
+@@ -23,6 +23,52 @@
+ #include <linux/acpi.h>
  #include <linux/kallsyms.h>
  #include "pci.h"
++
 +#ifdef CONFIG_PCI_REASSIGN
 +/*
 + * This quirk function disables the device and releases resources
@@ -270217,11 +270157,10 @@ diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/qui
 +}
 +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_release_resources);
 +#endif
-+
  /* The Mellanox Tavor device gives false positive parity errors
   * Mark this device with a broken_parity_status, to allow
-  * PCI scanning code to "skip" this now blacklisted device.
-@@ -602,27 +648,6 @@ static void __init quirk_ioapic_rmw(stru
+@@ -602,27 +648,6 @@
                sis_apic_bug = 1;
  }
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI,     PCI_ANY_ID,                     quirk_ioapic_rmw);
@@ -270249,7 +270188,7 @@ diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/qui
  #endif /* CONFIG_X86_IO_APIC */
  
  /*
-@@ -1422,6 +1447,160 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -1422,6 +1447,160 @@
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,  0x260a, quirk_intel_pcie_pm);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,  0x260b, quirk_intel_pcie_pm);
  
@@ -270410,7 +270349,7 @@ diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/qui
  /*
   * Toshiba TC86C001 IDE controller reports the standard 8-byte BAR0 size
   * but the PIO transfers won't work if BAR0 falls at the odd 8 bytes.
-@@ -1807,6 +1986,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
+@@ -1807,6 +1986,7 @@
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
@@ -270418,9 +270357,9 @@ diff -purN linux-2.6.27/drivers/pci/quirks.c linux-2.6.27.19-5.1/drivers/pci/qui
  
  /* Disable MSI on chipsets that are known to not support it */
  static void __devinit quirk_disable_msi(struct pci_dev *dev)
-diff -purN linux-2.6.27/drivers/pci/reassigndev.c linux-2.6.27.19-5.1/drivers/pci/reassigndev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/reassigndev.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/reassigndev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/pci/reassigndev.c        Wed May 06 16:56:30 2009 +0100
 @@ -0,0 +1,80 @@
 +/*
 + * Copyright (c) 2008, NEC Corporation.
@@ -270502,10 +270441,10 @@ diff -purN linux-2.6.27/drivers/pci/reassigndev.c linux-2.6.27.19-5.1/drivers/pc
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/pci/rom.c linux-2.6.27.19-5.1/drivers/pci/rom.c
---- linux-2.6.27/drivers/pci/rom.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/rom.c      2009-03-25 16:11:12.000000000 +0000
-@@ -63,7 +63,7 @@ static void pci_disable_rom(struct pci_d
+diff -r 9608d5473017 drivers/pci/rom.c
+--- a/drivers/pci/rom.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/rom.c        Wed May 06 16:56:30 2009 +0100
+@@ -63,7 +63,7 @@
   * The PCI window size could be much larger than the
   * actual image size.
   */
@@ -270514,7 +270453,7 @@ diff -purN linux-2.6.27/drivers/pci/rom.c linux-2.6.27.19-5.1/drivers/pci/rom.c
  {
        void __iomem *image;
        int last_image;
-@@ -72,8 +72,10 @@ size_t pci_get_rom_size(void __iomem *ro
+@@ -72,8 +72,10 @@
        do {
                void __iomem *pds;
                /* Standard PCI ROMs start out with these bytes 55 AA */
@@ -270526,7 +270465,7 @@ diff -purN linux-2.6.27/drivers/pci/rom.c linux-2.6.27.19-5.1/drivers/pci/rom.c
                if (readb(image + 1) != 0xAA)
                        break;
                /* get the PCI data structure and check its signature */
-@@ -158,7 +160,7 @@ void __iomem *pci_map_rom(struct pci_dev
+@@ -158,7 +160,7 @@
         * size is much larger than the actual size of the ROM.
         * True size is important if the ROM is going to be copied.
         */
@@ -270535,9 +270474,9 @@ diff -purN linux-2.6.27/drivers/pci/rom.c linux-2.6.27.19-5.1/drivers/pci/rom.c
        return rom;
  }
  
-diff -purN linux-2.6.27/drivers/pci/setup-bus.c linux-2.6.27.19-5.1/drivers/pci/setup-bus.c
---- linux-2.6.27/drivers/pci/setup-bus.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/setup-bus.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/pci/setup-bus.c
+--- a/drivers/pci/setup-bus.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/setup-bus.c  Wed May 06 16:56:30 2009 +0100
 @@ -26,6 +26,7 @@
  #include <linux/cache.h>
  #include <linux/slab.h>
@@ -270546,7 +270485,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-bus.c linux-2.6.27.19-5.1/drivers/pci/
  
  static void pbus_assign_resources_sorted(struct pci_bus *bus)
  {
-@@ -343,7 +344,8 @@ static int pbus_size_mem(struct pci_bus 
+@@ -343,7 +344,8 @@
  
        list_for_each_entry(dev, &bus->devices, bus_list) {
                int i;
@@ -270556,7 +270495,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-bus.c linux-2.6.27.19-5.1/drivers/pci/
                for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                        struct resource *r = &dev->resource[i];
                        resource_size_t r_size;
-@@ -351,6 +353,10 @@ static int pbus_size_mem(struct pci_bus 
+@@ -351,6 +353,10 @@
                        if (r->parent || (r->flags & mask) != type)
                                continue;
                        r_size = r->end - r->start + 1;
@@ -270567,10 +270506,10 @@ diff -purN linux-2.6.27/drivers/pci/setup-bus.c linux-2.6.27.19-5.1/drivers/pci/
                        /* For bridges size != alignment */
                        align = resource_alignment(r);
                        order = __ffs(align) - 20;
-diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/setup-res.c
---- linux-2.6.27/drivers/pci/setup-res.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/setup-res.c        2009-03-25 16:11:12.000000000 +0000
-@@ -126,6 +126,21 @@ int pci_claim_resource(struct pci_dev *d
+diff -r 9608d5473017 drivers/pci/setup-res.c
+--- a/drivers/pci/setup-res.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/setup-res.c  Wed May 06 16:56:30 2009 +0100
+@@ -126,6 +126,21 @@
        return err;
  }
  
@@ -270592,7 +270531,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
  int pci_assign_resource(struct pci_dev *dev, int resno)
  {
        struct pci_bus *bus = dev->bus;
-@@ -144,6 +159,10 @@ int pci_assign_resource(struct pci_dev *
+@@ -144,6 +159,10 @@
                        (unsigned long long)res->end, res->flags);
                return -EINVAL;
        }
@@ -270603,7 +270542,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
  
        /* First, try exact prefetching match.. */
        ret = pci_bus_alloc_resource(bus, res, size, align, min,
-@@ -169,8 +188,15 @@ int pci_assign_resource(struct pci_dev *
+@@ -169,8 +188,15 @@
                        (unsigned long long)res->end);
        } else {
                res->flags &= ~IORESOURCE_STARTALIGN;
@@ -270620,7 +270559,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
        }
  
        return ret;
-@@ -208,6 +234,12 @@ int pci_assign_resource_fixed(struct pci
+@@ -208,6 +234,12 @@
                        (unsigned long long)res->start,
                        (unsigned long long)res->end);
        } else if (resno < PCI_BRIDGE_RESOURCES) {
@@ -270633,7 +270572,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
                pci_update_resource(dev, res, resno);
        }
  
-@@ -220,6 +252,7 @@ EXPORT_SYMBOL_GPL(pci_assign_resource_fi
+@@ -220,6 +252,7 @@
  void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
  {
        int i;
@@ -270641,7 +270580,7 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
  
        for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                struct resource *r;
-@@ -242,12 +275,22 @@ void pdev_sort_resources(struct pci_dev 
+@@ -242,12 +275,22 @@
                                (unsigned long long)r->end, r->flags);
                        continue;
                }
@@ -270665,10 +270604,10 @@ diff -purN linux-2.6.27/drivers/pci/setup-res.c linux-2.6.27.19-5.1/drivers/pci/
  
                        if (r_align > align) {
                                tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
-diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.c
---- linux-2.6.27/drivers/pci/slot.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/slot.c     2009-03-25 16:11:12.000000000 +0000
-@@ -73,18 +73,100 @@ static struct kobj_type pci_slot_ktype =
+diff -r 9608d5473017 drivers/pci/slot.c
+--- a/drivers/pci/slot.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/slot.c       Wed May 06 16:56:30 2009 +0100
+@@ -73,18 +73,100 @@
        .default_attrs = pci_slot_default_attrs,
  };
  
@@ -270770,7 +270709,7 @@ diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.
   *
   * Placeholder slots:
   * In most cases, @pci_bus, @slot_nr will be sufficient to uniquely identify
-@@ -93,12 +175,8 @@ static struct kobj_type pci_slot_ktype =
+@@ -93,12 +175,8 @@
   * the slot. In this scenario, the caller may pass -1 for @slot_nr.
   *
   * The following semantics are imposed when the caller passes @slot_nr ==
@@ -270785,7 +270724,7 @@ diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.
   * user-visible, which is the 'address' parameter presented in sysfs will
   * consist solely of a dddd:bb tuple, where dddd is the PCI domain of the
   * %struct pci_bus and bb is the bus number. In other words, the devfn of
-@@ -106,47 +184,57 @@ static struct kobj_type pci_slot_ktype =
+@@ -106,46 +184,56 @@
   */
  
  struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
@@ -270852,16 +270791,15 @@ diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.
 +              err = -ENOMEM;
                goto err;
        }
++
 +      err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, NULL,
 +                                 "%s", slot_name);
 +      if (err)
 +              goto err;
-+
        INIT_LIST_HEAD(&slot->list);
        list_add(&slot->list, &parent->slots);
-@@ -154,10 +242,11 @@ placeholder:
+@@ -154,10 +242,11 @@
        pr_debug("%s: created pci_slot on %04x:%02x:%02x\n",
                 __func__, pci_domain_nr(parent), parent->number, slot_nr);
  
@@ -270875,7 +270813,7 @@ diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.
        kfree(slot);
        slot = ERR_PTR(err);
        goto out;
-@@ -203,7 +292,6 @@ EXPORT_SYMBOL_GPL(pci_update_slot_number
+@@ -203,7 +292,6 @@
   * just call kobject_put on its kobj and let our release methods do the
   * rest.
   */
@@ -270883,9 +270821,9 @@ diff -purN linux-2.6.27/drivers/pci/slot.c linux-2.6.27.19-5.1/drivers/pci/slot.
  void pci_destroy_slot(struct pci_slot *slot)
  {
        pr_debug("%s: dec refcount to %d on %04x:%02x:%02x\n", __func__,
-diff -purN linux-2.6.27/drivers/pci/syscall.c linux-2.6.27.19-5.1/drivers/pci/syscall.c
---- linux-2.6.27/drivers/pci/syscall.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pci/syscall.c  2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/pci/syscall.c
+--- a/drivers/pci/syscall.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pci/syscall.c    Wed May 06 16:56:30 2009 +0100
 @@ -14,10 +14,8 @@
  #include <asm/uaccess.h>
  #include "pci.h"
@@ -270899,7 +270837,7 @@ diff -purN linux-2.6.27/drivers/pci/syscall.c linux-2.6.27.19-5.1/drivers/pci/sy
  {
        struct pci_dev *dev;
        u8 byte;
-@@ -86,10 +84,8 @@ error:
+@@ -86,10 +84,8 @@
        return err;
  }
  
@@ -270912,10 +270850,10 @@ diff -purN linux-2.6.27/drivers/pci/syscall.c linux-2.6.27.19-5.1/drivers/pci/sy
  {
        struct pci_dev *dev;
        u8 byte;
-diff -purN linux-2.6.27/drivers/pcmcia/electra_cf.c linux-2.6.27.19-5.1/drivers/pcmcia/electra_cf.c
---- linux-2.6.27/drivers/pcmcia/electra_cf.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pcmcia/electra_cf.c    2009-03-25 16:11:18.000000000 +0000
-@@ -356,6 +356,7 @@ static struct of_device_id electra_cf_ma
+diff -r 9608d5473017 drivers/pcmcia/electra_cf.c
+--- a/drivers/pcmcia/electra_cf.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pcmcia/electra_cf.c      Wed May 06 16:56:30 2009 +0100
+@@ -356,6 +356,7 @@
  MODULE_DEVICE_TABLE(of, electra_cf_match);
  
  static struct of_platform_driver electra_cf_driver = {
@@ -270923,10 +270861,10 @@ diff -purN linux-2.6.27/drivers/pcmcia/electra_cf.c linux-2.6.27.19-5.1/drivers/
        .name      = (char *)driver_name,
        .match_table    = electra_cf_match,
        .probe    = electra_cf_probe,
-diff -purN linux-2.6.27/drivers/pcmcia/m8xx_pcmcia.c linux-2.6.27.19-5.1/drivers/pcmcia/m8xx_pcmcia.c
---- linux-2.6.27/drivers/pcmcia/m8xx_pcmcia.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pcmcia/m8xx_pcmcia.c   2009-03-25 16:11:18.000000000 +0000
-@@ -1319,6 +1319,7 @@ static struct of_device_id m8xx_pcmcia_m
+diff -r 9608d5473017 drivers/pcmcia/m8xx_pcmcia.c
+--- a/drivers/pcmcia/m8xx_pcmcia.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pcmcia/m8xx_pcmcia.c     Wed May 06 16:56:30 2009 +0100
+@@ -1319,6 +1319,7 @@
  MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
  
  static struct of_platform_driver m8xx_pcmcia_driver = {
@@ -270934,10 +270872,10 @@ diff -purN linux-2.6.27/drivers/pcmcia/m8xx_pcmcia.c linux-2.6.27.19-5.1/drivers
        .name = driver_name,
        .match_table = m8xx_pcmcia_match,
        .probe = m8xx_probe,
-diff -purN linux-2.6.27/drivers/pnp/base.h linux-2.6.27.19-5.1/drivers/pnp/base.h
---- linux-2.6.27/drivers/pnp/base.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/base.h     2009-03-25 16:11:23.000000000 +0000
-@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct reso
+diff -r 9608d5473017 drivers/pnp/base.h
+--- a/drivers/pnp/base.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/base.h       Wed May 06 16:56:30 2009 +0100
+@@ -147,7 +147,7 @@
  void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
  
  void pnp_free_resources(struct pnp_dev *dev);
@@ -270946,10 +270884,10 @@ diff -purN linux-2.6.27/drivers/pnp/base.h linux-2.6.27.19-5.1/drivers/pnp/base.
  
  struct pnp_resource {
        struct list_head list;
-diff -purN linux-2.6.27/drivers/pnp/pnpacpi/core.c linux-2.6.27.19-5.1/drivers/pnp/pnpacpi/core.c
---- linux-2.6.27/drivers/pnp/pnpacpi/core.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/pnpacpi/core.c     2009-03-25 16:11:23.000000000 +0000
-@@ -148,9 +148,13 @@ static int __init pnpacpi_add_device(str
+diff -r 9608d5473017 drivers/pnp/pnpacpi/core.c
+--- a/drivers/pnp/pnpacpi/core.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/pnpacpi/core.c       Wed May 06 16:56:30 2009 +0100
+@@ -148,9 +148,13 @@
        acpi_status status;
        struct pnp_dev *dev;
  
@@ -270964,10 +270902,10 @@ diff -purN linux-2.6.27/drivers/pnp/pnpacpi/core.c linux-2.6.27.19-5.1/drivers/p
                return 0;
  
        dev = pnp_alloc_dev(&pnpacpi_protocol, num, acpi_device_hid(device));
-diff -purN linux-2.6.27/drivers/pnp/quirks.c linux-2.6.27.19-5.1/drivers/pnp/quirks.c
---- linux-2.6.27/drivers/pnp/quirks.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/quirks.c   2009-03-25 16:11:23.000000000 +0000
-@@ -245,7 +245,7 @@ static void quirk_system_pci_resources(s
+diff -r 9608d5473017 drivers/pnp/quirks.c
+--- a/drivers/pnp/quirks.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/quirks.c     Wed May 06 16:56:30 2009 +0100
+@@ -245,7 +245,7 @@
         */
        for_each_pci_dev(pdev) {
                for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
@@ -270976,10 +270914,10 @@ diff -purN linux-2.6.27/drivers/pnp/quirks.c linux-2.6.27.19-5.1/drivers/pnp/qui
  
                        type = pci_resource_flags(pdev, i) &
                                        (IORESOURCE_IO | IORESOURCE_MEM);
-diff -purN linux-2.6.27/drivers/pnp/resource.c linux-2.6.27.19-5.1/drivers/pnp/resource.c
---- linux-2.6.27/drivers/pnp/resource.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/pnp/resource.c 2009-03-25 16:11:23.000000000 +0000
-@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, s
+diff -r 9608d5473017 drivers/pnp/resource.c
+--- a/drivers/pnp/resource.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/pnp/resource.c   Wed May 06 16:56:30 2009 +0100
+@@ -467,14 +467,14 @@
  #endif
  }
  
@@ -270996,10 +270934,10 @@ diff -purN linux-2.6.27/drivers/pnp/resource.c linux-2.6.27.19-5.1/drivers/pnp/r
  {
        struct pnp_resource *pnp_res;
        struct resource *res;
-diff -purN linux-2.6.27/drivers/ps3/ps3av.c linux-2.6.27.19-5.1/drivers/ps3/ps3av.c
---- linux-2.6.27/drivers/ps3/ps3av.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ps3/ps3av.c    2009-03-25 16:11:24.000000000 +0000
-@@ -59,8 +59,6 @@ static struct ps3av {
+diff -r 9608d5473017 drivers/ps3/ps3av.c
+--- a/drivers/ps3/ps3av.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ps3/ps3av.c      Wed May 06 16:56:30 2009 +0100
+@@ -59,8 +59,6 @@
                struct ps3av_reply_hdr reply_hdr;
                u8 raw[PS3AV_BUF_SIZE];
        } recv_buf;
@@ -271008,7 +270946,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av.c linux-2.6.27.19-5.1/drivers/ps3/ps3a
  } *ps3av;
  
  /* color space */
-@@ -915,6 +913,22 @@ int ps3av_video_mute(int mute)
+@@ -915,6 +913,22 @@
  
  EXPORT_SYMBOL_GPL(ps3av_video_mute);
  
@@ -271031,10 +270969,11 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av.c linux-2.6.27.19-5.1/drivers/ps3/ps3a
  int ps3av_audio_mute(int mute)
  {
        return ps3av_set_audio_mute(mute ? PS3AV_CMD_MUTE_ON
-@@ -923,24 +937,6 @@ int ps3av_audio_mute(int mute)
+@@ -922,24 +936,6 @@
+ }
  
  EXPORT_SYMBOL_GPL(ps3av_audio_mute);
+-
 -void ps3av_register_flip_ctl(void (*flip_ctl)(int on, void *data),
 -                           void *flip_data)
 -{
@@ -271052,14 +270991,13 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av.c linux-2.6.27.19-5.1/drivers/ps3/ps3a
 -              ps3av->flip_ctl(on, ps3av->flip_data);
 -      mutex_unlock(&ps3av->mutex);
 -}
--
  static int ps3av_probe(struct ps3_system_bus_device *dev)
  {
-       int res;
-diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/ps3av_cmd.c
---- linux-2.6.27/drivers/ps3/ps3av_cmd.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/ps3/ps3av_cmd.c        2009-03-25 16:11:24.000000000 +0000
-@@ -660,9 +660,10 @@ u32 ps3av_cmd_set_av_audio_param(void *p
+diff -r 9608d5473017 drivers/ps3/ps3av_cmd.c
+--- a/drivers/ps3/ps3av_cmd.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/ps3/ps3av_cmd.c  Wed May 06 16:56:31 2009 +0100
+@@ -660,9 +660,10 @@
  }
  
  /* default cs val */
@@ -271071,7 +271009,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
  
  #define CS_44 0x00
  #define CS_48 0x02
-@@ -677,7 +678,7 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -677,7 +678,7 @@
                              u32 ch, u32 fs, u32 word_bits, u32 format,
                              u32 source)
  {
@@ -271080,7 +271018,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
        int i;
  
        if (!(ch | fs | format | word_bits | source)) {
-@@ -687,7 +688,6 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -687,7 +688,6 @@
                format = PS3AV_CMD_AUDIO_FORMAT_PCM;
                source = PS3AV_CMD_AUDIO_SOURCE_SERIAL;
        }
@@ -271088,7 +271026,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
  
        /* audio mode */
        memset(audio, 0, sizeof(*audio));
-@@ -777,16 +777,17 @@ void ps3av_cmd_set_audio_mode(struct ps3
+@@ -777,16 +777,17 @@
                break;
        }
  
@@ -271112,7 +271050,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
        }
  }
  
-@@ -863,7 +864,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt
+@@ -863,7 +864,7 @@
  {
        int res;
  
@@ -271121,7 +271059,7 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
  
        /* avb packet */
        res = ps3av_do_pkt(PS3AV_CID_AVB_PARAM, send_len, sizeof(*avb),
-@@ -877,7 +878,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt
+@@ -877,7 +878,7 @@
                         res);
  
        out:
@@ -271130,25 +271068,14 @@ diff -purN linux-2.6.27/drivers/ps3/ps3av_cmd.c linux-2.6.27.19-5.1/drivers/ps3/
        return res;
  }
  
-diff -purN linux-2.6.27/drivers/rtc/rtc-cmos.c linux-2.6.27.19-5.1/drivers/rtc/rtc-cmos.c
---- linux-2.6.27/drivers/rtc/rtc-cmos.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/rtc/rtc-cmos.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1030,29 +1030,32 @@ static struct platform_driver cmos_platf
+diff -r 9608d5473017 drivers/rtc/rtc-cmos.c
+--- a/drivers/rtc/rtc-cmos.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/rtc/rtc-cmos.c   Wed May 06 16:56:31 2009 +0100
+@@ -1030,29 +1030,32 @@
  
  static int __init cmos_init(void)
  {
 +      int retval = 0;
-+
-+#ifdef        CONFIG_PNP
-+      pnp_register_driver(&cmos_pnp_driver);
-+#endif
-+
-+      if (!cmos_rtc.dev)
-+              retval = platform_driver_probe(&cmos_platform_driver,
-+                                             cmos_platform_probe);
-+
-+      if (retval == 0)
-+              return 0;
 +
  #ifdef        CONFIG_PNP
 -      if (pnp_platform_devices)
@@ -271160,6 +271087,17 @@ diff -purN linux-2.6.27/drivers/rtc/rtc-cmos.c linux-2.6.27.19-5.1/drivers/rtc/r
 -      return platform_driver_probe(&cmos_platform_driver,
 -                      cmos_platform_probe);
 -#endif /* CONFIG_PNP */
++      pnp_register_driver(&cmos_pnp_driver);
++#endif
++
++      if (!cmos_rtc.dev)
++              retval = platform_driver_probe(&cmos_platform_driver,
++                                             cmos_platform_probe);
++
++      if (retval == 0)
++              return 0;
++
++#ifdef        CONFIG_PNP
 +      pnp_unregister_driver(&cmos_pnp_driver);
 +#endif
 +      return retval;
@@ -271181,10 +271119,10 @@ diff -purN linux-2.6.27/drivers/rtc/rtc-cmos.c linux-2.6.27.19-5.1/drivers/rtc/r
  }
  module_exit(cmos_exit);
  
-diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s390/block/dasd.c
---- linux-2.6.27/drivers/s390/block/dasd.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd.c      2009-03-25 16:11:24.000000000 +0000
-@@ -335,7 +335,9 @@ static int dasd_state_unfmt_to_basic(str
+diff -r 9608d5473017 drivers/s390/block/dasd.c
+--- a/drivers/s390/block/dasd.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd.c        Wed May 06 16:56:31 2009 +0100
+@@ -335,7 +335,9 @@
  static int
  dasd_state_ready_to_online(struct dasd_device * device)
  {
@@ -271195,7 +271133,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s3
  
        if (device->discipline->ready_to_online) {
                rc = device->discipline->ready_to_online(device);
-@@ -343,8 +345,19 @@ dasd_state_ready_to_online(struct dasd_d
+@@ -343,8 +345,19 @@
                        return rc;
        }
        device->state = DASD_STATE_ONLINE;
@@ -271216,7 +271154,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s3
        return 0;
  }
  
-@@ -353,7 +366,9 @@ dasd_state_ready_to_online(struct dasd_d
+@@ -353,7 +366,9 @@
   */
  static int dasd_state_online_to_ready(struct dasd_device *device)
  {
@@ -271227,7 +271165,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s3
  
        if (device->discipline->online_to_ready) {
                rc = device->discipline->online_to_ready(device);
-@@ -361,6 +376,18 @@ static int dasd_state_online_to_ready(st
+@@ -361,6 +376,18 @@
                        return rc;
        }
        device->state = DASD_STATE_READY;
@@ -271246,7 +271184,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s3
        return 0;
  }
  
-@@ -1746,6 +1773,11 @@ restart:
+@@ -1746,6 +1773,11 @@
                        goto restart;
                }
  
@@ -271258,10 +271196,10 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd.c linux-2.6.27.19-5.1/drivers/s3
                /* First of all call extended error reporting. */
                if (dasd_eer_enabled(base) &&
                    cqr->status == DASD_CQR_FAILED) {
-diff -purN linux-2.6.27/drivers/s390/block/dasd_devmap.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_devmap.c
---- linux-2.6.27/drivers/s390/block/dasd_devmap.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_devmap.c       2009-03-25 16:11:24.000000000 +0000
-@@ -205,6 +205,8 @@ dasd_feature_list(char *str, char **endp
+diff -r 9608d5473017 drivers/s390/block/dasd_devmap.c
+--- a/drivers/s390/block/dasd_devmap.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_devmap.c Wed May 06 16:56:31 2009 +0100
+@@ -205,6 +205,8 @@
                        features |= DASD_FEATURE_USEDIAG;
                else if (len == 6 && !strncmp(str, "erplog", 6))
                        features |= DASD_FEATURE_ERPLOG;
@@ -271270,7 +271208,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_devmap.c linux-2.6.27.19-5.1/dri
                else {
                        MESSAGE(KERN_WARNING,
                                "unsupported feature: %*s, "
-@@ -666,6 +668,51 @@ dasd_device_from_cdev(struct ccw_device 
+@@ -666,6 +668,51 @@
   */
  
  /*
@@ -271322,7 +271260,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_devmap.c linux-2.6.27.19-5.1/dri
   * readonly controls the readonly status of a dasd
   */
  static ssize_t
-@@ -1019,6 +1066,7 @@ static struct attribute * dasd_attrs[] =
+@@ -1019,6 +1066,7 @@
        &dev_attr_use_diag.attr,
        &dev_attr_eer_enabled.attr,
        &dev_attr_erplog.attr,
@@ -271330,10 +271268,10 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_devmap.c linux-2.6.27.19-5.1/dri
        NULL,
  };
  
-diff -purN linux-2.6.27/drivers/s390/block/dasd_diag.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_diag.c
---- linux-2.6.27/drivers/s390/block/dasd_diag.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_diag.c 2009-03-25 16:11:24.000000000 +0000
-@@ -544,7 +544,8 @@ static struct dasd_ccw_req *dasd_diag_bu
+diff -r 9608d5473017 drivers/s390/block/dasd_diag.c
+--- a/drivers/s390/block/dasd_diag.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_diag.c   Wed May 06 16:56:31 2009 +0100
+@@ -544,7 +544,8 @@
        }
        cqr->retries = DIAG_MAX_RETRIES;
        cqr->buildclk = get_clock();
@@ -271343,9 +271281,9 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_diag.c linux-2.6.27.19-5.1/drive
                set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
        cqr->startdev = memdev;
        cqr->memdev = memdev;
-diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_eckd.c
---- linux-2.6.27/drivers/s390/block/dasd_eckd.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_eckd.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/block/dasd_eckd.c
+--- a/drivers/s390/block/dasd_eckd.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_eckd.c   Wed May 06 16:56:31 2009 +0100
 @@ -6,6 +6,8 @@
   *                Martin Schwidefsky <schwidefsky@de.ibm.com>
   * Bugreports.to..: <Linux390@de.ibm.com>
@@ -271355,7 +271293,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
   *
   */
  
-@@ -1494,19 +1496,34 @@ static void dasd_eckd_handle_unsolicited
+@@ -1494,19 +1496,34 @@
  
  
        /* service information message SIM */
@@ -271371,7 +271309,6 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
 -      DEV_MESSAGE(KERN_DEBUG, device, "%s",
 -                  "unsolicited interrupt received");
 -      device->discipline->dump_sense(device, NULL, irb);
--      dasd_schedule_device_bh(device);
 +      if ((irb->scsw.cmd.cc == 1) &&
 +          (irb->scsw.cmd.fctl & SCSW_FCTL_START_FUNC) &&
 +          (irb->scsw.cmd.actl & SCSW_ACTL_START_PEND) &&
@@ -271391,12 +271328,13 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
 +                          "(sense available)");
 +              device->discipline->dump_sense(device, NULL, irb);
 +      }
-+      dasd_schedule_device_bh(device);
++
+       dasd_schedule_device_bh(device);
+-
        return;
  };
  
-@@ -1683,7 +1700,8 @@ static struct dasd_ccw_req *dasd_eckd_bu
+@@ -1683,7 +1700,8 @@
                        recid++;
                }
        }
@@ -271406,7 +271344,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
                set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
        cqr->startdev = startdev;
        cqr->memdev = startdev;
-@@ -2068,6 +2086,103 @@ dasd_eckd_set_attrib(struct dasd_device 
+@@ -2068,6 +2086,103 @@
        return 0;
  }
  
@@ -271510,7 +271448,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
  static int
  dasd_eckd_ioctl(struct dasd_block *block, unsigned int cmd, void __user *argp)
  {
-@@ -2086,6 +2201,8 @@ dasd_eckd_ioctl(struct dasd_block *block
+@@ -2086,6 +2201,8 @@
                return dasd_eckd_reserve(device);
        case BIODASDSLCK:
                return dasd_eckd_steal_lock(device);
@@ -271519,10 +271457,10 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_eckd.c linux-2.6.27.19-5.1/drive
        default:
                return -ENOIOCTLCMD;
        }
-diff -purN linux-2.6.27/drivers/s390/block/dasd_fba.c linux-2.6.27.19-5.1/drivers/s390/block/dasd_fba.c
---- linux-2.6.27/drivers/s390/block/dasd_fba.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dasd_fba.c  2009-03-25 16:11:24.000000000 +0000
-@@ -355,7 +355,8 @@ static struct dasd_ccw_req *dasd_fba_bui
+diff -r 9608d5473017 drivers/s390/block/dasd_fba.c
+--- a/drivers/s390/block/dasd_fba.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dasd_fba.c    Wed May 06 16:56:31 2009 +0100
+@@ -355,7 +355,8 @@
                        recid++;
                }
        }
@@ -271532,19 +271470,19 @@ diff -purN linux-2.6.27/drivers/s390/block/dasd_fba.c linux-2.6.27.19-5.1/driver
                set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
        cqr->startdev = memdev;
        cqr->memdev = memdev;
-diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers/s390/block/dcssblk.c
---- linux-2.6.27/drivers/s390/block/dcssblk.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/dcssblk.c   2009-03-25 16:11:24.000000000 +0000
-@@ -4,6 +4,8 @@
+diff -r 9608d5473017 drivers/s390/block/dcssblk.c
+--- a/drivers/s390/block/dcssblk.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/dcssblk.c     Wed May 06 16:56:31 2009 +0100
+@@ -3,6 +3,8 @@
+  *
   * Authors: Carsten Otte, Stefan Weinhuber, Gerald Schaefer
   */
-+#define KMSG_COMPONENT "dcssblk"
 +
++#define KMSG_COMPONENT "dcssblk"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/ctype.h>
-@@ -17,21 +19,10 @@
+@@ -17,20 +19,9 @@
  #include <linux/interrupt.h>
  #include <asm/s390_rdev.h>
  
@@ -271552,7 +271490,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
  #define DCSSBLK_NAME "dcssblk"
  #define DCSSBLK_MINORS_PER_DISK 1
  #define DCSSBLK_PARM_LEN 400
+-
 -#ifdef DCSSBLK_DEBUG
 -#define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x)
 -#else
@@ -271562,29 +271500,43 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
 -#define PRINT_WARN(x...)  printk(KERN_WARNING DCSSBLK_NAME " warning: " x)
 -#define PRINT_ERR(x...)         printk(KERN_ERR DCSSBLK_NAME " error: " x)
 -
--
  static int dcssblk_open(struct inode *inode, struct file *filp);
  static int dcssblk_release(struct inode *inode, struct file *filp);
- static int dcssblk_make_request(struct request_queue *q, struct bio *bio);
-@@ -48,6 +39,30 @@ static struct block_device_operations dc
+@@ -48,26 +39,6 @@
        .direct_access  = dcssblk_direct_access,
  };
  
-+struct dcssblk_dev_info {
-+      struct list_head lh;
-+      struct device dev;
-+      char segment_name[BUS_ID_SIZE];
-+      atomic_t use_count;
-+      struct gendisk *gd;
-+      unsigned long start;
-+      unsigned long end;
-+      int segment_type;
-+      unsigned char save_pending;
-+      unsigned char is_shared;
-+      struct request_queue *dcssblk_queue;
+-static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
+-                                size_t count);
+-static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
+-                                size_t count);
+-static ssize_t dcssblk_save_store(struct device * dev, struct device_attribute *attr, const char * buf,
+-                                size_t count);
+-static ssize_t dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf);
+-static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
+-                                size_t count);
+-static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
+-
+-static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
+-static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
+-static DEVICE_ATTR(save, S_IWUSR | S_IRUGO, dcssblk_save_show,
+-                 dcssblk_save_store);
+-static DEVICE_ATTR(shared, S_IWUSR | S_IRUGO, dcssblk_shared_show,
+-                 dcssblk_shared_store);
+-
+-static struct device *dcssblk_root_dev;
+-
+ struct dcssblk_dev_info {
+       struct list_head lh;
+       struct device dev;
+@@ -80,7 +51,41 @@
+       unsigned char save_pending;
+       unsigned char is_shared;
+       struct request_queue *dcssblk_queue;
 +      int num_of_segments;
 +      struct list_head seg_list;
-+};
+ };
 +
 +struct segment_info {
 +      struct list_head lh;
@@ -271594,47 +271546,33 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
 +      int segment_type;
 +};
 +
- static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
-                                 size_t count);
- static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
-@@ -58,30 +73,20 @@ static ssize_t dcssblk_save_show(struct 
- static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
-                                 size_t count);
- static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
++static ssize_t dcssblk_add_store(struct device * dev, struct device_attribute *attr, const char * buf,
++                                size_t count);
++static ssize_t dcssblk_remove_store(struct device * dev, struct device_attribute *attr, const char * buf,
++                                size_t count);
++static ssize_t dcssblk_save_store(struct device * dev, struct device_attribute *attr, const char * buf,
++                                size_t count);
++static ssize_t dcssblk_save_show(struct device *dev, struct device_attribute *attr, char *buf);
++static ssize_t dcssblk_shared_store(struct device * dev, struct device_attribute *attr, const char * buf,
++                                size_t count);
++static ssize_t dcssblk_shared_show(struct device *dev, struct device_attribute *attr, char *buf);
 +static ssize_t dcssblk_seglist_show(struct device *dev,
 +                              struct device_attribute *attr,
 +                              char *buf);
- static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
- static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
--static DEVICE_ATTR(save, S_IWUSR | S_IRUGO, dcssblk_save_show,
++
++static DEVICE_ATTR(add, S_IWUSR, NULL, dcssblk_add_store);
++static DEVICE_ATTR(remove, S_IWUSR, NULL, dcssblk_remove_store);
 +static DEVICE_ATTR(save, S_IWUSR | S_IRUSR, dcssblk_save_show,
-                  dcssblk_save_store);
--static DEVICE_ATTR(shared, S_IWUSR | S_IRUGO, dcssblk_shared_show,
++                 dcssblk_save_store);
 +static DEVICE_ATTR(shared, S_IWUSR | S_IRUSR, dcssblk_shared_show,
-                  dcssblk_shared_store);
++                 dcssblk_shared_store);
 +static DEVICE_ATTR(seglist, S_IRUSR, dcssblk_seglist_show, NULL);
++
++static struct device *dcssblk_root_dev;
  
- static struct device *dcssblk_root_dev;
--struct dcssblk_dev_info {
--      struct list_head lh;
--      struct device dev;
--      char segment_name[BUS_ID_SIZE];
--      atomic_t use_count;
--      struct gendisk *gd;
--      unsigned long start;
--      unsigned long end;
--      int segment_type;
--      unsigned char save_pending;
--      unsigned char is_shared;
--      struct request_queue *dcssblk_queue;
--};
--
  static LIST_HEAD(dcssblk_devices);
  static struct rw_semaphore dcssblk_devices_sem;
-@@ -91,8 +96,15 @@ static struct rw_semaphore dcssblk_devic
+@@ -91,8 +96,15 @@
  static void
  dcssblk_release_segment(struct device *dev)
  {
@@ -271652,7 +271590,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        module_put(THIS_MODULE);
  }
  
-@@ -142,6 +154,168 @@ dcssblk_get_device_by_name(char *name)
+@@ -142,6 +154,168 @@
        return NULL;
  }
  
@@ -271821,7 +271759,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
  static void dcssblk_unregister_callback(struct device *dev)
  {
        device_unregister(dev);
-@@ -165,6 +339,7 @@ static ssize_t
+@@ -165,6 +339,7 @@
  dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count)
  {
        struct dcssblk_dev_info *dev_info;
@@ -271829,7 +271767,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        int rc;
  
        if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
-@@ -172,46 +347,47 @@ dcssblk_shared_store(struct device *dev,
+@@ -172,46 +347,47 @@
        down_write(&dcssblk_devices_sem);
        dev_info = container_of(dev, struct dcssblk_dev_info, dev);
        if (atomic_read(&dev_info->use_count)) {
@@ -271905,7 +271843,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        } else {
                rc = -EINVAL;
                goto out;
-@@ -220,8 +396,13 @@ dcssblk_shared_store(struct device *dev,
+@@ -220,8 +396,13 @@
        goto out;
  
  removeseg:
@@ -271921,7 +271859,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        list_del(&dev_info->lh);
  
        del_gendisk(dev_info->gd);
-@@ -254,6 +435,7 @@ static ssize_t
+@@ -254,6 +435,7 @@
  dcssblk_save_store(struct device *dev, struct device_attribute *attr, const char *inbuf, size_t count)
  {
        struct dcssblk_dev_info *dev_info;
@@ -271929,7 +271867,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
  
        if ((count > 1) && (inbuf[1] != '\n') && (inbuf[1] != '\0'))
                return -EINVAL;
-@@ -263,15 +445,17 @@ dcssblk_save_store(struct device *dev, s
+@@ -263,15 +445,17 @@
        if (inbuf[0] == '1') {
                if (atomic_read(&dev_info->use_count) == 0) {
                        // device is idle => we save immediately
@@ -271953,7 +271891,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                        dev_info->save_pending = 1;
                }
        } else if (inbuf[0] == '0') {
-@@ -279,8 +463,9 @@ dcssblk_save_store(struct device *dev, s
+@@ -279,8 +463,9 @@
                        // device is busy & the user wants to undo his save
                        // request
                        dev_info->save_pending = 0;
@@ -271965,7 +271903,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                }
        } else {
                up_write(&dcssblk_devices_sem);
-@@ -291,66 +476,123 @@ dcssblk_save_store(struct device *dev, s
+@@ -291,66 +476,123 @@
  }
  
  /*
@@ -272030,6 +271968,30 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
 +      num_of_segments = 0;
        for (i = 0; ((buf[i] != '\0') && (buf[i] != '\n') && i < count); i++) {
 -              local_buf[i] = toupper(buf[i]);
+-      }
+-      local_buf[i] = '\0';
+-      if ((i == 0) || (i > 8)) {
+-              rc = -ENAMETOOLONG;
+-              goto out;
+-      }
+-      /*
+-       * already loaded?
+-       */
+-      down_read(&dcssblk_devices_sem);
+-      dev_info = dcssblk_get_device_by_name(local_buf);
+-      up_read(&dcssblk_devices_sem);
+-      if (dev_info != NULL) {
+-              PRINT_WARN("Segment %s already loaded!\n", local_buf);
+-              rc = -EEXIST;
+-              goto out;
+-      }
+-      /*
+-       * get a struct dcssblk_dev_info
+-       */
+-      dev_info = kzalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL);
+-      if (dev_info == NULL) {
+-              rc = -ENOMEM;
+-              goto out;
 +              for (j = i; (buf[j] != ':') &&
 +                      (buf[j] != '\0') &&
 +                      (buf[j] != '\n') &&
@@ -272066,42 +272028,20 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
 +              if ((buf[j] == '\0') || (buf[j] == '\n'))
 +                      break;
        }
--      local_buf[i] = '\0';
--      if ((i == 0) || (i > 8)) {
-+
+-      strcpy(dev_info->segment_name, local_buf);
+-      strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
 +      /* no trailing colon at the end of the input */
 +      if ((i > 0) && (buf[i-1] == ':')) {
-               rc = -ENAMETOOLONG;
--              goto out;
--      }
--      /*
--       * already loaded?
--       */
--      down_read(&dcssblk_devices_sem);
--      dev_info = dcssblk_get_device_by_name(local_buf);
--      up_read(&dcssblk_devices_sem);
--      if (dev_info != NULL) {
--              PRINT_WARN("Segment %s already loaded!\n", local_buf);
--              rc = -EEXIST;
--              goto out;
--      }
--      /*
--       * get a struct dcssblk_dev_info
--       */
--      dev_info = kzalloc(sizeof(struct dcssblk_dev_info), GFP_KERNEL);
--      if (dev_info == NULL) {
--              rc = -ENOMEM;
--              goto out;
++              rc = -ENAMETOOLONG;
 +              goto seg_list_del;
-       }
++      }
 +      strlcpy(local_buf, buf, i + 1);
 +      dev_info->num_of_segments = num_of_segments;
 +      rc = dcssblk_is_continuous(dev_info);
 +      if (rc < 0)
 +              goto seg_list_del;
--      strcpy(dev_info->segment_name, local_buf);
--      strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
++
 +      dev_info->start = dcssblk_find_lowest_addr(dev_info);
 +      dev_info->end = dcssblk_find_highest_addr(dev_info);
 +
@@ -272117,7 +272057,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        }
        dev_info->gd->major = dcssblk_major;
        dev_info->gd->fops = &dcssblk_devops;
-@@ -360,59 +602,42 @@ dcssblk_add_store(struct device *dev, st
+@@ -360,65 +602,51 @@
        dev_info->gd->driverfs_dev = &dev_info->dev;
        blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
        blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);
@@ -272187,17 +272127,16 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        }
        get_device(&dev_info->dev);
        rc = device_create_file(&dev_info->dev, &dev_attr_shared);
-@@ -421,6 +646,9 @@ dcssblk_add_store(struct device *dev, st
-       rc = device_create_file(&dev_info->dev, &dev_attr_save);
        if (rc)
                goto unregister_dev;
-+      rc = device_create_file(&dev_info->dev, &dev_attr_seglist);
+       rc = device_create_file(&dev_info->dev, &dev_attr_save);
 +      if (rc)
 +              goto unregister_dev;
++      rc = device_create_file(&dev_info->dev, &dev_attr_seglist);
+       if (rc)
+               goto unregister_dev;
  
-       add_disk(dev_info->gd);
-@@ -434,7 +662,6 @@ dcssblk_add_store(struct device *dev, st
+@@ -434,7 +662,6 @@
                        set_disk_ro(dev_info->gd,0);
                        break;
        }
@@ -272205,7 +272144,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        up_write(&dcssblk_devices_sem);
        rc = count;
        goto out;
-@@ -445,20 +672,27 @@ unregister_dev:
+@@ -445,20 +672,27 @@
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
        device_unregister(&dev_info->dev);
@@ -272240,7 +272179,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        kfree(dev_info);
  out:
        kfree(local_buf);
-@@ -473,6 +707,7 @@ static ssize_t
+@@ -473,6 +707,7 @@
  dcssblk_remove_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
  {
        struct dcssblk_dev_info *dev_info;
@@ -272248,7 +272187,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        int rc, i;
        char *local_buf;
  
-@@ -499,26 +734,30 @@ dcssblk_remove_store(struct device *dev,
+@@ -499,26 +734,30 @@
        dev_info = dcssblk_get_device_by_name(local_buf);
        if (dev_info == NULL) {
                up_write(&dcssblk_devices_sem);
@@ -272266,9 +272205,9 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                rc = -EBUSY;
                goto out_buf;
        }
--      list_del(&dev_info->lh);
-+      list_del(&dev_info->lh);
++
+       list_del(&dev_info->lh);
+-
        del_gendisk(dev_info->gd);
        blk_cleanup_queue(dev_info->dcssblk_queue);
        dev_info->gd->queue = NULL;
@@ -272285,7 +272224,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        put_device(&dev_info->dev);
        up_write(&dcssblk_devices_sem);
  
-@@ -550,6 +789,7 @@ static int
+@@ -550,6 +789,7 @@
  dcssblk_release(struct inode *inode, struct file *filp)
  {
        struct dcssblk_dev_info *dev_info;
@@ -272293,7 +272232,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        int rc;
  
        dev_info = inode->i_bdev->bd_disk->private_data;
-@@ -560,9 +800,11 @@ dcssblk_release(struct inode *inode, str
+@@ -560,9 +800,11 @@
        down_write(&dcssblk_devices_sem);
        if (atomic_dec_and_test(&dev_info->use_count)
            && (dev_info->save_pending)) {
@@ -272308,7 +272247,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                dev_info->save_pending = 0;
        }
        up_write(&dcssblk_devices_sem);
-@@ -602,7 +844,9 @@ dcssblk_make_request(struct request_queu
+@@ -602,7 +844,9 @@
                case SEG_TYPE_SC:
                        /* cannot write to these segments */
                        if (bio_data_dir(bio) == WRITE) {
@@ -272319,7 +272258,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                                goto fail;
                        }
                }
-@@ -657,7 +901,7 @@ static void
+@@ -657,7 +901,7 @@
  dcssblk_check_params(void)
  {
        int rc, i, j, k;
@@ -272328,7 +272267,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
        struct dcssblk_dev_info *dev_info;
  
        for (i = 0; (i < DCSSBLK_PARM_LEN) && (dcssblk_segments[i] != '\0');
-@@ -665,15 +909,16 @@ dcssblk_check_params(void)
+@@ -665,15 +909,16 @@
                for (j = i; (dcssblk_segments[j] != ',')  &&
                            (dcssblk_segments[j] != '\0') &&
                            (dcssblk_segments[j] != '(')  &&
@@ -272347,7 +272286,7 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
                        if (!strncmp(&dcssblk_segments[j], "(local)", 7)) {
                                down_read(&dcssblk_devices_sem);
                                dev_info = dcssblk_get_device_by_name(buf);
-@@ -740,10 +985,12 @@ module_exit(dcssblk_exit);
+@@ -740,10 +985,12 @@
  
  module_param_string(segments, dcssblk_segments, DCSSBLK_PARM_LEN, 0444);
  MODULE_PARM_DESC(segments, "Name of DCSS segment(s) to be loaded, "
@@ -272365,9 +272304,9 @@ diff -purN linux-2.6.27/drivers/s390/block/dcssblk.c linux-2.6.27.19-5.1/drivers
 +               "e.g. segments=\"mydcss1,mydcss2:mydcss3,mydcss4(local)\"");
  
  MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s390/block/xpram.c
---- linux-2.6.27/drivers/s390/block/xpram.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/block/xpram.c     2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/block/xpram.c
+--- a/drivers/s390/block/xpram.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/block/xpram.c       Wed May 06 16:56:31 2009 +0100
 @@ -25,6 +25,8 @@
   *   generic hard disk support to replace ad-hoc partitioning
   */
@@ -272390,7 +272329,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
  typedef struct {
        unsigned int    size;           /* size of xpram segment in pages */
        unsigned int    offset;         /* start page of xpram segment */
-@@ -56,6 +52,7 @@ typedef struct {
+@@ -56,6 +52,7 @@
  static xpram_device_t xpram_devices[XPRAM_MAX_DEVS];
  static unsigned int xpram_sizes[XPRAM_MAX_DEVS];
  static struct gendisk *xpram_disks[XPRAM_MAX_DEVS];
@@ -272398,7 +272337,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
  static unsigned int xpram_pages;
  static int xpram_devs;
  
-@@ -263,7 +260,7 @@ static int __init xpram_setup_sizes(unsi
+@@ -263,7 +260,7 @@
  
        /* Check number of devices. */
        if (devs <= 0 || devs > XPRAM_MAX_DEVS) {
@@ -272407,7 +272346,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
                return -EINVAL;
        }
        xpram_devs = devs;
-@@ -294,22 +291,22 @@ static int __init xpram_setup_sizes(unsi
+@@ -294,22 +291,22 @@
                        mem_auto_no++;
        }
        
@@ -272440,7 +272379,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
                return -EINVAL;
        }
  
-@@ -321,8 +318,8 @@ static int __init xpram_setup_sizes(unsi
+@@ -321,8 +318,8 @@
         */
        if (mem_auto_no) {
                mem_auto = ((pages - mem_needed / 4) / mem_auto_no) * 4;
@@ -272451,7 +272390,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
                for (i = 0; i < xpram_devs; i++)
                        if (xpram_sizes[i] == 0)
                                xpram_sizes[i] = mem_auto;
-@@ -330,18 +327,22 @@ static int __init xpram_setup_sizes(unsi
+@@ -330,18 +327,22 @@
        return 0;
  }
  
@@ -272467,22 +272406,24 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
 -              if (!disk)
 +              xpram_disks[i] = alloc_disk(1);
 +              if (!xpram_disks[i])
-+                      goto out;
+                       goto out;
+-              xpram_disks[i] = disk;
 +              xpram_queues[i] = blk_alloc_queue(GFP_KERNEL);
 +              if (!xpram_queues[i]) {
 +                      put_disk(xpram_disks[i]);
-                       goto out;
--              xpram_disks[i] = disk;
++                      goto out;
 +              }
 +              blk_queue_make_request(xpram_queues[i], xpram_make_request);
 +              blk_queue_hardsect_size(xpram_queues[i], 4096);
        }
  
        /*
-@@ -352,18 +353,6 @@ static int __init xpram_setup_blkdev(voi
+@@ -350,18 +351,6 @@
+       rc = register_blkdev(XPRAM_MAJOR, XPRAM_NAME);
+       if (rc < 0)
                goto out;
-       /*
+-
+-      /*
 -       * Assign the other needed values: make request function, sizes and
 -       * hardsect size. All the minor devices feature the same value.
 -       */
@@ -272493,12 +272434,10 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
 -      }
 -      blk_queue_make_request(xpram_queue, xpram_make_request);
 -      blk_queue_hardsect_size(xpram_queue, 4096);
--
--      /*
+       /*
         * Setup device structures.
-        */
-       offset = 0;
-@@ -377,18 +366,18 @@ static int __init xpram_setup_blkdev(voi
+@@ -377,18 +366,18 @@
                disk->first_minor = i;
                disk->fops = &xpram_devops;
                disk->private_data = &xpram_devices[i];
@@ -272521,7 +272460,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
        return rc;
  }
  
-@@ -400,10 +389,10 @@ static void __exit xpram_exit(void)
+@@ -400,10 +389,10 @@
        int i;
        for (i = 0; i < xpram_devs; i++) {
                del_gendisk(xpram_disks[i]);
@@ -272533,7 +272472,7 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
  }
  
  static int __init xpram_init(void)
-@@ -412,12 +401,12 @@ static int __init xpram_init(void)
+@@ -412,12 +401,12 @@
  
        /* Find out size of expanded memory. */
        if (xpram_present() != 0) {
@@ -272549,18 +272488,18 @@ diff -purN linux-2.6.27/drivers/s390/block/xpram.c linux-2.6.27.19-5.1/drivers/s
        rc = xpram_setup_sizes(xpram_pages);
        if (rc)
                return rc;
-diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/drivers/s390/char/monreader.c
---- linux-2.6.27/drivers/s390/char/monreader.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/monreader.c  2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/char/monreader.c
+--- a/drivers/s390/char/monreader.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/monreader.c    Wed May 06 16:56:31 2009 +0100
+@@ -6,6 +6,8 @@
+  *   Copyright IBM Corp. 2004, 2008
   *   Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
   */
-+#define KMSG_COMPONENT "monreader"
 +
++#define KMSG_COMPONENT "monreader"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/init.h>
 @@ -24,19 +26,6 @@
  #include <asm/ebcdic.h>
  #include <asm/extmem.h>
@@ -272581,7 +272520,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
  
  #define MON_COLLECT_SAMPLE 0x80
  #define MON_COLLECT_EVENT  0x40
-@@ -172,7 +161,7 @@ static int mon_send_reply(struct mon_msg
+@@ -172,7 +161,7 @@
        } else
                monmsg->replied_msglim = 1;
        if (rc) {
@@ -272590,7 +272529,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                return -EIO;
        }
        return 0;
-@@ -251,7 +240,8 @@ static void mon_iucv_path_severed(struct
+@@ -251,7 +240,8 @@
  {
        struct mon_private *monpriv = path->private;
  
@@ -272600,7 +272539,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
        iucv_path_sever(path, NULL);
        atomic_set(&monpriv->iucv_severed, 1);
        wake_up(&mon_conn_wait_queue);
-@@ -266,8 +256,7 @@ static void mon_iucv_message_pending(str
+@@ -266,8 +256,7 @@
        memcpy(&monpriv->msg_array[monpriv->write_index]->msg,
               msg, sizeof(*msg));
        if (atomic_inc_return(&monpriv->msglim_count) == MON_MSGLIM) {
@@ -272610,7 +272549,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                monpriv->msg_array[monpriv->write_index]->msglim_reached = 1;
        }
        monpriv->write_index = (monpriv->write_index + 1) % MON_MSGLIM;
-@@ -311,8 +300,8 @@ static int mon_open(struct inode *inode,
+@@ -311,8 +300,8 @@
        rc = iucv_path_connect(monpriv->path, &monreader_iucv_handler,
                               MON_SERVICE, NULL, user_data_connect, monpriv);
        if (rc) {
@@ -272621,7 +272560,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                rc = -EIO;
                goto out_path;
        }
-@@ -353,7 +342,8 @@ static int mon_close(struct inode *inode
+@@ -353,7 +342,8 @@
         */
        rc = iucv_path_sever(monpriv->path, user_data_sever);
        if (rc)
@@ -272631,7 +272570,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
  
        atomic_set(&monpriv->iucv_severed, 0);
        atomic_set(&monpriv->iucv_connected, 0);
-@@ -469,7 +459,8 @@ static int __init mon_init(void)
+@@ -469,7 +459,8 @@
        int rc;
  
        if (!MACHINE_IS_VM) {
@@ -272641,7 +272580,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                return -ENODEV;
        }
  
-@@ -478,7 +469,8 @@ static int __init mon_init(void)
+@@ -478,7 +469,8 @@
         */
        rc = iucv_register(&monreader_iucv_handler, 1);
        if (rc) {
@@ -272651,7 +272590,7 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                return rc;
        }
  
-@@ -488,8 +480,8 @@ static int __init mon_init(void)
+@@ -488,8 +480,8 @@
                goto out_iucv;
        }
        if (rc != SEG_TYPE_SC) {
@@ -272662,19 +272601,19 @@ diff -purN linux-2.6.27/drivers/s390/char/monreader.c linux-2.6.27.19-5.1/driver
                rc = -EINVAL;
                goto out_iucv;
        }
-diff -purN linux-2.6.27/drivers/s390/char/monwriter.c linux-2.6.27.19-5.1/drivers/s390/char/monwriter.c
---- linux-2.6.27/drivers/s390/char/monwriter.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/monwriter.c  2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/char/monwriter.c
+--- a/drivers/s390/char/monwriter.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/monwriter.c    Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+  *
   * Author(s): Melissa Howland <Melissa.Howland@us.ibm.com>
   */
-+#define KMSG_COMPONENT "monwriter"
 +
++#define KMSG_COMPONENT "monwriter"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/init.h>
-@@ -64,9 +66,9 @@ static int monwrite_diag(struct monwrite
+@@ -64,9 +66,9 @@
        rc = appldata_asm(&id, fcn, (void *) buffer, myhdr->datalen);
        if (rc <= 0)
                return rc;
@@ -272685,47 +272624,47 @@ diff -purN linux-2.6.27/drivers/s390/char/monwriter.c linux-2.6.27.19-5.1/driver
        return -EINVAL;
  }
  
-diff -purN linux-2.6.27/drivers/s390/char/sclp.c linux-2.6.27.19-5.1/drivers/s390/char/sclp.c
---- linux-2.6.27/drivers/s390/char/sclp.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp.c       2009-03-25 16:11:24.000000000 +0000
-@@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header 
+diff -r 9608d5473017 drivers/s390/char/sclp.c
+--- a/drivers/s390/char/sclp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp.c Wed May 06 16:56:31 2009 +0100
+@@ -280,8 +280,11 @@
        rc = 0;
        for (offset = sizeof(struct sccb_header); offset < sccb->length;
             offset += evbuf->length) {
--              /* Search for event handler */
-               evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
++              evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
 +              /* Check for malformed hardware response */
 +              if (evbuf->length == 0)
 +                      break;
-+              /* Search for event handler */
+               /* Search for event handler */
+-              evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
                reg = NULL;
                list_for_each(l, &sclp_reg_list) {
                        reg = list_entry(l, struct sclp_register, list);
-diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_cmd.c
---- linux-2.6.27/drivers/s390/char/sclp_cmd.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_cmd.c   2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/char/sclp_cmd.c
+--- a/drivers/s390/char/sclp_cmd.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_cmd.c     Wed May 06 16:56:31 2009 +0100
+@@ -5,6 +5,8 @@
+  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
   *             Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
   */
-+#define KMSG_COMPONENT "sclp_cmd"
 +
++#define KMSG_COMPONENT "sclp_cmd"
  #include <linux/completion.h>
  #include <linux/init.h>
- #include <linux/errno.h>
 @@ -16,9 +18,9 @@
  #include <linux/memory.h>
  #include <asm/chpid.h>
  #include <asm/sclp.h>
--#include "sclp.h"
 +#include <asm/setup.h>
++
+ #include "sclp.h"
+-
 -#define TAG   "sclp_cmd: "
-+#include "sclp.h"
  
  #define SCLP_CMDW_READ_SCP_INFO               0x00020001
  #define SCLP_CMDW_READ_SCP_INFO_FORCED        0x00120001
-@@ -169,8 +171,8 @@ static int do_sync_request(sclp_cmdw_t c
+@@ -169,8 +171,8 @@
  
        /* Check response. */
        if (request->status != SCLP_REQ_DONE) {
@@ -272736,7 +272675,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
                rc = -EIO;
        }
  out:
-@@ -224,8 +226,8 @@ int sclp_get_cpu_info(struct sclp_cpu_in
+@@ -224,8 +226,8 @@
        if (rc)
                goto out;
        if (sccb->header.response_code != 0x0010) {
@@ -272747,7 +272686,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
                rc = -EIO;
                goto out;
        }
-@@ -262,8 +264,9 @@ static int do_cpu_configure(sclp_cmdw_t 
+@@ -262,8 +264,9 @@
        case 0x0120:
                break;
        default:
@@ -272759,7 +272698,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
                rc = -EIO;
                break;
        }
-@@ -468,6 +471,10 @@ static void __init add_memory_merged(u16
+@@ -468,6 +471,10 @@
                goto skip_add;
        if (start + size > VMEM_MAX_PHYS)
                size = VMEM_MAX_PHYS - start;
@@ -272770,7 +272709,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
        add_memory(0, start, size);
  skip_add:
        first_rn = rn;
-@@ -623,9 +630,9 @@ static int do_chp_configure(sclp_cmdw_t 
+@@ -623,9 +630,9 @@
        case 0x0450:
                break;
        default:
@@ -272783,7 +272722,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
                rc = -EIO;
                break;
        }
-@@ -692,8 +699,8 @@ int sclp_chp_read_info(struct sclp_chp_i
+@@ -692,8 +699,8 @@
        if (rc)
                goto out;
        if (sccb->header.response_code != 0x0010) {
@@ -272794,9 +272733,9 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cmd.c linux-2.6.27.19-5.1/drivers
                rc = -EIO;
                goto out;
        }
-diff -purN linux-2.6.27/drivers/s390/char/sclp_config.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_config.c
---- linux-2.6.27/drivers/s390/char/sclp_config.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_config.c        2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/sclp_config.c
+--- a/drivers/s390/char/sclp_config.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_config.c  Wed May 06 16:56:31 2009 +0100
 @@ -5,15 +5,16 @@
   *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
   */
@@ -272809,14 +272748,14 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_config.c linux-2.6.27.19-5.1/driv
  #include <linux/sysdev.h>
  #include <linux/workqueue.h>
  #include <asm/smp.h>
--#include "sclp.h"
++
+ #include "sclp.h"
+-
 -#define TAG   "sclp_config: "
-+#include "sclp.h"
  
  struct conf_mgm_data {
        u8 reserved;
-@@ -31,7 +32,7 @@ static void sclp_cpu_capability_notify(s
+@@ -31,7 +32,7 @@
        int cpu;
        struct sys_device *sysdev;
  
@@ -272825,7 +272764,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_config.c linux-2.6.27.19-5.1/driv
        get_online_cpus();
        for_each_online_cpu(cpu) {
                sysdev = get_cpu_sysdev(cpu);
-@@ -78,7 +79,7 @@ static int __init sclp_conf_init(void)
+@@ -78,7 +79,7 @@
                return rc;
  
        if (!(sclp_conf_register.sclp_send_mask & EVTYP_CONFMGMDATA_MASK)) {
@@ -272834,18 +272773,18 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_config.c linux-2.6.27.19-5.1/driv
                sclp_unregister(&sclp_conf_register);
                rc = -ENOSYS;
        }
-diff -purN linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_cpi_sys.c
---- linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_cpi_sys.c       2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/char/sclp_cpi_sys.c
+--- a/drivers/s390/char/sclp_cpi_sys.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_cpi_sys.c Wed May 06 16:56:31 2009 +0100
+@@ -6,6 +6,8 @@
+  *    Author(s): Martin Peschke <mpeschke@de.ibm.com>
   *             Michael Ernst <mernst@de.ibm.com>
   */
-+#define KMSG_COMPONENT "sclp_cpi"
 +
++#define KMSG_COMPONENT "sclp_cpi"
  #include <linux/kernel.h>
  #include <linux/init.h>
- #include <linux/stat.h>
 @@ -20,6 +22,7 @@
  #include <linux/completion.h>
  #include <asm/ebcdic.h>
@@ -272854,7 +272793,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c linux-2.6.27.19-5.1/dri
  #include "sclp.h"
  #include "sclp_rw.h"
  #include "sclp_cpi_sys.h"
-@@ -150,16 +153,16 @@ static int cpi_req(void)
+@@ -150,16 +153,16 @@
        wait_for_completion(&completion);
  
        if (req->status != SCLP_REQ_DONE) {
@@ -272875,9 +272814,9 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_cpi_sys.c linux-2.6.27.19-5.1/dri
                rc = -EIO;
        }
  
-diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drivers/s390/char/sclp_sdias.c
---- linux-2.6.27/drivers/s390/char/sclp_sdias.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/sclp_sdias.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/sclp_sdias.c
+--- a/drivers/s390/char/sclp_sdias.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/sclp_sdias.c   Wed May 06 16:56:31 2009 +0100
 @@ -5,15 +5,17 @@
   * Author(s): Michael Holzheu
   */
@@ -272897,7 +272836,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drive
  
  #define SDIAS_RETRIES 300
  #define SDIAS_SLEEP_TICKS 50
-@@ -131,7 +133,7 @@ int sclp_sdias_blk_count(void)
+@@ -131,7 +133,7 @@
  
        rc = sdias_sclp_send(&request);
        if (rc) {
@@ -272906,7 +272845,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drive
                goto out;
        }
        if (sccb.hdr.response_code != 0x0020) {
-@@ -145,7 +147,8 @@ int sclp_sdias_blk_count(void)
+@@ -145,7 +147,8 @@
                        rc = sccb.evbuf.blk_cnt;
                        break;
                default:
@@ -272916,7 +272855,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drive
                        rc = -EIO;
                        goto out;
        }
-@@ -201,7 +204,7 @@ int sclp_sdias_copy(void *dest, int star
+@@ -201,7 +204,7 @@
  
        rc = sdias_sclp_send(&request);
        if (rc) {
@@ -272925,7 +272864,7 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drive
                goto out;
        }
        if (sccb.hdr.response_code != 0x0020) {
-@@ -219,9 +222,9 @@ int sclp_sdias_copy(void *dest, int star
+@@ -219,9 +222,9 @@
                case EVSTATE_NO_DATA:
                        TRACE("no data\n");
                default:
@@ -272938,10 +272877,10 @@ diff -purN linux-2.6.27/drivers/s390/char/sclp_sdias.c linux-2.6.27.19-5.1/drive
                        rc = -EIO;
        }
  out:
-diff -purN linux-2.6.27/drivers/s390/char/tape_block.c linux-2.6.27.19-5.1/drivers/s390/char/tape_block.c
---- linux-2.6.27/drivers/s390/char/tape_block.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/tape_block.c 2009-03-25 16:11:24.000000000 +0000
-@@ -76,7 +76,7 @@ tapeblock_trigger_requeue(struct tape_de
+diff -r 9608d5473017 drivers/s390/char/tape_block.c
+--- a/drivers/s390/char/tape_block.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/tape_block.c   Wed May 06 16:56:31 2009 +0100
+@@ -76,7 +76,7 @@
  static void
  tapeblock_end_request(struct request *req, int error)
  {
@@ -272950,7 +272889,7 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_block.c linux-2.6.27.19-5.1/drive
                BUG();
  }
  
-@@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *wo
+@@ -166,7 +166,7 @@
                nr_queued++;
        spin_unlock(get_ccwdev_lock(device->cdev));
  
@@ -272959,7 +272898,7 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_block.c linux-2.6.27.19-5.1/drive
        while (
                !blk_queue_plugged(queue) &&
                elv_next_request(queue)   &&
-@@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *wo
+@@ -176,7 +176,9 @@
                if (rq_data_dir(req) == WRITE) {
                        DBF_EVENT(1, "TBLOCK: Rejecting write request\n");
                        blkdev_dequeue_request(req);
@@ -272969,10 +272908,10 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_block.c linux-2.6.27.19-5.1/drive
                        continue;
                }
                blkdev_dequeue_request(req);
-diff -purN linux-2.6.27/drivers/s390/char/tape_core.c linux-2.6.27.19-5.1/drivers/s390/char/tape_core.c
---- linux-2.6.27/drivers/s390/char/tape_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/tape_core.c  2009-03-25 16:11:24.000000000 +0000
-@@ -1199,7 +1199,7 @@ tape_open(struct tape_device *device)
+diff -r 9608d5473017 drivers/s390/char/tape_core.c
+--- a/drivers/s390/char/tape_core.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/tape_core.c    Wed May 06 16:56:31 2009 +0100
+@@ -1199,7 +1199,7 @@
  {
        int rc;
  
@@ -272981,7 +272920,7 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_core.c linux-2.6.27.19-5.1/driver
        if (device->tape_state == TS_NOT_OPER) {
                DBF_EVENT(6, "TAPE:nodev\n");
                rc = -ENODEV;
-@@ -1217,7 +1217,7 @@ tape_open(struct tape_device *device)
+@@ -1217,7 +1217,7 @@
                tape_state_set(device, TS_IN_USE);
                rc = 0;
        }
@@ -272990,7 +272929,7 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_core.c linux-2.6.27.19-5.1/driver
        return rc;
  }
  
-@@ -1227,11 +1227,11 @@ tape_open(struct tape_device *device)
+@@ -1227,11 +1227,11 @@
  int
  tape_release(struct tape_device *device)
  {
@@ -273004,28 +272943,28 @@ diff -purN linux-2.6.27/drivers/s390/char/tape_core.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/s390/char/vmcp.c linux-2.6.27.19-5.1/drivers/s390/char/vmcp.c
---- linux-2.6.27/drivers/s390/char/vmcp.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmcp.c       2009-03-25 16:11:24.000000000 +0000
-@@ -11,6 +11,8 @@
+diff -r 9608d5473017 drivers/s390/char/vmcp.c
+--- a/drivers/s390/char/vmcp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmcp.c Wed May 06 16:56:31 2009 +0100
+@@ -10,6 +10,8 @@
   * The idea of this driver is based on cpint from Neale Ferguson and #CP in CMS
   */
-+#define KMSG_COMPONENT "vmcp"
 +
++#define KMSG_COMPONENT "vmcp"
  #include <linux/fs.h>
  #include <linux/init.h>
- #include <linux/kernel.h>
-@@ -26,8 +28,6 @@ MODULE_LICENSE("GPL");
+@@ -25,8 +27,6 @@
+ MODULE_LICENSE("GPL");
  MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>");
  MODULE_DESCRIPTION("z/VM CP interface");
--#define PRINTK_HEADER "vmcp: "
 -
+-#define PRINTK_HEADER "vmcp: "
  static debug_info_t *vmcp_debug;
  
- static int vmcp_open(struct inode *inode, struct file *file)
-@@ -193,7 +193,8 @@ static int __init vmcp_init(void)
+@@ -193,7 +193,8 @@
        int ret;
  
        if (!MACHINE_IS_VM) {
@@ -273035,9 +272974,9 @@ diff -purN linux-2.6.27/drivers/s390/char/vmcp.c linux-2.6.27.19-5.1/drivers/s39
                return -ENODEV;
        }
  
-diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers/s390/char/vmlogrdr.c
---- linux-2.6.27/drivers/s390/char/vmlogrdr.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmlogrdr.c   2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/char/vmlogrdr.c
+--- a/drivers/s390/char/vmlogrdr.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmlogrdr.c     Wed May 06 16:56:31 2009 +0100
 @@ -10,6 +10,9 @@
   *               Stefan Weinhuber <wein@de.ibm.com>
   *
@@ -273048,16 +272987,16 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/errno.h>
-@@ -28,8 +31,6 @@
+@@ -27,8 +30,6 @@
+ #include <linux/device.h>
  #include <linux/smp_lock.h>
  #include <linux/string.h>
 -
 -
  MODULE_AUTHOR
        ("(C) 2004 IBM Corporation by Xenia Tkatschow (xenia@us.ibm.com)\n"
-        "                            Stefan Weinhuber (wein@de.ibm.com)");
-@@ -174,8 +175,7 @@ static void vmlogrdr_iucv_path_severed(s
+@@ -174,8 +175,7 @@
        struct vmlogrdr_priv_t * logptr = path->private;
        u8 reason = (u8) ipuser[8];
  
@@ -273067,7 +273006,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
  
        iucv_path_sever(path, NULL);
        kfree(path);
-@@ -333,8 +333,8 @@ static int vmlogrdr_open (struct inode *
+@@ -333,8 +333,8 @@
        if (logptr->autorecording) {
                ret = vmlogrdr_recording(logptr,1,logptr->autopurge);
                if (ret)
@@ -273078,7 +273017,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
        }
  
        /* create connection to the system service */
-@@ -345,9 +345,9 @@ static int vmlogrdr_open (struct inode *
+@@ -345,9 +345,9 @@
                                       logptr->system_service, NULL, NULL,
                                       logptr);
        if (connect_rc) {
@@ -273091,7 +273030,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
                goto out_path;
        }
  
-@@ -388,8 +388,8 @@ static int vmlogrdr_release (struct inod
+@@ -388,8 +388,8 @@
        if (logptr->autorecording) {
                ret = vmlogrdr_recording(logptr,0,logptr->autopurge);
                if (ret)
@@ -273102,7 +273041,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
        }
        logptr->dev_in_use = 0;
  
-@@ -824,8 +824,7 @@ static int __init vmlogrdr_init(void)
+@@ -824,8 +824,7 @@
        dev_t dev;
  
        if (! MACHINE_IS_VM) {
@@ -273112,28 +273051,28 @@ diff -purN linux-2.6.27/drivers/s390/char/vmlogrdr.c linux-2.6.27.19-5.1/drivers
                return -ENODEV;
        }
  
-diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s390/char/vmur.c
---- linux-2.6.27/drivers/s390/char/vmur.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/vmur.c       2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/char/vmur.c
+--- a/drivers/s390/char/vmur.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/vmur.c Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+  *        Michael Holzheu <holzheu@de.ibm.com>
   *        Frank Munzert <munzert@de.ibm.com>
   */
-+#define KMSG_COMPONENT "vmur"
 +
++#define KMSG_COMPONENT "vmur"
  #include <linux/cdev.h>
  #include <linux/smp_lock.h>
-@@ -40,8 +42,6 @@ MODULE_AUTHOR("IBM Corporation");
+@@ -39,8 +41,6 @@
+ MODULE_AUTHOR("IBM Corporation");
  MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver");
  MODULE_LICENSE("GPL");
--#define PRINTK_HEADER "vmur: "
 -
+-#define PRINTK_HEADER "vmur: "
  static dev_t ur_first_dev_maj_min;
  static struct class *vmur_class;
- static struct debug_info *vmur_dbf;
-@@ -988,7 +988,8 @@ static int __init ur_init(void)
+@@ -988,7 +988,8 @@
        dev_t dev;
  
        if (!MACHINE_IS_VM) {
@@ -273143,7 +273082,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s39
                return -ENODEV;
        }
  
-@@ -1007,7 +1008,8 @@ static int __init ur_init(void)
+@@ -1007,7 +1008,8 @@
  
        rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur");
        if (rc) {
@@ -273153,7 +273092,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s39
                goto fail_unregister_driver;
        }
        ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0);
-@@ -1017,7 +1019,7 @@ static int __init ur_init(void)
+@@ -1017,7 +1019,7 @@
                rc = PTR_ERR(vmur_class);
                goto fail_unregister_region;
        }
@@ -273162,7 +273101,7 @@ diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s39
        return 0;
  
  fail_unregister_region:
-@@ -1035,7 +1037,7 @@ static void __exit ur_exit(void)
+@@ -1035,7 +1037,7 @@
        unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS);
        ccw_driver_unregister(&ur_driver);
        debug_unregister(vmur_dbf);
@@ -273171,18 +273110,18 @@ diff -purN linux-2.6.27/drivers/s390/char/vmur.c linux-2.6.27.19-5.1/drivers/s39
  }
  
  module_init(ur_init);
-diff -purN linux-2.6.27/drivers/s390/char/zcore.c linux-2.6.27.19-5.1/drivers/s390/char/zcore.c
---- linux-2.6.27/drivers/s390/char/zcore.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/char/zcore.c      2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/char/zcore.c
+--- a/drivers/s390/char/zcore.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/char/zcore.c        Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+  * Copyright IBM Corp. 2003,2007
   * Author(s): Michael Holzheu
   */
-+#define KMSG_COMPONENT "zdump"
 +
++#define KMSG_COMPONENT "zdump"
  #include <linux/init.h>
  #include <linux/miscdevice.h>
- #include <linux/utsname.h>
 @@ -24,8 +26,6 @@
  #include "sclp.h"
  
@@ -273192,7 +273131,7 @@ diff -purN linux-2.6.27/drivers/s390/char/zcore.c linux-2.6.27.19-5.1/drivers/s3
  
  #define TO_USER               0
  #define TO_KERNEL     1
-@@ -563,19 +563,19 @@ static int __init sys_info_init(enum arc
+@@ -563,19 +563,19 @@
  
        switch (arch) {
        case ARCH_S390X:
@@ -273215,7 +273154,7 @@ diff -purN linux-2.6.27/drivers/s390/char/zcore.c linux-2.6.27.19-5.1/drivers/s3
                return -EINVAL;
        }
        sys_info.arch = arch;
-@@ -674,7 +674,8 @@ static int __init zcore_init(void)
+@@ -674,7 +674,8 @@
  
  #ifndef __s390x__
        if (arch == ARCH_S390X) {
@@ -273225,19 +273164,19 @@ diff -purN linux-2.6.27/drivers/s390/char/zcore.c linux-2.6.27.19-5.1/drivers/s3
                rc = -EINVAL;
                goto fail;
        }
-diff -purN linux-2.6.27/drivers/s390/cio/blacklist.c linux-2.6.27.19-5.1/drivers/s390/cio/blacklist.c
---- linux-2.6.27/drivers/s390/cio/blacklist.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/blacklist.c   2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/cio/blacklist.c
+--- a/drivers/s390/cio/blacklist.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/blacklist.c     Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+  *             Cornelia Huck (cornelia.huck@de.ibm.com)
   *             Arnd Bergmann (arndb@de.ibm.com)
   */
-+#define KMSG_COMPONENT "cio"
 +
++#define KMSG_COMPONENT "cio"
  #include <linux/init.h>
  #include <linux/vmalloc.h>
- #include <linux/slab.h>
-@@ -49,9 +51,10 @@ static int blacklist_range(range_action 
+@@ -49,9 +51,10 @@
  {
        if ((from_ssid > to_ssid) || ((from_ssid == to_ssid) && (from > to))) {
                if (msgtrigger)
@@ -273251,7 +273190,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/blacklist.c linux-2.6.27.19-5.1/drivers
                return 1;
        }
  
-@@ -139,8 +142,8 @@ static int parse_busid(char *str, unsign
+@@ -139,8 +142,8 @@
        rc = 0;
  out:
        if (rc && msgtrigger)
@@ -273262,10 +273201,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/blacklist.c linux-2.6.27.19-5.1/drivers
  
        return rc;
  }
-diff -purN linux-2.6.27/drivers/s390/cio/ccwgroup.c linux-2.6.27.19-5.1/drivers/s390/cio/ccwgroup.c
---- linux-2.6.27/drivers/s390/cio/ccwgroup.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/ccwgroup.c    2009-03-25 16:11:24.000000000 +0000
-@@ -89,15 +89,23 @@ ccwgroup_ungroup_store(struct device *de
+diff -r 9608d5473017 drivers/s390/cio/ccwgroup.c
+--- a/drivers/s390/cio/ccwgroup.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/ccwgroup.c      Wed May 06 16:56:31 2009 +0100
+@@ -89,15 +89,23 @@
  
        gdev = to_ccwgroupdev(dev);
  
@@ -273294,19 +273233,19 @@ diff -purN linux-2.6.27/drivers/s390/cio/ccwgroup.c linux-2.6.27.19-5.1/drivers/
        return count;
  }
  
-diff -purN linux-2.6.27/drivers/s390/cio/chsc.c linux-2.6.27.19-5.1/drivers/s390/cio/chsc.c
---- linux-2.6.27/drivers/s390/cio/chsc.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/chsc.c        2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/cio/chsc.c
+--- a/drivers/s390/cio/chsc.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/chsc.c  Wed May 06 16:56:31 2009 +0100
+@@ -7,6 +7,8 @@
+  *             Cornelia Huck (cornelia.huck@de.ibm.com)
   *             Arnd Bergmann (arndb@de.ibm.com)
   */
-+#define KMSG_COMPONENT "cio"
 +
++#define KMSG_COMPONENT "cio"
  #include <linux/module.h>
  #include <linux/slab.h>
- #include <linux/init.h>
-@@ -333,6 +335,7 @@ static void chsc_process_sei_chp_config(
+@@ -333,6 +335,7 @@
        struct chp_config_data *data;
        struct chp_id chpid;
        int num;
@@ -273314,7 +273253,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/chsc.c linux-2.6.27.19-5.1/drivers/s390
  
        CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
        if (sei_area->rs != 0)
-@@ -343,8 +346,8 @@ static void chsc_process_sei_chp_config(
+@@ -343,8 +346,8 @@
                if (!chp_test_bit(data->map, num))
                        continue;
                chpid.id = num;
@@ -273325,19 +273264,19 @@ diff -purN linux-2.6.27/drivers/s390/cio/chsc.c linux-2.6.27.19-5.1/drivers/s390
                switch (data->op) {
                case 0:
                        chp_cfg_schedule(chpid, 1);
-diff -purN linux-2.6.27/drivers/s390/cio/cio.c linux-2.6.27.19-5.1/drivers/s390/cio/cio.c
---- linux-2.6.27/drivers/s390/cio/cio.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cio.c 2009-03-25 16:11:24.000000000 +0000
-@@ -9,6 +9,8 @@
+diff -r 9608d5473017 drivers/s390/cio/cio.c
+--- a/drivers/s390/cio/cio.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cio.c   Wed May 06 16:56:31 2009 +0100
+@@ -8,6 +8,8 @@
+  *             Arnd Bergmann (arndb@de.ibm.com)
   *             Martin Schwidefsky (schwidefsky@de.ibm.com)
   */
-+#define KMSG_COMPONENT "cio"
 +
++#define KMSG_COMPONENT "cio"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/slab.h>
-@@ -462,25 +464,16 @@ int cio_disable_subchannel(struct subcha
+@@ -462,25 +464,16 @@
        if (ccode == 3)         /* Not operational. */
                return -ENODEV;
  
@@ -273368,7 +273307,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/cio.c linux-2.6.27.19-5.1/drivers/s390/
                if (ret == 0) {
                        stsch (sch->schid, &sch->schib);
                        if (!sch->schib.pmcw.ena)
-@@ -773,7 +766,7 @@ cio_probe_console(void)
+@@ -773,7 +766,7 @@
        sch_no = cio_get_console_sch_no();
        if (sch_no == -1) {
                console_subchannel_in_use = 0;
@@ -273377,10 +273316,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/cio.c linux-2.6.27.19-5.1/drivers/s390/
                return ERR_PTR(-ENODEV);
        }
        memset(&console_subchannel, 0, sizeof(struct subchannel));
-diff -purN linux-2.6.27/drivers/s390/cio/cio.h linux-2.6.27.19-5.1/drivers/s390/cio/cio.h
---- linux-2.6.27/drivers/s390/cio/cio.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cio.h 2009-03-25 16:11:24.000000000 +0000
-@@ -82,6 +82,7 @@ struct subchannel {
+diff -r 9608d5473017 drivers/s390/cio/cio.h
+--- a/drivers/s390/cio/cio.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cio.h   Wed May 06 16:56:31 2009 +0100
+@@ -82,6 +82,7 @@
        struct device dev;      /* entry in device tree */
        struct css_driver *driver;
        void *private; /* private per subchannel type data */
@@ -273388,19 +273327,19 @@ diff -purN linux-2.6.27/drivers/s390/cio/cio.h linux-2.6.27.19-5.1/drivers/s390/
  } __attribute__ ((aligned(8)));
  
  #define IO_INTERRUPT_TYPE        0 /* I/O interrupt type */
-diff -purN linux-2.6.27/drivers/s390/cio/cmf.c linux-2.6.27.19-5.1/drivers/s390/cio/cmf.c
---- linux-2.6.27/drivers/s390/cio/cmf.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/cmf.c 2009-03-25 16:11:24.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 drivers/s390/cio/cmf.c
+--- a/drivers/s390/cio/cmf.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/cmf.c   Wed May 06 16:56:31 2009 +0100
+@@ -24,6 +24,8 @@
+  * along with this program; if not, write to the Free Software
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
-+#define KMSG_COMPONENT "cio"
 +
++#define KMSG_COMPONENT "cio"
  #include <linux/bootmem.h>
  #include <linux/device.h>
- #include <linux/init.h>
-@@ -1359,9 +1361,8 @@ static int __init init_cmf(void)
+@@ -1359,9 +1361,8 @@
        default:
                return 1;
        }
@@ -273412,9 +273351,9 @@ diff -purN linux-2.6.27/drivers/s390/cio/cmf.c linux-2.6.27.19-5.1/drivers/s390/
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/s390/cio/css.c linux-2.6.27.19-5.1/drivers/s390/cio/css.c
---- linux-2.6.27/drivers/s390/cio/css.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/css.c 2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/css.c
+--- a/drivers/s390/cio/css.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/css.c   Wed May 06 16:56:31 2009 +0100
 @@ -6,6 +6,9 @@
   *    Author(s): Arnd Bergmann (arndb@de.ibm.com)
   *             Cornelia Huck (cornelia.huck@de.ibm.com)
@@ -273425,7 +273364,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/css.c linux-2.6.27.19-5.1/drivers/s390/
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/device.h>
-@@ -844,8 +847,8 @@ out:
+@@ -844,8 +847,8 @@
        s390_unregister_crw_handler(CRW_RSC_CSS);
        chsc_free_sei_area();
        kfree(slow_subchannel_set);
@@ -273436,10 +273375,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/css.c linux-2.6.27.19-5.1/drivers/s390/
        return ret;
  }
  
-diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s390/cio/device.c
---- linux-2.6.27/drivers/s390/cio/device.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/device.c      2009-03-25 16:11:24.000000000 +0000
-@@ -716,6 +716,8 @@ ccw_device_release(struct device *dev)
+diff -r 9608d5473017 drivers/s390/cio/device.c
+--- a/drivers/s390/cio/device.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/device.c        Wed May 06 16:56:31 2009 +0100
+@@ -716,6 +716,8 @@
        struct ccw_device *cdev;
  
        cdev = to_ccwdev(dev);
@@ -273448,7 +273387,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        kfree(cdev->private);
        kfree(cdev);
  }
-@@ -790,37 +792,55 @@ static void sch_attach_disconnected_devi
+@@ -790,37 +792,55 @@
        struct subchannel *other_sch;
        int ret;
  
@@ -273471,10 +273410,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        sch_set_cdev(other_sch, NULL);
        /* No need to keep a subchannel without ccw device around. */
        css_sch_device_unregister(other_sch);
--      put_device(&other_sch->dev);
-       sch_attach_device(sch, cdev);
++      sch_attach_device(sch, cdev);
 +      /* Put reference for old parent. */
-+      put_device(&other_sch->dev);
+       put_device(&other_sch->dev);
+-      sch_attach_device(sch, cdev);
  }
  
  static void sch_attach_orphaned_device(struct subchannel *sch,
@@ -273508,7 +273447,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
  }
  
  static void sch_create_and_recog_new_device(struct subchannel *sch)
-@@ -842,9 +862,11 @@ static void sch_create_and_recog_new_dev
+@@ -842,9 +862,11 @@
                spin_lock_irq(sch->lock);
                sch_set_cdev(sch, NULL);
                spin_unlock_irq(sch->lock);
@@ -273522,7 +273461,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        }
  }
  
-@@ -866,15 +888,20 @@ void ccw_device_move_to_orphanage(struct
+@@ -866,15 +888,20 @@
        dev_id.devno = sch->schib.pmcw.dev;
        dev_id.ssid = sch->schid.ssid;
  
@@ -273543,7 +273482,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
                return;
        }
        cdev->ccwlock = css->pseudo_subchannel->lock;
-@@ -886,14 +913,20 @@ void ccw_device_move_to_orphanage(struct
+@@ -886,14 +913,20 @@
        replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev);
        if (replacing_cdev) {
                sch_attach_disconnected_device(sch, replacing_cdev);
@@ -273564,7 +273503,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
  }
  
  /*
-@@ -911,6 +944,14 @@ io_subchannel_register(struct work_struc
+@@ -911,6 +944,14 @@
        priv = container_of(work, struct ccw_device_private, kick_work);
        cdev = priv->cdev;
        sch = to_subchannel(cdev->dev.parent);
@@ -273579,7 +273518,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        css_update_ssd_info(sch);
        /*
         * io_subchannel_register() will also be called after device
-@@ -942,22 +983,19 @@ io_subchannel_register(struct work_struc
+@@ -942,22 +983,19 @@
                CIO_MSG_EVENT(0, "Could not register ccw dev 0.%x.%04x: %d\n",
                              cdev->private->dev_id.ssid,
                              cdev->private->dev_id.devno, ret);
@@ -273608,7 +273547,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        if (atomic_dec_and_test(&ccw_device_init_count))
                wake_up(&ccw_device_init_wq);
  }
-@@ -1068,10 +1106,15 @@ static void ccw_device_move_to_sch(struc
+@@ -1068,10 +1106,15 @@
        priv = container_of(work, struct ccw_device_private, kick_work);
        sch = priv->sch;
        cdev = priv->cdev;
@@ -273627,7 +273566,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        rc = device_move(&cdev->dev, &sch->dev);
        mutex_unlock(&sch->reg_mutex);
        if (rc) {
-@@ -1081,9 +1124,11 @@ static void ccw_device_move_to_sch(struc
+@@ -1081,9 +1124,11 @@
                              cdev->private->dev_id.devno, sch->schid.ssid,
                              sch->schid.sch_no, rc);
                css_sch_device_unregister(sch);
@@ -273640,7 +273579,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
                spin_lock_irq(former_parent->lock);
                sch_set_cdev(former_parent, NULL);
                spin_unlock_irq(former_parent->lock);
-@@ -1094,8 +1139,8 @@ static void ccw_device_move_to_sch(struc
+@@ -1094,8 +1139,8 @@
        }
        sch_attach_device(sch, cdev);
  out:
@@ -273651,7 +273590,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        put_device(&cdev->dev);
  }
  
-@@ -1137,6 +1182,30 @@ static void io_subchannel_init_fields(st
+@@ -1137,6 +1182,30 @@
        sch->schib.mba = 0;
  }
  
@@ -273682,7 +273621,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
  static int io_subchannel_probe(struct subchannel *sch)
  {
        struct ccw_device *cdev;
-@@ -1177,6 +1246,9 @@ static int io_subchannel_probe(struct su
+@@ -1177,6 +1246,9 @@
                return 0;
        }
        io_subchannel_init_fields(sch);
@@ -273692,7 +273631,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        /*
         * First check if a fitting device may be found amongst the
         * disconnected devices or in the orphanage.
-@@ -1186,14 +1258,12 @@ static int io_subchannel_probe(struct su
+@@ -1186,14 +1258,12 @@
        rc = sysfs_create_group(&sch->dev.kobj,
                                &io_subchannel_attr_group);
        if (rc)
@@ -273709,7 +273648,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        cdev = get_disc_ccwdev_by_dev_id(&dev_id, NULL);
        if (!cdev)
                cdev = get_orphaned_ccwdev_by_dev_id(to_css(sch->dev.parent),
-@@ -1211,24 +1281,23 @@ static int io_subchannel_probe(struct su
+@@ -1211,24 +1281,23 @@
                return 0;
        }
        cdev = io_subchannel_create_ccwdev(sch);
@@ -273739,7 +273678,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
  }
  
  static int
-@@ -1610,6 +1679,9 @@ static int ccw_device_console_enable(str
+@@ -1610,6 +1679,9 @@
        sch->private = cio_get_console_priv();
        memset(sch->private, 0, sizeof(struct io_subchannel_private));
        io_subchannel_init_fields(sch);
@@ -273749,10 +273688,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/device.c linux-2.6.27.19-5.1/drivers/s3
        sch->driver = &io_subchannel_driver;
        /* Initialize the ccw_device structure. */
        cdev->dev.parent= &sch->dev;
-diff -purN linux-2.6.27/drivers/s390/cio/device_fsm.c linux-2.6.27.19-5.1/drivers/s390/cio/device_fsm.c
---- linux-2.6.27/drivers/s390/cio/device_fsm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/device_fsm.c  2009-03-25 16:11:24.000000000 +0000
-@@ -726,7 +726,7 @@ static void ccw_device_generic_notoper(s
+diff -r 9608d5473017 drivers/s390/cio/device_fsm.c
+--- a/drivers/s390/cio/device_fsm.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/device_fsm.c    Wed May 06 16:56:31 2009 +0100
+@@ -726,7 +726,7 @@
  {
        struct subchannel *sch;
  
@@ -273761,7 +273700,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device_fsm.c linux-2.6.27.19-5.1/driver
        sch = to_subchannel(cdev->dev.parent);
        css_schedule_eval(sch->schid);
  }
-@@ -1028,6 +1028,8 @@ void ccw_device_trigger_reprobe(struct c
+@@ -1028,6 +1028,8 @@
        sch->schib.pmcw.ena = 0;
        if ((sch->lpm & (sch->lpm - 1)) != 0)
                sch->schib.pmcw.mp = 1;
@@ -273770,7 +273709,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/device_fsm.c linux-2.6.27.19-5.1/driver
        /* We should also udate ssd info, but this has to wait. */
        /* Check if this is another device which appeared on the same sch. */
        if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) {
-@@ -1046,7 +1048,7 @@ ccw_device_offline_irq(struct ccw_device
+@@ -1046,7 +1048,7 @@
        sch = to_subchannel(cdev->dev.parent);
        /*
         * An interrupt in state offline means a previous disable was not
@@ -273779,10 +273718,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/device_fsm.c linux-2.6.27.19-5.1/driver
         */
        cio_disable_subchannel(sch);
  }
-diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio.h
---- linux-2.6.27/drivers/s390/cio/qdio.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio.h        2009-03-25 16:11:24.000000000 +0000
-@@ -10,12 +10,21 @@
+diff -r 9608d5473017 drivers/s390/cio/qdio.h
+--- a/drivers/s390/cio/qdio.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio.h  Wed May 06 16:56:31 2009 +0100
+@@ -10,11 +10,20 @@
  
  #include <asm/page.h>
  #include <asm/schid.h>
@@ -273792,7 +273731,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  #define QDIO_BUSY_BIT_PATIENCE                100     /* 100 microseconds */
  #define QDIO_BUSY_BIT_GIVE_UP         2000000 /* 2 seconds = eternity */
  #define QDIO_INPUT_THRESHOLD          500     /* 500 microseconds */
++
 +/*
 + * if an asynchronous HiperSockets queue runs full, the 10 seconds timer wait
 + * till next initiative to give transmitted skbs back to the stack is too long.
@@ -273800,11 +273739,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
 + * than 50 percent.
 + */
 +#define QDIO_IQDIO_POLL_LVL           65      /* HS multicast queue */
-+
  enum qdio_irq_states {
        QDIO_IRQ_STATE_INACTIVE,
-       QDIO_IRQ_STATE_ESTABLISHED,
-@@ -103,12 +112,12 @@ static inline int do_sqbs(u64 token, uns
+@@ -103,12 +112,12 @@
  }
  
  static inline int do_eqbs(u64 token, unsigned char *state, int queue,
@@ -273819,7 +273757,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  
        asm volatile(
                "       .insn   rrf,0xB99c0000,%1,%2,0,0"
-@@ -125,7 +134,7 @@ static inline int do_eqbs(u64 token, uns
+@@ -125,7 +134,7 @@
  static inline int do_sqbs(u64 token, unsigned char state, int queue,
                          int *start, int *count) { return 0; }
  static inline int do_eqbs(u64 token, unsigned char *state, int queue,
@@ -273828,7 +273766,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  #endif /* CONFIG_64BIT */
  
  struct qdio_irq;
-@@ -178,11 +187,11 @@ struct qdio_input_q {
+@@ -178,11 +187,11 @@
        /* input buffer acknowledgement flag */
        int polling;
  
@@ -273843,7 +273781,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  };
  
  struct qdio_output_q {
-@@ -289,11 +298,13 @@ struct qdio_irq {
+@@ -289,11 +298,13 @@
        struct qdio_q *input_qs[QDIO_MAX_QUEUES_PER_IRQ];
        struct qdio_q *output_qs[QDIO_MAX_QUEUES_PER_IRQ];
  
@@ -273857,7 +273795,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  
  #define is_thinint_irq(irq) \
        (irq->qib.qfmt == QDIO_IQDIO_QFMT || \
-@@ -337,10 +348,13 @@ static inline unsigned long long get_use
+@@ -337,10 +348,13 @@
        ((bufnr + 1) & QDIO_MAX_BUFFERS_MASK)
  #define add_buf(bufnr, inc) \
        ((bufnr + inc) & QDIO_MAX_BUFFERS_MASK)
@@ -273872,7 +273810,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  void qdio_check_outbound_after_thinint(struct qdio_q *q);
  int qdio_inbound_q_moved(struct qdio_q *q);
  void qdio_kick_inbound_handler(struct qdio_q *q);
-@@ -367,10 +381,15 @@ void qdio_int_handler(struct ccw_device 
+@@ -367,10 +381,15 @@
  int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs,
                     int nr_output_qs);
  void qdio_setup_ssqd_info(struct qdio_irq *irq_ptr);
@@ -273888,9 +273826,9 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio.h linux-2.6.27.19-5.1/drivers/s390
  int qdio_setup_init(void);
  void qdio_setup_exit(void);
  
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.c
---- linux-2.6.27/drivers/s390/cio/qdio_debug.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.c  2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/qdio_debug.c
+--- a/drivers/s390/cio/qdio_debug.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_debug.c    Wed May 06 16:56:31 2009 +0100
 @@ -14,66 +14,40 @@
  #include "qdio.h"
  
@@ -273929,7 +273867,22 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
 -      QDIO_DBF_HEX0(0, setup, &init_data->input_sbal_addr_array, sizeof(void *));
 -      QDIO_DBF_HEX0(0, setup, &init_data->output_sbal_addr_array, sizeof(void *));
 -}
--
++      DBF_EVENT("qfmt:%1d", init_data->q_format);
++      DBF_HEX(init_data->adapter_name, 8);
++      DBF_EVENT("qpff%4x", init_data->qib_param_field_format);
++      DBF_HEX(&init_data->qib_param_field, sizeof(void *));
++      DBF_HEX(&init_data->input_slib_elements, sizeof(void *));
++      DBF_HEX(&init_data->output_slib_elements, sizeof(void *));
++      DBF_EVENT("niq:%1d noq:%1d", init_data->no_input_qs,
++                init_data->no_output_qs);
++      DBF_HEX(&init_data->input_handler, sizeof(void *));
++      DBF_HEX(&init_data->output_handler, sizeof(void *));
++      DBF_HEX(&init_data->int_parm, sizeof(long));
++      DBF_HEX(&init_data->flags, sizeof(long));
++      DBF_HEX(&init_data->input_sbal_addr_array, sizeof(void *));
++      DBF_HEX(&init_data->output_sbal_addr_array, sizeof(void *));
++      DBF_EVENT("irq:%8lx", (unsigned long)irq_ptr);
 -static void qdio_unregister_dbf_views(void)
 -{
 -      if (qdio_dbf_setup)
@@ -273959,22 +273912,6 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
 -oom:
 -      qdio_unregister_dbf_views();
 -      return -ENOMEM;
-+      DBF_EVENT("qfmt:%1d", init_data->q_format);
-+      DBF_HEX(init_data->adapter_name, 8);
-+      DBF_EVENT("qpff%4x", init_data->qib_param_field_format);
-+      DBF_HEX(&init_data->qib_param_field, sizeof(void *));
-+      DBF_HEX(&init_data->input_slib_elements, sizeof(void *));
-+      DBF_HEX(&init_data->output_slib_elements, sizeof(void *));
-+      DBF_EVENT("niq:%1d noq:%1d", init_data->no_input_qs,
-+                init_data->no_output_qs);
-+      DBF_HEX(&init_data->input_handler, sizeof(void *));
-+      DBF_HEX(&init_data->output_handler, sizeof(void *));
-+      DBF_HEX(&init_data->int_parm, sizeof(long));
-+      DBF_HEX(&init_data->flags, sizeof(long));
-+      DBF_HEX(&init_data->input_sbal_addr_array, sizeof(void *));
-+      DBF_HEX(&init_data->output_sbal_addr_array, sizeof(void *));
-+      DBF_EVENT("irq:%8lx", (unsigned long)irq_ptr);
-+
 +      /* allocate trace view for the interface */
 +      snprintf(text, 20, "qdio_%s", dev_name(&init_data->cdev->dev));
 +      irq_ptr->debug_area = debug_register(text, 2, 1, 16);
@@ -273984,7 +273921,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
  }
  
  static int qstat_show(struct seq_file *m, void *v)
-@@ -85,16 +59,18 @@ static int qstat_show(struct seq_file *m
+@@ -85,16 +59,18 @@
        if (!q)
                return 0;
  
@@ -274005,7 +273942,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
                switch (state) {
                case SLSB_P_INPUT_NOT_INIT:
                case SLSB_P_OUTPUT_NOT_INIT:
-@@ -126,6 +102,7 @@ static int qstat_show(struct seq_file *m
+@@ -126,6 +102,7 @@
                        seq_printf(m, "\n");
        }
        seq_printf(m, "\n");
@@ -274013,7 +273950,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-@@ -230,11 +207,24 @@ void qdio_shutdown_debug_entries(struct 
+@@ -230,11 +207,24 @@
  int __init qdio_debug_init(void)
  {
        debugfs_root = debugfs_create_dir("qdio_queues", NULL);
@@ -274040,15 +273977,36 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.c linux-2.6.27.19-5.1/driver
 +      if (qdio_dbf_error)
 +              debug_unregister(qdio_dbf_error);
  }
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.h
---- linux-2.6.27/drivers/s390/cio/qdio_debug.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_debug.h  2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/cio/qdio_debug.h
+--- a/drivers/s390/cio/qdio_debug.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_debug.h    Wed May 06 16:56:31 2009 +0100
 @@ -12,80 +12,72 @@
  #include <asm/qdio.h>
  #include "qdio.h"
  
 -#define QDIO_DBF_HEX(ex, name, level, addr, len) \
--      do { \
++/* that gives us 15 characters in the text event views */
++#define QDIO_DBF_LEN  16
++
++extern debug_info_t *qdio_dbf_setup;
++extern debug_info_t *qdio_dbf_error;
++
++/* sort out low debug levels early to avoid wasted sprints */
++static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
++{
++      return (level <= dbf_grp->level);
++}
++
++#define DBF_ERR               3       /* error conditions     */
++#define DBF_WARN      4       /* warning conditions   */
++#define DBF_INFO      6       /* informational        */
++
++#undef DBF_EVENT
++#undef DBF_ERROR
++#undef DBF_DEV_EVENT
++
++#define DBF_EVENT(text...) \
+       do { \
 -      if (ex) \
 -              debug_exception(qdio_dbf_##name, level, (void *)(addr), len); \
 -      else \
@@ -274060,12 +274018,19 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/driver
 -              debug_text_exception(qdio_dbf_##name, level, text); \
 -      else \
 -              debug_text_event(qdio_dbf_##name, level, text); \
--      } while (0)
--
++              char debug_buffer[QDIO_DBF_LEN]; \
++              snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++              debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
+       } while (0)
 -#define QDIO_DBF_HEX0(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 0, addr, len)
 -#define QDIO_DBF_HEX1(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 1, addr, len)
 -#define QDIO_DBF_HEX2(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 2, addr, len)
--
++#define DBF_HEX(addr, len) \
++      do { \
++              debug_event(qdio_dbf_setup, DBF_ERR, (void*)(addr), len); \
++      } while (0)
 -#ifdef CONFIG_QDIO_DEBUG
 -#define QDIO_DBF_HEX3(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 3, addr, len)
 -#define QDIO_DBF_HEX4(ex, name, addr, len) QDIO_DBF_HEX(ex, name, 4, addr, len)
@@ -274077,11 +274042,21 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/driver
 -#define QDIO_DBF_HEX5(ex, name, addr, len) do {} while (0)
 -#define QDIO_DBF_HEX6(ex, name, addr, len) do {} while (0)
 -#endif /* CONFIG_QDIO_DEBUG */
--
++#define DBF_ERROR(text...) \
++      do { \
++              char debug_buffer[QDIO_DBF_LEN]; \
++              snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++              debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
++      } while (0)
 -#define QDIO_DBF_TEXT0(ex, name, text) QDIO_DBF_TEXT(ex, name, 0, text)
 -#define QDIO_DBF_TEXT1(ex, name, text) QDIO_DBF_TEXT(ex, name, 1, text)
 -#define QDIO_DBF_TEXT2(ex, name, text) QDIO_DBF_TEXT(ex, name, 2, text)
--
++#define DBF_ERROR_HEX(addr, len) \
++      do { \
++              debug_event(qdio_dbf_error, DBF_ERR, (void*)(addr), len); \
++      } while (0)
 -#ifdef CONFIG_QDIO_DEBUG
 -#define QDIO_DBF_TEXT3(ex, name, text) QDIO_DBF_TEXT(ex, name, 3, text)
 -#define QDIO_DBF_TEXT4(ex, name, text) QDIO_DBF_TEXT(ex, name, 4, text)
@@ -274093,15 +274068,27 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/driver
 -#define QDIO_DBF_TEXT5(ex, name, text) do {} while (0)
 -#define QDIO_DBF_TEXT6(ex, name, text) do {} while (0)
 -#endif /* CONFIG_QDIO_DEBUG */
--
 -/* s390dbf views */
 -#define QDIO_DBF_SETUP_LEN            8
 -#define QDIO_DBF_SETUP_PAGES          8
 -#define QDIO_DBF_SETUP_NR_AREAS               1
--
++#define DBF_DEV_EVENT(level, device, text...) \
++      do { \
++              char debug_buffer[QDIO_DBF_LEN]; \
++              if (qdio_dbf_passes(device->debug_area, level)) { \
++                      snprintf(debug_buffer, QDIO_DBF_LEN, text); \
++                      debug_text_event(device->debug_area, level, debug_buffer); \
++              } \
++      } while (0)
 -#define QDIO_DBF_TRACE_LEN            8
 -#define QDIO_DBF_TRACE_NR_AREAS               2
--
++#define DBF_DEV_HEX(level, device, addr, len) \
++      do { \
++              debug_event(device->debug_area, level, (void*)(addr), len); \
++      } while (0)
 -#ifdef CONFIG_QDIO_DEBUG
 -#define QDIO_DBF_TRACE_PAGES          32
 -#define QDIO_DBF_SETUP_LEVEL          6
@@ -274111,68 +274098,12 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/driver
 -#define QDIO_DBF_SETUP_LEVEL          2
 -#define QDIO_DBF_TRACE_LEVEL          2
 -#endif /* CONFIG_QDIO_DEBUG */
-+/* that gives us 15 characters in the text event views */
-+#define QDIO_DBF_LEN  16
- extern debug_info_t *qdio_dbf_setup;
+-
+-extern debug_info_t *qdio_dbf_setup;
 -extern debug_info_t *qdio_dbf_trace;
-+extern debug_info_t *qdio_dbf_error;
-+
-+/* sort out low debug levels early to avoid wasted sprints */
-+static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level)
-+{
-+      return (level <= dbf_grp->level);
-+}
-+
-+#define DBF_ERR               3       /* error conditions     */
-+#define DBF_WARN      4       /* warning conditions   */
-+#define DBF_INFO      6       /* informational        */
-+
-+#undef DBF_EVENT
-+#undef DBF_ERROR
-+#undef DBF_DEV_EVENT
-+
-+#define DBF_EVENT(text...) \
-+      do { \
-+              char debug_buffer[QDIO_DBF_LEN]; \
-+              snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+              debug_text_event(qdio_dbf_setup, DBF_ERR, debug_buffer); \
-+      } while (0)
-+
-+#define DBF_HEX(addr, len) \
-+      do { \
-+              debug_event(qdio_dbf_setup, DBF_ERR, (void*)(addr), len); \
-+      } while (0)
-+
-+#define DBF_ERROR(text...) \
-+      do { \
-+              char debug_buffer[QDIO_DBF_LEN]; \
-+              snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+              debug_text_event(qdio_dbf_error, DBF_ERR, debug_buffer); \
-+      } while (0)
+-
 -void qdio_allocate_do_dbf(struct qdio_initialize *init_data);
 -void debug_print_bstat(struct qdio_q *q);
-+#define DBF_ERROR_HEX(addr, len) \
-+      do { \
-+              debug_event(qdio_dbf_error, DBF_ERR, (void*)(addr), len); \
-+      } while (0)
-+
-+
-+#define DBF_DEV_EVENT(level, device, text...) \
-+      do { \
-+              char debug_buffer[QDIO_DBF_LEN]; \
-+              if (qdio_dbf_passes(device->debug_area, level)) { \
-+                      snprintf(debug_buffer, QDIO_DBF_LEN, text); \
-+                      debug_text_event(device->debug_area, level, debug_buffer); \
-+              } \
-+      } while (0)
-+
-+#define DBF_DEV_HEX(level, device, addr, len) \
-+      do { \
-+              debug_event(device->debug_area, level, (void*)(addr), len); \
-+      } while (0)
-+
 +void qdio_allocate_dbf(struct qdio_initialize *init_data,
 +                     struct qdio_irq *irq_ptr);
  void qdio_setup_debug_entries(struct qdio_irq *irq_ptr,
@@ -274183,10 +274114,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_debug.h linux-2.6.27.19-5.1/driver
  void qdio_debug_exit(void);
 +
  #endif
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_main.c
---- linux-2.6.27/drivers/s390/cio/qdio_main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_main.c   2009-03-25 16:11:24.000000000 +0000
-@@ -95,8 +95,6 @@ static inline int do_siga_output(unsigne
+diff -r 9608d5473017 drivers/s390/cio/qdio_main.c
+--- a/drivers/s390/cio/qdio_main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_main.c     Wed May 06 16:56:31 2009 +0100
+@@ -95,8 +95,6 @@
  
  static inline int qdio_check_ccq(struct qdio_q *q, unsigned int ccq)
  {
@@ -274195,7 +274126,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        /* all done or next buffer state different */
        if (ccq == 0 || ccq == 32)
                return 0;
-@@ -104,8 +102,7 @@ static inline int qdio_check_ccq(struct 
+@@ -104,8 +102,7 @@
        if (ccq == 96 || ccq == 97)
                return 1;
        /* notify devices immediately */
@@ -274205,7 +274136,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return -EIO;
  }
  
-@@ -115,25 +112,26 @@ static inline int qdio_check_ccq(struct 
+@@ -115,25 +112,26 @@
   * @state: state of the extracted buffers
   * @start: buffer number to start at
   * @count: count of buffers to examine
@@ -274235,7 +274166,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        rc = qdio_check_ccq(q, ccq);
  
        /* At least one buffer was processed, return and extract the remaining
-@@ -142,14 +140,13 @@ again:
+@@ -142,14 +140,13 @@
        if ((ccq == 96) && (count != tmp_count))
                return (count - tmp_count);
        if (rc == 1) {
@@ -274253,7 +274184,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                q->handler(q->irq_ptr->cdev,
                           QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
                           0, -1, -1, q->irq_ptr->int_parm);
-@@ -176,7 +173,9 @@ static int qdio_do_sqbs(struct qdio_q *q
+@@ -176,7 +173,9 @@
        int tmp_count = count, tmp_start = start;
        int nr = q->nr;
        int rc;
@@ -274264,7 +274195,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        BUG_ON(!q->irq_ptr->sch_token);
  
-@@ -186,16 +185,12 @@ again:
+@@ -186,16 +185,12 @@
        ccq = do_sqbs(q->irq_ptr->sch_token, state, nr, &tmp_start, &tmp_count);
        rc = qdio_check_ccq(q, ccq);
        if (rc == 1) {
@@ -274284,7 +274215,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                q->handler(q->irq_ptr->cdev,
                           QDIO_ERROR_ACTIVATE_CHECK_CONDITION,
                           0, -1, -1, q->irq_ptr->int_parm);
-@@ -207,7 +202,8 @@ again:
+@@ -207,7 +202,8 @@
  
  /* returns number of examined buffers and their common state in *state */
  static inline int get_buf_states(struct qdio_q *q, unsigned int bufnr,
@@ -274294,7 +274225,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  {
        unsigned char __state = 0;
        int i;
-@@ -216,7 +212,7 @@ static inline int get_buf_states(struct 
+@@ -216,7 +212,7 @@
        BUG_ON(count > QDIO_MAX_BUFFERS_PER_Q);
  
        if (is_qebsm(q))
@@ -274303,7 +274234,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        for (i = 0; i < count; i++) {
                if (!__state)
-@@ -230,9 +226,9 @@ static inline int get_buf_states(struct 
+@@ -230,9 +226,9 @@
  }
  
  inline int get_buf_state(struct qdio_q *q, unsigned int bufnr,
@@ -274315,7 +274246,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  }
  
  /* wrap-around safe setting of slsb states, returns number of changed buffers */
-@@ -282,14 +278,13 @@ static int qdio_siga_sync(struct qdio_q 
+@@ -282,14 +278,13 @@
        if (!need_siga_sync(q))
                return 0;
  
@@ -274334,15 +274265,15 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return cc;
  }
  
-@@ -330,17 +325,13 @@ static int qdio_siga_output(struct qdio_
+@@ -330,17 +325,13 @@
        int cc;
        u32 busy_bit;
        u64 start_time = 0;
 -      char dbf_text[15];
--
 -      QDIO_DBF_TEXT5(0, trace, "sigaout");
 -      QDIO_DBF_HEX5(0, trace, &q, sizeof(void *));
+-
 +      DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-w:%1d", q->nr);
        qdio_perf_stat_inc(&perf_stats.siga_out);
  again:
@@ -274354,7 +274285,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
                if (!start_time)
                        start_time = get_usecs();
-@@ -351,7 +342,7 @@ again:
+@@ -351,7 +342,7 @@
        if (cc == 2 && busy_bit)
                cc |= QDIO_ERROR_SIGA_BUSY;
        if (cc)
@@ -274363,7 +274294,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return cc;
  }
  
-@@ -359,14 +350,12 @@ static inline int qdio_siga_input(struct
+@@ -359,14 +350,12 @@
  {
        int cc;
  
@@ -274380,7 +274311,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return cc;
  }
  
-@@ -384,35 +373,91 @@ void qdio_sync_after_thinint(struct qdio
+@@ -384,48 +373,97 @@
  
  inline void qdio_stop_polling(struct qdio_q *q)
  {
@@ -274490,21 +274421,20 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  }
  
  static int get_inbound_buffer_frontier(struct qdio_q *q)
-@@ -421,13 +466,6 @@ static int get_inbound_buffer_frontier(s
+ {
+       int count, stop;
        unsigned char state;
-       /*
+-
+-      /*
 -       * If we still poll don't update last_move_ftc, keep the
 -       * previously ACK buffer there.
 -       */
 -      if (!q->u.in.polling)
 -              q->last_move_ftc = q->first_to_check;
--
--      /*
+       /*
         * Don't check 128 buffers, as otherwise qdio_inbound_q_moved
-        * would return 0.
-        */
-@@ -447,34 +485,13 @@ check_next:
+@@ -447,34 +485,13 @@
        if (q->first_to_check == stop)
                goto out;
  
@@ -274541,7 +274471,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                /*
                 * No siga-sync needed for non-qebsm here, as the inbound queue
                 * will be synced on the next siga-r, resp.
-@@ -484,7 +501,7 @@ check_next:
+@@ -484,7 +501,7 @@
                atomic_sub(count, &q->nr_buf_used);
                goto check_next;
        case SLSB_P_INPUT_ERROR:
@@ -274550,7 +274480,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                /* process the buffer, the upper layer will take care of it */
                q->first_to_check = add_buf(q->first_to_check, count);
                atomic_sub(count, &q->nr_buf_used);
-@@ -492,13 +509,12 @@ check_next:
+@@ -492,13 +509,12 @@
        case SLSB_CU_INPUT_EMPTY:
        case SLSB_P_INPUT_NOT_INIT:
        case SLSB_P_INPUT_ACK:
@@ -274565,7 +274495,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return q->first_to_check;
  }
  
-@@ -512,8 +528,7 @@ int qdio_inbound_q_moved(struct qdio_q *
+@@ -512,8 +528,7 @@
                if (!need_siga_sync(q) && !pci_out_supported(q))
                        q->u.in.timestamp = get_usecs();
  
@@ -274575,7 +274505,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                return 1;
        } else
                return 0;
-@@ -522,9 +537,6 @@ int qdio_inbound_q_moved(struct qdio_q *
+@@ -522,9 +537,6 @@
  static int qdio_inbound_q_done(struct qdio_q *q)
  {
        unsigned char state;
@@ -274585,7 +274515,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if (!atomic_read(&q->nr_buf_used))
                return 1;
-@@ -535,7 +547,7 @@ static int qdio_inbound_q_done(struct qd
+@@ -535,7 +547,7 @@
         */
        qdio_siga_sync_q(q);
  
@@ -274594,7 +274524,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        if (state == SLSB_P_INPUT_PRIMED)
                /* we got something to do */
                return 0;
-@@ -549,20 +561,12 @@ static int qdio_inbound_q_done(struct qd
+@@ -549,20 +561,12 @@
         * has (probably) not moved (see qdio_inbound_processing).
         */
        if (get_usecs() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) {
@@ -274619,7 +274549,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                return 0;
        }
  }
-@@ -570,9 +574,6 @@ static int qdio_inbound_q_done(struct qd
+@@ -570,9 +574,6 @@
  void qdio_kick_inbound_handler(struct qdio_q *q)
  {
        int count, start, end;
@@ -274629,7 +274559,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        qdio_perf_stat_inc(&perf_stats.inbound_handler);
  
-@@ -583,10 +584,7 @@ void qdio_kick_inbound_handler(struct qd
+@@ -583,10 +584,7 @@
        else
                count = end + QDIO_MAX_BUFFERS_PER_Q - start;
  
@@ -274641,7 +274571,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE))
                return;
-@@ -652,14 +650,14 @@ check_next:
+@@ -652,14 +650,14 @@
        if (q->first_to_check == stop)
                return q->first_to_check;
  
@@ -274658,7 +274588,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
                atomic_sub(count, &q->nr_buf_used);
                q->first_to_check = add_buf(q->first_to_check, count);
-@@ -671,14 +669,14 @@ check_next:
+@@ -671,14 +669,14 @@
                        break;
                goto check_next;
        case SLSB_P_OUTPUT_ERROR:
@@ -274675,7 +274605,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                break;
        case SLSB_P_OUTPUT_NOT_INIT:
        case SLSB_P_OUTPUT_HALTED:
-@@ -703,8 +701,7 @@ static inline int qdio_outbound_q_moved(
+@@ -703,8 +701,7 @@
  
        if ((bufnr != q->last_move_ftc) || q->qdio_error) {
                q->last_move_ftc = bufnr;
@@ -274685,7 +274615,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                return 1;
        } else
                return 0;
-@@ -739,12 +736,8 @@ static inline int qdio_outbound_q_moved(
+@@ -739,12 +736,8 @@
  static void qdio_kick_outbound_q(struct qdio_q *q)
  {
        int rc;
@@ -274699,7 +274629,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if (!need_siga_out(q))
                return;
-@@ -753,15 +746,9 @@ static void qdio_kick_outbound_q(struct 
+@@ -753,15 +746,9 @@
        switch (rc) {
        case 0:
                /* TODO: improve error handling for CC=0 case */
@@ -274718,7 +274648,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                /* went smooth this time, reset timestamp */
                q->u.out.timestamp = 0;
                break;
-@@ -778,12 +765,7 @@ static void qdio_kick_outbound_q(struct 
+@@ -778,12 +765,7 @@
                        tasklet_schedule(&q->tasklet);
                        break;
                }
@@ -274732,7 +274662,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        default:
                /* for plain cc=1, 2 or 3 */
                q->qdio_error = rc;
-@@ -793,9 +775,6 @@ static void qdio_kick_outbound_q(struct 
+@@ -793,9 +775,6 @@
  static void qdio_kick_outbound_handler(struct qdio_q *q)
  {
        int start, end, count;
@@ -274742,7 +274672,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        start = q->first_to_kick;
        end = q->last_move_ftc;
-@@ -804,13 +783,8 @@ static void qdio_kick_outbound_handler(s
+@@ -804,13 +783,8 @@
        else
                count = end + QDIO_MAX_BUFFERS_PER_Q - start;
  
@@ -274758,20 +274688,20 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if (unlikely(q->irq_ptr->state != QDIO_IRQ_STATE_ACTIVE))
                return;
-@@ -851,6 +825,12 @@ static void __qdio_outbound_processing(s
+@@ -850,6 +824,12 @@
+       /* bail out for HiperSockets unicast queues */
        if (queue_type(q) == QDIO_IQDIO_QFMT && !multicast_outbound(q))
                return;
++
 +      if ((queue_type(q) == QDIO_IQDIO_QFMT) &&
 +          (atomic_read(&q->nr_buf_used)) > QDIO_IQDIO_POLL_LVL) {
 +              tasklet_schedule(&q->tasklet);
 +              return;
 +      }
-+
        if (q->u.out.pci_out_enabled)
                return;
-@@ -899,27 +879,18 @@ void qdio_check_outbound_after_thinint(s
+@@ -899,27 +879,18 @@
  static inline void qdio_set_state(struct qdio_irq *irq_ptr,
                                  enum qdio_irq_states state)
  {
@@ -274804,7 +274734,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        }
  }
  
-@@ -953,14 +924,10 @@ static void qdio_handle_activate_check(s
+@@ -953,14 +924,10 @@
  {
        struct qdio_irq *irq_ptr = cdev->private->qdio_data;
        struct qdio_q *q;
@@ -274822,7 +274752,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if (irq_ptr->nr_input_qs) {
                q = irq_ptr->input_qs[0];
-@@ -1013,28 +980,29 @@ static void qdio_int_error(struct ccw_de
+@@ -1013,28 +980,29 @@
  }
  
  static int qdio_establish_check_errors(struct ccw_device *cdev, int cstat,
@@ -274858,21 +274788,21 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ERR);
        return 1;
  }
-@@ -1043,12 +1011,8 @@ static void qdio_establish_handle_irq(st
+@@ -1043,12 +1011,8 @@
                                      int dstat)
  {
        struct qdio_irq *irq_ptr = cdev->private->qdio_data;
 -      char dbf_text[15];
--
 -      sprintf(dbf_text, "qehi%4x", cdev->private->schid.sch_no);
 -      QDIO_DBF_TEXT0(0, setup, dbf_text);
 -      QDIO_DBF_TEXT0(0, trace, dbf_text);
+-
 +      DBF_DEV_EVENT(DBF_INFO, irq_ptr, "qest irq");
        if (!qdio_establish_check_errors(cdev, cstat, dstat))
                qdio_set_state(irq_ptr, QDIO_IRQ_STATE_ESTABLISHED);
  }
-@@ -1059,26 +1023,21 @@ void qdio_int_handler(struct ccw_device 
+@@ -1059,26 +1023,21 @@
  {
        struct qdio_irq *irq_ptr = cdev->private->qdio_data;
        int cstat, dstat;
@@ -274902,7 +274832,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                        qdio_int_error(cdev);
                        return;
                default:
-@@ -1086,7 +1045,7 @@ void qdio_int_handler(struct ccw_device 
+@@ -1086,7 +1045,7 @@
                        return;
                }
        }
@@ -274911,7 +274841,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        cstat = irb->scsw.cmd.cstat;
        dstat = irb->scsw.cmd.dstat;
-@@ -1121,23 +1080,20 @@ void qdio_int_handler(struct ccw_device 
+@@ -1121,23 +1080,20 @@
  /**
   * qdio_get_ssqd_desc - get qdio subchannel description
   * @cdev: ccw device to get description for
@@ -274928,23 +274858,23 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  {
 -      struct qdio_irq *irq_ptr;
 -      char dbf_text[15];
--
 -      sprintf(dbf_text, "qssq%4x", cdev->private->schid.sch_no);
 -      QDIO_DBF_TEXT0(0, setup, dbf_text);
++      if (!cdev || !cdev->private)
++              return -EINVAL;
  
 -      irq_ptr = cdev->private->qdio_data;
 -      if (!irq_ptr)
 -              return NULL;
-+      if (!cdev || !cdev->private)
-+              return -EINVAL;
+-
 -      return &irq_ptr->ssqd_desc;
 +      DBF_EVENT("get ssqd:%4x", cdev->private->schid.sch_no);
 +      return qdio_setup_get_ssqd(NULL, &cdev->private->schid, data);
  }
  EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc);
  
-@@ -1151,14 +1107,9 @@ EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc);
+@@ -1151,14 +1107,9 @@
   */
  int qdio_cleanup(struct ccw_device *cdev, int how)
  {
@@ -274960,7 +274890,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        if (!irq_ptr)
                return -ENODEV;
  
-@@ -1191,18 +1142,15 @@ static void qdio_shutdown_queues(struct 
+@@ -1191,17 +1142,14 @@
   */
  int qdio_shutdown(struct ccw_device *cdev, int how)
  {
@@ -274976,13 +274906,12 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
 -      irq_ptr = cdev->private->qdio_data;
        if (!irq_ptr)
                return -ENODEV;
-+      DBF_EVENT("qshutdown:%4x", cdev->private->schid.sch_no);
 +
++      DBF_EVENT("qshutdown:%4x", cdev->private->schid.sch_no);
        mutex_lock(&irq_ptr->setup_mutex);
        /*
-        * Subchannel was already shot down. We cannot prevent being called
-@@ -1226,10 +1174,8 @@ int qdio_shutdown(struct ccw_device *cde
+@@ -1226,10 +1174,8 @@
                /* default behaviour is halt */
                rc = ccw_device_halt(cdev, QDIO_DOING_CLEANUP);
        if (rc) {
@@ -274995,17 +274924,17 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                goto no_cleanup;
        }
  
-@@ -1263,17 +1209,18 @@ EXPORT_SYMBOL_GPL(qdio_shutdown);
+@@ -1263,17 +1209,18 @@
   */
  int qdio_free(struct ccw_device *cdev)
  {
 -      struct qdio_irq *irq_ptr;
 -      char dbf_text[15];
--
--      sprintf(dbf_text, "qfre%4x", cdev->private->schid.sch_no);
--      QDIO_DBF_TEXT0(0, setup, dbf_text);
 +      struct qdio_irq *irq_ptr = cdev->private->qdio_data;
  
+-      sprintf(dbf_text, "qfre%4x", cdev->private->schid.sch_no);
+-      QDIO_DBF_TEXT0(0, setup, dbf_text);
+-
 -      irq_ptr = cdev->private->qdio_data;
        if (!irq_ptr)
                return -ENODEV;
@@ -275020,7 +274949,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        cdev->private->qdio_data = NULL;
        mutex_unlock(&irq_ptr->setup_mutex);
  
-@@ -1292,10 +1239,6 @@ EXPORT_SYMBOL_GPL(qdio_free);
+@@ -1292,10 +1239,6 @@
  int qdio_initialize(struct qdio_initialize *init_data)
  {
        int rc;
@@ -275031,7 +274960,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        rc = qdio_allocate(init_data);
        if (rc)
-@@ -1315,10 +1258,8 @@ EXPORT_SYMBOL_GPL(qdio_initialize);
+@@ -1315,10 +1258,8 @@
  int qdio_allocate(struct qdio_initialize *init_data)
  {
        struct qdio_irq *irq_ptr;
@@ -275043,7 +274972,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if ((init_data->no_input_qs && !init_data->input_handler) ||
            (init_data->no_output_qs && !init_data->output_handler))
-@@ -1332,16 +1273,13 @@ int qdio_allocate(struct qdio_initialize
+@@ -1332,16 +1273,13 @@
            (!init_data->output_sbal_addr_array))
                return -EINVAL;
  
@@ -275061,17 +274990,17 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        /*
         * Allocate a page for the chsc calls in qdio_establish.
-@@ -1359,9 +1297,6 @@ int qdio_allocate(struct qdio_initialize
+@@ -1358,9 +1296,6 @@
+       if (!irq_ptr->qdr)
                goto out_rel;
        WARN_ON((unsigned long)irq_ptr->qdr & 0xfff);
+-
 -      QDIO_DBF_TEXT0(0, setup, "qdr:");
 -      QDIO_DBF_HEX0(0, setup, &irq_ptr->qdr, sizeof(void *));
--
        if (qdio_allocate_qs(irq_ptr, init_data->no_input_qs,
                             init_data->no_output_qs))
-               goto out_rel;
-@@ -1382,14 +1317,12 @@ EXPORT_SYMBOL_GPL(qdio_allocate);
+@@ -1382,14 +1317,12 @@
   */
  int qdio_establish(struct qdio_initialize *init_data)
  {
@@ -275087,7 +275016,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        irq_ptr = cdev->private->qdio_data;
        if (!irq_ptr)
-@@ -1419,10 +1352,8 @@ int qdio_establish(struct qdio_initializ
+@@ -1419,10 +1352,8 @@
  
        rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ESTABLISH, 0, 0);
        if (rc) {
@@ -275100,7 +275029,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        }
        spin_unlock_irqrestore(get_ccwdev_lock(cdev), saveflags);
  
-@@ -1443,8 +1374,7 @@ int qdio_establish(struct qdio_initializ
+@@ -1443,8 +1374,7 @@
        }
  
        qdio_setup_ssqd_info(irq_ptr);
@@ -275110,7 +275039,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        /* qebsm is now setup if available, initialize buffer states */
        qdio_init_buf_states(irq_ptr);
-@@ -1465,10 +1395,8 @@ int qdio_activate(struct ccw_device *cde
+@@ -1465,10 +1395,8 @@
        struct qdio_irq *irq_ptr;
        int rc;
        unsigned long saveflags;
@@ -275122,7 +275051,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        irq_ptr = cdev->private->qdio_data;
        if (!irq_ptr)
-@@ -1494,10 +1422,8 @@ int qdio_activate(struct ccw_device *cde
+@@ -1494,10 +1422,8 @@
        rc = ccw_device_start(cdev, &irq_ptr->ccw, QDIO_DOING_ACTIVATE,
                              0, DOIO_DENY_PREFETCH);
        if (rc) {
@@ -275135,7 +275064,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        }
        spin_unlock_irqrestore(get_ccwdev_lock(cdev), saveflags);
  
-@@ -1555,23 +1481,38 @@ static inline int buf_in_between(int buf
+@@ -1555,23 +1481,38 @@
  static void handle_inbound(struct qdio_q *q, unsigned int callflags,
                           int bufnr, int count)
  {
@@ -275187,7 +275116,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        used = atomic_add_return(count, &q->nr_buf_used) - count;
        BUG_ON(used + count > QDIO_MAX_BUFFERS_PER_Q);
-@@ -1630,11 +1571,11 @@ static void handle_outbound(struct qdio_
+@@ -1630,11 +1571,11 @@
        }
  
        /* try to fast requeue buffers */
@@ -275201,7 +275130,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
                qdio_perf_stat_inc(&perf_stats.fast_requeue);
        }
  out:
-@@ -1654,12 +1595,6 @@ int do_QDIO(struct ccw_device *cdev, uns
+@@ -1654,12 +1595,6 @@
            int q_nr, int bufnr, int count)
  {
        struct qdio_irq *irq_ptr;
@@ -275214,7 +275143,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
  
        if ((bufnr > QDIO_MAX_BUFFERS_PER_Q) ||
            (count > QDIO_MAX_BUFFERS_PER_Q) ||
-@@ -1673,33 +1608,24 @@ int do_QDIO(struct ccw_device *cdev, uns
+@@ -1673,33 +1608,24 @@
        if (!irq_ptr)
                return -ENODEV;
  
@@ -275257,10 +275186,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_main.c linux-2.6.27.19-5.1/drivers
        return 0;
  }
  EXPORT_SYMBOL_GPL(do_QDIO);
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.c
---- linux-2.6.27/drivers/s390/cio/qdio_perf.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.c   2009-03-25 16:11:24.000000000 +0000
-@@ -74,6 +74,8 @@ static int qdio_perf_proc_show(struct se
+diff -r 9608d5473017 drivers/s390/cio/qdio_perf.c
+--- a/drivers/s390/cio/qdio_perf.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_perf.c     Wed May 06 16:56:31 2009 +0100
+@@ -74,6 +74,8 @@
        seq_printf(m, "\n");
        seq_printf(m, "Number of fast requeues (outg. SBAL w/o SIGA)\t: %li\n",
                   (long)atomic_long_read(&perf_stats.fast_requeue));
@@ -275269,10 +275198,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.c linux-2.6.27.19-5.1/drivers
        seq_printf(m, "Number of outbound tasklet mod_timer calls\t: %li\n",
                   (long)atomic_long_read(&perf_stats.debug_tl_out_timer));
        seq_printf(m, "Number of stop polling calls\t\t\t: %li\n",
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.h linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.h
---- linux-2.6.27/drivers/s390/cio/qdio_perf.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_perf.h   2009-03-25 16:11:24.000000000 +0000
-@@ -36,6 +36,7 @@ struct qdio_perf_stats {
+diff -r 9608d5473017 drivers/s390/cio/qdio_perf.h
+--- a/drivers/s390/cio/qdio_perf.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_perf.h     Wed May 06 16:56:31 2009 +0100
+@@ -36,6 +36,7 @@
        atomic_long_t inbound_handler;
        atomic_long_t outbound_handler;
        atomic_long_t fast_requeue;
@@ -275280,10 +275209,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_perf.h linux-2.6.27.19-5.1/drivers
  
        /* for debugging */
        atomic_long_t debug_tl_out_timer;
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_setup.c
---- linux-2.6.27/drivers/s390/cio/qdio_setup.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_setup.c  2009-03-25 16:11:24.000000000 +0000
-@@ -120,14 +120,12 @@ static void setup_queues_misc(struct qdi
+diff -r 9608d5473017 drivers/s390/cio/qdio_setup.c
+--- a/drivers/s390/cio/qdio_setup.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_setup.c    Wed May 06 16:56:31 2009 +0100
+@@ -120,14 +120,12 @@
  }
  
  static void setup_storage_lists(struct qdio_q *q, struct qdio_irq *irq_ptr,
@@ -275300,7 +275229,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
        q->sl = (struct sl *)((char *)q->slib + PAGE_SIZE / 2);
  
        /* fill in sbal */
-@@ -150,31 +148,26 @@ static void setup_storage_lists(struct q
+@@ -150,31 +148,26 @@
        for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; j++)
                q->sl->element[j].sbal = (unsigned long)q->sbal[j];
  
@@ -275338,7 +275267,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
                input_sbal_array += QDIO_MAX_BUFFERS_PER_Q;
  
                if (is_thinint_irq(irq_ptr))
-@@ -186,12 +179,11 @@ static void setup_queues(struct qdio_irq
+@@ -186,12 +179,11 @@
        }
  
        for_each_output_queue(irq_ptr, q, i) {
@@ -275353,7 +275282,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
                output_sbal_array += QDIO_MAX_BUFFERS_PER_Q;
  
                tasklet_init(&q->tasklet, qdio_outbound_processing,
-@@ -222,8 +214,6 @@ static void process_ac_flags(struct qdio
+@@ -222,8 +214,6 @@
  static void check_and_setup_qebsm(struct qdio_irq *irq_ptr,
                                  unsigned char qdioac, unsigned long token)
  {
@@ -275362,7 +275291,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
        if (!(irq_ptr->qib.rflags & QIB_RFLAGS_ENABLE_QEBSM))
                goto no_qebsm;
        if (!(qdioac & AC1_SC_QEBSM_AVAILABLE) ||
-@@ -232,33 +222,41 @@ static void check_and_setup_qebsm(struct
+@@ -232,33 +222,41 @@
  
        irq_ptr->sch_token = token;
  
@@ -275414,7 +275343,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
  
        if (chsc(ssqd))
                return -EIO;
-@@ -268,27 +266,29 @@ static int __get_ssqd_info(struct qdio_i
+@@ -268,27 +266,29 @@
  
        if (!(ssqd->qdio_ssqd.flags & CHSC_FLAG_QDIO_CAPABILITY) ||
            !(ssqd->qdio_ssqd.flags & CHSC_FLAG_VALIDITY) ||
@@ -275454,7 +275383,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
                /* all flags set, worst case */
                qdioac = AC1_SIGA_INPUT_NEEDED | AC1_SIGA_OUTPUT_NEEDED |
                         AC1_SIGA_SYNC_NEEDED;
-@@ -297,9 +297,7 @@ void qdio_setup_ssqd_info(struct qdio_ir
+@@ -297,9 +297,7 @@
  
        check_and_setup_qebsm(irq_ptr, qdioac, irq_ptr->ssqd_desc.sch_token);
        process_ac_flags(irq_ptr, qdioac);
@@ -275465,7 +275394,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
  }
  
  void qdio_release_memory(struct qdio_irq *irq_ptr)
-@@ -419,7 +417,7 @@ int qdio_setup_irq(struct qdio_initializ
+@@ -419,7 +417,7 @@
        /* get qdio commands */
        ciw = ccw_device_get_ciw(init_data->cdev, CIW_TYPE_EQUEUE);
        if (!ciw) {
@@ -275474,7 +275403,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
                rc = -EINVAL;
                goto out_err;
        }
-@@ -427,7 +425,7 @@ int qdio_setup_irq(struct qdio_initializ
+@@ -427,7 +425,7 @@
  
        ciw = ccw_device_get_ciw(init_data->cdev, CIW_TYPE_AQUEUE);
        if (!ciw) {
@@ -275483,7 +275412,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
                rc = -EINVAL;
                goto out_err;
        }
-@@ -447,56 +445,38 @@ void qdio_print_subchannel_info(struct q
+@@ -447,56 +445,38 @@
  {
        char s[80];
  
@@ -275559,10 +275488,10 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_setup.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/drivers/s390/cio/qdio_thinint.c
---- linux-2.6.27/drivers/s390/cio/qdio_thinint.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/cio/qdio_thinint.c        2009-03-25 16:11:24.000000000 +0000
-@@ -131,7 +131,7 @@ static inline int tiqdio_inbound_q_done(
+diff -r 9608d5473017 drivers/s390/cio/qdio_thinint.c
+--- a/drivers/s390/cio/qdio_thinint.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/cio/qdio_thinint.c  Wed May 06 16:56:31 2009 +0100
+@@ -131,7 +131,7 @@
                return 1;
  
        qdio_siga_sync_q(q);
@@ -275571,7 +275500,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/driv
  
        if (state == SLSB_P_INPUT_PRIMED)
                /* more work coming */
-@@ -258,8 +258,6 @@ static void tiqdio_thinint_handler(void 
+@@ -258,8 +258,6 @@
  static int set_subchannel_ind(struct qdio_irq *irq_ptr, int reset)
  {
        struct scssc_area *scssc_area;
@@ -275580,7 +275509,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/driv
        int rc;
  
        scssc_area = (struct scssc_area *)irq_ptr->chsc_page;
-@@ -294,19 +292,15 @@ static int set_subchannel_ind(struct qdi
+@@ -294,19 +292,15 @@
  
        rc = chsc_error_from_response(scssc_area->response.code);
        if (rc) {
@@ -275606,7 +275535,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/driv
        return 0;
  }
  
-@@ -327,14 +321,11 @@ void tiqdio_free_memory(void)
+@@ -327,14 +321,11 @@
  
  int __init tiqdio_register_thinints(void)
  {
@@ -275622,7 +275551,7 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/driv
                tiqdio_alsi = NULL;
                isc_unregister(QDIO_AIRQ_ISC);
                return -ENOMEM;
-@@ -360,7 +351,7 @@ void qdio_setup_thinint(struct qdio_irq 
+@@ -360,7 +351,7 @@
        if (!is_thinint_irq(irq_ptr))
                return;
        irq_ptr->dsci = get_indicator();
@@ -275631,19 +275560,19 @@ diff -purN linux-2.6.27/drivers/s390/cio/qdio_thinint.c linux-2.6.27.19-5.1/driv
  }
  
  void qdio_shutdown_thinint(struct qdio_irq *irq_ptr)
-diff -purN linux-2.6.27/drivers/s390/crypto/ap_bus.c linux-2.6.27.19-5.1/drivers/s390/crypto/ap_bus.c
---- linux-2.6.27/drivers/s390/crypto/ap_bus.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/crypto/ap_bus.c   2009-03-25 16:11:24.000000000 +0000
-@@ -23,6 +23,8 @@
+diff -r 9608d5473017 drivers/s390/crypto/ap_bus.c
+--- a/drivers/s390/crypto/ap_bus.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/crypto/ap_bus.c     Wed May 06 16:56:31 2009 +0100
+@@ -22,6 +22,8 @@
+  * along with this program; if not, write to the Free Software
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
-+#define KMSG_COMPONENT "ap"
 +
++#define KMSG_COMPONENT "ap"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/delay.h>
-@@ -1337,12 +1339,13 @@ int __init ap_module_init(void)
+@@ -1337,12 +1339,13 @@
        int rc, i;
  
        if (ap_domain_index < -1 || ap_domain_index >= AP_DOMAINS) {
@@ -275660,9 +275589,9 @@ diff -purN linux-2.6.27/drivers/s390/crypto/ap_bus.c linux-2.6.27.19-5.1/drivers
                return -ENODEV;
        }
        register_reset_call(&ap_reset_call);
-diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390/net/claw.c
---- linux-2.6.27/drivers/s390/net/claw.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/claw.c        2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/claw.c
+--- a/drivers/s390/net/claw.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/claw.c  Wed May 06 16:56:31 2009 +0100
 @@ -60,6 +60,9 @@
   *    1.25  Added Packing support
   *    1.5
@@ -275682,7 +275611,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
  static char debug_buffer[255];
  /**
   * Debug Facility Stuff
-@@ -298,8 +301,7 @@ claw_probe(struct ccwgroup_device *cgdev
+@@ -298,8 +301,7 @@
        if (rc) {
                probe_error(cgdev);
                put_device(&cgdev->dev);
@@ -275692,7 +275621,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                CLAW_DBF_TEXT_(2, setup, "probex%d", rc);
                return rc;
        }
-@@ -496,7 +498,8 @@ claw_open(struct net_device *dev)
+@@ -496,7 +498,8 @@
             ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) ||
             (((privptr->channel[READ].flag |
                privptr->channel[WRITE].flag) & CLAW_TIMER) != 0x00)) {
@@ -275702,7 +275631,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                CLAW_DBF_TEXT(2, trace, "notrdy");
  
                  for ( i = 0; i < 2;  i++) {
-@@ -582,10 +585,9 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -582,10 +585,9 @@
        CLAW_DBF_TEXT(4, trace, "clawirq");
          /* Bypass all 'unsolicited interrupts' */
        if (!cdev->dev.driver_data) {
@@ -275716,7 +275645,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                CLAW_DBF_TEXT(2, trace, "badirq");
                  return;
          }
-@@ -597,8 +599,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -597,8 +599,8 @@
        else if (privptr->channel[WRITE].cdev == cdev)
                p_ch = &privptr->channel[WRITE];
        else {
@@ -275727,7 +275656,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                CLAW_DBF_TEXT(2, trace, "badchan");
                return;
        }
-@@ -612,7 +614,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -612,7 +614,8 @@
  
        /* Check for good subchannel return code, otherwise info message */
        if (irb->scsw.cmd.cstat && !(irb->scsw.cmd.cstat & SCHN_STAT_PCI)) {
@@ -275737,7 +275666,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        " Sch Stat %02x  Dev Stat %02x CPA - %04x\n",
                          dev->name, p_ch->devno,
                        irb->scsw.cmd.cstat, irb->scsw.cmd.dstat,
-@@ -651,7 +654,7 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -651,7 +654,7 @@
                        wake_up(&p_ch->wait); /* wake claw_open (READ)*/
                } else if (p_ch->flag == CLAW_WRITE) {
                        p_ch->claw_state = CLAW_START_WRITE;
@@ -275746,7 +275675,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        claw_strt_read(dev, LOCK_NO);
                        claw_send_control(dev,
                                SYSTEM_VALIDATE_REQUEST,
-@@ -659,10 +662,9 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -659,10 +662,9 @@
                                p_env->host_name,
                                p_env->adapter_name);
                } else {
@@ -275760,7 +275689,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                irb->scsw.cmd.cstat,
                                irb->scsw.cmd.dstat);
                        return;
-@@ -677,8 +679,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -677,8 +679,8 @@
                            (p_ch->irb->ecw[0] & 0x40) == 0x40 ||
                            (p_ch->irb->ecw[0])        == 0) {
                                privptr->stats.rx_errors++;
@@ -275771,7 +275700,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                        "side recovers \n",
                                        dev->name);
                        }
-@@ -713,11 +715,13 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -713,11 +715,13 @@
                return;
        case CLAW_START_WRITE:
                if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
@@ -275787,7 +275716,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                        "occurred:\n", dev->name);
                                init_timer(&p_ch->timer);
                                p_ch->timer.function =
-@@ -725,7 +729,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -725,7 +729,8 @@
                                p_ch->timer.data = (unsigned long)p_ch;
                                p_ch->timer.expires = jiffies + 10*HZ;
                                add_timer(&p_ch->timer);
@@ -275797,7 +275726,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                        "restarting\n", dev->name);
                        }
                        CLAW_DBF_TEXT(4, trace, "rstrtwrt");
-@@ -733,9 +738,10 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -733,9 +738,10 @@
                }
                if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) {
                        clear_bit(0, (void *)&p_ch->IO_active);
@@ -275811,7 +275740,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                }
                if (!((p_ch->irb->scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS) ||
                (p_ch->irb->scsw.cmd.stctl == SCSW_STCTL_STATUS_PEND) ||
-@@ -757,7 +763,8 @@ claw_irq_handler(struct ccw_device *cdev
+@@ -757,7 +763,8 @@
                CLAW_DBF_TEXT(4, trace, "StWtExit");
                return;
        default:
@@ -275821,7 +275750,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "state=%d\n", dev->name, p_ch->claw_state);
                CLAW_DBF_TEXT(2, trace, "badIRQ");
                return;
-@@ -910,7 +917,8 @@ claw_release(struct net_device *dev)
+@@ -910,7 +917,8 @@
          if (((privptr->channel[READ].last_dstat |
                privptr->channel[WRITE].last_dstat) &
                ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) {
@@ -275831,7 +275760,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "read: %02x -  write: %02x\n",
                  dev->name,
                privptr->channel[READ].last_dstat,
-@@ -1135,20 +1143,19 @@ ccw_check_return_code(struct ccw_device 
+@@ -1135,20 +1143,19 @@
                case -EBUSY: /* BUSY is a transient state no action needed */
                        break;
                case -ENODEV:
@@ -275859,7 +275788,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                }
        }
        CLAW_DBF_TEXT(4, trace, "ccwret");
-@@ -1162,39 +1169,40 @@ static void
+@@ -1162,39 +1169,40 @@
  ccw_check_unit_check(struct chbk * p_ch, unsigned char sense )
  {
        struct net_device *ndev = p_ch->ndev;
@@ -275908,7 +275837,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                "(remote side)\n", ndev->name);
                  }
          }
-@@ -2002,7 +2010,7 @@ claw_process_control( struct net_device 
+@@ -2002,7 +2010,7 @@
        tdev = &privptr->channel[READ].cdev->dev;
        memcpy( &temp_host_name, p_env->host_name, 8);
          memcpy( &temp_ws_name, p_env->adapter_name , 8);
@@ -275917,7 +275846,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                "Received Control Packet\n",
                dev->name, temp_ws_name);
          if (privptr->release_pend==1) {
-@@ -2021,30 +2029,28 @@ claw_process_control( struct net_device 
+@@ -2021,30 +2029,28 @@
                if (p_ctlbk->version != CLAW_VERSION_ID) {
                        claw_snd_sys_validate_rsp(dev, p_ctlbk,
                                CLAW_RC_WRONG_VERSION);
@@ -275962,7 +275891,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                dev->name,
                                p_sysval->host_name,
                                temp_host_name);
-@@ -2055,35 +2061,36 @@ claw_process_control( struct net_device 
+@@ -2055,35 +2061,36 @@
                        CLAW_DBF_TEXT(2, setup, "WSNBAD");
                        CLAW_DBF_TEXT_(2, setup, "%s", p_sysval->WS_name);
                        CLAW_DBF_TEXT_(2, setup, "%s", temp_ws_name);
@@ -276014,7 +275943,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                privptr->system_validate_comp = 1;
                if (strncmp(p_env->api_type, WS_APPL_NAME_PACKED, 6) == 0)
                        p_env->packing = PACKING_ASK;
-@@ -2091,8 +2098,9 @@ claw_process_control( struct net_device 
+@@ -2091,8 +2098,9 @@
                break;
        case SYSTEM_VALIDATE_RESPONSE:
                p_sysval = (struct sysval *)&(p_ctlbk->data);
@@ -276026,7 +275955,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        dev->name,
                        p_ctlbk->version,
                        p_ctlbk->correlator,
-@@ -2101,32 +2109,31 @@ claw_process_control( struct net_device 
+@@ -2101,32 +2109,31 @@
                        p_sysval->host_name);
                switch (p_ctlbk->rc) {
                case 0:
@@ -276067,7 +275996,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                "error code=%d \n",
                                 dev->name, p_ctlbk->rc);
                        break;
-@@ -2135,7 +2142,7 @@ claw_process_control( struct net_device 
+@@ -2135,7 +2142,7 @@
  
        case CONNECTION_REQUEST:
                p_connect = (struct conncmd *)&(p_ctlbk->data);
@@ -276076,7 +276005,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "Corr=%d,HOST appl=%.8s,WS appl=%.8s\n",
                        dev->name,
                        p_ctlbk->version,
-@@ -2145,20 +2152,20 @@ claw_process_control( struct net_device 
+@@ -2145,20 +2152,20 @@
                        p_connect->WS_name);
                if (privptr->active_link_ID != 0) {
                        claw_snd_disc(dev, p_ctlbk);
@@ -276100,7 +276029,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                "req appl name does not match\n",
                                dev->name);
                }
-@@ -2171,7 +2178,7 @@ claw_process_control( struct net_device 
+@@ -2171,7 +2178,7 @@
                        p_env->packing = PACK_SEND;
                        claw_snd_conn_req(dev, 0);
                }
@@ -276109,7 +276038,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "completed link_id=%d.\n",
                        dev->name, temp_ws_name,
                        p_ctlbk->linkid);
-@@ -2181,7 +2188,7 @@ claw_process_control( struct net_device 
+@@ -2181,7 +2188,7 @@
                break;
        case CONNECTION_RESPONSE:
                p_connect = (struct conncmd *)&(p_ctlbk->data);
@@ -276118,7 +276047,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n",
                        dev->name,
                        p_ctlbk->version,
-@@ -2192,7 +2199,7 @@ claw_process_control( struct net_device 
+@@ -2192,7 +2199,7 @@
                        p_connect->WS_name);
  
                if (p_ctlbk->rc != 0) {
@@ -276127,7 +276056,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                dev->name, p_ctlbk->rc);
                        return 1;
                }
-@@ -2200,7 +2207,7 @@ claw_process_control( struct net_device 
+@@ -2200,7 +2207,7 @@
                        p_connect->host_name, p_connect->WS_name);
                if (rc != 0) {
                        claw_snd_disc(dev, p_ctlbk);
@@ -276136,7 +276065,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                "req appl name does not match\n",
                                 dev->name);
                }
-@@ -2209,7 +2216,8 @@ claw_process_control( struct net_device 
+@@ -2209,7 +2216,8 @@
                break;
        case CONNECTION_CONFIRM:
                p_connect = (struct conncmd *)&(p_ctlbk->data);
@@ -276146,7 +276075,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "Corr=%d,Host appl=%.8s,WS appl=%.8s\n",
                        dev->name,
                        p_ctlbk->version,
-@@ -2220,21 +2228,21 @@ claw_process_control( struct net_device 
+@@ -2220,21 +2228,21 @@
                if (p_ctlbk->linkid == -(privptr->active_link_ID)) {
                        privptr->active_link_ID = p_ctlbk->linkid;
                        if (p_env->packing > PACKING_ASK) {
@@ -276172,7 +276101,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        "Vers=%d,link_id=%d,Corr=%d\n",
                        dev->name, p_ctlbk->version,
                        p_ctlbk->linkid, p_ctlbk->correlator);
-@@ -2246,11 +2254,11 @@ claw_process_control( struct net_device 
+@@ -2246,11 +2254,11 @@
                        privptr->active_link_ID = 0;
                break;
        case CLAW_ERROR:
@@ -276186,7 +276115,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                        dev->name,  p_ctlbk->command);
                break;
          }
-@@ -2510,7 +2518,8 @@ unpack_read(struct net_device *dev )
+@@ -2510,7 +2518,8 @@
                          mtc_this_frm=1;
                          if (p_this_ccw->header.length!=
                                privptr->p_env->read_size ) {
@@ -276196,7 +276125,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                                        "length is %02x\n" ,
                                          dev->name, p_this_ccw->header.length);
                          }
-@@ -2594,8 +2603,8 @@ unpack_next:
+@@ -2594,8 +2603,8 @@
                          }
                          else {
                                  privptr->stats.rx_dropped++;
@@ -276207,7 +276136,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                          }
                          privptr->mtc_offset=0;
                          privptr->mtc_logical_link=-1;
-@@ -2879,7 +2888,8 @@ claw_new_device(struct ccwgroup_device *
+@@ -2879,7 +2888,8 @@
        int ret;
        struct ccw_dev_id dev_id;
  
@@ -276217,7 +276146,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
        CLAW_DBF_TEXT(2, setup, "new_dev");
        privptr = cgdev->dev.driver_data;
        cgdev->cdev[READ]->dev.driver_data = privptr;
-@@ -2895,27 +2905,28 @@ claw_new_device(struct ccwgroup_device *
+@@ -2895,27 +2905,28 @@
        if (ret == 0)
                ret = add_channel(cgdev->cdev[1],1,privptr);
        if (ret != 0) {
@@ -276255,7 +276184,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                goto out;
        }
        dev->ml_priv = privptr;
-@@ -2943,13 +2954,13 @@ claw_new_device(struct ccwgroup_device *
+@@ -2943,13 +2954,13 @@
        privptr->channel[WRITE].ndev = dev;
        privptr->p_env->ndev = dev;
  
@@ -276271,7 +276200,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                ":%.8s api_type: %.8s\n",
                  dev->name, p_env->host_name,
                p_env->adapter_name , p_env->api_type);
-@@ -2993,8 +3004,8 @@ claw_shutdown_device(struct ccwgroup_dev
+@@ -2993,8 +3004,8 @@
        ndev = priv->channel[READ].ndev;
        if (ndev) {
                /* Close the device */
@@ -276282,7 +276211,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                if (ndev->flags & IFF_RUNNING)
                        ret = claw_release(ndev);
                ndev->flags &=~IFF_RUNNING;
-@@ -3019,8 +3030,7 @@ claw_remove_device(struct ccwgroup_devic
+@@ -3019,8 +3030,7 @@
        CLAW_DBF_TEXT_(2, setup, "%s", cgdev->dev.bus_id);
        priv = cgdev->dev.driver_data;
        BUG_ON(!priv);
@@ -276292,7 +276221,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
        if (cgdev->state == CCWGROUP_ONLINE)
                claw_shutdown_device(cgdev);
        claw_remove_files(&cgdev->dev);
-@@ -3285,7 +3295,7 @@ claw_cleanup(void)
+@@ -3285,7 +3295,7 @@
  {
        unregister_cu3088_discipline(&claw_group_driver);
        claw_unregister_debug_facility();
@@ -276301,7 +276230,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
  
  }
  
-@@ -3299,12 +3309,11 @@ static int __init
+@@ -3299,12 +3309,11 @@
  claw_init(void)
  {
        int ret = 0;
@@ -276316,7 +276245,7 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
                return ret;
        }
        CLAW_DBF_TEXT(2, setup, "init_mod");
-@@ -3312,8 +3321,7 @@ claw_init(void)
+@@ -3312,8 +3321,7 @@
        if (ret) {
                CLAW_DBF_TEXT(2, setup, "init_bad");
                claw_unregister_debug_facility();
@@ -276326,19 +276255,19 @@ diff -purN linux-2.6.27/drivers/s390/net/claw.c linux-2.6.27.19-5.1/drivers/s390
        }
        return ret;
  }
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_fsms.c
---- linux-2.6.27/drivers/s390/net/ctcm_fsms.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_fsms.c   2009-03-25 16:11:23.000000000 +0000
-@@ -13,6 +13,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_fsms.c
+--- a/drivers/s390/net/ctcm_fsms.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_fsms.c     Wed May 06 16:56:31 2009 +0100
+@@ -12,6 +12,8 @@
+ #undef DEBUG
  #undef DEBUGDATA
  #undef DEBUGCCW
-+#define KMSG_COMPONENT "ctcm"
 +
++#define KMSG_COMPONENT "ctcm"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/kernel.h>
-@@ -190,21 +192,22 @@ static void ctcmpc_chx_send_sweep(fsm_in
+@@ -190,21 +192,22 @@
  void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg)
  {
        CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR,
@@ -276368,7 +276297,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers
                fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch);
        }
  }
-@@ -886,8 +889,15 @@ static void ctcm_chx_rxiniterr(fsm_insta
+@@ -886,8 +889,15 @@
                        fsm_newstate(fi, CTC_STATE_RXERR);
                        fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
                }
@@ -276386,7 +276315,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -969,7 +979,9 @@ static void ctcm_chx_txiniterr(fsm_insta
+@@ -969,7 +979,9 @@
                        "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id,
                        ctc_ch_event_names[event], fsm_getstate_str(fi));
  
@@ -276397,7 +276326,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers
        }
  }
  
-@@ -2101,14 +2113,11 @@ static void dev_action_restart(fsm_insta
+@@ -2101,14 +2113,11 @@
        CTCMY_DBF_DEV_NAME(TRACE, dev, "");
  
        if (IS_MPC(priv)) {
@@ -276413,7 +276342,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers
  
        dev_action_stop(fi, event, arg);
        fsm_event(priv->fsm, DEV_EVENT_STOP, dev);
-@@ -2150,16 +2159,16 @@ static void dev_action_chup(fsm_instance
+@@ -2150,16 +2159,16 @@
        case DEV_STATE_STARTWAIT_RX:
                if (event == DEV_EVENT_RXUP) {
                        fsm_newstate(fi, DEV_STATE_RUNNING);
@@ -276434,19 +276363,19 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_fsms.c linux-2.6.27.19-5.1/drivers
                        ctcm_clear_busy(dev);
                }
                break;
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.c
---- linux-2.6.27/drivers/s390/net/ctcm_main.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.c   2009-03-25 16:11:23.000000000 +0000
-@@ -21,6 +21,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_main.c
+--- a/drivers/s390/net/ctcm_main.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_main.c     Wed May 06 16:56:32 2009 +0100
+@@ -20,6 +20,8 @@
+ #undef DEBUG
  #undef DEBUGDATA
  #undef DEBUGCCW
-+#define KMSG_COMPONENT "ctcm"
 +
++#define KMSG_COMPONENT "ctcm"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/kernel.h>
-@@ -281,14 +283,16 @@ static long ctcm_check_irb_error(struct 
+@@ -281,14 +283,16 @@
  
        switch (PTR_ERR(irb)) {
        case -EIO:
@@ -276467,7 +276396,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
        }
        return PTR_ERR(irb);
  }
-@@ -309,15 +313,17 @@ static inline void ccw_unit_check(struct
+@@ -309,15 +313,17 @@
        if (sense & SNS0_INTERVENTION_REQ) {
                if (sense & 0x01) {
                        if (ch->sense_rc != 0x01) {
@@ -276489,7 +276418,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
                                ch->sense_rc = SNS0_INTERVENTION_REQ;
                        }
                        fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch);
-@@ -1194,8 +1200,11 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1194,8 +1200,11 @@
  
        /* Check for unsolicited interrupts. */
        if (cgdev == NULL) {
@@ -276503,7 +276432,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -1207,31 +1216,34 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1207,31 +1216,34 @@
        else if (priv->channel[WRITE]->cdev == cdev)
                ch = priv->channel[WRITE];
        else {
@@ -276527,11 +276456,11 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
 +                      /* Explain: inconsistent internal structures */
                return;
        }
+-
 -      CTCM_DBF_TEXT_(TRACE, CTC_DBF_DEBUG,
 -              "%s(%s): int. for %s: cstat=%02x dstat=%02x",
 -                      CTCM_FUNTAIL, dev->name, ch->id, cstat, dstat);
--
        /* Copy interruption response block. */
        memcpy(ch->irb, irb, sizeof(struct irb));
  
@@ -276550,7 +276479,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -1239,7 +1251,7 @@ static void ctcm_irq_handler(struct ccw_
+@@ -1239,7 +1251,7 @@
        if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
                if ((irb->ecw[0] & ch->sense_rc) == 0)
                        /* print it only once */
@@ -276559,7 +276488,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
                                "%s(%s): sense=%02x, ds=%02x",
                                CTCM_FUNTAIL, ch->id, irb->ecw[0], dstat);
                ccw_unit_check(ch, irb->ecw[0]);
-@@ -1574,6 +1586,11 @@ static int ctcm_new_device(struct ccwgro
+@@ -1574,6 +1586,11 @@
  
        strlcpy(priv->fsm->name, dev->name, sizeof(priv->fsm->name));
  
@@ -276571,7 +276500,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
        CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
                "setup(%s) OK : r/w = %s/%s, protocol : %d", dev->name,
                        priv->channel[READ]->id,
-@@ -1687,7 +1704,7 @@ static void __exit ctcm_exit(void)
+@@ -1687,7 +1704,7 @@
  {
        unregister_cu3088_discipline(&ctcm_group_driver);
        ctcm_unregister_dbf_views();
@@ -276580,7 +276509,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
  }
  
  /*
-@@ -1695,7 +1712,7 @@ static void __exit ctcm_exit(void)
+@@ -1695,7 +1712,7 @@
   */
  static void print_banner(void)
  {
@@ -276589,7 +276518,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1717,8 +1734,8 @@ static int __init ctcm_init(void)
+@@ -1717,8 +1734,8 @@
        ret = register_cu3088_discipline(&ctcm_group_driver);
        if (ret) {
                ctcm_unregister_dbf_views();
@@ -276600,9 +276529,9 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.c linux-2.6.27.19-5.1/drivers
                return ret;
        }
        print_banner();
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.h linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.h
---- linux-2.6.27/drivers/s390/net/ctcm_main.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_main.h   2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/ctcm_main.h
+--- a/drivers/s390/net/ctcm_main.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_main.h     Wed May 06 16:56:32 2009 +0100
 @@ -41,12 +41,6 @@
  #define LOG_FLAG_NOMEM                8
  
@@ -276616,19 +276545,19 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_main.h linux-2.6.27.19-5.1/drivers
  
  #define CTCM_PR_DEBUG(fmt, arg...) \
        do { \
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_mpc.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_mpc.c
---- linux-2.6.27/drivers/s390/net/ctcm_mpc.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_mpc.c    2009-03-25 16:11:24.000000000 +0000
-@@ -19,6 +19,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_mpc.c
+--- a/drivers/s390/net/ctcm_mpc.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_mpc.c      Wed May 06 16:56:32 2009 +0100
+@@ -18,6 +18,8 @@
+ #undef DEBUG
  #undef DEBUGDATA
  #undef DEBUGCCW
-+#define KMSG_COMPONENT "ctcm"
 +
++#define KMSG_COMPONENT "ctcm"
  #include <linux/module.h>
  #include <linux/init.h>
- #include <linux/kernel.h>
-@@ -386,7 +388,7 @@ int ctc_mpc_alloc_channel(int port_num, 
+@@ -386,7 +388,7 @@
                if (grp->allocchan_callback_retries < 4) {
                        if (grp->allochanfunc)
                                grp->allochanfunc(grp->port_num,
@@ -276637,7 +276566,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_mpc.c linux-2.6.27.19-5.1/drivers/
                } else {
                        /* there are problems...bail out            */
                        /* there may be a state mismatch so restart */
-@@ -1232,8 +1234,9 @@ done:
+@@ -1232,8 +1234,9 @@
  
        dev_kfree_skb_any(pskb);
        if (sendrc == NET_RX_DROP) {
@@ -276649,7 +276578,7 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_mpc.c linux-2.6.27.19-5.1/drivers/
                fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
        }
  
-@@ -1670,10 +1673,11 @@ static int mpc_validate_xid(struct mpcg_
+@@ -1670,10 +1673,11 @@
                                        CTCM_FUNTAIL, ch->id);
                }
        }
@@ -276663,21 +276592,21 @@ diff -purN linux-2.6.27/drivers/s390/net/ctcm_mpc.c linux-2.6.27.19-5.1/drivers/
                priv->xid->xid2_flag2 = 0x40;
                grp->saved_xid2->xid2_flag2 = 0x40;
        }
-diff -purN linux-2.6.27/drivers/s390/net/ctcm_sysfs.c linux-2.6.27.19-5.1/drivers/s390/net/ctcm_sysfs.c
---- linux-2.6.27/drivers/s390/net/ctcm_sysfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/ctcm_sysfs.c  2009-03-25 16:11:23.000000000 +0000
-@@ -10,6 +10,8 @@
+diff -r 9608d5473017 drivers/s390/net/ctcm_sysfs.c
+--- a/drivers/s390/net/ctcm_sysfs.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/ctcm_sysfs.c    Wed May 06 16:56:32 2009 +0100
+@@ -9,6 +9,8 @@
+ #undef DEBUG
  #undef DEBUGDATA
  #undef DEBUGCCW
-+#define KMSG_COMPONENT "ctcm"
 +
++#define KMSG_COMPONENT "ctcm"
  #include <linux/sysfs.h>
  #include "ctcm_main.h"
-diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/net/lcs.c
---- linux-2.6.27/drivers/s390/net/lcs.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/lcs.c 2009-03-25 16:11:23.000000000 +0000
+diff -r 9608d5473017 drivers/s390/net/lcs.c
+--- a/drivers/s390/net/lcs.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/lcs.c   Wed May 06 16:56:32 2009 +0100
 @@ -26,6 +26,8 @@
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
@@ -276687,16 +276616,16 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
  #include <linux/module.h>
  #include <linux/if.h>
  #include <linux/netdevice.h>
-@@ -54,8 +56,6 @@
+@@ -53,8 +55,6 @@
+     !defined(CONFIG_TR) && !defined(CONFIG_FDDI)
  #error Cannot compile lcs.c without some net devices switched on.
  #endif
--#define PRINTK_HEADER         " lcs: "
 -
+-#define PRINTK_HEADER         " lcs: "
  /**
   * initialization string for output
-  */
-@@ -96,7 +96,7 @@ lcs_register_debug_facility(void)
+@@ -96,7 +96,7 @@
        lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8);
        lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8);
        if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) {
@@ -276705,7 +276634,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                lcs_unregister_debug_facility();
                return -ENOMEM;
        }
-@@ -502,7 +502,9 @@ lcs_start_channel(struct lcs_channel *ch
+@@ -502,7 +502,9 @@
        spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
        if (rc) {
                LCS_DBF_TEXT_(4,trace,"essh%s", channel->ccwdev->dev.bus_id);
@@ -276716,7 +276645,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        }
        return rc;
  }
-@@ -636,7 +638,9 @@ __lcs_resume_channel(struct lcs_channel 
+@@ -636,7 +638,9 @@
        rc = ccw_device_resume(channel->ccwdev);
        if (rc) {
                LCS_DBF_TEXT_(4, trace, "ersc%s", channel->ccwdev->dev.bus_id);
@@ -276727,7 +276656,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        } else
                channel->state = LCS_CH_STATE_RUNNING;
        return rc;
-@@ -1082,7 +1086,7 @@ lcs_check_multicast_support(struct lcs_c
+@@ -1082,7 +1086,7 @@
        cmd->cmd.lcs_qipassist.num_ip_pairs = 1;
        rc = lcs_send_lancmd(card, buffer, __lcs_check_multicast_cb);
        if (rc != 0) {
@@ -276736,7 +276665,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                return -EOPNOTSUPP;
        }
        if (card->ip_assists_supported & LCS_IPASS_MULTICAST_SUPPORT)
-@@ -1115,8 +1119,8 @@ list_modified:
+@@ -1115,8 +1119,8 @@
                        rc = lcs_send_setipm(card, ipm);
                        spin_lock_irqsave(&card->ipm_lock, flags);
                        if (rc) {
@@ -276747,7 +276676,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                                /* store ipm in failed list -> will be added
                                 * to ipm_list again, so a retry will be done
                                 * during the next call of this function */
-@@ -1227,8 +1231,8 @@ lcs_set_mc_addresses(struct lcs_card *ca
+@@ -1227,8 +1231,8 @@
                ipm = (struct lcs_ipm_list *)
                        kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC);
                if (ipm == NULL) {
@@ -276758,7 +276687,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                        break;
                }
                memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH);
-@@ -1302,18 +1306,21 @@ lcs_check_irb_error(struct ccw_device *c
+@@ -1302,18 +1306,21 @@
  
        switch (PTR_ERR(irb)) {
        case -EIO:
@@ -276784,7 +276713,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                LCS_DBF_TEXT(2, trace, "ckirberr");
                LCS_DBF_TEXT(2, trace, "  rc???");
        }
-@@ -1399,8 +1406,10 @@ lcs_irq(struct ccw_device *cdev, unsigne
+@@ -1399,8 +1406,10 @@
        /* Check for channel and device errors presented */
        rc = lcs_get_problem(cdev, irb);
        if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) {
@@ -276797,7 +276726,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                if (rc) {
                        channel->state = LCS_CH_STATE_ERROR;
                }
-@@ -1757,8 +1766,8 @@ lcs_get_control(struct lcs_card *card, s
+@@ -1757,8 +1766,8 @@
                        lcs_schedule_recovery(card);
                        break;
                case LCS_CMD_STOPLAN:
@@ -276808,7 +276737,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                        if (card->dev)
                                netif_carrier_off(card->dev);
                        break;
-@@ -1786,7 +1795,8 @@ lcs_get_skb(struct lcs_card *card, char 
+@@ -1786,7 +1795,8 @@
  
        skb = dev_alloc_skb(skb_len);
        if (skb == NULL) {
@@ -276818,7 +276747,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                          card->dev->name);
                card->stats.rx_dropped++;
                return;
-@@ -1882,7 +1892,8 @@ lcs_stop_device(struct net_device *dev)
+@@ -1882,7 +1892,8 @@
                (card->write.state != LCS_CH_STATE_RUNNING));
        rc = lcs_stopcard(card);
        if (rc)
@@ -276828,7 +276757,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        return rc;
  }
  
-@@ -1901,7 +1912,7 @@ lcs_open_device(struct net_device *dev)
+@@ -1901,7 +1912,7 @@
        /* initialize statistics */
        rc = lcs_detect(card);
        if (rc) {
@@ -276837,7 +276766,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
  
        } else {
                dev->flags |= IFF_UP;
-@@ -2109,8 +2120,9 @@ lcs_new_device(struct ccwgroup_device *c
+@@ -2109,8 +2120,9 @@
        rc = lcs_detect(card);
        if (rc) {
                LCS_DBF_TEXT(2, setup, "dtctfail");
@@ -276849,7 +276778,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                lcs_stopcard(card);
                goto out;
        }
-@@ -2140,7 +2152,7 @@ lcs_new_device(struct ccwgroup_device *c
+@@ -2140,7 +2152,7 @@
  #endif
        default:
                LCS_DBF_TEXT(3, setup, "errinit");
@@ -276858,7 +276787,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                goto out;
        }
        if (!dev)
-@@ -2172,13 +2184,13 @@ netdev_out:
+@@ -2172,13 +2184,13 @@
                goto out;
  
        /* Print out supported assists: IPv6 */
@@ -276878,7 +276807,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        return 0;
  out:
  
-@@ -2244,15 +2256,16 @@ lcs_recovery(void *ptr)
+@@ -2244,15 +2256,16 @@
                return 0;
        LCS_DBF_TEXT(4, trace, "recover2");
        gdev = card->gdev;
@@ -276900,7 +276829,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD);
        return 0;
  }
-@@ -2304,17 +2317,17 @@ __init lcs_init_module(void)
+@@ -2304,17 +2317,17 @@
  {
        int rc;
  
@@ -276921,7 +276850,7 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
                return rc;
        }
        return 0;
-@@ -2327,7 +2340,7 @@ __init lcs_init_module(void)
+@@ -2327,7 +2340,7 @@
  static void
  __exit lcs_cleanup_module(void)
  {
@@ -276930,19 +276859,19 @@ diff -purN linux-2.6.27/drivers/s390/net/lcs.c linux-2.6.27.19-5.1/drivers/s390/
        LCS_DBF_TEXT(0, trace, "cleanup");
        unregister_cu3088_discipline(&lcs_group_driver);
        lcs_unregister_debug_facility();
-diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s390/net/netiucv.c
---- linux-2.6.27/drivers/s390/net/netiucv.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/netiucv.c     2009-03-25 16:11:23.000000000 +0000
-@@ -31,6 +31,8 @@
+diff -r 9608d5473017 drivers/s390/net/netiucv.c
+--- a/drivers/s390/net/netiucv.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/netiucv.c       Wed May 06 16:56:32 2009 +0100
+@@ -30,6 +30,8 @@
+  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   *
   */
-+#define KMSG_COMPONENT "netiucv"
 +
++#define KMSG_COMPONENT "netiucv"
  #undef DEBUG
  
- #include <linux/module.h>
-@@ -846,7 +848,8 @@ static void conn_action_connsever(fsm_in
+@@ -846,7 +848,8 @@
  
        fsm_deltimer(&conn->timer);
        iucv_path_sever(conn->path, NULL);
@@ -276952,7 +276881,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
        IUCV_DBF_TEXT(data, 2,
                      "conn_action_connsever: Remote dropped connection\n");
        fsm_newstate(fi, CONN_STATE_STARTWAIT);
-@@ -856,13 +859,15 @@ static void conn_action_connsever(fsm_in
+@@ -856,13 +859,15 @@
  static void conn_action_start(fsm_instance *fi, int event, void *arg)
  {
        struct iucv_connection *conn = arg;
@@ -276969,7 +276898,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
  
        /*
         * We must set the state before calling iucv_connect because the
-@@ -876,41 +881,45 @@ static void conn_action_start(fsm_instan
+@@ -876,41 +881,45 @@
                               NULL, iucvMagic, conn);
        switch (rc) {
        case 0:
@@ -277031,7 +276960,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
                fsm_newstate(fi, CONN_STATE_CONNERR);
                break;
        }
-@@ -1059,8 +1068,9 @@ dev_action_connup(fsm_instance *fi, int 
+@@ -1059,8 +1068,9 @@
        switch (fsm_getstate(fi)) {
                case DEV_STATE_STARTWAIT:
                        fsm_newstate(fi, DEV_STATE_RUNNING);
@@ -277043,7 +276972,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
                        IUCV_DBF_TEXT(setup, 3,
                                "connection is up and running\n");
                        break;
-@@ -1982,6 +1992,8 @@ static ssize_t conn_write(struct device_
+@@ -1982,6 +1992,8 @@
        if (rc)
                goto out_unreg;
  
@@ -277052,7 +276981,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
  
        return count;
  
-@@ -2027,10 +2039,9 @@ static ssize_t remove_write (struct devi
+@@ -2027,10 +2039,9 @@
                        continue;
                read_unlock_bh(&iucv_connection_rwlock);
                  if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
@@ -277066,7 +276995,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
                        IUCV_DBF_TEXT(data, 2, "remove_write: still active\n");
                        return -EPERM;
                  }
-@@ -2062,7 +2073,7 @@ static struct attribute_group *netiucv_d
+@@ -2062,7 +2073,7 @@
  
  static void netiucv_banner(void)
  {
@@ -277075,7 +277004,7 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
  }
  
  static void __exit netiucv_exit(void)
-@@ -2088,7 +2099,7 @@ static void __exit netiucv_exit(void)
+@@ -2088,7 +2099,7 @@
        iucv_unregister(&netiucv_handler, 1);
        iucv_unregister_dbf_views();
  
@@ -277084,31 +277013,31 @@ diff -purN linux-2.6.27/drivers/s390/net/netiucv.c linux-2.6.27.19-5.1/drivers/s
        return;
  }
  
-diff -purN linux-2.6.27/drivers/s390/net/qeth_core.h linux-2.6.27.19-5.1/drivers/s390/net/qeth_core.h
---- linux-2.6.27/drivers/s390/net/qeth_core.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_core.h   2009-03-25 16:11:24.000000000 +0000
-@@ -34,8 +34,6 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_core.h
+--- a/drivers/s390/net/qeth_core.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_core.h     Wed May 06 16:56:32 2009 +0100
+@@ -33,8 +33,6 @@
+ #include <asm/ccwgroup.h>
  
  #include "qeth_core_mpc.h"
--#define KMSG_COMPONENT "qeth"
 -
+-#define KMSG_COMPONENT "qeth"
  /**
   * Debug Facility stuff
-  */
-@@ -74,11 +72,6 @@ struct qeth_dbf_info {
+@@ -73,11 +71,6 @@
  #define QETH_DBF_TEXT_(name, level, text...) \
        qeth_dbf_longtext(QETH_DBF_##name, level, text)
+-
 -/**
 - * some more debug stuff
 - */
 -#define PRINTK_HEADER "qeth: "
--
  #define SENSE_COMMAND_REJECT_BYTE 0
  #define SENSE_COMMAND_REJECT_FLAG 0x80
- #define SENSE_RESETTING_EVENT_BYTE 1
-@@ -649,7 +642,6 @@ struct qeth_card_options {
+@@ -649,7 +642,6 @@
        int macaddr_mode;
        int fake_broadcast;
        int add_hhlen;
@@ -277116,19 +277045,19 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core.h linux-2.6.27.19-5.1/drivers
        int layer2;
        enum qeth_large_send_types large_send;
        int performance_stats;
-diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_core_main.c
---- linux-2.6.27/drivers/s390/net/qeth_core_main.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_core_main.c      2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_core_main.c
+--- a/drivers/s390/net/qeth_core_main.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_core_main.c        Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+  *             Thomas Spatzier <tspat@de.ibm.com>,
   *             Frank Blaschka <frank.blaschka@de.ibm.com>
   */
-+#define KMSG_COMPONENT "qeth"
 +
++#define KMSG_COMPONENT "qeth"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -319,7 +321,10 @@ static int qeth_issue_next_read(struct q
+@@ -319,7 +321,10 @@
                return -EIO;
        iob = qeth_get_buffer(&card->read);
        if (!iob) {
@@ -277140,7 +277069,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                return -ENOMEM;
        }
        qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE);
-@@ -327,7 +332,8 @@ static int qeth_issue_next_read(struct q
+@@ -327,7 +332,8 @@
        rc = ccw_device_start(card->read.ccwdev, &card->read.ccw,
                              (addr_t) iob, 0, 0);
        if (rc) {
@@ -277150,7 +277079,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                atomic_set(&card->read.irq_pending, 0);
                qeth_schedule_recovery(card);
                wake_up(&card->wait_q);
-@@ -393,10 +399,9 @@ static struct qeth_ipa_cmd *qeth_check_i
+@@ -393,10 +399,9 @@
                } else {
                        switch (cmd->hdr.command) {
                        case IPA_CMD_STOPLAN:
@@ -277164,7 +277093,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                                           QETH_CARD_IFNAME(card),
                                           card->info.chpid);
                                card->lan_online = 0;
-@@ -404,9 +409,9 @@ static struct qeth_ipa_cmd *qeth_check_i
+@@ -404,9 +409,9 @@
                                        netif_carrier_off(card->dev);
                                return NULL;
                        case IPA_CMD_STARTLAN:
@@ -277177,7 +277106,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                                           QETH_CARD_IFNAME(card),
                                           card->info.chpid);
                                netif_carrier_on(card->dev);
-@@ -458,7 +463,7 @@ static int qeth_check_idx_response(unsig
+@@ -458,7 +463,7 @@
  
        QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN);
        if ((buffer[2] & 0xc0) == 0xc0) {
@@ -277186,7 +277115,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                           "with cause code 0x%02x%s\n",
                           buffer[4],
                           ((buffer[4] == 0x22) ?
-@@ -566,6 +571,10 @@ static void qeth_send_control_data_cb(st
+@@ -566,6 +571,10 @@
        card = CARD_FROM_CDEV(channel->ccwdev);
        if (qeth_check_idx_response(iob->data)) {
                qeth_clear_ipacmd_list(card);
@@ -277197,7 +277126,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                qeth_schedule_recovery(card);
                goto out;
        }
-@@ -744,8 +753,10 @@ static int qeth_get_problem(struct ccw_d
+@@ -744,8 +753,10 @@
                     SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
                     SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
                QETH_DBF_TEXT(TRACE, 2, "CGENCHK");
@@ -277210,7 +277139,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET,
                                16, 1, irb, 64, 1);
                return 1;
-@@ -760,7 +771,7 @@ static int qeth_get_problem(struct ccw_d
+@@ -760,7 +771,7 @@
                if (sense[SENSE_COMMAND_REJECT_BYTE] &
                    SENSE_COMMAND_REJECT_FLAG) {
                        QETH_DBF_TEXT(TRACE, 2, "CMDREJi");
@@ -277219,7 +277148,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                }
                if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) {
                        QETH_DBF_TEXT(TRACE, 2, "AFFE");
-@@ -784,12 +795,14 @@ static long __qeth_check_irb_error(struc
+@@ -784,12 +795,14 @@
  
        switch (PTR_ERR(irb)) {
        case -EIO:
@@ -277236,7 +277165,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                QETH_DBF_TEXT(TRACE, 2, "ckirberr");
                QETH_DBF_TEXT_(TRACE, 2, "  rc%d", -ETIMEDOUT);
                if (intparm == QETH_RCD_PARM) {
-@@ -802,8 +815,8 @@ static long __qeth_check_irb_error(struc
+@@ -802,8 +815,8 @@
                }
                break;
        default:
@@ -277247,7 +277176,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                QETH_DBF_TEXT(TRACE, 2, "ckirberr");
                QETH_DBF_TEXT(TRACE, 2, "  rc???");
        }
-@@ -869,10 +882,12 @@ static void qeth_irq(struct ccw_device *
+@@ -869,10 +882,12 @@
            (dstat & DEV_STAT_UNIT_CHECK) ||
            (cstat)) {
                if (irb->esw.esw0.erw.cons) {
@@ -277264,7 +277193,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                        print_hex_dump(KERN_WARNING, "qeth: irb ",
                                DUMP_PREFIX_OFFSET, 16, 1, irb, 32, 1);
                        print_hex_dump(KERN_WARNING, "qeth: sense data ",
-@@ -884,6 +899,7 @@ static void qeth_irq(struct ccw_device *
+@@ -884,6 +899,7 @@
                }
                rc = qeth_get_problem(cdev, irb);
                if (rc) {
@@ -277272,7 +277201,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                        qeth_schedule_recovery(card);
                        goto out;
                }
-@@ -1059,7 +1075,6 @@ static void qeth_set_intial_options(stru
+@@ -1059,7 +1075,6 @@
        card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL;
        card->options.fake_broadcast = 0;
        card->options.add_hhlen = DEFAULT_ADD_HHLEN;
@@ -277280,7 +277209,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        card->options.performance_stats = 0;
        card->options.rx_sg_cb = QETH_RX_SG_CB;
  }
-@@ -1174,8 +1189,8 @@ static int qeth_determine_card_type(stru
+@@ -1174,8 +1189,8 @@
                        card->qdio.no_out_queues = known_devices[i][8];
                        card->info.is_multicast_different = known_devices[i][9];
                        if (qeth_is_1920_device(card)) {
@@ -277291,7 +277220,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                                card->qdio.no_out_queues = 1;
                                card->qdio.default_out_queue = 0;
                        }
-@@ -1184,7 +1199,8 @@ static int qeth_determine_card_type(stru
+@@ -1184,7 +1199,8 @@
                i++;
        }
        card->info.type = QETH_CARD_TYPE_UNKNOWN;
@@ -277301,7 +277230,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        return -ENOENT;
  }
  
-@@ -1367,8 +1383,8 @@ static int qeth_get_unitaddr(struct qeth
+@@ -1367,8 +1383,8 @@
        QETH_DBF_TEXT(SETUP, 2, "getunit");
        rc = qeth_read_conf_data(card, (void **) &prcd, &length);
        if (rc) {
@@ -277312,7 +277241,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                return rc;
        }
        card->info.chpid = prcd[30];
-@@ -1518,7 +1534,10 @@ static int qeth_idx_activate_channel(str
+@@ -1518,7 +1534,10 @@
        if (rc == -ERESTARTSYS)
                return rc;
        if (channel->state != CH_STATE_ACTIVATING) {
@@ -277324,19 +277253,20 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME);
                qeth_clear_cmd_buffers(channel);
                return -ETIME;
-@@ -1551,20 +1570,21 @@ static void qeth_idx_write_cb(struct qet
+@@ -1551,20 +1570,21 @@
  
        if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
                if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
 -                      PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
 -                              "adapter exclusively used by another host\n",
 -                      CARD_WDEV_ID(card));
+-              else
+-                      PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
+-                              "negative reply\n", CARD_WDEV_ID(card));
 +                      dev_err(&card->write.ccwdev->dev,
 +                              "The adapter is used exclusively by another "
 +                              "host\n");
-               else
--                      PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
--                              "negative reply\n", CARD_WDEV_ID(card));
++              else
 +                      QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel:"
 +                              " negative reply\n",
 +                              dev_name(&card->write.ccwdev->dev));
@@ -277355,26 +277285,27 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                goto out;
        }
        channel->state = CH_STATE_UP;
-@@ -1590,12 +1610,13 @@ static void qeth_idx_read_cb(struct qeth
+@@ -1590,12 +1610,13 @@
  
        if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
                if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
 -                      PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
 -                              "adapter exclusively used by another host\n",
 -                              CARD_RDEV_ID(card));
+-              else
+-                      PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
+-                              "negative reply\n", CARD_RDEV_ID(card));
 +                      dev_err(&card->write.ccwdev->dev,
 +                              "The adapter is used exclusively by another "
 +                              "host\n");
-               else
--                      PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
--                              "negative reply\n", CARD_RDEV_ID(card));
++              else
 +                      QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:"
 +                              " negative reply\n",
 +                              dev_name(&card->read.ccwdev->dev));
                goto out;
        }
  
-@@ -1609,9 +1630,10 @@ static void qeth_idx_read_cb(struct qeth
+@@ -1609,9 +1630,10 @@
  
        memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
        if (temp != qeth_peer_func_level(card->info.func_level)) {
@@ -277388,7 +277319,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                goto out;
        }
        memcpy(&card->token.issuer_rm_r,
-@@ -1685,8 +1707,9 @@ int qeth_send_control_data(struct qeth_c
+@@ -1685,8 +1707,9 @@
                              (addr_t) iob, 0, 0);
        spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags);
        if (rc) {
@@ -277400,7 +277331,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
                spin_lock_irqsave(&card->lock, flags);
                list_del_init(&reply->list);
-@@ -2169,11 +2192,8 @@ static void qeth_print_status_with_portn
+@@ -2169,11 +2192,8 @@
                dbf_text[i] =
                        (char) _ebcasc[(__u8) dbf_text[i]];
        dbf_text[8] = 0;
@@ -277413,7 +277344,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
               qeth_get_cardname(card),
               (card->info.mcl_level[0]) ? " (level: " : "",
               (card->info.mcl_level[0]) ? card->info.mcl_level : "",
-@@ -2186,23 +2206,17 @@ static void qeth_print_status_with_portn
+@@ -2186,23 +2206,17 @@
  static void qeth_print_status_no_portname(struct qeth_card *card)
  {
        if (card->info.portname[0])
@@ -277439,7 +277370,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                       qeth_get_cardname(card),
                       (card->info.mcl_level[0]) ? " (level: " : "",
                       (card->info.mcl_level[0]) ? card->info.mcl_level : "",
-@@ -2228,7 +2242,8 @@ void qeth_print_status_message(struct qe
+@@ -2228,7 +2242,8 @@
                }
                /* fallthrough */
        case QETH_CARD_TYPE_IQD:
@@ -277449,7 +277380,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                        card->info.mcl_level[0] = (char) _ebcasc[(__u8)
                                card->info.mcl_level[0]];
                        card->info.mcl_level[1] = (char) _ebcasc[(__u8)
-@@ -2629,9 +2644,8 @@ void qeth_queue_input_buffer(struct qeth
+@@ -2629,9 +2644,8 @@
                                qeth_get_micros() -
                                card->perf_stats.inbound_do_qdio_start_time;
                if (rc) {
@@ -277461,7 +277392,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                        QETH_DBF_TEXT(TRACE, 2, "qinberr");
                        QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
                }
-@@ -3024,7 +3038,7 @@ static inline void __qeth_fill_buffer(st
+@@ -3024,7 +3038,7 @@
        struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill,
        int offset)
  {
@@ -277470,7 +277401,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        int length_here;
        int element;
        char *data;
-@@ -3036,6 +3050,7 @@ static inline void __qeth_fill_buffer(st
+@@ -3036,6 +3050,7 @@
  
        if (offset >= 0) {
                data = skb->data + offset;
@@ -277478,7 +277409,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                first_lap = 0;
        }
  
-@@ -3755,7 +3770,7 @@ static int qeth_core_driver_group(const 
+@@ -3755,7 +3770,7 @@
  
  int qeth_core_hardsetup_card(struct qeth_card *card)
  {
@@ -277487,7 +277418,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        int retries = 3;
        int mpno = 0;
        int rc;
-@@ -3764,7 +3779,8 @@ int qeth_core_hardsetup_card(struct qeth
+@@ -3764,7 +3779,8 @@
        atomic_set(&card->force_alloc_skb, 0);
  retry:
        if (retries < 3) {
@@ -277497,7 +277428,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                ccw_device_set_offline(CARD_DDEV(card));
                ccw_device_set_offline(CARD_WDEV(card));
                ccw_device_set_offline(CARD_RDEV(card));
-@@ -3790,9 +3806,16 @@ retry:
+@@ -3790,9 +3806,16 @@
                return rc;
        }
  
@@ -277517,7 +277448,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        if (mpno)
                mpno = min(mpno - 1, QETH_MAX_PORTNO);
        if (card->info.portno > mpno) {
-@@ -3832,7 +3855,10 @@ retry:
+@@ -3832,7 +3855,10 @@
        }
        return 0;
  out:
@@ -277529,7 +277460,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        return rc;
  }
  EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card);
-@@ -4052,8 +4078,8 @@ int qeth_core_load_discipline(struct qet
+@@ -4052,8 +4078,8 @@
                break;
        }
        if (!card->discipline.ccwgdriver) {
@@ -277540,7 +277471,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
                rc = -EINVAL;
        }
        return rc;
-@@ -4147,6 +4173,7 @@ static void qeth_core_remove_device(stru
+@@ -4147,6 +4173,7 @@
        unsigned long flags;
        struct qeth_card *card = dev_get_drvdata(&gdev->dev);
  
@@ -277548,7 +277479,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        if (card->discipline.ccwgdriver) {
                card->discipline.ccwgdriver->remove(gdev);
                qeth_core_free_discipline(card);
-@@ -4445,7 +4472,7 @@ static int __init qeth_core_init(void)
+@@ -4445,7 +4472,7 @@
  {
        int rc;
  
@@ -277557,7 +277488,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        INIT_LIST_HEAD(&qeth_core_card_list.list);
        rwlock_init(&qeth_core_card_list.rwlock);
  
-@@ -4485,9 +4512,10 @@ driver_err:
+@@ -4485,9 +4512,10 @@
  ccwgroup_err:
        ccw_driver_unregister(&qeth_ccw_driver);
  ccw_err:
@@ -277569,7 +277500,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
        return rc;
  }
  
-@@ -4500,7 +4528,7 @@ static void __exit qeth_core_exit(void)
+@@ -4500,7 +4528,7 @@
        ccw_driver_unregister(&qeth_ccw_driver);
        kmem_cache_destroy(qeth_core_header_cache);
        qeth_unregister_dbf_views();
@@ -277578,19 +277509,19 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_core_main.c linux-2.6.27.19-5.1/dr
  }
  
  module_init(qeth_core_init);
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l2_main.c
---- linux-2.6.27/drivers/s390/net/qeth_l2_main.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l2_main.c        2009-03-25 16:11:24.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_l2_main.c
+--- a/drivers/s390/net/qeth_l2_main.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l2_main.c  Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+  *             Thomas Spatzier <tspat@de.ibm.com>,
   *             Frank Blaschka <frank.blaschka@de.ibm.com>
   */
-+#define KMSG_COMPONENT "qeth"
 +
++#define KMSG_COMPONENT "qeth"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -395,7 +397,8 @@ static int qeth_l2_stop_card(struct qeth
+@@ -395,7 +397,8 @@
        }
        if (card->state == CARD_STATE_SOFTSETUP) {
                qeth_l2_process_vlans(card, 1);
@@ -277600,7 +277531,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                qeth_clear_ipacmd_list(card);
                card->state = CARD_STATE_HARDSETUP;
        }
-@@ -450,12 +453,15 @@ static void qeth_l2_process_inbound_buff
+@@ -450,12 +453,15 @@
                        netif_rx(skb);
                        break;
                case QETH_HEADER_TYPE_OSN:
@@ -277621,7 +277552,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                default:
                        dev_kfree_skb_any(skb);
                        QETH_DBF_TEXT(TRACE, 3, "inbunkno");
-@@ -501,12 +507,13 @@ static int qeth_l2_send_setmac_cb(struct
+@@ -501,12 +507,13 @@
                card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
                memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac,
                       OSA_ADDR_LEN);
@@ -277641,7 +277572,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
        }
        return 0;
  }
-@@ -559,7 +566,8 @@ static int qeth_l2_request_initial_mac(s
+@@ -559,7 +566,8 @@
                        "device %s: x%x\n", CARD_BUS_ID(card), rc);
        }
  
@@ -277651,7 +277582,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                rc = qeth_setadpparms_change_macaddr(card);
                if (rc) {
                        QETH_DBF_MESSAGE(2, "couldn't get MAC address on "
-@@ -825,7 +833,6 @@ static int qeth_l2_open(struct net_devic
+@@ -825,7 +833,6 @@
        }
        card->data.state = CH_STATE_UP;
        card->state = CARD_STATE_UP;
@@ -277659,7 +277590,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
        netif_start_queue(dev);
  
        if (!card->lan_online && netif_carrier_ok(dev))
-@@ -840,7 +847,6 @@ static int qeth_l2_stop(struct net_devic
+@@ -840,7 +847,6 @@
  
        QETH_DBF_TEXT(TRACE, 4, "qethstop");
        netif_tx_disable(dev);
@@ -277667,7 +277598,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
        if (card->state == CARD_STATE_UP)
                card->state = CARD_STATE_SOFTSETUP;
        return 0;
-@@ -976,8 +982,6 @@ static int __qeth_l2_set_online(struct c
+@@ -976,8 +982,6 @@
  
        qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
        if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
@@ -277676,7 +277607,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                return -ERESTARTSYS;
        }
  
-@@ -1020,9 +1024,8 @@ static int __qeth_l2_set_online(struct c
+@@ -1020,9 +1024,8 @@
        if (rc) {
                QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
                if (rc == 0xe080) {
@@ -277688,7 +277619,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                        card->lan_online = 0;
                }
                return rc;
-@@ -1092,8 +1095,6 @@ static int __qeth_l2_set_offline(struct 
+@@ -1092,8 +1095,6 @@
                netif_carrier_off(card->dev);
        recover_flag = card->state;
        if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) {
@@ -277697,7 +277628,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
                return -ERESTARTSYS;
        }
        rc  = ccw_device_set_offline(CARD_DDEV(card));
-@@ -1126,8 +1127,8 @@ static int qeth_l2_recover(void *ptr)
+@@ -1126,8 +1127,8 @@
        if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
                return 0;
        QETH_DBF_TEXT(TRACE, 2, "recover2");
@@ -277708,7 +277639,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
        card->use_hard_stop = 1;
        __qeth_l2_set_offline(card->gdev, 1);
        rc = __qeth_l2_set_online(card->gdev, 1);
-@@ -1135,23 +1136,29 @@ static int qeth_l2_recover(void *ptr)
+@@ -1135,23 +1136,29 @@
        qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
        qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
        if (!rc)
@@ -277745,19 +277676,19 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l2_main.c linux-2.6.27.19-5.1/driv
  }
  
  static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_main.c
---- linux-2.6.27/drivers/s390/net/qeth_l3_main.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_main.c        2009-03-25 16:11:23.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 drivers/s390/net/qeth_l3_main.c
+--- a/drivers/s390/net/qeth_l3_main.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l3_main.c  Wed May 06 16:56:32 2009 +0100
+@@ -7,6 +7,8 @@
+  *             Thomas Spatzier <tspat@de.ibm.com>,
   *             Frank Blaschka <frank.blaschka@de.ibm.com>
   */
-+#define KMSG_COMPONENT "qeth"
 +
++#define KMSG_COMPONENT "qeth"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/string.h>
-@@ -917,8 +919,8 @@ static int qeth_l3_register_addr_entry(s
+@@ -917,8 +919,8 @@
        if (rc) {
                QETH_DBF_TEXT(TRACE, 2, "FAILED");
                qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
@@ -277768,7 +277699,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
        return rc;
  }
-@@ -1029,24 +1031,22 @@ static int qeth_l3_setadapter_parms(stru
+@@ -1029,24 +1031,22 @@
        QETH_DBF_TEXT(SETUP, 2, "setadprm");
  
        if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
@@ -277799,7 +277730,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
  
        if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
-@@ -1160,16 +1160,17 @@ static int qeth_l3_start_ipa_arp_process
+@@ -1160,16 +1160,17 @@
        QETH_DBF_TEXT(TRACE, 3, "ipaarp");
  
        if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
@@ -277822,7 +277753,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
        return rc;
  }
-@@ -1181,19 +1182,21 @@ static int qeth_l3_start_ipa_ip_fragment
+@@ -1181,19 +1182,21 @@
        QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
  
        if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
@@ -277850,7 +277781,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        return rc;
  }
  
-@@ -1203,21 +1206,19 @@ static int qeth_l3_start_ipa_source_mac(
+@@ -1203,21 +1206,19 @@
  
        QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
  
@@ -277878,7 +277809,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        return rc;
  }
  
-@@ -1228,19 +1229,19 @@ static int qeth_l3_start_ipa_vlan(struct
+@@ -1228,19 +1229,19 @@
        QETH_DBF_TEXT(TRACE, 3, "strtvlan");
  
        if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
@@ -277904,7 +277835,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
        return rc;
  }
-@@ -1252,19 +1253,20 @@ static int qeth_l3_start_ipa_multicast(s
+@@ -1252,19 +1253,20 @@
        QETH_DBF_TEXT(TRACE, 3, "stmcast");
  
        if (!qeth_is_supported(card, IPA_MULTICASTING)) {
@@ -277931,7 +277862,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                card->dev->flags |= IFF_MULTICAST;
        }
        return rc;
-@@ -1315,36 +1317,37 @@ static int qeth_l3_softsetup_ipv6(struct
+@@ -1315,36 +1317,37 @@
  
        rc = qeth_l3_query_ipassists(card, QETH_PROT_IPV6);
        if (rc) {
@@ -277981,7 +277912,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        return 0;
  }
  #endif
-@@ -1356,8 +1359,8 @@ static int qeth_l3_start_ipa_ipv6(struct
+@@ -1356,8 +1359,8 @@
        QETH_DBF_TEXT(TRACE, 3, "strtipv6");
  
        if (!qeth_is_supported(card, IPA_IPV6)) {
@@ -277992,7 +277923,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                return 0;
        }
  #ifdef CONFIG_QETH_IPV6
-@@ -1373,34 +1376,35 @@ static int qeth_l3_start_ipa_broadcast(s
+@@ -1373,34 +1376,35 @@
        QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
        card->info.broadcast_capable = 0;
        if (!qeth_is_supported(card, IPA_FILTERING)) {
@@ -278038,7 +277969,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                goto out;
        }
        card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO;
-@@ -1419,18 +1423,18 @@ static int qeth_l3_send_checksum_command
+@@ -1419,18 +1423,18 @@
        rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
                                          IPA_CMD_ASS_START, 0);
        if (rc) {
@@ -278063,7 +277994,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                return rc;
        }
        return 0;
-@@ -1443,26 +1447,30 @@ static int qeth_l3_start_ipa_checksum(st
+@@ -1443,26 +1447,30 @@
        QETH_DBF_TEXT(TRACE, 3, "strtcsum");
  
        if (card->options.checksum_type == NO_CHECKSUMMING) {
@@ -278103,7 +278034,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
  
        return rc;
  }
-@@ -1474,18 +1482,20 @@ static int qeth_l3_start_ipa_tso(struct 
+@@ -1474,18 +1482,20 @@
        QETH_DBF_TEXT(TRACE, 3, "sttso");
  
        if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
@@ -278130,7 +278061,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
        if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)) {
                card->options.large_send = QETH_LARGE_SEND_NO;
-@@ -1578,12 +1588,8 @@ static int qeth_l3_get_unique_id_cb(stru
+@@ -1578,12 +1588,8 @@
        else {
                card->info.unique_id =  UNIQUE_ID_IF_CREATE_ADDR_FAILED |
                                        UNIQUE_ID_NOT_BY_CARD;
@@ -278145,7 +278076,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
        return 0;
  }
-@@ -1911,8 +1917,13 @@ static inline __u16 qeth_l3_rebuild_skb(
+@@ -1911,8 +1917,13 @@
                        memcpy(tg_addr, card->dev->dev_addr,
                                card->dev->addr_len);
                }
@@ -278161,7 +278092,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        }
  
  #ifdef CONFIG_TR
-@@ -2072,9 +2083,11 @@ static int qeth_l3_stop_card(struct qeth
+@@ -2072,9 +2083,11 @@
                if (recovery_mode)
                        qeth_l3_stop(card->dev);
                else {
@@ -278176,7 +278107,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                }
                if (!card->use_hard_stop) {
                        rc = qeth_send_stoplan(card);
-@@ -2795,7 +2808,6 @@ static int qeth_l3_open(struct net_devic
+@@ -2795,7 +2808,6 @@
                return -ENODEV;
        card->data.state = CH_STATE_UP;
        card->state = CARD_STATE_UP;
@@ -278184,7 +278115,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        netif_start_queue(dev);
  
        if (!card->lan_online && netif_carrier_ok(dev))
-@@ -2809,7 +2821,6 @@ static int qeth_l3_stop(struct net_devic
+@@ -2809,7 +2821,6 @@
  
        QETH_DBF_TEXT(TRACE, 4, "qethstop");
        netif_tx_disable(dev);
@@ -278192,7 +278123,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        if (card->state == CARD_STATE_UP)
                card->state = CARD_STATE_SOFTSETUP;
        return 0;
-@@ -3052,8 +3063,6 @@ static int __qeth_l3_set_online(struct c
+@@ -3052,8 +3063,6 @@
  
        qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
        if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
@@ -278201,7 +278132,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                return -ERESTARTSYS;
        }
  
-@@ -3095,9 +3104,8 @@ static int __qeth_l3_set_online(struct c
+@@ -3095,9 +3104,8 @@
        if (rc) {
                QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
                if (rc == 0xe080) {
@@ -278213,7 +278144,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                        card->lan_online = 0;
                }
                return rc;
-@@ -3173,8 +3181,6 @@ static int __qeth_l3_set_offline(struct 
+@@ -3173,8 +3181,6 @@
                netif_carrier_off(card->dev);
        recover_flag = card->state;
        if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) {
@@ -278222,7 +278153,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
                return -ERESTARTSYS;
        }
        rc  = ccw_device_set_offline(CARD_DDEV(card));
-@@ -3207,8 +3213,8 @@ static int qeth_l3_recover(void *ptr)
+@@ -3207,8 +3213,8 @@
        if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
                return 0;
        QETH_DBF_TEXT(TRACE, 2, "recover2");
@@ -278233,7 +278164,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        card->use_hard_stop = 1;
        __qeth_l3_set_offline(card->gdev, 1);
        rc = __qeth_l3_set_online(card->gdev, 1);
-@@ -3216,11 +3222,15 @@ static int qeth_l3_recover(void *ptr)
+@@ -3216,11 +3222,15 @@
        qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
        qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
        if (!rc)
@@ -278254,7 +278185,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        return 0;
  }
  
-@@ -3353,7 +3363,7 @@ static int qeth_l3_register_notifiers(vo
+@@ -3353,7 +3363,7 @@
                return rc;
        }
  #else
@@ -278263,7 +278194,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
  #endif
        return 0;
  }
-@@ -3372,7 +3382,7 @@ static int __init qeth_l3_init(void)
+@@ -3372,7 +3382,7 @@
  {
        int rc = 0;
  
@@ -278272,7 +278203,7 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
        rc = qeth_l3_register_notifiers();
        return rc;
  }
-@@ -3380,7 +3390,7 @@ static int __init qeth_l3_init(void)
+@@ -3380,7 +3390,7 @@
  static void __exit qeth_l3_exit(void)
  {
        qeth_l3_unregister_notifiers();
@@ -278281,10 +278212,10 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_main.c linux-2.6.27.19-5.1/driv
  }
  
  module_init(qeth_l3_init);
-diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_sys.c linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_sys.c
---- linux-2.6.27/drivers/s390/net/qeth_l3_sys.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/net/qeth_l3_sys.c 2009-03-25 16:11:23.000000000 +0000
-@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(s
+diff -r 9608d5473017 drivers/s390/net/qeth_l3_sys.c
+--- a/drivers/s390/net/qeth_l3_sys.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/net/qeth_l3_sys.c   Wed May 06 16:56:32 2009 +0100
+@@ -121,9 +121,6 @@
        if (!card)
                return -EINVAL;
  
@@ -278294,30 +278225,30 @@ diff -purN linux-2.6.27/drivers/s390/net/qeth_l3_sys.c linux-2.6.27.19-5.1/drive
        return qeth_l3_dev_route_show(card, &card->options.route6, buf);
  }
  
-@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(
+@@ -134,10 +131,6 @@
        if (!card)
                return -EINVAL;
+-
 -      if (!qeth_is_supported(card, IPA_IPV6)) {
 -              return -EOPNOTSUPP;
 -      }
--
        return qeth_l3_dev_route_store(card, &card->options.route6,
                                QETH_PROT_IPV6, buf, count);
- }
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_aux.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_aux.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_aux.c   2009-03-25 16:11:24.000000000 +0000
-@@ -25,6 +25,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_aux.c
+--- a/drivers/s390/scsi/zfcp_aux.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_aux.c     Wed May 06 16:56:32 2009 +0100
+@@ -24,6 +24,8 @@
+  *            Martin Petermann
   *            Sven Schuetz
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include <linux/miscdevice.h>
  #include "zfcp_ext.h"
-@@ -88,11 +90,13 @@ static int __init zfcp_device_setup(char
+@@ -88,11 +90,13 @@
        strncpy(zfcp_data.init_busid, token, BUS_ID_SIZE);
  
        token = strsep(&str, ",");
@@ -278333,7 +278264,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
                goto err_out;
  
        kfree(str);
-@@ -100,24 +104,10 @@ static int __init zfcp_device_setup(char
+@@ -100,22 +104,8 @@
  
   err_out:
        kfree(str);
@@ -278341,8 +278272,8 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
 -             "device not attached.\n", devstr);
 +      pr_err("%s is not a valid SCSI device\n", devstr);
        return 0;
- }
+-}
+-
 -static struct zfcp_adapter *zfcp_get_adapter_by_busid(char *bus_id)
 -{
 -      struct zfcp_adapter *adapter;
@@ -278354,12 +278285,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
 -                    ZFCP_STATUS_COMMON_REMOVE))
 -                  return adapter;
 -      return NULL;
--}
--
+ }
  static void __init zfcp_init_device_configure(void)
- {
-       struct zfcp_adapter *adapter;
-@@ -141,7 +131,12 @@ static void __init zfcp_init_device_conf
+@@ -141,7 +131,12 @@
                goto out_unit;
        up(&zfcp_data.config_sema);
        ccw_device_set_online(adapter->ccw_device);
@@ -278372,24 +278301,24 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        down(&zfcp_data.config_sema);
        zfcp_unit_put(unit);
  out_unit:
-@@ -180,9 +175,14 @@ static int __init zfcp_module_init(void)
+@@ -180,9 +175,14 @@
        if (!zfcp_data.gid_pn_cache)
                goto out_gid_cache;
  
--      INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
--      INIT_LIST_HEAD(&zfcp_data.adapter_remove_lh);
 +      zfcp_data.gpn_ft_cache = zfcp_cache_create(
 +                      sizeof(struct ct_iu_gpn_ft_req), "zfcp_gpn");
 +      if (!zfcp_data.gpn_ft_cache)
 +              goto out_gpn_cache;
++
 +      zfcp_data.work_queue = create_singlethread_workqueue("zfcp_wq");
 +
-+      INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
+       INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
+-      INIT_LIST_HEAD(&zfcp_data.adapter_remove_lh);
+-
        sema_init(&zfcp_data.config_sema, 1);
        rwlock_init(&zfcp_data.config_lock);
  
-@@ -193,13 +193,14 @@ static int __init zfcp_module_init(void)
+@@ -193,13 +193,14 @@
  
        retval = misc_register(&zfcp_cfdc_misc);
        if (retval) {
@@ -278406,7 +278335,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
                goto out_ccw_register;
        }
  
-@@ -213,6 +214,8 @@ out_ccw_register:
+@@ -213,6 +214,8 @@
  out_misc:
        fc_release_transport(zfcp_data.scsi_transport_template);
  out_transport:
@@ -278415,7 +278344,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        kmem_cache_destroy(zfcp_data.gid_pn_cache);
  out_gid_cache:
        kmem_cache_destroy(zfcp_data.sr_buffer_cache);
-@@ -231,8 +234,7 @@ module_init(zfcp_module_init);
+@@ -231,8 +234,7 @@
   *
   * Returns: pointer to zfcp_unit or NULL
   */
@@ -278425,7 +278354,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  {
        struct zfcp_unit *unit;
  
-@@ -251,7 +253,7 @@ struct zfcp_unit *zfcp_get_unit_by_lun(s
+@@ -251,7 +253,7 @@
   * Returns: pointer to zfcp_port or NULL
   */
  struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *adapter,
@@ -278434,7 +278363,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  {
        struct zfcp_port *port;
  
-@@ -276,7 +278,7 @@ static void zfcp_sysfs_unit_release(stru
+@@ -276,7 +278,7 @@
   *
   * Sets up some unit internal structures and creates sysfs entry.
   */
@@ -278443,7 +278372,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  {
        struct zfcp_unit *unit;
  
-@@ -290,7 +292,8 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -290,7 +292,8 @@
        unit->port = port;
        unit->fcp_lun = fcp_lun;
  
@@ -278453,7 +278382,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        unit->sysfs_device.parent = &port->sysfs_device;
        unit->sysfs_device.release = zfcp_sysfs_unit_release;
        dev_set_drvdata(&unit->sysfs_device, unit);
-@@ -323,7 +326,6 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -323,7 +326,6 @@
        }
  
        zfcp_unit_get(unit);
@@ -278461,7 +278390,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        write_lock_irq(&zfcp_data.config_lock);
        list_add_tail(&unit->list, &port->unit_list_head);
-@@ -332,7 +334,6 @@ struct zfcp_unit *zfcp_unit_enqueue(stru
+@@ -332,7 +334,6 @@
  
        write_unlock_irq(&zfcp_data.config_lock);
  
@@ -278469,7 +278398,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        zfcp_port_get(port);
  
        return unit;
-@@ -351,11 +352,10 @@ err_out_free:
+@@ -351,11 +352,10 @@
   */
  void zfcp_unit_dequeue(struct zfcp_unit *unit)
  {
@@ -278482,7 +278411,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        zfcp_port_put(unit->port);
        sysfs_remove_group(&unit->sysfs_device.kobj, &zfcp_sysfs_unit_attrs);
        device_unregister(&unit->sysfs_device);
-@@ -416,11 +416,6 @@ static void zfcp_free_low_mem_buffers(st
+@@ -416,11 +416,6 @@
                mempool_destroy(adapter->pool.data_gid_pn);
  }
  
@@ -278494,10 +278423,12 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  /**
   * zfcp_status_read_refill - refill the long running status_read_requests
   * @adapter: ptr to struct zfcp_adapter for which the buffers should be refilled
-@@ -450,19 +445,6 @@ static void _zfcp_status_read_scheduler(
+@@ -448,19 +443,6 @@
+ {
+       zfcp_status_read_refill(container_of(work, struct zfcp_adapter,
                                             stat_work));
- }
+-}
+-
 -static int zfcp_nameserver_enqueue(struct zfcp_adapter *adapter)
 -{
 -      struct zfcp_port *port;
@@ -278509,12 +278440,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
 -      zfcp_port_put(port);
 -
 -      return 0;
--}
--
+ }
  /**
-  * zfcp_adapter_enqueue - enqueue a new adapter to the list
-  * @ccw_device: pointer to the struct cc_device
-@@ -508,7 +490,6 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -508,7 +490,6 @@
        init_waitqueue_head(&adapter->erp_done_wqh);
  
        INIT_LIST_HEAD(&adapter->port_list_head);
@@ -278522,7 +278451,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        INIT_LIST_HEAD(&adapter->erp_ready_head);
        INIT_LIST_HEAD(&adapter->erp_running_head);
  
-@@ -518,7 +499,8 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -518,7 +499,8 @@
        spin_lock_init(&adapter->san_dbf_lock);
        spin_lock_init(&adapter->scsi_dbf_lock);
        spin_lock_init(&adapter->rec_dbf_lock);
@@ -278532,7 +278461,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        rwlock_init(&adapter->erp_lock);
        rwlock_init(&adapter->abort_lock);
-@@ -537,28 +519,16 @@ int zfcp_adapter_enqueue(struct ccw_devi
+@@ -537,28 +519,16 @@
                               &zfcp_sysfs_adapter_attrs))
                goto sysfs_failed;
  
@@ -278550,21 +278479,21 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        write_unlock_irq(&zfcp_data.config_lock);
  
 -      zfcp_data.adapters++;
--
--      zfcp_nameserver_enqueue(adapter);
 +      zfcp_fc_nameserver_init(adapter);
  
--      return 0;
+-      zfcp_nameserver_enqueue(adapter);
 +      if (!zfcp_adapter_scsi_register(adapter))
 +              return 0;
  
+-      return 0;
+-
 -generic_services_failed:
 -      sysfs_remove_group(&ccw_device->dev.kobj,
 -                         &zfcp_sysfs_adapter_attrs);
  sysfs_failed:
        zfcp_adapter_debug_unregister(adapter);
  debug_register_failed:
-@@ -585,7 +555,6 @@ void zfcp_adapter_dequeue(struct zfcp_ad
+@@ -585,7 +555,6 @@
        cancel_work_sync(&adapter->scan_work);
        cancel_work_sync(&adapter->stat_work);
        zfcp_adapter_scsi_unregister(adapter);
@@ -278572,17 +278501,17 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        sysfs_remove_group(&adapter->ccw_device->dev.kobj,
                           &zfcp_sysfs_adapter_attrs);
        dev_set_drvdata(&adapter->ccw_device->dev, NULL);
-@@ -603,9 +572,6 @@ void zfcp_adapter_dequeue(struct zfcp_ad
+@@ -602,9 +571,6 @@
+       write_lock_irq(&zfcp_data.config_lock);
        list_del(&adapter->list);
        write_unlock_irq(&zfcp_data.config_lock);
+-
 -      /* decrease number of adapters in list */
 -      zfcp_data.adapters--;
--
        zfcp_qdio_free(adapter);
  
-       zfcp_free_low_mem_buffers(adapter);
-@@ -633,21 +599,19 @@ static void zfcp_sysfs_port_release(stru
+@@ -633,21 +599,19 @@
   * d_id is used to enqueue ports with a well known address like the Directory
   * Service for nameserver lookup.
   */
@@ -278606,7 +278535,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        port->adapter = adapter;
        port->d_id = d_id;
-@@ -657,34 +621,9 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -657,34 +621,9 @@
        atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status);
        atomic_set(&port->refcount, 0);
  
@@ -278644,7 +278573,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        port->sysfs_device.release = zfcp_sysfs_port_release;
        dev_set_drvdata(&port->sysfs_device, port);
-@@ -700,12 +639,8 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -700,12 +639,8 @@
        if (device_register(&port->sysfs_device))
                goto err_out_free;
  
@@ -278659,7 +278588,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        if (retval) {
                device_unregister(&port->sysfs_device);
-@@ -718,10 +653,6 @@ struct zfcp_port *zfcp_port_enqueue(stru
+@@ -718,10 +653,6 @@
        list_add_tail(&port->list, &adapter->port_list_head);
        atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
        atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status);
@@ -278670,7 +278599,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
  
        write_unlock_irq(&zfcp_data.config_lock);
  
-@@ -740,21 +671,15 @@ err_out:
+@@ -740,21 +671,15 @@
   */
  void zfcp_port_dequeue(struct zfcp_port *port)
  {
@@ -278694,19 +278623,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_aux.c linux-2.6.27.19-5.1/drivers
        device_unregister(&port->sysfs_device);
  }
  
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ccw.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ccw.c   2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_ccw.c
+--- a/drivers/s390/scsi/zfcp_ccw.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_ccw.c     Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2002, 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include "zfcp_ext.h"
  
- /**
-@@ -25,7 +27,8 @@ static int zfcp_ccw_probe(struct ccw_dev
+@@ -25,7 +27,8 @@
        down(&zfcp_data.config_sema);
        if (zfcp_adapter_enqueue(ccw_device)) {
                dev_err(&ccw_device->dev,
@@ -278716,7 +278645,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
                retval = -EINVAL;
        }
        up(&zfcp_data.config_sema);
-@@ -46,6 +49,8 @@ static void zfcp_ccw_remove(struct ccw_d
+@@ -46,6 +49,8 @@
        struct zfcp_adapter *adapter;
        struct zfcp_port *port, *p;
        struct zfcp_unit *unit, *u;
@@ -278725,7 +278654,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
  
        ccw_device_set_offline(ccw_device);
        down(&zfcp_data.config_sema);
-@@ -54,26 +59,26 @@ static void zfcp_ccw_remove(struct ccw_d
+@@ -54,26 +59,26 @@
        write_lock_irq(&zfcp_data.config_lock);
        list_for_each_entry_safe(port, p, &adapter->port_list_head, list) {
                list_for_each_entry_safe(unit, u, &port->unit_list_head, list) {
@@ -278759,7 +278688,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
        zfcp_adapter_dequeue(adapter);
  
        up(&zfcp_data.config_sema);
-@@ -100,10 +105,6 @@ static int zfcp_ccw_set_online(struct cc
+@@ -100,10 +105,6 @@
        if (retval)
                goto out;
  
@@ -278770,7 +278699,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
        /* initialize request counter */
        BUG_ON(!zfcp_reqlist_isempty(adapter));
        adapter->req_no = 0;
-@@ -113,10 +114,10 @@ static int zfcp_ccw_set_online(struct cc
+@@ -113,10 +114,10 @@
        zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
                                NULL);
        zfcp_erp_wait(adapter);
@@ -278784,7 +278713,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
   out:
        up(&zfcp_data.config_sema);
        return retval;
-@@ -156,15 +157,18 @@ static int zfcp_ccw_notify(struct ccw_de
+@@ -156,15 +157,18 @@
  
        switch (event) {
        case CIO_GONE:
@@ -278806,7 +278735,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_modify_adapter_status(adapter, 11, NULL,
                                               ZFCP_STATUS_COMMON_RUNNING,
                                               ZFCP_SET);
-@@ -220,3 +224,20 @@ int __init zfcp_ccw_register(void)
+@@ -220,3 +224,20 @@
  {
        return ccw_driver_register(&zfcp_ccw_driver);
  }
@@ -278827,31 +278756,31 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ccw.c linux-2.6.27.19-5.1/drivers
 +      }
 +      return adapter;
 +}
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_cfdc.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_cfdc.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_cfdc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_cfdc.c  2009-03-25 16:11:24.000000000 +0000
-@@ -7,6 +7,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_cfdc.c
+--- a/drivers/s390/scsi/zfcp_cfdc.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_cfdc.c    Wed May 06 16:56:32 2009 +0100
+@@ -6,6 +6,8 @@
+  *
   * Copyright IBM Corporation 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include <linux/types.h>
  #include <linux/miscdevice.h>
- #include <asm/ccwdev.h>
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.c   2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_dbf.c
+--- a/drivers/s390/scsi/zfcp_dbf.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_dbf.c     Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2002, 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include <linux/ctype.h>
  #include <asm/debug.h>
- #include "zfcp_ext.h"
-@@ -30,7 +32,7 @@ static void zfcp_dbf_hexdump(debug_info_
+@@ -30,7 +32,7 @@
                dump->offset = offset;
                dump->size = min(from_len - offset, room);
                memcpy(dump->data, from + offset, dump->size);
@@ -278860,7 +278789,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        }
  }
  
-@@ -108,7 +110,7 @@ static int zfcp_dbf_view_header(debug_in
+@@ -108,7 +110,7 @@
                             t.tv_sec, t.tv_nsec);
                zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid);
        } else  {
@@ -278869,7 +278798,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
                              dump->total_size);
                if ((dump->offset + dump->size) == dump->total_size)
                        p += sprintf(p, "\n");
-@@ -318,6 +320,26 @@ void zfcp_hba_dbf_event_qdio(struct zfcp
+@@ -318,6 +320,26 @@
        spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags);
  }
  
@@ -278896,7 +278825,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
  static void zfcp_hba_dbf_view_response(char **p,
                                       struct zfcp_hba_dbf_record_response *r)
  {
-@@ -346,6 +368,7 @@ static void zfcp_hba_dbf_view_response(c
+@@ -346,6 +368,7 @@
                        break;
                zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd);
                zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial);
@@ -278904,7 +278833,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
                break;
  
        case FSF_QTCB_OPEN_PORT_WITH_DID:
-@@ -399,6 +422,30 @@ static void zfcp_hba_dbf_view_qdio(char 
+@@ -399,6 +422,30 @@
        zfcp_dbf_out(p, "sbal_count", "0x%02x", r->sbal_count);
  }
  
@@ -278935,7 +278864,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
  static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view,
                                    char *out_buf, const char *in_buf)
  {
-@@ -418,8 +465,11 @@ static int zfcp_hba_dbf_view_format(debu
+@@ -418,8 +465,11 @@
                zfcp_hba_dbf_view_status(&p, &r->u.status);
        else if (strncmp(r->tag, "qdio", ZFCP_DBF_TAG_SIZE) == 0)
                zfcp_hba_dbf_view_qdio(&p, &r->u.qdio);
@@ -278948,7 +278877,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        return p - out_buf;
  }
  
-@@ -471,7 +521,7 @@ static const char *zfcp_rec_dbf_ids[] = 
+@@ -471,7 +521,7 @@
        [29]    = "link down",
        [30]    = "link up status read",
        [31]    = "open port failed",
@@ -278957,7 +278886,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        [33]    = "close port",
        [34]    = "open unit failed",
        [35]    = "exclusive open unit failed",
-@@ -519,14 +569,14 @@ static const char *zfcp_rec_dbf_ids[] = 
+@@ -519,14 +569,14 @@
        [75]    = "physical port recovery escalation after failed port "
                  "recovery",
        [76]    = "port recovery escalation after failed unit recovery",
@@ -278974,7 +278903,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        [85]    = "online",
        [86]    = "offline",
        [87]    = "ccw device gone",
-@@ -829,11 +879,12 @@ void zfcp_rec_dbf_event_action(u8 id2, s
+@@ -829,11 +879,12 @@
  void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
  {
        struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
@@ -278990,7 +278919,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        unsigned long flags;
  
        spin_lock_irqsave(&adapter->san_dbf_lock, flags);
-@@ -842,7 +893,7 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -842,7 +893,7 @@
        r->fsf_reqid = (unsigned long)fsf_req;
        r->fsf_seqno = fsf_req->seq_no;
        r->s_id = fc_host_port_id(adapter->scsi_host);
@@ -278999,7 +278928,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        oct->cmd_req_code = hdr->cmd_rsp_code;
        oct->revision = hdr->revision;
        oct->gs_type = hdr->gs_type;
-@@ -850,9 +901,10 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -850,9 +901,10 @@
        oct->options = hdr->options;
        oct->max_res_size = hdr->max_res_size;
        oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr),
@@ -279013,7 +278942,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
  }
  
-@@ -863,11 +915,12 @@ void zfcp_san_dbf_event_ct_request(struc
+@@ -863,11 +915,12 @@
  void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
  {
        struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
@@ -279029,7 +278958,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        unsigned long flags;
  
        spin_lock_irqsave(&adapter->san_dbf_lock, flags);
-@@ -875,17 +928,19 @@ void zfcp_san_dbf_event_ct_response(stru
+@@ -875,17 +928,19 @@
        strncpy(r->tag, "rctc", ZFCP_DBF_TAG_SIZE);
        r->fsf_reqid = (unsigned long)fsf_req;
        r->fsf_seqno = fsf_req->seq_no;
@@ -279053,7 +278982,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
  }
  
-@@ -908,7 +963,7 @@ static void zfcp_san_dbf_event_els(const
+@@ -908,7 +963,7 @@
        rec->u.els.ls_code = ls_code;
        debug_event(adapter->san_dbf, level, rec, sizeof(*rec));
        zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level,
@@ -279062,7 +278991,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        spin_unlock_irqrestore(&adapter->san_dbf_lock, flags);
  }
  
-@@ -922,8 +977,8 @@ void zfcp_san_dbf_event_els_request(stru
+@@ -922,8 +977,8 @@
  
        zfcp_san_dbf_event_els("oels", 2, fsf_req,
                               fc_host_port_id(els->adapter->scsi_host),
@@ -279073,7 +279002,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -936,8 +991,7 @@ void zfcp_san_dbf_event_els_response(str
+@@ -936,8 +991,7 @@
  
        zfcp_san_dbf_event_els("rels", 2, fsf_req, els->d_id,
                               fc_host_port_id(els->adapter->scsi_host),
@@ -279083,7 +279012,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
                               els->resp->length);
  }
  
-@@ -963,8 +1017,6 @@ static int zfcp_san_dbf_view_format(debu
+@@ -963,8 +1017,6 @@
                                    char *out_buf, const char *in_buf)
  {
        struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf;
@@ -279092,7 +279021,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        char *p = out_buf;
  
        if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0)
-@@ -984,9 +1036,6 @@ static int zfcp_san_dbf_view_format(debu
+@@ -984,9 +1036,6 @@
                zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype);
                zfcp_dbf_out(&p, "options", "0x%02x", ct->options);
                zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size);
@@ -279102,7 +279031,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) {
                struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp;
                zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code);
-@@ -994,23 +1043,13 @@ static int zfcp_san_dbf_view_format(debu
+@@ -994,23 +1043,13 @@
                zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code);
                zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl);
                zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique);
@@ -279127,10 +279056,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.c linux-2.6.27.19-5.1/drivers
        return p - out_buf;
  }
  
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_dbf.h   2009-03-25 16:11:24.000000000 +0000
-@@ -151,6 +151,7 @@ struct zfcp_hba_dbf_record {
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_dbf.h
+--- a/drivers/s390/scsi/zfcp_dbf.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_dbf.h     Wed May 06 16:56:32 2009 +0100
+@@ -151,6 +151,7 @@
                struct zfcp_hba_dbf_record_response response;
                struct zfcp_hba_dbf_record_status status;
                struct zfcp_hba_dbf_record_qdio qdio;
@@ -279138,7 +279067,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers
        } u;
  } __attribute__ ((packed));
  
-@@ -162,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request {
+@@ -162,8 +163,6 @@
        u8 options;
        u16 max_res_size;
        u32 len;
@@ -279147,7 +279076,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers
  } __attribute__ ((packed));
  
  struct zfcp_san_dbf_record_ct_response {
-@@ -172,16 +171,13 @@ struct zfcp_san_dbf_record_ct_response {
+@@ -172,16 +171,13 @@
        u8 reason_code;
        u8 expl;
        u8 vendor_unique;
@@ -279165,7 +279094,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers
  } __attribute__ ((packed));
  
  struct zfcp_san_dbf_record {
-@@ -195,6 +191,8 @@ struct zfcp_san_dbf_record {
+@@ -195,6 +191,8 @@
                struct zfcp_san_dbf_record_ct_response ct_resp;
                struct zfcp_san_dbf_record_els els;
        } u;
@@ -279174,13 +279103,14 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_dbf.h linux-2.6.27.19-5.1/drivers
  } __attribute__ ((packed));
  
  struct zfcp_scsi_dbf_record {
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_def.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_def.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_def.h   2009-03-25 16:11:24.000000000 +0000
-@@ -39,29 +39,6 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_def.h
+--- a/drivers/s390/scsi/zfcp_def.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_def.h     Wed May 06 16:56:32 2009 +0100
+@@ -38,29 +38,6 @@
  
- /********************* GENERAL DEFINES *********************************/
  
+ /********************* GENERAL DEFINES *********************************/
+-
 -/**
 - * zfcp_sg_to_address - determine kernel address from struct scatterlist
 - * @list: struct scatterlist
@@ -279203,11 +279133,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
 -{
 -      sg_set_buf(list, address, size);
 -}
--
  #define REQUEST_LIST_SIZE 128
  
- /********************* SCSI SPECIFIC DEFINES *********************************/
-@@ -101,11 +78,6 @@ zfcp_address_to_sg(void *address, struct
+@@ -101,11 +78,6 @@
  
  /*************** FIBRE CHANNEL PROTOCOL SPECIFIC DEFINES ********************/
  
@@ -279219,7 +279148,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  /* timeout for name-server lookup (in seconds) */
  #define ZFCP_NS_GID_PN_TIMEOUT                10
  
-@@ -129,7 +101,7 @@ typedef unsigned int       fcp_dl_t;
+@@ -129,7 +101,7 @@
  
  /* FCP(-2) FCP_CMND IU */
  struct fcp_cmnd_iu {
@@ -279228,7 +279157,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u8  crn;                   /* command reference number */
        u8  reserved0:5;           /* reserved */
        u8  task_attribute:3;      /* task attribute */
-@@ -204,7 +176,7 @@ struct fcp_rscn_element {
+@@ -204,7 +176,7 @@
  struct fcp_logo {
          u32 command;
          u32 nport_did;
@@ -279237,7 +279166,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  } __attribute__((packed));
  
  /*
-@@ -218,13 +190,6 @@ struct fcp_logo {
+@@ -218,13 +190,6 @@
  #define ZFCP_LS_RSCN                  0x61
  #define ZFCP_LS_RNID                  0x78
  
@@ -279251,10 +279180,11 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  struct zfcp_ls_adisc {
        u8              code;
        u8              field[3];
-@@ -234,20 +199,6 @@ struct zfcp_ls_adisc {
+@@ -233,20 +198,6 @@
+       u64             wwnn;
        u32             nport_id;
  } __attribute__ ((packed));
+-
 -struct zfcp_ls_adisc_acc {
 -      u8              code;
 -      u8              field[3];
@@ -279268,11 +279198,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
 -      u8 code;
 -      const char *description;
 -};
--
  /*
   * FC-GS-2 stuff
-  */
-@@ -259,7 +210,6 @@ struct zfcp_rc_entry {
+@@ -259,7 +210,6 @@
  #define ZFCP_CT_UNABLE_TO_PERFORM_CMD 0x09
  #define ZFCP_CT_GID_PN                        0x0121
  #define ZFCP_CT_GPN_FT                        0x0172
@@ -279280,7 +279209,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  #define ZFCP_CT_ACCEPT                        0x8002
  #define ZFCP_CT_REJECT                        0x8001
  
-@@ -281,9 +231,7 @@ struct zfcp_rc_entry {
+@@ -281,9 +231,7 @@
  #define ZFCP_STATUS_COMMON_RUNNING            0x40000000
  #define ZFCP_STATUS_COMMON_ERP_FAILED         0x20000000
  #define ZFCP_STATUS_COMMON_UNBLOCKED          0x10000000
@@ -279290,7 +279219,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  #define ZFCP_STATUS_COMMON_ERP_INUSE          0x01000000
  #define ZFCP_STATUS_COMMON_ACCESS_DENIED      0x00800000
  #define ZFCP_STATUS_COMMON_ACCESS_BOXED               0x00400000
-@@ -291,16 +239,15 @@ struct zfcp_rc_entry {
+@@ -291,16 +239,15 @@
  
  /* adapter status */
  #define ZFCP_STATUS_ADAPTER_QDIOUP            0x00000002
@@ -279308,7 +279237,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  #define ZFCP_DID_MANAGEMENT_SERVICE           0xFFFFFA
  #define ZFCP_DID_TIME_SERVICE                 0xFFFFFB
  #define ZFCP_DID_DIRECTORY_SERVICE            0xFFFFFC
-@@ -312,29 +259,27 @@ struct zfcp_rc_entry {
+@@ -312,29 +259,27 @@
  #define ZFCP_STATUS_PORT_DID_DID              0x00000002
  #define ZFCP_STATUS_PORT_PHYS_CLOSING         0x00000004
  #define ZFCP_STATUS_PORT_NO_WWPN              0x00000008
@@ -279345,7 +279274,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  #define ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED     0x00000040
  #define ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED       0x00000080
  #define ZFCP_STATUS_FSFREQ_ABORTED              0x00000100
-@@ -379,7 +324,7 @@ struct ct_hdr {
+@@ -379,7 +324,7 @@
   * a port name is required */
  struct ct_iu_gid_pn_req {
        struct ct_hdr header;
@@ -279354,7 +279283,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  } __attribute__ ((packed));
  
  /* FS_ACC IU and data unit for GID_PN nameserver request */
-@@ -388,15 +333,19 @@ struct ct_iu_gid_pn_resp {
+@@ -388,15 +333,19 @@
        u32 d_id;
  } __attribute__ ((packed));
  
@@ -279378,7 +279307,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
   * @handler: handler function (called for response to the request)
   * @handler_data: data passed to handler function
   * @timeout: FSF timeout for this request
-@@ -404,12 +353,10 @@ typedef void (*zfcp_send_ct_handler_t)(u
+@@ -404,12 +353,10 @@
   * @status: used to pass error status to calling function
   */
  struct zfcp_send_ct {
@@ -279393,7 +279322,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        unsigned long handler_data;
        int timeout;
        struct completion *completion;
-@@ -426,8 +373,6 @@ struct zfcp_gid_pn_data {
+@@ -426,8 +373,6 @@
          struct zfcp_port *port;
  };
  
@@ -279402,7 +279331,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  /**
   * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els
   * @adapter: adapter where request is sent from
-@@ -435,8 +380,6 @@ typedef void (*zfcp_send_els_handler_t)(
+@@ -435,8 +380,6 @@
   * @d_id: destiniation id of port where request is sent to
   * @req: scatter-gather list for request
   * @resp: scatter-gather list for response
@@ -279411,7 +279340,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
   * @handler: handler function (called for response to the request)
   * @handler_data: data passed to handler function
   * @completion: completion for synchronization purposes
-@@ -449,24 +392,28 @@ struct zfcp_send_els {
+@@ -449,24 +392,28 @@
        u32 d_id;
        struct scatterlist *req;
        struct scatterlist *resp;
@@ -279451,7 +279380,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  };
  
  struct zfcp_erp_action {
-@@ -475,7 +422,7 @@ struct zfcp_erp_action {
+@@ -475,7 +422,7 @@
        struct zfcp_adapter *adapter; /* device which should be recovered */
        struct zfcp_port *port;
        struct zfcp_unit *unit;
@@ -279460,7 +279389,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u32 step;                     /* active step of this erp action */
        struct zfcp_fsf_req *fsf_req; /* fsf request currently pending
                                         for this action */
-@@ -506,8 +453,8 @@ struct zfcp_adapter {
+@@ -506,8 +453,8 @@
        atomic_t                refcount;          /* reference count */
        wait_queue_head_t       remove_wq;         /* can be used to wait for
                                                      refcount drop to zero */
@@ -279471,7 +279400,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u32                     peer_d_id;         /* P2P peer D_ID */
        struct ccw_device       *ccw_device;       /* S/390 ccw device */
        u32                     hydra_version;     /* Hydra version */
-@@ -518,13 +465,16 @@ struct zfcp_adapter {
+@@ -518,13 +465,16 @@
        u16                     timer_ticks;       /* time int for a tick */
        struct Scsi_Host        *scsi_host;        /* Pointer to mid-layer */
        struct list_head        port_list_head;    /* remote port list */
@@ -279491,7 +279420,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u32                     fsf_req_seq_no;    /* FSF cmnd seq number */
        wait_queue_head_t       request_wq;        /* can be used to wait for
                                                      more avaliable SBALs */
-@@ -548,7 +498,7 @@ struct zfcp_adapter {
+@@ -548,7 +498,7 @@
                                                      actions */
        u32                     erp_low_mem_count; /* nr of erp actions waiting
                                                      for memory */
@@ -279500,7 +279429,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        debug_info_t            *rec_dbf;
        debug_info_t            *hba_dbf;
        debug_info_t            *san_dbf;          /* debug feature areas */
-@@ -563,11 +513,11 @@ struct zfcp_adapter {
+@@ -563,11 +513,11 @@
        struct zfcp_scsi_dbf_record     scsi_dbf_buf;
        struct zfcp_adapter_mempool     pool;      /* Adapter memory pools */
        struct qdio_initialize  qdio_init_data;    /* for qdio_establish */
@@ -279513,7 +279442,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  };
  
  struct zfcp_port {
-@@ -579,18 +529,16 @@ struct zfcp_port {
+@@ -579,18 +529,16 @@
                                                  refcount drop to zero */
        struct zfcp_adapter    *adapter;       /* adapter used to access port */
        struct list_head       unit_list_head; /* head of logical unit list */
@@ -279535,7 +279464,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  };
  
  struct zfcp_unit {
-@@ -601,8 +549,7 @@ struct zfcp_unit {
+@@ -601,8 +549,7 @@
                                                  refcount drop to zero */
        struct zfcp_port       *port;          /* remote port of unit */
        atomic_t               status;         /* status of this logical unit */
@@ -279545,7 +279474,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u32                    handle;         /* handle assigned by FSF */
          struct scsi_device     *device;        /* scsi device struct pointer */
        struct zfcp_erp_action erp_action;     /* pending error recovery */
-@@ -625,7 +572,7 @@ struct zfcp_fsf_req {
+@@ -625,7 +572,7 @@
        u8                      sbal_response;  /* SBAL used in interrupt */
        wait_queue_head_t      completion_wq;  /* can be used by a routine
                                                  to wait for completion */
@@ -279554,7 +279483,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        u32                    fsf_command;    /* FSF Command copy */
        struct fsf_qtcb        *qtcb;          /* address of associated QTCB */
        u32                    seq_no;         /* Sequence number of request */
-@@ -638,17 +585,15 @@ struct zfcp_fsf_req {
+@@ -638,17 +585,15 @@
        unsigned long long     issued;         /* request sent time (STCK) */
        struct zfcp_unit       *unit;
        void                    (*handler)(struct zfcp_fsf_req *);
@@ -279574,7 +279503,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
        rwlock_t                config_lock;        /* serialises changes
                                                       to adapter/port/unit
                                                       lists */
-@@ -656,11 +601,13 @@ struct zfcp_data {
+@@ -656,11 +601,13 @@
                                                       changes */
        atomic_t                loglevel;            /* current loglevel */
        char                    init_busid[BUS_ID_SIZE];
@@ -279593,7 +279522,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  };
  
  /* struct used by memory pools for fsf_requests */
-@@ -677,14 +624,7 @@ struct zfcp_fsf_req_qtcb {
+@@ -677,14 +624,7 @@
  #define ZFCP_SET                0x00000100
  #define ZFCP_CLEAR              0x00000200
  
@@ -279608,7 +279537,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  
  /*
   * Helper functions for request ID management.
-@@ -745,12 +685,6 @@ zfcp_unit_put(struct zfcp_unit *unit)
+@@ -745,12 +685,6 @@
  }
  
  static inline void
@@ -279621,20 +279550,20 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
  zfcp_port_get(struct zfcp_port *port)
  {
        atomic_inc(&port->refcount);
-@@ -764,12 +698,6 @@ zfcp_port_put(struct zfcp_port *port)
- }
- static inline void
--zfcp_port_wait(struct zfcp_port *port)
--{
--      wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
+@@ -761,12 +695,6 @@
+ {
+       if (atomic_dec_return(&port->refcount) == 0)
+               wake_up(&port->remove_wq);
 -}
 -
 -static inline void
- zfcp_adapter_get(struct zfcp_adapter *adapter)
- {
-       atomic_inc(&adapter->refcount);
-@@ -782,10 +710,4 @@ zfcp_adapter_put(struct zfcp_adapter *ad
+-zfcp_port_wait(struct zfcp_port *port)
+-{
+-      wait_event(port->remove_wq, atomic_read(&port->refcount) == 0);
+ }
+ static inline void
+@@ -782,10 +710,4 @@
                wake_up(&adapter->remove_wq);
  }
  
@@ -279645,19 +279574,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_def.h linux-2.6.27.19-5.1/drivers
 -}
 -
  #endif /* ZFCP_DEF_H */
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_erp.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_erp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_erp.c   2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_erp.c
+--- a/drivers/s390/scsi/zfcp_erp.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_erp.c     Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2002, 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include "zfcp_ext.h"
  
- #define ZFCP_MAX_ERPS                   3
-@@ -23,7 +25,6 @@ enum zfcp_erp_steps {
+@@ -23,7 +25,6 @@
        ZFCP_ERP_STEP_FSF_XCONFIG       = 0x0001,
        ZFCP_ERP_STEP_PHYS_PORT_CLOSING = 0x0010,
        ZFCP_ERP_STEP_PORT_CLOSING      = 0x0100,
@@ -279665,7 +279594,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        ZFCP_ERP_STEP_NAMESERVER_LOOKUP = 0x0400,
        ZFCP_ERP_STEP_PORT_OPENING      = 0x0800,
        ZFCP_ERP_STEP_UNIT_CLOSING      = 0x1000,
-@@ -473,6 +474,7 @@ static void zfcp_erp_strategy_check_fsfr
+@@ -473,6 +474,7 @@
                                   ZFCP_STATUS_ERP_TIMEDOUT)) {
                        act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED;
                        zfcp_rec_dbf_event_action(142, act);
@@ -279673,7 +279602,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                }
                if (act->status & ZFCP_STATUS_ERP_TIMEDOUT)
                        zfcp_rec_dbf_event_action(143, act);
-@@ -532,8 +534,7 @@ static void _zfcp_erp_port_reopen_all(st
+@@ -532,8 +534,7 @@
        struct zfcp_port *port;
  
        list_for_each_entry(port, &adapter->port_list_head, list)
@@ -279683,7 +279612,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  static void _zfcp_erp_unit_reopen_all(struct zfcp_port *port, int clear, u8 id,
-@@ -669,8 +670,6 @@ static int zfcp_erp_adapter_strategy_ope
+@@ -669,8 +670,6 @@
        int ret;
        struct zfcp_adapter *adapter = act->adapter;
  
@@ -279692,7 +279621,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        write_lock_irq(&adapter->erp_lock);
        zfcp_erp_action_to_running(act);
        write_unlock_irq(&adapter->erp_lock);
-@@ -741,8 +740,7 @@ static int zfcp_erp_adapter_strategy_gen
+@@ -741,8 +740,7 @@
                                       ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR);
   failed_qdio:
        atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK |
@@ -279702,7 +279631,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                          &act->adapter->status);
        return retval;
  }
-@@ -751,15 +749,11 @@ static int zfcp_erp_adapter_strategy(str
+@@ -751,15 +749,11 @@
  {
        int retval;
  
@@ -279718,7 +279647,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  
        if (retval == ZFCP_ERP_FAILED)
                ssleep(8);
-@@ -783,10 +777,7 @@ static int zfcp_erp_port_forced_strategy
+@@ -783,10 +777,7 @@
  
  static void zfcp_erp_port_strategy_clearstati(struct zfcp_port *port)
  {
@@ -279730,7 +279659,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                          ZFCP_STATUS_PORT_PHYS_CLOSING |
                          ZFCP_STATUS_PORT_INVALID_WWPN,
                          &port->status);
-@@ -839,73 +830,12 @@ static int zfcp_erp_port_strategy_open_p
+@@ -839,73 +830,12 @@
        return ZFCP_ERP_CONTINUES;
  }
  
@@ -279804,7 +279733,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_port_failed(port, 25, NULL);
                return ZFCP_ERP_FAILED;
        }
-@@ -914,11 +844,25 @@ static int zfcp_erp_open_ptp_port(struct
+@@ -914,11 +844,25 @@
        return zfcp_erp_port_strategy_open_port(act);
  }
  
@@ -279831,7 +279760,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        int p_status = atomic_read(&port->status);
  
        switch (act->step) {
-@@ -927,28 +871,10 @@ static int zfcp_erp_port_strategy_open_c
+@@ -927,28 +871,10 @@
        case ZFCP_ERP_STEP_PORT_CLOSING:
                if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP)
                        return zfcp_erp_open_ptp_port(act);
@@ -279839,7 +279768,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
 -                      dev_err(&adapter->ccw_device->dev,
 -                              "Nameserver port unavailable.\n");
 -                      return ZFCP_ERP_FAILED;
--              }
++              if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
++                      queue_work(zfcp_data.work_queue, &port->gid_pn_work);
++                      return ZFCP_ERP_CONTINUES;
+               }
 -              if (!(atomic_read(&ns_port->status) &
 -                    ZFCP_STATUS_COMMON_UNBLOCKED)) {
 -                      /* nameserver port may live again */
@@ -279850,10 +279782,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
 -                              return ZFCP_ERP_CONTINUES;
 -                      }
 -                      return ZFCP_ERP_FAILED;
-+              if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
-+                      queue_work(zfcp_data.work_queue, &port->gid_pn_work);
-+                      return ZFCP_ERP_CONTINUES;
-               }
+-              }
 -              /* else nameserver port is already open, fall through */
 -      case ZFCP_ERP_STEP_NAMESERVER_OPEN:
 -              if (!(atomic_read(&ns_port->status) & ZFCP_STATUS_COMMON_OPEN))
@@ -279863,7 +279792,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        case ZFCP_ERP_STEP_NAMESERVER_LOOKUP:
                if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
                        if (p_status & (ZFCP_STATUS_PORT_INVALID_WWPN)) {
-@@ -961,25 +887,26 @@ static int zfcp_erp_port_strategy_open_c
+@@ -961,24 +887,25 @@
  
        case ZFCP_ERP_STEP_PORT_OPENING:
                /* D_ID might have changed during open */
@@ -279881,26 +279810,25 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
 +              }
        }
        return ZFCP_ERP_FAILED;
- }
+-}
+-
 -static int zfcp_erp_port_strategy_open(struct zfcp_erp_action *act)
 -{
 -      if (atomic_read(&act->port->status) & (ZFCP_STATUS_PORT_WKA))
 -              return zfcp_erp_port_strategy_open_nameserver(act);
 -      return zfcp_erp_port_strategy_open_common(act);
--}
--
+ }
  static int zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action)
  {
        struct zfcp_port *port = erp_action->port;
++
 +      if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_NOESC)
 +              goto close_init_done;
-+
        switch (erp_action->step) {
        case ZFCP_ERP_STEP_UNINITIALIZED:
-               zfcp_erp_port_strategy_clearstati(port);
-@@ -992,19 +919,17 @@ static int zfcp_erp_port_strategy(struct
+@@ -992,19 +919,17 @@
                        return ZFCP_ERP_FAILED;
                break;
        }
@@ -279924,7 +279852,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                          ZFCP_STATUS_UNIT_SHARED |
                          ZFCP_STATUS_UNIT_READONLY,
                          &unit->status);
-@@ -1065,8 +990,14 @@ static int zfcp_erp_strategy_check_unit(
+@@ -1065,8 +990,14 @@
                break;
        case ZFCP_ERP_FAILED :
                atomic_inc(&unit->erp_counter);
@@ -279940,7 +279868,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                break;
        }
  
-@@ -1091,8 +1022,12 @@ static int zfcp_erp_strategy_check_port(
+@@ -1091,8 +1022,12 @@
                        result = ZFCP_ERP_EXIT;
                }
                atomic_inc(&port->erp_counter);
@@ -279954,7 +279882,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                break;
        }
  
-@@ -1114,8 +1049,12 @@ static int zfcp_erp_strategy_check_adapt
+@@ -1114,8 +1049,12 @@
  
        case ZFCP_ERP_FAILED :
                atomic_inc(&adapter->erp_counter);
@@ -279968,7 +279896,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                break;
        }
  
-@@ -1249,10 +1188,13 @@ static void zfcp_erp_scsi_scan(struct wo
+@@ -1249,10 +1188,13 @@
                container_of(work, struct zfcp_erp_add_work, work);
        struct zfcp_unit *unit = p->unit;
        struct fc_rport *rport = unit->port->rport;
@@ -279984,7 +279912,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        kfree(p);
  }
  
-@@ -1263,9 +1205,9 @@ static void zfcp_erp_schedule_work(struc
+@@ -1263,9 +1205,9 @@
        p = kzalloc(sizeof(*p), GFP_KERNEL);
        if (!p) {
                dev_err(&unit->port->adapter->ccw_device->dev,
@@ -279997,7 +279925,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -1273,7 +1215,7 @@ static void zfcp_erp_schedule_work(struc
+@@ -1273,7 +1215,7 @@
        atomic_set_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
        INIT_WORK(&p->work, zfcp_erp_scsi_scan);
        p->unit = unit;
@@ -280006,7 +279934,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  static void zfcp_erp_rport_register(struct zfcp_port *port)
-@@ -1286,8 +1228,8 @@ static void zfcp_erp_rport_register(stru
+@@ -1286,8 +1228,8 @@
        port->rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids);
        if (!port->rport) {
                dev_err(&port->adapter->ccw_device->dev,
@@ -280017,7 +279945,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -1299,12 +1241,12 @@ static void zfcp_erp_rport_register(stru
+@@ -1299,12 +1241,12 @@
  static void zfcp_erp_rports_del(struct zfcp_adapter *adapter)
  {
        struct zfcp_port *port;
@@ -280036,7 +279964,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
-@@ -1459,9 +1401,9 @@ static int zfcp_erp_thread(void *data)
+@@ -1459,9 +1401,9 @@
                                zfcp_erp_wakeup(adapter);
                }
  
@@ -280048,7 +279976,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
        }
  
        atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status);
-@@ -1484,7 +1426,7 @@ int zfcp_erp_thread_setup(struct zfcp_ad
+@@ -1484,7 +1426,7 @@
        retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD);
        if (retval < 0) {
                dev_err(&adapter->ccw_device->dev,
@@ -280057,7 +279985,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                return retval;
        }
        wait_event(adapter->erp_thread_wqh,
-@@ -1506,7 +1448,7 @@ void zfcp_erp_thread_kill(struct zfcp_ad
+@@ -1506,7 +1448,7 @@
  {
        atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status);
        up(&adapter->erp_ready_sem);
@@ -280066,7 +279994,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  
        wait_event(adapter->erp_thread_wqh,
                   !(atomic_read(&adapter->status) &
-@@ -1526,7 +1468,6 @@ void zfcp_erp_adapter_failed(struct zfcp
+@@ -1526,7 +1468,6 @@
  {
        zfcp_erp_modify_adapter_status(adapter, id, ref,
                                       ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -280074,7 +280002,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1539,15 +1480,6 @@ void zfcp_erp_port_failed(struct zfcp_po
+@@ -1539,15 +1480,6 @@
  {
        zfcp_erp_modify_port_status(port, id, ref,
                                    ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -280090,7 +280018,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1560,10 +1492,6 @@ void zfcp_erp_unit_failed(struct zfcp_un
+@@ -1560,10 +1492,6 @@
  {
        zfcp_erp_modify_unit_status(unit, id, ref,
                                    ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
@@ -280101,7 +280029,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1754,9 +1682,8 @@ static void zfcp_erp_port_access_changed
+@@ -1754,9 +1682,8 @@
  
        if (!(status & (ZFCP_STATUS_COMMON_ACCESS_DENIED |
                        ZFCP_STATUS_COMMON_ACCESS_BOXED))) {
@@ -280113,7 +280041,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -1779,10 +1706,7 @@ void zfcp_erp_adapter_access_changed(str
+@@ -1779,10 +1706,7 @@
                return;
  
        read_lock_irqsave(&zfcp_data.config_lock, flags);
@@ -280125,9 +280053,9 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_erp.c linux-2.6.27.19-5.1/drivers
 +              zfcp_erp_port_access_changed(port, id, ref);
        read_unlock_irqrestore(&zfcp_data.config_lock, flags);
  }
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ext.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_ext.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_ext.h   2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_ext.h
+--- a/drivers/s390/scsi/zfcp_ext.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_ext.h     Wed May 06 16:56:32 2009 +0100
 @@ -12,16 +12,14 @@
  #include "zfcp_def.h"
  
@@ -280149,7 +280077,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  extern void zfcp_unit_dequeue(struct zfcp_unit *);
  extern int zfcp_reqlist_isempty(struct zfcp_adapter *);
  extern void zfcp_sg_free_table(struct scatterlist *, int);
-@@ -29,6 +27,7 @@ extern int zfcp_sg_setup_table(struct sc
+@@ -29,6 +27,7 @@
  
  /* zfcp_ccw.c */
  extern int zfcp_ccw_register(void);
@@ -280157,7 +280085,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  
  /* zfcp_cfdc.c */
  extern struct miscdevice zfcp_cfdc_misc;
-@@ -50,6 +49,8 @@ extern void zfcp_hba_dbf_event_fsf_unsol
+@@ -50,6 +49,8 @@
                                         struct fsf_status_read_buffer *);
  extern void zfcp_hba_dbf_event_qdio(struct zfcp_adapter *, unsigned int, int,
                                    int);
@@ -280166,7 +280094,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  extern void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *);
  extern void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *);
  extern void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *);
-@@ -91,17 +92,21 @@ extern void zfcp_erp_port_access_denied(
+@@ -91,17 +92,21 @@
  extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8, void *);
  extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, void *);
  extern void zfcp_erp_timeout_handler(unsigned long);
@@ -280189,7 +280117,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  extern int zfcp_fsf_close_port(struct zfcp_erp_action *);
  extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *);
  extern int zfcp_fsf_open_unit(struct zfcp_erp_action *);
-@@ -135,10 +140,8 @@ extern struct zfcp_fsf_req *zfcp_fsf_abo
+@@ -135,10 +140,8 @@
  extern int zfcp_qdio_allocate(struct zfcp_adapter *);
  extern void zfcp_qdio_free(struct zfcp_adapter *);
  extern int zfcp_qdio_send(struct zfcp_fsf_req *);
@@ -280202,7 +280130,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  extern int zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *, unsigned long,
                                   struct scatterlist *, int);
  extern int zfcp_qdio_open(struct zfcp_adapter *);
-@@ -148,14 +151,12 @@ extern void zfcp_qdio_close(struct zfcp_
+@@ -148,14 +151,12 @@
  extern struct zfcp_data zfcp_data;
  extern int zfcp_adapter_scsi_register(struct zfcp_adapter *);
  extern void zfcp_adapter_scsi_unregister(struct zfcp_adapter *);
@@ -280217,16 +280145,17 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_ext.h linux-2.6.27.19-5.1/drivers
  extern struct attribute_group zfcp_sysfs_port_attrs;
  extern struct device_attribute *zfcp_sysfs_sdev_attrs[];
  extern struct device_attribute *zfcp_sysfs_shost_attrs[];
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fc.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_fc.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fc.c    2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fc.c
+--- a/drivers/s390/scsi/zfcp_fc.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fc.c      Wed May 06 16:56:32 2009 +0100
 @@ -6,15 +6,9 @@
   * Copyright IBM Corporation 2008
   */
  
--#include "zfcp_ext.h"
 +#define KMSG_COMPONENT "zfcp"
++
+ #include "zfcp_ext.h"
+-
 -struct ct_iu_gpn_ft_req {
 -      struct ct_hdr header;
 -      u8 flags;
@@ -280234,11 +280163,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
 -      u8 area_id_scope;
 -      u8 fc4_type;
 -} __attribute__ ((packed));
-+#include "zfcp_ext.h"
  
  struct gpn_ft_resp_acc {
        u8 control;
-@@ -23,9 +17,12 @@ struct gpn_ft_resp_acc {
+@@ -23,9 +17,12 @@
        u64 wwpn;
  } __attribute__ ((packed));
  
@@ -280253,7 +280181,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  #define ZFCP_GPN_FT_MAX_ENTRIES ZFCP_GPN_FT_BUFFERS * (ZFCP_GPN_FT_ENTRIES + 1)
  
  struct ct_iu_gpn_ft_resp {
-@@ -39,6 +36,85 @@ struct zfcp_gpn_ft {
+@@ -39,6 +36,85 @@
        struct scatterlist sg_resp[ZFCP_GPN_FT_BUFFERS];
  };
  
@@ -280339,7 +280267,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
                                   struct fcp_rscn_element *elem)
  {
-@@ -47,10 +123,7 @@ static void _zfcp_fc_incoming_rscn(struc
+@@ -47,10 +123,7 @@
  
        read_lock_irqsave(&zfcp_data.config_lock, flags);
        list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
@@ -280351,7 +280279,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
                        /* Try to connect to unused ports anyway. */
                        zfcp_erp_port_reopen(port,
                                             ZFCP_STATUS_COMMON_ERP_FAILED,
-@@ -102,7 +175,7 @@ static void zfcp_fc_incoming_rscn(struct
+@@ -102,7 +175,7 @@
        schedule_work(&fsf_req->adapter->scan_work);
  }
  
@@ -280360,7 +280288,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  {
        struct zfcp_adapter *adapter = req->adapter;
        struct zfcp_port *port;
-@@ -157,7 +230,18 @@ void zfcp_fc_incoming_els(struct zfcp_fs
+@@ -157,7 +230,18 @@
                zfcp_fc_incoming_rscn(fsf_req);
  }
  
@@ -280380,7 +280308,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  {
        struct zfcp_gid_pn_data *gid_pn = (struct zfcp_gid_pn_data *) data;
        struct zfcp_send_ct *ct = &gid_pn->ct;
-@@ -166,48 +250,34 @@ static void zfcp_ns_gid_pn_handler(unsig
+@@ -166,19 +250,56 @@
        struct zfcp_port *port = gid_pn->port;
  
        if (ct->status)
@@ -280400,94 +280328,100 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status);
 -out:
 -      mempool_free(gid_pn, port->adapter->pool.data_gid_pn);
- }
--/**
-- * zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request
-- * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
-- * return: -ENOMEM on error, 0 otherwise
-- */
--int zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action)
++}
++
 +int static zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action,
 +                                   struct zfcp_gid_pn_data *gid_pn)
- {
--      int ret;
--      struct zfcp_gid_pn_data *gid_pn;
-       struct zfcp_adapter *adapter = erp_action->adapter;
--
--      gid_pn = mempool_alloc(adapter->pool.data_gid_pn, GFP_ATOMIC);
--      if (!gid_pn)
--              return -ENOMEM;
--
--      memset(gid_pn, 0, sizeof(*gid_pn));
++{
++      struct zfcp_adapter *adapter = erp_action->adapter;
 +      struct zfcp_fc_ns_handler_data compl_rec;
 +      int ret;
-       /* setup parameters for send generic command */
-       gid_pn->port = erp_action->port;
--      gid_pn->ct.port = adapter->nameserver_port;
--      gid_pn->ct.handler = zfcp_ns_gid_pn_handler;
--      gid_pn->ct.handler_data = (unsigned long) gid_pn;
++
++      /* setup parameters for send generic command */
++      gid_pn->port = erp_action->port;
 +      gid_pn->ct.wka_port = &adapter->nsp;
 +      gid_pn->ct.handler = zfcp_fc_ns_handler;
 +      gid_pn->ct.handler_data = (unsigned long) &compl_rec;
-       gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
-       gid_pn->ct.req = &gid_pn->req;
-       gid_pn->ct.resp = &gid_pn->resp;
--      gid_pn->ct.req_count = 1;
--      gid_pn->ct.resp_count = 1;
-       sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
-                   sizeof(struct ct_iu_gid_pn_req));
-       sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
-@@ -219,13 +289,45 @@ int zfcp_fc_ns_gid_pn_request(struct zfc
-       gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
-       gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
-       gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
--      gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_MAX_SIZE;
++      gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
++      gid_pn->ct.req = &gid_pn->req;
++      gid_pn->ct.resp = &gid_pn->resp;
++      sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
++                  sizeof(struct ct_iu_gid_pn_req));
++      sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
++                  sizeof(struct ct_iu_gid_pn_resp));
++
++      /* setup nameserver request */
++      gid_pn->ct_iu_req.header.revision = ZFCP_CT_REVISION;
++      gid_pn->ct_iu_req.header.gs_type = ZFCP_CT_DIRECTORY_SERVICE;
++      gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
++      gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
++      gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
 +      gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_SIZE_ONE_PAGE / 4;
-       gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
++      gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
++
 +      init_completion(&compl_rec.done);
 +      compl_rec.handler = zfcp_fc_ns_gid_pn_eval;
 +      compl_rec.handler_data = (unsigned long) gid_pn;
-       ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
-                              erp_action);
++      ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
++                             erp_action);
 +      if (!ret)
 +              wait_for_completion(&compl_rec.done);
 +      return ret;
-+}
-+
-+/**
-+ * zfcp_fc_ns_gid_pn_request - initiate GID_PN nameserver request
-+ * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
-+ * return: -ENOMEM on error, 0 otherwise
-+ */
+ }
+ /**
+@@ -186,7 +307,7 @@
+  * @erp_action: pointer to zfcp_erp_action where GID_PN request is needed
+  * return: -ENOMEM on error, 0 otherwise
+  */
+-int zfcp_fc_ns_gid_pn_request(struct zfcp_erp_action *erp_action)
 +int zfcp_fc_ns_gid_pn(struct zfcp_erp_action *erp_action)
-+{
-+      int ret;
-+      struct zfcp_gid_pn_data *gid_pn;
-+      struct zfcp_adapter *adapter = erp_action->adapter;
-+
-+      gid_pn = mempool_alloc(adapter->pool.data_gid_pn, GFP_ATOMIC);
-+      if (!gid_pn)
-+              return -ENOMEM;
-+
-+      memset(gid_pn, 0, sizeof(*gid_pn));
-+
+ {
+       int ret;
+       struct zfcp_gid_pn_data *gid_pn;
+@@ -198,34 +319,15 @@
+       memset(gid_pn, 0, sizeof(*gid_pn));
+-      /* setup parameters for send generic command */
+-      gid_pn->port = erp_action->port;
+-      gid_pn->ct.port = adapter->nameserver_port;
+-      gid_pn->ct.handler = zfcp_ns_gid_pn_handler;
+-      gid_pn->ct.handler_data = (unsigned long) gid_pn;
+-      gid_pn->ct.timeout = ZFCP_NS_GID_PN_TIMEOUT;
+-      gid_pn->ct.req = &gid_pn->req;
+-      gid_pn->ct.resp = &gid_pn->resp;
+-      gid_pn->ct.req_count = 1;
+-      gid_pn->ct.resp_count = 1;
+-      sg_init_one(&gid_pn->req, &gid_pn->ct_iu_req,
+-                  sizeof(struct ct_iu_gid_pn_req));
+-      sg_init_one(&gid_pn->resp, &gid_pn->ct_iu_resp,
+-                  sizeof(struct ct_iu_gid_pn_resp));
 +      ret = zfcp_wka_port_get(&adapter->nsp);
-       if (ret)
--              mempool_free(gid_pn, adapter->pool.data_gid_pn);
++      if (ret)
 +              goto out;
-+
+-      /* setup nameserver request */
+-      gid_pn->ct_iu_req.header.revision = ZFCP_CT_REVISION;
+-      gid_pn->ct_iu_req.header.gs_type = ZFCP_CT_DIRECTORY_SERVICE;
+-      gid_pn->ct_iu_req.header.gs_subtype = ZFCP_CT_NAME_SERVER;
+-      gid_pn->ct_iu_req.header.options = ZFCP_CT_SYNCHRONOUS;
+-      gid_pn->ct_iu_req.header.cmd_rsp_code = ZFCP_CT_GID_PN;
+-      gid_pn->ct_iu_req.header.max_res_size = ZFCP_CT_MAX_SIZE;
+-      gid_pn->ct_iu_req.wwpn = erp_action->port->wwpn;
 +      ret = zfcp_fc_ns_gid_pn_request(erp_action, gid_pn);
-+
+-      ret = zfcp_fsf_send_ct(&gid_pn->ct, adapter->pool.fsf_req_erp,
+-                             erp_action);
+-      if (ret)
+-              mempool_free(gid_pn, adapter->pool.data_gid_pn);
 +      zfcp_wka_port_put(&adapter->nsp);
 +out:
 +      mempool_free(gid_pn, adapter->pool.data_gid_pn);
        return ret;
  }
  
-@@ -255,14 +357,14 @@ struct zfcp_els_adisc {
+@@ -255,14 +357,14 @@
        struct scatterlist req;
        struct scatterlist resp;
        struct zfcp_ls_adisc ls_adisc;
@@ -280504,7 +280438,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  
        if (adisc->els.status) {
                /* request rejected or timed out */
-@@ -295,10 +397,8 @@ static int zfcp_fc_adisc(struct zfcp_por
+@@ -295,10 +397,8 @@
        sg_init_one(adisc->els.req, &adisc->ls_adisc,
                    sizeof(struct zfcp_ls_adisc));
        sg_init_one(adisc->els.resp, &adisc->ls_adisc_acc,
@@ -280516,7 +280450,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        adisc->els.adapter = adapter;
        adisc->els.port = port;
        adisc->els.d_id = port->d_id;
-@@ -338,41 +438,18 @@ void zfcp_test_link(struct zfcp_port *po
+@@ -338,41 +438,18 @@
                zfcp_erp_port_forced_reopen(port, 0, 65, NULL);
  }
  
@@ -280563,7 +280497,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
  {
        struct zfcp_gpn_ft *gpn_ft;
        struct ct_iu_gpn_ft_req *req;
-@@ -381,7 +458,7 @@ static struct zfcp_gpn_ft *zfcp_alloc_sg
+@@ -381,7 +458,7 @@
        if (!gpn_ft)
                return NULL;
  
@@ -280572,7 +280506,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        if (!req) {
                kfree(gpn_ft);
                gpn_ft = NULL;
-@@ -389,8 +466,8 @@ static struct zfcp_gpn_ft *zfcp_alloc_sg
+@@ -389,8 +466,8 @@
        }
        sg_init_one(&gpn_ft->sg_req, req, sizeof(*req));
  
@@ -280583,7 +280517,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
                gpn_ft = NULL;
        }
  out:
-@@ -399,11 +476,12 @@ out:
+@@ -399,11 +476,12 @@
  
  
  static int zfcp_scan_issue_gpn_ft(struct zfcp_gpn_ft *gpn_ft,
@@ -280598,7 +280532,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        int ret;
  
        /* prepare CT IU for GPN_FT */
-@@ -412,27 +490,25 @@ static int zfcp_scan_issue_gpn_ft(struct
+@@ -412,27 +490,25 @@
        req->header.gs_subtype = ZFCP_CT_NAME_SERVER;
        req->header.options = ZFCP_CT_SYNCHRONOUS;
        req->header.cmd_rsp_code = ZFCP_CT_GPN_FT;
@@ -280633,7 +280567,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        return ret;
  }
  
-@@ -442,9 +518,8 @@ static void zfcp_validate_port(struct zf
+@@ -442,9 +518,8 @@
  
        atomic_clear_mask(ZFCP_STATUS_COMMON_NOESC, &port->status);
  
@@ -280645,7 +280579,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
                zfcp_port_put(port);
                return;
        }
-@@ -454,13 +529,13 @@ static void zfcp_validate_port(struct zf
+@@ -454,13 +529,13 @@
        zfcp_port_dequeue(port);
  }
  
@@ -280661,7 +280595,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        struct zfcp_port *port, *tmp;
        u32 d_id;
        int ret = 0, x, last = 0;
-@@ -474,13 +549,17 @@ static int zfcp_scan_eval_gpn_ft(struct 
+@@ -474,13 +549,17 @@
                return -EIO;
        }
  
@@ -280681,7 +280615,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
                if (x % (ZFCP_GPN_FT_ENTRIES + 1))
                        acc++;
                else
-@@ -490,6 +569,9 @@ static int zfcp_scan_eval_gpn_ft(struct 
+@@ -490,6 +569,9 @@
                d_id = acc->port_id[0] << 16 | acc->port_id[1] << 8 |
                       acc->port_id[2];
  
@@ -280691,7 +280625,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
                /* skip the adapter's port and known remote ports */
                if (acc->wwpn == fc_host_port_name(adapter->scsi_host))
                        continue;
-@@ -523,31 +605,40 @@ int zfcp_scan_ports(struct zfcp_adapter 
+@@ -523,31 +605,40 @@
  {
        int ret, i;
        struct zfcp_gpn_ft *gpn_ft;
@@ -280740,9 +280674,9 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fc.c linux-2.6.27.19-5.1/drivers/
        return ret;
  }
  
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.c   2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fsf.c
+--- a/drivers/s390/scsi/zfcp_fsf.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fsf.c     Wed May 06 16:56:32 2009 +0100
 @@ -6,6 +6,9 @@
   * Copyright IBM Corporation 2002, 2008
   */
@@ -280753,7 +280687,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  #include "zfcp_ext.h"
  
  static void zfcp_fsf_request_timeout_handler(unsigned long data)
-@@ -50,19 +53,16 @@ static u32 fsf_qtcb_type[] = {
+@@ -50,19 +53,16 @@
        [FSF_QTCB_UPLOAD_CONTROL_FILE] =  FSF_SUPPORT_COMMAND
  };
  
@@ -280777,7 +280711,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req,
-@@ -70,8 +70,8 @@ static void zfcp_fsf_access_denied_port(
+@@ -70,8 +70,8 @@
  {
        struct fsf_qtcb_header *header = &req->qtcb->header;
        dev_warn(&req->adapter->ccw_device->dev,
@@ -280788,7 +280722,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
        zfcp_erp_port_access_denied(port, 55, req);
-@@ -83,8 +83,9 @@ static void zfcp_fsf_access_denied_unit(
+@@ -83,8 +83,9 @@
  {
        struct fsf_qtcb_header *header = &req->qtcb->header;
        dev_warn(&req->adapter->ccw_device->dev,
@@ -280800,7 +280734,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
        zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
        zfcp_erp_unit_access_denied(unit, 59, req);
-@@ -93,9 +94,8 @@ static void zfcp_fsf_access_denied_unit(
+@@ -93,9 +94,8 @@
  
  static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req)
  {
@@ -280812,7 +280746,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req);
        req->status |= ZFCP_STATUS_FSFREQ_ERROR;
  }
-@@ -171,42 +171,6 @@ static void zfcp_fsf_status_read_port_cl
+@@ -171,42 +171,6 @@
        read_unlock_irqrestore(&zfcp_data.config_lock, flags);
  }
  
@@ -280855,7 +280789,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id,
                                         struct fsf_link_down_info *link_down)
  {
-@@ -223,62 +187,66 @@ static void zfcp_fsf_link_down_info_eval
+@@ -223,62 +187,66 @@
        switch (link_down->error_code) {
        case FSF_PSQ_LINK_NO_LIGHT:
                dev_warn(&req->adapter->ccw_device->dev,
@@ -280942,7 +280876,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        }
  out:
        zfcp_erp_adapter_failed(adapter, id, req);
-@@ -286,27 +254,18 @@ out:
+@@ -286,27 +254,18 @@
  
  static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req)
  {
@@ -280970,7 +280904,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_fsf_link_down_info_eval(req, 40, NULL);
        };
  }
-@@ -335,14 +294,17 @@ static void zfcp_fsf_status_read_handler
+@@ -335,14 +294,17 @@
        case FSF_STATUS_READ_SENSE_DATA_AVAIL:
                break;
        case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
@@ -280990,7 +280924,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                /* All ports should be marked as ready to run again */
                zfcp_erp_modify_adapter_status(adapter, 30, NULL,
                                               ZFCP_STATUS_COMMON_RUNNING,
-@@ -370,7 +332,7 @@ static void zfcp_fsf_status_read_handler
+@@ -370,7 +332,7 @@
        zfcp_fsf_req_free(req);
  
        atomic_inc(&adapter->stat_miss);
@@ -280999,7 +280933,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  static void zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *req)
-@@ -386,8 +348,8 @@ static void zfcp_fsf_fsfstatus_qual_eval
+@@ -386,8 +348,8 @@
                break;
        case FSF_SQ_NO_RECOM:
                dev_err(&req->adapter->ccw_device->dev,
@@ -281010,7 +280944,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req);
                break;
        }
-@@ -403,8 +365,7 @@ static void zfcp_fsf_fsfstatus_eval(stru
+@@ -403,8 +365,7 @@
        switch (req->qtcb->header.fsf_status) {
        case FSF_UNKNOWN_COMMAND:
                dev_err(&req->adapter->ccw_device->dev,
@@ -281020,7 +280954,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        req->qtcb->header.fsf_command);
                zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
-@@ -435,11 +396,9 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -435,11 +396,9 @@
                return;
        case FSF_PROT_QTCB_VERSION_ERROR:
                dev_err(&adapter->ccw_device->dev,
@@ -281035,7 +280969,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_shutdown(adapter, 0, 117, req);
                break;
        case FSF_PROT_ERROR_STATE:
-@@ -449,8 +408,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -449,8 +408,7 @@
                break;
        case FSF_PROT_UNSUPP_QTCB_TYPE:
                dev_err(&adapter->ccw_device->dev,
@@ -281045,7 +280979,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_shutdown(adapter, 0, 118, req);
                break;
        case FSF_PROT_HOST_CONNECTION_INITIALIZING:
-@@ -459,7 +417,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -459,7 +417,7 @@
                break;
        case FSF_PROT_DUPLICATE_REQUEST_ID:
                dev_err(&adapter->ccw_device->dev,
@@ -281054,7 +280988,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        (unsigned long long)qtcb->bottom.support.req_handle);
                zfcp_erp_adapter_shutdown(adapter, 0, 78, req);
                break;
-@@ -479,9 +437,7 @@ static void zfcp_fsf_protstatus_eval(str
+@@ -479,9 +437,7 @@
                break;
        default:
                dev_err(&adapter->ccw_device->dev,
@@ -281065,7 +280999,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        qtcb->prefix.prot_status);
                zfcp_erp_adapter_shutdown(adapter, 0, 119, req);
        }
-@@ -559,33 +515,17 @@ static int zfcp_fsf_exchange_config_eval
+@@ -559,33 +515,17 @@
                adapter->peer_wwpn = bottom->plogi_payload.wwpn;
                adapter->peer_wwnn = bottom->plogi_payload.wwnn;
                fc_host_port_type(shost) = FC_PORTTYPE_PTP;
@@ -281083,26 +281017,26 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                break;
        case FSF_TOPO_AL:
                fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
--              dev_err(&adapter->ccw_device->dev,
++      default:
+               dev_err(&adapter->ccw_device->dev,
 -                      "Unsupported arbitrated loop fibrechannel "
 -                      "topology detected, shutting down "
 -                      "adapter.\n");
--              zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
++                      "Unknown or unsupported arbitrated loop "
++                      "fibre channel topology detected\n");
+               zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
 -              return -EIO;
-       default:
+-      default:
 -              fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
-               dev_err(&adapter->ccw_device->dev,
+-              dev_err(&adapter->ccw_device->dev,
 -                      "The fibrechannel topology reported by the"
 -                      " adapter is not known by the zfcp driver,"
 -                      " shutting down adapter.\n");
 -              zfcp_erp_adapter_shutdown(adapter, 0, 128, req);
-+                      "Unknown or unsupported arbitrated loop "
-+                      "fibre channel topology detected\n");
-+              zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
                return -EIO;
        }
  
-@@ -616,11 +556,9 @@ static void zfcp_fsf_exchange_config_dat
+@@ -616,11 +556,9 @@
  
                if (bottom->max_qtcb_size < sizeof(struct fsf_qtcb)) {
                        dev_err(&adapter->ccw_device->dev,
@@ -281117,7 +281051,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        zfcp_erp_adapter_shutdown(adapter, 0, 129, req);
                        return;
                }
-@@ -656,15 +594,15 @@ static void zfcp_fsf_exchange_config_dat
+@@ -656,15 +594,15 @@
  
        if (FSF_QTCB_CURRENT_VERSION < bottom->low_qtcb_version) {
                dev_err(&adapter->ccw_device->dev,
@@ -281137,7 +281071,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_shutdown(adapter, 0, 126, req);
        }
  }
-@@ -688,7 +626,6 @@ static void zfcp_fsf_exchange_port_evalu
+@@ -688,7 +626,6 @@
  
  static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
  {
@@ -281145,7 +281079,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        struct fsf_qtcb *qtcb = req->qtcb;
  
        if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
-@@ -697,38 +634,47 @@ static void zfcp_fsf_exchange_port_data_
+@@ -697,38 +634,47 @@
        switch (qtcb->header.fsf_status) {
        case FSF_GOOD:
                zfcp_fsf_exchange_port_evaluate(req);
@@ -281173,16 +281107,16 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
 -      spin_unlock_bh(&queue->lock);
 +      spin_unlock_bh(&adapter->req_q_lock);
        return 0;
- }
++}
++
 +static int zfcp_fsf_sbal_available(struct zfcp_adapter *adapter)
 +{
 +      unsigned int count = atomic_read(&adapter->req_q.count);
 +      if (!count)
 +              atomic_inc(&adapter->qdio_outb_full);
 +      return count > 0;
-+}
-+
+ }
  static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
  {
        long ret;
@@ -281203,7 +281137,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return -EIO;
  }
  
-@@ -739,6 +685,7 @@ static struct zfcp_fsf_req *zfcp_fsf_all
+@@ -739,6 +685,7 @@
        if (!req)
                return NULL;
        memset(req, 0, sizeof(*req));
@@ -281211,7 +281145,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return req;
  }
  
-@@ -765,7 +712,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req
+@@ -765,7 +712,7 @@
                                                u32 fsf_cmd, int req_flags,
                                                mempool_t *pool)
  {
@@ -281220,7 +281154,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        struct zfcp_fsf_req *req;
        struct zfcp_qdio_queue *req_q = &adapter->req_q;
-@@ -825,27 +772,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req
+@@ -825,27 +772,24 @@
  static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
  {
        struct zfcp_adapter *adapter = req->adapter;
@@ -281257,7 +281191,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_reopen(adapter, 0, 116, req);
                return -EIO;
        }
-@@ -867,10 +811,10 @@ int zfcp_fsf_status_read(struct zfcp_ada
+@@ -867,10 +811,10 @@
  {
        struct zfcp_fsf_req *req;
        struct fsf_status_read_buffer *sr_buf;
@@ -281270,7 +281204,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -910,7 +854,7 @@ failed_buf:
+@@ -910,7 +854,7 @@
        zfcp_fsf_req_free(req);
        zfcp_hba_dbf_event_fsf_unsol("fail", adapter, NULL);
  out:
@@ -281279,7 +281213,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -980,16 +924,18 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_
+@@ -980,16 +924,18 @@
                                                struct zfcp_unit *unit,
                                                int req_flags)
  {
@@ -281302,7 +281236,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        if (unlikely(!(atomic_read(&unit->status) &
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
-@@ -1013,7 +959,7 @@ out_error_free:
+@@ -1013,7 +959,7 @@
        zfcp_fsf_req_free(req);
        req = NULL;
  out:
@@ -281311,7 +281245,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return req;
  }
  
-@@ -1021,7 +967,6 @@ static void zfcp_fsf_send_ct_handler(str
+@@ -1021,7 +967,6 @@
  {
        struct zfcp_adapter *adapter = req->adapter;
        struct zfcp_send_ct *send_ct = req->data;
@@ -281319,7 +281253,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        struct fsf_qtcb_header *header = &req->qtcb->header;
  
        send_ct->status = -EINVAL;
-@@ -1040,17 +985,14 @@ static void zfcp_fsf_send_ct_handler(str
+@@ -1040,17 +985,14 @@
          case FSF_ADAPTER_STATUS_AVAILABLE:
                  switch (header->fsf_status_qual.word[0]){
                  case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
@@ -281337,7 +281271,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                req->status |= ZFCP_STATUS_FSFREQ_ERROR |
                               ZFCP_STATUS_FSFREQ_RETRY;
                break;
-@@ -1070,12 +1012,29 @@ skip_fsfstatus:
+@@ -1070,11 +1012,28 @@
                send_ct->handler(send_ct->handler_data);
  }
  
@@ -281352,7 +281286,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
 +      struct qdio_buffer_element *sbale = zfcp_qdio_sbale_req(req);
 +      u32 feat = req->adapter->adapter_features;
        int bytes;
++
 +      if (!(feat & FSF_FEATURE_ELS_CT_CHAINED_SBALS)) {
 +              if (sg_req->length > PAGE_SIZE || sg_resp->length > PAGE_SIZE ||
 +                  !sg_is_last(sg_req) || !sg_is_last(sg_resp))
@@ -281366,11 +281300,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
 +              sbale[3].flags |= SBAL_FLAGS_LAST_ENTRY;
 +              return 0;
 +      }
-+
        bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
                                        sg_req, max_sbals);
-       if (bytes <= 0)
-@@ -1101,12 +1060,12 @@ static int zfcp_fsf_setup_sbals(struct z
+@@ -1101,12 +1060,12 @@
  int zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
                     struct zfcp_erp_action *erp_action)
  {
@@ -281386,7 +281319,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1117,13 +1076,13 @@ int zfcp_fsf_send_ct(struct zfcp_send_ct
+@@ -1117,13 +1076,13 @@
                goto out;
        }
  
@@ -281403,7 +281336,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        req->qtcb->bottom.support.service_class = FSF_CLASS_3;
        req->qtcb->bottom.support.timeout = ct->timeout;
        req->data = ct;
-@@ -1148,7 +1107,7 @@ failed_send:
+@@ -1148,7 +1107,7 @@
        if (erp_action)
                erp_action->fsf_req = NULL;
  out:
@@ -281412,7 +281345,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return ret;
  }
  
-@@ -1218,8 +1177,8 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1218,8 +1177,8 @@
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return -EBUSY;
  
@@ -281423,7 +281356,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS,
                                  ZFCP_REQ_AUTO_CLEANUP, NULL);
-@@ -1228,8 +1187,8 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1228,8 +1187,8 @@
                goto out;
        }
  
@@ -281434,7 +281367,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (ret)
                goto failed_send;
  
-@@ -1252,19 +1211,19 @@ int zfcp_fsf_send_els(struct zfcp_send_e
+@@ -1252,19 +1211,19 @@
  failed_send:
        zfcp_fsf_req_free(req);
  out:
@@ -281458,7 +281391,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                goto out;
        req = zfcp_fsf_req_create(adapter,
                                  FSF_QTCB_EXCHANGE_CONFIG_DATA,
-@@ -1295,18 +1254,18 @@ int zfcp_fsf_exchange_config_data(struct
+@@ -1295,18 +1254,18 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281480,7 +281413,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1334,7 +1293,7 @@ int zfcp_fsf_exchange_config_data_sync(s
+@@ -1334,7 +1293,7 @@
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
  out:
@@ -281489,7 +281422,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (!retval)
                wait_event(req->completion_wq,
                           req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
-@@ -1351,7 +1310,7 @@ out:
+@@ -1351,7 +1310,7 @@
   */
  int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
  {
@@ -281498,7 +281431,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        struct zfcp_fsf_req *req;
        struct zfcp_adapter *adapter = erp_action->adapter;
        int retval = -EIO;
-@@ -1359,8 +1318,8 @@ int zfcp_fsf_exchange_port_data(struct z
+@@ -1359,8 +1318,8 @@
        if (!(adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT))
                return -EOPNOTSUPP;
  
@@ -281509,7 +281442,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
                                  ZFCP_REQ_AUTO_CLEANUP,
-@@ -1385,7 +1344,7 @@ int zfcp_fsf_exchange_port_data(struct z
+@@ -1385,7 +1344,7 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281518,7 +281451,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -1398,15 +1357,15 @@ out:
+@@ -1398,15 +1357,15 @@
  int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
                                     struct fsf_qtcb_bottom_port *data)
  {
@@ -281537,7 +281470,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                goto out;
  
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0,
-@@ -1427,7 +1386,7 @@ int zfcp_fsf_exchange_port_data_sync(str
+@@ -1427,7 +1386,7 @@
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
  out:
@@ -281546,7 +281479,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (!retval)
                wait_event(req->completion_wq,
                           req->status & ZFCP_STATUS_FSFREQ_COMPLETED);
-@@ -1443,7 +1402,7 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1443,7 +1402,7 @@
        struct fsf_plogi *plogi;
  
        if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
@@ -281555,7 +281488,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        switch (header->fsf_status) {
        case FSF_PORT_ALREADY_OPEN:
-@@ -1453,9 +1412,9 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1453,9 +1412,9 @@
                break;
        case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
                dev_warn(&req->adapter->ccw_device->dev,
@@ -281568,7 +281501,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_port_failed(port, 31, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
-@@ -1463,13 +1422,7 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1463,13 +1422,7 @@
                switch (header->fsf_status_qual.word[0]) {
                case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
                case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
@@ -281582,7 +281515,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                        break;
                }
-@@ -1496,11 +1449,9 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1496,11 +1449,9 @@
                 * another GID_PN straight after a port has been opened.
                 * Alternately, an ADISC/PDISC ELS should suffice, as well.
                 */
@@ -281596,7 +281529,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        if (plogi->serv_param.wwpn != port->wwpn)
                                atomic_clear_mask(ZFCP_STATUS_PORT_DID_DID,
                                                  &port->status);
-@@ -1514,9 +1465,6 @@ static void zfcp_fsf_open_port_handler(s
+@@ -1514,9 +1465,6 @@
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
        }
@@ -281606,7 +281539,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1526,12 +1474,12 @@ skip_fsfstatus:
+@@ -1526,12 +1474,12 @@
   */
  int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
  {
@@ -281621,7 +281554,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1553,7 +1501,6 @@ int zfcp_fsf_open_port(struct zfcp_erp_a
+@@ -1553,7 +1501,6 @@
        req->data = erp_action->port;
        req->erp_action = erp_action;
        erp_action->fsf_req = req;
@@ -281629,7 +281562,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        zfcp_fsf_start_erp_timer(req);
        retval = zfcp_fsf_req_send(req);
-@@ -1562,7 +1509,7 @@ int zfcp_fsf_open_port(struct zfcp_erp_a
+@@ -1562,7 +1509,7 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281638,7 +281571,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -1571,7 +1518,7 @@ static void zfcp_fsf_close_port_handler(
+@@ -1571,7 +1518,7 @@
        struct zfcp_port *port = req->data;
  
        if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
@@ -281647,7 +281580,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        switch (req->qtcb->header.fsf_status) {
        case FSF_PORT_HANDLE_NOT_VALID:
-@@ -1586,9 +1533,6 @@ static void zfcp_fsf_close_port_handler(
+@@ -1586,9 +1533,6 @@
                                            ZFCP_CLEAR);
                break;
        }
@@ -281657,7 +281590,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1598,12 +1542,12 @@ skip_fsfstatus:
+@@ -1598,12 +1542,12 @@
   */
  int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
  {
@@ -281672,7 +281605,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1624,7 +1568,6 @@ int zfcp_fsf_close_port(struct zfcp_erp_
+@@ -1624,7 +1568,6 @@
        req->erp_action = erp_action;
        req->qtcb->header.port_handle = erp_action->port->handle;
        erp_action->fsf_req = req;
@@ -281680,7 +281613,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        zfcp_fsf_start_erp_timer(req);
        retval = zfcp_fsf_req_send(req);
-@@ -1633,7 +1576,132 @@ int zfcp_fsf_close_port(struct zfcp_erp_
+@@ -1633,7 +1576,132 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281814,7 +281747,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -1695,12 +1763,12 @@ skip_fsfstatus:
+@@ -1695,12 +1763,12 @@
   */
  int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
  {
@@ -281829,7 +281762,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1731,7 +1799,7 @@ int zfcp_fsf_close_physical_port(struct 
+@@ -1731,7 +1799,7 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281838,7 +281771,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -1746,7 +1814,7 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1746,7 +1814,7 @@
        int exclusive, readwrite;
  
        if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
@@ -281847,7 +281780,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
                          ZFCP_STATUS_COMMON_ACCESS_BOXED |
-@@ -1774,14 +1842,12 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1774,14 +1842,12 @@
        case FSF_LUN_SHARING_VIOLATION:
                if (header->fsf_status_qual.word[0])
                        dev_warn(&adapter->ccw_device->dev,
@@ -281868,7 +281801,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                else
                        zfcp_act_eval_err(adapter,
                                          header->fsf_status_qual.word[2]);
-@@ -1792,9 +1858,10 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1792,9 +1858,10 @@
                break;
        case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED:
                dev_warn(&adapter->ccw_device->dev,
@@ -281882,7 +281815,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_unit_failed(unit, 34, req);
                /* fall through */
        case FSF_INVALID_COMMAND_OPTION:
-@@ -1831,26 +1898,29 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1831,26 +1898,29 @@
                                atomic_set_mask(ZFCP_STATUS_UNIT_READONLY,
                                                &unit->status);
                                dev_info(&adapter->ccw_device->dev,
@@ -281923,7 +281856,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                                zfcp_erp_unit_failed(unit, 36, req);
                                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                                zfcp_erp_unit_shutdown(unit, 0, 81, req);
-@@ -1858,9 +1928,6 @@ static void zfcp_fsf_open_unit_handler(s
+@@ -1858,9 +1928,6 @@
                }
                break;
        }
@@ -281933,7 +281866,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1870,12 +1937,12 @@ skip_fsfstatus:
+@@ -1870,12 +1937,12 @@
   */
  int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
  {
@@ -281948,7 +281881,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -1901,8 +1968,6 @@ int zfcp_fsf_open_unit(struct zfcp_erp_a
+@@ -1901,8 +1968,6 @@
        if (!(adapter->connection_features & FSF_FEATURE_NPIV_MODE))
                req->qtcb->bottom.support.option = FSF_OPEN_LUN_SUPPRESS_BOXING;
  
@@ -281957,7 +281890,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        zfcp_fsf_start_erp_timer(req);
        retval = zfcp_fsf_req_send(req);
        if (retval) {
-@@ -1910,7 +1975,7 @@ int zfcp_fsf_open_unit(struct zfcp_erp_a
+@@ -1910,7 +1975,7 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -281966,7 +281899,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -1919,7 +1984,7 @@ static void zfcp_fsf_close_unit_handler(
+@@ -1919,7 +1984,7 @@
        struct zfcp_unit *unit = req->data;
  
        if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
@@ -281975,7 +281908,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        switch (req->qtcb->header.fsf_status) {
        case FSF_PORT_HANDLE_NOT_VALID:
-@@ -1949,8 +2014,6 @@ static void zfcp_fsf_close_unit_handler(
+@@ -1949,8 +2014,6 @@
                atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status);
                break;
        }
@@ -281984,7 +281917,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  }
  
  /**
-@@ -1960,12 +2023,12 @@ skip_fsfstatus:
+@@ -1960,12 +2023,12 @@
   */
  int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
  {
@@ -281999,7 +281932,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_CLOSE_LUN,
-@@ -1986,7 +2049,6 @@ int zfcp_fsf_close_unit(struct zfcp_erp_
+@@ -1986,7 +2049,6 @@
        req->data = erp_action->unit;
        req->erp_action = erp_action;
        erp_action->fsf_req = req;
@@ -282007,7 +281940,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        zfcp_fsf_start_erp_timer(req);
        retval = zfcp_fsf_req_send(req);
-@@ -1995,7 +2057,7 @@ int zfcp_fsf_close_unit(struct zfcp_erp_
+@@ -1995,7 +2057,7 @@
                erp_action->fsf_req = NULL;
        }
  out:
@@ -282016,7 +281949,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -2036,20 +2098,53 @@ static void zfcp_fsf_req_latency(struct 
+@@ -2036,19 +2098,52 @@
        spin_unlock_irqrestore(&unit->latencies.lock, flags);
  }
  
@@ -282061,29 +281994,28 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        unsigned long flags;
  
 -      if (unlikely(!scpnt))
--              return;
--
-       read_lock_irqsave(&req->adapter->abort_lock, flags);
++      read_lock_irqsave(&req->adapter->abort_lock, flags);
++
 +      scpnt = req->data;
 +      if (unlikely(!scpnt)) {
 +              read_unlock_irqrestore(&req->adapter->abort_lock, flags);
-+              return;
+               return;
+-
+-      read_lock_irqsave(&req->adapter->abort_lock, flags);
 +      }
-+
        if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
                set_host_byte(scpnt, DID_SOFT_ERROR);
-               set_driver_byte(scpnt, SUGGEST_RETRY);
-@@ -2068,6 +2163,8 @@ static void zfcp_fsf_send_fcp_command_ta
+@@ -2067,6 +2162,8 @@
        if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA)
                zfcp_fsf_req_latency(req);
-+      zfcp_fsf_trace_latency(req);
 +
++      zfcp_fsf_trace_latency(req);
        if (unlikely(fcp_rsp_iu->validity.bits.fcp_rsp_len_valid)) {
                if (fcp_rsp_info[3] == RSP_CODE_GOOD)
-                       set_host_byte(scpnt, DID_OK);
-@@ -2102,7 +2199,8 @@ skip_fsfstatus:
+@@ -2102,7 +2199,8 @@
                zfcp_scsi_dbf_event_result("norm", 6, req->adapter, scpnt, req);
  
        scpnt->host_scribble = NULL;
@@ -282093,7 +282025,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        /*
         * We must hold this lock until scsi_done has been called.
         * Otherwise we may call scsi_done after abort regarding this
-@@ -2156,21 +2254,21 @@ static void zfcp_fsf_send_fcp_command_ha
+@@ -2156,21 +2254,21 @@
                break;
        case FSF_DIRECTION_INDICATOR_NOT_VALID:
                dev_err(&req->adapter->ccw_device->dev,
@@ -282123,7 +282055,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req);
                req->status |= ZFCP_STATUS_FSFREQ_ERROR;
                break;
-@@ -2201,6 +2299,20 @@ skip_fsfstatus:
+@@ -2201,6 +2299,20 @@
        }
  }
  
@@ -282144,7 +282076,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  /**
   * zfcp_fsf_send_fcp_command_task - initiate an FCP command (for a SCSI command)
   * @adapter: adapter where scsi command is issued
-@@ -2223,8 +2335,8 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2223,8 +2335,8 @@
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return -EBUSY;
  
@@ -282155,7 +282087,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                goto out;
        req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
                                  adapter->pool.fsf_req_scsi);
-@@ -2286,7 +2398,7 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2286,7 +2398,7 @@
        memcpy(fcp_cmnd_iu->fcp_cdb, scsi_cmnd->cmnd, scsi_cmnd->cmd_len);
  
        req->qtcb->bottom.io.fcp_cmnd_length = sizeof(struct fcp_cmnd_iu) +
@@ -282164,7 +282096,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        real_bytes = zfcp_qdio_sbals_from_sg(req, sbtype,
                                             scsi_sglist(scsi_cmnd),
-@@ -2296,10 +2408,10 @@ int zfcp_fsf_send_fcp_command_task(struc
+@@ -2296,10 +2408,10 @@
                        retval = -EIO;
                else {
                        dev_err(&adapter->ccw_device->dev,
@@ -282179,7 +282111,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
                        zfcp_erp_unit_shutdown(unit, 0, 131, req);
                        retval = -EINVAL;
                }
-@@ -2322,7 +2434,7 @@ failed_scsi_cmnd:
+@@ -2322,7 +2434,7 @@
        zfcp_fsf_req_free(req);
        scsi_cmnd->host_scribble = NULL;
  out:
@@ -282188,7 +282120,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return retval;
  }
  
-@@ -2338,7 +2450,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2338,7 +2450,7 @@
                                           struct zfcp_unit *unit,
                                           u8 tm_flags, int req_flags)
  {
@@ -282197,7 +282129,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        struct zfcp_fsf_req *req = NULL;
        struct fcp_cmnd_iu *fcp_cmnd_iu;
  
-@@ -2346,13 +2458,15 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2346,13 +2458,15 @@
                       ZFCP_STATUS_COMMON_UNBLOCKED)))
                return NULL;
  
@@ -282216,7 +282148,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT;
        req->data = unit;
-@@ -2362,7 +2476,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2362,7 +2476,7 @@
        req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND;
        req->qtcb->bottom.io.service_class = FSF_CLASS_3;
        req->qtcb->bottom.io.fcp_cmnd_length =  sizeof(struct fcp_cmnd_iu) +
@@ -282225,7 +282157,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        sbale = zfcp_qdio_sbale_req(req);
        sbale[0].flags |= SBAL_FLAGS0_TYPE_WRITE;
-@@ -2379,7 +2493,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c
+@@ -2379,7 +2493,7 @@
        zfcp_fsf_req_free(req);
        req = NULL;
  out:
@@ -282234,7 +282166,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        return req;
  }
  
-@@ -2398,7 +2512,7 @@ static void zfcp_fsf_control_file_handle
+@@ -2398,7 +2512,7 @@
  struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
                                           struct zfcp_fsf_cfdc *fsf_cfdc)
  {
@@ -282243,7 +282175,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        struct zfcp_fsf_req *req = NULL;
        struct fsf_qtcb_bottom_support *bottom;
        int direction, retval = -EIO, bytes;
-@@ -2417,7 +2531,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_fi
+@@ -2417,7 +2531,7 @@
                return ERR_PTR(-EINVAL);
        }
  
@@ -282252,7 +282184,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
        if (zfcp_fsf_req_sbal_get(adapter))
                goto out;
  
-@@ -2447,7 +2561,7 @@ struct zfcp_fsf_req *zfcp_fsf_control_fi
+@@ -2447,7 +2561,7 @@
        zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
        retval = zfcp_fsf_req_send(req);
  out:
@@ -282261,9 +282193,9 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.c linux-2.6.27.19-5.1/drivers
  
        if (!retval) {
                wait_event(req->completion_wq,
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.h
---- linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_fsf.h   2009-03-25 16:11:24.000000000 +0000
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_fsf.h
+--- a/drivers/s390/scsi/zfcp_fsf.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_fsf.h     Wed May 06 16:56:32 2009 +0100
 @@ -71,13 +71,6 @@
  #define FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED   0x00000041
  #define FSF_ELS_COMMAND_REJECTED              0x00000050
@@ -282288,14 +282220,14 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers
  #define FSF_UNKNOWN_COMMAND                   0x000000E2
  #define FSF_UNKNOWN_OP_SUBTYPE                  0x000000E3
  #define FSF_INVALID_COMMAND_OPTION              0x000000E5
-@@ -102,20 +93,9 @@
+@@ -102,19 +93,8 @@
  #define FSF_SQ_RETRY_IF_POSSIBLE              0x02
  #define FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED     0x03
  #define FSF_SQ_INVOKE_LINK_TEST_PROCEDURE     0x04
 -#define FSF_SQ_ULP_PROGRAMMING_ERROR          0x05
  #define FSF_SQ_COMMAND_ABORTED                        0x06
  #define FSF_SQ_NO_RETRY_POSSIBLE              0x07
+-
 -/* FSF status qualifier for CFDC commands */
 -#define FSF_SQ_CFDC_HARDENED_ON_SE            0x00000000
 -#define FSF_SQ_CFDC_COULD_NOT_HARDEN_ON_SE    0x00000001
@@ -282305,10 +282237,9 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers
 -#define FSF_SQ_CFDC_SUBTABLE_PORT_WWPN                0x0002
 -#define FSF_SQ_CFDC_SUBTABLE_PORT_DID         0x0003
 -#define FSF_SQ_CFDC_SUBTABLE_LUN              0x0004
--
  /* FSF status qualifier (most significant 4 bytes), local link down */
  #define FSF_PSQ_LINK_NO_LIGHT                 0x00000004
- #define FSF_PSQ_LINK_WRAP_PLUG                        0x00000008
 @@ -145,7 +125,6 @@
  #define FSF_STATUS_READ_LINK_UP               0x00000006
  #define FSF_STATUS_READ_NOTIFICATION_LOST     0x00000009
@@ -282408,19 +282339,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers
  #define FSF_UNIT_ACCESS_EXCLUSIVE             0x02000000
  #define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER     0x10000000
  
-@@ -265,11 +196,6 @@ struct fsf_queue_designator {
+@@ -263,11 +194,6 @@
+       u8  hla;
+       u8  ua;
        u32 res1;
- } __attribute__ ((packed));
+-} __attribute__ ((packed));
+-
 -struct fsf_port_closed_payload {
 -      struct fsf_queue_designator queue_designator;
 -      u32                         port_handle;
--} __attribute__ ((packed));
--
+ } __attribute__ ((packed));
  struct fsf_bit_error_payload {
-       u32 res1;
-       u32 link_failure_error_count;
-@@ -397,6 +323,7 @@ struct fsf_nport_serv_param {
+@@ -397,6 +323,7 @@
        u8  vendor_version_level[16];
  } __attribute__ ((packed));
  
@@ -282428,7 +282359,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers
  struct fsf_plogi {
        u32    code;
        struct fsf_nport_serv_param serv_param;
-@@ -514,4 +441,16 @@ struct fsf_qtcb {
+@@ -514,4 +441,16 @@
        u8 log[FSF_QTCB_LOG_SIZE];
  } __attribute__ ((packed));
  
@@ -282445,19 +282376,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_fsf.h linux-2.6.27.19-5.1/drivers
 +} __attribute__ ((packed));
 +
  #endif                                /* FSF_H */
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_qdio.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_qdio.c  2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_qdio.c
+--- a/drivers/s390/scsi/zfcp_qdio.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_qdio.c    Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2002, 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include "zfcp_ext.h"
  
- /* FIXME(tune): free space should be one max. SBAL chain plus what? */
-@@ -28,7 +30,7 @@ static int zfcp_qdio_buffers_enqueue(str
+@@ -28,7 +30,7 @@
        return 0;
  }
  
@@ -282466,7 +282397,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  zfcp_qdio_sbale(struct zfcp_qdio_queue *q, int sbal_idx, int sbale_idx)
  {
        return &q->sbal[sbal_idx]->element[sbale_idx];
-@@ -57,7 +59,7 @@ void zfcp_qdio_free(struct zfcp_adapter 
+@@ -57,7 +59,7 @@
  
  static void zfcp_qdio_handler_error(struct zfcp_adapter *adapter, u8 id)
  {
@@ -282475,10 +282406,12 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  
        zfcp_erp_adapter_reopen(adapter,
                                ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
-@@ -74,6 +76,23 @@ static void zfcp_qdio_zero_sbals(struct 
+@@ -72,6 +74,23 @@
+               sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
+               memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
        }
- }
++}
++
 +/* this needs to be called prior to updating the queue fill level */
 +static void zfcp_qdio_account(struct zfcp_adapter *adapter)
 +{
@@ -282494,12 +282427,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
 +      adapter->req_q_util += used * span;
 +      adapter->req_q_time = now;
 +      spin_unlock(&adapter->qdio_stat_lock);
-+}
-+
+ }
  static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int qdio_err,
-                             int queue_no, int first, int count,
-                             unsigned long parm)
-@@ -90,6 +109,7 @@ static void zfcp_qdio_int_req(struct ccw
+@@ -90,6 +109,7 @@
        /* cleanup all SBALs being program-owned now */
        zfcp_qdio_zero_sbals(queue->sbal, first, count);
  
@@ -282507,7 +282438,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        atomic_add(count, &queue->count);
        wake_up(&adapter->request_wq);
  }
-@@ -115,6 +135,7 @@ static void zfcp_qdio_reqid_check(struct
+@@ -115,6 +135,7 @@
        spin_unlock_irqrestore(&adapter->req_list_lock, flags);
  
        fsf_req->sbal_response = sbal_idx;
@@ -282515,7 +282446,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        zfcp_fsf_req_complete(fsf_req);
  }
  
-@@ -145,7 +166,7 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -145,7 +166,7 @@
  {
        struct zfcp_adapter *adapter = (struct zfcp_adapter *) parm;
        struct zfcp_qdio_queue *queue = &adapter->resp_q;
@@ -282524,7 +282455,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        int sbal_idx, sbale_idx, sbal_no;
  
        if (unlikely(qdio_err)) {
-@@ -174,8 +195,8 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -174,8 +195,8 @@
  
                if (unlikely(!(sbale->flags & SBAL_FLAGS_LAST_ENTRY)))
                        dev_warn(&adapter->ccw_device->dev,
@@ -282535,7 +282466,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        }
  
        /*
-@@ -190,8 +211,7 @@ static void zfcp_qdio_int_resp(struct cc
+@@ -190,8 +211,7 @@
   * @fsf_req: pointer to struct fsf_req
   * Returns: pointer to qdio_buffer_element (SBALE) structure
   */
@@ -282545,7 +282476,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  {
        return zfcp_qdio_sbale(&req->adapter->req_q, req->sbal_last, 0);
  }
-@@ -201,8 +221,7 @@ zfcp_qdio_sbale_req(struct zfcp_fsf_req 
+@@ -201,8 +221,7 @@
   * @fsf_req: pointer to struct fsf_req
   * Returns: pointer to qdio_buffer_element (SBALE) structure
   */
@@ -282555,7 +282486,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  {
        return zfcp_qdio_sbale(&req->adapter->req_q, req->sbal_last,
                               req->sbale_curr);
-@@ -216,10 +235,10 @@ static void zfcp_qdio_sbal_limit(struct 
+@@ -216,10 +235,10 @@
                                        % QDIO_MAX_BUFFERS_PER_Q;
  }
  
@@ -282568,7 +282499,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  
        /* set last entry flag in current SBALE of current SBAL */
        sbale = zfcp_qdio_sbale_curr(fsf_req);
-@@ -250,7 +269,7 @@ zfcp_qdio_sbal_chain(struct zfcp_fsf_req
+@@ -250,7 +269,7 @@
        return sbale;
  }
  
@@ -282577,7 +282508,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  zfcp_qdio_sbale_next(struct zfcp_fsf_req *fsf_req, unsigned long sbtype)
  {
        if (fsf_req->sbale_curr == ZFCP_LAST_SBALE_PER_SBAL)
-@@ -273,7 +292,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -273,7 +292,7 @@
                                unsigned int sbtype, void *start_addr,
                                unsigned int total_length)
  {
@@ -282586,7 +282517,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        unsigned long remaining, length;
        void *addr;
  
-@@ -282,6 +301,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -282,6 +301,7 @@
             addr += length, remaining -= length) {
                sbale = zfcp_qdio_sbale_next(fsf_req, sbtype);
                if (!sbale) {
@@ -282594,7 +282525,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
                        zfcp_qdio_undo_sbals(fsf_req);
                        return -EINVAL;
                }
-@@ -307,7 +327,7 @@ static int zfcp_qdio_fill_sbals(struct z
+@@ -307,7 +327,7 @@
  int zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *fsf_req, unsigned long sbtype,
                            struct scatterlist *sg, int max_sbals)
  {
@@ -282603,7 +282534,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        int retval, bytes = 0;
  
        /* figure out last allowed SBAL */
-@@ -344,10 +364,10 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -344,10 +364,10 @@
        int first = fsf_req->sbal_first;
        int count = fsf_req->sbal_number;
        int retval, pci, pci_batch;
@@ -282616,16 +282547,16 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        if (unlikely(pci_batch >= ZFCP_QDIO_PCI_INTERVAL)) {
                pci_batch %= ZFCP_QDIO_PCI_INTERVAL;
                pci = first + count - (pci_batch + 1);
-@@ -356,6 +376,8 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -355,6 +375,8 @@
+               sbale = zfcp_qdio_sbale(req_q, pci, 0);
                sbale->flags |= SBAL_FLAGS0_PCI;
        }
-+      zfcp_qdio_account(adapter);
 +
++      zfcp_qdio_account(adapter);
        retval = do_QDIO(adapter->ccw_device, QDIO_FLAG_SYNC_OUTPUT, 0, first,
                         count);
-       if (unlikely(retval)) {
-@@ -367,7 +389,7 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
+@@ -367,7 +389,7 @@
        atomic_sub(count, &req_q->count);
        req_q->first += count;
        req_q->first %= QDIO_MAX_BUFFERS_PER_Q;
@@ -282634,7 +282565,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-@@ -418,14 +440,14 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -418,14 +440,14 @@
        struct zfcp_qdio_queue *req_q;
        int first, count;
  
@@ -282652,7 +282583,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  
        qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR);
  
-@@ -438,7 +460,7 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -438,7 +460,7 @@
        }
        req_q->first = 0;
        atomic_set(&req_q->count, 0);
@@ -282661,7 +282592,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
        adapter->resp_q.first = 0;
        atomic_set(&adapter->resp_q.count, 0);
  }
-@@ -450,23 +472,17 @@ void zfcp_qdio_close(struct zfcp_adapter
+@@ -450,23 +472,17 @@
   */
  int zfcp_qdio_open(struct zfcp_adapter *adapter)
  {
@@ -282690,7 +282621,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
  
        for (cc = 0; cc < QDIO_MAX_BUFFERS_PER_Q; cc++) {
                sbale = &(adapter->resp_q.sbal[cc]->element[0]);
-@@ -476,20 +492,20 @@ int zfcp_qdio_open(struct zfcp_adapter *
+@@ -476,20 +492,20 @@
        }
  
        if (do_QDIO(adapter->ccw_device, QDIO_FLAG_SYNC_INPUT, 0, 0,
@@ -282716,19 +282647,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_qdio.c linux-2.6.27.19-5.1/driver
 +              "Setting up the QDIO connection to the FCP adapter failed\n");
        return -EIO;
  }
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_scsi.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_scsi.c  2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_scsi.c
+--- a/drivers/s390/scsi/zfcp_scsi.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_scsi.c    Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2002, 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include "zfcp_ext.h"
  #include <asm/atomic.h>
-@@ -21,31 +23,13 @@ char *zfcp_get_fcp_sns_info_ptr(struct f
+@@ -21,31 +23,13 @@
        return fcp_sns_info_ptr;
  }
  
@@ -282764,7 +282695,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
  }
  
  static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
-@@ -106,7 +90,7 @@ static int zfcp_scsi_queuecommand(struct
+@@ -106,7 +90,7 @@
        ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0,
                                             ZFCP_REQ_AUTO_CLEANUP);
        if (unlikely(ret == -EBUSY))
@@ -282773,7 +282704,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
        else if (unlikely(ret < 0))
                return SCSI_MLQUEUE_HOST_BUSY;
  
-@@ -119,13 +103,17 @@ static struct zfcp_unit *zfcp_unit_looku
+@@ -119,13 +103,17 @@
  {
        struct zfcp_port *port;
        struct zfcp_unit *unit;
@@ -282793,7 +282724,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
        }
  
        return NULL;
-@@ -183,7 +171,6 @@ static int zfcp_scsi_eh_abort_handler(st
+@@ -183,7 +171,6 @@
                return retval;
        }
        fsf_req->data = NULL;
@@ -282801,7 +282732,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
  
        /* don't access old fsf_req after releasing the abort_lock */
        write_unlock_irqrestore(&adapter->abort_lock, flags);
-@@ -294,7 +281,8 @@ int zfcp_adapter_scsi_register(struct zf
+@@ -294,7 +281,8 @@
                                             sizeof (struct zfcp_adapter *));
        if (!adapter->scsi_host) {
                dev_err(&adapter->ccw_device->dev,
@@ -282811,7 +282742,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
                return -EIO;
        }
  
-@@ -312,7 +300,6 @@ int zfcp_adapter_scsi_register(struct zf
+@@ -312,7 +300,6 @@
                scsi_host_put(adapter->scsi_host);
                return -EIO;
        }
@@ -282819,7 +282750,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
  
        return 0;
  }
-@@ -336,7 +323,6 @@ void zfcp_adapter_scsi_unregister(struct
+@@ -336,7 +323,6 @@
        scsi_remove_host(shost);
        scsi_host_put(shost);
        adapter->scsi_host = NULL;
@@ -282827,19 +282758,19 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_scsi.c linux-2.6.27.19-5.1/driver
  
        return;
  }
-diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_sysfs.c
---- linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/s390/scsi/zfcp_sysfs.c 2009-03-25 16:11:24.000000000 +0000
-@@ -6,6 +6,8 @@
+diff -r 9608d5473017 drivers/s390/scsi/zfcp_sysfs.c
+--- a/drivers/s390/scsi/zfcp_sysfs.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/s390/scsi/zfcp_sysfs.c   Wed May 06 16:56:32 2009 +0100
+@@ -5,6 +5,8 @@
+  *
   * Copyright IBM Corporation 2008
   */
-+#define KMSG_COMPONENT "zfcp"
 +
++#define KMSG_COMPONENT "zfcp"
  #include "zfcp_ext.h"
  
- #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \
-@@ -26,9 +28,9 @@ static ZFCP_DEV_ATTR(_feat, _name, S_IRU
+@@ -26,9 +28,9 @@
  ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, status, "0x%08x\n",
                 atomic_read(&adapter->status));
  ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, peer_wwnn, "0x%016llx\n",
@@ -282851,7 +282782,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
  ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, peer_d_id, "0x%06x\n",
                 adapter->peer_d_id);
  ZFCP_DEFINE_ATTR(zfcp_adapter, adapter, card_version, "0x%04x\n",
-@@ -135,8 +137,9 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -135,8 +137,9 @@
  {
        struct zfcp_adapter *adapter = dev_get_drvdata(dev);
        struct zfcp_port *port;
@@ -282862,7 +282793,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
  
        down(&zfcp_data.config_sema);
        if (atomic_read(&adapter->status) & ZFCP_STATUS_COMMON_REMOVE) {
-@@ -144,7 +147,7 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -144,7 +147,7 @@
                goto out;
        }
  
@@ -282871,7 +282802,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
                retval = -EINVAL;
                goto out;
        }
-@@ -154,7 +157,7 @@ static ssize_t zfcp_sysfs_port_remove_st
+@@ -154,7 +157,7 @@
        if (port && (atomic_read(&port->refcount) == 0)) {
                zfcp_port_get(port);
                atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
@@ -282880,7 +282811,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
        } else
                port = NULL;
        write_unlock_irq(&zfcp_data.config_lock);
-@@ -200,7 +203,7 @@ static ssize_t zfcp_sysfs_unit_add_store
+@@ -200,7 +203,7 @@
  {
        struct zfcp_port *port = dev_get_drvdata(dev);
        struct zfcp_unit *unit;
@@ -282889,7 +282820,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
        int retval = -EINVAL;
  
        down(&zfcp_data.config_sema);
-@@ -209,7 +212,7 @@ static ssize_t zfcp_sysfs_unit_add_store
+@@ -209,7 +212,7 @@
                goto out;
        }
  
@@ -282898,7 +282829,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
                goto out;
  
        unit = zfcp_unit_enqueue(port, fcp_lun);
-@@ -233,8 +236,9 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -233,8 +236,9 @@
  {
        struct zfcp_port *port = dev_get_drvdata(dev);
        struct zfcp_unit *unit;
@@ -282909,7 +282840,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
  
        down(&zfcp_data.config_sema);
        if (atomic_read(&port->status) & ZFCP_STATUS_COMMON_REMOVE) {
-@@ -242,7 +246,7 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -242,7 +246,7 @@
                goto out;
        }
  
@@ -282918,7 +282849,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
                retval = -EINVAL;
                goto out;
        }
-@@ -252,7 +256,7 @@ static ssize_t zfcp_sysfs_unit_remove_st
+@@ -252,7 +256,7 @@
        if (unit && (atomic_read(&unit->refcount) == 0)) {
                zfcp_unit_get(unit);
                atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &unit->status);
@@ -282927,7 +282858,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
        } else
                unit = NULL;
  
-@@ -273,22 +277,7 @@ out:
+@@ -273,22 +277,7 @@
  }
  static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store);
  
@@ -282951,7 +282882,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
        &dev_attr_unit_add.attr,
        &dev_attr_unit_remove.attr,
        &dev_attr_port_failed.attr,
-@@ -302,7 +291,7 @@ static struct attribute *zfcp_port_no_ns
+@@ -302,7 +291,7 @@
   * zfcp_sysfs_port_attrs - sysfs attributes for all other ports
   */
  struct attribute_group zfcp_sysfs_port_attrs = {
@@ -282960,7 +282891,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
  };
  
  static struct attribute *zfcp_unit_attrs[] = {
-@@ -395,8 +384,10 @@ static DEVICE_ATTR(_name, S_IRUGO, zfcp_
+@@ -395,8 +384,10 @@
  
  ZFCP_DEFINE_SCSI_ATTR(hba_id, "%s\n",
        unit->port->adapter->ccw_device->dev.bus_id);
@@ -282973,7 +282904,7 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
  
  struct device_attribute *zfcp_sysfs_sdev_attrs[] = {
        &dev_attr_fcp_lun,
-@@ -487,10 +478,24 @@ ZFCP_SHOST_ATTR(megabytes, "%llu %llu\n"
+@@ -487,10 +478,24 @@
  ZFCP_SHOST_ATTR(seconds_active, "%llu\n",
                (unsigned long long) stat_info.seconds_act);
  
@@ -282998,10 +282929,10 @@ diff -purN linux-2.6.27/drivers/s390/scsi/zfcp_sysfs.c linux-2.6.27.19-5.1/drive
 +      &dev_attr_queue_full,
        NULL
  };
-diff -purN linux-2.6.27/drivers/scsi/Kconfig linux-2.6.27.19-5.1/drivers/scsi/Kconfig
---- linux-2.6.27/drivers/scsi/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/Kconfig   2009-03-25 16:11:15.000000000 +0000
-@@ -352,6 +352,8 @@ config ISCSI_TCP
+diff -r 9608d5473017 drivers/scsi/Kconfig
+--- a/drivers/scsi/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/Kconfig     Wed May 06 16:56:32 2009 +0100
+@@ -352,6 +352,8 @@
  
         http://open-iscsi.org
  
@@ -283010,10 +282941,11 @@ diff -purN linux-2.6.27/drivers/scsi/Kconfig linux-2.6.27.19-5.1/drivers/scsi/Kc
  config SGIWD93_SCSI
        tristate "SGI WD93C93 SCSI Driver"
        depends on SGI_HAS_WD93 && SCSI
-@@ -603,6 +605,20 @@ config SCSI_FLASHPOINT
+@@ -602,6 +604,20 @@
+         BusLogic SCSI driver. The FlashPoint SCCB Manager code is
          substantial, so users of MultiMaster Host Adapters may not
          wish to include it.
++
 +config LIBFC
 +      tristate "LibFC module"
 +      depends on SCSI && SCSI_FC_ATTRS
@@ -283027,14 +282959,13 @@ diff -purN linux-2.6.27/drivers/scsi/Kconfig linux-2.6.27.19-5.1/drivers/scsi/Kc
 +      ---help---
 +        Fibre Channel over Ethernet module
 +
-+
  config SCSI_DMX3191D
        tristate "DMX3191D SCSI support"
-       depends on PCI && SCSI
-diff -purN linux-2.6.27/drivers/scsi/Makefile linux-2.6.27.19-5.1/drivers/scsi/Makefile
---- linux-2.6.27/drivers/scsi/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/Makefile  2009-03-25 16:11:17.000000000 +0000
-@@ -36,8 +36,11 @@ obj-$(CONFIG_SCSI_SAS_LIBSAS)       += libsas/
+diff -r 9608d5473017 drivers/scsi/Makefile
+--- a/drivers/scsi/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/Makefile    Wed May 06 16:56:32 2009 +0100
+@@ -36,8 +36,11 @@
  obj-$(CONFIG_SCSI_SRP_ATTRS)  += scsi_transport_srp.o
  obj-$(CONFIG_SCSI_DH)         += device_handler/
  
@@ -283046,10 +282977,10 @@ diff -purN linux-2.6.27/drivers/scsi/Makefile linux-2.6.27.19-5.1/drivers/scsi/M
  obj-$(CONFIG_SCSI_A4000T)     += 53c700.o     a4000t.o
  obj-$(CONFIG_SCSI_ZORRO7XX)   += 53c700.o     zorro7xx.o
  obj-$(CONFIG_A3000_SCSI)      += a3000.o      wd33c93.o
-diff -purN linux-2.6.27/drivers/scsi/aacraid/aachba.c linux-2.6.27.19-5.1/drivers/scsi/aacraid/aachba.c
---- linux-2.6.27/drivers/scsi/aacraid/aachba.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/aacraid/aachba.c  2009-03-25 16:11:15.000000000 +0000
-@@ -1139,7 +1139,7 @@ static struct aac_srb * aac_scsi_common(
+diff -r 9608d5473017 drivers/scsi/aacraid/aachba.c
+--- a/drivers/scsi/aacraid/aachba.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/aacraid/aachba.c    Wed May 06 16:56:32 2009 +0100
+@@ -1139,7 +1139,7 @@
        srbcmd->id       = cpu_to_le32(scmd_id(cmd));
        srbcmd->lun      = cpu_to_le32(cmd->device->lun);
        srbcmd->flags    = cpu_to_le32(flag);
@@ -283058,10 +282989,10 @@ diff -purN linux-2.6.27/drivers/scsi/aacraid/aachba.c linux-2.6.27.19-5.1/driver
        if (timeout == 0)
                timeout = 1;
        srbcmd->timeout  = cpu_to_le32(timeout);  // timeout in seconds
-diff -purN linux-2.6.27/drivers/scsi/aacraid/linit.c linux-2.6.27.19-5.1/drivers/scsi/aacraid/linit.c
---- linux-2.6.27/drivers/scsi/aacraid/linit.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/aacraid/linit.c   2009-03-25 16:11:15.000000000 +0000
-@@ -175,8 +175,8 @@ static struct aac_driver_ident aac_drive
+diff -r 9608d5473017 drivers/scsi/aacraid/linit.c
+--- a/drivers/scsi/aacraid/linit.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/aacraid/linit.c     Wed May 06 16:56:33 2009 +0100
+@@ -175,8 +175,8 @@
        { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
@@ -283072,7 +283003,7 @@ diff -purN linux-2.6.27/drivers/scsi/aacraid/linit.c linux-2.6.27.19-5.1/drivers
        { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
-@@ -427,8 +427,8 @@ static int aac_slave_configure(struct sc
+@@ -427,8 +427,8 @@
                 * Firmware has an individual device recovery time typically
                 * of 35 seconds, give us a margin.
                 */
@@ -283083,10 +283014,10 @@ diff -purN linux-2.6.27/drivers/scsi/aacraid/linit.c linux-2.6.27.19-5.1/drivers
                for (cid = 0; cid < aac->maximum_num_containers; ++cid)
                        if (aac->fsa_dev[cid].valid)
                                ++num_lsu;
-diff -purN linux-2.6.27/drivers/scsi/constants.c linux-2.6.27.19-5.1/drivers/scsi/constants.c
---- linux-2.6.27/drivers/scsi/constants.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/constants.c       2009-03-25 16:11:15.000000000 +0000
-@@ -1364,7 +1364,8 @@ EXPORT_SYMBOL(scsi_print_sense);
+diff -r 9608d5473017 drivers/scsi/constants.c
+--- a/drivers/scsi/constants.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/constants.c Wed May 06 16:56:33 2009 +0100
+@@ -1364,7 +1364,8 @@
  static const char * const hostbyte_table[]={
  "DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET",
  "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
@@ -283096,9 +283027,9 @@ diff -purN linux-2.6.27/drivers/scsi/constants.c linux-2.6.27.19-5.1/drivers/scs
  #define NUM_HOSTBYTE_STRS ARRAY_SIZE(hostbyte_table)
  
  static const char * const driverbyte_table[]={
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/Kconfig linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Kconfig    2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/Kconfig      Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,7 @@
 +config SCSI_CXGB3_ISCSI
 +      tristate "Chelsio S3xx iSCSI support"
@@ -283107,18 +283038,18 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/Kconfig linux-2.6.27.19-5.1/drivers/
 +      select ISCSI_TCP
 +      ---help---
 +      This driver supports iSCSI offload for the Chelsio S3 series devices.
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/Makefile linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/Makefile   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/Makefile     Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,5 @@
 +EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3
 +
 +cxgb3i-y := cxgb3i_init.o cxgb3i_iscsi.o cxgb3i_ulp2.o cxgb3i_offload.o
 +
 +obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i.h   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i.h     Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,335 @@
 +/*
 + * cxgb3i.h: Chelsio S3xx iSCSI driver.
@@ -283455,9 +283386,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i.h linux-2.6.27.19-5.1/drivers
 +                         unsigned int, int);
 +int cxgb3i_conn_ulp2_xmit(struct iscsi_conn *);
 +#endif
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_init.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_init.c      2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_init.c        Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,107 @@
 +/* cxgb3i_init.c: Chelsio S3xx iSCSI driver.
 + *
@@ -283566,9 +283497,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_init.c linux-2.6.27.19-5.1/dr
 +
 +module_init(cxgb3i_init_module);
 +module_exit(cxgb3i_exit_module);
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_iscsi.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_iscsi.c     2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_iscsi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c       Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,904 @@
 +/* cxgb3i_iscsi.c: Chelsio S3xx iSCSI driver.
 + *
@@ -284474,9 +284405,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_iscsi.c linux-2.6.27.19-5.1/d
 +              iscsi_unregister_transport(&cxgb3i_iscsi_transport);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.c   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_offload.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c     Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,1870 @@
 +/*
 + * cxgb3i_offload.c: Chelsio S3xx iscsi offloaded tcp connection management
@@ -286348,9 +286279,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.c linux-2.6.27.19-5.1
 +
 +      sdev_data_cleanup(cdata);
 +}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_offload.h   2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_offload.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_offload.h     Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,231 @@
 +/*
 + * cxgb3i_offload.h: Chelsio S3xx iscsi offloaded tcp connection management
@@ -286583,9 +286514,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_offload.h linux-2.6.27.19-5.1
 +/* max. connections per adapter */
 +#define CXGB3I_MAX_CONN               16384
 +#endif /* _CXGB3_OFFLOAD_H */
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.c linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.c      2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_ulp2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_ulp2.c        Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,991 @@
 +/*
 + * cxgb3i_ulp2.c: Chelsio S3xx iSCSI driver.
@@ -287578,9 +287509,9 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.c linux-2.6.27.19-5.1/dr
 +              cxgb3i_free_big_mem(ddp);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.h linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/cxgb3i/cxgb3i_ulp2.h      2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/cxgb3i/cxgb3i_ulp2.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/cxgb3i/cxgb3i_ulp2.h        Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,128 @@
 +/*
 + * cxgb3i_ulp2.h: Chelsio S3xx iSCSI driver.
@@ -287710,10 +287641,10 @@ diff -purN linux-2.6.27/drivers/scsi/cxgb3i/cxgb3i_ulp2.h linux-2.6.27.19-5.1/dr
 +              kfree(addr);
 +}
 +#endif
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh.c  2009-03-25 16:11:14.000000000 +0000
-@@ -28,6 +28,7 @@ struct scsi_dh_devinfo_list {
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh.c
+--- a/drivers/scsi/device_handler/scsi_dh.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh.c    Wed May 06 16:56:33 2009 +0100
+@@ -28,6 +28,7 @@
        struct list_head node;
        char vendor[9];
        char model[17];
@@ -287721,7 +287652,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
        struct scsi_device_handler *handler;
  };
  
-@@ -60,7 +61,8 @@ scsi_dh_cache_lookup(struct scsi_device 
+@@ -60,7 +61,8 @@
        spin_lock(&list_lock);
        list_for_each_entry(tmp, &scsi_dh_dev_list, node) {
                if (!strncmp(sdev->vendor, tmp->vendor, strlen(tmp->vendor)) &&
@@ -287731,7 +287662,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
                        found_dh = tmp->handler;
                        break;
                }
-@@ -79,7 +81,9 @@ static int scsi_dh_handler_lookup(struct
+@@ -79,7 +81,9 @@
                if (!strncmp(sdev->vendor, scsi_dh->devlist[i].vendor,
                             strlen(scsi_dh->devlist[i].vendor)) &&
                    !strncmp(sdev->model, scsi_dh->devlist[i].model,
@@ -287742,7 +287673,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
                        found = 1;
                        break;
                }
-@@ -128,6 +132,7 @@ device_handler_match(struct scsi_device_
+@@ -128,6 +132,7 @@
                        strncpy(tmp->model, sdev->model, 16);
                        tmp->vendor[8] = '\0';
                        tmp->model[16] = '\0';
@@ -287750,7 +287681,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
                        tmp->handler = found_dh;
                        spin_lock(&list_lock);
                        list_add(&tmp->node, &scsi_dh_dev_list);
-@@ -493,7 +498,6 @@ void scsi_dh_detach(struct request_queue
+@@ -493,7 +498,6 @@
  {
        unsigned long flags;
        struct scsi_device *sdev;
@@ -287758,7 +287689,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
  
        spin_lock_irqsave(q->queue_lock, flags);
        sdev = q->queuedata;
-@@ -504,12 +508,9 @@ void scsi_dh_detach(struct request_queue
+@@ -504,12 +508,9 @@
        if (!sdev)
                return;
  
@@ -287774,10 +287705,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh.c linux-2.6.27.19-5.
        put_device(&sdev->sdev_gendev);
  }
  EXPORT_SYMBOL_GPL(scsi_dh_detach);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_alua.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_alua.c     2009-03-25 16:11:14.000000000 +0000
-@@ -109,7 +109,8 @@ static struct request *get_alua_req(stru
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_alua.c
+--- a/drivers/scsi/device_handler/scsi_dh_alua.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_alua.c       Wed May 06 16:56:33 2009 +0100
+@@ -109,48 +109,12 @@
        }
  
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
@@ -287787,10 +287718,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
        rq->retries = ALUA_FAILOVER_RETRIES;
        rq->timeout = ALUA_FAILOVER_TIMEOUT;
  
-@@ -117,43 +118,6 @@ static struct request *get_alua_req(stru
- }
- /*
+       return rq;
+-}
+-
+-/*
 - * submit_std_inquiry - Issue a standard INQUIRY command
 - * @sdev: sdev the command should be send to
 - */
@@ -287825,13 +287756,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
 -      blk_put_request(rq);
 -done:
 -      return err;
--}
--
--/*
-  * submit_vpd_inquiry - Issue an INQUIRY VPD page 0x83 command
-  * @sdev: sdev the command should be sent to
-  */
-@@ -246,8 +210,8 @@ static unsigned submit_stpg(struct scsi_
+ }
+ /*
+@@ -246,8 +210,8 @@
        /* Prepare the data buffer */
        memset(h->buff, 0, stpg_len);
        h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f;
@@ -287842,7 +287770,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
  
        rq = get_alua_req(sdev, h->buff, stpg_len, WRITE);
        if (!rq)
-@@ -280,23 +244,19 @@ done:
+@@ -280,23 +244,19 @@
  }
  
  /*
@@ -287872,14 +287800,16 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
        switch (h->tpgs) {
        case TPGS_MODE_EXPLICIT|TPGS_MODE_IMPLICIT:
                sdev_printk(KERN_INFO, sdev,
-@@ -443,24 +403,16 @@ static int alua_check_sense(struct scsi_
+@@ -443,24 +403,16 @@
                        return SUCCESS;
                break;
        case UNIT_ATTENTION:
 -              if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
--                      /*
++              if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x02)
+                       /*
 -                       * Power On, Reset, or Bus Device Reset, just retry.
--                       */
++                       * LUN not ready, initialization command required
+                        */
 -                      return ADD_TO_MLQUEUE;
 -              if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) {
 -                      /*
@@ -287888,11 +287818,9 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
 -                      return ADD_TO_MLQUEUE;
 -              }
 -              if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) {
-+              if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x02)
-                       /*
+-                      /*
 -                       * Implicit ALUA state transition failed
-+                       * LUN not ready, initialization command required
-                        */
+-                       */
 -                      return ADD_TO_MLQUEUE;
 -              }
 -              break;
@@ -287905,7 +287833,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
        }
  
        return SCSI_RETURN_NOT_HANDLED;
-@@ -616,7 +568,7 @@ static int alua_initialize(struct scsi_d
+@@ -616,7 +568,7 @@
  {
        int err;
  
@@ -287914,7 +287842,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
        if (err != SCSI_DH_OK)
                goto out;
  
-@@ -647,13 +599,11 @@ static int alua_activate(struct scsi_dev
+@@ -647,13 +599,11 @@
        struct alua_dh_data *h = get_alua_data(sdev);
        int err = SCSI_DH_OK;
  
@@ -287932,7 +287860,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
                err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h);
  
  out:
-@@ -681,16 +631,8 @@ static int alua_prep_fn(struct scsi_devi
+@@ -681,16 +631,8 @@
  }
  
  static const struct scsi_dh_devlist alua_dev_list[] = {
@@ -287951,10 +287879,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_alua.c linux-2.6.27.
  };
  
  static int alua_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_emc.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_emc.c      2009-03-25 16:11:14.000000000 +0000
-@@ -272,13 +272,12 @@ static struct request *get_req(struct sc
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_emc.c
+--- a/drivers/scsi/device_handler/scsi_dh_emc.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_emc.c        Wed May 06 16:56:33 2009 +0100
+@@ -272,13 +272,12 @@
        int len = 0;
  
        rq = blk_get_request(sdev->request_queue,
@@ -287969,7 +287897,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c linux-2.6.27.1
        rq->cmd_len = COMMAND_SIZE(cmd);
        rq->cmd[0] = cmd;
  
-@@ -304,7 +303,8 @@ static struct request *get_req(struct sc
+@@ -304,7 +303,8 @@
  
        rq->cmd[4] = len;
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
@@ -287979,7 +287907,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c linux-2.6.27.1
        rq->timeout = CLARIION_TIMEOUT;
        rq->retries = CLARIION_RETRIES;
  
-@@ -563,10 +563,10 @@ done:
+@@ -563,10 +563,10 @@
  }
  
  static const struct scsi_dh_devlist clariion_dev_list[] = {
@@ -287994,10 +287922,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_emc.c linux-2.6.27.1
  };
  
  static int clariion_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_hp_sw.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_hp_sw.c    2009-03-25 16:11:14.000000000 +0000
-@@ -112,9 +112,9 @@ static int hp_sw_tur(struct scsi_device 
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_hp_sw.c
+--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c      Wed May 06 16:56:33 2009 +0100
+@@ -112,9 +112,9 @@
                return SCSI_DH_RES_TEMP_UNAVAIL;
  
        req->cmd_type = REQ_TYPE_BLOCK_PC;
@@ -288009,7 +287937,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c linux-2.6.27
        req->cmd[0] = TEST_UNIT_READY;
        req->timeout = HP_SW_TIMEOUT;
        req->sense = h->sense;
-@@ -205,9 +205,9 @@ static int hp_sw_start_stop(struct scsi_
+@@ -205,9 +205,9 @@
                return SCSI_DH_RES_TEMP_UNAVAIL;
  
        req->cmd_type = REQ_TYPE_BLOCK_PC;
@@ -288021,7 +287949,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c linux-2.6.27
        req->cmd[0] = START_STOP;
        req->cmd[4] = 1;        /* Start spin cycle */
        req->timeout = HP_SW_TIMEOUT;
-@@ -283,11 +283,11 @@ static int hp_sw_activate(struct scsi_de
+@@ -283,11 +283,11 @@
  }
  
  static const struct scsi_dh_devlist hp_sw_dh_data_list[] = {
@@ -288038,9 +287966,9 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_hp_sw.c linux-2.6.27
  };
  
  static int hp_sw_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_rdac.c
---- linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/device_handler/scsi_dh_rdac.c     2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/device_handler/scsi_dh_rdac.c
+--- a/drivers/scsi/device_handler/scsi_dh_rdac.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/device_handler/scsi_dh_rdac.c       Wed May 06 16:56:33 2009 +0100
 @@ -24,6 +24,7 @@
  #include <scsi/scsi_dh.h>
  
@@ -288049,7 +287977,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
  
  /*
   * LSI mode page stuff
-@@ -225,10 +226,9 @@ static struct request *get_rdac_req(stru
+@@ -225,10 +226,9 @@
                return NULL;
        }
  
@@ -288062,7 +287990,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
        rq->retries = RDAC_RETRIES;
        rq->timeout = RDAC_TIMEOUT;
  
-@@ -387,6 +387,7 @@ static int check_ownership(struct scsi_d
+@@ -387,6 +387,7 @@
        struct c9_inquiry *inqp;
  
        h->lun_state = RDAC_LUN_UNOWNED;
@@ -288070,17 +287998,17 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
        err = submit_inquiry(sdev, 0xC9, sizeof(struct c9_inquiry), h);
        if (err == SCSI_DH_OK) {
                inqp = &h->inq.c9;
-@@ -402,6 +403,9 @@ static int check_ownership(struct scsi_d
+@@ -401,6 +402,9 @@
+                       h->lun_state = RDAC_LUN_OWNED;
                }
        }
++
 +      if (h->lun_state == RDAC_LUN_UNOWNED)
 +              h->state = RDAC_STATE_PASSIVE;
-+
        return err;
  }
-@@ -455,11 +459,10 @@ static int mode_select_handle_sense(stru
+@@ -455,11 +459,10 @@
        sense = (sense_hdr.sense_key << 16) | (sense_hdr.asc << 8) |
                        sense_hdr.ascq;
        /* If it is retryable failure, submit the c9 inquiry again */
@@ -288095,7 +288023,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
                 */
                err = SCSI_DH_RETRY;
        }
-@@ -475,21 +478,27 @@ static int send_mode_select(struct scsi_
+@@ -475,21 +478,27 @@
  {
        struct request *rq;
        struct request_queue *q = sdev->request_queue;
@@ -288127,7 +288055,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
  done:
        return err;
  }
-@@ -569,6 +578,11 @@ static int rdac_check_sense(struct scsi_
+@@ -569,6 +578,11 @@
                         * Power On, Reset, or Bus Device Reset, just retry.
                         */
                        return ADD_TO_MLQUEUE;
@@ -288139,7 +288067,7 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
                break;
        }
        /* success just means we do not care what scsi-ml does */
-@@ -576,21 +590,25 @@ static int rdac_check_sense(struct scsi_
+@@ -576,21 +590,25 @@
  }
  
  static const struct scsi_dh_devlist rdac_dev_list[] = {
@@ -288180,10 +288108,10 @@ diff -purN linux-2.6.27/drivers/scsi/device_handler/scsi_dh_rdac.c linux-2.6.27.
  };
  
  static int rdac_bus_attach(struct scsi_device *sdev);
-diff -purN linux-2.6.27/drivers/scsi/dpt_i2o.c linux-2.6.27.19-5.1/drivers/scsi/dpt_i2o.c
---- linux-2.6.27/drivers/scsi/dpt_i2o.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/dpt_i2o.c 2009-03-25 16:11:16.000000000 +0000
-@@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem
+diff -r 9608d5473017 drivers/scsi/dpt_i2o.c
+--- a/drivers/scsi/dpt_i2o.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/dpt_i2o.c   Wed May 06 16:56:33 2009 +0100
+@@ -2445,7 +2445,7 @@
        hba_status = detailed_status >> 8;
  
        // calculate resid for sg 
@@ -288192,7 +288120,7 @@ diff -purN linux-2.6.27/drivers/scsi/dpt_i2o.c linux-2.6.27.19-5.1/drivers/scsi/
  
        pHba = (adpt_hba*) cmd->device->host->hostdata[0];
  
-@@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem
+@@ -2456,7 +2456,7 @@
                case I2O_SCSI_DSC_SUCCESS:
                        cmd->result = (DID_OK << 16);
                        // handle underflow
@@ -288201,10 +288129,10 @@ diff -purN linux-2.6.27/drivers/scsi/dpt_i2o.c linux-2.6.27.19-5.1/drivers/scsi/
                                cmd->result = (DID_ERROR <<16);
                                printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name);
                        }
-diff -purN linux-2.6.27/drivers/scsi/eata.c linux-2.6.27.19-5.1/drivers/scsi/eata.c
---- linux-2.6.27/drivers/scsi/eata.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/eata.c    2009-03-25 16:11:17.000000000 +0000
-@@ -1626,8 +1626,15 @@ static void map_dma(unsigned int i, stru
+diff -r 9608d5473017 drivers/scsi/eata.c
+--- a/drivers/scsi/eata.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/eata.c      Wed May 06 16:56:33 2009 +0100
+@@ -1626,8 +1626,15 @@
  
        cpp->sense_len = SCSI_SENSE_BUFFERSIZE;
  
@@ -288222,7 +288150,7 @@ diff -purN linux-2.6.27/drivers/scsi/eata.c linux-2.6.27.19-5.1/drivers/scsi/eat
        scsi_for_each_sg(SCpnt, sg, count, k) {
                cpp->sglist[k].address = H2DEV(sg_dma_address(sg));
                cpp->sglist[k].num_bytes = H2DEV(sg_dma_len(sg));
-@@ -1655,7 +1662,9 @@ static void unmap_dma(unsigned int i, st
+@@ -1655,7 +1662,9 @@
                pci_unmap_single(ha->pdev, DEV2H(cpp->sense_addr),
                                 DEV2H(cpp->sense_len), PCI_DMA_FROMDEVICE);
  
@@ -288233,9 +288161,9 @@ diff -purN linux-2.6.27/drivers/scsi/eata.c linux-2.6.27.19-5.1/drivers/scsi/eat
  
        if (!DEV2H(cpp->data_len))
                pci_dir = PCI_DMA_BIDIRECTIONAL;
-diff -purN linux-2.6.27/drivers/scsi/fcoe/Makefile linux-2.6.27.19-5.1/drivers/scsi/fcoe/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/Makefile     2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/Makefile       Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,8 @@
 +# $Id: Makefile
 +
@@ -288245,9 +288173,9 @@ diff -purN linux-2.6.27/drivers/scsi/fcoe/Makefile linux-2.6.27.19-5.1/drivers/s
 +      libfcoe.o \
 +      fcoe_sw.o \
 +      fc_transport_fcoe.o
-diff -purN linux-2.6.27/drivers/scsi/fcoe/fc_transport_fcoe.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/fc_transport_fcoe.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/fc_transport_fcoe.c  2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/fc_transport_fcoe.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/fc_transport_fcoe.c    Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,446 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -288695,9 +288623,9 @@ diff -purN linux-2.6.27/drivers/scsi/fcoe/fc_transport_fcoe.c linux-2.6.27.19-5.
 +      mutex_unlock(&fcoe_transports_lock);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/scsi/fcoe/fcoe_sw.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/fcoe_sw.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/fcoe_sw.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/fcoe_sw.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/fcoe_sw.c      Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,495 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -289194,9 +289122,9 @@ diff -purN linux-2.6.27/drivers/scsi/fcoe/fcoe_sw.c linux-2.6.27.19-5.1/drivers/
 +      fcoe_transport_unregister(&fcoe_sw_transport);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/scsi/fcoe/libfcoe.c linux-2.6.27.19-5.1/drivers/scsi/fcoe/libfcoe.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/fcoe/libfcoe.c    2009-03-25 16:11:14.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/fcoe/libfcoe.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/fcoe/libfcoe.c      Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,1463 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -290661,10 +290589,10 @@ diff -purN linux-2.6.27/drivers/scsi/fcoe/libfcoe.c linux-2.6.27.19-5.1/drivers/
 +      fcoe_transport_exit();
 +}
 +module_exit(fcoe_exit);
-diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdth.c
---- linux-2.6.27/drivers/scsi/gdth.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth.c    2009-03-25 16:11:14.000000000 +0000
-@@ -328,7 +328,7 @@ static int irq[MAXHA] __initdata = 
+diff -r 9608d5473017 drivers/scsi/gdth.c
+--- a/drivers/scsi/gdth.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth.c      Wed May 06 16:56:33 2009 +0100
+@@ -328,7 +328,7 @@
  {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
  /* disable driver flag */
@@ -290673,7 +290601,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  /* reserve flag */
  static int reserve_mode = 1;                  
  /* reserve list */
-@@ -464,7 +464,6 @@ int __gdth_execute(struct scsi_device *s
+@@ -464,7 +464,6 @@
  
      /* use request field to save the ptr. to completion struct. */
      scp->request = (struct request *)&wait;
@@ -290681,7 +290609,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
      scp->cmd_len = 12;
      scp->cmnd = cmnd;
      cmndinfo.priority = IOCTL_PRI;
-@@ -589,7 +588,7 @@ static struct pci_driver gdth_pci_driver
+@@ -589,7 +588,7 @@
        .remove         = gdth_pci_remove_one,
  };
  
@@ -290690,7 +290618,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
        gdth_ha_str *ha = pci_get_drvdata(pdev);
  
-@@ -601,7 +600,7 @@ static void gdth_pci_remove_one(struct p
+@@ -601,7 +600,7 @@
        pci_disable_device(pdev);
  }
  
@@ -290699,7 +290627,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
                                       const struct pci_device_id *ent)
  {
        ushort vendor = pdev->vendor;
-@@ -659,7 +658,7 @@ static int gdth_pci_init_one(struct pci_
+@@ -659,7 +658,7 @@
  #endif /* CONFIG_PCI */
  
  #ifdef CONFIG_EISA
@@ -290708,7 +290636,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
      ulong32 retries,id;
      unchar prot_ver,eisacf,i,irq_found;
-@@ -753,7 +752,7 @@ static int __init gdth_init_eisa(ushort 
+@@ -753,7 +752,7 @@
  #endif /* CONFIG_EISA */
  
  #ifdef CONFIG_ISA
@@ -290717,7 +290645,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
      register gdt2_dpram_str __iomem *dp2_ptr;
      int i;
-@@ -854,7 +853,7 @@ static int __init gdth_init_isa(ulong32 
+@@ -854,7 +853,7 @@
  #endif /* CONFIG_ISA */
  
  #ifdef CONFIG_PCI
@@ -290726,7 +290654,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
                                   gdth_ha_str *ha)
  {
      register gdt6_dpram_str __iomem *dp6_ptr;
-@@ -1238,7 +1237,7 @@ static int gdth_init_pci(struct pci_dev 
+@@ -1238,7 +1237,7 @@
  
  /* controller protocol functions */
  
@@ -290735,7 +290663,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
      ulong flags;
      gdt2_dpram_str __iomem *dp2_ptr;
-@@ -1554,7 +1553,7 @@ static int gdth_internal_cmd(gdth_ha_str
+@@ -1554,7 +1553,7 @@
  
  /* search for devices */
  
@@ -290744,7 +290672,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
      ushort cdev_cnt, i;
      int ok;
-@@ -1995,23 +1994,12 @@ static void gdth_putq(gdth_ha_str *ha, S
+@@ -1995,23 +1994,12 @@
      register Scsi_Cmnd *pscp;
      register Scsi_Cmnd *nscp;
      ulong flags;
@@ -290769,7 +290697,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  
      if (ha->req_first==NULL) {
          ha->req_first = scp;                    /* queue was empty */
-@@ -3899,6 +3887,39 @@ static const char *gdth_info(struct Scsi
+@@ -3899,6 +3887,39 @@
      return ((const char *)ha->binfo.type_string);
  }
  
@@ -290809,7 +290737,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
  {
      gdth_ha_str *ha = shost_priv(scp->device->host);
-@@ -3992,7 +4013,7 @@ static int gdth_queuecommand(struct scsi
+@@ -3992,7 +4013,7 @@
      BUG_ON(!cmndinfo);
  
      scp->scsi_done = done;
@@ -290818,7 +290746,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
      cmndinfo->priority = DEFAULT_PRI;
  
      return __gdth_queuecommand(ha, scp, cmndinfo);
-@@ -4096,12 +4117,10 @@ static int ioc_lockdrv(void __user *arg)
+@@ -4096,12 +4117,10 @@
              ha->hdr[j].lock = 1;
              spin_unlock_irqrestore(&ha->smp_lock, flags);
              gdth_wait_completion(ha, ha->bus_cnt, j);
@@ -290831,7 +290759,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
              gdth_next(ha);
          }
      } 
-@@ -4539,18 +4558,14 @@ static int gdth_ioctl(struct inode *inod
+@@ -4539,18 +4558,14 @@
                  spin_lock_irqsave(&ha->smp_lock, flags);
                  ha->raw[i].lock = 1;
                  spin_unlock_irqrestore(&ha->smp_lock, flags);
@@ -290852,7 +290780,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
              }
          } 
          break;
-@@ -4644,6 +4659,7 @@ static struct scsi_host_template gdth_te
+@@ -4644,6 +4659,7 @@
          .slave_configure        = gdth_slave_configure,
          .bios_param             = gdth_bios_param,
          .proc_info              = gdth_proc_info,
@@ -290860,7 +290788,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
          .proc_name              = "gdth",
          .can_queue              = GDTH_MAXCMDS,
          .this_id                = -1,
-@@ -4654,7 +4670,7 @@ static struct scsi_host_template gdth_te
+@@ -4654,7 +4670,7 @@
  };
  
  #ifdef CONFIG_ISA
@@ -290869,7 +290797,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
        struct Scsi_Host *shp;
        gdth_ha_str *ha;
-@@ -4786,7 +4802,7 @@ static int __init gdth_isa_probe_one(ulo
+@@ -4786,7 +4802,7 @@
  #endif /* CONFIG_ISA */
  
  #ifdef CONFIG_EISA
@@ -290878,7 +290806,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
        struct Scsi_Host *shp;
        gdth_ha_str *ha;
-@@ -4919,7 +4935,7 @@ static int __init gdth_eisa_probe_one(us
+@@ -4919,7 +4935,7 @@
  #endif /* CONFIG_EISA */
  
  #ifdef CONFIG_PCI
@@ -290887,7 +290815,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
                             gdth_ha_str **ha_out)
  {
        struct Scsi_Host *shp;
-@@ -5122,7 +5138,7 @@ static struct notifier_block gdth_notifi
+@@ -5122,7 +5138,7 @@
      gdth_halt, NULL, 0
  };
  
@@ -290896,7 +290824,7 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
        if (disable) {
                printk("GDT-HA: Controller driver disabled from"
-@@ -5176,7 +5192,7 @@ static int __init gdth_init(void)
+@@ -5176,7 +5192,7 @@
        return 0;
  }
  
@@ -290905,10 +290833,10 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.c linux-2.6.27.19-5.1/drivers/scsi/gdt
  {
        gdth_ha_str *ha;
  
-diff -purN linux-2.6.27/drivers/scsi/gdth.h linux-2.6.27.19-5.1/drivers/scsi/gdth.h
---- linux-2.6.27/drivers/scsi/gdth.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth.h    2009-03-25 16:11:15.000000000 +0000
-@@ -916,7 +916,7 @@ typedef struct {
+diff -r 9608d5473017 drivers/scsi/gdth.h
+--- a/drivers/scsi/gdth.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth.h      Wed May 06 16:56:33 2009 +0100
+@@ -916,7 +916,7 @@
          gdth_cmd_str *internal_cmd_str;         /* crier for internal messages*/
          dma_addr_t sense_paddr;                 /* sense dma-addr */
          unchar priority;
@@ -290917,10 +290845,10 @@ diff -purN linux-2.6.27/drivers/scsi/gdth.h linux-2.6.27.19-5.1/drivers/scsi/gdt
          volatile int wait_for_completion;
          ushort status;
          ulong32 info;
-diff -purN linux-2.6.27/drivers/scsi/gdth_proc.c linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.c
---- linux-2.6.27/drivers/scsi/gdth_proc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.c       2009-03-25 16:11:15.000000000 +0000
-@@ -748,69 +748,3 @@ static void gdth_wait_completion(gdth_ha
+diff -r 9608d5473017 drivers/scsi/gdth_proc.c
+--- a/drivers/scsi/gdth_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth_proc.c Wed May 06 16:56:33 2009 +0100
+@@ -748,69 +748,3 @@
      }
      spin_unlock_irqrestore(&ha->smp_lock, flags);
  }
@@ -290990,10 +290918,10 @@ diff -purN linux-2.6.27/drivers/scsi/gdth_proc.c linux-2.6.27.19-5.1/drivers/scs
 -
 -    return oldto;
 -}
-diff -purN linux-2.6.27/drivers/scsi/gdth_proc.h linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.h
---- linux-2.6.27/drivers/scsi/gdth_proc.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/gdth_proc.h       2009-03-25 16:11:15.000000000 +0000
-@@ -20,9 +20,6 @@ static char *gdth_ioctl_alloc(gdth_ha_st
+diff -r 9608d5473017 drivers/scsi/gdth_proc.h
+--- a/drivers/scsi/gdth_proc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/gdth_proc.h Wed May 06 16:56:33 2009 +0100
+@@ -20,9 +20,6 @@
                                ulong64 *paddr);
  static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr);
  static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id);
@@ -291003,10 +290931,10 @@ diff -purN linux-2.6.27/drivers/scsi/gdth_proc.h linux-2.6.27.19-5.1/drivers/scs
  
  #endif
  
-diff -purN linux-2.6.27/drivers/scsi/hosts.c linux-2.6.27.19-5.1/drivers/scsi/hosts.c
---- linux-2.6.27/drivers/scsi/hosts.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/hosts.c   2009-03-25 16:11:17.000000000 +0000
-@@ -464,7 +464,7 @@ static int __scsi_host_match(struct devi
+diff -r 9608d5473017 drivers/scsi/hosts.c
+--- a/drivers/scsi/hosts.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/hosts.c     Wed May 06 16:56:33 2009 +0100
+@@ -464,7 +464,7 @@
  struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
  {
        struct device *cdev;
@@ -291015,7 +290943,7 @@ diff -purN linux-2.6.27/drivers/scsi/hosts.c linux-2.6.27.19-5.1/drivers/scsi/ho
  
        cdev = class_find_device(&shost_class, NULL, &hostnum,
                                 __scsi_host_match);
-@@ -472,7 +472,7 @@ struct Scsi_Host *scsi_host_lookup(unsig
+@@ -472,7 +472,7 @@
                shost = scsi_host_get(class_to_shost(cdev));
                put_device(cdev);
        }
@@ -291024,10 +290952,10 @@ diff -purN linux-2.6.27/drivers/scsi/hosts.c linux-2.6.27.19-5.1/drivers/scsi/ho
  }
  EXPORT_SYMBOL(scsi_host_lookup);
  
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.c 2009-03-25 16:11:16.000000000 +0000
-@@ -101,7 +101,7 @@ static const struct {
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvfc.c
+--- a/drivers/scsi/ibmvscsi/ibmvfc.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvfc.c   Wed May 06 16:56:33 2009 +0100
+@@ -101,7 +101,7 @@
        { IBMVFC_FABRIC_MAPPED, IBMVFC_UNABLE_TO_ESTABLISH, DID_ERROR, 1, 1, "unable to establish" },
        { IBMVFC_FABRIC_MAPPED, IBMVFC_XPORT_FAULT, DID_OK, 1, 0, "transport fault" },
        { IBMVFC_FABRIC_MAPPED, IBMVFC_CMD_TIMEOUT, DID_TIME_OUT, 1, 1, "command timeout" },
@@ -291036,7 +290964,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        { IBMVFC_FABRIC_MAPPED, IBMVFC_HW_FAILURE, DID_ERROR, 1, 1, "hardware failure" },
        { IBMVFC_FABRIC_MAPPED, IBMVFC_LINK_DOWN_ERR, DID_REQUEUE, 0, 0, "link down" },
        { IBMVFC_FABRIC_MAPPED, IBMVFC_LINK_DEAD_ERR, DID_ERROR, 0, 0, "link dead" },
-@@ -115,12 +115,13 @@ static const struct {
+@@ -115,12 +115,13 @@
  
        { IBMVFC_VIOS_FAILURE, IBMVFC_CRQ_FAILURE, DID_REQUEUE, 1, 1, "CRQ failure" },
        { IBMVFC_VIOS_FAILURE, IBMVFC_SW_FAILURE, DID_ERROR, 0, 1, "software failure" },
@@ -291054,21 +290982,21 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        { IBMVFC_VIOS_FAILURE, IBMVFC_COMMAND_FAILED, DID_ERROR, 1, 1, "command failed" },
  
        { IBMVFC_FC_FAILURE, IBMVFC_INVALID_ELS_CMD_CODE, DID_ERROR, 0, 1, "invalid ELS command code" },
-@@ -278,13 +279,6 @@ static int ibmvfc_get_err_result(struct 
+@@ -277,13 +278,6 @@
+           ((!fc_rsp_len && fc_rsp_len != 4 && fc_rsp_len != 8) ||
             rsp->data.info.rsp_code))
                return DID_ERROR << 16;
+-
 -      if (!vfc_cmd->status) {
 -              if (rsp->flags & FCP_RESID_OVER)
 -                      return rsp->scsi_status | (DID_ERROR << 16);
 -              else
 -                      return rsp->scsi_status | (DID_OK << 16);
 -      }
--
        err = ibmvfc_get_err_index(vfc_cmd->status, vfc_cmd->error);
        if (err >= 0)
-               return rsp->scsi_status | (cmd_status[err].result << 16);
-@@ -503,6 +497,7 @@ static void ibmvfc_set_host_action(struc
+@@ -503,6 +497,7 @@
        case IBMVFC_HOST_ACTION_INIT:
        case IBMVFC_HOST_ACTION_TGT_DEL:
        case IBMVFC_HOST_ACTION_QUERY_TGTS:
@@ -291076,7 +291004,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        case IBMVFC_HOST_ACTION_TGT_ADD:
        case IBMVFC_HOST_ACTION_NONE:
        default:
-@@ -566,7 +561,7 @@ static void ibmvfc_init_host(struct ibmv
+@@ -566,7 +561,7 @@
        struct ibmvfc_target *tgt;
  
        if (vhost->action == IBMVFC_HOST_ACTION_INIT_WAIT) {
@@ -291085,7 +291013,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                        dev_err(vhost->dev,
                                "Host initialization retries exceeded. Taking adapter offline\n");
                        ibmvfc_link_down(vhost, IBMVFC_HOST_OFFLINE);
-@@ -645,6 +640,7 @@ static void ibmvfc_release_crq_queue(str
+@@ -645,6 +640,7 @@
  
        ibmvfc_dbg(vhost, "Releasing CRQ\n");
        free_irq(vdev->irq, vhost);
@@ -291093,17 +291021,17 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        do {
                rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
        } while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
-@@ -765,6 +761,9 @@ static void ibmvfc_scsi_eh_done(struct i
+@@ -764,6 +760,9 @@
+               scsi_dma_unmap(cmnd);
                cmnd->scsi_done(cmnd);
        }
++
 +      if (evt->eh_comp)
 +              complete(evt->eh_comp);
-+
        ibmvfc_free_event(evt);
  }
-@@ -847,11 +846,12 @@ static void ibmvfc_reset_host(struct ibm
+@@ -847,11 +846,12 @@
  static void ibmvfc_retry_host_init(struct ibmvfc_host *vhost)
  {
        if (vhost->action == IBMVFC_HOST_ACTION_INIT_WAIT) {
@@ -291118,7 +291046,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                        __ibmvfc_reset_host(vhost);
                else
                        ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT);
-@@ -1252,6 +1252,7 @@ static void ibmvfc_init_event(struct ibm
+@@ -1252,6 +1252,7 @@
        evt->sync_iu = NULL;
        evt->crq.format = format;
        evt->done = done;
@@ -291126,7 +291054,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
  }
  
  /**
-@@ -1322,7 +1323,9 @@ static int ibmvfc_map_sg_data(struct scs
+@@ -1322,7 +1323,9 @@
                                               &evt->ext_list_token);
  
                if (!evt->ext_list) {
@@ -291137,16 +291065,16 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                        return -ENOMEM;
                }
        }
-@@ -1381,6 +1384,8 @@ static int ibmvfc_send_event(struct ibmv
+@@ -1380,6 +1383,8 @@
+               evt->timer.function = (void (*)(unsigned long))ibmvfc_timeout;
                add_timer(&evt->timer);
        }
-+      mb();
 +
++      mb();
        if ((rc = ibmvfc_send_crq(vhost, crq_as_u64[0], crq_as_u64[1]))) {
                list_del(&evt->queue);
-               del_timer(&evt->timer);
-@@ -1477,6 +1482,11 @@ static void ibmvfc_scsi_done(struct ibmv
+@@ -1477,6 +1482,11 @@
                                sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len;
                        if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len && rsp_len <= 8)
                                memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len);
@@ -291158,17 +291086,17 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
  
                        ibmvfc_log_error(evt);
                }
-@@ -1489,6 +1499,9 @@ static void ibmvfc_scsi_done(struct ibmv
+@@ -1488,6 +1498,9 @@
+               scsi_dma_unmap(cmnd);
                cmnd->scsi_done(cmnd);
        }
++
 +      if (evt->eh_comp)
 +              complete(evt->eh_comp);
-+
        ibmvfc_free_event(evt);
  }
-@@ -1561,9 +1574,6 @@ static int ibmvfc_queuecommand(struct sc
+@@ -1561,9 +1574,6 @@
        vfc_cmd->resp_len = sizeof(vfc_cmd->rsp);
        vfc_cmd->cancel_key = (unsigned long)cmnd->device->hostdata;
        vfc_cmd->tgt_scsi_id = rport->port_id;
@@ -291178,7 +291106,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        vfc_cmd->iu.xfer_len = scsi_bufflen(cmnd);
        int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun);
        memcpy(vfc_cmd->iu.cdb, cmnd->cmnd, cmnd->cmd_len);
-@@ -1627,7 +1637,7 @@ static int ibmvfc_reset_device(struct sc
+@@ -1627,7 +1637,7 @@
        struct ibmvfc_host *vhost = shost_priv(sdev->host);
        struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
        struct ibmvfc_cmd *tmf;
@@ -291187,7 +291115,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        union ibmvfc_iu rsp_iu;
        struct ibmvfc_fcp_rsp *fc_rsp = &rsp_iu.cmd.rsp;
        int rsp_rc = -EBUSY;
-@@ -1789,7 +1799,8 @@ static int ibmvfc_abort_task_set(struct 
+@@ -1789,7 +1799,8 @@
  static int ibmvfc_cancel_all(struct scsi_device *sdev, int type)
  {
        struct ibmvfc_host *vhost = shost_priv(sdev->host);
@@ -291197,7 +291125,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        struct ibmvfc_tmf *tmf;
        struct ibmvfc_event *evt, *found_evt;
        union ibmvfc_iu rsp;
-@@ -1827,7 +1838,7 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1827,7 +1838,7 @@
                int_to_scsilun(sdev->lun, &tmf->lun);
                tmf->flags = (type | IBMVFC_TMF_LUA_VALID);
                tmf->cancel_key = (unsigned long)sdev->hostdata;
@@ -291206,7 +291134,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
  
                evt->sync_iu = &rsp;
                init_completion(&evt->comp);
-@@ -1859,6 +1870,91 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1859,6 +1870,91 @@
  }
  
  /**
@@ -291298,7 +291226,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
   * ibmvfc_eh_abort_handler - Abort a command
   * @cmd:      scsi command to abort
   *
-@@ -1867,29 +1963,21 @@ static int ibmvfc_cancel_all(struct scsi
+@@ -1867,29 +1963,21 @@
   **/
  static int ibmvfc_eh_abort_handler(struct scsi_cmnd *cmd)
  {
@@ -291314,9 +291242,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        ibmvfc_wait_while_resetting(vhost);
 -      cancel_rc = ibmvfc_cancel_all(cmd->device, IBMVFC_TMF_ABORT_TASK_SET);
 -      abort_rc = ibmvfc_abort_task_set(cmd->device);
-+      cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
-+      abort_rc = ibmvfc_abort_task_set(sdev);
+-
 -      if (!cancel_rc && !abort_rc) {
 -              spin_lock_irqsave(vhost->host->host_lock, flags);
 -              list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
@@ -291327,16 +291253,21 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 -              LEAVE;
 -              return SUCCESS;
 -      }
+-
+-      LEAVE;
+-      return FAILED;
++      cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_ABORT_TASK_SET);
++      abort_rc = ibmvfc_abort_task_set(sdev);
++
 +      if (!cancel_rc && !abort_rc)
 +              rc = ibmvfc_wait_for_ops(vhost, sdev, ibmvfc_match_lun);
-       LEAVE;
--      return FAILED;
++
++      LEAVE;
 +      return rc;
  }
  
  /**
-@@ -1901,29 +1989,21 @@ static int ibmvfc_eh_abort_handler(struc
+@@ -1901,29 +1989,21 @@
   **/
  static int ibmvfc_eh_device_reset_handler(struct scsi_cmnd *cmd)
  {
@@ -291352,9 +291283,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        ibmvfc_wait_while_resetting(vhost);
 -      cancel_rc = ibmvfc_cancel_all(cmd->device, IBMVFC_TMF_LUN_RESET);
 -      reset_rc = ibmvfc_reset_device(cmd->device, IBMVFC_LUN_RESET, "LUN");
-+      cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
-+      reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN");
+-
 -      if (!cancel_rc && !reset_rc) {
 -              spin_lock_irqsave(vhost->host->host_lock, flags);
 -              list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
@@ -291365,16 +291294,21 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 -              LEAVE;
 -              return SUCCESS;
 -      }
+-
+-      LEAVE;
+-      return FAILED;
++      cancel_rc = ibmvfc_cancel_all(sdev, IBMVFC_TMF_LUN_RESET);
++      reset_rc = ibmvfc_reset_device(sdev, IBMVFC_LUN_RESET, "LUN");
++
 +      if (!cancel_rc && !reset_rc)
 +              rc = ibmvfc_wait_for_ops(vhost, sdev, ibmvfc_match_lun);
-       LEAVE;
--      return FAILED;
++
++      LEAVE;
 +      return rc;
  }
  
  /**
-@@ -1959,31 +2039,23 @@ static void ibmvfc_dev_abort_all(struct 
+@@ -1959,31 +2039,23 @@
   **/
  static int ibmvfc_eh_target_reset_handler(struct scsi_cmnd *cmd)
  {
@@ -291393,8 +291327,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        ibmvfc_wait_while_resetting(vhost);
        starget_for_each_device(starget, &cancel_rc, ibmvfc_dev_cancel_all);
 -      reset_rc = ibmvfc_reset_device(cmd->device, IBMVFC_TARGET_RESET, "target");
-+      reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target");
+-
 -      if (!cancel_rc && !reset_rc) {
 -              spin_lock_irqsave(vhost->host->host_lock, flags);
 -              list_for_each_entry_safe(evt, pos, &vhost->sent, queue) {
@@ -291405,16 +291338,20 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 -              LEAVE;
 -              return SUCCESS;
 -      }
+-
+-      LEAVE;
+-      return FAILED;
++      reset_rc = ibmvfc_reset_device(sdev, IBMVFC_TARGET_RESET, "target");
++
 +      if (!cancel_rc && !reset_rc)
 +              rc = ibmvfc_wait_for_ops(vhost, starget, ibmvfc_match_target);
-       LEAVE;
--      return FAILED;
++
++      LEAVE;
 +      return rc;
  }
  
  /**
-@@ -2013,26 +2085,19 @@ static void ibmvfc_terminate_rport_io(st
+@@ -2013,26 +2085,19 @@
        struct scsi_target *starget = to_scsi_target(&rport->dev);
        struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
        struct ibmvfc_host *vhost = shost_priv(shost);
@@ -291436,17 +291373,17 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 -              }
 -              spin_unlock_irqrestore(shost->host_lock, flags);
 -      } else
--              ibmvfc_issue_fc_host_lip(shost);
 +      if (!cancel_rc && !abort_rc)
 +              rc = ibmvfc_wait_for_ops(vhost, starget, ibmvfc_match_target);
--      scsi_target_unblock(&rport->dev);
++
 +      if (rc == FAILED)
-+              ibmvfc_issue_fc_host_lip(shost);
+               ibmvfc_issue_fc_host_lip(shost);
+-
+-      scsi_target_unblock(&rport->dev);
        LEAVE;
  }
  
-@@ -2091,15 +2156,17 @@ static void ibmvfc_handle_async(struct i
+@@ -2091,15 +2156,17 @@
        case IBMVFC_AE_LINK_UP:
        case IBMVFC_AE_RESUME:
                vhost->events_to_log |= IBMVFC_AE_LINKUP;
@@ -291467,7 +291404,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                vhost->events_to_log |= IBMVFC_AE_RSCN;
        case IBMVFC_AE_ELS_LOGO:
        case IBMVFC_AE_ELS_PRLO:
-@@ -2265,6 +2332,28 @@ static int ibmvfc_slave_alloc(struct scs
+@@ -2265,6 +2332,28 @@
  }
  
  /**
@@ -291496,7 +291433,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
   * ibmvfc_slave_configure - Configure the device
   * @sdev:     struct scsi_device device to configure
   *
-@@ -2543,6 +2632,7 @@ static struct scsi_host_template driver_
+@@ -2543,6 +2632,7 @@
        .eh_host_reset_handler = ibmvfc_eh_host_reset_handler,
        .slave_alloc = ibmvfc_slave_alloc,
        .slave_configure = ibmvfc_slave_configure,
@@ -291504,7 +291441,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        .scan_finished = ibmvfc_scan_finished,
        .change_queue_depth = ibmvfc_change_queue_depth,
        .change_queue_type = ibmvfc_change_queue_type,
-@@ -2610,6 +2700,25 @@ static struct ibmvfc_crq *ibmvfc_next_cr
+@@ -2610,6 +2700,25 @@
  static irqreturn_t ibmvfc_interrupt(int irq, void *dev_instance)
  {
        struct ibmvfc_host *vhost = (struct ibmvfc_host *)dev_instance;
@@ -291530,7 +291467,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        struct vio_dev *vdev = to_vio_dev(vhost->dev);
        struct ibmvfc_crq *crq;
        struct ibmvfc_async_crq *async;
-@@ -2617,7 +2726,6 @@ static irqreturn_t ibmvfc_interrupt(int 
+@@ -2617,7 +2726,6 @@
        int done = 0;
  
        spin_lock_irqsave(vhost->host->host_lock, flags);
@@ -291538,7 +291475,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        while (!done) {
                /* Pull all the valid messages off the CRQ */
                while ((crq = ibmvfc_next_crq(vhost)) != NULL) {
-@@ -2639,13 +2747,12 @@ static irqreturn_t ibmvfc_interrupt(int 
+@@ -2639,13 +2747,12 @@
                } else if ((async = ibmvfc_next_async_crq(vhost)) != NULL) {
                        vio_disable_interrupts(vdev);
                        ibmvfc_handle_async(async, vhost);
@@ -291553,7 +291490,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
  }
  
  /**
-@@ -2671,13 +2778,47 @@ static void ibmvfc_init_tgt(struct ibmvf
+@@ -2671,13 +2778,47 @@
  static void ibmvfc_retry_tgt_init(struct ibmvfc_target *tgt,
                                  void (*job_step) (struct ibmvfc_target *))
  {
@@ -291602,21 +291539,26 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
  /**
   * ibmvfc_tgt_prli_done - Completion handler for Process Login
   * @evt:      ibmvfc event struct
-@@ -2688,15 +2829,36 @@ static void ibmvfc_tgt_prli_done(struct 
+@@ -2688,15 +2829,36 @@
        struct ibmvfc_target *tgt = evt->tgt;
        struct ibmvfc_host *vhost = evt->vhost;
        struct ibmvfc_process_login *rsp = &evt->xfer_iu->prli;
 +      struct ibmvfc_prli_svc_parms *parms = &rsp->parms;
        u32 status = rsp->common.status;
-+      int index;
-       vhost->discovery_threads--;
-       ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
-       switch (status) {
-       case IBMVFC_MAD_SUCCESS:
+-
+-      vhost->discovery_threads--;
+-      ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
+-      switch (status) {
+-      case IBMVFC_MAD_SUCCESS:
 -              tgt_dbg(tgt, "Process Login succeeded\n");
 -              tgt->need_login = 0;
 -              ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_ADD_RPORT);
++      int index;
++
++      vhost->discovery_threads--;
++      ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE);
++      switch (status) {
++      case IBMVFC_MAD_SUCCESS:
 +              tgt_dbg(tgt, "Process Login succeeded: %X %02X %04X\n",
 +                      parms->type, parms->flags, parms->service_parms);
 +
@@ -291642,7 +291584,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        case IBMVFC_MAD_DRIVER_FAILED:
                break;
-@@ -2710,6 +2872,8 @@ static void ibmvfc_tgt_prli_done(struct 
+@@ -2710,6 +2872,8 @@
                        rsp->status, rsp->error, status);
                if (ibmvfc_retry_cmd(rsp->status, rsp->error))
                        ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_send_prli);
@@ -291651,7 +291593,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        };
  
-@@ -2783,7 +2947,6 @@ static void ibmvfc_tgt_plogi_done(struct
+@@ -2783,7 +2947,6 @@
                tgt->ids.node_name = wwn_to_u64(rsp->service_parms.node_name);
                tgt->ids.port_name = wwn_to_u64(rsp->service_parms.port_name);
                tgt->ids.port_id = tgt->scsi_id;
@@ -291659,7 +291601,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                memcpy(&tgt->service_parms, &rsp->service_parms,
                       sizeof(tgt->service_parms));
                memcpy(&tgt->service_parms_change, &rsp->service_parms_change,
-@@ -2804,6 +2967,8 @@ static void ibmvfc_tgt_plogi_done(struct
+@@ -2804,6 +2967,8 @@
  
                if (ibmvfc_retry_cmd(rsp->status, rsp->error))
                        ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_send_plogi);
@@ -291668,7 +291610,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        };
  
-@@ -3095,6 +3260,8 @@ static void ibmvfc_tgt_query_target_done
+@@ -3095,6 +3260,8 @@
                        ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DEL_RPORT);
                else if (ibmvfc_retry_cmd(rsp->status, rsp->error))
                        ibmvfc_retry_tgt_init(tgt, ibmvfc_tgt_query_target);
@@ -291677,7 +291619,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        };
  
-@@ -3168,6 +3335,7 @@ static int ibmvfc_alloc_target(struct ib
+@@ -3168,6 +3335,7 @@
                return -ENOMEM;
        }
  
@@ -291685,7 +291627,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        tgt->scsi_id = scsi_id;
        tgt->new_scsi_id = scsi_id;
        tgt->vhost = vhost;
-@@ -3425,6 +3593,7 @@ static int __ibmvfc_work_to_do(struct ib
+@@ -3425,6 +3593,7 @@
        case IBMVFC_HOST_ACTION_ALLOC_TGTS:
        case IBMVFC_HOST_ACTION_TGT_ADD:
        case IBMVFC_HOST_ACTION_TGT_DEL:
@@ -291693,14 +291635,15 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        case IBMVFC_HOST_ACTION_QUERY:
        default:
                break;
-@@ -3477,9 +3646,18 @@ static void ibmvfc_log_ae(struct ibmvfc_
+@@ -3477,8 +3646,17 @@
  static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt)
  {
        struct ibmvfc_host *vhost = tgt->vhost;
 -      struct fc_rport *rport;
+-      unsigned long flags;
 +      struct fc_rport *rport = tgt->rport;
-       unsigned long flags;
++      unsigned long flags;
++
 +      if (rport) {
 +              tgt_dbg(tgt, "Setting rport roles\n");
 +              fc_remote_port_rolechg(rport, tgt->ids.roles);
@@ -291709,11 +291652,10 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 +              spin_unlock_irqrestore(vhost->host->host_lock, flags);
 +              return;
 +      }
-+
        tgt_dbg(tgt, "Adding rport\n");
        rport = fc_remote_port_add(vhost->host, 0, &tgt->ids);
-       spin_lock_irqsave(vhost->host->host_lock, flags);
-@@ -3521,7 +3699,13 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3521,7 +3699,13 @@
                break;
        case IBMVFC_HOST_ACTION_INIT:
                BUG_ON(vhost->state != IBMVFC_INITIALIZING);
@@ -291728,7 +291670,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        case IBMVFC_HOST_ACTION_QUERY:
                list_for_each_entry(tgt, &vhost->targets, queue)
-@@ -3540,6 +3724,7 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3540,6 +3724,7 @@
                        ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_TGT_DEL);
                break;
        case IBMVFC_HOST_ACTION_TGT_DEL:
@@ -291736,7 +291678,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                list_for_each_entry(tgt, &vhost->targets, queue) {
                        if (tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
                                tgt_dbg(tgt, "Deleting rport\n");
-@@ -3555,8 +3740,17 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3555,8 +3740,17 @@
                }
  
                if (vhost->state == IBMVFC_INITIALIZING) {
@@ -291756,7 +291698,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                } else {
                        ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE);
                        spin_unlock_irqrestore(vhost->host->host_lock, flags);
-@@ -3579,14 +3773,8 @@ static void ibmvfc_do_work(struct ibmvfc
+@@ -3579,30 +3773,14 @@
                        }
                }
  
@@ -291773,10 +291715,10 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
                break;
        case IBMVFC_HOST_ACTION_TGT_ADD:
                list_for_each_entry(tgt, &vhost->targets, queue) {
-@@ -3594,16 +3782,6 @@ static void ibmvfc_do_work(struct ibmvfc
+                       if (tgt->action == IBMVFC_TGT_ACTION_ADD_RPORT) {
                                spin_unlock_irqrestore(vhost->host->host_lock, flags);
                                ibmvfc_tgt_add_rport(tgt);
-                               return;
+-                              return;
 -                      } else if (tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
 -                              tgt_dbg(tgt, "Deleting rport\n");
 -                              rport = tgt->rport;
@@ -291786,11 +291728,10 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
 -                              if (rport)
 -                                      fc_remote_port_delete(rport);
 -                              kref_put(&tgt->kref, ibmvfc_release_tgt);
--                              return;
+                               return;
                        }
                }
-@@ -3699,6 +3877,8 @@ static int ibmvfc_init_crq(struct ibmvfc
+@@ -3699,6 +3877,8 @@
  
        retrc = 0;
  
@@ -291799,7 +291740,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        if ((rc = request_irq(vdev->irq, ibmvfc_interrupt, 0, IBMVFC_NAME, vhost))) {
                dev_err(dev, "Couldn't register irq 0x%x. rc=%d\n", vdev->irq, rc);
                goto req_irq_failed;
-@@ -3714,6 +3894,7 @@ static int ibmvfc_init_crq(struct ibmvfc
+@@ -3714,6 +3894,7 @@
        return retrc;
  
  req_irq_failed:
@@ -291807,9 +291748,9 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.c linux-2.6.27.19-5.1/drive
        do {
                rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
        } while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.h
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvfc.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvfc.h
+--- a/drivers/scsi/ibmvscsi/ibmvfc.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvfc.h   Wed May 06 16:56:33 2009 +0100
 @@ -29,11 +29,11 @@
  #include "viosrp.h"
  
@@ -291836,7 +291777,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
  #define IBMVFC_DEV_LOSS_TMO           (5 * 60)
  #define IBMVFC_DEFAULT_LOG_LEVEL      2
  #define IBMVFC_MAX_CDB_LEN            16
-@@ -109,6 +110,7 @@ enum ibmvfc_vios_errors {
+@@ -109,6 +110,7 @@
        IBMVFC_TRANS_CANCELLED                  = 0x0006,
        IBMVFC_TRANS_CANCELLED_IMPLICIT = 0x0007,
        IBMVFC_INSUFFICIENT_RESOURCE            = 0x0008,
@@ -291844,7 +291785,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        IBMVFC_COMMAND_FAILED                   = 0x8000,
  };
  
-@@ -337,7 +339,6 @@ struct ibmvfc_tmf {
+@@ -337,7 +339,6 @@
  #define IBMVFC_TMF_LUA_VALID          0x40
        u32 cancel_key;
        u32 my_cancel_key;
@@ -291852,7 +291793,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        u32 pad;
        u64 reserved[2];
  }__attribute__((packed, aligned (8)));
-@@ -524,10 +525,10 @@ enum ibmvfc_async_event {
+@@ -524,10 +525,10 @@
  };
  
  struct ibmvfc_crq {
@@ -291866,7 +291807,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
  }__attribute__((packed, aligned (8)));
  
  struct ibmvfc_crq_queue {
-@@ -537,13 +538,13 @@ struct ibmvfc_crq_queue {
+@@ -537,13 +538,13 @@
  };
  
  struct ibmvfc_async_crq {
@@ -291885,7 +291826,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        u64 reserved;
  }__attribute__((packed, aligned (8)));
  
-@@ -606,6 +607,7 @@ struct ibmvfc_event {
+@@ -606,6 +607,7 @@
        struct srp_direct_buf *ext_list;
        dma_addr_t ext_list_token;
        struct completion comp;
@@ -291893,7 +291834,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        struct timer_list timer;
  };
  
-@@ -626,6 +628,7 @@ enum ibmvfc_host_action {
+@@ -626,6 +628,7 @@
        IBMVFC_HOST_ACTION_TGT_DEL,
        IBMVFC_HOST_ACTION_ALLOC_TGTS,
        IBMVFC_HOST_ACTION_TGT_INIT,
@@ -291901,7 +291842,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        IBMVFC_HOST_ACTION_TGT_ADD,
  };
  
-@@ -671,6 +674,7 @@ struct ibmvfc_host {
+@@ -671,6 +674,7 @@
        int discovery_threads;
        int client_migrated;
        int reinit;
@@ -291909,7 +291850,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        int events_to_log;
  #define IBMVFC_AE_LINKUP      0x0001
  #define IBMVFC_AE_LINKDOWN    0x0002
-@@ -680,6 +684,7 @@ struct ibmvfc_host {
+@@ -680,6 +684,7 @@
        char partition_name[97];
        void (*job_step) (struct ibmvfc_host *);
        struct task_struct *work_thread;
@@ -291917,7 +291858,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
        wait_queue_head_t init_wait_q;
        wait_queue_head_t work_wait_q;
  };
-@@ -700,7 +705,7 @@ struct ibmvfc_host {
+@@ -700,7 +705,7 @@
  
  #define ibmvfc_log(vhost, level, ...) \
        do { \
@@ -291926,10 +291867,10 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvfc.h linux-2.6.27.19-5.1/drive
                        dev_err((vhost)->dev, ##__VA_ARGS__); \
        } while (0)
  
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvscsi.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvscsi.c       2009-03-25 16:11:16.000000000 +0000
-@@ -89,13 +89,20 @@ static int max_id = 64;
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvscsi.c
+--- a/drivers/scsi/ibmvscsi/ibmvscsi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvscsi.c Wed May 06 16:56:33 2009 +0100
+@@ -89,13 +89,20 @@
  static int max_channel = 3;
  static int init_timeout = 5;
  static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;
@@ -291951,7 +291892,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
  MODULE_DESCRIPTION("IBM Virtual SCSI");
  MODULE_AUTHOR("Dave Boutcher");
  MODULE_LICENSE("GPL");
-@@ -431,6 +438,7 @@ static int map_sg_data(struct scsi_cmnd 
+@@ -431,6 +438,7 @@
                                sdev_printk(KERN_ERR, cmd->device,
                                            "Can't allocate memory "
                                            "for indirect table\n");
@@ -291959,7 +291900,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                        return 0;
                }
        }
-@@ -756,7 +764,7 @@ static int ibmvscsi_queuecommand(struct 
+@@ -756,7 +764,7 @@
        init_event_struct(evt_struct,
                          handle_cmd_rsp,
                          VIOSRP_SRP_FORMAT,
@@ -291968,7 +291909,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
  
        evt_struct->cmnd = cmnd;
        evt_struct->cmnd_done = done;
-@@ -1442,7 +1450,7 @@ static int ibmvscsi_slave_configure(stru
+@@ -1442,7 +1450,7 @@
        spin_lock_irqsave(shost->host_lock, lock_flags);
        if (sdev->type == TYPE_DISK) {
                sdev->allow_restart = 1;
@@ -291977,7 +291918,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
        }
        scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
        spin_unlock_irqrestore(shost->host_lock, lock_flags);
-@@ -1476,7 +1484,7 @@ static ssize_t show_host_srp_version(str
+@@ -1476,7 +1484,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
        int len;
  
@@ -291986,7 +291927,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                       hostdata->madapter_info.srp_version);
        return len;
  }
-@@ -1497,7 +1505,7 @@ static ssize_t show_host_partition_name(
+@@ -1497,7 +1505,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
        int len;
  
@@ -291995,7 +291936,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                       hostdata->madapter_info.partition_name);
        return len;
  }
-@@ -1518,7 +1526,7 @@ static ssize_t show_host_partition_numbe
+@@ -1518,7 +1526,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
        int len;
  
@@ -292004,7 +291945,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                       hostdata->madapter_info.partition_number);
        return len;
  }
-@@ -1538,7 +1546,7 @@ static ssize_t show_host_mad_version(str
+@@ -1538,7 +1546,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
        int len;
  
@@ -292013,7 +291954,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                       hostdata->madapter_info.mad_version);
        return len;
  }
-@@ -1558,7 +1566,7 @@ static ssize_t show_host_os_type(struct 
+@@ -1558,7 +1566,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
        int len;
  
@@ -292022,7 +291963,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
        return len;
  }
  
-@@ -1577,7 +1585,7 @@ static ssize_t show_host_config(struct d
+@@ -1577,7 +1585,7 @@
        struct ibmvscsi_host_data *hostdata = shost_priv(shost);
  
        /* returns null-terminated host config data */
@@ -292031,7 +291972,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                return strlen(buf);
        else
                return 0;
-@@ -1607,7 +1615,7 @@ static struct device_attribute *ibmvscsi
+@@ -1607,7 +1615,7 @@
  static struct scsi_host_template driver_template = {
        .module = THIS_MODULE,
        .name = "IBM POWER Virtual SCSI Adapter " IBMVSCSI_VERSION,
@@ -292040,7 +291981,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
        .queuecommand = ibmvscsi_queuecommand,
        .eh_abort_handler = ibmvscsi_eh_abort_handler,
        .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler,
-@@ -1633,7 +1641,7 @@ static struct scsi_host_template driver_
+@@ -1633,7 +1641,7 @@
  static unsigned long ibmvscsi_get_desired_dma(struct vio_dev *vdev)
  {
        /* iu_storage data allocated in initialize_event_pool */
@@ -292049,7 +291990,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
  
        /* add io space for sg data */
        desired_io += (IBMVSCSI_MAX_SECTORS_DEFAULT * 512 *
-@@ -1657,7 +1665,6 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1657,7 +1665,6 @@
  
        vdev->dev.driver_data = NULL;
  
@@ -292057,7 +291998,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
        host = scsi_host_alloc(&driver_template, sizeof(*hostdata));
        if (!host) {
                dev_err(&vdev->dev, "couldn't allocate host data\n");
-@@ -1673,12 +1680,12 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1673,12 +1680,12 @@
        atomic_set(&hostdata->request_limit, -1);
        hostdata->host->max_sectors = IBMVSCSI_MAX_SECTORS_DEFAULT;
  
@@ -292072,7 +292013,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                dev_err(&vdev->dev, "couldn't initialize event pool\n");
                goto init_pool_failed;
        }
-@@ -1730,7 +1737,7 @@ static int ibmvscsi_probe(struct vio_dev
+@@ -1730,7 +1737,7 @@
        add_host_failed:
        release_event_pool(&hostdata->pool, hostdata);
        init_pool_failed:
@@ -292081,7 +292022,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
        init_crq_failed:
        scsi_host_put(host);
        scsi_host_alloc_failed:
-@@ -1742,7 +1749,7 @@ static int ibmvscsi_remove(struct vio_de
+@@ -1742,7 +1749,7 @@
        struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data;
        release_event_pool(&hostdata->pool, hostdata);
        ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
@@ -292090,7 +292031,7 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
  
        srp_remove_host(hostdata->host);
        scsi_remove_host(hostdata->host);
-@@ -1767,7 +1774,7 @@ static struct vio_driver ibmvscsi_driver
+@@ -1767,7 +1774,7 @@
        .remove = ibmvscsi_remove,
        .get_desired_dma = ibmvscsi_get_desired_dma,
        .driver = {
@@ -292099,21 +292040,21 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvscsi.c linux-2.6.27.19-5.1/dri
                .owner = THIS_MODULE,
        }
  };
-@@ -1779,6 +1786,10 @@ int __init ibmvscsi_module_init(void)
+@@ -1778,6 +1785,10 @@
+ int __init ibmvscsi_module_init(void)
  {
        int ret;
++
 +      /* Ensure we have two requests to do error recovery */
 +      driver_template.can_queue = max_requests;
 +      max_events = max_requests + 2;
-+
        if (firmware_has_feature(FW_FEATURE_ISERIES))
                ibmvscsi_ops = &iseriesvscsi_ops;
-       else if (firmware_has_feature(FW_FEATURE_VIO))
-diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvstgt.c
---- linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ibmvscsi/ibmvstgt.c       2009-03-25 16:11:16.000000000 +0000
-@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev
+diff -r 9608d5473017 drivers/scsi/ibmvscsi/ibmvstgt.c
+--- a/drivers/scsi/ibmvscsi/ibmvstgt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ibmvscsi/ibmvstgt.c Wed May 06 16:56:33 2009 +0100
+@@ -864,21 +864,23 @@
  
        INIT_WORK(&vport->crq_work, handle_crq);
  
@@ -292123,15 +292064,16 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c linux-2.6.27.19-5.1/dri
                goto free_srp_target;
  
 -      err = scsi_add_host(shost, target->dev);
-+      err = scsi_tgt_alloc_queue(shost);
+-      if (err)
+-              goto destroy_queue;
+-
+       err = scsi_tgt_alloc_queue(shost);
        if (err)
 -              goto destroy_queue;
 +              goto remove_host;
--      err = scsi_tgt_alloc_queue(shost);
++
 +      err = crq_queue_create(&vport->crq_queue, target);
-       if (err)
--              goto destroy_queue;
++      if (err)
 +              goto free_queue;
  
        return 0;
@@ -292144,10 +292086,10 @@ diff -purN linux-2.6.27/drivers/scsi/ibmvscsi/ibmvstgt.c linux-2.6.27.19-5.1/dri
  free_srp_target:
        srp_target_free(target);
  put_host:
-diff -purN linux-2.6.27/drivers/scsi/ide-scsi.c linux-2.6.27.19-5.1/drivers/scsi/ide-scsi.c
---- linux-2.6.27/drivers/scsi/ide-scsi.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ide-scsi.c        2009-03-25 16:11:14.000000000 +0000
-@@ -612,7 +612,7 @@ static int idescsi_queue (struct scsi_cm
+diff -r 9608d5473017 drivers/scsi/ide-scsi.c
+--- a/drivers/scsi/ide-scsi.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ide-scsi.c  Wed May 06 16:56:33 2009 +0100
+@@ -612,7 +612,7 @@
        pc->req_xfer = pc->buf_size = scsi_bufflen(cmd);
        pc->scsi_cmd = cmd;
        pc->done = done;
@@ -292156,10 +292098,10 @@ diff -purN linux-2.6.27/drivers/scsi/ide-scsi.c linux-2.6.27.19-5.1/drivers/scsi
  
        if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
                printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
-diff -purN linux-2.6.27/drivers/scsi/ipr.c linux-2.6.27.19-5.1/drivers/scsi/ipr.c
---- linux-2.6.27/drivers/scsi/ipr.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ipr.c     2009-03-25 16:11:15.000000000 +0000
-@@ -3670,7 +3670,8 @@ static int ipr_slave_configure(struct sc
+diff -r 9608d5473017 drivers/scsi/ipr.c
+--- a/drivers/scsi/ipr.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ipr.c       Wed May 06 16:56:33 2009 +0100
+@@ -3670,7 +3670,8 @@
                        sdev->no_uld_attach = 1;
                }
                if (ipr_is_vset_device(res)) {
@@ -292169,10 +292111,10 @@ diff -purN linux-2.6.27/drivers/scsi/ipr.c linux-2.6.27.19-5.1/drivers/scsi/ipr.
                        blk_queue_max_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
                }
                if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))
-diff -purN linux-2.6.27/drivers/scsi/ips.c linux-2.6.27.19-5.1/drivers/scsi/ips.c
---- linux-2.6.27/drivers/scsi/ips.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ips.c     2009-03-25 16:11:16.000000000 +0000
-@@ -3818,7 +3818,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * 
+diff -r 9608d5473017 drivers/scsi/ips.c
+--- a/drivers/scsi/ips.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ips.c       Wed May 06 16:56:33 2009 +0100
+@@ -3818,7 +3818,7 @@
                scb->cmd.dcdb.segment_4G = 0;
                scb->cmd.dcdb.enhanced_sg = 0;
  
@@ -292181,10 +292123,10 @@ diff -purN linux-2.6.27/drivers/scsi/ips.c linux-2.6.27.19-5.1/drivers/scsi/ips.
  
                if (ha->subsys->param[4] & 0x00100000) {        /* If NEW Tape DCDB is Supported */
                        if (!scb->sg_len) {
-diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.c
---- linux-2.6.27/drivers/scsi/iscsi_tcp.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.c       2009-03-25 16:11:15.000000000 +0000
-@@ -97,7 +97,7 @@ static int iscsi_tcp_hdr_recv_done(struc
+diff -r 9608d5473017 drivers/scsi/iscsi_tcp.c
+--- a/drivers/scsi/iscsi_tcp.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/iscsi_tcp.c Wed May 06 16:56:33 2009 +0100
+@@ -97,7 +97,7 @@
   * data is copied to the indicated sg entry, at the given
   * offset.
   */
@@ -292193,7 +292135,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_segment_init_sg(struct iscsi_segment *segment,
                          struct scatterlist *sg, unsigned int offset)
  {
-@@ -107,6 +107,7 @@ iscsi_tcp_segment_init_sg(struct iscsi_s
+@@ -107,6 +107,7 @@
                            segment->total_size - segment->total_copied);
        segment->data = NULL;
  }
@@ -292201,7 +292143,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /**
   * iscsi_tcp_segment_map - map the current S/G page
-@@ -117,7 +118,7 @@ iscsi_tcp_segment_init_sg(struct iscsi_s
+@@ -117,7 +118,7 @@
   * because the iscsi passthrough and internal IO paths will never use high
   * mem pages.
   */
@@ -292210,7 +292152,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_segment_map(struct iscsi_segment *segment, int recv)
  {
        struct scatterlist *sg;
-@@ -143,8 +144,9 @@ iscsi_tcp_segment_map(struct iscsi_segme
+@@ -143,8 +144,9 @@
        segment->sg_mapped = kmap_atomic(sg_page(sg), KM_SOFTIRQ0);
        segment->data = segment->sg_mapped + sg->offset + segment->sg_offset;
  }
@@ -292221,7 +292163,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_segment_unmap(struct iscsi_segment *segment)
  {
        debug_tcp("iscsi_tcp_segment_unmap %p\n", segment);
-@@ -156,6 +158,7 @@ iscsi_tcp_segment_unmap(struct iscsi_seg
+@@ -156,6 +158,7 @@
                segment->data = NULL;
        }
  }
@@ -292229,7 +292171,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /*
   * Splice the digest buffer into the buffer
-@@ -376,6 +379,9 @@ static inline int
+@@ -376,6 +379,9 @@
  iscsi_tcp_dgst_verify(struct iscsi_tcp_conn *tcp_conn,
                      struct iscsi_segment *segment)
  {
@@ -292239,7 +292181,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
        if (!segment->digest_len)
                return 1;
  
-@@ -448,7 +454,7 @@ iscsi_segment_seek_sg(struct iscsi_segme
+@@ -448,7 +454,7 @@
   * function is called we do not yet know the final size of the header and want
   * to delay the digest processing until we know that.
   */
@@ -292248,7 +292190,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_hdr_recv_prep(struct iscsi_tcp_conn *tcp_conn)
  {
        debug_tcp("iscsi_tcp_hdr_recv_prep(%p%s)\n", tcp_conn,
-@@ -457,6 +463,7 @@ iscsi_tcp_hdr_recv_prep(struct iscsi_tcp
+@@ -457,6 +463,7 @@
                                tcp_conn->in.hdr_buf, sizeof(struct iscsi_hdr),
                                iscsi_tcp_hdr_recv_done, NULL);
  }
@@ -292256,7 +292198,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /*
   * Handle incoming reply to any other type of command
-@@ -486,7 +493,8 @@ iscsi_tcp_data_recv_prep(struct iscsi_tc
+@@ -486,7 +493,8 @@
        struct iscsi_conn *conn = tcp_conn->iscsi_conn;
        struct hash_desc *rx_hash = NULL;
  
@@ -292266,7 +292208,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                rx_hash = &tcp_conn->rx_hash;
  
        iscsi_segment_init_linear(&tcp_conn->in.segment,
-@@ -497,7 +505,7 @@ iscsi_tcp_data_recv_prep(struct iscsi_tc
+@@ -497,7 +505,7 @@
  /*
   * must be called with session lock
   */
@@ -292275,7 +292217,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_cleanup_task(struct iscsi_conn *conn, struct iscsi_task *task)
  {
        struct iscsi_tcp_task *tcp_task = task->dd_data;
-@@ -521,6 +529,7 @@ iscsi_tcp_cleanup_task(struct iscsi_conn
+@@ -521,6 +529,7 @@
                tcp_task->r2t = NULL;
        }
  }
@@ -292283,7 +292225,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /**
   * iscsi_data_rsp - SCSI Data-In Response processing
-@@ -737,7 +746,7 @@ iscsi_tcp_process_data_in(struct iscsi_t
+@@ -737,7 +746,7 @@
   * by data, the receive buffer is set up to copy the incoming data
   * to the correct location.
   */
@@ -292292,7 +292234,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_hdr_dissect(struct iscsi_conn *conn, struct iscsi_hdr *hdr)
  {
        int rc = 0, opcode, ahslen;
-@@ -793,7 +802,8 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn 
+@@ -793,7 +802,8 @@
                         * we move on to the next scatterlist entry and
                         * update the digest per-entry.
                         */
@@ -292302,7 +292244,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                                rx_hash = &tcp_conn->rx_hash;
  
                        debug_tcp("iscsi_tcp_begin_data_in(%p, offset=%d, "
-@@ -881,6 +891,7 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn 
+@@ -881,6 +891,7 @@
  
        return rc;
  }
@@ -292310,7 +292252,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /**
   * iscsi_tcp_hdr_recv_done - process PDU header
-@@ -919,7 +930,8 @@ iscsi_tcp_hdr_recv_done(struct iscsi_tcp
+@@ -919,7 +930,8 @@
        /* We're done processing the header. See if we're doing
         * header digests; if so, set up the recv_digest buffer
         * and go back for more. */
@@ -292320,7 +292262,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                if (segment->digest_len == 0) {
                        iscsi_tcp_segment_splice_digest(segment,
                                                        segment->recv_digest);
-@@ -1161,10 +1173,11 @@ iscsi_tcp_xmit_qlen(struct iscsi_conn *c
+@@ -1161,10 +1173,11 @@
  static inline int
  iscsi_tcp_flush(struct iscsi_conn *conn)
  {
@@ -292333,7 +292275,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                if (rc == 0)
                        return -EAGAIN;
                if (rc < 0)
-@@ -1205,7 +1218,8 @@ iscsi_tcp_send_hdr_prep(struct iscsi_con
+@@ -1205,7 +1218,8 @@
         * sure that both iscsi_tcp_task and mtask have
         * sufficient room.
         */
@@ -292343,7 +292285,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                iscsi_tcp_dgst_header(&tcp_conn->tx_hash, hdr, hdrlen,
                                      hdr + hdrlen);
                hdrlen += ISCSI_DIGEST_SIZE;
-@@ -1243,7 +1257,8 @@ iscsi_tcp_send_data_prep(struct iscsi_co
+@@ -1243,7 +1257,8 @@
        hdr_spec_len = ntoh24(tcp_conn->out.hdr->dlength);
        WARN_ON(iscsi_padded(len) != iscsi_padded(hdr_spec_len));
  
@@ -292353,7 +292295,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                tx_hash = &tcp_conn->tx_hash;
  
        return iscsi_segment_seek_sg(&tcp_conn->out.data_segment,
-@@ -1267,7 +1282,8 @@ iscsi_tcp_send_linear_data_prepare(struc
+@@ -1267,7 +1282,8 @@
        hdr_spec_len = ntoh24(tcp_conn->out.hdr->dlength);
        WARN_ON(iscsi_padded(len) != iscsi_padded(hdr_spec_len));
  
@@ -292363,7 +292305,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
                tx_hash = &tcp_conn->tx_hash;
  
        iscsi_segment_init_linear(&tcp_conn->out.data_segment,
-@@ -1329,7 +1345,7 @@ iscsi_solicit_data_cont(struct iscsi_con
+@@ -1329,7 +1345,7 @@
   * @task: scsi command task
   * @sc: scsi command
   **/
@@ -292372,7 +292314,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_task_init(struct iscsi_task *task)
  {
        struct iscsi_tcp_task *tcp_task = task->dd_data;
-@@ -1378,6 +1394,7 @@ iscsi_tcp_task_init(struct iscsi_task *t
+@@ -1378,6 +1394,7 @@
        task->imm_count = 0;
        return 0;
  }
@@ -292380,7 +292322,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  /*
   * iscsi_tcp_task_xmit - xmit normal PDU task
-@@ -1387,7 +1404,7 @@ iscsi_tcp_task_init(struct iscsi_task *t
+@@ -1387,7 +1404,7 @@
   * -EAGAIN if there's still data in the queue, or != 0 for any other kind
   * of error.
   */
@@ -292389,7 +292331,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_tcp_task_xmit(struct iscsi_task *task)
  {
        struct iscsi_conn *conn = task->conn;
-@@ -1490,6 +1507,7 @@ fail:
+@@ -1490,6 +1507,7 @@
        iscsi_conn_failure(conn, rc);
        return -EIO;
  }
@@ -292397,7 +292339,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  static struct iscsi_cls_conn *
  iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
-@@ -1685,6 +1703,7 @@ iscsi_tcp_conn_bind(struct iscsi_cls_ses
+@@ -1685,6 +1703,7 @@
  
        iscsi_conn_set_callbacks(conn);
        tcp_conn->sendpage = tcp_conn->sock->ops->sendpage;
@@ -292405,7 +292347,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
        /*
         * set receive state machine into initial state
         */
-@@ -1696,7 +1715,7 @@ free_socket:
+@@ -1696,7 +1715,7 @@
        return err;
  }
  
@@ -292414,7 +292356,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_r2tpool_alloc(struct iscsi_session *session)
  {
        int i;
-@@ -1742,8 +1761,9 @@ r2t_alloc_fail:
+@@ -1742,8 +1761,9 @@
        }
        return -ENOMEM;
  }
@@ -292425,7 +292367,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  iscsi_r2tpool_free(struct iscsi_session *session)
  {
        int i;
-@@ -1756,6 +1776,7 @@ iscsi_r2tpool_free(struct iscsi_session 
+@@ -1756,6 +1776,7 @@
                iscsi_pool_free(&tcp_task->r2tpool);
        }
  }
@@ -292433,7 +292375,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
  static int
  iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param,
-@@ -1904,6 +1925,7 @@ static void iscsi_tcp_session_destroy(st
+@@ -1904,6 +1925,7 @@
        struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
  
        iscsi_r2tpool_free(cls_session->dd_data);
@@ -292441,10 +292383,10 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.c linux-2.6.27.19-5.1/drivers/scs
  
        iscsi_host_remove(shost);
        iscsi_host_free(shost);
-diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.h linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.h
---- linux-2.6.27/drivers/scsi/iscsi_tcp.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/iscsi_tcp.h       2009-03-25 16:11:15.000000000 +0000
-@@ -32,7 +32,9 @@ struct iscsi_segment;
+diff -r 9608d5473017 drivers/scsi/iscsi_tcp.h
+--- a/drivers/scsi/iscsi_tcp.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/iscsi_tcp.h Wed May 06 16:56:33 2009 +0100
+@@ -32,7 +32,9 @@
  typedef int iscsi_segment_done_fn_t(struct iscsi_tcp_conn *,
                                    struct iscsi_segment *);
  
@@ -292454,7 +292396,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.h linux-2.6.27.19-5.1/drivers/scs
        unsigned char           *data;
        unsigned int            size;
        unsigned int            copied;
-@@ -95,6 +97,8 @@ struct iscsi_tcp_conn {
+@@ -95,6 +97,8 @@
  
        int                     error;
  
@@ -292463,7 +292405,7 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.h linux-2.6.27.19-5.1/drivers/scs
        ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int);
  };
  
-@@ -130,4 +134,16 @@ struct iscsi_tcp_task {
+@@ -130,4 +134,16 @@
        struct iscsi_data_task  unsol_dtask;    /* Data-Out header buf */
  };
  
@@ -292480,9 +292422,9 @@ diff -purN linux-2.6.27/drivers/scsi/iscsi_tcp.h linux-2.6.27.19-5.1/drivers/scs
 +void iscsi_r2tpool_free(struct iscsi_session *);
 +
  #endif /* ISCSI_H */
-diff -purN linux-2.6.27/drivers/scsi/libfc/Makefile linux-2.6.27.19-5.1/drivers/scsi/libfc/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/Makefile    2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/Makefile      Wed May 06 16:56:33 2009 +0100
 @@ -0,0 +1,12 @@
 +# $Id: Makefile
 +
@@ -292496,9 +292438,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/Makefile linux-2.6.27.19-5.1/drivers/
 +      fc_lport.o \
 +      fc_rport.o \
 +      fc_fcp.o
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_disc.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_disc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_disc.c   2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_disc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_disc.c     Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,845 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -293345,9 +293287,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_disc.c linux-2.6.27.19-5.1/drivers
 +      return 0;
 +}
 +EXPORT_SYMBOL(fc_disc_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_elsct.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_elsct.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_elsct.c  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_elsct.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_elsct.c    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,71 @@
 +/*
 + * Copyright(c) 2008 Intel Corporation. All rights reserved.
@@ -293420,9 +293362,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_elsct.c linux-2.6.27.19-5.1/driver
 +      return 0;
 +}
 +EXPORT_SYMBOL(fc_elsct_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_exch.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_exch.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_exch.c   2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_exch.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_exch.c     Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,1969 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -295393,9 +295335,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_exch.c linux-2.6.27.19-5.1/drivers
 +{
 +      kmem_cache_destroy(fc_em_cachep);
 +}
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_fcp.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_fcp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_fcp.c    2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_fcp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_fcp.c      Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,2132 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -297529,9 +297471,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_fcp.c linux-2.6.27.19-5.1/drivers/
 +
 +module_init(libfc_init);
 +module_exit(libfc_exit);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_frame.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_frame.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_frame.c  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_frame.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_frame.c    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,89 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -297622,9 +297564,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_frame.c linux-2.6.27.19-5.1/driver
 +      }
 +      return fp;
 +}
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_lport.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_lport.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_lport.c  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_lport.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_lport.c    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,1582 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -299208,9 +299150,9 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_lport.c linux-2.6.27.19-5.1/driver
 +      return 0;
 +}
 +EXPORT_SYMBOL(fc_lport_init);
-diff -purN linux-2.6.27/drivers/scsi/libfc/fc_rport.c linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_rport.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libfc/fc_rport.c  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/libfc/fc_rport.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/libfc/fc_rport.c    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,1313 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -300525,10 +300467,10 @@ diff -purN linux-2.6.27/drivers/scsi/libfc/fc_rport.c linux-2.6.27.19-5.1/driver
 +      lport->tt.exch_mgr_reset(lport, rport->port_id, 0);
 +}
 +EXPORT_SYMBOL(fc_rport_terminate_io);
-diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi/libiscsi.c
---- linux-2.6.27/drivers/scsi/libiscsi.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libiscsi.c        2009-03-25 16:11:17.000000000 +0000
-@@ -218,7 +218,12 @@ static int iscsi_prep_scsi_cmd_pdu(struc
+diff -r 9608d5473017 drivers/scsi/libiscsi.c
+--- a/drivers/scsi/libiscsi.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libiscsi.c  Wed May 06 16:56:34 2009 +0100
+@@ -218,7 +218,12 @@
        hdr->opcode = ISCSI_OP_SCSI_CMD;
        hdr->flags = ISCSI_ATTR_SIMPLE;
        int_to_scsilun(sc->device->lun, (struct scsi_lun *)hdr->lun);
@@ -300542,7 +300484,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        hdr->cmdsn = cpu_to_be32(session->cmdsn);
        session->cmdsn++;
        hdr->exp_statsn = cpu_to_be32(conn->exp_statsn);
-@@ -332,6 +337,9 @@ static void iscsi_complete_command(struc
+@@ -332,6 +337,9 @@
        struct iscsi_session *session = conn->session;
        struct scsi_cmnd *sc = task->sc;
  
@@ -300552,7 +300494,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        list_del_init(&task->running);
        task->state = ISCSI_TASK_COMPLETED;
        task->sc = NULL;
-@@ -368,11 +376,12 @@ void __iscsi_get_task(struct iscsi_task 
+@@ -368,11 +376,12 @@
  }
  EXPORT_SYMBOL_GPL(__iscsi_get_task);
  
@@ -300566,7 +300508,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
  void iscsi_put_task(struct iscsi_task *task)
  {
-@@ -442,7 +451,12 @@ static int iscsi_prep_mgmt_task(struct i
+@@ -442,7 +451,12 @@
         */
        nop->cmdsn = cpu_to_be32(session->cmdsn);
        if (hdr->itt != RESERVED_ITT) {
@@ -300580,7 +300522,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                /*
                 * TODO: We always use immediate, so we never hit this.
                 * If we start to send tmfs or nops as non-immediate then
-@@ -691,7 +705,13 @@ static int iscsi_handle_reject(struct is
+@@ -691,7 +705,13 @@
  
                if (ntoh24(reject->dlength) >= sizeof(struct iscsi_hdr)) {
                        memcpy(&rejected_pdu, data, sizeof(struct iscsi_hdr));
@@ -300595,7 +300537,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                        iscsi_conn_printk(KERN_ERR, conn,
                                          "itt 0x%x had pdu (op 0x%x) rejected "
                                          "due to DataDigest error.\n", itt,
-@@ -711,7 +731,7 @@ static int iscsi_handle_reject(struct is
+@@ -711,7 +731,7 @@
   *
   * The session lock must be held.
   */
@@ -300604,7 +300546,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  {
        struct iscsi_session *session = conn->session;
        uint32_t i;
-@@ -719,12 +739,16 @@ static struct iscsi_task *iscsi_itt_to_t
+@@ -719,12 +739,16 @@
        if (itt == RESERVED_ITT)
                return NULL;
  
@@ -300622,7 +300564,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
  /**
   * __iscsi_complete_pdu - complete pdu
-@@ -750,9 +774,13 @@ int __iscsi_complete_pdu(struct iscsi_co
+@@ -750,9 +774,13 @@
        if (rc)
                return rc;
  
@@ -300639,7 +300581,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                itt = ~0U;
  
        debug_scsi("[op 0x%x cid %d itt 0x%x len %d]\n",
-@@ -899,20 +927,25 @@ EXPORT_SYMBOL_GPL(iscsi_complete_pdu);
+@@ -899,20 +927,25 @@
  int iscsi_verify_itt(struct iscsi_conn *conn, itt_t itt)
  {
        struct iscsi_session *session = conn->session;
@@ -300669,7 +300611,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        if (i >= session->cmds_max) {
                iscsi_conn_printk(KERN_ERR, conn,
                                  "received invalid itt index %u (max cmds "
-@@ -954,6 +987,38 @@ struct iscsi_task *iscsi_itt_to_ctask(st
+@@ -954,6 +987,38 @@
  }
  EXPORT_SYMBOL_GPL(iscsi_itt_to_ctask);
  
@@ -300708,7 +300650,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
  {
        struct iscsi_session *session = conn->session;
-@@ -968,6 +1033,7 @@ void iscsi_conn_failure(struct iscsi_con
+@@ -968,6 +1033,7 @@
        if (conn->stop_stage == 0)
                session->state = ISCSI_STATE_FAILED;
        spin_unlock_irqrestore(&session->lock, flags);
@@ -300716,7 +300658,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
        set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
        iscsi_conn_error(conn->cls_conn, err);
-@@ -1194,15 +1260,13 @@ int iscsi_queuecommand(struct scsi_cmnd 
+@@ -1194,15 +1260,13 @@
                switch (session->state) {
                case ISCSI_STATE_IN_RECOVERY:
                        reason = FAILURE_SESSION_IN_RECOVERY;
@@ -300735,7 +300677,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                        break;
                case ISCSI_STATE_TERMINATE:
                        reason = FAILURE_SESSION_TERMINATE;
-@@ -1267,7 +1331,7 @@ reject:
+@@ -1267,7 +1331,7 @@
        spin_unlock(&session->lock);
        debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason);
        spin_lock(host->host_lock);
@@ -300744,7 +300686,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
  fault:
        spin_unlock(&session->lock);
-@@ -1456,7 +1520,7 @@ static void fail_all_commands(struct isc
+@@ -1456,7 +1520,7 @@
                if (lun == task->sc->device->lun || lun == -1) {
                        debug_scsi("failing in progress sc %p itt 0x%x\n",
                                   task->sc, task->itt);
@@ -300753,7 +300695,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                }
        }
  }
-@@ -1476,12 +1540,12 @@ static void iscsi_start_tx(struct iscsi_
+@@ -1476,12 +1540,12 @@
                scsi_queue_work(conn->session->host, &conn->xmitwork);
  }
  
@@ -300768,7 +300710,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
        cls_session = starget_to_session(scsi_target(scmd->device));
        session = cls_session->dd_data;
-@@ -1494,14 +1558,14 @@ static enum scsi_eh_timer_return iscsi_e
+@@ -1494,14 +1558,14 @@
                 * We are probably in the middle of iscsi recovery so let
                 * that complete and handle the error.
                 */
@@ -300785,7 +300727,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
                goto done;
        }
  
-@@ -1513,20 +1577,21 @@ static enum scsi_eh_timer_return iscsi_e
+@@ -1513,20 +1577,21 @@
         */
        if (time_before_eq(conn->last_recv + (conn->recv_timeout * HZ) +
                            (conn->ping_timeout * HZ), jiffies))
@@ -300811,7 +300753,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        return rc;
  }
  
-@@ -1844,6 +1909,7 @@ void iscsi_pool_free(struct iscsi_pool *
+@@ -1844,6 +1909,7 @@
                kfree(q->pool[i]);
        if (q->pool)
                kfree(q->pool);
@@ -300819,7 +300761,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  }
  EXPORT_SYMBOL_GPL(iscsi_pool_free);
  
-@@ -1860,6 +1926,7 @@ int iscsi_host_add(struct Scsi_Host *sho
+@@ -1860,6 +1926,7 @@
        if (!shost->can_queue)
                shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX;
  
@@ -300827,7 +300769,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        return scsi_add_host(shost, pdev);
  }
  EXPORT_SYMBOL_GPL(iscsi_host_add);
-@@ -1877,11 +1944,11 @@ struct Scsi_Host *iscsi_host_alloc(struc
+@@ -1877,11 +1944,11 @@
                                   int dd_data_size, uint16_t qdepth)
  {
        struct Scsi_Host *shost;
@@ -300840,7 +300782,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
        if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) {
                if (qdepth != 0)
-@@ -1891,22 +1958,43 @@ struct Scsi_Host *iscsi_host_alloc(struc
+@@ -1891,22 +1958,43 @@
                qdepth = ISCSI_DEF_CMD_PER_LUN;
        }
        shost->cmd_per_lun = qdepth;
@@ -300853,12 +300795,12 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        return shost;
  }
  EXPORT_SYMBOL_GPL(iscsi_host_alloc);
++
 +static void iscsi_notify_host_removed(struct iscsi_cls_session *cls_session)
 +{
 +      iscsi_session_failure(cls_session, ISCSI_ERR_INVALID_HOST);
 +}
-+
  /**
   * iscsi_host_remove - remove host and sessions
   * @shost: scsi host
@@ -300889,10 +300831,11 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        scsi_remove_host(shost);
  }
  EXPORT_SYMBOL_GPL(iscsi_host_remove);
-@@ -1922,6 +2010,27 @@ void iscsi_host_free(struct Scsi_Host *s
+@@ -1921,6 +2009,27 @@
+       scsi_host_put(shost);
  }
  EXPORT_SYMBOL_GPL(iscsi_host_free);
++
 +static void iscsi_host_dec_session_cnt(struct Scsi_Host *shost)
 +{
 +      struct iscsi_host *ihost = shost_priv(shost);
@@ -300913,11 +300856,10 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
 +      spin_unlock_irqrestore(&ihost->lock, flags);
 +      scsi_host_put(shost);
 +}
-+
  /**
   * iscsi_session_setup - create iscsi cls session and host and session
-  * @iscsit: iscsi transport template
-@@ -1942,9 +2051,19 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1942,9 +2051,19 @@
                    uint16_t cmds_max, int cmd_task_size,
                    uint32_t initial_cmdsn, unsigned int id)
  {
@@ -300937,7 +300879,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
        if (!total_cmds)
                total_cmds = ISCSI_DEF_XMIT_CMDS_MAX;
-@@ -1957,7 +2076,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1957,7 +2076,7 @@
                printk(KERN_ERR "iscsi: invalid can_queue of %d. can_queue "
                       "must be a power of two that is at least %d.\n",
                       total_cmds, ISCSI_TOTAL_CMDS_MIN);
@@ -300946,7 +300888,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        }
  
        if (total_cmds > ISCSI_TOTAL_CMDS_MAX) {
-@@ -1981,7 +2100,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -1981,7 +2100,7 @@
        cls_session = iscsi_alloc_session(shost, iscsit,
                                          sizeof(struct iscsi_session));
        if (!cls_session)
@@ -300955,7 +300897,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        session = cls_session->dd_data;
        session->cls_session = cls_session;
        session->host = shost;
-@@ -2020,6 +2139,7 @@ iscsi_session_setup(struct iscsi_transpo
+@@ -2020,6 +2139,7 @@
  
        if (iscsi_add_session(cls_session, id))
                goto cls_session_fail;
@@ -300963,7 +300905,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        return cls_session;
  
  cls_session_fail:
-@@ -2028,6 +2148,8 @@ module_get_fail:
+@@ -2028,6 +2148,8 @@
        iscsi_pool_free(&session->cmdpool);
  cmdpool_alloc_fail:
        iscsi_free_session(cls_session);
@@ -300972,7 +300914,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        return NULL;
  }
  EXPORT_SYMBOL_GPL(iscsi_session_setup);
-@@ -2043,6 +2165,7 @@ void iscsi_session_teardown(struct iscsi
+@@ -2043,6 +2165,7 @@
  {
        struct iscsi_session *session = cls_session->dd_data;
        struct module *owner = cls_session->transport->owner;
@@ -300980,7 +300922,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
  
        iscsi_pool_free(&session->cmdpool);
  
-@@ -2055,6 +2178,8 @@ void iscsi_session_teardown(struct iscsi
+@@ -2055,6 +2178,8 @@
        kfree(session->ifacename);
  
        iscsi_destroy_session(cls_session);
@@ -300989,7 +300931,7 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        module_put(owner);
  }
  EXPORT_SYMBOL_GPL(iscsi_session_teardown);
-@@ -2334,8 +2459,10 @@ static void iscsi_start_session_recovery
+@@ -2334,8 +2459,10 @@
         * flush queues.
         */
        spin_lock_bh(&session->lock);
@@ -301002,10 +300944,10 @@ diff -purN linux-2.6.27/drivers/scsi/libiscsi.c linux-2.6.27.19-5.1/drivers/scsi
        flush_control_queues(session, conn);
        spin_unlock_bh(&session->lock);
        mutex_unlock(&session->eh_mutex);
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_ata.c linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_ata.c
---- linux-2.6.27/drivers/scsi/libsas/sas_ata.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_ata.c  2009-03-25 16:11:15.000000000 +0000
-@@ -294,10 +294,10 @@ static void sas_ata_post_internal(struct
+diff -r 9608d5473017 drivers/scsi/libsas/sas_ata.c
+--- a/drivers/scsi/libsas/sas_ata.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_ata.c    Wed May 06 16:56:34 2009 +0100
+@@ -294,10 +294,10 @@
        }
  }
  
@@ -301018,7 +300960,7 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_ata.c linux-2.6.27.19-5.1/driver
  
        SAS_DPRINTK("STUB %s\n", __func__);
        switch (sc_reg_in) {
-@@ -319,10 +319,10 @@ static int sas_ata_scr_write(struct ata_
+@@ -319,10 +319,10 @@
        return 0;
  }
  
@@ -301031,7 +300973,7 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_ata.c linux-2.6.27.19-5.1/driver
  
        SAS_DPRINTK("STUB %s\n", __func__);
        switch (sc_reg_in) {
-@@ -398,7 +398,7 @@ void sas_ata_task_abort(struct sas_task 
+@@ -398,7 +398,7 @@
  
        /* Bounce SCSI-initiated commands to the SCSI EH */
        if (qc->scsicmd) {
@@ -301040,10 +300982,10 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_ata.c linux-2.6.27.19-5.1/driver
                scsi_schedule_eh(qc->scsicmd->device->host);
                return;
        }
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_internal.h linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_internal.h
---- linux-2.6.27/drivers/scsi/libsas/sas_internal.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_internal.h     2009-03-25 16:11:15.000000000 +0000
-@@ -55,7 +55,7 @@ void sas_unregister_phys(struct sas_ha_s
+diff -r 9608d5473017 drivers/scsi/libsas/sas_internal.h
+--- a/drivers/scsi/libsas/sas_internal.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_internal.h       Wed May 06 16:56:34 2009 +0100
+@@ -55,7 +55,7 @@
  int  sas_register_ports(struct sas_ha_struct *sas_ha);
  void sas_unregister_ports(struct sas_ha_struct *sas_ha);
  
@@ -301052,10 +300994,10 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_internal.h linux-2.6.27.19-5.1/d
  
  int  sas_init_queue(struct sas_ha_struct *sas_ha);
  int  sas_init_events(struct sas_ha_struct *sas_ha);
-diff -purN linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_scsi_host.c
---- linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/libsas/sas_scsi_host.c    2009-03-25 16:11:15.000000000 +0000
-@@ -673,43 +673,43 @@ out:
+diff -r 9608d5473017 drivers/scsi/libsas/sas_scsi_host.c
+--- a/drivers/scsi/libsas/sas_scsi_host.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/libsas/sas_scsi_host.c      Wed May 06 16:56:34 2009 +0100
+@@ -673,43 +673,43 @@
        return;
  }
  
@@ -301113,7 +301055,7 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c linux-2.6.27.19-5.1/
  }
  
  int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
-@@ -1039,7 +1039,7 @@ void sas_task_abort(struct sas_task *tas
+@@ -1039,7 +1039,7 @@
                return;
        }
  
@@ -301122,9 +301064,9 @@ diff -purN linux-2.6.27/drivers/scsi/libsas/sas_scsi_host.c linux-2.6.27.19-5.1/
        scsi_schedule_eh(sc->device->host);
  }
  
-diff -purN linux-2.6.27/drivers/scsi/lpfc/Makefile linux-2.6.27.19-5.1/drivers/scsi/lpfc/Makefile
---- linux-2.6.27/drivers/scsi/lpfc/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/Makefile     2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/Makefile
+--- a/drivers/scsi/lpfc/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/Makefile       Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  #/*******************************************************************
  # * This file is part of the Emulex Linux Device Driver for         *
@@ -301134,17 +301076,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/Makefile linux-2.6.27.19-5.1/drivers/s
  # * EMULEX and SLI are trademarks of Emulex.                        *
  # * www.emulex.com                                                  *
  # *                                                                 *
-@@ -28,4 +28,5 @@ obj-$(CONFIG_SCSI_LPFC) := lpfc.o
+@@ -28,4 +28,5 @@
  
  lpfc-objs := lpfc_mem.o lpfc_sli.o lpfc_ct.o lpfc_els.o lpfc_hbadisc.o        \
        lpfc_init.o lpfc_mbox.o lpfc_nportdisc.o lpfc_scsi.o lpfc_attr.o \
 -      lpfc_vport.o lpfc_debugfs.o
 +      lpfc_vport.o lpfc_debugfs.o lpfc_security.o lpfc_auth_access.o \
 +      lpfc_auth.o lpfc_ioctl.o lpfc_menlo.o
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc.h       2009-03-25 16:11:16.000000000 +0000
-@@ -34,7 +34,14 @@ struct lpfc_sli2_slim;
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc.h
+--- a/drivers/scsi/lpfc/lpfc.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc.h Wed May 06 16:56:34 2009 +0100
+@@ -34,7 +34,14 @@
  #define LPFC_IOCB_LIST_CNT    2250    /* list of IOCBs for fast-path usage. */
  #define LPFC_Q_RAMP_UP_INTERVAL 120     /* lun q_depth ramp up interval */
  #define LPFC_VNAME_LEN                100     /* vport symbolic name length */
@@ -301159,7 +301101,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  /*
   * Following time intervals are used of adjusting SCSI device
   * queue depths when there are driver resource error or Firmware
-@@ -49,6 +56,9 @@ struct lpfc_sli2_slim;
+@@ -49,6 +56,9 @@
  #define LPFC_HB_MBOX_INTERVAL   5     /* Heart beat interval in seconds. */
  #define LPFC_HB_MBOX_TIMEOUT    30    /* Heart beat timeout  in seconds. */
  
@@ -301169,20 +301111,20 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  /* Define macros for 64 bit support */
  #define putPaddrLow(addr)    ((uint32_t) (0xffffffff & (u64)(addr)))
  #define putPaddrHigh(addr)   ((uint32_t) (0xffffffff & (((u64)(addr))>>32)))
-@@ -60,6 +70,12 @@ struct lpfc_sli2_slim;
+@@ -59,6 +69,12 @@
+ #define FC_MAX_ADPTMSG                64
  
  #define MAX_HBAEVT    32
++
 +/* Number of MSI-X vectors the driver uses */
 +#define LPFC_MSIX_VECTORS     2
 +
 +/* Active interrupt test threshold */
 +#define LPFC_INTR_THRESHOLD   1
-+
  /* lpfc wait event data ready flag */
  #define LPFC_DATA_READY               (1<<0)
-@@ -204,18 +220,81 @@ struct lpfc_stats {
+@@ -204,17 +220,80 @@
        uint32_t fcpLocalErr;
  };
  
@@ -301222,7 +301164,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +      uint32_t              extoff;
 +      struct lpfc_dmabuf *  txmit_buff;
 +      struct lpfc_dmabuf *  rcv_buff;
-+};
+ };
 +#define MENLO_DID 0x0000FC0E
 +
 +enum sysfs_menlo_state {
@@ -301259,16 +301201,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +      struct lpfc_menlo_genreq64      cx;
 +      pid_t                           pid;
 +      struct list_head                list;
- };
++};
 +
- struct lpfc_hba;
  
+ struct lpfc_hba;
  
-@@ -248,6 +327,57 @@ enum hba_state {
+@@ -246,6 +325,57 @@
+                                      * CLEAR_LA */
+       LPFC_HBA_READY       =  32,
        LPFC_HBA_ERROR       =  -1
- };
++};
++
 +enum auth_state {
 +      LPFC_AUTH_UNKNOWN               =  0,
 +      LPFC_AUTH_SUCCESS               =  1,
@@ -301318,12 +301261,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +      uint32_t dh_pub_key_len;
 +
 +      unsigned long last_auth;
-+};
-+
+ };
  struct lpfc_vport {
-       struct list_head listentry;
-       struct lpfc_hba *phba;
-@@ -341,7 +471,14 @@ struct lpfc_vport {
+@@ -341,7 +471,14 @@
        uint8_t load_flag;
  #define FC_LOADING            0x1     /* HBA in process of loading drvr */
  #define FC_UNLOADING          0x2     /* HBA in process of unloading drvr */
@@ -301339,7 +301280,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        /* Vport Config Parameters */
        uint32_t cfg_scan_down;
-@@ -357,6 +494,8 @@ struct lpfc_vport {
+@@ -357,6 +494,8 @@
        uint32_t cfg_log_verbose;
        uint32_t cfg_max_luns;
        uint32_t cfg_enable_da_id;
@@ -301348,7 +301289,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        uint32_t dev_loss_tmo_changed;
  
-@@ -369,6 +508,8 @@ struct lpfc_vport {
+@@ -369,6 +508,8 @@
        struct lpfc_debugfs_trc *disc_trc;
        atomic_t disc_trc_cnt;
  #endif
@@ -301357,7 +301298,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  };
  
  struct hbq_s {
-@@ -407,10 +548,11 @@ struct lpfc_hba {
+@@ -407,10 +548,11 @@
        struct lpfc_sli sli;
        uint32_t sli_rev;               /* SLI2 or SLI3 */
        uint32_t sli3_options;          /* Mask of enabled SLI3 options */
@@ -301373,18 +301314,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
        uint32_t iocb_cmd_size;
        uint32_t iocb_rsp_size;
  
-@@ -422,10 +564,21 @@ struct lpfc_hba {
+@@ -422,10 +564,21 @@
  #define LS_NPIV_FAB_SUPPORTED 0x2     /* Fabric supports NPIV */
  #define LS_IGNORE_ERATT       0x4     /* intr handler should ignore ERATT */
  
 -      struct lpfc_sli2_slim *slim2p;
--      struct lpfc_dmabuf hbqslimp;
 +      uint32_t hba_flag;      /* hba generic flags */
 +#define HBA_ERATT_HANDLED     0x1 /* This flag is set when eratt handled */
 +
 +      struct lpfc_dmabuf slim2p;
--      dma_addr_t slim2p_mapping;
++
 +      MAILBOX_t *mbox;
 +      uint32_t *mbox_ext;
 +      uint32_t *inb_ha_copy;
@@ -301394,11 +301333,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +      struct _PCB *pcb;
 +      struct _IOCB *IOCBs;
 +
-+      struct lpfc_dmabuf hbqslimp;
+       struct lpfc_dmabuf hbqslimp;
+-
+-      dma_addr_t slim2p_mapping;
  
        uint16_t pci_cfg_value;
  
-@@ -480,6 +633,8 @@ struct lpfc_hba {
+@@ -480,6 +633,8 @@
        uint32_t cfg_hba_queue_depth;
        uint32_t cfg_enable_hba_reset;
        uint32_t cfg_enable_hba_heartbeat;
@@ -301407,7 +301348,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        lpfc_vpd_t vpd;         /* vital product data */
  
-@@ -492,7 +647,7 @@ struct lpfc_hba {
+@@ -492,7 +647,7 @@
  
        wait_queue_head_t    work_waitq;
        struct task_struct   *worker_thread;
@@ -301416,7 +301357,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        uint32_t hbq_in_use;            /* HBQs in use flag */
        struct list_head hbqbuf_in_list;  /* in-fly hbq buffer list */
-@@ -514,6 +669,7 @@ struct lpfc_hba {
+@@ -514,6 +669,7 @@
        void __iomem *HCregaddr;        /* virtual address for host ctl reg */
  
        struct lpfc_hgp __iomem *host_gp; /* Host side get/put pointers */
@@ -301424,7 +301365,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
        uint32_t __iomem  *hbq_put;     /* Address in SLIM to HBQ put ptrs */
        uint32_t          *hbq_get;     /* Host mem address of HBQ get ptrs */
  
-@@ -536,6 +692,7 @@ struct lpfc_hba {
+@@ -536,6 +692,7 @@
        uint8_t soft_wwn_enable;
  
        struct timer_list fcp_poll_timer;
@@ -301432,7 +301373,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        /*
         * stat  counters
-@@ -544,7 +701,9 @@ struct lpfc_hba {
+@@ -544,7 +701,9 @@
        uint64_t fc4OutputRequests;
        uint64_t fc4ControlRequests;
  
@@ -301443,7 +301384,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  
        /* fastpath list. */
        spinlock_t scsi_buf_list_lock;
-@@ -565,12 +724,16 @@ struct lpfc_hba {
+@@ -565,12 +724,16 @@
  
        struct fc_host_statistics link_stats;
        enum intr_type_t intr_type;
@@ -301462,7 +301403,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
        unsigned long *vpi_bmask;       /* vpi allocation table */
  
        /* Data structure used by fabric iocb scheduler */
-@@ -605,6 +768,7 @@ struct lpfc_hba {
+@@ -605,6 +768,7 @@
        unsigned long last_completion_time;
        struct timer_list hb_tmofunc;
        uint8_t hb_outstanding;
@@ -301470,7 +301411,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
        /* ndlp reference management */
        spinlock_t ndlp_lock;
        /*
-@@ -613,7 +777,19 @@ struct lpfc_hba {
+@@ -613,7 +777,19 @@
         */
  #define QUE_BUFTAG_BIT  (1<<31)
        uint32_t buffer_tag_count;
@@ -301491,22 +301432,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
  };
  
  static inline struct Scsi_Host *
-@@ -650,15 +826,25 @@ lpfc_worker_wake_up(struct lpfc_hba *phb
+@@ -650,15 +826,25 @@
        return;
  }
  
 -#define FC_REG_DUMP_EVENT             0x10    /* Register for Dump events */
 -#define FC_REG_TEMPERATURE_EVENT      0x20    /* Register for temperature
 -                                                 event */
--
--struct temp_event {
--      uint32_t event_type;
--      uint32_t event_code;
--      uint32_t data;
--};
--#define LPFC_CRIT_TEMP                0x1
--#define LPFC_THRESHOLD_TEMP   0x2
--#define LPFC_NORMAL_TEMP      0x3
 +static inline void
 +lpfc_sli_read_hs(struct lpfc_hba *phba)
 +{
@@ -301515,7 +301447,15 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +       * the error event and process it.
 +       */
 +      phba->sli.slistat.err_attn_event++;
-+
+-struct temp_event {
+-      uint32_t event_type;
+-      uint32_t event_code;
+-      uint32_t data;
+-};
+-#define LPFC_CRIT_TEMP                0x1
+-#define LPFC_THRESHOLD_TEMP   0x2
+-#define LPFC_NORMAL_TEMP      0x3
 +      /* Save status info */
 +      phba->work_hs = readl(phba->HSregaddr);
 +      phba->work_status[0] = readl(phba->MBslimaddr + 0xa8);
@@ -301529,9 +301469,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc.h linux-2.6.27.19-5.1/drivers/scs
 +      return;
 +}
 +
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_attr.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_attr.c  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_attr.c
+--- a/drivers/scsi/lpfc/lpfc_attr.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_attr.c    Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
@@ -301589,7 +301529,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_jedec_to_ascii(int incr, char hdw[])
  {
-@@ -65,6 +92,14 @@ lpfc_jedec_to_ascii(int incr, char hdw[]
+@@ -65,6 +92,14 @@
        return;
  }
  
@@ -301604,7 +301544,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_drvr_version_show(struct device *dev, struct device_attribute *attr,
                       char *buf)
-@@ -72,6 +107,14 @@ lpfc_drvr_version_show(struct device *de
+@@ -72,6 +107,14 @@
        return snprintf(buf, PAGE_SIZE, LPFC_MODULE_DESC "\n");
  }
  
@@ -301619,7 +301559,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_info_show(struct device *dev, struct device_attribute *attr,
               char *buf)
-@@ -81,6 +124,14 @@ lpfc_info_show(struct device *dev, struc
+@@ -81,6 +124,14 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",lpfc_info(host));
  }
  
@@ -301634,7 +301574,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_serialnum_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -92,6 +143,18 @@ lpfc_serialnum_show(struct device *dev, 
+@@ -92,6 +143,18 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",phba->SerialNumber);
  }
  
@@ -301653,7 +301593,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_temp_sensor_show(struct device *dev, struct device_attribute *attr,
                      char *buf)
-@@ -102,6 +165,14 @@ lpfc_temp_sensor_show(struct device *dev
+@@ -102,6 +165,14 @@
        return snprintf(buf, PAGE_SIZE, "%d\n",phba->temp_sensor_support);
  }
  
@@ -301668,7 +301608,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_modeldesc_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -113,6 +184,14 @@ lpfc_modeldesc_show(struct device *dev, 
+@@ -113,6 +184,14 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",phba->ModelDesc);
  }
  
@@ -301683,7 +301623,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_modelname_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -124,6 +203,14 @@ lpfc_modelname_show(struct device *dev, 
+@@ -124,6 +203,14 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",phba->ModelName);
  }
  
@@ -301698,7 +301638,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_programtype_show(struct device *dev, struct device_attribute *attr,
                      char *buf)
-@@ -135,6 +222,33 @@ lpfc_programtype_show(struct device *dev
+@@ -135,6 +222,33 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",phba->ProgramType);
  }
  
@@ -301732,7 +301672,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_vportnum_show(struct device *dev, struct device_attribute *attr,
                   char *buf)
-@@ -146,6 +260,14 @@ lpfc_vportnum_show(struct device *dev, s
+@@ -146,6 +260,14 @@
        return snprintf(buf, PAGE_SIZE, "%s\n",phba->Port);
  }
  
@@ -301747,7 +301687,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_fwrev_show(struct device *dev, struct device_attribute *attr,
                char *buf)
-@@ -159,6 +281,14 @@ lpfc_fwrev_show(struct device *dev, stru
+@@ -159,6 +281,14 @@
        return snprintf(buf, PAGE_SIZE, "%s, sli-%d\n", fwrev, phba->sli_rev);
  }
  
@@ -301762,7 +301702,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_hdw_show(struct device *dev, struct device_attribute *attr, char *buf)
  {
-@@ -171,6 +301,15 @@ lpfc_hdw_show(struct device *dev, struct
+@@ -171,6 +301,15 @@
        lpfc_jedec_to_ascii(vp->rev.biuRev, hdw);
        return snprintf(buf, PAGE_SIZE, "%s\n", hdw);
  }
@@ -301778,7 +301718,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_option_rom_version_show(struct device *dev, struct device_attribute *attr,
                             char *buf)
-@@ -181,6 +320,18 @@ lpfc_option_rom_version_show(struct devi
+@@ -181,6 +320,18 @@
  
        return snprintf(buf, PAGE_SIZE, "%s\n", phba->OptionROMVersion);
  }
@@ -301797,7 +301737,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_link_state_show(struct device *dev, struct device_attribute *attr,
                     char *buf)
-@@ -232,8 +383,10 @@ lpfc_link_state_show(struct device *dev,
+@@ -232,8 +383,10 @@
                                        "Unknown\n");
                        break;
                }
@@ -301810,7 +301750,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                        if (vport->fc_flag & FC_PUBLIC_LOOP)
                                len += snprintf(buf + len, PAGE_SIZE-len,
                                                "   Public Loop\n");
-@@ -253,6 +406,18 @@ lpfc_link_state_show(struct device *dev,
+@@ -253,6 +406,18 @@
        return len;
  }
  
@@ -301829,7 +301769,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_num_discovered_ports_show(struct device *dev,
                               struct device_attribute *attr, char *buf)
-@@ -264,7 +429,20 @@ lpfc_num_discovered_ports_show(struct de
+@@ -264,7 +429,20 @@
                        vport->fc_map_cnt + vport->fc_unmap_cnt);
  }
  
@@ -301851,7 +301791,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_issue_lip(struct Scsi_Host *shost)
  {
-@@ -306,6 +484,21 @@ lpfc_issue_lip(struct Scsi_Host *shost)
+@@ -306,6 +484,21 @@
        return 0;
  }
  
@@ -301873,7 +301813,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
  {
-@@ -353,7 +546,23 @@ lpfc_do_offline(struct lpfc_hba *phba, u
+@@ -353,7 +546,23 @@
        return 0;
  }
  
@@ -301898,7 +301838,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  lpfc_selective_reset(struct lpfc_hba *phba)
  {
        struct completion online_compl;
-@@ -378,6 +587,27 @@ lpfc_selective_reset(struct lpfc_hba *ph
+@@ -378,6 +587,27 @@
        return 0;
  }
  
@@ -301926,7 +301866,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_issue_reset(struct device *dev, struct device_attribute *attr,
                 const char *buf, size_t count)
-@@ -397,6 +627,14 @@ lpfc_issue_reset(struct device *dev, str
+@@ -397,6 +627,14 @@
                return status;
  }
  
@@ -301941,7 +301881,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_nport_evt_cnt_show(struct device *dev, struct device_attribute *attr,
                        char *buf)
-@@ -408,6 +646,14 @@ lpfc_nport_evt_cnt_show(struct device *d
+@@ -408,6 +646,14 @@
        return snprintf(buf, PAGE_SIZE, "%d\n", phba->nport_event_cnt);
  }
  
@@ -301956,7 +301896,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_board_mode_show(struct device *dev, struct device_attribute *attr,
                     char *buf)
-@@ -429,6 +675,19 @@ lpfc_board_mode_show(struct device *dev,
+@@ -429,6 +675,19 @@
        return snprintf(buf, PAGE_SIZE, "%s\n", state);
  }
  
@@ -301976,7 +301916,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_board_mode_store(struct device *dev, struct device_attribute *attr,
                      const char *buf, size_t count)
-@@ -462,6 +721,24 @@ lpfc_board_mode_store(struct device *dev
+@@ -462,6 +721,24 @@
                return -EIO;
  }
  
@@ -302001,7 +301941,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_get_hba_info(struct lpfc_hba *phba,
                  uint32_t *mxri, uint32_t *axri,
-@@ -524,6 +801,20 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
+@@ -524,6 +801,20 @@
        return 1;
  }
  
@@ -302022,7 +301962,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_max_rpi_show(struct device *dev, struct device_attribute *attr,
                  char *buf)
-@@ -538,6 +829,20 @@ lpfc_max_rpi_show(struct device *dev, st
+@@ -538,6 +829,20 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302043,7 +301983,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_used_rpi_show(struct device *dev, struct device_attribute *attr,
                   char *buf)
-@@ -552,6 +857,20 @@ lpfc_used_rpi_show(struct device *dev, s
+@@ -552,6 +857,20 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302064,7 +302004,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_max_xri_show(struct device *dev, struct device_attribute *attr,
                  char *buf)
-@@ -566,6 +885,20 @@ lpfc_max_xri_show(struct device *dev, st
+@@ -566,6 +885,20 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302085,7 +302025,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_used_xri_show(struct device *dev, struct device_attribute *attr,
                   char *buf)
-@@ -580,6 +913,20 @@ lpfc_used_xri_show(struct device *dev, s
+@@ -580,6 +913,20 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302106,7 +302046,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_max_vpi_show(struct device *dev, struct device_attribute *attr,
                  char *buf)
-@@ -594,6 +941,20 @@ lpfc_max_vpi_show(struct device *dev, st
+@@ -594,6 +941,20 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302127,7 +302067,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_used_vpi_show(struct device *dev, struct device_attribute *attr,
                   char *buf)
-@@ -608,6 +969,19 @@ lpfc_used_vpi_show(struct device *dev, s
+@@ -608,6 +969,19 @@
        return snprintf(buf, PAGE_SIZE, "Unknown\n");
  }
  
@@ -302147,7 +302087,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_npiv_info_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -623,6 +997,17 @@ lpfc_npiv_info_show(struct device *dev, 
+@@ -623,6 +997,17 @@
        return snprintf(buf, PAGE_SIZE, "NPIV Virtual (VPI %d)\n", vport->vpi);
  }
  
@@ -302165,7 +302105,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_poll_show(struct device *dev, struct device_attribute *attr,
               char *buf)
-@@ -634,6 +1019,20 @@ lpfc_poll_show(struct device *dev, struc
+@@ -634,6 +1019,20 @@
        return snprintf(buf, PAGE_SIZE, "%#x\n", phba->cfg_poll);
  }
  
@@ -302186,7 +302126,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_poll_store(struct device *dev, struct device_attribute *attr,
                const char *buf, size_t count)
-@@ -692,6 +1091,166 @@ lpfc_poll_store(struct device *dev, stru
+@@ -692,6 +1091,166 @@
        return strlen(buf);
  }
  
@@ -302353,7 +302293,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_param_show(attr) \
  static ssize_t \
  lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -706,6 +1265,20 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -706,6 +1265,20 @@
                        phba->cfg_##attr);\
  }
  
@@ -302374,7 +302314,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_param_hex_show(attr)     \
  static ssize_t \
  lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -720,6 +1293,25 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -720,6 +1293,25 @@
                        phba->cfg_##attr);\
  }
  
@@ -302400,7 +302340,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_param_init(attr, default, minval, maxval)        \
  static int \
  lpfc_##attr##_init(struct lpfc_hba *phba, int val) \
-@@ -735,6 +1327,26 @@ lpfc_##attr##_init(struct lpfc_hba *phba
+@@ -735,6 +1327,26 @@
        return -EINVAL;\
  }
  
@@ -302427,7 +302367,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_param_set(attr, default, minval, maxval) \
  static int \
  lpfc_##attr##_set(struct lpfc_hba *phba, int val) \
-@@ -749,6 +1361,27 @@ lpfc_##attr##_set(struct lpfc_hba *phba,
+@@ -749,6 +1361,27 @@
        return -EINVAL;\
  }
  
@@ -302455,7 +302395,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_param_store(attr)        \
  static ssize_t \
  lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
-@@ -768,6 +1401,20 @@ lpfc_##attr##_store(struct device *dev, 
+@@ -768,6 +1401,20 @@
                return -EINVAL;\
  }
  
@@ -302476,7 +302416,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_vport_param_show(attr)   \
  static ssize_t \
  lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -780,6 +1427,21 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -780,6 +1427,21 @@
        return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\
  }
  
@@ -302498,7 +302438,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_vport_param_hex_show(attr)       \
  static ssize_t \
  lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
-@@ -792,6 +1454,24 @@ lpfc_##attr##_show(struct device *dev, s
+@@ -792,6 +1454,24 @@
        return snprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\
  }
  
@@ -302523,7 +302463,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_vport_param_init(attr, default, minval, maxval)  \
  static int \
  lpfc_##attr##_init(struct lpfc_vport *vport, int val) \
-@@ -801,12 +1481,29 @@ lpfc_##attr##_init(struct lpfc_vport *vp
+@@ -801,12 +1481,29 @@
                return 0;\
        }\
        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
@@ -302554,7 +302494,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_vport_param_set(attr, default, minval, maxval)   \
  static int \
  lpfc_##attr##_set(struct lpfc_vport *vport, int val) \
-@@ -816,11 +1513,28 @@ lpfc_##attr##_set(struct lpfc_vport *vpo
+@@ -816,11 +1513,28 @@
                return 0;\
        }\
        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \
@@ -302584,7 +302524,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_vport_param_store(attr)  \
  static ssize_t \
  lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
-@@ -941,6 +1655,7 @@ static DEVICE_ATTR(option_rom_version, S
+@@ -941,6 +1655,7 @@
                   lpfc_option_rom_version_show, NULL);
  static DEVICE_ATTR(num_discovered_ports, S_IRUGO,
                   lpfc_num_discovered_ports_show, NULL);
@@ -302592,10 +302532,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL);
  static DEVICE_ATTR(lpfc_drvr_version, S_IRUGO, lpfc_drvr_version_show, NULL);
  static DEVICE_ATTR(board_mode, S_IRUGO | S_IWUSR,
-@@ -954,10 +1669,66 @@ static DEVICE_ATTR(max_xri, S_IRUGO, lpf
+@@ -954,10 +1669,66 @@
  static DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
  static DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
  static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
+-
 +static DEVICE_ATTR(auth_state, S_IRUGO, lpfc_auth_state_show, NULL);
 +static DEVICE_ATTR(auth_dir, S_IRUGO, lpfc_auth_dir_show, NULL);
 +static DEVICE_ATTR(auth_protocol, S_IRUGO, lpfc_auth_protocol_show, NULL);
@@ -302639,7 +302580,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                      j = 0;
 +              }
 +      }
++
 +      return 0;
 +}
  
@@ -302659,7 +302600,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_soft_wwn_enable_store(struct device *dev, struct device_attribute *attr,
                           const char *buf, size_t count)
-@@ -994,6 +1765,14 @@ lpfc_soft_wwn_enable_store(struct device
+@@ -994,6 +1765,14 @@
  static DEVICE_ATTR(lpfc_soft_wwn_enable, S_IWUSR, NULL,
                   lpfc_soft_wwn_enable_store);
  
@@ -302674,7 +302615,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_soft_wwpn_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -1006,7 +1785,19 @@ lpfc_soft_wwpn_show(struct device *dev, 
+@@ -1006,7 +1785,19 @@
                        (unsigned long long)phba->cfg_soft_wwpn);
  }
  
@@ -302695,7 +302636,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,
                     const char *buf, size_t count)
-@@ -1080,6 +1871,14 @@ lpfc_soft_wwpn_store(struct device *dev,
+@@ -1080,6 +1871,14 @@
  static DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\
                   lpfc_soft_wwpn_show, lpfc_soft_wwpn_store);
  
@@ -302710,7 +302651,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_soft_wwnn_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -1090,7 +1889,16 @@ lpfc_soft_wwnn_show(struct device *dev, 
+@@ -1090,7 +1889,16 @@
                        (unsigned long long)phba->cfg_soft_wwnn);
  }
  
@@ -302728,7 +302669,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_soft_wwnn_store(struct device *dev, struct device_attribute *attr,
                     const char *buf, size_t count)
-@@ -1178,6 +1986,15 @@ module_param(lpfc_nodev_tmo, int, 0);
+@@ -1178,6 +1986,15 @@
  MODULE_PARM_DESC(lpfc_nodev_tmo,
                 "Seconds driver will hold I/O waiting "
                 "for a device to come back");
@@ -302744,7 +302685,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  lpfc_nodev_tmo_show(struct device *dev, struct device_attribute *attr,
                    char *buf)
-@@ -1189,6 +2006,21 @@ lpfc_nodev_tmo_show(struct device *dev, 
+@@ -1189,6 +2006,21 @@
        return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_devloss_tmo);
  }
  
@@ -302766,7 +302707,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val)
  {
-@@ -1196,7 +2028,7 @@ lpfc_nodev_tmo_init(struct lpfc_vport *v
+@@ -1196,7 +2028,7 @@
                vport->cfg_nodev_tmo = vport->cfg_devloss_tmo;
                if (val != LPFC_DEF_DEVLOSS_TMO)
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -302775,7 +302716,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                                         "parameter because devloss_tmo is "
                                         "set.\n");
                return 0;
-@@ -1215,6 +2047,13 @@ lpfc_nodev_tmo_init(struct lpfc_vport *v
+@@ -1215,6 +2047,13 @@
        return -EINVAL;
  }
  
@@ -302789,7 +302730,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
  {
-@@ -1229,6 +2068,21 @@ lpfc_update_rport_devloss_tmo(struct lpf
+@@ -1229,6 +2068,21 @@
        spin_unlock_irq(shost->host_lock);
  }
  
@@ -302811,7 +302752,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_nodev_tmo_set(struct lpfc_vport *vport, int val)
  {
-@@ -1256,6 +2110,87 @@ lpfc_vport_param_store(nodev_tmo)
+@@ -1256,6 +2110,87 @@
  
  static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR,
                   lpfc_nodev_tmo_show, lpfc_nodev_tmo_store);
@@ -302899,7 +302840,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
  /*
  # lpfc_devloss_tmo: If set, it will hold all I/O errors on devices that
-@@ -1269,6 +2204,21 @@ MODULE_PARM_DESC(lpfc_devloss_tmo,
+@@ -1269,6 +2204,21 @@
  lpfc_vport_param_init(devloss_tmo, LPFC_DEF_DEVLOSS_TMO,
                      LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO)
  lpfc_vport_param_show(devloss_tmo)
@@ -302921,7 +302862,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_devloss_tmo_set(struct lpfc_vport *vport, int val)
  {
-@@ -1327,6 +2277,16 @@ LPFC_VPORT_ATTR_R(lun_queue_depth, 30, 1
+@@ -1327,6 +2277,16 @@
                  "Max number of FCP commands we can queue to a specific LUN");
  
  /*
@@ -302938,7 +302879,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  # hba_queue_depth:  This parameter is used to limit the number of outstanding
  # commands per lpfc HBA. Value range is [32,8192]. If this parameter
  # value is greater than the maximum number of exchanges supported by the HBA,
-@@ -1366,12 +2326,27 @@ MODULE_PARM_DESC(lpfc_restrict_login,
+@@ -1366,12 +2326,27 @@
                 "Restrict virtual ports login to remote initiators.");
  lpfc_vport_param_show(restrict_login);
  
@@ -302967,7 +302908,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                                 "be set to %d, allowed range is [0, 1]\n",
                                 val);
                vport->cfg_restrict_login = 1;
-@@ -1385,12 +2360,28 @@ lpfc_restrict_login_init(struct lpfc_vpo
+@@ -1385,12 +2360,28 @@
        return 0;
  }
  
@@ -302997,12 +302938,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                                 "be set to %d, allowed range is [0, 1]\n",
                                 val);
                vport->cfg_restrict_login = 1;
-@@ -1441,18 +2432,58 @@ LPFC_VPORT_ATTR_R(scan_down, 1, 0, 1,
+@@ -1441,18 +2432,58 @@
  # Set loop mode if you want to run as an NL_Port. Value range is [0,0x6].
  # Default value is 0.
  */
 -static int
 -lpfc_topology_set(struct lpfc_hba *phba, int val)
+-{
 +
 +/**
 + * lpfc_topology_set: Set the adapters topology field.
@@ -303023,7 +302965,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +static ssize_t
 +lpfc_topology_store(struct device *dev, struct device_attribute *attr,
 +                      const char *buf, size_t count)
- {
++{
 +      struct Scsi_Host  *shost = class_to_shost(dev);
 +      struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
 +      struct lpfc_hba   *phba = vport->phba;
@@ -303060,26 +303002,14 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        }
        lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                "%d:0467 lpfc_topology attribute cannot be set to %d, "
-@@ -1465,109 +2496,535 @@ module_param(lpfc_topology, int, 0);
+@@ -1465,9 +2496,337 @@
  MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology");
  lpfc_param_show(topology)
  lpfc_param_init(topology, 0, 0, 6)
 -lpfc_param_store(topology)
  static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR,
                lpfc_topology_show, lpfc_topology_store);
--/*
--# lpfc_link_speed: Link speed selection for initializing the Fibre Channel
--# connection.
--#       0  = auto select (default)
--#       1  = 1 Gigabaud
--#       2  = 2 Gigabaud
--#       4  = 4 Gigabaud
--#       8  = 8 Gigabaud
--# Value range is [0,8]. Default value is 0.
--*/
--static int
--lpfc_link_speed_set(struct lpfc_hba *phba, int val)
++
 +
 +/**
 + * lpfc_stat_data_ctrl_store: write call back for lpfc_stat_data_ctrl
@@ -303104,9 +303034,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +static ssize_t
 +lpfc_stat_data_ctrl_store(struct device *dev, struct device_attribute *attr,
 +                        const char *buf, size_t count)
- {
--      int err;
--      uint32_t prev_val;
++{
 +      struct Scsi_Host  *shost = class_to_shost(dev);
 +      struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
 +      struct lpfc_hba   *phba = vport->phba;
@@ -303118,106 +303046,46 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +      struct Scsi_Host *v_shost;
 +      char *bucket_type_str, *base_str, *step_str;
 +      unsigned long base, step, bucket_type;
--      if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
--              ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
--              ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) ||
--              ((val == LINK_SPEED_8G) && !(phba->lmt & LMT_8Gb)) ||
--              ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
--              return -EINVAL;
++
 +      if (!strncmp(buf, "setbucket", strlen("setbucket"))) {
 +              if (strlen(buf) > LPFC_MAX_DATA_CTRL_LEN)
 +                      return -EINVAL;
--      if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
--              && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
--              prev_val = phba->cfg_link_speed;
--              phba->cfg_link_speed = val;
--              err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
--              if (err)
--                      phba->cfg_link_speed = prev_val;
--              return err;
--      }
++
 +              strcpy(bucket_data, buf);
 +              str_ptr = &bucket_data[0];
 +              /* Ignore this token - this is command token */
 +              token = strsep(&str_ptr, "\t ");
 +              if (!token)
 +                      return -EINVAL;
--      lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
--              "%d:0469 lpfc_link_speed attribute cannot be set to %d, "
--              "allowed range is [0, 8]\n",
--              phba->brd_no, val);
--      return -EINVAL;
--}
++
 +              bucket_type_str = strsep(&str_ptr, "\t ");
 +              if (!bucket_type_str)
 +                      return -EINVAL;
--static int lpfc_link_speed = 0;
--module_param(lpfc_link_speed, int, 0);
--MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
--lpfc_param_show(link_speed)
--static int
--lpfc_link_speed_init(struct lpfc_hba *phba, int val)
--{
--      if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
--              && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
--              phba->cfg_link_speed = val;
--              return 0;
--      }
--      lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
--                      "0454 lpfc_link_speed attribute cannot "
--                      "be set to %d, allowed values are "
--                      "["LPFC_LINK_SPEED_STRING"]\n", val);
--      phba->cfg_link_speed = 0;
--      return -EINVAL;
--}
++
 +              if (!strncmp(bucket_type_str, "linear", strlen("linear")))
 +                      bucket_type = LPFC_LINEAR_BUCKET;
 +              else if (!strncmp(bucket_type_str, "power2", strlen("power2")))
 +                      bucket_type = LPFC_POWER2_BUCKET;
 +              else
 +                      return -EINVAL;
--lpfc_param_store(link_speed)
--static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
--              lpfc_link_speed_show, lpfc_link_speed_store);
++
 +              base_str = strsep(&str_ptr, "\t ");
 +              if (!base_str)
 +                      return -EINVAL;
 +              base = simple_strtoul(base_str, NULL, 0);
--/*
--# lpfc_fcp_class:  Determines FC class to use for the FCP protocol.
--# Value range is [2,3]. Default value is 3.
--*/
--LPFC_VPORT_ATTR_R(fcp_class, 3, 2, 3,
--                "Select Fibre Channel class of service for FCP sequences");
++
 +              step_str = strsep(&str_ptr, "\t ");
 +              if (!step_str)
 +                      return -EINVAL;
 +              step = simple_strtoul(step_str, NULL, 0);
 +              if (!step)
 +                      return -EINVAL;
--/*
--# lpfc_use_adisc: Use ADISC for FCP rediscovery instead of PLOGI. Value range
--# is [0,1]. Default value is 0.
--*/
--LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
--                 "Use ADISC on rediscovery to authenticate FCP devices");
++
 +              /* Block the data collection for every vport */
 +              vports = lpfc_create_vport_work_array(phba);
 +              if (vports == NULL)
 +                      return -ENOMEM;
--/*
--# lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
--# range is [0,1]. Default value is 0.
--*/
--LPFC_ATTR_R(ack0, 0, 0, 1, "Enable ACK0 support");
++
 +              for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
 +                      v_shost = lpfc_shost_from_vport(vports[i]);
 +                      spin_lock_irq(v_shost->host_lock);
@@ -303227,16 +303095,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                              lpfc_vport_reset_stat_data(vports[i]);
 +                      spin_unlock_irq(v_shost->host_lock);
 +              }
--/*
--# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing
--# cr_delay (msec) or cr_count outstanding commands. cr_delay can take
--# value [0,63]. cr_count can take value [1,255]. Default value of cr_delay
--# is 0. Default value of cr_count is 1. The cr_count feature is disabled if
--# cr_delay is set to 0.
--*/
--LPFC_ATTR_RW(cr_delay, 0, 0, 63, "A count of milliseconds after which an "
--              "interrupt response is generated");
++
 +              /* Set the bucket attributes */
 +              phba->bucket_type = bucket_type;
 +              phba->bucket_base = base;
@@ -303253,16 +303112,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +              lpfc_destroy_vport_work_array(phba, vports);
 +              return strlen(buf);
 +      }
--LPFC_ATTR_RW(cr_count, 1, 1, 255, "A count of I/O completions after which an "
--              "interrupt response is generated");
++
 +      if (!strncmp(buf, "destroybucket", strlen("destroybucket"))) {
 +              vports = lpfc_create_vport_work_array(phba);
 +              if (vports == NULL)
 +                      return -ENOMEM;
--/*
--# lpfc_multi_ring_support:  Determines how many rings to spread available
++
 +              for (i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
 +                      v_shost = lpfc_shost_from_vport(vports[i]);
 +                      spin_lock_irq(shost->host_lock);
@@ -303483,17 +303338,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +      .read = sysfs_drvr_stat_data_read,
 +      .write = NULL,
 +};
-+
-+/*
-+# lpfc_link_speed: Link speed selection for initializing the Fibre Channel
-+# connection.
-+#       0  = auto select (default)
-+#       1  = 1 Gigabaud
-+#       2  = 2 Gigabaud
-+#       4  = 4 Gigabaud
-+#       8  = 8 Gigabaud
-+# Value range is [0,8]. Default value is 0.
-+*/
+ /*
+ # lpfc_link_speed: Link speed selection for initializing the Fibre Channel
+@@ -1479,11 +2838,46 @@
+ #       8  = 8 Gigabaud
+ # Value range is [0,8]. Default value is 0.
+ */
+-static int
+-lpfc_link_speed_set(struct lpfc_hba *phba, int val)
+-{
 +
 +/**
 + * lpfc_link_speed_set: Set the adapters link speed.
@@ -303522,8 +303376,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +      int val = 0;
 +      int nolip = 0;
 +      const char *val_buf = buf;
-+      int err;
-+      uint32_t prev_val;
+       int err;
+       uint32_t prev_val;
 +
 +      if (!strncmp(buf, "nolip ", strlen("nolip "))) {
 +              nolip = 1;
@@ -303534,40 +303388,36 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +              return -EINVAL;
 +      if (sscanf(val_buf, "%i", &val) != 1)
 +              return -EINVAL;
-+
-+      if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
-+              ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
-+              ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) ||
-+              ((val == LINK_SPEED_8G) && !(phba->lmt & LMT_8Gb)) ||
-+              ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
-+              return -EINVAL;
-+
+       if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
+               ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
+@@ -1492,14 +2886,19 @@
+               ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
+               return -EINVAL;
+-      if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
 +      if ((val >= 0 && val <= 8)
-+              && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-+              prev_val = phba->cfg_link_speed;
-+              phba->cfg_link_speed = val;
+               && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
+               prev_val = phba->cfg_link_speed;
+               phba->cfg_link_speed = val;
 +              if (nolip)
 +                      return strlen(buf);
 +
-+              err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
+               err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
+-              if (err)
 +              if (err) {
-+                      phba->cfg_link_speed = prev_val;
+                       phba->cfg_link_speed = prev_val;
+-              return err;
 +                      return -EINVAL;
 +              } else
 +                      return strlen(buf);
-+      }
-+
-+      lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-+              "%d:0469 lpfc_link_speed attribute cannot be set to %d, "
-+              "allowed range is [0, 8]\n",
-+              phba->brd_no, val);
-+      return -EINVAL;
-+}
-+
-+static int lpfc_link_speed = 0;
-+module_param(lpfc_link_speed, int, 0);
-+MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
-+lpfc_param_show(link_speed)
+       }
+       lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+@@ -1513,6 +2912,23 @@
+ module_param(lpfc_link_speed, int, 0);
+ MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
+ lpfc_param_show(link_speed)
 +
 +/**
 + * lpfc_link_speed_init: Set the adapters link speed.
@@ -303585,38 +303435,29 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 + * zero if val saved.
 + * -EINVAL val out of range
 + **/
-+static int
-+lpfc_link_speed_init(struct lpfc_hba *phba, int val)
-+{
-+      if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED)
-+              && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
-+              phba->cfg_link_speed = val;
-+              return 0;
-+      }
-+      lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+ static int
+ lpfc_link_speed_init(struct lpfc_hba *phba, int val)
+ {
+@@ -1522,14 +2938,13 @@
+               return 0;
+       }
+       lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
+-                      "0454 lpfc_link_speed attribute cannot "
 +                      "0405 lpfc_link_speed attribute cannot "
-+                      "be set to %d, allowed values are "
-+                      "["LPFC_LINK_SPEED_STRING"]\n", val);
-+      phba->cfg_link_speed = 0;
-+      return -EINVAL;
-+}
-+
-+static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
-+              lpfc_link_speed_show, lpfc_link_speed_store);
-+
-+/*
-+# lpfc_fcp_class:  Determines FC class to use for the FCP protocol.
-+# Value range is [2,3]. Default value is 3.
-+*/
-+LPFC_VPORT_ATTR_R(fcp_class, 3, 2, 3,
-+                "Select Fibre Channel class of service for FCP sequences");
-+
-+/*
-+# lpfc_use_adisc: Use ADISC for FCP rediscovery instead of PLOGI. Value range
-+# is [0,1]. Default value is 0.
-+*/
-+LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
-+                 "Use ADISC on rediscovery to authenticate FCP devices");
+                       "be set to %d, allowed values are "
+                       "["LPFC_LINK_SPEED_STRING"]\n", val);
+       phba->cfg_link_speed = 0;
+       return -EINVAL;
+ }
+-lpfc_param_store(link_speed)
+ static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
+               lpfc_link_speed_show, lpfc_link_speed_store);
+@@ -1546,6 +2961,48 @@
+ */
+ LPFC_VPORT_ATTR_RW(use_adisc, 0, 0, 1,
+                  "Use ADISC on rediscovery to authenticate FCP devices");
 +
 +/*
 +# lpfc_max_scsicmpl_time: Use scsi command completion time to control I/O queue
@@ -303659,32 +303500,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +static DEVICE_ATTR(lpfc_max_scsicmpl_time, S_IRUGO | S_IWUSR,
 +                 lpfc_max_scsicmpl_time_show,
 +                 lpfc_max_scsicmpl_time_store);
-+
-+/*
-+# lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
-+# range is [0,1]. Default value is 0.
-+*/
-+LPFC_ATTR_R(ack0, 0, 0, 1, "Enable ACK0 support");
-+
-+/*
-+# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing
-+# cr_delay (msec) or cr_count outstanding commands. cr_delay can take
-+# value [0,63]. cr_count can take value [1,255]. Default value of cr_delay
-+# is 0. Default value of cr_count is 1. The cr_count feature is disabled if
-+# cr_delay is set to 0.
-+*/
-+LPFC_ATTR_RW(cr_delay, 0, 0, 63, "A count of milliseconds after which an "
-+              "interrupt response is generated");
-+
-+LPFC_ATTR_RW(cr_count, 1, 1, 255, "A count of I/O completions after which an "
-+              "interrupt response is generated");
-+
-+/*
-+# lpfc_multi_ring_support:  Determines how many rings to spread available
- # cmd/rsp IOCB entries across.
- # Value range is [1,2]. Default value is 1.
- */
-@@ -1625,13 +3082,55 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
+ /*
+ # lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement. Value
+@@ -1625,11 +3082,53 @@
  #             support this feature
  #       0  = MSI disabled (default)
  #       1  = MSI enabled
@@ -303694,8 +303513,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  */
  LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
            "MSI-X (2), if possible");
- /*
++
++/*
 +# lpfc_enable_auth: controls FC Authentication.
 +#       0 = Authentication OFF
 +#       1 = Authentication ON
@@ -303736,12 +303555,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +lpfc_vport_param_store(enable_auth);
 +static DEVICE_ATTR(lpfc_enable_auth, S_IRUGO | S_IWUSR,
 +                 lpfc_enable_auth_show, lpfc_enable_auth_store);
-+
-+/*
+ /*
  # lpfc_enable_hba_reset: Allow or prevent HBA resets to the hardware.
- #       0  = HBA resets disabled
- #       1  = HBA resets enabled (default)
-@@ -1655,6 +3154,27 @@ LPFC_ATTR_R(enable_hba_heartbeat, 1, 0, 
+@@ -1655,6 +3154,27 @@
   */
  LPFC_ATTR_R(sg_seg_cnt, LPFC_DEFAULT_SG_SEG_CNT, LPFC_DEFAULT_SG_SEG_CNT,
            LPFC_MAX_SG_SEG_CNT, "Max Scatter Gather Segment Count");
@@ -303769,7 +303586,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
  struct device_attribute *lpfc_hba_attrs[] = {
        &dev_attr_info,
-@@ -1668,6 +3188,7 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1668,6 +3188,7 @@
        &dev_attr_option_rom_version,
        &dev_attr_link_state,
        &dev_attr_num_discovered_ports,
@@ -303777,7 +303594,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        &dev_attr_lpfc_drvr_version,
        &dev_attr_lpfc_temp_sensor,
        &dev_attr_lpfc_log_verbose,
-@@ -1690,6 +3211,7 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1690,6 +3211,7 @@
        &dev_attr_lpfc_fdmi_on,
        &dev_attr_lpfc_max_luns,
        &dev_attr_lpfc_enable_npiv,
@@ -303785,7 +303602,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        &dev_attr_nport_evt_cnt,
        &dev_attr_board_mode,
        &dev_attr_max_vpi,
-@@ -1703,12 +3225,26 @@ struct device_attribute *lpfc_hba_attrs[
+@@ -1703,12 +3225,26 @@
        &dev_attr_lpfc_poll,
        &dev_attr_lpfc_poll_tmo,
        &dev_attr_lpfc_use_msi,
@@ -303812,7 +303629,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        NULL,
  };
  
-@@ -1731,9 +3267,37 @@ struct device_attribute *lpfc_vport_attr
+@@ -1731,9 +3267,37 @@
        &dev_attr_nport_evt_cnt,
        &dev_attr_npiv_info,
        &dev_attr_lpfc_enable_da_id,
@@ -303850,15 +303667,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  sysfs_ctlreg_write(struct kobject *kobj, struct bin_attribute *bin_attr,
                   char *buf, loff_t off, size_t count)
-@@ -1744,21 +3308,23 @@ sysfs_ctlreg_write(struct kobject *kobj,
+@@ -1744,21 +3308,23 @@
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
        struct lpfc_hba   *phba = vport->phba;
  
 -      if ((off + count) > FF_REG_AREA_SIZE)
-+      if ((off + count) > FF_REG_AREA_SIZE + LPFC_REG_WRITE_KEY_SIZE)
-               return -ERANGE;
+-              return -ERANGE;
+-
 -      if (count == 0) return 0;
++      if ((off + count) > FF_REG_AREA_SIZE + LPFC_REG_WRITE_KEY_SIZE)
++              return -ERANGE;
++
 +      if (count <= LPFC_REG_WRITE_KEY_SIZE)
 +              return 0;
  
@@ -303868,20 +303687,22 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 -      if (!(vport->fc_flag & FC_OFFLINE_MODE)) {
 -              return -EPERM;
 -      }
+-
+-      spin_lock_irq(&phba->hbalock);
+-      for (buf_off = 0; buf_off < count; buf_off += sizeof(uint32_t))
+-              writel(*((uint32_t *)(buf + buf_off)),
 +      /* This is to protect HBA registers from accidental writes. */
 +      if (memcmp(buf, LPFC_REG_WRITE_KEY, LPFC_REG_WRITE_KEY_SIZE))
 +              return -EINVAL;
-       spin_lock_irq(&phba->hbalock);
--      for (buf_off = 0; buf_off < count; buf_off += sizeof(uint32_t))
--              writel(*((uint32_t *)(buf + buf_off)),
++
++      spin_lock_irq(&phba->hbalock);
 +      for (buf_off = 0; buf_off < count - LPFC_REG_WRITE_KEY_SIZE;
 +                      buf_off += sizeof(uint32_t))
 +              writel(*((uint32_t *)(buf + buf_off + LPFC_REG_WRITE_KEY_SIZE)),
                       phba->ctrl_regs_memmap_p + off + buf_off);
  
        spin_unlock_irq(&phba->hbalock);
-@@ -1766,6 +3332,23 @@ sysfs_ctlreg_write(struct kobject *kobj,
+@@ -1766,6 +3332,23 @@
        return count;
  }
  
@@ -303905,10 +303726,19 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  sysfs_ctlreg_read(struct kobject *kobj, struct bin_attribute *bin_attr,
                  char *buf, loff_t off, size_t count)
-@@ -1810,20 +3393,234 @@ static struct bin_attribute sysfs_ctlreg
+@@ -1810,20 +3393,234 @@
        .write = sysfs_ctlreg_write,
  };
  
+-
+-static void
+-sysfs_mbox_idle(struct lpfc_hba *phba)
+-{
+-      phba->sysfs_mbox.state = SMBOX_IDLE;
+-      phba->sysfs_mbox.offset = 0;
+-
+-      if (phba->sysfs_mbox.mbox) {
+-              mempool_free(phba->sysfs_mbox.mbox,
 +static struct lpfc_sysfs_mbox *
 +lpfc_get_sysfs_mbox(struct lpfc_hba *phba, uint8_t create)
 +{
@@ -303940,28 +303770,25 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +
 +      spin_unlock_irq(&phba->hbalock);
 +      return sysfs_mbox;
++
 +}
 +/**
 + * sysfs_mbox_idle: frees the sysfs mailbox.
 + * @phba: lpfc_hba pointer
 + **/
- static void
--sysfs_mbox_idle(struct lpfc_hba *phba)
++static void
 +sysfs_mbox_idle(struct lpfc_hba *phba,
 +              struct lpfc_sysfs_mbox *sysfs_mbox)
- {
--      phba->sysfs_mbox.state = SMBOX_IDLE;
--      phba->sysfs_mbox.offset = 0;
--
--      if (phba->sysfs_mbox.mbox) {
--              mempool_free(phba->sysfs_mbox.mbox,
++{
 +      list_del_init(&sysfs_mbox->list);
 +      if (sysfs_mbox->mbox) {
 +              mempool_free(sysfs_mbox->mbox,
                             phba->mbox_mem_pool);
 -              phba->sysfs_mbox.mbox = NULL;
-       }
+-      }
+-}
+-
++      }
 +
 +      if (sysfs_mbox->mbext)
 +              kfree(sysfs_mbox->mbext);
@@ -304121,8 +303948,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +      spin_unlock_irq(&phba->hbalock);
 +
 +      return count;
- }
++}
++
 +/**
 + * sysfs_mbox_write: Write method for writing information via mbox.
 + * @kobj: kernel kobject that contains the kernel class device.
@@ -304147,7 +303974,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  sysfs_mbox_write(struct kobject *kobj, struct bin_attribute *bin_attr,
                 char *buf, loff_t off, size_t count)
-@@ -1833,9 +3630,9 @@ sysfs_mbox_write(struct kobject *kobj, s
+@@ -1833,51 +3630,272 @@
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
        struct lpfc_hba   *phba = vport->phba;
        struct lpfcMboxq  *mbox = NULL;
@@ -304160,10 +303987,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
        if (off % 4 ||  count % 4 || (unsigned long)buf % 4)
                return -EINVAL;
-@@ -1844,40 +3641,261 @@ sysfs_mbox_write(struct kobject *kobj, s
-               return 0;
  
-       if (off == 0) {
+       if (count == 0)
+               return 0;
++
++      if (off == 0) {
 +              sysfs_mbox = lpfc_get_sysfs_mbox(phba, 1);
 +              if (sysfs_mbox == NULL)
 +                      return -ENOMEM;
@@ -304251,15 +304079,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +              spin_unlock_irq(&phba->hbalock);
 +              return -ERANGE;
 +      }
-+
-+      if (off == 0) {
+       if (off == 0) {
                mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
 -              if (!mbox)
+-                      return -ENOMEM;
 +              if (!mbox) {
 +                      spin_lock_irq(&phba->hbalock);
 +                      sysfs_mbox_idle(phba, sysfs_mbox);
 +                      spin_unlock_irq(&phba->hbalock);
-                       return -ENOMEM;
++                      return -ENOMEM;
 +              }
                memset(mbox, 0, sizeof (LPFC_MBOXQ_t));
        }
@@ -304294,6 +304123,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
               buf, count);
  
 -      phba->sysfs_mbox.offset = off + count;
+-
+-      spin_unlock_irq(&phba->hbalock);
+-
+-      return count;
+-}
+-
 +      sysfs_mbox->offset = off + count;
 +
 +      if (sysfs_mbox->offset == sizeof(struct lpfc_sysfs_mbox_data)) {
@@ -304400,12 +304235,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +              }
 +              return count;
 +      }
-       spin_unlock_irq(&phba->hbalock);
-       return count;
- }
++
++      spin_unlock_irq(&phba->hbalock);
++
++      return count;
++}
++
 +/**
 + * sysfs_mbox_read: Read method for reading information via mbox.
 + * @kobj: kernel kobject that contains the kernel class device.
@@ -304432,7 +304267,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static ssize_t
  sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
                char *buf, loff_t off, size_t count)
-@@ -1887,6 +3905,42 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1887,6 +3905,42 @@
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
        struct lpfc_hba   *phba = vport->phba;
        int rc;
@@ -304475,7 +304310,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
        if (off > MAILBOX_CMD_SIZE)
                return -ERANGE;
-@@ -1903,16 +3957,18 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1903,16 +3957,18 @@
        spin_lock_irq(&phba->hbalock);
  
        if (phba->over_temp_state == HBA_OVER_TEMP) {
@@ -304488,17 +304323,18 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        if (off == 0 &&
 -          phba->sysfs_mbox.state  == SMBOX_WRITING &&
 -          phba->sysfs_mbox.offset >= 2 * sizeof(uint32_t)) {
+-
+-              switch (phba->sysfs_mbox.mbox->mb.mbxCommand) {
 +          ((sysfs_mbox->state  == SMBOX_WRITING)  ||
 +          (sysfs_mbox->state  == SMBOX_WRITING_MBEXT) ||
 +          (sysfs_mbox->state  == SMBOX_WRITING_BUFF) ) &&
 +          sysfs_mbox->offset >= 2 * sizeof(uint32_t)) {
--              switch (phba->sysfs_mbox.mbox->mb.mbxCommand) {
++
 +              switch (sysfs_mbox->mbox->mb.mbxCommand) {
                        /* Offline only */
                case MBX_INIT_LINK:
                case MBX_DOWN_LINK:
-@@ -1925,12 +3981,11 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1925,12 +3981,11 @@
                case MBX_RUN_DIAGS:
                case MBX_RESTART:
                case MBX_SET_MASK:
@@ -304513,19 +304349,20 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                                spin_unlock_irq(&phba->hbalock);
                                return -EPERM;
                        }
-@@ -1952,9 +4007,67 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1952,9 +4007,67 @@
                case MBX_LOAD_EXP_ROM:
                case MBX_BEACON:
                case MBX_DEL_LD_ENTRY:
--              case MBX_SET_VARIABLE:
 +              case MBX_SET_DEBUG:
-               case MBX_WRITE_WWN:
++              case MBX_WRITE_WWN:
 +              case MBX_READ_EVENT_LOG_STATUS:
 +              case MBX_WRITE_EVENT_LOG:
 +              case MBX_PORT_CAPABILITIES:
 +              case MBX_PORT_IOV_CONTROL:
 +                      break;
-+              case MBX_SET_VARIABLE:
+               case MBX_SET_VARIABLE:
+-              case MBX_WRITE_WWN:
+-                      break;
 +                      lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
 +                              "1226 mbox: set_variable 0x%x, 0x%x\n",
 +                              sysfs_mbox->mbox->mb.un.varWords[0],
@@ -304540,7 +304377,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                              phba->link_flag &= ~LS_LOOPBACK_MODE;
 +                              phba->fc_topology = TOPOLOGY_PT_PT;
 +                      }
-                       break;
++                      break;
 +              case MBX_RUN_BIU_DIAG64:
 +                      if (sysfs_mbox->mbox->mb.un.varBIUdiag.un.s2.
 +                              xmit_bde64.tus.f.bdeSize) {
@@ -304582,7 +304419,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                case MBX_READ_SPARM64:
                case MBX_READ_LA:
                case MBX_READ_LA64:
-@@ -1963,40 +4076,51 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -1963,40 +4076,51 @@
                case MBX_CONFIG_PORT:
                case MBX_RUN_BIU_DIAG:
                        printk(KERN_WARNING "mbox_read: Illegal Command 0x%x\n",
@@ -304600,8 +304437,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                      sysfs_mbox_idle(phba,sysfs_mbox);
                        spin_unlock_irq(&phba->hbalock);
                        return -EPERM;
-               }
++              }
++
 +              if (sysfs_mbox->mbox_data.in_ext_wlen ||
 +                      sysfs_mbox->mbox_data.out_ext_wlen) {
 +                      sysfs_mbox->mbox->context2 = sysfs_mbox->mbext;
@@ -304613,8 +304450,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                              sizeof(uint32_t);
 +                      sysfs_mbox->mbox->mbox_offset_word =
 +                              sysfs_mbox->mbox_data.mboffset;
-+              }
-+
+               }
                /* If HBA encountered an error attention, allow only DUMP
                 * or RESTART mailbox commands until the HBA is restarted.
                 */
@@ -304629,6 +304466,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 -                      spin_unlock_irq(&phba->hbalock);
 -                      return -EPERM;
 -              }
+-
+-              phba->sysfs_mbox.mbox->vport = vport;
 +              if (phba->pport->stopped &&
 +                  sysfs_mbox->mbox->mb.mbxCommand != MBX_DUMP_MEMORY &&
 +                  sysfs_mbox->mbox->mb.mbxCommand != MBX_RESTART &&
@@ -304638,8 +304477,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +                                      "1259 mbox: Issued mailbox cmd "
 +                                      "0x%x while in stopped state.\n",
 +                                      sysfs_mbox->mbox->mb.mbxCommand);
--              phba->sysfs_mbox.mbox->vport = vport;
++
 +              sysfs_mbox->mbox->vport = vport;
  
                /* Don't allow mailbox commands to be sent when blocked
@@ -304651,7 +304489,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                        spin_unlock_irq(&phba->hbalock);
                        return  -EAGAIN;
                }
-@@ -2006,43 +4130,86 @@ sysfs_mbox_read(struct kobject *kobj, st
+@@ -2006,43 +4130,86 @@
  
                        spin_unlock_irq(&phba->hbalock);
                        rc = lpfc_sli_issue_mbox (phba,
@@ -304674,14 +304512,30 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                if (rc != MBX_SUCCESS) {
                        if (rc == MBX_TIMEOUT) {
 -                              phba->sysfs_mbox.mbox = NULL;
-+                              sysfs_mbox->mbox = NULL;
-                       }
+-                      }
 -                      sysfs_mbox_idle(phba);
++                              sysfs_mbox->mbox = NULL;
++                      }
 +                      sysfs_mbox_idle(phba,sysfs_mbox);
                        spin_unlock_irq(&phba->hbalock);
                        return  (rc == MBX_TIMEOUT) ? -ETIME : -ENODEV;
                }
 -              phba->sysfs_mbox.state = SMBOX_READING;
+-      }
+-      else if (phba->sysfs_mbox.offset != off ||
+-               phba->sysfs_mbox.state  != SMBOX_READING) {
+-              printk(KERN_WARNING  "mbox_read: Bad State\n");
+-              sysfs_mbox_idle(phba);
+-              spin_unlock_irq(&phba->hbalock);
+-              return -EAGAIN;
+-      }
+-
+-      memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count);
+-
+-      phba->sysfs_mbox.offset = off + count;
+-
+-      if (phba->sysfs_mbox.offset == MAILBOX_CMD_SIZE)
+-              sysfs_mbox_idle(phba);
 +              if (wait_4_menlo_maint) {
 +                      lpfc_printf_log(phba, KERN_WARNING, LOG_LIBDFC,
 +                                      "1229 waiting for menlo mnt\n");
@@ -304710,26 +304564,18 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +
 +              }
 +              sysfs_mbox->state = SMBOX_READING;
-       }
--      else if (phba->sysfs_mbox.offset != off ||
--               phba->sysfs_mbox.state  != SMBOX_READING) {
--              printk(KERN_WARNING  "mbox_read: Bad State\n");
--              sysfs_mbox_idle(phba);
++      }
 +      else if (sysfs_mbox->offset != off ||
 +               sysfs_mbox->state  != SMBOX_READING) {
 +              sysfs_mbox_idle(phba,sysfs_mbox);
-               spin_unlock_irq(&phba->hbalock);
-               return -EAGAIN;
-       }
--      memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count);
++              spin_unlock_irq(&phba->hbalock);
++              return -EAGAIN;
++      }
++
 +      memcpy(buf, (uint8_t *) & sysfs_mbox->mbox->mb + off, count);
--      phba->sysfs_mbox.offset = off + count;
++
 +      sysfs_mbox->offset = off + count;
--      if (phba->sysfs_mbox.offset == MAILBOX_CMD_SIZE)
--              sysfs_mbox_idle(phba);
++
 +      if ((sysfs_mbox->offset == MAILBOX_CMD_SIZE) &&
 +          ((sysfs_mbox->mbox->mb.mbxCommand == MBX_RUN_BIU_DIAG64) ||
 +           (sysfs_mbox->mbox->mb.mbxCommand == MBX_READ_EVENT_LOG))) {
@@ -304752,7 +304598,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
        spin_unlock_irq(&phba->hbalock);
  
-@@ -2054,11 +4221,19 @@ static struct bin_attribute sysfs_mbox_a
+@@ -2054,41 +4221,78 @@
                .name = "mbox",
                .mode = S_IRUSR | S_IWUSR,
        },
@@ -304773,17 +304619,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  int
  lpfc_alloc_sysfs_attr(struct lpfc_vport *vport)
  {
-@@ -2066,29 +4241,58 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport 
+       struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        int error;
-       error = sysfs_create_bin_file(&shost->shost_dev.kobj,
++
++      error = sysfs_create_bin_file(&shost->shost_dev.kobj,
 +                                    &sysfs_drvr_stat_data_attr);
 +
 +      /* Virtual ports do not need ctrl_reg and mbox */
 +      if (error || vport->port_type == LPFC_NPIV_PORT)
 +              goto out;
-+
-+      error = sysfs_create_bin_file(&shost->shost_dev.kobj,
+       error = sysfs_create_bin_file(&shost->shost_dev.kobj,
                                      &sysfs_ctlreg_attr);
        if (error)
 -              goto out;
@@ -304834,7 +304680,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  }
  
  
-@@ -2096,6 +4300,10 @@ lpfc_free_sysfs_attr(struct lpfc_vport *
+@@ -2096,6 +4300,10 @@
   * Dynamic FC Host Attributes Support
   */
  
@@ -304845,7 +304691,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_host_port_id(struct Scsi_Host *shost)
  {
-@@ -2105,6 +4313,10 @@ lpfc_get_host_port_id(struct Scsi_Host *
+@@ -2105,6 +4313,10 @@
        fc_host_port_id(shost) = vport->fc_myDID;
  }
  
@@ -304856,7 +304702,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_host_port_type(struct Scsi_Host *shost)
  {
-@@ -2133,6 +4345,10 @@ lpfc_get_host_port_type(struct Scsi_Host
+@@ -2133,6 +4345,10 @@
        spin_unlock_irq(shost->host_lock);
  }
  
@@ -304867,7 +304713,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_host_port_state(struct Scsi_Host *shost)
  {
-@@ -2144,6 +4360,13 @@ lpfc_get_host_port_state(struct Scsi_Hos
+@@ -2144,6 +4360,13 @@
        if (vport->fc_flag & FC_OFFLINE_MODE)
                fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
        else {
@@ -304881,7 +304727,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
                switch (phba->link_state) {
                case LPFC_LINK_UNKNOWN:
                case LPFC_LINK_DOWN:
-@@ -2167,6 +4390,10 @@ lpfc_get_host_port_state(struct Scsi_Hos
+@@ -2167,6 +4390,10 @@
        spin_unlock_irq(shost->host_lock);
  }
  
@@ -304892,7 +304738,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_host_speed(struct Scsi_Host *shost)
  {
-@@ -2199,6 +4426,10 @@ lpfc_get_host_speed(struct Scsi_Host *sh
+@@ -2199,6 +4426,10 @@
        spin_unlock_irq(shost->host_lock);
  }
  
@@ -304903,7 +304749,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_host_fabric_name (struct Scsi_Host *shost)
  {
-@@ -2221,6 +4452,18 @@ lpfc_get_host_fabric_name (struct Scsi_H
+@@ -2221,6 +4452,18 @@
        fc_host_fabric_name(shost) = node_name;
  }
  
@@ -304922,7 +304768,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static struct fc_host_statistics *
  lpfc_get_stats(struct Scsi_Host *shost)
  {
-@@ -2334,6 +4577,10 @@ lpfc_get_stats(struct Scsi_Host *shost)
+@@ -2334,6 +4577,10 @@
        return hs;
  }
  
@@ -304933,7 +304779,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_reset_stats(struct Scsi_Host *shost)
  {
-@@ -2411,6 +4658,14 @@ lpfc_reset_stats(struct Scsi_Host *shost
+@@ -2411,6 +4658,14 @@
   * are no sysfs handlers for link_down_tmo.
   */
  
@@ -304948,7 +304794,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static struct lpfc_nodelist *
  lpfc_get_node_by_target(struct scsi_target *starget)
  {
-@@ -2432,6 +4687,10 @@ lpfc_get_node_by_target(struct scsi_targ
+@@ -2432,6 +4687,10 @@
        return NULL;
  }
  
@@ -304959,7 +304805,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_starget_port_id(struct scsi_target *starget)
  {
-@@ -2440,6 +4699,12 @@ lpfc_get_starget_port_id(struct scsi_tar
+@@ -2440,6 +4699,12 @@
        fc_starget_port_id(starget) = ndlp ? ndlp->nlp_DID : -1;
  }
  
@@ -304972,7 +304818,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_starget_node_name(struct scsi_target *starget)
  {
-@@ -2449,6 +4714,12 @@ lpfc_get_starget_node_name(struct scsi_t
+@@ -2449,6 +4714,12 @@
                ndlp ? wwn_to_u64(ndlp->nlp_nodename.u.wwn) : 0;
  }
  
@@ -304985,7 +304831,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_get_starget_port_name(struct scsi_target *starget)
  {
-@@ -2458,6 +4729,15 @@ lpfc_get_starget_port_name(struct scsi_t
+@@ -2458,6 +4729,15 @@
                ndlp ? wwn_to_u64(ndlp->nlp_portname.u.wwn) : 0;
  }
  
@@ -305001,7 +304847,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
  {
-@@ -2467,7 +4747,18 @@ lpfc_set_rport_loss_tmo(struct fc_rport 
+@@ -2467,7 +4747,18 @@
                rport->dev_loss_tmo = 1;
  }
  
@@ -305021,7 +304867,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  #define lpfc_rport_show_function(field, format_string, sz, cast)      \
  static ssize_t                                                                \
  lpfc_show_rport_##field (struct device *dev,                          \
-@@ -2484,6 +4775,23 @@ lpfc_show_rport_##field (struct device *
+@@ -2484,6 +4775,23 @@
        lpfc_rport_show_function(field, format_string, sz, )            \
  static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL)
  
@@ -305045,7 +304891,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
  struct fc_function_template lpfc_transport_functions = {
        /* fixed attributes the driver supports */
-@@ -2493,6 +4801,7 @@ struct fc_function_template lpfc_transpo
+@@ -2493,6 +4801,7 @@
        .show_host_supported_fc4s = 1,
        .show_host_supported_speeds = 1,
        .show_host_maxframe_size = 1,
@@ -305053,7 +304899,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
        /* dynamic attributes the driver supports */
        .get_host_port_id = lpfc_get_host_port_id,
-@@ -2542,6 +4851,10 @@ struct fc_function_template lpfc_transpo
+@@ -2542,6 +4851,10 @@
        .terminate_rport_io = lpfc_terminate_rport_io,
  
        .dd_fcvport_size = sizeof(struct lpfc_vport *),
@@ -305064,7 +304910,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  };
  
  struct fc_function_template lpfc_vport_transport_functions = {
-@@ -2552,6 +4865,7 @@ struct fc_function_template lpfc_vport_t
+@@ -2552,6 +4865,7 @@
        .show_host_supported_fc4s = 1,
        .show_host_supported_speeds = 1,
        .show_host_maxframe_size = 1,
@@ -305072,14 +304918,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  
        /* dynamic attributes the driver supports */
        .get_host_port_id = lpfc_get_host_port_id,
-@@ -2600,8 +4914,14 @@ struct fc_function_template lpfc_vport_t
+@@ -2600,8 +4914,14 @@
        .terminate_rport_io = lpfc_terminate_rport_io,
  
        .vport_disable = lpfc_vport_disable,
+-};
+-
 +
 +      .set_vport_symbolic_name = lpfc_set_vport_symbolic_name,
- };
++};
++
 +/**
 + * lpfc_get_cfgparam: Used during probe_one to init the adapter structure.
 + * @phba: lpfc_hba pointer.
@@ -305087,7 +304935,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  void
  lpfc_get_cfgparam(struct lpfc_hba *phba)
  {
-@@ -2615,9 +4935,11 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
+@@ -2615,9 +4935,11 @@
        lpfc_link_speed_init(phba, lpfc_link_speed);
        lpfc_poll_tmo_init(phba, lpfc_poll_tmo);
        lpfc_enable_npiv_init(phba, lpfc_enable_npiv);
@@ -305099,7 +304947,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
        phba->cfg_poll = lpfc_poll;
        phba->cfg_soft_wwnn = 0L;
        phba->cfg_soft_wwpn = 0L;
-@@ -2637,6 +4959,10 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
+@@ -2637,6 +4959,10 @@
        return;
  }
  
@@ -305110,7 +304958,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
  void
  lpfc_get_vport_cfgparam(struct lpfc_vport *vport)
  {
-@@ -2648,10 +4974,12 @@ lpfc_get_vport_cfgparam(struct lpfc_vpor
+@@ -2648,10 +4974,12 @@
        lpfc_restrict_login_init(vport, lpfc_restrict_login);
        lpfc_fcp_class_init(vport, lpfc_fcp_class);
        lpfc_use_adisc_init(vport, lpfc_use_adisc);
@@ -305123,9 +304971,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_attr.c linux-2.6.27.19-5.1/driver
 +      lpfc_enable_auth_init(vport, lpfc_enable_auth);
        return;
  }
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.c  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth.c    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,837 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -305964,9 +305812,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.c linux-2.6.27.19-5.1/driver
 +      return ((uint32_t)(message - message_start));
 +}
 +
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth.h  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth.h    Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,92 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -306060,9 +305908,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth.h linux-2.6.27.19-5.1/driver
 +                           struct fc_auth_req *fc_req);
 +int lpfc_unpack_dhchap_success(struct lpfc_vport *vport, uint8_t *message,
 +                             struct fc_auth_req *fc_req);
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.c   2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth_access.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth_access.c     Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,601 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -306665,9 +306513,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.c linux-2.6.27.19-5.1
 +              lpfc_fc_sc_schedule_notify_all(FC_NL_SC_DEREG);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_auth_access.h   2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_auth_access.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_auth_access.h     Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,225 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -306894,9 +306742,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_auth_access.h linux-2.6.27.19-5.1
 +      uint8_t data[0];
 +} __attribute__((aligned(sizeof(uint64_t))));
 +
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_crtn.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_crtn.h  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_crtn.h
+--- a/drivers/scsi/lpfc/lpfc_crtn.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_crtn.h    Wed May 06 16:56:34 2009 +0100
 @@ -18,24 +18,32 @@
   * included with this package.                                     *
   *******************************************************************/
@@ -306934,7 +306782,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  void lpfc_unreg_login(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
  void lpfc_unreg_did(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
  void lpfc_reg_vpi(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *);
-@@ -43,7 +51,7 @@ void lpfc_unreg_vpi(struct lpfc_hba *, u
+@@ -43,7 +51,7 @@
  void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t);
  
  struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t);
@@ -306943,7 +306791,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  int lpfc_linkdown(struct lpfc_hba *);
  void lpfc_port_link_failure(struct lpfc_vport *);
  void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *);
-@@ -80,7 +88,10 @@ void lpfc_cleanup(struct lpfc_vport *);
+@@ -80,7 +88,10 @@
  void lpfc_disc_timeout(unsigned long);
  
  struct lpfc_nodelist *__lpfc_findnode_rpi(struct lpfc_vport *, uint16_t);
@@ -306954,7 +306802,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  void lpfc_worker_wake_up(struct lpfc_hba *);
  int lpfc_workq_post_event(struct lpfc_hba *, void *, void *, uint32_t);
  int lpfc_do_work(void *);
-@@ -95,6 +106,9 @@ void lpfc_more_plogi(struct lpfc_vport *
+@@ -95,6 +106,9 @@
  void lpfc_more_adisc(struct lpfc_vport *);
  void lpfc_end_rscn(struct lpfc_vport *);
  int lpfc_els_chk_latt(struct lpfc_vport *);
@@ -306964,7 +306812,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  int lpfc_els_abort_flogi(struct lpfc_hba *);
  int lpfc_initial_flogi(struct lpfc_vport *);
  int lpfc_initial_fdisc(struct lpfc_vport *);
-@@ -117,6 +131,8 @@ int lpfc_els_rsp_prli_acc(struct lpfc_vp
+@@ -117,6 +131,8 @@
  void lpfc_cancel_retry_delay_tmo(struct lpfc_vport *, struct lpfc_nodelist *);
  void lpfc_els_retry_delay(unsigned long);
  void lpfc_els_retry_delay_handler(struct lpfc_nodelist *);
@@ -306973,7 +306821,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
                          struct lpfc_iocbq *);
  int lpfc_els_handle_rscn(struct lpfc_vport *);
-@@ -135,7 +151,7 @@ void lpfc_ct_unsol_event(struct lpfc_hba
+@@ -135,7 +151,7 @@
  int lpfc_ns_cmd(struct lpfc_vport *, int, uint8_t, uint32_t);
  int lpfc_fdmi_cmd(struct lpfc_vport *, struct lpfc_nodelist *, int);
  void lpfc_fdmi_tmo(unsigned long);
@@ -306982,7 +306830,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  
  int lpfc_config_port_prep(struct lpfc_hba *);
  int lpfc_config_port_post(struct lpfc_hba *);
-@@ -151,10 +167,14 @@ void lpfc_offline(struct lpfc_hba *);
+@@ -151,10 +167,14 @@
  
  int lpfc_sli_setup(struct lpfc_hba *);
  int lpfc_sli_queue_setup(struct lpfc_hba *);
@@ -306997,7 +306845,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  
  void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *);
  void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *);
-@@ -175,11 +195,12 @@ void lpfc_mem_free(struct lpfc_hba *);
+@@ -175,11 +195,12 @@
  void lpfc_stop_vport_timers(struct lpfc_vport *);
  
  void lpfc_poll_timeout(unsigned long ptr);
@@ -307014,7 +306862,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  
  void lpfc_reset_barrier(struct lpfc_hba * phba);
  int lpfc_sli_brdready(struct lpfc_hba *, uint32_t);
-@@ -187,11 +208,13 @@ int lpfc_sli_brdkill(struct lpfc_hba *);
+@@ -187,11 +208,13 @@
  int lpfc_sli_brdreset(struct lpfc_hba *);
  int lpfc_sli_brdrestart(struct lpfc_hba *);
  int lpfc_sli_hba_setup(struct lpfc_hba *);
@@ -307028,7 +306876,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *,
                                    struct lpfc_sli_ring *, uint32_t);
  void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *);
-@@ -199,6 +222,7 @@ int lpfc_sli_issue_iocb(struct lpfc_hba 
+@@ -199,6 +222,7 @@
                        struct lpfc_iocbq *, uint32_t);
  void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t);
  void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *);
@@ -307036,7 +306884,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  int lpfc_sli_ringpostbuf_put(struct lpfc_hba *, struct lpfc_sli_ring *,
                             struct lpfc_dmabuf *);
  struct lpfc_dmabuf *lpfc_sli_ringpostbuf_get(struct lpfc_hba *,
-@@ -226,17 +250,13 @@ struct lpfc_nodelist *lpfc_findnode_did(
+@@ -226,17 +250,13 @@
  struct lpfc_nodelist *lpfc_findnode_wwpn(struct lpfc_vport *,
                                         struct lpfc_name *);
  
@@ -307060,7 +306908,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  
  void lpfc_sli_free_hbq(struct lpfc_hba *, struct hbq_dmabuf *);
  
-@@ -269,11 +289,27 @@ void lpfc_dev_loss_tmo_callbk(struct fc_
+@@ -269,10 +289,26 @@
  
  struct lpfc_vport *lpfc_create_port(struct lpfc_hba *, int, struct device *);
  int  lpfc_vport_disable(struct fc_vport *fc_vport, bool disable);
@@ -307069,7 +306917,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  void destroy_port(struct lpfc_vport *);
  int lpfc_get_instance(void);
  void lpfc_host_attrib_init(struct Scsi_Host *);
++
 +int lpfc_selective_reset(struct lpfc_hba *);
 +int lpfc_security_wait(struct lpfc_vport *);
 +int  lpfc_get_security_enabled(struct Scsi_Host *);
@@ -307085,11 +306933,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
 +void lpfc_start_discovery(struct lpfc_vport *vport);
 +void lpfc_start_authentication(struct lpfc_vport *, struct lpfc_nodelist *);
 +int lpfc_rcv_nl_msg(struct Scsi_Host *, void *, uint32_t, uint32_t);
-+
  extern void lpfc_debugfs_initialize(struct lpfc_vport *);
  extern void lpfc_debugfs_terminate(struct lpfc_vport *);
- extern void lpfc_debugfs_disc_trc(struct lpfc_vport *, int, char *, uint32_t,
-@@ -282,14 +318,25 @@ extern void lpfc_debugfs_slow_ring_trc(s
+@@ -282,14 +318,25 @@
        uint32_t, uint32_t);
  extern struct lpfc_hbq_init *lpfc_hbq_defs[];
  
@@ -307116,9 +306963,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_crtn.h linux-2.6.27.19-5.1/driver
  
  #define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code)
  #define HBA_EVENT_RSCN                   5
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ct.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ct.c    2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ct.c
+--- a/drivers/scsi/lpfc/lpfc_ct.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_ct.c      Wed May 06 16:56:34 2009 +0100
 @@ -34,6 +34,7 @@
  
  #include "lpfc_hw.h"
@@ -307127,7 +306974,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
  #include "lpfc_disc.h"
  #include "lpfc_scsi.h"
  #include "lpfc.h"
-@@ -134,25 +135,24 @@ lpfc_ct_unsol_event(struct lpfc_hba *phb
+@@ -134,25 +135,24 @@
                }
                list_del(&head);
        } else {
@@ -307159,7 +307006,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
        }
  }
  
-@@ -212,7 +212,7 @@ lpfc_alloc_ct_rsp(struct lpfc_hba *phba,
+@@ -212,7 +212,7 @@
                else
                        list_add_tail(&mp->list, &mlist->list);
  
@@ -307168,7 +307015,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
                /* build buffer ptr list for IOCB */
                bpl->addrLow = le32_to_cpu(putPaddrLow(mp->phys) );
                bpl->addrHigh = le32_to_cpu(putPaddrHigh(mp->phys) );
-@@ -283,7 +283,7 @@ lpfc_gen_req(struct lpfc_vport *vport, s
+@@ -283,7 +283,7 @@
        icmd->un.genreq64.bdl.ulpIoTag32 = 0;
        icmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys);
        icmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys);
@@ -307177,7 +307024,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
        icmd->un.genreq64.bdl.bdeSize = (num_entry * sizeof (struct ulp_bde64));
  
        if (usr_flg)
-@@ -560,18 +560,25 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba 
+@@ -560,18 +560,25 @@
                irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_ns_retry);
  
        /* Don't bother processing response if vport is being torn down. */
@@ -307204,7 +307051,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
                goto out;
        }
        if (irsp->ulpStatus) {
-@@ -587,6 +594,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba 
+@@ -587,6 +594,8 @@
                        if (rc == 0)
                                goto out;
                }
@@ -307213,7 +307060,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
                lpfc_vport_set_state(vport, FC_VPORT_FAILED);
                lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
                                 "0257 GID_FT Query error: 0x%x 0x%x\n",
-@@ -861,7 +870,7 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, stru
+@@ -861,7 +870,7 @@
  
                retry++;
                lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
@@ -307222,7 +307069,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
                rc = lpfc_ns_cmd(vport, cmdcode, retry, 0);
                if (rc == 0)
                        goto out;
-@@ -1008,8 +1017,10 @@ lpfc_vport_symbolic_port_name(struct lpf
+@@ -1008,8 +1017,10 @@
        if (n < size)
                n += snprintf(symbol + n, size - n, " VPort-%d", vport->vpi);
  
@@ -307235,9 +307082,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ct.c linux-2.6.27.19-5.1/drivers/
        return n;
  }
  
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_debugfs.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_debugfs.c       2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_debugfs.c
+--- a/drivers/scsi/lpfc/lpfc_debugfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_debugfs.c Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
@@ -307297,7 +307144,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
   */
  static int lpfc_debugfs_enable = 1;
  module_param(lpfc_debugfs_enable, int, 0);
-@@ -117,6 +126,25 @@ struct lpfc_debug {
+@@ -117,6 +126,25 @@
  static atomic_t lpfc_debugfs_seq_trc_cnt = ATOMIC_INIT(0);
  static unsigned long lpfc_debugfs_start_time = 0L;
  
@@ -307323,15 +307170,15 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size)
  {
-@@ -125,7 +153,6 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -124,7 +152,6 @@
+       uint32_t ms;
        struct lpfc_debugfs_trc *dtp;
        char buffer[LPFC_DEBUG_TRC_ENTRY_SIZE];
 -
        enable = lpfc_debugfs_enable;
        lpfc_debugfs_enable = 0;
-@@ -159,6 +186,25 @@ lpfc_debugfs_disc_trc_data(struct lpfc_v
+@@ -159,6 +186,25 @@
        return len;
  }
  
@@ -307357,7 +307204,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size)
  {
-@@ -203,6 +249,25 @@ lpfc_debugfs_slow_ring_trc_data(struct l
+@@ -203,6 +249,25 @@
  
  static int lpfc_debugfs_last_hbq = -1;
  
@@ -307383,7 +307230,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_hbqinfo_data(struct lpfc_hba *phba, char *buf, int size)
  {
-@@ -303,6 +368,24 @@ skipit:
+@@ -303,6 +368,24 @@
  
  static int lpfc_debugfs_last_hba_slim_off;
  
@@ -307408,7 +307255,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_dumpHBASlim_data(struct lpfc_hba *phba, char *buf, int size)
  {
-@@ -342,6 +425,21 @@ lpfc_debugfs_dumpHBASlim_data(struct lpf
+@@ -342,6 +425,21 @@
        return len;
  }
  
@@ -307430,7 +307277,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_dumpHostSlim_data(struct lpfc_hba *phba, char *buf, int size)
  {
-@@ -357,7 +455,7 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -357,7 +455,7 @@
        spin_lock_irq(&phba->hbalock);
  
        len +=  snprintf(buf+len, size-len, "SLIM Mailbox\n");
@@ -307439,7 +307286,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        i = sizeof(MAILBOX_t);
        while (i > 0) {
                len +=  snprintf(buf+len, size-len,
-@@ -370,7 +468,7 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -370,7 +468,7 @@
        }
  
        len +=  snprintf(buf+len, size-len, "SLIM PCB\n");
@@ -307448,7 +307295,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        i = sizeof(PCB_t);
        while (i > 0) {
                len +=  snprintf(buf+len, size-len,
-@@ -382,44 +480,16 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -382,44 +480,16 @@
                off += (8 * sizeof(uint32_t));
        }
  
@@ -307503,7 +307350,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        word0 = readl(phba->HAregaddr);
        word1 = readl(phba->CAregaddr);
        word2 = readl(phba->HSregaddr);
-@@ -430,6 +500,21 @@ lpfc_debugfs_dumpHostSlim_data(struct lp
+@@ -430,6 +500,21 @@
        return len;
  }
  
@@ -307525,7 +307372,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char *buf, int size)
  {
-@@ -513,7 +598,22 @@ lpfc_debugfs_nodelist_data(struct lpfc_v
+@@ -513,7 +598,22 @@
  }
  #endif
  
@@ -307549,7 +307396,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  inline void
  lpfc_debugfs_disc_trc(struct lpfc_vport *vport, int mask, char *fmt,
        uint32_t data1, uint32_t data2, uint32_t data3)
-@@ -542,6 +642,19 @@ lpfc_debugfs_disc_trc(struct lpfc_vport 
+@@ -542,6 +642,19 @@
        return;
  }
  
@@ -307569,7 +307416,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  inline void
  lpfc_debugfs_slow_ring_trc(struct lpfc_hba *phba, char *fmt,
        uint32_t data1, uint32_t data2, uint32_t data3)
-@@ -568,6 +681,21 @@ lpfc_debugfs_slow_ring_trc(struct lpfc_h
+@@ -568,6 +681,21 @@
  }
  
  #ifdef CONFIG_LPFC_DEBUG_FS
@@ -307591,7 +307438,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_disc_trc_open(struct inode *inode, struct file *file)
  {
-@@ -585,7 +713,7 @@ lpfc_debugfs_disc_trc_open(struct inode 
+@@ -585,7 +713,7 @@
        if (!debug)
                goto out;
  
@@ -307600,7 +307447,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        size =  (lpfc_debugfs_max_disc_trc * LPFC_DEBUG_TRC_ENTRY_SIZE);
        size = PAGE_ALIGN(size);
  
-@@ -603,6 +731,21 @@ out:
+@@ -603,6 +731,21 @@
        return rc;
  }
  
@@ -307622,7 +307469,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_slow_ring_trc_open(struct inode *inode, struct file *file)
  {
-@@ -620,7 +763,7 @@ lpfc_debugfs_slow_ring_trc_open(struct i
+@@ -620,7 +763,7 @@
        if (!debug)
                goto out;
  
@@ -307631,7 +307478,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        size =  (lpfc_debugfs_max_slow_ring_trc * LPFC_DEBUG_TRC_ENTRY_SIZE);
        size = PAGE_ALIGN(size);
  
-@@ -638,6 +781,21 @@ out:
+@@ -638,6 +781,21 @@
        return rc;
  }
  
@@ -307653,7 +307500,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_hbqinfo_open(struct inode *inode, struct file *file)
  {
-@@ -649,7 +807,7 @@ lpfc_debugfs_hbqinfo_open(struct inode *
+@@ -649,7 +807,7 @@
        if (!debug)
                goto out;
  
@@ -307662,7 +307509,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        debug->buffer = kmalloc(LPFC_HBQINFO_SIZE, GFP_KERNEL);
        if (!debug->buffer) {
                kfree(debug);
-@@ -665,6 +823,21 @@ out:
+@@ -665,6 +823,21 @@
        return rc;
  }
  
@@ -307684,7 +307531,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_dumpHBASlim_open(struct inode *inode, struct file *file)
  {
-@@ -676,7 +849,7 @@ lpfc_debugfs_dumpHBASlim_open(struct ino
+@@ -676,7 +849,7 @@
        if (!debug)
                goto out;
  
@@ -307693,7 +307540,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        debug->buffer = kmalloc(LPFC_DUMPHBASLIM_SIZE, GFP_KERNEL);
        if (!debug->buffer) {
                kfree(debug);
-@@ -692,6 +865,21 @@ out:
+@@ -692,6 +865,21 @@
        return rc;
  }
  
@@ -307715,7 +307562,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
  {
-@@ -703,7 +891,7 @@ lpfc_debugfs_dumpHostSlim_open(struct in
+@@ -703,7 +891,7 @@
        if (!debug)
                goto out;
  
@@ -307724,7 +307571,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        debug->buffer = kmalloc(LPFC_DUMPHOSTSLIM_SIZE, GFP_KERNEL);
        if (!debug->buffer) {
                kfree(debug);
-@@ -719,6 +907,21 @@ out:
+@@ -719,6 +907,21 @@
        return rc;
  }
  
@@ -307746,7 +307593,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_nodelist_open(struct inode *inode, struct file *file)
  {
-@@ -730,7 +933,7 @@ lpfc_debugfs_nodelist_open(struct inode 
+@@ -730,7 +933,7 @@
        if (!debug)
                goto out;
  
@@ -307755,7 +307602,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
        debug->buffer = kmalloc(LPFC_NODELIST_SIZE, GFP_KERNEL);
        if (!debug->buffer) {
                kfree(debug);
-@@ -746,6 +949,23 @@ out:
+@@ -746,6 +949,23 @@
        return rc;
  }
  
@@ -307779,7 +307626,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static loff_t
  lpfc_debugfs_lseek(struct file *file, loff_t off, int whence)
  {
-@@ -767,6 +987,22 @@ lpfc_debugfs_lseek(struct file *file, lo
+@@ -767,6 +987,22 @@
        return (pos < 0 || pos > debug->len) ? -EINVAL : (file->f_pos = pos);
  }
  
@@ -307802,7 +307649,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static ssize_t
  lpfc_debugfs_read(struct file *file, char __user *buf,
                  size_t nbytes, loff_t *ppos)
-@@ -776,6 +1012,18 @@ lpfc_debugfs_read(struct file *file, cha
+@@ -776,6 +1012,18 @@
                                       debug->len);
  }
  
@@ -307821,7 +307668,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  static int
  lpfc_debugfs_release(struct inode *inode, struct file *file)
  {
-@@ -845,6 +1093,16 @@ static struct dentry *lpfc_debugfs_root 
+@@ -845,6 +1093,16 @@
  static atomic_t lpfc_debugfs_hba_count;
  #endif
  
@@ -307838,7 +307685,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  inline void
  lpfc_debugfs_initialize(struct lpfc_vport *vport)
  {
-@@ -862,7 +1120,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -862,7 +1120,7 @@
                atomic_set(&lpfc_debugfs_hba_count, 0);
                if (!lpfc_debugfs_root) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307847,7 +307694,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
        }
-@@ -876,7 +1134,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -876,7 +1134,7 @@
                        debugfs_create_dir(name, lpfc_debugfs_root);
                if (!phba->hba_debugfs_root) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307856,7 +307703,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
                atomic_inc(&lpfc_debugfs_hba_count);
-@@ -890,7 +1148,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -890,7 +1148,7 @@
                                 phba, &lpfc_debugfs_op_hbqinfo);
                if (!phba->debug_hbqinfo) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307865,7 +307712,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
  
-@@ -902,7 +1160,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -902,7 +1160,7 @@
                                 phba, &lpfc_debugfs_op_dumpHBASlim);
                if (!phba->debug_dumpHBASlim) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307874,7 +307721,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
  
-@@ -914,7 +1172,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -914,7 +1172,7 @@
                                 phba, &lpfc_debugfs_op_dumpHostSlim);
                if (!phba->debug_dumpHostSlim) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307883,7 +307730,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
  
-@@ -944,7 +1202,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -944,7 +1202,7 @@
                                 phba, &lpfc_debugfs_op_slow_ring_trc);
                if (!phba->debug_slow_ring_trc) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307892,7 +307739,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                                         "slow_ring_trace\n");
                        goto debug_failed;
                }
-@@ -955,7 +1213,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -955,7 +1213,7 @@
                                GFP_KERNEL);
                        if (!phba->slow_ring_trc) {
                                lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307901,7 +307748,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                                                 "slow_ring buffer\n");
                                goto debug_failed;
                        }
-@@ -972,7 +1230,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -972,7 +1230,7 @@
                        debugfs_create_dir(name, phba->hba_debugfs_root);
                if (!vport->vport_debugfs_root) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307910,7 +307757,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                        goto debug_failed;
                }
                atomic_inc(&phba->debugfs_vport_count);
-@@ -1001,7 +1259,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1001,7 +1259,7 @@
  
        if (!vport->disc_trc) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307919,7 +307766,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                                 "buffer\n");
                goto debug_failed;
        }
-@@ -1014,7 +1272,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
+@@ -1014,7 +1272,7 @@
                                 vport, &lpfc_debugfs_op_disc_trc);
        if (!vport->debug_disc_trc) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
@@ -307928,7 +307775,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
                                 "discovery_trace\n");
                goto debug_failed;
        }
-@@ -1033,7 +1291,17 @@ debug_failed:
+@@ -1033,7 +1291,17 @@
  #endif
  }
  
@@ -307947,16 +307794,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_debugfs.c linux-2.6.27.19-5.1/dri
  inline void
  lpfc_debugfs_terminate(struct lpfc_vport *vport)
  {
-@@ -1096,5 +1364,3 @@ lpfc_debugfs_terminate(struct lpfc_vport
+@@ -1096,5 +1364,3 @@
  #endif
        return;
  }
 -
 -
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_disc.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_disc.h  2009-03-25 16:11:16.000000000 +0000
-@@ -37,6 +37,8 @@ enum lpfc_work_type {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_disc.h
+--- a/drivers/scsi/lpfc/lpfc_disc.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_disc.h    Wed May 06 16:56:34 2009 +0100
+@@ -37,6 +37,8 @@
        LPFC_EVT_KILL,
        LPFC_EVT_ELS_RETRY,
        LPFC_EVT_DEV_LOSS,
@@ -307965,7 +307812,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h linux-2.6.27.19-5.1/driver
  };
  
  /* structure used to queue event to the discovery tasklet */
-@@ -47,6 +49,24 @@ struct lpfc_work_evt {
+@@ -47,6 +49,24 @@
        enum lpfc_work_type   evt;
  };
  
@@ -307990,7 +307837,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h linux-2.6.27.19-5.1/driver
  
  struct lpfc_nodelist {
        struct list_head nlp_listp;
-@@ -80,14 +100,21 @@ struct lpfc_nodelist {
+@@ -80,14 +100,21 @@
  #define NLP_USG_FREE_ACK_BIT  0x8     /* Indicate ndlp memory free invoked */
  
        struct timer_list   nlp_delayfunc;      /* Used for delayed ELS cmds */
@@ -308012,9 +307859,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_disc.h linux-2.6.27.19-5.1/driver
  };
  
  /* Defines for nlp_flag (uint32) */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_els.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_els.c   2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_els.c
+--- a/drivers/scsi/lpfc/lpfc_els.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_els.c     Wed May 06 16:56:34 2009 +0100
 @@ -30,6 +30,7 @@
  
  #include "lpfc_hw.h"
@@ -308033,7 +307880,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  
  static int lpfc_els_retry(struct lpfc_hba *, struct lpfc_iocbq *,
                          struct lpfc_iocbq *);
-@@ -53,6 +57,28 @@ static void lpfc_register_new_vport(stru
+@@ -53,6 +57,28 @@
  
  static int lpfc_max_els_tries = 3;
  
@@ -308062,7 +307909,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_chk_latt(struct lpfc_vport *vport)
  {
-@@ -92,7 +118,35 @@ lpfc_els_chk_latt(struct lpfc_vport *vpo
+@@ -92,7 +118,35 @@
        return 1;
  }
  
@@ -308099,7 +307946,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp,
                   uint16_t cmdSize, uint8_t retry,
                   struct lpfc_nodelist *ndlp, uint32_t did,
-@@ -150,7 +204,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -150,7 +204,7 @@
  
        icmd->un.elsreq64.bdl.addrHigh = putPaddrHigh(pbuflist->phys);
        icmd->un.elsreq64.bdl.addrLow = putPaddrLow(pbuflist->phys);
@@ -308108,7 +307955,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        icmd->un.elsreq64.remoteID = did;       /* DID */
        if (expectRsp) {
                icmd->un.elsreq64.bdl.bdeSize = (2 * sizeof(struct ulp_bde64));
-@@ -170,7 +224,11 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -170,7 +224,11 @@
                /* For ELS_REQUEST64_CR, use the VPI by default */
                icmd->ulpContext = vport->vpi;
                icmd->ulpCt_h = 0;
@@ -308121,7 +307968,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        }
  
        bpl = (struct ulp_bde64 *) pbuflist->virt;
-@@ -185,7 +243,7 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -185,7 +243,7 @@
                bpl->addrLow = le32_to_cpu(putPaddrLow(prsp->phys));
                bpl->addrHigh = le32_to_cpu(putPaddrHigh(prsp->phys));
                bpl->tus.f.bdeSize = FCELSSIZE;
@@ -308130,7 +307977,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                bpl->tus.w = le32_to_cpu(bpl->tus.w);
        }
  
-@@ -220,7 +278,8 @@ lpfc_prep_els_iocb(struct lpfc_vport *vp
+@@ -220,7 +278,8 @@
        return elsiocb;
  
  els_iocb_free_pbuf_exit:
@@ -308140,7 +307987,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        kfree(pbuflist);
  
  els_iocb_free_prsp_exit:
-@@ -233,6 +292,22 @@ els_iocb_free_pcmb_exit:
+@@ -233,6 +292,22 @@
        return NULL;
  }
  
@@ -308163,7 +308010,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_issue_fabric_reglogin(struct lpfc_vport *vport)
  {
-@@ -313,6 +388,26 @@ fail:
+@@ -313,6 +388,26 @@
        return -ENXIO;
  }
  
@@ -308190,7 +308037,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                           struct serv_parm *sp, IOCB_t *irsp)
-@@ -387,7 +482,7 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_v
+@@ -387,7 +482,7 @@
                 */
                list_for_each_entry_safe(np, next_np,
                                        &vport->fc_nodes, nlp_listp) {
@@ -308199,7 +308046,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                                continue;
                        if ((np->nlp_state != NLP_STE_NPR_NODE) ||
                                   !(np->nlp_flag & NLP_NPR_ADISC))
-@@ -416,9 +511,26 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_v
+@@ -416,9 +511,26 @@
        return 0;
  }
  
@@ -308229,7 +308076,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_cmpl_els_flogi_nport(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                          struct serv_parm *sp)
-@@ -516,6 +628,29 @@ fail:
+@@ -516,6 +628,29 @@
        return -ENXIO;
  }
  
@@ -308259,7 +308106,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                    struct lpfc_iocbq *rspiocb)
-@@ -526,6 +661,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -526,6 +661,7 @@
        struct lpfc_nodelist *ndlp = cmdiocb->context1;
        struct lpfc_dmabuf *pcmd = cmdiocb->context2, *prsp;
        struct serv_parm *sp;
@@ -308267,7 +308114,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        int rc;
  
        /* Check to see if link went down during discovery */
-@@ -576,7 +712,10 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -576,7 +712,10 @@
        prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list);
  
        sp = prsp->virt + sizeof(uint32_t);
@@ -308279,7 +308126,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        /* FLOGI completes successfully */
        lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
                         "0101 FLOGI completes sucessfully "
-@@ -584,6 +723,20 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phb
+@@ -584,6 +723,20 @@
                         irsp->un.ulpWord[4], sp->cmn.e_d_tov,
                         sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution);
  
@@ -308300,7 +308147,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        if (vport->port_state == LPFC_FLOGI) {
                /*
                 * If Common Service Parameters indicate Nport
-@@ -618,6 +771,28 @@ out:
+@@ -618,6 +771,28 @@
        lpfc_els_free_iocb(phba, cmdiocb);
  }
  
@@ -308329,7 +308176,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                     uint8_t retry)
-@@ -651,6 +826,10 @@ lpfc_issue_els_flogi(struct lpfc_vport *
+@@ -651,6 +826,10 @@
        sp = (struct serv_parm *) pcmd;
  
        /* Setup CSPs accordingly for Fabric */
@@ -308340,7 +308187,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        sp->cmn.e_d_tov = 0;
        sp->cmn.w2.r_a_tov = 0;
        sp->cls1.classValid = 0;
-@@ -694,6 +873,20 @@ lpfc_issue_els_flogi(struct lpfc_vport *
+@@ -694,6 +873,20 @@
        return 0;
  }
  
@@ -308361,7 +308208,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_abort_flogi(struct lpfc_hba *phba)
  {
-@@ -729,12 +922,32 @@ lpfc_els_abort_flogi(struct lpfc_hba *ph
+@@ -729,11 +922,31 @@
        return 0;
  }
  
@@ -308386,15 +308233,14 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  {
        struct lpfc_hba *phba = vport->phba;
        struct lpfc_nodelist *ndlp;
++
 +      if ((vport->cfg_enable_auth) &&
 +          (vport->security_service_state == SECURITY_OFFLINE))
 +              return 1;
-+
        vport->port_state = LPFC_FLOGI;
        lpfc_set_disctmo(vport);
-@@ -764,12 +977,39 @@ lpfc_initial_flogi(struct lpfc_vport *vp
+@@ -764,11 +977,38 @@
        return 1;
  }
  
@@ -308419,7 +308265,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  {
        struct lpfc_hba *phba = vport->phba;
        struct lpfc_nodelist *ndlp;
++
 +      if (vport->cfg_enable_auth) {
 +              if (lpfc_security_wait(vport)) {
 +                      lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
@@ -308430,11 +308276,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +                      return 0;
 +              }
 +      }
-+
        /* First look for the Fabric ndlp */
        ndlp = lpfc_findnode_did(vport, Fabric_DID);
-       if (!ndlp) {
-@@ -797,6 +1037,17 @@ lpfc_initial_fdisc(struct lpfc_vport *vp
+@@ -797,6 +1037,17 @@
        return 1;
  }
  
@@ -308452,7 +308297,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_more_plogi(struct lpfc_vport *vport)
  {
-@@ -819,6 +1070,37 @@ lpfc_more_plogi(struct lpfc_vport *vport
+@@ -819,6 +1070,37 @@
        return;
  }
  
@@ -308490,7 +308335,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_nodelist *
  lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp,
                         struct lpfc_nodelist *ndlp)
-@@ -922,6 +1204,17 @@ lpfc_plogi_confirm_nport(struct lpfc_hba
+@@ -922,6 +1204,17 @@
        return new_ndlp;
  }
  
@@ -308508,7 +308353,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_end_rscn(struct lpfc_vport *vport)
  {
-@@ -943,6 +1236,26 @@ lpfc_end_rscn(struct lpfc_vport *vport)
+@@ -943,6 +1236,26 @@
        }
  }
  
@@ -308535,7 +308380,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                    struct lpfc_iocbq *rspiocb)
-@@ -1048,6 +1361,27 @@ out:
+@@ -1048,6 +1361,27 @@
        return;
  }
  
@@ -308563,7 +308408,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
  {
-@@ -1106,6 +1440,19 @@ lpfc_issue_els_plogi(struct lpfc_vport *
+@@ -1106,6 +1440,19 @@
        return 0;
  }
  
@@ -308583,7 +308428,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                   struct lpfc_iocbq *rspiocb)
-@@ -1164,6 +1511,27 @@ out:
+@@ -1164,6 +1511,27 @@
        return;
  }
  
@@ -308611,7 +308456,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                    uint8_t retry)
-@@ -1233,6 +1601,92 @@ lpfc_issue_els_prli(struct lpfc_vport *v
+@@ -1233,6 +1601,92 @@
        return 0;
  }
  
@@ -308704,15 +308549,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_more_adisc(struct lpfc_vport *vport)
  {
-@@ -1252,23 +1706,27 @@ lpfc_more_adisc(struct lpfc_vport *vport
+@@ -1252,23 +1706,27 @@
                /* go thru NPR nodes and issue any remaining ELS ADISCs */
                sentadisc = lpfc_els_disc_adisc(vport);
        }
-+      if (!vport->num_disc_nodes)
-+              lpfc_adisc_done(vport);
-       return;
- }
+-      return;
+-}
+-
 -static void
 -lpfc_rscn_disc(struct lpfc_vport *vport)
 -{
@@ -308727,6 +308570,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 -      lpfc_end_rscn(vport);
 -}
 -
++      if (!vport->num_disc_nodes)
++              lpfc_adisc_done(vport);
++      return;
++}
++
 +/**
 + * lpfc_cmpl_els_adisc: Completion callback function for adisc.
 + * @phba: pointer to lpfc hba data structure.
@@ -308746,7 +308594,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                    struct lpfc_iocbq *rspiocb)
-@@ -1333,57 +1791,34 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phb
+@@ -1333,57 +1791,34 @@
                lpfc_disc_state_machine(vport, ndlp, cmdiocb,
                                        NLP_EVT_CMPL_ADISC);
  
@@ -308826,7 +308674,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                     uint8_t retry)
-@@ -1437,6 +1872,18 @@ lpfc_issue_els_adisc(struct lpfc_vport *
+@@ -1437,6 +1872,18 @@
        return 0;
  }
  
@@ -308845,7 +308693,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                   struct lpfc_iocbq *rspiocb)
-@@ -1502,6 +1949,26 @@ out:
+@@ -1502,6 +1949,26 @@
        return;
  }
  
@@ -308872,7 +308720,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                    uint8_t retry)
-@@ -1563,6 +2030,22 @@ lpfc_issue_els_logo(struct lpfc_vport *v
+@@ -1563,6 +2030,22 @@
        return 0;
  }
  
@@ -308895,7 +308743,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_cmd(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_iocbq *rspiocb)
-@@ -1587,6 +2070,28 @@ lpfc_cmpl_els_cmd(struct lpfc_hba *phba,
+@@ -1587,6 +2070,28 @@
        return;
  }
  
@@ -308924,7 +308772,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
  {
-@@ -1659,6 +2164,28 @@ lpfc_issue_els_scr(struct lpfc_vport *vp
+@@ -1659,6 +2164,28 @@
        return 0;
  }
  
@@ -308953,7 +308801,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
  {
-@@ -1748,6 +2275,18 @@ lpfc_issue_els_farpr(struct lpfc_vport *
+@@ -1748,6 +2275,18 @@
        return 0;
  }
  
@@ -308972,7 +308820,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_cancel_retry_delay_tmo(struct lpfc_vport *vport, struct lpfc_nodelist *nlp)
  {
-@@ -1775,25 +2314,36 @@ lpfc_cancel_retry_delay_tmo(struct lpfc_
+@@ -1775,25 +2314,36 @@
                        if (vport->port_state < LPFC_VPORT_READY) {
                                /* Check if there are more ADISCs to be sent */
                                lpfc_more_adisc(vport);
@@ -308989,6 +308837,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 -                              spin_unlock_irq(shost->host_lock);
 -                              lpfc_can_disctmo(vport);
 -                              lpfc_end_rscn(vport);
+-                      }
+-              }
+-      }
+-      return;
+-}
+-
 +                              if (vport->num_disc_nodes == 0) {
 +                                      spin_lock_irq(shost->host_lock);
 +                                      vport->fc_flag &= ~FC_NDISC_ACTIVE;
@@ -308996,12 +308850,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +                                      lpfc_can_disctmo(vport);
 +                                      lpfc_end_rscn(vport);
 +                              }
-                       }
-               }
-       }
-       return;
- }
++                      }
++              }
++      }
++      return;
++}
++
 +/**
 + * lpfc_els_retry_delay: Timer function with a ndlp delayed function timer.
 + * @ptr: holder for the pointer to the timer function associated data (ndlp).
@@ -309019,7 +308873,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_retry_delay(unsigned long ptr)
  {
-@@ -1822,6 +2372,15 @@ lpfc_els_retry_delay(unsigned long ptr)
+@@ -1822,6 +2372,15 @@
        return;
  }
  
@@ -309035,7 +308889,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp)
  {
-@@ -1884,6 +2443,27 @@ lpfc_els_retry_delay_handler(struct lpfc
+@@ -1884,6 +2443,27 @@
        return;
  }
  
@@ -309063,7 +308917,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
               struct lpfc_iocbq *rspiocb)
-@@ -1933,6 +2513,17 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -1933,6 +2513,17 @@
        case IOSTAT_LOCAL_REJECT:
                switch ((irsp->un.ulpWord[4] & 0xff)) {
                case IOERR_LOOP_OPEN_FAILURE:
@@ -309081,7 +308935,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                        if (cmd == ELS_CMD_PLOGI && cmdiocb->retry == 0)
                                delay = 1000;
                        retry = 1;
-@@ -2051,7 +2642,7 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2051,7 +2642,7 @@
                          (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID))
                          ) {
                                lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
@@ -309090,7 +308944,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                                                 "Fabric Detected Bad WWN\n",
                                                 stat.un.lsRjtError);
                                lpfc_vport_set_state(vport,
-@@ -2162,6 +2753,17 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2162,6 +2753,17 @@
                        lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
                        lpfc_issue_els_logo(vport, ndlp, cmdiocb->retry);
                        return 1;
@@ -309108,7 +308962,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                }
        }
        /* No retry ELS command <elsCmd> to remote NPORT <did> */
-@@ -2182,12 +2784,26 @@ lpfc_els_retry(struct lpfc_hba *phba, st
+@@ -2182,12 +2784,26 @@
        return 0;
  }
  
@@ -309136,7 +308990,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        if (!list_empty(&buf_ptr1->list)) {
                list_remove_head(&buf_ptr1->list, buf_ptr,
                                 struct lpfc_dmabuf,
-@@ -2200,6 +2816,18 @@ lpfc_els_free_data(struct lpfc_hba *phba
+@@ -2200,6 +2816,18 @@
        return 0;
  }
  
@@ -309155,7 +309009,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_free_bpl(struct lpfc_hba *phba, struct lpfc_dmabuf *buf_ptr)
  {
-@@ -2208,6 +2836,33 @@ lpfc_els_free_bpl(struct lpfc_hba *phba,
+@@ -2208,6 +2836,33 @@
        return 0;
  }
  
@@ -309189,7 +309043,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
  {
-@@ -2274,6 +2929,23 @@ lpfc_els_free_iocb(struct lpfc_hba *phba
+@@ -2274,6 +2929,23 @@
        return 0;
  }
  
@@ -309213,7 +309067,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                       struct lpfc_iocbq *rspiocb)
-@@ -2311,6 +2983,19 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *
+@@ -2311,6 +2983,19 @@
        return;
  }
  
@@ -309233,7 +309087,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
  {
-@@ -2332,6 +3017,22 @@ lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *
+@@ -2332,6 +3017,22 @@
        return;
  }
  
@@ -309256,7 +309110,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_iocbq *rspiocb)
-@@ -2487,6 +3188,31 @@ out:
+@@ -2487,6 +3188,31 @@
        return;
  }
  
@@ -309288,7 +309142,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
                 struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp,
-@@ -2601,6 +3327,28 @@ lpfc_els_rsp_acc(struct lpfc_vport *vpor
+@@ -2601,6 +3327,28 @@
        return 0;
  }
  
@@ -309317,7 +309171,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_rsp_reject(struct lpfc_vport *vport, uint32_t rejectError,
                    struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp,
-@@ -2660,6 +3408,25 @@ lpfc_els_rsp_reject(struct lpfc_vport *v
+@@ -2660,6 +3408,25 @@
        return 0;
  }
  
@@ -309343,7 +309197,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_rsp_adisc_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb,
                       struct lpfc_nodelist *ndlp)
-@@ -2716,6 +3483,25 @@ lpfc_els_rsp_adisc_acc(struct lpfc_vport
+@@ -2716,6 +3483,25 @@
        return 0;
  }
  
@@ -309369,7 +309223,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_rsp_prli_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb,
                      struct lpfc_nodelist *ndlp)
-@@ -2795,6 +3581,32 @@ lpfc_els_rsp_prli_acc(struct lpfc_vport 
+@@ -2795,6 +3581,32 @@
        return 0;
  }
  
@@ -309402,7 +309256,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format,
                      struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp)
-@@ -2875,6 +3687,25 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport 
+@@ -2875,6 +3687,25 @@
        return 0;
  }
  
@@ -309428,7 +309282,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_disc_adisc(struct lpfc_vport *vport)
  {
-@@ -2914,6 +3745,25 @@ lpfc_els_disc_adisc(struct lpfc_vport *v
+@@ -2914,6 +3745,25 @@
        return sentadisc;
  }
  
@@ -309454,7 +309308,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_disc_plogi(struct lpfc_vport *vport)
  {
-@@ -2954,6 +3804,15 @@ lpfc_els_disc_plogi(struct lpfc_vport *v
+@@ -2954,6 +3804,15 @@
        return sentplogi;
  }
  
@@ -309470,7 +309324,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_flush_rscn(struct lpfc_vport *vport)
  {
-@@ -2984,6 +3843,18 @@ lpfc_els_flush_rscn(struct lpfc_vport *v
+@@ -2984,6 +3843,18 @@
        vport->fc_rscn_flush = 0;
  }
  
@@ -309489,7 +309343,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did)
  {
-@@ -3019,27 +3890,21 @@ lpfc_rscn_payload_check(struct lpfc_vpor
+@@ -3019,27 +3890,21 @@
                while (payload_len) {
                        rscn_did.un.word = be32_to_cpu(*lp++);
                        payload_len -= sizeof(uint32_t);
@@ -309522,7 +309376,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                                goto return_did_out;
                        }
                }
-@@ -3053,6 +3918,17 @@ return_did_out:
+@@ -3053,6 +3918,17 @@
        return did;
  }
  
@@ -309540,7 +309394,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_rscn_recovery_check(struct lpfc_vport *vport)
  {
-@@ -3071,6 +3947,71 @@ lpfc_rscn_recovery_check(struct lpfc_vpo
+@@ -3071,6 +3947,71 @@
        return 0;
  }
  
@@ -309612,7 +309466,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_nodelist *ndlp)
-@@ -3096,6 +4037,10 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3096,6 +4037,10 @@
                         "0214 RSCN received Data: x%x x%x x%x x%x\n",
                         vport->fc_flag, payload_len, *lp,
                         vport->fc_rscn_id_cnt);
@@ -309623,7 +309477,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        for (i = 0; i < payload_len/sizeof(uint32_t); i++)
                fc_host_post_event(shost, fc_get_event_number(),
                        FCH_EVT_RSCN, lp[i]);
-@@ -3130,7 +4075,7 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3130,7 +4075,7 @@
                if (rscn_id == hba_id) {
                        /* ALL NPortIDs in RSCN are on HBA */
                        lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
@@ -309632,7 +309486,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                                         "Data: x%x x%x x%x x%x\n",
                                         vport->fc_flag, payload_len,
                                         *lp, vport->fc_rscn_id_cnt);
-@@ -3241,6 +4186,22 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vpo
+@@ -3241,6 +4186,22 @@
        return lpfc_els_handle_rscn(vport);
  }
  
@@ -309655,7 +309509,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_els_handle_rscn(struct lpfc_vport *vport)
  {
-@@ -3313,6 +4274,31 @@ lpfc_els_handle_rscn(struct lpfc_vport *
+@@ -3313,6 +4274,31 @@
        return 0;
  }
  
@@ -309687,7 +309541,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                   struct lpfc_nodelist *ndlp)
-@@ -3402,6 +4388,22 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vp
+@@ -3402,6 +4388,22 @@
        return 0;
  }
  
@@ -309710,7 +309564,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_rnid(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_nodelist *ndlp)
-@@ -3441,6 +4443,19 @@ lpfc_els_rcv_rnid(struct lpfc_vport *vpo
+@@ -3441,6 +4443,19 @@
        return 0;
  }
  
@@ -309730,7 +309584,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_lirr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_nodelist *ndlp)
-@@ -3456,6 +4471,25 @@ lpfc_els_rcv_lirr(struct lpfc_vport *vpo
+@@ -3456,6 +4471,25 @@
        return 0;
  }
  
@@ -309756,7 +309610,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_els_rsp_rps_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
  {
-@@ -3531,6 +4565,24 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba *ph
+@@ -3531,6 +4565,24 @@
        return;
  }
  
@@ -309781,7 +309635,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_rps(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                 struct lpfc_nodelist *ndlp)
-@@ -3544,14 +4596,9 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3544,14 +4596,9 @@
        struct ls_rjt stat;
  
        if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
@@ -309799,7 +309653,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  
        pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
        lp = (uint32_t *) pcmd->virt;
-@@ -3584,6 +4631,9 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3584,6 +4631,9 @@
                        mempool_free(mbox, phba->mbox_mem_pool);
                }
        }
@@ -309809,7 +309663,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        stat.un.b.lsRjtRsvd0 = 0;
        stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
        stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA;
-@@ -3592,6 +4642,25 @@ lpfc_els_rcv_rps(struct lpfc_vport *vpor
+@@ -3592,6 +4642,25 @@
        return 0;
  }
  
@@ -309835,7 +309689,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rsp_rpl_acc(struct lpfc_vport *vport, uint16_t cmdsize,
                     struct lpfc_iocbq *oldiocb, struct lpfc_nodelist *ndlp)
-@@ -3645,6 +4714,22 @@ lpfc_els_rsp_rpl_acc(struct lpfc_vport *
+@@ -3645,6 +4714,22 @@
        return 0;
  }
  
@@ -309858,7 +309712,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_rpl(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                 struct lpfc_nodelist *ndlp)
-@@ -3658,12 +4743,15 @@ lpfc_els_rcv_rpl(struct lpfc_vport *vpor
+@@ -3658,12 +4743,15 @@
  
        if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
            (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) {
@@ -309874,7 +309728,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        }
  
        pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
-@@ -3685,6 +4773,30 @@ lpfc_els_rcv_rpl(struct lpfc_vport *vpor
+@@ -3685,6 +4773,30 @@
        return 0;
  }
  
@@ -309905,7 +309759,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                  struct lpfc_nodelist *ndlp)
-@@ -3744,6 +4856,20 @@ lpfc_els_rcv_farp(struct lpfc_vport *vpo
+@@ -3744,6 +4856,20 @@
        return 0;
  }
  
@@ -309926,7 +309780,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                   struct lpfc_nodelist  *ndlp)
-@@ -3768,6 +4894,25 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vp
+@@ -3768,6 +4894,25 @@
        return 0;
  }
  
@@ -309952,7 +309806,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_els_rcv_fan(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
                 struct lpfc_nodelist *fan_ndlp)
-@@ -3797,6 +4942,16 @@ lpfc_els_rcv_fan(struct lpfc_vport *vpor
+@@ -3797,6 +4942,16 @@
        return 0;
  }
  
@@ -309969,7 +309823,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_timeout(unsigned long ptr)
  {
-@@ -3816,6 +4971,15 @@ lpfc_els_timeout(unsigned long ptr)
+@@ -3816,6 +4971,15 @@
        return;
  }
  
@@ -309985,7 +309839,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_timeout_handler(struct lpfc_vport *vport)
  {
-@@ -3828,10 +4992,6 @@ lpfc_els_timeout_handler(struct lpfc_vpo
+@@ -3828,10 +4992,6 @@
        uint32_t timeout;
        uint32_t remote_ID = 0xffffffff;
  
@@ -309996,7 +309850,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        spin_lock_irq(&phba->hbalock);
        timeout = (uint32_t)(phba->fc_ratov << 1);
  
-@@ -3886,6 +5046,26 @@ lpfc_els_timeout_handler(struct lpfc_vpo
+@@ -3886,6 +5046,26 @@
                mod_timer(&vport->els_tmofunc, jiffies + HZ * timeout);
  }
  
@@ -310023,7 +309877,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_flush_cmd(struct lpfc_vport *vport)
  {
-@@ -3948,6 +5128,23 @@ lpfc_els_flush_cmd(struct lpfc_vport *vp
+@@ -3948,6 +5128,23 @@
        return;
  }
  
@@ -310047,10 +309901,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_flush_all_cmd(struct lpfc_hba  *phba)
  {
-@@ -3993,6 +5190,524 @@ lpfc_els_flush_all_cmd(struct lpfc_hba  
+@@ -3992,6 +5189,524 @@
+       return;
  }
  
- static void
++static void
 +lpfc_els_rcv_auth_neg(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
 +                struct lpfc_nodelist *ndlp)
 +{
@@ -310568,11 +310423,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 + * IOCB is then used to invoke the proper routine and to set up proper state
 + * of the discovery state machine.
 + **/
-+static void
+ static void
  lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                      struct lpfc_vport *vport, struct lpfc_iocbq *elsiocb)
- {
-@@ -4059,8 +5774,6 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4059,8 +5774,6 @@
        }
  
        phba->fc_stat.elsRcvFrame++;
@@ -310581,7 +310435,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  
        elsiocb->context1 = lpfc_nlp_get(ndlp);
        elsiocb->vport = vport;
-@@ -4081,6 +5794,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4081,6 +5794,7 @@
                phba->fc_stat.elsRcvPLOGI++;
                ndlp = lpfc_plogi_confirm_nport(phba, payload, ndlp);
  
@@ -310589,7 +310443,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                if (vport->port_state < LPFC_DISC_AUTH) {
                        if (!(phba->pport->fc_flag & FC_PT2PT) ||
                                (phba->pport->fc_flag & FC_PT2PT_PLOGI)) {
-@@ -4118,6 +5832,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4118,6 +5832,7 @@
                        did, vport->port_state, ndlp->nlp_flag);
  
                phba->fc_stat.elsRcvLOGO++;
@@ -310597,7 +310451,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                if (vport->port_state < LPFC_DISC_AUTH) {
                        rjt_err = LSRJT_UNABLE_TPC;
                        break;
-@@ -4130,6 +5845,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4130,6 +5845,7 @@
                        did, vport->port_state, ndlp->nlp_flag);
  
                phba->fc_stat.elsRcvPRLO++;
@@ -310605,7 +310459,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                if (vport->port_state < LPFC_DISC_AUTH) {
                        rjt_err = LSRJT_UNABLE_TPC;
                        break;
-@@ -4147,6 +5863,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4147,6 +5863,7 @@
                        "RCV ADISC:       did:x%x/ste:x%x flg:x%x",
                        did, vport->port_state, ndlp->nlp_flag);
  
@@ -310613,7 +310467,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                phba->fc_stat.elsRcvADISC++;
                if (vport->port_state < LPFC_DISC_AUTH) {
                        rjt_err = LSRJT_UNABLE_TPC;
-@@ -4244,6 +5961,48 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4244,6 +5961,48 @@
                if (newnode)
                        lpfc_nlp_put(ndlp);
                break;
@@ -310662,7 +310516,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        default:
                lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL,
                        "RCV ELS cmd:     cmd:x%x did:x%x/ste:x%x",
-@@ -4270,6 +6029,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *p
+@@ -4270,6 +6029,8 @@
                        NULL);
        }
  
@@ -310671,7 +310525,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        return;
  
  dropit:
-@@ -4282,6 +6043,19 @@ dropit:
+@@ -4282,6 +6043,19 @@
        phba->fc_stat.elsRcvDrop++;
  }
  
@@ -310691,7 +310545,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_vport *
  lpfc_find_vport_by_vpid(struct lpfc_hba *phba, uint16_t vpi)
  {
-@@ -4299,6 +6073,18 @@ lpfc_find_vport_by_vpid(struct lpfc_hba 
+@@ -4299,6 +6073,18 @@
        return NULL;
  }
  
@@ -310710,7 +310564,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                     struct lpfc_iocbq *elsiocb)
-@@ -4309,6 +6095,7 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4309,6 +6095,7 @@
        struct lpfc_dmabuf *bdeBuf1 = elsiocb->context2;
        struct lpfc_dmabuf *bdeBuf2 = elsiocb->context3;
  
@@ -310718,7 +310572,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        elsiocb->context2 = NULL;
        elsiocb->context3 = NULL;
  
-@@ -4356,8 +6143,6 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4356,8 +6143,6 @@
         * The different unsolicited event handlers would tell us
         * if they are done with "mp" by setting context2 to NULL.
         */
@@ -310727,7 +310581,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        if (elsiocb->context2) {
                lpfc_in_buf_free(phba, (struct lpfc_dmabuf *)elsiocb->context2);
                elsiocb->context2 = NULL;
-@@ -4376,6 +6161,19 @@ lpfc_els_unsol_event(struct lpfc_hba *ph
+@@ -4376,6 +6161,19 @@
        }
  }
  
@@ -310747,7 +310601,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport)
  {
-@@ -4434,6 +6232,18 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *ph
+@@ -4434,6 +6232,18 @@
        return;
  }
  
@@ -310766,7 +310620,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
  {
-@@ -4478,7 +6288,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba 
+@@ -4478,7 +6288,7 @@
        } else {
                if (vport == phba->pport)
                        lpfc_issue_fabric_reglogin(vport);
@@ -310775,7 +310629,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
                        lpfc_do_scr_ns_plogi(phba, vport);
        }
  
-@@ -4491,6 +6301,15 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba 
+@@ -4491,6 +6301,15 @@
        return;
  }
  
@@ -310791,7 +310645,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_register_new_vport(struct lpfc_hba *phba, struct lpfc_vport *vport,
                        struct lpfc_nodelist *ndlp)
-@@ -4531,6 +6350,26 @@ mbox_err_exit:
+@@ -4531,6 +6350,26 @@
        return;
  }
  
@@ -310818,7 +310672,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                    struct lpfc_iocbq *rspiocb)
-@@ -4542,6 +6381,9 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phb
+@@ -4542,6 +6381,9 @@
        struct lpfc_nodelist *next_np;
        IOCB_t *irsp = &rspiocb->iocb;
        struct lpfc_iocbq *piocb;
@@ -310828,7 +310682,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  
        lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
                         "0123 FDISC completes. x%x/x%x prevDID: x%x\n",
-@@ -4565,58 +6407,95 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phb
+@@ -4565,58 +6407,95 @@
                        goto out;
                /* FDISC failed */
                lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
@@ -310840,6 +310694,47 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 -              lpfc_nlp_put(ndlp);
 -              /* giving up on FDISC. Cancel discovery timer */
 -              lpfc_can_disctmo(vport);
+-      } else {
+-              spin_lock_irq(shost->host_lock);
+-              vport->fc_flag |= FC_FABRIC;
+-              if (vport->phba->fc_topology == TOPOLOGY_LOOP)
+-                      vport->fc_flag |=  FC_PUBLIC_LOOP;
+-              spin_unlock_irq(shost->host_lock);
+-
+-              vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
+-              lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
+-              if ((vport->fc_prevDID != vport->fc_myDID) &&
+-                      !(vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)) {
+-                      /* If our NportID changed, we need to ensure all
+-                       * remaining NPORTs get unreg_login'ed so we can
+-                       * issue unreg_vpi.
+-                       */
+-                      list_for_each_entry_safe(np, next_np,
+-                              &vport->fc_nodes, nlp_listp) {
+-                              if (!NLP_CHK_NODE_ACT(ndlp) ||
+-                                  (np->nlp_state != NLP_STE_NPR_NODE) ||
+-                                  !(np->nlp_flag & NLP_NPR_ADISC))
+-                                      continue;
+-                              spin_lock_irq(shost->host_lock);
+-                              np->nlp_flag &= ~NLP_NPR_ADISC;
+-                              spin_unlock_irq(shost->host_lock);
+-                              lpfc_unreg_rpi(vport, np);
+-                      }
+-                      lpfc_mbx_unreg_vpi(vport);
+-                      spin_lock_irq(shost->host_lock);
+-                      vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
+-                      spin_unlock_irq(shost->host_lock);
+-              }
+-
+-              if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
+-                      lpfc_register_new_vport(phba, vport, ndlp);
+-              else
+-                      lpfc_do_scr_ns_plogi(phba, vport);
+-
+-              /* Unconditionaly kick off releasing fabric node for vports */
+-              lpfc_nlp_put(ndlp);
+-      }
+-
 +              goto fdisc_failed;
 +      }
 +      prsp = list_get_first(&pcmd->list, struct lpfc_dmabuf, list);
@@ -310852,12 +310747,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +              u64_to_wwn(AUTH_FABRIC_WWN, wwpn.u.wwn);
 +              if (lpfc_get_auth_config(ndlp, &wwpn))
 +                      goto fdisc_failed;
-       } else {
--              spin_lock_irq(shost->host_lock);
--              vport->fc_flag |= FC_FABRIC;
--              if (vport->phba->fc_topology == TOPOLOGY_LOOP)
--                      vport->fc_flag |=  FC_PUBLIC_LOOP;
--              spin_unlock_irq(shost->host_lock);
++      } else {
 +              vport->auth.security_active = 0;
 +              if (sp->cmn.security) {
 +                      lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
@@ -310872,27 +310762,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +      if (vport->phba->fc_topology == TOPOLOGY_LOOP)
 +              vport->fc_flag |=  FC_PUBLIC_LOOP;
 +      spin_unlock_irq(shost->host_lock);
--              vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
--              lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
--              if ((vport->fc_prevDID != vport->fc_myDID) &&
--                      !(vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)) {
--                      /* If our NportID changed, we need to ensure all
--                       * remaining NPORTs get unreg_login'ed so we can
--                       * issue unreg_vpi.
--                       */
--                      list_for_each_entry_safe(np, next_np,
--                              &vport->fc_nodes, nlp_listp) {
--                              if (!NLP_CHK_NODE_ACT(ndlp) ||
--                                  (np->nlp_state != NLP_STE_NPR_NODE) ||
--                                  !(np->nlp_flag & NLP_NPR_ADISC))
--                                      continue;
--                              spin_lock_irq(shost->host_lock);
--                              np->nlp_flag &= ~NLP_NPR_ADISC;
--                              spin_unlock_irq(shost->host_lock);
--                              lpfc_unreg_rpi(vport, np);
--                      }
--                      lpfc_mbx_unreg_vpi(vport);
++
 +      vport->fc_myDID = irsp->un.ulpWord[4] & Mask_DID;
 +      lpfc_vport_set_state(vport, FC_VPORT_ACTIVE);
 +      if ((vport->fc_prevDID != vport->fc_myDID) &&
@@ -310907,26 +310777,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +                          (np->nlp_state != NLP_STE_NPR_NODE) ||
 +                          !(np->nlp_flag & NLP_NPR_ADISC))
 +                              continue;
-                       spin_lock_irq(shost->host_lock);
--                      vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
++                      spin_lock_irq(shost->host_lock);
 +                      np->nlp_flag &= ~NLP_NPR_ADISC;
-                       spin_unlock_irq(shost->host_lock);
++                      spin_unlock_irq(shost->host_lock);
 +                      lpfc_unreg_rpi(vport, np);
-               }
--
--              if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
--                      lpfc_register_new_vport(phba, vport, ndlp);
--              else
--                      lpfc_do_scr_ns_plogi(phba, vport);
--
--              /* Unconditionaly kick off releasing fabric node for vports */
--              lpfc_nlp_put(ndlp);
++              }
 +              lpfc_mbx_unreg_vpi(vport);
 +              spin_lock_irq(shost->host_lock);
 +              vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
 +              spin_unlock_irq(shost->host_lock);
-       }
++      }
++
 +      if (vport->fc_flag & FC_VPORT_NEEDS_REG_VPI)
 +              lpfc_register_new_vport(phba, vport, ndlp);
 +      else if (!vport->cfg_enable_auth)
@@ -310964,7 +310825,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                     uint8_t retry)
-@@ -4660,6 +6539,10 @@ lpfc_issue_els_fdisc(struct lpfc_vport *
+@@ -4660,6 +6539,10 @@
        sp->cls2.seqDelivery = 1;
        sp->cls3.seqDelivery = 1;
  
@@ -310975,7 +310836,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        pcmd += sizeof(uint32_t); /* CSP Word 2 */
        pcmd += sizeof(uint32_t); /* CSP Word 3 */
        pcmd += sizeof(uint32_t); /* CSP Word 4 */
-@@ -4691,6 +6574,20 @@ lpfc_issue_els_fdisc(struct lpfc_vport *
+@@ -4691,6 +6574,20 @@
        return 0;
  }
  
@@ -310996,7 +310857,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_els_npiv_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                        struct lpfc_iocbq *rspiocb)
-@@ -4712,6 +6609,22 @@ lpfc_cmpl_els_npiv_logo(struct lpfc_hba 
+@@ -4712,6 +6609,22 @@
        lpfc_nlp_put(ndlp);
  }
  
@@ -311019,7 +310880,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_issue_els_npiv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
  {
-@@ -4757,6 +6670,17 @@ lpfc_issue_els_npiv_logo(struct lpfc_vpo
+@@ -4757,6 +6670,17 @@
        return 0;
  }
  
@@ -311037,7 +310898,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_fabric_block_timeout(unsigned long ptr)
  {
-@@ -4775,6 +6699,16 @@ lpfc_fabric_block_timeout(unsigned long 
+@@ -4775,6 +6699,16 @@
        return;
  }
  
@@ -311054,7 +310915,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_resume_fabric_iocbs(struct lpfc_hba *phba)
  {
-@@ -4824,6 +6758,15 @@ repeat:
+@@ -4824,6 +6758,15 @@
        return;
  }
  
@@ -311070,7 +310931,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_unblock_fabric_iocbs(struct lpfc_hba *phba)
  {
-@@ -4833,6 +6776,15 @@ lpfc_unblock_fabric_iocbs(struct lpfc_hb
+@@ -4833,6 +6776,15 @@
        return;
  }
  
@@ -311086,7 +310947,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_block_fabric_iocbs(struct lpfc_hba *phba)
  {
-@@ -4846,6 +6798,19 @@ lpfc_block_fabric_iocbs(struct lpfc_hba 
+@@ -4846,6 +6798,19 @@
        return;
  }
  
@@ -311106,7 +310967,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_cmpl_fabric_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
        struct lpfc_iocbq *rspiocb)
-@@ -4892,6 +6857,30 @@ lpfc_cmpl_fabric_iocb(struct lpfc_hba *p
+@@ -4892,6 +6857,30 @@
        }
  }
  
@@ -311137,7 +310998,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_issue_fabric_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *iocb)
  {
-@@ -4937,7 +6926,17 @@ lpfc_issue_fabric_iocb(struct lpfc_hba *
+@@ -4937,7 +6926,17 @@
        return ret;
  }
  
@@ -311156,7 +311017,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  static void lpfc_fabric_abort_vport(struct lpfc_vport *vport)
  {
        LIST_HEAD(completions);
-@@ -4967,10 +6966,21 @@ static void lpfc_fabric_abort_vport(stru
+@@ -4967,10 +6966,21 @@
        }
  }
  
@@ -311179,7 +311040,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
        struct lpfc_iocbq *tmp_iocb, *piocb;
        struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING];
        IOCB_t *cmd;
-@@ -4996,6 +7006,17 @@ void lpfc_fabric_abort_nport(struct lpfc
+@@ -4996,6 +7006,17 @@
        }
  }
  
@@ -311197,7 +311058,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
  void lpfc_fabric_abort_hba(struct lpfc_hba *phba)
  {
        LIST_HEAD(completions);
-@@ -5016,3 +7037,192 @@ void lpfc_fabric_abort_hba(struct lpfc_h
+@@ -5016,3 +7037,192 @@
                (piocb->iocb_cmpl) (phba, piocb, piocb);
        }
  }
@@ -311390,9 +311251,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_els.c linux-2.6.27.19-5.1/drivers
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hbadisc.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hbadisc.c       2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_hbadisc.c
+--- a/drivers/scsi/lpfc/lpfc_hbadisc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_hbadisc.c Wed May 06 16:56:34 2009 +0100
 @@ -30,6 +30,7 @@
  #include <scsi/scsi_transport_fc.h>
  
@@ -311409,7 +311270,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
  /* AlpaArray for assignment of scsid for scan-down and bind_method */
  static uint8_t lpfcAlpaArray[] = {
-@@ -58,6 +60,47 @@ static uint8_t lpfcAlpaArray[] = {
+@@ -58,6 +60,47 @@
  
  static void lpfc_disc_timeout_handler(struct lpfc_vport *);
  static void lpfc_disc_flush_list(struct lpfc_vport *vport);
@@ -311457,7 +311318,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
  void
  lpfc_terminate_rport_io(struct fc_rport *rport)
-@@ -77,7 +120,7 @@ lpfc_terminate_rport_io(struct fc_rport 
+@@ -77,7 +120,7 @@
                return;
        }
  
@@ -311466,7 +311327,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        lpfc_debugfs_disc_trc(ndlp->vport, LPFC_DISC_TRC_RPORT,
                "rport terminate: sid:x%x did:x%x flg:x%x",
-@@ -88,14 +131,6 @@ lpfc_terminate_rport_io(struct fc_rport 
+@@ -88,14 +131,6 @@
                        &phba->sli.ring[phba->sli.fcp_ring],
                        ndlp->nlp_sid, 0, LPFC_CTX_TGT);
        }
@@ -311481,7 +311342,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  }
  
  /*
-@@ -215,8 +250,16 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -215,8 +250,16 @@
                return;
        }
  
@@ -311499,7 +311360,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        if (ndlp->nlp_type & NLP_FABRIC) {
                /* We will clean up these Nodes in linkup */
-@@ -237,8 +280,6 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -237,8 +280,6 @@
                lpfc_sli_abort_iocb(vport, &phba->sli.ring[phba->sli.fcp_ring],
                                    ndlp->nlp_sid, 0, LPFC_CTX_TGT);
        }
@@ -311508,7 +311369,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        if (warn_on) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
-@@ -276,6 +317,124 @@ lpfc_dev_loss_tmo_handler(struct lpfc_no
+@@ -276,6 +317,124 @@
                lpfc_disc_state_machine(vport, ndlp, NULL, NLP_EVT_DEVICE_RM);
  }
  
@@ -311633,23 +311494,23 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  static void
  lpfc_work_list_done(struct lpfc_hba *phba)
  {
-@@ -299,6 +458,15 @@ lpfc_work_list_done(struct lpfc_hba *phb
-                        */
-                       lpfc_nlp_put(ndlp);
-                       break;
-+              case LPFC_EVT_REAUTH:
-+                      ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
-+                      lpfc_reauthentication_handler(ndlp);
+@@ -293,6 +452,15 @@
+               case LPFC_EVT_ELS_RETRY:
+                       ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
+                       lpfc_els_retry_delay_handler(ndlp);
 +                      free_evt = 0; /* evt is part of ndlp */
 +                      /* decrement the node reference count held
 +                       * for this queued work
 +                       */
 +                      lpfc_nlp_put(ndlp);
 +                      break;
-               case LPFC_EVT_DEV_LOSS:
-                       ndlp = (struct lpfc_nodelist *)(evtp->evt_arg1);
-                       lpfc_dev_loss_tmo_handler(ndlp);
-@@ -347,6 +515,10 @@ lpfc_work_list_done(struct lpfc_hba *phb
++              case LPFC_EVT_REAUTH:
++                      ndlp = (struct lpfc_nodelist *) (evtp->evt_arg1);
++                      lpfc_reauthentication_handler(ndlp);
+                       free_evt = 0; /* evt is part of ndlp */
+                       /* decrement the node reference count held
+                        * for this queued work
+@@ -347,6 +515,10 @@
                        lpfc_unblock_mgmt_io(phba);
                        complete((struct completion *)(evtp->evt_arg2));
                        break;
@@ -311660,7 +311521,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                }
                if (free_evt)
                        kfree(evtp);
-@@ -371,6 +543,7 @@ lpfc_work_done(struct lpfc_hba *phba)
+@@ -371,6 +543,7 @@
        spin_unlock_irq(&phba->hbalock);
  
        if (ha_copy & HA_ERATT)
@@ -311668,7 +311529,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                lpfc_handle_eratt(phba);
  
        if (ha_copy & HA_MBATT)
-@@ -378,6 +551,7 @@ lpfc_work_done(struct lpfc_hba *phba)
+@@ -378,6 +551,7 @@
  
        if (ha_copy & HA_LATT)
                lpfc_handle_latt(phba);
@@ -311676,7 +311537,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        vports = lpfc_create_vport_work_array(phba);
        if (vports != NULL)
                for(i = 0; i <= phba->max_vpi; i++) {
-@@ -462,20 +636,25 @@ lpfc_do_work(void *p)
+@@ -462,20 +636,25 @@
        set_user_nice(current, -20);
        phba->data_flags = 0;
  
@@ -311706,7 +311567,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        return 0;
  }
  
-@@ -525,6 +704,9 @@ lpfc_cleanup_rpis(struct lpfc_vport *vpo
+@@ -525,6 +704,9 @@
                        continue;
                if (ndlp->nlp_state == NLP_STE_UNUSED_NODE)
                        continue;
@@ -311716,7 +311577,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) ||
                        ((vport->port_type == LPFC_NPIV_PORT) &&
                        (ndlp->nlp_DID == NameServer_DID)))
-@@ -573,7 +755,25 @@ lpfc_linkdown_port(struct lpfc_vport *vp
+@@ -573,7 +755,25 @@
                vport->port_state, vport->fc_ns_retry, vport->fc_flag);
  
        lpfc_port_link_failure(vport);
@@ -311725,12 +311586,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
 +              vport->auth.auth_msg_state = LPFC_AUTH_NONE;
 +      }
 +}
-+
 +void
 +lpfc_port_auth_failed(struct lpfc_nodelist *ndlp, enum auth_state fail_state)
 +{
 +      struct lpfc_vport *vport = ndlp->vport;
++
 +      vport->auth.auth_state = fail_state;
 +      vport->auth.auth_msg_state = LPFC_AUTH_NONE;
 +      lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
@@ -311742,7 +311603,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  }
  
  int
-@@ -678,7 +878,6 @@ lpfc_linkup_port(struct lpfc_vport *vpor
+@@ -678,7 +878,6 @@
                return;
  
        fc_host_post_event(shost, fc_get_event_number(), FCH_EVT_LINKUP, 0);
@@ -311750,7 +311611,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        spin_lock_irq(shost->host_lock);
        vport->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI | FC_ABORT_DISCOVERY |
                            FC_RSCN_MODE | FC_NLP_MORE | FC_RSCN_DISCOVERY);
-@@ -689,6 +888,8 @@ lpfc_linkup_port(struct lpfc_vport *vpor
+@@ -689,6 +888,8 @@
        if (vport->fc_flag & FC_LBIT)
                lpfc_linkup_cleanup_nodes(vport);
  
@@ -311759,7 +311620,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  }
  
  static int
-@@ -808,9 +1009,12 @@ lpfc_mbx_cmpl_local_config_link(struct l
+@@ -808,9 +1009,12 @@
        /* Start discovery by sending a FLOGI. port_state is identically
         * LPFC_FLOGI while waiting for FLOGI cmpl
         */
@@ -311774,7 +311635,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        return;
  
  out:
-@@ -1013,14 +1217,10 @@ out:
+@@ -1013,14 +1217,10 @@
  }
  
  static void
@@ -311790,10 +311651,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        spin_lock_irq(&phba->hbalock);
        psli->sli_flag |= LPFC_PROCESS_LA;
        control = readl(phba->HCregaddr);
-@@ -1030,6 +1230,15 @@ lpfc_mbx_issue_link_down(struct lpfc_hba
+@@ -1029,6 +1229,15 @@
+       readl(phba->HCregaddr); /* flush */
        spin_unlock_irq(&phba->hbalock);
  }
++
 +static void
 +lpfc_mbx_issue_link_down(struct lpfc_hba *phba)
 +{
@@ -311802,11 +311664,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
 +      /* turn on Link Attention interrupts - no CLEAR_LA needed */
 +}
 +
-+
  /*
   * This routine handles processing a READ_LA mailbox
-  * command upon completion. It is setup in the LPFC_MBOXQ
-@@ -1077,8 +1286,12 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1077,8 +1286,12 @@
        }
  
        phba->fc_eventTag = la->eventTag;
@@ -311820,7 +311681,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                phba->fc_stat.LinkUp++;
                if (phba->link_flag & LS_LOOPBACK_MODE) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
-@@ -1090,13 +1303,15 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1090,13 +1303,15 @@
                } else {
                        lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
                                        "1303 Link Up Event x%x received "
@@ -311839,7 +311700,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                phba->fc_stat.LinkDown++;
                if (phba->link_flag & LS_LOOPBACK_MODE) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
-@@ -1109,11 +1324,46 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *p
+@@ -1109,11 +1324,46 @@
                else {
                        lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
                                "1305 Link Down Event x%x received "
@@ -311855,18 +311716,18 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
 +                      phba->fc_stat.LinkDown++;
 +                      lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
 +                              "1312 Link Down Event x%x received "
-+                              "Data: x%x x%x x%x\n",
-+                              la->eventTag, phba->fc_eventTag,
-+                              phba->pport->port_state, vport->fc_flag);
+                               "Data: x%x x%x x%x\n",
+                               la->eventTag, phba->fc_eventTag,
+                               phba->pport->port_state, vport->fc_flag);
 +                      lpfc_mbx_issue_link_down(phba);
 +              } else
 +                      lpfc_enable_la(phba);
 +
 +              lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
 +                              "1310 Menlo Maint Mode Link up Event x%x rcvd "
-                               "Data: x%x x%x x%x\n",
-                               la->eventTag, phba->fc_eventTag,
-                               phba->pport->port_state, vport->fc_flag);
++                              "Data: x%x x%x x%x\n",
++                              la->eventTag, phba->fc_eventTag,
++                              phba->pport->port_state, vport->fc_flag);
 +              /*
 +               * The cmnd that triggered this will be waiting for this
 +               * signal.
@@ -311887,7 +311748,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        }
  
  lpfc_mbx_cmpl_read_la_free_mbuf:
-@@ -1177,7 +1427,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba 
+@@ -1177,7 +1427,7 @@
                scsi_host_put(shost);
  }
  
@@ -311896,7 +311757,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  lpfc_mbx_unreg_vpi(struct lpfc_vport *vport)
  {
        struct lpfc_hba  *phba = vport->phba;
-@@ -1186,7 +1436,7 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vp
+@@ -1186,7 +1436,7 @@
  
        mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
        if (!mbox)
@@ -311905,7 +311766,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        lpfc_unreg_vpi(phba, vport->vpi, mbox);
        mbox->vport = vport;
-@@ -1197,7 +1447,9 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vp
+@@ -1197,7 +1447,9 @@
                                 "1800 Could not issue unreg_vpi\n");
                mempool_free(mbox, phba->mbox_mem_pool);
                vport->unreg_vpi_cmpl = VPORT_ERROR;
@@ -311915,7 +311776,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  }
  
  static void
-@@ -1253,8 +1505,6 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lp
+@@ -1253,8 +1505,6 @@
        MAILBOX_t *mb = &pmb->mb;
        struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1);
        struct lpfc_nodelist *ndlp;
@@ -311924,7 +311785,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        ndlp = (struct lpfc_nodelist *) pmb->context2;
        pmb->context1 = NULL;
-@@ -1292,33 +1542,9 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lp
+@@ -1292,33 +1542,9 @@
        ndlp->nlp_type |= NLP_FABRIC;
        lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
  
@@ -311961,7 +311822,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        lpfc_mbuf_free(phba, mp->virt, mp->phys);
        kfree(mp);
-@@ -1553,6 +1779,22 @@ lpfc_nlp_state_cleanup(struct lpfc_vport
+@@ -1553,6 +1779,22 @@
                 */
                lpfc_register_remote_port(vport, ndlp);
        }
@@ -311984,7 +311845,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        /*
         * if we added to Mapped list, but the remote port
         * registration failed or assigned a target id outside
-@@ -1665,6 +1907,42 @@ lpfc_disable_node(struct lpfc_vport *vpo
+@@ -1665,6 +1907,42 @@
        lpfc_nlp_state_cleanup(vport, ndlp, ndlp->nlp_state,
                                NLP_STE_UNUSED_NODE);
  }
@@ -312027,7 +311888,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
  struct lpfc_nodelist *
  lpfc_enable_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
-@@ -1705,17 +1983,7 @@ lpfc_enable_node(struct lpfc_vport *vpor
+@@ -1705,17 +1983,7 @@
        /* re-initialize ndlp except of ndlp linked list pointer */
        memset((((char *)ndlp) + sizeof (struct list_head)), 0,
                sizeof (struct lpfc_nodelist) - sizeof (struct list_head));
@@ -312046,7 +311907,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        spin_unlock_irqrestore(&phba->ndlp_lock, flags);
  
-@@ -1978,9 +2246,13 @@ lpfc_unreg_all_rpis(struct lpfc_vport *v
+@@ -1978,9 +2246,13 @@
                mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
                mbox->context1 = NULL;
                rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
@@ -312062,7 +311923,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        }
  }
  
-@@ -1998,12 +2270,14 @@ lpfc_unreg_default_rpis(struct lpfc_vpor
+@@ -1998,12 +2270,14 @@
                mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
                mbox->context1 = NULL;
                rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
@@ -312081,7 +311942,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        }
  }
  
-@@ -2077,9 +2351,12 @@ lpfc_cleanup_node(struct lpfc_vport *vpo
+@@ -2077,9 +2351,12 @@
  
        ndlp->nlp_last_elscmd = 0;
        del_timer_sync(&ndlp->nlp_delayfunc);
@@ -312094,7 +311955,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        lpfc_unreg_rpi(vport, ndlp);
  
-@@ -2303,6 +2580,10 @@ lpfc_disc_list_loopmap(struct lpfc_vport
+@@ -2303,6 +2580,10 @@
        if (phba->fc_topology != TOPOLOGY_LOOP)
                return;
  
@@ -312105,7 +311966,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        /* Check for loop map present or not */
        if (phba->alpa_map[0]) {
                for (j = 1; j <= phba->alpa_map[0]; j++) {
-@@ -2324,7 +2605,8 @@ lpfc_disc_list_loopmap(struct lpfc_vport
+@@ -2324,7 +2605,8 @@
                        alpa = lpfcAlpaArray[index];
                        if ((vport->fc_myDID & 0xff) == alpa)
                                continue;
@@ -312115,7 +311976,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                }
        }
        return;
-@@ -2786,7 +3068,7 @@ restart_disc:
+@@ -2786,7 +3068,7 @@
  
        default:
                lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
@@ -312124,7 +311985,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                                 "vport State x%x\n", vport->port_state);
                break;
        }
-@@ -2886,7 +3168,14 @@ lpfc_filter_by_wwpn(struct lpfc_nodelist
+@@ -2886,7 +3168,14 @@
                      sizeof(ndlp->nlp_portname)) == 0;
  }
  
@@ -312140,10 +312001,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  __lpfc_find_node(struct lpfc_vport *vport, node_filter filter, void *param)
  {
        struct lpfc_nodelist *ndlp;
-@@ -2899,6 +3188,22 @@ __lpfc_find_node(struct lpfc_vport *vpor
- }
- /*
+@@ -2896,6 +3185,22 @@
+                       return ndlp;
+       }
+       return NULL;
++}
++
++/*
 + * Search node lists for a remote port matching filter criteria
 + * Caller needs to hold host_lock before calling this routine.
 + */
@@ -312157,13 +312021,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
 +      ndlp = __lpfc_find_node(vport, filter, param);
 +      spin_unlock_irq(shost->host_lock);
 +      return ndlp;
-+}
-+
-+/*
-  * This routine looks up the ndlp lists for the given RPI. If rpi found it
-  * returns the node list element pointer else return NULL.
-  */
-@@ -2924,22 +3229,28 @@ lpfc_findnode_wwpn(struct lpfc_vport *vp
+ }
+ /*
+@@ -2924,22 +3229,28 @@
        return ndlp;
  }
  
@@ -312202,7 +312063,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  
        lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_NODE,
                "node init:       did:x%x",
-@@ -2973,14 +3284,16 @@ lpfc_nlp_release(struct kref *kref)
+@@ -2973,14 +3284,16 @@
        lpfc_nlp_remove(ndlp->vport, ndlp);
  
        /* clear the ndlp active flag for all release cases */
@@ -312222,7 +312083,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
  }
  
  /* This routine bumps the reference count for a ndlp structure to ensure
-@@ -3002,7 +3315,7 @@ lpfc_nlp_get(struct lpfc_nodelist *ndlp)
+@@ -3002,7 +3315,7 @@
                 * ndlp reference count that is in the process of being
                 * released.
                 */
@@ -312231,7 +312092,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
                spin_lock_irqsave(&phba->ndlp_lock, flags);
                if (!NLP_CHK_NODE_ACT(ndlp) || NLP_CHK_FREE_ACK(ndlp)) {
                        spin_unlock_irqrestore(&phba->ndlp_lock, flags);
-@@ -3038,7 +3351,7 @@ lpfc_nlp_put(struct lpfc_nodelist *ndlp)
+@@ -3038,7 +3351,7 @@
        "node put:        did:x%x flg:x%x refcnt:x%x",
                ndlp->nlp_DID, ndlp->nlp_flag,
                atomic_read(&ndlp->kref.refcount));
@@ -312240,9 +312101,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hbadisc.c linux-2.6.27.19-5.1/dri
        spin_lock_irqsave(&phba->ndlp_lock, flags);
        /* Check the ndlp memory free acknowledge flag to avoid the
         * possible race condition that kref_put got invoked again
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hw.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_hw.h    2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_hw.h
+--- a/drivers/scsi/lpfc/lpfc_hw.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_hw.h      Wed May 06 16:56:34 2009 +0100
 @@ -64,6 +64,10 @@
  #define SLI3_IOCB_CMD_SIZE    128
  #define SLI3_IOCB_RSP_SIZE    64
@@ -312254,7 +312115,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  /* Common Transport structures and definitions */
  
-@@ -350,7 +354,8 @@ struct csp {
+@@ -350,7 +354,8 @@
  
        uint16_t huntgroup:1;   /* FC Word 1, bit 23 */
        uint16_t simplex:1;     /* FC Word 1, bit 22 */
@@ -312264,7 +312125,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
        uint16_t dhd:1;         /* FC Word 1, bit 18 */
        uint16_t contIncSeqCnt:1;       /* FC Word 1, bit 17 */
        uint16_t payloadlength:1;       /* FC Word 1, bit 16 */
-@@ -367,7 +372,8 @@ struct csp {
+@@ -367,7 +372,8 @@
        uint16_t payloadlength:1;       /* FC Word 1, bit 16 */
        uint16_t contIncSeqCnt:1;       /* FC Word 1, bit 17 */
        uint16_t dhd:1;         /* FC Word 1, bit 18 */
@@ -312274,7 +312135,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
        uint16_t simplex:1;     /* FC Word 1, bit 22 */
        uint16_t huntgroup:1;   /* FC Word 1, bit 23 */
  #endif
-@@ -506,6 +512,17 @@ struct serv_parm {        /* Structure is in Bi
+@@ -506,6 +512,17 @@
  #define ELS_CMD_SCR       0x62000000
  #define ELS_CMD_RNID      0x78000000
  #define ELS_CMD_LIRR      0x7A000000
@@ -312292,7 +312153,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #else /*  __LITTLE_ENDIAN_BITFIELD */
  #define ELS_CMD_MASK      0xffff
  #define ELS_RSP_MASK      0xff
-@@ -542,6 +559,17 @@ struct serv_parm {        /* Structure is in Bi
+@@ -542,6 +559,17 @@
  #define ELS_CMD_SCR       0x62
  #define ELS_CMD_RNID      0x78
  #define ELS_CMD_LIRR      0x7A
@@ -312310,7 +312171,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #endif
  
  /*
-@@ -866,6 +894,12 @@ typedef struct _D_ID {            /* Structure is 
+@@ -866,6 +894,12 @@
        } un;
  } D_ID;
  
@@ -312323,7 +312184,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  /*
   *  Structure to define all ELS Payload types
   */
-@@ -1107,6 +1141,8 @@ typedef struct {
+@@ -1107,6 +1141,8 @@
  /* Start FireFly Register definitions */
  #define PCI_VENDOR_ID_EMULEX        0x10df
  #define PCI_DEVICE_ID_FIREFLY       0x1ae5
@@ -312332,7 +312193,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #define PCI_DEVICE_ID_SAT_SMB       0xf011
  #define PCI_DEVICE_ID_SAT_MID       0xf015
  #define PCI_DEVICE_ID_RFLY          0xf095
-@@ -1133,10 +1169,12 @@ typedef struct {
+@@ -1133,10 +1169,12 @@
  #define PCI_DEVICE_ID_LP11000S      0xfc10
  #define PCI_DEVICE_ID_LPE11000S     0xfc20
  #define PCI_DEVICE_ID_SAT_S         0xfc40
@@ -312345,7 +312206,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #define PCI_DEVICE_ID_ZEPHYR_SCSP   0xfe11
  #define PCI_DEVICE_ID_ZEPHYR_DCSP   0xfe12
  
-@@ -1154,6 +1192,7 @@ typedef struct {
+@@ -1154,6 +1192,7 @@
  #define ZEPHYR_JEDEC_ID             0x0577
  #define VIPER_JEDEC_ID              0x4838
  #define SATURN_JEDEC_ID             0x1004
@@ -312353,7 +312214,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  #define JEDEC_ID_MASK               0x0FFFF000
  #define JEDEC_ID_SHIFT              12
-@@ -1198,6 +1237,18 @@ typedef struct {                /* FireFly BIU registe
+@@ -1198,6 +1237,18 @@
  #define HA_RXATT       0x00000008     /* Bit  3 */
  #define HA_RXMASK      0x0000000f
  
@@ -312372,7 +312233,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  /* Chip Attention Register */
  
  #define CA_REG_OFFSET  4      /* Byte offset from register base address */
-@@ -1235,7 +1286,7 @@ typedef struct {         /* FireFly BIU registe
+@@ -1235,7 +1286,7 @@
  
  /* Host Control Register */
  
@@ -312381,10 +312242,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  #define HC_MBINT_ENA   0x00000001     /* Bit  0 */
  #define HC_R0INT_ENA   0x00000002     /* Bit  1 */
-@@ -1248,6 +1299,19 @@ typedef struct {                /* FireFly BIU registe
+@@ -1247,6 +1298,19 @@
+ #define HC_INITFF      0x08000000     /* Bit 27 */
  #define HC_LAINT_ENA   0x20000000     /* Bit 29 */
  #define HC_ERINT_ENA   0x80000000     /* Bit 31 */
++
 +/* Message Signaled Interrupt eXtension (MSI-X) message identifiers */
 +#define MSIX_DFLT_ID  0
 +#define MSIX_RNG0_ID  0
@@ -312397,11 +312259,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
 +
 +#define MSIX_SPARE0_ID        6
 +#define MSIX_SPARE1_ID        7
-+
  /* Mailbox Commands */
  #define MBX_SHUTDOWN        0x00      /* terminate testing */
- #define MBX_LOAD_SM         0x01
-@@ -1285,9 +1349,16 @@ typedef struct {                /* FireFly BIU registe
+@@ -1285,9 +1349,16 @@
  #define MBX_KILL_BOARD      0x24
  #define MBX_CONFIG_FARP     0x25
  #define MBX_BEACON          0x2A
@@ -312418,7 +312279,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  #define MBX_CONFIG_HBQ            0x7C
  #define MBX_LOAD_AREA       0x81
-@@ -1423,6 +1494,7 @@ typedef struct {         /* FireFly BIU registe
+@@ -1423,6 +1494,7 @@
  #define MBXERR_BAD_RCV_LENGTH       14
  #define MBXERR_DMA_ERROR            15
  #define MBXERR_ERROR                16
@@ -312426,7 +312287,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #define MBX_NOT_FINISHED           255
  
  #define MBX_BUSY                   0xffffff /* Attempted cmd to busy Mailbox */
-@@ -1474,24 +1546,18 @@ struct ulp_bde64 {     /* SLI-2 */
+@@ -1474,24 +1546,18 @@
                        uint32_t bdeFlags:8;    /* BDE Flags 0 IS A SUPPORTED
                                                   VALUE !! */
  #endif
@@ -312458,21 +312319,21 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  typedef struct ULP_BDL {      /* SLI-2 */
  #ifdef __BIG_ENDIAN_BITFIELD
-@@ -1596,6 +1662,13 @@ typedef struct {
+@@ -1595,6 +1661,13 @@
+               } s2;
        } un;
  } BIU_DIAG_VAR;
++
 +/* Structure for MB command READ_EVENT_LOG (0x38) */
 +typedef struct {
 +      uint32_t rsvd1;
 +      uint32_t offset;
 +      struct ulp_bde64 rcv_bde64;
 +}READ_EVENT_LOG_VAR;
-+
  /* Structure for MB Command INIT_LINK (05) */
  
- typedef struct {
-@@ -2201,7 +2274,10 @@ typedef struct {
+@@ -2201,7 +2274,10 @@
  typedef struct {
        uint32_t eventTag;      /* Event tag */
  #ifdef __BIG_ENDIAN_BITFIELD
@@ -312484,7 +312345,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
        uint32_t pb:1;
        uint32_t il:1;
        uint32_t attType:8;
-@@ -2209,7 +2285,10 @@ typedef struct {
+@@ -2209,7 +2285,10 @@
        uint32_t attType:8;
        uint32_t il:1;
        uint32_t pb:1;
@@ -312496,7 +312357,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #endif
  
  #define AT_RESERVED    0x00   /* Reserved - attType */
-@@ -2230,6 +2309,7 @@ typedef struct {
+@@ -2230,6 +2309,7 @@
  
  #define TOPOLOGY_PT_PT 0x01   /* Topology is pt-pt / pt-fabric */
  #define TOPOLOGY_LOOP  0x02   /* Topology is FC-AL */
@@ -312504,7 +312365,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
        union {
                struct ulp_bde lilpBde; /* This BDE points to a 128 byte buffer
-@@ -2290,6 +2370,14 @@ typedef struct {
+@@ -2290,6 +2370,14 @@
        uint32_t rsvd1;
  } CLEAR_LA_VAR;
  
@@ -312519,10 +312380,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  /* Structure for MB Command DUMP */
  
  typedef struct {
-@@ -2324,6 +2412,60 @@ typedef struct {
+@@ -2323,6 +2411,60 @@
+ #define  DMP_VPD_SIZE            0x400  /* maximum amount of VPD */
  #define  DMP_RSP_OFFSET          0x14   /* word 5 contains first word of rsp */
  #define  DMP_RSP_SIZE            0x6C   /* maximum of 27 words of rsp data */
++
 +#define  WAKE_UP_PARMS_REGION_ID    4
 +#define  WAKE_UP_PARMS_WORD_SIZE   15
 +
@@ -312576,11 +312438,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
 +      uint32_t byte_cnt;
 +      uint32_t data_offset;
 +};
-+
  struct hbq_mask {
  #ifdef __BIG_ENDIAN_BITFIELD
-       uint8_t tmatch;
-@@ -2487,10 +2629,17 @@ typedef struct {
+@@ -2487,10 +2629,17 @@
  
        uint32_t pcbLow;       /* bit 31:0  of memory based port config block */
        uint32_t pcbHigh;      /* bit 63:32 of memory based port config block */
@@ -312600,7 +312461,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
        uint32_t cmv       :  1;  /* Configure Max VPIs                   */
        uint32_t ccrp      :  1;  /* Config Command Ring Polling          */
        uint32_t csah      :  1;  /* Configure Synchronous Abort Handling */
-@@ -2508,7 +2657,7 @@ typedef struct {
+@@ -2508,7 +2657,7 @@
        uint32_t csah      :  1;  /* Configure Synchronous Abort Handling */
        uint32_t ccrp      :  1;  /* Config Command Ring Polling          */
        uint32_t cmv       :  1;  /* Configure Max VPIs                   */
@@ -312609,10 +312470,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  #endif
  #ifdef __BIG_ENDIAN_BITFIELD
        uint32_t rsvd2     : 24;  /* Reserved                             */
-@@ -2560,6 +2709,40 @@ typedef struct {
+@@ -2559,6 +2708,40 @@
+ #endif
  
  } CONFIG_PORT_VAR;
++
 +/* Structure for MB Command CONFIG_MSI (0x30) */
 +struct config_msi_var {
 +#ifdef __BIG_ENDIAN_BITFIELD
@@ -312646,11 +312508,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
 +#endif
 +      uint32_t rsvd4;
 +};
-+
  /* SLI-2 Port Control Block */
  
- /* SLIM POINTER */
-@@ -2645,6 +2828,10 @@ typedef struct {
+@@ -2645,6 +2828,10 @@
  /* Union of all Mailbox Command types */
  #define MAILBOX_CMD_WSIZE     32
  #define MAILBOX_CMD_SIZE      (MAILBOX_CMD_WSIZE * sizeof(uint32_t))
@@ -312661,7 +312522,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  typedef union {
        uint32_t varWords[MAILBOX_CMD_WSIZE - 1]; /* first word is type/
-@@ -2678,10 +2865,13 @@ typedef union {
+@@ -2678,10 +2865,13 @@
                                         * NEW_FEATURE
                                         */
        struct config_hbq_var varCfgHbq;/* cmd = 0x7c (CONFIG_HBQ)  */
@@ -312675,7 +312536,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  } MAILVARIANTS;
  
  /*
-@@ -2715,11 +2905,19 @@ struct sli3_pgp {
+@@ -2715,11 +2905,19 @@
        uint32_t hbq_get[16];
  };
  
@@ -312700,7 +312561,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  typedef struct {
  #ifdef __BIG_ENDIAN_BITFIELD
-@@ -2737,7 +2935,7 @@ typedef struct {
+@@ -2737,7 +2935,7 @@
  #endif
  
        MAILVARIANTS un;
@@ -312709,7 +312570,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  } MAILBOX_t;
  
  /*
-@@ -3105,6 +3303,27 @@ struct que_xri64cx_ext_fields {
+@@ -3105,6 +3303,27 @@
        struct lpfc_hbq_entry   buff[5];
  };
  
@@ -312737,7 +312598,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  typedef struct _IOCB {        /* IOCB structure */
        union {
                GENERIC_RSP grsp;       /* Generic response */
-@@ -3190,7 +3409,7 @@ typedef struct _IOCB {   /* IOCB structure
+@@ -3190,7 +3409,7 @@
  
                /* words 8-31 used for que_xri_cx iocb */
                struct que_xri64cx_ext_fields que_xri64cx_ext_words;
@@ -312746,7 +312607,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
                uint32_t sli3Words[24]; /* 96 extra bytes for SLI-3 */
        } unsli3;
  
-@@ -3234,14 +3453,16 @@ typedef struct _IOCB { /* IOCB structure
+@@ -3234,14 +3453,16 @@
  #define SLI1_SLIM_SIZE   (4 * 1024)
  
  /* Up to 498 IOCBs will fit into 16k
@@ -312765,7 +312626,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
  
  /* HBQ entries are 4 words each = 4k */
  #define LPFC_TOTAL_HBQ_SIZE (sizeof(struct lpfc_hbq_entry) *  \
-@@ -3249,6 +3470,7 @@ typedef struct _IOCB {   /* IOCB structure
+@@ -3249,6 +3470,7 @@
  
  struct lpfc_sli2_slim {
        MAILBOX_t mbx;
@@ -312773,7 +312634,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
        PCB_t pcb;
        IOCB_t IOCBs[MAX_SLIM_IOCB_SIZE];
  };
-@@ -3292,3 +3514,10 @@ lpfc_error_lost_link(IOCB_t *iocbp)
+@@ -3292,3 +3514,10 @@
                 iocbp->un.ulpWord[4] == IOERR_LINK_DOWN ||
                 iocbp->un.ulpWord[4] == IOERR_SLI_DOWN));
  }
@@ -312784,9 +312645,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_hw.h linux-2.6.27.19-5.1/drivers/
 +#define MENLO_TIMEOUT 30
 +#define SETVAR_MLOMNT 0x103107
 +#define SETVAR_MLORST 0x103007
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_init.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_init.c  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_init.c
+--- a/drivers/scsi/lpfc/lpfc_init.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_init.c    Wed May 06 16:56:34 2009 +0100
 @@ -36,6 +36,7 @@
  
  #include "lpfc_hw.h"
@@ -312799,12 +312660,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  #include "lpfc_crtn.h"
  #include "lpfc_vport.h"
  #include "lpfc_version.h"
--
 +#include "lpfc_auth_access.h"
 +#include "lpfc_security.h"
 +#include <net/sock.h>
 +#include <linux/netlink.h>
-+
 +/* vendor ID used in SCSI netlink calls */
 +#define LPFC_NL_VENDOR_ID (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX)
 +const char *security_work_q_name = "fc_sc_wq";
@@ -312819,7 +312679,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int lpfc_parse_vpd(struct lpfc_hba *, uint8_t *, int);
  static void lpfc_get_hba_model_desc(struct lpfc_hba *, uint8_t *, uint8_t *);
  static int lpfc_post_rcv_buf(struct lpfc_hba *);
-@@ -52,17 +68,40 @@ static struct scsi_transport_template *l
+@@ -52,17 +68,40 @@
  static struct scsi_transport_template *lpfc_vport_transport_template = NULL;
  static DEFINE_IDR(lpfc_hba_index);
  
@@ -312871,7 +312731,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_config_port_prep(struct lpfc_hba *phba)
  {
-@@ -180,12 +219,9 @@ lpfc_config_port_prep(struct lpfc_hba *p
+@@ -180,12 +219,9 @@
                                                sizeof (phba->RandomData));
  
        /* Get adapter VPD information */
@@ -312885,7 +312745,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        do {
                lpfc_dump_mem(phba, pmb, offset);
-@@ -200,21 +236,29 @@ lpfc_config_port_prep(struct lpfc_hba *p
+@@ -200,21 +236,29 @@
                }
                if (mb->un.varDmp.word_cnt > DMP_VPD_SIZE - offset)
                        mb->un.varDmp.word_cnt = DMP_VPD_SIZE - offset;
@@ -312919,7 +312779,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_config_async_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq)
  {
-@@ -226,20 +270,69 @@ lpfc_config_async_cmpl(struct lpfc_hba *
+@@ -226,20 +270,69 @@
        return;
  }
  
@@ -312999,7 +312859,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        LPFC_MBOXQ_t *pmb;
        MAILBOX_t *mb;
        struct lpfc_dmabuf *mp;
-@@ -297,6 +390,11 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -297,6 +390,11 @@
               sizeof (struct lpfc_name));
        memcpy(&vport->fc_portname, &vport->fc_sparam.portName,
               sizeof (struct lpfc_name));
@@ -313011,7 +312871,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        /* If no serial number in VPD data, use low 6 bytes of WWNN */
        /* This should be consolidated into parse_vpd ? - mr */
        if (phba->SerialNumber[0] == 0) {
-@@ -378,6 +476,29 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -378,6 +476,29 @@
        if (phba->sli_rev != 3)
                lpfc_post_rcv_buf(phba);
  
@@ -313041,7 +312901,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        /* Enable appropriate host interrupts */
        spin_lock_irq(&phba->hbalock);
        status = readl(phba->HCregaddr);
-@@ -393,27 +514,57 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -393,27 +514,57 @@
  
        if ((phba->cfg_poll & ENABLE_FCP_RING_POLLING) &&
            (phba->cfg_poll & DISABLE_FCP_RING_INT))
@@ -313065,7 +312925,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        phba->last_completion_time = jiffies;
 +      /* Set up error attention (ERATT) polling timer */
 +      mod_timer(&phba->eratt_poll, jiffies + HZ * LPFC_ERATT_POLL_INTERVAL);
-+
 +      /* Use the existing MBOX buffer, it will be freed in mbox compl */
 +      lpfc_config_async(phba, pmb, LPFC_ELS_RING);
 +      pmb->mbox_cmpl = lpfc_config_async_cmpl;
@@ -313077,7 +312937,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                              "ASYNCEVT_ENABLE mbox status x%x \n.", rc);
 +              mempool_free(pmb, phba->mbox_mem_pool);
 +      }
++
 +      /* Allocate new MBOX buffer, it will be freed in mbox compl */
 +      pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
 +      lpfc_dump_wakeup_param(phba, pmb);
@@ -313107,14 +312967,15 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                                "0454 Adapter failed to init, mbxCmd x%x "
                                "INIT_LINK, mbxStatus x%x\n",
-@@ -427,39 +578,23 @@ lpfc_config_port_post(struct lpfc_hba *p
+@@ -427,39 +578,23 @@
                readl(phba->HAregaddr); /* flush */
  
                phba->link_state = LPFC_HBA_ERROR;
 -              if (rc != MBX_BUSY)
 -                      mempool_free(pmb, phba->mbox_mem_pool);
--              return -EIO;
--      }
++              mempool_free(pmb, phba->mbox_mem_pool);
+               return -EIO;
+       }
 -      /* MBOX buffer will be freed in mbox compl */
 -      pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
 -      lpfc_config_async(phba, pmb, LPFC_ELS_RING);
@@ -313129,9 +312990,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 -                              "0456 Adapter failed to issue "
 -                              "ASYNCEVT_ENABLE mbox status x%x \n.",
 -                              rc);
-               mempool_free(pmb, phba->mbox_mem_pool);
-+              return -EIO;
-       }
+-              mempool_free(pmb, phba->mbox_mem_pool);
+-      }
 -      return (0);
 +      return 0;
  }
@@ -313160,7 +313020,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_hba_down_prep(struct lpfc_hba *phba)
  {
-@@ -481,15 +616,17 @@ lpfc_hba_down_prep(struct lpfc_hba *phba
+@@ -481,15 +616,17 @@
        return 0;
  }
  
@@ -313187,7 +313047,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_hba_down_post(struct lpfc_hba *phba)
  {
-@@ -548,7 +685,18 @@ lpfc_hba_down_post(struct lpfc_hba *phba
+@@ -548,7 +685,18 @@
        return 0;
  }
  
@@ -313207,7 +313067,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_hb_timeout(unsigned long ptr)
  {
-@@ -557,17 +705,36 @@ lpfc_hb_timeout(unsigned long ptr)
+@@ -557,17 +705,36 @@
        unsigned long iflag;
  
        phba = (struct lpfc_hba *)ptr;
@@ -313244,7 +313104,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq)
  {
-@@ -577,6 +744,7 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba
+@@ -577,6 +744,7 @@
        phba->hb_outstanding = 0;
        spin_unlock_irqrestore(&phba->hbalock, drvr_flag);
  
@@ -313252,7 +313112,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        mempool_free(pmboxq, phba->mbox_mem_pool);
        if (!(phba->pport->fc_flag & FC_OFFLINE_MODE) &&
                !(phba->link_state == LPFC_HBA_ERROR) &&
-@@ -586,6 +754,22 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba
+@@ -586,6 +754,22 @@
        return;
  }
  
@@ -313275,7 +313135,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_hb_timeout_handler(struct lpfc_hba *phba)
  {
-@@ -601,11 +785,6 @@ lpfc_hb_timeout_handler(struct lpfc_hba 
+@@ -601,11 +785,6 @@
                return;
  
        spin_lock_irq(&phba->pport->work_port_lock);
@@ -313287,7 +313147,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        if (time_after(phba->last_completion_time + LPFC_HB_MBOX_INTERVAL * HZ,
                jiffies)) {
-@@ -684,6 +863,13 @@ lpfc_hb_timeout_handler(struct lpfc_hba 
+@@ -684,6 +863,13 @@
        }
  }
  
@@ -313301,7 +313161,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_offline_eratt(struct lpfc_hba *phba)
  {
-@@ -704,14 +890,16 @@ lpfc_offline_eratt(struct lpfc_hba *phba
+@@ -704,14 +890,16 @@
        return;
  }
  
@@ -313326,7 +313186,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_handle_eratt(struct lpfc_hba *phba)
  {
-@@ -722,6 +910,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -722,6 +910,7 @@
        unsigned long temperature;
        struct temp_event temp_event_data;
        struct Scsi_Host  *shost;
@@ -313334,10 +313194,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        /* If the pci channel is offline, ignore possible errors,
         * since we cannot communicate with the pci card anyway. */
-@@ -731,6 +920,15 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -730,6 +919,15 @@
+       /* If resets are disabled then leave the HBA alone and return */
        if (!phba->cfg_enable_hba_reset)
                return;
++
 +      /* Send an internal error event to mgmt application */
 +      board_event.event_type = FC_REG_BOARD_EVENT;
 +      board_event.subcategory = LPFC_EVENT_PORTINTERR;
@@ -313346,11 +313207,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                                sizeof(board_event),
 +                                (char *) &board_event,
 +                                LPFC_NL_VENDOR_ID);
-+
        if (phba->work_hs & HS_FFER6) {
                /* Re-establishing Link */
-               lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT,
-@@ -771,7 +969,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -771,7 +969,7 @@
                temp_event_data.data = (uint32_t)temperature;
  
                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
@@ -313359,7 +313219,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
                                "(%ld), taking this port offline "
                                "Data: x%x x%x x%x\n",
                                temperature, phba->work_hs,
-@@ -781,8 +979,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -781,8 +979,7 @@
                fc_host_post_vendor_event(shost, fc_get_event_number(),
                                          sizeof(temp_event_data),
                                          (char *) &temp_event_data,
@@ -313369,7 +313229,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
                spin_lock_irq(&phba->hbalock);
                phba->over_temp_state = HBA_OVER_TEMP;
-@@ -791,8 +988,8 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -791,8 +988,8 @@
  
        } else {
                /* The if clause above forces this code path when the status
@@ -313380,7 +313240,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
                 */
                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                                "0457 Adapter Hardware Error "
-@@ -804,20 +1001,20 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
+@@ -804,20 +1001,20 @@
                shost = lpfc_shost_from_vport(vport);
                fc_host_post_vendor_event(shost, fc_get_event_number(),
                                sizeof(event_data), (char *) &event_data,
@@ -313410,7 +313270,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_handle_latt(struct lpfc_hba *phba)
  {
-@@ -898,12 +1095,20 @@ lpfc_handle_latt_err_exit:
+@@ -898,12 +1095,20 @@
        return;
  }
  
@@ -313437,7 +313297,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len)
  {
-@@ -1040,12 +1245,25 @@ lpfc_parse_vpd(struct lpfc_hba *phba, ui
+@@ -1040,12 +1245,25 @@
        return(1);
  }
  
@@ -313463,7 +313323,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        struct {
                char * name;
                int    max_speed;
-@@ -1137,7 +1355,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba 
+@@ -1137,7 +1355,8 @@
                m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
                break;
        case PCI_DEVICE_ID_ZEPHYR_DCSP:
@@ -313473,7 +313333,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
                break;
        case PCI_DEVICE_ID_ZMID:
                m = (typeof(m)){"LPe1150", max_speed, "PCIe"};
-@@ -1177,6 +1396,19 @@ lpfc_get_hba_model_desc(struct lpfc_hba 
+@@ -1177,6 +1396,19 @@
        case PCI_DEVICE_ID_SAT_S:
                m = (typeof(m)){"LPe12000-S", max_speed, "PCIe"};
                break;
@@ -313493,7 +313353,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        default:
                m = (typeof(m)){ NULL };
                break;
-@@ -1186,18 +1418,25 @@ lpfc_get_hba_model_desc(struct lpfc_hba 
+@@ -1186,18 +1418,25 @@
                snprintf(mdp, 79,"%s", m.name);
        if (descp && descp[0] == '\0')
                snprintf(descp, 255,
@@ -313529,7 +313389,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_post_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, int cnt)
  {
-@@ -1287,12 +1526,17 @@ lpfc_post_buffer(struct lpfc_hba *phba, 
+@@ -1287,12 +1526,17 @@
        return 0;
  }
  
@@ -313553,7 +313413,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_post_rcv_buf(struct lpfc_hba *phba)
  {
-@@ -1307,11 +1551,13 @@ lpfc_post_rcv_buf(struct lpfc_hba *phba)
+@@ -1307,11 +1551,13 @@
  
  #define S(N,V) (((V)<<(N))|((V)>>(32-(N))))
  
@@ -313572,7 +313432,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_sha_init(uint32_t * HashResultPointer)
  {
-@@ -1322,11 +1568,16 @@ lpfc_sha_init(uint32_t * HashResultPoint
+@@ -1322,11 +1568,16 @@
        HashResultPointer[4] = 0xC3D2E1F0;
  }
  
@@ -313594,7 +313454,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_sha_iterate(uint32_t * HashResultPointer, uint32_t * HashWorkingPointer)
  {
-@@ -1374,22 +1625,29 @@ lpfc_sha_iterate(uint32_t * HashResultPo
+@@ -1374,22 +1625,29 @@
  
  }
  
@@ -313634,7 +313494,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_hba_init(struct lpfc_hba *phba, uint32_t *hbainit)
  {
-@@ -1412,6 +1670,15 @@ lpfc_hba_init(struct lpfc_hba *phba, uin
+@@ -1412,6 +1670,15 @@
        kfree(HashWorking);
  }
  
@@ -313650,7 +313510,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_cleanup(struct lpfc_vport *vport)
  {
-@@ -1459,14 +1726,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1459,14 +1726,6 @@
                lpfc_disc_state_machine(vport, ndlp, NULL,
                                             NLP_EVT_DEVICE_RM);
  
@@ -313665,7 +313525,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        }
  
        /* At this point, ALL ndlp's should be gone
-@@ -1482,7 +1741,7 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1482,7 +1741,7 @@
                                                &vport->fc_nodes, nlp_listp) {
                                lpfc_printf_vlog(ndlp->vport, KERN_ERR,
                                                LOG_NODE,
@@ -313674,7 +313534,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
                                                "usgmap:x%x refcnt:%d\n",
                                                ndlp->nlp_DID, (void *)ndlp,
                                                ndlp->nlp_usg_map,
-@@ -1498,15 +1757,39 @@ lpfc_cleanup(struct lpfc_vport *vport)
+@@ -1498,15 +1757,39 @@
        return;
  }
  
@@ -313714,7 +313574,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_stop_phba_timers(struct lpfc_hba *phba)
  {
-@@ -1516,9 +1799,20 @@ lpfc_stop_phba_timers(struct lpfc_hba *p
+@@ -1516,9 +1799,20 @@
        del_timer_sync(&phba->fabric_block_timer);
        phba->hb_outstanding = 0;
        del_timer_sync(&phba->hb_tmofunc);
@@ -313735,7 +313595,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_block_mgmt_io(struct lpfc_hba * phba)
  {
-@@ -1529,6 +1823,18 @@ lpfc_block_mgmt_io(struct lpfc_hba * phb
+@@ -1529,6 +1823,18 @@
        spin_unlock_irqrestore(&phba->hbalock, iflag);
  }
  
@@ -313754,7 +313614,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_online(struct lpfc_hba *phba)
  {
-@@ -1574,6 +1880,17 @@ lpfc_online(struct lpfc_hba *phba)
+@@ -1574,6 +1880,17 @@
        return 0;
  }
  
@@ -313772,7 +313632,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_unblock_mgmt_io(struct lpfc_hba * phba)
  {
-@@ -1584,6 +1901,14 @@ lpfc_unblock_mgmt_io(struct lpfc_hba * p
+@@ -1584,6 +1901,14 @@
        spin_unlock_irqrestore(&phba->hbalock, iflag);
  }
  
@@ -313787,7 +313647,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_offline_prep(struct lpfc_hba * phba)
  {
-@@ -1633,6 +1958,14 @@ lpfc_offline_prep(struct lpfc_hba * phba
+@@ -1633,6 +1958,14 @@
        lpfc_sli_flush_mbox_queue(phba);
  }
  
@@ -313802,7 +313662,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void
  lpfc_offline(struct lpfc_hba *phba)
  {
-@@ -1670,12 +2003,17 @@ lpfc_offline(struct lpfc_hba *phba)
+@@ -1670,12 +2003,17 @@
        lpfc_destroy_vport_work_array(phba, vports);
  }
  
@@ -313826,7 +313686,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int
  lpfc_scsi_free(struct lpfc_hba *phba)
  {
-@@ -1704,6 +2042,22 @@ lpfc_scsi_free(struct lpfc_hba *phba)
+@@ -1704,6 +2042,22 @@
        return 0;
  }
  
@@ -313849,7 +313709,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  struct lpfc_vport *
  lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
  {
-@@ -1765,6 +2119,16 @@ lpfc_create_port(struct lpfc_hba *phba, 
+@@ -1765,6 +2119,16 @@
        error = scsi_add_host(shost, dev);
        if (error)
                goto out_put_shost;
@@ -313866,7 +313726,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        spin_lock_irq(&phba->hbalock);
        list_add_tail(&vport->listentry, &phba->port_list);
-@@ -1777,14 +2141,19 @@ out:
+@@ -1777,13 +2141,18 @@
        return NULL;
  }
  
@@ -313882,13 +313742,12 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  {
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba  *phba = vport->phba;
--      kfree(vport->vname);
 -
+-      kfree(vport->vname);
        lpfc_debugfs_terminate(vport);
        fc_remove_host(shost);
-       scsi_remove_host(shost);
-@@ -1797,6 +2166,16 @@ destroy_port(struct lpfc_vport *vport)
+@@ -1797,6 +2166,16 @@
        return;
  }
  
@@ -313905,7 +313764,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int
  lpfc_get_instance(void)
  {
-@@ -1810,11 +2189,21 @@ lpfc_get_instance(void)
+@@ -1810,11 +2189,21 @@
        return instance;
  }
  
@@ -313932,7 +313791,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time)
  {
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-@@ -1858,6 +2247,13 @@ finished:
+@@ -1858,6 +2247,13 @@
        return stat;
  }
  
@@ -313946,7 +313805,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  void lpfc_host_attrib_init(struct Scsi_Host *shost)
  {
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
-@@ -1906,42 +2302,390 @@ void lpfc_host_attrib_init(struct Scsi_H
+@@ -1906,42 +2302,390 @@
        spin_unlock_irq(shost->host_lock);
  }
  
@@ -314059,8 +313918,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                              "0421 MSI-X slow-path request_irq failed "
 +                              "(%d)\n", rc);
 +              goto msi_fail_out;
-+      }
-+
+       }
+-      error = request_irq(phba->msix_entries[0].vector, lpfc_intr_handler, 0,
+-                          LPFC_DRIVER_NAME, phba);
+-      if (error) {
 +      /* vector-1 is associated to fast-path handler */
 +      rc = request_irq(phba->msix_entries[1].vector, &lpfc_fp_intr_handler,
 +                       IRQF_SHARED, LPFC_FP_DRIVER_HANDLER_NAME, phba);
@@ -314070,11 +313932,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                              "0429 MSI-X fast-path request_irq failed "
 +                              "(%d)\n", rc);
 +              goto irq_fail_out;
-       }
--      error = request_irq(phba->msix_entries[0].vector, lpfc_intr_handler, 0,
--                          LPFC_DRIVER_NAME, phba);
--      if (error) {
++      }
++
 +      /*
 +       * Configure HBA MSI-X attention conditions to messages
 +       */
@@ -314089,7 +313948,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                              "0474 Unable to allocate memory for issuing "
 +                              "MBOX_CONFIG_MSI command\n");
 +              goto mem_fail_out;
-+      }
+       }
+-      return error;
 +      rc = lpfc_config_msi(phba, pmb);
 +      if (rc)
 +              goto mbx_fail_out;
@@ -314100,8 +313960,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                              "mbxCmd x%x, mbxStatus x%x\n",
 +                              pmb->mb.mbxCommand, pmb->mb.mbxStatus);
 +              goto mbx_fail_out;
-       }
--      return error;
++      }
 +
 +      /* Free memory allocated for mailbox command */
 +      mempool_free(pmb, phba->mbox_mem_pool);
@@ -314123,8 +313982,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +      /* Unconfigure MSI-X capability structure */
 +      pci_disable_msix(phba->pcidev);
 +      return rc;
- }
++}
++
 +/**
 + * lpfc_disable_msix: Disable MSI-X interrupt mode.
 + * @phba: pointer to lpfc hba data structure.
@@ -314132,19 +313991,18 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 + * This routine is invoked to release the MSI-X vectors and then disable the
 + * MSI-X interrupt mode.
 + **/
- static void
- lpfc_disable_msix(struct lpfc_hba *phba)
- {
--      free_irq(phba->msix_entries[0].vector, phba);
++static void
++lpfc_disable_msix(struct lpfc_hba *phba)
++{
 +      int i;
 +
 +      /* Free up MSI-X multi-message vectors */
 +      for (i = 0; i < LPFC_MSIX_VECTORS; i++)
 +              free_irq(phba->msix_entries[i].vector, phba);
 +      /* Disable MSI-X */
-       pci_disable_msix(phba->pcidev);
- }
++      pci_disable_msix(phba->pcidev);
++}
++
 +/**
 + * lpfc_enable_msi: Enable MSI interrupt mode.
 + * @phba: pointer to lpfc hba data structure.
@@ -314231,11 +314089,14 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +              break;
 +      }
 +      return;
-+}
-+
-+static void
+ }
+ static void
+-lpfc_disable_msix(struct lpfc_hba *phba)
 +lpfc_stop_port(struct lpfc_hba *phba)
-+{
+ {
+-      free_irq(phba->msix_entries[0].vector, phba);
+-      pci_disable_msix(phba->pcidev);
 +      /* Clear all interrupt enable conditions */
 +      writel(0, phba->HCregaddr);
 +      readl(phba->HCregaddr); /* flush */
@@ -314248,8 +314109,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +      phba->pport->work_port_events = 0;
 +
 +      return;
-+}
-+
+ }
 +/**
 + * lpfc_enable_intr: Enable device interrupt.
 + * @phba: pointer to lpfc hba data structure.
@@ -314354,7 +314215,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int __devinit
  lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
  {
-@@ -1955,7 +2699,9 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1955,7 +2699,9 @@
        int error = -ENODEV, retval;
        int  i, hbq_count;
        uint16_t iotag;
@@ -314364,7 +314225,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        if (pci_enable_device_mem(pdev))
                goto out;
-@@ -1966,6 +2712,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1966,6 +2712,7 @@
        if (!phba)
                goto out_release_regions;
  
@@ -314372,7 +314233,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        spin_lock_init(&phba->hbalock);
  
        /* Initialize ndlp management spinlock */
-@@ -1978,12 +2725,16 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -1978,12 +2725,16 @@
                goto out_free_phba;
  
        INIT_LIST_HEAD(&phba->port_list);
@@ -314390,7 +314251,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        /* Initialize timers used by driver */
        init_timer(&phba->hb_tmofunc);
-@@ -2000,8 +2751,12 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2000,8 +2751,12 @@
        init_timer(&phba->fabric_block_timer);
        phba->fabric_block_timer.function = lpfc_fabric_block_timeout;
        phba->fabric_block_timer.data = (unsigned long) phba;
@@ -314403,7 +314264,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        pci_try_set_mwi(pdev);
  
        if (pci_set_dma_mask(phba->pcidev, DMA_64BIT_MASK) != 0)
-@@ -2019,7 +2774,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2019,7 +2774,7 @@
        bar2map_len        = pci_resource_len(phba->pcidev, 2);
  
        /* Map HBA SLIM to a kernel virtual address. */
@@ -314412,7 +314273,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        if (!phba->slim_memmap_p) {
                error = -ENODEV;
                dev_printk(KERN_ERR, &pdev->dev,
-@@ -2037,12 +2792,20 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2037,12 +2792,20 @@
        }
  
        /* Allocate memory for SLI-2 structures */
@@ -314437,7 +314298,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        phba->hbqslimp.virt = dma_alloc_coherent(&phba->pcidev->dev,
                                                 lpfc_sli_hbq_size(),
-@@ -2111,7 +2874,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2111,7 +2874,7 @@
        phba->fc_arbtov = FF_DEF_ARBTOV;
  
        INIT_LIST_HEAD(&phba->work_list);
@@ -314446,7 +314307,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        phba->work_ha_mask |= (HA_RXMASK << (LPFC_ELS_RING * 4));
  
        /* Initialize the wait queue head for the kernel thread */
-@@ -2135,46 +2898,21 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2135,46 +2898,21 @@
        /* Initialize list to save ELS buffers */
        INIT_LIST_HEAD(&phba->elsbuf);
  
@@ -314499,30 +314360,31 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        phba->MBslimaddr = phba->slim_memmap_p;
        phba->HAregaddr = phba->ctrl_regs_memmap_p + HA_REG_OFFSET;
-@@ -2182,16 +2920,71 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2182,16 +2920,71 @@
        phba->HSregaddr = phba->ctrl_regs_memmap_p + HS_REG_OFFSET;
        phba->HCregaddr = phba->ctrl_regs_memmap_p + HC_REG_OFFSET;
  
+-      if (lpfc_alloc_sysfs_attr(vport)) {
 +      /* Confiugre sysfs attributes */
 +      phba->dfc_host = lpfcdfc_host_add(pdev, shost, phba);
 +      if (!phba->dfc_host) {
 +              lpfc_printf_log(phba, KERN_ERR, LOG_LIBDFC,
 +                              "1201 Failed to allocate dfc_host \n");
-+              error = -ENOMEM;
-+              goto out_destroy_port;
-+      }
-+
-       if (lpfc_alloc_sysfs_attr(vport)) {
-+              lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
-+                              "1476 Failed to allocate sysfs attr\n");
                error = -ENOMEM;
 -              goto out_free_irq;
-+              goto out_del_dfc_host;
++              goto out_destroy_port;
        }
  
 -      if (lpfc_sli_hba_setup(phba)) {
 -              error = -ENODEV;
 -              goto out_remove_device;
++      if (lpfc_alloc_sysfs_attr(vport)) {
++              lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
++                              "1476 Failed to allocate sysfs attr\n");
++              error = -ENOMEM;
++              goto out_del_dfc_host;
+       }
 +      cfg_mode = phba->cfg_use_msi;
 +      while (true) {
 +              /* Configure and enable interrupt */
@@ -314561,8 +314423,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
 +                      /* Try next level of interrupt mode */
 +                      cfg_mode = --intr_mode;
 +              }
-       }
++      }
++
 +      if ((lpfc_get_security_enabled)(shost)) {
 +              unsigned long flags;
 +              spin_lock_irqsave(&fc_security_user_lock, flags);
@@ -314575,7 +314437,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        /*
         * hba setup may have changed the hba_queue_depth so we need to adjust
         * the value of can_queue.
-@@ -2206,27 +2999,35 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
+@@ -2206,27 +2999,35 @@
                spin_unlock_irq(shost->host_lock);
        }
  
@@ -314622,7 +314484,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        destroy_port(vport);
  out_kthread_stop:
        kthread_stop(phba->worker_thread);
-@@ -2238,11 +3039,11 @@ out_free_iocbq:
+@@ -2238,11 +3039,11 @@
        }
        lpfc_mem_free(phba);
  out_free_hbqslimp:
@@ -314638,7 +314500,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  out_iounmap:
        iounmap(phba->ctrl_regs_memmap_p);
  out_iounmap_slim:
-@@ -2262,23 +3063,41 @@ out:
+@@ -2262,23 +3063,41 @@
        return error;
  }
  
@@ -314659,10 +314521,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        struct lpfc_hba   *phba = vport->phba;
 +      int i;
        int bars = pci_select_bars(pdev, IORESOURCE_MEM);
++
 +      lpfcdfc_host_del(phba->dfc_host);
 +      phba->dfc_host = NULL;
-+
        spin_lock_irq(&phba->hbalock);
        vport->load_flag |= FC_UNLOADING;
        spin_unlock_irq(&phba->hbalock);
@@ -314682,7 +314544,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        fc_remove_host(shost);
        scsi_remove_host(shost);
        lpfc_cleanup(vport);
-@@ -2288,7 +3107,12 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2288,7 +3107,12 @@
         * clears the rings, discards all mailbox commands, and resets
         * the HBA.
         */
@@ -314695,7 +314557,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        lpfc_sli_brdrestart(phba);
  
        lpfc_stop_phba_timers(phba);
-@@ -2298,13 +3122,8 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2298,13 +3122,8 @@
  
        lpfc_debugfs_terminate(vport);
  
@@ -314711,7 +314573,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        pci_set_drvdata(pdev, NULL);
        scsi_host_put(shost);
-@@ -2316,12 +3135,12 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2316,12 +3135,12 @@
        lpfc_scsi_free(phba);
        lpfc_mem_free(phba);
  
@@ -314727,7 +314589,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        /* unmap adapter SLIM and Control Registers */
        iounmap(phba->ctrl_regs_memmap_p);
-@@ -2336,13 +3155,130 @@ lpfc_pci_remove_one(struct pci_dev *pdev
+@@ -2336,13 +3155,130 @@
  }
  
  /**
@@ -314864,7 +314726,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static pci_ers_result_t lpfc_io_error_detected(struct pci_dev *pdev,
                                pci_channel_state_t state)
  {
-@@ -2351,8 +3287,15 @@ static pci_ers_result_t lpfc_io_error_de
+@@ -2351,8 +3287,15 @@
        struct lpfc_sli *psli = &phba->sli;
        struct lpfc_sli_ring  *pring;
  
@@ -314881,7 +314743,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        pci_disable_device(pdev);
        /*
-@@ -2363,30 +3306,36 @@ static pci_ers_result_t lpfc_io_error_de
+@@ -2363,30 +3306,36 @@
        pring = &psli->ring[psli->fcp_ring];
        lpfc_sli_abort_iocb_ring(phba, pring);
  
@@ -314929,7 +314791,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  
        dev_printk(KERN_INFO, &pdev->dev, "recovering from a slot reset.\n");
        if (pci_enable_device_mem(pdev)) {
-@@ -2395,56 +3344,42 @@ static pci_ers_result_t lpfc_io_slot_res
+@@ -2395,56 +3344,42 @@
                return PCI_ERS_RESULT_DISCONNECT;
        }
  
@@ -315007,7 +314869,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
   */
  static void lpfc_io_resume(struct pci_dev *pdev)
  {
-@@ -2491,6 +3426,8 @@ static struct pci_device_id lpfc_id_tabl
+@@ -2491,6 +3426,8 @@
                PCI_ANY_ID, PCI_ANY_ID, },
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR,
                PCI_ANY_ID, PCI_ANY_ID, },
@@ -315016,7 +314878,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_SCSP,
                PCI_ANY_ID, PCI_ANY_ID, },
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_DCSP,
-@@ -2521,6 +3458,12 @@ static struct pci_device_id lpfc_id_tabl
+@@ -2521,6 +3458,12 @@
                PCI_ANY_ID, PCI_ANY_ID, },
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SAT_S,
                PCI_ANY_ID, PCI_ANY_ID, },
@@ -315029,7 +314891,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
        { 0 }
  };
  
-@@ -2537,9 +3480,23 @@ static struct pci_driver lpfc_driver = {
+@@ -2537,9 +3480,23 @@
        .id_table       = lpfc_id_table,
        .probe          = lpfc_pci_probe_one,
        .remove         = __devexit_p(lpfc_pci_remove_one),
@@ -315053,7 +314915,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  static int __init
  lpfc_init(void)
  {
-@@ -2564,22 +3521,57 @@ lpfc_init(void)
+@@ -2564,22 +3521,57 @@
                        return -ENOMEM;
                }
        }
@@ -315114,9 +314976,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_init.c linux-2.6.27.19-5.1/driver
  }
  
  module_init(lpfc_init);
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ioctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_ioctl.c   Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,2518 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -317636,9 +317498,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.c linux-2.6.27.19-5.1/drive
 +{
 +      unregister_chrdev(lpfcdfc_major, LPFC_CHAR_DEV_NAME);
 +}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_ioctl.h 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_ioctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_ioctl.h   Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,184 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -317824,9 +317686,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_ioctl.h linux-2.6.27.19-5.1/drive
 +struct lpfcdfc_host *lpfcdfc_host_add(struct pci_dev *, struct Scsi_Host *,
 +                                    struct lpfc_hba *);
 +#endif        /* __KERNEL__ */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_logmsg.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_logmsg.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_logmsg.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_logmsg.h        2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_logmsg.h
+--- a/drivers/scsi/lpfc/lpfc_logmsg.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_logmsg.h  Wed May 06 16:56:34 2009 +0100
 @@ -32,6 +32,7 @@
  #define LOG_FCP_ERROR                 0x1000  /* log errors, not underruns */
  #define LOG_LIBDFC                    0x2000  /* Libdfc events */
@@ -317835,9 +317697,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_logmsg.h linux-2.6.27.19-5.1/driv
  #define LOG_ALL_MSG                   0xffff  /* LOG all messages */
  
  #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mbox.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mbox.c  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_mbox.c
+--- a/drivers/scsi/lpfc/lpfc_mbox.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_mbox.c    Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
@@ -317880,7 +317742,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_dump_mem(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, uint16_t offset)
  {
-@@ -65,10 +76,49 @@ lpfc_dump_mem(struct lpfc_hba * phba, LP
+@@ -65,10 +76,49 @@
        return;
  }
  
@@ -317934,7 +317796,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_read_nv(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -81,10 +131,19 @@ lpfc_read_nv(struct lpfc_hba * phba, LPF
+@@ -81,10 +131,19 @@
        return;
  }
  
@@ -317958,7 +317820,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_config_async(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb,
                uint32_t ring)
-@@ -99,10 +158,19 @@ lpfc_config_async(struct lpfc_hba * phba
+@@ -99,10 +158,19 @@
        return;
  }
  
@@ -317982,7 +317844,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_heart_beat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -115,10 +183,26 @@ lpfc_heart_beat(struct lpfc_hba * phba, 
+@@ -115,10 +183,26 @@
        return;
  }
  
@@ -318013,7 +317875,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  int
  lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb, struct lpfc_dmabuf *mp)
  {
-@@ -143,10 +227,21 @@ lpfc_read_la(struct lpfc_hba * phba, LPF
+@@ -143,10 +227,21 @@
        return (0);
  }
  
@@ -318039,7 +317901,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_clear_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -161,10 +256,20 @@ lpfc_clear_la(struct lpfc_hba * phba, LP
+@@ -161,10 +256,20 @@
        return;
  }
  
@@ -318064,7 +317926,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_config_link(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -199,10 +304,98 @@ lpfc_config_link(struct lpfc_hba * phba,
+@@ -199,10 +304,98 @@
        return;
  }
  
@@ -318167,7 +318029,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_init_link(struct lpfc_hba * phba,
               LPFC_MBOXQ_t * pmb, uint32_t topology, uint32_t linkspeed)
-@@ -269,10 +462,27 @@ lpfc_init_link(struct lpfc_hba * phba,
+@@ -269,10 +462,27 @@
        return;
  }
  
@@ -318199,7 +318061,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  int
  lpfc_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, int vpi)
  {
-@@ -312,10 +522,21 @@ lpfc_read_sparam(struct lpfc_hba *phba, 
+@@ -312,10 +522,21 @@
        return (0);
  }
  
@@ -318225,7 +318087,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_unreg_did(struct lpfc_hba * phba, uint16_t vpi, uint32_t did,
               LPFC_MBOXQ_t * pmb)
-@@ -333,10 +554,19 @@ lpfc_unreg_did(struct lpfc_hba * phba, u
+@@ -333,10 +554,19 @@
        return;
  }
  
@@ -318249,7 +318111,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_read_config(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -350,10 +580,18 @@ lpfc_read_config(struct lpfc_hba * phba,
+@@ -350,10 +580,18 @@
        return;
  }
  
@@ -318272,7 +318134,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_read_lnk_stat(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -367,10 +605,30 @@ lpfc_read_lnk_stat(struct lpfc_hba * phb
+@@ -367,10 +605,30 @@
        return;
  }
  
@@ -318307,7 +318169,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  int
  lpfc_reg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t did,
               uint8_t *param, LPFC_MBOXQ_t *pmb, uint32_t flag)
-@@ -418,10 +676,20 @@ lpfc_reg_login(struct lpfc_hba *phba, ui
+@@ -418,10 +676,20 @@
        return (0);
  }
  
@@ -318332,7 +318194,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_unreg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t rpi,
                 LPFC_MBOXQ_t * pmb)
-@@ -440,10 +708,21 @@ lpfc_unreg_login(struct lpfc_hba *phba, 
+@@ -440,10 +708,21 @@
        return;
  }
  
@@ -318358,7 +318220,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_reg_vpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t sid,
             LPFC_MBOXQ_t *pmb)
-@@ -461,10 +740,22 @@ lpfc_reg_vpi(struct lpfc_hba *phba, uint
+@@ -461,10 +740,22 @@
  
  }
  
@@ -318385,7 +318247,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_unreg_vpi(struct lpfc_hba *phba, uint16_t vpi, LPFC_MBOXQ_t *pmb)
  {
-@@ -479,12 +770,19 @@ lpfc_unreg_vpi(struct lpfc_hba *phba, ui
+@@ -479,12 +770,19 @@
  
  }
  
@@ -318406,7 +318268,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
        dma_addr_t pdma_addr;
        uint32_t offset;
        uint32_t iocbCnt = 0;
-@@ -513,29 +811,77 @@ lpfc_config_pcb_setup(struct lpfc_hba * 
+@@ -513,29 +811,77 @@
                        continue;
                }
                /* Command ring setup for ring */
@@ -318492,7 +318354,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_read_rev(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -548,6 +894,16 @@ lpfc_read_rev(struct lpfc_hba * phba, LP
+@@ -548,6 +894,16 @@
        return;
  }
  
@@ -318509,7 +318371,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_build_hbq_profile2(struct config_hbq_var *hbqmb,
                        struct lpfc_hbq_init  *hbq_desc)
-@@ -557,6 +913,16 @@ lpfc_build_hbq_profile2(struct config_hb
+@@ -557,6 +913,16 @@
        hbqmb->profiles.profile2.seqlenoff  = hbq_desc->seqlenoff;
  }
  
@@ -318526,7 +318388,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_build_hbq_profile3(struct config_hbq_var *hbqmb,
                        struct lpfc_hbq_init  *hbq_desc)
-@@ -569,6 +935,17 @@ lpfc_build_hbq_profile3(struct config_hb
+@@ -569,6 +935,17 @@
               sizeof(hbqmb->profiles.profile3.cmdmatch));
  }
  
@@ -318544,7 +318406,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_build_hbq_profile5(struct config_hbq_var *hbqmb,
                        struct lpfc_hbq_init  *hbq_desc)
-@@ -581,6 +958,20 @@ lpfc_build_hbq_profile5(struct config_hb
+@@ -581,6 +958,20 @@
               sizeof(hbqmb->profiles.profile5.cmdmatch));
  }
  
@@ -318565,7 +318427,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_config_hbq(struct lpfc_hba *phba, uint32_t id,
                 struct lpfc_hbq_init *hbq_desc,
-@@ -641,8 +1032,23 @@ lpfc_config_hbq(struct lpfc_hba *phba, u
+@@ -641,8 +1032,23 @@
        return;
  }
  
@@ -318591,7 +318453,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_config_ring(struct lpfc_hba * phba, int ring, LPFC_MBOXQ_t * pmb)
  {
-@@ -684,6 +1090,20 @@ lpfc_config_ring(struct lpfc_hba * phba,
+@@ -684,6 +1090,20 @@
        return;
  }
  
@@ -318612,7 +318474,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
  {
-@@ -702,8 +1122,8 @@ lpfc_config_port(struct lpfc_hba *phba, 
+@@ -702,8 +1122,8 @@
  
        mb->un.varCfgPort.pcbLen = sizeof(PCB_t);
  
@@ -318623,7 +318485,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
        mb->un.varCfgPort.pcbLow = putPaddrLow(pdma_addr);
        mb->un.varCfgPort.pcbHigh = putPaddrHigh(pdma_addr);
  
-@@ -711,12 +1131,13 @@ lpfc_config_port(struct lpfc_hba *phba, 
+@@ -711,12 +1131,13 @@
  
        if (phba->sli_rev == 3 && phba->vpd.sli3Feat.cerbm) {
                mb->un.varCfgPort.cerbm = 1; /* Request HBQs */
@@ -318638,7 +318500,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
                } else
                        mb->un.varCfgPort.max_vpi = phba->max_vpi = 0;
        } else
-@@ -724,16 +1145,15 @@ lpfc_config_port(struct lpfc_hba *phba, 
+@@ -724,16 +1145,15 @@
        mb->un.varCfgPort.sli_mode = phba->sli_rev;
  
        /* Now setup pcb */
@@ -318662,38 +318524,27 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  
        /*
         * Setup Host Group ring pointer.
-@@ -785,42 +1205,52 @@ lpfc_config_port(struct lpfc_hba *phba, 
+@@ -785,42 +1205,52 @@
         *
         */
  
 -      if (phba->sli_rev == 3) {
 -              phba->host_gp = &mb_slim->us.s3.host[0];
 -              phba->hbq_put = &mb_slim->us.s3.hbq_put[0];
--      } else {
--              phba->host_gp = &mb_slim->us.s2.host[0];
 +      if (phba->cfg_hostmem_hgp && phba->sli_rev != 3) {
 +              phba->host_gp = &phba->mbox->us.s2.host[0];
-               phba->hbq_put = NULL;
--      }
++              phba->hbq_put = NULL;
 +              offset = (uint8_t *)&phba->mbox->us.s2.host -
 +                      (uint8_t *)phba->slim2p.virt;
 +              pdma_addr = phba->slim2p.phys + offset;
 +              phba->pcb->hgpAddrHigh = putPaddrHigh(pdma_addr);
 +              phba->pcb->hgpAddrLow = putPaddrLow(pdma_addr);
-+      } else {
+       } else {
+-              phba->host_gp = &mb_slim->us.s2.host[0];
+-              phba->hbq_put = NULL;
 +              /* Always Host Group Pointer is in SLIM */
 +              mb->un.varCfgPort.hps = 1;
--      /* mask off BAR0's flag bits 0 - 3 */
--      phba->slim2p->pcb.hgpAddrLow = (bar_low & PCI_BASE_ADDRESS_MEM_MASK) +
--              (void __iomem *) phba->host_gp -
--              (void __iomem *)phba->MBslimaddr;
--      if (bar_low & PCI_BASE_ADDRESS_MEM_TYPE_64)
--              phba->slim2p->pcb.hgpAddrHigh = bar_high;
--      else
--              phba->slim2p->pcb.hgpAddrHigh = 0;
--      /* write HGP data to SLIM at the required longword offset */
--      memset(&hgp, 0, sizeof(struct lpfc_hgp));
++
 +              if (phba->sli_rev == 3) {
 +                      phba->host_gp = &mb_slim->us.s3.host[0];
 +                      phba->hbq_put = &mb_slim->us.s3.hbq_put[0];
@@ -318712,23 +318563,38 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
 +                      phba->pcb->hgpAddrHigh = 0;
 +              /* write HGP data to SLIM at the required longword offset */
 +              memset(&hgp, 0, sizeof(struct lpfc_hgp));
--      for (i=0; i < phba->sli.num_rings; i++) {
--              lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
++
 +              for (i = 0; i < phba->sli.num_rings; i++) {
 +                      lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
-                                   sizeof(*phba->host_gp));
++                                  sizeof(*phba->host_gp));
 +              }
        }
  
--      /* Setup Port Group ring pointer */
+-      /* mask off BAR0's flag bits 0 - 3 */
+-      phba->slim2p->pcb.hgpAddrLow = (bar_low & PCI_BASE_ADDRESS_MEM_MASK) +
+-              (void __iomem *) phba->host_gp -
+-              (void __iomem *)phba->MBslimaddr;
+-      if (bar_low & PCI_BASE_ADDRESS_MEM_TYPE_64)
+-              phba->slim2p->pcb.hgpAddrHigh = bar_high;
 +      /* Setup Port Group offset */
-       if (phba->sli_rev == 3)
--              pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s3_pgp.port -
--                      (uint8_t *)phba->slim2p;
++      if (phba->sli_rev == 3)
 +              pgp_offset = offsetof(struct lpfc_sli2_slim,
 +                                    mbx.us.s3_pgp.port);
        else
+-              phba->slim2p->pcb.hgpAddrHigh = 0;
+-      /* write HGP data to SLIM at the required longword offset */
+-      memset(&hgp, 0, sizeof(struct lpfc_hgp));
+-
+-      for (i=0; i < phba->sli.num_rings; i++) {
+-              lpfc_memcpy_to_slim(phba->host_gp + i, &hgp,
+-                                  sizeof(*phba->host_gp));
+-      }
+-
+-      /* Setup Port Group ring pointer */
+-      if (phba->sli_rev == 3)
+-              pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s3_pgp.port -
+-                      (uint8_t *)phba->slim2p;
+-      else
 -              pgp_offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port -
 -                      (uint8_t *)phba->slim2p;
 -
@@ -318743,7 +318609,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  
        /* Use callback routine to setp rings in the pcb */
        lpfc_config_pcb_setup(phba);
-@@ -835,10 +1265,24 @@ lpfc_config_port(struct lpfc_hba *phba, 
+@@ -835,10 +1265,24 @@
        }
  
        /* Swap PCB if needed */
@@ -318770,7 +318636,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_kill_board(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
  {
-@@ -850,6 +1294,16 @@ lpfc_kill_board(struct lpfc_hba * phba, 
+@@ -850,6 +1294,16 @@
        return;
  }
  
@@ -318787,7 +318653,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  void
  lpfc_mbox_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq)
  {
-@@ -864,6 +1318,20 @@ lpfc_mbox_put(struct lpfc_hba * phba, LP
+@@ -864,6 +1318,20 @@
        return;
  }
  
@@ -318808,7 +318674,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  LPFC_MBOXQ_t *
  lpfc_mbox_get(struct lpfc_hba * phba)
  {
-@@ -877,16 +1345,40 @@ lpfc_mbox_get(struct lpfc_hba * phba)
+@@ -877,16 +1345,40 @@
        return mbq;
  }
  
@@ -318851,9 +318717,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mbox.c linux-2.6.27.19-5.1/driver
  int
  lpfc_mbox_tmo_val(struct lpfc_hba *phba, int cmd)
  {
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mem.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_mem.c   2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_mem.c
+--- a/drivers/scsi/lpfc/lpfc_mem.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_mem.c     Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
@@ -318894,7 +318760,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_mem_alloc(struct lpfc_hba * phba)
  {
-@@ -120,6 +135,16 @@ lpfc_mem_alloc(struct lpfc_hba * phba)
+@@ -120,6 +135,16 @@
        return -ENOMEM;
  }
  
@@ -318911,7 +318777,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_mem_free(struct lpfc_hba * phba)
  {
-@@ -181,12 +206,29 @@ lpfc_mem_free(struct lpfc_hba * phba)
+@@ -181,12 +206,29 @@
        phba->lpfc_scsi_dma_buf_pool = NULL;
        phba->lpfc_mbuf_pool = NULL;
  
@@ -318943,7 +318809,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  void *
  lpfc_mbuf_alloc(struct lpfc_hba *phba, int mem_flags, dma_addr_t *handle)
  {
-@@ -206,6 +248,20 @@ lpfc_mbuf_alloc(struct lpfc_hba *phba, i
+@@ -206,6 +248,20 @@
        return ret;
  }
  
@@ -318964,7 +318830,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  void
  __lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma)
  {
-@@ -221,7 +277,21 @@ __lpfc_mbuf_free(struct lpfc_hba * phba,
+@@ -221,7 +277,21 @@
        return;
  }
  
@@ -318986,7 +318852,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  lpfc_mbuf_free(struct lpfc_hba * phba, void *virt, dma_addr_t dma)
  {
        unsigned long iflags;
-@@ -232,6 +302,19 @@ lpfc_mbuf_free(struct lpfc_hba * phba, v
+@@ -232,6 +302,19 @@
        return;
  }
  
@@ -319006,7 +318872,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  struct hbq_dmabuf *
  lpfc_els_hbq_alloc(struct lpfc_hba *phba)
  {
-@@ -251,6 +334,18 @@ lpfc_els_hbq_alloc(struct lpfc_hba *phba
+@@ -251,6 +334,18 @@
        return hbqbp;
  }
  
@@ -319025,7 +318891,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_els_hbq_free(struct lpfc_hba *phba, struct hbq_dmabuf *hbqbp)
  {
-@@ -259,7 +354,18 @@ lpfc_els_hbq_free(struct lpfc_hba *phba,
+@@ -259,7 +354,18 @@
        return;
  }
  
@@ -319045,9 +318911,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_mem.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_in_buf_free(struct lpfc_hba *phba, struct lpfc_dmabuf *mp)
  {
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_menlo.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_menlo.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_menlo.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_menlo.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_menlo.c   Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,1192 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -320241,9 +320107,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_menlo.c linux-2.6.27.19-5.1/drive
 +      .read = sysfs_menlo_read,
 +      .write = sysfs_menlo_write,
 +};
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nl.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nl.h    2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_nl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_nl.h      Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,179 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -320424,9 +320290,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nl.h linux-2.6.27.19-5.1/drivers/
 +      uint32_t data;
 +};
 +
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nportdisc.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_nportdisc.c     2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_nportdisc.c
+--- a/drivers/scsi/lpfc/lpfc_nportdisc.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_nportdisc.c       Wed May 06 16:56:34 2009 +0100
 @@ -30,6 +30,7 @@
  
  #include "lpfc_hw.h"
@@ -320435,7 +320301,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/d
  #include "lpfc_disc.h"
  #include "lpfc_scsi.h"
  #include "lpfc.h"
-@@ -1003,20 +1004,8 @@ lpfc_rcv_plogi_adisc_issue(struct lpfc_v
+@@ -1003,20 +1004,8 @@
                        spin_lock_irq(shost->host_lock);
                        ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
                        spin_unlock_irq(shost->host_lock);
@@ -320457,7 +320323,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/d
                }
                return ndlp->nlp_state;
        }
-@@ -1865,8 +1854,13 @@ static uint32_t
+@@ -1865,8 +1854,13 @@
  lpfc_cmpl_logo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
                        void *arg, uint32_t evt)
  {
@@ -320472,7 +320338,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/d
        return ndlp->nlp_state;
  }
  
-@@ -1935,10 +1929,10 @@ lpfc_device_recov_npr_node(struct lpfc_v
+@@ -1935,10 +1929,10 @@
        if (vport->fc_flag & FC_RSCN_DEFERRED)
                return ndlp->nlp_state;
  
@@ -320484,7 +320350,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/d
        return ndlp->nlp_state;
  }
  
-@@ -2155,7 +2149,7 @@ lpfc_disc_state_machine(struct lpfc_vpor
+@@ -2155,7 +2149,7 @@
                lpfc_nlp_put(ndlp);
        } else {
                lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
@@ -320493,9 +320359,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_nportdisc.c linux-2.6.27.19-5.1/d
  
                lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM,
                        "DSM out:         ste:%d did:x%x flg:x%x",
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.c  2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_scsi.c
+--- a/drivers/scsi/lpfc/lpfc_scsi.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_scsi.c    Wed May 06 16:56:34 2009 +0100
 @@ -32,6 +32,7 @@
  #include "lpfc_version.h"
  #include "lpfc_hw.h"
@@ -320638,7 +320504,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  {
        unsigned long flags;
        uint32_t evt_posted;
-@@ -82,14 +198,14 @@ lpfc_adjust_queue_depth(struct lpfc_hba 
+@@ -82,14 +198,14 @@
   */
  static inline void
  lpfc_rampup_queue_depth(struct lpfc_vport  *vport,
@@ -320655,7 +320521,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                return;
        spin_lock_irqsave(&phba->hbalock, flags);
        if (((phba->last_ramp_up_time + QUEUE_RAMP_UP_INTERVAL) > jiffies) ||
-@@ -117,9 +233,10 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -117,9 +233,10 @@
        struct lpfc_vport **vports;
        struct Scsi_Host  *shost;
        struct scsi_device *sdev;
@@ -320667,7 +320533,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
        num_rsrc_err = atomic_read(&phba->num_rsrc_err);
        num_cmd_success = atomic_read(&phba->num_cmd_success);
-@@ -137,6 +254,7 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -137,6 +254,7 @@
                                else
                                        new_queue_depth = sdev->queue_depth -
                                                                new_queue_depth;
@@ -320675,7 +320541,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                                if (sdev->ordered_tags)
                                        scsi_adjust_queue_depth(sdev,
                                                        MSG_ORDERED_TAG,
-@@ -145,6 +263,13 @@ lpfc_ramp_down_queue_handler(struct lpfc
+@@ -145,6 +263,13 @@
                                        scsi_adjust_queue_depth(sdev,
                                                        MSG_SIMPLE_TAG,
                                                        new_queue_depth);
@@ -320689,7 +320555,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                        }
                }
        lpfc_destroy_vport_work_array(phba, vports);
-@@ -159,6 +284,7 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -159,6 +284,7 @@
        struct Scsi_Host  *shost;
        struct scsi_device *sdev;
        int i;
@@ -320697,7 +320563,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
        vports = lpfc_create_vport_work_array(phba);
        if (vports != NULL)
-@@ -176,6 +302,14 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+@@ -176,11 +302,48 @@
                                        scsi_adjust_queue_depth(sdev,
                                                        MSG_SIMPLE_TAG,
                                                        sdev->queue_depth+1);
@@ -320712,10 +320578,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                        }
                }
        lpfc_destroy_vport_work_array(phba, vports);
-@@ -183,6 +317,35 @@ lpfc_ramp_up_queue_handler(struct lpfc_h
+       atomic_set(&phba->num_rsrc_err, 0);
        atomic_set(&phba->num_cmd_success, 0);
- }
++}
++
 +/**
 + * lpfc_scsi_dev_block: set all scsi hosts to block state.
 + * @phba: Pointer to HBA context object.
@@ -320743,12 +320609,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
 +                      }
 +              }
 +      lpfc_destroy_vport_work_array(phba, vports);
-+}
-+
+ }
  /*
-  * This routine allocates a scsi buffer, which contains all the necessary
-  * information needed to initiate a SCSI I/O.  The non-DMAable buffer region
-@@ -198,7 +361,9 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
+@@ -198,7 +361,9 @@
        struct lpfc_scsi_buf *psb;
        struct ulp_bde64 *bpl;
        IOCB_t *iocb;
@@ -320759,7 +320623,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        uint16_t iotag;
  
        psb = kzalloc(sizeof(struct lpfc_scsi_buf), GFP_KERNEL);
-@@ -238,40 +403,60 @@ lpfc_new_scsi_buf(struct lpfc_vport *vpo
+@@ -238,40 +403,60 @@
  
        /* Initialize local short-hand pointers. */
        bpl = psb->fcp_bpl;
@@ -320839,7 +320703,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        iocb->ulpClass = CLASS3;
  
        return psb;
-@@ -313,8 +498,9 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba *
+@@ -313,8 +498,9 @@
        struct fcp_cmnd *fcp_cmnd = lpfc_cmd->fcp_cmnd;
        struct ulp_bde64 *bpl = lpfc_cmd->fcp_bpl;
        IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb;
@@ -320850,7 +320714,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        int nseg, datadir = scsi_cmnd->sc_data_direction;
  
        /*
-@@ -352,37 +538,159 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba *
+@@ -352,37 +538,159 @@
                 * during probe that limits the number of sg elements in any
                 * single scsi command.  Just run through the seg_cnt and format
                 * the bde's.
@@ -320896,16 +320760,15 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
 -       * scsi_cmnd request_buffer.  Note that the bdeSize is explicitly
 -       * reinitialized since all iocb memory resources are used many times
 -       * for transmit, receive, and continuation bpl's.
--       */
++       * scsi_cmnd request_buffer.  Note that for SLI-2 the bdeSize is
++       * explicitly reinitialized and for SLI-3 the extended bde count is
++       * explicitly reinitialized since all iocb memory resources are reused.
+        */
 -      iocb_cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof (struct ulp_bde64));
 -      iocb_cmd->un.fcpi64.bdl.bdeSize +=
 -              (num_bde * sizeof (struct ulp_bde64));
 -      iocb_cmd->ulpBdeCount = 1;
 -      iocb_cmd->ulpLe = 1;
-+       * scsi_cmnd request_buffer.  Note that for SLI-2 the bdeSize is
-+       * explicitly reinitialized and for SLI-3 the extended bde count is
-+       * explicitly reinitialized since all iocb memory resources are reused.
-+       */
 +      if (phba->sli_rev == 3) {
 +              if (num_bde > LPFC_EXT_DATA_BDE_COUNT) {
 +                      /*
@@ -321030,15 +320893,15 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  static void
  lpfc_scsi_unprep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * psb)
  {
-@@ -411,6 +719,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *v
+@@ -410,6 +718,7 @@
+       uint32_t host_status = DID_OK;
        uint32_t rsplen = 0;
        uint32_t logit = LOG_FCP | LOG_FCP_ERROR;
 +
        /*
         *  If this is a task management command, there is no
-        *  scsi packet associated with this lpfc_cmd.  The driver
-@@ -526,6 +835,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *v
+@@ -526,6 +835,7 @@
  
   out:
        cmnd->result = ScsiResult(host_status, scsi_status);
@@ -321046,7 +320909,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  }
  
  static void
-@@ -539,12 +849,17 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -539,12 +849,17 @@
        struct lpfc_nodelist *pnode = rdata->pnode;
        struct scsi_cmnd *cmd = lpfc_cmd->pCmd;
        int result;
@@ -321065,7 +320928,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
        if (lpfc_cmd->status) {
                if (lpfc_cmd->status == IOSTAT_LOCAL_REJECT &&
-@@ -570,12 +885,36 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -570,12 +885,36 @@
                        break;
                case IOSTAT_NPORT_BSY:
                case IOSTAT_FABRIC_BSY:
@@ -321105,7 +320968,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                                cmd->result = ScsiResult(DID_REQUEUE, 0);
                                break;
                        } /* else: fall through */
-@@ -586,7 +925,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -586,7 +925,8 @@
  
                if (!pnode || !NLP_CHK_NODE_ACT(pnode)
                    || (pnode->nlp_state != NLP_STE_MAPPED_NODE))
@@ -321115,7 +320978,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        } else {
                cmd->result = ScsiResult(DID_OK, 0);
        }
-@@ -602,9 +942,44 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -602,9 +942,44 @@
                                 scsi_get_resid(cmd));
        }
  
@@ -321161,7 +321024,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        cmd->scsi_done(cmd);
  
        if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
-@@ -612,28 +987,28 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -612,28 +987,28 @@
                 * If there is a thread waiting for command completion
                 * wake up the thread.
                 */
@@ -321196,7 +321059,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                                        continue;
                                if (tmp_sdev->ordered_tags)
                                        scsi_adjust_queue_depth(tmp_sdev,
-@@ -647,6 +1022,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -647,6 +1022,9 @@
                                pnode->last_ramp_up_time = jiffies;
                        }
                }
@@ -321206,7 +321069,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        }
  
        /*
-@@ -657,8 +1035,8 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -657,8 +1035,8 @@
            NLP_CHK_NODE_ACT(pnode)) {
                pnode->last_q_full_time = jiffies;
  
@@ -321217,7 +321080,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                                continue;
                        depth = scsi_track_queue_full(tmp_sdev,
                                        tmp_sdev->queue_depth - 1);
-@@ -670,12 +1048,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -670,12 +1048,15 @@
                 * scsi_track_queue_full.
                 */
                if (depth == -1)
@@ -321234,7 +321097,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
                }
        }
  
-@@ -683,15 +1064,33 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba 
+@@ -683,13 +1064,31 @@
         * If there is a thread waiting for command completion
         * wake up the thread.
         */
@@ -321247,8 +321110,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
 +      spin_unlock_irqrestore(shost->host_lock, flags);
  
        lpfc_release_scsi_buf(phba, lpfc_cmd);
- }
++}
++
 +/**
 + * lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB.
 + * @data: A pointer to the immediate command data portion of the IOCB.
@@ -321265,12 +321128,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
 +           i += sizeof(uint32_t), j++) {
 +              ((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]);
 +      }
-+}
-+
+ }
  static void
- lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
-                   struct lpfc_nodelist *pnode)
-@@ -758,7 +1157,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *v
+@@ -758,7 +1157,8 @@
                fcp_cmnd->fcpCntl3 = 0;
                phba->fc4ControlRequests++;
        }
@@ -321280,7 +321141,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        /*
         * Finish initializing those IOCB fields that are independent
         * of the scsi_cmnd request_buffer
-@@ -798,11 +1198,13 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc
+@@ -798,11 +1198,13 @@
        piocb = &piocbq->iocb;
  
        fcp_cmnd = lpfc_cmd->fcp_cmnd;
@@ -321297,7 +321158,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        piocb->ulpContext = ndlp->nlp_rpi;
        if (ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) {
                piocb->ulpFCP2Rcvy = 1;
-@@ -967,12 +1369,16 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -967,12 +1369,16 @@
         * transport is still transitioning.
         */
        if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
@@ -321316,7 +321177,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
                lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP,
                                 "0707 driver's buffer pool is empty, "
-@@ -987,6 +1393,7 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -987,6 +1393,7 @@
        lpfc_cmd->pCmd  = cmnd;
        lpfc_cmd->rdata = rdata;
        lpfc_cmd->timeout = 0;
@@ -321324,7 +321185,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        cmnd->host_scribble = (unsigned char *)lpfc_cmd;
        cmnd->scsi_done = done;
  
-@@ -996,11 +1403,13 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd
+@@ -996,11 +1403,13 @@
  
        lpfc_scsi_prep_cmnd(vport, lpfc_cmd, ndlp);
  
@@ -321340,7 +321201,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
                lpfc_sli_poll_fcp_ring(phba);
                if (phba->cfg_poll & DISABLE_FCP_RING_INT)
-@@ -1145,6 +1554,7 @@ lpfc_device_reset_handler(struct scsi_cm
+@@ -1145,6 +1554,7 @@
        int ret = SUCCESS;
        int status;
        int cnt;
@@ -321348,7 +321209,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
        lpfc_block_error_handler(cmnd);
        /*
-@@ -1163,6 +1573,19 @@ lpfc_device_reset_handler(struct scsi_cm
+@@ -1163,6 +1573,19 @@
                        break;
                pnode = rdata->pnode;
        }
@@ -321368,7 +321229,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        if (!rdata || pnode->nlp_state != NLP_STE_MAPPED_NODE) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
                                 "0721 LUN Reset rport "
-@@ -1242,10 +1665,23 @@ lpfc_bus_reset_handler(struct scsi_cmnd 
+@@ -1242,10 +1665,23 @@
        struct lpfc_hba   *phba = vport->phba;
        struct lpfc_nodelist *ndlp = NULL;
        int match;
@@ -321393,7 +321254,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
  
        lpfc_block_error_handler(cmnd);
        /*
-@@ -1415,7 +1851,7 @@ struct scsi_host_template lpfc_template 
+@@ -1415,7 +1851,7 @@
        .info                   = lpfc_info,
        .queuecommand           = lpfc_queuecommand,
        .eh_abort_handler       = lpfc_abort_handler,
@@ -321402,7 +321263,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        .eh_bus_reset_handler   = lpfc_bus_reset_handler,
        .slave_alloc            = lpfc_slave_alloc,
        .slave_configure        = lpfc_slave_configure,
-@@ -1435,7 +1871,7 @@ struct scsi_host_template lpfc_vport_tem
+@@ -1435,7 +1871,7 @@
        .info                   = lpfc_info,
        .queuecommand           = lpfc_queuecommand,
        .eh_abort_handler       = lpfc_abort_handler,
@@ -321411,10 +321272,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.c linux-2.6.27.19-5.1/driver
        .eh_bus_reset_handler   = lpfc_bus_reset_handler,
        .slave_alloc            = lpfc_slave_alloc,
        .slave_configure        = lpfc_slave_configure,
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_scsi.h  2009-03-25 16:11:16.000000000 +0000
-@@ -107,6 +107,10 @@ struct fcp_cmnd {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_scsi.h
+--- a/drivers/scsi/lpfc/lpfc_scsi.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_scsi.h    Wed May 06 16:56:34 2009 +0100
+@@ -107,6 +107,10 @@
  
  };
  
@@ -321425,7 +321286,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h linux-2.6.27.19-5.1/driver
  struct lpfc_scsi_buf {
        struct list_head list;
        struct scsi_cmnd *pCmd;
-@@ -139,6 +143,7 @@ struct lpfc_scsi_buf {
+@@ -139,6 +143,7 @@
         */
        struct lpfc_iocbq cur_iocbq;
        wait_queue_head_t *waitq;
@@ -321433,9 +321294,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_scsi.h linux-2.6.27.19-5.1/driver
  };
  
  #define LPFC_SCSI_DMA_EXT_SIZE 264
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.c      2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_security.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_security.c        Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,338 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -321775,9 +321636,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.c linux-2.6.27.19-5.1/dr
 +      }
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_security.h      2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_security.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/lpfc/lpfc_security.h        Wed May 06 16:56:34 2009 +0100
 @@ -0,0 +1,24 @@
 +/*******************************************************************
 + * This file is part of the Emulex Linux Device Driver for         *
@@ -321803,9 +321664,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_security.h linux-2.6.27.19-5.1/dr
 +#define SECURITY_ONLINE      0x1
 +
 +#define SECURITY_WAIT_TMO    30       /* seconds to wait for the auth service */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.c   2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_sli.c
+--- a/drivers/scsi/lpfc/lpfc_sli.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_sli.c     Wed May 06 16:56:34 2009 +0100
 @@ -32,6 +32,7 @@
  
  #include "lpfc_hw.h"
@@ -321814,7 +321675,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  #include "lpfc_disc.h"
  #include "lpfc_scsi.h"
  #include "lpfc.h"
-@@ -66,10 +67,16 @@ typedef enum _lpfc_iocb_type {
+@@ -66,10 +67,16 @@
        LPFC_ABORT_IOCB
  } lpfc_iocb_type;
  
@@ -321835,7 +321696,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static inline IOCB_t *
  lpfc_cmd_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -77,6 +84,16 @@ lpfc_cmd_iocb(struct lpfc_hba *phba, str
+@@ -77,6 +84,16 @@
                           pring->cmdidx * phba->iocb_cmd_size);
  }
  
@@ -321852,7 +321713,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static inline IOCB_t *
  lpfc_resp_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -84,6 +101,15 @@ lpfc_resp_iocb(struct lpfc_hba *phba, st
+@@ -84,6 +101,15 @@
                           pring->rspidx * phba->iocb_rsp_size);
  }
  
@@ -321868,7 +321729,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_iocbq *
  __lpfc_sli_get_iocbq(struct lpfc_hba *phba)
  {
-@@ -94,6 +120,15 @@ __lpfc_sli_get_iocbq(struct lpfc_hba *ph
+@@ -94,6 +120,15 @@
        return iocbq;
  }
  
@@ -321884,7 +321745,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  struct lpfc_iocbq *
  lpfc_sli_get_iocbq(struct lpfc_hba *phba)
  {
-@@ -106,6 +141,16 @@ lpfc_sli_get_iocbq(struct lpfc_hba *phba
+@@ -106,6 +141,16 @@
        return iocbq;
  }
  
@@ -321901,7 +321762,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  __lpfc_sli_release_iocbq(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
  {
-@@ -118,6 +163,14 @@ __lpfc_sli_release_iocbq(struct lpfc_hba
+@@ -118,6 +163,14 @@
        list_add_tail(&iocbq->list, &phba->lpfc_iocb_list);
  }
  
@@ -321916,7 +321777,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_release_iocbq(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
  {
-@@ -131,10 +184,21 @@ lpfc_sli_release_iocbq(struct lpfc_hba *
+@@ -131,10 +184,21 @@
        spin_unlock_irqrestore(&phba->hbalock, iflags);
  }
  
@@ -321942,7 +321803,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static lpfc_iocb_type
  lpfc_sli_iocb_cmd_type(uint8_t iocb_cmnd)
  {
-@@ -230,6 +294,17 @@ lpfc_sli_iocb_cmd_type(uint8_t iocb_cmnd
+@@ -230,6 +294,17 @@
        return type;
  }
  
@@ -321960,7 +321821,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_ring_map(struct lpfc_hba *phba)
  {
-@@ -262,6 +337,18 @@ lpfc_sli_ring_map(struct lpfc_hba *phba)
+@@ -262,6 +337,18 @@
        return ret;
  }
  
@@ -321979,7 +321840,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                        struct lpfc_iocbq *piocb)
-@@ -282,6 +369,16 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba 
+@@ -282,6 +369,16 @@
        return 0;
  }
  
@@ -321996,7 +321857,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_iocbq *
  lpfc_sli_ringtx_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -293,14 +390,25 @@ lpfc_sli_ringtx_get(struct lpfc_hba *phb
+@@ -293,14 +390,25 @@
        return cmd_iocb;
  }
  
@@ -322026,7 +321887,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        if ((pring->next_cmdidx == pring->cmdidx) &&
           (++pring->next_cmdidx >= max_cmd_idx))
                pring->next_cmdidx = 0;
-@@ -336,6 +444,18 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba
+@@ -336,6 +444,18 @@
        return lpfc_cmd_iocb(phba, pring);
  }
  
@@ -322045,7 +321906,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  uint16_t
  lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
  {
-@@ -399,6 +519,20 @@ lpfc_sli_next_iotag(struct lpfc_hba *phb
+@@ -399,6 +519,20 @@
        return 0;
  }
  
@@ -322066,7 +321927,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_submit_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                IOCB_t *iocb, struct lpfc_iocbq *nextiocb)
-@@ -441,6 +575,18 @@ lpfc_sli_submit_iocb(struct lpfc_hba *ph
+@@ -441,6 +575,18 @@
        writel(pring->cmdidx, &phba->host_gp[pring->ringno].cmdPutInx);
  }
  
@@ -322085,7 +321946,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_update_full_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -460,6 +606,15 @@ lpfc_sli_update_full_ring(struct lpfc_hb
+@@ -460,6 +606,15 @@
        pring->stats.iocb_cmd_full++;
  }
  
@@ -322101,20 +321962,22 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_update_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -468,11 +623,22 @@ lpfc_sli_update_ring(struct lpfc_hba *ph
+@@ -468,11 +623,22 @@
        /*
         * Tell the HBA that there is work to do in this ring.
         */
 -      wmb();
 -      writel(CA_R0ATT << (ringno * 4), phba->CAregaddr);
 -      readl(phba->CAregaddr); /* flush */
+-}
+-
 +      if (!(phba->sli3_options & LPFC_SLI3_CRP_ENABLED)) {
 +              wmb();
 +              writel(CA_R0ATT << (ringno * 4), phba->CAregaddr);
 +              readl(phba->CAregaddr); /* flush */
 +      }
- }
++}
++
 +/**
 + * lpfc_sli_resume_iocb: Process iocbs in the txq.
 + * @phba: Pointer to HBA context object.
@@ -322127,7 +321990,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -504,6 +670,16 @@ lpfc_sli_resume_iocb(struct lpfc_hba *ph
+@@ -504,6 +670,16 @@
        return;
  }
  
@@ -322144,7 +322007,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_hbq_entry *
  lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno)
  {
-@@ -539,6 +715,15 @@ lpfc_sli_next_hbq_slot(struct lpfc_hba *
+@@ -539,6 +715,15 @@
                        hbqp->hbqPutIdx;
  }
  
@@ -322160,7 +322023,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_hbqbuf_free_all(struct lpfc_hba *phba)
  {
-@@ -584,6 +769,18 @@ lpfc_sli_hbqbuf_free_all(struct lpfc_hba
+@@ -584,6 +769,18 @@
        spin_unlock_irqrestore(&phba->hbalock, flags);
  }
  
@@ -322179,7 +322042,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_hbq_entry *
  lpfc_sli_hbq_to_firmware(struct lpfc_hba *phba, uint32_t hbqno,
                         struct hbq_dmabuf *hbq_buf)
-@@ -599,7 +796,7 @@ lpfc_sli_hbq_to_firmware(struct lpfc_hba
+@@ -599,7 +796,7 @@
                hbqe->bde.addrHigh = le32_to_cpu(putPaddrHigh(physaddr));
                hbqe->bde.addrLow  = le32_to_cpu(putPaddrLow(physaddr));
                hbqe->bde.tus.f.bdeSize = hbq_buf->size;
@@ -322188,7 +322051,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                hbqe->bde.tus.w = le32_to_cpu(hbqe->bde.tus.w);
                hbqe->buffer_tag = le32_to_cpu(hbq_buf->tag);
                                /* Sync SLIM */
-@@ -612,6 +809,7 @@ lpfc_sli_hbq_to_firmware(struct lpfc_hba
+@@ -612,6 +809,7 @@
        return hbqe;
  }
  
@@ -322196,7 +322059,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_hbq_init lpfc_els_hbq = {
        .rn = 1,
        .entry_count = 200,
-@@ -619,10 +817,11 @@ static struct lpfc_hbq_init lpfc_els_hbq
+@@ -619,10 +817,11 @@
        .profile = 0,
        .ring_mask = (1 << LPFC_ELS_RING),
        .buffer_count = 0,
@@ -322210,7 +322073,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_hbq_init lpfc_extra_hbq = {
        .rn = 1,
        .entry_count = 200,
-@@ -634,51 +833,81 @@ static struct lpfc_hbq_init lpfc_extra_h
+@@ -634,51 +833,81 @@
        .add_count = 5,
  };
  
@@ -322247,6 +322110,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -      if (end > lpfc_hbq_defs[hbqno]->entry_count)
 -              end = lpfc_hbq_defs[hbqno]->entry_count;
 -
+-      /* Check whether HBQ is still in use */
+-      spin_lock_irqsave(&phba->hbalock, flags);
+-      if (!phba->hbq_in_use)
+-              goto out;
+-
+-      /* Populate HBQ entries */
+-      for (i = start; i < end; i++) {
 +      if ((phba->hbqs[hbqno].buffer_count + count) >
 +          lpfc_hbq_defs[hbqno]->entry_count)
 +              count = lpfc_hbq_defs[hbqno]->entry_count -
@@ -322255,23 +322125,17 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              return 0;
 +      /* Allocate HBQ entries */
 +      for (i = 0; i < count; i++) {
-+              hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
-+              if (!hbq_buffer)
-+                      break;
-+              list_add_tail(&hbq_buffer->dbuf.list, &hbq_buf_list);
-+      }
-       /* Check whether HBQ is still in use */
-       spin_lock_irqsave(&phba->hbalock, flags);
-       if (!phba->hbq_in_use)
--              goto out;
--
--      /* Populate HBQ entries */
--      for (i = start; i < end; i++) {
--              hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
--              if (!hbq_buffer)
+               hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
+               if (!hbq_buffer)
 -                      goto err;
 -              hbq_buffer->tag = (i | (hbqno << 16));
 -              if (lpfc_sli_hbq_to_firmware(phba, hbqno, hbq_buffer))
++                      break;
++              list_add_tail(&hbq_buffer->dbuf.list, &hbq_buf_list);
++      }
++      /* Check whether HBQ is still in use */
++      spin_lock_irqsave(&phba->hbalock, flags);
++      if (!phba->hbq_in_use)
 +              goto err;
 +      while (!list_empty(&hbq_buf_list)) {
 +              list_remove_head(&hbq_buf_list, hbq_buffer, struct hbq_dmabuf,
@@ -322287,21 +322151,25 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        }
 -
 - out:
-       spin_unlock_irqrestore(&phba->hbalock, flags);
+-      spin_unlock_irqrestore(&phba->hbalock, flags);
 -      return 0;
 - err:
+-      spin_unlock_irqrestore(&phba->hbalock, flags);
+-      return 1;
+-}
+-
++      spin_unlock_irqrestore(&phba->hbalock, flags);
 +      return posted;
 +err:
-       spin_unlock_irqrestore(&phba->hbalock, flags);
--      return 1;
++      spin_unlock_irqrestore(&phba->hbalock, flags);
 +      while (!list_empty(&hbq_buf_list)) {
 +              list_remove_head(&hbq_buf_list, hbq_buffer, struct hbq_dmabuf,
 +                               dbuf.list);
 +              (phba->hbqs[hbqno].hbq_free_buffer)(phba, hbq_buffer);
 +      }
 +      return 0;
- }
++}
++
 +/**
 + * lpfc_sli_hbqbuf_add_hbqs: Post more HBQ buffers to firmware.
 + * @phba: Pointer to HBA context object.
@@ -322314,7 +322182,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_hbqbuf_add_hbqs(struct lpfc_hba *phba, uint32_t qno)
  {
-@@ -686,6 +915,15 @@ lpfc_sli_hbqbuf_add_hbqs(struct lpfc_hba
+@@ -686,6 +915,15 @@
                                         lpfc_hbq_defs[qno]->add_count));
  }
  
@@ -322330,7 +322198,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_hbqbuf_init_hbqs(struct lpfc_hba *phba, uint32_t qno)
  {
-@@ -693,6 +931,16 @@ lpfc_sli_hbqbuf_init_hbqs(struct lpfc_hb
+@@ -693,6 +931,16 @@
                                         lpfc_hbq_defs[qno]->init_count));
  }
  
@@ -322347,7 +322215,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct hbq_dmabuf *
  lpfc_sli_hbqbuf_find(struct lpfc_hba *phba, uint32_t tag)
  {
-@@ -716,6 +964,15 @@ lpfc_sli_hbqbuf_find(struct lpfc_hba *ph
+@@ -716,6 +964,15 @@
        return NULL;
  }
  
@@ -322363,7 +322231,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_free_hbq(struct lpfc_hba *phba, struct hbq_dmabuf *hbq_buffer)
  {
-@@ -729,6 +986,15 @@ lpfc_sli_free_hbq(struct lpfc_hba *phba,
+@@ -729,6 +986,15 @@
        }
  }
  
@@ -322379,7 +322247,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_chk_mbx_command(uint8_t mbxCommand)
  {
-@@ -785,6 +1051,11 @@ lpfc_sli_chk_mbx_command(uint8_t mbxComm
+@@ -785,6 +1051,11 @@
        case MBX_REG_VPI:
        case MBX_UNREG_VPI:
        case MBX_HEARTBEAT:
@@ -322391,7 +322259,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                ret = mbxCommand;
                break;
        default:
-@@ -793,6 +1064,19 @@ lpfc_sli_chk_mbx_command(uint8_t mbxComm
+@@ -793,6 +1064,19 @@
        }
        return ret;
  }
@@ -322411,7 +322279,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_wake_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq)
  {
-@@ -812,6 +1096,17 @@ lpfc_sli_wake_mbox_wait(struct lpfc_hba 
+@@ -812,6 +1096,17 @@
        return;
  }
  
@@ -322429,7 +322297,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
  {
-@@ -846,6 +1141,19 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *
+@@ -846,6 +1141,19 @@
        return;
  }
  
@@ -322449,28 +322317,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_handle_mb_event(struct lpfc_hba *phba)
  {
-@@ -953,61 +1261,48 @@ lpfc_sli_handle_mb_event(struct lpfc_hba
+@@ -953,61 +1261,48 @@
        return 0;
  }
  
-+/**
-+ * lpfc_sli_get_buff: Get the buffer associated with the buffer tag.
-+ * @phba: Pointer to HBA context object.
-+ * @pring: Pointer to driver SLI ring object.
-+ * @tag: buffer tag.
-+ *
-+ * This function is called with no lock held. When QUE_BUFTAG_BIT bit
-+ * is set in the tag the buffer is posted for a particular exchange,
-+ * the function will return the buffer without replacing the buffer.
-+ * If the buffer is for unsolicited ELS or CT traffic, this function
-+ * returns the buffer and also posts another buffer to the firmware.
-+ **/
- static struct lpfc_dmabuf *
+-static struct lpfc_dmabuf *
 -lpfc_sli_replace_hbqbuff(struct lpfc_hba *phba, uint32_t tag)
-+lpfc_sli_get_buff(struct lpfc_hba *phba,
-+                struct lpfc_sli_ring *pring,
-+                uint32_t tag)
- {
+-{
 -      struct hbq_dmabuf *hbq_entry, *new_hbq_entry;
 -      uint32_t hbqno;
 -      void *virt;             /* virtual address ptr */
@@ -322483,15 +322336,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -              spin_unlock_irqrestore(&phba->hbalock, flags);
 -              return NULL;
 -      }
-+      struct hbq_dmabuf *hbq_entry;
-+      if (tag & QUE_BUFTAG_BIT)
-+              return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
-       hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
+-
+-      hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
 -      if (hbq_entry == NULL) {
 -              spin_unlock_irqrestore(&phba->hbalock, flags);
-+      if (!hbq_entry)
-               return NULL;
+-              return NULL;
 -      }
 -      list_del(&hbq_entry->dbuf.list);
 -
@@ -322514,20 +322363,43 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -      spin_unlock_irqrestore(&phba->hbalock, flags);
 -
 -      return &new_hbq_entry->dbuf;
-+      return &hbq_entry->dbuf;
- }
--static struct lpfc_dmabuf *
--lpfc_sli_get_buff(struct lpfc_hba *phba,
+-}
+-
++/**
++ * lpfc_sli_get_buff: Get the buffer associated with the buffer tag.
++ * @phba: Pointer to HBA context object.
++ * @pring: Pointer to driver SLI ring object.
++ * @tag: buffer tag.
++ *
++ * This function is called with no lock held. When QUE_BUFTAG_BIT bit
++ * is set in the tag the buffer is posted for a particular exchange,
++ * the function will return the buffer without replacing the buffer.
++ * If the buffer is for unsolicited ELS or CT traffic, this function
++ * returns the buffer and also posts another buffer to the firmware.
++ **/
+ static struct lpfc_dmabuf *
+ lpfc_sli_get_buff(struct lpfc_hba *phba,
 -                      struct lpfc_sli_ring *pring,
 -                      uint32_t tag)
 -{
--      if (tag & QUE_BUFTAG_BIT)
--              return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
++                struct lpfc_sli_ring *pring,
++                uint32_t tag)
++{
++      struct hbq_dmabuf *hbq_entry;
++
+       if (tag & QUE_BUFTAG_BIT)
+               return lpfc_sli_ring_taggedbuf_get(phba, pring, tag);
 -      else
 -              return lpfc_sli_replace_hbqbuff(phba, tag);
 -}
+-
++      hbq_entry = lpfc_sli_hbqbuf_find(phba, tag);
++      if (!hbq_entry)
++              return NULL;
++      return &hbq_entry->dbuf;
++}
++
++
 +/**
 + * lpfc_sli_process_unsol_iocb: Unsolicited iocb handler.
 + * @phba: Pointer to HBA context object.
@@ -322545,7 +322417,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                            struct lpfc_iocbq *saveq)
-@@ -1022,8 +1317,6 @@ lpfc_sli_process_unsol_iocb(struct lpfc_
+@@ -1022,8 +1317,6 @@
        match = 0;
        irsp = &(saveq->iocb);
  
@@ -322554,7 +322426,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        if (irsp->ulpCommand == CMD_ASYNC_STATUS) {
                if (pring->lpfc_sli_rcv_async_status)
                        pring->lpfc_sli_rcv_async_status(phba, pring, saveq);
-@@ -1192,6 +1485,18 @@ lpfc_sli_process_unsol_iocb(struct lpfc_
+@@ -1192,6 +1485,18 @@
        return 1;
  }
  
@@ -322573,7 +322445,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_iocbq *
  lpfc_sli_iocbq_lookup(struct lpfc_hba *phba,
                      struct lpfc_sli_ring *pring,
-@@ -1217,6 +1522,23 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *p
+@@ -1217,6 +1522,23 @@
        return NULL;
  }
  
@@ -322597,10 +322469,11 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                          struct lpfc_iocbq *saveq)
-@@ -1233,6 +1555,17 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+@@ -1232,6 +1554,17 @@
        if (cmdiocbp) {
                if (cmdiocbp->iocb_cmpl) {
-                       /*
++                      /*
 +                       * If an ELS command failed send an event to mgmt
 +                       * application.
 +                       */
@@ -322611,11 +322484,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +                              lpfc_send_els_failure_event(phba,
 +                                      cmdiocbp, saveq);
 +
-+                      /*
+                       /*
                         * Post all ELS completions to the worker thread.
                         * All other are passed to the completion callback.
-                        */
-@@ -1282,12 +1615,20 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+@@ -1282,12 +1615,20 @@
        return rc;
  }
  
@@ -322639,7 +322511,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        /*
         * Ring <ringno> handler: portRspPut <portRspPut> is bigger then
         * rsp ring <portRspMax>
-@@ -1312,6 +1653,51 @@ lpfc_sli_rsp_pointers_error(struct lpfc_
+@@ -1312,6 +1653,51 @@
        return;
  }
  
@@ -322691,7 +322563,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void lpfc_sli_poll_fcp_ring(struct lpfc_hba *phba)
  {
        struct lpfc_sli      *psli  = &phba->sli;
-@@ -1320,7 +1706,7 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1320,7 +1706,7 @@
        IOCB_t *entry = NULL;
        struct lpfc_iocbq *cmdiocbq = NULL;
        struct lpfc_iocbq rspiocbq;
@@ -322700,19 +322572,19 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        uint32_t status;
        uint32_t portRspPut, portRspMax;
        int type;
-@@ -1330,11 +1716,6 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1329,11 +1715,6 @@
+       unsigned long iflags;
  
        pring->stats.iocb_event++;
+-
 -      pgp = (phba->sli_rev == 3) ?
 -              &phba->slim2p->mbx.us.s3_pgp.port[pring->ringno] :
 -              &phba->slim2p->mbx.us.s2.port[pring->ringno];
 -
--
        /*
         * The next available response entry should never exceed the maximum
-        * entries.  If it does, treat it as an adapter hardware error.
-@@ -1372,8 +1753,8 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1372,8 +1753,8 @@
                                        irsp->un.ulpWord[3],
                                        irsp->un.ulpWord[4],
                                        irsp->un.ulpWord[5],
@@ -322723,7 +322595,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                }
  
                switch (type) {
-@@ -1465,17 +1846,28 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_
+@@ -1465,17 +1846,28 @@
        return;
  }
  
@@ -322758,7 +322630,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        IOCB_t *irsp = NULL;
        IOCB_t *entry = NULL;
        struct lpfc_iocbq *cmdiocbq = NULL;
-@@ -1533,7 +1925,7 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1533,7 +1925,7 @@
                        if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                                (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
                                spin_unlock_irqrestore(&phba->hbalock, iflag);
@@ -322767,7 +322639,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                spin_lock_irqsave(&phba->hbalock, iflag);
                        }
  
-@@ -1548,8 +1940,8 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1548,8 +1940,8 @@
                                        irsp->un.ulpWord[3],
                                        irsp->un.ulpWord[4],
                                        irsp->un.ulpWord[5],
@@ -322778,7 +322650,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                }
  
                switch (type) {
-@@ -1646,13 +2038,28 @@ lpfc_sli_handle_fast_ring_event(struct l
+@@ -1646,13 +2038,28 @@
        return rc;
  }
  
@@ -322810,7 +322682,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        IOCB_t *entry;
        IOCB_t *irsp = NULL;
        struct lpfc_iocbq *rspiocbp = NULL;
-@@ -1666,6 +2073,7 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1666,6 +2073,7 @@
        int rc = 1;
        unsigned long iflag;
  
@@ -322818,7 +322690,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        spin_lock_irqsave(&phba->hbalock, iflag);
        pring->stats.iocb_event++;
  
-@@ -1760,7 +2168,7 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1760,7 +2168,7 @@
                        if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) &&
                             (irsp->un.ulpWord[4] == IOERR_NO_RESOURCES)) {
                                spin_unlock_irqrestore(&phba->hbalock, iflag);
@@ -322827,7 +322699,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                spin_lock_irqsave(&phba->hbalock, iflag);
                        }
  
-@@ -1904,6 +2312,16 @@ lpfc_sli_handle_slow_ring_event(struct l
+@@ -1904,6 +2312,16 @@
        return rc;
  }
  
@@ -322844,7 +322716,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
  {
-@@ -1943,6 +2361,83 @@ lpfc_sli_abort_iocb_ring(struct lpfc_hba
+@@ -1943,6 +2361,83 @@
        }
  }
  
@@ -322928,7 +322800,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_brdready(struct lpfc_hba *phba, uint32_t mask)
  {
-@@ -1990,6 +2485,13 @@ lpfc_sli_brdready(struct lpfc_hba *phba,
+@@ -1990,6 +2485,13 @@
  
  #define BARRIER_TEST_PATTERN (0xdeadbeef)
  
@@ -322942,7 +322814,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void lpfc_reset_barrier(struct lpfc_hba *phba)
  {
        uint32_t __iomem *resp_buf;
-@@ -2063,6 +2565,17 @@ restore_hc:
+@@ -2063,6 +2565,17 @@
        readl(phba->HCregaddr); /* flush */
  }
  
@@ -322960,7 +322832,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_brdkill(struct lpfc_hba *phba)
  {
-@@ -2139,6 +2652,17 @@ lpfc_sli_brdkill(struct lpfc_hba *phba)
+@@ -2139,6 +2652,17 @@
        return ha_copy & HA_ERATT ? 0 : 1;
  }
  
@@ -322978,7 +322850,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_brdreset(struct lpfc_hba *phba)
  {
-@@ -2191,12 +2715,104 @@ lpfc_sli_brdreset(struct lpfc_hba *phba)
+@@ -2191,12 +2715,104 @@
        return 0;
  }
  
@@ -323084,7 +322956,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        volatile uint32_t word0;
        void __iomem *to_slim;
  
-@@ -2221,13 +2837,10 @@ lpfc_sli_brdrestart(struct lpfc_hba *phb
+@@ -2221,13 +2837,10 @@
        readl(to_slim); /* flush */
  
        /* Only skip post after fc_ffinit is completed */
@@ -323100,7 +322972,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        to_slim = phba->MBslimaddr + sizeof (uint32_t);
        writel(*(uint32_t *) mb, to_slim);
        readl(to_slim); /* flush */
-@@ -2241,16 +2854,24 @@ lpfc_sli_brdrestart(struct lpfc_hba *phb
+@@ -2241,16 +2854,24 @@
        memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets));
        psli->stats_start = get_seconds();
  
@@ -323129,7 +323001,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_chipset_init(struct lpfc_hba *phba)
  {
-@@ -2336,12 +2957,25 @@ lpfc_sli_chipset_init(struct lpfc_hba *p
+@@ -2336,12 +2957,25 @@
        return 0;
  }
  
@@ -323155,7 +323027,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_hbq_entry_count(void)
  {
-@@ -2354,12 +2988,27 @@ lpfc_sli_hbq_entry_count(void)
+@@ -2354,12 +2988,27 @@
        return count;
  }
  
@@ -323183,7 +323055,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_hbq_setup(struct lpfc_hba *phba)
  {
-@@ -2415,15 +3064,26 @@ lpfc_sli_hbq_setup(struct lpfc_hba *phba
+@@ -2415,15 +3064,26 @@
        mempool_free(pmb, phba->mbox_mem_pool);
  
        /* Initially populate or replenish the HBQs */
@@ -323191,13 +323063,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -              if (lpfc_sli_hbqbuf_init_hbqs(phba, hbqno))
 -                      return -ENOMEM;
 -      }
-+      for (hbqno = 0; hbqno < hbq_count; ++hbqno)
-+              lpfc_sli_hbqbuf_init_hbqs(phba, hbqno);
-       return 0;
- }
+-      return 0;
+-}
+-
 -static int
 -lpfc_do_config_port(struct lpfc_hba *phba, int sli_mode)
++      for (hbqno = 0; hbqno < hbq_count; ++hbqno)
++              lpfc_sli_hbqbuf_init_hbqs(phba, hbqno);
++      return 0;
++}
++
 +/**
 + * lpfc_sli_config_port: Issue config port mailbox command.
 + * @phba: Pointer to HBA context object.
@@ -323216,7 +323091,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  {
        LPFC_MBOXQ_t *pmb;
        uint32_t resetcount = 0, rc = 0, done = 0;
-@@ -2441,7 +3101,6 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2441,7 +3101,6 @@
                spin_unlock_irq(&phba->hbalock);
                phba->pport->port_state = LPFC_VPORT_UNKNOWN;
                lpfc_sli_brdrestart(phba);
@@ -323224,15 +323099,16 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                rc = lpfc_sli_chipset_init(phba);
                if (rc)
                        break;
-@@ -2460,13 +3119,15 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2460,13 +3119,15 @@
                if (rc == -ERESTART) {
                        phba->link_state = LPFC_LINK_UNKNOWN;
                        continue;
 -              } else if (rc) {
-+              } else if (rc)
-                       break;
+-                      break;
 -              }
 -
++              } else if (rc)
++                      break;
                phba->link_state = LPFC_INIT_MBX_CMDS;
                lpfc_config_port(phba, pmb);
                rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL);
@@ -323243,7 +323119,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                if (rc != MBX_SUCCESS) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                                "0442 Adapter failed to init, mbxCmd x%x "
-@@ -2476,30 +3137,67 @@ lpfc_do_config_port(struct lpfc_hba *phb
+@@ -2476,30 +3137,67 @@
                        phba->sli.sli_flag &= ~LPFC_SLI2_ACTIVE;
                        spin_unlock_irq(&phba->hbalock);
                        rc = -ENXIO;
@@ -323255,8 +323131,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -                              ? pmb->mb.un.varCfgPort.max_vpi
 -                              : 0;
 -              }
-       }
+-      }
 -
++      }
        if (!done) {
                rc = -EINVAL;
                goto do_prep_failed;
@@ -323265,6 +323142,8 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -      if ((pmb->mb.un.varCfgPort.sli_mode == 3) &&
 -              (!pmb->mb.un.varCfgPort.cMA)) {
 -              rc = -ENXIO;
+-      }
+-
 +      if (pmb->mb.un.varCfgPort.sli_mode == 3) {
 +              if (!pmb->mb.un.varCfgPort.cMA) {
 +                      rc = -ENXIO;
@@ -323299,8 +323178,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              phba->inb_ha_copy = NULL;
 +              phba->inb_counter = NULL;
 +              phba->max_vpi = 0;
-       }
--
++      }
  do_prep_failed:
        mempool_free(pmb, phba->mbox_mem_pool);
        return rc;
@@ -323323,7 +323201,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_hba_setup(struct lpfc_hba *phba)
  {
-@@ -2528,22 +3226,20 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba
+@@ -2528,22 +3226,20 @@
                break;
        }
  
@@ -323349,7 +323227,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        } else {
                phba->iocb_cmd_size = SLI2_IOCB_CMD_SIZE;
                phba->iocb_rsp_size = SLI2_IOCB_RSP_SIZE;
-@@ -2553,13 +3249,15 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba
+@@ -2553,13 +3249,15 @@
        lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
                        "0444 Firmware in SLI %x mode. Max_vpi %d\n",
                        phba->sli_rev, phba->max_vpi);
@@ -323367,7 +323245,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        if (phba->sli3_options & LPFC_SLI3_HBQ_ENABLED) {
                rc = lpfc_sli_hbq_setup(phba);
                if (rc)
-@@ -2581,19 +3279,19 @@ lpfc_sli_hba_setup_error:
+@@ -2581,19 +3279,19 @@
        return rc;
  }
  
@@ -323381,13 +323259,14 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 - *   void
 - *
 - * \b Description:
+- *
+- * This routine handles mailbox timeout events at timer interrupt context.
+- */
 +
 +/**
 + * lpfc_mbox_timeout: Timeout call back function for mbox timer.
 + * @ptr: context object - pointer to hba structure.
-  *
-- * This routine handles mailbox timeout events at timer interrupt context.
-- */
++ *
 + * This is the callback function for mailbox timer. The mailbox
 + * timer is armed when a new mailbox command is issued and the timer
 + * is deleted when the mailbox complete. The function is called by
@@ -323399,7 +323278,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_mbox_timeout(unsigned long ptr)
  {
-@@ -2612,6 +3310,15 @@ lpfc_mbox_timeout(unsigned long ptr)
+@@ -2612,6 +3310,15 @@
        return;
  }
  
@@ -323415,7 +323294,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
  {
-@@ -2620,7 +3327,18 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2620,7 +3327,18 @@
        struct lpfc_sli *psli = &phba->sli;
        struct lpfc_sli_ring *pring;
  
@@ -323435,7 +323314,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                return;
        }
  
-@@ -2631,6 +3349,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2631,6 +3349,7 @@
                        phba->pport->port_state,
                        phba->sli.sli_flag,
                        phba->sli.mbox_active);
@@ -323443,7 +323322,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  
        /* Setting state unknown so lpfc_sli_abort_iocb_ring
         * would get IOCB_ERROR from lpfc_sli_issue_iocb, allowing
-@@ -2666,6 +3385,32 @@ lpfc_mbox_timeout_handler(struct lpfc_hb
+@@ -2666,6 +3385,32 @@
        return;
  }
  
@@ -323476,7 +323355,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag)
  {
-@@ -2676,7 +3421,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2676,7 +3421,7 @@
        int i;
        unsigned long timeout;
        unsigned long drvr_flag = 0;
@@ -323485,12 +323364,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        void __iomem *to_slim;
        int processing_queue = 0;
  
-@@ -2835,13 +3580,38 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2835,13 +3580,38 @@
        mb->mbxOwner = OWN_CHIP;
  
        if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
 -              /* First copy command data to host SLIM area */
 -              lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx, MAILBOX_CMD_SIZE);
+-      } else {
 +              /* Populate mbox extension offset word. */
 +              if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) {
 +                      *(((uint32_t *)mb) + pmbox->mbox_offset_word)
@@ -323507,7 +323387,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              /* Copy command data to host SLIM area */
 +              lpfc_sli_pcimem_bcopy(mb, phba->mbox, MAILBOX_CMD_SIZE);
 +
-       } else {
++      } else {
 +              /* Populate mbox extension offset word. */
 +              if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len)
 +                      *(((uint32_t *)mb) + pmbox->mbox_offset_word)
@@ -323528,7 +323408,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                }
  
                /* First copy mbox command data to HBA SLIM, skip past first
-@@ -2851,7 +3621,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2851,7 +3621,7 @@
                            MAILBOX_CMD_SIZE - sizeof (uint32_t));
  
                /* Next copy over first word, with mbxOwner set */
@@ -323537,7 +323417,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                to_slim = phba->MBslimaddr;
                writel(ldata, to_slim);
                readl(to_slim); /* flush */
-@@ -2883,7 +3653,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2883,7 +3653,7 @@
  
                if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
                        /* First read mbox status word */
@@ -323546,7 +323426,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                        word0 = le32_to_cpu(word0);
                } else {
                        /* First read mbox status word */
-@@ -2922,12 +3692,11 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2922,12 +3692,11 @@
  
                        if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
                                /* First copy command data */
@@ -323561,7 +323441,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                        /* Check real SLIM for any errors */
                                        slimword0 = readl(phba->MBslimaddr);
                                        slimmb = (MAILBOX_t *) & slimword0;
-@@ -2948,17 +3717,23 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phb
+@@ -2948,17 +3717,23 @@
  
                if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
                        /* copy results back to user */
@@ -323592,7 +323472,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                        }
                }
  
-@@ -2980,9 +3755,16 @@ out_not_finished:
+@@ -2980,9 +3755,16 @@
        return MBX_NOT_FINISHED;
  }
  
@@ -323612,7 +323492,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  __lpfc_sli_ringtx_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                    struct lpfc_iocbq *piocb)
-@@ -2992,6 +3774,23 @@ __lpfc_sli_ringtx_put(struct lpfc_hba *p
+@@ -2992,6 +3774,23 @@
        pring->txq_cnt++;
  }
  
@@ -323636,7 +323516,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static struct lpfc_iocbq *
  lpfc_sli_next_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                   struct lpfc_iocbq **piocb)
-@@ -3007,9 +3806,30 @@ lpfc_sli_next_iocb(struct lpfc_hba *phba
+@@ -3007,9 +3806,30 @@
        return nextiocb;
  }
  
@@ -323670,7 +323550,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  __lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                    struct lpfc_iocbq *piocb, uint32_t flag)
-@@ -3052,6 +3872,16 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *p
+@@ -3052,6 +3872,16 @@
                 * can be issued if the link is not up.
                 */
                switch (piocb->iocb.ulpCommand) {
@@ -323687,7 +323567,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                case CMD_QUE_RING_BUF_CN:
                case CMD_QUE_RING_BUF64_CN:
                        /*
-@@ -3106,6 +3936,19 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *p
+@@ -3106,6 +3936,19 @@
  }
  
  
@@ -323707,7 +323587,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                    struct lpfc_iocbq *piocb, uint32_t flag)
-@@ -3120,6 +3963,17 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phb
+@@ -3120,6 +3963,17 @@
        return rc;
  }
  
@@ -323725,7 +323605,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_extra_ring_setup( struct lpfc_hba *phba)
  {
-@@ -3155,6 +4009,19 @@ lpfc_extra_ring_setup( struct lpfc_hba *
+@@ -3155,6 +4009,19 @@
        return 0;
  }
  
@@ -323745,7 +323625,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_async_event_handler(struct lpfc_hba * phba,
        struct lpfc_sli_ring * pring, struct lpfc_iocbq * iocbq)
-@@ -3164,6 +4031,7 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3164,6 +4031,7 @@
        uint16_t temp;
        struct temp_event temp_event_data;
        struct Scsi_Host *shost;
@@ -323753,7 +323633,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  
        icmd = &iocbq->iocb;
        evt_code = icmd->un.asyncstat.evt_code;
-@@ -3171,13 +4039,23 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3171,13 +4039,23 @@
  
        if ((evt_code != ASYNC_TEMP_WARN) &&
                (evt_code != ASYNC_TEMP_SAFE)) {
@@ -323779,16 +323659,20 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                return;
        }
        temp_event_data.data = (uint32_t)temp;
-@@ -3205,11 +4083,22 @@ lpfc_sli_async_event_handler(struct lpfc
+@@ -3205,11 +4083,22 @@
        shost = lpfc_shost_from_vport(phba->pport);
        fc_host_post_vendor_event(shost, fc_get_event_number(),
                sizeof(temp_event_data), (char *) &temp_event_data,
 -              SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX);
+-
+-}
+-
+-
 +              LPFC_NL_VENDOR_ID);
- }
++
++}
++
++
 +/**
 + * lpfc_sli_setup: SLI ring setup function.
 + * @phba: Pointer to HBA context object.
@@ -323803,7 +323687,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_setup(struct lpfc_hba *phba)
  {
-@@ -3321,6 +4210,17 @@ lpfc_sli_setup(struct lpfc_hba *phba)
+@@ -3321,6 +4210,17 @@
        return 0;
  }
  
@@ -323821,7 +323705,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_queue_setup(struct lpfc_hba *phba)
  {
-@@ -3349,6 +4249,23 @@ lpfc_sli_queue_setup(struct lpfc_hba *ph
+@@ -3349,6 +4249,23 @@
        return 1;
  }
  
@@ -323845,7 +323729,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_host_down(struct lpfc_vport *vport)
  {
-@@ -3411,6 +4328,21 @@ lpfc_sli_host_down(struct lpfc_vport *vp
+@@ -3411,6 +4328,21 @@
        return 1;
  }
  
@@ -323867,7 +323751,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_hba_down(struct lpfc_hba *phba)
  {
-@@ -3501,6 +4433,18 @@ lpfc_sli_hba_down(struct lpfc_hba *phba)
+@@ -3501,6 +4433,18 @@
        return 1;
  }
  
@@ -323886,7 +323770,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_pcimem_bcopy(void *srcp, void *destp, uint32_t cnt)
  {
-@@ -3518,6 +4462,17 @@ lpfc_sli_pcimem_bcopy(void *srcp, void *
+@@ -3518,6 +4462,17 @@
        }
  }
  
@@ -323904,7 +323788,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_ringpostbuf_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                         struct lpfc_dmabuf *mp)
-@@ -3531,6 +4486,18 @@ lpfc_sli_ringpostbuf_put(struct lpfc_hba
+@@ -3531,6 +4486,18 @@
        return 0;
  }
  
@@ -323923,7 +323807,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  uint32_t
  lpfc_sli_get_buffer_tag(struct lpfc_hba *phba)
  {
-@@ -3545,6 +4512,22 @@ lpfc_sli_get_buffer_tag(struct lpfc_hba 
+@@ -3545,6 +4512,22 @@
        return phba->buffer_tag_count;
  }
  
@@ -323946,7 +323830,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  struct lpfc_dmabuf *
  lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                        uint32_t tag)
-@@ -3565,7 +4548,7 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_
+@@ -3565,7 +4548,7 @@
  
        spin_unlock_irq(&phba->hbalock);
        lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
@@ -323955,7 +323839,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                        "ring %d Data x%lx x%p x%p x%x\n",
                        pring->ringno, (unsigned long) tag,
                        slp->next, slp->prev, pring->postbufq_cnt);
-@@ -3573,6 +4556,23 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_
+@@ -3573,6 +4556,23 @@
        return NULL;
  }
  
@@ -323979,7 +323863,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  struct lpfc_dmabuf *
  lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                         dma_addr_t phys)
-@@ -3600,6 +4600,17 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba
+@@ -3600,6 +4600,17 @@
        return NULL;
  }
  
@@ -323997,7 +323881,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_abort_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                        struct lpfc_iocbq *rspiocb)
-@@ -3665,6 +4676,17 @@ lpfc_sli_abort_els_cmpl(struct lpfc_hba 
+@@ -3665,6 +4676,17 @@
        return;
  }
  
@@ -324015,7 +323899,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_ignore_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                     struct lpfc_iocbq *rspiocb)
-@@ -3673,7 +4695,7 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *ph
+@@ -3673,7 +4695,7 @@
  
        /* ELS cmd tag <ulpIoTag> completes */
        lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
@@ -324024,7 +323908,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                        "x%x x%x x%x\n",
                        irsp->ulpIoTag, irsp->ulpStatus,
                        irsp->un.ulpWord[4], irsp->ulpTimeout);
-@@ -3684,6 +4706,17 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *ph
+@@ -3684,6 +4706,17 @@
        return;
  }
  
@@ -324042,7 +323926,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                           struct lpfc_iocbq *cmdiocb)
-@@ -3748,6 +4781,8 @@ lpfc_sli_issue_abort_iotag(struct lpfc_h
+@@ -3748,6 +4781,8 @@
                         iabt->un.acxri.abortIoTag, abtsiocbp->iotag);
        retval = __lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0);
  
@@ -324051,7 +323935,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  abort_iotag_exit:
        /*
         * Caller to this routine should check for IOCB_ERROR
-@@ -3757,6 +4792,29 @@ abort_iotag_exit:
+@@ -3757,6 +4792,29 @@
        return retval;
  }
  
@@ -324081,7 +323965,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static int
  lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
                           uint16_t tgt_id, uint64_t lun_id,
-@@ -3800,6 +4858,25 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_i
+@@ -3800,6 +4858,25 @@
        return rc;
  }
  
@@ -324107,7 +323991,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_sum_iocb(struct lpfc_vport *vport, uint16_t tgt_id, uint64_t lun_id,
                  lpfc_ctx_cmd ctx_cmd)
-@@ -3819,6 +4896,17 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vpo
+@@ -3819,6 +4896,17 @@
        return sum;
  }
  
@@ -324125,7 +324009,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  void
  lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                        struct lpfc_iocbq *rspiocb)
-@@ -3827,6 +4915,28 @@ lpfc_sli_abort_fcp_cmpl(struct lpfc_hba 
+@@ -3827,6 +4915,28 @@
        return;
  }
  
@@ -324154,7 +324038,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring,
                    uint16_t tgt_id, uint64_t lun_id, lpfc_ctx_cmd abort_cmd)
-@@ -3878,6 +4988,24 @@ lpfc_sli_abort_iocb(struct lpfc_vport *v
+@@ -3878,6 +4988,24 @@
        return errcnt;
  }
  
@@ -324179,7 +324063,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  static void
  lpfc_sli_wake_iocb_wait(struct lpfc_hba *phba,
                        struct lpfc_iocbq *cmdiocbq,
-@@ -3899,13 +5027,36 @@ lpfc_sli_wake_iocb_wait(struct lpfc_hba 
+@@ -3899,13 +5027,36 @@
        return;
  }
  
@@ -324223,7 +324107,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_issue_iocb_wait(struct lpfc_hba *phba,
                         struct lpfc_sli_ring *pring,
-@@ -3963,7 +5114,7 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba
+@@ -3963,7 +5114,7 @@
                }
        } else {
                lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
@@ -324232,7 +324116,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                retval);
                retval = IOCB_ERROR;
        }
-@@ -3983,6 +5134,32 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba
+@@ -3983,6 +5134,32 @@
        return retval;
  }
  
@@ -324265,7 +324149,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_issue_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq,
                         uint32_t timeout)
-@@ -4027,6 +5204,18 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba
+@@ -4027,6 +5204,18 @@
        return retval;
  }
  
@@ -324284,7 +324168,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
  int
  lpfc_sli_flush_mbox_queue(struct lpfc_hba * phba)
  {
-@@ -4058,13 +5247,84 @@ lpfc_sli_flush_mbox_queue(struct lpfc_hb
+@@ -4058,13 +5247,84 @@
        return (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) ? 1 : 0;
  }
  
@@ -324370,7 +324254,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
        uint32_t control;
  
        MAILBOX_t *mbox, *pmbox;
-@@ -4078,67 +5338,71 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4078,67 +5338,71 @@
         * Get the driver's phba structure from the dev_id and
         * assume the HBA is not interrupting.
         */
@@ -324386,12 +324270,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -
 -      phba->sli.slistat.sli_intr++;
 -
-       /*
+-      /*
 -       * Call the HBA to see if it is interrupting.  If not, don't claim
 -       * the interrupt
-+       * Stuff needs to be attented to when this function is invoked as an
-+       * individual interrupt handler in MSI-X multi-message interrupt mode
-        */
+-       */
 -
 -      /* Ignore all interrupts during initialization. */
 -      if (unlikely(phba->link_state < LPFC_LINK_DOWN))
@@ -324415,6 +324297,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -
 -      if (unlikely(!ha_copy))
 -              return IRQ_NONE;
++      /*
++       * Stuff needs to be attented to when this function is invoked as an
++       * individual interrupt handler in MSI-X multi-message interrupt mode
++       */
 +      if (phba->intr_type == MSIX) {
 +              /* If the pci channel is offline, ignore all the interrupts */
 +              if (unlikely(pci_channel_offline(phba->pcidev)))
@@ -324478,7 +324364,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                        /*
                         * Turn off Slow Rings interrupts, LPFC_ELS_RING is
                         * the only slow ring.
-@@ -4147,7 +5411,7 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4147,7 +5411,7 @@
                                (HA_RXMASK  << (4*LPFC_ELS_RING)));
                        status >>= (4*LPFC_ELS_RING);
                        if (status & HA_RXMASK) {
@@ -324487,14 +324373,13 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                control = readl(phba->HCregaddr);
  
                                lpfc_debugfs_slow_ring_trc(phba,
-@@ -4176,40 +5440,22 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4176,40 +5440,22 @@
                                                (uint32_t)((unsigned long)
                                                &phba->work_waitq));
                                }
 -                              spin_unlock(&phba->hbalock);
-+                              spin_unlock_irqrestore(&phba->hbalock, iflag);
-                       }
-               }
+-                      }
+-              }
 -
 -              if (work_ha_copy & HA_ERATT) {
 -                      /*
@@ -324517,6 +324402,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 -              spin_lock(&phba->hbalock);
 -              if ((work_ha_copy & HA_MBATT) &&
 -                  (phba->sli.mbox_active)) {
++                              spin_unlock_irqrestore(&phba->hbalock, iflag);
++                      }
++              }
 +              spin_lock_irqsave(&phba->hbalock, iflag);
 +              if (work_ha_copy & HA_ERATT)
 +                      lpfc_sli_read_hs(phba);
@@ -324535,7 +324423,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                /*
                                 * Stray Mailbox Interrupt, mbxCommand <cmd>
                                 * mbxStatus <status>
-@@ -4226,12 +5472,21 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4226,12 +5472,21 @@
                                work_ha_copy &= ~HA_MBATT;
                        } else {
                                phba->sli.mbox_active = NULL;
@@ -324558,7 +324446,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                                }
                                if (pmb->mbox_flag & LPFC_MBX_IMED_UNREG) {
                                        pmb->mbox_flag &= ~LPFC_MBX_IMED_UNREG;
-@@ -4270,19 +5525,24 @@ lpfc_intr_handler(int irq, void *dev_id)
+@@ -4270,19 +5525,24 @@
                                                        lpfc_printf_log(phba,
                                                        KERN_ERR,
                                                        LOG_MBOX | LOG_SLI,
@@ -324587,7 +324475,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
                if ((work_ha_copy & HA_MBATT) &&
                    (phba->sli.mbox_active == NULL)) {
  send_current_mbox:
-@@ -4297,20 +5557,80 @@ send_current_mbox:
+@@ -4297,20 +5557,80 @@
                                                "MBX_SUCCESS");
                }
  
@@ -324598,9 +324486,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              spin_unlock_irqrestore(&phba->hbalock, iflag);
                lpfc_worker_wake_up(phba);
        }
+-
 +      return IRQ_HANDLED;
--      ha_copy &= ~(phba->work_ha_mask);
++
 +} /* lpfc_sp_intr_handler */
 +
 +/**
@@ -324661,39 +324549,44 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              spin_unlock_irqrestore(&phba->hbalock, iflag);
 +      } else
 +              ha_copy = phba->ha_copy;
++
++      /*
++       * Process all events on FCP ring. Take the optimized path for FCP IO.
++       */
+       ha_copy &= ~(phba->work_ha_mask);
  
-       /*
+-      /*
 -       * Process all events on FCP ring.  Take the optimized path for
 -       * FCP IO.  Any other IO is slow path and is handled by
 -       * the worker thread.
-+       * Process all events on FCP ring. Take the optimized path for FCP IO.
-        */
+-       */
 -      status = (ha_copy & (HA_RXMASK  << (4*LPFC_FCP_RING)));
-+      ha_copy &= ~(phba->work_ha_mask);
-+
 +      status = (ha_copy & (HA_RXMASK << (4*LPFC_FCP_RING)));
        status >>= (4*LPFC_FCP_RING);
        if (status & HA_RXMASK)
                lpfc_sli_handle_fast_ring_event(phba,
-@@ -4319,11 +5639,10 @@ send_current_mbox:
+@@ -4319,11 +5639,10 @@
  
        if (phba->cfg_multi_ring_support == 2) {
                /*
 -               * Process all events on extra ring.  Take the optimized path
 -               * for extra ring IO.  Any other IO is slow path and is handled
 -               * by the worker thread.
+-               */
+-              status = (ha_copy & (HA_RXMASK  << (4*LPFC_EXTRA_RING)));
 +               * Process all events on extra ring. Take the optimized path
 +               * for extra ring IO.
-                */
--              status = (ha_copy & (HA_RXMASK  << (4*LPFC_EXTRA_RING)));
++               */
 +              status = (ha_copy & (HA_RXMASK << (4*LPFC_EXTRA_RING)));
                status >>= (4*LPFC_EXTRA_RING);
                if (status & HA_RXMASK) {
                        lpfc_sli_handle_fast_ring_event(phba,
-@@ -4332,5 +5651,106 @@ send_current_mbox:
+@@ -4332,5 +5651,106 @@
                }
        }
        return IRQ_HANDLED;
+-
+-} /* lpfc_intr_handler */
 +}  /* lpfc_fp_intr_handler */
 +
 +/**
@@ -324793,15 +324686,14 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.c linux-2.6.27.19-5.1/drivers
 +              fp_irq_rc = lpfc_fp_intr_handler(irq, dev_id);
 +      else
 +              fp_irq_rc = IRQ_NONE;
--} /* lpfc_intr_handler */
++
 +      /* Return device-level interrupt handling status */
 +      return (sp_irq_rc == IRQ_HANDLED) ? sp_irq_rc : fp_irq_rc;
 +}  /* lpfc_intr_handler */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_sli.h   2009-03-25 16:11:16.000000000 +0000
-@@ -88,6 +88,9 @@ typedef struct lpfcMboxq {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_sli.h
+--- a/drivers/scsi/lpfc/lpfc_sli.h     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_sli.h     Wed May 06 16:56:34 2009 +0100
+@@ -88,6 +88,9 @@
  
        void (*mbox_cmpl) (struct lpfc_hba *, struct lpfcMboxq *);
        uint8_t mbox_flag;
@@ -324811,7 +324703,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h linux-2.6.27.19-5.1/drivers
  
  } LPFC_MBOXQ_t;
  
-@@ -233,6 +236,7 @@ struct lpfc_sli {
+@@ -233,6 +236,7 @@
  #define LPFC_SLI2_ACTIVE          0x200       /* SLI2 overlay in firmware is active */
  #define LPFC_PROCESS_LA           0x400       /* Able to process link attention */
  #define LPFC_BLOCK_MGMT_IO        0x800       /* Don't allow mgmt mbx or iocb cmds */
@@ -324819,9 +324711,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_sli.h linux-2.6.27.19-5.1/drivers
  
        struct lpfc_sli_ring ring[LPFC_MAX_RING];
        int fcp_ring;           /* ring used for FCP initiator commands */
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_version.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_version.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_version.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_version.h       2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_version.h
+--- a/drivers/scsi/lpfc/lpfc_version.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_version.h Wed May 06 16:56:34 2009 +0100
 @@ -1,7 +1,7 @@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
@@ -324847,9 +324739,9 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_version.h linux-2.6.27.19-5.1/dri
                LPFC_DRIVER_VERSION
 -#define LPFC_COPYRIGHT "Copyright(c) 2004-2008 Emulex.  All rights reserved."
 +#define LPFC_COPYRIGHT "Copyright(c) 2004-2009 Emulex.  All rights reserved."
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.c
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.c 2009-03-25 16:11:16.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_vport.c
+--- a/drivers/scsi/lpfc/lpfc_vport.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_vport.c   Wed May 06 16:56:34 2009 +0100
 @@ -34,6 +34,7 @@
  #include <scsi/scsi_transport_fc.h>
  #include "lpfc_hw.h"
@@ -324866,7 +324758,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
  
  inline void lpfc_vport_set_state(struct lpfc_vport *vport,
                                 enum fc_vport_state new_state)
-@@ -204,6 +206,77 @@ lpfc_unique_wwpn(struct lpfc_hba *phba, 
+@@ -204,6 +206,77 @@
        return 1;
  }
  
@@ -324944,7 +324836,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
  int
  lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
  {
-@@ -216,10 +289,8 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -216,10 +289,8 @@
        int vpi;
        int rc = VPORT_ERROR;
        int status;
@@ -324956,7 +324848,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
                lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
                                "1808 Create VPORT failed: "
                                "NPIV is not enabled: SLImode:%d\n",
-@@ -279,20 +350,6 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -279,20 +350,6 @@
  
        memcpy(vport->fc_portname.u.wwn, vport->fc_sparam.portName.u.wwn, 8);
        memcpy(vport->fc_nodename.u.wwn, vport->fc_sparam.nodeName.u.wwn, 8);
@@ -324977,7 +324869,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
        if (fc_vport->node_name != 0)
                u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn);
        if (fc_vport->port_name != 0)
-@@ -322,6 +379,24 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -322,6 +379,24 @@
                goto error_out;
        }
  
@@ -325002,7 +324894,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
        *(struct lpfc_vport **)fc_vport->dd_data = vport;
        vport->fc_vport = fc_vport;
  
-@@ -333,6 +408,7 @@ lpfc_vport_create(struct fc_vport *fc_vp
+@@ -333,6 +408,7 @@
        }
  
        if (disable) {
@@ -325010,7 +324902,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
                rc = VPORT_OK;
                goto out;
        }
-@@ -506,13 +582,21 @@ lpfc_vport_delete(struct fc_vport *fc_vp
+@@ -506,13 +582,21 @@
         * initiated after we've disposed of all other resources associated
         * with the port.
         */
@@ -325034,7 +324926,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
        fc_remove_host(lpfc_shost_from_vport(vport));
        scsi_remove_host(lpfc_shost_from_vport(vport));
  
-@@ -602,6 +686,9 @@ lpfc_vport_delete(struct fc_vport *fc_vp
+@@ -602,6 +686,9 @@
                                timeout = schedule_timeout(timeout);
        }
  
@@ -325044,7 +324936,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
  skip_logo:
        lpfc_cleanup(vport);
        lpfc_sli_host_down(vport);
-@@ -615,8 +702,10 @@ skip_logo:
+@@ -615,8 +702,10 @@
                 * Completion of unreg_vpi (lpfc_mbx_cmpl_unreg_vpi)
                 * does the scsi_host_put() to release the vport.
                 */
@@ -325057,7 +324949,7 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
  
        lpfc_free_vpi(phba, vport->vpi);
        vport->work_port_events = 0;
-@@ -663,3 +752,82 @@ lpfc_destroy_vport_work_array(struct lpf
+@@ -663,3 +752,82 @@
                scsi_host_put(lpfc_shost_from_vport(vports[i]));
        kfree(vports);
  }
@@ -325140,10 +325032,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.c linux-2.6.27.19-5.1/drive
 +              ndlp->lat_data = NULL;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.h linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.h
---- linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/lpfc/lpfc_vport.h 2009-03-25 16:11:16.000000000 +0000
-@@ -112,4 +112,8 @@ struct vport_cmd_tag {
+diff -r 9608d5473017 drivers/scsi/lpfc/lpfc_vport.h
+--- a/drivers/scsi/lpfc/lpfc_vport.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/lpfc/lpfc_vport.h   Wed May 06 16:56:34 2009 +0100
+@@ -112,4 +112,8 @@
  void lpfc_vport_set_state(struct lpfc_vport *vport,
                          enum fc_vport_state new_state);
  
@@ -325152,10 +325044,10 @@ diff -purN linux-2.6.27/drivers/scsi/lpfc/lpfc_vport.h linux-2.6.27.19-5.1/drive
 +void lpfc_free_bucket(struct lpfc_vport *);
 +
  #endif /* H_LPFC_VPORT */
-diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_mbox.c
---- linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_mbox.c  2009-03-25 16:11:15.000000000 +0000
-@@ -1580,13 +1580,20 @@ megaraid_mbox_build_cmd(adapter_t *adapt
+diff -r 9608d5473017 drivers/scsi/megaraid/megaraid_mbox.c
+--- a/drivers/scsi/megaraid/megaraid_mbox.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/megaraid/megaraid_mbox.c    Wed May 06 16:56:34 2009 +0100
+@@ -1580,13 +1580,20 @@
                case MODE_SENSE:
                {
                        struct scatterlist      *sgl;
@@ -325179,7 +325071,7 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.27.19-5.
                        }
                        else {
                                con_log(CL_ANN, (KERN_WARNING
-@@ -2324,9 +2331,20 @@ megaraid_mbox_dpc(unsigned long devp)
+@@ -2324,9 +2331,20 @@
                if (scp->cmnd[0] == INQUIRY && status == 0 && islogical == 0
                                && IS_RAID_CH(raid_dev, scb->dev_channel)) {
  
@@ -325202,10 +325094,10 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_mbox.c linux-2.6.27.19-5.
                        } else {
                                con_log(CL_ANN, (KERN_WARNING
                                                 "megaraid mailbox: invalid sg:%d\n",
-diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_sas.c
---- linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/megaraid/megaraid_sas.c   2009-03-25 16:11:15.000000000 +0000
-@@ -1016,7 +1016,8 @@ static int megasas_slave_configure(struc
+diff -r 9608d5473017 drivers/scsi/megaraid/megaraid_sas.c
+--- a/drivers/scsi/megaraid/megaraid_sas.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/megaraid/megaraid_sas.c     Wed May 06 16:56:34 2009 +0100
+@@ -1016,7 +1016,8 @@
         * The RAID firmware may require extended timeouts.
         */
        if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
@@ -325215,7 +325107,7 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1
        return 0;
  }
  
-@@ -1167,7 +1168,7 @@ static int megasas_generic_reset(struct 
+@@ -1167,7 +1168,7 @@
   * cmd has not been completed within the timeout period.
   */
  static enum
@@ -325224,7 +325116,7 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1
  {
        struct megasas_cmd *cmd = (struct megasas_cmd *)scmd->SCp.ptr;
        struct megasas_instance *instance;
-@@ -1175,7 +1176,7 @@ scsi_eh_timer_return megasas_reset_timer
+@@ -1175,7 +1176,7 @@
  
        if (time_after(jiffies, scmd->jiffies_at_alloc +
                                (MEGASAS_DEFAULT_CMD_TIMEOUT * 2) * HZ)) {
@@ -325233,7 +325125,7 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1
        }
  
        instance = cmd->instance;
-@@ -1189,7 +1190,7 @@ scsi_eh_timer_return megasas_reset_timer
+@@ -1189,7 +1190,7 @@
  
                spin_unlock_irqrestore(instance->host->host_lock, flags);
        }
@@ -325242,10 +325134,10 @@ diff -purN linux-2.6.27/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.27.19-5.1
  }
  
  /**
-diff -purN linux-2.6.27/drivers/scsi/mvsas.c linux-2.6.27.19-5.1/drivers/scsi/mvsas.c
---- linux-2.6.27/drivers/scsi/mvsas.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/mvsas.c   2009-03-25 16:11:15.000000000 +0000
-@@ -2959,7 +2959,7 @@ static int __devinit mvs_hw_init(struct 
+diff -r 9608d5473017 drivers/scsi/mvsas.c
+--- a/drivers/scsi/mvsas.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/mvsas.c     Wed May 06 16:56:34 2009 +0100
+@@ -2959,7 +2959,7 @@
  
        /* enable auto port detection */
        mw32(GBL_PORT_TYPE, MODE_AUTO_DET_EN);
@@ -325254,10 +325146,10 @@ diff -purN linux-2.6.27/drivers/scsi/mvsas.c linux-2.6.27.19-5.1/drivers/scsi/mv
        /* init and reset phys */
        for (i = 0; i < mvi->chip->n_phy; i++) {
                u32 lo = be32_to_cpu(*(u32 *)&mvi->sas_addr[4]);
-diff -purN linux-2.6.27/drivers/scsi/ncr53c8xx.c linux-2.6.27.19-5.1/drivers/scsi/ncr53c8xx.c
---- linux-2.6.27/drivers/scsi/ncr53c8xx.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/ncr53c8xx.c       2009-03-25 16:11:14.000000000 +0000
-@@ -4170,8 +4170,8 @@ static int ncr_queue_command (struct ncb
+diff -r 9608d5473017 drivers/scsi/ncr53c8xx.c
+--- a/drivers/scsi/ncr53c8xx.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/ncr53c8xx.c Wed May 06 16:56:34 2009 +0100
+@@ -4170,8 +4170,8 @@
        **
        **----------------------------------------------------
        */
@@ -325268,10 +325160,10 @@ diff -purN linux-2.6.27/drivers/scsi/ncr53c8xx.c linux-2.6.27.19-5.1/drivers/scs
                if (time_after(np->settle_time, tlimit))
                        np->settle_time = tlimit;
        }
-diff -purN linux-2.6.27/drivers/scsi/pcmcia/aha152x_stub.c linux-2.6.27.19-5.1/drivers/scsi/pcmcia/aha152x_stub.c
---- linux-2.6.27/drivers/scsi/pcmcia/aha152x_stub.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/pcmcia/aha152x_stub.c     2009-03-25 16:11:16.000000000 +0000
-@@ -114,7 +114,7 @@ static int aha152x_probe(struct pcmcia_d
+diff -r 9608d5473017 drivers/scsi/pcmcia/aha152x_stub.c
+--- a/drivers/scsi/pcmcia/aha152x_stub.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/pcmcia/aha152x_stub.c       Wed May 06 16:56:34 2009 +0100
+@@ -114,7 +114,7 @@
      link->io.NumPorts1 = 0x20;
      link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
      link->io.IOAddrLines = 10;
@@ -325280,10 +325172,10 @@ diff -purN linux-2.6.27/drivers/scsi/pcmcia/aha152x_stub.c linux-2.6.27.19-5.1/d
      link->irq.IRQInfo1 = IRQ_LEVEL_ID;
      link->conf.Attributes = CONF_ENABLE_IRQ;
      link->conf.IntType = INT_MEMORY_AND_IO;
-diff -purN linux-2.6.27/drivers/scsi/qla1280.c linux-2.6.27.19-5.1/drivers/scsi/qla1280.c
---- linux-2.6.27/drivers/scsi/qla1280.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla1280.c 2009-03-25 16:11:17.000000000 +0000
-@@ -2845,7 +2845,7 @@ qla1280_64bit_start_scsi(struct scsi_qla
+diff -r 9608d5473017 drivers/scsi/qla1280.c
+--- a/drivers/scsi/qla1280.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla1280.c   Wed May 06 16:56:34 2009 +0100
+@@ -2845,7 +2845,7 @@
        memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
  
        /* Set ISP command timeout. */
@@ -325292,7 +325184,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla1280.c linux-2.6.27.19-5.1/drivers/scsi/
  
        /* Set device target ID and LUN */
        pkt->lun = SCSI_LUN_32(cmd);
-@@ -3114,7 +3114,7 @@ qla1280_32bit_start_scsi(struct scsi_qla
+@@ -3114,7 +3114,7 @@
        memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
  
        /* Set ISP command timeout. */
@@ -325301,9 +325193,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla1280.c linux-2.6.27.19-5.1/drivers/scsi/
  
        /* Set device target ID and LUN */
        pkt->lun = SCSI_LUN_32(cmd);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/Makefile linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/Makefile
---- linux-2.6.27/drivers/scsi/qla2xxx/Makefile 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/Makefile  2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/Makefile
+--- a/drivers/scsi/qla2xxx/Makefile    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/Makefile    Wed May 06 16:56:34 2009 +0100
 @@ -1,4 +1,5 @@
  qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
 -              qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o
@@ -325311,10 +325203,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/Makefile linux-2.6.27.19-5.1/driver
 +              qla_nlnk.o
  
  obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_attr.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_attr.c        2009-03-25 16:11:17.000000000 +0000
-@@ -292,10 +292,11 @@ qla2x00_sysfs_write_optrom_ctl(struct ko
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_attr.c
+--- a/drivers/scsi/qla2xxx/qla_attr.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_attr.c  Wed May 06 16:56:35 2009 +0100
+@@ -292,10 +292,11 @@
                valid = 0;
                if (ha->optrom_size == OPTROM_SIZE_2300 && start == 0)
                        valid = 1;
@@ -325329,7 +325221,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
                    valid = 1;
                if (!valid) {
                        qla_printk(KERN_WARNING, ha,
-@@ -453,6 +454,287 @@ static struct bin_attribute sysfs_sfp_at
+@@ -453,6 +454,287 @@
        .read = qla2x00_sysfs_read_sfp,
  };
  
@@ -325617,7 +325509,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  static struct sysfs_entry {
        char *name;
        struct bin_attribute *attr;
-@@ -464,6 +746,8 @@ static struct sysfs_entry {
+@@ -464,6 +746,8 @@
        { "optrom_ctl", &sysfs_optrom_ctl_attr, },
        { "vpd", &sysfs_vpd_attr, 1 },
        { "sfp", &sysfs_sfp_attr, 1 },
@@ -325626,7 +325518,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
        { NULL },
  };
  
-@@ -796,6 +1080,27 @@ qla2x00_total_isp_aborts_show(struct dev
+@@ -796,6 +1080,27 @@
            ha->qla_stats.total_isp_aborts);
  }
  
@@ -325654,7 +325546,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
  static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
  static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
-@@ -820,6 +1125,8 @@ static DEVICE_ATTR(optrom_fw_version, S_
+@@ -820,6 +1125,8 @@
                   NULL);
  static DEVICE_ATTR(total_isp_aborts, S_IRUGO, qla2x00_total_isp_aborts_show,
                   NULL);
@@ -325663,7 +325555,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  
  struct device_attribute *qla2x00_host_attrs[] = {
        &dev_attr_driver_version,
-@@ -839,6 +1146,7 @@ struct device_attribute *qla2x00_host_at
+@@ -839,6 +1146,7 @@
        &dev_attr_optrom_fcode_version,
        &dev_attr_optrom_fw_version,
        &dev_attr_total_isp_aborts,
@@ -325671,7 +325563,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
        NULL,
  };
  
-@@ -976,7 +1284,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rp
+@@ -976,7 +1284,13 @@
        struct Scsi_Host *host = rport_to_shost(rport);
        fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
  
@@ -325686,7 +325578,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  
        /*
         * Transport has effectively 'deleted' the rport, clear
-@@ -993,6 +1307,13 @@ qla2x00_terminate_rport_io(struct fc_rpo
+@@ -993,6 +1307,13 @@
  {
        fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
  
@@ -325700,7 +325592,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
        /*
         * At this point all fcport's software-states are cleared.  Perform any
         * final cleanup of firmware resources (PCBs and XCBs).
-@@ -1005,7 +1326,6 @@ qla2x00_terminate_rport_io(struct fc_rpo
+@@ -1005,7 +1326,6 @@
        }
  
        qla2x00_abort_fcport_cmds(fcport);
@@ -325708,7 +325600,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  }
  
  static int
-@@ -1065,6 +1385,8 @@ qla2x00_get_fc_host_stats(struct Scsi_Ho
+@@ -1065,6 +1385,8 @@
                pfc_host_stat->dumped_frames = stats->dumped_frames;
                pfc_host_stat->nos_count = stats->nos_rcvd;
        }
@@ -325717,9 +325609,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_attr.c linux-2.6.27.19-5.1/driv
  
  done_free:
          dma_pool_free(ha->s_dma_pool, stats, stats_dma);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_def.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_def.h 2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_def.h
+--- a/drivers/scsi/qla2xxx/qla_def.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_def.h   Wed May 06 16:56:35 2009 +0100
 @@ -94,6 +94,89 @@
  #define LSD(x)        ((uint32_t)((uint64_t)(x)))
  #define MSD(x)        ((uint32_t)((((uint64_t)(x)) >> 16) >> 16))
@@ -325810,7 +325702,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  
  /*
   * I/O register
-@@ -2157,6 +2240,16 @@ struct qla_chip_state_84xx {
+@@ -2157,6 +2240,16 @@
  
  struct qla_statistics {
        uint32_t total_isp_aborts;
@@ -325827,7 +325719,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  };
  
  /*
-@@ -2238,6 +2331,7 @@ typedef struct scsi_qla_host {
+@@ -2238,6 +2331,7 @@
  #define FCPORT_UPDATE_NEEDED  27
  #define VP_DPC_NEEDED         28      /* wake up for VP dpc handling */
  #define UNLOADING             29
@@ -325835,7 +325727,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  
        uint32_t        device_flags;
  #define DFLG_LOCAL_DEVICES            BIT_0
-@@ -2423,6 +2517,8 @@ typedef struct scsi_qla_host {
+@@ -2423,6 +2517,8 @@
        /* SNS command interfaces for 2200. */
        struct sns_cmd_pkt      *sns_cmd;
        dma_addr_t              sns_cmd_dma;
@@ -325844,7 +325736,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  
  #define SFP_DEV_SIZE  256
  #define SFP_BLOCK_SIZE        64
-@@ -2464,6 +2560,7 @@ typedef struct scsi_qla_host {
+@@ -2464,6 +2560,7 @@
        struct mutex vport_lock;        /* Virtual port synchronization */
        struct completion mbx_cmd_comp; /* Serialize mbx access */
        struct completion mbx_intr_comp;  /* Used for completion notification */
@@ -325852,7 +325744,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  
        uint32_t        mbx_flags;
  #define  MBX_IN_PROGRESS      BIT_0
-@@ -2507,7 +2604,6 @@ typedef struct scsi_qla_host {
+@@ -2507,7 +2604,6 @@
        uint64_t        fce_wr, fce_rd;
        struct mutex    fce_mutex;
  
@@ -325860,7 +325752,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
        uint32_t        hw_event_ptr;
        uint32_t        hw_event_pause_errors;
  
-@@ -2546,13 +2642,20 @@ typedef struct scsi_qla_host {
+@@ -2546,12 +2642,19 @@
        uint8_t         fcode_revision[16];
        uint32_t        fw_revision[4];
  
@@ -325870,7 +325762,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
        uint32_t        fdt_block_size;
        uint32_t        fdt_unprotect_sec_cmd;
        uint32_t        fdt_protect_sec_cmd;
++
 +      uint32_t        flt_region_flt;
 +      uint32_t        flt_region_fdt;
 +      uint32_t        flt_region_boot;
@@ -325878,11 +325770,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
 +      uint32_t        flt_region_vpd_nvram;
 +      uint32_t        flt_region_hw_event;
 +      uint32_t        flt_region_npiv_conf;
-+
        /* Needed for BEACON */
        uint16_t        beacon_blink_led;
-       uint8_t         beacon_color_state;
-@@ -2599,8 +2702,13 @@ typedef struct scsi_qla_host {
+@@ -2599,8 +2702,13 @@
        uint16_t        max_npiv_vports;        /* 63 or 125 per topoloty */
        int             cur_vport_count;
  
@@ -325896,10 +325787,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_def.h linux-2.6.27.19-5.1/drive
  } scsi_qla_host_t;
  
  
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_devtbl.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_devtbl.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_devtbl.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_devtbl.h      2009-03-25 16:11:16.000000000 +0000
-@@ -72,7 +72,7 @@ static char *qla2x00_model_name[QLA_MODE
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_devtbl.h
+--- a/drivers/scsi/qla2xxx/qla_devtbl.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_devtbl.h        Wed May 06 16:56:35 2009 +0100
+@@ -72,7 +72,7 @@
        "QLA2462",      "Sun PCI-X 2.0 to 4Gb FC, Dual Channel",        /* 0x141 */
        "QLE2460",      "Sun PCI-Express to 2Gb FC, Single Channel",    /* 0x142 */
        "QLE2462",      "Sun PCI-Express to 4Gb FC, Single Channel",    /* 0x143 */
@@ -325908,10 +325799,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_devtbl.h linux-2.6.27.19-5.1/dr
        "QLE2440",      "PCI-Express to 4Gb FC, Single Channel",        /* 0x145 */
        "QLE2464",      "PCI-Express to 4Gb FC, Quad Channel",          /* 0x146 */
        "QLA2440",      "PCI-X 2.0 to 4Gb FC, Single Channel",          /* 0x147 */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_fw.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_fw.h  2009-03-25 16:11:16.000000000 +0000
-@@ -789,14 +789,23 @@ struct device_reg_24xx {
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_fw.h
+--- a/drivers/scsi/qla2xxx/qla_fw.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_fw.h    Wed May 06 16:56:35 2009 +0100
+@@ -789,14 +789,23 @@
  #define FA_RISC_CODE_ADDR     0x20000
  #define FA_RISC_CODE_SEGMENTS 2
  
@@ -325936,18 +325827,18 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h linux-2.6.27.19-5.1/driver
  /*
   * Flash Error Log Event Codes.
   */
-@@ -806,10 +815,6 @@ struct device_reg_24xx {
+@@ -805,10 +814,6 @@
+ #define HW_EVENT_PARITY_ERR   0xF022
  #define HW_EVENT_NVRAM_CHKSUM_ERR     0xF023
  #define HW_EVENT_FLASH_FW_ERR 0xF024
+-
 -#define FA_BOOT_LOG_ADDR      0x58000
 -#define FA_FW_DUMP0_ADDR      0x60000
 -#define FA_FW_DUMP1_ADDR      0x70000
--
        uint32_t flash_data;            /* Flash/NVRAM BIOS data. */
  
-       uint32_t ctrl_status;           /* Control/Status. */
-@@ -1203,6 +1208,63 @@ struct qla_fdt_layout {
+@@ -1203,6 +1208,63 @@
        uint8_t unused2[65];
  };
  
@@ -326011,10 +325902,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_fw.h linux-2.6.27.19-5.1/driver
  /* 84XX Support **************************************************************/
  
  #define MBA_ISP84XX_ALERT     0x800f  /* Alert Notification. */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gbl.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gbl.h 2009-03-25 16:11:16.000000000 +0000
-@@ -63,6 +63,7 @@ extern int ql2xallocfwdump;
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_gbl.h
+--- a/drivers/scsi/qla2xxx/qla_gbl.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_gbl.h   Wed May 06 16:56:35 2009 +0100
+@@ -63,6 +63,7 @@
  extern int ql2xextended_error_logging;
  extern int ql2xqfullrampup;
  extern int ql2xiidmaenable;
@@ -326022,7 +325913,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
  
  extern int qla2x00_loop_reset(scsi_qla_host_t *);
  extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
-@@ -121,6 +122,8 @@ extern int qla2x00_start_scsi(srb_t *sp)
+@@ -121,6 +122,8 @@
  extern int qla24xx_start_scsi(srb_t *sp);
  int qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t);
  int __qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t);
@@ -326031,18 +325922,18 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
  
  /*
   * Global Function Prototypes in qla_mbx.c source file.
-@@ -154,6 +157,10 @@ extern int
- qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
+@@ -152,6 +155,10 @@
  
  extern int
-+qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *, dma_addr_t, size_t,
-+    uint32_t);
+ qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
 +
 +extern int
- qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
++qla2x00_issue_iocb_timeout(scsi_qla_host_t *, void *, dma_addr_t, size_t,
++    uint32_t);
  
  extern int
-@@ -258,6 +265,8 @@ qla2x00_set_idma_speed(scsi_qla_host_t *
+ qla2x00_abort_command(scsi_qla_host_t *, srb_t *);
+@@ -258,6 +265,8 @@
  
  extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *);
  
@@ -326051,20 +325942,19 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
  /*
   * Global Function Prototypes in qla_isr.c source file.
   */
-@@ -313,9 +322,11 @@ extern int qla24xx_get_flash_version(scs
+@@ -313,8 +322,10 @@
  extern int qla2xxx_hw_event_log(scsi_qla_host_t *, uint16_t , uint16_t,
      uint16_t, uint16_t);
  
 -extern void qla2xxx_get_flash_info(scsi_qla_host_t *);
 +extern int qla2xxx_get_flash_info(scsi_qla_host_t *);
  extern int qla2xxx_get_vpd_field(scsi_qla_host_t *, char *, char *, size_t);
-+extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
 +
++extern void qla2xxx_flash_npiv_conf(scsi_qla_host_t *);
  /*
   * Global Function Prototypes in qla_dbg.c source file.
-  */
-@@ -325,6 +336,8 @@ extern void qla24xx_fw_dump(scsi_qla_hos
+@@ -325,6 +336,8 @@
  extern void qla25xx_fw_dump(scsi_qla_host_t *, int);
  extern void qla2x00_dump_regs(scsi_qla_host_t *);
  extern void qla2x00_dump_buffer(uint8_t *, uint32_t);
@@ -326073,7 +325963,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
  
  /*
   * Global Function Prototypes in qla_gs.c source file.
-@@ -345,6 +358,7 @@ extern int qla2x00_fdmi_register(scsi_ql
+@@ -345,6 +358,7 @@
  extern int qla2x00_gfpn_id(scsi_qla_host_t *, sw_info_t *);
  extern int qla2x00_gpsc(scsi_qla_host_t *, sw_info_t *);
  extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *);
@@ -326081,7 +325971,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
  
  /*
   * Global Function Prototypes in qla_attr.c source file.
-@@ -361,6 +375,13 @@ extern void qla2x00_alloc_sysfs_attr(scs
+@@ -361,6 +375,13 @@
  extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
  
  /*
@@ -326095,10 +325985,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gbl.h linux-2.6.27.19-5.1/drive
   * Global Function Prototypes in qla_dfs.c source file.
   */
  extern int qla2x00_dfs_setup(scsi_qla_host_t *);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gs.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gs.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_gs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_gs.c  2009-03-25 16:11:17.000000000 +0000
-@@ -1093,7 +1093,7 @@ qla2x00_sns_rnn_id(scsi_qla_host_t *ha)
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_gs.c
+--- a/drivers/scsi/qla2xxx/qla_gs.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_gs.c    Wed May 06 16:56:35 2009 +0100
+@@ -1093,7 +1093,7 @@
   *
   * Returns 0 on success.
   */
@@ -326107,10 +325997,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_gs.c linux-2.6.27.19-5.1/driver
  qla2x00_mgmt_svr_login(scsi_qla_host_t *ha)
  {
        int ret;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_init.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_init.c        2009-03-25 16:11:17.000000000 +0000
-@@ -83,6 +83,13 @@ qla2x00_initialize_adapter(scsi_qla_host
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_init.c
+--- a/drivers/scsi/qla2xxx/qla_init.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_init.c  Wed May 06 16:56:35 2009 +0100
+@@ -83,6 +83,13 @@
  
        ha->isp_ops->reset_chip(ha);
  
@@ -326124,7 +326014,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
        ha->isp_ops->get_flash_version(ha, ha->request_ring);
  
        qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n");
-@@ -109,7 +116,6 @@ qla2x00_initialize_adapter(scsi_qla_host
+@@ -109,7 +116,6 @@
                rval = qla2x00_setup_chip(ha);
                if (rval)
                        return (rval);
@@ -326132,7 +326022,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
        }
        if (IS_QLA84XX(ha)) {
                ha->cs84xx = qla84xx_get_chip(ha);
-@@ -974,7 +980,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+@@ -974,7 +980,6 @@
                                    &ha->fw_minor_version,
                                    &ha->fw_subminor_version,
                                    &ha->fw_attributes, &ha->fw_memory_size);
@@ -326140,7 +326030,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
                                ha->flags.npiv_supported = 0;
                                if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||
                                     IS_QLA84XX(ha)) &&
-@@ -986,6 +991,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
+@@ -986,6 +991,7 @@
                                                ha->max_npiv_vports =
                                                    MIN_MULTI_ID_FABRIC - 1;
                                }
@@ -326148,7 +326038,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
  
                                if (ql2xallocfwdump)
                                        qla2x00_alloc_fw_dump(ha);
-@@ -1235,8 +1241,11 @@ qla2x00_init_rings(scsi_qla_host_t *ha)
+@@ -1235,8 +1241,11 @@
  
        DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));
  
@@ -326161,7 +326051,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
  
        mid_init_cb->options = __constant_cpu_to_le16(BIT_1);
  
-@@ -2016,7 +2025,7 @@ qla2x00_configure_loop(scsi_qla_host_t *
+@@ -2016,7 +2025,7 @@
                DEBUG3(printk("%s: exiting normally\n", __func__));
        }
  
@@ -326170,7 +326060,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
        if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) {
                if (test_bit(LOCAL_LOOP_UPDATE, &save_flags))
                        set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
-@@ -2561,7 +2570,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho
+@@ -2561,7 +2570,7 @@
        rval = QLA_SUCCESS;
  
        /* Try GID_PT to get device list, else GAN. */
@@ -326179,7 +326069,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
        if (!swl) {
                /*EMPTY*/
                DEBUG2(printk("scsi(%ld): GID_PT allocations failed, fallback "
-@@ -3751,7 +3760,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t 
+@@ -3751,7 +3760,7 @@
        rval = QLA_SUCCESS;
  
        segments = FA_RISC_CODE_SEGMENTS;
@@ -326188,10 +326078,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_init.c linux-2.6.27.19-5.1/driv
        dcode = (uint32_t *)ha->request_ring;
        *srisc_addr = 0;
  
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_inline.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_inline.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_inline.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_inline.h      2009-03-25 16:11:17.000000000 +0000
-@@ -52,7 +52,7 @@ to_qla_parent(scsi_qla_host_t *ha)
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_inline.h
+--- a/drivers/scsi/qla2xxx/qla_inline.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_inline.h        Wed May 06 16:56:35 2009 +0100
+@@ -52,7 +52,7 @@
   * @ha: HA context
   * @ha_locked: is function called with the hardware lock
   *
@@ -326200,9 +326090,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_inline.h linux-2.6.27.19-5.1/dr
   */
  static inline int
  qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked)
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_iocb.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_iocb.c        2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_iocb.c
+--- a/drivers/scsi/qla2xxx/qla_iocb.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_iocb.c  Wed May 06 16:56:35 2009 +0100
 @@ -11,8 +11,6 @@
  
  #include <scsi/scsi_tcq.h>
@@ -326212,7 +326102,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  
  /**
   * qla2x00_get_cmd_direction() - Determine control_flag data direction.
-@@ -21,17 +19,22 @@ static void qla2x00_isp_cmd(scsi_qla_hos
+@@ -21,17 +19,22 @@
   * Returns the proper CF_* direction based on CDB.
   */
  static inline uint16_t
@@ -326238,7 +326128,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
        return (cflags);
  }
  
-@@ -169,7 +172,7 @@ void qla2x00_build_scsi_iocbs_32(srb_t *
+@@ -169,7 +172,7 @@
  
        ha = sp->ha;
  
@@ -326247,7 +326137,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  
        /* Three DSDs are available in the Command Type 2 IOCB */
        avail_dsds = 3;
-@@ -228,7 +231,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *
+@@ -228,7 +231,7 @@
  
        ha = sp->ha;
  
@@ -326256,7 +326146,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  
        /* Two DSDs are available in the Command Type 3 IOCB */
        avail_dsds = 2;
-@@ -262,7 +265,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *
+@@ -262,7 +265,7 @@
   * qla2x00_start_scsi() - Send a SCSI command to the ISP
   * @sp: command to send to the ISP
   *
@@ -326265,7 +326155,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
   */
  int
  qla2x00_start_scsi(srb_t *sp)
-@@ -407,7 +410,7 @@ queuing_error:
+@@ -407,7 +410,7 @@
   *
   * Can be called from both normal and interrupt context.
   *
@@ -326274,7 +326164,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
   */
  int
  __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun,
-@@ -471,7 +474,7 @@ qla2x00_marker(scsi_qla_host_t *ha, uint
+@@ -471,7 +474,7 @@
   *
   * Returns NULL if function failed, else, a pointer to the request packet.
   */
@@ -326283,7 +326173,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  qla2x00_req_pkt(scsi_qla_host_t *ha)
  {
        device_reg_t __iomem *reg = ha->iobase;
-@@ -541,7 +544,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha)
+@@ -541,7 +544,7 @@
   *
   * Note: The caller must hold the hardware lock before calling this routine.
   */
@@ -326292,7 +326182,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  qla2x00_isp_cmd(scsi_qla_host_t *ha)
  {
        device_reg_t __iomem *reg = ha->iobase;
-@@ -625,12 +628,17 @@ qla24xx_build_scsi_iocbs(srb_t *sp, stru
+@@ -625,12 +628,17 @@
        ha = sp->ha;
  
        /* Set transfer direction */
@@ -326312,7 +326202,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
  
        /* One DSD is available in the Command Type 3 IOCB */
        avail_dsds = 1;
-@@ -666,7 +674,7 @@ qla24xx_build_scsi_iocbs(srb_t *sp, stru
+@@ -666,7 +674,7 @@
   * qla24xx_start_scsi() - Send a SCSI command to the ISP
   * @sp: command to send to the ISP
   *
@@ -326321,10 +326211,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_iocb.c linux-2.6.27.19-5.1/driv
   */
  int
  qla24xx_start_scsi(srb_t *sp)
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_isr.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_isr.c 2009-03-25 16:11:17.000000000 +0000
-@@ -391,9 +391,9 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_isr.c
+--- a/drivers/scsi/qla2xxx/qla_isr.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_isr.c   Wed May 06 16:56:35 2009 +0100
+@@ -391,9 +391,9 @@
                break;
  
        case MBA_LIP_OCCURRED:          /* Loop Initialization Procedure */
@@ -326336,7 +326226,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
  
                if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
                        atomic_set(&ha->loop_state, LOOP_DOWN);
-@@ -460,7 +460,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -460,7 +460,7 @@
                DEBUG2(printk("scsi(%ld): Asynchronous LIP RESET (%x).\n",
                    ha->host_no, mb[1]));
                qla_printk(KERN_INFO, ha,
@@ -326345,7 +326235,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
  
                if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
                        atomic_set(&ha->loop_state, LOOP_DOWN);
-@@ -543,7 +543,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -543,7 +543,7 @@
  
        case MBA_PORT_UPDATE:           /* Port database update */
                /*
@@ -326354,7 +326244,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                 * event etc. earlier indicating loop is down) then process
                 * it.  Otherwise ignore it and Wait for RSCN to come in.
                 */
-@@ -589,7 +589,7 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -589,7 +589,7 @@
                    "scsi(%ld): RSCN database changed -- %04x %04x %04x.\n",
                    ha->host_no, mb[1], mb[2], mb[3]));
  
@@ -326363,7 +326253,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) |
                    ha->d_id.b.al_pa;
                if (rscn_entry == host_pid) {
-@@ -600,6 +600,8 @@ qla2x00_async_event(scsi_qla_host_t *ha,
+@@ -600,6 +600,8 @@
                        break;
                }
  
@@ -326372,7 +326262,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                rscn_queue_index = ha->rscn_in_ptr + 1;
                if (rscn_queue_index == MAX_RSCN_COUNT)
                        rscn_queue_index = 0;
-@@ -689,6 +691,9 @@ qla2x00_adjust_sdev_qdepth_up(struct scs
+@@ -689,6 +691,9 @@
  {
        fc_port_t *fcport = data;
  
@@ -326382,17 +326272,17 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
        if (fcport->ha->max_q_depth <= sdev->queue_depth)
                return;
  
-@@ -727,6 +732,9 @@ qla2x00_ramp_up_queue_depth(scsi_qla_hos
+@@ -726,6 +731,9 @@
+ {
        fc_port_t *fcport;
        struct scsi_device *sdev;
++
 +      if (!ql2xqfulltracking)
 +              return;
-+
        sdev = sp->cmd->device;
        if (sdev->queue_depth >= ha->max_q_depth)
-               return;
-@@ -1041,6 +1049,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1041,6 +1049,8 @@
                            scsi_status));
  
                        /* Adjust queue depth for all luns on the port. */
@@ -326401,7 +326291,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                        fcport->last_queue_full = jiffies;
                        starget_for_each_device(cp->device->sdev_target,
                            fcport, qla2x00_adjust_sdev_qdepth_down);
-@@ -1060,8 +1070,9 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1060,8 +1070,9 @@
                resid = resid_len;
                /* Use F/W calculated residual length. */
                if (IS_FWI2_CAPABLE(ha)) {
@@ -326413,7 +326303,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                                scsi_status &= ~SS_RESIDUAL_UNDER;
                                lscsi_status = 0;
                        }
-@@ -1099,6 +1110,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1099,6 +1110,8 @@
                                 * Adjust queue depth for all luns on the
                                 * port.
                                 */
@@ -326422,7 +326312,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                                fcport->last_queue_full = jiffies;
                                starget_for_each_device(
                                    cp->device->sdev_target, fcport,
-@@ -1184,7 +1197,12 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1184,7 +1197,12 @@
                    cp->serial_number, comp_status,
                    atomic_read(&fcport->state)));
  
@@ -326436,7 +326326,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                if (atomic_read(&fcport->state) == FCS_ONLINE)
                        qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1);
                break;
-@@ -1211,7 +1229,12 @@ qla2x00_status_entry(scsi_qla_host_t *ha
+@@ -1211,7 +1229,12 @@
                break;
  
        case CS_TIMEOUT:
@@ -326450,7 +326340,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
  
                if (IS_FWI2_CAPABLE(ha)) {
                        DEBUG2(printk(KERN_INFO
-@@ -1430,6 +1453,27 @@ qla24xx_process_response_queue(struct sc
+@@ -1430,6 +1453,27 @@
                case STATUS_CONT_TYPE:
                        qla2x00_status_cont_entry(ha, (sts_cont_entry_t *)pkt);
                        break;
@@ -326478,20 +326368,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_isr.c linux-2.6.27.19-5.1/drive
                case VP_RPT_ID_IOCB_TYPE:
                        qla24xx_report_id_acquisition(ha,
                            (struct vp_rpt_id_entry_24xx *)pkt);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_mbx.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_mbx.c 2009-03-25 16:11:17.000000000 +0000
-@@ -44,6 +44,9 @@ qla2x00_mailbox_command(scsi_qla_host_t 
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_mbx.c
+--- a/drivers/scsi/qla2xxx/qla_mbx.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_mbx.c   Wed May 06 16:56:35 2009 +0100
+@@ -43,6 +43,9 @@
+       uint32_t        mboxes;
        unsigned long   wait_time;
        scsi_qla_host_t *ha = to_qla_parent(pvha);
++
 +      if (ha->pdev->error_state == pci_channel_io_perm_failure)
 +              return QLA_FUNCTION_TIMEOUT;
-+
        reg = ha->iobase;
        io_lock_on = ha->flags.init_done;
-@@ -233,7 +236,7 @@ qla2x00_mailbox_command(scsi_qla_host_t 
+@@ -233,7 +236,7 @@
                        DEBUG2_3_11(printk("%s(%ld): timeout schedule "
                            "isp_abort_needed.\n", __func__, ha->host_no));
                        qla_printk(KERN_WARNING, ha,
@@ -326500,7 +326390,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
                            "abort.\n");
                        set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
                        qla2xxx_wake_dpc(ha);
-@@ -244,7 +247,7 @@ qla2x00_mailbox_command(scsi_qla_host_t 
+@@ -244,7 +247,7 @@
                        DEBUG2_3_11(printk("%s(%ld): timeout calling "
                            "abort_isp\n", __func__, ha->host_no));
                        qla_printk(KERN_WARNING, ha,
@@ -326509,7 +326399,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
                            "abort.\n");
  
                        set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags);
-@@ -681,7 +684,7 @@ qla2x00_verify_checksum(scsi_qla_host_t 
+@@ -681,7 +684,7 @@
   * Context:
   *    Kernel context.
   */
@@ -326518,7 +326408,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
  qla2x00_issue_iocb_timeout(scsi_qla_host_t *ha, void *buffer,
      dma_addr_t phys_addr, size_t size, uint32_t tov)
  {
-@@ -1964,7 +1967,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_
+@@ -1964,7 +1967,7 @@
                        *cur_iocb_cnt = mcp->mb[7];
                if (orig_iocb_cnt)
                        *orig_iocb_cnt = mcp->mb[10];
@@ -326527,7 +326417,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
                        *max_npiv_vports = mcp->mb[11];
        }
  
-@@ -1995,7 +1998,7 @@ qla2x00_get_fcal_position_map(scsi_qla_h
+@@ -1995,7 +1998,7 @@
        char *pmap;
        dma_addr_t pmap_dma;
  
@@ -326536,7 +326426,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
        if (pmap  == NULL) {
                DEBUG2_3_11(printk("%s(%ld): **** Mem Alloc Failed ****",
                    __func__, ha->host_no));
-@@ -2946,6 +2949,33 @@ qla2x00_dump_ram(scsi_qla_host_t *ha, dm
+@@ -2946,6 +2949,33 @@
  
  /* 84XX Support **************************************************************/
  
@@ -326570,9 +326460,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_mbx.c linux-2.6.27.19-5.1/drive
  struct cs84xx_mgmt_cmd {
        union {
                struct verify_chip_entry_84xx req;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.c        2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_nlnk.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla2xxx/qla_nlnk.c  Wed May 06 16:56:35 2009 +0100
 @@ -0,0 +1,434 @@
 +/*
 + * QLogic Fibre Channel HBA Driver
@@ -327008,9 +326898,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.c linux-2.6.27.19-5.1/driv
 +              netlink_unregister_notifier(&ql_fc_nl_notifier);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_nlnk.h        2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_nlnk.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla2xxx/qla_nlnk.h  Wed May 06 16:56:35 2009 +0100
 @@ -0,0 +1,168 @@
 +/*
 + * QLogic Fibre Channel HBA Driver
@@ -327180,13 +327070,14 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_nlnk.h linux-2.6.27.19-5.1/driv
 +} __attribute__ ((aligned (sizeof(uint64_t))));
 +
 +#endif /* _QLA_NLNK_H_ */
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_os.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_os.c  2009-03-25 16:11:17.000000000 +0000
-@@ -79,6 +79,14 @@ module_param(ql2xmaxqdepth, int, S_IRUGO
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_os.c
+--- a/drivers/scsi/qla2xxx/qla_os.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_os.c    Wed May 06 16:56:35 2009 +0100
+@@ -78,6 +78,14 @@
+ module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(ql2xmaxqdepth,
                "Maximum queue depth to report for target devices.");
++
 +int ql2xqfulltracking = 1;
 +module_param(ql2xqfulltracking, int, S_IRUGO|S_IWUSR);
 +MODULE_PARM_DESC(ql2xqfulltracking,
@@ -327194,11 +327085,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
 +              "returns and dynamically adjusts a scsi device's queue "
 +              "depth.  Default is 1, perform tracking.  Set to 0 to "
 +              "disable dynamic tracking and adjustment of queue depth.");
-+
  int ql2xqfullrampup = 120;
  module_param(ql2xqfullrampup, int, S_IRUGO|S_IWUSR);
- MODULE_PARM_DESC(ql2xqfullrampup,
-@@ -383,7 +391,10 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -383,7 +391,10 @@
        int rval;
  
        if (unlikely(pci_channel_offline(ha->pdev))) {
@@ -327210,7 +327100,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
                goto qc_fail_command;
        }
  
-@@ -394,10 +405,8 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -394,10 +405,8 @@
        }
  
        /* Close window on fcport/rport state-transitioning. */
@@ -327223,7 +327113,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
  
        if (atomic_read(&fcport->state) != FCS_ONLINE) {
                if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-@@ -405,7 +414,7 @@ qla2x00_queuecommand(struct scsi_cmnd *c
+@@ -405,7 +414,7 @@
                        cmd->result = DID_NO_CONNECT << 16;
                        goto qc_fail_command;
                }
@@ -327232,21 +327122,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        }
  
        spin_unlock_irq(ha->host->host_lock);
-@@ -428,10 +437,11 @@ qc_host_busy_free_sp:
+@@ -428,9 +437,10 @@
  
  qc_host_busy_lock:
        spin_lock_irq(ha->host->host_lock);
--
--qc_host_busy:
-       return SCSI_MLQUEUE_HOST_BUSY;
++      return SCSI_MLQUEUE_HOST_BUSY;
  
+-qc_host_busy:
+-      return SCSI_MLQUEUE_HOST_BUSY;
 +qc_target_busy:
 +      return SCSI_MLQUEUE_TARGET_BUSY;
-+
  qc_fail_command:
        done(cmd);
-@@ -450,7 +460,10 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -450,7 +460,10 @@
        scsi_qla_host_t *pha = to_qla_parent(ha);
  
        if (unlikely(pci_channel_offline(pha->pdev))) {
@@ -327258,7 +327147,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
                goto qc24_fail_command;
        }
  
-@@ -461,10 +474,8 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -461,10 +474,8 @@
        }
  
        /* Close window on fcport/rport state-transitioning. */
@@ -327271,7 +327160,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
  
        if (atomic_read(&fcport->state) != FCS_ONLINE) {
                if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-@@ -472,7 +483,7 @@ qla24xx_queuecommand(struct scsi_cmnd *c
+@@ -472,7 +483,7 @@
                        cmd->result = DID_NO_CONNECT << 16;
                        goto qc24_fail_command;
                }
@@ -327280,21 +327169,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        }
  
        spin_unlock_irq(ha->host->host_lock);
-@@ -495,10 +506,11 @@ qc24_host_busy_free_sp:
+@@ -495,9 +506,10 @@
  
  qc24_host_busy_lock:
        spin_lock_irq(ha->host->host_lock);
--
--qc24_host_busy:
-       return SCSI_MLQUEUE_HOST_BUSY;
++      return SCSI_MLQUEUE_HOST_BUSY;
  
+-qc24_host_busy:
+-      return SCSI_MLQUEUE_HOST_BUSY;
 +qc24_target_busy:
 +      return SCSI_MLQUEUE_TARGET_BUSY;
-+
  qc24_fail_command:
        done(cmd);
-@@ -730,6 +742,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
+@@ -730,6 +742,7 @@
                if (ha->isp_ops->abort_command(ha, sp)) {
                        DEBUG2(printk("%s(%ld): abort_command "
                            "mbx failed.\n", __func__, ha->host_no));
@@ -327302,7 +327190,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
                } else {
                        DEBUG3(printk("%s(%ld): abort_command "
                            "mbx success.\n", __func__, ha->host_no));
-@@ -1517,6 +1530,7 @@ qla2xxx_scan_start(struct Scsi_Host *sho
+@@ -1517,6 +1530,7 @@
        set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags);
        set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags);
        set_bit(RSCN_UPDATE, &ha->dpc_flags);
@@ -327310,7 +327198,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
  }
  
  static int
-@@ -1663,8 +1677,6 @@ qla2x00_probe_one(struct pci_dev *pdev, 
+@@ -1663,8 +1677,6 @@
                ha->gid_list_info_size = 8;
                ha->optrom_size = OPTROM_SIZE_25XX;
                ha->isp_ops = &qla25xx_isp_ops;
@@ -327319,7 +327207,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        }
        host->can_queue = ha->request_q_length + 128;
  
-@@ -1672,6 +1684,7 @@ qla2x00_probe_one(struct pci_dev *pdev, 
+@@ -1672,6 +1684,7 @@
        init_completion(&ha->mbx_cmd_comp);
        complete(&ha->mbx_cmd_comp);
        init_completion(&ha->mbx_intr_comp);
@@ -327327,16 +327215,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
  
        INIT_LIST_HEAD(&ha->list);
        INIT_LIST_HEAD(&ha->fcports);
-@@ -1792,6 +1805,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
+@@ -1791,6 +1804,8 @@
+       qla84xx_put_chip(ha);
  
        qla2x00_free_sysfs_attr(ha);
-+      qla_free_nlnk_dmabuf(ha);
 +
++      qla_free_nlnk_dmabuf(ha);
        fc_remove_host(ha->host);
  
-       scsi_remove_host(ha->host);
-@@ -2022,10 +2037,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
+@@ -2022,10 +2037,19 @@
                    sizeof(struct ct_sns_pkt), &ha->ct_sns_dma, GFP_KERNEL);
                if (!ha->ct_sns)
                        goto fail_free_ms_iocb;
@@ -327356,7 +327244,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
  fail_free_ms_iocb:
        dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma);
        ha->ms_iocb = NULL;
-@@ -2094,6 +2118,10 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
+@@ -2094,6 +2118,10 @@
                dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt),
                    ha->sns_cmd, ha->sns_cmd_dma);
  
@@ -327367,7 +327255,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        if (ha->ct_sns)
                dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt),
                    ha->ct_sns, ha->ct_sns_dma);
-@@ -2132,6 +2160,8 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
+@@ -2132,6 +2160,8 @@
        ha->sns_cmd_dma = 0;
        ha->ct_sns = NULL;
        ha->ct_sns_dma = 0;
@@ -327376,20 +327264,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        ha->ms_iocb = NULL;
        ha->ms_iocb_dma = 0;
        ha->init_cb = NULL;
-@@ -2433,6 +2463,12 @@ qla2x00_do_dpc(void *data)
-                           ha->host_no));
-               }
+@@ -2431,6 +2461,12 @@
  
+                       DEBUG(printk("scsi(%ld): qla2x00_loop_resync - end\n",
+                           ha->host_no));
++              }
++
 +              if (test_bit(NPIV_CONFIG_NEEDED, &ha->dpc_flags) &&
 +                  atomic_read(&ha->loop_state) == LOOP_READY) {
 +                      clear_bit(NPIV_CONFIG_NEEDED, &ha->dpc_flags);
 +                      qla2xxx_flash_npiv_conf(ha);
-+              }
-+
-               if (!ha->interrupts_on)
-                       ha->isp_ops->enable_intrs(ha);
+               }
  
-@@ -2732,6 +2768,8 @@ qla2x00_release_firmware(void)
+               if (!ha->interrupts_on)
+@@ -2732,6 +2768,8 @@
  static pci_ers_result_t
  qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
  {
@@ -327398,7 +327286,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        switch (state) {
        case pci_channel_io_normal:
                return PCI_ERS_RESULT_CAN_RECOVER;
-@@ -2739,7 +2777,7 @@ qla2xxx_pci_error_detected(struct pci_de
+@@ -2739,7 +2777,7 @@
                pci_disable_device(pdev);
                return PCI_ERS_RESULT_NEED_RESET;
        case pci_channel_io_perm_failure:
@@ -327407,7 +327295,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
                return PCI_ERS_RESULT_DISCONNECT;
        }
        return PCI_ERS_RESULT_NEED_RESET;
-@@ -2899,10 +2937,18 @@ qla2x00_module_init(void)
+@@ -2899,10 +2937,18 @@
                return -ENODEV;
        }
  
@@ -327426,7 +327314,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
                kmem_cache_destroy(srb_cachep);
                fc_release_transport(qla2xxx_transport_template);
                fc_release_transport(qla2xxx_transport_vport_template);
-@@ -2918,6 +2964,7 @@ qla2x00_module_exit(void)
+@@ -2918,6 +2964,7 @@
  {
        pci_unregister_driver(&qla2xxx_pci_driver);
        qla2x00_release_firmware();
@@ -327434,10 +327322,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_os.c linux-2.6.27.19-5.1/driver
        kmem_cache_destroy(srb_cachep);
        fc_release_transport(qla2xxx_transport_template);
        fc_release_transport(qla2xxx_transport_vport_template);
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_sup.c
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_sup.c 2009-03-25 16:11:16.000000000 +0000
-@@ -543,23 +543,199 @@ qla24xx_get_flash_manufacturer(scsi_qla_
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_sup.c
+--- a/drivers/scsi/qla2xxx/qla_sup.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_sup.c   Wed May 06 16:56:35 2009 +0100
+@@ -543,23 +543,199 @@
        }
  }
  
@@ -327445,7 +327333,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
 -qla2xxx_get_flash_info(scsi_qla_host_t *ha)
 +static int
 +qla2xxx_find_flt_start(scsi_qla_host_t *ha, uint32_t *start)
-+{
+ {
 +      const char *loc, *locations[] = { "DEF", "PCI" };
 +      uint32_t pcihdr, pcids;
 +      uint32_t *dcode;
@@ -327621,7 +327509,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
 +
 +static void
 +qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
- {
++{
 +#define FLASH_BLK_SIZE_4K     0x1000
  #define FLASH_BLK_SIZE_32K    0x8000
  #define FLASH_BLK_SIZE_64K    0x10000
@@ -327643,7 +327531,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        if (*wptr == __constant_cpu_to_le16(0xffff))
                goto no_flash_data;
        if (fdt->sig[0] != 'Q' || fdt->sig[1] != 'L' || fdt->sig[2] != 'I' ||
-@@ -577,7 +753,9 @@ qla2xxx_get_flash_info(scsi_qla_host_t *
+@@ -577,7 +753,9 @@
                goto no_flash_data;
        }
  
@@ -327654,7 +327542,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        ha->fdt_wrt_disable = fdt->wrt_disable_bits;
        ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd);
        ha->fdt_block_size = le32_to_cpu(fdt->block_size);
-@@ -588,16 +766,12 @@ qla2xxx_get_flash_info(scsi_qla_host_t *
+@@ -588,16 +766,12 @@
                    flash_conf_to_access_addr(0x0300 | fdt->protect_sec_cmd):
                    flash_conf_to_access_addr(0x0336);
        }
@@ -327675,7 +327563,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        ha->fdt_wrt_disable = 0x9c;
        ha->fdt_erase_cmd = flash_conf_to_access_addr(0x03d8);
        switch (man_id) {
-@@ -614,8 +788,7 @@ no_flash_data:
+@@ -614,8 +788,7 @@
                ha->fdt_block_size = FLASH_BLK_SIZE_64K;
                break;
        case 0x1f: /* Atmel 26DF081A. */
@@ -327685,22 +327573,23 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320);
                ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339);
                ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336);
-@@ -625,14 +798,115 @@ no_flash_data:
+@@ -625,12 +798,113 @@
                ha->fdt_block_size = FLASH_BLK_SIZE_64K;
                break;
        }
--
--      DEBUG2(qla_printk(KERN_DEBUG, ha, "Flash[MID]: (0x%x/0x%x) erase=0x%x "
--          "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", man_id, flash_id,
 +done:
 +      DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x "
 +          "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
-           ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
--          ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
++          ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
 +          ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable,
-           ha->fdt_block_size));
- }
++          ha->fdt_block_size));
++}
  
+-      DEBUG2(qla_printk(KERN_DEBUG, ha, "Flash[MID]: (0x%x/0x%x) erase=0x%x "
+-          "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", man_id, flash_id,
+-          ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
+-          ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
+-          ha->fdt_block_size));
 +int
 +qla2xxx_get_flash_info(scsi_qla_host_t *ha)
 +{
@@ -327800,12 +327689,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
 +      }
 +done:
 +      kfree(data);
-+}
-+
+ }
  static void
- qla24xx_unprotect_flash(scsi_qla_host_t *ha)
- {
-@@ -683,12 +957,11 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -683,12 +957,11 @@
      uint32_t dwords)
  {
        int ret;
@@ -327819,7 +327706,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
  
        ret = QLA_SUCCESS;
  
-@@ -710,13 +983,9 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -710,13 +983,9 @@
        qla24xx_unprotect_flash(ha);
  
        for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
@@ -327836,7 +327723,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
  
                /* Are we at the beginning of a sector? */
                if ((findex & rest_addr) == 0) {
-@@ -740,9 +1009,7 @@ qla24xx_write_flash_data(scsi_qla_host_t
+@@ -740,9 +1009,7 @@
                /* Go with burst-write. */
                if (optrom && (liter + OPTROM_BURST_DWORDS) <= dwords) {
                        /* Copy data to DMA'ble buffer. */
@@ -327847,7 +327734,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
  
                        ret = qla2x00_load_ram(ha, optrom_dma,
                            flash_data_to_access_addr(faddr),
-@@ -920,7 +1187,8 @@ qla25xx_read_nvram_data(scsi_qla_host_t 
+@@ -920,7 +1187,8 @@
        dwptr = (uint32_t *)buf;
        for (i = 0; i < bytes >> 2; i++, naddr++)
                dwptr[i] = cpu_to_le32(qla24xx_read_flash_dword(ha,
@@ -327857,7 +327744,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
  
        return buf;
  }
-@@ -935,10 +1203,10 @@ qla25xx_write_nvram_data(scsi_qla_host_t
+@@ -935,10 +1203,10 @@
        dbuf = vmalloc(RMW_BUFFER_SIZE);
        if (!dbuf)
                return QLA_MEMORY_ALLOC_FAILED;
@@ -327870,7 +327757,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
            RMW_BUFFER_SIZE);
        vfree(dbuf);
  
-@@ -2166,7 +2434,7 @@ qla2x00_get_flash_version(scsi_qla_host_
+@@ -2166,7 +2434,7 @@
                memset(dbyte, 0, 8);
                dcode = (uint16_t *)dbyte;
  
@@ -327879,7 +327766,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                    8);
                DEBUG3(printk("%s(%ld): dumping fw ver from flash:\n",
                    __func__, ha->host_no));
-@@ -2177,7 +2445,7 @@ qla2x00_get_flash_version(scsi_qla_host_
+@@ -2177,7 +2445,7 @@
                    (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
                    dcode[3] == 0)) {
                        DEBUG2(printk("%s(): Unrecognized fw revision at "
@@ -327888,7 +327775,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                } else {
                        /* values are in big endian */
                        ha->fw_revision[0] = dbyte[0] << 16 | dbyte[1];
-@@ -2212,7 +2480,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2212,7 +2480,7 @@
        dcode = mbuf;
  
        /* Begin with first PCI expansion ROM header. */
@@ -327897,7 +327784,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        last_image = 1;
        do {
                /* Verify PCI expansion ROM header. */
-@@ -2282,7 +2550,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2282,7 +2550,7 @@
        memset(ha->fw_revision, 0, sizeof(ha->fw_revision));
        dcode = mbuf;
  
@@ -327906,7 +327793,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        for (i = 0; i < 4; i++)
                dcode[i] = be32_to_cpu(dcode[i]);
  
-@@ -2291,7 +2559,7 @@ qla24xx_get_flash_version(scsi_qla_host_
+@@ -2291,7 +2559,7 @@
            (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
            dcode[3] == 0)) {
                DEBUG2(printk("%s(): Unrecognized fw version at %x.\n",
@@ -327915,7 +327802,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
        } else {
                ha->fw_revision[0] = dcode[0];
                ha->fw_revision[1] = dcode[1];
-@@ -2355,7 +2623,7 @@ qla2xxx_hw_event_store(scsi_qla_host_t *
+@@ -2355,7 +2623,7 @@
        /* Locate first empty entry. */
        for (;;) {
                if (ha->hw_event_ptr >=
@@ -327924,7 +327811,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                        DEBUG2(qla_printk(KERN_WARNING, ha,
                            "HW event -- Log Full!\n"));
                        return QLA_MEMORY_ALLOC_FAILED;
-@@ -2391,7 +2659,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2391,7 +2659,7 @@
        int rval;
        uint32_t marker[2], fdata[4];
  
@@ -327933,7 +327820,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                return QLA_FUNCTION_FAILED;
  
        DEBUG2(qla_printk(KERN_WARNING, ha,
-@@ -2406,7 +2674,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2406,7 +2674,7 @@
                    QLA_DRIVER_PATCH_VER, QLA_DRIVER_BETA_VER);
  
                /* Locate marker. */
@@ -327942,7 +327829,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                for (;;) {
                        qla24xx_read_flash_data(ha, fdata, ha->hw_event_ptr,
                            4);
-@@ -2415,7 +2683,7 @@ qla2xxx_hw_event_log(scsi_qla_host_t *ha
+@@ -2415,7 +2683,7 @@
                                break;
                        ha->hw_event_ptr += FA_HW_EVENT_ENTRY_SIZE;
                        if (ha->hw_event_ptr >=
@@ -327951,9 +327838,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_sup.c linux-2.6.27.19-5.1/drive
                                DEBUG2(qla_printk(KERN_WARNING, ha,
                                    "HW event -- Log Full!\n"));
                                return QLA_MEMORY_ALLOC_FAILED;
-diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_version.h linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_version.h
---- linux-2.6.27/drivers/scsi/qla2xxx/qla_version.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla2xxx/qla_version.h     2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla2xxx/qla_version.h
+--- a/drivers/scsi/qla2xxx/qla_version.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla2xxx/qla_version.h       Wed May 06 16:56:35 2009 +0100
 @@ -7,7 +7,7 @@
  /*
   * Driver version
@@ -327963,9 +327850,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla2xxx/qla_version.h linux-2.6.27.19-5.1/d
  
  #define QLA_DRIVER_MAJOR_VER  8
  #define QLA_DRIVER_MINOR_VER  2
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/Kconfig linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/Kconfig
---- linux-2.6.27/drivers/scsi/qla4xxx/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/Kconfig   2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/Kconfig
+--- a/drivers/scsi/qla4xxx/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/Kconfig     Wed May 06 16:56:35 2009 +0100
 @@ -1,7 +1,7 @@
  config SCSI_QLA_ISCSI
        tristate "QLogic ISP4XXX host adapter family support"
@@ -327976,10 +327863,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/Kconfig linux-2.6.27.19-5.1/drivers
 -      This driver supports the QLogic 40xx (ISP4XXX) iSCSI host
 +      This driver supports the QLogic 40xx (ISP4XXX) iSCSI host 
        adapter family.
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.c 2009-03-25 16:11:15.000000000 +0000
-@@ -6,10 +6,129 @@
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_dbg.c
+--- a/drivers/scsi/qla4xxx/ql4_dbg.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_dbg.c   Wed May 06 16:56:35 2009 +0100
+@@ -6,9 +6,128 @@
   */
  
  #include "ql4_def.h"
@@ -327987,7 +327874,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c linux-2.6.27.19-5.1/drive
  #include "ql4_glbl.h"
  #include "ql4_dbg.h"
  #include "ql4_inline.h"
++
 +#include <scsi/scsi_dbg.h>
 +
 +void __dump_registers(struct scsi_qla_host *ha)
@@ -328105,11 +327992,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c linux-2.6.27.19-5.1/drive
 +      __dump_registers(ha);
 +      spin_unlock_irqrestore(&ha->hardware_lock, flags);
 +}
-+
  void qla4xxx_dump_buffer(void *b, uint32_t size)
  {
-       uint32_t cnt;
-@@ -27,7 +146,5 @@ void qla4xxx_dump_buffer(void *b, uint32
+@@ -27,7 +146,5 @@
                else
                        printk(KERN_DEBUG "  ");
        }
@@ -328118,9 +328004,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.c linux-2.6.27.19-5.1/drive
 +      printk(KERN_DEBUG "\n");
  }
 -
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_dbg.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_dbg.h
+--- a/drivers/scsi/qla4xxx/ql4_dbg.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_dbg.h   Wed May 06 16:56:35 2009 +0100
 @@ -12,44 +12,46 @@
  /* #define QL_DEBUG_LEVEL_3  */               /* Output function tracing */
  /* #define QL_DEBUG_LEVEL_4  */
@@ -328178,17 +328064,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h linux-2.6.27.19-5.1/drive
 -#else                         /*  */
 -#define DEBUG5(x)     do {} while (0);
 -#endif                                /*  */
--
++#define DEBUG5(x)      do {if(extended_error_logging & 0x10) x;} while (0);
++#else
++#define DEBUG5(x)
++#endif
 -#if defined(QL_DEBUG_LEVEL_9)
 -#define DEBUG9(x)     do {x;} while (0);
 -#else                         /*  */
 -#define DEBUG9(x)     do {} while (0);
 -#endif                                /*  */
-+#define DEBUG5(x)      do {if(extended_error_logging & 0x10) x;} while (0);
-+#else
-+#define DEBUG5(x)
-+#endif
-+
 +#if defined(QL_DEBUG_LEVEL_6)
 +#define DEBUG6(x)      do {if(extended_error_logging & 0x20) x;} while (0);
 +#else
@@ -328196,9 +328081,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_dbg.h linux-2.6.27.19-5.1/drive
 +#endif
 +
 +#endif /*_QL4_DBG_*/
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_def.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_def.h 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_def.h
+--- a/drivers/scsi/qla4xxx/ql4_def.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_def.h   Wed May 06 16:56:35 2009 +0100
 @@ -90,10 +90,10 @@
   ***********************************/
  #define MAX_HBAS              16
@@ -328233,7 +328118,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
  #define MAX_RESET_HA_RETRIES          2
  
-@@ -158,6 +157,7 @@ struct srb {
+@@ -158,6 +157,7 @@
        struct ddb_entry        *ddb;
        uint16_t flags;         /* (1) Status flags. */
  
@@ -328241,7 +328126,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  #define SRB_DMA_VALID         BIT_3   /* DMA Buffer mapped. */
  #define SRB_GOT_SENSE         BIT_4   /* sense data recieved. */
        uint8_t state;          /* (1) Status flags. */
-@@ -182,25 +182,12 @@ struct srb {
+@@ -182,25 +182,12 @@
        uint16_t iocb_tov;
        uint16_t iocb_cnt;      /* Number of used iocbs */
        uint16_t cc_stat;
@@ -328271,7 +328156,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  struct ddb_entry {
        struct list_head list;  /* ddb list */
        struct scsi_qla_host *ha;
-@@ -244,6 +231,8 @@ struct ddb_entry {
+@@ -244,6 +231,8 @@
        uint8_t ip_addr[ISCSI_IPADDR_SIZE];
        uint8_t iscsi_name[ISCSI_NAME_SIZE];    /* 72 x48 */
        uint8_t iscsi_alias[0x20];
@@ -328280,7 +328165,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  };
  
  /*
-@@ -255,6 +244,8 @@ struct ddb_entry {
+@@ -255,6 +244,8 @@
                                         * commands */
  #define DDB_STATE_MISSING     2       /* Device logged off, trying
                                         * to re-login */
@@ -328289,7 +328174,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
  /*
   * DDB flags.
-@@ -262,9 +253,21 @@ struct ddb_entry {
+@@ -262,9 +253,21 @@
  #define DF_RELOGIN            0       /* Relogin to device */
  #define DF_NO_RELOGIN         1       /* Do not relogin if IOCTL
                                         * logged it out */
@@ -328298,14 +328183,14 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
 +#define DF_SCAN_ISSUED                2
 +#define DF_OFFLINE            3       /* Offline Device */
 +#define DF_REMOVE             4       /* FW DDB is destroyed */
-+
 +/*
 + * Asynchronous Event Queue structure
 + */
 +struct aen {
 +      uint32_t mbox_sts[MBOX_AEN_REG_COUNT];
 +};
++
 +struct ql4_aen_log {
 +      int count;
 +      struct aen entry[MAX_AEN_ENTRIES];
@@ -328313,7 +328198,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
  #include "ql4_fw.h"
  #include "ql4_nvram.h"
-@@ -273,18 +276,30 @@ struct ddb_entry {
+@@ -273,18 +276,30 @@
   * Linux Host Adapter structure
   */
  struct scsi_qla_host {
@@ -328345,7 +328230,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
        unsigned long dpc_flags;
  
-@@ -293,12 +308,10 @@ struct scsi_qla_host {
+@@ -293,12 +308,10 @@
  #define DPC_RELOGIN_DEVICE            3 /* 0x00000008 */
  #define DPC_RESET_HA_DESTROY_DDB_LIST 4 /* 0x00000010 */
  #define DPC_RESET_HA_INTR             5 /* 0x00000020 */
@@ -328360,7 +328245,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
        uint16_t        iocb_cnt;
        uint16_t        iocb_hiwat;
-@@ -324,6 +337,7 @@ struct scsi_qla_host {
+@@ -324,6 +337,7 @@
        /* NVRAM registers */
        struct eeprom_data *nvram;
        spinlock_t hardware_lock ____cacheline_aligned;
@@ -328368,7 +328253,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
        uint32_t   eeprom_cmd_data;
  
        /* Counters for general statistics */
-@@ -348,7 +362,6 @@ struct scsi_qla_host {
+@@ -348,7 +362,6 @@
        uint32_t firmware_version[2];
        uint32_t patch_number;
        uint32_t build_number;
@@ -328376,7 +328261,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
        /* --- From Init_FW --- */
        /* init_cb_t *init_cb; */
-@@ -368,6 +381,7 @@ struct scsi_qla_host {
+@@ -368,6 +381,7 @@
  
        /* --- From GetFwState --- */
        uint32_t firmware_state;
@@ -328384,18 +328269,18 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
        uint32_t addl_fw_state;
  
        /* Linux kernel thread */
-@@ -390,6 +404,10 @@ struct scsi_qla_host {
+@@ -389,6 +403,10 @@
+       struct list_head free_srb_q;
        uint16_t free_srb_q_count;
        uint16_t num_srbs_allocated;
++
 +      /* Active array */
 +      struct srb *active_srb_array[MAX_SRBS];
 +      uint16_t current_active_index;
-+
        /* DMA Memory Block */
        void *queues;
-       dma_addr_t queues_dma;
-@@ -418,12 +436,20 @@ struct scsi_qla_host {
+@@ -418,12 +436,20 @@
        uint16_t aen_out;
        struct aen aen_q[MAX_AEN_ENTRIES];
  
@@ -328417,7 +328302,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  
        /* temporary mailbox status registers */
        volatile uint8_t mbox_status_count;
-@@ -434,7 +460,11 @@ struct scsi_qla_host {
+@@ -434,13 +460,18 @@
  
        /* Map ddb_list entry by FW ddb index */
        struct ddb_entry *fw_ddb_index_map[MAX_DDB_ENTRIES];
@@ -328430,18 +328315,19 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
  };
  
  static inline int is_qla4010(struct scsi_qla_host *ha)
-@@ -442,6 +472,7 @@ static inline int is_qla4010(struct scsi
+ {
        return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010;
  }
 +
  static inline int is_qla4022(struct scsi_qla_host *ha)
  {
-       return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4022;
-@@ -512,6 +543,20 @@ static inline void __iomem * isp_gp_out(
+@@ -510,6 +541,20 @@
+       return (is_qla4010(ha) ?
+               &ha->reg->u2.isp4010.gp_out :
                &ha->reg->u2.isp4022.p0.gp_out);
- }
++}
++
 +static inline void __iomem * isp_probe_mux_addr(struct scsi_qla_host *ha)
 +{
 +      return (is_qla4010(ha) ?
@@ -328454,22 +328340,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_def.h linux-2.6.27.19-5.1/drive
 +      return (is_qla4010(ha) ?
 +              &ha->reg->u2.isp4010.probe_mux_data :
 +              &ha->reg->u2.isp4022.p0.probe_mux_data);
-+}
-+
+ }
  static inline int eeprom_ext_hw_conf_offset(struct scsi_qla_host *ha)
- {
-       return (is_qla4010(ha) ?
-@@ -590,5 +635,6 @@ static inline void ql4xxx_unlock_drvr(st
+@@ -590,5 +635,6 @@
  #define PROCESS_ALL_AENS       0
  #define FLUSH_DDB_CHANGED_AENS         1
  #define RELOGIN_DDB_CHANGED_AENS 2
 +#define PROCESS_FOR_PROBE      3
  
  #endif        /*_QLA4XXX_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_fw.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_fw.h  2009-03-25 16:11:15.000000000 +0000
-@@ -27,7 +27,11 @@ struct port_ctrl_stat_regs {
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_fw.h
+--- a/drivers/scsi/qla4xxx/ql4_fw.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_fw.h    Wed May 06 16:56:35 2009 +0100
+@@ -27,7 +27,11 @@
        __le32 rsrvd1[32];      /* 0x60-0xdf */
        __le32 gp_out;          /* 0xe0 */
        __le32 gp_in;           /* 0xe4 */
@@ -328482,7 +328366,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
        __le32 port_err_status; /* 0xfc */
  };
  
-@@ -61,7 +65,9 @@ struct isp_reg {
+@@ -61,7 +65,9 @@
        __le32 req_q_in;    /* SCSI Request Queue Producer Index */
        __le32 rsp_q_out;   /* SCSI Completion Queue Consumer Index */
  
@@ -328493,7 +328377,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  
        union {
                struct {
-@@ -79,7 +85,10 @@ struct isp_reg {
+@@ -79,7 +85,10 @@
                        __le32 gp_out; /* 0xe0 */
                        __le32 gp_in;
  
@@ -328505,7 +328389,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  
                        __le32 port_err_status; /* 0xfc */
                } __attribute__ ((packed)) isp4010;
-@@ -216,7 +225,6 @@ union external_hw_config_reg {
+@@ -216,7 +225,6 @@
  #define MBOX_CMD_ABOUT_FW                     0x0009
  #define MBOX_CMD_PING                         0x000B
  #define MBOX_CMD_LUN_RESET                    0x0016
@@ -328513,7 +328397,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  #define MBOX_CMD_GET_MANAGEMENT_DATA          0x001E
  #define MBOX_CMD_GET_FW_STATUS                        0x001F
  #define MBOX_CMD_SET_ISNS_SERVICE             0x0021
-@@ -431,8 +439,9 @@ struct init_fw_ctrl_blk {
+@@ -431,8 +439,9 @@
  
  struct dev_db_entry {
        uint16_t options;       /* 00-01 */
@@ -328525,7 +328409,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  
        uint16_t exec_throttle; /* 02-03 */
        uint16_t exec_count;    /* 04-05 */
-@@ -672,14 +681,13 @@ struct continuation_t1_entry {
+@@ -672,14 +681,13 @@
  #define ET_CONTINUE   ET_CONT_T1
  
  /* Marker entry structure*/
@@ -328542,7 +328426,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  
        uint16_t flags;         /* 0C-0D */
        uint16_t reserved1;     /* 0E-0F */
-@@ -733,6 +741,15 @@ struct status_entry {
+@@ -733,6 +741,15 @@
  
  };
  
@@ -328558,9 +328442,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_fw.h linux-2.6.27.19-5.1/driver
  struct passthru0 {
        struct qla4_header hdr;                /* 00-03 */
        uint32_t handle;        /* 04-07 */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_glbl.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_glbl.h        2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_glbl.h
+--- a/drivers/scsi/qla4xxx/ql4_glbl.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_glbl.h  Wed May 06 16:56:35 2009 +0100
 @@ -10,16 +10,17 @@
  
  struct iscsi_cls_conn;
@@ -328581,7 +328465,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/driv
  void qla4xxx_process_aen(struct scsi_qla_host * ha, uint8_t process_aen);
  
  int qla4xxx_get_dhcp_ip_address(struct scsi_qla_host * ha);
-@@ -27,8 +28,6 @@ int qla4xxx_relogin_device(struct scsi_q
+@@ -27,8 +28,6 @@
                           struct ddb_entry * ddb_entry);
  int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry,
                      int lun);
@@ -328590,7 +328474,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/driv
  int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr,
                      uint32_t offset, uint32_t len);
  int qla4xxx_get_firmware_status(struct scsi_qla_host * ha);
-@@ -48,6 +47,8 @@ int qla4xxx_get_fwddb_entry(struct scsi_
+@@ -48,6 +47,8 @@
                            uint16_t *tcp_source_port_num,
                            uint16_t *connection_id);
  
@@ -328599,7 +328483,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/driv
  int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index,
                          dma_addr_t fw_ddb_entry_dma);
  
-@@ -56,25 +57,31 @@ void qla4xxx_mark_device_missing(struct 
+@@ -56,25 +57,31 @@
  u16 rd_nvram_word(struct scsi_qla_host * ha, int offset);
  void qla4xxx_get_crash_record(struct scsi_qla_host * ha);
  struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha);
@@ -328629,20 +328513,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_glbl.h linux-2.6.27.19-5.1/driv
 -int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha,
 -      struct ddb_entry *ddb_entry, int lun, uint16_t mrkr_mod);
 +                              uint32_t fw_ddb_index, uint32_t state, uint32_t probe);
-+
-+int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
-+                          uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts);
  
 -extern int ql4xextended_error_logging;
++int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
++                          uint8_t outCount, uint32_t *mbx_cmd, uint32_t *mbx_sts);
++
 +extern int extended_error_logging;
  extern int ql4xdiscoverywait;
  extern int ql4xdontresethba;
  extern int ql4_mod_unload;
 -#endif /* _QLA4x_GBL_H */
 +#endif                                /* _QLA4x_GBL_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_init.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_init.c        2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_init.c
+--- a/drivers/scsi/qla4xxx/ql4_init.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_init.c  Wed May 06 16:56:35 2009 +0100
 @@ -5,14 +5,20 @@
   * See LICENSE.qla4xxx for copyright and licensing details.
   */
@@ -328667,7 +328551,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  
  static void ql4xxx_set_mac_number(struct scsi_qla_host *ha)
  {
-@@ -51,16 +57,16 @@ static void ql4xxx_set_mac_number(struct
+@@ -51,16 +57,16 @@
   * This routine deallocates and unlinks the specified ddb_entry from the
   * adapter's
   **/
@@ -328689,7 +328573,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  
        /* Free memory and scsi-ml struct for device entry */
        qla4xxx_destroy_sess(ddb_entry);
-@@ -95,6 +101,7 @@ void qla4xxx_free_ddb_list(struct scsi_q
+@@ -95,6 +101,7 @@
   **/
  int qla4xxx_init_rings(struct scsi_qla_host *ha)
  {
@@ -328697,18 +328581,18 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        unsigned long flags = 0;
  
        /* Initialize request queue. */
-@@ -123,6 +130,10 @@ int qla4xxx_init_rings(struct scsi_qla_h
+@@ -122,6 +129,10 @@
+       writel(0, &ha->reg->req_q_in);
        writel(0, &ha->reg->rsp_q_out);
        readl(&ha->reg->rsp_q_out);
++
 +      /* Initialize active array */
 +      for (i = 0; i < MAX_SRBS; i++)
 +              ha->active_srb_array[i] = NULL;
-+
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  
-       return QLA_SUCCESS;
-@@ -183,6 +194,16 @@ static int qla4xxx_validate_mac_address(
+@@ -183,6 +194,16 @@
   **/
  static int qla4xxx_init_local_data(struct scsi_qla_host *ha)
  {
@@ -328725,7 +328609,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        /* Initilize aen queue */
        ha->aen_q_count = MAX_AEN_ENTRIES;
  
-@@ -248,14 +269,6 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -248,14 +269,6 @@
                                          (ha->addl_fw_state &
                                           FW_ADDSTATE_LINK_UP) != 0 ?
                                          "UP" : "DOWN"));
@@ -328740,7 +328624,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                        ready = 1;
                        break;
                }
-@@ -263,12 +276,10 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -263,12 +276,10 @@
                              "seconds expired= %d\n", ha->host_no, __func__,
                              ha->firmware_state, ha->addl_fw_state,
                              timeout_count));
@@ -328754,7 +328638,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                msleep(1000);
        }                       /* end of for */
  
-@@ -276,7 +287,8 @@ static int qla4xxx_fw_ready(struct scsi_
+@@ -276,7 +287,8 @@
                DEBUG2(printk("scsi%ld: %s: FW Initialization timed out!\n",
                              ha->host_no, __func__));
  
@@ -328764,14 +328648,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                DEBUG2(printk("scsi%ld: %s: FW is reporting its waiting to"
                              " grab an IP address from DHCP server\n",
                              ha->host_no, __func__));
-@@ -307,145 +319,28 @@ static int qla4xxx_init_firmware(struct 
+@@ -307,145 +319,28 @@
        return qla4xxx_get_firmware_status(ha);
  }
  
 -static struct ddb_entry* qla4xxx_get_ddb_entry(struct scsi_qla_host *ha,
 -                                              uint32_t fw_ddb_index,
 -                                              uint32_t *new_tgt)
--{
++static void qla4xxx_fill_ddb(struct ddb_entry *ddb_entry,
++              struct dev_db_entry *fw_ddb_entry)
+ {
 -      struct dev_db_entry *fw_ddb_entry = NULL;
 -      dma_addr_t fw_ddb_entry_dma;
 -      struct ddb_entry *ddb_entry = NULL;
@@ -328840,9 +328726,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 -static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,
 -                                  struct ddb_entry *ddb_entry,
 -                                  uint32_t fw_ddb_index)
-+static void qla4xxx_fill_ddb(struct ddb_entry *ddb_entry,
-+              struct dev_db_entry *fw_ddb_entry)
- {
+-{
 -      struct dev_db_entry *fw_ddb_entry = NULL;
 -      dma_addr_t fw_ddb_entry_dma;
 -      int status = QLA_ERROR;
@@ -328919,7 +328803,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  }
  
  /**
-@@ -456,8 +351,8 @@ static int qla4xxx_update_ddb_entry(stru
+@@ -456,8 +351,8 @@
   * This routine allocates a ddb_entry, ititializes some values, and
   * inserts it into the ddb list.
   **/
@@ -328930,7 +328814,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  {
        struct ddb_entry *ddb_entry;
  
-@@ -478,6 +373,12 @@ static struct ddb_entry * qla4xxx_alloc_
+@@ -478,6 +373,12 @@
        atomic_set(&ddb_entry->relogin_timer, 0);
        atomic_set(&ddb_entry->relogin_retry_count, 0);
        atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
@@ -328943,7 +328827,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        list_add_tail(&ddb_entry->list, &ha->ddb_list);
        ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
        ha->tot_ddbs++;
-@@ -501,90 +402,103 @@ static int qla4xxx_build_ddb_list(struct
+@@ -501,90 +402,103 @@
        uint32_t ddb_state;
        uint32_t conn_err, err_code;
        struct ddb_entry *ddb_entry;
@@ -329043,7 +328927,22 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 -               */
 -              DEBUG2(printk("scsi%ld: %s: DDB[%d] added to list\n",
 -                            ha->host_no, __func__, fw_ddb_index));
--
++              if (!(le16_to_cpu(fw_ddb_entry->options) & DDB_OPT_DISC_SESSION) &&
++                      (ddb_state != DDB_DS_UNASSIGNED) &&
++                      (strlen(fw_ddb_entry->iscsi_name) != 0)){
++                      ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
++                      if (ddb_entry == NULL) {
++                              DEBUG2(dev_info(&ha->pdev->dev,"%s alloc_ddb %d"
++                                      "failed\n", __func__, fw_ddb_index));
++                              goto exit_ddb_list;
++                      }
++                      ddb_entry->fw_ddb_index = fw_ddb_index;
++                      ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
++                      ddb_entry->tcp_source_port_num = src_port;
++                      ddb_entry->connection_id = conn_id;
++                      qla4xxx_fill_ddb(ddb_entry, fw_ddb_entry);
++                      ddb_entry->fw_ddb_device_state = ddb_state;
 -              /* Add DDB to internal our ddb list. */
 -              ddb_entry = qla4xxx_get_ddb_entry(ha, fw_ddb_index, &new_tgt);
 -              if (ddb_entry == NULL) {
@@ -329063,22 +328962,6 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 -                                    "for fw_ddb_index %d.\n",
 -                                    ha->host_no, __func__, fw_ddb_index));
 -                      return QLA_ERROR;
-+              if (!(le16_to_cpu(fw_ddb_entry->options) & DDB_OPT_DISC_SESSION) &&
-+                      (ddb_state != DDB_DS_UNASSIGNED) &&
-+                      (strlen(fw_ddb_entry->iscsi_name) != 0)){
-+                      ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
-+                      if (ddb_entry == NULL) {
-+                              DEBUG2(dev_info(&ha->pdev->dev,"%s alloc_ddb %d"
-+                                      "failed\n", __func__, fw_ddb_index));
-+                              goto exit_ddb_list;
-+                      }
-+                      ddb_entry->fw_ddb_index = fw_ddb_index;
-+                      ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
-+                      ddb_entry->tcp_source_port_num = src_port;
-+                      ddb_entry->connection_id = conn_id;
-+                      qla4xxx_fill_ddb(ddb_entry, fw_ddb_entry);
-+                      ddb_entry->fw_ddb_device_state = ddb_state;
-+
 +                      DEBUG6(dev_info(&ha->pdev->dev, "%s: DDB[%d] osIdx = %d State %04x"
 +                              " ConnErr %08x %d.%d.%d.%d:%04d \"%s\"\n", __func__,
 +                              fw_ddb_index, ddb_entry->os_target_id, ddb_state, conn_err,
@@ -329101,16 +328984,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        dev_info(&ha->pdev->dev, "DDB list done..\n");
  
        return status;
-@@ -682,15 +596,18 @@ static int qla4_scan_for_relogin(struct 
+@@ -682,15 +596,18 @@
  static int qla4xxx_devices_ready(struct scsi_qla_host *ha)
  {
        int error;
 -      unsigned long discovery_wtime;
 +      unsigned long discovery_wtime = 0;
        struct qla4_relog_scan rs;
--      discovery_wtime = jiffies + (ql4xdiscoverywait * HZ);
 -
+-      discovery_wtime = jiffies + (ql4xdiscoverywait * HZ);
        DEBUG(printk("Waiting (%d) for devices ...\n", ql4xdiscoverywait));
        do {
                /* poll for AEN. */
@@ -329123,7 +329006,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags)) {
                        /* Set time-between-relogin timer */
                        qla4xxx_process_aen(ha, RELOGIN_DDB_CHANGED_AENS);
-@@ -708,7 +625,8 @@ static int qla4xxx_devices_ready(struct 
+@@ -708,7 +625,8 @@
                }
  
                msleep(2000);
@@ -329133,7 +329016,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  
        DEBUG3(qla4xxx_get_conn_event_log(ha));
  
-@@ -750,13 +668,15 @@ static int qla4xxx_initialize_ddb_list(s
+@@ -750,12 +668,14 @@
                qla4xxx_free_ddb_list(ha);
  
        for (fw_ddb_index = 0; fw_ddb_index < MAX_DDB_ENTRIES; fw_ddb_index++)
@@ -329144,14 +329027,13 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        ha->tot_ddbs = 0;
  
        qla4xxx_flush_AENS(ha);
++
 +      /* Wait for an AEN */
 +      qla4xxx_devices_ready(ha);
-+
        /*
         * First perform device discovery for active
-        * fw ddb indexes and build
-@@ -765,21 +685,18 @@ static int qla4xxx_initialize_ddb_list(s
+@@ -765,21 +685,18 @@
        if ((status = qla4xxx_build_ddb_list(ha)) == QLA_ERROR)
                return status;
  
@@ -329175,7 +329057,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
   * @ha: pointer to host adapter structure.
   *
   * This routine obtains device information from the F/W database after
-@@ -789,19 +706,40 @@ int qla4xxx_reinitialize_ddb_list(struct
+@@ -789,19 +706,40 @@
  {
        int status = QLA_SUCCESS;
        struct ddb_entry *ddb_entry, *detemp;
@@ -329225,7 +329107,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        return status;
  }
  
-@@ -884,12 +822,11 @@ static int qla4xxx_config_nvram(struct s
+@@ -884,12 +822,11 @@
  static void qla4x00_pci_config(struct scsi_qla_host *ha)
  {
        uint16_t w;
@@ -329239,7 +329121,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        /*
         * We want to respect framework's setting of PCI configuration space
         * command register and also want to make sure that all bits of
-@@ -928,8 +865,8 @@ static int qla4xxx_start_firmware_from_f
+@@ -928,8 +865,8 @@
                writel(set_rmask(NVR_WRITE_ENABLE),
                       &ha->reg->u1.isp4022.nvram);
  
@@ -329250,7 +329132,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  
        writel(set_rmask(CSR_BOOT_ENABLE), &ha->reg->ctrl_status);
        readl(&ha->reg->ctrl_status);
-@@ -1007,7 +944,7 @@ int ql4xxx_lock_drvr_wait(struct scsi_ql
+@@ -1007,7 +944,7 @@
   * qla4xxx_start_firmware - starts qla4xxx firmware
   * @ha: Pointer to host adapter structure.
   *
@@ -329259,7 +329141,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
   * the QLA4010 adapter.
   **/
  static int qla4xxx_start_firmware(struct scsi_qla_host *ha)
-@@ -1098,7 +1035,7 @@ static int qla4xxx_start_firmware(struct
+@@ -1098,7 +1035,7 @@
                }
                config_chip = 1;
  
@@ -329268,7 +329150,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                if (ql4xxx_lock_drvr_wait(ha) != QLA_SUCCESS)
                        return QLA_ERROR;
        }
-@@ -1163,12 +1100,12 @@ int qla4xxx_initialize_adapter(struct sc
+@@ -1163,12 +1100,12 @@
         * followed by 0x8014 aen" to trigger the tgt discovery process.
         */
        if (ha->firmware_state & FW_STATE_DHCP_IN_PROGRESS)
@@ -329283,7 +329165,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  
        if (renew_ddb_list == PRESERVE_DDB_LIST) {
                /*
-@@ -1197,8 +1134,10 @@ int qla4xxx_initialize_adapter(struct sc
+@@ -1197,8 +1134,10 @@
                              ha->host_no));
        }
  
@@ -329295,7 +329177,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  exit_init_hba:
        return status;
  }
-@@ -1211,51 +1150,109 @@ exit_init_hba:
+@@ -1211,51 +1150,109 @@
   * This routine processes adds a device as a result of an 8014h AEN.
   **/
  static void qla4xxx_add_device_dynamically(struct scsi_qla_host *ha,
@@ -329327,14 +329209,38 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 -      if (!new_tgt && (ddb_entry->fw_ddb_index != fw_ddb_index)) {
 -              /* Target has been bound to a new fw_ddb_index */
 -              qla4xxx_free_ddb(ha, ddb_entry);
+-              ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
+-              if (ddb_entry == NULL) {
+-                      DEBUG2(printk(KERN_WARNING
+-                              "scsi%ld: Unable to allocate memory"
+-                              " to add fw_ddb_index %d\n",
+-                              ha->host_no, fw_ddb_index));
+-                      return;
+-              }
+-      }
+-      if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
+-                                  QLA_ERROR) {
+-              ha->fw_ddb_index_map[fw_ddb_index] =
+-                                      (struct ddb_entry *)INVALID_ENTRY;
+-              DEBUG2(printk(KERN_WARNING
+-                            "scsi%ld: failed to add new device at index "
+-                            "[%d]\n Unable to retrieve fw ddb entry\n",
+-                            ha->host_no, fw_ddb_index));
+-              qla4xxx_free_ddb(ha, ddb_entry);
 +      if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, fw_ddb_entry,
 +              fw_ddb_entry_dma, NULL, NULL, &ddb_state, NULL, &src_port,
 +              &conn_id) == QLA_ERROR) {
 +              DEBUG2(dev_info(&ha->pdev->dev, "%s getddb %d failed\n",
 +                      __func__, fw_ddb_index));
-+              return;
-+      }
-+
+               return;
+       }
+-      if (qla4xxx_add_sess(ddb_entry)) {
+-              DEBUG2(printk(KERN_WARNING
+-                            "scsi%ld: failed to add new device at index "
+-                            "[%d]\n Unable to add connection and session\n",
+-                            ha->host_no, fw_ddb_index));
+-              qla4xxx_free_ddb(ha, ddb_entry);
 +      list_for_each_entry(ddb_entry, &ha->ddb_list, list) {
 +              if ((memcmp(ddb_entry->iscsi_name, fw_ddb_entry->iscsi_name,
 +                      ISCSI_NAME_SIZE) == 0) &&
@@ -329351,40 +329257,17 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 +                              ddb_entry->state, fw_ddb_index, ddb_entry->fw_ddb_index));
 +                      break;
 +              }
-+      }
+       }
 +
 +      if (!found) {
-               ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
++              ddb_entry = qla4xxx_alloc_ddb(ha, fw_ddb_index);
 +
-               if (ddb_entry == NULL) {
--                      DEBUG2(printk(KERN_WARNING
--                              "scsi%ld: Unable to allocate memory"
--                              " to add fw_ddb_index %d\n",
--                              ha->host_no, fw_ddb_index));
--                      return;
++              if (ddb_entry == NULL) {
 +                      DEBUG2(dev_info(&ha->pdev->dev, "%s NULL DDB %d\n",
 +                              __func__, fw_ddb_index));
 +                      goto exit_dyn_add;
-               }
--      }
--      if (qla4xxx_update_ddb_entry(ha, ddb_entry, fw_ddb_index) ==
--                                  QLA_ERROR) {
--              ha->fw_ddb_index_map[fw_ddb_index] =
--                                      (struct ddb_entry *)INVALID_ENTRY;
--              DEBUG2(printk(KERN_WARNING
--                            "scsi%ld: failed to add new device at index "
--                            "[%d]\n Unable to retrieve fw ddb entry\n",
--                            ha->host_no, fw_ddb_index));
--              qla4xxx_free_ddb(ha, ddb_entry);
--              return;
--      }
--      if (qla4xxx_add_sess(ddb_entry)) {
--              DEBUG2(printk(KERN_WARNING
--                            "scsi%ld: failed to add new device at index "
--                            "[%d]\n Unable to add connection and session\n",
--                            ha->host_no, fw_ddb_index));
--              qla4xxx_free_ddb(ha, ddb_entry);
++              }
++
 +              ddb_entry->fw_ddb_index = fw_ddb_index;
 +              ha->fw_ddb_index_map[fw_ddb_index] = ddb_entry;
 +              ddb_entry->tcp_source_port_num = src_port;
@@ -329432,7 +329315,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
 +              DEBUG6(dev_info(&ha->pdev->dev, "%s calling conn_start ddb 0x%p sess 0x%p"
 +                      " conn 0x%p state 0x%x\n", __func__, ddb_entry, ddb_entry->sess,
 +                      ddb_entry->conn, ddb_entry->state));
-       }
++      }
 +exit_dyn_add:
 +      dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry,
 +              fw_ddb_entry_dma);
@@ -329440,7 +329323,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
  }
  
  /**
-@@ -1267,11 +1264,13 @@ static void qla4xxx_add_device_dynamical
+@@ -1267,11 +1264,13 @@
   * This routine processes a Decive Database Changed AEN Event.
   **/
  int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha,
@@ -329455,7 +329338,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        /* check for out of range index */
        if (fw_ddb_index >= MAX_DDB_ENTRIES)
                return QLA_ERROR;
-@@ -1281,15 +1280,18 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1281,15 +1280,18 @@
        /* Device does not currently exist in our database. */
        if (ddb_entry == NULL) {
                if (state == DDB_DS_SESSION_ACTIVE)
@@ -329478,7 +329361,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
        if (old_fw_ddb_device_state == state &&
            state == DDB_DS_SESSION_ACTIVE) {
                /* Do nothing, state not changed. */
-@@ -1297,25 +1299,50 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1297,25 +1299,50 @@
        }
  
        ddb_entry->fw_ddb_device_state = state;
@@ -329537,7 +329420,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
                        qla4xxx_mark_device_missing(ha, ddb_entry);
                /*
-@@ -1325,8 +1352,7 @@ int qla4xxx_process_ddb_changed(struct s
+@@ -1325,8 +1352,7 @@
                 */
                if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_FAILED &&
                    !test_bit(DF_RELOGIN, &ddb_entry->flags) &&
@@ -329547,10 +329430,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_init.c linux-2.6.27.19-5.1/driv
                        /*
                         * This triggers a relogin.  After the relogin_timer
                         * expires, the relogin gets scheduled.  We must wait a
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_inline.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_inline.h      2009-03-25 16:11:15.000000000 +0000
-@@ -24,8 +24,7 @@ qla4xxx_lookup_ddb_by_fw_index(struct sc
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_inline.h
+--- a/drivers/scsi/qla4xxx/ql4_inline.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_inline.h        Wed May 06 16:56:35 2009 +0100
+@@ -24,8 +24,7 @@
        struct ddb_entry *ddb_entry = NULL;
  
        if ((fw_ddb_index < MAX_DDB_ENTRIES) &&
@@ -329560,10 +329443,12 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h linux-2.6.27.19-5.1/dr
                ddb_entry = ha->fw_ddb_index_map[fw_ddb_index];
        }
  
-@@ -35,6 +34,34 @@ qla4xxx_lookup_ddb_by_fw_index(struct sc
-       return ddb_entry;
- }
+@@ -33,6 +32,34 @@
+           ha->host_no, __func__, fw_ddb_index, ddb_entry));
  
+       return ddb_entry;
++}
++
 +/*
 + * The MBOX_CMD_CLEAR_DATABASE_ENTRY (0x31) mailbox command does not
 + * result in an AEN, so we need to process it seperately.
@@ -329590,12 +329475,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h linux-2.6.27.19-5.1/dr
 +                      queue_work(ha->dpc_thread, &ha->dpc_work);
 +              }
 +      }
-+}
-+
+ }
  static inline void
- __qla4xxx_enable_intrs(struct scsi_qla_host *ha)
- {
-@@ -82,3 +109,118 @@ qla4xxx_disable_intrs(struct scsi_qla_ho
+@@ -82,3 +109,118 @@
        __qla4xxx_disable_intrs(ha);
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  }
@@ -329714,10 +329597,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_inline.h linux-2.6.27.19-5.1/dr
 +      return iocbs;
 +}
 +
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_iocb.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_iocb.c        2009-03-25 16:11:15.000000000 +0000
-@@ -6,137 +6,13 @@
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_iocb.c
+--- a/drivers/scsi/qla4xxx/ql4_iocb.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_iocb.c  Wed May 06 16:56:35 2009 +0100
+@@ -6,136 +6,12 @@
   */
  
  #include "ql4_def.h"
@@ -329728,7 +329611,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
  
 -
  #include <scsi/scsi_tcq.h>
+-
 -/**
 - * qla4xxx_get_req_pkt - returns a valid entry in request queue.
 - * @ha: Pointer to host adapter structure.
@@ -329852,11 +329735,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
 -      }
 -      return iocbs;
 -}
--
  static void qla4xxx_build_scsi_iocbs(struct srb *srb,
                                     struct command_t3_entry *cmd_entry,
-                                    uint16_t tot_dsds)
-@@ -151,15 +27,22 @@ static void qla4xxx_build_scsi_iocbs(str
+@@ -151,14 +27,21 @@
        cmd = srb->cmd;
        ha = srb->ha;
  
@@ -329875,14 +329757,13 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
                cmd_entry->ttlByteCnt = __constant_cpu_to_le32(0);
                return;
        }
+-
 -      avail_dsds = COMMAND_SEG;
 -      cur_dsd = (struct data_seg_a64 *) & (cmd_entry->dataseg[0]);
--
        scsi_for_each_sg(cmd, sg, tot_dsds, i) {
                dma_addr_t sle_dma;
-@@ -204,6 +87,7 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -204,6 +87,7 @@
  
        unsigned long flags;
        uint16_t cnt;
@@ -329890,7 +329771,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
        uint32_t index;
        char tag[2];
  
-@@ -215,13 +99,33 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -215,13 +99,33 @@
        /* Acquire hardware specific lock */
        spin_lock_irqsave(&ha->hardware_lock, flags);
  
@@ -329929,7 +329810,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
  
        req_cnt = qla4xxx_calc_request_entries(tot_dsds);
  
-@@ -251,16 +155,19 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -251,16 +155,19 @@
  
        int_to_scsilun(cmd->device->lun, &cmd_entry->lun);
        cmd_entry->cmdSeqNum = cpu_to_le32(ddb_entry->CmdSn);
@@ -329953,7 +329834,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
        if (scsi_bufflen(cmd)) {
                if (cmd->sc_data_direction == DMA_TO_DEVICE)
                        cmd_entry->control_flags = CF_WRITE;
-@@ -286,7 +193,6 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -286,7 +193,6 @@
                        break;
                }
  
@@ -329961,7 +329842,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
        /* Advance request queue pointer */
        ha->request_in++;
        if (ha->request_in == REQUEST_QUEUE_DEPTH) {
-@@ -300,11 +206,11 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -300,11 +206,11 @@
        wmb();
  
        /*
@@ -329978,7 +329859,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
        if (!test_bit(AF_ONLINE, &ha->flags)) {
                DEBUG2(printk("scsi%ld: %s: Adapter OFFLINE! "
                              "Do not issue command.\n",
-@@ -313,6 +219,7 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -313,6 +219,7 @@
        }
  
        srb->cmd->host_scribble = (unsigned char *)srb;
@@ -329986,7 +329867,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
  
        /* update counters */
        srb->state = SRB_ACTIVE_STATE;
-@@ -331,11 +238,11 @@ int qla4xxx_send_command_to_isp(struct s
+@@ -331,11 +238,11 @@
        return QLA_SUCCESS;
  
  queuing_error:
@@ -330001,9 +329882,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_iocb.c linux-2.6.27.19-5.1/driv
        return QLA_ERROR;
  }
 -
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_isr.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_isr.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_isr.c
+--- a/drivers/scsi/qla4xxx/ql4_isr.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_isr.c   Wed May 06 16:56:35 2009 +0100
 @@ -6,9 +6,11 @@
   */
  
@@ -330016,7 +329897,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
  /**
   * qla4xxx_status_entry - processes status IOCBs
-@@ -27,11 +29,6 @@ static void qla4xxx_status_entry(struct 
+@@ -27,11 +29,6 @@
  
        srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle));
        if (!srb) {
@@ -330028,7 +329909,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                dev_warn(&ha->pdev->dev, "%s invalid status entry:"
                        " handle=0x%0x\n", __func__, sts_entry->handle);
                set_bit(DPC_RESET_HA, &ha->dpc_flags);
-@@ -40,12 +37,9 @@ static void qla4xxx_status_entry(struct 
+@@ -40,12 +37,9 @@
  
        cmd = srb->cmd;
        if (cmd == NULL) {
@@ -330044,7 +329925,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                return;
        }
  
-@@ -61,27 +55,15 @@ static void qla4xxx_status_entry(struct 
+@@ -61,27 +55,15 @@
        scsi_status = sts_entry->scsiStatus;
        switch (sts_entry->completionStatus) {
        case SCS_COMPLETE:
@@ -330076,7 +329957,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                                break;
                        }
                }
-@@ -92,14 +74,15 @@ static void qla4xxx_status_entry(struct 
+@@ -92,14 +74,15 @@
                        break;
  
                /* Copy Sense Data into sense buffer. */
@@ -330094,7 +329975,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
                              "ASC/ASCQ = %02x/%02x\n", ha->host_no,
-@@ -139,7 +122,7 @@ static void qla4xxx_status_entry(struct 
+@@ -139,7 +122,7 @@
                              ha->host_no, cmd->device->channel,
                              cmd->device->id, cmd->device->lun));
  
@@ -330103,7 +329984,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                /*
                 * Mark device missing so that we won't continue to send
-@@ -163,7 +146,7 @@ static void qla4xxx_status_entry(struct 
+@@ -163,7 +146,7 @@
                        break;
                }
  
@@ -330112,7 +329993,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                /*
                 * If there is scsi_status, it takes precedense over
-@@ -176,7 +159,8 @@ static void qla4xxx_status_entry(struct 
+@@ -176,7 +159,8 @@
                                break;
  
                        /* Copy Sense Data into sense buffer. */
@@ -330122,7 +330003,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                        sensebytecnt =
                                le16_to_cpu(sts_entry->senseDataByteCnt);
-@@ -184,7 +168,8 @@ static void qla4xxx_status_entry(struct 
+@@ -184,7 +168,8 @@
                                break;
  
                        memcpy(cmd->sense_buffer, sts_entry->senseData,
@@ -330132,7 +330013,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                        DEBUG2(printk("scsi%ld:%d:%d:%d: %s: sense key = %x, "
                                      "ASC/ASCQ = %02x/%02x\n", ha->host_no,
-@@ -203,7 +188,7 @@ static void qla4xxx_status_entry(struct 
+@@ -203,7 +188,7 @@
                        if ((sts_entry->iscsiFlags &
                             ISCSI_FLAG_RESIDUAL_UNDER) == 0) {
                                cmd->result = DID_BUS_BUSY << 16;
@@ -330141,7 +330022,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                                   cmd->underflow) {
                                /*
                                 * Handle mid-layer underflow???
-@@ -218,13 +203,13 @@ static void qla4xxx_status_entry(struct 
+@@ -218,13 +203,13 @@
                                 * will return DID_ERROR.
                                 */
                                DEBUG2(printk("scsi%ld:%d:%d:%d: %s: "
@@ -330162,7 +330043,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  
                                cmd->result = DID_ERROR << 16;
                        } else {
-@@ -243,7 +228,7 @@ static void qla4xxx_status_entry(struct 
+@@ -243,7 +228,7 @@
                if (atomic_read(&ddb_entry->state) == DDB_STATE_ONLINE)
                        qla4xxx_mark_device_missing(ha, ddb_entry);
  
@@ -330171,7 +330052,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                break;
  
        case SCS_QUEUE_FULL:
-@@ -414,6 +399,15 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -414,6 +399,15 @@
        } else if (mbox_status >> 12 == MBOX_ASYNC_EVENT_STATUS) {
                /* Immediately process the AENs that don't require much work.
                 * Only queue the database_changed AENs */
@@ -330187,7 +330068,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                if (ha->aen_log.count < MAX_AEN_ENTRIES) {
                        for (i = 0; i < MBOX_AEN_REG_COUNT; i++)
                                ha->aen_log.entry[ha->aen_log.count].mbox_sts[i] =
-@@ -422,11 +416,13 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -422,11 +416,13 @@
                }
                switch (mbox_status) {
                case MBOX_ASTS_SYSTEM_ERROR:
@@ -330201,7 +330082,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                                set_bit(AF_GET_CRASH_RECORD, &ha->flags);
                                set_bit(DPC_RESET_HA, &ha->dpc_flags);
                        }
-@@ -443,15 +439,13 @@ static void qla4xxx_isr_decode_mailbox(s
+@@ -443,15 +439,13 @@
                        break;
  
                case MBOX_ASTS_LINK_UP:
@@ -330219,7 +330100,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                        break;
  
                case MBOX_ASTS_HEARTBEAT:
-@@ -601,8 +595,9 @@ void qla4xxx_interrupt_service_routine(s
+@@ -601,8 +595,9 @@
   * qla4xxx_intr_handler - hardware interrupt handler.
   * @irq: Unused
   * @dev_id: Pointer to host adapter structure
@@ -330230,7 +330111,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
  {
        struct scsi_qla_host *ha;
        uint32_t intr_status;
-@@ -634,8 +629,7 @@ irqreturn_t qla4xxx_intr_handler(int irq
+@@ -634,8 +629,7 @@
                        intr_status = readl(&ha->reg->ctrl_status);
  
                if ((intr_status &
@@ -330240,7 +330121,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                        if (reqs_count == 0)
                                ha->spurious_int_count++;
                        break;
-@@ -671,6 +665,8 @@ irqreturn_t qla4xxx_intr_handler(int irq
+@@ -671,6 +665,8 @@
                        break;
                } else if (intr_status & CSR_SCSI_RESET_INTR) {
                        clear_bit(AF_ONLINE, &ha->flags);
@@ -330249,7 +330130,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
                        __qla4xxx_disable_intrs(ha);
  
                        writel(set_rmask(CSR_SCSI_RESET_INTR),
-@@ -714,7 +710,17 @@ void qla4xxx_process_aen(struct scsi_qla
+@@ -714,7 +710,17 @@
        int i;
        unsigned long flags;
  
@@ -330267,35 +330148,25 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
        while (ha->aen_out != ha->aen_in) {
                aen = &ha->aen_q[ha->aen_out];
                /* copy aen information to local structure */
-@@ -727,60 +733,46 @@ void qla4xxx_process_aen(struct scsi_qla
+@@ -727,60 +733,46 @@
                if (ha->aen_out == MAX_AEN_ENTRIES)
                        ha->aen_out = 0;
  
 -              spin_unlock_irqrestore(&ha->hardware_lock, flags);
--
++              DEBUG6(dev_info(&ha->pdev->dev, "%s mbx0 0x%x mbx1 0x%x mbx2 "
++                      "0x%x mbx3 0x%x ddb 0x%p\n", __func__, mbox_sts[0],
++                      mbox_sts[1], mbox_sts[2], mbox_sts[3],
++                      qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2])));
 -              DEBUG2(printk("qla4xxx(%ld): AEN[%d]=0x%08x, mbx1=0x%08x mbx2=0x%08x"
 -                      " mbx3=0x%08x mbx4=0x%08x\n", ha->host_no,
 -                      (ha->aen_out ? (ha->aen_out-1): (MAX_AEN_ENTRIES-1)),
 -                      mbox_sts[0], mbox_sts[1], mbox_sts[2],
 -                      mbox_sts[3], mbox_sts[4]));
-+              DEBUG6(dev_info(&ha->pdev->dev, "%s mbx0 0x%x mbx1 0x%x mbx2 "
-+                      "0x%x mbx3 0x%x ddb 0x%p\n", __func__, mbox_sts[0],
-+                      mbox_sts[1], mbox_sts[2], mbox_sts[3],
-+                      qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2])));
-+
 +              if (process_aen == RELOGIN_DDB_CHANGED_AENS) {
 +                      /* for use during init time, we only want to
 +                       * relogin non-active ddbs */
 +                      struct ddb_entry *ddb_entry;
-+
-+                      ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2]);
-+
-+                      if (ddb_entry) {
-+
-+                              DEBUG6(dev_info(&ha->pdev->dev, "%s ddb 0x%p "
-+                                      "sess 0x%p conn 0x%p state 0x%x\n",
-+                                      __func__, ddb_entry, ddb_entry->sess,
-+                                      ddb_entry->conn, ddb_entry->state));
  
 -              switch (mbox_sts[0]) {
 -              case MBOX_ASTS_DATABASE_CHANGED:
@@ -330310,16 +330181,23 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
 -                              /* for use during init time, we only want to
 -                               * relogin non-active ddbs */
 -                              struct ddb_entry *ddb_entry;
--
++                      ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, mbox_sts[2]);
 -                              ddb_entry =
 -                                      /* FIXME: name length? */
 -                                      qla4xxx_lookup_ddb_by_fw_index(ha,
 -                                                                     mbox_sts[2]);
 -                              if (!ddb_entry)
 -                                      break;
--
++                      if (ddb_entry) {
 -                              ddb_entry->dev_scan_wait_to_complete_relogin =
 -                                      0;
++                              DEBUG6(dev_info(&ha->pdev->dev, "%s ddb 0x%p "
++                                      "sess 0x%p conn 0x%p state 0x%x\n",
++                                      __func__, ddb_entry, ddb_entry->sess,
++                                      ddb_entry->conn, ddb_entry->state));
++
 +                              ddb_entry->dev_scan_wait_to_complete_relogin = 0;
                                ddb_entry->dev_scan_wait_to_start_relogin =
                                        jiffies +
@@ -330356,9 +330234,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_isr.c linux-2.6.27.19-5.1/drive
        }
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  }
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_mbx.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_mbx.c 2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_mbx.c
+--- a/drivers/scsi/qla4xxx/ql4_mbx.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_mbx.c   Wed May 06 16:56:35 2009 +0100
 @@ -6,9 +6,11 @@
   */
  
@@ -330384,7 +330262,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
  {
        int status = QLA_ERROR;
        uint8_t i;
-@@ -39,6 +41,7 @@ static int qla4xxx_mailbox_command(struc
+@@ -39,6 +41,7 @@
                              "pointer\n", ha->host_no, __func__));
                return status;
        }
@@ -330392,7 +330270,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
        /* Mailbox code active */
        wait_count = MBOX_TOV * 100;
  
-@@ -87,8 +90,6 @@ static int qla4xxx_mailbox_command(struc
+@@ -87,8 +90,6 @@
        readl(&ha->reg->ctrl_status);
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  
@@ -330401,7 +330279,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
        /*
         * If we don't want status, don't wait for the mailbox command to
         * complete.  For example, MBOX_CMD_RESET_FW doesn't return status,
-@@ -98,6 +99,8 @@ static int qla4xxx_mailbox_command(struc
+@@ -98,6 +99,8 @@
                status = QLA_SUCCESS;
                goto mbox_exit;
        }
@@ -330410,7 +330288,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
        /* Wait for command to complete */
        wait_count = jiffies + MBOX_TOV * HZ;
        while (test_bit(AF_MBOX_COMMAND_DONE, &ha->flags) == 0) {
-@@ -119,6 +122,7 @@ static int qla4xxx_mailbox_command(struc
+@@ -119,6 +122,7 @@
                spin_unlock_irqrestore(&ha->hardware_lock, flags);
                msleep(10);
        }
@@ -330418,7 +330296,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
  
        /* Check for mailbox timeout. */
        if (!test_bit(AF_MBOX_COMMAND_DONE, &ha->flags)) {
-@@ -164,6 +168,8 @@ static int qla4xxx_mailbox_command(struc
+@@ -164,12 +168,94 @@
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  
  mbox_exit:
@@ -330427,10 +330305,11 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
        mutex_lock(&ha->mbox_sem);
        clear_bit(AF_MBOX_COMMAND, &ha->flags);
        mutex_unlock(&ha->mbox_sem);
-@@ -172,6 +178,86 @@ mbox_exit:
-       return status;
- }
+       clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags);
  
+       return status;
++}
++
 +
 +/**
 + * qla4xxx_issue_iocb - issue mailbox iocb command
@@ -330509,12 +330388,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
 +              return QLA_ERROR;
 +
 +      return QLA_SUCCESS;
-+}
-+
+ }
  /**
-  * qla4xxx_initialize_fw_cb - initializes firmware control block.
-  * @ha: Pointer to host adapter structure.
-@@ -450,15 +536,16 @@ int qla4xxx_get_fwddb_entry(struct scsi_
+@@ -450,15 +536,16 @@
                              mbox_sts[1]));
                goto exit_get_fwddb;
        }
@@ -330534,10 +330411,12 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
        }
        if (num_valid_ddb_entries)
                *num_valid_ddb_entries = mbox_sts[2];
-@@ -518,6 +605,31 @@ int qla4xxx_set_ddb_entry(struct scsi_ql
-       return qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]);
- }
+@@ -516,6 +603,31 @@
+       mbox_cmd[4] = sizeof(struct dev_db_entry);
  
+       return qla4xxx_mailbox_command(ha, MBOX_REG_COUNT, 1, &mbox_cmd[0], &mbox_sts[0]);
++}
++
 +int qla4xxx_conn_open_session_login(struct scsi_qla_host * ha,
 +                                  uint16_t fw_ddb_index)
 +{
@@ -330561,12 +330440,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
 +                    mbox_sts[1]);)
 +
 +              return status;
-+}
-+
+ }
  /**
-  * qla4xxx_get_crash_record - retrieves crash record.
-  * @ha: Pointer to host adapter structure.
-@@ -642,7 +754,7 @@ void qla4xxx_get_conn_event_log(struct s
+@@ -642,7 +754,7 @@
        DEBUG3(printk("scsi%ld: Connection Event Log Dump (%d entries):\n",
                      ha->host_no, num_valid_entries));
  
@@ -330575,7 +330452,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
                if (oldest_entry == 0) {
                        /* Circular Buffer has not wrapped around */
                        for (i=0; i < num_valid_entries; i++) {
-@@ -713,45 +825,6 @@ int qla4xxx_reset_lun(struct scsi_qla_ho
+@@ -713,45 +825,6 @@
        return status;
  }
  
@@ -330621,7 +330498,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
  
  int qla4xxx_get_flash(struct scsi_qla_host * ha, dma_addr_t dma_addr,
                      uint32_t offset, uint32_t len)
-@@ -813,8 +886,7 @@ int qla4xxx_get_fw_version(struct scsi_q
+@@ -813,8 +886,7 @@
        return QLA_SUCCESS;
  }
  
@@ -330631,7 +330508,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
  {
        uint32_t mbox_cmd[MBOX_REG_COUNT];
        uint32_t mbox_sts[MBOX_REG_COUNT];
-@@ -835,7 +907,7 @@ static int qla4xxx_get_default_ddb(struc
+@@ -835,7 +907,7 @@
        return QLA_SUCCESS;
  }
  
@@ -330640,7 +330517,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
  {
        uint32_t mbox_cmd[MBOX_REG_COUNT];
        uint32_t mbox_sts[MBOX_REG_COUNT];
-@@ -889,14 +961,14 @@ int qla4xxx_send_tgts(struct scsi_qla_ho
+@@ -889,14 +961,14 @@
        if (ret_val != QLA_SUCCESS)
                goto qla4xxx_send_tgts_exit;
  
@@ -330659,9 +330536,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.27.19-5.1/drive
               sizeof(fw_ddb_entry->tgt_addr));
  
        fw_ddb_entry->options = (DDB_OPT_DISC_SESSION | DDB_OPT_TARGET);
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.c       2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_nvram.c
+--- a/drivers/scsi/qla4xxx/ql4_nvram.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_nvram.c Wed May 06 16:56:35 2009 +0100
 @@ -6,6 +6,7 @@
   */
  
@@ -330670,10 +330547,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.c linux-2.6.27.19-5.1/dri
  #include "ql4_glbl.h"
  #include "ql4_dbg.h"
  #include "ql4_inline.h"
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_nvram.h       2009-03-25 16:11:15.000000000 +0000
-@@ -134,7 +134,9 @@ struct eeprom_data {
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_nvram.h
+--- a/drivers/scsi/qla4xxx/ql4_nvram.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_nvram.h Wed May 06 16:56:35 2009 +0100
+@@ -134,7 +134,9 @@
                        u16 phyConfig;  /* x36 */
  #define        PHY_CONFIG_PHY_ADDR_MASK             0x1f
  #define        PHY_CONFIG_ENABLE_FW_MANAGEMENT_MASK 0x20
@@ -330684,9 +330561,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_nvram.h linux-2.6.27.19-5.1/dri
  
  #define EEPROM_UNUSED_1_SIZE   2
                        u8 unused_1[EEPROM_UNUSED_1_SIZE]; /* x3A */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.c
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.c  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_os.c
+--- a/drivers/scsi/qla4xxx/ql4_os.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_os.c    Wed May 06 16:56:35 2009 +0100
 @@ -1,6 +1,6 @@
  /*
   * QLogic iSCSI HBA Driver
@@ -330727,7 +330604,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
  /*
   * SRB allocation cache
-@@ -38,33 +52,38 @@ MODULE_PARM_DESC(ql4xdontresethba,
+@@ -38,33 +52,38 @@
                 " default it will reset hba :0"
                 " set to 1 to avoid resetting HBA");
  
@@ -330740,9 +330617,6 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                 "Option to enable extended error logging, "
                 "Default is 0 - no logging, 1 - debug logging");
  
--int ql4_mod_unload = 0;
--
--#define QL4_DEF_QDEPTH 32
 +/* Command Timeout before ddb state goes to MISSING */
 +int cmd_timeout = IOCB_CMD_TIMEOUT;
 +module_param(cmd_timeout, int, S_IRUGO | S_IRUSR);
@@ -330752,8 +330626,11 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +int recovery_tmo = RECOVERY_TIMEOUT;
 +module_param(recovery_tmo, int, S_IRUGO | S_IRUSR);
 +MODULE_PARM_DESC(recovery_tmo, "Recovery Timeout");
-+int ql4_mod_unload = 0;
++
+ int ql4_mod_unload = 0;
+-
+-#define QL4_DEF_QDEPTH 32
+-
  /*
   * SCSI host template entry points
   */
@@ -330778,7 +330655,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  static void qla4xxx_recovery_timedout(struct iscsi_cls_session *session);
  
  /*
-@@ -73,29 +92,26 @@ static void qla4xxx_recovery_timedout(st
+@@ -73,29 +92,26 @@
  static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
                                void (*done) (struct scsi_cmnd *));
  static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd);
@@ -330811,7 +330688,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        .this_id                = -1,
        .cmd_per_lun            = 3,
-@@ -108,17 +124,17 @@ static struct scsi_host_template qla4xxx
+@@ -108,17 +124,17 @@
  static struct iscsi_transport qla4xxx_iscsi_transport = {
        .owner                  = THIS_MODULE,
        .name                   = DRIVER_NAME,
@@ -330838,7 +330715,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        .session_recovery_timedout = qla4xxx_recovery_timedout,
  };
  
-@@ -129,44 +145,50 @@ static void qla4xxx_recovery_timedout(st
+@@ -129,44 +145,50 @@
        struct ddb_entry *ddb_entry = session->dd_data;
        struct scsi_qla_host *ha = ddb_entry->ha;
  
@@ -330850,17 +330727,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 -                            "of (%d) secs exhausted, marking device DEAD.\n",
 -                            ha->host_no, __func__, ddb_entry->fw_ddb_index,
 -                            ha->port_down_retry_count));
--
++      dev_info(&ha->pdev->dev, "%s: ddb[%d] os[%d] marked DEAD"
++              " - retry count of (%d)\n", __func__,
++              ddb_entry->fw_ddb_index, ddb_entry->os_target_id,
++              ha->port_down_retry_count);
 -              DEBUG2(printk("scsi%ld: %s: scheduling dpc routine - dpc "
 -                            "flags = 0x%lx\n",
 -                            ha->host_no, __func__, ha->dpc_flags));
 -              queue_work(ha->dpc_thread, &ha->dpc_work);
 -      }
-+      dev_info(&ha->pdev->dev, "%s: ddb[%d] os[%d] marked DEAD"
-+              " - retry count of (%d)\n", __func__,
-+              ddb_entry->fw_ddb_index, ddb_entry->os_target_id,
-+              ha->port_down_retry_count);
-+
 +      QL_SET_DDB_OFFLINE(ha, ddb_entry);
 +
 +      queue_work(ha->dpc_thread, &ha->dpc_work);
@@ -330921,7 +330797,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  }
  
  static int qla4xxx_sess_get_param(struct iscsi_cls_session *sess,
-@@ -177,12 +199,18 @@ static int qla4xxx_sess_get_param(struct
+@@ -177,12 +199,18 @@
  
        switch (param) {
        case ISCSI_PARAM_TARGET_NAME:
@@ -330943,7 +330819,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        default:
                return -ENOSYS;
        }
-@@ -197,17 +225,18 @@ static int qla4xxx_conn_get_param(struct
+@@ -197,17 +225,18 @@
        struct ddb_entry *ddb_entry;
        int len;
  
@@ -330966,7 +330842,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                break;
        default:
                return -ENOSYS;
-@@ -216,73 +245,84 @@ static int qla4xxx_conn_get_param(struct
+@@ -216,73 +245,84 @@
        return len;
  }
  
@@ -330980,7 +330856,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 -      struct sockaddr_in *addr;
 -      struct sockaddr_in6 *addr6;
 -      int ret = 0;
--
++      struct scsi_qla_host *ha = to_qla_host(shost);
++      int len;
 -      ha = (struct scsi_qla_host *) shost->hostdata;
 -
 -      switch (type) {
@@ -331000,9 +330878,6 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 -                              ret = -EIO;
 -              } else
 -                      ret = -ENOSYS;
-+      struct scsi_qla_host *ha = to_qla_host(shost);
-+      int len;
-+
 +      switch (param) {
 +      case ISCSI_HOST_PARAM_IPADDRESS:
 +              len = sprintf(buf, "%d.%d.%d.%d", ha->ip_address[0],
@@ -331020,7 +330895,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +
 +      return len;
  }
++
 +static int ql_alloc_osindex(struct scsi_qla_host *ha)
 +{
 +      unsigned int idx;
@@ -331036,7 +330911,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +      clear_bit((idx & 0x1F), &ha->os_map[idx >> 5]);
 +}
 +
-+
  void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry)
  {
        if (!ddb_entry->sess)
@@ -331088,7 +330963,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        return 0;
  }
  
-@@ -291,30 +331,25 @@ struct ddb_entry *qla4xxx_alloc_sess(str
+@@ -291,28 +331,23 @@
        struct ddb_entry *ddb_entry;
        struct iscsi_cls_session *sess;
  
@@ -331099,21 +330974,21 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +
 +      if ((os_idx = ql_alloc_osindex(ha)) >= MAX_DDB_ENTRIES)
                return NULL;
++
 +      sess = QL_ISCSI_ALLOC_SESSION(ha, &qla4xxx_iscsi_transport);
 +      if (!sess) {
 +              free_osindex(ha, os_idx);
 +              return NULL;
 +      }
-+
        ddb_entry = sess->dd_data;
        memset(ddb_entry, 0, sizeof(*ddb_entry));
 +      ddb_entry->os_target_id = os_idx;
        ddb_entry->ha = ha;
        ddb_entry->sess = sess;
        return ddb_entry;
- }
+-}
+-
 -static void qla4xxx_scan_start(struct Scsi_Host *shost)
 -{
 -      struct scsi_qla_host *ha = shost_priv(shost);
@@ -331124,12 +330999,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 -              if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE)
 -                      qla4xxx_add_sess(ddb_entry);
 -      }
--}
--
+ }
  /*
-  * Timer routines
-  */
-@@ -323,7 +358,7 @@ static void qla4xxx_start_timer(struct s
+@@ -323,7 +358,7 @@
                                unsigned long interval)
  {
        DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n",
@@ -331138,7 +331011,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        init_timer(&ha->timer);
        ha->timer.expires = jiffies + interval * HZ;
        ha->timer.data = (unsigned long)ha;
-@@ -349,17 +384,18 @@ void qla4xxx_mark_device_missing(struct 
+@@ -349,17 +384,18 @@
                                 struct ddb_entry *ddb_entry)
  {
        atomic_set(&ddb_entry->state, DDB_STATE_MISSING);
@@ -331165,7 +331038,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  {
        struct srb *srb;
  
-@@ -378,25 +414,14 @@ static struct srb* qla4xxx_get_new_srb(s
+@@ -378,25 +414,14 @@
        return srb;
  }
  
@@ -331195,7 +331068,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        cmd->scsi_done(cmd);
  }
  
-@@ -404,14 +429,14 @@ void qla4xxx_srb_compl(struct scsi_qla_h
+@@ -404,14 +429,14 @@
   * qla4xxx_queuecommand - scsi layer issues scsi command to driver.
   * @cmd: Pointer to Linux's SCSI command structure
   * @done_fn: Function that the driver calls to notify the SCSI mid-layer
@@ -331212,7 +331085,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
   * in interrupt context which is a big NO! NO!.
   **/
  static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
-@@ -419,30 +444,21 @@ static int qla4xxx_queuecommand(struct s
+@@ -419,30 +444,21 @@
  {
        struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
        struct ddb_entry *ddb_entry = cmd->device->hostdata;
@@ -331248,7 +331121,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                goto qc_host_busy;
  
        spin_unlock_irq(ha->host->host_lock);
-@@ -542,7 +558,7 @@ static int qla4xxx_mem_alloc(struct scsi
+@@ -542,7 +558,7 @@
        align = 0;
        if ((unsigned long)ha->queues_dma & (MEM_ALIGN_VALUE - 1))
                align = MEM_ALIGN_VALUE - ((unsigned long)ha->queues_dma &
@@ -331257,7 +331130,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Update request and response queue pointers. */
        ha->request_dma = ha->queues_dma + align;
-@@ -550,16 +566,16 @@ static int qla4xxx_mem_alloc(struct scsi
+@@ -550,16 +566,16 @@
        ha->response_dma = ha->queues_dma + align +
                (REQUEST_QUEUE_DEPTH * QUEUE_SIZE);
        ha->response_ring = (struct queue_entry *) (ha->queues + align +
@@ -331278,7 +331151,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Allocate memory for srb pool. */
        ha->srb_mempool = mempool_create(SRB_MIN_REQ, mempool_alloc_slab,
-@@ -591,12 +607,13 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -591,12 +607,13 @@
        list_for_each_entry_safe(ddb_entry, dtemp, &ha->ddb_list, list) {
                /* Count down time between sending relogins */
                if (adapter_up(ha) &&
@@ -331296,7 +331169,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                        atomic_set(&ddb_entry->
                                                retry_relogin_timer,
                                                INVALID_ENTRY);
-@@ -604,9 +621,9 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -604,9 +621,9 @@
                                                &ha->dpc_flags);
                                        set_bit(DF_RELOGIN, &ddb_entry->flags);
                                        DEBUG2(printk("scsi%ld: %s: index [%d]"
@@ -331309,7 +331182,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                } else
                                        atomic_dec(&ddb_entry->
                                                        retry_relogin_timer);
-@@ -615,64 +632,66 @@ static void qla4xxx_timer(struct scsi_ql
+@@ -615,64 +632,66 @@
  
                /* Wait for relogin to timeout */
                if (atomic_read(&ddb_entry->relogin_timer) &&
@@ -331405,7 +331278,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                queue_work(ha->dpc_thread, &ha->dpc_work);
        }
  
-@@ -694,7 +713,6 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -694,7 +713,6 @@
        uint32_t index = 0;
        int stat = QLA_SUCCESS;
        unsigned long flags;
@@ -331413,7 +331286,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        int wait_cnt = WAIT_CMD_TOV;    /*
                                         * Initialized for 30 seconds as we
                                         * expect all commands to retuned
-@@ -704,15 +722,14 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -704,15 +722,14 @@
        while (wait_cnt) {
                spin_lock_irqsave(&ha->hardware_lock, flags);
                /* Find a command that hasn't completed. */
@@ -331432,7 +331305,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                        break;
                }
  
-@@ -730,15 +747,15 @@ static int qla4xxx_cmd_wait(struct scsi_
+@@ -730,15 +747,15 @@
        return stat;
  }
  
@@ -331451,7 +331324,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        /*
         * If the SCSI Reset Interrupt bit is set, clear it.
         * Otherwise, the Soft Reset won't work.
-@@ -751,7 +768,8 @@ void qla4xxx_hw_reset(struct scsi_qla_ho
+@@ -751,7 +768,8 @@
        writel(set_rmask(CSR_SOFT_RESET), &ha->reg->ctrl_status);
        readl(&ha->reg->ctrl_status);
  
@@ -331461,7 +331334,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  }
  
  /**
-@@ -765,7 +783,7 @@ int qla4xxx_soft_reset(struct scsi_qla_h
+@@ -765,7 +783,7 @@
        int status = QLA_ERROR;
        uint32_t ctrl_status;
  
@@ -331470,7 +331343,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Wait until the Network Reset Intr bit is cleared */
        max_wait_time = RESET_INTR_TOV;
-@@ -782,9 +800,9 @@ int qla4xxx_soft_reset(struct scsi_qla_h
+@@ -782,9 +800,9 @@
  
        if ((ctrl_status & CSR_NET_RESET_INTR) != 0) {
                DEBUG2(printk(KERN_WARNING
@@ -331483,7 +331356,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                spin_lock_irqsave(&ha->hardware_lock, flags);
                writel(set_rmask(CSR_NET_RESET_INTR), &ha->reg->ctrl_status);
                readl(&ha->reg->ctrl_status);
-@@ -865,9 +883,9 @@ static void qla4xxx_flush_active_srbs(st
+@@ -865,9 +883,9 @@
        unsigned long flags;
  
        spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -331496,7 +331369,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                        srb->cmd->result = DID_RESET << 16;
                        qla4xxx_srb_compl(ha, srb);
                }
-@@ -879,21 +897,14 @@ static void qla4xxx_flush_active_srbs(st
+@@ -879,21 +897,14 @@
  /**
   * qla4xxx_recover_adapter - recovers adapter after a fatal error
   * @ha: Pointer to host adapter structure.
@@ -331520,7 +331393,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Wait for outstanding commands to complete.
         * Stalls the driver for max 30 secs
-@@ -909,8 +920,8 @@ static int qla4xxx_recover_adapter(struc
+@@ -909,8 +920,8 @@
         * returns with ISP interrupts enabled.
         */
        if (status == QLA_SUCCESS) {
@@ -331531,7 +331404,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                qla4xxx_flush_active_srbs(ha);
                if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
                        status = qla4xxx_soft_reset(ha);
-@@ -925,24 +936,26 @@ static int qla4xxx_recover_adapter(struc
+@@ -925,24 +936,26 @@
         * with ISP interrupts enabled */
        if (status == QLA_SUCCESS) {
                DEBUG2(printk("scsi%ld: %s - Initializing adapter..\n",
@@ -331563,7 +331436,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                        set_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
                        status = QLA_ERROR;
                } else {
-@@ -950,9 +963,9 @@ static int qla4xxx_recover_adapter(struc
+@@ -950,9 +963,9 @@
                                /* Schedule another Reset HA--DPC will retry */
                                ha->retry_reset_ha_cnt--;
                                DEBUG2(printk("scsi%ld: recover adapter - "
@@ -331576,7 +331449,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                status = QLA_ERROR;
                        }
  
-@@ -960,8 +973,8 @@ static int qla4xxx_recover_adapter(struc
+@@ -960,8 +973,8 @@
                                /* Recover adapter retries have been exhausted.
                                 * Adapter DEAD */
                                DEBUG2(printk("scsi%ld: recover adapter "
@@ -331587,7 +331460,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                qla4xxx_flush_active_srbs(ha);
                                clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
                                clear_bit(DPC_RESET_HA, &ha->dpc_flags);
-@@ -990,21 +1003,21 @@ static int qla4xxx_recover_adapter(struc
+@@ -990,21 +1003,21 @@
   * @data: in our case pointer to adapter structure
   *
   * This routine is a task that is schedule by the interrupt handler
@@ -331614,7 +331487,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                ha->host_no, __func__, ha->flags, ha->dpc_flags,
                readw(&ha->reg->ctrl_status)));
  
-@@ -1013,12 +1026,12 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1013,12 +1026,12 @@
                return;
  
        if (adapter_up(ha) ||
@@ -331632,7 +331505,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
                if (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags)) {
                        uint8_t wait_time = RESET_INTR_TOV;
-@@ -1029,10 +1042,11 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1029,10 +1042,11 @@
                                        break;
                                msleep(1000);
                        }
@@ -331646,7 +331519,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                        qla4xxx_flush_active_srbs(ha);
                        if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS) {
                                qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
-@@ -1053,13 +1067,19 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1053,13 +1067,19 @@
        if (test_and_clear_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags))
                qla4xxx_get_dhcp_ip_address(ha);
  
@@ -331668,7 +331541,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                qla4xxx_relogin_device(ha, ddb_entry);
  
                        /*
-@@ -1070,8 +1090,8 @@ static void qla4xxx_do_dpc(struct work_s
+@@ -1070,8 +1090,8 @@
                         */
                        if (test_bit(DPC_RESET_HA, &ha->dpc_flags)) {
                                printk(KERN_WARNING "scsi%ld: %s: "
@@ -331679,7 +331552,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                                break;
                        }
                }
-@@ -1096,7 +1116,7 @@ static void qla4xxx_free_adapter(struct 
+@@ -1096,7 +1116,7 @@
  
        /* Issue Soft Reset to put firmware in unknown state */
        if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
@@ -331688,7 +331561,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Remove timer thread, if present */
        if (ha->timer_active)
-@@ -1110,7 +1130,6 @@ static void qla4xxx_free_adapter(struct 
+@@ -1110,7 +1130,6 @@
        qla4xxx_mem_free(ha);
  
        pci_disable_device(ha->pdev);
@@ -331696,7 +331569,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  }
  
  /***
-@@ -1147,7 +1166,6 @@ static int qla4xxx_iospace_config(struct
+@@ -1147,7 +1166,6 @@
        if (!(mmio_flags & IORESOURCE_MEM)) {
                dev_err(&ha->pdev->dev,
                        "region #0 not an MMIO resource, aborting\n");
@@ -331704,7 +331577,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                goto iospace_error_exit;
        }
        if (mmio_len < MIN_IOBASE_LEN) {
-@@ -1189,11 +1207,12 @@ iospace_error_exit:
+@@ -1189,11 +1207,12 @@
   * the driver.
   **/
  static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
@@ -331718,7 +331591,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        uint8_t init_retry_count = 0;
        char buf[34];
  
-@@ -1203,7 +1222,7 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1203,7 +1222,7 @@
        host = scsi_host_alloc(&qla4xxx_driver_template, sizeof(*ha));
        if (host == NULL) {
                printk(KERN_WARNING
@@ -331727,7 +331600,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                goto probe_disable_device;
        }
  
-@@ -1211,10 +1230,11 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1211,10 +1230,11 @@
        ha = (struct scsi_qla_host *) host->hostdata;
        memset(ha, 0, sizeof(*ha));
  
@@ -331740,7 +331613,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        /* Configure PCI I/O space. */
        ret = qla4xxx_iospace_config(ha);
-@@ -1222,7 +1242,7 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1222,7 +1242,7 @@
                goto probe_failed;
  
        dev_info(&ha->pdev->dev, "Found an ISP%04x, irq %d, iobase 0x%p\n",
@@ -331749,7 +331622,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        qla4xxx_config_dma_addressing(ha);
  
-@@ -1233,11 +1253,12 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1233,11 +1253,12 @@
        mutex_init(&ha->mbox_sem);
  
        spin_lock_init(&ha->hardware_lock);
@@ -331763,7 +331636,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
                ret = -ENOMEM;
                goto probe_failed;
-@@ -1250,8 +1271,8 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1250,8 +1271,8 @@
         */
        status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST);
        while (status == QLA_ERROR && init_retry_count++ < MAX_INIT_RETRIES) {
@@ -331774,20 +331647,20 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                qla4xxx_soft_reset(ha);
                status = qla4xxx_initialize_adapter(ha, REBUILD_DDB_LIST);
        }
-@@ -1267,18 +1288,12 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1267,18 +1288,12 @@
        host->max_lun = MAX_LUNS - 1;
        host->max_id = MAX_TARGETS;
        host->max_cmd_len = IOCB_MAX_CDB_LEN;
 -      host->can_queue = MAX_SRBS ;
 +      host->can_queue = REQUEST_QUEUE_DEPTH + 128;
        host->transportt = qla4xxx_scsi_transport;
+-
 -        ret = scsi_init_shared_tag_map(host, MAX_SRBS);
 -        if (ret) {
 -                dev_warn(&ha->pdev->dev, "scsi_init_shared_tag_map failed\n");
 -                goto probe_failed;
 -        }
--
        /* Startup the kernel thread for this host adapter. */
        DEBUG2(printk("scsi: %s: Starting kernel thread for "
 -                    "qla4xxx_dpc\n", __func__));
@@ -331795,7 +331668,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no);
        ha->dpc_thread = create_singlethread_workqueue(buf);
        if (!ha->dpc_thread) {
-@@ -1286,10 +1301,11 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1286,10 +1301,11 @@
                ret = -ENODEV;
                goto probe_failed;
        }
@@ -331809,7 +331682,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        if (ret) {
                dev_warn(&ha->pdev->dev, "Failed to reserve interrupt %d"
                        " already in use.\n", pdev->irq);
-@@ -1297,14 +1313,14 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1297,14 +1313,14 @@
        }
        set_bit(AF_IRQ_ATTACHED, &ha->flags);
        host->irq = pdev->irq;
@@ -331826,7 +331699,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        pci_set_drvdata(pdev, ha);
  
-@@ -1312,15 +1328,53 @@ static int __devinit qla4xxx_probe_adapt
+@@ -1312,14 +1328,52 @@
        if (ret)
                goto probe_failed;
  
@@ -331879,15 +331752,14 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +      dev_info(&ha->pdev->dev, "%s: AF_INIT_DONE\n", __func__);
 +
        return 0;
++
 +remove_host:
 +      qla4xxx_free_ddb_list(ha);
 +      scsi_remove_host(host);
-+
  probe_failed:
        qla4xxx_free_adapter(ha);
-       scsi_host_put(ha->host);
-@@ -1346,11 +1400,18 @@ static void __devexit qla4xxx_remove_ada
+@@ -1346,10 +1400,17 @@
        while (test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags))
                ssleep(1);
  
@@ -331900,13 +331772,12 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 +      QL_ISCSI_UNREGISTER_HOST(ha->host, qla4xxx_scsi_transport);
 +
        scsi_remove_host(ha->host);
-+      qla4xxx_ioctl_exit(ha);
 +
++      qla4xxx_ioctl_exit(ha);
        qla4xxx_free_adapter(ha);
  
-       scsi_host_put(ha->host);
-@@ -1365,7 +1426,7 @@ static void __devexit qla4xxx_remove_ada
+@@ -1365,7 +1426,7 @@
   * At exit, the @ha's flags.enable_64bit_addressing set to indicated
   * supported addressing method.
   */
@@ -331915,7 +331786,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  {
        int retval;
  
-@@ -1374,9 +1435,9 @@ static void qla4xxx_config_dma_addressin
+@@ -1374,9 +1435,9 @@
                if (pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
                        dev_dbg(&ha->pdev->dev,
                                  "Failed to set 64 bit PCI consistent mask; "
@@ -331927,7 +331798,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                }
        } else
                retval = pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK);
-@@ -1384,24 +1445,29 @@ static void qla4xxx_config_dma_addressin
+@@ -1384,24 +1445,29 @@
  
  static int qla4xxx_slave_alloc(struct scsi_device *sdev)
  {
@@ -331965,7 +331836,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  }
  
  /**
-@@ -1414,12 +1480,14 @@ static void qla4xxx_slave_destroy(struct
+@@ -1414,12 +1480,14 @@
  struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index)
  {
        struct srb *srb = NULL;
@@ -331983,7 +331854,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                return srb;
  
        /* update counters */
-@@ -1441,7 +1509,7 @@ struct srb * qla4xxx_del_from_active_arr
+@@ -1441,7 +1509,7 @@
   * for some max time.
   **/
  static int qla4xxx_eh_wait_on_command(struct scsi_qla_host *ha,
@@ -331992,16 +331863,16 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  {
        int done = 0;
        struct srb *rp;
-@@ -1467,24 +1535,18 @@ static int qla4xxx_eh_wait_on_command(st
+@@ -1467,24 +1535,18 @@
   **/
  static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha)
  {
 -      unsigned long wait_online;
--
--      wait_online = jiffies + (30 * HZ);
--      while (time_before(jiffies, wait_online)) {
 +      unsigned long wait_online = 60;
  
+-      wait_online = jiffies + (30 * HZ);
+-      while (time_before(jiffies, wait_online)) {
+-
 +      while (wait_online--) {
                if (adapter_up(ha))
                        return QLA_SUCCESS;
@@ -332021,7 +331892,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
   * @ha: pointer to to HBA
   * @t: target id
   * @l: lun id
-@@ -1492,26 +1554,33 @@ static int qla4xxx_wait_for_hba_online(s
+@@ -1492,26 +1554,33 @@
   * This function waits for all outstanding commands to a lun to complete. It
   * returns 0 if all pending commands are returned and 1 otherwise.
   **/
@@ -332068,7 +331939,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                }
        }
        return status;
-@@ -1528,47 +1597,49 @@ static int qla4xxx_eh_device_reset(struc
+@@ -1528,106 +1597,55 @@
  {
        struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
        struct ddb_entry *ddb_entry = cmd->device->hostdata;
@@ -332142,10 +332013,12 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        ret = SUCCESS;
  
-@@ -1578,59 +1649,6 @@ eh_dev_reset_done:
- }
+ eh_dev_reset_done:
  
- /**
+       return ret;
+-}
+-
+-/**
 - * qla4xxx_eh_target_reset - callback for target reset.
 - * @cmd: Pointer to Linux's SCSI command structure
 - *
@@ -332196,13 +332069,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
 -      starget_printk(KERN_INFO, scsi_target(cmd->device),
 -                     "WARM TARGET RESET SUCCEEDED.\n");
 -      return SUCCESS;
--}
--
--/**
-  * qla4xxx_eh_host_reset - kernel callback
-  * @cmd: Pointer to Linux's SCSI command structure
-  *
-@@ -1644,27 +1662,19 @@ static int qla4xxx_eh_host_reset(struct 
+ }
+ /**
+@@ -1644,27 +1662,19 @@
  
        ha = (struct scsi_qla_host *) cmd->device->host->hostdata;
  
@@ -332235,7 +332105,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  
        return return_status;
  }
-@@ -1693,7 +1703,7 @@ static struct pci_device_id qla4xxx_pci_
+@@ -1693,7 +1703,7 @@
  };
  MODULE_DEVICE_TABLE(pci, qla4xxx_pci_tbl);
  
@@ -332244,7 +332114,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        .name           = DRIVER_NAME,
        .id_table       = qla4xxx_pci_tbl,
        .probe          = qla4xxx_probe_adapter,
-@@ -1704,20 +1714,21 @@ static int __init qla4xxx_module_init(vo
+@@ -1704,20 +1714,21 @@
  {
        int ret;
  
@@ -332272,7 +332142,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
                strcat(qla4xxx_version_str, "-debug");
  
        qla4xxx_scsi_transport =
-@@ -1727,13 +1738,20 @@ static int __init qla4xxx_module_init(vo
+@@ -1727,13 +1738,20 @@
                goto release_srb_cache;
        }
  
@@ -332294,7 +332164,7 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
  unregister_transport:
        iscsi_unregister_transport(&qla4xxx_iscsi_transport);
  release_srb_cache:
-@@ -1745,6 +1763,9 @@ no_srp_cache:
+@@ -1745,6 +1763,9 @@
  static void __exit qla4xxx_module_exit(void)
  {
        ql4_mod_unload = 1;
@@ -332304,9 +332174,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.c linux-2.6.27.19-5.1/driver
        pci_unregister_driver(&qla4xxx_pci_driver);
        iscsi_unregister_transport(&qla4xxx_iscsi_transport);
        kmem_cache_destroy(srb_cachep);
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_os.h  2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_os.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/scsi/qla4xxx/ql4_os.h    Wed May 06 16:56:35 2009 +0100
 @@ -0,0 +1,144 @@
 +/*
 + * QLogic iSCSI HBA Driver
@@ -332452,9 +332322,9 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_os.h linux-2.6.27.19-5.1/driver
 +}
 +
 +#endif        /* _QLA4x_OS_H */
-diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_version.h linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_version.h
---- linux-2.6.27/drivers/scsi/qla4xxx/ql4_version.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qla4xxx/ql4_version.h     2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/qla4xxx/ql4_version.h
+--- a/drivers/scsi/qla4xxx/ql4_version.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qla4xxx/ql4_version.h       Wed May 06 16:56:35 2009 +0100
 @@ -5,5 +5,5 @@
   * See LICENSE.qla4xxx for copyright and licensing details.
   */
@@ -332462,10 +332332,10 @@ diff -purN linux-2.6.27/drivers/scsi/qla4xxx/ql4_version.h linux-2.6.27.19-5.1/d
 -#define QLA4XXX_DRIVER_VERSION        "5.01.00-k8"
 +#define QLA4XXX_DRIVER_VERSION   "5.01.00-k8_sles11-04"
  
-diff -purN linux-2.6.27/drivers/scsi/qlogicpti.c linux-2.6.27.19-5.1/drivers/scsi/qlogicpti.c
---- linux-2.6.27/drivers/scsi/qlogicpti.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/qlogicpti.c       2009-03-25 16:11:17.000000000 +0000
-@@ -1434,6 +1434,7 @@ static struct of_device_id qpti_match[] 
+diff -r 9608d5473017 drivers/scsi/qlogicpti.c
+--- a/drivers/scsi/qlogicpti.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/qlogicpti.c Wed May 06 16:56:35 2009 +0100
+@@ -1434,6 +1434,7 @@
  MODULE_DEVICE_TABLE(of, qpti_match);
  
  static struct of_platform_driver qpti_sbus_driver = {
@@ -332473,10 +332343,10 @@ diff -purN linux-2.6.27/drivers/scsi/qlogicpti.c linux-2.6.27.19-5.1/drivers/scs
        .name           = "qpti",
        .match_table    = qpti_match,
        .probe          = qpti_sbus_probe,
-diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scsi.c
---- linux-2.6.27/drivers/scsi/scsi.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi.c    2009-03-25 16:11:17.000000000 +0000
-@@ -291,7 +291,6 @@ struct scsi_cmnd *scsi_get_command(struc
+diff -r 9608d5473017 drivers/scsi/scsi.c
+--- a/drivers/scsi/scsi.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi.c      Wed May 06 16:56:35 2009 +0100
+@@ -291,7 +291,6 @@
                unsigned long flags;
  
                cmd->device = dev;
@@ -332484,7 +332354,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
                INIT_LIST_HEAD(&cmd->list);
                spin_lock_irqsave(&dev->list_lock, flags);
                list_add_tail(&cmd->list, &dev->cmd_list);
-@@ -652,26 +651,33 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -652,26 +651,33 @@
        unsigned long timeout;
        int rtn = 0;
  
@@ -332526,7 +332396,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
                scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
  
                SCSI_LOG_MLQUEUE(3, printk("queuecommand : device blocked \n"));
-@@ -714,21 +720,9 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -714,19 +720,7 @@
                host->resetting = 0;
        }
  
@@ -332537,18 +332407,16 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
 -      scsi_add_timer(cmd, cmd->timeout_per_command, scsi_times_out);
 -
        scsi_log_send(cmd);
-       /*
+-
+-      /*
 -       * We will use a queued command if possible, otherwise we will
 -       * emulate the queuing and calling of completion function ourselves.
 -       */
 -      atomic_inc(&cmd->device->iorequest_cnt);
--
--      /*
+       /*
         * Before we queue this command, check if the command
-        * length exceeds what the host adapter can handle.
-        */
-@@ -744,6 +738,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -744,6 +738,12 @@
        }
  
        spin_lock_irqsave(host->host_lock, flags);
@@ -332561,7 +332429,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
        scsi_cmd_get_serial(host, cmd); 
  
        if (unlikely(host->shost_state == SHOST_DEL)) {
-@@ -754,12 +754,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -754,12 +754,12 @@
        }
        spin_unlock_irqrestore(host->host_lock, flags);
        if (rtn) {
@@ -332580,10 +332448,12 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
                SCSI_LOG_MLQUEUE(3,
                    printk("queuecommand : request rejected\n"));
        }
-@@ -770,24 +770,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
+@@ -768,24 +768,6 @@
+       SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n"));
+       return rtn;
  }
- /**
+-
+-/**
 - * scsi_req_abort_cmd -- Request command recovery for the specified command
 - * @cmd: pointer to the SCSI command of interest
 - *
@@ -332600,12 +332470,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
 -      scsi_times_out(cmd);
 -}
 -EXPORT_SYMBOL(scsi_req_abort_cmd);
--
--/**
+ /**
   * scsi_done - Enqueue the finished SCSI command into the done queue.
-  * @cmd: The SCSI Command for which a low-level device driver (LLDD) gives
-  * ownership back to SCSI Core -- i.e. the LLDD has finished with it.
-@@ -802,42 +784,7 @@ EXPORT_SYMBOL(scsi_req_abort_cmd);
+@@ -802,42 +784,7 @@
   */
  static void scsi_done(struct scsi_cmnd *cmd)
  {
@@ -332649,7 +332517,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
  }
  
  /* Move this to a header if it becomes more generally useful */
-@@ -857,6 +804,7 @@ static struct scsi_driver *scsi_cmd_to_d
+@@ -857,6 +804,7 @@
  void scsi_finish_command(struct scsi_cmnd *cmd)
  {
        struct scsi_device *sdev = cmd->device;
@@ -332657,7 +332525,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
        struct Scsi_Host *shost = sdev->host;
        struct scsi_driver *drv;
        unsigned int good_bytes;
-@@ -872,6 +820,7 @@ void scsi_finish_command(struct scsi_cmn
+@@ -872,6 +820,7 @@
         * XXX(hch): What about locking?
           */
          shost->host_blocked = 0;
@@ -332665,7 +332533,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
          sdev->device_blocked = 0;
  
        /*
-@@ -1150,7 +1099,8 @@ EXPORT_SYMBOL(__starget_for_each_device)
+@@ -1150,7 +1099,8 @@
   * Description: Looks up the scsi_device with the specified @lun for a given
   * @starget.  The returned scsi_device does not have an additional
   * reference.  You must hold the host's host_lock over this call and
@@ -332675,7 +332543,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
   *
   * Note:  The only reason why drivers should use this is because
   * they need to access the device list in irq context.  Otherwise you
-@@ -1162,6 +1112,8 @@ struct scsi_device *__scsi_device_lookup
+@@ -1162,6 +1112,8 @@
        struct scsi_device *sdev;
  
        list_for_each_entry(sdev, &starget->devices, same_target_siblings) {
@@ -332684,9 +332552,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi.c linux-2.6.27.19-5.1/drivers/scsi/scs
                if (sdev->lun ==lun)
                        return sdev;
        }
-diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/scsi/scsi_error.c
---- linux-2.6.27/drivers/scsi/scsi_error.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_error.c      2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_error.c
+--- a/drivers/scsi/scsi_error.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_error.c        Wed May 06 16:56:35 2009 +0100
 @@ -24,6 +24,8 @@
  #include <linux/interrupt.h>
  #include <linux/blkdev.h>
@@ -332711,7 +332579,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
  /*
   * These should *probably* be handled by the host itself.
-@@ -112,69 +116,8 @@ int scsi_eh_scmd_add(struct scsi_cmnd *s
+@@ -112,69 +116,8 @@
  }
  
  /**
@@ -332782,7 +332650,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
   *
   * Notes:
   *     We do not need to lock this.  There is the potential for a race
-@@ -182,9 +125,11 @@ int scsi_delete_timer(struct scsi_cmnd *
+@@ -182,9 +125,11 @@
   *     normal completion function determines that the timer has already
   *     fired, then it mustn't do anything.
   */
@@ -332796,7 +332664,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
        scsi_log_completion(scmd, TIMEOUT_ERROR);
  
-@@ -195,23 +140,22 @@ void scsi_times_out(struct scsi_cmnd *sc
+@@ -195,23 +140,22 @@
        else
                eh_timed_out = NULL;
  
@@ -332830,7 +332698,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  }
  
  /**
-@@ -285,6 +229,80 @@ static inline void scsi_eh_prt_fail_stat
+@@ -285,6 +229,80 @@
  }
  #endif
  
@@ -332911,16 +332779,16 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  /**
   * scsi_check_sense - Examine scsi cmd sense
   * @scmd:     Cmd to have sense checked.
-@@ -307,6 +325,8 @@ static int scsi_check_sense(struct scsi_
+@@ -306,6 +324,8 @@
        if (scsi_sense_is_deferred(&sshdr))
                return NEEDS_RETRY;
-+      scsi_post_sense_event(sdev, &sshdr);
 +
++      scsi_post_sense_event(sdev, &sshdr);
        if (sdev->scsi_dh_data && sdev->scsi_dh_data->scsi_dh &&
                        sdev->scsi_dh_data->scsi_dh->check_sense) {
-               int rc;
-@@ -918,7 +938,7 @@ static int scsi_eh_tur(struct scsi_cmnd 
+@@ -918,7 +938,7 @@
        int retry_cnt = 1, rtn;
  
  retry_tur:
@@ -332929,7 +332797,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
        SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n",
                __func__, scmd, rtn));
-@@ -994,7 +1014,7 @@ static int scsi_eh_try_stu(struct scsi_c
+@@ -994,7 +1014,7 @@
  
                for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
                        rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
@@ -332938,7 +332806,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
                if (rtn == SUCCESS)
                        return 0;
-@@ -1126,10 +1146,10 @@ static int scsi_eh_target_reset(struct S
+@@ -1126,10 +1146,10 @@
                                struct list_head *done_q)
  {
        struct scsi_cmnd *scmd, *tgtr_scmd, *next;
@@ -332951,7 +332819,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
                tgtr_scmd = NULL;
                list_for_each_entry(scmd, work_q, eh_entry) {
                        if (id == scmd_id(scmd)) {
-@@ -1137,8 +1157,18 @@ static int scsi_eh_target_reset(struct S
+@@ -1137,8 +1157,18 @@
                                break;
                        }
                }
@@ -332971,7 +332839,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
                SCSI_LOG_ERROR_RECOVERY(3, printk("%s: Sending target reset "
                                                  "to target %d\n",
-@@ -1157,7 +1187,8 @@ static int scsi_eh_target_reset(struct S
+@@ -1157,7 +1187,8 @@
                                                          " failed target: "
                                                          "%d\n",
                                                          current->comm, id));
@@ -332981,7 +332849,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
        return list_empty(work_q);
  }
-@@ -1280,6 +1311,40 @@ static void scsi_eh_offline_sdevs(struct
+@@ -1280,6 +1311,40 @@
  }
  
  /**
@@ -333022,7 +332890,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
   * scsi_decide_disposition - Disposition a cmd on return from LLD.
   * @scmd:     SCSI cmd to examine.
   *
-@@ -1351,7 +1416,21 @@ int scsi_decide_disposition(struct scsi_
+@@ -1351,7 +1416,21 @@
  
        case DID_REQUEUE:
                return ADD_TO_MLQUEUE;
@@ -333045,18 +332913,18 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
        case DID_ERROR:
                if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
                    status_byte(scmd->result) == RESERVATION_CONFLICT)
-@@ -1408,8 +1487,9 @@ int scsi_decide_disposition(struct scsi_
+@@ -1408,8 +1487,9 @@
                return ADD_TO_MLQUEUE;
        case GOOD:
        case COMMAND_TERMINATED:
--      case TASK_ABORTED:
-               return SUCCESS;
-+      case TASK_ABORTED:
++              return SUCCESS;
+       case TASK_ABORTED:
+-              return SUCCESS;
 +              goto maybe_retry;
        case CHECK_CONDITION:
                rtn = scsi_check_sense(scmd);
                if (rtn == NEEDS_RETRY)
-@@ -1444,7 +1524,7 @@ int scsi_decide_disposition(struct scsi_
+@@ -1444,7 +1524,7 @@
         * even if the request is marked fast fail, we still requeue
         * for queue congestion conditions (QUEUE_FULL or BUSY) */
        if ((++scmd->retries) <= scmd->allowed
@@ -333065,7 +332933,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
                return NEEDS_RETRY;
        } else {
                /*
-@@ -1569,7 +1649,7 @@ void scsi_eh_flush_done_q(struct list_he
+@@ -1569,7 +1649,7 @@
        list_for_each_entry_safe(scmd, next, done_q, eh_entry) {
                list_del_init(&scmd->eh_entry);
                if (scsi_device_online(scmd->device) &&
@@ -333074,7 +332942,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
                    (++scmd->retries <= scmd->allowed)) {
                        SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"
                                                          " retry cmd: %p\n",
-@@ -1793,7 +1873,6 @@ scsi_reset_provider(struct scsi_device *
+@@ -1793,7 +1873,6 @@
  
        blk_rq_init(NULL, &req);
        scmd->request = &req;
@@ -333082,19 +332950,19 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_error.c linux-2.6.27.19-5.1/drivers/sc
  
        scmd->cmnd = req.cmd;
  
-@@ -1804,8 +1883,6 @@ scsi_reset_provider(struct scsi_device *
+@@ -1803,8 +1882,6 @@
+       scmd->cmd_len                   = 0;
  
        scmd->sc_data_direction         = DMA_BIDIRECTIONAL;
--      init_timer(&scmd->eh_timeout);
 -
+-      init_timer(&scmd->eh_timeout);
        spin_lock_irqsave(shost->host_lock, flags);
        shost->tmf_in_progress = 1;
-       spin_unlock_irqrestore(shost->host_lock, flags);
-diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi/scsi_lib.c
---- linux-2.6.27/drivers/scsi/scsi_lib.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_lib.c        2009-03-25 16:11:14.000000000 +0000
-@@ -114,6 +114,7 @@ int scsi_queue_insert(struct scsi_cmnd *
+diff -r 9608d5473017 drivers/scsi/scsi_lib.c
+--- a/drivers/scsi/scsi_lib.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_lib.c  Wed May 06 16:56:35 2009 +0100
+@@ -114,6 +114,7 @@
  {
        struct Scsi_Host *host = cmd->device->host;
        struct scsi_device *device = cmd->device;
@@ -333102,7 +332970,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        struct request_queue *q = device->request_queue;
        unsigned long flags;
  
-@@ -133,10 +134,17 @@ int scsi_queue_insert(struct scsi_cmnd *
+@@ -133,10 +134,17 @@
         * if a command is requeued with no other commands outstanding
         * either for the device or for the host.
         */
@@ -333122,7 +332990,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  
        /*
         * Decrement the counters, since these commands are no longer
-@@ -460,10 +468,12 @@ static void scsi_init_cmd_errh(struct sc
+@@ -460,10 +468,12 @@
  void scsi_device_unbusy(struct scsi_device *sdev)
  {
        struct Scsi_Host *shost = sdev->host;
@@ -333135,7 +333003,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        if (unlikely(scsi_host_in_recovery(shost) &&
                     (shost->host_failed || shost->host_eh_scheduled)))
                scsi_eh_wakeup(shost);
-@@ -519,6 +529,30 @@ static void scsi_single_lun_run(struct s
+@@ -519,6 +529,30 @@
        spin_unlock_irqrestore(shost->host_lock, flags);
  }
  
@@ -333166,7 +333034,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  /*
   * Function:  scsi_run_queue()
   *
-@@ -535,17 +569,16 @@ static void scsi_run_queue(struct reques
+@@ -535,17 +569,16 @@
  {
        struct scsi_device *sdev = q->queuedata;
        struct Scsi_Host *shost = sdev->host;
@@ -333187,7 +333055,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                int flagset;
  
                /*
-@@ -558,9 +591,18 @@ static void scsi_run_queue(struct reques
+@@ -558,9 +591,18 @@
                 * scsi_request_fn must get the host_lock before checking
                 * or modifying starved_list or starved_entry.
                 */
@@ -333208,7 +333076,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                spin_unlock(shost->host_lock);
  
                spin_lock(sdev->request_queue->queue_lock);
-@@ -575,14 +617,9 @@ static void scsi_run_queue(struct reques
+@@ -575,14 +617,9 @@
                spin_unlock(sdev->request_queue->queue_lock);
  
                spin_lock(shost->host_lock);
@@ -333225,17 +333093,17 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        spin_unlock_irqrestore(shost->host_lock, flags);
  
        blk_run_queue(q);
-@@ -611,8 +648,8 @@ static void scsi_requeue_command(struct 
+@@ -611,8 +648,8 @@
        struct request *req = cmd->request;
        unsigned long flags;
  
--      scsi_unprep_request(req);
-       spin_lock_irqsave(q->queue_lock, flags);
-+      scsi_unprep_request(req);
++      spin_lock_irqsave(q->queue_lock, flags);
+       scsi_unprep_request(req);
+-      spin_lock_irqsave(q->queue_lock, flags);
        blk_requeue_request(q, req);
        spin_unlock_irqrestore(q->queue_lock, flags);
  
-@@ -681,7 +718,7 @@ static struct scsi_cmnd *scsi_end_reques
+@@ -681,7 +718,7 @@
                        leftover = req->data_len;
  
                /* kill remainder if no retrys */
@@ -333244,7 +333112,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                        blk_end_request(req, error, leftover);
                else {
                        if (requeue) {
-@@ -1181,7 +1218,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_d
+@@ -1181,7 +1218,6 @@
        
        cmd->transfersize = req->data_len;
        cmd->allowed = req->retries;
@@ -333252,7 +333120,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        return BLKPREP_OK;
  }
  EXPORT_SYMBOL(scsi_setup_blk_pc_cmnd);
-@@ -1251,6 +1287,7 @@ int scsi_prep_state_check(struct scsi_de
+@@ -1251,6 +1287,7 @@
                        break;
                case SDEV_QUIESCE:
                case SDEV_BLOCK:
@@ -333260,7 +333128,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                        /*
                         * If the devices is blocked we defer normal commands.
                         */
-@@ -1313,6 +1350,7 @@ int scsi_prep_fn(struct request_queue *q
+@@ -1313,6 +1350,7 @@
                ret = scsi_setup_blk_pc_cmnd(sdev, req);
        return scsi_prep_return(q, req, ret);
  }
@@ -333268,7 +333136,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  
  /*
   * scsi_dev_queue_ready: if we can send requests to sdev, return 1 else
-@@ -1323,8 +1361,6 @@ int scsi_prep_fn(struct request_queue *q
+@@ -1323,8 +1361,6 @@
  static inline int scsi_dev_queue_ready(struct request_queue *q,
                                  struct scsi_device *sdev)
  {
@@ -333277,7 +333145,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        if (sdev->device_busy == 0 && sdev->device_blocked) {
                /*
                 * unblock after device_blocked iterates to zero
-@@ -1338,12 +1374,58 @@ static inline int scsi_dev_queue_ready(s
+@@ -1338,9 +1374,55 @@
                        return 0;
                }
        }
@@ -333285,9 +333153,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
 +      if (scsi_device_is_busy(sdev))
                return 0;
  
-       return 1;
- }
++      return 1;
++}
++
 +
 +/*
 + * scsi_target_queue_ready: checks if there we can send commands to target
@@ -333331,13 +333199,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
 +      /* We're OK to process the command, so we can't be starved */
 +      if (!list_empty(&sdev->starved_entry))
 +              list_del_init(&sdev->starved_entry);
-+      return 1;
-+}
-+
- /*
-  * scsi_host_queue_ready: if we can send requests to shost, return 1 else
-  * return 0. We must end up running the queue again whenever 0 is
-@@ -1369,8 +1451,7 @@ static inline int scsi_host_queue_ready(
+       return 1;
+ }
+@@ -1369,8 +1451,7 @@
                        return 0;
                }
        }
@@ -333347,7 +333212,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                if (list_empty(&sdev->starved_entry))
                        list_add_tail(&sdev->starved_entry, &shost->starved_list);
                return 0;
-@@ -1384,12 +1465,44 @@ static inline int scsi_host_queue_ready(
+@@ -1384,12 +1465,44 @@
  }
  
  /*
@@ -333392,7 +333257,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        struct Scsi_Host *shost = sdev->host;
  
        blkdev_dequeue_request(req);
-@@ -1413,20 +1526,30 @@ static void scsi_kill_request(struct req
+@@ -1413,19 +1526,29 @@
        spin_unlock(sdev->request_queue->queue_lock);
        spin_lock(shost->host_lock);
        shost->host_busy++;
@@ -333413,7 +333278,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        int disposition;
  
        INIT_LIST_HEAD(&cmd->eh_entry);
++
 +      /*
 +       * Set the serial numbers back to zero
 +       */
@@ -333422,11 +333287,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
 +      atomic_inc(&cmd->device->iodone_cnt);
 +      if (cmd->result)
 +              atomic_inc(&cmd->device->ioerr_cnt);
-+
        disposition = scsi_decide_disposition(cmd);
        if (disposition != SUCCESS &&
-           time_before(cmd->jiffies_at_alloc + wait_for, jiffies)) {
-@@ -1541,14 +1664,13 @@ static void scsi_request_fn(struct reque
+@@ -1541,14 +1664,13 @@
                        goto not_ready;
                }
  
@@ -333446,7 +333310,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                shost->host_busy++;
  
                /*
-@@ -1631,7 +1753,7 @@ struct request_queue *__scsi_alloc_queue
+@@ -1631,7 +1753,7 @@
                                         request_fn_proc *request_fn)
  {
        struct request_queue *q;
@@ -333455,7 +333319,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  
        q = blk_init_queue(request_fn, NULL);
        if (!q)
-@@ -1675,6 +1797,8 @@ struct request_queue *scsi_alloc_queue(s
+@@ -1675,6 +1797,8 @@
  
        blk_queue_prep_rq(q, scsi_prep_fn);
        blk_queue_softirq_done(q, scsi_softirq_done);
@@ -333464,7 +333328,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
        return q;
  }
  
-@@ -2064,10 +2188,13 @@ scsi_device_set_state(struct scsi_device
+@@ -2064,10 +2188,13 @@
  
        switch (state) {
        case SDEV_CREATED:
@@ -333482,12 +333346,11 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
                        
        case SDEV_RUNNING:
                switch (oldstate) {
-@@ -2105,8 +2232,17 @@ scsi_device_set_state(struct scsi_device
+@@ -2105,8 +2232,17 @@
  
        case SDEV_BLOCK:
                switch (oldstate) {
--              case SDEV_CREATED:
-               case SDEV_RUNNING:
++              case SDEV_RUNNING:
 +              case SDEV_CREATED_BLOCK:
 +                      break;
 +              default:
@@ -333497,11 +333360,12 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
 +
 +      case SDEV_CREATED_BLOCK:
 +              switch (oldstate) {
-+              case SDEV_CREATED:
+               case SDEV_CREATED:
+-              case SDEV_RUNNING:
                        break;
                default:
                        goto illegal;
-@@ -2394,8 +2530,12 @@ scsi_internal_device_block(struct scsi_d
+@@ -2394,8 +2530,12 @@
        int err = 0;
  
        err = scsi_device_set_state(sdev, SDEV_BLOCK);
@@ -333516,7 +333380,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  
        /* 
         * The device has transitioned to SDEV_BLOCK.  Stop the
-@@ -2438,8 +2578,12 @@ scsi_internal_device_unblock(struct scsi
+@@ -2438,8 +2578,12 @@
         * and goose the device queue if successful.  
         */
        err = scsi_device_set_state(sdev, SDEV_RUNNING);
@@ -333531,10 +333395,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27.19-5.1/drivers/scsi
  
        spin_lock_irqsave(q->queue_lock, flags);
        blk_start_queue(q);
-diff -purN linux-2.6.27/drivers/scsi/scsi_lib_dma.c linux-2.6.27.19-5.1/drivers/scsi/scsi_lib_dma.c
---- linux-2.6.27/drivers/scsi/scsi_lib_dma.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_lib_dma.c    2009-03-25 16:11:15.000000000 +0000
-@@ -23,7 +23,8 @@ int scsi_dma_map(struct scsi_cmnd *cmd)
+diff -r 9608d5473017 drivers/scsi/scsi_lib_dma.c
+--- a/drivers/scsi/scsi_lib_dma.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_lib_dma.c      Wed May 06 16:56:35 2009 +0100
+@@ -23,7 +23,8 @@
        int nseg = 0;
  
        if (scsi_sg_count(cmd)) {
@@ -333544,7 +333408,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib_dma.c linux-2.6.27.19-5.1/drivers/
  
                nseg = dma_map_sg(dev, scsi_sglist(cmd), scsi_sg_count(cmd),
                                  cmd->sc_data_direction);
-@@ -41,10 +42,12 @@ EXPORT_SYMBOL(scsi_dma_map);
+@@ -41,10 +42,12 @@
  void scsi_dma_unmap(struct scsi_cmnd *cmd)
  {
        if (scsi_sg_count(cmd)) {
@@ -333558,9 +333422,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_lib_dma.c linux-2.6.27.19-5.1/drivers/
  }
  EXPORT_SYMBOL(scsi_dma_unmap);
 +
-diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/scsi/scsi_netlink.c
---- linux-2.6.27/drivers/scsi/scsi_netlink.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_netlink.c    2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_netlink.c
+--- a/drivers/scsi/scsi_netlink.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_netlink.c      Wed May 06 16:56:35 2009 +0100
 @@ -21,6 +21,7 @@
  #include <linux/time.h>
  #include <linux/jiffies.h>
@@ -333609,7 +333473,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
  
  /**
   * scsi_nl_rcv_msg - Receive message handler.
-@@ -45,8 +79,9 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -45,8 +79,9 @@
  {
        struct nlmsghdr *nlh;
        struct scsi_nl_hdr *hdr;
@@ -333621,7 +333485,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
  
        while (skb->len >= NLMSG_SPACE(0)) {
                err = 0;
-@@ -65,7 +100,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -65,7 +100,7 @@
  
                if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) {
                        err = -EBADMSG;
@@ -333630,7 +333494,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
                }
  
                hdr = NLMSG_DATA(nlh);
-@@ -83,12 +118,27 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
+@@ -83,12 +118,27 @@
                if (nlh->nlmsg_len < (sizeof(*nlh) + hdr->msglen)) {
                        printk(KERN_WARNING "%s: discarding partial message\n",
                                 __func__);
@@ -333660,7 +333524,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
  
  next_msg:
                if ((err) || (nlh->nlmsg_flags & NLM_F_ACK))
-@@ -110,14 +160,42 @@ static int
+@@ -110,14 +160,42 @@
  scsi_nl_rcv_event(struct notifier_block *this, unsigned long event, void *ptr)
  {
        struct netlink_notify *n = ptr;
@@ -333674,9 +333538,11 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
 +      spin_lock_irqsave(&scsi_nl_lock, flags);
 +      scsi_nl_state |= STATE_EHANDLER_BSY;
 +
-+      /*
+       /*
+-       * Currently, we are not tracking PID's, etc. There is nothing
+-       * to handle.
 +       * Pass event on to any transports that may be listening
-+       */
+        */
 +      for (tport = 0; tport < SCSI_NL_MAX_TRANSPORTS; tport++) {
 +              if (!(transports[tport].flags & HANDLER_DELETING) &&
 +                  (transports[tport].event_handler)) {
@@ -333686,11 +333552,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
 +              }
 +      }
 +
-       /*
--       * Currently, we are not tracking PID's, etc. There is nothing
--       * to handle.
++      /*
 +       * Pass event on to any drivers that may be listening
-        */
++       */
 +      list_for_each_entry(driver, &scsi_nl_drivers, next) {
 +              if (!(driver->flags & HANDLER_DELETING) &&
 +                  (driver->devt_handler)) {
@@ -333705,7 +333569,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
  
        return NOTIFY_DONE;
  }
-@@ -128,7 +206,281 @@ static struct notifier_block scsi_netlin
+@@ -128,13 +206,289 @@
  
  
  /**
@@ -333988,16 +333852,15 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
   *
   **/
  void
-@@ -136,6 +488,8 @@ scsi_netlink_init(void)
+ scsi_netlink_init(void)
  {
        int error;
-+      INIT_LIST_HEAD(&scsi_nl_drivers);
 +
++      INIT_LIST_HEAD(&scsi_nl_drivers);
        error = netlink_register_notifier(&scsi_netlink_notifier);
        if (error) {
-               printk(KERN_ERR "%s: register of event handler failed - %d\n",
-@@ -150,8 +504,15 @@ scsi_netlink_init(void)
+@@ -150,8 +504,15 @@
                printk(KERN_ERR "%s: register of recieve handler failed\n",
                                __func__);
                netlink_unregister_notifier(&scsi_netlink_notifier);
@@ -334013,7 +333876,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
        return;
  }
  
-@@ -163,6 +524,8 @@ scsi_netlink_init(void)
+@@ -163,6 +524,8 @@
  void
  scsi_netlink_exit(void)
  {
@@ -334022,7 +333885,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
        if (scsi_nl_sock) {
                netlink_kernel_release(scsi_nl_sock);
                netlink_unregister_notifier(&scsi_netlink_notifier);
-@@ -172,3 +535,147 @@ scsi_netlink_exit(void)
+@@ -172,3 +535,147 @@
  }
  
  
@@ -334170,9 +334033,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_netlink.c linux-2.6.27.19-5.1/drivers/
 +EXPORT_SYMBOL(scsi_nl_send_vendor_msg);
 +
 +
-diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scsi/scsi_priv.h
---- linux-2.6.27/drivers/scsi/scsi_priv.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_priv.h       2009-03-25 16:11:17.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_priv.h
+--- a/drivers/scsi/scsi_priv.h Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_priv.h Wed May 06 16:56:35 2009 +0100
 @@ -4,6 +4,7 @@
  #include <linux/device.h>
  
@@ -334181,7 +334044,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scs
  struct scsi_cmnd;
  struct scsi_device;
  struct scsi_host_template;
-@@ -27,7 +28,6 @@ extern void scsi_exit_hosts(void);
+@@ -27,7 +28,6 @@
  extern int scsi_dispatch_cmd(struct scsi_cmnd *cmd);
  extern int scsi_setup_command_freelist(struct Scsi_Host *shost);
  extern void scsi_destroy_command_freelist(struct Scsi_Host *shost);
@@ -334189,7 +334052,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scs
  #ifdef CONFIG_SCSI_LOGGING
  void scsi_log_send(struct scsi_cmnd *cmd);
  void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);
-@@ -49,10 +49,7 @@ extern int __init scsi_init_devinfo(void
+@@ -49,10 +49,7 @@
  extern void scsi_exit_devinfo(void);
  
  /* scsi_error.c */
@@ -334201,7 +334064,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scs
  extern int scsi_error_handler(void *host);
  extern int scsi_decide_disposition(struct scsi_cmnd *cmd);
  extern void scsi_eh_wakeup(struct Scsi_Host *shost);
-@@ -62,6 +59,7 @@ void scsi_eh_ready_devs(struct Scsi_Host
+@@ -62,6 +59,7 @@
                        struct list_head *done_q);
  int scsi_eh_get_sense(struct list_head *work_q,
                      struct list_head *done_q);
@@ -334209,7 +334072,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scs
  
  /* scsi_lib.c */
  extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
-@@ -76,7 +74,6 @@ extern int scsi_init_queue(void);
+@@ -76,7 +74,6 @@
  extern void scsi_exit_queue(void);
  struct request_queue;
  struct request;
@@ -334217,10 +334080,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_priv.h linux-2.6.27.19-5.1/drivers/scs
  extern struct kmem_cache *scsi_sdb_cache;
  
  /* scsi_proc.c */
-diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scsi/scsi_proc.c
---- linux-2.6.27/drivers/scsi/scsi_proc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_proc.c       2009-03-25 16:11:17.000000000 +0000
-@@ -389,13 +389,59 @@ static ssize_t proc_scsi_write(struct fi
+diff -r 9608d5473017 drivers/scsi/scsi_proc.c
+--- a/drivers/scsi/scsi_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_proc.c Wed May 06 16:56:35 2009 +0100
+@@ -389,12 +389,58 @@
   * @s: output goes here
   * @p: not used
   */
@@ -334231,7 +334094,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scs
 -      bus_for_each_dev(&scsi_bus_type, NULL, s, proc_print_scsidevice);
 -      return 0;
 +      return 1;
-+}
+ }
 +
 +static inline struct device *next_scsi_device(struct device *start)
 +{
@@ -334272,19 +334135,18 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scs
 +              seq_puts(sfile, "Attached devices:\n");
 +
 +      return proc_print_scsidevice(dev, sfile);
- }
++}
++
 +static struct seq_operations scsi_seq_ops = {
 +      .start  = scsi_seq_start,
 +      .next   = scsi_seq_next,
 +      .stop   = scsi_seq_stop,
 +      .show   = scsi_seq_show
 +};
-+
  /**
   * proc_scsi_open - glue function
-  * @inode: not used
-@@ -409,7 +455,7 @@ static int proc_scsi_open(struct inode *
+@@ -409,7 +455,7 @@
         * We don't really need this for the write case but it doesn't
         * harm either.
         */
@@ -334293,7 +334155,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scs
  }
  
  static const struct file_operations proc_scsi_operations = {
-@@ -418,7 +464,7 @@ static const struct file_operations proc
+@@ -418,7 +464,7 @@
        .read           = seq_read,
        .write          = proc_scsi_write,
        .llseek         = seq_lseek,
@@ -334302,10 +334164,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_proc.c linux-2.6.27.19-5.1/drivers/scs
  };
  
  /**
-diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scsi/scsi_scan.c
---- linux-2.6.27/drivers/scsi/scsi_scan.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_scan.c       2009-03-25 16:11:15.000000000 +0000
-@@ -314,6 +314,7 @@ static struct scsi_device *scsi_alloc_sd
+diff -r 9608d5473017 drivers/scsi/scsi_scan.c
+--- a/drivers/scsi/scsi_scan.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_scan.c Wed May 06 16:56:35 2009 +0100
+@@ -314,6 +314,7 @@
        return sdev;
  
  out_device_destroy:
@@ -334313,7 +334175,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
        transport_destroy_device(&sdev->sdev_gendev);
        put_device(&sdev->sdev_gendev);
  out:
-@@ -419,6 +420,7 @@ static struct scsi_target *scsi_alloc_ta
+@@ -419,6 +420,7 @@
        dev->type = &scsi_target_type;
        starget->id = id;
        starget->channel = channel;
@@ -334321,7 +334183,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
        INIT_LIST_HEAD(&starget->siblings);
        INIT_LIST_HEAD(&starget->devices);
        starget->state = STARGET_CREATED;
-@@ -679,7 +681,7 @@ static int scsi_probe_lun(struct scsi_de
+@@ -679,7 +681,7 @@
         * and displaying garbage for the Vendor, Product, or Revision
         * strings.
         */
@@ -334330,7 +334192,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
                printk(KERN_INFO "scsi scan: INQUIRY result too short (%d),"
                                " using 36\n", sdev->inquiry_len);
                sdev->inquiry_len = 36;
-@@ -730,6 +732,8 @@ static int scsi_probe_lun(struct scsi_de
+@@ -730,6 +732,8 @@
  static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
                int *bflags, int async)
  {
@@ -334339,7 +334201,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
        /*
         * XXX do not save the inquiry, since it can change underneath us,
         * save just vendor/model/rev.
-@@ -818,6 +822,7 @@ static int scsi_add_lun(struct scsi_devi
+@@ -818,6 +822,7 @@
        sdev->inq_periph_qual = (inq_result[0] >> 5) & 7;
        sdev->lockable = sdev->removable;
        sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2);
@@ -334347,7 +334209,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
  
        if (sdev->scsi_level >= SCSI_3 ||
                        (sdev->inquiry_len > 56 && inq_result[56] & 0x04))
-@@ -885,7 +890,17 @@ static int scsi_add_lun(struct scsi_devi
+@@ -885,7 +890,17 @@
  
        /* set the device running here so that slave configure
         * may do I/O */
@@ -334366,7 +334228,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
  
        if (*bflags & BLIST_MS_192_BYTES_FOR_3F)
                sdev->use_192_bytes_for_3f = 1;
-@@ -899,7 +914,7 @@ static int scsi_add_lun(struct scsi_devi
+@@ -899,7 +914,7 @@
        transport_configure_device(&sdev->sdev_gendev);
  
        if (sdev->host->hostt->slave_configure) {
@@ -334375,7 +334237,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
                if (ret) {
                        /*
                         * if LLDD reports slave not present, don't clutter
-@@ -994,7 +1009,7 @@ static int scsi_probe_and_add_lun(struct
+@@ -994,7 +1009,7 @@
         */
        sdev = scsi_device_lookup_by_target(starget, lun);
        if (sdev) {
@@ -334384,7 +334246,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
                        SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO
                                "scsi scan: device exists on %s\n",
                                sdev->sdev_gendev.bus_id));
-@@ -1467,7 +1482,7 @@ static int scsi_report_lun_scan(struct s
+@@ -1467,7 +1482,7 @@
        kfree(lun_data);
   out:
        scsi_device_put(sdev);
@@ -334393,10 +334255,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_scan.c linux-2.6.27.19-5.1/drivers/scs
                /*
                 * the sdev we used didn't appear in the report luns scan
                 */
-diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/scsi/scsi_sysfs.c
---- linux-2.6.27/drivers/scsi/scsi_sysfs.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_sysfs.c      2009-03-25 16:11:15.000000000 +0000
-@@ -34,6 +34,7 @@ static const struct {
+diff -r 9608d5473017 drivers/scsi/scsi_sysfs.c
+--- a/drivers/scsi/scsi_sysfs.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_sysfs.c        Wed May 06 16:56:35 2009 +0100
+@@ -34,6 +34,7 @@
        { SDEV_QUIESCE, "quiesce" },
        { SDEV_OFFLINE, "offline" },
        { SDEV_BLOCK,   "blocked" },
@@ -334404,7 +334266,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/sc
  };
  
  const char *scsi_device_state_name(enum scsi_device_state state)
-@@ -419,29 +420,12 @@ static int scsi_bus_resume(struct device
+@@ -419,29 +420,12 @@
        return err;
  }
  
@@ -334434,7 +334296,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/sc
  };
  EXPORT_SYMBOL_GPL(scsi_bus_type);
  
-@@ -559,13 +543,17 @@ sdev_rd_attr (scsi_level, "%d\n");
+@@ -559,13 +543,17 @@
  sdev_rd_attr (vendor, "%.8s\n");
  sdev_rd_attr (model, "%.16s\n");
  sdev_rd_attr (rev, "%.4s\n");
@@ -334453,7 +334315,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/sc
  }
  
  static ssize_t
-@@ -576,7 +564,7 @@ sdev_store_timeout (struct device *dev, 
+@@ -576,7 +564,7 @@
        int timeout;
        sdev = to_scsi_device(dev);
        sscanf (buf, "%d\n", &timeout);
@@ -334462,7 +334324,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/sc
        return count;
  }
  static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout);
-@@ -741,6 +729,7 @@ static struct attribute *scsi_sdev_attrs
+@@ -741,6 +729,7 @@
        &dev_attr_vendor.attr,
        &dev_attr_model.attr,
        &dev_attr_rev.attr,
@@ -334470,9 +334332,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_sysfs.c linux-2.6.27.19-5.1/drivers/sc
        &dev_attr_rescan.attr,
        &dev_attr_delete.attr,
        &dev_attr_state.attr,
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_fc.c
---- linux-2.6.27/drivers/scsi/scsi_transport_fc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_fc.c       2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/scsi_transport_fc.c
+--- a/drivers/scsi/scsi_transport_fc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_fc.c Wed May 06 16:56:35 2009 +0100
 @@ -40,31 +40,7 @@
  
  static int fc_queue_work(struct Scsi_Host *, struct work_struct *);
@@ -334506,7 +334368,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        struct device *pdev, struct fc_vport_identifiers  *ids,
        struct fc_vport **vport);
  
-@@ -1760,7 +1736,7 @@ store_fc_host_vport_create(struct device
+@@ -1760,7 +1736,7 @@
        vid.disable = false;            /* always enabled */
  
        /* we only allow support on Channel 0 !!! */
@@ -334515,7 +334377,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        return stat ? stat : count;
  }
  static FC_DEVICE_ATTR(host, vport_create, S_IWUSR, NULL,
-@@ -1950,15 +1926,15 @@ static int fc_vport_match(struct attribu
+@@ -1950,15 +1926,15 @@
   * Notes:
   *    This routine assumes no locks are held on entry.
   */
@@ -334534,7 +334396,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  }
  
  /*
-@@ -2157,8 +2133,7 @@ fc_attach_transport(struct fc_function_t
+@@ -2157,8 +2133,7 @@
        SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(roles);
        SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(port_state);
        SETUP_PRIVATE_RPORT_ATTRIBUTE_RD(scsi_target_id);
@@ -334544,7 +334406,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
        BUG_ON(count > FC_RPORT_NUM_ATTRS);
  
-@@ -2352,6 +2327,22 @@ fc_remove_host(struct Scsi_Host *shost)
+@@ -2352,6 +2327,22 @@
  }
  EXPORT_SYMBOL(fc_remove_host);
  
@@ -334567,22 +334429,22 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
  /**
   * fc_starget_delete - called to delete the scsi decendents of an rport
-@@ -2364,13 +2355,8 @@ fc_starget_delete(struct work_struct *wo
+@@ -2364,13 +2355,8 @@
  {
        struct fc_rport *rport =
                container_of(work, struct fc_rport, stgt_delete_work);
 -      struct Scsi_Host *shost = rport_to_shost(rport);
 -      struct fc_internal *i = to_fc_internal(shost->transportt);
--
 -      /* Involve the LLDD if possible to terminate all io on the rport. */
 -      if (i->f->terminate_rport_io)
 -              i->f->terminate_rport_io(rport);
+-
 +      fc_terminate_rport_io(rport);
        scsi_remove_target(&rport->dev);
  }
  
-@@ -2396,10 +2382,7 @@ fc_rport_final_delete(struct work_struct
+@@ -2396,10 +2382,7 @@
        if (rport->flags & FC_RPORT_SCAN_PENDING)
                scsi_flush_work(shost);
  
@@ -334594,7 +334456,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        /*
         * Cancel any outstanding timers. These should really exist
         * only when rmmod'ing the LLDD and we're asking for
-@@ -2424,8 +2407,12 @@ fc_rport_final_delete(struct work_struct
+@@ -2424,8 +2407,12 @@
        /*
         * Notify the driver that the rport is now dead. The LLDD will
         * also guarantee that any communication to the rport is terminated
@@ -334608,7 +334470,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
                i->f->dev_loss_tmo_callbk(rport);
  
        transport_remove_device(dev);
-@@ -2663,7 +2650,9 @@ fc_remote_port_add(struct Scsi_Host *sho
+@@ -2663,7 +2650,9 @@
  
                                spin_lock_irqsave(shost->host_lock, flags);
  
@@ -334619,7 +334481,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
                                /* if target, initiate a scan */
                                if (rport->scsi_target_id != -1) {
-@@ -2726,6 +2715,7 @@ fc_remote_port_add(struct Scsi_Host *sho
+@@ -2726,6 +2715,7 @@
                        rport->port_id = ids->port_id;
                        rport->roles = ids->roles;
                        rport->port_state = FC_PORTSTATE_ONLINE;
@@ -334627,7 +334489,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
                        if (fci->f->dd_fcrport_size)
                                memset(rport->dd_data, 0,
-@@ -2808,7 +2798,6 @@ void
+@@ -2808,7 +2798,6 @@
  fc_remote_port_delete(struct fc_rport  *rport)
  {
        struct Scsi_Host *shost = rport_to_shost(rport);
@@ -334635,7 +334497,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        int timeout = rport->dev_loss_tmo;
        unsigned long flags;
  
-@@ -2854,7 +2843,7 @@ fc_remote_port_delete(struct fc_rport  *
+@@ -2854,7 +2843,7 @@
  
        /* see if we need to kill io faster than waiting for device loss */
        if ((rport->fast_io_fail_tmo != -1) &&
@@ -334644,7 +334506,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
                fc_queue_devloss_work(shost, &rport->fail_io_work,
                                        rport->fast_io_fail_tmo * HZ);
  
-@@ -2930,7 +2919,8 @@ fc_remote_port_rolechg(struct fc_rport  
+@@ -2930,7 +2919,8 @@
                        fc_flush_devloss(shost);
  
                spin_lock_irqsave(shost->host_lock, flags);
@@ -334654,7 +334516,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
                spin_unlock_irqrestore(shost->host_lock, flags);
  
                /* ensure any stgt delete functions are done */
-@@ -2959,6 +2949,7 @@ fc_timeout_deleted_rport(struct work_str
+@@ -2959,6 +2949,7 @@
        struct fc_rport *rport =
                container_of(work, struct fc_rport, dev_loss_work.work);
        struct Scsi_Host *shost = rport_to_shost(rport);
@@ -334662,7 +334524,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
        unsigned long flags;
  
-@@ -3025,6 +3016,7 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3025,6 +3016,7 @@
        rport->supported_classes = FC_COS_UNSPECIFIED;
        rport->roles = FC_PORT_ROLE_UNKNOWN;
        rport->port_state = FC_PORTSTATE_NOTPRESENT;
@@ -334670,7 +334532,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
        /* remove the identifiers that aren't used in the consisting binding */
        switch (fc_host->tgtid_bind_type) {
-@@ -3044,6 +3036,8 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3044,6 +3036,8 @@
                break;
        }
  
@@ -334679,7 +334541,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        /*
         * As this only occurs if the remote port (scsi target)
         * went away and didn't come back - we'll remove
-@@ -3053,8 +3047,18 @@ fc_timeout_deleted_rport(struct work_str
+@@ -3053,7 +3047,17 @@
  
        scsi_target_unblock(&rport->dev);
        fc_queue_work(shost, &rport->stgt_delete_work);
@@ -334693,12 +334555,11 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
 +      if (i->f->dev_loss_tmo_callbk)
 +              i->f->dev_loss_tmo_callbk(rport);
  }
 +
  /**
   * fc_timeout_fail_rport_io - Timeout handler for a fast io failing on a disconnected SCSI target.
-  * @work:     rport to terminate io on.
-@@ -3067,13 +3071,12 @@ fc_timeout_fail_rport_io(struct work_str
+@@ -3067,13 +3071,12 @@
  {
        struct fc_rport *rport =
                container_of(work, struct fc_rport, fail_io_work.work);
@@ -334714,7 +334575,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  }
  
  /**
-@@ -3103,7 +3106,7 @@ fc_scsi_scan_rport(struct work_struct *w
+@@ -3103,7 +3106,7 @@
  
  
  /**
@@ -334723,7 +334584,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
   * @shost:    scsi host the virtual port is connected to.
   * @channel:  Channel on shost port connected to.
   * @pdev:     parent device for vport
-@@ -3118,7 +3121,7 @@ fc_scsi_scan_rport(struct work_struct *w
+@@ -3118,7 +3121,7 @@
   *    This routine assumes no locks are held on entry.
   */
  static int
@@ -334732,7 +334593,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
        struct fc_vport_identifiers  *ids, struct fc_vport **ret_vport)
  {
        struct fc_host_attrs *fc_host = shost_to_fc_host(shost);
-@@ -3231,6 +3234,28 @@ delete_vport:
+@@ -3231,6 +3234,28 @@
        return error;
  }
  
@@ -334761,10 +334622,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_fc.c linux-2.6.27.19-5.1/dri
  
  /**
   * fc_vport_terminate - Admin App or LLDD requests termination of a vport
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_iscsi.c
---- linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_iscsi.c    2009-03-25 16:11:15.000000000 +0000
-@@ -138,7 +138,7 @@ static ssize_t
+diff -r 9608d5473017 drivers/scsi/scsi_transport_iscsi.c
+--- a/drivers/scsi/scsi_transport_iscsi.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_iscsi.c      Wed May 06 16:56:35 2009 +0100
+@@ -138,7 +138,7 @@
  show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf)
  {
        struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
@@ -334773,7 +334634,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/
  }
  static ISCSI_ATTR(ep, handle, S_IRUGO, show_ep_handle, NULL);
  
-@@ -156,7 +156,7 @@ static struct attribute_group iscsi_endp
+@@ -156,7 +156,7 @@
  static int iscsi_match_epid(struct device *dev, void *data)
  {
        struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev);
@@ -334782,7 +334643,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/
  
        return *epid == ep->id;
  }
-@@ -166,7 +166,7 @@ iscsi_create_endpoint(int dd_size)
+@@ -166,7 +166,7 @@
  {
        struct device *dev;
        struct iscsi_endpoint *ep;
@@ -334791,7 +334652,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/
        int err;
  
        for (id = 1; id < ISCSI_MAX_EPID; id++) {
-@@ -187,7 +187,7 @@ iscsi_create_endpoint(int dd_size)
+@@ -187,7 +187,7 @@
  
        ep->id = id;
        ep->dev.class = &iscsi_endpoint_class;
@@ -334800,7 +334661,7 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/
        err = device_register(&ep->dev);
          if (err)
                  goto free_ep;
-@@ -374,10 +374,10 @@ int iscsi_session_chkready(struct iscsi_
+@@ -374,10 +374,10 @@
                err = 0;
                break;
        case ISCSI_SESSION_FAILED:
@@ -334813,10 +334674,10 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_iscsi.c linux-2.6.27.19-5.1/
                break;
        default:
                err = DID_NO_CONNECT << 16;
-diff -purN linux-2.6.27/drivers/scsi/scsi_transport_spi.c linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_spi.c
---- linux-2.6.27/drivers/scsi/scsi_transport_spi.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/scsi_transport_spi.c      2009-03-25 16:11:17.000000000 +0000
-@@ -109,7 +109,9 @@ static int spi_execute(struct scsi_devic
+diff -r 9608d5473017 drivers/scsi/scsi_transport_spi.c
+--- a/drivers/scsi/scsi_transport_spi.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/scsi_transport_spi.c        Wed May 06 16:56:35 2009 +0100
+@@ -109,7 +109,9 @@
        for(i = 0; i < DV_RETRIES; i++) {
                result = scsi_execute(sdev, cmd, dir, buffer, bufflen,
                                      sense, DV_TIMEOUT, /* retries */ 1,
@@ -334827,9 +334688,9 @@ diff -purN linux-2.6.27/drivers/scsi/scsi_transport_spi.c linux-2.6.27.19-5.1/dr
                if (result & DRIVER_SENSE) {
                        struct scsi_sense_hdr sshdr_tmp;
                        if (!sshdr)
-diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
---- linux-2.6.27/drivers/scsi/sd.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sd.c      2009-03-25 16:11:15.000000000 +0000
+diff -r 9608d5473017 drivers/scsi/sd.c
+--- a/drivers/scsi/sd.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sd.c        Wed May 06 16:56:35 2009 +0100
 @@ -47,6 +47,7 @@
  #include <linux/blkpg.h>
  #include <linux/delay.h>
@@ -334838,7 +334699,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
  #include <asm/uaccess.h>
  
  #include <scsi/scsi.h>
-@@ -99,6 +100,7 @@ static void scsi_disk_release(struct dev
+@@ -99,6 +100,7 @@
  static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
  static void sd_print_result(struct scsi_disk *, int);
  
@@ -334846,7 +334707,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
  static DEFINE_IDA(sd_index_ida);
  
  /* This semaphore is used to mediate the 0->1 reference get in the
-@@ -159,7 +161,7 @@ sd_store_cache_type(struct device *dev, 
+@@ -159,7 +161,7 @@
                        sd_print_sense_hdr(sdkp, &sshdr);
                return -EINVAL;
        }
@@ -334855,7 +334716,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
        return count;
  }
  
-@@ -377,7 +379,6 @@ static int sd_prep_fn(struct request_que
+@@ -377,7 +379,6 @@
        sector_t block = rq->sector;
        sector_t threshold;
        unsigned int this_count = rq->nr_sectors;
@@ -334863,7 +334724,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
        int ret;
  
        if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
-@@ -578,7 +579,6 @@ static int sd_prep_fn(struct request_que
+@@ -578,7 +579,6 @@
        SCpnt->transfersize = sdp->sector_size;
        SCpnt->underflow = this_count << 9;
        SCpnt->allowed = SD_MAX_RETRIES;
@@ -334871,7 +334732,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
  
        /*
         * This indicates that the command is ready from our end to be
-@@ -910,7 +910,7 @@ static void sd_rescan(struct device *dev
+@@ -910,7 +910,7 @@
        struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
  
        if (sdkp) {
@@ -334880,7 +334741,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
                scsi_disk_put(sdkp);
        }
  }
-@@ -1047,7 +1047,6 @@ static int sd_done(struct scsi_cmnd *SCp
+@@ -1047,7 +1047,6 @@
                good_bytes = sd_completed_bytes(SCpnt);
                break;
        case RECOVERED_ERROR:
@@ -334888,10 +334749,11 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
                /* Inform the user, but make sure that it's not treated
                 * as a hard error.
                 */
-@@ -1056,6 +1055,15 @@ static int sd_done(struct scsi_cmnd *SCp
+@@ -1055,6 +1054,15 @@
+               SCpnt->result = 0;
                memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
                good_bytes = scsi_bufflen(SCpnt);
-               break;
++              break;
 +      case NO_SENSE:
 +              /* This indicates a false check condition, so ignore it.  An
 +               * unknown amount of data was transferred so treat it as an
@@ -334900,11 +334762,10 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
 +              scsi_print_sense("sd", SCpnt);
 +              SCpnt->result = 0;
 +              memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
-+              break;
+               break;
        case ABORTED_COMMAND:
                if (sshdr.asc == 0x10) { /* DIF: Disk detected corruption */
-                       scsi_print_result(SCpnt);
-@@ -1204,8 +1212,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
+@@ -1204,8 +1212,7 @@
                 * Yes, this sense key/ASC combination shouldn't
                 * occur here.  It's characteristic of these devices.
                 */
@@ -334914,7 +334775,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
                                sshdr.asc == 0x28) {
                        if (!spintime) {
                                spintime_expire = jiffies + 5 * HZ;
-@@ -1429,27 +1436,21 @@ got_data:
+@@ -1429,27 +1436,21 @@
                 */
                sector_size = 512;
        }
@@ -334930,15 +334791,14 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
 -              sector_t sz = (sdkp->capacity/2) * (hard_sector/256);
 -              struct request_queue *queue = sdp->request_queue;
 -              sector_t mb = sz;
--
++              char cap_str_2[10], cap_str_10[10];
++              u64 sz = sdkp->capacity << ffz(~sector_size);
 -              blk_queue_hardsect_size(queue, hard_sector);
 -              /* avoid 64-bit division on 32-bit platforms */
 -              sector_div(sz, 625);
 -              mb -= sz - 974;
 -              sector_div(mb, 1950);
-+              char cap_str_2[10], cap_str_10[10];
-+              u64 sz = sdkp->capacity << ffz(~sector_size);
-+
 +              string_get_size(sz, STRING_UNITS_2, cap_str_2,
 +                              sizeof(cap_str_2));
 +              string_get_size(sz, STRING_UNITS_10, cap_str_10,
@@ -334953,7 +334813,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
        }
  
        /* Rescale capacity to 512-byte units */
-@@ -1809,7 +1810,9 @@ static int sd_probe(struct device *dev)
+@@ -1809,7 +1810,9 @@
                if (!ida_pre_get(&sd_index_ida, GFP_KERNEL))
                        goto out_put;
  
@@ -334963,7 +334823,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
        } while (error == -EAGAIN);
  
        if (error)
-@@ -1826,11 +1829,12 @@ static int sd_probe(struct device *dev)
+@@ -1826,11 +1829,12 @@
        sdkp->openers = 0;
        sdkp->previous_state = 1;
  
@@ -334979,7 +334839,7 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
        }
  
        device_initialize(&sdkp->dev);
-@@ -1883,7 +1887,9 @@ static int sd_probe(struct device *dev)
+@@ -1883,7 +1887,9 @@
        return 0;
  
   out_free_index:
@@ -334989,16 +334849,16 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
   out_put:
        put_disk(gd);
   out_free:
-@@ -1907,6 +1913,8 @@ static int sd_remove(struct device *dev)
+@@ -1906,6 +1912,8 @@
+ static int sd_remove(struct device *dev)
  {
        struct scsi_disk *sdkp = dev_get_drvdata(dev);
-+      blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
 +
++      blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
        device_del(&sdkp->dev);
        del_gendisk(sdkp->disk);
-       sd_shutdown(dev);
-@@ -1933,7 +1941,9 @@ static void scsi_disk_release(struct dev
+@@ -1933,7 +1941,9 @@
        struct scsi_disk *sdkp = to_scsi_disk(dev);
        struct gendisk *disk = sdkp->disk;
        
@@ -335008,10 +334868,10 @@ diff -purN linux-2.6.27/drivers/scsi/sd.c linux-2.6.27.19-5.1/drivers/scsi/sd.c
  
        disk->private_data = NULL;
        put_disk(disk);
-diff -purN linux-2.6.27/drivers/scsi/sg.c linux-2.6.27.19-5.1/drivers/scsi/sg.c
---- linux-2.6.27/drivers/scsi/sg.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sg.c      2009-03-25 16:11:14.000000000 +0000
-@@ -1097,7 +1097,7 @@ sg_ioctl(struct inode *inode, struct fil
+diff -r 9608d5473017 drivers/scsi/sg.c
+--- a/drivers/scsi/sg.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sg.c        Wed May 06 16:56:35 2009 +0100
+@@ -1097,7 +1097,7 @@
        case BLKTRACESETUP:
                return blk_trace_setup(sdp->device->request_queue,
                                       sdp->disk->disk_name,
@@ -335020,10 +334880,10 @@ diff -purN linux-2.6.27/drivers/scsi/sg.c linux-2.6.27.19-5.1/drivers/scsi/sg.c
                                       (char *)arg);
        case BLKTRACESTART:
                return blk_trace_startstop(sdp->device->request_queue, 1);
-diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
---- linux-2.6.27/drivers/scsi/sr.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sr.c      2009-03-25 16:11:17.000000000 +0000
-@@ -331,7 +331,7 @@ static int sr_done(struct scsi_cmnd *SCp
+diff -r 9608d5473017 drivers/scsi/sr.c
+--- a/drivers/scsi/sr.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sr.c        Wed May 06 16:56:35 2009 +0100
+@@ -331,7 +331,7 @@
  
  static int sr_prep_fn(struct request_queue *q, struct request *rq)
  {
@@ -335032,7 +334892,7 @@ diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
        struct scsi_cd *cd;
        struct scsi_cmnd *SCpnt;
        struct scsi_device *sdp = q->queuedata;
-@@ -461,7 +461,6 @@ static int sr_prep_fn(struct request_que
+@@ -461,7 +461,6 @@
        SCpnt->transfersize = cd->device->sector_size;
        SCpnt->underflow = this_count << 9;
        SCpnt->allowed = MAX_RETRIES;
@@ -335040,7 +334900,7 @@ diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
  
        /*
         * This indicates that the command is ready from our end to be
-@@ -620,6 +619,8 @@ static int sr_probe(struct device *dev)
+@@ -620,6 +619,8 @@
        disk->fops = &sr_bdops;
        disk->flags = GENHD_FL_CD;
  
@@ -335049,7 +334909,7 @@ diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
        cd->device = sdev;
        cd->disk = disk;
        cd->driver = &sr_template;
-@@ -894,6 +895,7 @@ static int sr_remove(struct device *dev)
+@@ -894,6 +895,7 @@
  {
        struct scsi_cd *cd = dev_get_drvdata(dev);
  
@@ -335057,10 +334917,10 @@ diff -purN linux-2.6.27/drivers/scsi/sr.c linux-2.6.27.19-5.1/drivers/scsi/sr.c
        del_gendisk(cd->disk);
  
        mutex_lock(&sr_ref_mutex);
-diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
---- linux-2.6.27/drivers/scsi/st.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/st.c      2009-03-25 16:11:15.000000000 +0000
-@@ -613,7 +613,8 @@ static int cross_eof(struct scsi_tape * 
+diff -r 9608d5473017 drivers/scsi/st.c
+--- a/drivers/scsi/st.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/st.c        Wed May 06 16:56:36 2009 +0100
+@@ -613,7 +613,8 @@
                   tape_name(STp), forward ? "forward" : "backward"));
  
        SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
@@ -335070,7 +334930,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        if (!SRpnt)
                return (STp->buffer)->syscall_result;
  
-@@ -657,7 +658,8 @@ static int st_flush_write_buffer(struct 
+@@ -657,7 +658,8 @@
                cmd[4] = blks;
  
                SRpnt = st_do_scsi(NULL, STp, cmd, transfer, DMA_TO_DEVICE,
@@ -335080,7 +334940,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                if (!SRpnt)
                        return (STp->buffer)->syscall_result;
  
-@@ -987,7 +989,8 @@ static int check_tape(struct scsi_tape *
+@@ -987,7 +989,8 @@
                cmd[0] = READ_BLOCK_LIMITS;
  
                SRpnt = st_do_scsi(SRpnt, STp, cmd, 6, DMA_FROM_DEVICE,
@@ -335090,7 +334950,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                if (!SRpnt) {
                        retval = (STp->buffer)->syscall_result;
                        goto err_out;
-@@ -1014,7 +1017,8 @@ static int check_tape(struct scsi_tape *
+@@ -1014,7 +1017,8 @@
        cmd[4] = 12;
  
        SRpnt = st_do_scsi(SRpnt, STp, cmd, 12, DMA_FROM_DEVICE,
@@ -335100,7 +334960,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        if (!SRpnt) {
                retval = (STp->buffer)->syscall_result;
                goto err_out;
-@@ -1247,7 +1251,8 @@ static int st_flush(struct file *filp, f
+@@ -1247,7 +1251,8 @@
                cmd[4] = 1 + STp->two_fm;
  
                SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
@@ -335110,7 +334970,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                if (!SRpnt) {
                        result = (STp->buffer)->syscall_result;
                        goto out;
-@@ -1634,7 +1639,8 @@ st_write(struct file *filp, const char _
+@@ -1634,7 +1639,8 @@
                cmd[4] = blks;
  
                SRpnt = st_do_scsi(SRpnt, STp, cmd, transfer, DMA_TO_DEVICE,
@@ -335120,7 +334980,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                if (!SRpnt) {
                        retval = STbp->syscall_result;
                        goto out;
-@@ -1804,7 +1810,8 @@ static long read_tape(struct scsi_tape *
+@@ -1804,7 +1810,8 @@
  
        SRpnt = *aSRpnt;
        SRpnt = st_do_scsi(SRpnt, STp, cmd, bytes, DMA_FROM_DEVICE,
@@ -335130,7 +334990,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        release_buffering(STp, 1);
        *aSRpnt = SRpnt;
        if (!SRpnt)
-@@ -2213,7 +2220,8 @@ static int st_set_options(struct scsi_ta
+@@ -2213,7 +2220,8 @@
                        DEBC( printk(KERN_INFO "%s: Long timeout set to %d seconds.\n", name,
                               (value & ~MT_ST_SET_LONG_TIMEOUT)));
                } else {
@@ -335140,7 +335000,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                        DEBC( printk(KERN_INFO "%s: Normal timeout set to %d seconds.\n",
                                name, value) );
                }
-@@ -2321,7 +2329,7 @@ static int read_mode_page(struct scsi_ta
+@@ -2321,7 +2329,7 @@
        cmd[4] = 255;
  
        SRpnt = st_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE,
@@ -335149,7 +335009,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        if (SRpnt == NULL)
                return (STp->buffer)->syscall_result;
  
-@@ -2352,7 +2360,7 @@ static int write_mode_page(struct scsi_t
+@@ -2352,7 +2360,7 @@
        (STp->buffer)->b_data[pgo + MP_OFF_PAGE_NBR] &= MP_MSK_PAGE_NBR;
  
        SRpnt = st_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_TO_DEVICE,
@@ -335158,7 +335018,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        if (SRpnt == NULL)
                return (STp->buffer)->syscall_result;
  
-@@ -2464,7 +2472,7 @@ static int do_load_unload(struct scsi_ta
+@@ -2464,7 +2472,7 @@
        }
        if (STp->immediate) {
                cmd[1] = 1;     /* Don't wait for completion */
@@ -335167,7 +335027,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        }
        else
                timeout = STp->long_timeout;
-@@ -2638,7 +2646,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2638,7 +2646,7 @@
                cmd[2] = (arg >> 16);
                cmd[3] = (arg >> 8);
                cmd[4] = arg;
@@ -335176,7 +335036,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                  DEBC(
                       if (cmd_in == MTWEOF)
                                 printk(ST_DEB_MSG "%s: Writing %d filemarks.\n", name,
-@@ -2656,7 +2664,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2656,7 +2664,7 @@
                cmd[0] = REZERO_UNIT;
                if (STp->immediate) {
                        cmd[1] = 1;     /* Don't wait for completion */
@@ -335185,7 +335045,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                }
                  DEBC(printk(ST_DEB_MSG "%s: Rewinding tape.\n", name));
                fileno = blkno = at_sm = 0;
-@@ -2669,7 +2677,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2669,7 +2677,7 @@
                cmd[0] = START_STOP;
                if (STp->immediate) {
                        cmd[1] = 1;     /* Don't wait for completion */
@@ -335194,7 +335054,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                }
                cmd[4] = 3;
                  DEBC(printk(ST_DEB_MSG "%s: Retensioning tape.\n", name));
-@@ -2702,7 +2710,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2702,7 +2710,7 @@
                cmd[1] = (arg ? 1 : 0); /* Long erase with non-zero argument */
                if (STp->immediate) {
                        cmd[1] |= 2;    /* Don't wait for completion */
@@ -335203,7 +335063,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                }
                else
                        timeout = STp->long_timeout * 8;
-@@ -2754,7 +2762,7 @@ static int st_int_ioctl(struct scsi_tape
+@@ -2754,7 +2762,7 @@
                (STp->buffer)->b_data[9] = (ltmp >> 16);
                (STp->buffer)->b_data[10] = (ltmp >> 8);
                (STp->buffer)->b_data[11] = ltmp;
@@ -335212,7 +335072,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
                  DEBC(
                        if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK)
                                printk(ST_DEB_MSG
-@@ -2944,7 +2952,8 @@ static int get_location(struct scsi_tape
+@@ -2944,7 +2952,8 @@
                        scmd[1] = 1;
        }
        SRpnt = st_do_scsi(NULL, STp, scmd, 20, DMA_FROM_DEVICE,
@@ -335222,7 +335082,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        if (!SRpnt)
                return (STp->buffer)->syscall_result;
  
-@@ -3045,7 +3054,7 @@ static int set_location(struct scsi_tape
+@@ -3045,7 +3054,7 @@
        }
        if (STp->immediate) {
                scmd[1] |= 1;           /* Don't wait for completion */
@@ -335231,7 +335091,7 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        }
  
        SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,
-@@ -4028,7 +4037,7 @@ static int st_probe(struct device *dev)
+@@ -4028,7 +4037,7 @@
        tpnt->partition = 0;
        tpnt->new_partition = 0;
        tpnt->nbr_partitions = 0;
@@ -335240,10 +335100,10 @@ diff -purN linux-2.6.27/drivers/scsi/st.c linux-2.6.27.19-5.1/drivers/scsi/st.c
        tpnt->long_timeout = ST_LONG_TIMEOUT;
        tpnt->try_dio = try_direct_io && !SDp->host->unchecked_isa_dma;
  
-diff -purN linux-2.6.27/drivers/scsi/stex.c linux-2.6.27.19-5.1/drivers/scsi/stex.c
---- linux-2.6.27/drivers/scsi/stex.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/stex.c    2009-03-25 16:11:15.000000000 +0000
-@@ -477,7 +477,7 @@ stex_slave_config(struct scsi_device *sd
+diff -r 9608d5473017 drivers/scsi/stex.c
+--- a/drivers/scsi/stex.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/stex.c      Wed May 06 16:56:36 2009 +0100
+@@ -477,7 +477,7 @@
  {
        sdev->use_10_for_rw = 1;
        sdev->use_10_for_ms = 1;
@@ -335252,10 +335112,10 @@ diff -purN linux-2.6.27/drivers/scsi/stex.c linux-2.6.27.19-5.1/drivers/scsi/ste
        sdev->tagged_supported = 1;
  
        return 0;
-diff -purN linux-2.6.27/drivers/scsi/sun_esp.c linux-2.6.27.19-5.1/drivers/scsi/sun_esp.c
---- linux-2.6.27/drivers/scsi/sun_esp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sun_esp.c 2009-03-25 16:11:14.000000000 +0000
-@@ -611,6 +611,7 @@ static struct of_device_id esp_match[] =
+diff -r 9608d5473017 drivers/scsi/sun_esp.c
+--- a/drivers/scsi/sun_esp.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sun_esp.c   Wed May 06 16:56:36 2009 +0100
+@@ -611,6 +611,7 @@
  MODULE_DEVICE_TABLE(of, esp_match);
  
  static struct of_platform_driver esp_sbus_driver = {
@@ -335263,10 +335123,10 @@ diff -purN linux-2.6.27/drivers/scsi/sun_esp.c linux-2.6.27.19-5.1/drivers/scsi/
        .name           = "esp",
        .match_table    = esp_match,
        .probe          = esp_sbus_probe,
-diff -purN linux-2.6.27/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.27.19-5.1/drivers/scsi/sym53c8xx_2/sym_glue.c
---- linux-2.6.27/drivers/scsi/sym53c8xx_2/sym_glue.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/scsi/sym53c8xx_2/sym_glue.c    2009-03-25 16:11:15.000000000 +0000
-@@ -519,8 +519,8 @@ static int sym53c8xx_queue_command(struc
+diff -r 9608d5473017 drivers/scsi/sym53c8xx_2/sym_glue.c
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c      Wed May 06 16:56:36 2009 +0100
+@@ -519,8 +519,8 @@
         *  Shorten our settle_time if needed for 
         *  this command not to time out.
         */
@@ -335277,9 +335137,9 @@ diff -purN linux-2.6.27/drivers/scsi/sym53c8xx_2/sym_glue.c linux-2.6.27.19-5.1/
                tlimit -= SYM_CONF_TIMER_INTERVAL*2;
                if (time_after(np->s.settle_time, tlimit)) {
                        np->s.settle_time = tlimit;
-diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial/8250.c
---- linux-2.6.27/drivers/serial/8250.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250.c  2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/serial/8250.c
+--- a/drivers/serial/8250.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250.c    Wed May 06 16:56:36 2009 +0100
 @@ -43,6 +43,21 @@
  #include <asm/irq.h>
  
@@ -335302,16 +335162,16 @@ diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial
  
  /*
   * Configuration:
-@@ -84,6 +99,8 @@ static unsigned int nr_uarts = CONFIG_SE
+@@ -83,6 +98,8 @@
+ #ifdef CONFIG_SERIAL_8250_MANY_PORTS
  #define CONFIG_SERIAL_MANY_PORTS 1
  #endif
-+#define arch_8250_sysrq_via_ctrl_o(a,b) 0
 +
++#define arch_8250_sysrq_via_ctrl_o(a,b) 0
  /*
   * HUB6 is always on.  This will be removed once the header
-  * files have been cleaned.
-@@ -1294,7 +1311,11 @@ receive_chars(struct uart_8250_port *up,
+@@ -1294,7 +1311,11 @@
  
        do {
                if (likely(lsr & UART_LSR_DR))
@@ -335323,7 +335183,7 @@ diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial
                else
                        /*
                         * Intel 82571 has a Serial Over Lan device that will
-@@ -1304,6 +1325,20 @@ receive_chars(struct uart_8250_port *up,
+@@ -1304,6 +1325,20 @@
                         * just force the read character to be 0
                         */
                        ch = 0;
@@ -335344,7 +335204,7 @@ diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial
  
                flag = TTY_NORMAL;
                up->port.icount.rx++;
-@@ -2561,7 +2596,7 @@ serial8250_console_write(struct console 
+@@ -2561,7 +2596,7 @@
        if (up->port.sysrq) {
                /* serial8250_handle_port() already took the lock */
                locked = 0;
@@ -335353,10 +335213,11 @@ diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial
                locked = spin_trylock(&up->port.lock);
        } else
                spin_lock(&up->port.lock);
-@@ -2619,6 +2654,30 @@ static int __init serial8250_console_set
+@@ -2618,6 +2653,30 @@
+       port = &serial8250_ports[co->index].port;
        if (!port->iobase && !port->membase)
                return -ENODEV;
++
 +#ifdef        CONFIG_KDB
 +      /*
 +       * Remember the line number of the first serial
@@ -335380,26 +335241,25 @@ diff -purN linux-2.6.27/drivers/serial/8250.c linux-2.6.27.19-5.1/drivers/serial
 +              }
 +      }
 +#endif        /* CONFIG_KDB */
-+
        if (options)
                uart_parse_options(options, &baud, &parity, &bits, &flow);
-diff -purN linux-2.6.27/drivers/serial/8250_early.c linux-2.6.27.19-5.1/drivers/serial/8250_early.c
---- linux-2.6.27/drivers/serial/8250_early.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250_early.c    2009-03-25 16:11:13.000000000 +0000
-@@ -38,6 +38,11 @@
+diff -r 9608d5473017 drivers/serial/8250_early.c
+--- a/drivers/serial/8250_early.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250_early.c      Wed May 06 16:56:36 2009 +0100
+@@ -37,6 +37,11 @@
+ #include <asm/pgtable.h>
  #include <asm/fixmap.h>
  #endif
++
 +#ifdef        CONFIG_KDB
 +#include <linux/kdb.h>
 +static int  kdb_serial_line = -1;
 +#endif        /* CONFIG_KDB */
-+
  struct early_serial8250_device {
        struct uart_port port;
-       char options[16];               /* e.g., 115200n8 */
-@@ -231,6 +236,30 @@ int __init setup_early_serial8250_consol
+@@ -231,6 +236,30 @@
  
        register_console(&early_serial8250_console);
  
@@ -335430,10 +335290,10 @@ diff -purN linux-2.6.27/drivers/serial/8250_early.c linux-2.6.27.19-5.1/drivers/
        return 0;
  }
  
-diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/serial/8250_pci.c
---- linux-2.6.27/drivers/serial/8250_pci.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/8250_pci.c      2009-03-25 16:11:13.000000000 +0000
-@@ -599,6 +599,10 @@ static int pci_netmos_init(struct pci_de
+diff -r 9608d5473017 drivers/serial/8250_pci.c
+--- a/drivers/serial/8250_pci.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/8250_pci.c        Wed May 06 16:56:36 2009 +0100
+@@ -599,6 +599,10 @@
        /* subdevice 0x00PS means <P> parallel, <S> serial */
        unsigned int num_serial = dev->subsystem_device & 0xf;
  
@@ -335444,7 +335304,7 @@ diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/se
        if (num_serial == 0)
                return -ENODEV;
        return num_serial;
-@@ -766,6 +770,8 @@ pci_default_setup(struct serial_private 
+@@ -766,6 +770,8 @@
  #define PCI_SUBDEVICE_ID_OCTPRO422    0x0208
  #define PCI_SUBDEVICE_ID_POCTAL232    0x0308
  #define PCI_SUBDEVICE_ID_POCTAL422    0x0408
@@ -335453,7 +335313,7 @@ diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/se
  
  /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
  #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584       0x1584
-@@ -2051,6 +2057,10 @@ static int pciserial_resume_one(struct p
+@@ -2051,6 +2057,10 @@
  #endif
  
  static struct pci_device_id serial_pci_tbl[] = {
@@ -335464,7 +335324,7 @@ diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/se
        {       PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
                PCI_SUBVENDOR_ID_CONNECT_TECH,
                PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
-@@ -2190,6 +2200,9 @@ static struct pci_device_id serial_pci_t
+@@ -2190,6 +2200,9 @@
        {       PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_b2_8_115200 },
@@ -335474,17 +335334,17 @@ diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/se
        {       PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_b2_8_115200 },
-@@ -2291,6 +2304,9 @@ static struct pci_device_id serial_pci_t
+@@ -2290,6 +2303,9 @@
+                * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
                 * For now just used the hex ID 0x950a.
                 */
-       {       PCI_VENDOR_ID_OXSEMI, 0x950a,
++      {       PCI_VENDOR_ID_OXSEMI, 0x950a,
 +              PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL, 0, 0,
 +              pbn_b0_2_115200 },
-+      {       PCI_VENDOR_ID_OXSEMI, 0x950a,
+       {       PCI_VENDOR_ID_OXSEMI, 0x950a,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_b0_2_1130000 },
-       {       PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
-@@ -2843,6 +2859,10 @@ static struct pci_device_id serial_pci_t
+@@ -2843,6 +2859,10 @@
                0,
                pbn_b0_8_115200 },
  
@@ -335495,10 +335355,10 @@ diff -purN linux-2.6.27/drivers/serial/8250_pci.c linux-2.6.27.19-5.1/drivers/se
        /*
         * These entries match devices with class COMMUNICATION_SERIAL,
         * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
-diff -purN linux-2.6.27/drivers/serial/Kconfig linux-2.6.27.19-5.1/drivers/serial/Kconfig
---- linux-2.6.27/drivers/serial/Kconfig        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/Kconfig 2009-03-25 16:11:13.000000000 +0000
-@@ -10,6 +10,7 @@ menu "Serial drivers"
+diff -r 9608d5473017 drivers/serial/Kconfig
+--- a/drivers/serial/Kconfig   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/Kconfig   Wed May 06 16:56:36 2009 +0100
+@@ -10,6 +10,7 @@
  config SERIAL_8250
        tristate "8250/16550 and compatible serial support"
        depends on (BROKEN || !SPARC)
@@ -335506,10 +335366,10 @@ diff -purN linux-2.6.27/drivers/serial/Kconfig linux-2.6.27.19-5.1/drivers/seria
        select SERIAL_CORE
        ---help---
          This selects whether you want to include the driver for the standard
-diff -purN linux-2.6.27/drivers/serial/cpm_uart/cpm_uart_core.c linux-2.6.27.19-5.1/drivers/serial/cpm_uart/cpm_uart_core.c
---- linux-2.6.27/drivers/serial/cpm_uart/cpm_uart_core.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/cpm_uart/cpm_uart_core.c        2009-03-25 16:11:13.000000000 +0000
-@@ -1359,6 +1359,7 @@ static struct of_device_id cpm_uart_matc
+diff -r 9608d5473017 drivers/serial/cpm_uart/cpm_uart_core.c
+--- a/drivers/serial/cpm_uart/cpm_uart_core.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/cpm_uart/cpm_uart_core.c  Wed May 06 16:56:36 2009 +0100
+@@ -1359,6 +1359,7 @@
  };
  
  static struct of_platform_driver cpm_uart_driver = {
@@ -335517,22 +335377,22 @@ diff -purN linux-2.6.27/drivers/serial/cpm_uart/cpm_uart_core.c linux-2.6.27.19-
        .name = "cpm_uart",
        .match_table = cpm_uart_match,
        .probe = cpm_uart_probe,
-diff -purN linux-2.6.27/drivers/serial/jsm/jsm_tty.c linux-2.6.27.19-5.1/drivers/serial/jsm/jsm_tty.c
---- linux-2.6.27/drivers/serial/jsm/jsm_tty.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/jsm/jsm_tty.c   2009-03-25 16:11:13.000000000 +0000
-@@ -161,6 +161,11 @@ static void jsm_tty_stop_rx(struct uart_
-       channel->ch_bd->bd_ops->disable_receiver(channel);
- }
+diff -r 9608d5473017 drivers/serial/jsm/jsm_tty.c
+--- a/drivers/serial/jsm/jsm_tty.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/jsm/jsm_tty.c     Wed May 06 16:56:36 2009 +0100
+@@ -159,6 +159,11 @@
+       struct jsm_channel *channel = (struct jsm_channel *)port;
  
+       channel->ch_bd->bd_ops->disable_receiver(channel);
++}
++
 +static void jsm_tty_enable_ms(struct uart_port *port)
 +{
 +      /* Nothing needed */
-+}
-+
+ }
  static void jsm_tty_break(struct uart_port *port, int break_state)
- {
-       unsigned long lock_flags;
-@@ -345,6 +350,7 @@ static struct uart_ops jsm_ops = {
+@@ -345,6 +350,7 @@
        .start_tx       = jsm_tty_start_tx,
        .send_xchar     = jsm_tty_send_xchar,
        .stop_rx        = jsm_tty_stop_rx,
@@ -335540,10 +335400,10 @@ diff -purN linux-2.6.27/drivers/serial/jsm/jsm_tty.c linux-2.6.27.19-5.1/drivers
        .break_ctl      = jsm_tty_break,
        .startup        = jsm_tty_open,
        .shutdown       = jsm_tty_close,
-diff -purN linux-2.6.27/drivers/serial/mpc52xx_uart.c linux-2.6.27.19-5.1/drivers/serial/mpc52xx_uart.c
---- linux-2.6.27/drivers/serial/mpc52xx_uart.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/mpc52xx_uart.c  2009-03-25 16:11:13.000000000 +0000
-@@ -1391,6 +1391,7 @@ mpc52xx_uart_of_enumerate(void)
+diff -r 9608d5473017 drivers/serial/mpc52xx_uart.c
+--- a/drivers/serial/mpc52xx_uart.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/mpc52xx_uart.c    Wed May 06 16:56:36 2009 +0100
+@@ -1391,6 +1391,7 @@
  MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
  
  static struct of_platform_driver mpc52xx_uart_of_driver = {
@@ -335551,9 +335411,9 @@ diff -purN linux-2.6.27/drivers/serial/mpc52xx_uart.c linux-2.6.27.19-5.1/driver
        .match_table    = mpc52xx_uart_of_match,
        .probe          = mpc52xx_uart_of_probe,
        .remove         = mpc52xx_uart_of_remove,
-diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/serial/sn_console.c
---- linux-2.6.27/drivers/serial/sn_console.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sn_console.c    2009-03-25 16:11:13.000000000 +0000
+diff -r 9608d5473017 drivers/serial/sn_console.c
+--- a/drivers/serial/sn_console.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sn_console.c      Wed May 06 16:56:36 2009 +0100
 @@ -48,6 +48,22 @@
  #include <linux/delay.h> /* for mdelay */
  #include <linux/miscdevice.h>
@@ -335577,7 +335437,7 @@ diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/
  
  #include <asm/io.h>
  #include <asm/sn/simulator.h>
-@@ -485,6 +501,26 @@ sn_receive_chars(struct sn_cons_port *po
+@@ -485,6 +501,26 @@
                               "obtaining data from the console (0x%0x)\n", ch);
                        break;
                }
@@ -335604,7 +335464,7 @@ diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/
  #ifdef CONFIG_MAGIC_SYSRQ
                  if (sysrq_requested) {
                          unsigned long sysrq_timeout = sysrq_requested + HZ*5;
-@@ -1008,6 +1044,15 @@ sn_sal_console_write(struct console *co,
+@@ -1008,6 +1044,15 @@
   */
  static int sn_sal_console_setup(struct console *co, char *options)
  {
@@ -335620,7 +335480,7 @@ diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/
        return 0;
  }
  
-@@ -1083,3 +1128,31 @@ static int __init sn_sal_serial_console_
+@@ -1083,3 +1128,31 @@
  }
  
  console_initcall(sn_sal_serial_console_init);
@@ -335652,10 +335512,10 @@ diff -purN linux-2.6.27/drivers/serial/sn_console.c linux-2.6.27.19-5.1/drivers/
 +              return 0;
 +}
 +#endif /* CONFIG_KDB */
-diff -purN linux-2.6.27/drivers/serial/sunhv.c linux-2.6.27.19-5.1/drivers/serial/sunhv.c
---- linux-2.6.27/drivers/serial/sunhv.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunhv.c 2009-03-25 16:11:13.000000000 +0000
-@@ -630,6 +630,7 @@ static struct of_device_id hv_match[] = 
+diff -r 9608d5473017 drivers/serial/sunhv.c
+--- a/drivers/serial/sunhv.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunhv.c   Wed May 06 16:56:36 2009 +0100
+@@ -630,6 +630,7 @@
  MODULE_DEVICE_TABLE(of, hv_match);
  
  static struct of_platform_driver hv_driver = {
@@ -335663,10 +335523,10 @@ diff -purN linux-2.6.27/drivers/serial/sunhv.c linux-2.6.27.19-5.1/drivers/seria
        .name           = "hv",
        .match_table    = hv_match,
        .probe          = hv_probe,
-diff -purN linux-2.6.27/drivers/serial/sunsab.c linux-2.6.27.19-5.1/drivers/serial/sunsab.c
---- linux-2.6.27/drivers/serial/sunsab.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunsab.c        2009-03-25 16:11:13.000000000 +0000
-@@ -1091,6 +1091,7 @@ static struct of_device_id sab_match[] =
+diff -r 9608d5473017 drivers/serial/sunsab.c
+--- a/drivers/serial/sunsab.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunsab.c  Wed May 06 16:56:36 2009 +0100
+@@ -1091,6 +1091,7 @@
  MODULE_DEVICE_TABLE(of, sab_match);
  
  static struct of_platform_driver sab_driver = {
@@ -335674,10 +335534,10 @@ diff -purN linux-2.6.27/drivers/serial/sunsab.c linux-2.6.27.19-5.1/drivers/seri
        .name           = "sab",
        .match_table    = sab_match,
        .probe          = sab_probe,
-diff -purN linux-2.6.27/drivers/serial/sunsu.c linux-2.6.27.19-5.1/drivers/serial/sunsu.c
---- linux-2.6.27/drivers/serial/sunsu.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunsu.c 2009-03-25 16:11:13.000000000 +0000
-@@ -1522,6 +1522,7 @@ static struct of_device_id su_match[] = 
+diff -r 9608d5473017 drivers/serial/sunsu.c
+--- a/drivers/serial/sunsu.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunsu.c   Wed May 06 16:56:36 2009 +0100
+@@ -1522,6 +1522,7 @@
  MODULE_DEVICE_TABLE(of, su_match);
  
  static struct of_platform_driver su_driver = {
@@ -335685,10 +335545,10 @@ diff -purN linux-2.6.27/drivers/serial/sunsu.c linux-2.6.27.19-5.1/drivers/seria
        .name           = "su",
        .match_table    = su_match,
        .probe          = su_probe,
-diff -purN linux-2.6.27/drivers/serial/sunzilog.c linux-2.6.27.19-5.1/drivers/serial/sunzilog.c
---- linux-2.6.27/drivers/serial/sunzilog.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/serial/sunzilog.c      2009-03-25 16:11:13.000000000 +0000
-@@ -1489,6 +1489,7 @@ static struct of_device_id zs_match[] = 
+diff -r 9608d5473017 drivers/serial/sunzilog.c
+--- a/drivers/serial/sunzilog.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/serial/sunzilog.c        Wed May 06 16:56:36 2009 +0100
+@@ -1489,6 +1489,7 @@
  MODULE_DEVICE_TABLE(of, zs_match);
  
  static struct of_platform_driver zs_driver = {
@@ -335696,36 +335556,36 @@ diff -purN linux-2.6.27/drivers/serial/sunzilog.c linux-2.6.27.19-5.1/drivers/se
        .name           = "zs",
        .match_table    = zs_match,
        .probe          = zs_probe,
-diff -purN linux-2.6.27/drivers/spi/pxa2xx_spi.c linux-2.6.27.19-5.1/drivers/spi/pxa2xx_spi.c
---- linux-2.6.27/drivers/spi/pxa2xx_spi.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/spi/pxa2xx_spi.c       2009-03-25 16:11:23.000000000 +0000
-@@ -348,21 +348,21 @@ static int map_dma_buffers(struct driver
+diff -r 9608d5473017 drivers/spi/pxa2xx_spi.c
+--- a/drivers/spi/pxa2xx_spi.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/spi/pxa2xx_spi.c Wed May 06 16:56:36 2009 +0100
+@@ -348,21 +348,21 @@
        } else
                drv_data->tx_map_len = drv_data->len;
  
--      /* Stream map the rx buffer */
--      drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
++      /* Stream map the tx buffer. Always do DMA_TO_DEVICE first
++       * so we flush the cache *before* invalidating it, in case
++       * the tx and rx buffers overlap.
++       */
++      drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
++                                      drv_data->tx_map_len, DMA_TO_DEVICE);
++      if (dma_mapping_error(dev, drv_data->tx_dma))
++              return 0;
++
+       /* Stream map the rx buffer */
+       drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
 -                                              drv_data->rx_map_len,
 -                                              DMA_FROM_DEVICE);
 -      if (dma_mapping_error(dev, drv_data->rx_dma))
 -              return 0;
 -
 -      /* Stream map the tx buffer */
-+      /* Stream map the tx buffer. Always do DMA_TO_DEVICE first
-+       * so we flush the cache *before* invalidating it, in case
-+       * the tx and rx buffers overlap.
-+       */
-       drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
+-      drv_data->tx_dma = dma_map_single(dev, drv_data->tx,
 -                                              drv_data->tx_map_len,
 -                                              DMA_TO_DEVICE);
-+                                      drv_data->tx_map_len, DMA_TO_DEVICE);
-+      if (dma_mapping_error(dev, drv_data->tx_dma))
-+              return 0;
+-
 -      if (dma_mapping_error(dev, drv_data->tx_dma)) {
 -              dma_unmap_single(dev, drv_data->rx_dma,
-+      /* Stream map the rx buffer */
-+      drv_data->rx_dma = dma_map_single(dev, drv_data->rx,
                                        drv_data->rx_map_len, DMA_FROM_DEVICE);
 +      if (dma_mapping_error(dev, drv_data->rx_dma)) {
 +              dma_unmap_single(dev, drv_data->tx_dma,
@@ -335733,10 +335593,10 @@ diff -purN linux-2.6.27/drivers/spi/pxa2xx_spi.c linux-2.6.27.19-5.1/drivers/spi
                return 0;
        }
  
-diff -purN linux-2.6.27/drivers/spi/spidev.c linux-2.6.27.19-5.1/drivers/spi/spidev.c
---- linux-2.6.27/drivers/spi/spidev.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/spi/spidev.c   2009-03-25 16:11:23.000000000 +0000
-@@ -598,7 +598,9 @@ static int spidev_probe(struct spi_devic
+diff -r 9608d5473017 drivers/spi/spidev.c
+--- a/drivers/spi/spidev.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/spi/spidev.c     Wed May 06 16:56:36 2009 +0100
+@@ -598,7 +598,9 @@
        }
        mutex_unlock(&device_list_lock);
  
@@ -335747,9 +335607,9 @@ diff -purN linux-2.6.27/drivers/spi/spidev.c linux-2.6.27.19-5.1/drivers/spi/spi
                kfree(spidev);
  
        return status;
-diff -purN linux-2.6.27/drivers/staging/Kconfig linux-2.6.27.19-5.1/drivers/staging/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/Kconfig        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/Kconfig  Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,60 @@
 +menuconfig STAGING
 +      bool "Staging drivers"
@@ -335811,9 +335671,9 @@ diff -purN linux-2.6.27/drivers/staging/Kconfig linux-2.6.27.19-5.1/drivers/stag
 +source "drivers/staging/rtl8187se/Kconfig"
 +
 +endif # STAGING
-diff -purN linux-2.6.27/drivers/staging/Makefile linux-2.6.27.19-5.1/drivers/staging/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/Makefile       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/Makefile Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,22 @@
 +# Makefile for staging directory
 +
@@ -335837,18 +335697,18 @@ diff -purN linux-2.6.27/drivers/staging/Makefile linux-2.6.27.19-5.1/drivers/sta
 +obj-$(CONFIG_RT3070)          += rt3070/
 +obj-$(CONFIG_BENET)           += benet/
 +obj-$(CONFIG_RTL8187SE)               += rtl8187se/
-diff -purN linux-2.6.27/drivers/staging/agnx/Kconfig linux-2.6.27.19-5.1/drivers/staging/agnx/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/Kconfig   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/Kconfig     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,5 @@
 +config AGNX
 +      tristate "Wireless Airgo AGNX support"
 +      depends on WLAN_80211 && MAC80211
 +      ---help---
 +        This is an experimental driver for Airgo AGNX00 wireless chip.
-diff -purN linux-2.6.27/drivers/staging/agnx/Makefile linux-2.6.27.19-5.1/drivers/staging/agnx/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/Makefile  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/Makefile    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,8 @@
 +obj-$(CONFIG_AGNX)    += agnx.o
 +
@@ -335858,9 +335718,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/Makefile linux-2.6.27.19-5.1/driver
 +              table.o \
 +              sta.o   \
 +              phy.o
-diff -purN linux-2.6.27/drivers/staging/agnx/TODO linux-2.6.27.19-5.1/drivers/staging/agnx/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/TODO      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/TODO        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,22 @@
 +2008 7/18
 +
@@ -335884,9 +335744,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/TODO linux-2.6.27.19-5.1/drivers/st
 +11: Guess the card support HW_MULTICAST_FILTER
 +12: The tx process should be implment atomic?
 +13: Using mac80211 function to control the TX&RX LED.
-diff -purN linux-2.6.27/drivers/staging/agnx/agnx.h linux-2.6.27.19-5.1/drivers/staging/agnx/agnx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/agnx.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/agnx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/agnx.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,156 @@
 +#ifndef AGNX_H_
 +#define AGNX_H_
@@ -336044,9 +335904,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/agnx.h linux-2.6.27.19-5.1/drivers/
 +
 +
 +#endif /* AGNX_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/debug.h linux-2.6.27.19-5.1/drivers/staging/agnx/debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/debug.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/debug.h     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,418 @@
 +#ifndef AGNX_DEBUG_H_
 +#define AGNX_DEBUG_H_
@@ -336466,9 +336326,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/debug.h linux-2.6.27.19-5.1/drivers
 +}
 +
 +#endif /* AGNX_DEBUG_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/pci.c linux-2.6.27.19-5.1/drivers/staging/agnx/pci.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/pci.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/pci.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/pci.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,650 @@
 +/**
 + * Airgo MIMO wireless driver
@@ -337120,9 +336980,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/pci.c linux-2.6.27.19-5.1/drivers/s
 +
 +module_init(agnx_pci_init);
 +module_exit(agnx_pci_exit);
-diff -purN linux-2.6.27/drivers/staging/agnx/phy.c linux-2.6.27.19-5.1/drivers/staging/agnx/phy.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/phy.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/phy.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/phy.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,958 @@
 +/**
 + * Airgo MIMO wireless driver
@@ -338082,9 +337942,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/phy.c linux-2.6.27.19-5.1/drivers/s
 +{
 +      receiver_bssid_set(priv, bssid);
 +}
-diff -purN linux-2.6.27/drivers/staging/agnx/phy.h linux-2.6.27.19-5.1/drivers/staging/agnx/phy.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/phy.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/phy.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/phy.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,409 @@
 +#ifndef AGNX_PHY_H_
 +#define AGNX_PHY_H_
@@ -338495,9 +338355,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/phy.h linux-2.6.27.19-5.1/drivers/s
 +void calibrate_antenna_period(unsigned long data);
 +
 +#endif /* AGNX_PHY_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/rf.c linux-2.6.27.19-5.1/drivers/staging/agnx/rf.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/rf.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/rf.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/rf.c        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,894 @@
 +/**
 + * Airgo MIMO wireless driver
@@ -339393,9 +339253,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/rf.c linux-2.6.27.19-5.1/drivers/st
 +      radio_channel_set(priv, channel);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/agnx/sta.c linux-2.6.27.19-5.1/drivers/staging/agnx/sta.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/sta.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/sta.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/sta.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,219 @@
 +#include <linux/delay.h>
 +#include <linux/etherdevice.h>
@@ -339616,9 +339476,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/sta.c linux-2.6.27.19-5.1/drivers/s
 +} /* sta_descriptor_init */
 +
 +
-diff -purN linux-2.6.27/drivers/staging/agnx/sta.h linux-2.6.27.19-5.1/drivers/staging/agnx/sta.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/sta.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/sta.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/sta.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,222 @@
 +#ifndef AGNX_STA_H_
 +#define AGNX_STA_H_
@@ -339842,9 +339702,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/sta.h linux-2.6.27.19-5.1/drivers/s
 +void sta_init(struct agnx_priv *priv, unsigned int num);
 +
 +#endif /* AGNX_STA_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/table.c linux-2.6.27.19-5.1/drivers/staging/agnx/table.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/table.c   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/table.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/table.c     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,168 @@
 +#include <linux/pci.h>
 +#include <linux/delay.h>
@@ -340014,9 +339874,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/table.c linux-2.6.27.19-5.1/drivers
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/agnx/table.h linux-2.6.27.19-5.1/drivers/staging/agnx/table.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/table.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/table.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/table.h     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,10 @@
 +#ifndef AGNX_TABLE_H_
 +#define AGNX_TABLE_H_
@@ -340028,9 +339888,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/table.h linux-2.6.27.19-5.1/drivers
 +void tx_engine_lookup_tbl_init(struct agnx_priv *priv);
 +
 +#endif /* AGNX_TABLE_H_ */
-diff -purN linux-2.6.27/drivers/staging/agnx/xmit.c linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/xmit.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/xmit.c      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,819 @@
 +/**
 + * Airgo MIMO wireless driver
@@ -340851,9 +340711,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/xmit.c linux-2.6.27.19-5.1/drivers/
 +      else
 +              return __agnx_tx(priv, skb, &priv->txm);
 +}
-diff -purN linux-2.6.27/drivers/staging/agnx/xmit.h linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/agnx/xmit.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/agnx/xmit.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/agnx/xmit.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,250 @@
 +#ifndef AGNX_XMIT_H_
 +#define AGNX_XMIT_H_
@@ -341105,9 +340965,9 @@ diff -purN linux-2.6.27/drivers/staging/agnx/xmit.h linux-2.6.27.19-5.1/drivers/
 +void handle_other_irq(struct agnx_priv *priv);
 +int _agnx_tx(struct agnx_priv *priv, struct sk_buff *skb);
 +#endif /* AGNX_XMIT_H_ */
-diff -purN linux-2.6.27/drivers/staging/at76_usb/Kconfig linux-2.6.27.19-5.1/drivers/staging/at76_usb/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/Kconfig       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/Kconfig Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,8 @@
 +config USB_ATMEL
 +      tristate "Atmel at76c503/at76c505/at76c505a USB cards"
@@ -341117,20 +340977,20 @@ diff -purN linux-2.6.27/drivers/staging/at76_usb/Kconfig linux-2.6.27.19-5.1/dri
 +      ---help---
 +        Enable support for USB Wireless devices using Atmel at76c503,
 +        at76c505 or at76c505a chips.
-diff -purN linux-2.6.27/drivers/staging/at76_usb/Makefile linux-2.6.27.19-5.1/drivers/staging/at76_usb/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/Makefile      2009-03-25 16:11:11.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/at76_usb/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/Makefile        Wed May 06 16:56:36 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_USB_ATMEL)               += at76_usb.o
-diff -purN linux-2.6.27/drivers/staging/at76_usb/TODO linux-2.6.27.19-5.1/drivers/staging/at76_usb/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/TODO  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/TODO    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,2 @@
 +rewrite the driver to use the proper in-kernel wireless stack
 +instead of using its own.
-diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.c linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/at76_usb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/at76_usb.c      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,5559 @@
 +/*
 + * at76c503/at76c505 USB driver
@@ -346691,9 +346551,9 @@ diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.c linux-2.6.27.19-5.1/
 +MODULE_AUTHOR("Pavel Roskin <proski@gnu.org>");
 +MODULE_DESCRIPTION(DRIVER_DESC);
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.h linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/at76_usb/at76_usb.h    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/at76_usb/at76_usb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/at76_usb/at76_usb.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,619 @@
 +/*
 + * Copyright (c) 2002,2003 Oliver Kurth
@@ -347314,9 +347174,9 @@ diff -purN linux-2.6.27/drivers/staging/at76_usb/at76_usb.h linux-2.6.27.19-5.1/
 +#define MAX_PADDING_SIZE      53
 +
 +#endif                                /* _AT76_USB_H */
-diff -purN linux-2.6.27/drivers/staging/benet/Kconfig linux-2.6.27.19-5.1/drivers/staging/benet/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/Kconfig  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/Kconfig    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,7 @@
 +config BENET
 +      tristate "ServerEngines 10Gb NIC - BladeEngine"
@@ -347325,9 +347185,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/Kconfig linux-2.6.27.19-5.1/driver
 +      help
 +        This driver implements the NIC functionality for ServerEngines
 +        10Gb network adapter BladeEngine (EC 3210).
-diff -purN linux-2.6.27/drivers/staging/benet/MAINTAINERS linux-2.6.27.19-5.1/drivers/staging/benet/MAINTAINERS
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/MAINTAINERS      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/MAINTAINERS
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/MAINTAINERS        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,6 @@
 +SERVER ENGINES 10Gbe NIC - BLADE-ENGINE
 +P:    Subbu Seetharaman
@@ -347335,9 +347195,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/MAINTAINERS linux-2.6.27.19-5.1/dr
 +L:    netdev@vger.kernel.org
 +W:    http://www.serverengines.com
 +S:    Supported
-diff -purN linux-2.6.27/drivers/staging/benet/Makefile linux-2.6.27.19-5.1/drivers/staging/benet/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/Makefile   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,14 @@
 +#
 +# Makefile to build the network driver for ServerEngine's BladeEngine
@@ -347353,9 +347213,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/Makefile linux-2.6.27.19-5.1/drive
 +                      eq.o \
 +                      mpu.o \
 +                      eth.o
-diff -purN linux-2.6.27/drivers/staging/benet/TODO linux-2.6.27.19-5.1/drivers/staging/benet/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/TODO     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/TODO       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,7 @@
 +TODO:
 +      - fix minor checkpatch.pl issues
@@ -347364,9 +347224,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/TODO linux-2.6.27.19-5.1/drivers/s
 +
 +Please send all patches and questions to Subbu Seetharaman
 +<subbus@serverengines.com> and Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/benet/asyncmesg.h linux-2.6.27.19-5.1/drivers/staging/benet/asyncmesg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/asyncmesg.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/asyncmesg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/asyncmesg.h        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,98 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -347466,9 +347326,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/asyncmesg.h linux-2.6.27.19-5.1/dr
 +      u32 dw[4];
 +};
 +#endif /* __asyncmesg_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_cm.h linux-2.6.27.19-5.1/drivers/staging/benet/be_cm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_cm.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_cm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_cm.h    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -347604,9 +347464,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_cm.h linux-2.6.27.19-5.1/driver
 +};
 +
 +#endif /* __be_cm_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_common.h linux-2.6.27.19-5.1/drivers/staging/benet/be_common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_common.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_common.h        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,53 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -347661,9 +347521,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_common.h linux-2.6.27.19-5.1/dr
 +};
 +
 +#endif /* __be_common_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/be_ethtool.c linux-2.6.27.19-5.1/drivers/staging/benet/be_ethtool.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_ethtool.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_ethtool.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_ethtool.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,348 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -348013,9 +347873,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_ethtool.c linux-2.6.27.19-5.1/d
 +      .get_stats_count = be_get_stats_count,
 +      .get_ethtool_stats = be_get_ethtool_stats,
 +};
-diff -purN linux-2.6.27/drivers/staging/benet/be_init.c linux-2.6.27.19-5.1/drivers/staging/benet/be_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_init.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_init.c  Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,1381 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -349398,9 +349258,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_init.c linux-2.6.27.19-5.1/driv
 +}
 +
 +module_exit(be_exit_module);
-diff -purN linux-2.6.27/drivers/staging/benet/be_int.c linux-2.6.27.19-5.1/drivers/staging/benet/be_int.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_int.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_int.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_int.c   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,872 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -350274,9 +350134,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_int.c linux-2.6.27.19-5.1/drive
 +      update_eqd(adapter, pnob);
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/benet/be_netif.c linux-2.6.27.19-5.1/drivers/staging/benet/be_netif.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/be_netif.c       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/be_netif.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/be_netif.c Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,706 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -350984,9 +350844,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/be_netif.c linux-2.6.27.19-5.1/dri
 +      SET_ETHTOOL_OPS(netdev, &be_ethtool_ops);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/benet/benet.h linux-2.6.27.19-5.1/drivers/staging/benet/benet.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/benet.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/benet.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/benet.h    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,429 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -351417,9 +351277,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/benet.h linux-2.6.27.19-5.1/driver
 +void process_one_tx_compl(struct be_net_object *pnob, u32 end_idx);
 +
 +#endif /* _BENET_H_ */
-diff -purN linux-2.6.27/drivers/staging/benet/bestatus.h linux-2.6.27.19-5.1/drivers/staging/benet/bestatus.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/bestatus.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/bestatus.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/bestatus.h Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,103 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -351524,9 +351384,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/bestatus.h linux-2.6.27.19-5.1/dri
 +#define BE_STATUS_NO_MCC_WRB                 (0xE0070414L)
 +
 +#endif /* _BESTATUS_ */
-diff -purN linux-2.6.27/drivers/staging/benet/cev.h linux-2.6.27.19-5.1/drivers/staging/benet/cev.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/cev.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/cev.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/cev.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,243 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -351771,9 +351631,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/cev.h linux-2.6.27.19-5.1/drivers/
 +};
 +
 +#endif /* __cev_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/cq.c linux-2.6.27.19-5.1/drivers/staging/benet/cq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/cq.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/cq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/cq.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,211 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -351986,9 +351846,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/cq.c linux-2.6.27.19-5.1/drivers/s
 +      return BE_SUCCESS;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/benet/descriptors.h linux-2.6.27.19-5.1/drivers/staging/benet/descriptors.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/descriptors.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/descriptors.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/descriptors.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,71 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -352061,9 +351921,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/descriptors.h linux-2.6.27.19-5.1/
 +#define BCAST_MATCH        (63)       /* Broadcast match. */
 +
 +#endif /* __descriptors_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/doorbells.h linux-2.6.27.19-5.1/drivers/staging/benet/doorbells.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/doorbells.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/doorbells.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/doorbells.h        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,179 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -352244,9 +352104,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/doorbells.h linux-2.6.27.19-5.1/dr
 +};
 +
 +#endif /* __doorbells_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/ep.h linux-2.6.27.19-5.1/drivers/staging/benet/ep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/ep.h     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/ep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/ep.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,66 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -352314,9 +352174,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/ep.h linux-2.6.27.19-5.1/drivers/s
 +};
 +
 +#endif /* __ep_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/eq.c linux-2.6.27.19-5.1/drivers/staging/benet/eq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/eq.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/eq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/eq.c       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,299 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -352617,9 +352477,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/eq.c linux-2.6.27.19-5.1/drivers/s
 +      return status;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/benet/eth.c linux-2.6.27.19-5.1/drivers/staging/benet/eth.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/eth.c    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/eth.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/eth.c      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,1273 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -353894,9 +353754,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/eth.c linux-2.6.27.19-5.1/drivers/
 +      }
 +      return status;
 +}
-diff -purN linux-2.6.27/drivers/staging/benet/etx_context.h linux-2.6.27.19-5.1/drivers/staging/benet/etx_context.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/etx_context.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/etx_context.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/etx_context.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,55 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -353953,9 +353813,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/etx_context.h linux-2.6.27.19-5.1/
 +};
 +
 +#endif /* __etx_context_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/funcobj.c linux-2.6.27.19-5.1/drivers/staging/benet/funcobj.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/funcobj.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/funcobj.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/funcobj.c  Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,565 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -354522,9 +354382,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/funcobj.c linux-2.6.27.19-5.1/driv
 +      return status;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_common.h     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,222 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -354748,9 +354608,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common.h linux-2.6.27.19-5.1
 +#define BE_ASIC_REV_A1                  (2)
 +
 +#endif /* __fwcmd_common_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common_bmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_common_bmap.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_common_bmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_common_bmap.h        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,717 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -355469,9 +355329,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_common_bmap.h linux-2.6.27.1
 +} __packed;
 +
 +#endif /* __fwcmd_common_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_eth_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_eth_bmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_eth_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_eth_bmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_eth_bmap.h   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,280 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -355753,9 +355613,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_eth_bmap.h linux-2.6.27.19-5
 +} __packed;
 +
 +#endif /* __fwcmd_eth_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_hdr_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_hdr_bmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_hdr_bmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_hdr_bmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_hdr_bmap.h   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,54 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -355811,9 +355671,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_hdr_bmap.h linux-2.6.27.19-5
 +} __packed;
 +
 +#endif /* __fwcmd_hdr_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_mcc.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_mcc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_mcc.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_mcc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_mcc.h        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,94 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -355909,9 +355769,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_mcc.h linux-2.6.27.19-5.1/dr
 +};
 +
 +#endif /* __fwcmd_mcc_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_opcodes.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_opcodes.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_opcodes.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_opcodes.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_opcodes.h    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,244 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -356157,9 +356017,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_opcodes.h linux-2.6.27.19-5.
 +                                              the FWCMD  payload */
 +
 +#endif /* __fwcmd_opcodes_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_types_bmap.h linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_types_bmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/fwcmd_types_bmap.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/fwcmd_types_bmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/fwcmd_types_bmap.h Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,29 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -356190,9 +356050,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/fwcmd_types_bmap.h linux-2.6.27.19
 +} __packed;
 +
 +#endif /* __fwcmd_types_bmap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/host_struct.h linux-2.6.27.19-5.1/drivers/staging/benet/host_struct.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/host_struct.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/host_struct.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/host_struct.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,182 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -356376,9 +356236,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/host_struct.h linux-2.6.27.19-5.1/
 +};
 +
 +#endif /* __host_struct_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/hwlib.h linux-2.6.27.19-5.1/drivers/staging/benet/hwlib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/hwlib.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/hwlib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/hwlib.h    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,829 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -357209,9 +357069,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/hwlib.h linux-2.6.27.19-5.1/driver
 +void be_rd_to_pa_list(struct ring_desc *rd, struct PHYS_ADDR *pa_list,
 +                                              u32 max_num);
 +#endif /* __hwlib_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/mpu.c linux-2.6.27.19-5.1/drivers/staging/benet/mpu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu.c    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu.c      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,1364 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -358577,9 +358437,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/mpu.c linux-2.6.27.19-5.1/drivers/
 +
 +      return status;
 +}
-diff -purN linux-2.6.27/drivers/staging/benet/mpu.h linux-2.6.27.19-5.1/drivers/staging/benet/mpu.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,74 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -358655,9 +358515,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/mpu.h linux-2.6.27.19-5.1/drivers/
 +};
 +
 +#endif /* __mpu_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/mpu_context.h linux-2.6.27.19-5.1/drivers/staging/benet/mpu_context.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/mpu_context.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/mpu_context.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/mpu_context.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,46 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -358705,9 +358565,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/mpu_context.h linux-2.6.27.19-5.1/
 +};
 +
 +#endif /* __mpu_context_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/pcicfg.h linux-2.6.27.19-5.1/drivers/staging/benet/pcicfg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/pcicfg.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/pcicfg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/pcicfg.h   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,825 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -359534,9 +359394,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/pcicfg.h linux-2.6.27.19-5.1/drive
 +};
 +
 +#endif /* __pcicfg_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/post_codes.h linux-2.6.27.19-5.1/drivers/staging/benet/post_codes.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/post_codes.h     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/post_codes.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/post_codes.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,111 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -359649,9 +359509,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/post_codes.h linux-2.6.27.19-5.1/d
 +#define POST_FATAL_ERROR                (2147483648)
 +
 +#endif /* __post_codes_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/benet/regmap.h linux-2.6.27.19-5.1/drivers/staging/benet/regmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/benet/regmap.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/benet/regmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/benet/regmap.h   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + * Copyright (C) 2005 - 2008 ServerEngines
@@ -359721,9 +359581,9 @@ diff -purN linux-2.6.27/drivers/staging/benet/regmap.h linux-2.6.27.19-5.1/drive
 +};
 +
 +#endif /* __regmap_amap_h__ */
-diff -purN linux-2.6.27/drivers/staging/echo/Kconfig linux-2.6.27.19-5.1/drivers/staging/echo/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/Kconfig   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/Kconfig     Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,9 @@
 +config ECHO
 +      tristate "Line Echo Canceller support"
@@ -359734,14 +359594,14 @@ diff -purN linux-2.6.27/drivers/staging/echo/Kconfig linux-2.6.27.19-5.1/drivers
 +
 +        To compile this driver as a module, choose M here. The module
 +        will be called echo.
-diff -purN linux-2.6.27/drivers/staging/echo/Makefile linux-2.6.27.19-5.1/drivers/staging/echo/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/Makefile  2009-03-25 16:11:10.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/echo/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/Makefile    Wed May 06 16:56:36 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_ECHO) += echo.o
-diff -purN linux-2.6.27/drivers/staging/echo/TODO linux-2.6.27.19-5.1/drivers/staging/echo/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/TODO      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/TODO        Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,10 @@
 +TODO:
 +      - checkpatch.pl cleanups
@@ -359753,9 +359613,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/TODO linux-2.6.27.19-5.1/drivers/st
 +
 +Please send patches to Greg Kroah-Hartman <greg@kroah.com> and Cc: Steve
 +Underwood <steveu@coppice.org> and David Rowe <david@rowetel.com>
-diff -purN linux-2.6.27/drivers/staging/echo/bit_operations.h linux-2.6.27.19-5.1/drivers/staging/echo/bit_operations.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/bit_operations.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/bit_operations.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/bit_operations.h    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,253 @@
 +/*
 + * SpanDSP - a series of DSP components for telephony
@@ -360010,9 +359870,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/bit_operations.h linux-2.6.27.19-5.
 +
 +#endif
 +/*- End of file ------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/staging/echo/echo.c linux-2.6.27.19-5.1/drivers/staging/echo/echo.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/echo.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/echo.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/echo.c      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,632 @@
 +/*
 + * SpanDSP - a series of DSP components for telephony
@@ -360646,9 +360506,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/echo.c linux-2.6.27.19-5.1/drivers/
 +
 +    return tx;
 +}
-diff -purN linux-2.6.27/drivers/staging/echo/echo.h linux-2.6.27.19-5.1/drivers/staging/echo/echo.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/echo.h    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/echo.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/echo.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,220 @@
 +/*
 + * SpanDSP - a series of DSP components for telephony
@@ -360870,9 +360730,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/echo.h linux-2.6.27.19-5.1/drivers/
 +int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx);
 +
 +#endif        /* __ECHO_H */
-diff -purN linux-2.6.27/drivers/staging/echo/fir.h linux-2.6.27.19-5.1/drivers/staging/echo/fir.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/fir.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/fir.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/fir.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,369 @@
 +/*
 + * SpanDSP - a series of DSP components for telephony
@@ -361243,9 +361103,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/fir.h linux-2.6.27.19-5.1/drivers/s
 +
 +#endif
 +/*- End of file ------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/staging/echo/mmx.h linux-2.6.27.19-5.1/drivers/staging/echo/mmx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/echo/mmx.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/echo/mmx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/echo/mmx.h       Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,288 @@
 +/*
 + * mmx.h
@@ -361535,9 +361395,9 @@ diff -purN linux-2.6.27/drivers/staging/echo/mmx.h linux-2.6.27.19-5.1/drivers/s
 +
 +
 +#endif /* AVCODEC_I386MMX_H */
-diff -purN linux-2.6.27/drivers/staging/et131x/Kconfig linux-2.6.27.19-5.1/drivers/staging/et131x/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/Kconfig   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,18 @@
 +config ET131X
 +      tristate "Agere ET-1310 Gigabit Ethernet support"
@@ -361557,9 +361417,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/Kconfig linux-2.6.27.19-5.1/drive
 +        Say Y for detailed debug information.
 +
 +        If in doubt, say N.
-diff -purN linux-2.6.27/drivers/staging/et131x/Makefile linux-2.6.27.19-5.1/drivers/staging/et131x/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/Makefile        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/Makefile  Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,18 @@
 +#
 +# Makefile for the Agere ET-131x ethernet driver
@@ -361579,9 +361439,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/Makefile linux-2.6.27.19-5.1/driv
 +              et131x_initpci.o \
 +              et131x_isr.o \
 +              et131x_netdev.o
-diff -purN linux-2.6.27/drivers/staging/et131x/README linux-2.6.27.19-5.1/drivers/staging/et131x/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/README  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/README    Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,25 @@
 +This is a driver for the ET1310 network device.
 +
@@ -361608,9 +361468,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/README linux-2.6.27.19-5.1/driver
 +And Cc: Olaf Hartmann <o.hartmann@telovital.com> as he has this device and can
 +test any changes.
 +
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_address_map.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_address_map.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_address_map.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_address_map.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_address_map.h      Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,2399 @@
 +/*
 + * Agere Systems Inc.
@@ -364011,9 +363871,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_address_map.h linux-2.6.27
 +} ADDRESS_MAP_t, *PADDRESS_MAP_t;
 +
 +#endif /* _ET1310_ADDRESS_MAP_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_eeprom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_eeprom.c   Wed May 06 16:56:36 2009 +0100
 @@ -0,0 +1,480 @@
 +/*
 + * Agere Systems Inc.
@@ -364495,9 +364355,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.c linux-2.6.27.19-5
 +
 +      return (bStatus & LBCIF_STATUS_ACK_ERROR) ? FAILURE : SUCCESS;
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_eeprom.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_eeprom.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_eeprom.h   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,89 @@
 +/*
 + * Agere Systems Inc.
@@ -364588,9 +364448,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_eeprom.h linux-2.6.27.19-5
 +                     u32 unAddressingMode);
 +
 +#endif /* _ET1310_EEPROM_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_jagcore.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_jagcore.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,220 @@
 +/*
 + * Agere Systems Inc.
@@ -364812,9 +364672,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.c linux-2.6.27.19-
 +      adapter->CachedMaskValue.value = INT_MASK_DISABLE;
 +      writel(INT_MASK_DISABLE, &adapter->CSRAddress->global.int_mask.value);
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_jagcore.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_jagcore.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_jagcore.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,112 @@
 +/*
 + * Agere Systems Inc.
@@ -364928,9 +364788,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_jagcore.h linux-2.6.27.19-
 +void et131x_disable_interrupts(struct et131x_adapter *adapter);
 +
 +#endif /* __ET1310_JAGCORE_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_mac.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_mac.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,792 @@
 +/*
 + * Agere Systems Inc.
@@ -365724,9 +365584,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.c linux-2.6.27.19-5.1/
 +
 +      DBG_LEAVE(et131x_dbginfo);
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_mac.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_mac.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_mac.h      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,93 @@
 +/*
 + * Agere Systems Inc.
@@ -365821,9 +365681,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_mac.h linux-2.6.27.19-5.1/
 +void SetupDeviceForUnicast(struct et131x_adapter *adapter);
 +
 +#endif /* _ET1310_MAC_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_phy.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_phy.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1281 @@
 +/*
 + * Agere Systems Inc.
@@ -367106,9 +366966,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.c linux-2.6.27.19-5.1/
 +              break;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_phy.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_phy.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_phy.h      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,910 @@
 +/*
 + * Agere Systems Inc.
@@ -368020,9 +367880,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_phy.h linux-2.6.27.19-5.1/
 +                         u16 regnum, u16 bitnum, u8 *value);
 +
 +#endif /* _ET1310_PHY_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_pm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_pm.c       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,207 @@
 +/*
 + * Agere Systems Inc.
@@ -368231,9 +368091,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.c linux-2.6.27.19-5.1/d
 +      DBG_LEAVE(et131x_dbginfo);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_pm.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_pm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_pm.h       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,125 @@
 +/*
 + * Agere Systems Inc.
@@ -368360,9 +368220,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_pm.h linux-2.6.27.19-5.1/d
 +void DisablePhyComa(struct et131x_adapter *adapter);
 +
 +#endif /* _ET1310_PM_H_ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_rx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_rx.c       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1391 @@
 +/*
 + * Agere Systems Inc.
@@ -369755,9 +369615,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.c linux-2.6.27.19-5.1/d
 +      DBG_ASSERT(pRxLocal->nReadyRecv <= pRxLocal->NumRfd);
 +      DBG_RX_LEAVE(et131x_dbginfo);
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_rx.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_rx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_rx.h       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,373 @@
 +/*
 + * Agere Systems Inc.
@@ -370132,9 +369992,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_rx.h linux-2.6.27.19-5.1/d
 +void et131x_handle_recv_interrupt(struct et131x_adapter *adapter);
 +
 +#endif /* __ET1310_RX_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.c linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_tx.c       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1525 @@
 +/*
 + * Agere Systems Inc.
@@ -371661,9 +371521,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.c linux-2.6.27.19-5.1/d
 +
 +      spin_unlock_irqrestore(&pAdapter->SendWaitLock, lockflags);
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.h linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et1310_tx.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et1310_tx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et1310_tx.h       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,242 @@
 +/*
 + * Agere Systems Inc.
@@ -371907,9 +371767,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et1310_tx.h linux-2.6.27.19-5.1/d
 +int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev);
 +
 +#endif /* __ET1310_TX_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_adapter.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_adapter.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_adapter.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_adapter.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_adapter.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,347 @@
 +/*
 + * Agere Systems Inc.
@@ -372258,9 +372118,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_adapter.h linux-2.6.27.19-
 +#define MpSendPacketFun(Adapter, Packet) MpSendPacket(Adapter, Packet)
 +
 +#endif /* __ET131X_ADAPTER_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_config.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_config.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,325 @@
 +/*
 + * Agere Systems Inc.
@@ -372587,9 +372447,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.c linux-2.6.27.19-5
 +
 +      DBG_LEAVE(et131x_dbginfo);
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_config.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_config.h   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,67 @@
 +/*
 + * Agere Systems Inc.
@@ -372658,9 +372518,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_config.h linux-2.6.27.19-5
 +void et131x_config_parse(struct et131x_adapter *adapter);
 +
 +#endif /* __ET131X_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_debug.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_debug.c    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,218 @@
 +/*
 + * Agere Systems Inc.
@@ -372880,9 +372740,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.c linux-2.6.27.19-5.
 +}
 +
 +#endif // CONFIG_ET131X_DEBUG
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_debug.h  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_debug.h    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,201 @@
 +/*
 + * Agere Systems Inc.
@@ -373085,9 +372945,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_debug.h linux-2.6.27.19-5.
 +void DumpDeviceReg(int dbgLvl, struct et131x_adapter *adapter);
 +
 +#endif /* __ET131X_DBG_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_defs.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_defs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_defs.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_defs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_defs.h     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,128 @@
 +/*
 + * Agere Systems Inc.
@@ -373217,9 +373077,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_defs.h linux-2.6.27.19-5.1
 +#define NANO_IN_A_MICRO       1000
 +
 +#endif /* __ET131X_DEFS_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_initpci.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_initpci.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1046 @@
 +/*
 + * Agere Systems Inc.
@@ -374267,9 +374127,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.c linux-2.6.27.19-
 +      pci_disable_device(pdev);
 +      goto out;
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_initpci.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_initpci.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_initpci.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,73 @@
 +/*
 + * Agere Systems Inc.
@@ -374344,9 +374204,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_initpci.h linux-2.6.27.19-
 +void et131x_soft_reset(struct et131x_adapter *adapter);
 +
 +#endif /* __ET131X_INITPCI_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_isr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_isr.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,488 @@
 +/*
 + * Agere Systems Inc.
@@ -374836,9 +374696,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.c linux-2.6.27.19-5.1/
 +              et131x_enable_interrupts(pAdapter);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_isr.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_isr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_isr.h      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,65 @@
 +/*
 + * Agere Systems Inc.
@@ -374905,9 +374765,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_isr.h linux-2.6.27.19-5.1/
 +void et131x_isr_handler(struct work_struct *work);
 +
 +#endif /* __ET131X_ISR_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.c linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_netdev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_netdev.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,856 @@
 +/*
 + * Agere Systems Inc.
@@ -375765,9 +375625,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.c linux-2.6.27.19-5
 +      DBG_LEAVE(et131x_dbginfo);
 +      return result;
 +}
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_netdev.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_netdev.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_netdev.h   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,64 @@
 +/*
 + * Agere Systems Inc.
@@ -375833,9 +375693,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_netdev.h linux-2.6.27.19-5
 +struct net_device *et131x_device_alloc(void);
 +
 +#endif /* __ET131X_NETDEV_H__ */
-diff -purN linux-2.6.27/drivers/staging/et131x/et131x_version.h linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_version.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/et131x/et131x_version.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/et131x/et131x_version.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/et131x/et131x_version.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,81 @@
 +/*
 + * Agere Systems Inc.
@@ -375918,9 +375778,9 @@ diff -purN linux-2.6.27/drivers/staging/et131x/et131x_version.h linux-2.6.27.19-
 +#define DRIVER_NAME_EXT               "et131x.ko"
 +
 +#endif /* __ET131X_VERSION_H__ */
-diff -purN linux-2.6.27/drivers/staging/go7007/Kconfig linux-2.6.27.19-5.1/drivers/staging/go7007/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/Kconfig   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,25 @@
 +config VIDEO_GO7007
 +      tristate "Go 7007 support"
@@ -375947,9 +375807,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/Kconfig linux-2.6.27.19-5.1/drive
 +        To compile this driver as a module, choose M here: the
 +        module will be called go7007-usb
 +
-diff -purN linux-2.6.27/drivers/staging/go7007/Makefile linux-2.6.27.19-5.1/drivers/staging/go7007/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/Makefile        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/Makefile  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,18 @@
 +#obj-m += go7007.o go7007-usb.o snd-go7007.o wis-saa7115.o wis-tw9903.o \
 +              wis-uda1342.o wis-sony-tuner.o wis-saa7113.o wis-ov7640.o \
@@ -375969,9 +375829,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/Makefile linux-2.6.27.19-5.1/driv
 +EXTRA_CFLAGS += -Idrivers/staging/saa7134
 +EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
 +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
-diff -purN linux-2.6.27/drivers/staging/go7007/README linux-2.6.27.19-5.1/drivers/staging/go7007/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/README  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/README    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,11 @@
 +Todo:
 +      - checkpatch.pl cleanups
@@ -375984,9 +375844,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/README linux-2.6.27.19-5.1/driver
 +Please send patchs to Greg Kroah-Hartman <greg@kroah.com> and Cc: Ross
 +Cohen <rcohen@snurgle.org> as well.
 +
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-driver.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-driver.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-driver.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-driver.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-driver.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,688 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -376676,9 +376536,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-driver.c linux-2.6.27.19-5
 +EXPORT_SYMBOL(go7007_remove);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-fw.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-fw.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-fw.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-fw.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-fw.c       Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1639 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -378319,9 +378179,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-fw.c linux-2.6.27.19-5.1/d
 +      release_firmware(fw_entry);
 +      return -1;
 +}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-i2c.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-i2c.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-i2c.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-i2c.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-i2c.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,309 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -378632,9 +378492,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-i2c.c linux-2.6.27.19-5.1/
 +      }
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-priv.h linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-priv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-priv.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-priv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-priv.h     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,279 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -378915,9 +378775,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-priv.h linux-2.6.27.19-5.1
 +/* snd-go7007.c */
 +int go7007_snd_init(struct go7007 *go);
 +int go7007_snd_remove(struct go7007 *go);
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-usb.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-usb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-usb.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-usb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-usb.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1229 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -380148,9 +380008,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-usb.c linux-2.6.27.19-5.1/
 +module_exit(go7007_usb_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007-v4l2.c linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-v4l2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007-v4l2.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007-v4l2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007-v4l2.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1499 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -381651,9 +381511,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007-v4l2.c linux-2.6.27.19-5.1
 +      if (go->video_dev)
 +              video_unregister_device(go->video_dev);
 +}
-diff -purN linux-2.6.27/drivers/staging/go7007/go7007.h linux-2.6.27.19-5.1/drivers/staging/go7007/go7007.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/go7007.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/go7007.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/go7007.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,114 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -381769,9 +381629,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/go7007.h linux-2.6.27.19-5.1/driv
 +                                      struct go7007_md_params)
 +#define       GO7007IOC_S_MD_REGION   _IOW('V', BASE_VIDIOC_PRIVATE + 8, \
 +                                      struct go7007_md_region)
-diff -purN linux-2.6.27/drivers/staging/go7007/saa7134-go7007.c linux-2.6.27.19-5.1/drivers/staging/go7007/saa7134-go7007.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/saa7134-go7007.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/saa7134-go7007.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/saa7134-go7007.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,484 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -382257,9 +382117,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/saa7134-go7007.c linux-2.6.27.19-
 +module_exit(saa7134_go7007_mod_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/snd-go7007.c linux-2.6.27.19-5.1/drivers/staging/go7007/snd-go7007.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/snd-go7007.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/snd-go7007.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/snd-go7007.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,305 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -382566,9 +382426,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/snd-go7007.c linux-2.6.27.19-5.1/
 +EXPORT_SYMBOL(go7007_snd_remove);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-i2c.h linux-2.6.27.19-5.1/drivers/staging/go7007/wis-i2c.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-i2c.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-i2c.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-i2c.h Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,55 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -382625,9 +382485,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-i2c.h linux-2.6.27.19-5.1/dri
 +#define TUNER_SONY_BTF_PG472Z         200
 +#define TUNER_SONY_BTF_PK467Z         201
 +#define TUNER_SONY_BTF_PB463Z         202
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-ov7640.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-ov7640.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-ov7640.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-ov7640.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-ov7640.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,130 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -382759,9 +382619,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-ov7640.c linux-2.6.27.19-5.1/
 +module_exit(wis_ov7640_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7113.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7113.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7113.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-saa7113.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-saa7113.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,358 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -383121,9 +382981,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7113.c linux-2.6.27.19-5.1
 +module_exit(wis_saa7113_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7115.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7115.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-saa7115.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-saa7115.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-saa7115.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,491 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -383616,9 +383476,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-saa7115.c linux-2.6.27.19-5.1
 +module_exit(wis_saa7115_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-sony-tuner.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-sony-tuner.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-sony-tuner.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-sony-tuner.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-sony-tuner.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,742 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -384362,9 +384222,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-sony-tuner.c linux-2.6.27.19-
 +module_exit(wis_sony_tuner_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw2804.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw2804.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw2804.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-tw2804.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-tw2804.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,380 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -384746,9 +384606,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw2804.c linux-2.6.27.19-5.1/
 +module_exit(wis_tw2804_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw9903.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw9903.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-tw9903.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-tw9903.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-tw9903.c      Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,362 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -385112,9 +384972,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-tw9903.c linux-2.6.27.19-5.1/
 +module_exit(wis_tw9903_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/go7007/wis-uda1342.c linux-2.6.27.19-5.1/drivers/staging/go7007/wis-uda1342.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/go7007/wis-uda1342.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/go7007/wis-uda1342.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/go7007/wis-uda1342.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,136 @@
 +/*
 + * Copyright (C) 2005-2006 Micronas USA Inc.
@@ -385252,9 +385112,9 @@ diff -purN linux-2.6.27/drivers/staging/go7007/wis-uda1342.c linux-2.6.27.19-5.1
 +module_exit(wis_uda1342_cleanup);
 +
 +MODULE_LICENSE("GPL v2");
-diff -purN linux-2.6.27/drivers/staging/me4000/Kconfig linux-2.6.27.19-5.1/drivers/staging/me4000/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/Kconfig 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/Kconfig   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,10 @@
 +config ME4000
 +      tristate "Meilhaus ME-4000 support"
@@ -385266,14 +385126,14 @@ diff -purN linux-2.6.27/drivers/staging/me4000/Kconfig linux-2.6.27.19-5.1/drive
 +
 +        To compile this driver as a module, choose M here: the module
 +        will be called me4000.
-diff -purN linux-2.6.27/drivers/staging/me4000/Makefile linux-2.6.27.19-5.1/drivers/staging/me4000/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/Makefile        2009-03-25 16:11:09.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/me4000/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/Makefile  Wed May 06 16:56:37 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_ME4000)          += me4000.o
-diff -purN linux-2.6.27/drivers/staging/me4000/README linux-2.6.27.19-5.1/drivers/staging/me4000/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/README  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/README    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,13 @@
 +
 +TODO:
@@ -385288,9 +385148,9 @@ diff -purN linux-2.6.27/drivers/staging/me4000/README linux-2.6.27.19-5.1/driver
 +and Cc: Wolfgang Beiter <w.beiter@aon.at> and
 +Guenter Gebhardt <g.gebhardt@meilhaus.de>
 +
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000.c linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,6133 @@
 +/* Device driver for Meilhaus ME-4000 board family.
 + * ================================================
@@ -391425,9 +391285,9 @@ diff -purN linux-2.6.27/drivers/staging/me4000/me4000.c linux-2.6.27.19-5.1/driv
 +      *eof = 1;
 +      return len;
 +}
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000.h  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,954 @@
 +/*
 + * Copyright (C) 2003 Meilhaus Electronic GmbH (support@meilhaus.de)
@@ -392383,9 +392243,9 @@ diff -purN linux-2.6.27/drivers/staging/me4000/me4000.h linux-2.6.27.19-5.1/driv
 +#define ME4000_AI_GET_COUNT_BUFFER     _IOR (ME4000_MAGIC, 50, unsigned long)
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/me4000/me4000_firmware.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4000_firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4000_firmware.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4000_firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4000_firmware.h Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,10033 @@
 +/*
 +   This file is copyright by Meilhaus Electronic GmbH 2003.
@@ -402420,9 +402280,9 @@ diff -purN linux-2.6.27/drivers/staging/me4000/me4000_firmware.h linux-2.6.27.19
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00
 +};
-diff -purN linux-2.6.27/drivers/staging/me4000/me4610_firmware.h linux-2.6.27.19-5.1/drivers/staging/me4000/me4610_firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/me4000/me4610_firmware.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/me4000/me4610_firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/me4000/me4610_firmware.h Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,5409 @@
 +/*
 +   This file is copyright by Meilhaus Electronic GmbH 2003.
@@ -407833,9 +407693,9 @@ diff -purN linux-2.6.27/drivers/staging/me4000/me4610_firmware.h linux-2.6.27.19
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00
 +};
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/amsdu.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/amsdu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/amsdu.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/amsdu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/amsdu.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -407971,9 +407831,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/amsdu.c linux-2.6.27.19-5
 +
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cagg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cagg.c    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,3611 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -411586,9 +411446,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.c linux-2.6.27.19-5.
 +
 +    return hlen;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cagg.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cagg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cagg.h    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,435 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -412025,9 +411885,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cagg.h linux-2.6.27.19-5.
 +
 +#endif /* #ifndef _CAGG_H */
 +
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ccmd.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ccmd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ccmd.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ccmd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ccmd.c    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1861 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -413890,9 +413750,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ccmd.c linux-2.6.27.19-5.
 +
 +    wd->seq_debug = value;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cfunc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cfunc.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1227 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -415121,9 +414981,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.c linux-2.6.27.19-5
 +        return 0;
 +    }
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cfunc.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cfunc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cfunc.h   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,449 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -415574,9 +415434,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cfunc.h linux-2.6.27.19-5
 +
 +
 +#endif /* #ifndef _CFUNC_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/chb.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/chb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/chb.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/chb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/chb.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,200 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -415778,9 +415638,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/chb.c linux-2.6.27.19-5.1
 +    zm_debug_msg0("***************************");
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cic.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cic.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cic.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cic.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cic.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,496 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -416278,9 +416138,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cic.c linux-2.6.27.19-5.1
 +    }
 +#endif
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cinit.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cinit.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cinit.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cinit.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cinit.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,1911 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -418193,9 +418053,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cinit.c linux-2.6.27.19-5
 +
 +    return ch;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmm.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmm.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmm.c     Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,2141 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -420338,9 +420198,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmm.c linux-2.6.27.19-5.1
 +
 +    return 0xffff;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmap.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmap.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmap.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmmap.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmmap.c   Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,2402 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -422744,9 +422604,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmap.c linux-2.6.27.19-5
 +
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmsta.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmsta.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cmmsta.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cmmsta.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cmmsta.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,5782 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -428530,9 +428390,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cmmsta.c linux-2.6.27.19-
 +
 +    return offset;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/coid.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/coid.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/coid.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/coid.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/coid.c    Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,2695 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -431229,9 +431089,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/coid.c linux-2.6.27.19-5.
 +    else
 +      wd->sta.ibssAdditionalIESize = 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cprecomp.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cprecomp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cprecomp.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cprecomp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cprecomp.h        Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,32 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -431265,9 +431125,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cprecomp.h linux-2.6.27.1
 +#include "performance.h"
 +#endif
 +
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cpsmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cpsmgr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cpsmgr.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cpsmgr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cpsmgr.c  Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,731 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -432000,9 +431860,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cpsmgr.c linux-2.6.27.19-
 +
 +/* Leave an empty line below to remove warning message on some compiler */
 +
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cscanmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cscanmgr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cscanmgr.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cscanmgr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cscanmgr.c        Wed May 06 16:56:37 2009 +0100
 @@ -0,0 +1,535 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -432539,9 +432399,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cscanmgr.c linux-2.6.27.1
 +    zmw_leave_critical_section(dev);
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctkip.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctkip.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctkip.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ctkip.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ctkip.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,598 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -433141,9 +433001,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctkip.c linux-2.6.27.19-5
 +
 +    return ret;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctxrx.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctxrx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ctxrx.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ctxrx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ctxrx.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,4096 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -437241,9 +437101,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ctxrx.c linux-2.6.27.19-5
 +        }
 +    }
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwep.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwep.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwep.c    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,299 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -437544,9 +437404,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwep.c linux-2.6.27.19-5.
 +
 +    return ZM_ICV_SUCCESS;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwm.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,131 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -437679,9 +437539,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.c linux-2.6.27.19-5.1
 +
 +    return FALSE;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/cwm.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/cwm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/cwm.h     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,45 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -437728,9 +437588,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/cwm.h linux-2.6.27.19-5.1
 +
 +
 +#endif /* #ifndef _CWM_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/freqctrl.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/freqctrl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/freqctrl.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/freqctrl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/freqctrl.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,259 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -437991,9 +437851,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/freqctrl.c linux-2.6.27.1
 +
 +    zfCoreSetFrequencyExV2(dev, wd->frequency, 0, 0, NULL, 1);
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ledmgr.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ledmgr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ledmgr.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ledmgr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ledmgr.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,557 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -438552,9 +438412,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ledmgr.c linux-2.6.27.19-
 +    }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/performance.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/performance.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,431 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -438987,9 +438847,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.c linux-2.6.2
 +    zm_summary.rx_reorder++;
 +}
 +#endif /* end of ZM_ENABLE_PERFORMANCE_EVALUATION */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/performance.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/performance.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/performance.h     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,97 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -439088,9 +438948,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/performance.h linux-2.6.2
 +void zfiRxPerformanceReorder(zdev_t* dev);
 +#endif /* end of ZM_ENABLE_PERFORMANCE_EVALUATION */
 +#endif /* end of _PERFORMANCE_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_usb.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_usb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_usb.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_usb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_usb.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,102 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -439194,9 +439054,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_usb.h linux-2.6.27.19
 +extern u32_t zfwUsbSetConfiguration(zdev_t *dev, u16_t value);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfi.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_zfi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_zfi.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,821 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -440019,9 +439879,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfi.h linux-2.6.27.19
 +#endif
 +/***** End of section 3 *****/
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfw.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfw.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/pub_zfw.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/pub_zfw.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/pub_zfw.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,93 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -440116,9 +439976,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/pub_zfw.h linux-2.6.27.19
 +#endif
 +
 +#endif //_PUB_ZFW_H
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/queue.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/queue.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,303 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -440423,9 +440283,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.c linux-2.6.27.19-5
 +
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/queue.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/queue.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/queue.h   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,37 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -440464,9 +440324,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/queue.h linux-2.6.27.19-5
 +};
 +
 +#endif //#ifndef _QUEUE_H
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.c linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ratectrl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ratectrl.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,874 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -441342,9 +441202,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.c linux-2.6.27.1
 +    wd->sta.oppositeInfo[0].rcCell.currentRateIndex = RateMapToRateIndex(Rate, &wd->sta.oppositeInfo[0].rcCell);
 +}
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/ratectrl.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/ratectrl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/ratectrl.h        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,37 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -441383,9 +441243,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/ratectrl.h linux-2.6.27.1
 +extern void zfRateCtrlTxSuccessEvent(zdev_t* dev, struct zsRcCell* rcCell, u8_t successRate);
 +extern void zfRateCtrlAggrSta(zdev_t* dev);
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/struct.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/struct.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/struct.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/struct.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/struct.h  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1315 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -442702,9 +442562,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/struct.h linux-2.6.27.19-
 +#define zmw_rx_buf_writeh(dev, buf, offset, value) zmw_buf_writeh(dev, buf, offset, value)
 +
 +#endif /* #ifndef _STRUCT_H */
-diff -purN linux-2.6.27/drivers/staging/otus/80211core/wlan.h linux-2.6.27.19-5.1/drivers/staging/otus/80211core/wlan.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/80211core/wlan.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/80211core/wlan.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/80211core/wlan.h    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,595 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -443301,9 +443161,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/80211core/wlan.h linux-2.6.27.19-5.
 +#define ZM_HP_CAP_5G                    0x8
 +
 +#endif /* #ifndef _WLAN_H */
-diff -purN linux-2.6.27/drivers/staging/otus/Kconfig linux-2.6.27.19-5.1/drivers/staging/otus/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/Kconfig   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/Kconfig     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,32 @@
 +config OTUS
 +      tristate "Atheros OTUS 802.11n USB wireless support"
@@ -443337,9 +443197,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/Kconfig linux-2.6.27.19-5.1/drivers
 +        shown in the example:
 +        $ wpa_supplicant -Dotus -i <atheros device from ifconfig> -c /path/to/wpa_supplicant.conf -d
 +
-diff -purN linux-2.6.27/drivers/staging/otus/Makefile linux-2.6.27.19-5.1/drivers/staging/otus/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/Makefile  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/Makefile    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,67 @@
 +obj-$(CONFIG_OTUS)    += arusb_lnx.o
 +
@@ -443408,9 +443268,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/Makefile linux-2.6.27.19-5.1/driver
 +      hal/hpDKfwu.o \
 +      hal/hpfwspiu.o \
 +      hal/hpani.o
-diff -purN linux-2.6.27/drivers/staging/otus/TODO linux-2.6.27.19-5.1/drivers/staging/otus/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/TODO      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/TODO        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,9 @@
 +TODO:
 +      - checkpatch.pl cleanups
@@ -443421,9 +443281,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/TODO linux-2.6.27.19-5.1/drivers/st
 +Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
 +Luis Rodriguez <Luis.Rodriguez@Atheros.com> and the
 +otus-devel@lists.madwifi-project.org mailing list.
-diff -purN linux-2.6.27/drivers/staging/otus/apdbg.c linux-2.6.27.19-5.1/drivers/staging/otus/apdbg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/apdbg.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/apdbg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/apdbg.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,457 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -443882,9 +443742,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/apdbg.c linux-2.6.27.19-5.1/drivers
 +        return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/otus/athr_common.h linux-2.6.27.19-5.1/drivers/staging/otus/athr_common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/athr_common.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/athr_common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/athr_common.h       Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,141 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -444027,9 +443887,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/athr_common.h linux-2.6.27.19-5.1/d
 +};
 +#endif //ZM_ENALBE_WAPI
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpDKfwu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpDKfwu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpDKfwu.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpDKfwu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpDKfwu.c       Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,832 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -444863,9 +444723,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpDKfwu.c linux-2.6.27.19-5.1/d
 +0x00000000, 0x00000000, 0x00000000, };
 +
 +const u32_t zcDKFwImageSize=12988;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpani.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpani.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,732 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -445599,9 +445459,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.c linux-2.6.27.19-5.1/dri
 +        }
 +    }
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpani.h       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpani.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpani.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -446023,9 +445883,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpani.h linux-2.6.27.19-5.1/dri
 +#define AR_PHY_POWER_TX_RATE7   0x1C63CC
 +#define AR_PHY_POWER_TX_RATE8   0x1C63D0
 +#define AR_PHY_POWER_TX_RATE9   0x1C63D4
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfw2.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfw2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfw2.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfw2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfw2.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1018 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -447045,9 +446905,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfw2.c linux-2.6.27.19-5.1/dri
 +0x00000000, 0x00000000, 0x00000000, };
 +
 +const u32_t zcP2FwImageSize=15964;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwbu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwbu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwbu.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwbu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwbu.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,5269 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -452318,9 +452178,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwbu.c linux-2.6.27.19-5.1/dr
 +};
 +
 +const u32_t zcFwBufImageSize=83968;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwspiu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwspiu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwspiu.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwspiu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwspiu.c      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,655 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -452977,9 +452837,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwspiu.c linux-2.6.27.19-5.1/
 +0x00000000, 0x00000000, 0x00000000, };
 +
 +const u32_t zcFwImageSPISize=10156;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1017 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -453998,9 +453858,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c linux-2.6.27.19-5.1/dri
 +};
 +
 +const u32_t zcFwImageSize=15936;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu.c.drv_ba_resend
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,742 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -454744,9 +454604,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu.c.drv_ba_resend linux-2.6
 +0x00000000, };
 +
 +const u32_t zcFwImageSize=11540;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_2k.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_2k.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_2k.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_2k.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_2k.c      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1016 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -455764,9 +455624,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_2k.c linux-2.6.27.19-5.1/
 +0x00000000, 0x00000000, };
 +
 +const u32_t zcFwImageSize=15928;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_BA.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_BA.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_BA.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_BA.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_BA.c      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,874 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -456642,9 +456502,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_BA.c linux-2.6.27.19-5.1/
 +0x00000000, 0x00000000, };
 +
 +const u32_t zcFwImageSize=13656;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_FB50_mdk.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_FB50_mdk.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_FB50_mdk.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_FB50_mdk.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_FB50_mdk.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,721 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -457367,9 +457227,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_FB50_mdk.c linux-2.6.27.1
 +0x00000000, };
 +
 +const u32_t zcFwImageSize=11204;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_OTUS_RC.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_OTUS_RC.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_OTUS_RC.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_OTUS_RC.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_OTUS_RC.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,715 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -458086,9 +457946,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_OTUS_RC.c linux-2.6.27.19
 +};
 +
 +const u32_t zcFwImageSize=11104;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_txstream.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_txstream.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwu_txstream.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwu_txstream.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwu_txstream.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1017 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -459107,9 +458967,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwu_txstream.c linux-2.6.27.1
 +};
 +
 +const u32_t zcFwImageSize=15936;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwuinit.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwuinit.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpfwuinit.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpfwuinit.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpfwuinit.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,240 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -459351,9 +459211,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpfwuinit.c linux-2.6.27.19-5.1
 +0xEE000D0A, };
 +
 +const u32_t zcFwImageSize=3508;
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpmain.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpmain.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpmain.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpmain.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpmain.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,4643 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -463998,9 +463858,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpmain.c linux-2.6.27.19-5.1/dr
 +
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpreg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpreg.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,2481 @@
 +/*
 + * Copyright (c) 2000-2005 ZyDAS Technology Corporation
@@ -466483,9 +466343,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.c linux-2.6.27.19-5.1/dri
 +    hpPriv->disableDfsCh = disableFlag;
 +    return;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpreg.h       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpreg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpreg.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,524 @@
 +/*
 + * Copyright (c) 2000-2005 ZyDAS Technology Corporation
@@ -467011,9 +466871,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpreg.h linux-2.6.27.19-5.1/dri
 +};
 +
 +#endif /* #ifndef _HPREG_H */
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hprw.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hprw.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hprw.c        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hprw.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hprw.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1557 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -468572,9 +468432,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hprw.c linux-2.6.27.19-5.1/driv
 +    return ret;
 +}
 +//Paul--
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.c linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpusb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpusb.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1584 @@
 +/*
 + * Copyright (c) 2000-2005 ZyDAS Technology Corporation
@@ -470160,9 +470020,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.c linux-2.6.27.19-5.1/dri
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.h linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/hpusb.h       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/hpusb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/hpusb.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,437 @@
 +/*
 + * Copyright (c) 2000-2005 ZyDAS Technology Corporation
@@ -470601,9 +470461,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/hpusb.h linux-2.6.27.19-5.1/dri
 +} ATH_CTLS;
 +
 +#endif /* #ifndef _HPUSB_H */
-diff -purN linux-2.6.27/drivers/staging/otus/hal/otus.ini linux-2.6.27.19-5.1/drivers/staging/otus/hal/otus.ini
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/hal/otus.ini      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/hal/otus.ini
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/hal/otus.ini        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,414 @@
 +/* 8602 : update mismatch register between NDIS and ART */
 +static const u32_t ar5416Modes[][6] = {
@@ -471019,9 +470879,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/hal/otus.ini linux-2.6.27.19-5.1/dr
 +     {0x98b0,  0x00000040,  0x00000040},
 +     {0x98f0,  0x0000001c,  0x0000001c}
 +};
-diff -purN linux-2.6.27/drivers/staging/otus/ioctl.c linux-2.6.27.19-5.1/drivers/staging/otus/ioctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/ioctl.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/ioctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/ioctl.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,2936 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -473959,9 +473819,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/ioctl.c linux-2.6.27.19-5.1/drivers
 +
 +    return err;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/oal_dt.h linux-2.6.27.19-5.1/drivers/staging/otus/oal_dt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/oal_dt.h  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/oal_dt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/oal_dt.h    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,60 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -474023,9 +473883,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/oal_dt.h linux-2.6.27.19-5.1/driver
 +typedef     struct net_device   zdev_t;
 +
 +#endif /* #ifndef _OAL_DT_H */
-diff -purN linux-2.6.27/drivers/staging/otus/oal_marc.h linux-2.6.27.19-5.1/drivers/staging/otus/oal_marc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/oal_marc.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/oal_marc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/oal_marc.h  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,135 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -474162,9 +474022,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/oal_marc.h linux-2.6.27.19-5.1/driv
 +#define DbgPrint printk
 +
 +#endif /* #ifndef _OAL_MARC_H */
-diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.c linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/usbdrv.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/usbdrv.c    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1210 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -475376,9 +475236,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.c linux-2.6.27.19-5.1/driver
 +
 +    return 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.h linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/usbdrv.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/usbdrv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/usbdrv.h    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,257 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -475637,9 +475497,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/usbdrv.h linux-2.6.27.19-5.1/driver
 +
 +#endif        /* _USBDRV_H */
 +
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_buf.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_buf.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_buf.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_buf.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_buf.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,114 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -475755,9 +475615,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_buf.c linux-2.6.27.19-5.1/driv
 +void zfwCopyBufContext(zdev_t* dev, zbuf_t* source, zbuf_t* dst)
 +{
 +}
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_dbg.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_dbg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_dbg.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_dbg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_dbg.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,101 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -475860,9 +475720,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_dbg.c linux-2.6.27.19-5.1/driv
 +//For Evl --
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_ev.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_ev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_ev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_ev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_ev.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,283 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476147,9 +476007,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_ev.c linux-2.6.27.19-5.1/drive
 +
 +}
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_mem.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mem.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mem.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_mem.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_mem.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,101 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476252,9 +476112,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_mem.c linux-2.6.27.19-5.1/driv
 +}
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_mis.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mis.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_mis.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_mis.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_mis.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,108 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476364,9 +476224,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_mis.c linux-2.6.27.19-5.1/driv
 +#endif
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_pkt.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_pkt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_pkt.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_pkt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_pkt.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,178 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476546,9 +476406,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_pkt.c linux-2.6.27.19-5.1/driv
 +}
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_sec.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_sec.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_sec.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_sec.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_sec.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,127 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476677,9 +476537,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_sec.c linux-2.6.27.19-5.1/driv
 +}
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wrap_usb.c linux-2.6.27.19-5.1/drivers/staging/otus/wrap_usb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wrap_usb.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wrap_usb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wrap_usb.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,195 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -476876,9 +476736,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wrap_usb.c linux-2.6.27.19-5.1/driv
 +}
 +
 +/* Leave an empty line below to remove warning message on some compiler */
-diff -purN linux-2.6.27/drivers/staging/otus/wwrap.c linux-2.6.27.19-5.1/drivers/staging/otus/wwrap.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/wwrap.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/wwrap.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/wwrap.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1207 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -478087,9 +477947,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/wwrap.c linux-2.6.27.19-5.1/drivers
 +    *Dur = 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/otus/zdcompat.h linux-2.6.27.19-5.1/drivers/staging/otus/zdcompat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdcompat.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdcompat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdcompat.h  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,116 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -478207,9 +478067,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/zdcompat.h linux-2.6.27.19-5.1/driv
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/otus/zdusb.c linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdusb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdusb.c     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,295 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -478506,9 +478366,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/zdusb.c linux-2.6.27.19-5.1/drivers
 +
 +module_init(zfLnxIinit);
 +module_exit(zfLnxExit);
-diff -purN linux-2.6.27/drivers/staging/otus/zdusb.h linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/otus/zdusb.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/otus/zdusb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/otus/zdusb.h     Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,43 @@
 +/*
 + * Copyright (c) 2007-2008 Atheros Communications Inc.
@@ -478553,9 +478413,9 @@ diff -purN linux-2.6.27/drivers/staging/otus/zdusb.h linux-2.6.27.19-5.1/drivers
 +#define PRODUCT_DWA160A         0x3C10
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rt2860/2860_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2860/2860_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/2860_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/2860_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/2860_main_dev.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1377 @@
 +/*
 + *************************************************************************
@@ -479934,18 +479794,18 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/2860_main_dev.c linux-2.6.27.19-5
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt2860/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/Kconfig   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,5 @@
 +config RT2860
 +      tristate "Ralink 2860 wireless support"
 +      depends on PCI && X86 && WLAN_80211
 +      ---help---
 +        This is an experimental driver for the Ralink 2860 wireless chip.
-diff -purN linux-2.6.27/drivers/staging/rt2860/Makefile linux-2.6.27.19-5.1/drivers/staging/rt2860/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/Makefile        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/Makefile  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,43 @@
 +obj-$(CONFIG_RT2860)  += rt2860sta.o
 +
@@ -479990,9 +479850,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/Makefile linux-2.6.27.19-5.1/driv
 +      common/2860_rtmp_init.o \
 +      2860_main_dev.o         \
 +      common/cmm_data_2860.o
-diff -purN linux-2.6.27/drivers/staging/rt2860/TODO linux-2.6.27.19-5.1/drivers/staging/rt2860/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/TODO    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/TODO      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,17 @@
 +I'm hesitant to add a TODO file here, as the wireless developers would
 +really have people help them out on the "clean" rt2860 driver that can
@@ -480011,9 +479871,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/TODO linux-2.6.27.19-5.1/drivers/
 +Please send any patches or complaints about this driver to Greg
 +Kroah-Hartman <greg@kroah.com> and don't bother the upstream wireless
 +kernel developers about it, they want nothing to do with it.
-diff -purN linux-2.6.27/drivers/staging/rt2860/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt2860/aironet.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/aironet.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/aironet.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/aironet.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,210 @@
 +/*
 + *************************************************************************
@@ -480225,9 +480085,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/aironet.h linux-2.6.27.19-5.1/dri
 +}     CCX_CONTROL, *PCCX_CONTROL;
 +
 +#endif        // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/ap.h linux-2.6.27.19-5.1/drivers/staging/rt2860/ap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/ap.h    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/ap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/ap.h      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,557 @@
 +/*
 + *************************************************************************
@@ -480786,9 +480646,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/ap.h linux-2.6.27.19-5.1/drivers/
 +
 +#endif  // __AP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt2860/chlist.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/chlist.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/chlist.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/chlist.h  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1296 @@
 +/*
 + *************************************************************************
@@ -482086,9 +481946,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/chlist.h linux-2.6.27.19-5.1/driv
 +}
 +#endif // __CHLIST_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/2860_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/2860_rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/2860_rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/2860_rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/2860_rtmp_init.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,922 @@
 +/*
 + *************************************************************************
@@ -483012,9 +482872,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/2860_rtmp_init.c linux-2.6
 +}
 +/* End of 2860_rtmp_init.c */
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/action.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1031 @@
 +/*
 + *************************************************************************
@@ -484047,9 +483907,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.c linux-2.6.27.19-5
 +
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/action.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/action.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/action.h   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + *************************************************************************
@@ -484119,9 +483979,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/action.h linux-2.6.27.19-5
 +#endif /* __ACTION_H__ */
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/ba_action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/ba_action.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/ba_action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/ba_action.c        Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1802 @@
 +/*
 + *************************************************************************
@@ -485925,9 +485785,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/ba_action.c linux-2.6.27.1
 +
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_data.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,3469 @@
 +/*
 + *************************************************************************
@@ -489398,9 +489258,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data.c linux-2.6.27.19
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data_2860.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data_2860.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_data_2860.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_data_2860.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_data_2860.c    Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1240 @@
 +/*
 + *************************************************************************
@@ -490642,9 +490502,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_data_2860.c linux-2.6.
 +              RTMPusecDelay(1000);
 +      }while (i++ < 100);
 +}
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_info.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_info.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_info.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_info.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,3417 @@
 +/*
 + *************************************************************************
@@ -494063,9 +493923,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_info.c linux-2.6.27.19
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sanity.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_sanity.c       Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1633 @@
 +/*
 + *************************************************************************
@@ -495700,9 +495560,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sanity.c linux-2.6.27.
 +}
 +#endif // QOS_DLS_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_sync.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_sync.c Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,702 @@
 +/*
 + *************************************************************************
@@ -496406,9 +496266,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_sync.c linux-2.6.27.19
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/cmm_wpa.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/cmm_wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/cmm_wpa.c  Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1606 @@
 +/*
 + *************************************************************************
@@ -498016,9 +497876,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/cmm_wpa.c linux-2.6.27.19-
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/dfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/dfs.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/dfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/dfs.c      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,453 @@
 +/*
 + *************************************************************************
@@ -498473,9 +498333,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/dfs.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/eeprom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/eeprom.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/eeprom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/eeprom.c   Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,244 @@
 +/*
 + *************************************************************************
@@ -498721,9 +498581,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/eeprom.c linux-2.6.27.19-5
 +    EEpromCleanup(pAd);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/firmware.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/firmware.h Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,558 @@
 +/*
 + Copyright (c) 2007, Ralink Technology Corporation
@@ -499283,9 +499143,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/firmware.h linux-2.6.27.19
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x94, 0xeb, } ;
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/md5.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/md5.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/md5.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/md5.c      Wed May 06 16:56:38 2009 +0100
 @@ -0,0 +1,1427 @@
 +/*
 + *************************************************************************
@@ -500714,9 +500574,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/md5.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/mlme.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/mlme.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/mlme.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/mlme.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,8667 @@
 +/*
 + *************************************************************************
@@ -509385,9 +509245,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/mlme.c linux-2.6.27.19-5.1
 +              R2));
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/netif_block.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/netif_block.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,144 @@
 +/*
 + *************************************************************************
@@ -509533,9 +509393,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.c linux-2.6.27
 +      return;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/netif_block.h    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/netif_block.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/netif_block.h      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,58 @@
 +/*
 + *************************************************************************
@@ -509595,9 +509455,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/netif_block.h linux-2.6.27
 +      IN PNDIS_PACKET pPacket);
 +#endif // __NET_IF_BLOCK_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_init.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_init.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,3757 @@
 +/*
 + *************************************************************************
@@ -513356,9 +513216,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_init.c linux-2.6.27.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_tkip.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_tkip.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_tkip.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_tkip.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1607 @@
 +/*
 + *************************************************************************
@@ -514967,9 +514827,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_tkip.c linux-2.6.27.1
 +      xor_32(temp, tempb, out);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_wep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/rtmp_wep.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/rtmp_wep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/rtmp_wep.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,499 @@
 +/*
 + *************************************************************************
@@ -515470,9 +515330,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/rtmp_wep.c linux-2.6.27.19
 +      ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt2860/common/spectrum.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/common/spectrum.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/common/spectrum.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/common/spectrum.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1877 @@
 +/*
 + *************************************************************************
@@ -517351,9 +517211,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/common/spectrum.c linux-2.6.27.19
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/config.mk linux-2.6.27.19-5.1/drivers/staging/rt2860/config.mk
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/config.mk       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/config.mk
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/config.mk Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,245 @@
 +# Support ATE function
 +HAS_ATE=n
@@ -517600,9 +517460,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/config.mk linux-2.6.27.19-5.1/dri
 +export CFLAGS
 +endif
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt2860/dfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/dfs.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/dfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/dfs.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,100 @@
 +/*
 + *************************************************************************
@@ -517704,9 +517564,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/dfs.h linux-2.6.27.19-5.1/drivers
 +      IN PUCHAR arg);
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/leap.h linux-2.6.27.19-5.1/drivers/staging/rt2860/leap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/leap.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/leap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/leap.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,215 @@
 +/*
 + *************************************************************************
@@ -517923,9 +517783,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/leap.h linux-2.6.27.19-5.1/driver
 +    IN ULONG            MsgLen);
 +
 +#endif  // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt2860/link_list.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/link_list.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/link_list.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/link_list.h       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + *************************************************************************
@@ -518061,9 +517921,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/link_list.h linux-2.6.27.19-5.1/d
 +
 +#endif // ___LINK_LIST_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/md4.h linux-2.6.27.19-5.1/drivers/staging/rt2860/md4.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/md4.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/md4.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/md4.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,42 @@
 +/*
 + *************************************************************************
@@ -518108,9 +517968,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/md4.h linux-2.6.27.19-5.1/drivers
 +
 +#endif //__MD4_H__
 \ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt2860/md5.h linux-2.6.27.19-5.1/drivers/staging/rt2860/md5.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/md5.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/md5.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/md5.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,107 @@
 +/*
 + *************************************************************************
@@ -518219,9 +518079,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/md5.h linux-2.6.27.19-5.1/drivers
 +
 +#endif /* aes.h       */
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt2860/mlme.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/mlme.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/mlme.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/mlme.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1447 @@
 +/*
 + *************************************************************************
@@ -519670,9 +519530,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/mlme.h linux-2.6.27.19-5.1/driver
 +
 +
 +#endif        // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/oid.h linux-2.6.27.19-5.1/drivers/staging/rt2860/oid.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/oid.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/oid.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/oid.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,995 @@
 +/*
 + *************************************************************************
@@ -520669,9 +520529,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/oid.h linux-2.6.27.19-5.1/drivers
 +
 +#endif // _OID_H_
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt2860.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt2860.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt2860.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt2860.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt2860.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,349 @@
 +/*
 + *************************************************************************
@@ -521022,9 +520882,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt2860.h linux-2.6.27.19-5.1/driv
 +
 +#endif //__RT2860_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt28xx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt28xx.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt28xx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt28xx.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2714 @@
 +/*
 + *************************************************************************
@@ -523740,9 +523600,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt28xx.h linux-2.6.27.19-5.1/driv
 +#endif
 +
 +#endif        // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_ate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_ate.c  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,6025 @@
 +/*
 + *************************************************************************
@@ -529769,9 +529629,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.c linux-2.6.27.19-5.1/driv
 +
 +#endif        // RALINK_ATE //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_ate.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_ate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_ate.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,353 @@
 +/*
 + *************************************************************************
@@ -530126,9 +529986,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_ate.h linux-2.6.27.19-5.1/driv
 +    IN  PRTMP_ADAPTER   pAd);
 +#endif // CONFIG_STA_SUPPORT //
 +#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_config.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_config.h       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,101 @@
 +/*
 + *************************************************************************
@@ -530231,9 +530091,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_config.h linux-2.6.27.19-5.1/d
 +
 +#endif        // __RT_CONFIG_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_linux.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_linux.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1054 @@
 +/*
 + *************************************************************************
@@ -531289,9 +531149,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.c linux-2.6.27.19-5.1/dr
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_linux.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_linux.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_linux.h        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,926 @@
 +/*
 + *************************************************************************
@@ -532219,9 +532079,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_linux.h linux-2.6.27.19-5.1/dr
 +#endif // RT2860 //
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_main_dev.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_main_dev.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1686 @@
 +/*
 + *************************************************************************
@@ -533909,9 +533769,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_main_dev.c linux-2.6.27.19-5.1
 +      return NULL;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_profile.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rt_profile.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rt_profile.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rt_profile.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1976 @@
 +/*
 + *************************************************************************
@@ -535889,9 +535749,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rt_profile.c linux-2.6.27.19-5.1/
 +}
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,7177 @@
 +/*
 + *************************************************************************
@@ -543070,9 +542930,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp.h linux-2.6.27.19-5.1/driver
 +
 +#endif  // __RTMP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_ckipmic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_ckipmic.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_ckipmic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_ckipmic.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,113 @@
 +/*
 + *************************************************************************
@@ -543187,9 +543047,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_ckipmic.h linux-2.6.27.19-5.
 +    IN  PUCHAR          mic_snap);
 +
 +#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_def.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_def.h        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1588 @@
 +/*
 + *************************************************************************
@@ -544779,9 +544639,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_def.h linux-2.6.27.19-5.1/dr
 +#endif  // __RTMP_DEF_H__
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_type.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/rtmp_type.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/rtmp_type.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/rtmp_type.h       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,94 @@
 +/*
 + *************************************************************************
@@ -544877,9 +544737,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/rtmp_type.h linux-2.6.27.19-5.1/d
 +
 +#endif  // __RTMP_TYPE_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/spectrum.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/spectrum.h        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,322 @@
 +/*
 + *************************************************************************
@@ -545203,9 +545063,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum.h linux-2.6.27.19-5.1/dr
 +      IN UINT8 Channel);
 +#endif // __SPECTRUM_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/spectrum_def.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/spectrum_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/spectrum_def.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + *************************************************************************
@@ -545302,9 +545162,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/spectrum_def.h linux-2.6.27.19-5.
 +
 +#endif // __SPECTRUM_DEF_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/aironet.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/aironet.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/aironet.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/aironet.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1312 @@
 +/*
 + *************************************************************************
@@ -546618,9 +546478,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/aironet.c linux-2.6.27.19-5.1
 +              pAd->StaCfg.FrameReportLen += Length;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/assoc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/assoc.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/assoc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/assoc.c       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1826 @@
 +/*
 + *************************************************************************
@@ -548448,9 +548308,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/assoc.c linux-2.6.27.19-5.1/d
 +}
 +#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/auth.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/auth.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,474 @@
 +/*
 + *************************************************************************
@@ -548926,9 +548786,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth.c linux-2.6.27.19-5.1/dr
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth_rsp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/auth_rsp.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/auth_rsp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/auth_rsp.c    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,167 @@
 +/*
 + *************************************************************************
@@ -549097,9 +548957,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/auth_rsp.c linux-2.6.27.19-5.
 +    }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/connect.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/connect.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/connect.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/connect.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2751 @@
 +/*
 + *************************************************************************
@@ -551852,9 +551712,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/connect.c linux-2.6.27.19-5.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/dls.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/dls.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/dls.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/dls.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2201 @@
 +/*
 + *************************************************************************
@@ -554057,9 +553917,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/dls.c linux-2.6.27.19-5.1/dri
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/rtmp_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/rtmp_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/rtmp_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/rtmp_data.c   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2614 @@
 +/*
 + *************************************************************************
@@ -556675,9 +556535,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/rtmp_data.c linux-2.6.27.19-5
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sanity.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/sanity.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + *************************************************************************
@@ -557099,9 +556959,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sanity.c linux-2.6.27.19-5.1/
 +    return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/sync.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/sync.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1961 @@
 +/*
 + *************************************************************************
@@ -559064,9 +558924,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/sync.c linux-2.6.27.19-5.1/dr
 +      return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta/wpa.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta/wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta/wpa.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2086 @@
 +/*
 + *************************************************************************
@@ -561154,9 +561014,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta/wpa.c linux-2.6.27.19-5.1/dri
 +      pAd->StaCfg.bBlockAssoc = TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt2860/sta_ioctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/sta_ioctl.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/sta_ioctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/sta_ioctl.c       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,6944 @@
 +/*
 + *************************************************************************
@@ -568102,9 +567962,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/sta_ioctl.c linux-2.6.27.19-5.1/d
 +}
 +#endif // CARRIER_DETECTION_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2860/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt2860/wpa.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2860/wpa.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2860/wpa.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2860/wpa.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,356 @@
 +/*
 + *************************************************************************
@@ -568462,9 +568322,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2860/wpa.h linux-2.6.27.19-5.1/drivers
 +}     RSN_CAPABILITY, *PRSN_CAPABILITY;
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rt2870/2870_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2870/2870_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/2870_main_dev.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/2870_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/2870_main_dev.c   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1612 @@
 +/*
 + *************************************************************************
@@ -570078,9 +569938,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/2870_main_dev.c linux-2.6.27.19-5
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt2870/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/Kconfig 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/Kconfig   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,6 @@
 +config RT2870
 +      tristate "Ralink 2870 wireless support"
@@ -570088,9 +569948,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/Kconfig linux-2.6.27.19-5.1/drive
 +      ---help---
 +        This is an experimental driver for the Ralink 2870 wireless chip.
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/Makefile linux-2.6.27.19-5.1/drivers/staging/rt2870/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/Makefile        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/Makefile  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,47 @@
 +obj-$(CONFIG_RT2870)  += rt2870sta.o
 +
@@ -570139,9 +569999,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/Makefile linux-2.6.27.19-5.1/driv
 +      common/rtusb_data.o     \
 +      common/cmm_data_2870.o
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/TODO linux-2.6.27.19-5.1/drivers/staging/rt2870/TODO
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/TODO    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/TODO
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/TODO      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,10 @@
 +TODO:
 +      - checkpatch.pl clean
@@ -570153,9 +570013,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/TODO linux-2.6.27.19-5.1/drivers/
 +Please send any patches or complaints about this driver to Greg
 +Kroah-Hartman <greg@kroah.com> and don't bother the upstream wireless
 +kernel developers about it, they want nothing to do with it.
-diff -purN linux-2.6.27/drivers/staging/rt2870/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt2870/aironet.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/aironet.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/aironet.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/aironet.h Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,210 @@
 +/*
 + *************************************************************************
@@ -570367,9 +570227,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/aironet.h linux-2.6.27.19-5.1/dri
 +}     CCX_CONTROL, *PCCX_CONTROL;
 +
 +#endif        // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/ap.h linux-2.6.27.19-5.1/drivers/staging/rt2870/ap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/ap.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/ap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/ap.h      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,562 @@
 +/*
 + *************************************************************************
@@ -570933,9 +570793,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/ap.h linux-2.6.27.19-5.1/drivers/
 +
 +#endif  // __AP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt2870/chlist.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/chlist.h        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/chlist.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/chlist.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1296 @@
 +/*
 + *************************************************************************
@@ -572233,9 +572093,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/chlist.h linux-2.6.27.19-5.1/driv
 +}
 +#endif // __CHLIST_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/2870_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/2870_rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/2870_rtmp_init.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/2870_rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/2870_rtmp_init.c   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1778 @@
 +/*
 + *************************************************************************
@@ -574015,9 +573875,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/2870_rtmp_init.c linux-2.6
 +}
 +
 +/* End of 2870_rtmp_init.c */
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/action.c   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1046 @@
 +/*
 + *************************************************************************
@@ -575065,9 +574925,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.c linux-2.6.27.19-5
 +
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.h linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/action.h 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/action.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/action.h   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + *************************************************************************
@@ -575137,9 +574997,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/action.h linux-2.6.27.19-5
 +#endif /* __ACTION_H__ */
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/ba_action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/ba_action.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/ba_action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/ba_action.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1798 @@
 +/*
 + *************************************************************************
@@ -576939,9 +576799,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/ba_action.c linux-2.6.27.1
 +
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_data.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2734 @@
 +/*
 + *************************************************************************
@@ -579677,9 +579537,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data.c linux-2.6.27.19
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data_2870.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data_2870.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_data_2870.c  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_data_2870.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_data_2870.c    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,963 @@
 +/*
 + *************************************************************************
@@ -580644,9 +580504,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_data_2870.c linux-2.6.
 +#endif // CONFIG_STA_SUPPORT //
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_info.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_info.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_info.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_info.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,3712 @@
 +/*
 + *************************************************************************
@@ -584360,9 +584220,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_info.c linux-2.6.27.19
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sanity.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_sanity.c       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1663 @@
 +/*
 + *************************************************************************
@@ -586027,9 +585887,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sanity.c linux-2.6.27.
 +}
 +#endif // QOS_DLS_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_sync.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_sync.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,711 @@
 +/*
 + *************************************************************************
@@ -586742,9 +586602,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_sync.c linux-2.6.27.19
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/cmm_wpa.c        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/cmm_wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/cmm_wpa.c  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1654 @@
 +/*
 + *************************************************************************
@@ -588400,9 +588260,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/cmm_wpa.c linux-2.6.27.19-
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/dfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/dfs.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/dfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/dfs.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,453 @@
 +/*
 + *************************************************************************
@@ -588857,9 +588717,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/dfs.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/eeprom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/eeprom.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/eeprom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/eeprom.c   Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,254 @@
 +/*
 + *************************************************************************
@@ -589115,9 +588975,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/eeprom.c linux-2.6.27.19-5
 +    EEpromCleanup(pAd);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt2870/common/firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/firmware.h       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/firmware.h Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,558 @@
 +/*
 + Copyright (c) 2007, Ralink Technology Corporation
@@ -589677,9 +589537,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/firmware.h linux-2.6.27.19
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe9, 0x00, } ;
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/md5.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/md5.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/md5.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/md5.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1427 @@
 +/*
 + *************************************************************************
@@ -591108,9 +590968,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/md5.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/mlme.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/mlme.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/mlme.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/mlme.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,8609 @@
 +/*
 + *************************************************************************
@@ -599721,9 +599581,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/mlme.c linux-2.6.27.19-5.1
 +              R2));
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/netif_block.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/netif_block.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/netif_block.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/netif_block.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,144 @@
 +/*
 + *************************************************************************
@@ -599869,9 +599729,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/netif_block.c linux-2.6.27
 +      return;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_init.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_init.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,4132 @@
 +/*
 + *************************************************************************
@@ -604005,9 +603865,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_init.c linux-2.6.27.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_tkip.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_tkip.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_tkip.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_tkip.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1613 @@
 +/*
 + *************************************************************************
@@ -605622,9 +605482,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_tkip.c linux-2.6.27.1
 +      xor_32(temp, tempb, out);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_wep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtmp_wep.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtmp_wep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtmp_wep.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,508 @@
 +/*
 + *************************************************************************
@@ -606134,9 +605994,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtmp_wep.c linux-2.6.27.19
 +      ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_bulk.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_bulk.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_bulk.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_bulk.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_bulk.c       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1981 @@
 + /*
 + *************************************************************************
@@ -608119,9 +607979,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_bulk.c linux-2.6.27.
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_data.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_data.c       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,229 @@
 +/*
 + *************************************************************************
@@ -608352,9 +608212,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_data.c linux-2.6.27.
 +      pTxInfo->rsv2 = 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_io.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/rtusb_io.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/rtusb_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/rtusb_io.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2006 @@
 +/*
 + *************************************************************************
@@ -610362,9 +610222,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/rtusb_io.c linux-2.6.27.19
 +      }       /* end of while */
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt2870/common/spectrum.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/common/spectrum.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/common/spectrum.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/common/spectrum.c Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1876 @@
 +/*
 + *************************************************************************
@@ -612242,9 +612102,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/common/spectrum.c linux-2.6.27.19
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt2870/dfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/dfs.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/dfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/dfs.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,100 @@
 +/*
 + *************************************************************************
@@ -612346,9 +612206,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/dfs.h linux-2.6.27.19-5.1/drivers
 +      IN PUCHAR arg);
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/leap.h linux-2.6.27.19-5.1/drivers/staging/rt2870/leap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/leap.h  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/leap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/leap.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,215 @@
 +/*
 + *************************************************************************
@@ -612565,9 +612425,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/leap.h linux-2.6.27.19-5.1/driver
 +    IN ULONG            MsgLen);
 +
 +#endif  // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt2870/link_list.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/link_list.h     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/link_list.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/link_list.h       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + *************************************************************************
@@ -612703,9 +612563,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/link_list.h linux-2.6.27.19-5.1/d
 +
 +#endif // ___LINK_LIST_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/md4.h linux-2.6.27.19-5.1/drivers/staging/rt2870/md4.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/md4.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/md4.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/md4.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,42 @@
 +/*
 + *************************************************************************
@@ -612750,9 +612610,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/md4.h linux-2.6.27.19-5.1/drivers
 +
 +#endif //__MD4_H__
 \ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt2870/md5.h linux-2.6.27.19-5.1/drivers/staging/rt2870/md5.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/md5.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/md5.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/md5.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,107 @@
 +/*
 + *************************************************************************
@@ -612861,9 +612721,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/md5.h linux-2.6.27.19-5.1/drivers
 +
 +#endif /* aes.h       */
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt2870/mlme.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/mlme.h  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/mlme.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/mlme.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1471 @@
 +/*
 + *************************************************************************
@@ -614336,9 +614196,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/mlme.h linux-2.6.27.19-5.1/driver
 +
 +
 +#endif        // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt2870/netif_block.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/netif_block.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/netif_block.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/netif_block.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,58 @@
 +/*
 + *************************************************************************
@@ -614398,9 +614258,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/netif_block.h linux-2.6.27.19-5.1
 +      IN PNDIS_PACKET pPacket);
 +#endif // __NET_IF_BLOCK_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/oid.h linux-2.6.27.19-5.1/drivers/staging/rt2870/oid.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/oid.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/oid.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/oid.h     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1091 @@
 +/*
 + *************************************************************************
@@ -615493,9 +615353,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/oid.h linux-2.6.27.19-5.1/drivers
 +
 +#endif // _OID_H_
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt2870.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt2870.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt2870.h        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt2870.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt2870.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,761 @@
 +/*
 + *************************************************************************
@@ -616258,9 +616118,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt2870.h linux-2.6.27.19-5.1/driv
 +    RT28xxUsbMlmeRadioOFF(pAd);
 +
 +#endif //__RT2870_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt28xx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt28xx.h        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt28xx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt28xx.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2689 @@
 +/*
 + *************************************************************************
@@ -618951,9 +618811,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt28xx.h linux-2.6.27.19-5.1/driv
 +#endif
 +
 +#endif        // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.c        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_ate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_ate.c  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,6452 @@
 +/*
 + *************************************************************************
@@ -625407,9 +625267,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.c linux-2.6.27.19-5.1/driv
 +
 +#endif        // RALINK_ATE //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_ate.h        2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_ate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_ate.h  Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,315 @@
 +/*
 + *************************************************************************
@@ -625726,9 +625586,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_ate.h linux-2.6.27.19-5.1/driv
 +    IN  PRTMP_ADAPTER   pAd);
 +#endif // CONFIG_STA_SUPPORT //
 +#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_config.h     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_config.h       Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,104 @@
 +/*
 + *************************************************************************
@@ -625834,9 +625694,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_config.h linux-2.6.27.19-5.1/d
 +
 +#endif        // __RT_CONFIG_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_linux.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_linux.c        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1095 @@
 +/*
 + *************************************************************************
@@ -626933,9 +626793,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.c linux-2.6.27.19-5.1/dr
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_linux.h      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_linux.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_linux.h        Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,908 @@
 +/*
 + *************************************************************************
@@ -627845,9 +627705,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_linux.h linux-2.6.27.19-5.1/dr
 +void rtmp_os_thread_init(PUCHAR pThreadName, PVOID pNotify);
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_main_dev.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_main_dev.c     Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,1863 @@
 +/*
 + *************************************************************************
@@ -629712,9 +629572,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_main_dev.c linux-2.6.27.19-5.1
 +      return NULL;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_profile.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rt_profile.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rt_profile.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rt_profile.c      Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,2016 @@
 +/*
 + *************************************************************************
@@ -631732,9 +631592,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rt_profile.c linux-2.6.27.19-5.1/
 +}
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp.h    Wed May 06 16:56:39 2009 +0100
 @@ -0,0 +1,7586 @@
 +/*
 + *************************************************************************
@@ -639322,9 +639182,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp.h linux-2.6.27.19-5.1/driver
 +
 +#endif  // __RTMP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_ckipmic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_ckipmic.h  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_ckipmic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_ckipmic.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,113 @@
 +/*
 + *************************************************************************
@@ -639439,9 +639299,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_ckipmic.h linux-2.6.27.19-5.
 +    IN  PUCHAR          mic_snap);
 +
 +#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_def.h      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_def.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1622 @@
 +/*
 + *************************************************************************
@@ -641065,9 +640925,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_def.h linux-2.6.27.19-5.1/dr
 +#endif  // __RTMP_DEF_H__
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_type.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/rtmp_type.h     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/rtmp_type.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/rtmp_type.h       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,94 @@
 +/*
 + *************************************************************************
@@ -641163,9 +641023,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/rtmp_type.h linux-2.6.27.19-5.1/d
 +
 +#endif  // __RTMP_TYPE_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum.h      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/spectrum.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/spectrum.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,322 @@
 +/*
 + *************************************************************************
@@ -641489,9 +641349,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum.h linux-2.6.27.19-5.1/dr
 +      IN UINT8 Channel);
 +#endif // __SPECTRUM_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/spectrum_def.h  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/spectrum_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/spectrum_def.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + *************************************************************************
@@ -641588,9 +641448,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/spectrum_def.h linux-2.6.27.19-5.
 +
 +#endif // __SPECTRUM_DEF_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/aironet.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/aironet.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/aironet.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/aironet.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1312 @@
 +/*
 + *************************************************************************
@@ -642904,9 +642764,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/aironet.c linux-2.6.27.19-5.1
 +              pAd->StaCfg.FrameReportLen += Length;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/assoc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/assoc.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/assoc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/assoc.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2039 @@
 +/*
 + *************************************************************************
@@ -644947,9 +644807,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/assoc.c linux-2.6.27.19-5.1/d
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/auth.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/auth.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,474 @@
 +/*
 + *************************************************************************
@@ -645425,9 +645285,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth.c linux-2.6.27.19-5.1/dr
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth_rsp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/auth_rsp.c  2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/auth_rsp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/auth_rsp.c    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,166 @@
 +/*
 + *************************************************************************
@@ -645595,9 +645455,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/auth_rsp.c linux-2.6.27.19-5.
 +    }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/connect.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/connect.c   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/connect.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/connect.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2822 @@
 +/*
 + *************************************************************************
@@ -648421,9 +648281,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/connect.c linux-2.6.27.19-5.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/dls.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/dls.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/dls.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/dls.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2210 @@
 +/*
 + *************************************************************************
@@ -650635,9 +650495,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/dls.c linux-2.6.27.19-5.1/dri
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/rtmp_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/rtmp_data.c 2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/rtmp_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/rtmp_data.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2619 @@
 +/*
 + *************************************************************************
@@ -653258,9 +653118,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/rtmp_data.c linux-2.6.27.19-5
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sanity.c    2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/sanity.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + *************************************************************************
@@ -653682,9 +653542,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sanity.c linux-2.6.27.19-5.1/
 +    return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/sync.c      2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/sync.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1753 @@
 +/*
 + *************************************************************************
@@ -655439,9 +655299,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/sync.c linux-2.6.27.19-5.1/dr
 +      return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta/wpa.c       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta/wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta/wpa.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2107 @@
 +/*
 + *************************************************************************
@@ -657550,9 +657410,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta/wpa.c linux-2.6.27.19-5.1/dri
 +      pAd->StaCfg.bBlockAssoc = TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c     2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta_ioctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta_ioctl.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,7068 @@
 +/*
 + *************************************************************************
@@ -664622,9 +664482,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c linux-2.6.27.19-5.1/d
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c.patch linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c.patch
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/sta_ioctl.c.patch       2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/sta_ioctl.c.patch
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/sta_ioctl.c.patch Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,18 @@
 +--- sta_ioctl.c       2008-09-19 14:37:52.000000000 +0800
 ++++ sta_ioctl.c.fc9   2008-09-19 14:38:20.000000000 +0800
@@ -664644,9 +664504,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/sta_ioctl.c.patch linux-2.6.27.19
 +
 + extern UCHAR    CipherWpa2Template[];
 + extern UCHAR    CipherWpaPskTkip[];
-diff -purN linux-2.6.27/drivers/staging/rt2870/tmp60 linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp60
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp60   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/tmp60
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/tmp60     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,7037 @@
 +/*
 + *************************************************************************
@@ -671685,9 +671545,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/tmp60 linux-2.6.27.19-5.1/drivers
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/tmp61 linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp61
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/tmp61   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/tmp61
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/tmp61     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,7037 @@
 +/*
 + *************************************************************************
@@ -678726,9 +678586,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/tmp61 linux-2.6.27.19-5.1/drivers
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt2870/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt2870/wpa.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt2870/wpa.h   2009-03-25 16:11:11.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt2870/wpa.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt2870/wpa.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,357 @@
 +/*
 + *************************************************************************
@@ -679087,9 +678947,9 @@ diff -purN linux-2.6.27/drivers/staging/rt2870/wpa.h linux-2.6.27.19-5.1/drivers
 +}     RSN_CAPABILITY, *PRSN_CAPABILITY;
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rt3070/2870_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt3070/2870_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/2870_main_dev.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/2870_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/2870_main_dev.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1627 @@
 +/*
 + *************************************************************************
@@ -680718,9 +680578,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/2870_main_dev.c linux-2.6.27.19-5
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/Kconfig linux-2.6.27.19-5.1/drivers/staging/rt3070/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/Kconfig 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/Kconfig   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,6 @@
 +config RT3070
 +      tristate "Ralink 3070 wireless support"
@@ -680728,9 +680588,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/Kconfig linux-2.6.27.19-5.1/drive
 +      ---help---
 +        This is an experimental driver for the Ralink 3070 wireless chip.
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/Makefile linux-2.6.27.19-5.1/drivers/staging/rt3070/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/Makefile        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/Makefile  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,47 @@
 +obj-$(CONFIG_RT3070)  += rt3070sta.o
 +
@@ -680779,9 +680639,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/Makefile linux-2.6.27.19-5.1/driv
 +      common/rtusb_data.o     \
 +      common/cmm_data_2870.o
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/action.h linux-2.6.27.19-5.1/drivers/staging/rt3070/action.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/action.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/action.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/action.h  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + *************************************************************************
@@ -680851,9 +680711,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/action.h linux-2.6.27.19-5.1/driv
 +#endif /* __ACTION_H__ */
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/aironet.h linux-2.6.27.19-5.1/drivers/staging/rt3070/aironet.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/aironet.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/aironet.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/aironet.h Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,210 @@
 +/*
 + *************************************************************************
@@ -681065,9 +680925,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/aironet.h linux-2.6.27.19-5.1/dri
 +}     CCX_CONTROL, *PCCX_CONTROL;
 +
 +#endif        // __AIRONET_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/ap.h linux-2.6.27.19-5.1/drivers/staging/rt3070/ap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/ap.h    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/ap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/ap.h      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,557 @@
 +/*
 + *************************************************************************
@@ -681626,9 +681486,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/ap.h linux-2.6.27.19-5.1/drivers/
 +
 +#endif  // __AP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/chlist.h linux-2.6.27.19-5.1/drivers/staging/rt3070/chlist.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/chlist.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/chlist.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/chlist.h  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1253 @@
 +/*
 + *************************************************************************
@@ -682883,9 +682743,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/chlist.h linux-2.6.27.19-5.1/driv
 +}
 +#endif // __CHLIST_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/2870_rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/2870_rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/2870_rtmp_init.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/2870_rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/2870_rtmp_init.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1762 @@
 +/*
 + *************************************************************************
@@ -684649,9 +684509,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/2870_rtmp_init.c linux-2.6
 +}
 +
 +/* End of 2870_rtmp_init.c */
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/action.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/action.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/action.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1038 @@
 +/*
 + *************************************************************************
@@ -685691,9 +685551,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/action.c linux-2.6.27.19-5
 +
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/ba_action.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/ba_action.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/ba_action.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/ba_action.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/ba_action.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1810 @@
 +/*
 + *************************************************************************
@@ -687505,9 +687365,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/ba_action.c linux-2.6.27.1
 +
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_data.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2827 @@
 +/*
 + *************************************************************************
@@ -690336,9 +690196,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data.c linux-2.6.27.19
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data_2870.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data_2870.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_data_2870.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_data_2870.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_data_2870.c    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,980 @@
 +/*
 + *************************************************************************
@@ -691320,9 +691180,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_data_2870.c linux-2.6.
 +#endif // CONFIG_STA_SUPPORT //
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_info.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_info.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_info.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_info.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_info.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,3395 @@
 +/*
 + *************************************************************************
@@ -694719,9 +694579,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_info.c linux-2.6.27.19
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sanity.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sanity.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_sanity.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1669 @@
 +/*
 + *************************************************************************
@@ -696392,9 +696252,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sanity.c linux-2.6.27.
 +}
 +#endif // QOS_DLS_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sync.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_sync.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_sync.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,711 @@
 +/*
 + *************************************************************************
@@ -697107,9 +696967,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_sync.c linux-2.6.27.19
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_wpa.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/cmm_wpa.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/cmm_wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/cmm_wpa.c  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1606 @@
 +/*
 + *************************************************************************
@@ -698717,9 +698577,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/cmm_wpa.c linux-2.6.27.19-
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/dfs.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/dfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/dfs.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/dfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/dfs.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,441 @@
 +/*
 + *************************************************************************
@@ -699162,9 +699022,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/dfs.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/eeprom.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/eeprom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/eeprom.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/eeprom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/eeprom.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1498 @@
 +/*
 + *************************************************************************
@@ -700664,9 +700524,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/eeprom.c linux-2.6.27.19-5
 +#endif // RT30xx //
 +//2008/09/11:KH add to support efuse-->
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/md5.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/md5.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/md5.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/md5.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/md5.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1427 @@
 +/*
 + *************************************************************************
@@ -702095,9 +701955,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/md5.c linux-2.6.27.19-5.1/
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/mlme.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/mlme.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/mlme.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/mlme.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/mlme.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,9136 @@
 +/*
 + *************************************************************************
@@ -711235,9 +711095,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/mlme.c linux-2.6.27.19-5.1
 +
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/netif_block.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/netif_block.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/netif_block.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/netif_block.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/netif_block.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,136 @@
 +/*
 + *************************************************************************
@@ -711375,9 +711235,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/netif_block.c linux-2.6.27
 +      return;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_init.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_init.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_init.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,4197 @@
 +/*
 + *************************************************************************
@@ -715576,9 +715436,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_init.c linux-2.6.27.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_tkip.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_tkip.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_tkip.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_tkip.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_tkip.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1613 @@
 +/*
 + *************************************************************************
@@ -717193,9 +717053,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_tkip.c linux-2.6.27.1
 +      xor_32(temp, tempb, out);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_wep.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_wep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtmp_wep.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtmp_wep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtmp_wep.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,508 @@
 +/*
 + *************************************************************************
@@ -717705,9 +717565,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtmp_wep.c linux-2.6.27.19
 +      ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_bulk.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_bulk.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_bulk.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_bulk.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_bulk.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1382 @@
 +/*
 + *************************************************************************
@@ -719091,9 +718951,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_bulk.c linux-2.6.27.
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_data.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_data.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,218 @@
 +/*
 + *************************************************************************
@@ -719313,9 +719173,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_data.c linux-2.6.27.
 +      pTxInfo->rsv2 = 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_io.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/rtusb_io.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/rtusb_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/rtusb_io.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1908 @@
 +/*
 + *************************************************************************
@@ -721225,9 +721085,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/rtusb_io.c linux-2.6.27.19
 +      }       /* end of while */
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/common/spectrum.c linux-2.6.27.19-5.1/drivers/staging/rt3070/common/spectrum.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/common/spectrum.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/common/spectrum.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/common/spectrum.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1876 @@
 +/*
 + *************************************************************************
@@ -723105,9 +722965,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/common/spectrum.c linux-2.6.27.19
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/dfs.h linux-2.6.27.19-5.1/drivers/staging/rt3070/dfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/dfs.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/dfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/dfs.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,100 @@
 +/*
 + *************************************************************************
@@ -723209,9 +723069,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/dfs.h linux-2.6.27.19-5.1/drivers
 +      IN PUCHAR arg);
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/firmware.h linux-2.6.27.19-5.1/drivers/staging/rt3070/firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/firmware.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/firmware.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,558 @@
 +/*
 + Copyright (c) 2007, Ralink Technology Corporation
@@ -723771,9 +723631,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/firmware.h linux-2.6.27.19-5.1/dr
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9b, 0xc0, } ;
-diff -purN linux-2.6.27/drivers/staging/rt3070/leap.h linux-2.6.27.19-5.1/drivers/staging/rt3070/leap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/leap.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/leap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/leap.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,215 @@
 +/*
 + *************************************************************************
@@ -723990,9 +723850,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/leap.h linux-2.6.27.19-5.1/driver
 +    IN ULONG            MsgLen);
 +
 +#endif  // __LEAP_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/link_list.h linux-2.6.27.19-5.1/drivers/staging/rt3070/link_list.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/link_list.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/link_list.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/link_list.h       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + *************************************************************************
@@ -724128,9 +723988,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/link_list.h linux-2.6.27.19-5.1/d
 +
 +#endif // ___LINK_LIST_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/md4.h linux-2.6.27.19-5.1/drivers/staging/rt3070/md4.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/md4.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/md4.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/md4.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,42 @@
 +/*
 + *************************************************************************
@@ -724175,9 +724035,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/md4.h linux-2.6.27.19-5.1/drivers
 +
 +#endif //__MD4_H__
 \ No newline at end of file
-diff -purN linux-2.6.27/drivers/staging/rt3070/md5.h linux-2.6.27.19-5.1/drivers/staging/rt3070/md5.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/md5.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/md5.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/md5.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,107 @@
 +/*
 + *************************************************************************
@@ -724286,9 +724146,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/md5.h linux-2.6.27.19-5.1/drivers
 +
 +#endif /* aes.h       */
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/mlme.h linux-2.6.27.19-5.1/drivers/staging/rt3070/mlme.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/mlme.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/mlme.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/mlme.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1468 @@
 +/*
 + *************************************************************************
@@ -725758,9 +725618,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/mlme.h linux-2.6.27.19-5.1/driver
 +
 +
 +#endif        // MLME_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/netif_block.h linux-2.6.27.19-5.1/drivers/staging/rt3070/netif_block.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/netif_block.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/netif_block.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/netif_block.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,58 @@
 +/*
 + *************************************************************************
@@ -725820,9 +725680,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/netif_block.h linux-2.6.27.19-5.1
 +      IN PNDIS_PACKET pPacket);
 +#endif // __NET_IF_BLOCK_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/oid.h linux-2.6.27.19-5.1/drivers/staging/rt3070/oid.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/oid.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/oid.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/oid.h     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1142 @@
 +/*
 + *************************************************************************
@@ -726966,9 +726826,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/oid.h linux-2.6.27.19-5.1/drivers
 +
 +#endif // _OID_H_
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt2870.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt2870.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt2870.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt2870.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt2870.h  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,756 @@
 +/*
 + *************************************************************************
@@ -727726,9 +727586,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt2870.h linux-2.6.27.19-5.1/driv
 +    RT28xxUsbMlmeRadioOFF(pAd);
 +
 +#endif //__RT2870_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt28xx.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt28xx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt28xx.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt28xx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt28xx.h  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2725 @@
 +/*
 + *************************************************************************
@@ -730455,9 +730315,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt28xx.h linux-2.6.27.19-5.1/driv
 +#endif
 +
 +#endif        // __RT28XX_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.c        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_ate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_ate.c  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,6506 @@
 +/*
 + *************************************************************************
@@ -736965,9 +736825,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.c linux-2.6.27.19-5.1/driv
 +#endif        // RALINK_28xx_QA //
 +#endif        // RALINK_ATE //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_ate.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_ate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_ate.h  Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,294 @@
 +/*
 + *************************************************************************
@@ -737263,9 +737123,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_ate.h linux-2.6.27.19-5.1/driv
 +    IN  PRTMP_ADAPTER   pAd);
 +#endif // CONFIG_STA_SUPPORT //
 +#endif // __ATE_H__ //
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_config.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_config.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_config.h       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,121 @@
 +/*
 + *************************************************************************
@@ -737388,9 +737248,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_config.h linux-2.6.27.19-5.1/d
 +
 +#endif        // __RT_CONFIG_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_linux.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_linux.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1063 @@
 +/*
 + *************************************************************************
@@ -738455,9 +738315,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.c linux-2.6.27.19-5.1/dr
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_linux.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_linux.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_linux.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,887 @@
 +/*
 + *************************************************************************
@@ -739346,9 +739206,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_linux.h linux-2.6.27.19-5.1/dr
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_main_dev.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_main_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_main_dev.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_main_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_main_dev.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1800 @@
 +/*
 + *************************************************************************
@@ -741150,9 +741010,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_main_dev.c linux-2.6.27.19-5.1
 +      return NULL;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rt_profile.c linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_profile.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rt_profile.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rt_profile.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rt_profile.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2041 @@
 +/*
 + *************************************************************************
@@ -743195,9 +743055,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rt_profile.c linux-2.6.27.19-5.1/
 +}
 +#endif // DOT11_N_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,7728 @@
 +/*
 + *************************************************************************
@@ -750927,9 +750787,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp.h linux-2.6.27.19-5.1/driver
 +
 +#endif  // __RTMP_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_ckipmic.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_ckipmic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_ckipmic.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_ckipmic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_ckipmic.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,113 @@
 +/*
 + *************************************************************************
@@ -751044,9 +750904,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_ckipmic.h linux-2.6.27.19-5.
 +    IN  PUCHAR          mic_snap);
 +
 +#endif //__RTMP_CKIPMIC_H__
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_def.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_def.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_def.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1559 @@
 +/*
 + *************************************************************************
@@ -752607,9 +752467,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_def.h linux-2.6.27.19-5.1/dr
 +#endif  // __RTMP_DEF_H__
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_type.h linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_type.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/rtmp_type.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/rtmp_type.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/rtmp_type.h       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + *************************************************************************
@@ -752706,9 +752566,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/rtmp_type.h linux-2.6.27.19-5.1/d
 +
 +#endif  // __RTMP_TYPE_H__
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum.h linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/spectrum.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/spectrum.h        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,322 @@
 +/*
 + *************************************************************************
@@ -753032,9 +752892,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum.h linux-2.6.27.19-5.1/dr
 +      IN UINT8 Channel);
 +#endif // __SPECTRUM_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum_def.h linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/spectrum_def.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/spectrum_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/spectrum_def.h    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + *************************************************************************
@@ -753131,9 +752991,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/spectrum_def.h linux-2.6.27.19-5.
 +
 +#endif // __SPECTRUM_DEF_H__ //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/aironet.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/aironet.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/aironet.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/aironet.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/aironet.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1312 @@
 +/*
 + *************************************************************************
@@ -754447,9 +754307,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/aironet.c linux-2.6.27.19-5.1
 +              pAd->StaCfg.FrameReportLen += Length;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/assoc.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/assoc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/assoc.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/assoc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/assoc.c       Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2060 @@
 +/*
 + *************************************************************************
@@ -756511,9 +756371,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/assoc.c linux-2.6.27.19-5.1/d
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/auth.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/auth.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,475 @@
 +/*
 + *************************************************************************
@@ -756990,9 +756850,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth.c linux-2.6.27.19-5.1/dr
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth_rsp.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth_rsp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/auth_rsp.c  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/auth_rsp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/auth_rsp.c    Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,167 @@
 +/*
 + *************************************************************************
@@ -757161,9 +757021,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/auth_rsp.c linux-2.6.27.19-5.
 +    }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/connect.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/connect.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/connect.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/connect.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/connect.c     Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2857 @@
 +/*
 + *************************************************************************
@@ -760022,9 +759882,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/connect.c linux-2.6.27.19-5.1
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/dls.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/dls.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/dls.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/dls.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/dls.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2170 @@
 +/*
 + *************************************************************************
@@ -762196,9 +762056,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/dls.c linux-2.6.27.19-5.1/dri
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/rtmp_data.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/rtmp_data.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/rtmp_data.c 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/rtmp_data.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/rtmp_data.c   Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2637 @@
 +/*
 + *************************************************************************
@@ -764837,9 +764697,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/rtmp_data.c linux-2.6.27.19-5
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sanity.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sanity.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sanity.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/sanity.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/sanity.c      Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + *************************************************************************
@@ -765261,9 +765121,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sanity.c linux-2.6.27.19-5.1/
 +    return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sync.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sync.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/sync.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/sync.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/sync.c        Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,1755 @@
 +/*
 + *************************************************************************
@@ -767020,9 +766880,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/sync.c linux-2.6.27.19-5.1/dr
 +      return (pAd->Mlme.SyncMachine.CurrState == SCAN_LISTEN) ? TRUE : FALSE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta/wpa.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/wpa.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta/wpa.c       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta/wpa.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta/wpa.c Wed May 06 16:56:40 2009 +0100
 @@ -0,0 +1,2099 @@
 +/*
 + *************************************************************************
@@ -769123,9 +768983,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta/wpa.c linux-2.6.27.19-5.1/dri
 +      pAd->StaCfg.bBlockAssoc = TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/sta_ioctl.c linux-2.6.27.19-5.1/drivers/staging/rt3070/sta_ioctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/sta_ioctl.c     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/sta_ioctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/sta_ioctl.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,7203 @@
 +/*
 + *************************************************************************
@@ -776330,9 +776190,9 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/sta_ioctl.c linux-2.6.27.19-5.1/d
 +}
 +#endif // CARRIER_DETECTION_SUPPORT //
 +
-diff -purN linux-2.6.27/drivers/staging/rt3070/wpa.h linux-2.6.27.19-5.1/drivers/staging/rt3070/wpa.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rt3070/wpa.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rt3070/wpa.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rt3070/wpa.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,356 @@
 +/*
 + *************************************************************************
@@ -776690,18 +776550,18 @@ diff -purN linux-2.6.27/drivers/staging/rt3070/wpa.h linux-2.6.27.19-5.1/drivers
 +}     RSN_CAPABILITY, *PRSN_CAPABILITY;
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/Kconfig linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Kconfig      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/Kconfig        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,5 @@
 +config RTL8187SE
 +      tristate "RealTek RTL8187SE Wireless LAN NIC driver"
 +      depends on PCI
 +      default N
 +      ---help---
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/Makefile linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/Makefile     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/Makefile       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,55 @@
 +
 +#EXTRA_CFLAGS += -DCONFIG_IEEE80211_NOWEP=y
@@ -776758,9 +776618,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/Makefile linux-2.6.27.19-5.1/d
 +
 +obj-$(CONFIG_RTL8187SE)       += rtl8187se.o
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/dot11d.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/dot11d.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/dot11d.h     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/dot11d.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/dot11d.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,101 @@
 +#ifndef __INC_DOT11D_H\r
 +#define __INC_DOT11D_H\r
@@ -776863,365 +776723,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/dot11d.h linux-2.6.27.19-5.1/d
 +);\r
 +\r
 +#endif // #ifndef __INC_DOT11D_H\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/dot11d.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.c   2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,246 @@
-+#ifdef ENABLE_DOT11D\r
-+//-----------------------------------------------------------------------------\r
-+//    File:\r
-+//            Dot11d.c\r
-+//\r
-+//    Description:\r
-+//            Implement 802.11d. \r
-+//\r
-+//-----------------------------------------------------------------------------\r
-+\r
-+#include "dot11d.h"\r
-+\r
-+void\r
-+Dot11d_Init(struct ieee80211_device *ieee)\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
-+\r
-+      pDot11dInfo->bEnabled = 0;\r
-+\r
-+      pDot11dInfo->State = DOT11D_STATE_NONE;\r
-+      pDot11dInfo->CountryIeLen = 0;\r
-+      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);  \r
-+      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+      RESET_CIE_WATCHDOG(ieee);\r
-+\r
-+      printk("Dot11d_Init()\n");\r
-+}\r
-+\r
-+//\r
-+//    Description:\r
-+//            Reset to the state as we are just entering a regulatory domain.\r
-+//\r
-+void\r
-+Dot11d_Reset(struct ieee80211_device *ieee)\r
-+{\r
-+      u32 i;\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
-+\r
-+      // Clear old channel map\r
-+      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
-+      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+      // Set new channel map\r
-+      for (i=1; i<=11; i++) {\r
-+              (pDot11dInfo->channel_map)[i] = 1;\r
-+      }\r
-+      for (i=12; i<=14; i++) {\r
-+              (pDot11dInfo->channel_map)[i] = 2;\r
-+      }\r
-+\r
-+      pDot11dInfo->State = DOT11D_STATE_NONE;\r
-+      pDot11dInfo->CountryIeLen = 0;\r
-+      RESET_CIE_WATCHDOG(ieee);\r
-+\r
-+      //printk("Dot11d_Reset()\n");\r
-+}\r
-+\r
-+//\r
-+//    Description:\r
-+//            Update country IE from Beacon or Probe Resopnse \r
-+//            and configure PHY for operation in the regulatory domain.\r
-+//\r
-+//    TODO: \r
-+//            Configure Tx power.\r
-+//\r
-+//    Assumption:\r
-+//            1. IS_DOT11D_ENABLE() is TRUE.\r
-+//            2. Input IE is an valid one.\r
-+//\r
-+void\r
-+Dot11d_UpdateCountryIe(\r
-+      struct ieee80211_device *dev,\r
-+      u8 *            pTaddr,\r
-+      u16     CoutryIeLen,\r
-+      u8 * pCoutryIe   \r
-+      )\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+      u8 i, j, NumTriples, MaxChnlNum;\r
-+      PCHNL_TXPOWER_TRIPLE pTriple;\r
-+\r
-+      if((CoutryIeLen - 3)%3 != 0)\r
-+      {\r
-+              printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
-+              Dot11d_Reset(dev);\r
-+              return;\r
-+      }\r
-+\r
-+      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
-+      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
-+      MaxChnlNum = 0;\r
-+      NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.\r
-+      pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);\r
-+      for(i = 0; i < NumTriples; i++)\r
-+      {\r
-+              if(MaxChnlNum >= pTriple->FirstChnl)\r
-+              { // It is not in a monotonically increasing order, so stop processing.\r
-+                      printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
-+                      Dot11d_Reset(dev);\r
-+                      return; \r
-+              }\r
-+              if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls))\r
-+              { // It is not a valid set of channel id, so stop processing.\r
-+                      printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");\r
-+                      Dot11d_Reset(dev);\r
-+                      return; \r
-+              }\r
-+\r
-+              for(j = 0 ; j < pTriple->NumChnls; j++)\r
-+              {\r
-+                      pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;\r
-+                      pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;\r
-+                      MaxChnlNum = pTriple->FirstChnl + j;\r
-+              }       \r
-+\r
-+              pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3);\r
-+      }\r
-+#if 1\r
-+      //printk("Dot11d_UpdateCountryIe(): Channel List:\n");\r
-+      printk("Channel List:");\r
-+      for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+              if(pDot11dInfo->channel_map[i] > 0)\r
-+                      printk(" %d", i);\r
-+      printk("\n");\r
-+#endif\r
-+\r
-+      UPDATE_CIE_SRC(dev, pTaddr);\r
-+\r
-+      pDot11dInfo->CountryIeLen = CoutryIeLen;\r
-+      memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen);\r
-+      pDot11dInfo->State = DOT11D_STATE_LEARNED;\r
-+}\r
-+\r
-+void dump_chnl_map(u8 * channel_map)\r
-+{\r
-+      int i;\r
-+      printk("Channel List:");\r
-+      for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+              if(channel_map[i] > 0)\r
-+                      printk(" %d(%d)", i, channel_map[i]);\r
-+      printk("\n");\r
-+}\r
-+\r
-+u8\r
-+DOT11D_GetMaxTxPwrInDbm(\r
-+      struct ieee80211_device *dev,\r
-+      u8 Channel\r
-+      )\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+      u8 MaxTxPwrInDbm = 255;\r
-+\r
-+      if(MAX_CHANNEL_NUMBER < Channel)\r
-+      { \r
-+              printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");\r
-+              return MaxTxPwrInDbm; \r
-+      }\r
-+      if(pDot11dInfo->channel_map[Channel])\r
-+      {\r
-+              MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel];  \r
-+      }\r
-+\r
-+      return MaxTxPwrInDbm;\r
-+}\r
-+\r
-+\r
-+void\r
-+DOT11D_ScanComplete(\r
-+      struct ieee80211_device * dev\r
-+      )\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+\r
-+      switch(pDot11dInfo->State)\r
-+      {\r
-+      case DOT11D_STATE_LEARNED:\r
-+              pDot11dInfo->State = DOT11D_STATE_DONE;\r
-+              break;\r
-+\r
-+      case DOT11D_STATE_DONE:\r
-+              if( GET_CIE_WATCHDOG(dev) == 0 )\r
-+              { // Reset country IE if previous one is gone. \r
-+                      Dot11d_Reset(dev); \r
-+              }\r
-+              break;\r
-+      case DOT11D_STATE_NONE:\r
-+              break;\r
-+      }\r
-+}\r
-+\r
-+int IsLegalChannel(\r
-+      struct ieee80211_device * dev,\r
-+      u8 channel\r
-+)\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+\r
-+      if(MAX_CHANNEL_NUMBER < channel)\r
-+      { \r
-+              printk("IsLegalChannel(): Invalid Channel\n");\r
-+              return 0; \r
-+      }\r
-+      if(pDot11dInfo->channel_map[channel] > 0)\r
-+              return 1;\r
-+      return 0;\r
-+}\r
-+\r
-+int ToLegalChannel(\r
-+      struct ieee80211_device * dev,\r
-+      u8 channel\r
-+)\r
-+{\r
-+      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
-+      u8 default_chn = 0;\r
-+      u32 i = 0;\r
-+\r
-+      for (i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
-+      {\r
-+              if(pDot11dInfo->channel_map[i] > 0)\r
-+              {\r
-+                      default_chn = i;\r
-+                      break;\r
-+              }\r
-+      }\r
-+\r
-+      if(MAX_CHANNEL_NUMBER < channel)\r
-+      { \r
-+              printk("IsLegalChannel(): Invalid Channel\n");\r
-+              return default_chn; \r
-+      }\r
-+      \r
-+      if(pDot11dInfo->channel_map[channel] > 0)\r
-+              return channel;\r
-+      \r
-+      return default_chn;\r
-+}\r
-+\r
-+#if 0\r
-+EXPORT_SYMBOL(Dot11d_Init);\r
-+EXPORT_SYMBOL(Dot11d_Reset);\r
-+EXPORT_SYMBOL(Dot11d_UpdateCountryIe);\r
-+EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);\r
-+EXPORT_SYMBOL(DOT11D_ScanComplete);\r
-+EXPORT_SYMBOL(IsLegalChannel);\r
-+EXPORT_SYMBOL(ToLegalChannel);\r
-+#endif\r
-+#endif\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/dot11d.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/dot11d.h   2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,102 @@
-+#ifndef __INC_DOT11D_H\r
-+#define __INC_DOT11D_H\r
-+\r
-+#include "ieee80211.h"\r
-+\r
-+//#define ENABLE_DOT11D\r
-+\r
-+//#define DOT11D_MAX_CHNL_NUM 83\r
-+\r
-+typedef struct _CHNL_TXPOWER_TRIPLE {\r
-+      u8 FirstChnl;\r
-+      u8  NumChnls;\r
-+      u8  MaxTxPowerInDbm;\r
-+}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;\r
-+\r
-+typedef enum _DOT11D_STATE {\r
-+      DOT11D_STATE_NONE = 0,\r
-+      DOT11D_STATE_LEARNED,\r
-+      DOT11D_STATE_DONE,\r
-+}DOT11D_STATE;\r
-+\r
-+typedef struct _RT_DOT11D_INFO {\r
-+      //DECLARE_RT_OBJECT(RT_DOT11D_INFO);\r
-+\r
-+      bool bEnabled; // dot11MultiDomainCapabilityEnabled\r
-+\r
-+      u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.\r
-+      u8  CountryIeBuf[MAX_IE_LEN];\r
-+      u8  CountryIeSrcAddr[6]; // Source AP of the country IE.\r
-+      u8  CountryIeWatchdog; \r
-+\r
-+      u8  channel_map[MAX_CHANNEL_NUMBER+1];  //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan)\r
-+      //u8  ChnlListLen; // #Bytes valid in ChnlList[].\r
-+      //u8  ChnlList[DOT11D_MAX_CHNL_NUM];\r
-+      u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];\r
-+\r
-+      DOT11D_STATE State;\r
-+}RT_DOT11D_INFO, *PRT_DOT11D_INFO;\r
-+#define eqMacAddr(a,b)                ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )\r
-+#define cpMacAddr(des,src)          ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])\r
-+#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))\r
-+\r
-+#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled\r
-+#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)\r
-+\r
-+#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) \r
-+#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)\r
-+\r
-+#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \\r
-+      (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \\r
-+      FALSE : \\r
-+      (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))\r
-+\r
-+#define CIE_WATCHDOG_TH 1\r
-+#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog\r
-+#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 \r
-+#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev)\r
-+\r
-+#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)\r
-+\r
-+\r
-+void\r
-+Dot11d_Init(\r
-+      struct ieee80211_device *dev\r
-+      );\r
-+\r
-+void\r
-+Dot11d_Reset(\r
-+      struct ieee80211_device *dev\r
-+      );\r
-+\r
-+void\r
-+Dot11d_UpdateCountryIe(\r
-+      struct ieee80211_device *dev,\r
-+      u8 *            pTaddr,\r
-+      u16     CoutryIeLen,\r
-+      u8 * pCoutryIe   \r
-+      );\r
-+\r
-+u8\r
-+DOT11D_GetMaxTxPwrInDbm(\r
-+      struct ieee80211_device *dev,\r
-+      u8 Channel\r
-+      );\r
-+\r
-+void\r
-+DOT11D_ScanComplete(\r
-+      struct ieee80211_device * dev\r
-+      );\r
-+\r
-+int IsLegalChannel(\r
-+      struct ieee80211_device * dev,\r
-+      u8 channel\r
-+);\r
-+\r
-+int ToLegalChannel(\r
-+      struct ieee80211_device * dev,\r
-+      u8 channel\r
-+);\r
-+\r
-+void dump_chnl_map(u8 * channel_map);\r
-+#endif // #ifndef __INC_DOT11D_H\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211.h    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1755 @@
 +/*
 + * Merged with mainline ieee80211.h in Aug 2004.  Original ieee802_11
@@ -778978,9 +778482,2124 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211.h linux-2.
 +      return escaped;
 +}
 +#endif /* IEEE80211_H */
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/dot11d.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c     Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,246 @@
++#ifdef ENABLE_DOT11D\r
++//-----------------------------------------------------------------------------\r
++//    File:\r
++//            Dot11d.c\r
++//\r
++//    Description:\r
++//            Implement 802.11d. \r
++//\r
++//-----------------------------------------------------------------------------\r
++\r
++#include "dot11d.h"\r
++\r
++void\r
++Dot11d_Init(struct ieee80211_device *ieee)\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
++\r
++      pDot11dInfo->bEnabled = 0;\r
++\r
++      pDot11dInfo->State = DOT11D_STATE_NONE;\r
++      pDot11dInfo->CountryIeLen = 0;\r
++      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);  \r
++      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++      RESET_CIE_WATCHDOG(ieee);\r
++\r
++      printk("Dot11d_Init()\n");\r
++}\r
++\r
++//\r
++//    Description:\r
++//            Reset to the state as we are just entering a regulatory domain.\r
++//\r
++void\r
++Dot11d_Reset(struct ieee80211_device *ieee)\r
++{\r
++      u32 i;\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);\r
++\r
++      // Clear old channel map\r
++      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
++      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++      // Set new channel map\r
++      for (i=1; i<=11; i++) {\r
++              (pDot11dInfo->channel_map)[i] = 1;\r
++      }\r
++      for (i=12; i<=14; i++) {\r
++              (pDot11dInfo->channel_map)[i] = 2;\r
++      }\r
++\r
++      pDot11dInfo->State = DOT11D_STATE_NONE;\r
++      pDot11dInfo->CountryIeLen = 0;\r
++      RESET_CIE_WATCHDOG(ieee);\r
++\r
++      //printk("Dot11d_Reset()\n");\r
++}\r
++\r
++//\r
++//    Description:\r
++//            Update country IE from Beacon or Probe Resopnse \r
++//            and configure PHY for operation in the regulatory domain.\r
++//\r
++//    TODO: \r
++//            Configure Tx power.\r
++//\r
++//    Assumption:\r
++//            1. IS_DOT11D_ENABLE() is TRUE.\r
++//            2. Input IE is an valid one.\r
++//\r
++void\r
++Dot11d_UpdateCountryIe(\r
++      struct ieee80211_device *dev,\r
++      u8 *            pTaddr,\r
++      u16     CoutryIeLen,\r
++      u8 * pCoutryIe   \r
++      )\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++      u8 i, j, NumTriples, MaxChnlNum;\r
++      PCHNL_TXPOWER_TRIPLE pTriple;\r
++\r
++      if((CoutryIeLen - 3)%3 != 0)\r
++      {\r
++              printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
++              Dot11d_Reset(dev);\r
++              return;\r
++      }\r
++\r
++      memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);\r
++      memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);\r
++      MaxChnlNum = 0;\r
++      NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.\r
++      pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);\r
++      for(i = 0; i < NumTriples; i++)\r
++      {\r
++              if(MaxChnlNum >= pTriple->FirstChnl)\r
++              { // It is not in a monotonically increasing order, so stop processing.\r
++                      printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");\r
++                      Dot11d_Reset(dev);\r
++                      return; \r
++              }\r
++              if(MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls))\r
++              { // It is not a valid set of channel id, so stop processing.\r
++                      printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");\r
++                      Dot11d_Reset(dev);\r
++                      return; \r
++              }\r
++\r
++              for(j = 0 ; j < pTriple->NumChnls; j++)\r
++              {\r
++                      pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;\r
++                      pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;\r
++                      MaxChnlNum = pTriple->FirstChnl + j;\r
++              }       \r
++\r
++              pTriple = (PCHNL_TXPOWER_TRIPLE)((u8*)pTriple + 3);\r
++      }\r
++#if 1\r
++      //printk("Dot11d_UpdateCountryIe(): Channel List:\n");\r
++      printk("Channel List:");\r
++      for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++              if(pDot11dInfo->channel_map[i] > 0)\r
++                      printk(" %d", i);\r
++      printk("\n");\r
++#endif\r
++\r
++      UPDATE_CIE_SRC(dev, pTaddr);\r
++\r
++      pDot11dInfo->CountryIeLen = CoutryIeLen;\r
++      memcpy(pDot11dInfo->CountryIeBuf, pCoutryIe,CoutryIeLen);\r
++      pDot11dInfo->State = DOT11D_STATE_LEARNED;\r
++}\r
++\r
++void dump_chnl_map(u8 * channel_map)\r
++{\r
++      int i;\r
++      printk("Channel List:");\r
++      for(i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++              if(channel_map[i] > 0)\r
++                      printk(" %d(%d)", i, channel_map[i]);\r
++      printk("\n");\r
++}\r
++\r
++u8\r
++DOT11D_GetMaxTxPwrInDbm(\r
++      struct ieee80211_device *dev,\r
++      u8 Channel\r
++      )\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++      u8 MaxTxPwrInDbm = 255;\r
++\r
++      if(MAX_CHANNEL_NUMBER < Channel)\r
++      { \r
++              printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");\r
++              return MaxTxPwrInDbm; \r
++      }\r
++      if(pDot11dInfo->channel_map[Channel])\r
++      {\r
++              MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel];  \r
++      }\r
++\r
++      return MaxTxPwrInDbm;\r
++}\r
++\r
++\r
++void\r
++DOT11D_ScanComplete(\r
++      struct ieee80211_device * dev\r
++      )\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++\r
++      switch(pDot11dInfo->State)\r
++      {\r
++      case DOT11D_STATE_LEARNED:\r
++              pDot11dInfo->State = DOT11D_STATE_DONE;\r
++              break;\r
++\r
++      case DOT11D_STATE_DONE:\r
++              if( GET_CIE_WATCHDOG(dev) == 0 )\r
++              { // Reset country IE if previous one is gone. \r
++                      Dot11d_Reset(dev); \r
++              }\r
++              break;\r
++      case DOT11D_STATE_NONE:\r
++              break;\r
++      }\r
++}\r
++\r
++int IsLegalChannel(\r
++      struct ieee80211_device * dev,\r
++      u8 channel\r
++)\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++\r
++      if(MAX_CHANNEL_NUMBER < channel)\r
++      { \r
++              printk("IsLegalChannel(): Invalid Channel\n");\r
++              return 0; \r
++      }\r
++      if(pDot11dInfo->channel_map[channel] > 0)\r
++              return 1;\r
++      return 0;\r
++}\r
++\r
++int ToLegalChannel(\r
++      struct ieee80211_device * dev,\r
++      u8 channel\r
++)\r
++{\r
++      PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);\r
++      u8 default_chn = 0;\r
++      u32 i = 0;\r
++\r
++      for (i=1; i<= MAX_CHANNEL_NUMBER; i++)\r
++      {\r
++              if(pDot11dInfo->channel_map[i] > 0)\r
++              {\r
++                      default_chn = i;\r
++                      break;\r
++              }\r
++      }\r
++\r
++      if(MAX_CHANNEL_NUMBER < channel)\r
++      { \r
++              printk("IsLegalChannel(): Invalid Channel\n");\r
++              return default_chn; \r
++      }\r
++      \r
++      if(pDot11dInfo->channel_map[channel] > 0)\r
++              return channel;\r
++      \r
++      return default_chn;\r
++}\r
++\r
++#if 0\r
++EXPORT_SYMBOL(Dot11d_Init);\r
++EXPORT_SYMBOL(Dot11d_Reset);\r
++EXPORT_SYMBOL(Dot11d_UpdateCountryIe);\r
++EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);\r
++EXPORT_SYMBOL(DOT11D_ScanComplete);\r
++EXPORT_SYMBOL(IsLegalChannel);\r
++EXPORT_SYMBOL(ToLegalChannel);\r
++#endif\r
++#endif\r
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/dot11d.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/dot11d.h     Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,102 @@
++#ifndef __INC_DOT11D_H\r
++#define __INC_DOT11D_H\r
++\r
++#include "ieee80211.h"\r
++\r
++//#define ENABLE_DOT11D\r
++\r
++//#define DOT11D_MAX_CHNL_NUM 83\r
++\r
++typedef struct _CHNL_TXPOWER_TRIPLE {\r
++      u8 FirstChnl;\r
++      u8  NumChnls;\r
++      u8  MaxTxPowerInDbm;\r
++}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;\r
++\r
++typedef enum _DOT11D_STATE {\r
++      DOT11D_STATE_NONE = 0,\r
++      DOT11D_STATE_LEARNED,\r
++      DOT11D_STATE_DONE,\r
++}DOT11D_STATE;\r
++\r
++typedef struct _RT_DOT11D_INFO {\r
++      //DECLARE_RT_OBJECT(RT_DOT11D_INFO);\r
++\r
++      bool bEnabled; // dot11MultiDomainCapabilityEnabled\r
++\r
++      u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.\r
++      u8  CountryIeBuf[MAX_IE_LEN];\r
++      u8  CountryIeSrcAddr[6]; // Source AP of the country IE.\r
++      u8  CountryIeWatchdog; \r
++\r
++      u8  channel_map[MAX_CHANNEL_NUMBER+1];  //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan)\r
++      //u8  ChnlListLen; // #Bytes valid in ChnlList[].\r
++      //u8  ChnlList[DOT11D_MAX_CHNL_NUM];\r
++      u8  MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];\r
++\r
++      DOT11D_STATE State;\r
++}RT_DOT11D_INFO, *PRT_DOT11D_INFO;\r
++#define eqMacAddr(a,b)                ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )\r
++#define cpMacAddr(des,src)          ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])\r
++#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))\r
++\r
++#define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled\r
++#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)\r
++\r
++#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) \r
++#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa)\r
++\r
++#define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \\r
++      (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \\r
++      FALSE : \\r
++      (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length)))\r
++\r
++#define CIE_WATCHDOG_TH 1\r
++#define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog\r
++#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 \r
++#define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev)\r
++\r
++#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE)\r
++\r
++\r
++void\r
++Dot11d_Init(\r
++      struct ieee80211_device *dev\r
++      );\r
++\r
++void\r
++Dot11d_Reset(\r
++      struct ieee80211_device *dev\r
++      );\r
++\r
++void\r
++Dot11d_UpdateCountryIe(\r
++      struct ieee80211_device *dev,\r
++      u8 *            pTaddr,\r
++      u16     CoutryIeLen,\r
++      u8 * pCoutryIe   \r
++      );\r
++\r
++u8\r
++DOT11D_GetMaxTxPwrInDbm(\r
++      struct ieee80211_device *dev,\r
++      u8 Channel\r
++      );\r
++\r
++void\r
++DOT11D_ScanComplete(\r
++      struct ieee80211_device * dev\r
++      );\r
++\r
++int IsLegalChannel(\r
++      struct ieee80211_device * dev,\r
++      u8 channel\r
++);\r
++\r
++int ToLegalChannel(\r
++      struct ieee80211_device * dev,\r
++      u8 channel\r
++);\r
++\r
++void dump_chnl_map(u8 * channel_map);\r
++#endif // #ifndef __INC_DOT11D_H\r
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h  Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1755 @@
++/*
++ * Merged with mainline ieee80211.h in Aug 2004.  Original ieee802_11
++ * remains copyright by the original authors
++ *
++ * Portions of the merged code are based on Host AP (software wireless
++ * LAN access point) driver for Intersil Prism2/2.5/3.
++ *
++ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
++ * <jkmaline@cc.hut.fi>
++ * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
++ *
++ * Adaption to a generic IEEE 802.11 stack by James Ketrenos
++ * <jketreno@linux.intel.com>
++ * Copyright (c) 2004, Intel Corporation
++ *
++ * Modified for Realtek's wi-fi cards by Andrea Merello
++ * <andreamrl@tiscali.it>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation. See README and COPYING for
++ * more details.
++ */
++#ifndef IEEE80211_H
++#define IEEE80211_H
++#include <linux/if_ether.h> /* ETH_ALEN */
++#include <linux/kernel.h>   /* ARRAY_SIZE */
++#include <linux/version.h>
++#include <linux/jiffies.h>
++#include <linux/timer.h>
++#include <linux/sched.h>
++
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
++#include <linux/wireless.h>
++#endif
++
++/*
++#ifndef bool
++#define bool int
++#endif
++
++#ifndef true
++#define true   1
++#endif
++
++#ifndef false
++#define false  0
++#endif
++*/
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
++#ifndef bool
++typedef enum{false = 0, true} bool;
++#endif
++#endif
++//#ifdef JOHN_HWSEC
++#define KEY_TYPE_NA           0x0
++#define KEY_TYPE_WEP40                0x1
++#define KEY_TYPE_TKIP         0x2
++#define KEY_TYPE_CCMP         0x4
++#define KEY_TYPE_WEP104               0x5
++//#endif
++
++
++#define aSifsTime                                     10
++
++#define MGMT_QUEUE_NUM 5
++
++
++#define IEEE_CMD_SET_WPA_PARAM                        1
++#define       IEEE_CMD_SET_WPA_IE                     2
++#define IEEE_CMD_SET_ENCRYPTION                       3
++#define IEEE_CMD_MLME                         4
++
++#define IEEE_PARAM_WPA_ENABLED                        1
++#define IEEE_PARAM_TKIP_COUNTERMEASURES               2
++#define IEEE_PARAM_DROP_UNENCRYPTED           3
++#define IEEE_PARAM_PRIVACY_INVOKED            4
++#define IEEE_PARAM_AUTH_ALGS                  5
++#define IEEE_PARAM_IEEE_802_1X                        6
++//It should consistent with the driver_XXX.c
++//   David, 2006.9.26
++#define IEEE_PARAM_WPAX_SELECT                        7
++//Added for notify the encryption type selection
++//   David, 2006.9.26
++#define IEEE_PROTO_WPA                                1
++#define IEEE_PROTO_RSN                                2
++//Added for notify the encryption type selection
++//   David, 2006.9.26
++#define IEEE_WPAX_USEGROUP                    0
++#define IEEE_WPAX_WEP40                               1
++#define IEEE_WPAX_TKIP                                2
++#define IEEE_WPAX_WRAP                        3
++#define IEEE_WPAX_CCMP                                4
++#define IEEE_WPAX_WEP104                      5
++
++#define IEEE_KEY_MGMT_IEEE8021X                       1
++#define IEEE_KEY_MGMT_PSK                     2
++
++
++
++#define IEEE_MLME_STA_DEAUTH                  1
++#define IEEE_MLME_STA_DISASSOC                        2
++
++
++#define IEEE_CRYPT_ERR_UNKNOWN_ALG            2
++#define IEEE_CRYPT_ERR_UNKNOWN_ADDR           3
++#define IEEE_CRYPT_ERR_CRYPT_INIT_FAILED              4
++#define IEEE_CRYPT_ERR_KEY_SET_FAILED         5
++#define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED              6
++#define IEEE_CRYPT_ERR_CARD_CONF_FAILED               7
++
++
++#define       IEEE_CRYPT_ALG_NAME_LEN                 16
++
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10))
++#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rtl
++#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rtl
++#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rtl
++////////////////////////////////
++// added for kernel conflict under FC5
++#define ieee80211_wx_get_name   ieee80211_wx_get_name_rtl
++#define free_ieee80211          free_ieee80211_rtl
++#define alloc_ieee80211        alloc_ieee80211_rtl
++///////////////////////////////
++#endif
++//error in ubuntu2.6.22,so add these
++#define ieee80211_wake_queue ieee80211_wake_queue_rtl
++#define ieee80211_stop_queue ieee80211_stop_queue_rtl
++
++#define ieee80211_rx ieee80211_rx_rtl
++
++#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rtl
++#define ieee80211_unregister_crypto_ops       ieee80211_unregister_crypto_ops_rtl
++#define ieee80211_get_crypto_ops      ieee80211_get_crypto_ops_rtl
++#define ieee80211_crypt_deinit_entries        ieee80211_crypt_deinit_entries_rtl
++#define ieee80211_crypt_deinit_handler        ieee80211_crypt_deinit_handler_rtl
++#define ieee80211_crypt_delayed_deinit        ieee80211_crypt_delayed_deinit_rtl
++
++#define ieee80211_txb_free    ieee80211_txb_free_rtl
++#define ieee80211_wx_get_essid        ieee80211_wx_get_essid_rtl
++#define ieee80211_wx_set_essid        ieee80211_wx_set_essid_rtl
++#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rtl
++#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rtl
++#define ieee80211_wx_set_wap  ieee80211_wx_set_wap_rtl
++#define ieee80211_wx_get_wap  ieee80211_wx_get_wap_rtl
++#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rtl
++#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rtl
++#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rtl
++#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rtl
++#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rtl
++#define ieee80211_wx_set_rawtx        ieee80211_wx_set_rawtx_rtl
++#define ieee80211_wx_set_power        ieee80211_wx_set_power_rtl
++#define ieee80211_wx_get_power        ieee80211_wx_get_power_rtl
++#define ieee80211_wlan_frequencies    ieee80211_wlan_frequencies_rtl
++#define ieee80211_softmac_stop_protocol       ieee80211_softmac_stop_protocol_rtl
++#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rtl
++#define       ieee80211_start_protocol        ieee80211_start_protocol_rtl
++#define       ieee80211_stop_protocol         ieee80211_stop_protocol_rtl
++#define       ieee80211_rx_mgt                ieee80211_rx_mgt_rtl
++
++#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rtl
++//by amy for ps
++#define notify_wx_assoc_event  notify_wx_assoc_event_rtl
++#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rtl
++#define ieee80211_disassociate ieee80211_disassociate_rtl
++#define ieee80211_start_scan ieee80211_start_scan_rtl
++//by amy for ps
++typedef struct ieee_param {
++      u32 cmd;
++      u8 sta_addr[ETH_ALEN];
++        union {
++              struct {
++                      u8 name;
++                      u32 value;
++              } wpa_param;
++              struct {
++                      u32 len;
++                      u8 reserved[32];
++                      u8 data[0];
++              } wpa_ie;
++              struct{
++                      int command;
++                      int reason_code;
++              } mlme;
++              struct {
++                      u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
++                      u8 set_tx;
++                      u32 err;
++                      u8 idx;
++                      u8 seq[8]; /* sequence counter (set: RX, get: TX) */
++                      u16 key_len;
++                      u8 key[0];
++              } crypt;
++
++      } u;
++}ieee_param;
++
++
++#if WIRELESS_EXT < 17
++#define IW_QUAL_QUAL_INVALID   0x10
++#define IW_QUAL_LEVEL_INVALID  0x20
++#define IW_QUAL_NOISE_INVALID  0x40
++#define IW_QUAL_QUAL_UPDATED   0x1
++#define IW_QUAL_LEVEL_UPDATED  0x2
++#define IW_QUAL_NOISE_UPDATED  0x4
++#endif
++
++// linux under 2.6.9 release may not support it, so modify it for common use
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
++#define MSECS(t)      (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
++static inline unsigned long msleep_interruptible_rtl(unsigned int msecs)
++{
++         unsigned long timeout = MSECS(msecs) + 1;
++
++         while (timeout) {
++                 set_current_state(TASK_UNINTERRUPTIBLE);
++                 timeout = schedule_timeout(timeout);
++         }
++         return timeout;
++}
++#else
++#define MSECS(t) msecs_to_jiffies(t)
++#define msleep_interruptible_rtl  msleep_interruptible
++#endif
++
++#define IEEE80211_DATA_LEN            2304
++/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
++   6.2.1.1.2.
++
++   The figure in section 7.1.2 suggests a body size of up to 2312
++   bytes is allowed, which is a bit confusing, I suspect this
++   represents the 2304 bytes of real data, plus a possible 8 bytes of
++   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
++
++
++#define IEEE80211_HLEN                        30
++#define IEEE80211_FRAME_LEN           (IEEE80211_DATA_LEN + IEEE80211_HLEN)
++
++/* this is stolen and modified from the madwifi driver*/
++#define IEEE80211_FC0_TYPE_MASK               0x0c
++#define IEEE80211_FC0_TYPE_DATA               0x08
++#define IEEE80211_FC0_SUBTYPE_MASK    0xB0
++#define IEEE80211_FC0_SUBTYPE_QOS     0x80
++
++#define IEEE80211_QOS_HAS_SEQ(fc) \
++      (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
++       (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
++
++/* this is stolen from ipw2200 driver */
++#define IEEE_IBSS_MAC_HASH_SIZE 31
++struct ieee_ibss_seq {
++      u8 mac[ETH_ALEN];
++      u16 seq_num[17];
++      u16 frag_num[17];
++      unsigned long packet_time[17];
++      struct list_head list;
++};
++
++struct ieee80211_hdr {
++      u16 frame_ctl;
++      u16 duration_id;
++      u8 addr1[ETH_ALEN];
++      u8 addr2[ETH_ALEN];
++      u8 addr3[ETH_ALEN];
++      u16 seq_ctl;
++      u8 addr4[ETH_ALEN];
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_QOS {
++      u16 frame_ctl;
++      u16 duration_id;
++      u8 addr1[ETH_ALEN];
++      u8 addr2[ETH_ALEN];
++      u8 addr3[ETH_ALEN];
++      u16 seq_ctl;
++      u8 addr4[ETH_ALEN];
++      u16 QOS_ctl;
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_3addr {
++      u16 frame_ctl;
++      u16 duration_id;
++      u8 addr1[ETH_ALEN];
++      u8 addr2[ETH_ALEN];
++      u8 addr3[ETH_ALEN];
++      u16 seq_ctl;
++} __attribute__ ((packed));
++
++struct ieee80211_hdr_3addr_QOS {
++      u16 frame_ctl;
++      u16 duration_id;
++      u8 addr1[ETH_ALEN];
++      u8 addr2[ETH_ALEN];
++      u8 addr3[ETH_ALEN];
++      u16 seq_ctl;
++      u16 QOS_ctl;
++} __attribute__ ((packed));
++
++enum eap_type {
++      EAP_PACKET = 0,
++      EAPOL_START,
++      EAPOL_LOGOFF,
++      EAPOL_KEY,
++      EAPOL_ENCAP_ASF_ALERT
++};
++
++static const char *eap_types[] = {
++      [EAP_PACKET]            = "EAP-Packet",
++      [EAPOL_START]           = "EAPOL-Start",
++      [EAPOL_LOGOFF]          = "EAPOL-Logoff",
++      [EAPOL_KEY]             = "EAPOL-Key",
++      [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
++};
++
++static inline const char *eap_get_type(int type)
++{
++      return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
++}
++
++struct eapol {
++      u8 snap[6];
++      u16 ethertype;
++      u8 version;
++      u8 type;
++      u16 length;
++} __attribute__ ((packed));
++
++#define IEEE80211_3ADDR_LEN 24
++#define IEEE80211_4ADDR_LEN 30
++#define IEEE80211_FCS_LEN    4
++
++#define MIN_FRAG_THRESHOLD     256U
++#define       MAX_FRAG_THRESHOLD     2346U
++
++/* Frame control field constants */
++#define IEEE80211_FCTL_VERS           0x0002
++#define IEEE80211_FCTL_FTYPE          0x000c
++#define IEEE80211_FCTL_STYPE          0x00f0
++#define IEEE80211_FCTL_TODS           0x0100
++#define IEEE80211_FCTL_FROMDS         0x0200
++#define IEEE80211_FCTL_DSTODS         0x0300 //added by david
++#define IEEE80211_FCTL_MOREFRAGS      0x0400
++#define IEEE80211_FCTL_RETRY          0x0800
++#define IEEE80211_FCTL_PM             0x1000
++#define IEEE80211_FCTL_MOREDATA       0x2000
++#define IEEE80211_FCTL_WEP            0x4000
++#define IEEE80211_FCTL_ORDER          0x8000
++
++#define IEEE80211_FTYPE_MGMT          0x0000
++#define IEEE80211_FTYPE_CTL           0x0004
++#define IEEE80211_FTYPE_DATA          0x0008
++
++/* management */
++#define IEEE80211_STYPE_ASSOC_REQ     0x0000
++#define IEEE80211_STYPE_ASSOC_RESP    0x0010
++#define IEEE80211_STYPE_REASSOC_REQ   0x0020
++#define IEEE80211_STYPE_REASSOC_RESP  0x0030
++#define IEEE80211_STYPE_PROBE_REQ     0x0040
++#define IEEE80211_STYPE_PROBE_RESP    0x0050
++#define IEEE80211_STYPE_BEACON                0x0080
++#define IEEE80211_STYPE_ATIM          0x0090
++#define IEEE80211_STYPE_DISASSOC      0x00A0
++#define IEEE80211_STYPE_AUTH          0x00B0
++#define IEEE80211_STYPE_DEAUTH                0x00C0
++#define IEEE80211_STYPE_MANAGE_ACT    0x00D0
++
++/* control */
++#define IEEE80211_STYPE_PSPOLL                0x00A0
++#define IEEE80211_STYPE_RTS           0x00B0
++#define IEEE80211_STYPE_CTS           0x00C0
++#define IEEE80211_STYPE_ACK           0x00D0
++#define IEEE80211_STYPE_CFEND         0x00E0
++#define IEEE80211_STYPE_CFENDACK      0x00F0
++
++/* data */
++#define IEEE80211_STYPE_DATA          0x0000
++#define IEEE80211_STYPE_DATA_CFACK    0x0010
++#define IEEE80211_STYPE_DATA_CFPOLL   0x0020
++#define IEEE80211_STYPE_DATA_CFACKPOLL        0x0030
++#define IEEE80211_STYPE_NULLFUNC      0x0040
++#define IEEE80211_STYPE_CFACK         0x0050
++#define IEEE80211_STYPE_CFPOLL                0x0060
++#define IEEE80211_STYPE_CFACKPOLL     0x0070
++#define IEEE80211_STYPE_QOS_DATA      0x0080 //added for WMM 2006/8/2
++#define IEEE80211_STYPE_QOS_NULL      0x00C0
++
++
++#define IEEE80211_SCTL_FRAG           0x000F
++#define IEEE80211_SCTL_SEQ            0xFFF0
++
++
++/* debug macros */
++
++#ifdef CONFIG_IEEE80211_DEBUG
++extern u32 ieee80211_debug_level;
++#define IEEE80211_DEBUG(level, fmt, args...) \
++do { if (ieee80211_debug_level & (level)) \
++  printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
++         in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
++#else
++#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
++#endif        /* CONFIG_IEEE80211_DEBUG */
++
++/*
++ * To use the debug system;
++ *
++ * If you are defining a new debug classification, simply add it to the #define
++ * list here in the form of:
++ *
++ * #define IEEE80211_DL_xxxx VALUE
++ *
++ * shifting value to the left one bit from the previous entry.  xxxx should be
++ * the name of the classification (for example, WEP)
++ *
++ * You then need to either add a IEEE80211_xxxx_DEBUG() macro definition for your
++ * classification, or use IEEE80211_DEBUG(IEEE80211_DL_xxxx, ...) whenever you want
++ * to send output to that classification.
++ *
++ * To add your debug level to the list of levels seen when you perform
++ *
++ * % cat /proc/net/ipw/debug_level
++ *
++ * you simply need to add your entry to the ipw_debug_levels array.
++ *
++ * If you do not see debug_level in /proc/net/ipw then you do not have
++ * CONFIG_IEEE80211_DEBUG defined in your kernel configuration
++ *
++ */
++
++#define IEEE80211_DL_INFO          (1<<0)
++#define IEEE80211_DL_WX            (1<<1)
++#define IEEE80211_DL_SCAN          (1<<2)
++#define IEEE80211_DL_STATE         (1<<3)
++#define IEEE80211_DL_MGMT          (1<<4)
++#define IEEE80211_DL_FRAG          (1<<5)
++#define IEEE80211_DL_EAP           (1<<6)
++#define IEEE80211_DL_DROP          (1<<7)
++
++#define IEEE80211_DL_TX            (1<<8)
++#define IEEE80211_DL_RX            (1<<9)
++
++#define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a)
++#define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a)
++#define IEEE80211_DEBUG_INFO(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a)
++
++#define IEEE80211_DEBUG_WX(f, a...)     IEEE80211_DEBUG(IEEE80211_DL_WX, f, ## a)
++#define IEEE80211_DEBUG_SCAN(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a)
++//#define IEEE_DEBUG_SCAN  IEEE80211_WARNING
++#define IEEE80211_DEBUG_STATE(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a)
++#define IEEE80211_DEBUG_MGMT(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a)
++#define IEEE80211_DEBUG_FRAG(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a)
++#define IEEE80211_DEBUG_EAP(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a)
++#define IEEE80211_DEBUG_DROP(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a)
++#define IEEE80211_DEBUG_TX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a)
++#define IEEE80211_DEBUG_RX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
++#include <linux/netdevice.h>
++#include <linux/wireless.h>
++#include <linux/if_arp.h> /* ARPHRD_ETHER */
++
++#ifndef WIRELESS_SPY
++#define WIRELESS_SPY          // enable iwspy support
++#endif
++#include <net/iw_handler.h>   // new driver API
++
++#ifndef ETH_P_PAE
++#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
++#endif /* ETH_P_PAE */
++
++#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */
++
++#ifndef ETH_P_80211_RAW
++#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
++#endif
++
++/* IEEE 802.11 defines */
++
++#define P80211_OUI_LEN 3
++
++struct ieee80211_snap_hdr {
++
++        u8    dsap;   /* always 0xAA */
++        u8    ssap;   /* always 0xAA */
++        u8    ctrl;   /* always 0x03 */
++        u8    oui[P80211_OUI_LEN];    /* organizational universal id */
++
++} __attribute__ ((packed));
++
++#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
++
++#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
++#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
++
++#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
++#define WLAN_GET_SEQ_SEQ(seq)  ((seq) & IEEE80211_SCTL_SEQ)
++
++/* Authentication algorithms */
++#define WLAN_AUTH_OPEN 0
++#define WLAN_AUTH_SHARED_KEY 1
++
++#define WLAN_AUTH_CHALLENGE_LEN 128
++
++#define WLAN_CAPABILITY_BSS (1<<0)
++#define WLAN_CAPABILITY_IBSS (1<<1)
++#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
++#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
++#define WLAN_CAPABILITY_PRIVACY (1<<4)
++#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
++#define WLAN_CAPABILITY_PBCC (1<<6)
++#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
++#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
++
++/* Status codes */
++#define WLAN_STATUS_SUCCESS 0
++#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
++#define WLAN_STATUS_CAPS_UNSUPPORTED 10
++#define WLAN_STATUS_REASSOC_NO_ASSOC 11
++#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
++#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
++#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
++#define WLAN_STATUS_CHALLENGE_FAIL 15
++#define WLAN_STATUS_AUTH_TIMEOUT 16
++#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
++#define WLAN_STATUS_ASSOC_DENIED_RATES 18
++/* 802.11b */
++#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
++#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
++#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
++
++/* Reason codes */
++#define WLAN_REASON_UNSPECIFIED 1
++#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
++#define WLAN_REASON_DEAUTH_LEAVING 3
++#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
++#define WLAN_REASON_DISASSOC_AP_BUSY 5
++#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
++#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
++#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
++#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
++
++
++/* Information Element IDs */
++#define WLAN_EID_SSID 0
++#define WLAN_EID_SUPP_RATES 1
++#define WLAN_EID_FH_PARAMS 2
++#define WLAN_EID_DS_PARAMS 3
++#define WLAN_EID_CF_PARAMS 4
++#define WLAN_EID_TIM 5
++#define WLAN_EID_IBSS_PARAMS 6
++#define WLAN_EID_CHALLENGE 16
++#define WLAN_EID_RSN 48
++#define WLAN_EID_GENERIC 221
++
++#define IEEE80211_MGMT_HDR_LEN 24
++#define IEEE80211_DATA_HDR3_LEN 24
++#define IEEE80211_DATA_HDR4_LEN 30
++
++
++#define IEEE80211_STATMASK_SIGNAL (1<<0)
++#define IEEE80211_STATMASK_RSSI (1<<1)
++#define IEEE80211_STATMASK_NOISE (1<<2)
++#define IEEE80211_STATMASK_RATE (1<<3)
++#define IEEE80211_STATMASK_WEMASK 0x7
++
++
++#define IEEE80211_CCK_MODULATION    (1<<0)
++#define IEEE80211_OFDM_MODULATION   (1<<1)
++
++#define IEEE80211_24GHZ_BAND     (1<<0)
++#define IEEE80211_52GHZ_BAND     (1<<1)
++
++#define IEEE80211_CCK_RATE_LEN                4
++#define IEEE80211_CCK_RATE_1MB                        0x02
++#define IEEE80211_CCK_RATE_2MB                        0x04
++#define IEEE80211_CCK_RATE_5MB                        0x0B
++#define IEEE80211_CCK_RATE_11MB                       0x16
++#define IEEE80211_OFDM_RATE_LEN               8
++#define IEEE80211_OFDM_RATE_6MB                       0x0C
++#define IEEE80211_OFDM_RATE_9MB                       0x12
++#define IEEE80211_OFDM_RATE_12MB              0x18
++#define IEEE80211_OFDM_RATE_18MB              0x24
++#define IEEE80211_OFDM_RATE_24MB              0x30
++#define IEEE80211_OFDM_RATE_36MB              0x48
++#define IEEE80211_OFDM_RATE_48MB              0x60
++#define IEEE80211_OFDM_RATE_54MB              0x6C
++#define IEEE80211_BASIC_RATE_MASK             0x80
++
++#define IEEE80211_CCK_RATE_1MB_MASK           (1<<0)
++#define IEEE80211_CCK_RATE_2MB_MASK           (1<<1)
++#define IEEE80211_CCK_RATE_5MB_MASK           (1<<2)
++#define IEEE80211_CCK_RATE_11MB_MASK          (1<<3)
++#define IEEE80211_OFDM_RATE_6MB_MASK          (1<<4)
++#define IEEE80211_OFDM_RATE_9MB_MASK          (1<<5)
++#define IEEE80211_OFDM_RATE_12MB_MASK         (1<<6)
++#define IEEE80211_OFDM_RATE_18MB_MASK         (1<<7)
++#define IEEE80211_OFDM_RATE_24MB_MASK         (1<<8)
++#define IEEE80211_OFDM_RATE_36MB_MASK         (1<<9)
++#define IEEE80211_OFDM_RATE_48MB_MASK         (1<<10)
++#define IEEE80211_OFDM_RATE_54MB_MASK         (1<<11)
++
++#define IEEE80211_CCK_RATES_MASK              0x0000000F
++#define IEEE80211_CCK_BASIC_RATES_MASK        (IEEE80211_CCK_RATE_1MB_MASK | \
++      IEEE80211_CCK_RATE_2MB_MASK)
++#define IEEE80211_CCK_DEFAULT_RATES_MASK      (IEEE80211_CCK_BASIC_RATES_MASK | \
++        IEEE80211_CCK_RATE_5MB_MASK | \
++        IEEE80211_CCK_RATE_11MB_MASK)
++
++#define IEEE80211_OFDM_RATES_MASK             0x00000FF0
++#define IEEE80211_OFDM_BASIC_RATES_MASK       (IEEE80211_OFDM_RATE_6MB_MASK | \
++      IEEE80211_OFDM_RATE_12MB_MASK | \
++      IEEE80211_OFDM_RATE_24MB_MASK)
++#define IEEE80211_OFDM_DEFAULT_RATES_MASK     (IEEE80211_OFDM_BASIC_RATES_MASK | \
++      IEEE80211_OFDM_RATE_9MB_MASK  | \
++      IEEE80211_OFDM_RATE_18MB_MASK | \
++      IEEE80211_OFDM_RATE_36MB_MASK | \
++      IEEE80211_OFDM_RATE_48MB_MASK | \
++      IEEE80211_OFDM_RATE_54MB_MASK)
++#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
++                                IEEE80211_CCK_DEFAULT_RATES_MASK)
++
++#define IEEE80211_NUM_OFDM_RATES          8
++#define IEEE80211_NUM_CCK_RATES                   4
++#define IEEE80211_OFDM_SHIFT_MASK_A         4
++
++
++
++
++/* NOTE: This data is for statistical purposes; not all hardware provides this
++ *       information for frames received.  Not setting these will not cause
++ *       any adverse affects. */
++struct ieee80211_rx_stats {
++      u32 mac_time[2];
++      u8 signalstrength;
++      s8 rssi;
++      u8 signal;
++      u8 noise;
++      u16 rate; /* in 100 kbps */
++      u8 received_channel;
++      u8 control;
++      u8 mask;
++      u8 freq;
++      u16 len;
++      u8 nic_type;
++};
++
++/* IEEE 802.11 requires that STA supports concurrent reception of at least
++ * three fragmented frames. This define can be increased to support more
++ * concurrent frames, but it should be noted that each entry can consume about
++ * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
++#define IEEE80211_FRAG_CACHE_LEN 4
++
++struct ieee80211_frag_entry {
++      unsigned long first_frag_time;
++      unsigned int seq;
++      unsigned int last_frag;
++      struct sk_buff *skb;
++      u8 src_addr[ETH_ALEN];
++      u8 dst_addr[ETH_ALEN];
++};
++
++struct ieee80211_stats {
++      unsigned int tx_unicast_frames;
++      unsigned int tx_multicast_frames;
++      unsigned int tx_fragments;
++      unsigned int tx_unicast_octets;
++      unsigned int tx_multicast_octets;
++      unsigned int tx_deferred_transmissions;
++      unsigned int tx_single_retry_frames;
++      unsigned int tx_multiple_retry_frames;
++      unsigned int tx_retry_limit_exceeded;
++      unsigned int tx_discards;
++      unsigned int rx_unicast_frames;
++      unsigned int rx_multicast_frames;
++      unsigned int rx_fragments;
++      unsigned int rx_unicast_octets;
++      unsigned int rx_multicast_octets;
++      unsigned int rx_fcs_errors;
++      unsigned int rx_discards_no_buffer;
++      unsigned int tx_discards_wrong_sa;
++      unsigned int rx_discards_undecryptable;
++      unsigned int rx_message_in_msg_fragments;
++      unsigned int rx_message_in_bad_msg_fragments;
++};
++
++struct ieee80211_softmac_stats{
++      unsigned int rx_ass_ok;
++      unsigned int rx_ass_err;
++      unsigned int rx_probe_rq;
++      unsigned int tx_probe_rs;
++      unsigned int tx_beacons;
++      unsigned int rx_auth_rq;
++      unsigned int rx_auth_rs_ok;
++      unsigned int rx_auth_rs_err;
++      unsigned int tx_auth_rq;
++      unsigned int no_auth_rs;
++      unsigned int no_ass_rs;
++      unsigned int tx_ass_rq;
++      unsigned int rx_ass_rq;
++      unsigned int tx_probe_rq;
++      unsigned int reassoc;
++      unsigned int swtxstop;
++      unsigned int swtxawake;
++};
++
++struct ieee80211_device;
++
++#include "ieee80211_crypt.h"
++
++#define SEC_KEY_1         (1<<0)
++#define SEC_KEY_2         (1<<1)
++#define SEC_KEY_3         (1<<2)
++#define SEC_KEY_4         (1<<3)
++#define SEC_ACTIVE_KEY    (1<<4)
++#define SEC_AUTH_MODE     (1<<5)
++#define SEC_UNICAST_GROUP (1<<6)
++#define SEC_LEVEL         (1<<7)
++#define SEC_ENABLED       (1<<8)
++
++#define SEC_LEVEL_0      0 /* None */
++#define SEC_LEVEL_1      1 /* WEP 40 and 104 bit */
++#define SEC_LEVEL_2      2 /* Level 1 + TKIP */
++#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */
++#define SEC_LEVEL_3      4 /* Level 2 + CCMP */
++
++#define WEP_KEYS 4
++#define WEP_KEY_LEN 13
++
++#define WEP_KEY_LEN_MODIF 32
++
++struct ieee80211_security {
++      u16 active_key:2,
++            enabled:1,
++          auth_mode:2,
++            auth_algo:4,
++            unicast_uses_group:1;
++      u8 key_sizes[WEP_KEYS];
++      u8 keys[WEP_KEYS][WEP_KEY_LEN_MODIF];
++      u8 level;
++      u16 flags;
++} __attribute__ ((packed));
++
++
++/*
++
++ 802.11 data frame from AP
++
++      ,-------------------------------------------------------------------.
++Bytes |  2   |  2   |    6    |    6    |    6    |  2   | 0..2312 |   4  |
++      |------|------|---------|---------|---------|------|---------|------|
++Desc. | ctrl | dura |  DA/RA  |   TA    |    SA   | Sequ |  frame  |  fcs |
++      |      | tion | (BSSID) |         |         | ence |  data   |      |
++      `-------------------------------------------------------------------'
++
++Total: 28-2340 bytes
++
++*/
++
++struct ieee80211_header_data {
++      u16 frame_ctl;
++      u16 duration_id;
++      u8 addr1[6];
++      u8 addr2[6];
++      u8 addr3[6];
++      u16 seq_ctrl;
++};
++
++#define BEACON_PROBE_SSID_ID_POSITION 12
++
++/* Management Frame Information Element Types */
++#define MFIE_TYPE_SSID       0
++#define MFIE_TYPE_RATES      1
++#define MFIE_TYPE_FH_SET     2
++#define MFIE_TYPE_DS_SET     3
++#define MFIE_TYPE_CF_SET     4
++#define MFIE_TYPE_TIM        5
++#define MFIE_TYPE_IBSS_SET   6
++#define MFIE_TYPE_COUNTRY  7 //+YJ,080625
++#define MFIE_TYPE_CHALLENGE  16
++#define MFIE_TYPE_ERP        42
++#define MFIE_TYPE_RSN      48
++#define MFIE_TYPE_RATES_EX   50
++#define MFIE_TYPE_GENERIC    221
++
++#ifdef ENABLE_DOT11D
++typedef enum
++{
++      COUNTRY_CODE_FCC = 0,
++      COUNTRY_CODE_IC = 1,
++      COUNTRY_CODE_ETSI = 2,
++      COUNTRY_CODE_SPAIN = 3,
++      COUNTRY_CODE_FRANCE = 4,
++      COUNTRY_CODE_MKK = 5,
++      COUNTRY_CODE_MKK1 = 6,
++      COUNTRY_CODE_ISRAEL = 7,
++      COUNTRY_CODE_TELEC = 8,
++      COUNTRY_CODE_GLOBAL_DOMAIN = 9,
++      COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
++}country_code_type_t;
++#endif
++
++struct ieee80211_info_element_hdr {
++      u8 id;
++      u8 len;
++} __attribute__ ((packed));
++
++struct ieee80211_info_element {
++      u8 id;
++      u8 len;
++      u8 data[0];
++} __attribute__ ((packed));
++
++/*
++ * These are the data types that can make up management packets
++ *
++      u16 auth_algorithm;
++      u16 auth_sequence;
++      u16 beacon_interval;
++      u16 capability;
++      u8 current_ap[ETH_ALEN];
++      u16 listen_interval;
++      struct {
++              u16 association_id:14, reserved:2;
++      } __attribute__ ((packed));
++      u32 time_stamp[2];
++      u16 reason;
++      u16 status;
++*/
++
++#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
++#define IEEE80211_DEFAULT_BASIC_RATE 10
++
++struct ieee80211_authentication {
++      struct ieee80211_header_data header;
++      u16 algorithm;
++      u16 transaction;
++      u16 status;
++      //struct ieee80211_info_element_hdr info_element;
++} __attribute__ ((packed));
++
++
++struct ieee80211_probe_response {
++      struct ieee80211_header_data header;
++      u32 time_stamp[2];
++      u16 beacon_interval;
++      u16 capability;
++      struct ieee80211_info_element info_element;
++} __attribute__ ((packed));
++
++struct ieee80211_probe_request {
++      struct ieee80211_header_data header;
++      /*struct ieee80211_info_element info_element;*/
++} __attribute__ ((packed));
++
++struct ieee80211_assoc_request_frame {
++      struct ieee80211_hdr_3addr header;
++      u16 capability;
++      u16 listen_interval;
++      //u8 current_ap[ETH_ALEN];
++      struct ieee80211_info_element_hdr info_element;
++} __attribute__ ((packed));
++
++struct ieee80211_assoc_response_frame {
++      struct ieee80211_hdr_3addr header;
++      u16 capability;
++      u16 status;
++      u16 aid;
++      struct ieee80211_info_element info_element; /* supported rates */
++} __attribute__ ((packed));
++
++struct ieee80211_disassoc_frame{
++        struct ieee80211_hdr_3addr header;
++        u16    reasoncode;
++}__attribute__ ((packed));
++
++struct ieee80211_txb {
++      u8 nr_frags;
++      u8 encrypted;
++      u16 reserved;
++      u16 frag_size;
++      u16 payload_size;
++      struct sk_buff *fragments[0];
++};
++
++struct ieee80211_wmm_ac_param {
++      u8 ac_aci_acm_aifsn;
++      u8 ac_ecwmin_ecwmax;
++      u16 ac_txop_limit;
++};
++
++struct ieee80211_wmm_ts_info {
++      u8 ac_dir_tid;
++      u8 ac_up_psb;
++      u8 reserved;
++} __attribute__ ((packed));
++
++struct ieee80211_wmm_tspec_elem {
++      struct ieee80211_wmm_ts_info ts_info;
++      u16 norm_msdu_size;
++      u16 max_msdu_size;
++      u32 min_serv_inter;
++      u32 max_serv_inter;
++      u32 inact_inter;
++      u32 suspen_inter;
++      u32 serv_start_time;
++      u32 min_data_rate;
++      u32 mean_data_rate;
++      u32 peak_data_rate;
++      u32 max_burst_size;
++      u32 delay_bound;
++      u32 min_phy_rate;
++      u16 surp_band_allow;
++      u16 medium_time;
++}__attribute__((packed));
++
++enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
++#define MAX_SP_Len  (WMM_all_frame << 4)
++#define IEEE80211_QOS_TID 0x0f
++#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5)
++
++/* SWEEP TABLE ENTRIES NUMBER*/
++#define MAX_SWEEP_TAB_ENTRIES           42
++#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET  7
++/* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
++ * only use 8, and then use extended rates for the remaining supported
++ * rates.  Other APs, however, stick all of their supported rates on the
++ * main rates information element... */
++#define MAX_RATES_LENGTH                  ((u8)12)
++#define MAX_RATES_EX_LENGTH               ((u8)16)
++#define MAX_NETWORK_COUNT                  128
++//#define MAX_CHANNEL_NUMBER                 161
++#define MAX_CHANNEL_NUMBER                 165 //YJ,modified,080625
++#define MAX_IE_LEN                                            0xFF //+YJ,080625
++
++typedef struct _CHANNEL_LIST{
++      u8      Channel[MAX_CHANNEL_NUMBER + 1];
++      u8      Len;
++}CHANNEL_LIST, *PCHANNEL_LIST;
++
++#define IEEE80211_SOFTMAC_SCAN_TIME     100//400
++//(HZ / 2)
++//by amy for ps
++#define IEEE80211_WATCH_DOG_TIME    2000
++//by amy for ps
++//by amy for antenna
++#define ANTENNA_DIVERSITY_TIMER_PERIOD                1000 // 1000 m
++//by amy for antenna
++#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
++
++#define CRC_LENGTH                 4U
++
++#define MAX_WPA_IE_LEN 64
++
++#define NETWORK_EMPTY_ESSID (1<<0)
++#define NETWORK_HAS_OFDM    (1<<1)
++#define NETWORK_HAS_CCK     (1<<2)
++
++#define IEEE80211_DTIM_MBCAST 4
++#define IEEE80211_DTIM_UCAST 2
++#define IEEE80211_DTIM_VALID 1
++#define IEEE80211_DTIM_INVALID 0
++
++#define IEEE80211_PS_DISABLED 0
++#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
++#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
++#define IEEE80211_PS_ENABLE   IEEE80211_DTIM_VALID
++//added by David for QoS 2006/6/30
++//#define WMM_Hang_8187
++#ifdef WMM_Hang_8187
++#undef WMM_Hang_8187
++#endif
++
++#define WME_AC_BE   0x00
++#define WME_AC_BK   0x01
++#define WME_AC_VI   0x02
++#define WME_AC_VO   0x03
++#define WME_ACI_MASK 0x03
++#define WME_AIFSN_MASK 0x03
++#define WME_AC_PRAM_LEN 16
++
++//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
++//#define UP2AC(up)   ((up<3) ? ((up==0)?1:0) : (up>>1))
++#define UP2AC(up) (              \
++      ((up) < 1) ? WME_AC_BE : \
++      ((up) < 3) ? WME_AC_BK : \
++      ((up) < 4) ? WME_AC_BE : \
++      ((up) < 6) ? WME_AC_VI : \
++      WME_AC_VO)
++//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
++#define AC2UP(_ac)    (       \
++      ((_ac) == WME_AC_VO) ? 6 : \
++      ((_ac) == WME_AC_VI) ? 5 : \
++      ((_ac) == WME_AC_BK) ? 1 : \
++      0)
++
++#define       ETHER_ADDR_LEN          6       /* length of an Ethernet address */
++struct        ether_header {
++      u8 ether_dhost[ETHER_ADDR_LEN];
++      u8 ether_shost[ETHER_ADDR_LEN];
++      u16 ether_type;
++} __attribute__((packed));
++
++#ifndef ETHERTYPE_PAE
++#define       ETHERTYPE_PAE   0x888e          /* EAPOL PAE/802.1x */
++#endif
++#ifndef ETHERTYPE_IP
++#define       ETHERTYPE_IP    0x0800          /* IP protocol */
++#endif
++
++struct ieee80211_network {
++      /* These entries are used to identify a unique network */
++      u8 bssid[ETH_ALEN];
++      u8 channel;
++      /* Ensure null-terminated for any debug msgs */
++      u8 ssid[IW_ESSID_MAX_SIZE + 1];
++      u8 ssid_len;
++
++      /* These are network statistics */
++      struct ieee80211_rx_stats stats;
++      u16 capability;
++      u8 rates[MAX_RATES_LENGTH];
++      u8 rates_len;
++      u8 rates_ex[MAX_RATES_EX_LENGTH];
++      u8 rates_ex_len;
++      unsigned long last_scanned;
++      u8 mode;
++      u8 flags;
++      u32 last_associate;
++      u32 time_stamp[2];
++      u16 beacon_interval;
++      u16 listen_interval;
++      u16 atim_window;
++      u8 wpa_ie[MAX_WPA_IE_LEN];
++      size_t wpa_ie_len;
++      u8 rsn_ie[MAX_WPA_IE_LEN];
++      size_t rsn_ie_len;
++      u8 dtim_period;
++      u8 dtim_data;
++      u32 last_dtim_sta_time[2];
++      struct list_head list;
++      //appeded for QoS
++      u8 wmm_info;
++      struct ieee80211_wmm_ac_param wmm_param[4];
++      u8 QoS_Enable;
++      u8 SignalStrength;
++//by amy 080312
++      u8 HighestOperaRate;
++//by amy 080312
++#ifdef THOMAS_TURBO
++      u8 Turbo_Enable;//enable turbo mode, added by thomas
++#endif
++#ifdef ENABLE_DOT11D
++      u16 CountryIeLen;
++      u8 CountryIeBuf[MAX_IE_LEN];
++#endif
++};
++
++enum ieee80211_state {
++
++      /* the card is not linked at all */
++      IEEE80211_NOLINK = 0,
++
++      /* IEEE80211_ASSOCIATING* are for BSS client mode
++       * the driver shall not perform RX filtering unless
++       * the state is LINKED.
++       * The driver shall just check for the state LINKED and
++       * defaults to NOLINK for ALL the other states (including
++       * LINKED_SCANNING)
++       */
++
++      /* the association procedure will start (wq scheduling)*/
++      IEEE80211_ASSOCIATING,
++      IEEE80211_ASSOCIATING_RETRY,
++
++      /* the association procedure is sending AUTH request*/
++      IEEE80211_ASSOCIATING_AUTHENTICATING,
++
++      /* the association procedure has successfully authentcated
++       * and is sending association request
++       */
++      IEEE80211_ASSOCIATING_AUTHENTICATED,
++
++      /* the link is ok. the card associated to a BSS or linked
++       * to a ibss cell or acting as an AP and creating the bss
++       */
++      IEEE80211_LINKED,
++
++      /* same as LINKED, but the driver shall apply RX filter
++       * rules as we are in NO_LINK mode. As the card is still
++       * logically linked, but it is doing a syncro site survey
++       * then it will be back to LINKED state.
++       */
++      IEEE80211_LINKED_SCANNING,
++
++};
++
++#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
++#define DEFAULT_FTS 2346
++#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
++#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
++
++
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11))
++extern inline int is_multicast_ether_addr(const u8 *addr)
++{
++        return ((addr[0] != 0xff) && (0x01 & addr[0]));
++}
++#endif
++
++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13))
++extern inline int is_broadcast_ether_addr(const u8 *addr)
++{
++      return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \
++              (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
++}
++#endif
++
++#define CFG_IEEE80211_RESERVE_FCS (1<<0)
++#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
++
++typedef struct tx_pending_t{
++      int frag;
++      struct ieee80211_txb *txb;
++}tx_pending_t;
++
++
++struct ieee80211_device {
++      struct net_device *dev;
++
++      /* Bookkeeping structures */
++      struct net_device_stats stats;
++      struct ieee80211_stats ieee_stats;
++      struct ieee80211_softmac_stats softmac_stats;
++
++      /* Probe / Beacon management */
++      struct list_head network_free_list;
++      struct list_head network_list;
++      struct ieee80211_network *networks;
++      int scans;
++      int scan_age;
++
++      int iw_mode; /* operating mode (IW_MODE_*) */
++
++      spinlock_t lock;
++      spinlock_t wpax_suitlist_lock;
++
++      int tx_headroom; /* Set to size of any additional room needed at front
++                        * of allocated Tx SKBs */
++      u32 config;
++
++      /* WEP and other encryption related settings at the device level */
++      int open_wep; /* Set to 1 to allow unencrypted frames */
++
++      int reset_on_keychange; /* Set to 1 if the HW needs to be reset on
++                               * WEP key changes */
++
++      /* If the host performs {en,de}cryption, then set to 1 */
++      int host_encrypt;
++      int host_decrypt;
++      int ieee802_1x; /* is IEEE 802.1X used */
++
++      /* WPA data */
++      int wpa_enabled;
++      int drop_unencrypted;
++      int tkip_countermeasures;
++      int privacy_invoked;
++      size_t wpa_ie_len;
++      u8 *wpa_ie;
++
++      u8 ap_mac_addr[6];
++      u16 pairwise_key_type;
++      u16 broadcast_key_type;
++
++      struct list_head crypt_deinit_list;
++      struct ieee80211_crypt_data *crypt[WEP_KEYS];
++      int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
++      struct timer_list crypt_deinit_timer;
++
++      int bcrx_sta_key; /* use individual keys to override default keys even
++                         * with RX of broad/multicast frames */
++
++      /* Fragmentation structures */
++      // each streaming contain a entry
++      struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN];
++      unsigned int frag_next_idx[17];
++      u16 fts; /* Fragmentation Threshold */
++
++      /* This stores infos for the current network.
++       * Either the network we are associated in INFRASTRUCTURE
++       * or the network that we are creating in MASTER mode.
++       * ad-hoc is a mixture ;-).
++       * Note that in infrastructure mode, even when not associated,
++       * fields bssid and essid may be valid (if wpa_set and essid_set
++       * are true) as thy carry the value set by the user via iwconfig
++       */
++      struct ieee80211_network current_network;
++
++
++      enum ieee80211_state state;
++
++      int short_slot;
++      int mode;       /* A, B, G */
++      int modulation; /* CCK, OFDM */
++      int freq_band;  /* 2.4Ghz, 5.2Ghz, Mixed */
++      int abg_true;   /* ABG flag              */
++
++      /* used for forcing the ibss workqueue to terminate
++       * without wait for the syncro scan to terminate
++       */
++      short sync_scan_hurryup;
++
++#ifdef ENABLE_DOT11D
++      void * pDot11dInfo;
++      bool bGlobalDomain;
++
++      // For Liteon Ch12~13 passive scan
++      u8      MinPassiveChnlNum;
++      u8      IbssStartChnl;
++#else
++      /* map of allowed channels. 0 is dummy */
++      // FIXME: remeber to default to a basic channel plan depending of the PHY type
++      int channel_map[MAX_CHANNEL_NUMBER+1];
++#endif
++
++      int rate;       /* current rate */
++      int basic_rate;
++      //FIXME: pleace callback, see if redundant with softmac_features
++      short active_scan;
++
++      /* this contains flags for selectively enable softmac support */
++      u16 softmac_features;
++
++      /* if the sequence control field is not filled by HW */
++      u16 seq_ctrl[5];
++
++      /* association procedure transaction sequence number */
++      u16 associate_seq;
++
++      /* AID for RTXed association responses */
++      u16 assoc_id;
++
++      /* power save mode related*/
++      short ps;
++      short sta_sleep;
++      int ps_timeout;
++      struct tasklet_struct ps_task;
++      u32 ps_th;
++      u32 ps_tl;
++
++      short raw_tx;
++      /* used if IEEE_SOFTMAC_TX_QUEUE is set */
++      short queue_stop;
++      short scanning;
++      short proto_started;
++
++      struct semaphore wx_sem;
++      struct semaphore scan_sem;
++
++      spinlock_t mgmt_tx_lock;
++      spinlock_t beacon_lock;
++
++      short beacon_txing;
++
++      short wap_set;
++      short ssid_set;
++
++      u8  wpax_type_set;    //{added by David, 2006.9.28}
++      u32 wpax_type_notify; //{added by David, 2006.9.26}
++
++      /* QoS related flag */
++      char init_wmmparam_flag;
++
++      /* for discarding duplicated packets in IBSS */
++      struct list_head ibss_mac_hash[IEEE_IBSS_MAC_HASH_SIZE];
++
++      /* for discarding duplicated packets in BSS */
++      u16 last_rxseq_num[17]; /* rx seq previous per-tid */
++      u16 last_rxfrag_num[17];/* tx frag previous per-tid */
++      unsigned long last_packet_time[17];
++
++      /* for PS mode */
++      unsigned long last_rx_ps_time;
++
++      /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
++      struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
++      int mgmt_queue_head;
++      int mgmt_queue_tail;
++
++
++      /* used if IEEE_SOFTMAC_TX_QUEUE is set */
++      struct  tx_pending_t tx_pending;
++
++      /* used if IEEE_SOFTMAC_ASSOCIATE is set */
++      struct timer_list associate_timer;
++
++      /* used if IEEE_SOFTMAC_BEACONS is set */
++      struct timer_list beacon_timer;
++
++      struct work_struct associate_complete_wq;
++//    struct work_struct associate_retry_wq;
++      struct work_struct associate_procedure_wq;
++//    struct work_struct softmac_scan_wq;
++      struct work_struct wx_sync_scan_wq;
++      struct work_struct wmm_param_update_wq;
++      struct work_struct ps_request_tx_ack_wq;//for ps
++//    struct work_struct hw_wakeup_wq;
++//    struct work_struct hw_sleep_wq;
++//    struct work_struct watch_dog_wq;
++      bool bInactivePs;
++      bool actscanning;
++      bool beinretry;
++      u16 ListenInterval;
++      unsigned long NumRxDataInPeriod; //YJ,add,080828
++      unsigned long NumRxBcnInPeriod;  //YJ,add,080828
++      unsigned long NumRxOkTotal;
++      unsigned long NumRxUnicast;//YJ,add,080828,for keep alive
++      bool bHwRadioOff;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
++        struct delayed_work softmac_scan_wq;
++        struct delayed_work associate_retry_wq;
++      struct delayed_work hw_wakeup_wq;
++      struct delayed_work hw_sleep_wq;//+by amy 080324
++      struct delayed_work watch_dog_wq;
++      struct delayed_work sw_antenna_wq;
++      struct delayed_work  start_ibss_wq;
++//by amy for rate adaptive 080312
++    struct delayed_work rate_adapter_wq;
++//by amy for rate adaptive
++      struct delayed_work hw_dig_wq;
++      struct delayed_work tx_pw_wq;
++
++//Added for RF power on power off by lizhaoming 080512
++      struct delayed_work GPIOChangeRFWorkItem;
++#else
++
++      struct work_struct start_ibss_wq;
++        struct work_struct softmac_scan_wq;
++        struct work_struct associate_retry_wq;
++      struct work_struct hw_wakeup_wq;
++      struct work_struct hw_sleep_wq;
++      struct work_struct watch_dog_wq;
++      struct work_struct sw_antenna_wq;
++//by amy for rate adaptive 080312
++    struct work_struct rate_adapter_wq;
++//by amy for rate adaptive
++      struct work_struct hw_dig_wq;
++      struct work_struct tx_pw_wq;
++
++//Added for RF power on power off by lizhaoming 080512
++      struct work_struct GPIOChangeRFWorkItem;
++#endif
++      struct workqueue_struct *wq;
++
++      /* Callback functions */
++      void (*set_security)(struct net_device *dev,
++                           struct ieee80211_security *sec);
++
++      /* Used to TX data frame by using txb structs.
++       * this is not used if in the softmac_features
++       * is set the flag IEEE_SOFTMAC_TX_QUEUE
++       */
++      int (*hard_start_xmit)(struct ieee80211_txb *txb,
++                             struct net_device *dev);
++
++      int (*reset_port)(struct net_device *dev);
++
++      /* Softmac-generated frames (mamagement) are TXed via this
++       * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
++       * not set. As some cards may have different HW queues that
++       * one might want to use for data and management frames
++       * the option to have two callbacks might be useful.
++       * This fucntion can't sleep.
++       */
++      int (*softmac_hard_start_xmit)(struct sk_buff *skb,
++                             struct net_device *dev);
++
++      /* used instead of hard_start_xmit (not softmac_hard_start_xmit)
++       * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
++       * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set
++       * then also management frames are sent via this callback.
++       * This function can't sleep.
++       */
++      void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
++                             struct net_device *dev,int rate);
++
++      /* stops the HW queue for DATA frames. Useful to avoid
++       * waste time to TX data frame when we are reassociating
++       * This function can sleep.
++       */
++      void (*data_hard_stop)(struct net_device *dev);
++
++      /* OK this is complementar to data_poll_hard_stop */
++      void (*data_hard_resume)(struct net_device *dev);
++
++      /* ask to the driver to retune the radio .
++       * This function can sleep. the driver should ensure
++       * the radio has been swithced before return.
++       */
++      void (*set_chan)(struct net_device *dev,short ch);
++
++      /* These are not used if the ieee stack takes care of
++       * scanning (IEEE_SOFTMAC_SCAN feature set).
++       * In this case only the set_chan is used.
++       *
++       * The syncro version is similar to the start_scan but
++       * does not return until all channels has been scanned.
++       * this is called in user context and should sleep,
++       * it is called in a work_queue when swithcing to ad-hoc mode
++       * or in behalf of iwlist scan when the card is associated
++       * and root user ask for a scan.
++       * the fucntion stop_scan should stop both the syncro and
++       * background scanning and can sleep.
++       * The fucntion start_scan should initiate the background
++       * scanning and can't sleep.
++       */
++      void (*scan_syncro)(struct net_device *dev);
++      void (*start_scan)(struct net_device *dev);
++      void (*stop_scan)(struct net_device *dev);
++
++      /* indicate the driver that the link state is changed
++       * for example it may indicate the card is associated now.
++       * Driver might be interested in this to apply RX filter
++       * rules or simply light the LINK led
++       */
++      void (*link_change)(struct net_device *dev);
++
++      /* these two function indicates to the HW when to start
++       * and stop to send beacons. This is used when the
++       * IEEE_SOFTMAC_BEACONS is not set. For now the
++       * stop_send_bacons is NOT guaranteed to be called only
++       * after start_send_beacons.
++       */
++      void (*start_send_beacons) (struct net_device *dev);
++      void (*stop_send_beacons) (struct net_device *dev);
++
++      /* power save mode related */
++      void (*sta_wake_up) (struct net_device *dev);
++      void (*ps_request_tx_ack) (struct net_device *dev);
++      void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
++      short (*ps_is_queue_empty) (struct net_device *dev);
++
++      /* QoS related */
++      //void (*wmm_param_update) (struct net_device *dev, u8 *ac_param);
++      //void (*wmm_param_update) (struct ieee80211_device *ieee);
++
++      /* This must be the last item so that it points to the data
++       * allocated beyond this structure by alloc_ieee80211 */
++      u8 priv[0];
++};
++
++#define IEEE_A            (1<<0)
++#define IEEE_B            (1<<1)
++#define IEEE_G            (1<<2)
++#define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
++
++/* Generate a 802.11 header */
++
++/* Uses the channel change callback directly
++ * instead of [start/stop] scan callbacks
++ */
++#define IEEE_SOFTMAC_SCAN (1<<2)
++
++/* Perform authentication and association handshake */
++#define IEEE_SOFTMAC_ASSOCIATE (1<<3)
++
++/* Generate probe requests */
++#define IEEE_SOFTMAC_PROBERQ (1<<4)
++
++/* Generate respones to probe requests */
++#define IEEE_SOFTMAC_PROBERS (1<<5)
++
++/* The ieee802.11 stack will manages the netif queue
++ * wake/stop for the driver, taking care of 802.11
++ * fragmentation. See softmac.c for details. */
++#define IEEE_SOFTMAC_TX_QUEUE (1<<7)
++
++/* Uses only the softmac_data_hard_start_xmit
++ * even for TX management frames.
++ */
++#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8)
++
++/* Generate beacons.  The stack will enqueue beacons
++ * to the card
++ */
++#define IEEE_SOFTMAC_BEACONS (1<<6)
++
++
++
++static inline void *ieee80211_priv(struct net_device *dev)
++{
++      return ((struct ieee80211_device *)netdev_priv(dev))->priv;
++}
++
++extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
++{
++      /* Single white space is for Linksys APs */
++      if (essid_len == 1 && essid[0] == ' ')
++              return 1;
++
++      /* Otherwise, if the entire essid is 0, we assume it is hidden */
++      while (essid_len) {
++              essid_len--;
++              if (essid[essid_len] != '\0')
++                      return 0;
++      }
++
++      return 1;
++}
++
++extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
++{
++      /*
++       * It is possible for both access points and our device to support
++       * combinations of modes, so as long as there is one valid combination
++       * of ap/device supported modes, then return success
++       *
++       */
++      if ((mode & IEEE_A) &&
++          (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
++          (ieee->freq_band & IEEE80211_52GHZ_BAND))
++              return 1;
++
++      if ((mode & IEEE_G) &&
++          (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
++          (ieee->freq_band & IEEE80211_24GHZ_BAND))
++              return 1;
++
++      if ((mode & IEEE_B) &&
++          (ieee->modulation & IEEE80211_CCK_MODULATION) &&
++          (ieee->freq_band & IEEE80211_24GHZ_BAND))
++              return 1;
++
++      return 0;
++}
++
++extern inline int ieee80211_get_hdrlen(u16 fc)
++{
++      int hdrlen = 24;
++
++      switch (WLAN_FC_GET_TYPE(fc)) {
++      case IEEE80211_FTYPE_DATA:
++              if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
++                      hdrlen = 30; /* Addr4 */
++              if(IEEE80211_QOS_HAS_SEQ(fc))
++                      hdrlen += 2; /* QOS ctrl*/
++              break;
++      case IEEE80211_FTYPE_CTL:
++              switch (WLAN_FC_GET_STYPE(fc)) {
++              case IEEE80211_STYPE_CTS:
++              case IEEE80211_STYPE_ACK:
++                      hdrlen = 10;
++                      break;
++              default:
++                      hdrlen = 16;
++                      break;
++              }
++              break;
++      }
++
++      return hdrlen;
++}
++
++
++
++/* ieee80211.c */
++extern void free_ieee80211(struct net_device *dev);
++extern struct net_device *alloc_ieee80211(int sizeof_priv);
++
++extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
++
++/* ieee80211_tx.c */
++
++extern int ieee80211_encrypt_fragment(
++      struct ieee80211_device *ieee,
++      struct sk_buff *frag,
++      int hdr_len);
++
++extern int ieee80211_xmit(struct sk_buff *skb,
++                        struct net_device *dev);
++extern void ieee80211_txb_free(struct ieee80211_txb *);
++
++
++/* ieee80211_rx.c */
++extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
++                      struct ieee80211_rx_stats *rx_stats);
++extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
++                           struct ieee80211_hdr *header,
++                           struct ieee80211_rx_stats *stats);
++
++/* ieee80211_wx.c */
++extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
++                               struct iw_request_info *info,
++                               union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
++                                 struct iw_request_info *info,
++                                 union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
++                                 struct iw_request_info *info,
++                                 union iwreq_data *wrqu, char *key);
++extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
++                            struct iw_request_info *info,
++                            union iwreq_data* wrqu, char *extra);
++int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
++                               struct iw_request_info *info,
++                               struct iw_param *data, char *extra);
++int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
++                               struct iw_request_info *info,
++                               union iwreq_data *wrqu, char *extra);
++
++int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
++/* ieee80211_softmac.c */
++extern short ieee80211_is_54g(struct ieee80211_network net);
++extern short ieee80211_is_shortslot(struct ieee80211_network net);
++extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
++                      struct ieee80211_rx_stats *rx_stats, u16 type,
++                      u16 stype);
++extern void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
++
++extern void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
++extern void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
++extern void ieee80211_start_bss(struct ieee80211_device *ieee);
++extern void ieee80211_start_master_bss(struct ieee80211_device *ieee);
++extern void ieee80211_start_ibss(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_init(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_free(struct ieee80211_device *ieee);
++extern void ieee80211_associate_abort(struct ieee80211_device *ieee);
++extern void ieee80211_disassociate(struct ieee80211_device *ieee);
++extern void ieee80211_stop_scan(struct ieee80211_device *ieee);
++extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
++extern void ieee80211_check_all_nets(struct ieee80211_device *ieee);
++extern void ieee80211_start_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_stop_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee);
++extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
++extern void ieee80211_wake_queue(struct ieee80211_device *ieee);
++extern void ieee80211_stop_queue(struct ieee80211_device *ieee);
++extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
++extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
++extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
++extern int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
++extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
++extern void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
++extern void SendDisassociation(struct ieee80211_device *ieee,u8* asSta,u8 asRsn);
++extern void ieee80211_start_scan(struct ieee80211_device *ieee);
++
++//Add for RF power on power off by lizhaoming 080512
++extern void SendDisassociation(struct ieee80211_device *ieee,
++                               u8*                     asSta,
++                       u8                      asRsn);
++
++/* ieee80211_crypt_ccmp&tkip&wep.c */
++extern void ieee80211_tkip_null(void);
++extern void ieee80211_wep_null(void);
++extern void ieee80211_ccmp_null(void);
++/* ieee80211_softmac_wx.c */
++
++extern int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
++                          struct iw_request_info *info,
++                          union iwreq_data *wrqu, char *ext);
++
++extern int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
++                       struct iw_request_info *info,
++                       union iwreq_data *awrq,
++                       char *extra);
++
++extern int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
++
++extern int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
++                           struct iw_request_info *info,
++                           union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
++                           struct iw_request_info *info,
++                           union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
++                           union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
++                           union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
++                            struct iw_request_info *a,
++                            union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
++                           union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
++                           union iwreq_data *wrqu, char *b);
++
++extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
++                           union iwreq_data *wrqu, char *b);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
++extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
++#else
++ extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
++#endif
++//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
++
++extern int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
++                             struct iw_request_info *info,
++                             union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_name(struct ieee80211_device *ieee,
++                           struct iw_request_info *info,
++                           union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_set_power(struct ieee80211_device *ieee,
++                               struct iw_request_info *info,
++                               union iwreq_data *wrqu, char *extra);
++
++extern int ieee80211_wx_get_power(struct ieee80211_device *ieee,
++                               struct iw_request_info *info,
++                               union iwreq_data *wrqu, char *extra);
++
++extern void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee);
++
++extern void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr);
++
++extern const long ieee80211_wlan_frequencies[];
++
++extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
++{
++      ieee->scans++;
++}
++
++extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
++{
++      return ieee->scans;
++}
++
++static inline const char *escape_essid(const char *essid, u8 essid_len) {
++      static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
++      const char *s = essid;
++      char *d = escaped;
++
++      if (ieee80211_is_empty_essid(essid, essid_len)) {
++              memcpy(escaped, "<hidden>", sizeof("<hidden>"));
++              return escaped;
++      }
++
++      essid_len = min(essid_len, (u8)IW_ESSID_MAX_SIZE);
++      while (essid_len--) {
++              if (*s == '\0') {
++                      *d++ = '\\';
++                      *d++ = '0';
++                      s++;
++              } else {
++                      *d++ = *s++;
++              }
++      }
++      *d = '\0';
++      return escaped;
++}
++#endif /* IEEE80211_H */
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,265 @@
 +/*
 + * Host AP crypto routines
@@ -779247,9 +780866,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c li
 +
 +//module_init(ieee80211_crypto_init);
 +//module_exit(ieee80211_crypto_deinit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,86 @@
 +/*
 + * Original code based on Host AP (software wireless LAN access point) driver
@@ -779337,9 +780956,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.h li
 +                                  struct ieee80211_crypt_data **crypt);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,533 @@
 +/*
 + * Host AP crypt: host-based CCMP encryption implementation for Host AP driver
@@ -779874,9 +781493,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp
 +
 +//module_init(ieee80211_crypto_ccmp_init);
 +//module_exit(ieee80211_crypto_ccmp_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1001 @@
 +/*
 + * Host AP crypt: host-based TKIP encryption implementation for Host AP driver
@@ -780879,9 +782498,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip
 +
 +//module_init(ieee80211_crypto_tkip_init);
 +//module_exit(ieee80211_crypto_tkip_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,394 @@
 +/*
 + * Host AP crypt: host-based WEP encryption implementation for Host AP driver
@@ -781277,9 +782896,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.
 +#endif
 +//module_init(ieee80211_crypto_wep_init);
 +//module_exit(ieee80211_crypto_wep_exit);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_module.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,299 @@
 +/*******************************************************************************
 +
@@ -781580,9 +783199,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c l
 +EXPORT_SYMBOL(alloc_ieee80211);
 +EXPORT_SYMBOL(free_ieee80211);
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1971 @@
 +/*
 + * Original code based Host AP (software wireless LAN access point) driver
@@ -783555,9 +785174,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c linux
 +EXPORT_SYMBOL(ieee_ext_skb_p80211_to_ether);
 +#endif
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,4029 @@
 +/* IEEE 802.11 SoftMAC layer
 + * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
@@ -787588,9 +789207,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
 +#endif // _RTL8187_EXT_PATCH_
 +EXPORT_SYMBOL(ieee80211_sta_ps_send_null_frame);
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,602 @@
 +/* IEEE 802.11 SoftMAC layer
 + * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
@@ -788194,9 +789813,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx
 +EXPORT_SYMBOL(ieee80211_wx_get_power);
 +EXPORT_SYMBOL(ieee80211_wlan_frequencies);
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,828 @@
 +/******************************************************************************
 +
@@ -789026,9 +790645,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c linux
 +EXPORT_SYMBOL(ieee80211_ext_reuse_txb);
 +#endif // _RTL8187_EXT_PATCH_
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,884 @@
 +/******************************************************************************
 +
@@ -789914,9 +791533,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c linux
 +EXPORT_SYMBOL(ieee80211_wx_set_encode);
 +EXPORT_SYMBOL(ieee80211_wx_get_encode);
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/internal.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/internal.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/internal.h 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/internal.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/internal.h   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,115 @@
 +/*
 + * Cryptographic API.
@@ -790033,9 +791652,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/internal.h linux-2.6
 +
 +#endif        /* _CRYPTO_INTERNAL_H */
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211/rtl_crypto.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,399 @@
 +/*
 + * Scatterlist Cryptographic API.
@@ -790436,1768 +792055,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211/rtl_crypto.h linux-2
 +
 +#endif        /* _LINUX_CRYPTO_H */
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211.h  2009-03-25 16:11:12.000000000 +0000
-@@ -0,0 +1,1755 @@
-+/*
-+ * Merged with mainline ieee80211.h in Aug 2004.  Original ieee802_11
-+ * remains copyright by the original authors
-+ *
-+ * Portions of the merged code are based on Host AP (software wireless
-+ * LAN access point) driver for Intersil Prism2/2.5/3.
-+ *
-+ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
-+ * <jkmaline@cc.hut.fi>
-+ * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
-+ *
-+ * Adaption to a generic IEEE 802.11 stack by James Ketrenos
-+ * <jketreno@linux.intel.com>
-+ * Copyright (c) 2004, Intel Corporation
-+ *
-+ * Modified for Realtek's wi-fi cards by Andrea Merello
-+ * <andreamrl@tiscali.it>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation. See README and COPYING for
-+ * more details.
-+ */
-+#ifndef IEEE80211_H
-+#define IEEE80211_H
-+#include <linux/if_ether.h> /* ETH_ALEN */
-+#include <linux/kernel.h>   /* ARRAY_SIZE */
-+#include <linux/version.h>
-+#include <linux/jiffies.h>
-+#include <linux/timer.h>
-+#include <linux/sched.h>
-+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
-+#include <linux/wireless.h>
-+#endif
-+
-+/*
-+#ifndef bool
-+#define bool int
-+#endif
-+
-+#ifndef true
-+#define true   1
-+#endif
-+
-+#ifndef false
-+#define false  0
-+#endif
-+*/
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
-+#ifndef bool
-+typedef enum{false = 0, true} bool;
-+#endif
-+#endif
-+//#ifdef JOHN_HWSEC
-+#define KEY_TYPE_NA           0x0
-+#define KEY_TYPE_WEP40                0x1
-+#define KEY_TYPE_TKIP         0x2
-+#define KEY_TYPE_CCMP         0x4
-+#define KEY_TYPE_WEP104               0x5
-+//#endif
-+
-+
-+#define aSifsTime                                     10
-+
-+#define MGMT_QUEUE_NUM 5
-+
-+
-+#define IEEE_CMD_SET_WPA_PARAM                        1
-+#define       IEEE_CMD_SET_WPA_IE                     2
-+#define IEEE_CMD_SET_ENCRYPTION                       3
-+#define IEEE_CMD_MLME                         4
-+
-+#define IEEE_PARAM_WPA_ENABLED                        1
-+#define IEEE_PARAM_TKIP_COUNTERMEASURES               2
-+#define IEEE_PARAM_DROP_UNENCRYPTED           3
-+#define IEEE_PARAM_PRIVACY_INVOKED            4
-+#define IEEE_PARAM_AUTH_ALGS                  5
-+#define IEEE_PARAM_IEEE_802_1X                        6
-+//It should consistent with the driver_XXX.c
-+//   David, 2006.9.26
-+#define IEEE_PARAM_WPAX_SELECT                        7
-+//Added for notify the encryption type selection
-+//   David, 2006.9.26
-+#define IEEE_PROTO_WPA                                1
-+#define IEEE_PROTO_RSN                                2
-+//Added for notify the encryption type selection
-+//   David, 2006.9.26
-+#define IEEE_WPAX_USEGROUP                    0
-+#define IEEE_WPAX_WEP40                               1
-+#define IEEE_WPAX_TKIP                                2
-+#define IEEE_WPAX_WRAP                        3
-+#define IEEE_WPAX_CCMP                                4
-+#define IEEE_WPAX_WEP104                      5
-+
-+#define IEEE_KEY_MGMT_IEEE8021X                       1
-+#define IEEE_KEY_MGMT_PSK                     2
-+
-+
-+
-+#define IEEE_MLME_STA_DEAUTH                  1
-+#define IEEE_MLME_STA_DISASSOC                        2
-+
-+
-+#define IEEE_CRYPT_ERR_UNKNOWN_ALG            2
-+#define IEEE_CRYPT_ERR_UNKNOWN_ADDR           3
-+#define IEEE_CRYPT_ERR_CRYPT_INIT_FAILED              4
-+#define IEEE_CRYPT_ERR_KEY_SET_FAILED         5
-+#define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED              6
-+#define IEEE_CRYPT_ERR_CARD_CONF_FAILED               7
-+
-+
-+#define       IEEE_CRYPT_ALG_NAME_LEN                 16
-+
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,10))
-+#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rtl
-+#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rtl
-+#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rtl
-+////////////////////////////////
-+// added for kernel conflict under FC5
-+#define ieee80211_wx_get_name   ieee80211_wx_get_name_rtl
-+#define free_ieee80211          free_ieee80211_rtl
-+#define alloc_ieee80211        alloc_ieee80211_rtl
-+///////////////////////////////
-+#endif
-+//error in ubuntu2.6.22,so add these
-+#define ieee80211_wake_queue ieee80211_wake_queue_rtl
-+#define ieee80211_stop_queue ieee80211_stop_queue_rtl
-+
-+#define ieee80211_rx ieee80211_rx_rtl
-+
-+#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rtl
-+#define ieee80211_unregister_crypto_ops       ieee80211_unregister_crypto_ops_rtl
-+#define ieee80211_get_crypto_ops      ieee80211_get_crypto_ops_rtl
-+#define ieee80211_crypt_deinit_entries        ieee80211_crypt_deinit_entries_rtl
-+#define ieee80211_crypt_deinit_handler        ieee80211_crypt_deinit_handler_rtl
-+#define ieee80211_crypt_delayed_deinit        ieee80211_crypt_delayed_deinit_rtl
-+
-+#define ieee80211_txb_free    ieee80211_txb_free_rtl
-+#define ieee80211_wx_get_essid        ieee80211_wx_get_essid_rtl
-+#define ieee80211_wx_set_essid        ieee80211_wx_set_essid_rtl
-+#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rtl
-+#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rtl
-+#define ieee80211_wx_set_wap  ieee80211_wx_set_wap_rtl
-+#define ieee80211_wx_get_wap  ieee80211_wx_get_wap_rtl
-+#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rtl
-+#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rtl
-+#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rtl
-+#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rtl
-+#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rtl
-+#define ieee80211_wx_set_rawtx        ieee80211_wx_set_rawtx_rtl
-+#define ieee80211_wx_set_power        ieee80211_wx_set_power_rtl
-+#define ieee80211_wx_get_power        ieee80211_wx_get_power_rtl
-+#define ieee80211_wlan_frequencies    ieee80211_wlan_frequencies_rtl
-+#define ieee80211_softmac_stop_protocol       ieee80211_softmac_stop_protocol_rtl
-+#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rtl
-+#define       ieee80211_start_protocol        ieee80211_start_protocol_rtl
-+#define       ieee80211_stop_protocol         ieee80211_stop_protocol_rtl
-+#define       ieee80211_rx_mgt                ieee80211_rx_mgt_rtl
-+
-+#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rtl
-+//by amy for ps
-+#define notify_wx_assoc_event  notify_wx_assoc_event_rtl
-+#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rtl
-+#define ieee80211_disassociate ieee80211_disassociate_rtl
-+#define ieee80211_start_scan ieee80211_start_scan_rtl
-+//by amy for ps
-+typedef struct ieee_param {
-+      u32 cmd;
-+      u8 sta_addr[ETH_ALEN];
-+        union {
-+              struct {
-+                      u8 name;
-+                      u32 value;
-+              } wpa_param;
-+              struct {
-+                      u32 len;
-+                      u8 reserved[32];
-+                      u8 data[0];
-+              } wpa_ie;
-+              struct{
-+                      int command;
-+                      int reason_code;
-+              } mlme;
-+              struct {
-+                      u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
-+                      u8 set_tx;
-+                      u32 err;
-+                      u8 idx;
-+                      u8 seq[8]; /* sequence counter (set: RX, get: TX) */
-+                      u16 key_len;
-+                      u8 key[0];
-+              } crypt;
-+
-+      } u;
-+}ieee_param;
-+
-+
-+#if WIRELESS_EXT < 17
-+#define IW_QUAL_QUAL_INVALID   0x10
-+#define IW_QUAL_LEVEL_INVALID  0x20
-+#define IW_QUAL_NOISE_INVALID  0x40
-+#define IW_QUAL_QUAL_UPDATED   0x1
-+#define IW_QUAL_LEVEL_UPDATED  0x2
-+#define IW_QUAL_NOISE_UPDATED  0x4
-+#endif
-+
-+// linux under 2.6.9 release may not support it, so modify it for common use
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
-+#define MSECS(t)      (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
-+static inline unsigned long msleep_interruptible_rtl(unsigned int msecs)
-+{
-+         unsigned long timeout = MSECS(msecs) + 1;
-+
-+         while (timeout) {
-+                 set_current_state(TASK_UNINTERRUPTIBLE);
-+                 timeout = schedule_timeout(timeout);
-+         }
-+         return timeout;
-+}
-+#else
-+#define MSECS(t) msecs_to_jiffies(t)
-+#define msleep_interruptible_rtl  msleep_interruptible
-+#endif
-+
-+#define IEEE80211_DATA_LEN            2304
-+/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
-+   6.2.1.1.2.
-+
-+   The figure in section 7.1.2 suggests a body size of up to 2312
-+   bytes is allowed, which is a bit confusing, I suspect this
-+   represents the 2304 bytes of real data, plus a possible 8 bytes of
-+   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
-+
-+
-+#define IEEE80211_HLEN                        30
-+#define IEEE80211_FRAME_LEN           (IEEE80211_DATA_LEN + IEEE80211_HLEN)
-+
-+/* this is stolen and modified from the madwifi driver*/
-+#define IEEE80211_FC0_TYPE_MASK               0x0c
-+#define IEEE80211_FC0_TYPE_DATA               0x08
-+#define IEEE80211_FC0_SUBTYPE_MASK    0xB0
-+#define IEEE80211_FC0_SUBTYPE_QOS     0x80
-+
-+#define IEEE80211_QOS_HAS_SEQ(fc) \
-+      (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \
-+       (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS))
-+
-+/* this is stolen from ipw2200 driver */
-+#define IEEE_IBSS_MAC_HASH_SIZE 31
-+struct ieee_ibss_seq {
-+      u8 mac[ETH_ALEN];
-+      u16 seq_num[17];
-+      u16 frag_num[17];
-+      unsigned long packet_time[17];
-+      struct list_head list;
-+};
-+
-+struct ieee80211_hdr {
-+      u16 frame_ctl;
-+      u16 duration_id;
-+      u8 addr1[ETH_ALEN];
-+      u8 addr2[ETH_ALEN];
-+      u8 addr3[ETH_ALEN];
-+      u16 seq_ctl;
-+      u8 addr4[ETH_ALEN];
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_QOS {
-+      u16 frame_ctl;
-+      u16 duration_id;
-+      u8 addr1[ETH_ALEN];
-+      u8 addr2[ETH_ALEN];
-+      u8 addr3[ETH_ALEN];
-+      u16 seq_ctl;
-+      u8 addr4[ETH_ALEN];
-+      u16 QOS_ctl;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_3addr {
-+      u16 frame_ctl;
-+      u16 duration_id;
-+      u8 addr1[ETH_ALEN];
-+      u8 addr2[ETH_ALEN];
-+      u8 addr3[ETH_ALEN];
-+      u16 seq_ctl;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_hdr_3addr_QOS {
-+      u16 frame_ctl;
-+      u16 duration_id;
-+      u8 addr1[ETH_ALEN];
-+      u8 addr2[ETH_ALEN];
-+      u8 addr3[ETH_ALEN];
-+      u16 seq_ctl;
-+      u16 QOS_ctl;
-+} __attribute__ ((packed));
-+
-+enum eap_type {
-+      EAP_PACKET = 0,
-+      EAPOL_START,
-+      EAPOL_LOGOFF,
-+      EAPOL_KEY,
-+      EAPOL_ENCAP_ASF_ALERT
-+};
-+
-+static const char *eap_types[] = {
-+      [EAP_PACKET]            = "EAP-Packet",
-+      [EAPOL_START]           = "EAPOL-Start",
-+      [EAPOL_LOGOFF]          = "EAPOL-Logoff",
-+      [EAPOL_KEY]             = "EAPOL-Key",
-+      [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert"
-+};
-+
-+static inline const char *eap_get_type(int type)
-+{
-+      return (type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
-+}
-+
-+struct eapol {
-+      u8 snap[6];
-+      u16 ethertype;
-+      u8 version;
-+      u8 type;
-+      u16 length;
-+} __attribute__ ((packed));
-+
-+#define IEEE80211_3ADDR_LEN 24
-+#define IEEE80211_4ADDR_LEN 30
-+#define IEEE80211_FCS_LEN    4
-+
-+#define MIN_FRAG_THRESHOLD     256U
-+#define       MAX_FRAG_THRESHOLD     2346U
-+
-+/* Frame control field constants */
-+#define IEEE80211_FCTL_VERS           0x0002
-+#define IEEE80211_FCTL_FTYPE          0x000c
-+#define IEEE80211_FCTL_STYPE          0x00f0
-+#define IEEE80211_FCTL_TODS           0x0100
-+#define IEEE80211_FCTL_FROMDS         0x0200
-+#define IEEE80211_FCTL_DSTODS         0x0300 //added by david
-+#define IEEE80211_FCTL_MOREFRAGS      0x0400
-+#define IEEE80211_FCTL_RETRY          0x0800
-+#define IEEE80211_FCTL_PM             0x1000
-+#define IEEE80211_FCTL_MOREDATA       0x2000
-+#define IEEE80211_FCTL_WEP            0x4000
-+#define IEEE80211_FCTL_ORDER          0x8000
-+
-+#define IEEE80211_FTYPE_MGMT          0x0000
-+#define IEEE80211_FTYPE_CTL           0x0004
-+#define IEEE80211_FTYPE_DATA          0x0008
-+
-+/* management */
-+#define IEEE80211_STYPE_ASSOC_REQ     0x0000
-+#define IEEE80211_STYPE_ASSOC_RESP    0x0010
-+#define IEEE80211_STYPE_REASSOC_REQ   0x0020
-+#define IEEE80211_STYPE_REASSOC_RESP  0x0030
-+#define IEEE80211_STYPE_PROBE_REQ     0x0040
-+#define IEEE80211_STYPE_PROBE_RESP    0x0050
-+#define IEEE80211_STYPE_BEACON                0x0080
-+#define IEEE80211_STYPE_ATIM          0x0090
-+#define IEEE80211_STYPE_DISASSOC      0x00A0
-+#define IEEE80211_STYPE_AUTH          0x00B0
-+#define IEEE80211_STYPE_DEAUTH                0x00C0
-+#define IEEE80211_STYPE_MANAGE_ACT    0x00D0
-+
-+/* control */
-+#define IEEE80211_STYPE_PSPOLL                0x00A0
-+#define IEEE80211_STYPE_RTS           0x00B0
-+#define IEEE80211_STYPE_CTS           0x00C0
-+#define IEEE80211_STYPE_ACK           0x00D0
-+#define IEEE80211_STYPE_CFEND         0x00E0
-+#define IEEE80211_STYPE_CFENDACK      0x00F0
-+
-+/* data */
-+#define IEEE80211_STYPE_DATA          0x0000
-+#define IEEE80211_STYPE_DATA_CFACK    0x0010
-+#define IEEE80211_STYPE_DATA_CFPOLL   0x0020
-+#define IEEE80211_STYPE_DATA_CFACKPOLL        0x0030
-+#define IEEE80211_STYPE_NULLFUNC      0x0040
-+#define IEEE80211_STYPE_CFACK         0x0050
-+#define IEEE80211_STYPE_CFPOLL                0x0060
-+#define IEEE80211_STYPE_CFACKPOLL     0x0070
-+#define IEEE80211_STYPE_QOS_DATA      0x0080 //added for WMM 2006/8/2
-+#define IEEE80211_STYPE_QOS_NULL      0x00C0
-+
-+
-+#define IEEE80211_SCTL_FRAG           0x000F
-+#define IEEE80211_SCTL_SEQ            0xFFF0
-+
-+
-+/* debug macros */
-+
-+#ifdef CONFIG_IEEE80211_DEBUG
-+extern u32 ieee80211_debug_level;
-+#define IEEE80211_DEBUG(level, fmt, args...) \
-+do { if (ieee80211_debug_level & (level)) \
-+  printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
-+         in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
-+#else
-+#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
-+#endif        /* CONFIG_IEEE80211_DEBUG */
-+
-+/*
-+ * To use the debug system;
-+ *
-+ * If you are defining a new debug classification, simply add it to the #define
-+ * list here in the form of:
-+ *
-+ * #define IEEE80211_DL_xxxx VALUE
-+ *
-+ * shifting value to the left one bit from the previous entry.  xxxx should be
-+ * the name of the classification (for example, WEP)
-+ *
-+ * You then need to either add a IEEE80211_xxxx_DEBUG() macro definition for your
-+ * classification, or use IEEE80211_DEBUG(IEEE80211_DL_xxxx, ...) whenever you want
-+ * to send output to that classification.
-+ *
-+ * To add your debug level to the list of levels seen when you perform
-+ *
-+ * % cat /proc/net/ipw/debug_level
-+ *
-+ * you simply need to add your entry to the ipw_debug_levels array.
-+ *
-+ * If you do not see debug_level in /proc/net/ipw then you do not have
-+ * CONFIG_IEEE80211_DEBUG defined in your kernel configuration
-+ *
-+ */
-+
-+#define IEEE80211_DL_INFO          (1<<0)
-+#define IEEE80211_DL_WX            (1<<1)
-+#define IEEE80211_DL_SCAN          (1<<2)
-+#define IEEE80211_DL_STATE         (1<<3)
-+#define IEEE80211_DL_MGMT          (1<<4)
-+#define IEEE80211_DL_FRAG          (1<<5)
-+#define IEEE80211_DL_EAP           (1<<6)
-+#define IEEE80211_DL_DROP          (1<<7)
-+
-+#define IEEE80211_DL_TX            (1<<8)
-+#define IEEE80211_DL_RX            (1<<9)
-+
-+#define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a)
-+#define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a)
-+#define IEEE80211_DEBUG_INFO(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a)
-+
-+#define IEEE80211_DEBUG_WX(f, a...)     IEEE80211_DEBUG(IEEE80211_DL_WX, f, ## a)
-+#define IEEE80211_DEBUG_SCAN(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a)
-+//#define IEEE_DEBUG_SCAN  IEEE80211_WARNING
-+#define IEEE80211_DEBUG_STATE(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a)
-+#define IEEE80211_DEBUG_MGMT(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a)
-+#define IEEE80211_DEBUG_FRAG(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a)
-+#define IEEE80211_DEBUG_EAP(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a)
-+#define IEEE80211_DEBUG_DROP(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a)
-+#define IEEE80211_DEBUG_TX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a)
-+#define IEEE80211_DEBUG_RX(f, a...)  IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a)
-+#include <linux/netdevice.h>
-+#include <linux/wireless.h>
-+#include <linux/if_arp.h> /* ARPHRD_ETHER */
-+
-+#ifndef WIRELESS_SPY
-+#define WIRELESS_SPY          // enable iwspy support
-+#endif
-+#include <net/iw_handler.h>   // new driver API
-+
-+#ifndef ETH_P_PAE
-+#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
-+#endif /* ETH_P_PAE */
-+
-+#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */
-+
-+#ifndef ETH_P_80211_RAW
-+#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
-+#endif
-+
-+/* IEEE 802.11 defines */
-+
-+#define P80211_OUI_LEN 3
-+
-+struct ieee80211_snap_hdr {
-+
-+        u8    dsap;   /* always 0xAA */
-+        u8    ssap;   /* always 0xAA */
-+        u8    ctrl;   /* always 0x03 */
-+        u8    oui[P80211_OUI_LEN];    /* organizational universal id */
-+
-+} __attribute__ ((packed));
-+
-+#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
-+
-+#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
-+#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
-+
-+#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
-+#define WLAN_GET_SEQ_SEQ(seq)  ((seq) & IEEE80211_SCTL_SEQ)
-+
-+/* Authentication algorithms */
-+#define WLAN_AUTH_OPEN 0
-+#define WLAN_AUTH_SHARED_KEY 1
-+
-+#define WLAN_AUTH_CHALLENGE_LEN 128
-+
-+#define WLAN_CAPABILITY_BSS (1<<0)
-+#define WLAN_CAPABILITY_IBSS (1<<1)
-+#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
-+#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
-+#define WLAN_CAPABILITY_PRIVACY (1<<4)
-+#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
-+#define WLAN_CAPABILITY_PBCC (1<<6)
-+#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
-+#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
-+
-+/* Status codes */
-+#define WLAN_STATUS_SUCCESS 0
-+#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
-+#define WLAN_STATUS_CAPS_UNSUPPORTED 10
-+#define WLAN_STATUS_REASSOC_NO_ASSOC 11
-+#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
-+#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
-+#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
-+#define WLAN_STATUS_CHALLENGE_FAIL 15
-+#define WLAN_STATUS_AUTH_TIMEOUT 16
-+#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
-+#define WLAN_STATUS_ASSOC_DENIED_RATES 18
-+/* 802.11b */
-+#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
-+#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
-+#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
-+
-+/* Reason codes */
-+#define WLAN_REASON_UNSPECIFIED 1
-+#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
-+#define WLAN_REASON_DEAUTH_LEAVING 3
-+#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
-+#define WLAN_REASON_DISASSOC_AP_BUSY 5
-+#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
-+#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
-+#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
-+#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
-+
-+
-+/* Information Element IDs */
-+#define WLAN_EID_SSID 0
-+#define WLAN_EID_SUPP_RATES 1
-+#define WLAN_EID_FH_PARAMS 2
-+#define WLAN_EID_DS_PARAMS 3
-+#define WLAN_EID_CF_PARAMS 4
-+#define WLAN_EID_TIM 5
-+#define WLAN_EID_IBSS_PARAMS 6
-+#define WLAN_EID_CHALLENGE 16
-+#define WLAN_EID_RSN 48
-+#define WLAN_EID_GENERIC 221
-+
-+#define IEEE80211_MGMT_HDR_LEN 24
-+#define IEEE80211_DATA_HDR3_LEN 24
-+#define IEEE80211_DATA_HDR4_LEN 30
-+
-+
-+#define IEEE80211_STATMASK_SIGNAL (1<<0)
-+#define IEEE80211_STATMASK_RSSI (1<<1)
-+#define IEEE80211_STATMASK_NOISE (1<<2)
-+#define IEEE80211_STATMASK_RATE (1<<3)
-+#define IEEE80211_STATMASK_WEMASK 0x7
-+
-+
-+#define IEEE80211_CCK_MODULATION    (1<<0)
-+#define IEEE80211_OFDM_MODULATION   (1<<1)
-+
-+#define IEEE80211_24GHZ_BAND     (1<<0)
-+#define IEEE80211_52GHZ_BAND     (1<<1)
-+
-+#define IEEE80211_CCK_RATE_LEN                4
-+#define IEEE80211_CCK_RATE_1MB                        0x02
-+#define IEEE80211_CCK_RATE_2MB                        0x04
-+#define IEEE80211_CCK_RATE_5MB                        0x0B
-+#define IEEE80211_CCK_RATE_11MB                       0x16
-+#define IEEE80211_OFDM_RATE_LEN               8
-+#define IEEE80211_OFDM_RATE_6MB                       0x0C
-+#define IEEE80211_OFDM_RATE_9MB                       0x12
-+#define IEEE80211_OFDM_RATE_12MB              0x18
-+#define IEEE80211_OFDM_RATE_18MB              0x24
-+#define IEEE80211_OFDM_RATE_24MB              0x30
-+#define IEEE80211_OFDM_RATE_36MB              0x48
-+#define IEEE80211_OFDM_RATE_48MB              0x60
-+#define IEEE80211_OFDM_RATE_54MB              0x6C
-+#define IEEE80211_BASIC_RATE_MASK             0x80
-+
-+#define IEEE80211_CCK_RATE_1MB_MASK           (1<<0)
-+#define IEEE80211_CCK_RATE_2MB_MASK           (1<<1)
-+#define IEEE80211_CCK_RATE_5MB_MASK           (1<<2)
-+#define IEEE80211_CCK_RATE_11MB_MASK          (1<<3)
-+#define IEEE80211_OFDM_RATE_6MB_MASK          (1<<4)
-+#define IEEE80211_OFDM_RATE_9MB_MASK          (1<<5)
-+#define IEEE80211_OFDM_RATE_12MB_MASK         (1<<6)
-+#define IEEE80211_OFDM_RATE_18MB_MASK         (1<<7)
-+#define IEEE80211_OFDM_RATE_24MB_MASK         (1<<8)
-+#define IEEE80211_OFDM_RATE_36MB_MASK         (1<<9)
-+#define IEEE80211_OFDM_RATE_48MB_MASK         (1<<10)
-+#define IEEE80211_OFDM_RATE_54MB_MASK         (1<<11)
-+
-+#define IEEE80211_CCK_RATES_MASK              0x0000000F
-+#define IEEE80211_CCK_BASIC_RATES_MASK        (IEEE80211_CCK_RATE_1MB_MASK | \
-+      IEEE80211_CCK_RATE_2MB_MASK)
-+#define IEEE80211_CCK_DEFAULT_RATES_MASK      (IEEE80211_CCK_BASIC_RATES_MASK | \
-+        IEEE80211_CCK_RATE_5MB_MASK | \
-+        IEEE80211_CCK_RATE_11MB_MASK)
-+
-+#define IEEE80211_OFDM_RATES_MASK             0x00000FF0
-+#define IEEE80211_OFDM_BASIC_RATES_MASK       (IEEE80211_OFDM_RATE_6MB_MASK | \
-+      IEEE80211_OFDM_RATE_12MB_MASK | \
-+      IEEE80211_OFDM_RATE_24MB_MASK)
-+#define IEEE80211_OFDM_DEFAULT_RATES_MASK     (IEEE80211_OFDM_BASIC_RATES_MASK | \
-+      IEEE80211_OFDM_RATE_9MB_MASK  | \
-+      IEEE80211_OFDM_RATE_18MB_MASK | \
-+      IEEE80211_OFDM_RATE_36MB_MASK | \
-+      IEEE80211_OFDM_RATE_48MB_MASK | \
-+      IEEE80211_OFDM_RATE_54MB_MASK)
-+#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
-+                                IEEE80211_CCK_DEFAULT_RATES_MASK)
-+
-+#define IEEE80211_NUM_OFDM_RATES          8
-+#define IEEE80211_NUM_CCK_RATES                   4
-+#define IEEE80211_OFDM_SHIFT_MASK_A         4
-+
-+
-+
-+
-+/* NOTE: This data is for statistical purposes; not all hardware provides this
-+ *       information for frames received.  Not setting these will not cause
-+ *       any adverse affects. */
-+struct ieee80211_rx_stats {
-+      u32 mac_time[2];
-+      u8 signalstrength;
-+      s8 rssi;
-+      u8 signal;
-+      u8 noise;
-+      u16 rate; /* in 100 kbps */
-+      u8 received_channel;
-+      u8 control;
-+      u8 mask;
-+      u8 freq;
-+      u16 len;
-+      u8 nic_type;
-+};
-+
-+/* IEEE 802.11 requires that STA supports concurrent reception of at least
-+ * three fragmented frames. This define can be increased to support more
-+ * concurrent frames, but it should be noted that each entry can consume about
-+ * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
-+#define IEEE80211_FRAG_CACHE_LEN 4
-+
-+struct ieee80211_frag_entry {
-+      unsigned long first_frag_time;
-+      unsigned int seq;
-+      unsigned int last_frag;
-+      struct sk_buff *skb;
-+      u8 src_addr[ETH_ALEN];
-+      u8 dst_addr[ETH_ALEN];
-+};
-+
-+struct ieee80211_stats {
-+      unsigned int tx_unicast_frames;
-+      unsigned int tx_multicast_frames;
-+      unsigned int tx_fragments;
-+      unsigned int tx_unicast_octets;
-+      unsigned int tx_multicast_octets;
-+      unsigned int tx_deferred_transmissions;
-+      unsigned int tx_single_retry_frames;
-+      unsigned int tx_multiple_retry_frames;
-+      unsigned int tx_retry_limit_exceeded;
-+      unsigned int tx_discards;
-+      unsigned int rx_unicast_frames;
-+      unsigned int rx_multicast_frames;
-+      unsigned int rx_fragments;
-+      unsigned int rx_unicast_octets;
-+      unsigned int rx_multicast_octets;
-+      unsigned int rx_fcs_errors;
-+      unsigned int rx_discards_no_buffer;
-+      unsigned int tx_discards_wrong_sa;
-+      unsigned int rx_discards_undecryptable;
-+      unsigned int rx_message_in_msg_fragments;
-+      unsigned int rx_message_in_bad_msg_fragments;
-+};
-+
-+struct ieee80211_softmac_stats{
-+      unsigned int rx_ass_ok;
-+      unsigned int rx_ass_err;
-+      unsigned int rx_probe_rq;
-+      unsigned int tx_probe_rs;
-+      unsigned int tx_beacons;
-+      unsigned int rx_auth_rq;
-+      unsigned int rx_auth_rs_ok;
-+      unsigned int rx_auth_rs_err;
-+      unsigned int tx_auth_rq;
-+      unsigned int no_auth_rs;
-+      unsigned int no_ass_rs;
-+      unsigned int tx_ass_rq;
-+      unsigned int rx_ass_rq;
-+      unsigned int tx_probe_rq;
-+      unsigned int reassoc;
-+      unsigned int swtxstop;
-+      unsigned int swtxawake;
-+};
-+
-+struct ieee80211_device;
-+
-+#include "ieee80211_crypt.h"
-+
-+#define SEC_KEY_1         (1<<0)
-+#define SEC_KEY_2         (1<<1)
-+#define SEC_KEY_3         (1<<2)
-+#define SEC_KEY_4         (1<<3)
-+#define SEC_ACTIVE_KEY    (1<<4)
-+#define SEC_AUTH_MODE     (1<<5)
-+#define SEC_UNICAST_GROUP (1<<6)
-+#define SEC_LEVEL         (1<<7)
-+#define SEC_ENABLED       (1<<8)
-+
-+#define SEC_LEVEL_0      0 /* None */
-+#define SEC_LEVEL_1      1 /* WEP 40 and 104 bit */
-+#define SEC_LEVEL_2      2 /* Level 1 + TKIP */
-+#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */
-+#define SEC_LEVEL_3      4 /* Level 2 + CCMP */
-+
-+#define WEP_KEYS 4
-+#define WEP_KEY_LEN 13
-+
-+#define WEP_KEY_LEN_MODIF 32
-+
-+struct ieee80211_security {
-+      u16 active_key:2,
-+            enabled:1,
-+          auth_mode:2,
-+            auth_algo:4,
-+            unicast_uses_group:1;
-+      u8 key_sizes[WEP_KEYS];
-+      u8 keys[WEP_KEYS][WEP_KEY_LEN_MODIF];
-+      u8 level;
-+      u16 flags;
-+} __attribute__ ((packed));
-+
-+
-+/*
-+
-+ 802.11 data frame from AP
-+
-+      ,-------------------------------------------------------------------.
-+Bytes |  2   |  2   |    6    |    6    |    6    |  2   | 0..2312 |   4  |
-+      |------|------|---------|---------|---------|------|---------|------|
-+Desc. | ctrl | dura |  DA/RA  |   TA    |    SA   | Sequ |  frame  |  fcs |
-+      |      | tion | (BSSID) |         |         | ence |  data   |      |
-+      `-------------------------------------------------------------------'
-+
-+Total: 28-2340 bytes
-+
-+*/
-+
-+struct ieee80211_header_data {
-+      u16 frame_ctl;
-+      u16 duration_id;
-+      u8 addr1[6];
-+      u8 addr2[6];
-+      u8 addr3[6];
-+      u16 seq_ctrl;
-+};
-+
-+#define BEACON_PROBE_SSID_ID_POSITION 12
-+
-+/* Management Frame Information Element Types */
-+#define MFIE_TYPE_SSID       0
-+#define MFIE_TYPE_RATES      1
-+#define MFIE_TYPE_FH_SET     2
-+#define MFIE_TYPE_DS_SET     3
-+#define MFIE_TYPE_CF_SET     4
-+#define MFIE_TYPE_TIM        5
-+#define MFIE_TYPE_IBSS_SET   6
-+#define MFIE_TYPE_COUNTRY  7 //+YJ,080625
-+#define MFIE_TYPE_CHALLENGE  16
-+#define MFIE_TYPE_ERP        42
-+#define MFIE_TYPE_RSN      48
-+#define MFIE_TYPE_RATES_EX   50
-+#define MFIE_TYPE_GENERIC    221
-+
-+#ifdef ENABLE_DOT11D
-+typedef enum
-+{
-+      COUNTRY_CODE_FCC = 0,
-+      COUNTRY_CODE_IC = 1,
-+      COUNTRY_CODE_ETSI = 2,
-+      COUNTRY_CODE_SPAIN = 3,
-+      COUNTRY_CODE_FRANCE = 4,
-+      COUNTRY_CODE_MKK = 5,
-+      COUNTRY_CODE_MKK1 = 6,
-+      COUNTRY_CODE_ISRAEL = 7,
-+      COUNTRY_CODE_TELEC = 8,
-+      COUNTRY_CODE_GLOBAL_DOMAIN = 9,
-+      COUNTRY_CODE_WORLD_WIDE_13_INDEX = 10
-+}country_code_type_t;
-+#endif
-+
-+struct ieee80211_info_element_hdr {
-+      u8 id;
-+      u8 len;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_info_element {
-+      u8 id;
-+      u8 len;
-+      u8 data[0];
-+} __attribute__ ((packed));
-+
-+/*
-+ * These are the data types that can make up management packets
-+ *
-+      u16 auth_algorithm;
-+      u16 auth_sequence;
-+      u16 beacon_interval;
-+      u16 capability;
-+      u8 current_ap[ETH_ALEN];
-+      u16 listen_interval;
-+      struct {
-+              u16 association_id:14, reserved:2;
-+      } __attribute__ ((packed));
-+      u32 time_stamp[2];
-+      u16 reason;
-+      u16 status;
-+*/
-+
-+#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
-+#define IEEE80211_DEFAULT_BASIC_RATE 10
-+
-+struct ieee80211_authentication {
-+      struct ieee80211_header_data header;
-+      u16 algorithm;
-+      u16 transaction;
-+      u16 status;
-+      //struct ieee80211_info_element_hdr info_element;
-+} __attribute__ ((packed));
-+
-+
-+struct ieee80211_probe_response {
-+      struct ieee80211_header_data header;
-+      u32 time_stamp[2];
-+      u16 beacon_interval;
-+      u16 capability;
-+      struct ieee80211_info_element info_element;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_probe_request {
-+      struct ieee80211_header_data header;
-+      /*struct ieee80211_info_element info_element;*/
-+} __attribute__ ((packed));
-+
-+struct ieee80211_assoc_request_frame {
-+      struct ieee80211_hdr_3addr header;
-+      u16 capability;
-+      u16 listen_interval;
-+      //u8 current_ap[ETH_ALEN];
-+      struct ieee80211_info_element_hdr info_element;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_assoc_response_frame {
-+      struct ieee80211_hdr_3addr header;
-+      u16 capability;
-+      u16 status;
-+      u16 aid;
-+      struct ieee80211_info_element info_element; /* supported rates */
-+} __attribute__ ((packed));
-+
-+struct ieee80211_disassoc_frame{
-+        struct ieee80211_hdr_3addr header;
-+        u16    reasoncode;
-+}__attribute__ ((packed));
-+
-+struct ieee80211_txb {
-+      u8 nr_frags;
-+      u8 encrypted;
-+      u16 reserved;
-+      u16 frag_size;
-+      u16 payload_size;
-+      struct sk_buff *fragments[0];
-+};
-+
-+struct ieee80211_wmm_ac_param {
-+      u8 ac_aci_acm_aifsn;
-+      u8 ac_ecwmin_ecwmax;
-+      u16 ac_txop_limit;
-+};
-+
-+struct ieee80211_wmm_ts_info {
-+      u8 ac_dir_tid;
-+      u8 ac_up_psb;
-+      u8 reserved;
-+} __attribute__ ((packed));
-+
-+struct ieee80211_wmm_tspec_elem {
-+      struct ieee80211_wmm_ts_info ts_info;
-+      u16 norm_msdu_size;
-+      u16 max_msdu_size;
-+      u32 min_serv_inter;
-+      u32 max_serv_inter;
-+      u32 inact_inter;
-+      u32 suspen_inter;
-+      u32 serv_start_time;
-+      u32 min_data_rate;
-+      u32 mean_data_rate;
-+      u32 peak_data_rate;
-+      u32 max_burst_size;
-+      u32 delay_bound;
-+      u32 min_phy_rate;
-+      u16 surp_band_allow;
-+      u16 medium_time;
-+}__attribute__((packed));
-+
-+enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
-+#define MAX_SP_Len  (WMM_all_frame << 4)
-+#define IEEE80211_QOS_TID 0x0f
-+#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5)
-+
-+/* SWEEP TABLE ENTRIES NUMBER*/
-+#define MAX_SWEEP_TAB_ENTRIES           42
-+#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET  7
-+/* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
-+ * only use 8, and then use extended rates for the remaining supported
-+ * rates.  Other APs, however, stick all of their supported rates on the
-+ * main rates information element... */
-+#define MAX_RATES_LENGTH                  ((u8)12)
-+#define MAX_RATES_EX_LENGTH               ((u8)16)
-+#define MAX_NETWORK_COUNT                  128
-+//#define MAX_CHANNEL_NUMBER                 161
-+#define MAX_CHANNEL_NUMBER                 165 //YJ,modified,080625
-+#define MAX_IE_LEN                                            0xFF //+YJ,080625
-+
-+typedef struct _CHANNEL_LIST{
-+      u8      Channel[MAX_CHANNEL_NUMBER + 1];
-+      u8      Len;
-+}CHANNEL_LIST, *PCHANNEL_LIST;
-+
-+#define IEEE80211_SOFTMAC_SCAN_TIME     100//400
-+//(HZ / 2)
-+//by amy for ps
-+#define IEEE80211_WATCH_DOG_TIME    2000
-+//by amy for ps
-+//by amy for antenna
-+#define ANTENNA_DIVERSITY_TIMER_PERIOD                1000 // 1000 m
-+//by amy for antenna
-+#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)
-+
-+#define CRC_LENGTH                 4U
-+
-+#define MAX_WPA_IE_LEN 64
-+
-+#define NETWORK_EMPTY_ESSID (1<<0)
-+#define NETWORK_HAS_OFDM    (1<<1)
-+#define NETWORK_HAS_CCK     (1<<2)
-+
-+#define IEEE80211_DTIM_MBCAST 4
-+#define IEEE80211_DTIM_UCAST 2
-+#define IEEE80211_DTIM_VALID 1
-+#define IEEE80211_DTIM_INVALID 0
-+
-+#define IEEE80211_PS_DISABLED 0
-+#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
-+#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
-+#define IEEE80211_PS_ENABLE   IEEE80211_DTIM_VALID
-+//added by David for QoS 2006/6/30
-+//#define WMM_Hang_8187
-+#ifdef WMM_Hang_8187
-+#undef WMM_Hang_8187
-+#endif
-+
-+#define WME_AC_BE   0x00
-+#define WME_AC_BK   0x01
-+#define WME_AC_VI   0x02
-+#define WME_AC_VO   0x03
-+#define WME_ACI_MASK 0x03
-+#define WME_AIFSN_MASK 0x03
-+#define WME_AC_PRAM_LEN 16
-+
-+//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
-+//#define UP2AC(up)   ((up<3) ? ((up==0)?1:0) : (up>>1))
-+#define UP2AC(up) (              \
-+      ((up) < 1) ? WME_AC_BE : \
-+      ((up) < 3) ? WME_AC_BK : \
-+      ((up) < 4) ? WME_AC_BE : \
-+      ((up) < 6) ? WME_AC_VI : \
-+      WME_AC_VO)
-+//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
-+#define AC2UP(_ac)    (       \
-+      ((_ac) == WME_AC_VO) ? 6 : \
-+      ((_ac) == WME_AC_VI) ? 5 : \
-+      ((_ac) == WME_AC_BK) ? 1 : \
-+      0)
-+
-+#define       ETHER_ADDR_LEN          6       /* length of an Ethernet address */
-+struct        ether_header {
-+      u8 ether_dhost[ETHER_ADDR_LEN];
-+      u8 ether_shost[ETHER_ADDR_LEN];
-+      u16 ether_type;
-+} __attribute__((packed));
-+
-+#ifndef ETHERTYPE_PAE
-+#define       ETHERTYPE_PAE   0x888e          /* EAPOL PAE/802.1x */
-+#endif
-+#ifndef ETHERTYPE_IP
-+#define       ETHERTYPE_IP    0x0800          /* IP protocol */
-+#endif
-+
-+struct ieee80211_network {
-+      /* These entries are used to identify a unique network */
-+      u8 bssid[ETH_ALEN];
-+      u8 channel;
-+      /* Ensure null-terminated for any debug msgs */
-+      u8 ssid[IW_ESSID_MAX_SIZE + 1];
-+      u8 ssid_len;
-+
-+      /* These are network statistics */
-+      struct ieee80211_rx_stats stats;
-+      u16 capability;
-+      u8 rates[MAX_RATES_LENGTH];
-+      u8 rates_len;
-+      u8 rates_ex[MAX_RATES_EX_LENGTH];
-+      u8 rates_ex_len;
-+      unsigned long last_scanned;
-+      u8 mode;
-+      u8 flags;
-+      u32 last_associate;
-+      u32 time_stamp[2];
-+      u16 beacon_interval;
-+      u16 listen_interval;
-+      u16 atim_window;
-+      u8 wpa_ie[MAX_WPA_IE_LEN];
-+      size_t wpa_ie_len;
-+      u8 rsn_ie[MAX_WPA_IE_LEN];
-+      size_t rsn_ie_len;
-+      u8 dtim_period;
-+      u8 dtim_data;
-+      u32 last_dtim_sta_time[2];
-+      struct list_head list;
-+      //appeded for QoS
-+      u8 wmm_info;
-+      struct ieee80211_wmm_ac_param wmm_param[4];
-+      u8 QoS_Enable;
-+      u8 SignalStrength;
-+//by amy 080312
-+      u8 HighestOperaRate;
-+//by amy 080312
-+#ifdef THOMAS_TURBO
-+      u8 Turbo_Enable;//enable turbo mode, added by thomas
-+#endif
-+#ifdef ENABLE_DOT11D
-+      u16 CountryIeLen;
-+      u8 CountryIeBuf[MAX_IE_LEN];
-+#endif
-+};
-+
-+enum ieee80211_state {
-+
-+      /* the card is not linked at all */
-+      IEEE80211_NOLINK = 0,
-+
-+      /* IEEE80211_ASSOCIATING* are for BSS client mode
-+       * the driver shall not perform RX filtering unless
-+       * the state is LINKED.
-+       * The driver shall just check for the state LINKED and
-+       * defaults to NOLINK for ALL the other states (including
-+       * LINKED_SCANNING)
-+       */
-+
-+      /* the association procedure will start (wq scheduling)*/
-+      IEEE80211_ASSOCIATING,
-+      IEEE80211_ASSOCIATING_RETRY,
-+
-+      /* the association procedure is sending AUTH request*/
-+      IEEE80211_ASSOCIATING_AUTHENTICATING,
-+
-+      /* the association procedure has successfully authentcated
-+       * and is sending association request
-+       */
-+      IEEE80211_ASSOCIATING_AUTHENTICATED,
-+
-+      /* the link is ok. the card associated to a BSS or linked
-+       * to a ibss cell or acting as an AP and creating the bss
-+       */
-+      IEEE80211_LINKED,
-+
-+      /* same as LINKED, but the driver shall apply RX filter
-+       * rules as we are in NO_LINK mode. As the card is still
-+       * logically linked, but it is doing a syncro site survey
-+       * then it will be back to LINKED state.
-+       */
-+      IEEE80211_LINKED_SCANNING,
-+
-+};
-+
-+#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
-+#define DEFAULT_FTS 2346
-+#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-+#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-+
-+
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11))
-+extern inline int is_multicast_ether_addr(const u8 *addr)
-+{
-+        return ((addr[0] != 0xff) && (0x01 & addr[0]));
-+}
-+#endif
-+
-+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13))
-+extern inline int is_broadcast_ether_addr(const u8 *addr)
-+{
-+      return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&   \
-+              (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
-+}
-+#endif
-+
-+#define CFG_IEEE80211_RESERVE_FCS (1<<0)
-+#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
-+
-+typedef struct tx_pending_t{
-+      int frag;
-+      struct ieee80211_txb *txb;
-+}tx_pending_t;
-+
-+
-+struct ieee80211_device {
-+      struct net_device *dev;
-+
-+      /* Bookkeeping structures */
-+      struct net_device_stats stats;
-+      struct ieee80211_stats ieee_stats;
-+      struct ieee80211_softmac_stats softmac_stats;
-+
-+      /* Probe / Beacon management */
-+      struct list_head network_free_list;
-+      struct list_head network_list;
-+      struct ieee80211_network *networks;
-+      int scans;
-+      int scan_age;
-+
-+      int iw_mode; /* operating mode (IW_MODE_*) */
-+
-+      spinlock_t lock;
-+      spinlock_t wpax_suitlist_lock;
-+
-+      int tx_headroom; /* Set to size of any additional room needed at front
-+                        * of allocated Tx SKBs */
-+      u32 config;
-+
-+      /* WEP and other encryption related settings at the device level */
-+      int open_wep; /* Set to 1 to allow unencrypted frames */
-+
-+      int reset_on_keychange; /* Set to 1 if the HW needs to be reset on
-+                               * WEP key changes */
-+
-+      /* If the host performs {en,de}cryption, then set to 1 */
-+      int host_encrypt;
-+      int host_decrypt;
-+      int ieee802_1x; /* is IEEE 802.1X used */
-+
-+      /* WPA data */
-+      int wpa_enabled;
-+      int drop_unencrypted;
-+      int tkip_countermeasures;
-+      int privacy_invoked;
-+      size_t wpa_ie_len;
-+      u8 *wpa_ie;
-+
-+      u8 ap_mac_addr[6];
-+      u16 pairwise_key_type;
-+      u16 broadcast_key_type;
-+
-+      struct list_head crypt_deinit_list;
-+      struct ieee80211_crypt_data *crypt[WEP_KEYS];
-+      int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
-+      struct timer_list crypt_deinit_timer;
-+
-+      int bcrx_sta_key; /* use individual keys to override default keys even
-+                         * with RX of broad/multicast frames */
-+
-+      /* Fragmentation structures */
-+      // each streaming contain a entry
-+      struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN];
-+      unsigned int frag_next_idx[17];
-+      u16 fts; /* Fragmentation Threshold */
-+
-+      /* This stores infos for the current network.
-+       * Either the network we are associated in INFRASTRUCTURE
-+       * or the network that we are creating in MASTER mode.
-+       * ad-hoc is a mixture ;-).
-+       * Note that in infrastructure mode, even when not associated,
-+       * fields bssid and essid may be valid (if wpa_set and essid_set
-+       * are true) as thy carry the value set by the user via iwconfig
-+       */
-+      struct ieee80211_network current_network;
-+
-+
-+      enum ieee80211_state state;
-+
-+      int short_slot;
-+      int mode;       /* A, B, G */
-+      int modulation; /* CCK, OFDM */
-+      int freq_band;  /* 2.4Ghz, 5.2Ghz, Mixed */
-+      int abg_true;   /* ABG flag              */
-+
-+      /* used for forcing the ibss workqueue to terminate
-+       * without wait for the syncro scan to terminate
-+       */
-+      short sync_scan_hurryup;
-+
-+#ifdef ENABLE_DOT11D
-+      void * pDot11dInfo;
-+      bool bGlobalDomain;
-+
-+      // For Liteon Ch12~13 passive scan
-+      u8      MinPassiveChnlNum;
-+      u8      IbssStartChnl;
-+#else
-+      /* map of allowed channels. 0 is dummy */
-+      // FIXME: remeber to default to a basic channel plan depending of the PHY type
-+      int channel_map[MAX_CHANNEL_NUMBER+1];
-+#endif
-+
-+      int rate;       /* current rate */
-+      int basic_rate;
-+      //FIXME: pleace callback, see if redundant with softmac_features
-+      short active_scan;
-+
-+      /* this contains flags for selectively enable softmac support */
-+      u16 softmac_features;
-+
-+      /* if the sequence control field is not filled by HW */
-+      u16 seq_ctrl[5];
-+
-+      /* association procedure transaction sequence number */
-+      u16 associate_seq;
-+
-+      /* AID for RTXed association responses */
-+      u16 assoc_id;
-+
-+      /* power save mode related*/
-+      short ps;
-+      short sta_sleep;
-+      int ps_timeout;
-+      struct tasklet_struct ps_task;
-+      u32 ps_th;
-+      u32 ps_tl;
-+
-+      short raw_tx;
-+      /* used if IEEE_SOFTMAC_TX_QUEUE is set */
-+      short queue_stop;
-+      short scanning;
-+      short proto_started;
-+
-+      struct semaphore wx_sem;
-+      struct semaphore scan_sem;
-+
-+      spinlock_t mgmt_tx_lock;
-+      spinlock_t beacon_lock;
-+
-+      short beacon_txing;
-+
-+      short wap_set;
-+      short ssid_set;
-+
-+      u8  wpax_type_set;    //{added by David, 2006.9.28}
-+      u32 wpax_type_notify; //{added by David, 2006.9.26}
-+
-+      /* QoS related flag */
-+      char init_wmmparam_flag;
-+
-+      /* for discarding duplicated packets in IBSS */
-+      struct list_head ibss_mac_hash[IEEE_IBSS_MAC_HASH_SIZE];
-+
-+      /* for discarding duplicated packets in BSS */
-+      u16 last_rxseq_num[17]; /* rx seq previous per-tid */
-+      u16 last_rxfrag_num[17];/* tx frag previous per-tid */
-+      unsigned long last_packet_time[17];
-+
-+      /* for PS mode */
-+      unsigned long last_rx_ps_time;
-+
-+      /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
-+      struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
-+      int mgmt_queue_head;
-+      int mgmt_queue_tail;
-+
-+
-+      /* used if IEEE_SOFTMAC_TX_QUEUE is set */
-+      struct  tx_pending_t tx_pending;
-+
-+      /* used if IEEE_SOFTMAC_ASSOCIATE is set */
-+      struct timer_list associate_timer;
-+
-+      /* used if IEEE_SOFTMAC_BEACONS is set */
-+      struct timer_list beacon_timer;
-+
-+      struct work_struct associate_complete_wq;
-+//    struct work_struct associate_retry_wq;
-+      struct work_struct associate_procedure_wq;
-+//    struct work_struct softmac_scan_wq;
-+      struct work_struct wx_sync_scan_wq;
-+      struct work_struct wmm_param_update_wq;
-+      struct work_struct ps_request_tx_ack_wq;//for ps
-+//    struct work_struct hw_wakeup_wq;
-+//    struct work_struct hw_sleep_wq;
-+//    struct work_struct watch_dog_wq;
-+      bool bInactivePs;
-+      bool actscanning;
-+      bool beinretry;
-+      u16 ListenInterval;
-+      unsigned long NumRxDataInPeriod; //YJ,add,080828
-+      unsigned long NumRxBcnInPeriod;  //YJ,add,080828
-+      unsigned long NumRxOkTotal;
-+      unsigned long NumRxUnicast;//YJ,add,080828,for keep alive
-+      bool bHwRadioOff;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
-+        struct delayed_work softmac_scan_wq;
-+        struct delayed_work associate_retry_wq;
-+      struct delayed_work hw_wakeup_wq;
-+      struct delayed_work hw_sleep_wq;//+by amy 080324
-+      struct delayed_work watch_dog_wq;
-+      struct delayed_work sw_antenna_wq;
-+      struct delayed_work  start_ibss_wq;
-+//by amy for rate adaptive 080312
-+    struct delayed_work rate_adapter_wq;
-+//by amy for rate adaptive
-+      struct delayed_work hw_dig_wq;
-+      struct delayed_work tx_pw_wq;
-+
-+//Added for RF power on power off by lizhaoming 080512
-+      struct delayed_work GPIOChangeRFWorkItem;
-+#else
-+
-+      struct work_struct start_ibss_wq;
-+        struct work_struct softmac_scan_wq;
-+        struct work_struct associate_retry_wq;
-+      struct work_struct hw_wakeup_wq;
-+      struct work_struct hw_sleep_wq;
-+      struct work_struct watch_dog_wq;
-+      struct work_struct sw_antenna_wq;
-+//by amy for rate adaptive 080312
-+    struct work_struct rate_adapter_wq;
-+//by amy for rate adaptive
-+      struct work_struct hw_dig_wq;
-+      struct work_struct tx_pw_wq;
-+
-+//Added for RF power on power off by lizhaoming 080512
-+      struct work_struct GPIOChangeRFWorkItem;
-+#endif
-+      struct workqueue_struct *wq;
-+
-+      /* Callback functions */
-+      void (*set_security)(struct net_device *dev,
-+                           struct ieee80211_security *sec);
-+
-+      /* Used to TX data frame by using txb structs.
-+       * this is not used if in the softmac_features
-+       * is set the flag IEEE_SOFTMAC_TX_QUEUE
-+       */
-+      int (*hard_start_xmit)(struct ieee80211_txb *txb,
-+                             struct net_device *dev);
-+
-+      int (*reset_port)(struct net_device *dev);
-+
-+      /* Softmac-generated frames (mamagement) are TXed via this
-+       * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
-+       * not set. As some cards may have different HW queues that
-+       * one might want to use for data and management frames
-+       * the option to have two callbacks might be useful.
-+       * This fucntion can't sleep.
-+       */
-+      int (*softmac_hard_start_xmit)(struct sk_buff *skb,
-+                             struct net_device *dev);
-+
-+      /* used instead of hard_start_xmit (not softmac_hard_start_xmit)
-+       * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
-+       * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set
-+       * then also management frames are sent via this callback.
-+       * This function can't sleep.
-+       */
-+      void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
-+                             struct net_device *dev,int rate);
-+
-+      /* stops the HW queue for DATA frames. Useful to avoid
-+       * waste time to TX data frame when we are reassociating
-+       * This function can sleep.
-+       */
-+      void (*data_hard_stop)(struct net_device *dev);
-+
-+      /* OK this is complementar to data_poll_hard_stop */
-+      void (*data_hard_resume)(struct net_device *dev);
-+
-+      /* ask to the driver to retune the radio .
-+       * This function can sleep. the driver should ensure
-+       * the radio has been swithced before return.
-+       */
-+      void (*set_chan)(struct net_device *dev,short ch);
-+
-+      /* These are not used if the ieee stack takes care of
-+       * scanning (IEEE_SOFTMAC_SCAN feature set).
-+       * In this case only the set_chan is used.
-+       *
-+       * The syncro version is similar to the start_scan but
-+       * does not return until all channels has been scanned.
-+       * this is called in user context and should sleep,
-+       * it is called in a work_queue when swithcing to ad-hoc mode
-+       * or in behalf of iwlist scan when the card is associated
-+       * and root user ask for a scan.
-+       * the fucntion stop_scan should stop both the syncro and
-+       * background scanning and can sleep.
-+       * The fucntion start_scan should initiate the background
-+       * scanning and can't sleep.
-+       */
-+      void (*scan_syncro)(struct net_device *dev);
-+      void (*start_scan)(struct net_device *dev);
-+      void (*stop_scan)(struct net_device *dev);
-+
-+      /* indicate the driver that the link state is changed
-+       * for example it may indicate the card is associated now.
-+       * Driver might be interested in this to apply RX filter
-+       * rules or simply light the LINK led
-+       */
-+      void (*link_change)(struct net_device *dev);
-+
-+      /* these two function indicates to the HW when to start
-+       * and stop to send beacons. This is used when the
-+       * IEEE_SOFTMAC_BEACONS is not set. For now the
-+       * stop_send_bacons is NOT guaranteed to be called only
-+       * after start_send_beacons.
-+       */
-+      void (*start_send_beacons) (struct net_device *dev);
-+      void (*stop_send_beacons) (struct net_device *dev);
-+
-+      /* power save mode related */
-+      void (*sta_wake_up) (struct net_device *dev);
-+      void (*ps_request_tx_ack) (struct net_device *dev);
-+      void (*enter_sleep_state) (struct net_device *dev, u32 th, u32 tl);
-+      short (*ps_is_queue_empty) (struct net_device *dev);
-+
-+      /* QoS related */
-+      //void (*wmm_param_update) (struct net_device *dev, u8 *ac_param);
-+      //void (*wmm_param_update) (struct ieee80211_device *ieee);
-+
-+      /* This must be the last item so that it points to the data
-+       * allocated beyond this structure by alloc_ieee80211 */
-+      u8 priv[0];
-+};
-+
-+#define IEEE_A            (1<<0)
-+#define IEEE_B            (1<<1)
-+#define IEEE_G            (1<<2)
-+#define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
-+
-+/* Generate a 802.11 header */
-+
-+/* Uses the channel change callback directly
-+ * instead of [start/stop] scan callbacks
-+ */
-+#define IEEE_SOFTMAC_SCAN (1<<2)
-+
-+/* Perform authentication and association handshake */
-+#define IEEE_SOFTMAC_ASSOCIATE (1<<3)
-+
-+/* Generate probe requests */
-+#define IEEE_SOFTMAC_PROBERQ (1<<4)
-+
-+/* Generate respones to probe requests */
-+#define IEEE_SOFTMAC_PROBERS (1<<5)
-+
-+/* The ieee802.11 stack will manages the netif queue
-+ * wake/stop for the driver, taking care of 802.11
-+ * fragmentation. See softmac.c for details. */
-+#define IEEE_SOFTMAC_TX_QUEUE (1<<7)
-+
-+/* Uses only the softmac_data_hard_start_xmit
-+ * even for TX management frames.
-+ */
-+#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8)
-+
-+/* Generate beacons.  The stack will enqueue beacons
-+ * to the card
-+ */
-+#define IEEE_SOFTMAC_BEACONS (1<<6)
-+
-+
-+
-+static inline void *ieee80211_priv(struct net_device *dev)
-+{
-+      return ((struct ieee80211_device *)netdev_priv(dev))->priv;
-+}
-+
-+extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
-+{
-+      /* Single white space is for Linksys APs */
-+      if (essid_len == 1 && essid[0] == ' ')
-+              return 1;
-+
-+      /* Otherwise, if the entire essid is 0, we assume it is hidden */
-+      while (essid_len) {
-+              essid_len--;
-+              if (essid[essid_len] != '\0')
-+                      return 0;
-+      }
-+
-+      return 1;
-+}
-+
-+extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
-+{
-+      /*
-+       * It is possible for both access points and our device to support
-+       * combinations of modes, so as long as there is one valid combination
-+       * of ap/device supported modes, then return success
-+       *
-+       */
-+      if ((mode & IEEE_A) &&
-+          (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
-+          (ieee->freq_band & IEEE80211_52GHZ_BAND))
-+              return 1;
-+
-+      if ((mode & IEEE_G) &&
-+          (ieee->modulation & IEEE80211_OFDM_MODULATION) &&
-+          (ieee->freq_band & IEEE80211_24GHZ_BAND))
-+              return 1;
-+
-+      if ((mode & IEEE_B) &&
-+          (ieee->modulation & IEEE80211_CCK_MODULATION) &&
-+          (ieee->freq_band & IEEE80211_24GHZ_BAND))
-+              return 1;
-+
-+      return 0;
-+}
-+
-+extern inline int ieee80211_get_hdrlen(u16 fc)
-+{
-+      int hdrlen = 24;
-+
-+      switch (WLAN_FC_GET_TYPE(fc)) {
-+      case IEEE80211_FTYPE_DATA:
-+              if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
-+                      hdrlen = 30; /* Addr4 */
-+              if(IEEE80211_QOS_HAS_SEQ(fc))
-+                      hdrlen += 2; /* QOS ctrl*/
-+              break;
-+      case IEEE80211_FTYPE_CTL:
-+              switch (WLAN_FC_GET_STYPE(fc)) {
-+              case IEEE80211_STYPE_CTS:
-+              case IEEE80211_STYPE_ACK:
-+                      hdrlen = 10;
-+                      break;
-+              default:
-+                      hdrlen = 16;
-+                      break;
-+              }
-+              break;
-+      }
-+
-+      return hdrlen;
-+}
-+
-+
-+
-+/* ieee80211.c */
-+extern void free_ieee80211(struct net_device *dev);
-+extern struct net_device *alloc_ieee80211(int sizeof_priv);
-+
-+extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
-+
-+/* ieee80211_tx.c */
-+
-+extern int ieee80211_encrypt_fragment(
-+      struct ieee80211_device *ieee,
-+      struct sk_buff *frag,
-+      int hdr_len);
-+
-+extern int ieee80211_xmit(struct sk_buff *skb,
-+                        struct net_device *dev);
-+extern void ieee80211_txb_free(struct ieee80211_txb *);
-+
-+
-+/* ieee80211_rx.c */
-+extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
-+                      struct ieee80211_rx_stats *rx_stats);
-+extern void ieee80211_rx_mgt(struct ieee80211_device *ieee,
-+                           struct ieee80211_hdr *header,
-+                           struct ieee80211_rx_stats *stats);
-+
-+/* ieee80211_wx.c */
-+extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
-+                               struct iw_request_info *info,
-+                               union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
-+                                 struct iw_request_info *info,
-+                                 union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_get_encode(struct ieee80211_device *ieee,
-+                                 struct iw_request_info *info,
-+                                 union iwreq_data *wrqu, char *key);
-+extern int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
-+                            struct iw_request_info *info,
-+                            union iwreq_data* wrqu, char *extra);
-+int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
-+                               struct iw_request_info *info,
-+                               struct iw_param *data, char *extra);
-+int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
-+                               struct iw_request_info *info,
-+                               union iwreq_data *wrqu, char *extra);
-+
-+int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
-+/* ieee80211_softmac.c */
-+extern short ieee80211_is_54g(struct ieee80211_network net);
-+extern short ieee80211_is_shortslot(struct ieee80211_network net);
-+extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
-+                      struct ieee80211_rx_stats *rx_stats, u16 type,
-+                      u16 stype);
-+extern void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee80211_network *net);
-+
-+extern void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee);
-+extern void ieee80211_start_bss(struct ieee80211_device *ieee);
-+extern void ieee80211_start_master_bss(struct ieee80211_device *ieee);
-+extern void ieee80211_start_ibss(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_init(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_free(struct ieee80211_device *ieee);
-+extern void ieee80211_associate_abort(struct ieee80211_device *ieee);
-+extern void ieee80211_disassociate(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_scan(struct ieee80211_device *ieee);
-+extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee);
-+extern void ieee80211_check_all_nets(struct ieee80211_device *ieee);
-+extern void ieee80211_start_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee);
-+extern void ieee80211_reset_queue(struct ieee80211_device *ieee);
-+extern void ieee80211_wake_queue(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_queue(struct ieee80211_device *ieee);
-+extern struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee);
-+extern void ieee80211_start_send_beacons(struct ieee80211_device *ieee);
-+extern void ieee80211_stop_send_beacons(struct ieee80211_device *ieee);
-+extern int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_point *p);
-+extern void notify_wx_assoc_event(struct ieee80211_device *ieee);
-+extern void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
-+extern void SendDisassociation(struct ieee80211_device *ieee,u8* asSta,u8 asRsn);
-+extern void ieee80211_start_scan(struct ieee80211_device *ieee);
-+
-+//Add for RF power on power off by lizhaoming 080512
-+extern void SendDisassociation(struct ieee80211_device *ieee,
-+                               u8*                     asSta,
-+                       u8                      asRsn);
-+
-+/* ieee80211_crypt_ccmp&tkip&wep.c */
-+extern void ieee80211_tkip_null(void);
-+extern void ieee80211_wep_null(void);
-+extern void ieee80211_ccmp_null(void);
-+/* ieee80211_softmac_wx.c */
-+
-+extern int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
-+                          struct iw_request_info *info,
-+                          union iwreq_data *wrqu, char *ext);
-+
-+extern int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
-+                       struct iw_request_info *info,
-+                       union iwreq_data *awrq,
-+                       char *extra);
-+
-+extern int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
-+
-+extern int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
-+                           struct iw_request_info *info,
-+                           union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
-+                           struct iw_request_info *info,
-+                           union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-+                           union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
-+                           union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
-+                            struct iw_request_info *a,
-+                            union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
-+                           union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
-+                           union iwreq_data *wrqu, char *b);
-+
-+extern int ieee80211_wx_get_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
-+                           union iwreq_data *wrqu, char *b);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
-+extern void ieee80211_wx_sync_scan_wq(struct work_struct *work);
-+#else
-+ extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
-+#endif
-+//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
-+
-+extern int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
-+                             struct iw_request_info *info,
-+                             union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_name(struct ieee80211_device *ieee,
-+                           struct iw_request_info *info,
-+                           union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_set_power(struct ieee80211_device *ieee,
-+                               struct iw_request_info *info,
-+                               union iwreq_data *wrqu, char *extra);
-+
-+extern int ieee80211_wx_get_power(struct ieee80211_device *ieee,
-+                               struct iw_request_info *info,
-+                               union iwreq_data *wrqu, char *extra);
-+
-+extern void ieee80211_softmac_ips_scan_syncro(struct ieee80211_device *ieee);
-+
-+extern void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr);
-+
-+extern const long ieee80211_wlan_frequencies[];
-+
-+extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
-+{
-+      ieee->scans++;
-+}
-+
-+extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
-+{
-+      return ieee->scans;
-+}
-+
-+static inline const char *escape_essid(const char *essid, u8 essid_len) {
-+      static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
-+      const char *s = essid;
-+      char *d = escaped;
-+
-+      if (ieee80211_is_empty_essid(essid, essid_len)) {
-+              memcpy(escaped, "<hidden>", sizeof("<hidden>"));
-+              return escaped;
-+      }
-+
-+      essid_len = min(essid_len, (u8)IW_ESSID_MAX_SIZE);
-+      while (essid_len--) {
-+              if (*s == '\0') {
-+                      *d++ = '\\';
-+                      *d++ = '0';
-+                      s++;
-+              } else {
-+                      *d++ = *s++;
-+              }
-+      }
-+      *d = '\0';
-+      return escaped;
-+}
-+#endif /* IEEE80211_H */
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211_crypt.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211_crypt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/ieee80211_crypt.h    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/ieee80211_crypt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/ieee80211_crypt.h      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,86 @@
 +/*
 + * Original code based on Host AP (software wireless LAN access point) driver
@@ -792285,9 +792145,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/ieee80211_crypt.h linux-2.6.27
 +                                  struct ieee80211_crypt_data **crypt);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,761 @@
 +/*
 +   This is part of rtl8180 OpenSource driver.
@@ -793050,9 +792910,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180.h linux-2.6.27.19-5.1/dr
 +bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u32 ChangeSource);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_93cx6.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_93cx6.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,146 @@
 +/*
 +   This files contains card eeprom (93c46 or 93c56) programming routines,
@@ -793200,9 +793060,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.c linux-2.6.27.19-
 +                     (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT));
 +      return ret;
 +}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_93cx6.h        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_93cx6.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_93cx6.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,59 @@
 +/*
 +      This is part of rtl8180 OpenSource driver
@@ -793263,9 +793123,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_93cx6.h linux-2.6.27.19-
 +#define       EPROM_TXPW_CH13_14 0x16
 +
 +u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_core.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_core.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_core.c 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_core.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_core.c   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,6828 @@
 +/*
 +   This is part of rtl818x pci OpenSource driver - v 0.1
@@ -800095,9 +799955,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_core.c linux-2.6.27.19-5
 +module_init(rtl8180_pci_module_init);
 +module_exit(rtl8180_pci_module_exit);
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.c   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_dm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_dm.c     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1725 @@
 +//#include "r8180.h"\r
 +#include "r8180_dm.h"\r
@@ -801824,9 +801684,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.c linux-2.6.27.19-5.1
 +      //printk("-SwAntennaDiversityTimerCallback()\n");\r
 +}\r
 +\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_dm.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_dm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_dm.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,41 @@
 +#ifndef R8180_DM_H \r
 +#define R8180_DM_H\r
@@ -801869,9 +801729,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_dm.h linux-2.6.27.19-5.1
 +\r
 +\r
 +#endif\r
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.c  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_gct.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_gct.c    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,296 @@
 +/*
 +   This files contains GCT radio frontend programming routines.
@@ -802169,9 +802029,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.c linux-2.6.27.19-5.
 +
 +      gct_rf_set_chan(dev,priv->chan);
 +}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_gct.h  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_gct.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_gct.h    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,25 @@
 +/*
 +      This is part of rtl8180 OpenSource driver - v 0.20
@@ -802198,9 +802058,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_gct.h linux-2.6.27.19-5.
 +void gct_rf_set_chan(struct net_device *dev,short ch);
 +
 +void gct_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_hw.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_hw.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_hw.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_hw.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_hw.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,956 @@
 +/*
 +      This is part of rtl8180 OpenSource driver.
@@ -803158,9 +803018,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_hw.h linux-2.6.27.19-5.1
 +#endif
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_max2820.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_max2820.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,240 @@
 +/*
 +   This files contains MAXIM MAX2820 radio frontend programming routines.
@@ -803402,9 +803262,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.c linux-2.6.27.1
 +
 +      maxim_rf_set_chan(dev,priv->chan);
 +}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_max2820.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_max2820.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_max2820.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,21 @@
 +/*
 +      This is part of rtl8180 OpenSource driver
@@ -803427,9 +803287,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_max2820.h linux-2.6.27.1
 +void maxim_rf_set_chan(struct net_device *dev,short ch);
 +
 +void maxim_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.c   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_pm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_pm.c     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,90 @@
 +/*
 +   Power management interface routines.
@@ -803521,9 +803381,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.c linux-2.6.27.19-5.1
 +
 +
 +#endif //CONFIG_RTL8180_PM
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_pm.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_pm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_pm.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,28 @@
 +/*
 +        Power management interface routines.
@@ -803553,9 +803413,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_pm.h linux-2.6.27.19-5.1
 +#endif //R8180_PM_H
 +
 +#endif // CONFIG_RTL8180_PM
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,933 @@
 +/*
 +  This is part of the rtl8180-sa2400 driver
@@ -804490,9 +804350,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.c linux-2.6.27.1
 +      write_nic_word(dev,BRSR,brsr);
 +
 +}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,44 @@
 +/*
 +  This is part of the rtl8180-sa2400 driver
@@ -804538,9 +804398,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225.h linux-2.6.27.1
 +void rtl8225z4_rf_sleep(struct net_device *dev);
 +void rtl8225z4_rf_wakeup(struct net_device *dev);
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225z2.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225z2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8225z2.c    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8225z2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1587 @@
 +/*
 +  This is part of the rtl8180-sa2400 driver
@@ -806129,9 +805989,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8225z2.c linux-2.6.27
 +}
 +#endif
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8255.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8255.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1838 @@
 +/*
 +  This is part of the rtl8180-sa2400 driver
@@ -807971,9 +807831,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.c linux-2.6.27.1
 +      write_nic_word(dev, BRSR, brsr);
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_rtl8255.h      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_rtl8255.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_rtl8255.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,19 @@
 +/*
 +  This is part of the rtl8180-sa2400 driver
@@ -807994,9 +807854,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_rtl8255.h linux-2.6.27.1
 +void rtl8255_rf_init(struct net_device *dev);
 +void rtl8255_rf_set_chan(struct net_device *dev,short ch);
 +void rtl8255_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.c       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_sa2400.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_sa2400.c Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,233 @@
 +/*
 +   This files contains PHILIPS SA2400 radio frontend programming routines.
@@ -808231,9 +808091,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.c linux-2.6.27.19
 +
 +      sa2400_rf_set_chan(dev,priv->chan);
 +}
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_sa2400.h       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_sa2400.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_sa2400.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,26 @@
 +/*
 +      This is part of rtl8180 OpenSource driver - v 0.7
@@ -808261,9 +808121,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_sa2400.h linux-2.6.27.19
 +void sa2400_rf_set_chan(struct net_device *dev,short ch);
 +short sa2400_rf_set_sens(struct net_device *dev,short sens);
 +void sa2400_rf_close(struct net_device *dev);
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.c   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_wx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_wx.c     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1644 @@
 +/*
 +   This file contains wireless extension handlers.
@@ -809909,9 +809769,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.c linux-2.6.27.19-5.1
 +};
 +
 +
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.h linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8180_wx.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8180_wx.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8180_wx.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,21 @@
 +/*
 +      This is part of rtl8180 OpenSource driver - v 0.3
@@ -809934,9 +809794,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8180_wx.h linux-2.6.27.19-5.1
 +extern struct iw_handler_def r8180_wx_handlers_def;
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8185b_init.c linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8185b_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/rtl8187se/r8185b_init.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/rtl8187se/r8185b_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/rtl8187se/r8185b_init.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,3342 @@
 +/*++
 +Copyright (c) Realtek Semiconductor Corp. All rights reserved.
@@ -813280,9 +813140,9 @@ diff -purN linux-2.6.27/drivers/staging/rtl8187se/r8185b_init.c linux-2.6.27.19-
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/slicoss/Kconfig linux-2.6.27.19-5.1/drivers/staging/slicoss/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/Kconfig        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/Kconfig  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,14 @@
 +config SLICOSS
 +      tristate "Alacritech Gigabit IS-NIC support"
@@ -813298,14 +813158,14 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/Kconfig linux-2.6.27.19-5.1/driv
 +
 +        To compile this driver as a module, choose M here: the module
 +        will be called slicoss.
-diff -purN linux-2.6.27/drivers/staging/slicoss/Makefile linux-2.6.27.19-5.1/drivers/staging/slicoss/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/Makefile       2009-03-25 16:11:09.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/slicoss/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/Makefile Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_SLICOSS) += slicoss.o
-diff -purN linux-2.6.27/drivers/staging/slicoss/README linux-2.6.27.19-5.1/drivers/staging/slicoss/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/README   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,19 @@
 +This driver is supposed to support:
 +
@@ -813326,9 +813186,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/README linux-2.6.27.19-5.1/drive
 +and Cc: Lior Dotan <liodot@gmail.com> and Christopher Harrer
 +<charrer@alacritech.com> as well as they are also able to test out any
 +changes.
-diff -purN linux-2.6.27/drivers/staging/slicoss/gbdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/gbdownload.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/gbdownload.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/gbdownload.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/gbdownload.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,8215 @@
 +#define MOJAVE_UCODE_VERS_STRING      "1.2"
 +#define MOJAVE_UCODE_VERS_DATE        "2006/03/27 15:12:22"
@@ -821545,9 +821405,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/gbdownload.h linux-2.6.27.19-5.1
 +      0x81, 0xb2, 0x00, 0x00,
 +      },
 +};
-diff -purN linux-2.6.27/drivers/staging/slicoss/gbrcvucode.h linux-2.6.27.19-5.1/drivers/staging/slicoss/gbrcvucode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/gbrcvucode.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/gbrcvucode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/gbrcvucode.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,238 @@
 +/*
 + * Copyright (c) 1997-2002 Alacritech, Inc. All rights reserved
@@ -821787,9 +821647,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/gbrcvucode.h linux-2.6.27.19-5.1
 +0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c,
 +0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04, 0x00, 0x00, 0x3c, 0xc6, 0x04,
 +};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdbgdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdbgdownload.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdbgdownload.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisdbgdownload.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisdbgdownload.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,6850 @@
 +#define OASIS_UCODE_VERS_STRING       "1.2"
 +#define OASIS_UCODE_VERS_DATE         "2006/03/27 15:11:22"
@@ -828641,9 +828501,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdbgdownload.h linux-2.6.27.
 +      0x81, 0xb2, 0x00, 0x00,
 +      },
 +};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdownload.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdownload.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisdownload.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisdownload.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisdownload.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,6848 @@
 +#define OASIS_UCODE_VERS_STRING       "1.2"
 +#define OASIS_UCODE_VERS_DATE         "2006/03/27 15:10:37"
@@ -835493,9 +835353,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/oasisdownload.h linux-2.6.27.19-
 +      0x81, 0xb2, 0x00, 0x00,
 +      },
 +};
-diff -purN linux-2.6.27/drivers/staging/slicoss/oasisrcvucode.h linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisrcvucode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/oasisrcvucode.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/oasisrcvucode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/oasisrcvucode.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,205 @@
 +#define OASIS_RCVUCODE_VERS_STRING    "1.2"
 +#define OASIS_RCVUCODE_VERS_DATE      "2006/03/27 15:10:28"
@@ -835702,9 +835562,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/oasisrcvucode.h linux-2.6.27.19-
 +0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c,
 +0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04, 0x00, 0x00, 0x2c, 0xc6, 0x04,
 +};
-diff -purN linux-2.6.27/drivers/staging/slicoss/slic.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slic.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slic.h   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,598 @@
 +/**************************************************************************
 + *
@@ -836304,9 +836164,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slic.h linux-2.6.27.19-5.1/drive
 +#define SIOCSLICTRACEDUMP        (SIOCDEVPRIVATE+11)
 +
 +#endif /*  __SLIC_DRIVER_H__ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slic_os.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slic_os.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slic_os.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slic_os.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slic_os.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,84 @@
 +/**************************************************************************
 + *
@@ -836392,9 +836252,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slic_os.h linux-2.6.27.19-5.1/dr
 +
 +#endif  /* _SLIC_OS_SPECIFIC_H_  */
 +
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicbuild.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicbuild.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicbuild.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicbuild.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicbuild.h      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,96 @@
 +/**************************************************************************
 + *
@@ -836492,9 +836352,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slicbuild.h linux-2.6.27.19-5.1/
 +#endif
 +
 +#endif   /* _SLIC_BUILD_H_  */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicdbg.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdbg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdbg.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicdbg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicdbg.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,100 @@
 +/**************************************************************************
 + *
@@ -836596,9 +836456,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slicdbg.h linux-2.6.27.19-5.1/dr
 +#endif /* SLIC_ASSERT_ENABLED  */
 +
 +#endif  /*  _SLIC_DEBUG_H_  */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicdump.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdump.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicdump.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicdump.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicdump.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,278 @@
 +/*
 + *
@@ -836878,9 +836738,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slicdump.h linux-2.6.27.19-5.1/d
 +#define THREADBOTH      3   /* bit 0 and 1.. */
 +
 +#endif  /*  _SLIC_DUMP_H  */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slichw.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slichw.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slichw.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slichw.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slichw.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,845 @@
 +/**************************************************************************
 + *
@@ -837727,9 +837587,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slichw.h linux-2.6.27.19-5.1/dri
 +#pragma pack()
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicinc.h linux-2.6.27.19-5.1/drivers/staging/slicoss/slicinc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicinc.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicinc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicinc.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,185 @@
 +/**************************************************************************
 + *
@@ -837916,9 +837776,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slicinc.h linux-2.6.27.19-5.1/dr
 +#endif
 +
 +#endif /* _SLIC_INCLUDE_H_ */
-diff -purN linux-2.6.27/drivers/staging/slicoss/slicoss.c linux-2.6.27.19-5.1/drivers/staging/slicoss/slicoss.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/slicoss/slicoss.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/slicoss/slicoss.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/slicoss/slicoss.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,5936 @@
 +/**************************************************************************
 + *
@@ -843856,9 +843716,9 @@ diff -purN linux-2.6.27/drivers/staging/slicoss/slicoss.c linux-2.6.27.19-5.1/dr
 +
 +module_init(slic_module_init);
 +module_exit(slic_module_cleanup);
-diff -purN linux-2.6.27/drivers/staging/staging.c linux-2.6.27.19-5.1/drivers/staging/staging.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/staging.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/staging.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/staging.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,19 @@
 +#include <linux/kernel.h>
 +#include <linux/init.h>
@@ -843879,9 +843739,9 @@ diff -purN linux-2.6.27/drivers/staging/staging.c linux-2.6.27.19-5.1/drivers/st
 +MODULE_AUTHOR("Greg Kroah-Hartman");
 +MODULE_DESCRIPTION("Staging Core");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/sxg/Kconfig linux-2.6.27.19-5.1/drivers/staging/sxg/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/Kconfig    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/Kconfig      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,10 @@
 +config SXG
 +      tristate "Alacritech SLIC Technology Non-Accelerated 10Gbe support"
@@ -843893,14 +843753,14 @@ diff -purN linux-2.6.27/drivers/staging/sxg/Kconfig linux-2.6.27.19-5.1/drivers/
 +
 +        To compile this driver as a module, choose
 +        M here: the module will be called sxg.
-diff -purN linux-2.6.27/drivers/staging/sxg/Makefile linux-2.6.27.19-5.1/drivers/staging/sxg/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/Makefile   2009-03-25 16:11:10.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/staging/sxg/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/Makefile     Wed May 06 16:56:41 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_SXG)     += sxg.o
-diff -purN linux-2.6.27/drivers/staging/sxg/README linux-2.6.27.19-5.1/drivers/staging/sxg/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/README     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/README       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,13 @@
 +This is the rough cut at a driver for the Alacritech SLIC Technology
 +Non-Accelerated 10Gbe network driver.
@@ -843915,9 +843775,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/README linux-2.6.27.19-5.1/drivers/s
 +Please send patches to:
 +        Greg Kroah-Hartman <gregkh@suse.de>
 +for any cleanups that you do to this driver.
-diff -purN linux-2.6.27/drivers/staging/sxg/saharadbgdownload.h linux-2.6.27.19-5.1/drivers/staging/sxg/saharadbgdownload.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/saharadbgdownload.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/saharadbgdownload.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/saharadbgdownload.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,4854 @@
 +#define SAHARA_UCODE_VERS_STRING      "$Revision: 1.1 $"
 +#define SAHARA_UCODE_VERS_DATE        "$Date: 2008/06/27 12:58:27 $"
@@ -848773,9 +848633,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/saharadbgdownload.h linux-2.6.27.19-
 +      0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x90,
 +},
 +};
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg.c linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.c      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,3624 @@
 +/**************************************************************************
 + *
@@ -852401,9 +852261,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxg.c linux-2.6.27.19-5.1/drivers/st
 +
 +module_init(sxg_module_init);
 +module_exit(sxg_module_cleanup);
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg.h      2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,773 @@
 +/**************************************************************************
 + *
@@ -853178,9 +853038,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxg.h linux-2.6.27.19-5.1/drivers/st
 +#define SIOCSLICTRACEDUMP        SIOCDEVPRIVATE+11
 +
 +#endif /*  __SXG_DRIVER_H__ */
-diff -purN linux-2.6.27/drivers/staging/sxg/sxg_os.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxg_os.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxg_os.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxg_os.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxg_os.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,154 @@
 +/**************************************************************************
 + *
@@ -853336,9 +853196,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxg_os.h linux-2.6.27.19-5.1/drivers
 +
 +#endif  /* _SLIC_OS_SPECIFIC_H_  */
 +
-diff -purN linux-2.6.27/drivers/staging/sxg/sxgdbg.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxgdbg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxgdbg.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxgdbg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxgdbg.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,190 @@
 +/**************************************************************************
 + *
@@ -853530,9 +853390,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxgdbg.h linux-2.6.27.19-5.1/drivers
 +#endif
 +
 +#endif  /*  _SXG_DEBUG_H_  */
-diff -purN linux-2.6.27/drivers/staging/sxg/sxghif.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxghif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxghif.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxghif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxghif.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,861 @@
 +/*
 + * Copyright Â© 1997-2007 Alacritech, Inc. All rights reserved
@@ -854395,9 +854255,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxghif.h linux-2.6.27.19-5.1/drivers
 +    Stop Compilation;
 +#endif
 +
-diff -purN linux-2.6.27/drivers/staging/sxg/sxghw.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxghw.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxghw.h    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxghw.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxghw.h      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,734 @@
 +/*
 + * Copyright Â© 1997-2007 Alacritech, Inc. All rights reserved
@@ -855133,9 +854993,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxghw.h linux-2.6.27.19-5.1/drivers/
 +#define       FLASH_SIZE                              0x080000                // 512 KB (4 Mb)
 +#define       EEPROM_SIZE_XFMR                512                             // true EEPROM size (bytes), including xfmr area
 +#define       EEPROM_SIZE_NO_XFMR             256                             // EEPROM size excluding xfmr area
-diff -purN linux-2.6.27/drivers/staging/sxg/sxgphycode.h linux-2.6.27.19-5.1/drivers/staging/sxg/sxgphycode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/sxg/sxgphycode.h       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/sxg/sxgphycode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/sxg/sxgphycode.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,349 @@
 +/*
 + * Copyright (C) 1997-2008 Alacritech, Inc. All rights reserved
@@ -855486,9 +855346,9 @@ diff -purN linux-2.6.27/drivers/staging/sxg/sxgphycode.h linux-2.6.27.19-5.1/dri
 +      {0x0000, 0x000A},       /* wait 10ms just to be safe */
 +      {0xffff, 0xffff}        /* table terminator */
 +};
-diff -purN linux-2.6.27/drivers/staging/usbip/Kconfig linux-2.6.27.19-5.1/drivers/staging/usbip/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/Kconfig  2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/Kconfig    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,36 @@
 +config USB_IP_COMMON
 +      tristate "USB IP support (EXPERIMENTAL)"
@@ -855526,9 +855386,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/Kconfig linux-2.6.27.19-5.1/driver
 +
 +       To compile this driver as a module, choose M here: the
 +       module will be called usbip.
-diff -purN linux-2.6.27/drivers/staging/usbip/Makefile linux-2.6.27.19-5.1/drivers/staging/usbip/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/Makefile 2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/Makefile   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,12 @@
 +obj-$(CONFIG_USB_IP_COMMON) += usbip_common_mod.o
 +usbip_common_mod-objs := usbip_common.o usbip_event.o
@@ -855542,9 +855402,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/Makefile linux-2.6.27.19-5.1/drive
 +ifeq ($(CONFIG_USB_DEBUG),y)
 +      EXTRA_CFLAGS += -DDEBUG
 +endif
-diff -purN linux-2.6.27/drivers/staging/usbip/README linux-2.6.27.19-5.1/drivers/staging/usbip/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/README   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/README     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,6 @@
 +TODO:
 +      - more discussion about the protocol
@@ -855552,9 +855412,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/README linux-2.6.27.19-5.1/drivers
 +      - review of the userspace interface
 +
 +Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/usbip/stub.h linux-2.6.27.19-5.1/drivers/staging/usbip/stub.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -855651,9 +855511,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/stub.h linux-2.6.27.19-5.1/drivers
 +/* stub_main.c */
 +int match_busid(char *busid);
 +void stub_device_cleanup_urbs(struct stub_device *sdev);
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_dev.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_dev.c       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_dev.c Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,483 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -856138,9 +855998,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/stub_dev.c linux-2.6.27.19-5.1/dri
 +
 +      udbg("bye\n");
 +}
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_main.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_main.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_main.c      2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_main.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_main.c        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,300 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -856442,9 +856302,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/stub_main.c linux-2.6.27.19-5.1/dr
 +MODULE_AUTHOR(DRIVER_AUTHOR);
 +MODULE_DESCRIPTION(DRIVER_DESC);
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_rx.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_rx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_rx.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_rx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_rx.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,615 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -857061,9 +856921,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/stub_rx.c linux-2.6.27.19-5.1/driv
 +              stub_rx_pdu(ud);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/usbip/stub_tx.c linux-2.6.27.19-5.1/drivers/staging/usbip/stub_tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/stub_tx.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/stub_tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/stub_tx.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,371 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -857436,9 +857296,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/stub_tx.c linux-2.6.27.19-5.1/driv
 +                               !list_empty(&sdev->unlink_tx)));
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.c linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.c   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_common.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_common.c     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,997 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -858437,9 +858297,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.c linux-2.6.27.19-5.1
 +MODULE_AUTHOR(DRIVER_AUTHOR);
 +MODULE_DESCRIPTION(DRIVER_DESC);
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.h linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_common.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_common.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,406 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -858847,9 +858707,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/usbip_common.h linux-2.6.27.19-5.1
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/usbip/usbip_event.c linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_event.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/usbip_event.c    2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/usbip_event.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/usbip_event.c      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,141 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -858992,9 +858852,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/usbip_event.c linux-2.6.27.19-5.1/
 +      return happend;
 +}
 +EXPORT_SYMBOL_GPL(usbip_event_happend);
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci.h linux-2.6.27.19-5.1/drivers/staging/usbip/vhci.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci.h   2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,142 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -859138,9 +858998,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/vhci.h linux-2.6.27.19-5.1/drivers
 +{
 +      return vhci_to_hcd(vhci)->self.controller;
 +}
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_hcd.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_hcd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_hcd.c       2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_hcd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_hcd.c Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1275 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -860417,9 +860277,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/vhci_hcd.c linux-2.6.27.19-5.1/dri
 +      dbg_vhci_hc("bye\n");
 +}
 +module_exit(vhci_cleanup);
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_rx.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_rx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_rx.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_rx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_rx.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,251 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -860672,9 +860532,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/vhci_rx.c linux-2.6.27.19-5.1/driv
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_sysfs.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_sysfs.c     2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_sysfs.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,250 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -860926,9 +860786,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/vhci_sysfs.c linux-2.6.27.19-5.1/d
 +struct attribute_group dev_attr_group = {
 +      .attrs = dev_attrs,
 +};
-diff -purN linux-2.6.27/drivers/staging/usbip/vhci_tx.c linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/usbip/vhci_tx.c        2009-03-25 16:11:12.000000000 +0000
+diff -r 9608d5473017 drivers/staging/usbip/vhci_tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/usbip/vhci_tx.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,239 @@
 +/*
 + * Copyright (C) 2003-2008 Takahiro Hirofuchi
@@ -861169,9 +861029,9 @@ diff -purN linux-2.6.27/drivers/staging/usbip/vhci_tx.c linux-2.6.27.19-5.1/driv
 +              dbg_vhci_tx("pending urbs ?, now wake up\n");
 +      }
 +}
-diff -purN linux-2.6.27/drivers/staging/winbond/Kconfig linux-2.6.27.19-5.1/drivers/staging/winbond/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/Kconfig        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/Kconfig  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,7 @@
 +config W35UND
 +      tristate "Winbond driver"
@@ -861180,9 +861040,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/Kconfig linux-2.6.27.19-5.1/driv
 +      ---help---
 +        This is highly experimental driver for winbond wifi card on some Kohjinsha notebooks
 +        Check http://code.google.com/p/winbondport/ for new version
-diff -purN linux-2.6.27/drivers/staging/winbond/Makefile linux-2.6.27.19-5.1/drivers/staging/winbond/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/Makefile       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/Makefile Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,18 @@
 +      DRIVER_DIR=./linux
 +
@@ -861202,9 +861062,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/Makefile linux-2.6.27.19-5.1/dri
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/README linux-2.6.27.19-5.1/drivers/staging/winbond/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/README 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/README   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,10 @@
 +TODO:
 +      - sparse cleanups
@@ -861216,9 +861076,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/README linux-2.6.27.19-5.1/drive
 +
 +Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
 +Pavel Machek <pavel@suse.cz>
-diff -purN linux-2.6.27/drivers/staging/winbond/adapter.h linux-2.6.27.19-5.1/drivers/staging/winbond/adapter.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/adapter.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/adapter.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/adapter.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,23 @@
 +//
 +// ADAPTER.H -
@@ -861243,9 +861103,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/adapter.h linux-2.6.27.19-5.1/dr
 +
 +      u8      LinkName[MAX_ANSI_STRING];
 +} WB32_ADAPTER, ADAPTER, *PWB32_ADAPTER, *PADAPTER;
-diff -purN linux-2.6.27/drivers/staging/winbond/bss_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/bss_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/bss_f.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/bss_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/bss_f.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,59 @@
 +//
 +// BSS descriptor DataBase management global function
@@ -861306,9 +861166,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/bss_f.h linux-2.6.27.19-5.1/driv
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/bssdscpt.h linux-2.6.27.19-5.1/drivers/staging/winbond/bssdscpt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/bssdscpt.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/bssdscpt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/bssdscpt.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,156 @@
 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +//    bssdscpt.c
@@ -861466,9 +861326,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/bssdscpt.h linux-2.6.27.19-5.1/d
 +#define psBSS(i)                      (&(Adapter->asBSSDescriptElement[(i)]))
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/ds_tkip.h linux-2.6.27.19-5.1/drivers/staging/winbond/ds_tkip.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/ds_tkip.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/ds_tkip.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/ds_tkip.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,33 @@
 +// Rotation functions on 32 bit values
 +#define ROL32( A, n ) \
@@ -861503,9 +861363,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/ds_tkip.h linux-2.6.27.19-5.1/dr
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/gl_80211.h linux-2.6.27.19-5.1/drivers/staging/winbond/gl_80211.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/gl_80211.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/gl_80211.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/gl_80211.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,125 @@
 +
 +#ifndef __GL_80211_H__
@@ -861632,9 +861492,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/gl_80211.h linux-2.6.27.19-5.1/d
 +/*** end of file ***/
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/ioctls.h linux-2.6.27.19-5.1/drivers/staging/winbond/ioctls.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/ioctls.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/ioctls.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/ioctls.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,678 @@
 +//============================================================================
 +//  IOCTLS.H -
@@ -862314,9 +862174,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/ioctls.h linux-2.6.27.19-5.1/dri
 +#endif  // #ifndef _IOCTLS_H
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/common.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/common.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/common.h   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,143 @@
 +//
 +// common.h
@@ -862461,9 +862321,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/common.h linux-2.6.27.19-5
 +
 +#endif // COMMON_DEF
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/sysdef.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/sysdef.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/sysdef.h 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/sysdef.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/sysdef.h   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,73 @@
 +
 +
@@ -862538,9 +862398,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/sysdef.h linux-2.6.27.19-5
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg.c  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,747 @@
 +#include "sysdef.h"
 +
@@ -863289,9 +863149,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg.c linux-2.6.27.19-
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_f.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg_f.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,56 @@
 +//====================================
 +// Interface function declare
@@ -863349,9 +863209,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_f.h linux-2.6.27.1
 +unsigned char adjust_TXVGA_for_iq_mag(  phw_data_t pHwData );
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35reg_s.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35reg_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35reg_s.h        Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,170 @@
 +//=======================================================================================
 +/*
@@ -863523,9 +863383,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35reg_s.h linux-2.6.27.1
 +} WB35REG, *PWB35REG;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx.c   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,337 @@
 +//============================================================================
 +//  Copyright (c) 1996-2002 Winbond Electronic Corporation
@@ -863864,9 +863724,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx.c linux-2.6.27.19-5
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_f.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx_f.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,17 @@
 +//====================================
 +// Interface function declare
@@ -863885,9 +863745,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_f.h linux-2.6.27.19
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35rx_s.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35rx_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35rx_s.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,48 @@
 +//============================================================================
 +// wb35rx.h --
@@ -863937,9 +863797,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35rx_s.h linux-2.6.27.19
 +} WB35RX, *PWB35RX;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx.c   Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,313 @@
 +//============================================================================
 +//  Copyright (c) 1996-2002 Winbond Electronic Corporation
@@ -864254,9 +864114,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx.c linux-2.6.27.19-5
 +      pWb35Tx->EP2vm_state = VM_STOP;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_f.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx_f.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,20 @@
 +//====================================
 +// Interface function declare
@@ -864278,9 +864138,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_f.h linux-2.6.27.19
 +void Wb35Tx_CurrentTime(  phw_data_t pHwData,  u32 TimeCount );
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wb35tx_s.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wb35tx_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wb35tx_s.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,47 @@
 +//====================================
 +// IS89C35 Tx related definition
@@ -864329,9 +864189,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wb35tx_s.h linux-2.6.27.19
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb.c linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb.c    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,404 @@
 +/*
 + * Copyright 2008 Pavel Machek <pavel@suse.cz>
@@ -864737,9 +864597,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb.c linux-2.6.27.19-5.
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_f.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb_f.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,34 @@
 +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +// Copyright (c) 1996-2004 Winbond Electronic Corporation
@@ -864775,9 +864635,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_f.h linux-2.6.27.19-
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/linux/wbusb_s.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/linux/wbusb_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/linux/wbusb_s.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,42 @@
 +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +// Copyright (c) 1996-2004 Winbond Electronic Corporation
@@ -864821,9 +864681,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/linux/wbusb_s.h linux-2.6.27.19-
 +      struct usb_device *udev;
 +      u32     DetectCount;
 +} WBUSB, *PWBUSB;
-diff -purN linux-2.6.27/drivers/staging/winbond/localpara.h linux-2.6.27.19-5.1/drivers/staging/winbond/localpara.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/localpara.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/localpara.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/localpara.h      Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,275 @@
 +//=============================================================
 +// LocalPara.h -
@@ -865100,9 +864960,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/localpara.h linux-2.6.27.19-5.1/
 +} WB_LOCALDESCRIPT, *PWB_LOCALDESCRIPT;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mac_structures.h linux-2.6.27.19-5.1/drivers/staging/winbond/mac_structures.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mac_structures.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mac_structures.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mac_structures.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,670 @@
 +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +// MAC_Structures.h
@@ -865774,9 +865634,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mac_structures.h linux-2.6.27.19
 +#endif // _MAC_Structure_H_
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mds.c linux-2.6.27.19-5.1/drivers/staging/winbond/mds.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds.c    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,630 @@
 +#include "os_common.h"
 +
@@ -866408,9 +866268,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mds.c linux-2.6.27.19-5.1/driver
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mds_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mds_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds_f.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds_f.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,33 @@
 +unsigned char Mds_initial(  PADAPTER Adapter );
 +void Mds_Destroy(  PADAPTER Adapter );
@@ -866445,9 +866305,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mds_f.h linux-2.6.27.19-5.1/driv
 +void MDS_EthernetPacketReceive(  PADAPTER Adapter,  PRXLAYER1 pRxLayer1 );
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mds_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/mds_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mds_s.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mds_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mds_s.h  Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,183 @@
 +////////////////////////////////////////////////////////////////////////////////////////////////////////
 +#define MAX_USB_TX_DESCRIPTOR         15              // IS89C35 ability
@@ -866632,9 +866492,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mds_s.h linux-2.6.27.19-5.1/driv
 +}RXLAYER1, * PRXLAYER1;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mlme_mib.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_mib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_mib.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlme_mib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlme_mib.h       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,84 @@
 +//============================================================================
 +//  MLMEMIB.H -
@@ -866720,9 +866580,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mlme_mib.h linux-2.6.27.19-5.1/d
 +#endif
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mlme_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlme_s.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlme_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlme_s.h Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,195 @@
 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +//    Mlme.h
@@ -866919,9 +866779,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mlme_s.h linux-2.6.27.19-5.1/dri
 +}__attribute__ ((packed)) RXDATA, *psRXDATA;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx.c linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx.c     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlmetxrx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlmetxrx.c       Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,150 @@
 +//============================================================================
 +//  Module Name:
@@ -867073,9 +866933,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx.c linux-2.6.27.19-5.1/d
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mlmetxrx_f.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mlmetxrx_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mlmetxrx_f.h     Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,52 @@
 +//================================================================
 +// MLMETxRx.H --
@@ -867129,9 +866989,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mlmetxrx_f.h linux-2.6.27.19-5.1
 +
 +#endif
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mto.c linux-2.6.27.19-5.1/drivers/staging/winbond/mto.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto.c    Wed May 06 16:56:41 2009 +0100
 @@ -0,0 +1,1229 @@
 +//============================================================================
 +//  MTO.C -
@@ -868362,9 +868222,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mto.c linux-2.6.27.19-5.1/driver
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mto.h linux-2.6.27.19-5.1/drivers/staging/winbond/mto.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto.h  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto.h    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,265 @@
 +//==================================================================
 +// MTO.H
@@ -868631,9 +868491,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mto.h linux-2.6.27.19-5.1/driver
 +#endif //__MTO_H__
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/mto_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/mto_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/mto_f.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/mto_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/mto_f.h  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,7 @@
 +extern void MTO_Init(PWB32_ADAPTER);
 +extern void MTO_PeriodicTimerExpired(PWB32_ADAPTER);
@@ -868642,15 +868502,15 @@ diff -purN linux-2.6.27/drivers/staging/winbond/mto_f.h linux-2.6.27.19-5.1/driv
 +extern u8 MTO_GetTxFallbackRate(MTO_FUNC_INPUT);
 +extern void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/os_common.h linux-2.6.27.19-5.1/drivers/staging/winbond/os_common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/os_common.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/os_common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/os_common.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,2 @@
 +#include "linux/sysdef.h"
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.c linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/phy_calibration.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/phy_calibration.c        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,1759 @@
 +/*
 + * phy_302_calibration.c
@@ -870411,9 +870271,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.c linux-2.6.27.1
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.h linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/phy_calibration.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/phy_calibration.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/phy_calibration.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,101 @@
 +// 20031229 Turbo add
 +#define REG_AGC_CTRL1               0x1000
@@ -870516,9 +870376,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/phy_calibration.h linux-2.6.27.1
 +void phy_set_rf_data(  phw_data_t pHwData,  u32 index,  u32 value );
 +#define phy_init_rf( _A )     //RFSynthesizer_initial( _A )
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/reg.c linux-2.6.27.19-5.1/drivers/staging/winbond/reg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/reg.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/reg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/reg.c    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,2683 @@
 +#include "os_common.h"
 +
@@ -873203,9 +873063,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/reg.c linux-2.6.27.19-5.1/driver
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/rxisr.c linux-2.6.27.19-5.1/drivers/staging/winbond/rxisr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/rxisr.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/rxisr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/rxisr.c  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,30 @@
 +#include "os_common.h"
 +
@@ -873237,9 +873097,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/rxisr.c linux-2.6.27.19-5.1/driv
 +{
 +      WARN_ON(1);
 +}
-diff -purN linux-2.6.27/drivers/staging/winbond/scan_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/scan_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/scan_s.h       2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/scan_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/scan_s.h Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,115 @@
 +//
 +// SCAN task global CONSTANTS, STRUCTURES, variables
@@ -873356,9 +873216,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/scan_s.h linux-2.6.27.19-5.1/dri
 +//static void vScanTimerStart(PWB32_ADAPTER   Adapter, int timeout_value);
 +//static void vScanTimerStop(PWB32_ADAPTER Adapter);
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.c linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_api.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_api.c        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,13 @@
 +//------------------------------------------------------------------------------------
 +// sme_api.c
@@ -873373,9 +873233,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.c linux-2.6.27.19-5.1/dr
 +{
 +       BUG();
 +}
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.h linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_api.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_api.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_api.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,265 @@
 +/*
 + * sme_api.h
@@ -873642,9 +873502,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/sme_api.h linux-2.6.27.19-5.1/dr
 +#endif /* __SME_API_H__ */
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/sme_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/sme_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/sme_s.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/sme_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/sme_s.h  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,228 @@
 +//
 +// SME_S.H -
@@ -873874,9 +873734,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/sme_s.h linux-2.6.27.19-5.1/driv
 +
 +// Static function
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wb35_ver.h linux-2.6.27.19-5.1/drivers/staging/winbond/wb35_ver.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wb35_ver.h     2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wb35_ver.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wb35_ver.h       Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,30 @@
 +//
 +// Only define one of follow
@@ -873908,9 +873768,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wb35_ver.h linux-2.6.27.19-5.1/d
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal.c linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal.c        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal.c  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,878 @@
 +#include "os_common.h"
 +
@@ -874790,9 +874650,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wbhal.c linux-2.6.27.19-5.1/driv
 +      return TRUE;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_f.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal_f.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,122 @@
 +//=====================================================================
 +// Device related include
@@ -874916,9 +874776,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_f.h linux-2.6.27.19-5.1/dr
 +#define hw_set_dxx_reg( _A, _B, _C )  hal_set_dxx_reg( _A, _B, (u32)_C )
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wbhal_s.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wbhal_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wbhal_s.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,615 @@
 +//[20040722 WK]
 +#define HAL_LED_SET_MASK              0x001c  //20060901 Extend
@@ -875535,9 +875395,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wbhal_s.h linux-2.6.27.19-5.1/dr
 +} HAL_RATE, *PHAL_RATE;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux.c linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux.c      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux.c        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,277 @@
 +//============================================================================
 +//  Copyright (c) 1996-2005 Winbond Electronic Corporation
@@ -875816,9 +875676,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wblinux.c linux-2.6.27.19-5.1/dr
 +      pWbLinux->LinkStatus = flag; // OS_DISCONNECTED or  OS_CONNECTED
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_f.h linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_f.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_f.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux_f.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux_f.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,23 @@
 +//=========================================================================
 +// Copyright (c) 1996-2004 Winbond Electronic Corporation
@@ -875843,9 +875703,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_f.h linux-2.6.27.19-5.1/
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_s.h linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_s.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/winbond/wblinux_s.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/winbond/wblinux_s.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/winbond/wblinux_s.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,45 @@
 +//============================================================
 +// wblinux_s.h
@@ -875892,9 +875752,9 @@ diff -purN linux-2.6.27/drivers/staging/winbond/wblinux_s.h linux-2.6.27.19-5.1/
 +} WBLINUX, *PWBLINUX;
 +
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/Kconfig linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Kconfig        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/Kconfig  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,10 @@
 +config PRISM2_USB
 +      tristate "Prism2.5/3 USB driver"
@@ -875906,9 +875766,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/Kconfig linux-2.6.27.19-5.1/driv
 +
 +        To compile this driver as a module, choose M here: the module
 +        will be called prism2_usb.
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/Makefile linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/Makefile       2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/Makefile Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,8 @@
 +obj-$(CONFIG_PRISM2_USB) += prism2_usb.o
 +
@@ -875918,9 +875778,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/Makefile linux-2.6.27.19-5.1/dri
 +              p80211wep.o \
 +              p80211wext.o \
 +              p80211netdev.o
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/README linux-2.6.27.19-5.1/drivers/staging/wlan-ng/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/README 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/README   Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,7 @@
 +TODO:
 +      - checkpatch.pl cleanups
@@ -875929,9 +875789,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/README linux-2.6.27.19-5.1/drive
 +      - move to use the in-kernel wireless stack
 +
 +Please send all patches to Greg Kroah-Hartman <greg@kroah.com>
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/hfa384x.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/hfa384x.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,2792 @@
 +/* hfa384x.h
 +*
@@ -878725,9 +878585,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x.h linux-2.6.27.19-5.1/dr
 +#endif /* __KERNEL__ */
 +
 +#endif  /* _HFA384x_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x_usb.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x_usb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/hfa384x_usb.c  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/hfa384x_usb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,4690 @@
 +/* src/prism2/driver/hfa384x_usb.c
 +*
@@ -883419,9 +883279,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/hfa384x_usb.c linux-2.6.27.19-5.
 +      return 0; /* avoid compiler warnings */
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211conv.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211conv.c     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,686 @@
 +/* src/p80211/p80211conv.c
 +*
@@ -884109,9 +883969,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.c linux-2.6.27.19-5.1
 +      DBFEXIT;
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211conv.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211conv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211conv.h     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,186 @@
 +/* p80211conv.h
 +*
@@ -884299,9 +884159,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211conv.h linux-2.6.27.19-5.1
 +int p80211_stt_addproto(u16 proto);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211hdr.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211hdr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211hdr.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211hdr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211hdr.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,299 @@
 +/* p80211hdr.h
 +*
@@ -884602,9 +884462,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211hdr.h linux-2.6.27.19-5.1/
 +}
 +
 +#endif /* _P80211HDR_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211ioctl.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211ioctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211ioctl.h  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211ioctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211ioctl.h    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,123 @@
 +/* p80211ioctl.h
 +*
@@ -884729,9 +884589,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211ioctl.h linux-2.6.27.19-5.
 +
 +
 +#endif /* _P80211IOCTL_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211meta.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211meta.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211meta.h   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211meta.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211meta.h     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,169 @@
 +/* p80211meta.h
 +*
@@ -884902,9 +884762,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211meta.h linux-2.6.27.19-5.1
 +int p80211item_gettype(p80211meta_t *meta);
 +
 +#endif /* _P80211META_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metadef.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metadef.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metadef.h        2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metadef.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metadef.h  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,757 @@
 +/* This file is GENERATED AUTOMATICALLY.  DO NOT EDIT OR MODIFY.
 +* --------------------------------------------------------------------
@@ -885663,9 +885523,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metadef.h linux-2.6.27.19-
 +                      P80211DID_MKGROUP(6) | \
 +                      P80211DID_MKITEM(12) | 0x10000000)
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamib.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamib.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metamib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metamib.h  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,105 @@
 +/* p80211metamib.h
 +*
@@ -885772,9 +885632,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamib.h linux-2.6.27.19-
 +/* */
 +
 +#endif /* _P80211METAMIB_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamsg.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamsg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metamsg.h        2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metamsg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metamsg.h  Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,105 @@
 +/* p80211metamsg.h
 +*
@@ -885881,9 +885741,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metamsg.h linux-2.6.27.19-
 +/* */
 +
 +#endif /* _P80211METAMSG_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metastruct.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metastruct.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211metastruct.h     2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211metastruct.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211metastruct.h       Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,285 @@
 +/* This file is GENERATED AUTOMATICALLY.  DO NOT EDIT OR MODIFY.
 +* --------------------------------------------------------------------
@@ -886170,9 +886030,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211metastruct.h linux-2.6.27.
 +} __WLAN_ATTRIB_PACK__ p80211msg_p2req_flashdl_write_t;
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211mgmt.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211mgmt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211mgmt.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211mgmt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211mgmt.h     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,575 @@
 +/* p80211mgmt.h
 +*
@@ -886749,9 +886609,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211mgmt.h linux-2.6.27.19-5.1
 +
 +
 +#endif /* _P80211MGMT_H */
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211msg.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211msg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211msg.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211msg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211msg.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,102 @@
 +/* p80211msg.h
 +*
@@ -886855,9 +886715,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211msg.h linux-2.6.27.19-5.1/
 +
 +#endif  /* _P80211MSG_H */
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.c 2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211netdev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211netdev.c   Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,1209 @@
 +/* src/p80211/p80211knetdev.c
 +*
@@ -888068,9 +887928,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.c linux-2.6.27.19-5
 +
 +      DBFEXIT;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211netdev.h 2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211netdev.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211netdev.h   Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,254 @@
 +/* p80211netdev.h
 +*
@@ -888326,9 +888186,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211netdev.h linux-2.6.27.19-5
 +void  p80211netdev_hwremoved(wlandevice_t *wlandev);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.c    2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211req.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211req.c      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,300 @@
 +/* src/p80211/p80211req.c
 +*
@@ -888630,9 +888490,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.c linux-2.6.27.19-5.1/
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211req.h    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211req.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211req.h      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,68 @@
 +/* p80211req.h
 +*
@@ -888702,9 +888562,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211req.h linux-2.6.27.19-5.1/
 +int   p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211types.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211types.h  2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211types.h    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,675 @@
 +/* p80211types.h
 +*
@@ -889381,9 +889241,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211types.h linux-2.6.27.19-5.
 +
 +#endif /* _P80211TYPES_H */
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wep.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wep.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211wep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211wep.c      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,315 @@
 +/* src/p80211/p80211wep.c
 +*
@@ -889700,9 +889560,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wep.c linux-2.6.27.19-5.1/
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wext.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wext.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/p80211wext.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/p80211wext.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/p80211wext.c     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,1826 @@
 +/* src/p80211/p80211wext.c
 +*
@@ -891530,9 +891390,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/p80211wext.c linux-2.6.27.19-5.1
 +
 +
 +
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.c   2009-03-25 16:11:10.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mgmt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mgmt.c     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,1363 @@
 +/* src/prism2/driver/prism2mgmt.c
 +*
@@ -892897,9 +892757,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.c linux-2.6.27.19-5.1
 +      DBFEXIT;
 +      return result;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mgmt.h   2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mgmt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mgmt.h     Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,155 @@
 +/* prism2mgmt.h
 +*
@@ -893056,9 +892916,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mgmt.h linux-2.6.27.19-5.1
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mib.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mib.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2mib.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2mib.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2mib.c      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,1135 @@
 +/* src/prism2/driver/prism2mib.c
 +*
@@ -894195,9 +894055,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2mib.c linux-2.6.27.19-5.1/
 +      DBFEXIT;
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2sta.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2sta.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2sta.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2sta.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2sta.c      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,2212 @@
 +/* src/prism2/driver/prism2sta.c
 +*
@@ -896411,9 +896271,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2sta.c linux-2.6.27.19-5.1/
 +
 +      DBFEXIT;
 +}
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2usb.c linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2usb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/prism2usb.c    2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/prism2usb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/prism2usb.c      Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,302 @@
 +#include "hfa384x_usb.c"
 +#include "prism2mgmt.c"
@@ -896717,9 +896577,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/prism2usb.c linux-2.6.27.19-5.1/
 +
 +module_init(prism2usb_init);
 +module_exit(prism2usb_cleanup);
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/version.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/version.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/version.h      2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/version.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/version.h        Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,56 @@
 +/* src/include/wlan/version.h
 +*
@@ -896777,9 +896637,9 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/version.h linux-2.6.27.19-5.1/dr
 +#define WLAN_BUILD_DATE "Thu Oct  2 11:04:42 PDT 2008"
 +
 +#endif
-diff -purN linux-2.6.27/drivers/staging/wlan-ng/wlan_compat.h linux-2.6.27.19-5.1/drivers/staging/wlan-ng/wlan_compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/staging/wlan-ng/wlan_compat.h  2009-03-25 16:11:09.000000000 +0000
+diff -r 9608d5473017 drivers/staging/wlan-ng/wlan_compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/staging/wlan-ng/wlan_compat.h    Wed May 06 16:56:42 2009 +0100
 @@ -0,0 +1,193 @@
 +/* wlan_compat.h
 +*
@@ -896974,10 +896834,10 @@ diff -purN linux-2.6.27/drivers/staging/wlan-ng/wlan_compat.h linux-2.6.27.19-5.
 +/*=============================================================*/
 +#endif /* _WLAN_COMPAT_H */
 +
-diff -purN linux-2.6.27/drivers/usb/atm/speedtch.c linux-2.6.27.19-5.1/drivers/usb/atm/speedtch.c
---- linux-2.6.27/drivers/usb/atm/speedtch.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/atm/speedtch.c     2009-03-25 16:11:19.000000000 +0000
-@@ -722,6 +722,16 @@ static void speedtch_atm_stop(struct usb
+diff -r 9608d5473017 drivers/usb/atm/speedtch.c
+--- a/drivers/usb/atm/speedtch.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/atm/speedtch.c       Wed May 06 16:56:42 2009 +0100
+@@ -722,6 +722,16 @@
        flush_scheduled_work();
  }
  
@@ -896994,7 +896854,7 @@ diff -purN linux-2.6.27/drivers/usb/atm/speedtch.c linux-2.6.27.19-5.1/drivers/u
  
  /**********
  **  USB  **
-@@ -740,6 +750,8 @@ static struct usb_driver speedtch_usb_dr
+@@ -740,6 +750,8 @@
        .name           = speedtch_driver_name,
        .probe          = speedtch_usb_probe,
        .disconnect     = usbatm_usb_disconnect,
@@ -897003,10 +896863,10 @@ diff -purN linux-2.6.27/drivers/usb/atm/speedtch.c linux-2.6.27.19-5.1/drivers/u
        .id_table       = speedtch_usb_ids
  };
  
-diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/usb/class/cdc-acm.c
---- linux-2.6.27/drivers/usb/class/cdc-acm.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/class/cdc-acm.c    2009-03-25 16:11:19.000000000 +0000
-@@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *a
+diff -r 9608d5473017 drivers/usb/class/cdc-acm.c
+--- a/drivers/usb/class/cdc-acm.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/class/cdc-acm.c      Wed May 06 16:56:42 2009 +0100
+@@ -158,16 +158,12 @@
  }
  
  /*
@@ -897024,7 +896884,7 @@ diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/
  }
  
  /*
-@@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *u
+@@ -482,6 +478,7 @@
  {
        struct acm_wb *wb = urb->context;
        struct acm *acm = wb->instance;
@@ -897032,7 +896892,7 @@ diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/
  
        if (verbose || urb->status
                        || (urb->actual_length != urb->transfer_buffer_length))
-@@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *u
+@@ -490,7 +487,9 @@
                        urb->transfer_buffer_length,
                        urb->status);
  
@@ -897042,7 +896902,7 @@ diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/
        if (ACM_READY(acm))
                schedule_work(&acm->work);
        else
-@@ -849,9 +848,10 @@ static void acm_write_buffers_free(struc
+@@ -849,9 +848,10 @@
  {
        int i;
        struct acm_wb *wb;
@@ -897054,22 +896914,22 @@ diff -purN linux-2.6.27/drivers/usb/class/cdc-acm.c linux-2.6.27.19-5.1/drivers/
        }
  }
  
-diff -purN linux-2.6.27/drivers/usb/class/cdc-wdm.c linux-2.6.27.19-5.1/drivers/usb/class/cdc-wdm.c
---- linux-2.6.27/drivers/usb/class/cdc-wdm.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/class/cdc-wdm.c    2009-03-25 16:11:19.000000000 +0000
-@@ -42,6 +42,8 @@ static struct usb_device_id wdm_ids[] = 
+diff -r 9608d5473017 drivers/usb/class/cdc-wdm.c
+--- a/drivers/usb/class/cdc-wdm.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/class/cdc-wdm.c      Wed May 06 16:56:42 2009 +0100
+@@ -41,6 +41,8 @@
+       },
        { }
  };
-+MODULE_DEVICE_TABLE (usb, wdm_ids);
 +
- #define WDM_MINOR_BASE        176
++MODULE_DEVICE_TABLE (usb, wdm_ids);
  
+ #define WDM_MINOR_BASE        176
  
-diff -purN linux-2.6.27/drivers/usb/core/devio.c linux-2.6.27.19-5.1/drivers/usb/core/devio.c
---- linux-2.6.27/drivers/usb/core/devio.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/devio.c       2009-03-25 16:11:19.000000000 +0000
-@@ -1700,7 +1700,7 @@ const struct file_operations usbdev_file
+diff -r 9608d5473017 drivers/usb/core/devio.c
+--- a/drivers/usb/core/devio.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/devio.c Wed May 06 16:56:42 2009 +0100
+@@ -1700,7 +1700,7 @@
        .release =      usbdev_release,
  };
  
@@ -897078,7 +896938,7 @@ diff -purN linux-2.6.27/drivers/usb/core/devio.c linux-2.6.27.19-5.1/drivers/usb
  {
        struct dev_state *ps;
        struct siginfo sinfo;
-@@ -1742,10 +1742,15 @@ static void usb_classdev_remove(struct u
+@@ -1742,10 +1742,15 @@
  {
        if (dev->usb_classdev)
                device_unregister(dev->usb_classdev);
@@ -897096,7 +896956,7 @@ diff -purN linux-2.6.27/drivers/usb/core/devio.c linux-2.6.27.19-5.1/drivers/usb
                               unsigned long action, void *dev)
  {
        switch (action) {
-@@ -1755,15 +1760,15 @@ static int usb_classdev_notify(struct no
+@@ -1755,15 +1760,15 @@
                break;
        case USB_DEVICE_REMOVE:
                usb_classdev_remove(dev);
@@ -897114,31 +896974,31 @@ diff -purN linux-2.6.27/drivers/usb/core/devio.c linux-2.6.27.19-5.1/drivers/usb
  
  static struct cdev usb_device_cdev;
  
-@@ -1797,9 +1802,8 @@ int __init usb_devio_init(void)
+@@ -1797,9 +1802,8 @@
         * to /sys/dev
         */
        usb_classdev_class->dev_kobj = NULL;
 -
--      usb_register_notify(&usbdev_nb);
- #endif
-+      usb_register_notify(&usbdev_nb);
++#endif
+       usb_register_notify(&usbdev_nb);
+-#endif
  out:
        return retval;
  
-@@ -1810,8 +1814,8 @@ error_cdev:
+@@ -1810,8 +1814,8 @@
  
  void usb_devio_cleanup(void)
  {
--#ifdef CONFIG_USB_DEVICE_CLASS
-       usb_unregister_notify(&usbdev_nb);
-+#ifdef CONFIG_USB_DEVICE_CLASS
++      usb_unregister_notify(&usbdev_nb);
+ #ifdef CONFIG_USB_DEVICE_CLASS
+-      usb_unregister_notify(&usbdev_nb);
        class_destroy(usb_classdev_class);
  #endif
        cdev_del(&usb_device_cdev);
-diff -purN linux-2.6.27/drivers/usb/core/driver.c linux-2.6.27.19-5.1/drivers/usb/core/driver.c
---- linux-2.6.27/drivers/usb/core/driver.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/driver.c      2009-03-25 16:11:19.000000000 +0000
-@@ -1609,7 +1609,8 @@ int usb_external_resume_device(struct us
+diff -r 9608d5473017 drivers/usb/core/driver.c
+--- a/drivers/usb/core/driver.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/driver.c        Wed May 06 16:56:42 2009 +0100
+@@ -1609,7 +1609,8 @@
        status = usb_resume_both(udev);
        udev->last_busy = jiffies;
        usb_pm_unlock(udev);
@@ -897148,9 +897008,9 @@ diff -purN linux-2.6.27/drivers/usb/core/driver.c linux-2.6.27.19-5.1/drivers/us
  
        /* Now that the device is awake, we can start trying to autosuspend
         * it again. */
-diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/core/hcd.c
---- linux-2.6.27/drivers/usb/core/hcd.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hcd.c 2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/core/hcd.c
+--- a/drivers/usb/core/hcd.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hcd.c   Wed May 06 16:56:42 2009 +0100
 @@ -81,6 +81,10 @@
  
  /*-------------------------------------------------------------------------*/
@@ -897162,17 +897022,17 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/c
  /* host controllers we manage */
  LIST_HEAD (usb_bus_list);
  EXPORT_SYMBOL_GPL (usb_bus_list);
-@@ -102,6 +106,9 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock
+@@ -101,6 +105,9 @@
  /* used when updating an endpoint's URB list */
  static DEFINE_SPINLOCK(hcd_urb_list_lock);
++
 +/* used to protect against unlinking URBs after the device is gone */
 +static DEFINE_SPINLOCK(hcd_urb_unlink_lock);
-+
  /* wait queue for synchronous unlinks */
  DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
-@@ -1373,10 +1380,25 @@ static int unlink1(struct usb_hcd *hcd, 
+@@ -1373,10 +1380,25 @@
  int usb_hcd_unlink_urb (struct urb *urb, int status)
  {
        struct usb_hcd          *hcd;
@@ -897201,10 +897061,12 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/c
  
        if (retval == 0)
                retval = -EINPROGRESS;
-@@ -1525,6 +1547,17 @@ void usb_hcd_disable_endpoint(struct usb
+@@ -1523,6 +1545,17 @@
+       hcd = bus_to_hcd(udev->bus);
+       if (hcd->driver->endpoint_disable)
                hcd->driver->endpoint_disable(hcd, ep);
- }
++}
++
 +/* Protect against drivers that try to unlink URBs after the device
 + * is gone, by waiting until all unlinks for @udev are finished.
 + * Since we don't currently track URBs by device, simply wait until
@@ -897214,12 +897076,10 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/c
 +{
 +      spin_lock_irq(&hcd_urb_unlink_lock);
 +      spin_unlock_irq(&hcd_urb_unlink_lock);
-+}
-+
- /*-------------------------------------------------------------------------*/
+ }
  
- /* called in any context */
-@@ -1994,6 +2027,20 @@ usb_hcd_platform_shutdown(struct platfor
+ /*-------------------------------------------------------------------------*/
+@@ -1994,6 +2027,20 @@
  }
  EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown);
  
@@ -897240,10 +897100,10 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.c linux-2.6.27.19-5.1/drivers/usb/c
  /*-------------------------------------------------------------------------*/
  
  #if defined(CONFIG_USB_MON)
-diff -purN linux-2.6.27/drivers/usb/core/hcd.h linux-2.6.27.19-5.1/drivers/usb/core/hcd.h
---- linux-2.6.27/drivers/usb/core/hcd.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hcd.h 2009-03-25 16:11:19.000000000 +0000
-@@ -217,6 +217,10 @@ struct hc_driver {
+diff -r 9608d5473017 drivers/usb/core/hcd.h
+--- a/drivers/usb/core/hcd.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hcd.h   Wed May 06 16:56:42 2009 +0100
+@@ -217,6 +217,10 @@
        void    (*relinquish_port)(struct usb_hcd *, int);
                /* has a port been handed over to a companion? */
        int     (*port_handed_over)(struct usb_hcd *, int);
@@ -897254,7 +897114,7 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.h linux-2.6.27.19-5.1/drivers/usb/c
  };
  
  extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
-@@ -232,6 +236,7 @@ extern void usb_hcd_flush_endpoint(struc
+@@ -232,6 +236,7 @@
                struct usb_host_endpoint *ep);
  extern void usb_hcd_disable_endpoint(struct usb_device *udev,
                struct usb_host_endpoint *ep);
@@ -897262,7 +897122,7 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.h linux-2.6.27.19-5.1/drivers/usb/c
  extern int usb_hcd_get_frame_number(struct usb_device *udev);
  
  extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
-@@ -482,4 +487,10 @@ static inline void usbmon_urb_complete(s
+@@ -482,4 +487,10 @@
   */
  extern struct rw_semaphore ehci_cf_port_reset_rwsem;
  
@@ -897273,10 +897133,10 @@ diff -purN linux-2.6.27/drivers/usb/core/hcd.h linux-2.6.27.19-5.1/drivers/usb/c
 +extern unsigned long usb_hcds_loaded;
 +
  #endif /* __KERNEL__ */
-diff -purN linux-2.6.27/drivers/usb/core/hub.c linux-2.6.27.19-5.1/drivers/usb/core/hub.c
---- linux-2.6.27/drivers/usb/core/hub.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/hub.c 2009-03-25 16:11:19.000000000 +0000
-@@ -1349,6 +1349,7 @@ void usb_disconnect(struct usb_device **
+diff -r 9608d5473017 drivers/usb/core/hub.c
+--- a/drivers/usb/core/hub.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/hub.c   Wed May 06 16:56:42 2009 +0100
+@@ -1349,6 +1349,7 @@
         */
        dev_dbg (&udev->dev, "unregistering device\n");
        usb_disable_device(udev, 0);
@@ -897284,7 +897144,7 @@ diff -purN linux-2.6.27/drivers/usb/core/hub.c linux-2.6.27.19-5.1/drivers/usb/c
  
        usb_unlock_device(udev);
  
-@@ -3424,7 +3425,7 @@ int usb_reset_device(struct usb_device *
+@@ -3424,7 +3425,7 @@
                                                USB_INTERFACE_BOUND)
                                        rebind = 1;
                        }
@@ -897293,10 +897153,10 @@ diff -purN linux-2.6.27/drivers/usb/core/hub.c linux-2.6.27.19-5.1/drivers/usb/c
                                usb_rebind_intf(cintf);
                }
        }
-diff -purN linux-2.6.27/drivers/usb/core/inode.c linux-2.6.27.19-5.1/drivers/usb/core/inode.c
---- linux-2.6.27/drivers/usb/core/inode.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/inode.c       2009-03-25 16:11:19.000000000 +0000
-@@ -716,7 +716,6 @@ static void usbfs_remove_device(struct u
+diff -r 9608d5473017 drivers/usb/core/inode.c
+--- a/drivers/usb/core/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/inode.c Wed May 06 16:56:42 2009 +0100
+@@ -716,7 +716,6 @@
                fs_remove_file (dev->usbfs_dentry);
                dev->usbfs_dentry = NULL;
        }
@@ -897304,10 +897164,10 @@ diff -purN linux-2.6.27/drivers/usb/core/inode.c linux-2.6.27.19-5.1/drivers/usb
  }
  
  static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev)
-diff -purN linux-2.6.27/drivers/usb/core/message.c linux-2.6.27.19-5.1/drivers/usb/core/message.c
---- linux-2.6.27/drivers/usb/core/message.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/message.c     2009-03-25 16:11:19.000000000 +0000
-@@ -1091,6 +1091,7 @@ void usb_disable_device(struct usb_devic
+diff -r 9608d5473017 drivers/usb/core/message.c
+--- a/drivers/usb/core/message.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/message.c       Wed May 06 16:56:42 2009 +0100
+@@ -1091,6 +1091,7 @@
                                continue;
                        dev_dbg(&dev->dev, "unregistering interface %s\n",
                                dev_name(&interface->dev));
@@ -897315,10 +897175,10 @@ diff -purN linux-2.6.27/drivers/usb/core/message.c linux-2.6.27.19-5.1/drivers/u
                        usb_remove_sysfs_intf_files(interface);
                        device_del(&interface->dev);
                }
-diff -purN linux-2.6.27/drivers/usb/core/sysfs.c linux-2.6.27.19-5.1/drivers/usb/core/sysfs.c
---- linux-2.6.27/drivers/usb/core/sysfs.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/sysfs.c       2009-03-25 16:11:19.000000000 +0000
-@@ -816,7 +816,7 @@ int usb_create_sysfs_intf_files(struct u
+diff -r 9608d5473017 drivers/usb/core/sysfs.c
+--- a/drivers/usb/core/sysfs.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/sysfs.c Wed May 06 16:56:43 2009 +0100
+@@ -816,7 +816,7 @@
        struct usb_host_interface *alt = intf->cur_altsetting;
        int retval;
  
@@ -897327,10 +897187,10 @@ diff -purN linux-2.6.27/drivers/usb/core/sysfs.c linux-2.6.27.19-5.1/drivers/usb
                return 0;
  
        /* The interface string may be present in some altsettings
-diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/core/urb.c
---- linux-2.6.27/drivers/usb/core/urb.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/urb.c 2009-03-25 16:11:19.000000000 +0000
-@@ -465,6 +465,12 @@ EXPORT_SYMBOL_GPL(usb_submit_urb);
+diff -r 9608d5473017 drivers/usb/core/urb.c
+--- a/drivers/usb/core/urb.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/urb.c   Wed May 06 16:56:43 2009 +0100
+@@ -465,6 +465,12 @@
   * indicating that the request has been canceled (rather than any other
   * code).
   *
@@ -897343,7 +897203,7 @@ diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/c
   * This request is always asynchronous.  Success is indicated by
   * returning -EINPROGRESS, at which time the URB will probably not yet
   * have been given back to the device driver.  When it is eventually
-@@ -541,6 +547,9 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb);
+@@ -541,6 +547,9 @@
   * This routine may not be used in an interrupt context (such as a bottom
   * half or a completion handler), or when holding a spinlock, or in other
   * situations where the caller can't schedule().
@@ -897353,7 +897213,7 @@ diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/c
   */
  void usb_kill_urb(struct urb *urb)
  {
-@@ -568,6 +577,9 @@ EXPORT_SYMBOL_GPL(usb_kill_urb);
+@@ -568,6 +577,9 @@
   *
   * this allows all outstanding URBs to be killed starting
   * from the back of the queue
@@ -897363,7 +897223,7 @@ diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/c
   */
  void usb_kill_anchored_urbs(struct usb_anchor *anchor)
  {
-@@ -597,6 +609,9 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs
+@@ -597,6 +609,9 @@
   * from the back of the queue. This function is asynchronous.
   * The unlinking is just tiggered. It may happen after this
   * function has returned.
@@ -897373,10 +897233,10 @@ diff -purN linux-2.6.27/drivers/usb/core/urb.c linux-2.6.27.19-5.1/drivers/usb/c
   */
  void usb_unlink_anchored_urbs(struct usb_anchor *anchor)
  {
-diff -purN linux-2.6.27/drivers/usb/core/usb.h linux-2.6.27.19-5.1/drivers/usb/core/usb.h
---- linux-2.6.27/drivers/usb/core/usb.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/core/usb.h 2009-03-25 16:11:19.000000000 +0000
-@@ -145,7 +145,6 @@ extern struct usb_driver usbfs_driver;
+diff -r 9608d5473017 drivers/usb/core/usb.h
+--- a/drivers/usb/core/usb.h   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/core/usb.h   Wed May 06 16:56:43 2009 +0100
+@@ -145,7 +145,6 @@
  extern const struct file_operations usbfs_devices_fops;
  extern const struct file_operations usbdev_file_operations;
  extern void usbfs_conn_disc_event(void);
@@ -897384,10 +897244,10 @@ diff -purN linux-2.6.27/drivers/usb/core/usb.h linux-2.6.27.19-5.1/drivers/usb/c
  
  extern int usb_devio_init(void);
  extern void usb_devio_cleanup(void);
-diff -purN linux-2.6.27/drivers/usb/gadget/f_acm.c linux-2.6.27.19-5.1/drivers/usb/gadget/f_acm.c
---- linux-2.6.27/drivers/usb/gadget/f_acm.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/f_acm.c     2009-03-25 16:11:18.000000000 +0000
-@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *
+diff -r 9608d5473017 drivers/usb/gadget/f_acm.c
+--- a/drivers/usb/gadget/f_acm.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/f_acm.c       Wed May 06 16:56:43 2009 +0100
+@@ -463,7 +463,11 @@
        notify->wLength = cpu_to_le16(length);
        memcpy(buf, data, length);
  
@@ -897399,10 +897259,10 @@ diff -purN linux-2.6.27/drivers/usb/gadget/f_acm.c linux-2.6.27.19-5.1/drivers/u
        if (status < 0) {
                ERROR(acm->port.func.config->cdev,
                                "acm ttyGS%d can't notify serial state, %d\n",
-diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers/usb/gadget/f_rndis.c
---- linux-2.6.27/drivers/usb/gadget/f_rndis.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/f_rndis.c   2009-03-25 16:11:18.000000000 +0000
-@@ -172,7 +172,6 @@ static struct usb_interface_descriptor r
+diff -r 9608d5473017 drivers/usb/gadget/f_rndis.c
+--- a/drivers/usb/gadget/f_rndis.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/f_rndis.c     Wed May 06 16:56:43 2009 +0100
+@@ -172,7 +172,6 @@
        .bDescriptorType =      USB_DT_INTERFACE,
  
        /* .bInterfaceNumber = DYNAMIC */
@@ -897410,7 +897270,7 @@ diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers
        .bNumEndpoints =        2,
        .bInterfaceClass =      USB_CLASS_CDC_DATA,
        .bInterfaceSubClass =   0,
-@@ -303,7 +302,7 @@ static void rndis_response_available(voi
+@@ -303,7 +302,7 @@
        __le32                          *data = req->buf;
        int                             status;
  
@@ -897419,7 +897279,7 @@ diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers
                return;
  
        /* Send RNDIS RESPONSE_AVAILABLE notification; a
-@@ -652,6 +651,8 @@ rndis_bind(struct usb_configuration *c, 
+@@ -652,6 +651,8 @@
                                fs_in_desc.bEndpointAddress;
                hs_out_desc.bEndpointAddress =
                                fs_out_desc.bEndpointAddress;
@@ -897428,7 +897288,7 @@ diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers
  
                /* copy descriptors, and track endpoint copies */
                f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
-@@ -663,6 +664,8 @@ rndis_bind(struct usb_configuration *c, 
+@@ -663,6 +664,8 @@
                                f->hs_descriptors, &hs_in_desc);
                rndis->hs.out = usb_find_endpoint(eth_hs_function,
                                f->hs_descriptors, &hs_out_desc);
@@ -897437,10 +897297,10 @@ diff -purN linux-2.6.27/drivers/usb/gadget/f_rndis.c linux-2.6.27.19-5.1/drivers
        }
  
        rndis->port.open = rndis_open;
-diff -purN linux-2.6.27/drivers/usb/gadget/s3c2410_udc.c linux-2.6.27.19-5.1/drivers/usb/gadget/s3c2410_udc.c
---- linux-2.6.27/drivers/usb/gadget/s3c2410_udc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/s3c2410_udc.c       2009-03-25 16:11:18.000000000 +0000
-@@ -1651,7 +1651,7 @@ int usb_gadget_register_driver(struct us
+diff -r 9608d5473017 drivers/usb/gadget/s3c2410_udc.c
+--- a/drivers/usb/gadget/s3c2410_udc.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/s3c2410_udc.c Wed May 06 16:56:43 2009 +0100
+@@ -1651,7 +1651,7 @@
                return -EBUSY;
  
        if (!driver->bind || !driver->setup
@@ -897449,10 +897309,10 @@ diff -purN linux-2.6.27/drivers/usb/gadget/s3c2410_udc.c linux-2.6.27.19-5.1/dri
                printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n",
                        driver->bind, driver->setup, driver->speed);
                return -EINVAL;
-diff -purN linux-2.6.27/drivers/usb/gadget/u_ether.c linux-2.6.27.19-5.1/drivers/usb/gadget/u_ether.c
---- linux-2.6.27/drivers/usb/gadget/u_ether.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/gadget/u_ether.c   2009-03-25 16:11:18.000000000 +0000
-@@ -873,6 +873,13 @@ struct net_device *gether_connect(struct
+diff -r 9608d5473017 drivers/usb/gadget/u_ether.c
+--- a/drivers/usb/gadget/u_ether.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/gadget/u_ether.c     Wed May 06 16:56:43 2009 +0100
+@@ -873,6 +873,13 @@
                spin_lock(&dev->lock);
                dev->port_usb = link;
                link->ioport = dev;
@@ -897466,10 +897326,10 @@ diff -purN linux-2.6.27/drivers/usb/gadget/u_ether.c linux-2.6.27.19-5.1/drivers
                spin_unlock(&dev->lock);
  
                netif_carrier_on(dev->net);
-diff -purN linux-2.6.27/drivers/usb/host/Kconfig linux-2.6.27.19-5.1/drivers/usb/host/Kconfig
---- linux-2.6.27/drivers/usb/host/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/Kconfig       2009-03-25 16:11:19.000000000 +0000
-@@ -110,29 +110,18 @@ config USB_ISP116X_HCD
+diff -r 9608d5473017 drivers/usb/host/Kconfig
+--- a/drivers/usb/host/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/Kconfig Wed May 06 16:56:43 2009 +0100
+@@ -110,29 +110,18 @@
  
  config USB_ISP1760_HCD
        tristate "ISP 1760 HCD support"
@@ -897505,10 +897365,10 @@ diff -purN linux-2.6.27/drivers/usb/host/Kconfig linux-2.6.27.19-5.1/drivers/usb
  
  config USB_OHCI_HCD
        tristate "OHCI HCD support"
-diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-hcd.c
---- linux-2.6.27/drivers/usb/host/ehci-hcd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-hcd.c    2009-03-25 16:11:19.000000000 +0000
-@@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd
+diff -r 9608d5473017 drivers/usb/host/ehci-hcd.c
+--- a/drivers/usb/host/ehci-hcd.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-hcd.c      Wed May 06 16:56:43 2009 +0100
+@@ -643,7 +643,7 @@
  static irqreturn_t ehci_irq (struct usb_hcd *hcd)
  {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
@@ -897517,7 +897377,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
        int                     bh;
  
        spin_lock (&ehci->lock);
-@@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -656,14 +656,14 @@
                goto dead;
        }
  
@@ -897535,7 +897395,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
        cmd = ehci_readl(ehci, &ehci->regs->command);
        bh = 0;
  
-@@ -731,19 +731,18 @@ static irqreturn_t ehci_irq (struct usb_
+@@ -731,19 +731,18 @@
  
        /* PCI errors [4.15.2.4] */
        if (unlikely ((status & STS_FATAL) != 0)) {
@@ -897563,7 +897423,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
        }
  
        if (bh)
-@@ -992,6 +991,48 @@ static int ehci_get_frame (struct usb_hc
+@@ -992,6 +991,48 @@
                ehci->periodic_size;
  }
  
@@ -897612,7 +897472,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
  /*-------------------------------------------------------------------------*/
  
  #define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
-@@ -1049,6 +1090,12 @@ static int __init ehci_hcd_init(void)
+@@ -1049,6 +1090,12 @@
  {
        int retval = 0;
  
@@ -897625,7 +897485,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
        pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
                 hcd_name,
                 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
-@@ -1056,8 +1103,10 @@ static int __init ehci_hcd_init(void)
+@@ -1056,8 +1103,10 @@
  
  #ifdef DEBUG
        ehci_debug_root = debugfs_create_dir("ehci", NULL);
@@ -897638,7 +897498,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
  #endif
  
  #ifdef PLATFORM_DRIVER
-@@ -1104,7 +1153,9 @@ clean0:
+@@ -1104,7 +1153,9 @@
  #ifdef DEBUG
        debugfs_remove(ehci_debug_root);
        ehci_debug_root = NULL;
@@ -897648,7 +897508,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
        return retval;
  }
  module_init(ehci_hcd_init);
-@@ -1126,6 +1177,7 @@ static void __exit ehci_hcd_cleanup(void
+@@ -1126,6 +1177,7 @@
  #ifdef DEBUG
        debugfs_remove(ehci_debug_root);
  #endif
@@ -897656,21 +897516,21 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-hcd.c linux-2.6.27.19-5.1/drivers/
  }
  module_exit(ehci_hcd_cleanup);
  
-diff -purN linux-2.6.27/drivers/usb/host/ehci-pci.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-pci.c
---- linux-2.6.27/drivers/usb/host/ehci-pci.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-pci.c    2009-03-25 16:11:19.000000000 +0000
-@@ -22,6 +22,10 @@
- #error "This file is PCI bus glue.  CONFIG_PCI must be defined."
- #endif
+diff -r 9608d5473017 drivers/usb/host/ehci-pci.c
+--- a/drivers/usb/host/ehci-pci.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-pci.c      Wed May 06 16:56:43 2009 +0100
+@@ -20,6 +20,10 @@
  
-+#ifdef CONFIG_KDB_USB
-+#include <linux/kdb.h>
+ #ifndef CONFIG_PCI
+ #error "This file is PCI bus glue.  CONFIG_PCI must be defined."
 +#endif
 +
- /*-------------------------------------------------------------------------*/
++#ifdef CONFIG_KDB_USB
++#include <linux/kdb.h>
+ #endif
  
- /* called after powerup, by probe or system-pm "wakeup" */
-@@ -66,6 +70,8 @@ static int ehci_pci_setup(struct usb_hcd
+ /*-------------------------------------------------------------------------*/
+@@ -66,6 +70,8 @@
  {
        struct ehci_hcd         *ehci = hcd_to_ehci(hcd);
        struct pci_dev          *pdev = to_pci_dev(hcd->self.controller);
@@ -897679,10 +897539,12 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-pci.c linux-2.6.27.19-5.1/drivers/
        u32                     temp;
        int                     retval;
  
-@@ -166,6 +172,28 @@ static int ehci_pci_setup(struct usb_hcd
+@@ -164,6 +170,28 @@
+                       if (tmp & 0x20)
+                               break;
                        pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
-               }
-               break;
++              }
++              break;
 +      case PCI_VENDOR_ID_ATI:
 +              /* SB600 and old version of SB700 have a bug in EHCI controller,
 +               * which causes usb devices lose response in some cases.
@@ -897703,12 +897565,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-pci.c linux-2.6.27.19-5.1/drivers/
 +                              pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
 +                      }
 +                      pci_dev_put(p_smbus);
-+              }
-+              break;
+               }
+               break;
        }
-       ehci_reset(ehci);
-@@ -380,6 +408,10 @@ static const struct hc_driver ehci_pci_h
+@@ -380,6 +408,10 @@
        .bus_resume =           ehci_bus_resume,
        .relinquish_port =      ehci_relinquish_port,
        .port_handed_over =     ehci_port_handed_over,
@@ -897719,10 +897579,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-pci.c linux-2.6.27.19-5.1/drivers/
  };
  
  /*-------------------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/usb/host/ehci-ps3.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-ps3.c
---- linux-2.6.27/drivers/usb/host/ehci-ps3.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-ps3.c    2009-03-25 16:11:19.000000000 +0000
-@@ -205,6 +205,7 @@ static int ps3_ehci_remove(struct ps3_sy
+diff -r 9608d5473017 drivers/usb/host/ehci-ps3.c
+--- a/drivers/usb/host/ehci-ps3.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-ps3.c      Wed May 06 16:56:43 2009 +0100
+@@ -205,6 +205,7 @@
  
        tmp = hcd->irq;
  
@@ -897730,13 +897590,14 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-ps3.c linux-2.6.27.19-5.1/drivers/
        usb_remove_hcd(hcd);
  
        ps3_system_bus_set_driver_data(dev, NULL);
-diff -purN linux-2.6.27/drivers/usb/host/ehci-q.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-q.c
---- linux-2.6.27/drivers/usb/host/ehci-q.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-q.c      2009-03-25 16:11:19.000000000 +0000
-@@ -468,6 +468,228 @@ halt:
+diff -r 9608d5473017 drivers/usb/host/ehci-q.c
+--- a/drivers/usb/host/ehci-q.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-q.c        Wed May 06 16:56:43 2009 +0100
+@@ -467,6 +467,228 @@
        return count;
  }
++
 +#ifdef CONFIG_KDB_USB
 +/*
 + * This routine is basically a copy of qh_completions() for use by KDB.
@@ -897958,14 +897819,13 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-q.c linux-2.6.27.19-5.1/drivers/us
 +}
 +
 +#endif /* CONFIG_KDB_USB */
-+
  /*-------------------------------------------------------------------------*/
  
- // high bandwidth multiplier, as encoded in highspeed endpoint descriptors
-diff -purN linux-2.6.27/drivers/usb/host/ehci-sched.c linux-2.6.27.19-5.1/drivers/usb/host/ehci-sched.c
---- linux-2.6.27/drivers/usb/host/ehci-sched.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci-sched.c  2009-03-25 16:11:19.000000000 +0000
-@@ -918,7 +918,7 @@ iso_stream_init (
+diff -r 9608d5473017 drivers/usb/host/ehci-sched.c
+--- a/drivers/usb/host/ehci-sched.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci-sched.c    Wed May 06 16:56:43 2009 +0100
+@@ -918,7 +918,7 @@
                 */
                stream->usecs = HS_USECS_ISO (maxp);
                bandwidth = stream->usecs * 8;
@@ -897974,7 +897834,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-sched.c linux-2.6.27.19-5.1/driver
  
        } else {
                u32             addr;
-@@ -951,7 +951,7 @@ iso_stream_init (
+@@ -951,7 +951,7 @@
                } else
                        stream->raw_mask = smask_out [hs_transfers - 1];
                bandwidth = stream->usecs + stream->c_usecs;
@@ -897983,10 +897843,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci-sched.c linux-2.6.27.19-5.1/driver
  
                /* stream->splits gets created from raw_mask later */
                stream->address = cpu_to_hc32(ehci, addr);
-diff -purN linux-2.6.27/drivers/usb/host/ehci.h linux-2.6.27.19-5.1/drivers/usb/host/ehci.h
---- linux-2.6.27/drivers/usb/host/ehci.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ehci.h        2009-03-25 16:11:19.000000000 +0000
-@@ -210,143 +210,7 @@ timer_action (struct ehci_hcd *ehci, enu
+diff -r 9608d5473017 drivers/usb/host/ehci.h
+--- a/drivers/usb/host/ehci.h  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ehci.h  Wed May 06 16:56:43 2009 +0100
+@@ -210,143 +210,7 @@
  
  /*-------------------------------------------------------------------------*/
  
@@ -898131,9 +897991,9 @@ diff -purN linux-2.6.27/drivers/usb/host/ehci.h linux-2.6.27.19-5.1/drivers/usb/
  
  /*-------------------------------------------------------------------------*/
  
-diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/drivers/usb/host/isp1760-if.c
---- linux-2.6.27/drivers/usb/host/isp1760-if.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/isp1760-if.c  2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/host/isp1760-if.c
+--- a/drivers/usb/host/isp1760-if.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/isp1760-if.c    Wed May 06 16:56:43 2009 +0100
 @@ -14,16 +14,16 @@
  #include "../core/hcd.h"
  #include "isp1760-hcd.h"
@@ -898154,7 +898014,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
  static int of_isp1760_probe(struct of_device *dev,
                const struct of_device_id *match)
  {
-@@ -121,6 +121,7 @@ static struct of_device_id of_isp1760_ma
+@@ -121,6 +121,7 @@
  MODULE_DEVICE_TABLE(of, of_isp1760_match);
  
  static struct of_platform_driver isp1760_of_driver = {
@@ -898162,7 +898022,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
        .name           = "nxp-isp1760",
        .match_table    = of_isp1760_match,
        .probe          = of_isp1760_probe,
-@@ -128,24 +129,24 @@ static struct of_platform_driver isp1760
+@@ -128,24 +129,24 @@
  };
  #endif
  
@@ -898197,7 +898057,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
  
        if (usb_disabled())
                return -ENODEV;
-@@ -168,26 +169,30 @@ static int __devinit isp1761_pci_probe(s
+@@ -168,26 +169,30 @@
        iobase = ioremap_nocache(nxp_pci_io_base, iolength);
        if (!iobase) {
                printk(KERN_ERR "ioremap #1\n");
@@ -898242,7 +898102,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
        }
  
        /* bad pci latencies can contribute to overruns */
-@@ -210,38 +215,54 @@ static int __devinit isp1761_pci_probe(s
+@@ -210,38 +215,54 @@
                 * */
                writel(0xface, chip_addr + HC_SCRATCH_REG);
                udelay(100);
@@ -898250,9 +898110,9 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
 +              reg_data = readl(chip_addr + HC_SCRATCH_REG) & 0x0000ffff;
                retry_count--;
        }
-+      iounmap(chip_addr);
 +
++      iounmap(chip_addr);
        /* Host Controller presence is detected by writing to scratch register
         * and reading back and checking the contents are same or not
         */
@@ -898309,7 +898169,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
  static void isp1761_pci_remove(struct pci_dev *dev)
  {
        struct usb_hcd *hcd;
-@@ -254,12 +275,6 @@ static void isp1761_pci_remove(struct pc
+@@ -254,12 +275,6 @@
        usb_put_hcd(hcd);
  
        pci_disable_device(dev);
@@ -898322,7 +898182,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
  }
  
  static void isp1761_pci_shutdown(struct pci_dev *dev)
-@@ -267,12 +282,16 @@ static void isp1761_pci_shutdown(struct 
+@@ -267,12 +282,16 @@
        printk(KERN_ERR "ips1761_pci_shutdown\n");
  }
  
@@ -898345,7 +898205,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
  };
  MODULE_DEVICE_TABLE(pci, isp1760_plx);
  
-@@ -287,28 +306,28 @@ static struct pci_driver isp1761_pci_dri
+@@ -287,28 +306,28 @@
  
  static int __init isp1760_init(void)
  {
@@ -898379,7 +898239,7 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
        of_unregister_platform_driver(&isp1760_of_driver);
  #endif
        deinit_kmem_cache();
-@@ -318,10 +337,10 @@ module_init(isp1760_init);
+@@ -318,10 +337,10 @@
  
  static void __exit isp1760_exit(void)
  {
@@ -898392,10 +898252,10 @@ diff -purN linux-2.6.27/drivers/usb/host/isp1760-if.c linux-2.6.27.19-5.1/driver
        pci_unregister_driver(&isp1761_pci_driver);
  #endif
        deinit_kmem_cache();
-diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-hcd.c
---- linux-2.6.27/drivers/usb/host/ohci-hcd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-hcd.c    2009-03-25 16:11:19.000000000 +0000
-@@ -984,6 +984,73 @@ static int ohci_restart (struct ohci_hcd
+diff -r 9608d5473017 drivers/usb/host/ohci-hcd.c
+--- a/drivers/usb/host/ohci-hcd.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-hcd.c      Wed May 06 16:56:43 2009 +0100
+@@ -984,6 +984,73 @@
  
  /*-------------------------------------------------------------------------*/
  
@@ -898469,7 +898329,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/
  #define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC
  
  MODULE_AUTHOR (DRIVER_AUTHOR);
-@@ -1098,6 +1165,7 @@ static int __init ohci_hcd_mod_init(void
+@@ -1098,6 +1165,7 @@
        printk (KERN_DEBUG "%s: " DRIVER_INFO "\n", hcd_name);
        pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
                sizeof (struct ed), sizeof (struct td));
@@ -898477,7 +898337,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/
  
  #ifdef DEBUG
        ohci_debug_root = debugfs_create_dir("ohci", NULL);
-@@ -1184,6 +1252,7 @@ static int __init ohci_hcd_mod_init(void
+@@ -1184,6 +1252,7 @@
   error_debug:
  #endif
  
@@ -898485,7 +898345,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/
        return retval;
  }
  module_init(ohci_hcd_mod_init);
-@@ -1214,6 +1283,7 @@ static void __exit ohci_hcd_mod_exit(voi
+@@ -1214,6 +1283,7 @@
  #ifdef DEBUG
        debugfs_remove(ohci_debug_root);
  #endif
@@ -898493,10 +898353,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hcd.c linux-2.6.27.19-5.1/drivers/
  }
  module_exit(ohci_hcd_mod_exit);
  
-diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-hub.c
---- linux-2.6.27/drivers/usb/host/ohci-hub.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-hub.c    2009-03-25 16:11:19.000000000 +0000
-@@ -359,21 +359,24 @@ static void ohci_finish_controller_resum
+diff -r 9608d5473017 drivers/usb/host/ohci-hub.c
+--- a/drivers/usb/host/ohci-hub.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-hub.c      Wed May 06 16:56:44 2009 +0100
+@@ -359,21 +359,24 @@
  
  /* Carry out polling-, autostop-, and autoresume-related state changes */
  static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
@@ -898508,15 +898368,15 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
 +      int     rhsc_enable;
  
 -      rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
--      switch (ohci->hc_control & OHCI_CTRL_HCFS) {
 +      /* Some broken controllers never turn off RHCS in the interrupt
 +       * status register.  For their sake we won't re-enable RHSC
 +       * interrupts if the interrupt bit is already active.
 +       */
 +      rhsc_enable = ohci_readl(ohci, &ohci->regs->intrenable) &
 +                      OHCI_INTR_RHSC;
-+      switch (ohci->hc_control & OHCI_CTRL_HCFS) {
++
+       switch (ohci->hc_control & OHCI_CTRL_HCFS) {
+-
        case OHCI_USB_OPER:
 -              /* If no status changes are pending, enable status-change
 -               * interrupts.
@@ -898531,7 +898391,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
                }
  
                /* Keep on polling until we know a device is connected
-@@ -383,7 +386,7 @@ static int ohci_root_hub_state_changes(s
+@@ -383,7 +386,7 @@
                        if (any_connected ||
                                        !device_may_wakeup(&ohci_to_hcd(ohci)
                                                ->self.root_hub->dev)) {
@@ -898540,7 +898400,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
                                        poll_rh = 0;
                        } else {
                                ohci->autostop = 1;
-@@ -396,34 +399,45 @@ static int ohci_root_hub_state_changes(s
+@@ -396,34 +399,45 @@
                                ohci->autostop = 0;
                                ohci->next_statechange = jiffies +
                                                STATECHANGE_DELAY;
@@ -898567,28 +898427,28 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
                                ohci_rh_resume(ohci);
                        else
                                usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
--              } else {
--                      if (!rhsc && (ohci->autostop ||
--                                      ohci_to_hcd(ohci)->self.root_hub->
--                                              do_remote_wakeup))
--                              ohci_writel(ohci, OHCI_INTR_RHSC,
--                                              &ohci->regs->intrenable);
--                      /* everything is idle, no need for polling */
++
 +              /* If remote wakeup is disabled, stop polling */
 +              } else if (!ohci->autostop &&
 +                              !ohci_to_hcd(ohci)->self.root_hub->
 +                                      do_remote_wakeup) {
-                       poll_rh = 0;
++                      poll_rh = 0;
 +
-+              } else {
+               } else {
+-                      if (!rhsc && (ohci->autostop ||
+-                                      ohci_to_hcd(ohci)->self.root_hub->
+-                                              do_remote_wakeup))
+-                              ohci_writel(ohci, OHCI_INTR_RHSC,
 +                      /* If no status changes are pending,
 +                       * enable RHSC interrupts
 +                       */
 +                      if (!rhsc_enable && !rhsc_status) {
 +                              rhsc_enable = OHCI_INTR_RHSC;
 +                              ohci_writel(ohci, rhsc_enable,
-+                                              &ohci->regs->intrenable);
+                                               &ohci->regs->intrenable);
+-
+-                      /* everything is idle, no need for polling */
+-                      poll_rh = 0;
 +                      }
 +                      /* Keep polling until RHSC is enabled */
 +                      if (rhsc_enable)
@@ -898596,7 +898456,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
                }
                break;
        }
-@@ -441,18 +455,22 @@ static inline int ohci_rh_resume(struct 
+@@ -441,18 +455,22 @@
   * autostop isn't used when CONFIG_PM is turned off.
   */
  static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
@@ -898626,7 +898486,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
  }
  
  #endif        /* CONFIG_PM */
-@@ -467,6 +485,7 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -467,6 +485,7 @@
        struct ohci_hcd *ohci = hcd_to_ohci (hcd);
        int             i, changed = 0, length = 1;
        int             any_connected = 0;
@@ -898634,7 +898494,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
        unsigned long   flags;
  
        spin_lock_irqsave (&ohci->lock, flags);
-@@ -492,12 +511,10 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -492,12 +511,10 @@
                length++;
        }
  
@@ -898651,7 +898511,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
  
        /* look at each port */
        for (i = 0; i < ohci->num_ports; i++) {
-@@ -517,7 +534,7 @@ ohci_hub_status_data (struct usb_hcd *hc
+@@ -517,7 +534,7 @@
        }
  
        hcd->poll_rh = ohci_root_hub_state_changes(ohci, changed,
@@ -898660,21 +898520,21 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-hub.c linux-2.6.27.19-5.1/drivers/
  
  done:
        spin_unlock_irqrestore (&ohci->lock, flags);
-diff -purN linux-2.6.27/drivers/usb/host/ohci-pci.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-pci.c
---- linux-2.6.27/drivers/usb/host/ohci-pci.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-pci.c    2009-03-25 16:11:19.000000000 +0000
-@@ -21,6 +21,10 @@
+diff -r 9608d5473017 drivers/usb/host/ohci-pci.c
+--- a/drivers/usb/host/ohci-pci.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-pci.c      Wed May 06 16:56:44 2009 +0100
+@@ -20,6 +20,10 @@
  #include <linux/pci.h>
  #include <linux/io.h>
++
 +#ifdef CONFIG_KDB_USB
 +#include <linux/kdb.h>
 +#endif
-+
  
  /* constants used to work around PM-related transfer
-  * glitches in some AMD 700 series southbridges
-@@ -367,6 +371,7 @@ static int __devinit ohci_pci_start (str
+@@ -367,6 +371,7 @@
                ohci_err (ohci, "can't start\n");
                ohci_stop (hcd);
        }
@@ -898682,7 +898542,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-pci.c linux-2.6.27.19-5.1/drivers/
        return ret;
  }
  
-@@ -464,6 +469,9 @@ static const struct hc_driver ohci_pci_h
+@@ -464,6 +469,9 @@
        .bus_resume =           ohci_bus_resume,
  #endif
        .start_port_reset =     ohci_start_port_reset,
@@ -898692,10 +898552,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-pci.c linux-2.6.27.19-5.1/drivers/
  };
  
  /*-------------------------------------------------------------------------*/
-diff -purN linux-2.6.27/drivers/usb/host/ohci-ps3.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-ps3.c
---- linux-2.6.27/drivers/usb/host/ohci-ps3.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-ps3.c    2009-03-25 16:11:19.000000000 +0000
-@@ -192,7 +192,7 @@ fail_start:
+diff -r 9608d5473017 drivers/usb/host/ohci-ps3.c
+--- a/drivers/usb/host/ohci-ps3.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-ps3.c      Wed May 06 16:56:44 2009 +0100
+@@ -192,7 +192,7 @@
        return result;
  }
  
@@ -898704,7 +898564,7 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-ps3.c linux-2.6.27.19-5.1/drivers/
  {
        unsigned int tmp;
        struct usb_hcd *hcd =
-@@ -205,6 +205,7 @@ static int ps3_ohci_remove (struct ps3_s
+@@ -205,6 +205,7 @@
  
        tmp = hcd->irq;
  
@@ -898712,10 +898572,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-ps3.c linux-2.6.27.19-5.1/drivers/
        usb_remove_hcd(hcd);
  
        ps3_system_bus_set_driver_data(dev, NULL);
-diff -purN linux-2.6.27/drivers/usb/host/ohci-q.c linux-2.6.27.19-5.1/drivers/usb/host/ohci-q.c
---- linux-2.6.27/drivers/usb/host/ohci-q.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/ohci-q.c      2009-03-25 16:11:19.000000000 +0000
-@@ -1127,3 +1127,65 @@ dl_done_list (struct ohci_hcd *ohci)
+diff -r 9608d5473017 drivers/usb/host/ohci-q.c
+--- a/drivers/usb/host/ohci-q.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/ohci-q.c        Wed May 06 16:56:44 2009 +0100
+@@ -1127,3 +1127,65 @@
                td = td_next;
        }
  }
@@ -898781,10 +898641,10 @@ diff -purN linux-2.6.27/drivers/usb/host/ohci-q.c linux-2.6.27.19-5.1/drivers/us
 +}
 +
 +#endif /* CONFIG_KDB_USB */
-diff -purN linux-2.6.27/drivers/usb/host/uhci-hcd.c linux-2.6.27.19-5.1/drivers/usb/host/uhci-hcd.c
---- linux-2.6.27/drivers/usb/host/uhci-hcd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/host/uhci-hcd.c    2009-03-25 16:11:19.000000000 +0000
-@@ -953,6 +953,7 @@ static int __init uhci_hcd_init(void)
+diff -r 9608d5473017 drivers/usb/host/uhci-hcd.c
+--- a/drivers/usb/host/uhci-hcd.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/host/uhci-hcd.c      Wed May 06 16:56:44 2009 +0100
+@@ -953,6 +953,7 @@
  
        printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
                        ignore_oc ? ", overcurrent ignored" : "");
@@ -898792,7 +898652,7 @@ diff -purN linux-2.6.27/drivers/usb/host/uhci-hcd.c linux-2.6.27.19-5.1/drivers/
  
        if (usb_disabled())
                return -ENODEV;
-@@ -988,6 +989,7 @@ debug_failed:
+@@ -988,6 +989,7 @@
  
  errbuf_failed:
  
@@ -898800,7 +898660,7 @@ diff -purN linux-2.6.27/drivers/usb/host/uhci-hcd.c linux-2.6.27.19-5.1/drivers/
        return retval;
  }
  
-@@ -997,6 +999,7 @@ static void __exit uhci_hcd_cleanup(void
+@@ -997,6 +999,7 @@
        kmem_cache_destroy(uhci_up_cachep);
        debugfs_remove(uhci_debugfs_root);
        kfree(errbuf);
@@ -898808,10 +898668,10 @@ diff -purN linux-2.6.27/drivers/usb/host/uhci-hcd.c linux-2.6.27.19-5.1/drivers/
  }
  
  module_init(uhci_hcd_init);
-diff -purN linux-2.6.27/drivers/usb/misc/emi26.c linux-2.6.27.19-5.1/drivers/usb/misc/emi26.c
---- linux-2.6.27/drivers/usb/misc/emi26.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/misc/emi26.c       2009-03-25 16:11:19.000000000 +0000
-@@ -157,7 +157,7 @@ static int emi26_load_firmware (struct u
+diff -r 9608d5473017 drivers/usb/misc/emi26.c
+--- a/drivers/usb/misc/emi26.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/misc/emi26.c Wed May 06 16:56:44 2009 +0100
+@@ -157,7 +157,7 @@
                        err("%s - error loading firmware: error = %d", __func__, err);
                        goto wraperr;
                }
@@ -898820,9 +898680,9 @@ diff -purN linux-2.6.27/drivers/usb/misc/emi26.c linux-2.6.27.19-5.1/drivers/usb
  
        /* Assert reset (stop the CPU in the EMI) */
        err = emi26_set_reset(dev,1);
-diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/usb/mon/mon_bin.c
---- linux-2.6.27/drivers/usb/mon/mon_bin.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/mon/mon_bin.c      2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/mon/mon_bin.c
+--- a/drivers/usb/mon/mon_bin.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/mon/mon_bin.c        Wed May 06 16:56:44 2009 +0100
 @@ -37,6 +37,7 @@
  #define MON_IOCX_GET   _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get)
  #define MON_IOCX_MFETCH _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch)
@@ -898831,7 +898691,7 @@ diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/us
  #ifdef CONFIG_COMPAT
  #define MON_IOCX_GET32 _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get32)
  #define MON_IOCX_MFETCH32 _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch32)
-@@ -687,7 +688,10 @@ static ssize_t mon_bin_read(struct file 
+@@ -687,7 +688,10 @@
        }
  
        if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
@@ -898843,7 +898703,7 @@ diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/us
                offset = rp->b_out + PKT_SIZE;
                offset += rp->b_read - sizeof(struct mon_bin_hdr);
                if (offset >= rp->b_size)
-@@ -918,21 +922,6 @@ static int mon_bin_ioctl(struct inode *i
+@@ -918,21 +922,6 @@
                }
                break;
  
@@ -898865,38 +898725,48 @@ diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/us
        case MON_IOCX_MFETCH:
                {
                struct mon_bin_mfetch mfetch;
-@@ -959,7 +948,57 @@ static int mon_bin_ioctl(struct inode *i
+@@ -958,35 +947,6 @@
+               ret = 0;
                }
                break;
+-
+-#ifdef CONFIG_COMPAT
+-      case MON_IOCX_MFETCH32:
+-              {
+-              struct mon_bin_mfetch32 mfetch;
+-              struct mon_bin_mfetch32 __user *uptr;
+-
+-              uptr = (struct mon_bin_mfetch32 __user *) compat_ptr(arg);
+-
+-              if (copy_from_user(&mfetch, uptr, sizeof(mfetch)))
+-                      return -EFAULT;
+-
+-              if (mfetch.nflush32) {
+-                      ret = mon_bin_flush(rp, mfetch.nflush32);
+-                      if (ret < 0)
+-                              return ret;
+-                      if (put_user(ret, &uptr->nflush32))
+-                              return -EFAULT;
+-              }
+-              ret = mon_bin_fetch(file, rp, compat_ptr(mfetch.offvec32),
+-                  mfetch.nfetch32);
+-              if (ret < 0)
+-                      return ret;
+-              if (put_user(ret, &uptr->nfetch32))
+-                      return -EFAULT;
+-              ret = 0;
+-              }
+-              break;
+-#endif
  
-+      case MON_IOCG_STATS: {
-+              struct mon_bin_stats __user *sp;
-+              unsigned int nevents;
-+              unsigned int ndropped;
-+
-+              spin_lock_irqsave(&rp->b_lock, flags);
-+              ndropped = rp->cnt_lost;
-+              rp->cnt_lost = 0;
-+              spin_unlock_irqrestore(&rp->b_lock, flags);
-+              nevents = mon_bin_queued(rp);
-+
-+              sp = (struct mon_bin_stats __user *)arg;
-+              if (put_user(rp->cnt_lost, &sp->dropped))
-+                      return -EFAULT;
-+              if (put_user(nevents, &sp->queued))
-+                      return -EFAULT;
-+
-+              }
-+              break;
-+
-+      default:
-+              return -ENOTTY;
-+      }
-+
-+      return ret;
-+}
+       case MON_IOCG_STATS: {
+               struct mon_bin_stats __user *sp;
+@@ -1014,6 +974,73 @@
+       return ret;
+ }
 +
- #ifdef CONFIG_COMPAT
++#ifdef CONFIG_COMPAT
 +static long mon_bin_compat_ioctl(struct file *file,
 +    unsigned int cmd, unsigned long arg)
 +{
@@ -898920,60 +898790,52 @@ diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/us
 +              }
 +              return 0;
 +
-       case MON_IOCX_MFETCH32:
-               {
-               struct mon_bin_mfetch32 mfetch;
-@@ -983,37 +1022,25 @@ static int mon_bin_ioctl(struct inode *i
-                       return ret;
-               if (put_user(ret, &uptr->nfetch32))
-                       return -EFAULT;
--              ret = 0;
-               }
--              break;
--#endif
--
--      case MON_IOCG_STATS: {
--              struct mon_bin_stats __user *sp;
--              unsigned int nevents;
--              unsigned int ndropped;
--
--              spin_lock_irqsave(&rp->b_lock, flags);
--              ndropped = rp->cnt_lost;
--              rp->cnt_lost = 0;
--              spin_unlock_irqrestore(&rp->b_lock, flags);
--              nevents = mon_bin_queued(rp);
++      case MON_IOCX_MFETCH32:
++              {
++              struct mon_bin_mfetch32 mfetch;
++              struct mon_bin_mfetch32 __user *uptr;
++
++              uptr = (struct mon_bin_mfetch32 __user *) compat_ptr(arg);
++
++              if (copy_from_user(&mfetch, uptr, sizeof(mfetch)))
++                      return -EFAULT;
++
++              if (mfetch.nflush32) {
++                      ret = mon_bin_flush(rp, mfetch.nflush32);
++                      if (ret < 0)
++                              return ret;
++                      if (put_user(ret, &uptr->nflush32))
++                              return -EFAULT;
++              }
++              ret = mon_bin_fetch(file, rp, compat_ptr(mfetch.offvec32),
++                  mfetch.nfetch32);
++              if (ret < 0)
++                      return ret;
++              if (put_user(ret, &uptr->nfetch32))
++                      return -EFAULT;
++              }
 +              return 0;
--              sp = (struct mon_bin_stats __user *)arg;
--              if (put_user(rp->cnt_lost, &sp->dropped))
--                      return -EFAULT;
--              if (put_user(nevents, &sp->queued))
--                      return -EFAULT;
++
 +      case MON_IOCG_STATS:
 +              return mon_bin_ioctl(NULL, file, cmd,
 +                                          (unsigned long) compat_ptr(arg));
--              }
--              break;
++
 +      case MON_IOCQ_URB_LEN:
 +      case MON_IOCQ_RING_SIZE:
 +      case MON_IOCT_RING_SIZE:
 +      case MON_IOCH_MFLUSH:
 +              return mon_bin_ioctl(NULL, file, cmd, arg);
-       default:
--              return -ENOTTY;
++
++      default:
 +              ;
-       }
--
--      return ret;
++      }
 +      return -ENOTTY;
- }
++}
 +#endif /* CONFIG_COMPAT */
  
  static unsigned int
  mon_bin_poll(struct file *file, struct poll_table_struct *wait)
-@@ -1091,6 +1118,9 @@ static const struct file_operations mon_
+@@ -1091,6 +1118,9 @@
        /* .write =     mon_text_write, */
        .poll =         mon_bin_poll,
        .ioctl =        mon_bin_ioctl,
@@ -898983,10 +898845,10 @@ diff -purN linux-2.6.27/drivers/usb/mon/mon_bin.c linux-2.6.27.19-5.1/drivers/us
        .release =      mon_bin_release,
        .mmap =         mon_bin_mmap,
  };
-diff -purN linux-2.6.27/drivers/usb/musb/Kconfig linux-2.6.27.19-5.1/drivers/usb/musb/Kconfig
---- linux-2.6.27/drivers/usb/musb/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/Kconfig       2009-03-25 16:11:19.000000000 +0000
-@@ -33,10 +33,6 @@ config USB_MUSB_SOC
+diff -r 9608d5473017 drivers/usb/musb/Kconfig
+--- a/drivers/usb/musb/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/Kconfig Wed May 06 16:56:44 2009 +0100
+@@ -33,10 +33,6 @@
        default y if ARCH_DAVINCI
        default y if ARCH_OMAP2430
        default y if ARCH_OMAP34XX
@@ -898997,10 +898859,10 @@ diff -purN linux-2.6.27/drivers/usb/musb/Kconfig linux-2.6.27.19-5.1/drivers/usb
  
  comment "DaVinci 644x USB support"
        depends on USB_MUSB_HDRC && ARCH_DAVINCI
-diff -purN linux-2.6.27/drivers/usb/musb/cppi_dma.h linux-2.6.27.19-5.1/drivers/usb/musb/cppi_dma.h
---- linux-2.6.27/drivers/usb/musb/cppi_dma.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/cppi_dma.h    2009-03-25 16:11:19.000000000 +0000
-@@ -119,8 +119,8 @@ struct cppi {
+diff -r 9608d5473017 drivers/usb/musb/cppi_dma.h
+--- a/drivers/usb/musb/cppi_dma.h      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/cppi_dma.h      Wed May 06 16:56:44 2009 +0100
+@@ -119,8 +119,8 @@
        void __iomem                    *mregs;         /* Mentor regs */
        void __iomem                    *tibase;        /* TI/CPPI regs */
  
@@ -899011,9 +898873,9 @@ diff -purN linux-2.6.27/drivers/usb/musb/cppi_dma.h linux-2.6.27.19-5.1/drivers/
  
        struct dma_pool                 *pool;
  
-diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/usb/musb/davinci.c
---- linux-2.6.27/drivers/usb/musb/davinci.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/davinci.c     2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/musb/davinci.c
+--- a/drivers/usb/musb/davinci.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/davinci.c       Wed May 06 16:56:44 2009 +0100
 @@ -30,6 +30,7 @@
  #include <linux/delay.h>
  #include <linux/clk.h>
@@ -899031,7 +898893,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/u
  #endif
  
  #include "davinci.h"
-@@ -138,7 +139,6 @@ static int vbus_state = -1;
+@@ -138,7 +139,6 @@
  /* VBUS SWITCHING IS BOARD-SPECIFIC */
  
  #ifdef CONFIG_MACH_DAVINCI_EVM
@@ -899039,7 +898901,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/u
  
  /* I2C operations are always synchronous, and require a task context.
   * With unloaded systems, using the shared workqueue seems to suffice
-@@ -146,12 +146,11 @@ static int vbus_state = -1;
+@@ -146,12 +146,11 @@
   */
  static void evm_deferred_drvvbus(struct work_struct *ignored)
  {
@@ -899053,7 +898915,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/u
  #endif        /* EVM */
  
  static void davinci_source_power(struct musb *musb, int is_on, int immediate)
-@@ -165,21 +164,10 @@ static void davinci_source_power(struct 
+@@ -165,21 +164,10 @@
  
  #ifdef CONFIG_MACH_DAVINCI_EVM
        if (machine_is_davinci_evm()) {
@@ -899076,9 +898938,9 @@ diff -purN linux-2.6.27/drivers/usb/musb/davinci.c linux-2.6.27.19-5.1/drivers/u
        }
  #endif
        if (immediate)
-diff -purN linux-2.6.27/drivers/usb/musb/musb_core.c linux-2.6.27.19-5.1/drivers/usb/musb/musb_core.c
---- linux-2.6.27/drivers/usb/musb/musb_core.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/musb_core.c   2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/musb/musb_core.c
+--- a/drivers/usb/musb/musb_core.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/musb_core.c     Wed May 06 16:56:44 2009 +0100
 @@ -82,9 +82,9 @@
  /*
   * This gets many kinds of configuration information:
@@ -899090,7 +898952,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/musb_core.c linux-2.6.27.19-5.1/drivers
   *
   * Most of the conditional compilation will (someday) vanish.
   */
-@@ -974,9 +974,9 @@ static void musb_shutdown(struct platfor
+@@ -974,9 +974,9 @@
  /*
   * The silicon either has hard-wired endpoint configurations, or else
   * "dynamic fifo" sizing.  The driver has support for both, though at this
@@ -899103,10 +898965,10 @@ diff -purN linux-2.6.27/drivers/usb/musb/musb_core.c linux-2.6.27.19-5.1/drivers
   *
   * We don't currently use dynamic fifo setup capability to do anything
   * more than selecting one of a bunch of predefined configurations.
-diff -purN linux-2.6.27/drivers/usb/musb/musb_host.c linux-2.6.27.19-5.1/drivers/usb/musb/musb_host.c
---- linux-2.6.27/drivers/usb/musb/musb_host.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/musb/musb_host.c   2009-03-25 16:11:19.000000000 +0000
-@@ -108,7 +108,7 @@ static void musb_ep_program(struct musb 
+diff -r 9608d5473017 drivers/usb/musb/musb_host.c
+--- a/drivers/usb/musb/musb_host.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/musb/musb_host.c     Wed May 06 16:56:44 2009 +0100
+@@ -108,7 +108,7 @@
  /*
   * Clear TX fifo. Needed to avoid BABBLE errors.
   */
@@ -899115,7 +898977,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/musb_host.c linux-2.6.27.19-5.1/drivers
  {
        void __iomem    *epio = ep->regs;
        u16             csr;
-@@ -436,7 +436,7 @@ musb_advance_schedule(struct musb *musb,
+@@ -436,7 +436,7 @@
        }
  }
  
@@ -899124,7 +898986,7 @@ diff -purN linux-2.6.27/drivers/usb/musb/musb_host.c linux-2.6.27.19-5.1/drivers
  {
        /* we don't want fifo to fill itself again;
         * ignore dma (various models),
-@@ -1005,7 +1005,7 @@ static bool musb_h_ep0_continue(struct m
+@@ -1005,7 +1005,7 @@
  
  /*
   * Handle default endpoint interrupt as host. Only called in IRQ time
@@ -899133,10 +898995,10 @@ diff -purN linux-2.6.27/drivers/usb/musb/musb_host.c linux-2.6.27.19-5.1/drivers
   *
   * called with controller irqlocked
   */
-diff -purN linux-2.6.27/drivers/usb/serial/Kconfig linux-2.6.27.19-5.1/drivers/usb/serial/Kconfig
---- linux-2.6.27/drivers/usb/serial/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/Kconfig     2009-03-25 16:11:18.000000000 +0000
-@@ -472,6 +472,15 @@ config USB_SERIAL_OTI6858
+diff -r 9608d5473017 drivers/usb/serial/Kconfig
+--- a/drivers/usb/serial/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/Kconfig       Wed May 06 16:56:44 2009 +0100
+@@ -472,6 +472,15 @@
          To compile this driver as a module, choose M here: the
          module will be called oti6858.
  
@@ -899152,10 +899014,10 @@ diff -purN linux-2.6.27/drivers/usb/serial/Kconfig linux-2.6.27.19-5.1/drivers/u
  config USB_SERIAL_SPCP8X5
        tristate "USB SPCP8x5 USB To Serial Driver"
        help
-diff -purN linux-2.6.27/drivers/usb/serial/Makefile linux-2.6.27.19-5.1/drivers/usb/serial/Makefile
---- linux-2.6.27/drivers/usb/serial/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/Makefile    2009-03-25 16:11:18.000000000 +0000
-@@ -44,6 +44,7 @@ obj-$(CONFIG_USB_SERIAL_OMNINET)             += omn
+diff -r 9608d5473017 drivers/usb/serial/Makefile
+--- a/drivers/usb/serial/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/Makefile      Wed May 06 16:56:44 2009 +0100
+@@ -44,6 +44,7 @@
  obj-$(CONFIG_USB_SERIAL_OPTION)                       += option.o
  obj-$(CONFIG_USB_SERIAL_OTI6858)              += oti6858.o
  obj-$(CONFIG_USB_SERIAL_PL2303)                       += pl2303.o
@@ -899163,10 +899025,10 @@ diff -purN linux-2.6.27/drivers/usb/serial/Makefile linux-2.6.27.19-5.1/drivers/
  obj-$(CONFIG_USB_SERIAL_SAFE)                 += safe_serial.o
  obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS)               += sierra.o
  obj-$(CONFIG_USB_SERIAL_SPCP8X5)              += spcp8x5.o
-diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/usb/serial/option.c
---- linux-2.6.27/drivers/usb/serial/option.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/option.c    2009-03-25 16:11:18.000000000 +0000
-@@ -79,38 +79,36 @@ static int  option_send_setup(struct tty
+diff -r 9608d5473017 drivers/usb/serial/option.c
+--- a/drivers/usb/serial/option.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/option.c      Wed May 06 16:56:44 2009 +0100
+@@ -79,38 +79,36 @@
  #define OPTION_PRODUCT_VIPER                  0x6600
  #define OPTION_PRODUCT_VIPER_BUS              0x6601
  #define OPTION_PRODUCT_GT_MAX_READY           0x6701
@@ -899214,7 +899076,7 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
  #define HUAWEI_PRODUCT_E1410                  0x1410
  #define HUAWEI_PRODUCT_E1411                  0x1411
  #define HUAWEI_PRODUCT_E1412                  0x1412
-@@ -121,9 +119,52 @@ static int  option_send_setup(struct tty
+@@ -121,8 +119,51 @@
  #define HUAWEI_PRODUCT_E1417                  0x1417
  #define HUAWEI_PRODUCT_E1418                  0x1418
  #define HUAWEI_PRODUCT_E1419                  0x1419
@@ -899258,16 +899120,15 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
 +#define HUAWEI_PRODUCT_E143F                  0x143F
  
  #define NOVATELWIRELESS_VENDOR_ID             0x1410
++
 +/* YISO PRODUCTS */
 +
 +#define YISO_VENDOR_ID                                0x0EAB
 +#define YISO_PRODUCT_U893                     0xC893
-+
  /* MERLIN EVDO PRODUCTS */
  #define NOVATELWIRELESS_PRODUCT_V640          0x1100
- #define NOVATELWIRELESS_PRODUCT_V620          0x1110
-@@ -151,14 +192,15 @@ static int  option_send_setup(struct tty
+@@ -151,14 +192,15 @@
  #define NOVATELWIRELESS_PRODUCT_MC950D                0x4400
  
  /* FUTURE NOVATEL PRODUCTS */
@@ -899291,10 +899152,11 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
  
  /* AMOI PRODUCTS */
  #define AMOI_VENDOR_ID                                0x1614
-@@ -168,6 +210,27 @@ static int  option_send_setup(struct tty
+@@ -167,6 +209,27 @@
+ #define AMOI_PRODUCT_H02                      0x0802
  
  #define DELL_VENDOR_ID                                0x413C
++
 +/* Dell modems */
 +#define DELL_PRODUCT_5700_MINICARD            0x8114
 +#define DELL_PRODUCT_5500_MINICARD            0x8115
@@ -899315,11 +899177,10 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
 +#define DELL_PRODUCT_5730_MINICARD_SPRINT     0x8180
 +#define DELL_PRODUCT_5730_MINICARD_TELUS      0x8181
 +#define DELL_PRODUCT_5730_MINICARD_VZW                0x8182
-+
  #define KYOCERA_VENDOR_ID                     0x0c88
  #define KYOCERA_PRODUCT_KPC650                        0x17da
- #define KYOCERA_PRODUCT_KPC680                        0x180a
-@@ -183,6 +246,7 @@ static int  option_send_setup(struct tty
+@@ -183,6 +246,7 @@
  #define ONDA_VENDOR_ID                                0x19d2
  #define ONDA_PRODUCT_MSA501HS                 0x0001
  #define ONDA_PRODUCT_ET502HS                  0x0002
@@ -899327,24 +899188,23 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
  
  #define BANDRICH_VENDOR_ID                    0x1A8D
  #define BANDRICH_PRODUCT_C100_1                       0x1002
-@@ -218,8 +282,16 @@ static int  option_send_setup(struct tty
+@@ -218,7 +282,15 @@
  /* ZTE PRODUCTS */
  #define ZTE_VENDOR_ID                         0x19d2
  #define ZTE_PRODUCT_MF628                     0x0015
 +#define ZTE_PRODUCT_MF626                     0x0031
  #define ZTE_PRODUCT_CDMA_TECH                 0xfffe
++
 +/* Ericsson products */
 +#define ERICSSON_VENDOR_ID                    0x0bdb
 +#define ERICSSON_PRODUCT_F3507G                       0x1900
 +
 +#define BENQ_VENDOR_ID                                0x04a5
 +#define BENQ_PRODUCT_H10                      0x4068
-+
  static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
-       { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
-@@ -235,36 +307,34 @@ static struct usb_device_id option_ids[]
+@@ -235,36 +307,34 @@
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER_BUS) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX_READY) },
@@ -899390,7 +899250,7 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) },
-@@ -275,6 +345,44 @@ static struct usb_device_id option_ids[]
+@@ -275,6 +345,44 @@
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) },
@@ -899435,7 +899295,7 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
        { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
-@@ -294,36 +402,78 @@ static struct usb_device_id option_ids[]
+@@ -294,36 +402,78 @@
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
@@ -899534,7 +899394,7 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
        { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) },
-@@ -347,8 +497,12 @@ static struct usb_device_id option_ids[]
+@@ -347,8 +497,12 @@
        { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
        { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
        { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
@@ -899547,9 +899407,9 @@ diff -purN linux-2.6.27/drivers/usb/serial/option.c linux-2.6.27.19-5.1/drivers/
        { } /* Terminating entry */
  };
  MODULE_DEVICE_TABLE(usb, option_ids);
-diff -purN linux-2.6.27/drivers/usb/serial/qcserial.c linux-2.6.27.19-5.1/drivers/usb/serial/qcserial.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/qcserial.c  2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/serial/qcserial.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/usb/serial/qcserial.c    Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,152 @@
 +/*
 + * Qualcomm Serial USB driver
@@ -899703,10 +899563,10 @@ diff -purN linux-2.6.27/drivers/usb/serial/qcserial.c linux-2.6.27.19-5.1/driver
 +
 +module_param(debug, bool, S_IRUGO | S_IWUSR);
 +MODULE_PARM_DESC(debug, "Debug enabled or not");
-diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.c
---- linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.c  2009-03-25 16:11:18.000000000 +0000
-@@ -227,25 +227,32 @@ static unsigned int product_5052_count;
+diff -r 9608d5473017 drivers/usb/serial/ti_usb_3410_5052.c
+--- a/drivers/usb/serial/ti_usb_3410_5052.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/ti_usb_3410_5052.c    Wed May 06 16:56:44 2009 +0100
+@@ -227,25 +227,32 @@
  /* the array dimension is the number of default entries plus */
  /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
  /* null entry */
@@ -899742,7 +899602,7 @@ diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c linux-2.6.27.19-5.
        { }
  };
  
-@@ -457,9 +464,11 @@ static int ti_startup(struct usb_serial 
+@@ -457,9 +464,11 @@
                goto free_tdev;
        }
  
@@ -899756,9 +899616,9 @@ diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.c linux-2.6.27.19-5.
                goto free_tdev;
        }
  
-diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.h linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.h
---- linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/serial/ti_usb_3410_5052.h  2009-03-25 16:11:18.000000000 +0000
+diff -r 9608d5473017 drivers/usb/serial/ti_usb_3410_5052.h
+--- a/drivers/usb/serial/ti_usb_3410_5052.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/serial/ti_usb_3410_5052.h    Wed May 06 16:56:44 2009 +0100
 @@ -27,7 +27,11 @@
  
  /* Vendor and product ids */
@@ -899771,10 +899631,10 @@ diff -purN linux-2.6.27/drivers/usb/serial/ti_usb_3410_5052.h linux-2.6.27.19-5.
  #define TI_3410_EZ430_ID              0xF430  /* TI ez430 development tool */
  #define TI_5052_BOOT_PRODUCT_ID               0x5052  /* no EEPROM, no firmware */
  #define TI_5152_BOOT_PRODUCT_ID               0x5152  /* no EEPROM, no firmware */
-diff -purN linux-2.6.27/drivers/usb/storage/libusual.c linux-2.6.27.19-5.1/drivers/usb/storage/libusual.c
---- linux-2.6.27/drivers/usb/storage/libusual.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/libusual.c 2009-03-25 16:11:19.000000000 +0000
-@@ -46,6 +46,12 @@ static int usu_probe_thread(void *arg);
+diff -r 9608d5473017 drivers/usb/storage/libusual.c
+--- a/drivers/usb/storage/libusual.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/libusual.c   Wed May 06 16:56:44 2009 +0100
+@@ -46,6 +46,12 @@
  { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
    .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
  
@@ -899787,7 +899647,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/libusual.c linux-2.6.27.19-5.1/drive
  #define USUAL_DEV(useProto, useTrans, useType) \
  { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
    .driver_info = ((useType)<<24) }
-@@ -57,6 +63,7 @@ struct usb_device_id storage_usb_ids [] 
+@@ -57,6 +63,7 @@
  
  #undef USUAL_DEV
  #undef UNUSUAL_DEV
@@ -899795,13 +899655,14 @@ diff -purN linux-2.6.27/drivers/usb/storage/libusual.c linux-2.6.27.19-5.1/drive
  
  MODULE_DEVICE_TABLE(usb, storage_usb_ids);
  EXPORT_SYMBOL_GPL(storage_usb_ids);
-diff -purN linux-2.6.27/drivers/usb/storage/scsiglue.c linux-2.6.27.19-5.1/drivers/usb/storage/scsiglue.c
---- linux-2.6.27/drivers/usb/storage/scsiglue.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/scsiglue.c 2009-03-25 16:11:19.000000000 +0000
-@@ -59,6 +59,14 @@
+diff -r 9608d5473017 drivers/usb/storage/scsiglue.c
+--- a/drivers/usb/storage/scsiglue.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/scsiglue.c   Wed May 06 16:56:44 2009 +0100
+@@ -58,6 +58,14 @@
+ #include "debug.h"
  #include "transport.h"
  #include "protocol.h"
++
 +/* Vendor IDs for companies that seem to include the READ CAPACITY bug
 + * in all their devices
 + */
@@ -899809,11 +899670,10 @@ diff -purN linux-2.6.27/drivers/usb/storage/scsiglue.c linux-2.6.27.19-5.1/drive
 +#define VENDOR_ID_NIKON               0x04b0
 +#define VENDOR_ID_PENTAX      0x0a17
 +#define VENDOR_ID_MOTOROLA    0x22b8
-+
  /***********************************************************************
   * Host functions 
-  ***********************************************************************/
-@@ -134,6 +142,23 @@ static int slave_configure(struct scsi_d
+@@ -134,6 +142,23 @@
         * settings can't be overridden via the scsi devinfo mechanism. */
        if (sdev->type == TYPE_DISK) {
  
@@ -899837,7 +899697,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/scsiglue.c linux-2.6.27.19-5.1/drive
                /* Disk-type devices use MODE SENSE(6) if the protocol
                 * (SubClass) is Transparent SCSI, otherwise they use
                 * MODE SENSE(10). */
-@@ -196,6 +221,14 @@ static int slave_configure(struct scsi_d
+@@ -196,6 +221,14 @@
                 * sector in a larger then 1 sector read, since the performance
                 * impact is negible we set this flag for all USB disks */
                sdev->last_sector_bug = 1;
@@ -899852,20 +899712,20 @@ diff -purN linux-2.6.27/drivers/usb/storage/scsiglue.c linux-2.6.27.19-5.1/drive
        } else {
  
                /* Non-disk-type devices don't need to blacklist any pages
-diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/drivers/usb/storage/transport.c
---- linux-2.6.27/drivers/usb/storage/transport.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/transport.c        2009-03-25 16:11:19.000000000 +0000
-@@ -57,6 +57,9 @@
+diff -r 9608d5473017 drivers/usb/storage/transport.c
+--- a/drivers/usb/storage/transport.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/transport.c  Wed May 06 16:56:44 2009 +0100
+@@ -56,6 +56,9 @@
+ #include "protocol.h"
  #include "scsiglue.h"
  #include "debug.h"
++
 +#include <linux/blkdev.h>
 +#include "../../scsi/sd.h"
-+
  
  /***********************************************************************
-  * Data transfer routines
-@@ -511,6 +514,80 @@ int usb_stor_bulk_transfer_sg(struct us_
+@@ -511,6 +514,80 @@
   * Transport routines
   ***********************************************************************/
  
@@ -899946,7 +899806,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/driv
  /* Invoke the transport and basic error-handling/recovery methods
   *
   * This is used by the protocol layers to actually send the message to
-@@ -544,6 +621,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -544,6 +621,7 @@
        /* if the transport provided its own sense data, don't auto-sense */
        if (result == USB_STOR_TRANSPORT_NO_SENSE) {
                srb->result = SAM_STAT_CHECK_CONDITION;
@@ -899954,7 +899814,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/driv
                return;
        }
  
-@@ -667,6 +745,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -667,6 +745,7 @@
                        scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow)
                srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24);
  
@@ -899962,7 +899822,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/driv
        return;
  
        /* Error and abort processing: try to resynchronize with the device
-@@ -694,6 +773,7 @@ void usb_stor_invoke_transport(struct sc
+@@ -694,6 +773,7 @@
                us->transport_reset(us);
        }
        clear_bit(US_FLIDX_RESETTING, &us->dflags);
@@ -899970,9 +899830,9 @@ diff -purN linux-2.6.27/drivers/usb/storage/transport.c linux-2.6.27.19-5.1/driv
  }
  
  /* Stop the current URB transfer */
-diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/drivers/usb/storage/unusual_devs.h
---- linux-2.6.27/drivers/usb/storage/unusual_devs.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/unusual_devs.h     2009-03-25 16:11:19.000000000 +0000
+diff -r 9608d5473017 drivers/usb/storage/unusual_devs.h
+--- a/drivers/usb/storage/unusual_devs.h       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/unusual_devs.h       Wed May 06 16:56:44 2009 +0100
 @@ -27,7 +27,8 @@
  
  /* IMPORTANT NOTE: This file must be included in another file which does
@@ -899983,20 +899843,20 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
   */
  
  /* If you edit this file, please try to keep it sorted first by VendorID,
-@@ -46,6 +47,12 @@
+@@ -44,6 +45,12 @@
+  * Alan Stern <stern@rowland.harvard.edu>, and don't forget to CC: the
+  * USB development list <linux-usb@vger.kernel.org> and the USB storage list
   * <usb-storage@lists.one-eyed-alien.net>
-  */
++ */
++
 +/* Note: If you add an entry only in order to set the CAPACITY_OK flag,
 + * use the COMPLIANT_DEV macro instead of UNUSUAL_DEV.  This is
 + * because such entries mark devices which actually work correctly,
 + * as opposed to devices that do something strangely or wrongly.
-+ */
-+
- /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr>
   */
- UNUSUAL_DEV(  0x03eb, 0x2002, 0x0100, 0x0100,
-@@ -160,13 +167,6 @@ UNUSUAL_DEV(  0x0421, 0x0019, 0x0592, 0x
+ /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr>
+@@ -160,13 +167,6 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_MAX_SECTORS_64 ),
  
@@ -900010,7 +899870,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Reported by Mario Rettig <mariorettig@web.de> */
  UNUSUAL_DEV(  0x0421, 0x042e, 0x0100, 0x0100,
                "Nokia",
-@@ -232,27 +232,6 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x
+@@ -232,27 +232,6 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_MAX_SECTORS_64 ),
  
@@ -900038,7 +899898,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
  UNUSUAL_DEV(  0x0424, 0x0fdc, 0x0210, 0x0210,
                "SMSC",
-@@ -303,6 +282,18 @@ UNUSUAL_DEV(  0x045a, 0x5210, 0x0101, 0x
+@@ -303,6 +282,18 @@
                US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
  #endif
  
@@ -900057,7 +899917,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /*
   * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
   * Reported by Pete Zaitcev <zaitcev@redhat.com>
-@@ -333,6 +324,13 @@ UNUSUAL_DEV(  0x0482, 0x0103, 0x0100, 0x
+@@ -333,6 +324,13 @@
                "Finecam S5",
                US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
  
@@ -900071,49 +899931,49 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Reported by Paul Stewart <stewart@wetlogic.net>
   * This entry is needed because the device reports Sub=ff */
  UNUSUAL_DEV(  0x04a4, 0x0004, 0x0001, 0x0001,
-@@ -355,6 +353,13 @@ UNUSUAL_DEV(  0x04b0, 0x0401, 0x0200, 0x
-               US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_FIX_CAPACITY),
+@@ -352,6 +350,13 @@
+ UNUSUAL_DEV(  0x04b0, 0x0401, 0x0200, 0x0200,
+               "NIKON",
+               "NIKON DSC D100",
++              US_SC_DEVICE, US_PR_DEVICE, NULL,
++              US_FL_FIX_CAPACITY),
++
 +/* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */
 +UNUSUAL_DEV(  0x04b0, 0x0403, 0x0200, 0x0200,
 +              "NIKON",
 +              "NIKON DSC D2H",
-+              US_SC_DEVICE, US_PR_DEVICE, NULL,
-+              US_FL_FIX_CAPACITY),
-+
- /* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */
- UNUSUAL_DEV(  0x04b0, 0x0409, 0x0100, 0x0100,
-               "NIKON",
-@@ -411,6 +416,13 @@ UNUSUAL_DEV(  0x04b0, 0x0417, 0x0100, 0x
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),
  
+@@ -408,6 +413,13 @@
+ UNUSUAL_DEV(  0x04b0, 0x0417, 0x0100, 0x0100,
+               "NIKON",
+               "NIKON DSC D40X",
++              US_SC_DEVICE, US_PR_DEVICE, NULL,
++              US_FL_FIX_CAPACITY),
++
 +/* Reported by paul ready <lxtwin@homecall.co.uk> */
 +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
 +              "NIKON",
 +              "NIKON DSC D300",
-+              US_SC_DEVICE, US_PR_DEVICE, NULL,
-+              US_FL_FIX_CAPACITY),
-+
- /* Reported by Doug Maxey (dwm@austin.ibm.com) */
- UNUSUAL_DEV(  0x04b3, 0x4001, 0x0110, 0x0110,
-               "IBM",
-@@ -623,6 +635,13 @@ UNUSUAL_DEV(  0x0525, 0xa140, 0x0100, 0x
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY),
+@@ -622,6 +634,13 @@
+               "USB Clik! 40",
                US_SC_8070, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY ),
++
 +/* Added by Alan Stern <stern@rowland.harvard.edu> */
 +COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999,
 +              "Linux",
 +              "File-backed Storage Gadget",
 +              US_SC_DEVICE, US_PR_DEVICE, NULL,
 +              US_FL_CAPACITY_OK ),
-+
  /* Yakumo Mega Image 37
   * Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */
- UNUSUAL_DEV(  0x052b, 0x1801, 0x0100, 0x0100,
-@@ -978,7 +997,7 @@ UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0
+@@ -978,7 +997,7 @@
                US_FL_FIX_CAPACITY | US_FL_GO_SLOW ),
  
  /* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */
@@ -900122,7 +899982,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
                "Prolific Technology Inc.",
                "ATAPI-6 Bridge Controller",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
-@@ -1251,6 +1270,20 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0
+@@ -1251,6 +1270,20 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY),
  
@@ -900143,144 +900003,144 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
   * Flag will support Bulk devices which use a standards-violating 32-byte
   * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with
-@@ -1348,14 +1381,6 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1
-               US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_FIX_INQUIRY ),
+@@ -1345,14 +1378,6 @@
+ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
+               "Pentax",
+               "Optio 2/3/400",
+-              US_SC_DEVICE, US_PR_DEVICE, NULL,
+-              US_FL_FIX_INQUIRY ),
+-
 -
 -/* Submitted by Per Winkvist <per.winkvist@uk.com> */
 -UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
 -              "Pentax",
 -              "Optio S/S4",
--              US_SC_DEVICE, US_PR_DEVICE, NULL,
--              US_FL_FIX_INQUIRY ),
--
- /* These are virtual windows driver CDs, which the zd1211rw driver
-  * automatically converts into WLAN devices. */
- UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
-@@ -1628,97 +1653,332 @@ UNUSUAL_DEV(  0x1210, 0x0003, 0x0100, 0x
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_INQUIRY ),
+@@ -1628,97 +1653,332 @@
  /* Reported by fangxiaozhi <huananhu@huawei.com>
   * This brings the HUAWEI data card devices into multi-port mode
   */
 -UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000,
 +UNUSUAL_DEV(  0x12d1, 0x1001, 0x0000, 0x0000,
-+              "HUAWEI MOBILE",
-+              "Mass Storage",
-+              US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-+              0),
-+UNUSUAL_DEV(  0x12d1, 0x1003, 0x0000, 0x0000,
-+              "HUAWEI MOBILE",
-+              "Mass Storage",
-+              US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-+              0),
-+UNUSUAL_DEV(  0x12d1, 0x1004, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1401, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1003, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1402, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1004, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1403, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1401, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1404, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1402, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1405, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1403, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1406, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1404, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1407, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1405, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1408, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1406, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1409, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1407, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140A, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1408, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140B, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1409, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140C, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140A, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140D, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140B, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140E, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140C, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x140F, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140D, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1410, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140E, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000,
-+UNUSUAL_DEV(  0x12d1, 0x1411, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x140F, 0x0000, 0x0000,
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
                0),
 -UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000,
++UNUSUAL_DEV(  0x12d1, 0x1410, 0x0000, 0x0000,
++              "HUAWEI MOBILE",
++              "Mass Storage",
++              US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
++              0),
++UNUSUAL_DEV(  0x12d1, 0x1411, 0x0000, 0x0000,
++              "HUAWEI MOBILE",
++              "Mass Storage",
++              US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
++              0),
 +UNUSUAL_DEV(  0x12d1, 0x1412, 0x0000, 0x0000,
 +              "HUAWEI MOBILE",
 +              "Mass Storage",
@@ -900510,7 +900370,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
                "HUAWEI MOBILE",
                "Mass Storage",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
-@@ -1745,6 +2005,15 @@ UNUSUAL_DEV(  0x14cd, 0x6600, 0x0201, 0x
+@@ -1745,6 +2005,15 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
  
@@ -900526,20 +900386,20 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Reported by Robert Schedel <r.schedel@yahoo.de>
   * Note: this is a 'super top' device like the above 14cd/6600 device */
  UNUSUAL_DEV(  0x1652, 0x6600, 0x0201, 0x0201,
-@@ -1763,6 +2032,12 @@ UNUSUAL_DEV(  0x19d2, 0x2000, 0x0000, 0x
+@@ -1762,6 +2031,12 @@
+               "USB MMC Storage",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_DEVICE),
++
 +UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001,
 +              "ST",
 +              "2A",
 +              US_SC_DEVICE, US_PR_DEVICE, NULL,
 +              US_FL_FIX_CAPACITY),
-+
  /* patch submitted by Davide Perini <perini.davide@dpsoftware.org>
   * and Renato Perini <rperini@email.it>
-  */
-@@ -1818,6 +2093,15 @@ UNUSUAL_DEV(  0x2770, 0x915d, 0x0010, 0x
+@@ -1818,6 +2093,15 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
  
@@ -900555,10 +900415,10 @@ diff -purN linux-2.6.27/drivers/usb/storage/unusual_devs.h linux-2.6.27.19-5.1/d
  /* Reported by Andrey Rahmatullin <wrar@altlinux.org> */
  UNUSUAL_DEV(  0x4102, 0x1020, 0x0100,  0x0100,
                "iRiver",
-diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/usb/storage/usb.c
---- linux-2.6.27/drivers/usb/storage/usb.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/usb.c      2009-03-25 16:11:19.000000000 +0000
-@@ -109,7 +109,7 @@ MODULE_AUTHOR("Matthew Dharm <mdharm-usb
+diff -r 9608d5473017 drivers/usb/storage/usb.c
+--- a/drivers/usb/storage/usb.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/usb.c        Wed May 06 16:56:44 2009 +0100
+@@ -109,7 +109,7 @@
  MODULE_DESCRIPTION("USB Mass Storage driver for Linux");
  MODULE_LICENSE("GPL");
  
@@ -900567,7 +900427,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/us
  module_param(delay_use, uint, S_IRUGO | S_IWUSR);
  MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device");
  
-@@ -126,6 +126,8 @@ MODULE_PARM_DESC(delay_use, "seconds to 
+@@ -126,6 +126,8 @@
  { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin,bcdDeviceMax), \
    .driver_info = (flags)|(USB_US_TYPE_STOR<<24) }
  
@@ -900576,7 +900436,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/us
  #define USUAL_DEV(useProto, useTrans, useType) \
  { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
    .driver_info = (USB_US_TYPE_STOR<<24) }
-@@ -134,6 +136,7 @@ static struct usb_device_id storage_usb_
+@@ -134,6 +136,7 @@
  
  #     include "unusual_devs.h"
  #undef UNUSUAL_DEV
@@ -900584,7 +900444,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/us
  #undef USUAL_DEV
        /* Terminating entry */
        { }
-@@ -164,6 +167,8 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -164,6 +167,8 @@
        .initFunction = init_function,  \
  }
  
@@ -900593,7 +900453,7 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/us
  #define USUAL_DEV(use_protocol, use_transport, use_type) \
  { \
        .useProtocol = use_protocol,    \
-@@ -173,6 +178,7 @@ MODULE_DEVICE_TABLE (usb, storage_usb_id
+@@ -173,6 +178,7 @@
  static struct us_unusual_dev us_unusual_dev_list[] = {
  #     include "unusual_devs.h" 
  #     undef UNUSUAL_DEV
@@ -900601,10 +900461,10 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.c linux-2.6.27.19-5.1/drivers/us
  #     undef USUAL_DEV
  
        /* Terminating entry */
-diff -purN linux-2.6.27/drivers/usb/storage/usb.h linux-2.6.27.19-5.1/drivers/usb/storage/usb.h
---- linux-2.6.27/drivers/usb/storage/usb.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/usb/storage/usb.h      2009-03-25 16:11:19.000000000 +0000
-@@ -155,6 +155,10 @@ struct us_data {
+diff -r 9608d5473017 drivers/usb/storage/usb.h
+--- a/drivers/usb/storage/usb.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/usb/storage/usb.h        Wed May 06 16:56:44 2009 +0100
+@@ -155,6 +155,10 @@
  #ifdef CONFIG_PM
        pm_hook                 suspend_resume_hook;
  #endif
@@ -900615,10 +900475,10 @@ diff -purN linux-2.6.27/drivers/usb/storage/usb.h linux-2.6.27.19-5.1/drivers/us
  };
  
  /* Convert between us_data and the corresponding Scsi_Host */
-diff -purN linux-2.6.27/drivers/video/Kconfig linux-2.6.27.19-5.1/drivers/video/Kconfig
---- linux-2.6.27/drivers/video/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/Kconfig  2009-03-25 16:11:28.000000000 +0000
-@@ -1583,7 +1583,7 @@ config FB_CYBLA
+diff -r 9608d5473017 drivers/video/Kconfig
+--- a/drivers/video/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/Kconfig    Wed May 06 16:56:44 2009 +0100
+@@ -1583,7 +1583,7 @@
        tristate "Cyberblade/i1 support"
        depends on FB && PCI && X86_32 && !64BIT
        select FB_CFB_IMAGEBLIT
@@ -900627,7 +900487,7 @@ diff -purN linux-2.6.27/drivers/video/Kconfig linux-2.6.27.19-5.1/drivers/video/
        ---help---
          This driver is supposed to support the Trident Cyberblade/i1
          graphics core integrated in the VIA VT8601A North Bridge,
-@@ -2029,7 +2029,7 @@ config FB_VIRTUAL
+@@ -2029,7 +2029,7 @@
  
  config XEN_FBDEV_FRONTEND
        tristate "Xen virtual frame buffer support"
@@ -900636,7 +900496,7 @@ diff -purN linux-2.6.27/drivers/video/Kconfig linux-2.6.27.19-5.1/drivers/video/
        select FB_SYS_FILLRECT
        select FB_SYS_COPYAREA
        select FB_SYS_IMAGEBLIT
-@@ -2054,4 +2054,8 @@ if FB || SGI_NEWPORT_CONSOLE
+@@ -2054,4 +2054,8 @@
        source "drivers/video/logo/Kconfig"
  endif
  
@@ -900645,10 +900505,10 @@ diff -purN linux-2.6.27/drivers/video/Kconfig linux-2.6.27.19-5.1/drivers/video/
 +endif
 +
  endmenu
-diff -purN linux-2.6.27/drivers/video/Makefile linux-2.6.27.19-5.1/drivers/video/Makefile
---- linux-2.6.27/drivers/video/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/Makefile 2009-03-25 16:11:28.000000000 +0000
-@@ -14,6 +14,7 @@ fb-objs                           := $(f
+diff -r 9608d5473017 drivers/video/Makefile
+--- a/drivers/video/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/Makefile   Wed May 06 16:56:44 2009 +0100
+@@ -14,6 +14,7 @@
  obj-$(CONFIG_VT)                += console/
  obj-$(CONFIG_LOGO)              += logo/
  obj-y                           += backlight/ display/
@@ -900656,9 +900516,9 @@ diff -purN linux-2.6.27/drivers/video/Makefile linux-2.6.27.19-5.1/drivers/video
  
  obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
  obj-$(CONFIG_FB_CFB_COPYAREA)  += cfbcopyarea.o
-diff -purN linux-2.6.27/drivers/video/aty/mach64_ct.c linux-2.6.27.19-5.1/drivers/video/aty/mach64_ct.c
---- linux-2.6.27/drivers/video/aty/mach64_ct.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/aty/mach64_ct.c  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/aty/mach64_ct.c
+--- a/drivers/video/aty/mach64_ct.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/aty/mach64_ct.c    Wed May 06 16:56:44 2009 +0100
 @@ -8,6 +8,9 @@
  #include <asm/io.h>
  #include <video/mach64.h>
@@ -900669,7 +900529,7 @@ diff -purN linux-2.6.27/drivers/video/aty/mach64_ct.c linux-2.6.27.19-5.1/driver
  
  #undef DEBUG
  
-@@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(con
+@@ -536,6 +539,14 @@
        pll->ct.xclk_post_div_real = postdividers[xpost_div];
        pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8;
  
@@ -900684,10 +900544,10 @@ diff -purN linux-2.6.27/drivers/video/aty/mach64_ct.c linux-2.6.27.19-5.1/driver
  #ifdef DEBUG
        pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) /
                        (par->ref_clk_per * pll->ct.pll_ref_div);
-diff -purN linux-2.6.27/drivers/video/aty/radeon_monitor.c linux-2.6.27.19-5.1/drivers/video/aty/radeon_monitor.c
---- linux-2.6.27/drivers/video/aty/radeon_monitor.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/aty/radeon_monitor.c     2009-03-25 16:11:28.000000000 +0000
-@@ -727,6 +727,25 @@ static void radeon_videomode_to_var(stru
+diff -r 9608d5473017 drivers/video/aty/radeon_monitor.c
+--- a/drivers/video/aty/radeon_monitor.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/aty/radeon_monitor.c       Wed May 06 16:56:44 2009 +0100
+@@ -727,6 +727,25 @@
        var->vmode = mode->vmode;
  }
  
@@ -900713,10 +900573,11 @@ diff -purN linux-2.6.27/drivers/video/aty/radeon_monitor.c linux-2.6.27.19-5.1/d
  /*
   * Build the modedb for head 1 (head 2 will come later), check panel infos
   * from either BIOS or EDID, and pick up the default mode
-@@ -862,6 +881,22 @@ void __devinit radeon_check_modes(struct
+@@ -861,6 +880,22 @@
+                                info->monspecs.modedb_len, NULL, 8) != 0)
                        has_default_mode = 1;
        }
++
 +#ifdef CONFIG_PPC_PSERIES
 +      if (!has_default_mode && (
 +              is_powerblade("IBM,8842") || /* JS20 */
@@ -900732,13 +900593,12 @@ diff -purN linux-2.6.27/drivers/video/aty/radeon_monitor.c linux-2.6.27.19-5.1/d
 +                      has_default_mode = 1;
 +      }
 +#endif
-+
        /*
         * Still no mode, let's pick up a default from the db
-        */
-diff -purN linux-2.6.27/drivers/video/bootsplash/Kconfig linux-2.6.27.19-5.1/drivers/video/bootsplash/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/Kconfig       2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/Kconfig Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,17 @@
 +#
 +# Bootsplash configuration
@@ -900757,18 +900617,18 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/Kconfig linux-2.6.27.19-5.1/dri
 +          If you are unsure, say N
 +endmenu
 +
-diff -purN linux-2.6.27/drivers/video/bootsplash/Makefile linux-2.6.27.19-5.1/drivers/video/bootsplash/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/Makefile      2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/Makefile        Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,5 @@
 +# Makefile for the Linux bootsplash
 +
 +obj-$(CONFIG_BOOTSPLASH)              += bootsplash.o
 +obj-$(CONFIG_BOOTSPLASH)              += decode-jpg.o
 +obj-$(CONFIG_BOOTSPLASH)              += render.o
-diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.c linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.c  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/bootsplash.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/bootsplash.c    Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,1017 @@
 +/*
 + *           linux/drivers/video/bootsplash/bootsplash.c -
@@ -901787,9 +901647,9 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.c linux-2.6.27.19-5.
 +      return;
 +}
 +
-diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.h linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/bootsplash.h  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/bootsplash.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/bootsplash.h    Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,44 @@
 +/*
 + *    linux/drivers/video/bootsplash/bootsplash.h - splash screen definition.
@@ -901835,9 +901695,9 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/bootsplash.h linux-2.6.27.19-5.
 +extern void release_console_sem(void);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.c linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.c  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/decode-jpg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/decode-jpg.c    Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,957 @@
 +/*
 + *    linux/drivers/video/bootsplash/decode-jpg.c - a tiny jpeg decoder.
@@ -902796,9 +902656,9 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.c linux-2.6.27.19-5.
 +              outy += 64 * 2 - 16 * 4;
 +      }
 +}
-diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.h linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/decode-jpg.h  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/decode-jpg.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/decode-jpg.h    Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,35 @@
 +/*
 + *    linux/drivers/video/bootsplash/decode-jpg.h - a tiny jpeg decoder.
@@ -902835,9 +902695,9 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/decode-jpg.h linux-2.6.27.19-5.
 +extern int jpeg_check_size(unsigned char *, int, int);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/video/bootsplash/render.c linux-2.6.27.19-5.1/drivers/video/bootsplash/render.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bootsplash/render.c      2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/bootsplash/render.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/video/bootsplash/render.c        Wed May 06 16:56:44 2009 +0100
 @@ -0,0 +1,328 @@
 +/*
 + *    linux/drivers/video/bootsplash/render.c - splash screen render functions.
@@ -903167,10 +903027,10 @@ diff -purN linux-2.6.27/drivers/video/bootsplash/render.c linux-2.6.27.19-5.1/dr
 +      }
 +}
 +
-diff -purN linux-2.6.27/drivers/video/bw2.c linux-2.6.27.19-5.1/drivers/video/bw2.c
---- linux-2.6.27/drivers/video/bw2.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/bw2.c    2009-03-25 16:11:28.000000000 +0000
-@@ -381,6 +381,7 @@ static struct of_device_id bw2_match[] =
+diff -r 9608d5473017 drivers/video/bw2.c
+--- a/drivers/video/bw2.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/bw2.c      Wed May 06 16:56:44 2009 +0100
+@@ -381,6 +381,7 @@
  MODULE_DEVICE_TABLE(of, bw2_match);
  
  static struct of_platform_driver bw2_driver = {
@@ -903178,10 +903038,10 @@ diff -purN linux-2.6.27/drivers/video/bw2.c linux-2.6.27.19-5.1/drivers/video/bw
        .name           = "bw2",
        .match_table    = bw2_match,
        .probe          = bw2_probe,
-diff -purN linux-2.6.27/drivers/video/carminefb.c linux-2.6.27.19-5.1/drivers/video/carminefb.c
---- linux-2.6.27/drivers/video/carminefb.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/carminefb.c      2009-03-25 16:11:28.000000000 +0000
-@@ -535,8 +535,9 @@ static struct fb_ops carminefb_ops = {
+diff -r 9608d5473017 drivers/video/carminefb.c
+--- a/drivers/video/carminefb.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/carminefb.c        Wed May 06 16:56:44 2009 +0100
+@@ -535,8 +535,9 @@
        .fb_setcolreg   = carmine_setcolreg,
  };
  
@@ -903193,10 +903053,10 @@ diff -purN linux-2.6.27/drivers/video/carminefb.c linux-2.6.27.19-5.1/drivers/vi
  {
        int ret;
        struct fb_info *info;
-diff -purN linux-2.6.27/drivers/video/cg14.c linux-2.6.27.19-5.1/drivers/video/cg14.c
---- linux-2.6.27/drivers/video/cg14.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg14.c   2009-03-25 16:11:28.000000000 +0000
-@@ -598,6 +598,7 @@ static struct of_device_id cg14_match[] 
+diff -r 9608d5473017 drivers/video/cg14.c
+--- a/drivers/video/cg14.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg14.c     Wed May 06 16:56:45 2009 +0100
+@@ -598,6 +598,7 @@
  MODULE_DEVICE_TABLE(of, cg14_match);
  
  static struct of_platform_driver cg14_driver = {
@@ -903204,10 +903064,10 @@ diff -purN linux-2.6.27/drivers/video/cg14.c linux-2.6.27.19-5.1/drivers/video/c
        .name           = "cg14",
        .match_table    = cg14_match,
        .probe          = cg14_probe,
-diff -purN linux-2.6.27/drivers/video/cg3.c linux-2.6.27.19-5.1/drivers/video/cg3.c
---- linux-2.6.27/drivers/video/cg3.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg3.c    2009-03-25 16:11:28.000000000 +0000
-@@ -468,6 +468,7 @@ static struct of_device_id cg3_match[] =
+diff -r 9608d5473017 drivers/video/cg3.c
+--- a/drivers/video/cg3.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg3.c      Wed May 06 16:56:45 2009 +0100
+@@ -468,6 +468,7 @@
  MODULE_DEVICE_TABLE(of, cg3_match);
  
  static struct of_platform_driver cg3_driver = {
@@ -903215,10 +903075,10 @@ diff -purN linux-2.6.27/drivers/video/cg3.c linux-2.6.27.19-5.1/drivers/video/cg
        .name           = "cg3",
        .match_table    = cg3_match,
        .probe          = cg3_probe,
-diff -purN linux-2.6.27/drivers/video/cg6.c linux-2.6.27.19-5.1/drivers/video/cg6.c
---- linux-2.6.27/drivers/video/cg6.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/cg6.c    2009-03-25 16:11:28.000000000 +0000
-@@ -826,6 +826,7 @@ static struct of_device_id cg6_match[] =
+diff -r 9608d5473017 drivers/video/cg6.c
+--- a/drivers/video/cg6.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/cg6.c      Wed May 06 16:56:45 2009 +0100
+@@ -826,6 +826,7 @@
  MODULE_DEVICE_TABLE(of, cg6_match);
  
  static struct of_platform_driver cg6_driver = {
@@ -903226,10 +903086,10 @@ diff -purN linux-2.6.27/drivers/video/cg6.c linux-2.6.27.19-5.1/drivers/video/cg
        .name           = "cg6",
        .match_table    = cg6_match,
        .probe          = cg6_probe,
-diff -purN linux-2.6.27/drivers/video/console/Kconfig linux-2.6.27.19-5.1/drivers/video/console/Kconfig
---- linux-2.6.27/drivers/video/console/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/Kconfig  2009-03-25 16:11:28.000000000 +0000
-@@ -46,6 +46,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE
+diff -r 9608d5473017 drivers/video/console/Kconfig
+--- a/drivers/video/console/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/Kconfig    Wed May 06 16:56:45 2009 +0100
+@@ -46,6 +46,7 @@
  config VIDEO_SELECT
        bool "Video mode selection support"
        depends on  X86 && VGA_CONSOLE
@@ -903237,9 +903097,9 @@ diff -purN linux-2.6.27/drivers/video/console/Kconfig linux-2.6.27.19-5.1/driver
        ---help---
          This enables support for text mode selection on kernel startup. If
          you want to take advantage of some high-resolution text mode your
-diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/drivers/video/console/bitblit.c
---- linux-2.6.27/drivers/video/console/bitblit.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/bitblit.c        2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/console/bitblit.c
+--- a/drivers/video/console/bitblit.c  Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/bitblit.c  Wed May 06 16:56:45 2009 +0100
 @@ -17,6 +17,9 @@
  #include <linux/console.h>
  #include <asm/types.h>
@@ -903250,7 +903110,7 @@ diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/driv
  
  /*
   * Accelerated handlers.
-@@ -47,6 +50,13 @@ static void bit_bmove(struct vc_data *vc
+@@ -47,6 +50,13 @@
  {
        struct fb_copyarea area;
  
@@ -903264,7 +903124,7 @@ diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/driv
        area.sx = sx * vc->vc_font.width;
        area.sy = sy * vc->vc_font.height;
        area.dx = dx * vc->vc_font.width;
-@@ -63,6 +73,13 @@ static void bit_clear(struct vc_data *vc
+@@ -63,6 +73,13 @@
        int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
        struct fb_fillrect region;
  
@@ -903278,7 +903138,7 @@ diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/driv
        region.color = attr_bgcol_ec(bgshift, vc, info);
        region.dx = sx * vc->vc_font.width;
        region.dy = sy * vc->vc_font.height;
-@@ -160,6 +177,13 @@ static void bit_putcs(struct vc_data *vc
+@@ -160,6 +177,13 @@
        image.height = vc->vc_font.height;
        image.depth = 1;
  
@@ -903292,21 +903152,21 @@ diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/driv
        if (attribute) {
                buf = kmalloc(cellsize, GFP_KERNEL);
                if (!buf)
-@@ -213,6 +237,13 @@ static void bit_clear_margins(struct vc_
+@@ -212,6 +236,13 @@
+       unsigned int rs = info->var.xres - rw;
        unsigned int bs = info->var.yres - bh;
        struct fb_fillrect region;
++
 +#ifdef CONFIG_BOOTSPLASH
 +      if (info->splash_data) {
 +              splash_clear_margins(info->splash_data, vc, info, bottom_only);
 +              return;
 +      }
 +#endif
-+
        region.color = attr_bgcol_ec(bgshift, vc, info);
        region.rop = ROP_COPY;
-@@ -379,6 +410,14 @@ static void bit_cursor(struct vc_data *v
+@@ -379,6 +410,14 @@
        cursor.image.depth = 1;
        cursor.rop = ROP_XOR;
  
@@ -903321,9 +903181,9 @@ diff -purN linux-2.6.27/drivers/video/console/bitblit.c linux-2.6.27.19-5.1/driv
        if (info->fbops->fb_cursor)
                err = info->fbops->fb_cursor(info, &cursor);
  
-diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/drivers/video/console/fbcon.c
---- linux-2.6.27/drivers/video/console/fbcon.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/fbcon.c  2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/video/console/fbcon.c
+--- a/drivers/video/console/fbcon.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/fbcon.c    Wed May 06 16:56:45 2009 +0100
 @@ -90,6 +90,9 @@
  #endif
  
@@ -903334,7 +903194,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
  
  #ifdef FBCONDEBUG
  #  define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
-@@ -105,7 +108,11 @@ enum {
+@@ -105,7 +108,11 @@
  
  static struct display fb_display[MAX_NR_CONSOLES];
  
@@ -903346,18 +903206,18 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
  static signed char con2fb_map_boot[MAX_NR_CONSOLES];
  
  static int logo_lines;
-@@ -578,6 +585,10 @@ static int fbcon_takeover(int show_logo)
+@@ -577,6 +584,10 @@
        for (i = first_fb_vc; i <= last_fb_vc; i++)
                con2fb_map[i] = info_idx;
++
 +#ifdef CONFIG_BOOTSPLASH
 +      splash_init();
 +#endif
-+
        err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
                                fbcon_is_default);
-@@ -1180,6 +1191,16 @@ static void fbcon_init(struct vc_data *v
+@@ -1180,6 +1191,16 @@
        new_rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
        new_cols /= vc->vc_font.width;
        new_rows /= vc->vc_font.height;
@@ -903374,7 +903234,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
        vc_resize(vc, new_cols, new_rows);
  
        /*
-@@ -1855,8 +1876,6 @@ static int fbcon_scroll(struct vc_data *
+@@ -1855,8 +1876,6 @@
        struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
        struct display *p = &fb_display[vc->vc_num];
        int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
@@ -903383,7 +903243,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
  
        if (fbcon_is_inactive(vc, info))
                return -EINVAL;
-@@ -1869,11 +1888,6 @@ static int fbcon_scroll(struct vc_data *
+@@ -1869,11 +1888,6 @@
         *           whole screen (prevents flicker).
         */
  
@@ -903395,7 +903255,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
        switch (dir) {
        case SM_UP:
                if (count > vc->vc_rows)        /* Maximum realistic size */
-@@ -1882,6 +1896,10 @@ static int fbcon_scroll(struct vc_data *
+@@ -1882,6 +1896,10 @@
                        fbcon_softback_note(vc, t, count);
                if (logo_shown >= 0)
                        goto redraw_up;
@@ -903406,7 +903266,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                switch (p->scrollmode) {
                case SCROLL_MOVE:
                        fbcon_redraw_blit(vc, info, p, t, b - t - count,
-@@ -1890,9 +1908,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1890,9 +1908,9 @@
                        scr_memsetw((unsigned short *) (vc->vc_origin +
                                                        vc->vc_size_row *
                                                        (b - count)),
@@ -903418,7 +903278,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                        break;
  
                case SCROLL_WRAP_MOVE:
-@@ -1962,10 +1980,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1962,10 +1980,9 @@
                        scr_memsetw((unsigned short *) (vc->vc_origin +
                                                        vc->vc_size_row *
                                                        (b - count)),
@@ -903431,7 +903291,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                }
                break;
  
-@@ -1974,6 +1991,10 @@ static int fbcon_scroll(struct vc_data *
+@@ -1974,6 +1991,10 @@
                        count = vc->vc_rows;
                if (logo_shown >= 0)
                        goto redraw_down;
@@ -903442,7 +903302,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                switch (p->scrollmode) {
                case SCROLL_MOVE:
                        fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
-@@ -1982,9 +2003,9 @@ static int fbcon_scroll(struct vc_data *
+@@ -1982,9 +2003,9 @@
                        scr_memsetw((unsigned short *) (vc->vc_origin +
                                                        vc->vc_size_row *
                                                        t),
@@ -903454,7 +903314,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                        break;
  
                case SCROLL_WRAP_MOVE:
-@@ -2052,15 +2073,12 @@ static int fbcon_scroll(struct vc_data *
+@@ -2052,15 +2073,12 @@
                        scr_memsetw((unsigned short *) (vc->vc_origin +
                                                        vc->vc_size_row *
                                                        t),
@@ -903473,7 +903333,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
  }
  
  
-@@ -2125,6 +2143,14 @@ static void fbcon_bmove_rec(struct vc_da
+@@ -2125,6 +2143,14 @@
                }
                return;
        }
@@ -903488,18 +903348,18 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
        ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
                   height, width);
  }
-@@ -2233,6 +2259,10 @@ static int fbcon_switch(struct vc_data *
+@@ -2232,6 +2258,10 @@
        info = registered_fb[con2fb_map[vc->vc_num]];
        ops = info->fbcon_par;
++
 +#ifdef CONFIG_BOOTSPLASH
 +      splash_prepare(vc, info);
 +#endif
-+
        if (softback_top) {
                if (softback_lines)
-                       fbcon_set_origin(vc);
-@@ -2360,6 +2390,12 @@ static void fbcon_generic_blank(struct v
+@@ -2360,6 +2390,12 @@
  {
        struct fb_event event;
  
@@ -903512,7 +903372,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
        if (blank) {
                unsigned short charmask = vc->vc_hi_font_mask ?
                        0x1ff : 0xff;
-@@ -2522,9 +2558,6 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2522,9 +2558,6 @@
                        c = vc->vc_video_erase_char;
                        vc->vc_video_erase_char =
                            ((c & 0xfe00) >> 1) | (c & 0xff);
@@ -903522,7 +903382,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                        vc->vc_attr >>= 1;
                }
        } else if (!vc->vc_hi_font_mask && cnt == 512) {
-@@ -2555,14 +2588,9 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2555,14 +2588,9 @@
                        if (vc->vc_can_do_color) {
                                vc->vc_video_erase_char =
                                    ((c & 0xff00) << 1) | (c & 0xff);
@@ -903538,7 +903398,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                }
  
        }
-@@ -2572,6 +2600,12 @@ static int fbcon_do_set_font(struct vc_d
+@@ -2572,6 +2600,12 @@
  
                cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
                rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
@@ -903551,7 +903411,7 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                cols /= w;
                rows /= h;
                vc_resize(vc, cols, rows);
-@@ -2996,8 +3030,8 @@ static void fbcon_set_all_vcs(struct fb_
+@@ -2996,8 +3030,8 @@
                p = &fb_display[vc->vc_num];
                set_blitting_type(vc, info);
                var_to_display(p, &info->var, info);
@@ -903562,13 +903422,14 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.c linux-2.6.27.19-5.1/driver
                cols /= vc->vc_font.width;
                rows /= vc->vc_font.height;
                vc_resize(vc, cols, rows);
-diff -purN linux-2.6.27/drivers/video/console/fbcon.h linux-2.6.27.19-5.1/drivers/video/console/fbcon.h
---- linux-2.6.27/drivers/video/console/fbcon.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/fbcon.h  2009-03-25 16:11:28.000000000 +0000
-@@ -25,6 +25,34 @@
+diff -r 9608d5473017 drivers/video/console/fbcon.h
+--- a/drivers/video/console/fbcon.h    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/fbcon.h    Wed May 06 16:56:45 2009 +0100
+@@ -24,6 +24,34 @@
+     *    This is the interface between the low-level console driver and the
      *    low-level frame buffer device
      */
++
 +#ifdef CONFIG_BOOTSPLASH
 +struct splash_data {
 +    int splash_state;                 /* show splash? */
@@ -903596,14 +903457,13 @@ diff -purN linux-2.6.27/drivers/video/console/fbcon.h linux-2.6.27.19-5.1/driver
 +    int splash_sboxcount;
 +};
 +#endif
-+
  struct display {
      /* Filled in by the low-level console driver */
-     const u_char *fontdata;
-diff -purN linux-2.6.27/drivers/video/console/mdacon.c linux-2.6.27.19-5.1/drivers/video/console/mdacon.c
---- linux-2.6.27/drivers/video/console/mdacon.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/mdacon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data
+diff -r 9608d5473017 drivers/video/console/mdacon.c
+--- a/drivers/video/console/mdacon.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/mdacon.c   Wed May 06 16:56:45 2009 +0100
+@@ -533,7 +533,7 @@
  
  static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines)
  {
@@ -903612,10 +903472,10 @@ diff -purN linux-2.6.27/drivers/video/console/mdacon.c linux-2.6.27.19-5.1/drive
  
        if (!lines)
                return 0;
-diff -purN linux-2.6.27/drivers/video/console/sticon.c linux-2.6.27.19-5.1/drivers/video/console/sticon.c
---- linux-2.6.27/drivers/video/console/sticon.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/sticon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data 
+diff -r 9608d5473017 drivers/video/console/sticon.c
+--- a/drivers/video/console/sticon.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/sticon.c   Wed May 06 16:56:45 2009 +0100
+@@ -170,12 +170,12 @@
      switch (dir) {
      case SM_UP:
        sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols);
@@ -903630,10 +903490,10 @@ diff -purN linux-2.6.27/drivers/video/console/sticon.c linux-2.6.27.19-5.1/drive
        break;
      }
  
-diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drivers/video/console/vgacon.c
---- linux-2.6.27/drivers/video/console/vgacon.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/console/vgacon.c 2009-03-25 16:11:28.000000000 +0000
-@@ -1240,7 +1240,7 @@ static int vgacon_font_set(struct vc_dat
+diff -r 9608d5473017 drivers/video/console/vgacon.c
+--- a/drivers/video/console/vgacon.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/console/vgacon.c   Wed May 06 16:56:45 2009 +0100
+@@ -1240,7 +1240,7 @@
        unsigned charcount = font->charcount;
        int rc;
  
@@ -903642,7 +903502,7 @@ diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drive
                return -EINVAL;
  
        if (font->width != VGA_FONTWIDTH ||
-@@ -1258,7 +1258,7 @@ static int vgacon_font_set(struct vc_dat
+@@ -1258,7 +1258,7 @@
  
  static int vgacon_font_get(struct vc_data *c, struct console_font *font)
  {
@@ -903651,7 +903511,7 @@ diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drive
                return -EINVAL;
  
        font->width = VGA_FONTWIDTH;
-@@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data 
+@@ -1350,7 +1350,7 @@
                } else
                        c->vc_origin += delta;
                scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size -
@@ -903660,7 +903520,7 @@ diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drive
                            delta);
        } else {
                if (oldo - delta < vga_vram_base) {
-@@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data 
+@@ -1363,7 +1363,7 @@
                } else
                        c->vc_origin -= delta;
                c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
@@ -903669,10 +903529,10 @@ diff -purN linux-2.6.27/drivers/video/console/vgacon.c linux-2.6.27.19-5.1/drive
                            delta);
        }
        c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
-diff -purN linux-2.6.27/drivers/video/fbmem.c linux-2.6.27.19-5.1/drivers/video/fbmem.c
---- linux-2.6.27/drivers/video/fbmem.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/fbmem.c  2009-03-25 16:11:28.000000000 +0000
-@@ -232,7 +232,7 @@ static void fb_set_logo_directpalette(st
+diff -r 9608d5473017 drivers/video/fbmem.c
+--- a/drivers/video/fbmem.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/fbmem.c    Wed May 06 16:56:45 2009 +0100
+@@ -232,7 +232,7 @@
        greenshift = info->var.green.offset;
        blueshift = info->var.blue.offset;
  
@@ -903681,10 +903541,10 @@ diff -purN linux-2.6.27/drivers/video/fbmem.c linux-2.6.27.19-5.1/drivers/video/
                palette[i] = i << redshift | i << greenshift | i << blueshift;
  }
  
-diff -purN linux-2.6.27/drivers/video/ffb.c linux-2.6.27.19-5.1/drivers/video/ffb.c
---- linux-2.6.27/drivers/video/ffb.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/ffb.c    2009-03-25 16:11:28.000000000 +0000
-@@ -1054,6 +1054,7 @@ static struct of_device_id ffb_match[] =
+diff -r 9608d5473017 drivers/video/ffb.c
+--- a/drivers/video/ffb.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/ffb.c      Wed May 06 16:56:45 2009 +0100
+@@ -1054,6 +1054,7 @@
  MODULE_DEVICE_TABLE(of, ffb_match);
  
  static struct of_platform_driver ffb_driver = {
@@ -903692,10 +903552,10 @@ diff -purN linux-2.6.27/drivers/video/ffb.c linux-2.6.27.19-5.1/drivers/video/ff
        .name           = "ffb",
        .match_table    = ffb_match,
        .probe          = ffb_probe,
-diff -purN linux-2.6.27/drivers/video/leo.c linux-2.6.27.19-5.1/drivers/video/leo.c
---- linux-2.6.27/drivers/video/leo.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/leo.c    2009-03-25 16:11:28.000000000 +0000
-@@ -650,6 +650,7 @@ static struct of_device_id leo_match[] =
+diff -r 9608d5473017 drivers/video/leo.c
+--- a/drivers/video/leo.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/leo.c      Wed May 06 16:56:45 2009 +0100
+@@ -650,6 +650,7 @@
  MODULE_DEVICE_TABLE(of, leo_match);
  
  static struct of_platform_driver leo_driver = {
@@ -903703,10 +903563,10 @@ diff -purN linux-2.6.27/drivers/video/leo.c linux-2.6.27.19-5.1/drivers/video/le
        .name           = "leo",
        .match_table    = leo_match,
        .probe          = leo_probe,
-diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/macfb.c
---- linux-2.6.27/drivers/video/macfb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/macfb.c  2009-03-25 16:11:28.000000000 +0000
-@@ -164,7 +164,6 @@ static struct fb_var_screeninfo macfb_de
+diff -r 9608d5473017 drivers/video/macfb.c
+--- a/drivers/video/macfb.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/macfb.c    Wed May 06 16:56:45 2009 +0100
+@@ -164,7 +164,6 @@
  };
  
  static struct fb_fix_screeninfo macfb_fix = {
@@ -903714,7 +903574,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
        .type   = FB_TYPE_PACKED_PIXELS,
        .accel  = FB_ACCEL_NONE,
  };
-@@ -760,22 +759,22 @@ static int __init macfb_init(void)
+@@ -760,22 +759,22 @@
  
                switch(ndev->dr_hw) {
                case NUBUS_DRHW_APPLE_MDC:
@@ -903741,7 +903601,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
                }
        }
-@@ -786,21 +785,11 @@ static int __init macfb_init(void)
+@@ -786,21 +785,11 @@
        if (!video_is_nubus)
                switch( mac_bi_data.id )
                {
@@ -903764,7 +903624,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        macfb_setpalette = valkyrie_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -823,7 +812,7 @@ static int __init macfb_init(void)
+@@ -823,7 +812,7 @@
                case MAC_MODEL_Q700:
                case MAC_MODEL_Q900:
                case MAC_MODEL_Q950:
@@ -903773,7 +903633,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        macfb_setpalette = dafb_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        dafb_cmap_regs = ioremap(DAFB_BASE, 0x1000);
-@@ -831,7 +820,7 @@ static int __init macfb_init(void)
+@@ -831,7 +820,7 @@
  
                        /* LC II uses the V8 framebuffer */
                case MAC_MODEL_LCII:
@@ -903782,7 +903642,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -843,7 +832,7 @@ static int __init macfb_init(void)
+@@ -843,7 +832,7 @@
                case MAC_MODEL_IIVI:
                case MAC_MODEL_IIVX:
                case MAC_MODEL_P600:
@@ -903791,7 +903651,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
-@@ -860,7 +849,7 @@ static int __init macfb_init(void)
+@@ -860,7 +849,7 @@
                case MAC_MODEL_P460:
                        macfb_setpalette = v8_brazil_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
@@ -903800,7 +903660,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        v8_brazil_cmap_regs = ioremap(DAC_BASE, 0x1000);
                        break;
  
-@@ -871,7 +860,7 @@ static int __init macfb_init(void)
+@@ -871,7 +860,7 @@
                case MAC_MODEL_IISI:
                        macfb_setpalette = rbv_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
@@ -903809,7 +903669,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        rbv_cmap_regs = ioremap(DAC_BASE, 0x1000);
                        break;
  
-@@ -880,7 +869,7 @@ static int __init macfb_init(void)
+@@ -880,7 +869,7 @@
                case MAC_MODEL_C660:
                        macfb_setpalette = civic_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
@@ -903818,7 +903678,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
                        break;
  
-@@ -901,7 +890,7 @@ static int __init macfb_init(void)
+@@ -901,7 +890,7 @@
                                v8_brazil_cmap_regs =
                                        ioremap(DAC_BASE, 0x1000);
                        }
@@ -903827,7 +903687,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
                        /* We think this may be like the LC II */
                case MAC_MODEL_CCL:
-@@ -911,18 +900,18 @@ static int __init macfb_init(void)
+@@ -911,18 +900,18 @@
                                v8_brazil_cmap_regs =
                                        ioremap(DAC_BASE, 0x1000);
                        }
@@ -903849,7 +903709,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
  
                        /* Powerbooks are particularly difficult.  Many of
-@@ -935,7 +924,7 @@ static int __init macfb_init(void)
+@@ -935,7 +924,7 @@
                case MAC_MODEL_PB140:
                case MAC_MODEL_PB145:
                case MAC_MODEL_PB170:
@@ -903858,7 +903718,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
  
                        /* Internal is GSC, External (if present) is ViSC */
-@@ -945,13 +934,13 @@ static int __init macfb_init(void)
+@@ -945,13 +934,13 @@
                case MAC_MODEL_PB180:
                case MAC_MODEL_PB210:
                case MAC_MODEL_PB230:
@@ -903874,7 +903734,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
  
                        /* Internal is CSC, External is Keystone+Ariel. */
-@@ -963,12 +952,12 @@ static int __init macfb_init(void)
+@@ -963,12 +952,12 @@
                case MAC_MODEL_PB280C:
                        macfb_setpalette = csc_setpalette;
                        macfb_defined.activate = FB_ACTIVATE_NOW;
@@ -903889,7 +903749,7 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
                        break;
                }
  
-@@ -978,16 +967,23 @@ static int __init macfb_init(void)
+@@ -978,16 +967,23 @@
        fb_info.pseudo_palette  = pseudo_palette;
        fb_info.flags           = FBINFO_DEFAULT;
  
@@ -903921,10 +903781,10 @@ diff -purN linux-2.6.27/drivers/video/macfb.c linux-2.6.27.19-5.1/drivers/video/
        return err;
  }
  
-diff -purN linux-2.6.27/drivers/video/p9100.c linux-2.6.27.19-5.1/drivers/video/p9100.c
---- linux-2.6.27/drivers/video/p9100.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/p9100.c  2009-03-25 16:11:28.000000000 +0000
-@@ -358,6 +358,7 @@ static struct of_device_id p9100_match[]
+diff -r 9608d5473017 drivers/video/p9100.c
+--- a/drivers/video/p9100.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/p9100.c    Wed May 06 16:56:45 2009 +0100
+@@ -358,6 +358,7 @@
  MODULE_DEVICE_TABLE(of, p9100_match);
  
  static struct of_platform_driver p9100_driver = {
@@ -903932,10 +903792,10 @@ diff -purN linux-2.6.27/drivers/video/p9100.c linux-2.6.27.19-5.1/drivers/video/
        .name           = "p9100",
        .match_table    = p9100_match,
        .probe          = p9100_probe,
-diff -purN linux-2.6.27/drivers/video/platinumfb.c linux-2.6.27.19-5.1/drivers/video/platinumfb.c
---- linux-2.6.27/drivers/video/platinumfb.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/platinumfb.c     2009-03-25 16:11:28.000000000 +0000
-@@ -674,6 +674,7 @@ static struct of_device_id platinumfb_ma
+diff -r 9608d5473017 drivers/video/platinumfb.c
+--- a/drivers/video/platinumfb.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/platinumfb.c       Wed May 06 16:56:45 2009 +0100
+@@ -674,6 +674,7 @@
  
  static struct of_platform_driver platinum_driver = 
  {
@@ -903943,10 +903803,10 @@ diff -purN linux-2.6.27/drivers/video/platinumfb.c linux-2.6.27.19-5.1/drivers/v
        .name           = "platinumfb",
        .match_table    = platinumfb_match,
        .probe          = platinumfb_probe,
-diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/ps3fb.c
---- linux-2.6.27/drivers/video/ps3fb.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/ps3fb.c  2009-03-25 16:11:28.000000000 +0000
-@@ -460,12 +460,16 @@ static void ps3fb_sync_image(struct devi
+diff -r 9608d5473017 drivers/video/ps3fb.c
+--- a/drivers/video/ps3fb.c    Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/ps3fb.c    Wed May 06 16:56:45 2009 +0100
+@@ -460,12 +460,16 @@
                line_length |= (u64)src_line_length << 32;
  
        src_offset += GPU_FB_START;
@@ -903963,7 +903823,7 @@ diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/
        if (status)
                dev_err(dev,
                        "%s: lv1_gpu_context_attribute FB_BLIT failed: %d\n",
-@@ -784,15 +788,6 @@ static int ps3fb_wait_for_vsync(u32 crtc
+@@ -784,15 +788,6 @@
        return 0;
  }
  
@@ -903979,7 +903839,7 @@ diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/
  
      /*
       * ioctl
-@@ -1228,7 +1223,6 @@ static int __devinit ps3fb_probe(struct 
+@@ -1228,7 +1223,6 @@
        }
  
        ps3fb.task = task;
@@ -903987,7 +903847,7 @@ diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/
  
        return 0;
  
-@@ -1258,10 +1252,9 @@ static int ps3fb_shutdown(struct ps3_sys
+@@ -1258,10 +1252,9 @@
  
        dev_dbg(&dev->core, " -> %s:%d\n", __func__, __LINE__);
  
@@ -903999,10 +903859,10 @@ diff -purN linux-2.6.27/drivers/video/ps3fb.c linux-2.6.27.19-5.1/drivers/video/
        if (ps3fb.task) {
                struct task_struct *task = ps3fb.task;
                ps3fb.task = NULL;
-diff -purN linux-2.6.27/drivers/video/tcx.c linux-2.6.27.19-5.1/drivers/video/tcx.c
---- linux-2.6.27/drivers/video/tcx.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/tcx.c    2009-03-25 16:11:28.000000000 +0000
-@@ -514,6 +514,7 @@ static struct of_device_id tcx_match[] =
+diff -r 9608d5473017 drivers/video/tcx.c
+--- a/drivers/video/tcx.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/tcx.c      Wed May 06 16:56:45 2009 +0100
+@@ -514,6 +514,7 @@
  MODULE_DEVICE_TABLE(of, tcx_match);
  
  static struct of_platform_driver tcx_driver = {
@@ -904010,10 +903870,10 @@ diff -purN linux-2.6.27/drivers/video/tcx.c linux-2.6.27.19-5.1/drivers/video/tc
        .name           = "tcx",
        .match_table    = tcx_match,
        .probe          = tcx_probe,
-diff -purN linux-2.6.27/drivers/video/vesafb.c linux-2.6.27.19-5.1/drivers/video/vesafb.c
---- linux-2.6.27/drivers/video/vesafb.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/vesafb.c 2009-03-25 16:11:28.000000000 +0000
-@@ -174,7 +174,10 @@ static int vesafb_setcolreg(unsigned reg
+diff -r 9608d5473017 drivers/video/vesafb.c
+--- a/drivers/video/vesafb.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/vesafb.c   Wed May 06 16:56:45 2009 +0100
+@@ -174,7 +174,10 @@
        return err;
  }
  
@@ -904025,7 +903885,7 @@ diff -purN linux-2.6.27/drivers/video/vesafb.c linux-2.6.27.19-5.1/drivers/video
        .owner          = THIS_MODULE,
        .fb_setcolreg   = vesafb_setcolreg,
        .fb_pan_display = vesafb_pan_display,
-@@ -258,6 +261,9 @@ static int __init vesafb_probe(struct pl
+@@ -258,6 +261,9 @@
         *                 option to simply use size_total as that
         *                 wastes plenty of kernel address space. */
        size_remap  = size_vmode * 2;
@@ -904035,10 +903895,10 @@ diff -purN linux-2.6.27/drivers/video/vesafb.c linux-2.6.27.19-5.1/drivers/video
        if (vram_remap)
                size_remap = vram_remap * 1024 * 1024;
        if (size_remap < size_vmode)
-diff -purN linux-2.6.27/drivers/video/xen-fbfront.c linux-2.6.27.19-5.1/drivers/video/xen-fbfront.c
---- linux-2.6.27/drivers/video/xen-fbfront.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/video/xen-fbfront.c    2009-03-25 16:11:28.000000000 +0000
-@@ -670,7 +670,6 @@ static struct xenbus_device_id xenfb_ids
+diff -r 9608d5473017 drivers/video/xen-fbfront.c
+--- a/drivers/video/xen-fbfront.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/video/xen-fbfront.c      Wed May 06 16:56:45 2009 +0100
+@@ -670,7 +670,6 @@
  
  static struct xenbus_driver xenfb = {
        .name = "vfb",
@@ -904046,10 +903906,10 @@ diff -purN linux-2.6.27/drivers/video/xen-fbfront.c linux-2.6.27.19-5.1/drivers/
        .ids = xenfb_ids,
        .probe = xenfb_probe,
        .remove = xenfb_remove,
-diff -purN linux-2.6.27/drivers/w1/slaves/w1_therm.c linux-2.6.27.19-5.1/drivers/w1/slaves/w1_therm.c
---- linux-2.6.27/drivers/w1/slaves/w1_therm.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/w1/slaves/w1_therm.c   2009-03-25 16:11:29.000000000 +0000
-@@ -113,7 +113,7 @@ static struct w1_therm_family_converter 
+diff -r 9608d5473017 drivers/w1/slaves/w1_therm.c
+--- a/drivers/w1/slaves/w1_therm.c     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/w1/slaves/w1_therm.c     Wed May 06 16:56:45 2009 +0100
+@@ -113,7 +113,7 @@
  
  static inline int w1_DS18B20_convert_temp(u8 rom[9])
  {
@@ -904058,9 +903918,9 @@ diff -purN linux-2.6.27/drivers/w1/slaves/w1_therm.c linux-2.6.27.19-5.1/drivers
        t = t*1000/16;
        return t;
  }
-diff -purN linux-2.6.27/drivers/watchdog/hpwdt.c linux-2.6.27.19-5.1/drivers/watchdog/hpwdt.c
---- linux-2.6.27/drivers/watchdog/hpwdt.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/watchdog/hpwdt.c       2009-03-25 16:11:28.000000000 +0000
+diff -r 9608d5473017 drivers/watchdog/hpwdt.c
+--- a/drivers/watchdog/hpwdt.c Wed May 06 15:47:13 2009 +0100
++++ b/drivers/watchdog/hpwdt.c Wed May 06 16:56:45 2009 +0100
 @@ -40,6 +40,7 @@
  #include <linux/bootmem.h>
  #include <linux/slab.h>
@@ -904069,7 +903929,7 @@ diff -purN linux-2.6.27/drivers/watchdog/hpwdt.c linux-2.6.27.19-5.1/drivers/wat
  
  #define PCI_BIOS32_SD_VALUE           0x5F32335F      /* "_32_" */
  #define CRU_BIOS_SIGNATURE_VALUE      0x55524324
-@@ -394,6 +395,8 @@ static void __devinit dmi_find_cru(const
+@@ -394,6 +395,8 @@
                                smbios_cru64_ptr->double_offset;
                        cru_rom_addr = ioremap(cru_physical_address,
                                smbios_cru64_ptr->double_length);
@@ -904078,7 +903938,7 @@ diff -purN linux-2.6.27/drivers/watchdog/hpwdt.c linux-2.6.27.19-5.1/drivers/wat
                }
        }
  }
-@@ -482,7 +485,7 @@ static int hpwdt_pretimeout(struct notif
+@@ -482,7 +485,7 @@
                        "Management Log for details.\n");
        }
  
@@ -904087,10 +903947,10 @@ diff -purN linux-2.6.27/drivers/watchdog/hpwdt.c linux-2.6.27.19-5.1/drivers/wat
  }
  
  /*
-diff -purN linux-2.6.27/drivers/watchdog/ib700wdt.c linux-2.6.27.19-5.1/drivers/watchdog/ib700wdt.c
---- linux-2.6.27/drivers/watchdog/ib700wdt.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/watchdog/ib700wdt.c    2009-03-25 16:11:28.000000000 +0000
-@@ -154,7 +154,7 @@ static int ibwdt_set_heartbeat(int t)
+diff -r 9608d5473017 drivers/watchdog/ib700wdt.c
+--- a/drivers/watchdog/ib700wdt.c      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/watchdog/ib700wdt.c      Wed May 06 16:56:45 2009 +0100
+@@ -154,7 +154,7 @@
                return -EINVAL;
  
        for (i = 0x0F; i > -1; i--)
@@ -904099,9 +903959,9 @@ diff -purN linux-2.6.27/drivers/watchdog/ib700wdt.c linux-2.6.27.19-5.1/drivers/
                        break;
        wd_margin = i;
        return 0;
-diff -purN linux-2.6.27/drivers/xen/Kconfig linux-2.6.27.19-5.1/drivers/xen/Kconfig
---- linux-2.6.27/drivers/xen/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/Kconfig    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/Kconfig
+--- a/drivers/xen/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/Kconfig      Wed May 06 16:56:45 2009 +0100
 @@ -1,6 +1,338 @@
 +#
 +# This Kconfig describe xen options
@@ -904443,7 +904303,7 @@ diff -purN linux-2.6.27/drivers/xen/Kconfig linux-2.6.27.19-5.1/drivers/xen/Kcon
        default y
        help
          The balloon driver allows the Xen domain to request more memory from
-@@ -8,12 +340,14 @@ config XEN_BALLOON
+@@ -8,12 +340,14 @@
          return unneeded memory to the system.
  
  config XEN_SCRUB_PAGES
@@ -904464,9 +904324,9 @@ diff -purN linux-2.6.27/drivers/xen/Kconfig linux-2.6.27.19-5.1/drivers/xen/Kcon
 +        If security is not a concern then you may increase performance by
 +        saying N.
          If in doubt, say yes.
-diff -purN linux-2.6.27/drivers/xen/Makefile linux-2.6.27.19-5.1/drivers/xen/Makefile
---- linux-2.6.27/drivers/xen/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/Makefile
+--- a/drivers/xen/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -1,4 +1,31 @@
 -obj-y += grant-table.o features.o events.o manage.o
 -obj-y += xenbus/
@@ -904503,15 +904363,15 @@ diff -purN linux-2.6.27/drivers/xen/Makefile linux-2.6.27.19-5.1/drivers/xen/Mak
 +obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_UTIL)               += sfc_netutil/
 +obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND)   += sfc_netfront/
 +obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_BACKEND)    += sfc_netback/
-diff -purN linux-2.6.27/drivers/xen/balloon/Makefile linux-2.6.27.19-5.1/drivers/xen/balloon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2 @@
 +
 +obj-y := balloon.o sysfs.o
-diff -purN linux-2.6.27/drivers/xen/balloon/balloon.c linux-2.6.27.19-5.1/drivers/xen/balloon/balloon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/balloon.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/balloon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/balloon.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,740 @@
 +/******************************************************************************
 + * balloon.c
@@ -905253,9 +905113,9 @@ diff -purN linux-2.6.27/drivers/xen/balloon/balloon.c linux-2.6.27.19-5.1/driver
 +EXPORT_SYMBOL_GPL(balloon_release_driver_page);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/balloon/common.h linux-2.6.27.19-5.1/drivers/xen/balloon/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/common.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/common.h     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,60 @@
 +/******************************************************************************
 + * balloon/common.h
@@ -905317,9 +905177,9 @@ diff -purN linux-2.6.27/drivers/xen/balloon/common.h linux-2.6.27.19-5.1/drivers
 +unsigned long balloon_minimum_target(void);
 +
 +#endif /* __XEN_BALLOON_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/balloon/sysfs.c linux-2.6.27.19-5.1/drivers/xen/balloon/sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/balloon/sysfs.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/balloon/sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/balloon/sysfs.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,178 @@
 +/******************************************************************************
 + * balloon/sysfs.c
@@ -905499,16 +905359,16 @@ diff -purN linux-2.6.27/drivers/xen/balloon/sysfs.c linux-2.6.27.19-5.1/drivers/
 +{
 +      unregister_balloon(&balloon_sysdev);
 +}
-diff -purN linux-2.6.27/drivers/xen/blkback/Makefile linux-2.6.27.19-5.1/drivers/xen/blkback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,3 @@
 +obj-$(CONFIG_XEN_BLKDEV_BACKEND) := blkbk.o
 +
 +blkbk-y       := blkback.o xenbus.o interface.o vbd.o cdrom.o
-diff -purN linux-2.6.27/drivers/xen/blkback/blkback.c linux-2.6.27.19-5.1/drivers/xen/blkback/blkback.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/blkback.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/blkback.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/blkback.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,664 @@
 +/******************************************************************************
 + * arch/xen/drivers/blkif/backend/main.c
@@ -906174,9 +906034,9 @@ diff -purN linux-2.6.27/drivers/xen/blkback/blkback.c linux-2.6.27.19-5.1/driver
 +module_init(blkif_init);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blkback/cdrom.c linux-2.6.27.19-5.1/drivers/xen/blkback/cdrom.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/cdrom.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/cdrom.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/cdrom.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,162 @@
 +/******************************************************************************
 + * blkback/cdrom.c
@@ -906340,9 +906200,9 @@ diff -purN linux-2.6.27/drivers/xen/blkback/cdrom.c linux-2.6.27.19-5.1/drivers/
 +              }
 +      }
 +}
-diff -purN linux-2.6.27/drivers/xen/blkback/common.h linux-2.6.27.19-5.1/drivers/xen/blkback/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/common.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/common.h     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,154 @@
 +/* 
 + * This program is free software; you can redistribute it and/or
@@ -906498,9 +906358,9 @@ diff -purN linux-2.6.27/drivers/xen/blkback/common.h linux-2.6.27.19-5.1/drivers
 +void cdrom_add_media_watch(struct backend_info *be);
 +
 +#endif /* __BLKIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/blkback/interface.c linux-2.6.27.19-5.1/drivers/xen/blkback/interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/interface.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/interface.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,181 @@
 +/******************************************************************************
 + * arch/xen/drivers/blkif/backend/interface.c
@@ -906683,9 +906543,9 @@ diff -purN linux-2.6.27/drivers/xen/blkback/interface.c linux-2.6.27.19-5.1/driv
 +      blkif_cachep = kmem_cache_create("blkif_cache", sizeof(blkif_t), 
 +                                       0, 0, NULL);
 +}
-diff -purN linux-2.6.27/drivers/xen/blkback/vbd.c linux-2.6.27.19-5.1/drivers/xen/blkback/vbd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/vbd.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/vbd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/vbd.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,121 @@
 +/******************************************************************************
 + * blkback/vbd.c
@@ -906808,9 +906668,9 @@ diff -purN linux-2.6.27/drivers/xen/blkback/vbd.c linux-2.6.27.19-5.1/drivers/xe
 + out:
 +      return rc;
 +}
-diff -purN linux-2.6.27/drivers/xen/blkback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/blkback/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkback/xenbus.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkback/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkback/xenbus.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,549 @@
 +/*  Xenbus code for blkif backend
 +    Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
@@ -907361,18 +907221,18 @@ diff -purN linux-2.6.27/drivers/xen/blkback/xenbus.c linux-2.6.27.19-5.1/drivers
 +      if (xenbus_register_backend(&blkback))
 +              BUG();
 +}
-diff -purN linux-2.6.27/drivers/xen/blkfront/Makefile linux-2.6.27.19-5.1/drivers/xen/blkfront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/Makefile  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/Makefile    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,5 @@
 +
 +obj-$(CONFIG_XEN_BLKDEV_FRONTEND)     := xenblk.o
 +
 +xenblk-objs := blkfront.o vbd.o vcd.o
 +
-diff -purN linux-2.6.27/drivers/xen/blkfront/blkfront.c linux-2.6.27.19-5.1/drivers/xen/blkfront/blkfront.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/blkfront.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/blkfront.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/blkfront.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,936 @@
 +/******************************************************************************
 + * blkfront.c
@@ -908310,9 +908170,9 @@ diff -purN linux-2.6.27/drivers/xen/blkfront/blkfront.c linux-2.6.27.19-5.1/driv
 +module_exit(xlblk_exit);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blkfront/block.h linux-2.6.27.19-5.1/drivers/xen/blkfront/block.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/block.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/block.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/block.h     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,162 @@
 +/******************************************************************************
 + * block.h
@@ -908476,9 +908336,9 @@ diff -purN linux-2.6.27/drivers/xen/blkfront/block.h linux-2.6.27.19-5.1/drivers
 +extern void unregister_vcd(struct blkfront_info *info);
 +
 +#endif /* __XEN_DRIVERS_BLOCK_H__ */
-diff -purN linux-2.6.27/drivers/xen/blkfront/vbd.c linux-2.6.27.19-5.1/drivers/xen/blkfront/vbd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/vbd.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/vbd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/vbd.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,441 @@
 +/******************************************************************************
 + * vbd.c
@@ -908921,9 +908781,9 @@ diff -purN linux-2.6.27/drivers/xen/blkfront/vbd.c linux-2.6.27.19-5.1/drivers/x
 +}
 +
 +#endif /* CONFIG_SYSFS */
-diff -purN linux-2.6.27/drivers/xen/blkfront/vcd.c linux-2.6.27.19-5.1/drivers/xen/blkfront/vcd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blkfront/vcd.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blkfront/vcd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blkfront/vcd.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,476 @@
 +/*******************************************************************************
 +* vcd.c
@@ -909401,18 +909261,18 @@ diff -purN linux-2.6.27/drivers/xen/blkfront/vcd.c linux-2.6.27.19-5.1/drivers/x
 +      spin_unlock(&vcd_disks_lock);
 +}
 +
-diff -purN linux-2.6.27/drivers/xen/blktap/Makefile linux-2.6.27.19-5.1/drivers/xen/blktap/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/Makefile    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/Makefile      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,5 @@
 +LINUXINCLUDE += -I../xen/include/public/io
 +
 +obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o
 +
 +blktap-y := xenbus.o interface.o blocktap.o
-diff -purN linux-2.6.27/drivers/xen/blktap/blktap.c linux-2.6.27.19-5.1/drivers/xen/blktap/blktap.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/blktap.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/blktap.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/blktap.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,1730 @@
 +/******************************************************************************
 + * drivers/xen/blktap/blktap.c
@@ -911144,14 +911004,14 @@ diff -purN linux-2.6.27/drivers/xen/blktap/blktap.c linux-2.6.27.19-5.1/drivers/
 +module_init(blkif_init);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/blktap/blocktap.c linux-2.6.27.19-5.1/drivers/xen/blktap/blocktap.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/blocktap.c  2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/blktap/blocktap.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/blocktap.c    Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
 +#include "blktap.c"
-diff -purN linux-2.6.27/drivers/xen/blktap/common.h linux-2.6.27.19-5.1/drivers/xen/blktap/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/common.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/common.h      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,123 @@
 +/* 
 + * This program is free software; you can redistribute it and/or
@@ -911276,9 +911136,9 @@ diff -purN linux-2.6.27/drivers/xen/blktap/common.h linux-2.6.27.19-5.1/drivers/
 +void signal_tapdisk(int idx);
 +
 +#endif /* __BLKIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/blktap/interface.c linux-2.6.27.19-5.1/drivers/xen/blktap/interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/interface.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/interface.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,181 @@
 +/******************************************************************************
 + * drivers/xen/blktap/interface.c
@@ -911461,9 +911321,9 @@ diff -purN linux-2.6.27/drivers/xen/blktap/interface.c linux-2.6.27.19-5.1/drive
 +      blkif_cachep = kmem_cache_create("blktapif_cache", sizeof(blkif_t), 
 +                                       0, 0, NULL);
 +}
-diff -purN linux-2.6.27/drivers/xen/blktap/xenbus.c linux-2.6.27.19-5.1/drivers/xen/blktap/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/blktap/xenbus.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/blktap/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/blktap/xenbus.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,509 @@
 +/* drivers/xen/blktap/xenbus.c
 + *
@@ -911974,14 +911834,14 @@ diff -purN linux-2.6.27/drivers/xen/blktap/xenbus.c linux-2.6.27.19-5.1/drivers/
 +      if (xenbus_register_backend(&blktap))
 +              BUG();
 +}
-diff -purN linux-2.6.27/drivers/xen/char/Makefile linux-2.6.27.19-5.1/drivers/xen/char/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/char/Makefile      2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/char/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/char/Makefile        Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_XEN_DEVMEM)      := mem.o
-diff -purN linux-2.6.27/drivers/xen/char/mem.c linux-2.6.27.19-5.1/drivers/xen/char/mem.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/char/mem.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/char/mem.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/char/mem.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,245 @@
 +/*
 + *  Originally from linux/drivers/char/mem.c
@@ -912228,15 +912088,15 @@ diff -purN linux-2.6.27/drivers/xen/char/mem.c linux-2.6.27.19-5.1/drivers/xen/c
 +      .mmap           = xen_mmap_mem,
 +      .open           = open_mem,
 +};
-diff -purN linux-2.6.27/drivers/xen/console/Makefile linux-2.6.27.19-5.1/drivers/xen/console/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2 @@
 +
 +obj-y := console.o xencons_ring.o
-diff -purN linux-2.6.27/drivers/xen/console/console.c linux-2.6.27.19-5.1/drivers/xen/console/console.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/console.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/console.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/console.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,747 @@
 +/******************************************************************************
 + * console.c
@@ -912985,9 +912845,9 @@ diff -purN linux-2.6.27/drivers/xen/console/console.c linux-2.6.27.19-5.1/driver
 +module_init(xencons_init);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/console/xencons_ring.c linux-2.6.27.19-5.1/drivers/xen/console/xencons_ring.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/console/xencons_ring.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/console/xencons_ring.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/console/xencons_ring.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,143 @@
 +/* 
 + * This program is free software; you can redistribute it and/or
@@ -913132,9 +912992,9 @@ diff -purN linux-2.6.27/drivers/xen/console/xencons_ring.c linux-2.6.27.19-5.1/d
 +{
 +      (void)xencons_ring_init();
 +}
-diff -purN linux-2.6.27/drivers/xen/core/Makefile linux-2.6.27.19-5.1/drivers/xen/core/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/Makefile      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/Makefile        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,15 @@
 +#
 +# Makefile for the linux kernel.
@@ -913151,9 +913011,9 @@ diff -purN linux-2.6.27/drivers/xen/core/Makefile linux-2.6.27.19-5.1/drivers/xe
 +obj-$(CONFIG_X86_SMP)         += spinlock.o
 +obj-$(CONFIG_KEXEC)           += machine_kexec.o
 +obj-$(CONFIG_XEN_XENCOMM)     += xencomm.o
-diff -purN linux-2.6.27/drivers/xen/core/cpu_hotplug.c linux-2.6.27.19-5.1/drivers/xen/core/cpu_hotplug.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/cpu_hotplug.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/cpu_hotplug.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/cpu_hotplug.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,173 @@
 +#include <linux/init.h>
 +#include <linux/kernel.h>
@@ -913328,9 +913188,9 @@ diff -purN linux-2.6.27/drivers/xen/core/cpu_hotplug.c linux-2.6.27.19-5.1/drive
 +{
 +      xenbus_allowed_cpumask = cpu_present_map;
 +}
-diff -purN linux-2.6.27/drivers/xen/core/domctl.c linux-2.6.27.19-5.1/drivers/xen/core/domctl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/domctl.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/domctl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/domctl.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,113 @@
 +/*
 + * !!!  dirty hack alert  !!!
@@ -913445,15 +913305,15 @@ diff -purN linux-2.6.27/drivers/xen/core/domctl.c linux-2.6.27.19-5.1/drivers/xe
 +      return BLKIF_PROTOCOL_NATIVE;
 +}
 +EXPORT_SYMBOL_GPL(xen_guest_blkif_protocol);
-diff -purN linux-2.6.27/drivers/xen/core/domctl.h linux-2.6.27.19-5.1/drivers/xen/core/domctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/domctl.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/domctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/domctl.h        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2 @@
 +int xen_guest_address_size(int domid);
 +int xen_guest_blkif_protocol(int domid);
-diff -purN linux-2.6.27/drivers/xen/core/evtchn.c linux-2.6.27.19-5.1/drivers/xen/core/evtchn.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/evtchn.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/evtchn.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/evtchn.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,1678 @@
 +/******************************************************************************
 + * evtchn.c
@@ -915133,9 +914993,9 @@ diff -purN linux-2.6.27/drivers/xen/core/evtchn.c linux-2.6.27.19-5.1/drivers/xe
 +                                            handle_level_irq, "level");
 +      }
 +}
-diff -purN linux-2.6.27/drivers/xen/core/features.c linux-2.6.27.19-5.1/drivers/xen/core/features.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/features.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/features.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/features.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,34 @@
 +/******************************************************************************
 + * features.c
@@ -915171,9 +915031,9 @@ diff -purN linux-2.6.27/drivers/xen/core/features.c linux-2.6.27.19-5.1/drivers/
 +                      xen_features[i*32+j] = !!(fi.submap & 1<<j);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/xen/core/firmware.c linux-2.6.27.19-5.1/drivers/xen/core/firmware.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/firmware.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/firmware.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/firmware.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,74 @@
 +#include <linux/kernel.h>
 +#include <linux/errno.h>
@@ -915249,9 +915109,9 @@ diff -purN linux-2.6.27/drivers/xen/core/firmware.c linux-2.6.27.19-5.1/drivers/
 +              memset(edid_info.dummy, 0x13, sizeof(edid_info.dummy));
 +#endif
 +}
-diff -purN linux-2.6.27/drivers/xen/core/gnttab.c linux-2.6.27.19-5.1/drivers/xen/core/gnttab.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/gnttab.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/gnttab.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/gnttab.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,884 @@
 +/******************************************************************************
 + * gnttab.c
@@ -916137,9 +915997,9 @@ diff -purN linux-2.6.27/drivers/xen/core/gnttab.c linux-2.6.27.19-5.1/drivers/xe
 +#ifdef CONFIG_XEN
 +core_initcall(gnttab_init);
 +#endif
-diff -purN linux-2.6.27/drivers/xen/core/hypervisor_sysfs.c linux-2.6.27.19-5.1/drivers/xen/core/hypervisor_sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/hypervisor_sysfs.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/hypervisor_sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/hypervisor_sysfs.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + *  copyright (c) 2006 IBM Corporation
@@ -916198,9 +916058,9 @@ diff -purN linux-2.6.27/drivers/xen/core/hypervisor_sysfs.c linux-2.6.27.19-5.1/
 +}
 +
 +device_initcall(hypervisor_subsys_init);
-diff -purN linux-2.6.27/drivers/xen/core/machine_kexec.c linux-2.6.27.19-5.1/drivers/xen/core/machine_kexec.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/machine_kexec.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/machine_kexec.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/machine_kexec.c Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,234 @@
 +/*
 + * drivers/xen/core/machine_kexec.c 
@@ -916436,9 +916296,9 @@ diff -purN linux-2.6.27/drivers/xen/core/machine_kexec.c linux-2.6.27.19-5.1/dri
 + *  tab-width: 8
 + * End:
 + */
-diff -purN linux-2.6.27/drivers/xen/core/machine_reboot.c linux-2.6.27.19-5.1/drivers/xen/core/machine_reboot.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/machine_reboot.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/machine_reboot.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/machine_reboot.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,261 @@
 +#include <linux/version.h>
 +#include <linux/kernel.h>
@@ -916701,9 +916561,9 @@ diff -purN linux-2.6.27/drivers/xen/core/machine_reboot.c linux-2.6.27.19-5.1/dr
 +      return 0;
 +}
 +#endif
-diff -purN linux-2.6.27/drivers/xen/core/pci.c linux-2.6.27.19-5.1/drivers/xen/core/pci.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/pci.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/pci.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/pci.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,59 @@
 +/*
 + * vim:shiftwidth=8:noexpandtab
@@ -916764,9 +916624,9 @@ diff -purN linux-2.6.27/drivers/xen/core/pci.c linux-2.6.27.19-5.1/drivers/xen/c
 +}
 +
 +core_initcall(hook_pci_bus);
-diff -purN linux-2.6.27/drivers/xen/core/reboot.c linux-2.6.27.19-5.1/drivers/xen/core/reboot.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/reboot.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/reboot.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/reboot.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,349 @@
 +#define __KERNEL_SYSCALLS__
 +#include <linux/version.h>
@@ -917117,9 +916977,9 @@ diff -purN linux-2.6.27/drivers/xen/core/reboot.c linux-2.6.27.19-5.1/drivers/xe
 +}
 +
 +#endif /* !defined(CONFIG_XEN) */
-diff -purN linux-2.6.27/drivers/xen/core/smpboot.c linux-2.6.27.19-5.1/drivers/xen/core/smpboot.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/smpboot.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/smpboot.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/smpboot.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,457 @@
 +/*
 + *    Xen SMP booting functions
@@ -917578,9 +917438,9 @@ diff -purN linux-2.6.27/drivers/xen/core/smpboot.c linux-2.6.27.19-5.1/drivers/x
 +      return -EINVAL;
 +}
 +#endif
-diff -purN linux-2.6.27/drivers/xen/core/spinlock.c linux-2.6.27.19-5.1/drivers/xen/core/spinlock.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/spinlock.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/spinlock.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/spinlock.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,163 @@
 +/*
 + *    Xen spinlock functions
@@ -917745,9 +917605,9 @@ diff -purN linux-2.6.27/drivers/xen/core/spinlock.c linux-2.6.27.19-5.1/drivers/
 +      }
 +}
 +EXPORT_SYMBOL(xen_spin_kick);
-diff -purN linux-2.6.27/drivers/xen/core/xen_proc.c linux-2.6.27.19-5.1/drivers/xen/core/xen_proc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xen_proc.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xen_proc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xen_proc.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,23 @@
 +
 +#include <linux/module.h>
@@ -917772,9 +917632,9 @@ diff -purN linux-2.6.27/drivers/xen/core/xen_proc.c linux-2.6.27.19-5.1/drivers/
 +}
 +
 +EXPORT_SYMBOL_GPL(remove_xen_proc_entry); 
-diff -purN linux-2.6.27/drivers/xen/core/xen_sysfs.c linux-2.6.27.19-5.1/drivers/xen/core/xen_sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xen_sysfs.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xen_sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xen_sysfs.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,421 @@
 +/*
 + *  copyright (c) 2006 IBM Corporation
@@ -918197,9 +918057,9 @@ diff -purN linux-2.6.27/drivers/xen/core/xen_sysfs.c linux-2.6.27.19-5.1/drivers
 +
 +module_init(hyper_sysfs_init);
 +module_exit(hyper_sysfs_exit);
-diff -purN linux-2.6.27/drivers/xen/core/xencomm.c linux-2.6.27.19-5.1/drivers/xen/core/xencomm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/core/xencomm.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/core/xencomm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/core/xencomm.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,229 @@
 +/*
 + * This program is free software; you can redistribute it and/or modify
@@ -918430,15 +918290,15 @@ diff -purN linux-2.6.27/drivers/xen/core/xencomm.c linux-2.6.27.19-5.1/drivers/x
 + 
 +      return xencomm_pa(desc);
 +}
-diff -purN linux-2.6.27/drivers/xen/evtchn/Makefile linux-2.6.27.19-5.1/drivers/xen/evtchn/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/evtchn/Makefile    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/evtchn/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/evtchn/Makefile      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2 @@
 +
 +obj-y := evtchn.o
-diff -purN linux-2.6.27/drivers/xen/evtchn/evtchn.c linux-2.6.27.19-5.1/drivers/xen/evtchn/evtchn.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/evtchn/evtchn.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/evtchn/evtchn.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/evtchn/evtchn.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,562 @@
 +/******************************************************************************
 + * evtchn.c
@@ -919002,15 +918862,15 @@ diff -purN linux-2.6.27/drivers/xen/evtchn/evtchn.c linux-2.6.27.19-5.1/drivers/
 +module_exit(evtchn_cleanup);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/fbfront/Makefile linux-2.6.27.19-5.1/drivers/xen/fbfront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2 @@
 +obj-$(CONFIG_XEN_FRAMEBUFFER) := xenfb.o
 +obj-$(CONFIG_XEN_KEYBOARD)    += xenkbd.o
-diff -purN linux-2.6.27/drivers/xen/fbfront/xenfb.c linux-2.6.27.19-5.1/drivers/xen/fbfront/xenfb.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/xenfb.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/xenfb.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/xenfb.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,909 @@
 +/*
 + * linux/drivers/video/xenfb.c -- Xen para-virtual frame buffer device
@@ -919921,9 +919781,9 @@ diff -purN linux-2.6.27/drivers/xen/fbfront/xenfb.c linux-2.6.27.19-5.1/drivers/
 +
 +MODULE_DESCRIPTION("Xen virtual framebuffer device frontend");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/fbfront/xenkbd.c linux-2.6.27.19-5.1/drivers/xen/fbfront/xenkbd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/fbfront/xenkbd.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/fbfront/xenkbd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/fbfront/xenkbd.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,354 @@
 +/*
 + * linux/drivers/input/keyboard/xenkbd.c -- Xen para-virtual input device
@@ -920279,14 +920139,14 @@ diff -purN linux-2.6.27/drivers/xen/fbfront/xenkbd.c linux-2.6.27.19-5.1/drivers
 +
 +MODULE_DESCRIPTION("Xen virtual keyboard/pointer device frontend");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/gntdev/Makefile linux-2.6.27.19-5.1/drivers/xen/gntdev/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/gntdev/Makefile    2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 drivers/xen/gntdev/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/gntdev/Makefile      Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_XEN_GRANT_DEV) := gntdev.o
-diff -purN linux-2.6.27/drivers/xen/gntdev/gntdev.c linux-2.6.27.19-5.1/drivers/xen/gntdev/gntdev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/gntdev/gntdev.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/gntdev/gntdev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/gntdev/gntdev.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,1075 @@
 +/******************************************************************************
 + * gntdev.c
@@ -921363,18 +921223,18 @@ diff -purN linux-2.6.27/drivers/xen/gntdev/gntdev.c linux-2.6.27.19-5.1/drivers/
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/netback/Makefile linux-2.6.27.19-5.1/drivers/xen/netback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,5 @@
 +obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o
 +obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o
 +
 +netbk-y   := netback.o xenbus.o interface.o accel.o
 +netloop-y := loopback.o
-diff -purN linux-2.6.27/drivers/xen/netback/accel.c linux-2.6.27.19-5.1/drivers/xen/netback/accel.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/accel.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/accel.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/accel.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,269 @@
 +/******************************************************************************
 + * drivers/xen/netback/accel.c
@@ -921645,9 +921505,9 @@ diff -purN linux-2.6.27/drivers/xen/netback/accel.c linux-2.6.27.19-5.1/drivers/
 +{
 +      INIT_LIST_HEAD(&accelerators_list);
 +}
-diff -purN linux-2.6.27/drivers/xen/netback/common.h linux-2.6.27.19-5.1/drivers/xen/netback/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/common.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/common.h     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,217 @@
 +/******************************************************************************
 + * arch/xen/drivers/netif/backend/common.h
@@ -921866,9 +921726,9 @@ diff -purN linux-2.6.27/drivers/xen/netback/common.h linux-2.6.27.19-5.1/drivers
 +}
 +
 +#endif /* __NETIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/netback/interface.c linux-2.6.27.19-5.1/drivers/xen/netback/interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/interface.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/interface.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,344 @@
 +/******************************************************************************
 + * arch/xen/drivers/netif/backend/interface.c
@@ -922214,9 +922074,9 @@ diff -purN linux-2.6.27/drivers/xen/netback/interface.c linux-2.6.27.19-5.1/driv
 +
 +      free_netdev(netif->dev);
 +}
-diff -purN linux-2.6.27/drivers/xen/netback/loopback.c linux-2.6.27.19-5.1/drivers/xen/netback/loopback.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/loopback.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/loopback.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/loopback.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,325 @@
 +/******************************************************************************
 + * netback/loopback.c
@@ -922543,9 +922403,9 @@ diff -purN linux-2.6.27/drivers/xen/netback/loopback.c linux-2.6.27.19-5.1/drive
 +module_exit(loopback_exit);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netback/netback.c linux-2.6.27.19-5.1/drivers/xen/netback/netback.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/netback.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/netback.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/netback.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,1652 @@
 +/******************************************************************************
 + * drivers/xen/netback/netback.c
@@ -924199,9 +924059,9 @@ diff -purN linux-2.6.27/drivers/xen/netback/netback.c linux-2.6.27.19-5.1/driver
 +module_init(netback_init);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/netback/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netback/xenbus.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netback/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netback/xenbus.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,448 @@
 +/*  Xenbus code for netif backend
 +    Copyright (C) 2005 Rusty Russell <rusty@rustcorp.com.au>
@@ -924651,17 +924511,17 @@ diff -purN linux-2.6.27/drivers/xen/netback/xenbus.c linux-2.6.27.19-5.1/drivers
 +      if (xenbus_register_backend(&netback))
 +              BUG();
 +}
-diff -purN linux-2.6.27/drivers/xen/netfront/Makefile linux-2.6.27.19-5.1/drivers/xen/netfront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/Makefile  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/Makefile    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,4 @@
 +
 +obj-$(CONFIG_XEN_NETDEV_FRONTEND)     := xennet.o
 +
 +xennet-objs := netfront.o accel.o
-diff -purN linux-2.6.27/drivers/xen/netfront/accel.c linux-2.6.27.19-5.1/drivers/xen/netfront/accel.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/accel.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/accel.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/accel.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,825 @@
 +/******************************************************************************
 + * Virtual network driver for conversing with remote driver backends.
@@ -925488,9 +925348,9 @@ diff -purN linux-2.6.27/drivers/xen/netfront/accel.c linux-2.6.27.19-5.1/drivers
 +      return rc;
 +}
 +
-diff -purN linux-2.6.27/drivers/xen/netfront/netfront.c linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/netfront.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/netfront.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,2227 @@
 +/******************************************************************************
 + * Virtual network driver for conversing with remote driver backends.
@@ -927719,9 +927579,9 @@ diff -purN linux-2.6.27/drivers/xen/netfront/netfront.c linux-2.6.27.19-5.1/driv
 +module_exit(netif_exit);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/netfront/netfront.h linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/netfront/netfront.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/netfront/netfront.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/netfront/netfront.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,276 @@
 +/******************************************************************************
 + * Virtual network driver for conversing with remote driver backends.
@@ -927999,9 +927859,9 @@ diff -purN linux-2.6.27/drivers/xen/netfront/netfront.h linux-2.6.27.19-5.1/driv
 +void init_accelerator_vif(struct netfront_info *np,
 +                        struct xenbus_device *dev);
 +#endif /* NETFRONT_H */
-diff -purN linux-2.6.27/drivers/xen/pciback/Makefile linux-2.6.27.19-5.1/drivers/xen/pciback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,15 @@
 +obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback.o
 +
@@ -928018,9 +927878,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/Makefile linux-2.6.27.19-5.1/drivers
 +pciback-$(CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER) += controller.o
 +
 +ccflags-$(CONFIG_XEN_PCIDEV_BE_DEBUG) += -DDEBUG
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space.c Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,426 @@
 +/*
 + * PCI Backend - Functions for creating a virtual configuration space for
@@ -928448,9 +928308,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.c linux-2.6.27.19-5.1/dri
 +{
 +      return pciback_config_capability_init();
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space.h Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,126 @@
 +/*
 + * PCI Backend - Common data structures for overriding the configuration space
@@ -928578,9 +928438,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space.h linux-2.6.27.19-5.1/dri
 +int pciback_config_capability_add_fields(struct pci_dev *dev);
 +
 +#endif                                /* __XEN_PCIBACK_CONF_SPACE_H__ */
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,69 @@
 +/*
 + * PCI Backend - Handles the virtual fields found on the capability lists
@@ -928651,9 +928511,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.c linux-2.6.27
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability.h      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,23 @@
 +/*
 + * PCI Backend - Data structures for special overlays for structures on
@@ -928678,9 +928538,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability.h linux-2.6.27
 +};
 +
 +#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_msi.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_msi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_msi.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_msi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_msi.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,79 @@
 +/*
 + * PCI Backend -- Configuration overlay for MSI capability
@@ -928761,9 +928621,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_msi.c linux-2.
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_pm.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_pm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_pm.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_pm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_pm.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,126 @@
 +/*
 + * PCI Backend - Configuration space overlay for power management
@@ -928891,9 +928751,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_pm.c linux-2.6
 +      .capability = PCI_CAP_ID_PM,
 +      .fields = caplist_pm,
 +};
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_vpd.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_vpd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_capability_vpd.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_capability_vpd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_capability_vpd.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,40 @@
 +/*
 + * PCI Backend - Configuration space overlay for Vital Product Data
@@ -928935,9 +928795,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_capability_vpd.c linux-2.
 +      .capability = PCI_CAP_ID_VPD,
 +      .fields = caplist_vpd,
 +};
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_header.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_header.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_header.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_header.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_header.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,317 @@
 +/*
 + * PCI Backend - Handles the virtual fields in the configuration space headers.
@@ -929256,9 +929116,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_header.c linux-2.6.27.19-
 +      out:
 +      return err;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.c linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_quirks.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_quirks.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,126 @@
 +/*
 + * PCI Backend - Handle special overlays for broken devices.
@@ -929386,9 +929246,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.c linux-2.6.27.19-
 +      out:
 +      return ret;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.h linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/conf_space_quirks.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/conf_space_quirks.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/conf_space_quirks.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,35 @@
 +/*
 + * PCI Backend - Data structures for special overlays for broken devices.
@@ -929425,9 +929285,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/conf_space_quirks.h linux-2.6.27.19-
 +int pciback_field_is_dup(struct pci_dev *dev, unsigned int reg);
 +
 +#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/controller.c linux-2.6.27.19-5.1/drivers/xen/pciback/controller.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/controller.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/controller.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/controller.c Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,408 @@
 +/*
 + * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
@@ -929837,9 +929697,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/controller.c linux-2.6.27.19-5.1/dri
 +      kfree(dev_data);
 +      pdev->pci_dev_data = NULL;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/passthrough.c linux-2.6.27.19-5.1/drivers/xen/pciback/passthrough.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/passthrough.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/passthrough.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/passthrough.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,166 @@
 +/*
 + * PCI Backend - Provides restricted access to the real PCI bus topology
@@ -930007,9 +929867,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/passthrough.c linux-2.6.27.19-5.1/dr
 +      kfree(dev_data);
 +      pdev->pci_dev_data = NULL;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/pci_stub.c linux-2.6.27.19-5.1/drivers/xen/pciback/pci_stub.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pci_stub.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pci_stub.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pci_stub.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,948 @@
 +/*
 + * PCI Stub Driver - Grabs devices in backend to be exported later
@@ -930959,9 +930819,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/pci_stub.c linux-2.6.27.19-5.1/drive
 +module_exit(pciback_cleanup);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/pciback/pciback.h linux-2.6.27.19-5.1/drivers/xen/pciback/pciback.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pciback.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pciback.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pciback.h    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,111 @@
 +/*
 + * PCI Backend Common Data Structures & Function Declarations
@@ -931074,9 +930934,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/pciback.h linux-2.6.27.19-5.1/driver
 +#endif
 +extern int verbose_request;
 +#endif
-diff -purN linux-2.6.27/drivers/xen/pciback/pciback_ops.c linux-2.6.27.19-5.1/drivers/xen/pciback/pciback_ops.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/pciback_ops.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/pciback_ops.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/pciback_ops.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,117 @@
 +/*
 + * PCI Backend Operations - respond to PCI requests from Frontend
@@ -931195,9 +931055,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/pciback_ops.c linux-2.6.27.19-5.1/dr
 +
 +      return IRQ_HANDLED;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/slot.c linux-2.6.27.19-5.1/drivers/xen/pciback/slot.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/slot.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/slot.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/slot.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,157 @@
 +/*
 + * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -931356,9 +931216,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/slot.c linux-2.6.27.19-5.1/drivers/x
 +      kfree(slot_dev);
 +      pdev->pci_dev_data = NULL;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/vpci.c linux-2.6.27.19-5.1/drivers/xen/pciback/vpci.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/vpci.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/vpci.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/vpci.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,212 @@
 +/*
 + * PCI Backend - Provides a Virtual PCI bus (with real devices)
@@ -931572,9 +931432,9 @@ diff -purN linux-2.6.27/drivers/xen/pciback/vpci.c linux-2.6.27.19-5.1/drivers/x
 +      kfree(vpci_dev);
 +      pdev->pci_dev_data = NULL;
 +}
-diff -purN linux-2.6.27/drivers/xen/pciback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/pciback/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pciback/xenbus.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pciback/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pciback/xenbus.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,702 @@
 +/*
 + * PCI Backend Xenbus Setup - handles setup with frontend and xend
@@ -932278,18 +932138,18 @@ diff -purN linux-2.6.27/drivers/xen/pciback/xenbus.c linux-2.6.27.19-5.1/drivers
 +{
 +      xenbus_unregister_driver(&xenbus_pciback_driver);
 +}
-diff -purN linux-2.6.27/drivers/xen/pcifront/Makefile linux-2.6.27.19-5.1/drivers/xen/pcifront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/Makefile  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/Makefile    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,5 @@
 +obj-y += pcifront.o
 +
 +pcifront-y := pci_op.o xenbus.o pci.o
 +
 +ccflags-$(CONFIG_XEN_PCIDEV_FE_DEBUG) += -DDEBUG
-diff -purN linux-2.6.27/drivers/xen/pcifront/pci.c linux-2.6.27.19-5.1/drivers/xen/pcifront/pci.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pci.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pci.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pci.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,46 @@
 +/*
 + * PCI Frontend Operations - ensure only one PCI frontend runs at a time
@@ -932337,9 +932197,9 @@ diff -purN linux-2.6.27/drivers/xen/pcifront/pci.c linux-2.6.27.19-5.1/drivers/x
 +
 +      spin_unlock(&pcifront_dev_lock);
 +}
-diff -purN linux-2.6.27/drivers/xen/pcifront/pci_op.c linux-2.6.27.19-5.1/drivers/xen/pcifront/pci_op.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pci_op.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pci_op.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pci_op.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,557 @@
 +/*
 + * PCI Frontend Operations - Communicates with frontend
@@ -932898,9 +932758,9 @@ diff -purN linux-2.6.27/drivers/xen/pcifront/pci_op.c linux-2.6.27.19-5.1/driver
 +              kfree(bus_entry);
 +      }
 +}
-diff -purN linux-2.6.27/drivers/xen/pcifront/pcifront.h linux-2.6.27.19-5.1/drivers/xen/pcifront/pcifront.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/pcifront.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/pcifront.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/pcifront.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,42 @@
 +/*
 + * PCI Frontend - Common data structures & function declarations
@@ -932944,9 +932804,9 @@ diff -purN linux-2.6.27/drivers/xen/pcifront/pcifront.h linux-2.6.27.19-5.1/driv
 +void pcifront_free_roots(struct pcifront_device *pdev);
 +
 +#endif        /* __XEN_PCIFRONT_H__ */
-diff -purN linux-2.6.27/drivers/xen/pcifront/xenbus.c linux-2.6.27.19-5.1/drivers/xen/pcifront/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/pcifront/xenbus.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/pcifront/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/pcifront/xenbus.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,450 @@
 +/*
 + * PCI Frontend Xenbus Setup - handles setup with backend (imports page/evtchn)
@@ -933398,16 +933258,16 @@ diff -purN linux-2.6.27/drivers/xen/pcifront/xenbus.c linux-2.6.27.19-5.1/driver
 +
 +/* Initialize after the Xen PCI Frontend Stub is initialized */
 +subsys_initcall(pcifront_init);
-diff -purN linux-2.6.27/drivers/xen/privcmd/Makefile linux-2.6.27.19-5.1/drivers/xen/privcmd/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/Makefile     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,3 @@
 +
 +obj-y += privcmd.o
 +obj-$(CONFIG_COMPAT)  += compat_privcmd.o
-diff -purN linux-2.6.27/drivers/xen/privcmd/compat_privcmd.c linux-2.6.27.19-5.1/drivers/xen/privcmd/compat_privcmd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/compat_privcmd.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/compat_privcmd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/compat_privcmd.c     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,72 @@
 +/*
 + * This program is free software; you can redistribute it and/or modify
@@ -933481,9 +933341,9 @@ diff -purN linux-2.6.27/drivers/xen/privcmd/compat_privcmd.c linux-2.6.27.19-5.1
 +      }
 +      return ret;
 +}
-diff -purN linux-2.6.27/drivers/xen/privcmd/privcmd.c linux-2.6.27.19-5.1/drivers/xen/privcmd/privcmd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/privcmd/privcmd.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/privcmd/privcmd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/privcmd/privcmd.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,327 @@
 +/******************************************************************************
 + * privcmd.c
@@ -933812,17 +933672,17 @@ diff -purN linux-2.6.27/drivers/xen/privcmd/privcmd.c linux-2.6.27.19-5.1/driver
 +}
 +
 +__initcall(privcmd_init);
-diff -purN linux-2.6.27/drivers/xen/scsiback/Makefile linux-2.6.27.19-5.1/drivers/xen/scsiback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/Makefile  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/Makefile    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,4 @@
 +obj-$(CONFIG_XEN_SCSI_BACKEND) := xen-scsibk.o
 +
 +xen-scsibk-y  := interface.o scsiback.o xenbus.o translate.o emulate.o
 +
-diff -purN linux-2.6.27/drivers/xen/scsiback/common.h linux-2.6.27.19-5.1/drivers/xen/scsiback/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/common.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/common.h    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,181 @@
 +/*
 + * Copyright (c) 2008, FUJITSU Limited
@@ -934005,9 +933865,9 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/common.h linux-2.6.27.19-5.1/driver
 +
 +
 +#endif /* __SCSIIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/scsiback/emulate.c linux-2.6.27.19-5.1/drivers/xen/scsiback/emulate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/emulate.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/emulate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/emulate.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,453 @@
 +/*
 + * Xen SCSI backend driver
@@ -934462,9 +934322,9 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/emulate.c linux-2.6.27.19-5.1/drive
 +
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/xen/scsiback/interface.c linux-2.6.27.19-5.1/drivers/xen/scsiback/interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/interface.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/interface.c Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,182 @@
 +/*
 + * interface management.
@@ -934648,9 +934508,9 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/interface.c linux-2.6.27.19-5.1/dri
 +{
 +      kmem_cache_destroy(scsiback_cachep);
 +}
-diff -purN linux-2.6.27/drivers/xen/scsiback/scsiback.c linux-2.6.27.19-5.1/drivers/xen/scsiback/scsiback.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/scsiback.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/scsiback.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/scsiback.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,706 @@
 +/*
 + * Xen SCSI backend driver
@@ -935358,9 +935218,9 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/scsiback.c linux-2.6.27.19-5.1/driv
 +
 +MODULE_DESCRIPTION("Xen SCSI backend driver");
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/scsiback/translate.c linux-2.6.27.19-5.1/drivers/xen/scsiback/translate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/translate.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/translate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/translate.c Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,168 @@
 +/*
 + * Xen SCSI backend driver
@@ -935530,9 +935390,9 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/translate.c linux-2.6.27.19-5.1/dri
 +      return;
 +
 +}
-diff -purN linux-2.6.27/drivers/xen/scsiback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/scsiback/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsiback/xenbus.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsiback/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsiback/xenbus.c    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,367 @@
 +/*
 + * Xen SCSI backend driver
@@ -935901,16 +935761,16 @@ diff -purN linux-2.6.27/drivers/xen/scsiback/xenbus.c linux-2.6.27.19-5.1/driver
 +{
 +      xenbus_unregister_driver(&scsiback);
 +}
-diff -purN linux-2.6.27/drivers/xen/scsifront/Makefile linux-2.6.27.19-5.1/drivers/xen/scsifront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/Makefile 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/Makefile   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,3 @@
 +
 +obj-$(CONFIG_XEN_SCSI_FRONTEND)       := xenscsi.o
 +xenscsi-objs := scsifront.o xenbus.o
-diff -purN linux-2.6.27/drivers/xen/scsifront/common.h linux-2.6.27.19-5.1/drivers/xen/scsifront/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/common.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/common.h   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,129 @@
 +/*
 + * Xen SCSI frontend driver
@@ -936041,9 +935901,9 @@ diff -purN linux-2.6.27/drivers/xen/scsifront/common.h linux-2.6.27.19-5.1/drive
 +
 +
 +#endif /* __XEN_DRIVERS_SCSIFRONT_H__  */
-diff -purN linux-2.6.27/drivers/xen/scsifront/scsifront.c linux-2.6.27.19-5.1/drivers/xen/scsifront/scsifront.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/scsifront.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/scsifront.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/scsifront.c        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,478 @@
 +/*
 + * Xen SCSI frontend driver
@@ -936523,9 +936383,9 @@ diff -purN linux-2.6.27/drivers/xen/scsifront/scsifront.c linux-2.6.27.19-5.1/dr
 +
 +MODULE_DESCRIPTION("Xen SCSI frontend driver");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/scsifront/xenbus.c linux-2.6.27.19-5.1/drivers/xen/scsifront/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/scsifront/xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/scsifront/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/scsifront/xenbus.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + * Xen SCSI frontend driver
@@ -936947,9 +936807,9 @@ diff -purN linux-2.6.27/drivers/xen/scsifront/xenbus.c linux-2.6.27.19-5.1/drive
 +      xenbus_unregister_driver(&scsifront_driver);
 +}
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/Makefile       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/Makefile Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,12 @@
 +EXTRA_CFLAGS += -Idrivers/xen/sfc_netback -Idrivers/xen/sfc_netutil -Idrivers/xen/netback -Idrivers/net/sfc
 +EXTRA_CFLAGS += -D__ci_driver__ 
@@ -936963,9 +936823,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/Makefile linux-2.6.27.19-5.1/dri
 +obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_BACKEND) := sfc_netback.o
 +
 +sfc_netback-objs   := accel.o accel_fwd.o accel_msg.o accel_solarflare.o accel_xenbus.o accel_debugfs.o
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,129 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -937096,9 +936956,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.c linux-2.6.27.19-5.1/driv
 +module_exit(netback_accel_exit);
 +
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,394 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -937494,9 +937354,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel.h linux-2.6.27.19-5.1/driv
 +#endif /* NETBACK_ACCEL_H */
 +
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_debugfs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_debugfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_debugfs.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_debugfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_debugfs.c  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,148 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -937646,9 +937506,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_debugfs.c linux-2.6.27.19-
 +}
 +
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_fwd.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_fwd.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_fwd.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_fwd.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_fwd.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,425 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -938075,9 +937935,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_fwd.c linux-2.6.27.19-5.1/
 +      }
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_msg.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_msg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_msg.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_msg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_msg.c      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,392 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -938471,9 +938331,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_msg.c linux-2.6.27.19-5.1/
 +
 +      return;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_solarflare.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_solarflare.c       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,1253 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -939728,9 +939588,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.c linux-2.6.27.
 + out:
 +      spin_unlock_irqrestore(&accel_hw_priv->filter_lock, flags);
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_solarflare.h     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_solarflare.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_solarflare.h       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,88 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -939820,9 +939680,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_solarflare.h linux-2.6.27.
 +extern void netback_accel_tx_packet(struct sk_buff *skb, void *fwd_priv);
 +
 +#endif /* NETBACK_ACCEL_SOLARFLARE_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_xenbus.c linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/accel_xenbus.c 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/accel_xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/accel_xenbus.c   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,829 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -940653,9 +940513,66 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/accel_xenbus.c linux-2.6.27.19-5
 +      net_accel_update_state((struct xenbus_device *)bend->hdev_data,
 +                             XenbusStateClosing);
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat.h      Wed May 06 16:56:45 2009 +0100
+@@ -0,0 +1,53 @@
++/****************************************************************************
++ * Copyright 2002-2005: Level 5 Networks Inc.
++ * Copyright 2005-2008: Solarflare Communications Inc,
++ *                      9501 Jeronimo Road, Suite 250,
++ *                      Irvine, CA 92618, USA
++ *
++ * Maintained by Solarflare Communications
++ *  <linux-xen-drivers@solarflare.com>
++ *  <onload-dev@solarflare.com>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, incorporated herein by reference.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ ****************************************************************************
++ */
++
++/*
++ * \author  djr
++ *  \brief  Compatability layer.  Provides definitions of fundamental
++ *          types and definitions that are used throughout CI source
++ *          code.  It does not introduce any link time dependencies,
++ *          or include any unnecessary system headers.
++ */
++/*! \cidoxg_include_ci */
++
++#ifndef __CI_COMPAT_H__
++#define __CI_COMPAT_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <ci/compat/primitive.h>
++#include <ci/compat/sysdep.h>
++#include <ci/compat/utils.h>
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif  /* __CI_COMPAT_H__ */
++
++/*! \cidoxg_end */
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/gcc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/gcc.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,158 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -940815,9 +940732,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc.h linux-2.6.27.19-
 +#endif  /* __CI_COMPAT_GCC_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc_x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc_x86.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/gcc_x86.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/gcc_x86.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/gcc_x86.h      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,115 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -940934,9 +940851,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/gcc_x86.h linux-2.6.27
 +#endif  /* __CI_COMPAT_GCC_X86_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/primitive.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/primitive.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/primitive.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/primitive.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/primitive.h    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,77 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -941015,9 +940932,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/primitive.h linux-2.6.
 +#endif  /* __CI_COMPAT_PRIMITIVE_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/sysdep.h     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/sysdep.h       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,166 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -941185,9 +941102,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/sysdep.h linux-2.6.27.
 +#endif  /* __CI_COMPAT_SYSDEP_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/utils.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/utils.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/utils.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/utils.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/utils.h        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,269 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -941458,9 +941375,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/utils.h linux-2.6.27.1
 +
 +#endif  /* __CI_COMPAT_UTILS_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/x86.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/x86.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,48 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -941510,9 +941427,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86.h linux-2.6.27.19-
 +#endif  /* __CI_COMPAT_X86_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86_64.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat/x86_64.h     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/compat/x86_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/compat/x86_64.h       Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,54 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -941568,66 +941485,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat/x86_64.h linux-2.6.27.
 +
 +#endif  /* __CI_COMPAT_X86_64_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/compat.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/compat.h    2009-03-25 16:11:22.000000000 +0000
-@@ -0,0 +1,53 @@
-+/****************************************************************************
-+ * Copyright 2002-2005: Level 5 Networks Inc.
-+ * Copyright 2005-2008: Solarflare Communications Inc,
-+ *                      9501 Jeronimo Road, Suite 250,
-+ *                      Irvine, CA 92618, USA
-+ *
-+ * Maintained by Solarflare Communications
-+ *  <linux-xen-drivers@solarflare.com>
-+ *  <onload-dev@solarflare.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation, incorporated herein by reference.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-+ ****************************************************************************
-+ */
-+
-+/*
-+ * \author  djr
-+ *  \brief  Compatability layer.  Provides definitions of fundamental
-+ *          types and definitions that are used throughout CI source
-+ *          code.  It does not introduce any link time dependencies,
-+ *          or include any unnecessary system headers.
-+ */
-+/*! \cidoxg_include_ci */
-+
-+#ifndef __CI_COMPAT_H__
-+#define __CI_COMPAT_H__
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <ci/compat/primitive.h>
-+#include <ci/compat/sysdep.h>
-+#include <ci/compat/utils.h>
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif  /* __CI_COMPAT_H__ */
-+
-+/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,276 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -941905,9 +941765,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/driver/resource/efx_vi.h linu
 +                          int *length);
 +
 +#endif /* __CI_DRIVER_RESOURCE_EFX_VI_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/common.h Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,102 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942011,9 +941871,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common.h linux-2.6.27.19
 +                                                   support */
 +
 +#endif /* __CI_EFHW_COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,67 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942082,9 +941942,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h linux-2.
 +#endif /* LINUX_VERSION_CODE < 2.6.19 */
 +
 +#endif /* __CI_EFHW_COMMON_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/debug.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/debug.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/debug.h  Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,84 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942170,9 +942030,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/debug.h linux-2.6.27.19-
 +#endif
 +
 +#endif /* __CI_EFHW_DEBUG_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_config.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_config.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/efhw_config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/efhw_config.h    Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,43 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942217,9 +942077,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_config.h linux-2.6.
 +#define EFHW_MAX_NR_DEVS 5    /* max number of efhw devices supported */
 +
 +#endif /* __CI_EFHW_EFAB_CONFIG_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_types.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/efhw_types.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/efhw_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/efhw_types.h     Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,342 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942563,9 +942423,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/efhw_types.h linux-2.6.2
 +
 +
 +#endif /* __CI_EFHW_EFHW_TYPES_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h        Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,84 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942651,9 +942511,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/hardware_sysdep.h linux-
 +#endif
 +
 +#endif /* __CI_EFHW_HARDWARE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/iopage_types.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/iopage_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/iopage_types.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/iopage_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/iopage_types.h   Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,188 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942843,9 +942703,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/iopage_types.h linux-2.6
 +}
 +
 +#endif /* __CI_EFHW_IOPAGE_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/public.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/public.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/public.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/public.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/public.h Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,83 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -942930,9 +942790,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/public.h linux-2.6.27.19
 +                           uint32_t *udp_full, uint32_t *udp_wild);
 +
 +#endif /* __CI_EFHW_PUBLIC_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efhw/sysdep.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efhw/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efhw/sysdep.h Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,72 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -943006,9 +942866,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efhw/sysdep.h linux-2.6.27.19
 +#endif
 +
 +#endif /* __CI_EFHW_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/nic_table.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/nic_table.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/nic_table.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/nic_table.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/nic_table.h      Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,98 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -943108,9 +942968,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/nic_table.h linux-2.6.27
 +                  efrm_nic_set_read((_set), (_i)))
 +
 +#endif /* __CI_EFRM_NIC_TABLE_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/sysdep.h Wed May 06 16:56:45 2009 +0100
 @@ -0,0 +1,54 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -943166,9 +943026,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep.h linux-2.6.27.19
 +#endif
 +
 +#endif /* __CI_EFRM_SYSDEP_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h   Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,248 @@
 +/****************************************************************************
 + * Driver for Solarflare network controllers -
@@ -943418,9 +943278,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/efrm/sysdep_linux.h linux-2.6
 +}
 +
 +#endif /* __CI_EFRM_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/config.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/config.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/config.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/config.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/config.h        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,49 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -943471,9 +943331,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/config.h linux-2.6.27.1
 +
 +#endif  /* __CI_TOOLS_CONFIG_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/debug.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/debug.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/debug.h Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,336 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -943811,9 +943671,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/debug.h linux-2.6.27.19
 +#endif  /* __CI_TOOLS_DEBUG_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/log.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/log.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/log.h 2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/log.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/log.h   Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,262 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -944077,9 +943937,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/log.h linux-2.6.27.19-5
 +
 +#endif  /* __CI_TOOLS_LOG_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h      Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,361 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -944442,9 +944302,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/gcc_x86.h linu
 +#endif  /* __CI_TOOLS_GCC_X86_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,362 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -944808,9 +944668,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/platform/linux_kernel.h
 +
 +#endif  /* __CI_TOOLS_LINUX_KERNEL_H__ */
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netback/ci/tools/sysdep.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netback/ci/tools/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netback/ci/tools/sysdep.h        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,132 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -944944,9 +944804,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netback/ci/tools/sysdep.h linux-2.6.27.1
 +#endif  /* __CI_TOOLS_SYSDEP_H__ */
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/Makefile      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/Makefile        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,11 @@
 +EXTRA_CFLAGS += -Idrivers/xen/sfc_netfront -Idrivers/xen/sfc_netutil -Idrivers/xen/netfront
 +EXTRA_CFLAGS += -D__ci_driver__
@@ -944959,9 +944819,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/Makefile linux-2.6.27.19-5.1/dr
 +obj-$(CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND)   := sfc_netfront.o
 +
 +sfc_netfront-objs := accel_msg.o accel_bufs.o accel_netfront.o accel_vi.o accel_xenbus.o accel_tso.o accel_ssr.o accel_debugfs.o falcon_event.o falcon_vi.o pt_tx.o vi_init.o
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel.h       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel.h Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,476 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -945439,9 +945299,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel.h linux-2.6.27.19-5.1/dri
 +extern int netfront_accel_debugfs_remove(netfront_accel_vnic *vnic);
 +
 +#endif /* NETFRONT_ACCEL_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_bufs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_bufs.c    Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,393 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -945836,9 +945696,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.c linux-2.6.27.19-5.
 +
 +      return was_empty;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_bufs.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_bufs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_bufs.h    Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,181 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -946021,9 +945881,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_bufs.h linux-2.6.27.19-5.
 +
 +#endif /* NETFRONT_ACCEL_BUFS_H */
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_debugfs.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_debugfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_debugfs.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_debugfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_debugfs.c Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,211 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -946236,9 +946096,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_debugfs.c linux-2.6.27.19
 +#endif
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_msg.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_msg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_msg.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_msg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_msg.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,571 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -946811,9 +946671,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_msg.c linux-2.6.27.19-5.1
 +      net_accel_msg_complete_send_notify(vnic->shared_page, &vnic->to_dom0, 
 +                                         &lock_state, vnic->msg_channel_irq);
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_netfront.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_netfront.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_netfront.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_netfront.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_netfront.c        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,319 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -947134,9 +946994,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_netfront.c linux-2.6.27.1
 +
 +MODULE_LICENSE("GPL");
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_ssr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_ssr.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,308 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -947446,9 +947306,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.c linux-2.6.27.19-5.1
 +      NETFRONT_ACCEL_STATS_OP(++vnic->stats.ssr_new_stream);
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_ssr.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_ssr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_ssr.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,88 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -947538,9 +947398,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_ssr.h linux-2.6.27.19-5.1
 +}
 +
 +#endif /* NETFRONT_ACCEL_SSR_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_tso.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_tso.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,509 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -948051,9 +947911,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.c linux-2.6.27.19-5.1
 +
 +
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_tso.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_tso.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_tso.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,57 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -948112,9 +947972,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_tso.h linux-2.6.27.19-5.1
 +                                 struct sk_buff *skb);
 +
 +#endif /* NETFRONT_ACCEL_TSO_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_vi.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_vi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_vi.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_vi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_vi.c      Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,1197 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -949313,9 +949173,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_vi.c linux-2.6.27.19-5.1/
 +
 +      return 1;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_xenbus.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/accel_xenbus.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/accel_xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/accel_xenbus.c  Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,776 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -950093,9 +949953,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/accel_xenbus.c linux-2.6.27.19-
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon.h        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon.h  Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,172 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -950269,9 +950129,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon.h linux-2.6.27.19-
 +
 +
 +#endif  /* __EF_VI_FALCON_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_core.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_core.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_core.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_core.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_core.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,1075 @@
 +
 +#define  EFVI_FALCON_EXTENDED_P_BAR 1
@@ -951348,9 +951208,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_core.h linux-2.6.2
 +#define EE_VPD_SW_DATA_REG_OFST 0x160 // VPD access SW data register
 +  #define EE_VPD_CYC_DAT_LBN 0
 +  #define EE_VPD_CYC_DAT_WIDTH 32
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_desc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,43 @@
 +//////////////---- Descriptors C Headers ----//////////////
 +// Receive Kernel IP Descriptor
@@ -951395,9 +951255,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_desc.h linux-2.6.2
 +  #define TX_USR_BUF_ID_WIDTH 20
 +  #define TX_USR_BYTE_OFS_LBN 0
 +  #define TX_USR_BYTE_OFS_WIDTH 13
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_event.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_event.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_falcon_event.h  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_falcon_event.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_falcon_event.h    Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,123 @@
 +//////////////---- Events Format C Header ----//////////////
 +//////////////---- Event entry ----//////////////
@@ -951522,9 +951382,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_falcon_event.h linux-2.6.
 +  #define DRV_GEN_EV_CODE_WIDTH 4
 +  #define DRV_GEN_EV_DATA_LBN 0
 +  #define DRV_GEN_EV_DATA_WIDTH 60
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_internal.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_internal.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/ef_vi_internal.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/ef_vi_internal.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/ef_vi_internal.h        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,256 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -951782,9 +951642,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/ef_vi_internal.h linux-2.6.27.1
 +
 +#endif  /* __CI_EF_VI_INTERNAL_H__ */
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/etherfabric/ef_vi.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/etherfabric/ef_vi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/etherfabric/ef_vi.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/etherfabric/ef_vi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/etherfabric/ef_vi.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,665 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -952451,9 +952311,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/etherfabric/ef_vi.h linux-2.6.2
 +
 +
 +#endif /* __EFAB_EF_VI_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_event.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_event.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_event.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/falcon_event.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/falcon_event.c  Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,346 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -952801,9 +952661,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_event.c linux-2.6.27.19-
 +}
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_vi.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_vi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/falcon_vi.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/falcon_vi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/falcon_vi.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,465 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -953270,9 +953130,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/falcon_vi.c linux-2.6.27.19-5.1
 +}
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/pt_tx.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/pt_tx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/pt_tx.c       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/pt_tx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/pt_tx.c Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,91 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -953365,9 +953225,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/pt_tx.c linux-2.6.27.19-5.1/dri
 +}
 +
 +/*! \cidoxg_end */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/sysdep.h linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/sysdep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/sysdep.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/sysdep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/sysdep.h        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,184 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -953553,9 +953413,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/sysdep.h linux-2.6.27.19-5.1/dr
 +#endif
 +
 +#endif  /* __CI_CIUL_SYSDEP_LINUX_H__ */
-diff -purN linux-2.6.27/drivers/xen/sfc_netfront/vi_init.c linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/vi_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netfront/vi_init.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netfront/vi_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netfront/vi_init.c       Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,183 @@
 +/****************************************************************************
 + * Copyright 2002-2005: Level 5 Networks Inc.
@@ -953740,9 +953600,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netfront/vi_init.c linux-2.6.27.19-5.1/d
 +      vm->tx_dma_falcon = iobuf_mmap_tx;
 +      vm->tx_bell       = (char*) io_mmap + (TX_DESC_UPD_REG_KER_OFST & 4095);
 +}
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/Makefile linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/Makefile       2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/Makefile Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,11 @@
 +EXTRA_CFLAGS += -Idrivers/xen/sfc_netutil
 +EXTRA_CFLAGS += -Werror
@@ -953755,9 +953615,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/Makefile linux-2.6.27.19-5.1/dri
 +
 +sfc_netutil-objs := accel_cuckoo_hash.o accel_msg_iface.o accel_util.o 
 +
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.c    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_cuckoo_hash.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_cuckoo_hash.c      Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,651 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -954410,9 +954270,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.c linux-2.6.27
 +}
 +EXPORT_SYMBOL_GPL(cuckoo_hash_dump);
 +#endif
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_cuckoo_hash.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_cuckoo_hash.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_cuckoo_hash.h      Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,227 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -954641,9 +954501,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_cuckoo_hash.h linux-2.6.27
 +void cuckoo_hash_dump(cuckoo_hash_table *hashtab);
 +
 +#endif /* NET_ACCEL_CUCKOO_HASH_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_msg_iface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_msg_iface.c        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,301 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -954946,9 +954806,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.c linux-2.6.27.1
 +      notify_remote_via_irq(irq);
 +}
 +EXPORT_SYMBOL_GPL(net_accel_msg_complete_send_notify);
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_msg_iface.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_msg_iface.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_msg_iface.h        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,414 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -955364,9 +955224,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_msg_iface.h linux-2.6.27.1
 +}
 +
 +#endif /* NET_ACCEL_MSG_IFACE_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_shared_fifo.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_shared_fifo.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_shared_fifo.h    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_shared_fifo.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_shared_fifo.h      Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,127 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -955495,9 +955355,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_shared_fifo.h linux-2.6.27
 +
 +
 +#endif /* NET_ACCEL_SHARED_FIFO_H */
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.c linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_util.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_util.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,333 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -955832,9 +955692,9 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.c linux-2.6.27.19-5.1
 +EXPORT_SYMBOL_GPL(net_accel_update_state);
 +
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.h linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/sfc_netutil/accel_util.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/sfc_netutil/accel_util.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/sfc_netutil/accel_util.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,124 @@
 +/****************************************************************************
 + * Solarflare driver for Xen network acceleration
@@ -955960,17 +955820,17 @@ diff -purN linux-2.6.27/drivers/xen/sfc_netutil/accel_util.h linux-2.6.27.19-5.1
 +
 +
 +#endif
-diff -purN linux-2.6.27/drivers/xen/tpmback/Makefile linux-2.6.27.19-5.1/drivers/xen/tpmback/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/Makefile   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/Makefile     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,4 @@
 +
 +obj-$(CONFIG_XEN_TPMDEV_BACKEND)      += tpmbk.o
 +
 +tpmbk-y += tpmback.o interface.o xenbus.o
-diff -purN linux-2.6.27/drivers/xen/tpmback/common.h linux-2.6.27.19-5.1/drivers/xen/tpmback/common.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/common.h   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/common.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/common.h     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,85 @@
 +/******************************************************************************
 + * drivers/xen/tpmback/common.h
@@ -956057,9 +955917,9 @@ diff -purN linux-2.6.27/drivers/xen/tpmback/common.h linux-2.6.27.19-5.1/drivers
 +}
 +
 +#endif /* __TPMIF__BACKEND__COMMON_H__ */
-diff -purN linux-2.6.27/drivers/xen/tpmback/interface.c linux-2.6.27.19-5.1/drivers/xen/tpmback/interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/interface.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/interface.c  Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,170 @@
 + /*****************************************************************************
 + * drivers/xen/tpmback/interface.c
@@ -956231,9 +956091,9 @@ diff -purN linux-2.6.27/drivers/xen/tpmback/interface.c linux-2.6.27.19-5.1/driv
 +{
 +      kmem_cache_destroy(tpmif_cachep);
 +}
-diff -purN linux-2.6.27/drivers/xen/tpmback/tpmback.c linux-2.6.27.19-5.1/drivers/xen/tpmback/tpmback.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/tpmback.c  2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/tpmback.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/tpmback.c    Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,952 @@
 +/******************************************************************************
 + * drivers/xen/tpmback/tpmback.c
@@ -957187,9 +957047,9 @@ diff -purN linux-2.6.27/drivers/xen/tpmback/tpmback.c linux-2.6.27.19-5.1/driver
 +module_exit(tpmback_exit)
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/tpmback/xenbus.c linux-2.6.27.19-5.1/drivers/xen/tpmback/xenbus.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/tpmback/xenbus.c   2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/tpmback/xenbus.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/tpmback/xenbus.c     Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,288 @@
 +/*  Xenbus code for tpmif backend
 +    Copyright (C) 2005 IBM Corporation
@@ -957479,9 +957339,9 @@ diff -purN linux-2.6.27/drivers/xen/tpmback/xenbus.c linux-2.6.27.19-5.1/drivers
 +{
 +      xenbus_unregister_driver(&tpmback);
 +}
-diff -purN linux-2.6.27/drivers/xen/util.c linux-2.6.27.19-5.1/drivers/xen/util.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/util.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/util.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/util.c       Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,20 @@
 +#include <linux/err.h>
 +#include <linux/module.h>
@@ -957503,9 +957363,9 @@ diff -purN linux-2.6.27/drivers/xen/util.c linux-2.6.27.19-5.1/drivers/xen/util.
 +      return xen_class;
 +}
 +EXPORT_SYMBOL_GPL(get_xen_class);
-diff -purN linux-2.6.27/drivers/xen/xenbus/Makefile linux-2.6.27.19-5.1/drivers/xen/xenbus/Makefile
---- linux-2.6.27/drivers/xen/xenbus/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/Makefile    2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/Makefile
+--- a/drivers/xen/xenbus/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/Makefile      Wed May 06 16:56:46 2009 +0100
 @@ -1,7 +1,9 @@
 -obj-y += xenbus.o
 +obj-y += xenbus_client.o xenbus_comms.o xenbus_xs.o xenbus_probe.o
@@ -957522,9 +957382,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/Makefile linux-2.6.27.19-5.1/drivers/
 +xenbus-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
 +obj-y += $(xenbus-y) $(xenbus-m)
 +obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_backend_client.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_backend_client.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_backend_client.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_backend_client.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_backend_client.c       Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,147 @@
 +/******************************************************************************
 + * Backend-client-facing interface for the Xenbus driver.  In other words, the
@@ -957673,9 +957533,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_backend_client.c linux-2.6.27.
 +EXPORT_SYMBOL_GPL(xenbus_dev_is_online);
 +
 +MODULE_LICENSE("Dual BSD/GPL");
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_client.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_client.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_client.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_client.c
+--- a/drivers/xen/xenbus/xenbus_client.c       Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_client.c       Wed May 06 16:56:46 2009 +0100
 @@ -30,6 +30,12 @@
   * IN THE SOFTWARE.
   */
@@ -957689,21 +957549,20 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  #include <linux/types.h>
  #include <linux/vmalloc.h>
  #include <asm/xen/hypervisor.h>
-@@ -37,8 +43,13 @@
+@@ -37,7 +43,12 @@
  #include <xen/interface/event_channel.h>
  #include <xen/events.h>
  #include <xen/grant_table.h>
 +#endif
  #include <xen/xenbus.h>
++
 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
 +#include <xen/platform-compat.h>
 +#endif
-+
  const char *xenbus_strstate(enum xenbus_state state)
  {
-       static const char *const name[] = {
-@@ -91,6 +102,26 @@ int xenbus_watch_path(struct xenbus_devi
+@@ -91,6 +102,26 @@
  EXPORT_SYMBOL_GPL(xenbus_watch_path);
  
  
@@ -957730,7 +957589,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  /**
   * xenbus_watch_pathfmt - register a watch on a sprintf-formatted path
   * @dev: xenbus device
-@@ -117,7 +148,7 @@ int xenbus_watch_pathfmt(struct xenbus_d
+@@ -117,7 +148,7 @@
        char *path;
  
        va_start(ap, pathfmt);
@@ -957739,7 +957598,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
        va_end(ap);
  
        if (!path) {
-@@ -131,6 +162,7 @@ int xenbus_watch_pathfmt(struct xenbus_d
+@@ -131,6 +162,7 @@
        return err;
  }
  EXPORT_SYMBOL_GPL(xenbus_watch_pathfmt);
@@ -957747,7 +957606,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  
  
  /**
-@@ -201,13 +233,12 @@ static char *error_path(struct xenbus_de
+@@ -201,13 +233,12 @@
  }
  
  
@@ -957764,7 +957623,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  
  #define PRINTF_BUFFER_SIZE 4096
        printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
-@@ -224,20 +255,24 @@ static void xenbus_va_dev_error(struct x
+@@ -224,20 +255,24 @@
        path_buffer = error_path(dev);
  
        if (path_buffer == NULL) {
@@ -957795,7 +957654,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  }
  
  
-@@ -250,16 +285,18 @@ fail:
+@@ -250,15 +285,17 @@
   * Report the given negative errno into the store, along with the given
   * formatted message.
   */
@@ -957811,12 +957670,11 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
        va_end(ap);
  }
  EXPORT_SYMBOL_GPL(xenbus_dev_error);
 +
  /**
   * xenbus_dev_fatal
-  * @dev: xenbus device
-@@ -270,24 +307,25 @@ EXPORT_SYMBOL_GPL(xenbus_dev_error);
+@@ -270,24 +307,25 @@
   * xenbus_switch_state(dev, NULL, XenbusStateClosing) to schedule an orderly
   * closedown of this driver and its peer.
   */
@@ -957846,7 +957704,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
   * Grant access to the given @ring_mfn to the peer of the given device.  Return
   * 0 on success, or -errno on error.  On error, the device will switch to
   * XenbusStateClosing, and the error will be saved in the store.
-@@ -313,7 +351,7 @@ int xenbus_alloc_evtchn(struct xenbus_de
+@@ -313,7 +351,7 @@
        struct evtchn_alloc_unbound alloc_unbound;
        int err;
  
@@ -957855,7 +957713,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
        alloc_unbound.remote_dom = dev->otherend_id;
  
        err = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound,
-@@ -328,6 +366,7 @@ int xenbus_alloc_evtchn(struct xenbus_de
+@@ -328,6 +366,7 @@
  EXPORT_SYMBOL_GPL(xenbus_alloc_evtchn);
  
  
@@ -957863,7 +957721,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  /**
   * Bind to an existing interdomain event channel in another domain. Returns 0
   * on success and stores the local port in *port. On error, returns -errno,
-@@ -353,6 +392,7 @@ int xenbus_bind_evtchn(struct xenbus_dev
+@@ -353,6 +392,7 @@
        return err;
  }
  EXPORT_SYMBOL_GPL(xenbus_bind_evtchn);
@@ -957871,7 +957729,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  
  
  /**
-@@ -374,6 +414,7 @@ int xenbus_free_evtchn(struct xenbus_dev
+@@ -374,6 +414,7 @@
  EXPORT_SYMBOL_GPL(xenbus_free_evtchn);
  
  
@@ -957879,7 +957737,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  /**
   * xenbus_map_ring_valloc
   * @dev: xenbus device
-@@ -548,6 +589,7 @@ int xenbus_unmap_ring(struct xenbus_devi
+@@ -548,6 +589,7 @@
        return op.status;
  }
  EXPORT_SYMBOL_GPL(xenbus_unmap_ring);
@@ -957887,9 +957745,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_client.c linux-2.6.27.19-5.1/d
  
  
  /**
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_comms.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_comms.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_comms.c
+--- a/drivers/xen/xenbus/xenbus_comms.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_comms.c        Wed May 06 16:56:46 2009 +0100
 @@ -35,13 +35,25 @@
  #include <linux/sched.h>
  #include <linux/err.h>
@@ -957904,11 +957762,11 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/dr
 +#endif
 +
  #include "xenbus_comms.h"
++
 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
 +#include <xen/platform-compat.h>
 +#endif
-+
  static int xenbus_irq;
  
 +extern void xenbus_probe(struct work_struct *);
@@ -957916,7 +957774,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/dr
  static DECLARE_WORK(probe_work, xenbus_probe);
  
  static DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
-@@ -203,6 +215,7 @@ int xb_read(void *data, unsigned len)
+@@ -203,6 +215,7 @@
  int xb_init_comms(void)
  {
        struct xenstore_domain_interface *intf = xen_store_interface;
@@ -957924,7 +957782,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/dr
  
        if (intf->req_prod != intf->req_cons)
                printk(KERN_ERR "XENBUS request ring is not quiescent "
-@@ -215,20 +228,33 @@ int xb_init_comms(void)
+@@ -215,20 +228,33 @@
                intf->rsp_cons = intf->rsp_prod;
        }
  
@@ -957960,9 +957818,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_comms.c linux-2.6.27.19-5.1/dr
  
        return 0;
  }
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_dev.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_dev.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_dev.c        2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_dev.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_dev.c  Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,408 @@
 +/*
 + * xenbus_dev.c
@@ -958372,9 +958230,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_dev.c linux-2.6.27.19-5.1/driv
 +
 +      return 0;
 +}
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe.c
+--- a/drivers/xen/xenbus/xenbus_probe.c        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.c        Wed May 06 16:56:46 2009 +0100
 @@ -4,6 +4,7 @@
   * Copyright (C) 2005 Rusty Russell, IBM Corporation
   * Copyright (C) 2005 Mike Wray, Hewlett-Packard
@@ -958383,7 +958241,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License version 2
-@@ -32,33 +33,50 @@
+@@ -32,32 +33,49 @@
  
  #define DPRINTK(fmt, args...)                         \
        pr_debug("xenbus_probe (%s:%d) " fmt ".\n",     \
@@ -958430,13 +958288,12 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  int xen_store_evtchn;
  struct xenstore_domain_interface *xen_store_interface;
  static unsigned long xen_store_mfn;
-+extern struct mutex xenwatch_mutex;
 +
++extern struct mutex xenwatch_mutex;
  static BLOCKING_NOTIFIER_HEAD(xenstore_chain);
  
- static void wait_for_devices(struct xenbus_driver *xendrv);
-@@ -88,16 +106,6 @@ int xenbus_match(struct device *_dev, st
+@@ -88,16 +106,6 @@
        return match_device(drv->ids, to_xenbus_device(_dev)) != NULL;
  }
  
@@ -958453,7 +958310,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  /* device/<type>/<id> => <type>-<id> */
  static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename)
  {
-@@ -166,6 +174,27 @@ static int read_backend_details(struct x
+@@ -166,6 +174,27 @@
        return read_otherend_details(xendev, "backend-id", "backend");
  }
  
@@ -958481,7 +958338,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  
  /* Bus type for frontend drivers. */
  static struct xen_bus_type xenbus_frontend = {
-@@ -173,14 +202,22 @@ static struct xen_bus_type xenbus_fronte
+@@ -173,14 +202,22 @@
        .levels = 2,            /* device/type/<id> */
        .get_bus_id = frontend_bus_id,
        .probe = xenbus_probe_frontend,
@@ -958496,16 +958353,16 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
                .shutdown = xenbus_dev_shutdown,
 +              .uevent   = xenbus_uevent_frontend,
 +#endif
-+      },
+       },
 +#if defined(CONFIG_XEN) || defined(MODULE)
 +      .dev = {
 +              .bus_id = "xen",
-       },
++      },
 +#endif
  };
  
  static void otherend_changed(struct xenbus_watch *watch,
-@@ -196,17 +233,17 @@ static void otherend_changed(struct xenb
+@@ -196,17 +233,17 @@
        if (!dev->otherend ||
            strncmp(dev->otherend, vec[XS_WATCH_PATH],
                    strlen(dev->otherend))) {
@@ -958526,7 +958383,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        /*
         * Ignore xenbus transitions during shutdown. This prevents us doing
         * work that can fail e.g., when the rootfs is gone.
-@@ -220,6 +257,7 @@ static void otherend_changed(struct xenb
+@@ -220,6 +257,7 @@
                        xenbus_frontend_closed(dev);
                return;
        }
@@ -958534,7 +958391,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  
        if (drv->otherend_changed)
                drv->otherend_changed(dev, state);
-@@ -239,8 +277,13 @@ static int talk_to_otherend(struct xenbu
+@@ -239,8 +277,13 @@
  
  static int watch_otherend(struct xenbus_device *dev)
  {
@@ -958548,7 +958405,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  }
  
  
-@@ -266,8 +309,9 @@ int xenbus_dev_probe(struct device *_dev
+@@ -266,8 +309,9 @@
  
        err = talk_to_otherend(dev);
        if (err) {
@@ -958560,7 +958417,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
                return err;
        }
  
-@@ -277,8 +321,9 @@ int xenbus_dev_probe(struct device *_dev
+@@ -277,8 +321,9 @@
  
        err = watch_otherend(dev);
        if (err) {
@@ -958572,7 +958429,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
                return err;
        }
  
-@@ -313,17 +358,20 @@ static void xenbus_dev_shutdown(struct d
+@@ -313,17 +358,20 @@
  
        DPRINTK("%s", dev->nodename);
  
@@ -958597,7 +958454,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
   out:
        put_device(&dev->dev);
  }
-@@ -333,12 +381,29 @@ int xenbus_register_driver_common(struct
+@@ -333,12 +381,29 @@
                                  struct module *owner,
                                  const char *mod_name)
  {
@@ -958628,7 +958485,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  }
  
  int __xenbus_register_frontend(struct xenbus_driver *drv,
-@@ -436,21 +501,30 @@ static void xenbus_dev_release(struct de
+@@ -436,21 +501,30 @@
  }
  
  static ssize_t xendev_show_nodename(struct device *dev,
@@ -958662,17 +958519,17 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  {
        return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
  }
-@@ -467,6 +541,9 @@ int xenbus_probe_node(struct xen_bus_typ
+@@ -466,6 +540,9 @@
+       char *tmpstring;
  
        enum xenbus_state state = xenbus_read_driver_state(nodename);
++
 +      if (bus->error)
 +              return bus->error;
-+
        if (state != XenbusStateInitialising) {
                /* Device is not new, so ignore it.  This can happen if a
-                  device is going away after switching to Closed.  */
-@@ -491,6 +568,9 @@ int xenbus_probe_node(struct xen_bus_typ
+@@ -491,6 +568,9 @@
        xendev->devicetype = tmpstring;
        init_completion(&xendev->down);
  
@@ -958682,7 +958539,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        xendev->dev.bus = &bus->bus;
        xendev->dev.release = xenbus_dev_release;
  
-@@ -571,6 +651,9 @@ int xenbus_probe_devices(struct xen_bus_
+@@ -571,6 +651,9 @@
        char **dir;
        unsigned int i, dir_n;
  
@@ -958692,7 +958549,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        dir = xenbus_directory(XBT_NIL, bus->root, "", &dir_n);
        if (IS_ERR(dir))
                return PTR_ERR(dir);
-@@ -614,7 +697,7 @@ void xenbus_dev_changed(const char *node
+@@ -614,7 +697,7 @@
        char type[BUS_ID_SIZE];
        const char *p, *root;
  
@@ -958701,7 +958558,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
                return;
  
        exists = xenbus_exists(XBT_NIL, node, "");
-@@ -748,7 +831,8 @@ void xenbus_suspend(void)
+@@ -748,7 +831,8 @@
  {
        DPRINTK("");
  
@@ -958711,7 +958568,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        xenbus_backend_suspend(suspend_dev);
        xs_suspend();
  }
-@@ -758,7 +842,8 @@ void xenbus_resume(void)
+@@ -758,7 +842,8 @@
  {
        xb_init_comms();
        xs_resume();
@@ -958721,7 +958578,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        xenbus_backend_resume(resume_dev);
  }
  EXPORT_SYMBOL_GPL(xenbus_resume);
-@@ -766,7 +851,8 @@ EXPORT_SYMBOL_GPL(xenbus_resume);
+@@ -766,7 +851,8 @@
  void xenbus_suspend_cancel(void)
  {
        xs_suspend_cancel();
@@ -958731,7 +958588,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        xenbus_backend_resume(suspend_cancel_dev);
  }
  EXPORT_SYMBOL_GPL(xenbus_suspend_cancel);
-@@ -794,6 +880,7 @@ void unregister_xenstore_notifier(struct
+@@ -794,6 +880,7 @@
  }
  EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
  
@@ -958739,7 +958596,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  void xenbus_probe(struct work_struct *unused)
  {
        BUG_ON((xenstored_ready <= 0));
-@@ -807,63 +894,191 @@ void xenbus_probe(struct work_struct *un
+@@ -807,63 +894,191 @@
        blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
  }
  
@@ -958891,7 +958748,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
 -              goto out_unreg_back;
 +              goto err;
        }
++
 +#if defined(CONFIG_XEN) || defined(MODULE)
 +      /* Register ourselves with the kernel device subsystem */
 +      if (!xenbus_frontend.error) {
@@ -958905,7 +958762,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
 +      }
 +#endif
 +      xenbus_backend_device_register();
-+
        if (!is_initial_xendomain())
                xenbus_probe(NULL);
  
@@ -958948,7 +958805,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  
  static int is_disconnected_device(struct device *dev, void *data)
  {
-@@ -883,12 +1098,14 @@ static int is_disconnected_device(struct
+@@ -883,12 +1098,14 @@
                return 0;
  
        xendrv = to_xenbus_driver(dev->driver);
@@ -958964,7 +958821,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
        return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
                                is_disconnected_device);
  }
-@@ -897,6 +1114,7 @@ static int print_device_status(struct de
+@@ -897,6 +1114,7 @@
  {
        struct xenbus_device *xendev = to_xenbus_device(dev);
        struct device_driver *drv = data;
@@ -958972,7 +958829,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
  
        /* Is this operation limited to a particular driver? */
        if (drv && (dev->driver != drv))
-@@ -906,12 +1124,23 @@ static int print_device_status(struct de
+@@ -906,11 +1124,22 @@
                /* Information only: is this too noisy? */
                printk(KERN_INFO "XENBUS: Device with no driver: %s\n",
                       xendev->nodename);
@@ -958990,16 +958847,15 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
 +                     "to device: %s (local state %d, remote state %d)\n",
 +                     xendev->nodename, xendev->state, rstate);
        }
++
 +      xendrv = to_xenbus_driver(dev->driver);
 +      if (xendrv->is_ready && !xendrv->is_ready(xendev))
 +              printk(KERN_WARNING "XENBUS: Device not ready: %s\n",
 +                     xendev->nodename);
-+
        return 0;
  }
-@@ -919,7 +1148,7 @@ static int print_device_status(struct de
+@@ -919,7 +1148,7 @@
  static int ready_to_wait_for_devices;
  
  /*
@@ -959008,7 +958864,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
   * to do this to guarantee that the filesystems and / or network devices
   * needed for boot are available, before we can allow the boot to proceed.
   *
-@@ -934,18 +1163,30 @@ static int ready_to_wait_for_devices;
+@@ -934,17 +1163,29 @@
   */
  static void wait_for_devices(struct xenbus_driver *xendrv)
  {
@@ -959035,14 +958891,13 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
 +
                schedule_timeout_interruptible(HZ/10);
        }
++
 +      if (seconds_waited)
 +              printk("\n");
-+
        bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
                         print_device_status);
- }
-@@ -953,10 +1194,18 @@ static void wait_for_devices(struct xenb
+@@ -953,10 +1194,18 @@
  #ifndef MODULE
  static int __init boot_wait_for_devices(void)
  {
@@ -959063,9 +958918,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.c linux-2.6.27.19-5.1/dr
 +      return bus_for_each_dev(&xenbus_frontend.bus, NULL, arg, fn);
 +}
 +EXPORT_SYMBOL_GPL(xenbus_for_each_frontend);
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.h linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.h
---- linux-2.6.27/drivers/xen/xenbus/xenbus_probe.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe.h      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe.h
+--- a/drivers/xen/xenbus/xenbus_probe.h        Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_probe.h        Wed May 06 16:56:46 2009 +0100
 @@ -34,27 +34,31 @@
  #ifndef _XENBUS_PROBE_H
  #define _XENBUS_PROBE_H
@@ -959103,14 +958958,14 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe.h linux-2.6.27.19-5.1/dr
  };
  
  extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
-@@ -72,3 +76,4 @@ extern int xenbus_probe_devices(struct x
+@@ -72,3 +76,4 @@
  extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
  
  #endif
 +
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe_backend.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe_backend.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_probe_backend.c      2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_probe_backend.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenbus/xenbus_probe_backend.c        Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,279 @@
 +/******************************************************************************
 + * Talks to Xen Store to figure out what devices we have (backend half).
@@ -959391,13 +959246,14 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_probe_backend.c linux-2.6.27.1
 +      return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn);
 +}
 +EXPORT_SYMBOL_GPL(xenbus_for_each_backend);
-diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_xs.c
---- linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenbus/xenbus_xs.c 2009-03-25 16:11:22.000000000 +0000
-@@ -47,6 +47,14 @@
+diff -r 9608d5473017 drivers/xen/xenbus/xenbus_xs.c
+--- a/drivers/xen/xenbus/xenbus_xs.c   Wed May 06 15:47:13 2009 +0100
++++ b/drivers/xen/xenbus/xenbus_xs.c   Wed May 06 16:56:46 2009 +0100
+@@ -46,6 +46,14 @@
+ #include <linux/mutex.h>
  #include <xen/xenbus.h>
  #include "xenbus_comms.h"
++
 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
 +#include <xen/platform-compat.h>
 +#endif
@@ -959405,11 +959261,10 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
 +#ifndef PF_NOFREEZE /* Old kernel (pre-2.6.6). */
 +#define PF_NOFREEZE   0
 +#endif
-+
  struct xs_stored_msg {
        struct list_head list;
-@@ -108,7 +116,7 @@ static DEFINE_SPINLOCK(watch_events_lock
+@@ -108,7 +116,7 @@
   * carrying out work.
   */
  static pid_t xenwatch_pid;
@@ -959418,7 +959273,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
  static DECLARE_WAIT_QUEUE_HEAD(watch_events_waitq);
  
  static int get_error(const char *errorstring)
-@@ -177,7 +185,7 @@ void *xenbus_dev_request_and_reply(struc
+@@ -177,7 +185,7 @@
  
        mutex_unlock(&xs_state.request_mutex);
  
@@ -959427,7 +959282,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
            ((req_msg.type == XS_TRANSACTION_START) &&
             (msg->type == XS_ERROR)))
                up_read(&xs_state.transaction_mutex);
-@@ -294,7 +302,7 @@ static char **split(char *strings, unsig
+@@ -294,7 +302,7 @@
        char *p, **ret;
  
        /* Count the strings. */
@@ -959436,7 +959291,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
  
        /* Transfer to one big alloc for easy freeing. */
        ret = kmalloc(*num * sizeof(char *) + len, GFP_NOIO | __GFP_HIGH);
-@@ -308,6 +316,7 @@ static char **split(char *strings, unsig
+@@ -308,6 +316,7 @@
        strings = (char *)&ret[*num];
        for (p = strings, *num = 0; p < strings + len; p += strlen(p) + 1)
                ret[(*num)++] = p;
@@ -959444,7 +959299,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
  
        return ret;
  }
-@@ -498,7 +507,7 @@ int xenbus_printf(struct xenbus_transact
+@@ -498,7 +507,7 @@
  #define PRINTF_BUFFER_SIZE 4096
        char *printf_buffer;
  
@@ -959453,7 +959308,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
        if (printf_buffer == NULL)
                return -ENOMEM;
  
-@@ -621,6 +630,10 @@ void unregister_xenbus_watch(struct xenb
+@@ -621,6 +630,10 @@
        char token[sizeof(watch) * 2 + 1];
        int err;
  
@@ -959464,7 +959319,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
        sprintf(token, "%lX", (long)watch);
  
        down_read(&xs_state.watch_mutex);
-@@ -693,11 +706,32 @@ void xs_suspend_cancel(void)
+@@ -693,11 +706,32 @@
        up_write(&xs_state.transaction_mutex);
  }
  
@@ -959497,7 +959352,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
        for (;;) {
                wait_event_interruptible(watch_events_waitq,
                                         !list_empty(&watch_events));
-@@ -713,17 +747,39 @@ static int xenwatch_thread(void *unused)
+@@ -713,17 +747,39 @@
                        list_del(ent);
                spin_unlock(&watch_events_lock);
  
@@ -959545,7 +959400,7 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
        }
  
        return 0;
-@@ -817,6 +873,7 @@ static int xenbus_thread(void *unused)
+@@ -817,6 +873,7 @@
  {
        int err;
  
@@ -959553,9 +959408,9 @@ diff -purN linux-2.6.27/drivers/xen/xenbus/xenbus_xs.c linux-2.6.27.19-5.1/drive
        for (;;) {
                err = process_msg();
                if (err)
-diff -purN linux-2.6.27/drivers/xen/xenoprof/xenoprofile.c linux-2.6.27.19-5.1/drivers/xen/xenoprof/xenoprofile.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/drivers/xen/xenoprof/xenoprofile.c     2009-03-25 16:11:22.000000000 +0000
+diff -r 9608d5473017 drivers/xen/xenoprof/xenoprofile.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/drivers/xen/xenoprof/xenoprofile.c       Wed May 06 16:56:46 2009 +0100
 @@ -0,0 +1,544 @@
 +/**
 + * @file xenoprofile.c
@@ -960101,10 +959956,10 @@ diff -purN linux-2.6.27/drivers/xen/xenoprof/xenoprofile.c linux-2.6.27.19-5.1/d
 +              WARN_ON(HYPERVISOR_xenoprof_op(XENOPROF_shutdown, NULL));
 +        }
 +}
-diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
---- linux-2.6.27/fs/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/Kconfig     2009-03-25 16:11:36.000000000 +0000
-@@ -124,6 +124,13 @@ config EXT3_FS_POSIX_ACL
+diff -r 9608d5473017 fs/Kconfig
+--- a/fs/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/fs/Kconfig       Wed May 06 16:56:46 2009 +0100
+@@ -124,6 +124,13 @@
  
          If you don't know what Access Control Lists are, say N
  
@@ -960118,7 +959973,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  config EXT3_FS_SECURITY
        bool "Ext3 Security Labels"
        depends on EXT3_FS_XATTR
-@@ -206,17 +213,16 @@ config JBD
+@@ -206,17 +213,16 @@
        tristate
        help
          This is a generic journalling layer for block devices.  It is
@@ -960142,7 +959997,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  
  config JBD_DEBUG
        bool "JBD (ext3) debugging support"
-@@ -240,16 +246,17 @@ config JBD2
+@@ -240,16 +246,17 @@
        help
          This is a generic journaling layer for block devices that support
          both 32-bit and 64-bit block numbers.  It is currently used by
@@ -960167,7 +960022,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  
  config JBD2_DEBUG
        bool "JBD2 (ext4dev/ext4) debugging support"
-@@ -419,6 +426,10 @@ config FS_POSIX_ACL
+@@ -419,6 +426,10 @@
        bool
        default n
  
@@ -960178,7 +960033,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  source "fs/xfs/Kconfig"
  source "fs/gfs2/Kconfig"
  
-@@ -426,7 +437,7 @@ config OCFS2_FS
+@@ -426,7 +437,7 @@
        tristate "OCFS2 file system support"
        depends on NET && SYSFS
        select CONFIGFS_FS
@@ -960187,7 +960042,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
        select CRC32
        help
          OCFS2 is a general purpose extent based shared disk cluster file
-@@ -497,6 +508,16 @@ config OCFS2_DEBUG_FS
+@@ -497,6 +508,16 @@
          this option for debugging only as it is likely to decrease
          performance of the filesystem.
  
@@ -960204,7 +960059,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  endif # BLOCK
  
  config DNOTIFY
-@@ -538,6 +559,25 @@ config INOTIFY_USER
+@@ -538,6 +559,25 @@
  
          If unsure, say Y.
  
@@ -960230,7 +960085,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  config QUOTA
        bool "Quota support"
        help
-@@ -569,6 +609,10 @@ config PRINT_QUOTA_WARNING
+@@ -569,6 +609,10 @@
          Note that this behavior is currently deprecated and may go away in
          future. Please use notification via netlink socket instead.
  
@@ -960241,7 +960096,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  config QFMT_V1
        tristate "Old quota format support"
        depends on QUOTA
-@@ -580,6 +624,7 @@ config QFMT_V1
+@@ -580,6 +624,7 @@
  config QFMT_V2
        tristate "Quota format v2 support"
        depends on QUOTA
@@ -960249,7 +960104,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
        help
          This quota format allows using quotas with 32-bit UIDs/GIDs. If you
          need this functionality say Y here.
-@@ -957,6 +1002,7 @@ config HUGETLBFS
+@@ -957,6 +1002,7 @@
        bool "HugeTLB file system support"
        depends on X86 || IA64 || PPC64 || SPARC64 || (SUPERH && MMU) || \
                   (S390 && 64BIT) || BROKEN
@@ -960257,7 +960112,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
        help
          hugetlbfs is a filesystem backing for HugeTLB pages, based on
          ramfs. For architectures that support it, say Y here and read
-@@ -1348,6 +1394,56 @@ config CRAMFS
+@@ -1348,6 +1394,56 @@
  
          If unsure, say N.
  
@@ -960314,7 +960169,7 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  config VXFS_FS
        tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
        depends on BLOCK
-@@ -1644,6 +1740,18 @@ config ROOT_NFS
+@@ -1644,6 +1740,18 @@
  
          Most people say N here.
  
@@ -960333,19 +960188,19 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  config NFSD
        tristate "NFS server support"
        depends on INET
-@@ -1765,6 +1873,11 @@ config SUNRPC_XPRT_RDMA
+@@ -1764,6 +1872,11 @@
+         choose M here: the module will be called xprtrdma.
  
          If unsure, say N.
++
 +config SUNRPC_SWAP
 +      def_bool n
 +      depends on SUNRPC
 +      select NETVM
-+
  config RPCSEC_GSS_KRB5
        tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
-       depends on SUNRPC && EXPERIMENTAL
-@@ -2080,6 +2193,15 @@ config 9P_FS
+@@ -2080,6 +2193,15 @@
  
          If unsure, say N.
  
@@ -960361,10 +960216,10 @@ diff -purN linux-2.6.27/fs/Kconfig linux-2.6.27.19-5.1/fs/Kconfig
  endif # NETWORK_FILESYSTEMS
  
  if BLOCK
-diff -purN linux-2.6.27/fs/Makefile linux-2.6.27.19-5.1/fs/Makefile
---- linux-2.6.27/fs/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/Makefile    2009-03-25 16:11:38.000000000 +0000
-@@ -50,11 +50,18 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.
+diff -r 9608d5473017 fs/Makefile
+--- a/fs/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/fs/Makefile      Wed May 06 16:56:46 2009 +0100
+@@ -50,10 +50,17 @@
  obj-$(CONFIG_NFS_COMMON)      += nfs_common/
  obj-$(CONFIG_GENERIC_ACL)     += generic_acl.o
  
@@ -960377,13 +960232,12 @@ diff -purN linux-2.6.27/fs/Makefile linux-2.6.27.19-5.1/fs/Makefile
  obj-$(CONFIG_QFMT_V2)         += quota_v2.o
 +obj-$(CONFIG_QUOTA_TREE)      += quota_tree.o
  obj-$(CONFIG_QUOTACTL)                += quota.o
-+obj-$(CONFIG_DMAPI)           += dmapi/
 +
++obj-$(CONFIG_DMAPI)           += dmapi/
  obj-$(CONFIG_DNOTIFY)         += dnotify.o
  
- obj-$(CONFIG_PROC_FS)         += proc/
-@@ -74,6 +81,7 @@ obj-$(CONFIG_JBD)            += jbd/
+@@ -74,6 +81,7 @@
  obj-$(CONFIG_JBD2)            += jbd2/
  obj-$(CONFIG_EXT2_FS)         += ext2/
  obj-$(CONFIG_CRAMFS)          += cramfs/
@@ -960391,15 +960245,15 @@ diff -purN linux-2.6.27/fs/Makefile linux-2.6.27.19-5.1/fs/Makefile
  obj-y                         += ramfs/
  obj-$(CONFIG_HUGETLBFS)               += hugetlbfs/
  obj-$(CONFIG_CODA_FS)         += coda/
-@@ -122,3 +130,4 @@ obj-$(CONFIG_HPPFS)                += hppfs/
+@@ -122,3 +130,4 @@
  obj-$(CONFIG_DEBUG_FS)                += debugfs/
  obj-$(CONFIG_OCFS2_FS)                += ocfs2/
  obj-$(CONFIG_GFS2_FS)           += gfs2/
 +obj-$(CONFIG_NOVFS)           += novfs/
-diff -purN linux-2.6.27/fs/affs/file.c linux-2.6.27.19-5.1/fs/affs/file.c
---- linux-2.6.27/fs/affs/file.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/affs/file.c 2009-03-25 16:11:36.000000000 +0000
-@@ -628,7 +628,7 @@ static int affs_write_begin_ofs(struct f
+diff -r 9608d5473017 fs/affs/file.c
+--- a/fs/affs/file.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/affs/file.c   Wed May 06 16:56:46 2009 +0100
+@@ -628,7 +628,7 @@
        }
  
        index = pos >> PAGE_CACHE_SHIFT;
@@ -960408,10 +960262,10 @@ diff -purN linux-2.6.27/fs/affs/file.c linux-2.6.27.19-5.1/fs/affs/file.c
        if (!page)
                return -ENOMEM;
        *pagep = page;
-diff -purN linux-2.6.27/fs/afs/dir.c linux-2.6.27.19-5.1/fs/afs/dir.c
---- linux-2.6.27/fs/afs/dir.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/dir.c   2009-03-25 16:11:39.000000000 +0000
-@@ -45,6 +45,7 @@ const struct file_operations afs_dir_fil
+diff -r 9608d5473017 fs/afs/dir.c
+--- a/fs/afs/dir.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/dir.c     Wed May 06 16:56:46 2009 +0100
+@@ -45,6 +45,7 @@
        .release        = afs_release,
        .readdir        = afs_readdir,
        .lock           = afs_lock,
@@ -960419,10 +960273,10 @@ diff -purN linux-2.6.27/fs/afs/dir.c linux-2.6.27.19-5.1/fs/afs/dir.c
  };
  
  const struct inode_operations afs_dir_inode_operations = {
-diff -purN linux-2.6.27/fs/afs/file.c linux-2.6.27.19-5.1/fs/afs/file.c
---- linux-2.6.27/fs/afs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/file.c  2009-03-25 16:11:39.000000000 +0000
-@@ -36,6 +36,7 @@ const struct file_operations afs_file_op
+diff -r 9608d5473017 fs/afs/file.c
+--- a/fs/afs/file.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/file.c    Wed May 06 16:56:46 2009 +0100
+@@ -36,6 +36,7 @@
        .fsync          = afs_fsync,
        .lock           = afs_lock,
        .flock          = afs_flock,
@@ -960430,10 +960284,10 @@ diff -purN linux-2.6.27/fs/afs/file.c linux-2.6.27.19-5.1/fs/afs/file.c
  };
  
  const struct inode_operations afs_file_inode_operations = {
-diff -purN linux-2.6.27/fs/afs/inode.c linux-2.6.27.19-5.1/fs/afs/inode.c
---- linux-2.6.27/fs/afs/inode.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/inode.c 2009-03-25 16:11:39.000000000 +0000
-@@ -358,7 +358,8 @@ void afs_clear_inode(struct inode *inode
+diff -r 9608d5473017 fs/afs/inode.c
+--- a/fs/afs/inode.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/inode.c   Wed May 06 16:56:46 2009 +0100
+@@ -358,7 +358,8 @@
  /*
   * set the attributes of an inode
   */
@@ -960443,7 +960297,7 @@ diff -purN linux-2.6.27/fs/afs/inode.c linux-2.6.27.19-5.1/fs/afs/inode.c
  {
        struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
        struct key *key;
-@@ -380,8 +381,8 @@ int afs_setattr(struct dentry *dentry, s
+@@ -380,8 +381,8 @@
                afs_writeback_all(vnode);
        }
  
@@ -960454,7 +960308,7 @@ diff -purN linux-2.6.27/fs/afs/inode.c linux-2.6.27.19-5.1/fs/afs/inode.c
        } else {
                key = afs_request_key(vnode->volume->cell);
                if (IS_ERR(key)) {
-@@ -391,10 +392,20 @@ int afs_setattr(struct dentry *dentry, s
+@@ -391,10 +392,20 @@
        }
  
        ret = afs_vnode_setattr(vnode, key, attr);
@@ -960476,10 +960330,10 @@ diff -purN linux-2.6.27/fs/afs/inode.c linux-2.6.27.19-5.1/fs/afs/inode.c
 +{
 +      return afs_do_setattr(file->f_path.dentry, attr, file);
 +}
-diff -purN linux-2.6.27/fs/afs/internal.h linux-2.6.27.19-5.1/fs/afs/internal.h
---- linux-2.6.27/fs/afs/internal.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/afs/internal.h      2009-03-25 16:11:39.000000000 +0000
-@@ -548,6 +548,7 @@ extern void afs_zap_data(struct afs_vnod
+diff -r 9608d5473017 fs/afs/internal.h
+--- a/fs/afs/internal.h        Wed May 06 15:47:13 2009 +0100
++++ b/fs/afs/internal.h        Wed May 06 16:56:46 2009 +0100
+@@ -548,6 +548,7 @@
  extern int afs_validate(struct afs_vnode *, struct key *);
  extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
  extern int afs_setattr(struct dentry *, struct iattr *);
@@ -960487,22 +960341,22 @@ diff -purN linux-2.6.27/fs/afs/internal.h linux-2.6.27.19-5.1/fs/afs/internal.h
  extern void afs_clear_inode(struct inode *);
  
  /*
-diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
---- linux-2.6.27/fs/aio.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/aio.c       2009-03-25 16:11:39.000000000 +0000
-@@ -36,6 +36,11 @@
+diff -r 9608d5473017 fs/aio.c
+--- a/fs/aio.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/aio.c Wed May 06 16:56:46 2009 +0100
+@@ -35,6 +35,11 @@
+ #include <asm/kmap_types.h>
  #include <asm/uaccess.h>
  #include <asm/mmu_context.h>
++
 +#ifdef CONFIG_EPOLL
 +#include <linux/poll.h>
 +#include <linux/anon_inodes.h>
 +#endif
-+
  #if DEBUG > 1
  #define dprintk               printk
- #else
-@@ -1010,6 +1015,11 @@ put_rq:
+@@ -1010,6 +1015,11 @@
        if (waitqueue_active(&ctx->wait))
                wake_up(&ctx->wait);
  
@@ -960514,7 +960368,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
        spin_unlock_irqrestore(&ctx->ctx_lock, flags);
        return ret;
  }
-@@ -1017,6 +1027,8 @@ put_rq:
+@@ -1017,6 +1027,8 @@
  /* aio_read_evt
   *    Pull an event off of the ioctx's event ring.  Returns the number of 
   *    events fetched (0 or 1 ;-)
@@ -960523,7 +960377,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
   *    FIXME: make this use cmpxchg.
   *    TODO: make the ringbuffer user mmap()able (requires FIXME).
   */
-@@ -1039,13 +1051,18 @@ static int aio_read_evt(struct kioctx *i
+@@ -1039,13 +1051,18 @@
  
        head = ring->head % info->nr;
        if (head != ring->tail) {
@@ -960549,7 +960403,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
        }
        spin_unlock(&info->ring_lock);
  
-@@ -1235,6 +1252,14 @@ static void io_destroy(struct kioctx *io
+@@ -1235,6 +1252,14 @@
  
        aio_cancel_all(ioctx);
        wait_for_all_aios(ioctx);
@@ -960564,10 +960418,11 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  
        /*
         * Wake up any waiters.  The setting of ctx->dead must be seen
-@@ -1245,6 +1270,70 @@ static void io_destroy(struct kioctx *io
+@@ -1244,6 +1269,70 @@
+       wake_up(&ioctx->wait);
        put_ioctx(ioctx);       /* once for the lookup */
  }
++
 +#ifdef CONFIG_EPOLL
 +
 +static int aio_queue_fd_close(struct inode *inode, struct file *file)
@@ -960631,11 +960486,10 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
 +      return fd;
 +}
 +#endif
-+
  /* sys_io_setup:
   *    Create an aio_context capable of receiving at least nr_events.
-  *    ctxp must not point to an aio_context that already exists, and
-@@ -1257,18 +1346,30 @@ static void io_destroy(struct kioctx *io
+@@ -1257,18 +1346,30 @@
   *    resources are available.  May fail with -EFAULT if an invalid
   *    pointer is passed for ctxp.  Will fail with -ENOSYS if not
   *    implemented.
@@ -960667,7 +960521,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
        if (unlikely(ctx || nr_events == 0)) {
                pr_debug("EINVAL: io_setup: ctx %lu nr_events %u\n",
                         ctx, nr_events);
-@@ -1279,8 +1380,12 @@ asmlinkage long sys_io_setup(unsigned nr
+@@ -1279,8 +1380,12 @@
        ret = PTR_ERR(ioctx);
        if (!IS_ERR(ioctx)) {
                ret = put_user(ioctx->user_id, ctxp);
@@ -960682,7 +960536,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  
                get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
                io_destroy(ioctx);
-@@ -1296,7 +1401,7 @@ out:
+@@ -1296,7 +1401,7 @@
   *    implemented.  May fail with -EFAULT if the context pointed to
   *    is invalid.
   */
@@ -960691,7 +960545,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  {
        struct kioctx *ioctx = lookup_ioctx(ctx);
        if (likely(NULL != ioctx)) {
-@@ -1650,8 +1755,8 @@ out_put_req:
+@@ -1650,8 +1755,8 @@
   *    are available to queue any iocbs.  Will return 0 if nr is 0.  Will
   *    fail with -ENOSYS if not implemented.
   */
@@ -960702,7 +960556,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  {
        struct kioctx *ctx;
        long ret = 0;
-@@ -1725,8 +1830,8 @@ static struct kiocb *lookup_kiocb(struct
+@@ -1725,8 +1830,8 @@
   *    invalid.  May fail with -EAGAIN if the iocb specified was not
   *    cancelled.  Will fail with -ENOSYS if not implemented.
   */
@@ -960713,7 +960567,7 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  {
        int (*cancel)(struct kiocb *iocb, struct io_event *res);
        struct kioctx *ctx;
-@@ -1787,11 +1892,11 @@ asmlinkage long sys_io_cancel(aio_contex
+@@ -1787,11 +1892,11 @@
   *    will be updated if not NULL and the operation blocks.  Will fail
   *    with -ENOSYS if not implemented.
   */
@@ -960730,10 +960584,10 @@ diff -purN linux-2.6.27/fs/aio.c linux-2.6.27.19-5.1/fs/aio.c
  {
        struct kioctx *ioctx = lookup_ioctx(ctx_id);
        long ret = -EINVAL;
-diff -purN linux-2.6.27/fs/attr.c linux-2.6.27.19-5.1/fs/attr.c
---- linux-2.6.27/fs/attr.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/attr.c      2009-03-25 16:11:36.000000000 +0000
-@@ -100,7 +100,8 @@ int inode_setattr(struct inode * inode, 
+diff -r 9608d5473017 fs/attr.c
+--- a/fs/attr.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/attr.c        Wed May 06 16:56:46 2009 +0100
+@@ -100,7 +100,8 @@
  }
  EXPORT_SYMBOL(inode_setattr);
  
@@ -960743,7 +960597,7 @@ diff -purN linux-2.6.27/fs/attr.c linux-2.6.27.19-5.1/fs/attr.c
  {
        struct inode *inode = dentry->d_inode;
        mode_t mode = inode->i_mode;
-@@ -163,13 +164,28 @@ int notify_change(struct dentry * dentry
+@@ -163,13 +164,28 @@
                down_write(&dentry->d_inode->i_alloc_sem);
  
        if (inode->i_op && inode->i_op->setattr) {
@@ -960776,7 +960630,7 @@ diff -purN linux-2.6.27/fs/attr.c linux-2.6.27.19-5.1/fs/attr.c
                if (!error) {
                        if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
                            (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
-@@ -187,5 +203,12 @@ int notify_change(struct dentry * dentry
+@@ -187,5 +203,12 @@
  
        return error;
  }
@@ -960789,10 +960643,10 @@ diff -purN linux-2.6.27/fs/attr.c linux-2.6.27.19-5.1/fs/attr.c
 +}
  
  EXPORT_SYMBOL(notify_change);
-diff -purN linux-2.6.27/fs/binfmt_elf.c linux-2.6.27.19-5.1/fs/binfmt_elf.c
---- linux-2.6.27/fs/binfmt_elf.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_elf.c        2009-03-25 16:11:37.000000000 +0000
-@@ -1188,9 +1188,11 @@ static unsigned long vma_dump_size(struc
+diff -r 9608d5473017 fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_elf.c  Wed May 06 16:56:46 2009 +0100
+@@ -1188,9 +1188,11 @@
         * check for an ELF header.  If we find one, dump the first page to
         * aid in determining what was mapped here.
         */
@@ -960805,7 +960659,7 @@ diff -purN linux-2.6.27/fs/binfmt_elf.c linux-2.6.27.19-5.1/fs/binfmt_elf.c
                /*
                 * Doing it this way gets the constant folded by GCC.
                 */
-@@ -1203,7 +1205,15 @@ static unsigned long vma_dump_size(struc
+@@ -1203,7 +1205,15 @@
                magic.elfmag[EI_MAG1] = ELFMAG1;
                magic.elfmag[EI_MAG2] = ELFMAG2;
                magic.elfmag[EI_MAG3] = ELFMAG3;
@@ -960822,10 +960676,10 @@ diff -purN linux-2.6.27/fs/binfmt_elf.c linux-2.6.27.19-5.1/fs/binfmt_elf.c
                        return PAGE_SIZE;
        }
  
-diff -purN linux-2.6.27/fs/binfmt_em86.c linux-2.6.27.19-5.1/fs/binfmt_em86.c
---- linux-2.6.27/fs/binfmt_em86.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_em86.c       2009-03-25 16:11:35.000000000 +0000
-@@ -43,7 +43,7 @@ static int load_em86(struct linux_binprm
+diff -r 9608d5473017 fs/binfmt_em86.c
+--- a/fs/binfmt_em86.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_em86.c Wed May 06 16:56:46 2009 +0100
+@@ -43,7 +43,7 @@
                        return -ENOEXEC;
        }
  
@@ -960834,10 +960688,10 @@ diff -purN linux-2.6.27/fs/binfmt_em86.c linux-2.6.27.19-5.1/fs/binfmt_em86.c
        allow_write_access(bprm->file);
        fput(bprm->file);
        bprm->file = NULL;
-diff -purN linux-2.6.27/fs/binfmt_misc.c linux-2.6.27.19-5.1/fs/binfmt_misc.c
---- linux-2.6.27/fs/binfmt_misc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_misc.c       2009-03-25 16:11:36.000000000 +0000
-@@ -117,7 +117,7 @@ static int load_misc_binary(struct linux
+diff -r 9608d5473017 fs/binfmt_misc.c
+--- a/fs/binfmt_misc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_misc.c Wed May 06 16:56:46 2009 +0100
+@@ -117,7 +117,7 @@
                goto _ret;
  
        retval = -ENOEXEC;
@@ -960846,7 +960700,7 @@ diff -purN linux-2.6.27/fs/binfmt_misc.c linux-2.6.27.19-5.1/fs/binfmt_misc.c
                goto _ret;
  
        /* to keep locking time low, we copy the interpreter string */
-@@ -197,7 +197,7 @@ static int load_misc_binary(struct linux
+@@ -197,7 +197,7 @@
        if (retval < 0)
                goto _error;
  
@@ -960855,10 +960709,10 @@ diff -purN linux-2.6.27/fs/binfmt_misc.c linux-2.6.27.19-5.1/fs/binfmt_misc.c
  
        retval = search_binary_handler (bprm, regs);
        if (retval < 0)
-diff -purN linux-2.6.27/fs/binfmt_script.c linux-2.6.27.19-5.1/fs/binfmt_script.c
---- linux-2.6.27/fs/binfmt_script.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/binfmt_script.c     2009-03-25 16:11:36.000000000 +0000
-@@ -22,14 +22,15 @@ static int load_script(struct linux_binp
+diff -r 9608d5473017 fs/binfmt_script.c
+--- a/fs/binfmt_script.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/binfmt_script.c       Wed May 06 16:56:46 2009 +0100
+@@ -22,14 +22,15 @@
        char interp[BINPRM_BUF_SIZE];
        int retval;
  
@@ -960876,10 +960730,10 @@ diff -purN linux-2.6.27/fs/binfmt_script.c linux-2.6.27.19-5.1/fs/binfmt_script.
        allow_write_access(bprm->file);
        fput(bprm->file);
        bprm->file = NULL;
-diff -purN linux-2.6.27/fs/bio-integrity.c linux-2.6.27.19-5.1/fs/bio-integrity.c
---- linux-2.6.27/fs/bio-integrity.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/bio-integrity.c     2009-03-25 16:11:36.000000000 +0000
-@@ -107,7 +107,8 @@ void bio_integrity_free(struct bio *bio,
+diff -r 9608d5473017 fs/bio-integrity.c
+--- a/fs/bio-integrity.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/bio-integrity.c       Wed May 06 16:56:46 2009 +0100
+@@ -107,7 +107,8 @@
        BUG_ON(bip == NULL);
  
        /* A cloned bio doesn't own the integrity metadata */
@@ -960889,7 +960743,7 @@ diff -purN linux-2.6.27/fs/bio-integrity.c linux-2.6.27.19-5.1/fs/bio-integrity.
                kfree(bip->bip_buf);
  
        mempool_free(bip->bip_vec, bs->bvec_pools[bip->bip_pool]);
-@@ -654,19 +655,20 @@ EXPORT_SYMBOL(bio_integrity_split);
+@@ -654,19 +655,20 @@
   * bio_integrity_clone - Callback for cloning bios with integrity metadata
   * @bio:      New bio
   * @bio_src:  Original bio
@@ -960912,10 +960766,10 @@ diff -purN linux-2.6.27/fs/bio-integrity.c linux-2.6.27.19-5.1/fs/bio-integrity.
  
        if (bip == NULL)
                return -EIO;
-diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
---- linux-2.6.27/fs/bio.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/bio.c       2009-03-25 16:11:35.000000000 +0000
-@@ -111,6 +111,7 @@ void bio_init(struct bio *bio)
+diff -r 9608d5473017 fs/bio.c
+--- a/fs/bio.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/bio.c Wed May 06 16:56:46 2009 +0100
+@@ -111,6 +111,7 @@
  {
        memset(bio, 0, sizeof(*bio));
        bio->bi_flags = 1 << BIO_UPTODATE;
@@ -960923,7 +960777,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
        atomic_set(&bio->bi_cnt, 1);
  }
  
-@@ -208,14 +209,6 @@ inline int bio_phys_segments(struct requ
+@@ -208,14 +209,6 @@
        return bio->bi_phys_segments;
  }
  
@@ -960938,7 +960792,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
  /**
   *    __bio_clone     -       clone a bio
   *    @bio: destination bio
-@@ -263,7 +256,7 @@ struct bio *bio_clone(struct bio *bio, g
+@@ -263,7 +256,7 @@
        if (bio_integrity(bio)) {
                int ret;
  
@@ -960947,7 +960801,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
  
                if (ret < 0)
                        return NULL;
-@@ -350,8 +343,7 @@ static int __bio_add_page(struct request
+@@ -350,8 +343,7 @@
         */
  
        while (bio->bi_phys_segments >= q->max_phys_segments
@@ -960957,7 +960811,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
  
                if (retried_segments)
                        return 0;
-@@ -395,13 +387,11 @@ static int __bio_add_page(struct request
+@@ -395,13 +387,11 @@
        }
  
        /* If we may be able to merge these biovecs, force a recount */
@@ -960972,7 +960826,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
   done:
        bio->bi_size += len;
        return len;
-@@ -1192,6 +1182,16 @@ void bio_endio(struct bio *bio, int erro
+@@ -1192,6 +1182,16 @@
        else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
                error = -EIO;
  
@@ -960989,7 +960843,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
        if (bio->bi_end_io)
                bio->bi_end_io(bio, error);
  }
-@@ -1274,6 +1274,42 @@ struct bio_pair *bio_split(struct bio *b
+@@ -1274,6 +1274,42 @@
        return bp;
  }
  
@@ -961032,7 +960886,7 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
  
  /*
   * create memory pools for biovec's in a bio_set.
-@@ -1383,7 +1419,6 @@ EXPORT_SYMBOL(bio_init);
+@@ -1383,7 +1419,6 @@
  EXPORT_SYMBOL(__bio_clone);
  EXPORT_SYMBOL(bio_clone);
  EXPORT_SYMBOL(bio_phys_segments);
@@ -961040,10 +960894,10 @@ diff -purN linux-2.6.27/fs/bio.c linux-2.6.27.19-5.1/fs/bio.c
  EXPORT_SYMBOL(bio_add_page);
  EXPORT_SYMBOL(bio_add_pc_page);
  EXPORT_SYMBOL(bio_get_nr_vecs);
-diff -purN linux-2.6.27/fs/block_dev.c linux-2.6.27.19-5.1/fs/block_dev.c
---- linux-2.6.27/fs/block_dev.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/block_dev.c 2009-03-25 16:11:35.000000000 +0000
-@@ -868,6 +868,91 @@ struct block_device *open_by_devnum(dev_
+diff -r 9608d5473017 fs/block_dev.c
+--- a/fs/block_dev.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/block_dev.c   Wed May 06 16:56:46 2009 +0100
+@@ -868,6 +868,91 @@
  
  EXPORT_SYMBOL(open_by_devnum);
  
@@ -961135,7 +960989,7 @@ diff -purN linux-2.6.27/fs/block_dev.c linux-2.6.27.19-5.1/fs/block_dev.c
  /*
   * This routine checks whether a removable media has been changed,
   * and invalidates all buffer-cache-entries in that case. This
-@@ -887,13 +972,9 @@ int check_disk_change(struct block_devic
+@@ -887,13 +972,9 @@
        if (!bdops->media_changed(bdev->bd_disk))
                return 0;
  
@@ -961150,9 +961004,9 @@ diff -purN linux-2.6.27/fs/block_dev.c linux-2.6.27.19-5.1/fs/block_dev.c
        return 1;
  }
  
-diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
---- linux-2.6.27/fs/buffer.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/buffer.c    2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/buffer.c
+--- a/fs/buffer.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/buffer.c      Wed May 06 16:56:46 2009 +0100
 @@ -41,6 +41,7 @@
  #include <linux/bitops.h>
  #include <linux/mpage.h>
@@ -961161,7 +961015,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
  
  static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
  
-@@ -89,7 +90,9 @@ void unlock_buffer(struct buffer_head *b
+@@ -89,7 +90,9 @@
   */
  void __wait_on_buffer(struct buffer_head * bh)
  {
@@ -961171,7 +961025,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
  }
  
  static void
-@@ -100,10 +103,18 @@ __clear_page_buffers(struct page *page)
+@@ -100,10 +103,18 @@
        page_cache_release(page);
  }
  
@@ -961191,7 +961045,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
        printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n",
                        bdevname(bh->b_bdev, b),
                        (unsigned long long)bh->b_blocknr);
-@@ -145,7 +156,7 @@ void end_buffer_write_sync(struct buffer
+@@ -145,7 +156,7 @@
        if (uptodate) {
                set_buffer_uptodate(bh);
        } else {
@@ -961200,7 +961054,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
                        buffer_io_error(bh);
                        printk(KERN_WARNING "lost page write due to "
                                        "I/O error on %s\n",
-@@ -395,7 +406,7 @@ static void end_buffer_async_read(struct
+@@ -395,7 +406,7 @@
                set_buffer_uptodate(bh);
        } else {
                clear_buffer_uptodate(bh);
@@ -961209,7 +961063,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
                        buffer_io_error(bh);
                SetPageError(page);
        }
-@@ -456,7 +467,7 @@ static void end_buffer_async_write(struc
+@@ -456,7 +467,7 @@
        if (uptodate) {
                set_buffer_uptodate(bh);
        } else {
@@ -961218,7 +961072,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
                        buffer_io_error(bh);
                        printk(KERN_WARNING "lost page write due to "
                                        "I/O error on %s\n",
-@@ -1988,7 +1999,7 @@ int block_write_begin(struct file *file,
+@@ -1988,7 +1999,7 @@
        page = *pagep;
        if (page == NULL) {
                ownpage = 1;
@@ -961227,7 +961081,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
                if (!page) {
                        status = -ENOMEM;
                        goto out;
-@@ -2494,7 +2505,7 @@ int nobh_write_begin(struct file *file, 
+@@ -2494,7 +2505,7 @@
        from = pos & (PAGE_CACHE_SIZE - 1);
        to = from + len;
  
@@ -961236,7 +961090,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
        if (!page)
                return -ENOMEM;
        *pagep = page;
-@@ -2913,6 +2924,9 @@ static void end_bio_bh_io_sync(struct bi
+@@ -2913,6 +2924,9 @@
                set_bit(BH_Eopnotsupp, &bh->b_state);
        }
  
@@ -961246,7 +961100,7 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
        bh->b_end_io(bh, test_bit(BIO_UPTODATE, &bio->bi_flags));
        bio_put(bio);
  }
-@@ -3177,7 +3191,7 @@ void block_sync_page(struct page *page)
+@@ -3177,7 +3191,7 @@
   * Use of bdflush() is deprecated and will be removed in a future kernel.
   * The `pdflush' kernel threads fully replace bdflush daemons and this call.
   */
@@ -961255,10 +961109,10 @@ diff -purN linux-2.6.27/fs/buffer.c linux-2.6.27.19-5.1/fs/buffer.c
  {
        static int msg_count;
  
-diff -purN linux-2.6.27/fs/cifs/CHANGES linux-2.6.27.19-5.1/fs/cifs/CHANGES
---- linux-2.6.27/fs/cifs/CHANGES       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/CHANGES        2009-03-25 16:11:39.000000000 +0000
-@@ -12,7 +12,7 @@ create. Update cifs.upcall version to ha
+diff -r 9608d5473017 fs/cifs/CHANGES
+--- a/fs/cifs/CHANGES  Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/CHANGES  Wed May 06 16:56:46 2009 +0100
+@@ -12,7 +12,7 @@
  on dns_upcall (resolving DFS referralls).  Fix plain text password
  authentication (requires setting SecurityFlags to 0x30030 to enable
  lanman and plain text though).  Fix writes to be at correct offset when
@@ -961267,10 +961121,10 @@ diff -purN linux-2.6.27/fs/cifs/CHANGES linux-2.6.27.19-5.1/fs/cifs/CHANGES
  
  Version 1.53
  ------------
-diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_debug.c
---- linux-2.6.27/fs/cifs/cifs_debug.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifs_debug.c   2009-03-25 16:11:39.000000000 +0000
-@@ -107,12 +107,13 @@ void cifs_dump_mids(struct TCP_Server_In
+diff -r 9608d5473017 fs/cifs/cifs_debug.c
+--- a/fs/cifs/cifs_debug.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifs_debug.c     Wed May 06 16:56:46 2009 +0100
+@@ -107,12 +107,13 @@
  #ifdef CONFIG_PROC_FS
  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
  {
@@ -961287,7 +961141,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
  
        seq_puts(m,
                    "Display Internal CIFS Data Structures for Debugging\n"
-@@ -122,46 +123,78 @@ static int cifs_debug_data_proc_show(str
+@@ -122,46 +123,78 @@
        seq_printf(m, "Servers:");
  
        i = 0;
@@ -961393,7 +961247,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
                                                " %d tsk: %p mid %d\n",
                                                mid_entry->midState,
                                                (int)mid_entry->command,
-@@ -171,44 +204,8 @@ static int cifs_debug_data_proc_show(str
+@@ -171,44 +204,8 @@
                        }
                        spin_unlock(&GlobalMid_Lock);
                }
@@ -961439,7 +961293,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
        seq_putc(m, '\n');
  
        /* BB add code to dump additional info such as TCP session info now */
-@@ -234,7 +231,9 @@ static ssize_t cifs_stats_proc_write(str
+@@ -234,7 +231,9 @@
  {
        char c;
        int rc;
@@ -961450,7 +961304,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
        struct cifsTconInfo *tcon;
  
        rc = get_user(c, buffer);
-@@ -242,33 +241,42 @@ static ssize_t cifs_stats_proc_write(str
+@@ -242,33 +241,42 @@
                return rc;
  
        if (c == '1' || c == 'y' || c == 'Y' || c == '0') {
@@ -961515,7 +961369,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
        }
  
        return count;
-@@ -277,7 +285,9 @@ static ssize_t cifs_stats_proc_write(str
+@@ -277,7 +285,9 @@
  static int cifs_stats_proc_show(struct seq_file *m, void *v)
  {
        int i;
@@ -961526,7 +961380,7 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
        struct cifsTconInfo *tcon;
  
        seq_printf(m,
-@@ -306,44 +316,55 @@ static int cifs_stats_proc_show(struct s
+@@ -306,44 +316,55 @@
                GlobalCurrentXid, GlobalMaxActiveXid);
  
        i = 0;
@@ -961619,10 +961473,10 @@ diff -purN linux-2.6.27/fs/cifs/cifs_debug.c linux-2.6.27.19-5.1/fs/cifs/cifs_de
  
        seq_putc(m, '\n');
        return 0;
-diff -purN linux-2.6.27/fs/cifs/cifs_spnego.c linux-2.6.27.19-5.1/fs/cifs/cifs_spnego.c
---- linux-2.6.27/fs/cifs/cifs_spnego.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifs_spnego.c  2009-03-25 16:11:39.000000000 +0000
-@@ -70,7 +70,8 @@ struct key_type cifs_spnego_key_type = {
+diff -r 9608d5473017 fs/cifs/cifs_spnego.c
+--- a/fs/cifs/cifs_spnego.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifs_spnego.c    Wed May 06 16:56:46 2009 +0100
+@@ -70,7 +70,8 @@
                                strlen("ver=0xFF") */
  #define MAX_MECH_STR_LEN 13 /* length of longest security mechanism name, eg
                               in future could have strlen(";sec=ntlmsspi") */
@@ -961632,10 +961486,10 @@ diff -purN linux-2.6.27/fs/cifs/cifs_spnego.c linux-2.6.27.19-5.1/fs/cifs/cifs_s
  /* get a key struct with a SPNEGO security blob, suitable for session setup */
  struct key *
  cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
-diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
---- linux-2.6.27/fs/cifs/cifsfs.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsfs.c       2009-03-25 16:11:39.000000000 +0000
-@@ -510,10 +510,11 @@ static void cifs_umount_begin(struct sup
+diff -r 9608d5473017 fs/cifs/cifsfs.c
+--- a/fs/cifs/cifsfs.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsfs.c Wed May 06 16:56:46 2009 +0100
+@@ -510,10 +510,11 @@
        tcon = cifs_sb->tcon;
        if (tcon == NULL)
                return;
@@ -961650,7 +961504,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
  
        /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */
        /* cancel_notify_requests(tcon); */
-@@ -967,7 +968,7 @@ static int cifs_oplock_thread(void *dumm
+@@ -967,7 +968,7 @@
                                not bother sending an oplock release if session
                                to server still is disconnected since oplock
                                already released by the server in that case */
@@ -961659,7 +961513,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
                                rc = CIFSSMBLock(0, pTcon, netfid,
                                                0 /* len */ , 0 /* offset */, 0,
                                                0, LOCKING_ANDX_OPLOCK_RELEASE,
-@@ -985,24 +986,24 @@ static int cifs_oplock_thread(void *dumm
+@@ -985,24 +986,24 @@
  static int cifs_dnotify_thread(void *dummyarg)
  {
        struct list_head *tmp;
@@ -961692,7 +961546,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
        } while (!kthread_should_stop());
  
        return 0;
-@@ -1013,9 +1014,7 @@ init_cifs(void)
+@@ -1013,9 +1014,7 @@
  {
        int rc = 0;
        cifs_proc_init();
@@ -961703,7 +961557,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
        INIT_LIST_HEAD(&GlobalOplock_Q);
  #ifdef CONFIG_CIFS_EXPERIMENTAL
        INIT_LIST_HEAD(&GlobalDnotifyReqList);
-@@ -1043,6 +1042,7 @@ init_cifs(void)
+@@ -1043,6 +1042,7 @@
        GlobalMaxActiveXid = 0;
        memset(Local_System_Name, 0, 15);
        rwlock_init(&GlobalSMBSeslock);
@@ -961711,10 +961565,10 @@ diff -purN linux-2.6.27/fs/cifs/cifsfs.c linux-2.6.27.19-5.1/fs/cifs/cifsfs.c
        spin_lock_init(&GlobalMid_Lock);
  
        if (cifs_max_pending < 2) {
-diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.h
---- linux-2.6.27/fs/cifs/cifsglob.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsglob.h     2009-03-25 16:11:39.000000000 +0000
-@@ -85,8 +85,7 @@ enum securityEnum {
+diff -r 9608d5473017 fs/cifs/cifsglob.h
+--- a/fs/cifs/cifsglob.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsglob.h       Wed May 06 16:56:46 2009 +0100
+@@ -85,8 +85,7 @@
  };
  
  enum protocolEnum {
@@ -961724,7 +961578,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        SCTP
        /* Netbios frames protocol not supported at this time */
  };
-@@ -122,6 +121,9 @@ struct cifs_cred {
+@@ -122,6 +121,9 @@
   */
  
  struct TCP_Server_Info {
@@ -961734,7 +961588,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        /* 15 character server name + 0x20 16th byte indicating type = srv */
        char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL];
        char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2];
-@@ -141,7 +143,8 @@ struct TCP_Server_Info {
+@@ -141,7 +143,8 @@
        char versionMajor;
        char versionMinor;
        bool svlocal:1;                 /* local server or remote */
@@ -961744,7 +961598,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        atomic_t inFlight;  /* number of requests on the wire to server */
  #ifdef CONFIG_CIFS_STATS2
        atomic_t inSend; /* requests trying to send */
-@@ -192,13 +195,14 @@ struct cifsUidInfo {
+@@ -192,13 +195,14 @@
   * Session structure.  One of these for each uid session with a particular host
   */
  struct cifsSesInfo {
@@ -961761,7 +961615,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        enum statusEnum status;
        unsigned overrideSecFlg;  /* if non-zero override global sec flags */
        __u16 ipc_tid;          /* special tid for connection to IPC share */
-@@ -214,6 +218,7 @@ struct cifsSesInfo {
+@@ -214,6 +218,7 @@
        char userName[MAX_USERNAME_SIZE + 1];
        char *domainName;
        char *password;
@@ -961769,7 +961623,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
  };
  /* no more than one of the following three session flags may be set */
  #define CIFS_SES_NT4 1
-@@ -228,16 +233,15 @@ struct cifsSesInfo {
+@@ -228,16 +233,15 @@
   * session
   */
  struct cifsTconInfo {
@@ -961788,7 +961642,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
  #ifdef CONFIG_CIFS_STATS
        atomic_t num_smbs_sent;
        atomic_t num_writes;
-@@ -285,6 +289,7 @@ struct cifsTconInfo {
+@@ -285,6 +289,7 @@
        bool seal:1;      /* transport encryption for this mounted share */
        bool unix_ext:1;  /* if false disable Linux extensions to CIFS protocol
                                for this mount even if server would support */
@@ -961796,7 +961650,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        /* BB add field for back pointer to sb struct(s)? */
  };
  
-@@ -309,6 +314,7 @@ struct cifs_search_info {
+@@ -309,6 +314,7 @@
        __u32 resume_key;
        char *ntwrk_buf_start;
        char *srch_entries_start;
@@ -961804,7 +961658,7 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
        char *presume_name;
        unsigned int resume_name_len;
        bool endOfSearch:1;
-@@ -583,21 +589,21 @@ require use of the stronger protocol */
+@@ -583,21 +589,21 @@
  #endif
  
  /*
@@ -961837,10 +961691,10 @@ diff -purN linux-2.6.27/fs/cifs/cifsglob.h linux-2.6.27.19-5.1/fs/cifs/cifsglob.
  GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;  /* protects list inserts on 3 above */
  
  GLOBAL_EXTERN struct list_head GlobalOplock_Q;
-diff -purN linux-2.6.27/fs/cifs/cifsproto.h linux-2.6.27.19-5.1/fs/cifs/cifsproto.h
---- linux-2.6.27/fs/cifs/cifsproto.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifsproto.h    2009-03-25 16:11:39.000000000 +0000
-@@ -36,7 +36,7 @@ extern void cifs_buf_release(void *);
+diff -r 9608d5473017 fs/cifs/cifsproto.h
+--- a/fs/cifs/cifsproto.h      Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifsproto.h      Wed May 06 16:56:46 2009 +0100
+@@ -36,7 +36,7 @@
  extern struct smb_hdr *cifs_small_buf_get(void);
  extern void cifs_small_buf_release(void *);
  extern int smb_send(struct socket *, struct smb_hdr *,
@@ -961849,10 +961703,10 @@ diff -purN linux-2.6.27/fs/cifs/cifsproto.h linux-2.6.27.19-5.1/fs/cifs/cifsprot
  extern unsigned int _GetXid(void);
  extern void _FreeXid(unsigned int);
  #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current->fsuid));
-diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
---- linux-2.6.27/fs/cifs/cifssmb.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/cifssmb.c      2009-03-25 16:11:39.000000000 +0000
-@@ -190,10 +190,10 @@ small_smb_init(int smb_command, int wct,
+diff -r 9608d5473017 fs/cifs/cifssmb.c
+--- a/fs/cifs/cifssmb.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/cifssmb.c        Wed May 06 16:56:46 2009 +0100
+@@ -190,10 +190,10 @@
                /* need to prevent multiple threads trying to
                simultaneously reconnect the same SMB session */
                        down(&tcon->ses->sesSem);
@@ -961865,7 +961719,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
                                mark_open_files_invalid(tcon);
                                rc = CIFSTCon(0, tcon->ses, tcon->treeName,
                                              tcon, nls_codepage);
-@@ -337,10 +337,10 @@ smb_init(int smb_command, int wct, struc
+@@ -337,10 +337,10 @@
                /* need to prevent multiple threads trying to
                simultaneously reconnect the same SMB session */
                        down(&tcon->ses->sesSem);
@@ -961878,7 +961732,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
                                mark_open_files_invalid(tcon);
                                rc = CIFSTCon(0, tcon->ses, tcon->treeName,
                                              tcon, nls_codepage);
-@@ -664,8 +664,9 @@ CIFSSMBNegotiate(unsigned int xid, struc
+@@ -664,8 +664,9 @@
                        rc = -EIO;
                        goto neg_err_exit;
                }
@@ -961890,7 +961744,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
                        if (memcmp(server->server_GUID,
                                   pSMBr->u.extended_response.
                                   GUID, 16) != 0) {
-@@ -674,9 +675,11 @@ CIFSSMBNegotiate(unsigned int xid, struc
+@@ -674,9 +675,11 @@
                                        pSMBr->u.extended_response.GUID,
                                        16);
                        }
@@ -961903,56 +961757,59 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
  
                if (count == 16) {
                        server->secType = RawNTLMSSP;
-@@ -739,50 +742,31 @@ CIFSSMBTDis(const int xid, struct cifsTc
+@@ -739,50 +742,31 @@
        int rc = 0;
  
        cFYI(1, ("In tree disconnect"));
--      /*
++
++      /* BB: do we need to check this? These should never be NULL. */
++      if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
++              return -EIO;
++
+       /*
 -       *  If last user of the connection and
 -       *  connection alive - disconnect it
 -       *  If this is the last connection on the server session disconnect it
 -       *  (and inside session disconnect we should check if tcp socket needs
 -       *  to be freed and kernel thread woken up).
--       */
++       * No need to return error on this operation if tid invalidated and
++       * closed on server already e.g. due to tcp session crashing. Also,
++       * the tcon is no longer on the list, so no need to take lock before
++       * checking this.
+        */
 -      if (tcon)
 -              down(&tcon->tconSem);
 -      else
 -              return -EIO;
+-
 -      atomic_dec(&tcon->useCount);
 -      if (atomic_read(&tcon->useCount) > 0) {
 -              up(&tcon->tconSem);
 -              return -EBUSY;
 -      }
-+      /* BB: do we need to check this? These should never be NULL. */
-+      if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
-+              return -EIO;
+-
 -      /* No need to return error on this operation if tid invalidated and
 -      closed on server already e.g. due to tcp session crashing */
 -      if (tcon->tidStatus == CifsNeedReconnect) {
 -              up(&tcon->tconSem);
-+      /*
-+       * No need to return error on this operation if tid invalidated and
-+       * closed on server already e.g. due to tcp session crashing. Also,
-+       * the tcon is no longer on the list, so no need to take lock before
-+       * checking this.
-+       */
-+      if (tcon->need_reconnect)
-               return 0;
+-              return 0;
 -      }
+-
 -      if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) {
 -              up(&tcon->tconSem);
 -              return -EIO;
 -      }
++      if (tcon->need_reconnect)
++              return 0;
++
        rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon,
                            (void **)&smb_buffer);
 -      if (rc) {
 -              up(&tcon->tconSem);
-+      if (rc)
-               return rc;
+-              return rc;
 -      }
++      if (rc)
++              return rc;
  
        rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0);
        if (rc)
@@ -961966,7 +961823,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
        if (rc == -EAGAIN)
                rc = 0;
  
-@@ -796,43 +780,36 @@ CIFSSMBLogoff(const int xid, struct cifs
+@@ -796,43 +780,36 @@
        int rc = 0;
  
        cFYI(1, ("In SMBLogoff for session disconnect"));
@@ -961984,24 +961841,30 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
  
 -      atomic_dec(&ses->inUse);
 -      if (atomic_read(&ses->inUse) > 0) {
--              up(&ses->sesSem);
--              return -EBUSY;
--      }
 +      down(&ses->sesSem);
 +      if (ses->need_reconnect)
 +              goto session_already_dead; /* no need to send SMBlogoff if uid
 +                                            already closed due to reconnect */
-       rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
-       if (rc) {
++      rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
++      if (rc) {
                up(&ses->sesSem);
-               return rc;
-       }
+-              return -EBUSY;
+-      }
+-      rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB);
+-      if (rc) {
+-              up(&ses->sesSem);
+-              return rc;
+-      }
+-
 -      if (ses->server) {
 -              pSMB->hdr.Mid = GetNextMid(ses->server);
-+      pSMB->hdr.Mid = GetNextMid(ses->server);
+-
 -              if (ses->server->secMode &
++              return rc;
++      }
++
++      pSMB->hdr.Mid = GetNextMid(ses->server);
++
 +      if (ses->server->secMode &
                   (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
                        pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
@@ -962024,7 +961887,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
        up(&ses->sesSem);
  
        /* if session dead then we do not need to do ulogoff,
-@@ -1534,7 +1511,7 @@ CIFSSMBWrite(const int xid, struct cifsT
+@@ -1534,7 +1511,7 @@
        __u32 bytes_sent;
        __u16 byte_count;
  
@@ -962033,7 +961896,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
        if (tcon->ses == NULL)
                return -ECONNABORTED;
  
-@@ -3636,6 +3613,8 @@ findFirstRetry:
+@@ -3636,6 +3613,8 @@
                                        le16_to_cpu(parms->SearchCount);
                        psrch_inf->index_of_last_entry = 2 /* skip . and .. */ +
                                psrch_inf->entries_in_buffer;
@@ -962042,7 +961905,7 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
                        *pnetfid = parms->SearchHandle;
                } else {
                        cifs_buf_release(pSMB);
-@@ -3751,6 +3730,8 @@ int CIFSFindNext(const int xid, struct c
+@@ -3751,6 +3730,8 @@
                                                le16_to_cpu(parms->SearchCount);
                        psrch_inf->index_of_last_entry +=
                                psrch_inf->entries_in_buffer;
@@ -962051,10 +961914,10 @@ diff -purN linux-2.6.27/fs/cifs/cifssmb.c linux-2.6.27.19-5.1/fs/cifs/cifssmb.c
  /*  cFYI(1,("fnxt2 entries in buf %d index_of_last %d",
            psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry)); */
  
-diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
---- linux-2.6.27/fs/cifs/connect.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/connect.c      2009-03-25 16:11:39.000000000 +0000
-@@ -90,6 +90,8 @@ struct smb_vol {
+diff -r 9608d5473017 fs/cifs/connect.c
+--- a/fs/cifs/connect.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/connect.c        Wed May 06 16:56:46 2009 +0100
+@@ -90,6 +90,8 @@
        bool nocase:1;     /* request case insensitive filenames */
        bool nobrl:1;      /* disable sending byte range locks to srv */
        bool seal:1;       /* request transport encryption on share */
@@ -962063,7 +961926,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        unsigned int rsize;
        unsigned int wsize;
        unsigned int sockopt;
-@@ -100,9 +102,11 @@ struct smb_vol {
+@@ -100,9 +102,11 @@
  static int ipv4_connect(struct sockaddr_in *psin_server,
                        struct socket **csocket,
                        char *netb_name,
@@ -962077,7 +961940,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
  
  
        /*
-@@ -118,13 +122,13 @@ static int
+@@ -118,13 +122,13 @@
  cifs_reconnect(struct TCP_Server_Info *server)
  {
        int rc = 0;
@@ -962093,7 +961956,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                /* the demux thread will exit normally
                next time through the loop */
                spin_unlock(&GlobalMid_Lock);
-@@ -138,23 +142,17 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -138,23 +142,17 @@
  
        /* before reconnecting the tcp session, mark the smb session (uid)
                and the tid bad so they are not used until reconnected */
@@ -962105,13 +961968,6 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -                              ses->status = CifsNeedReconnect;
 -                              ses->ipc_tid = 0;
 -                      }
--              }
--              /* else tcp and smb sessions need reconnection */
--      }
--      list_for_each(tmp, &GlobalTreeConnectionList) {
--              tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
--              if ((tcon->ses) && (tcon->ses->server == server))
--                      tcon->tidStatus = CifsNeedReconnect;
 +      read_lock(&cifs_tcp_ses_lock);
 +      list_for_each(tmp, &server->smb_ses_list) {
 +              ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
@@ -962120,14 +961976,20 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +              list_for_each(tmp2, &ses->tcon_list) {
 +                      tcon = list_entry(tmp2, struct cifsTconInfo, tcon_list);
 +                      tcon->need_reconnect = true;
-+              }
+               }
+-              /* else tcp and smb sessions need reconnection */
        }
+-      list_for_each(tmp, &GlobalTreeConnectionList) {
+-              tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
+-              if ((tcon->ses) && (tcon->ses->server == server))
+-                      tcon->tidStatus = CifsNeedReconnect;
+-      }
 -      read_unlock(&GlobalSMBSeslock);
 +      read_unlock(&cifs_tcp_ses_lock);
        /* do not want to be sending data on a socket we are freeing */
        down(&server->tcpSem);
        if (server->ssocket) {
-@@ -184,16 +182,18 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -184,16 +182,18 @@
        spin_unlock(&GlobalMid_Lock);
        up(&server->tcpSem);
  
@@ -962150,7 +962012,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                }
                if (rc) {
                        cFYI(1, ("reconnect error %d", rc));
-@@ -201,7 +201,7 @@ cifs_reconnect(struct TCP_Server_Info *s
+@@ -201,7 +201,7 @@
                } else {
                        atomic_inc(&tcpSesReconnectCount);
                        spin_lock(&GlobalMid_Lock);
@@ -962159,7 +962021,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                                server->tcpStatus = CifsGood;
                        server->sequence_number = 0;
                        spin_unlock(&GlobalMid_Lock);
-@@ -356,7 +356,7 @@ cifs_demultiplex_thread(struct TCP_Serve
+@@ -356,7 +356,7 @@
                                GFP_KERNEL);
  
        set_freezable();
@@ -962168,7 +962030,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                if (try_to_freeze())
                        continue;
                if (bigbuf == NULL) {
-@@ -397,7 +397,7 @@ incomplete_rcv:
+@@ -397,7 +397,7 @@
                    kernel_recvmsg(csocket, &smb_msg,
                                &iov, 1, pdu_length, 0 /* BB other flags? */);
  
@@ -962177,7 +962039,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                        break;
                } else if (server->tcpStatus == CifsNeedReconnect) {
                        cFYI(1, ("Reconnect after server stopped responding"));
-@@ -409,8 +409,14 @@ incomplete_rcv:
+@@ -409,8 +409,14 @@
                        msleep(1); /* minimum sleep to prevent looping
                                allowing socket to clear and app threads to set
                                tcpStatus CifsNeedReconnect if server hung */
@@ -962193,7 +962055,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                        else
                                continue;
                } else if (length <= 0) {
-@@ -522,7 +528,7 @@ incomplete_rcv:
+@@ -522,7 +528,7 @@
                     total_read += length) {
                        length = kernel_recvmsg(csocket, &smb_msg, &iov, 1,
                                                pdu_length - total_read, 0);
@@ -962202,7 +962064,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                            (length == -EINTR)) {
                                /* then will exit */
                                reconnect = 2;
-@@ -646,19 +652,16 @@ multi_t2_fnd:
+@@ -646,18 +652,15 @@
                }
        } /* end while !EXITING */
  
@@ -962215,7 +962077,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        server->tcpStatus = CifsExiting;
        spin_unlock(&GlobalMid_Lock);
        wake_up_all(&server->response_q);
+-
 -      /* don't exit until kthread_stop is called */
 -      set_current_state(TASK_UNINTERRUPTIBLE);
 -      while (!kthread_should_stop()) {
@@ -962223,11 +962085,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -              set_current_state(TASK_UNINTERRUPTIBLE);
 -      }
 -      set_current_state(TASK_RUNNING);
--
        /* check if we have blocked requests that need to free */
        /* Note that cifs_max_pending is normally 50, but
-       can be set at module install time to as little as two */
-@@ -686,29 +689,29 @@ multi_t2_fnd:
+@@ -686,29 +689,29 @@
        if (smallbuf) /* no sense logging a debug message if NULL */
                cifs_small_buf_release(smallbuf);
  
@@ -962271,7 +962132,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                }
  
                spin_lock(&GlobalMid_Lock);
-@@ -723,7 +726,7 @@ multi_t2_fnd:
+@@ -723,7 +726,7 @@
                        }
                }
                spin_unlock(&GlobalMid_Lock);
@@ -962280,7 +962141,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                /* 1/8th of sec is more than enough time for them to exit */
                msleep(125);
        }
-@@ -745,16 +748,16 @@ multi_t2_fnd:
+@@ -745,22 +748,32 @@
        if there are any pointing to this (e.g
        if a crazy root user tried to kill cifsd
        kernel thread explicitly this might happen) */
@@ -962304,10 +962165,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        kfree(server);
  
        length = atomic_dec_return(&tcpSesAllocCount);
-@@ -762,6 +765,16 @@ multi_t2_fnd:
+       if (length  > 0)
                mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
                                GFP_KERNEL);
++
 +      /* if server->tsk was NULL then wait for a signal before exiting */
 +      if (!task_to_wake) {
 +              set_current_state(TASK_INTERRUPTIBLE);
@@ -962317,11 +962178,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +              }
 +              set_current_state(TASK_RUNNING);
 +      }
-+
        return 0;
  }
-@@ -1186,6 +1199,10 @@ cifs_parse_mount_options(char *options, 
+@@ -1186,6 +1199,10 @@
                        /* ignore */
                } else if (strnicmp(data, "rw", 2) == 0) {
                        vol->rw = true;
@@ -962332,21 +962192,14 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                } else if ((strnicmp(data, "suid", 4) == 0) ||
                                   (strnicmp(data, "nosuid", 6) == 0) ||
                                   (strnicmp(data, "exec", 4) == 0) ||
-@@ -1331,94 +1348,158 @@ cifs_parse_mount_options(char *options, 
+@@ -1331,92 +1348,156 @@
        return 0;
  }
  
--static struct cifsSesInfo *
--cifs_find_tcp_session(struct in_addr *target_ip_addr,
--                    struct in6_addr *target_ip6_addr,
--                    char *userName, struct TCP_Server_Info **psrvTcp)
 +static struct TCP_Server_Info *
 +cifs_find_tcp_session(struct sockaddr_storage *addr)
- {
-       struct list_head *tmp;
--      struct cifsSesInfo *ses;
--
--      *psrvTcp = NULL;
++{
++      struct list_head *tmp;
 +      struct TCP_Server_Info *server;
 +      struct sockaddr_in *addr4 = (struct sockaddr_in *) addr;
 +      struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) addr;
@@ -962363,11 +962216,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +               */
 +              if (server->tcpStatus == CifsNew)
 +                      continue;
--      read_lock(&GlobalSMBSeslock);
--      list_for_each(tmp, &GlobalSMBSessionList) {
--              ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
--              if (!ses->server)
++
 +              if (addr->ss_family == AF_INET &&
 +                  (addr4->sin_addr.s_addr !=
 +                   server->addr.sockAddr.sin_addr.s_addr))
@@ -962375,16 +962224,8 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +              else if (addr->ss_family == AF_INET6 &&
 +                       memcmp(&server->addr.sockAddr6.sin6_addr,
 +                              &addr6->sin6_addr, sizeof(addr6->sin6_addr)))
-                       continue;
--              if (target_ip_addr &&
--                  ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr)
--                              continue;
--              else if (target_ip6_addr &&
--                       memcmp(&ses->server->addr.sockAddr6.sin6_addr,
--                              target_ip6_addr, sizeof(*target_ip6_addr)))
--                              continue;
--              /* BB lock server and tcp session; increment use count here?? */
++                      continue;
++
 +              ++server->srv_count;
 +              write_unlock(&cifs_tcp_ses_lock);
 +              cFYI(1, ("Existing tcp session with server found"));
@@ -962393,30 +962234,18 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +      write_unlock(&cifs_tcp_ses_lock);
 +      return NULL;
 +}
--              /* found a match on the TCP session */
--              *psrvTcp = ses->server;
++
 +static void
 +cifs_put_tcp_session(struct TCP_Server_Info *server)
 +{
 +      struct task_struct *task;
--              /* BB check if reconnection needed */
--              if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE) == 0) {
--                      read_unlock(&GlobalSMBSeslock);
--                      /* Found exact match on both TCP and
--                         SMB sessions */
--                      return ses;
--              }
--              /* else tcp and smb sessions need reconnection */
++
 +      write_lock(&cifs_tcp_ses_lock);
 +      if (--server->srv_count > 0) {
 +              write_unlock(&cifs_tcp_ses_lock);
 +              return;
-       }
--      read_unlock(&GlobalSMBSeslock);
--      return NULL;
++      }
++
 +      list_del_init(&server->tcp_ses_list);
 +      write_unlock(&cifs_tcp_ses_lock);
 +
@@ -962427,62 +962256,71 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +      task = xchg(&server->tsk, NULL);
 +      if (task)
 +              force_sig(SIGKILL, task);
- }
--static struct cifsTconInfo *
--find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
-+static struct cifsSesInfo *
++}
++
+ static struct cifsSesInfo *
+-cifs_find_tcp_session(struct in_addr *target_ip_addr,
+-                    struct in6_addr *target_ip6_addr,
+-                    char *userName, struct TCP_Server_Info **psrvTcp)
 +cifs_find_smb_ses(struct TCP_Server_Info *server, char *username)
  {
        struct list_head *tmp;
--      struct cifsTconInfo *tcon;
--      __be32 old_ip;
+       struct cifsSesInfo *ses;
+-      *psrvTcp = NULL;
 -
 -      read_lock(&GlobalSMBSeslock);
-+      struct cifsSesInfo *ses;
--      list_for_each(tmp, &GlobalTreeConnectionList) {
--              cFYI(1, ("Next tcon"));
--              tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
--              if (!tcon->ses || !tcon->ses->server)
+-      list_for_each(tmp, &GlobalSMBSessionList) {
+-              ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
+-              if (!ses->server)
 +      write_lock(&cifs_tcp_ses_lock);
 +      list_for_each(tmp, &server->smb_ses_list) {
 +              ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);
 +              if (strncmp(ses->userName, username, MAX_USERNAME_SIZE))
                        continue;
  
--              old_ip = tcon->ses->server->addr.sockAddr.sin_addr.s_addr;
--              cFYI(1, ("old ip addr: %x == new ip %x ?",
--                      old_ip, new_target_ip_addr));
+-              if (target_ip_addr &&
+-                  ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr)
+-                              continue;
+-              else if (target_ip6_addr &&
+-                       memcmp(&ses->server->addr.sockAddr6.sin6_addr,
+-                              target_ip6_addr, sizeof(*target_ip6_addr)))
+-                              continue;
+-              /* BB lock server and tcp session; increment use count here?? */
+-
+-              /* found a match on the TCP session */
+-              *psrvTcp = ses->server;
+-
+-              /* BB check if reconnection needed */
+-              if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE) == 0) {
+-                      read_unlock(&GlobalSMBSeslock);
+-                      /* Found exact match on both TCP and
+-                         SMB sessions */
+-                      return ses;
+-              }
+-              /* else tcp and smb sessions need reconnection */
 +              ++ses->ses_count;
 +              write_unlock(&cifs_tcp_ses_lock);
 +              return ses;
-+      }
+       }
+-      read_unlock(&GlobalSMBSeslock);
+-
 +      write_unlock(&cifs_tcp_ses_lock);
-+      return NULL;
-+}
+       return NULL;
+ }
  
--              if (old_ip != new_target_ip_addr)
--                      continue;
 +static void
 +cifs_put_smb_ses(struct cifsSesInfo *ses)
 +{
 +      int xid;
 +      struct TCP_Server_Info *server = ses->server;
--              /* BB lock tcon, server, tcp session and increment use count? */
--              /* found a match on the TCP session */
--              /* BB check if reconnection needed */
--              cFYI(1, ("IP match, old UNC: %s new: %s",
--                      tcon->treeName, uncName));
++
 +      write_lock(&cifs_tcp_ses_lock);
 +      if (--ses->ses_count > 0) {
 +              write_unlock(&cifs_tcp_ses_lock);
 +              return;
 +      }
--              if (strncmp(tcon->treeName, uncName, MAX_TREE_SIZE))
--                      continue;
++
 +      list_del_init(&ses->smb_ses_list);
 +      write_unlock(&cifs_tcp_ses_lock);
 +
@@ -962494,16 +962332,21 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +      sesInfoFree(ses);
 +      cifs_put_tcp_session(server);
 +}
--              cFYI(1, ("and old usr: %s new: %s",
--                      tcon->treeName, uncName));
-+static struct cifsTconInfo *
++
+ static struct cifsTconInfo *
+-find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
 +cifs_find_tcon(struct cifsSesInfo *ses, const char *unc)
-+{
-+      struct list_head *tmp;
-+      struct cifsTconInfo *tcon;
+ {
+       struct list_head *tmp;
+       struct cifsTconInfo *tcon;
+-      __be32 old_ip;
  
--              if (strncmp(tcon->ses->userName, userName, MAX_USERNAME_SIZE))
+-      read_lock(&GlobalSMBSeslock);
+-
+-      list_for_each(tmp, &GlobalTreeConnectionList) {
+-              cFYI(1, ("Next tcon"));
+-              tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
+-              if (!tcon->ses || !tcon->ses->server)
 +      write_lock(&cifs_tcp_ses_lock);
 +      list_for_each(tmp, &ses->tcon_list) {
 +              tcon = list_entry(tmp, struct cifsTconInfo, tcon_list);
@@ -962512,18 +962355,40 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +              if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE))
                        continue;
  
+-              old_ip = tcon->ses->server->addr.sockAddr.sin_addr.s_addr;
+-              cFYI(1, ("old ip addr: %x == new ip %x ?",
+-                      old_ip, new_target_ip_addr));
+-
+-              if (old_ip != new_target_ip_addr)
+-                      continue;
+-
+-              /* BB lock tcon, server, tcp session and increment use count? */
+-              /* found a match on the TCP session */
+-              /* BB check if reconnection needed */
+-              cFYI(1, ("IP match, old UNC: %s new: %s",
+-                      tcon->treeName, uncName));
+-
+-              if (strncmp(tcon->treeName, uncName, MAX_TREE_SIZE))
+-                      continue;
+-
+-              cFYI(1, ("and old usr: %s new: %s",
+-                      tcon->treeName, uncName));
+-
+-              if (strncmp(tcon->ses->userName, userName, MAX_USERNAME_SIZE))
+-                      continue;
+-
 -              /* matched smb session (user name) */
 -              read_unlock(&GlobalSMBSeslock);
 +              ++tcon->tc_count;
 +              write_unlock(&cifs_tcp_ses_lock);
                return tcon;
        }
--
--      read_unlock(&GlobalSMBSeslock);
 +      write_unlock(&cifs_tcp_ses_lock);
-       return NULL;
- }
++      return NULL;
++}
  
+-      read_unlock(&GlobalSMBSeslock);
+-      return NULL;
 +static void
 +cifs_put_tcon(struct cifsTconInfo *tcon)
 +{
@@ -962546,12 +962411,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +      DeleteTconOplockQEntries(tcon);
 +      tconInfoFree(tcon);
 +      cifs_put_smb_ses(ses);
-+}
-+
+ }
  int
- get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
-            const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
-@@ -1506,7 +1587,8 @@ static void rfc1002mangle(char *target, 
+@@ -1506,7 +1587,8 @@
  
  static int
  ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket,
@@ -962561,7 +962424,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
  {
        int rc = 0;
        int connected = 0;
-@@ -1578,11 +1660,15 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1578,11 +1660,15 @@
                 (*csocket)->sk->sk_sndbuf,
                 (*csocket)->sk->sk_rcvbuf, (*csocket)->sk->sk_rcvtimeo));
        (*csocket)->sk->sk_rcvtimeo = 7 * HZ;
@@ -962581,7 +962444,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
  
        /* send RFC1001 sessinit */
        if (psin_server->sin_port == htons(RFC1001_PORT)) {
-@@ -1619,7 +1705,7 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1619,7 +1705,7 @@
                        /* sizeof RFC1002_SESSION_REQUEST with no scope */
                        smb_buf->smb_buf_length = 0x81000044;
                        rc = smb_send(*csocket, smb_buf, 0x44,
@@ -962590,7 +962453,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                        kfree(ses_init_buf);
                        msleep(1); /* RFC1001 layer in at least one server
                                      requires very short break before negprot
-@@ -1639,7 +1725,8 @@ ipv4_connect(struct sockaddr_in *psin_se
+@@ -1639,7 +1725,8 @@
  }
  
  static int
@@ -962600,7 +962463,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
  {
        int rc = 0;
        int connected = 0;
-@@ -1708,6 +1795,8 @@ ipv6_connect(struct sockaddr_in6 *psin_s
+@@ -1708,6 +1795,8 @@
                the default. sock_setsockopt not used because it expects
                user space buffer */
        (*csocket)->sk->sk_rcvtimeo = 7 * HZ;
@@ -962609,7 +962472,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
  
        return rc;
  }
-@@ -1845,19 +1934,104 @@ convert_delimiter(char *path, char delim
+@@ -1845,19 +1934,104 @@
        }
  }
  
@@ -962718,7 +962581,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        struct cifsTconInfo *tcon = NULL;
        struct TCP_Server_Info *srvTcp = NULL;
  
-@@ -1865,6 +2039,7 @@ cifs_mount(struct super_block *sb, struc
+@@ -1865,6 +2039,7 @@
  
  /* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */
  
@@ -962726,7 +962589,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        memset(&volume_info, 0, sizeof(struct smb_vol));
        if (cifs_parse_mount_options(mount_data, devname, &volume_info)) {
                rc = -EINVAL;
-@@ -1887,16 +2062,16 @@ cifs_mount(struct super_block *sb, struc
+@@ -1887,16 +2062,16 @@
  
        if (volume_info.UNCip && volume_info.UNC) {
                rc = cifs_inet_pton(AF_INET, volume_info.UNCip,
@@ -962747,7 +962610,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                }
  
                if (rc <= 0) {
-@@ -1936,38 +2111,25 @@ cifs_mount(struct super_block *sb, struc
+@@ -1936,38 +2111,25 @@
                }
        }
  
@@ -962801,7 +962664,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                                   "Aborting operation"));
                        if (csocket != NULL)
                                sock_release(csocket);
-@@ -1980,12 +2142,17 @@ cifs_mount(struct super_block *sb, struc
+@@ -1980,12 +2142,17 @@
                        sock_release(csocket);
                        goto out;
                } else {
@@ -962822,7 +962685,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                        srvTcp->hostname = extract_hostname(volume_info.UNC);
                        if (IS_ERR(srvTcp->hostname)) {
                                rc = PTR_ERR(srvTcp->hostname);
-@@ -2015,15 +2182,28 @@ cifs_mount(struct super_block *sb, struc
+@@ -2015,15 +2182,28 @@
                        memcpy(srvTcp->server_RFC1001_name,
                                volume_info.target_rfc1001_name, 16);
                        srvTcp->sequence_number = 0;
@@ -962854,7 +962717,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                        cFYI(1, ("Session needs reconnect"));
                        rc = cifs_setup_session(xid, pSesInfo,
                                                cifs_sb->local_nls);
-@@ -2032,180 +2212,94 @@ cifs_mount(struct super_block *sb, struc
+@@ -2032,180 +2212,94 @@
        } else if (!rc) {
                cFYI(1, ("Existing smb sess not found"));
                pSesInfo = sesInfoAlloc();
@@ -962910,7 +962773,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +                      pSesInfo->password = volume_info.password;
 +                      /* set to NULL to prevent freeing on exit */
 +                      volume_info.password = NULL;
-+              }
+               }
 +              if (volume_info.username)
 +                      strncpy(pSesInfo->userName, volume_info.username,
 +                              MAX_USERNAME_SIZE);
@@ -962920,7 +962783,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +                      if (pSesInfo->domainName)
 +                              strcpy(pSesInfo->domainName,
 +                                      volume_info.domainname);
-               }
++              }
 +              pSesInfo->linux_uid = volume_info.linux_uid;
 +              pSesInfo->overrideSecFlg = volume_info.secFlg;
 +              down(&pSesInfo->sesSem);
@@ -963041,7 +962904,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -                      else {
 -                              /* check for null share name ie connecting to
 -                               * dfs root */
--
++                              goto mount_fail_check;
++                      }
++                      tcon->ses = pSesInfo;
 -                              /* BB check if this works for exactly length
 -                               * three strings */
 -                              if ((strchr(volume_info.UNC + 3, '\\') == NULL)
@@ -963069,11 +962935,6 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -                                      tcon->nocase = volume_info.nocase;
 -                                      tcon->seal = volume_info.seal;
 -                              }
-+                              goto mount_fail_check;
-                       }
--              }
-+                      tcon->ses = pSesInfo;
-+
 +                      /* check for null share name ie connect to dfs root */
 +                      if ((strchr(volume_info.UNC + 3, '\\') == NULL)
 +                          && (strchr(volume_info.UNC + 3, '/') == NULL)) {
@@ -963088,14 +962949,14 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 +                              rc = CIFSTCon(xid, pSesInfo, volume_info.UNC,
 +                                            tcon, cifs_sb->local_nls);
 +                              cFYI(1, ("CIFS Tcon rc = %d", rc));
-+                      }
+                       }
 +                      if (rc)
 +                              goto mount_fail_check;
 +                      tcon->seal = volume_info.seal;
 +                      write_lock(&cifs_tcp_ses_lock);
 +                      list_add(&tcon->tcon_list, &pSesInfo->tcon_list);
 +                      write_unlock(&cifs_tcp_ses_lock);
-+              }
+               }
 +
 +              /* we can have only one retry value for a connection
 +                 to a share so for resources mounted more than once
@@ -963106,7 +962967,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        }
        if (pSesInfo) {
                if (pSesInfo->capabilities & CAP_LARGE_FILES) {
-@@ -2217,92 +2311,50 @@ cifs_mount(struct super_block *sb, struc
+@@ -2217,91 +2311,49 @@
        /* BB FIXME fix time_gran to be larger for LANMAN sessions */
        sb->s_time_gran = 100;
  
@@ -963163,36 +963024,52 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -              atomic_inc(&tcon->useCount);
 -              cifs_sb->tcon = tcon;
 -              tcon->ses = pSesInfo;
--
++              /* If find_unc succeeded then rc == 0 so we can not end */
++              /* up accidently freeing someone elses tcon struct */
++              if (tcon)
++                      cifs_put_tcon(tcon);
++              else if (pSesInfo)
++                      cifs_put_smb_ses(pSesInfo);
++              else
++                      cifs_put_tcp_session(srvTcp);
++              goto out;
++      }
++      cifs_sb->tcon = tcon;
 -              /* do not care if following two calls succeed - informational */
 -              if (!tcon->ipc) {
 -                      CIFSSMBQFSDeviceInfo(xid, tcon);
 -                      CIFSSMBQFSAttributeInfo(xid, tcon);
 -              }
--
++      /* do not care if following two calls succeed - informational */
++      if (!tcon->ipc) {
++              CIFSSMBQFSDeviceInfo(xid, tcon);
++              CIFSSMBQFSAttributeInfo(xid, tcon);
++      }
 -              /* tell server which Unix caps we support */
 -              if (tcon->ses->capabilities & CAP_UNIX)
 -                      /* reset of caps checks mount to see if unix extensions
 -                         disabled for just this mount */
 -                      reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
-+              /* If find_unc succeeded then rc == 0 so we can not end */
-+              /* up accidently freeing someone elses tcon struct */
-+              if (tcon)
-+                      cifs_put_tcon(tcon);
-+              else if (pSesInfo)
-+                      cifs_put_smb_ses(pSesInfo);
-               else
+-              else
 -                      tcon->unix_ext = 0; /* server does not support them */
-+                      cifs_put_tcp_session(srvTcp);
-+              goto out;
-+      }
-+      cifs_sb->tcon = tcon;
++      /* tell server which Unix caps we support */
++      if (tcon->ses->capabilities & CAP_UNIX)
++              /* reset of caps checks mount to see if unix extensions
++                 disabled for just this mount */
++              reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
++      else
++              tcon->unix_ext = 0; /* server does not support them */
  
 -              /* convert forward to back slashes in prepath here if needed */
 -              if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
 -                      convert_delimiter(cifs_sb->prepath,
 -                                        CIFS_DIR_SEP(cifs_sb));
--
++      /* convert forward to back slashes in prepath here if needed */
++      if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
++              convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
 -              if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
 -                      cifs_sb->rsize = 1024 * 127;
 -                      cFYI(DBG2,
@@ -963206,39 +963083,20 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
 -                      cifs_sb->rsize = min(cifs_sb->rsize,
 -                                           (tcon->ses->server->maxBuf -
 -                                            MAX_CIFS_HDR_SIZE));
-+      /* do not care if following two calls succeed - informational */
-+      if (!tcon->ipc) {
-+              CIFSSMBQFSDeviceInfo(xid, tcon);
-+              CIFSSMBQFSAttributeInfo(xid, tcon);
-       }
-+      /* tell server which Unix caps we support */
-+      if (tcon->ses->capabilities & CAP_UNIX)
-+              /* reset of caps checks mount to see if unix extensions
-+                 disabled for just this mount */
-+              reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
-+      else
-+              tcon->unix_ext = 0; /* server does not support them */
-+
-+      /* convert forward to back slashes in prepath here if needed */
-+      if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) == 0)
-+              convert_delimiter(cifs_sb->prepath, CIFS_DIR_SEP(cifs_sb));
-+
 +      if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
 +              cifs_sb->rsize = 1024 * 127;
 +              cFYI(DBG2, ("no very large read support, rsize now 127K"));
-+      }
+       }
 +      if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
 +              cifs_sb->wsize = min(cifs_sb->wsize,
 +                             (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
 +      if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))
 +              cifs_sb->rsize = min(cifs_sb->rsize,
 +                             (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));
-+
        /* volume_info.password is freed above when existing session found
        (in which case it is not needed anymore) but when new sesion is created
-       the password ptr is put in the new session structure (in which case the
-@@ -3471,6 +3523,7 @@ CIFSTCon(unsigned int xid, struct cifsSe
+@@ -3471,6 +3523,7 @@
        /* above now done in SendReceive */
        if ((rc == 0) && (tcon != NULL)) {
                tcon->tidStatus = CifsGood;
@@ -963246,7 +963104,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
                tcon->tid = smb_buffer_response->Tid;
                bcc_ptr = pByteArea(smb_buffer_response);
                length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2);
-@@ -3542,52 +3595,17 @@ int
+@@ -3542,52 +3595,17 @@
  cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
  {
        int rc = 0;
@@ -963301,7 +963159,7 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        return rc;
  }
  
-@@ -3701,7 +3719,10 @@ int cifs_setup_session(unsigned int xid,
+@@ -3701,7 +3719,10 @@
                cERROR(1, ("Send error in SessSetup = %d", rc));
        } else {
                cFYI(1, ("CIFS Session Established successfully"));
@@ -963312,10 +963170,10 @@ diff -purN linux-2.6.27/fs/cifs/connect.c linux-2.6.27.19-5.1/fs/cifs/connect.c
        }
  
  ss_err_exit:
-diff -purN linux-2.6.27/fs/cifs/file.c linux-2.6.27.19-5.1/fs/cifs/file.c
---- linux-2.6.27/fs/cifs/file.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -493,7 +493,7 @@ int cifs_close(struct inode *inode, stru
+diff -r 9608d5473017 fs/cifs/file.c
+--- a/fs/cifs/file.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/file.c   Wed May 06 16:56:46 2009 +0100
+@@ -493,7 +493,7 @@
                if (pTcon) {
                        /* no sense reconnecting to close a file that is
                           already closed */
@@ -963324,7 +963182,7 @@ diff -purN linux-2.6.27/fs/cifs/file.c linux-2.6.27.19-5.1/fs/cifs/file.c
                                timeout = 2;
                                while ((atomic_read(&pSMBFile->wrtPending) != 0)
                                        && (timeout <= 2048)) {
-@@ -1396,7 +1396,10 @@ retry:
+@@ -1396,7 +1396,10 @@
                        if ((wbc->nr_to_write -= n_iov) <= 0)
                                done = 1;
                        index = next;
@@ -963336,7 +963194,7 @@ diff -purN linux-2.6.27/fs/cifs/file.c linux-2.6.27.19-5.1/fs/cifs/file.c
                pagevec_release(&pvec);
        }
        if (!scanned && !done) {
-@@ -1813,7 +1816,7 @@ static int cifs_readpages(struct file *f
+@@ -1813,7 +1816,7 @@
        pTcon = cifs_sb->tcon;
  
        pagevec_init(&lru_pvec, 0);
@@ -963345,10 +963203,10 @@ diff -purN linux-2.6.27/fs/cifs/file.c linux-2.6.27.19-5.1/fs/cifs/file.c
        for (i = 0; i < num_pages; ) {
                unsigned contig_pages;
                struct page *tmp_page;
-diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
---- linux-2.6.27/fs/cifs/misc.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/misc.c 2009-03-25 16:11:39.000000000 +0000
-@@ -75,12 +75,12 @@ sesInfoAlloc(void)
+diff -r 9608d5473017 fs/cifs/misc.c
+--- a/fs/cifs/misc.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/misc.c   Wed May 06 16:56:46 2009 +0100
+@@ -75,12 +75,12 @@
  
        ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL);
        if (ret_buf) {
@@ -963364,7 +963222,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        }
        return ret_buf;
  }
-@@ -93,10 +93,7 @@ sesInfoFree(struct cifsSesInfo *buf_to_f
+@@ -93,10 +93,7 @@
                return;
        }
  
@@ -963375,7 +963233,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        kfree(buf_to_free->serverOS);
        kfree(buf_to_free->serverDomain);
        kfree(buf_to_free->serverNOS);
-@@ -111,17 +108,14 @@ tconInfoAlloc(void)
+@@ -111,17 +108,14 @@
        struct cifsTconInfo *ret_buf;
        ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL);
        if (ret_buf) {
@@ -963395,7 +963253,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        }
        return ret_buf;
  }
-@@ -133,10 +127,7 @@ tconInfoFree(struct cifsTconInfo *buf_to
+@@ -133,10 +127,7 @@
                cFYI(1, ("Null buffer passed to tconInfoFree"));
                return;
        }
@@ -963406,7 +963264,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        kfree(buf_to_free->nativeFileSystem);
        kfree(buf_to_free);
  }
-@@ -354,9 +345,9 @@ header_assemble(struct smb_hdr *buffer, 
+@@ -354,9 +345,9 @@
                                if (current->fsuid != treeCon->ses->linux_uid) {
                                        cFYI(1, ("Multiuser mode and UID "
                                                 "did not match tcon uid"));
@@ -963419,7 +963277,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
                                                if (ses->linux_uid == current->fsuid) {
                                                        if (ses->server == treeCon->ses->server) {
                                                                cFYI(1, ("found matching uid substitute right smb_uid"));
-@@ -368,7 +359,7 @@ header_assemble(struct smb_hdr *buffer, 
+@@ -368,7 +359,7 @@
                                                        }
                                                }
                                        }
@@ -963428,7 +963286,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
                                }
                        }
                }
-@@ -501,9 +492,10 @@ bool
+@@ -501,9 +492,10 @@
  is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
  {
        struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;
@@ -963441,7 +963299,7 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        struct cifsFileInfo *netfile;
  
        cFYI(1, ("Checking for oplock break or dnotify response"));
-@@ -558,42 +550,42 @@ is_valid_oplock_break(struct smb_hdr *bu
+@@ -558,42 +550,42 @@
                return false;
  
        /* look up tcon based on tid & uid */
@@ -963513,10 +963371,10 @@ diff -purN linux-2.6.27/fs/cifs/misc.c linux-2.6.27.19-5.1/fs/cifs/misc.c
        cFYI(1, ("Can not process oplock break for non-existent connection"));
        return true;
  }
-diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
---- linux-2.6.27/fs/cifs/readdir.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/readdir.c      2009-03-25 16:11:39.000000000 +0000
-@@ -640,6 +640,70 @@ static int is_dir_changed(struct file *f
+diff -r 9608d5473017 fs/cifs/readdir.c
+--- a/fs/cifs/readdir.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/readdir.c        Wed May 06 16:56:46 2009 +0100
+@@ -640,6 +640,70 @@
  
  }
  
@@ -963587,7 +963445,7 @@ diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
  /* find the corresponding entry in the search */
  /* Note that the SMB server returns search entries for . and .. which
     complicates logic here if we choose to parse for them and we do not
-@@ -698,6 +762,7 @@ static int find_cifs_entry(const int xid
+@@ -698,6 +762,7 @@
                                 rc));
                        return rc;
                }
@@ -963595,7 +963453,7 @@ diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
        }
  
        while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
-@@ -705,6 +770,7 @@ static int find_cifs_entry(const int xid
+@@ -705,6 +770,7 @@
                cFYI(1, ("calling findnext2"));
                rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
                                  &cifsFile->srch_inf);
@@ -963603,7 +963461,7 @@ diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
                if (rc)
                        return -ENOENT;
        }
-@@ -919,69 +985,6 @@ static int cifs_filldir(char *pfindEntry
+@@ -919,69 +985,6 @@
        return rc;
  }
  
@@ -963673,10 +963531,10 @@ diff -purN linux-2.6.27/fs/cifs/readdir.c linux-2.6.27.19-5.1/fs/cifs/readdir.c
  
  int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
  {
-diff -purN linux-2.6.27/fs/cifs/sess.c linux-2.6.27.19-5.1/fs/cifs/sess.c
---- linux-2.6.27/fs/cifs/sess.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/sess.c 2009-03-25 16:11:39.000000000 +0000
-@@ -228,7 +228,7 @@ static int decode_unicode_ssetup(char **
+diff -r 9608d5473017 fs/cifs/sess.c
+--- a/fs/cifs/sess.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/sess.c   Wed May 06 16:56:46 2009 +0100
+@@ -228,7 +228,7 @@
  
        kfree(ses->serverOS);
        /* UTF-8 string will not grow more than four times as big as UCS-16 */
@@ -963685,7 +963543,7 @@ diff -purN linux-2.6.27/fs/cifs/sess.c linux-2.6.27.19-5.1/fs/cifs/sess.c
        if (ses->serverOS != NULL)
                cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);
        data += 2 * (len + 1);
-@@ -241,7 +241,7 @@ static int decode_unicode_ssetup(char **
+@@ -241,7 +241,7 @@
                return rc;
  
        kfree(ses->serverNOS);
@@ -963694,10 +963552,10 @@ diff -purN linux-2.6.27/fs/cifs/sess.c linux-2.6.27.19-5.1/fs/cifs/sess.c
        if (ses->serverNOS != NULL) {
                cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,
                                   nls_cp);
-diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transport.c
---- linux-2.6.27/fs/cifs/transport.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/cifs/transport.c    2009-03-25 16:11:39.000000000 +0000
-@@ -162,7 +162,7 @@ void DeleteTconOplockQEntries(struct cif
+diff -r 9608d5473017 fs/cifs/transport.c
+--- a/fs/cifs/transport.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/cifs/transport.c      Wed May 06 16:56:47 2009 +0100
+@@ -162,7 +162,7 @@
  
  int
  smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
@@ -963706,7 +963564,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  {
        int rc = 0;
        int i = 0;
-@@ -179,7 +179,10 @@ smb_send(struct socket *ssocket, struct 
+@@ -179,7 +179,10 @@
        smb_msg.msg_namelen = sizeof(struct sockaddr);
        smb_msg.msg_control = NULL;
        smb_msg.msg_controllen = 0;
@@ -963718,7 +963576,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  
        /* smb header is converted in header_assemble. bcc and rest of SMB word
           area, and byte area if necessary, is converted to littleendian in
-@@ -230,8 +233,8 @@ smb_send(struct socket *ssocket, struct 
+@@ -230,8 +233,8 @@
  }
  
  static int
@@ -963729,7 +963587,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  {
        int rc = 0;
        int i = 0;
-@@ -241,6 +244,7 @@ smb_send2(struct socket *ssocket, struct
+@@ -241,6 +244,7 @@
        unsigned int total_len;
        int first_vec = 0;
        unsigned int smb_buf_length = smb_buffer->smb_buf_length;
@@ -963737,7 +963595,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  
        if (ssocket == NULL)
                return -ENOTSOCK; /* BB eventually add reconnect code here */
-@@ -249,7 +253,10 @@ smb_send2(struct socket *ssocket, struct
+@@ -249,7 +253,10 @@
        smb_msg.msg_namelen = sizeof(struct sockaddr);
        smb_msg.msg_control = NULL;
        smb_msg.msg_controllen = 0;
@@ -963749,7 +963607,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  
        /* smb header is converted in header_assemble. bcc and rest of SMB word
           area, and byte area if necessary, is converted to littleendian in
-@@ -284,8 +291,11 @@ smb_send2(struct socket *ssocket, struct
+@@ -284,8 +291,11 @@
                if (rc < 0)
                        break;
  
@@ -963763,10 +963621,12 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
                        break;
                }
                if (rc == 0) {
-@@ -313,6 +323,16 @@ smb_send2(struct socket *ssocket, struct
+@@ -311,6 +321,16 @@
+                       }
+               }
                i = 0; /* in case we get ENOSPC on the next send */
-       }
++      }
++
 +      if ((total_len > 0) && (total_len != smb_buf_length + 4)) {
 +              cFYI(1, ("partial send (%d remaining), terminating session",
 +                              total_len));
@@ -963775,12 +963635,10 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
 +                 to kill the socket so the server throws away the partial
 +                 SMB */
 +              server->tcpStatus = CifsNeedReconnect;
-+      }
-+
+       }
        if (rc < 0) {
-               cERROR(1, ("Error %d sending data on socket to server", rc));
-       } else
-@@ -519,8 +539,9 @@ SendReceive2(const unsigned int xid, str
+@@ -519,8 +539,9 @@
  #ifdef CONFIG_CIFS_STATS2
        atomic_inc(&ses->server->inSend);
  #endif
@@ -963792,7 +963650,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  #ifdef CONFIG_CIFS_STATS2
        atomic_dec(&ses->server->inSend);
        midQ->when_sent = jiffies;
-@@ -712,7 +733,8 @@ SendReceive(const unsigned int xid, stru
+@@ -712,7 +733,8 @@
        atomic_inc(&ses->server->inSend);
  #endif
        rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
@@ -963802,7 +963660,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  #ifdef CONFIG_CIFS_STATS2
        atomic_dec(&ses->server->inSend);
        midQ->when_sent = jiffies;
-@@ -852,7 +874,8 @@ send_nt_cancel(struct cifsTconInfo *tcon
+@@ -852,7 +874,8 @@
                return rc;
        }
        rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
@@ -963812,7 +963670,7 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
        up(&ses->server->tcpSem);
        return rc;
  }
-@@ -942,7 +965,8 @@ SendReceiveBlockingLock(const unsigned i
+@@ -942,7 +965,8 @@
        atomic_inc(&ses->server->inSend);
  #endif
        rc = smb_send(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
@@ -963822,9 +963680,9 @@ diff -purN linux-2.6.27/fs/cifs/transport.c linux-2.6.27.19-5.1/fs/cifs/transpor
  #ifdef CONFIG_CIFS_STATS2
        atomic_dec(&ses->server->inSend);
        midQ->when_sent = jiffies;
-diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
---- linux-2.6.27/fs/compat.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/compat.c    2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/compat.c
+--- a/fs/compat.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/compat.c      Wed May 06 16:56:47 2009 +0100
 @@ -51,6 +51,7 @@
  #include <linux/poll.h>
  #include <linux/mm.h>
@@ -963833,7 +963691,7 @@ diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
  
  #include <asm/uaccess.h>
  #include <asm/mmu_context.h>
-@@ -1406,6 +1407,7 @@ int compat_do_execve(char * filename,
+@@ -1406,6 +1407,7 @@
  
        retval = search_binary_handler(bprm, regs);
        if (retval >= 0) {
@@ -963841,7 +963699,7 @@ diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
                /* execve success */
                security_bprm_free(bprm);
                acct_update_integrals(current);
-@@ -1640,7 +1642,7 @@ sticky:
+@@ -1640,7 +1642,7 @@
  }
  
  #ifdef HAVE_SET_RESTORE_SIGMASK
@@ -963850,7 +963708,7 @@ diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
        compat_ulong_t __user *outp, compat_ulong_t __user *exp,
        struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
        compat_size_t sigsetsize)
-@@ -1748,8 +1750,8 @@ asmlinkage long compat_sys_pselect6(int 
+@@ -1748,8 +1750,8 @@
                                (compat_size_t __user *)(sig+sizeof(up))))
                        return -EFAULT;
        }
@@ -963861,24 +963719,24 @@ diff -purN linux-2.6.27/fs/compat.c linux-2.6.27.19-5.1/fs/compat.c
  }
  
  asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
-diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
---- linux-2.6.27/fs/compat_ioctl.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/compat_ioctl.c      2009-03-25 16:11:35.000000000 +0000
-@@ -114,6 +114,13 @@
- #include <asm/fbio.h>
- #endif
+diff -r 9608d5473017 fs/compat_ioctl.c
+--- a/fs/compat_ioctl.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/compat_ioctl.c        Wed May 06 16:56:47 2009 +0100
+@@ -112,6 +112,13 @@
  
+ #ifdef CONFIG_SPARC
+ #include <asm/fbio.h>
++#endif
++
 +#ifdef CONFIG_XEN
 +#include <xen/interface/xen.h>
 +#include <xen/public/evtchn.h>
 +#include <xen/public/privcmd.h>
 +#include <xen/compat_ioctl.h>
-+#endif
-+
+ #endif
  static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd,
-                             unsigned long arg, struct file *f)
- {
-@@ -538,6 +545,7 @@ static int dev_ifsioc(unsigned int fd, u
+@@ -538,6 +545,7 @@
                 * cannot be fixed without breaking all existing apps.
                 */
                case TUNSETIFF:
@@ -963886,7 +963744,7 @@ diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
                case SIOCGIFFLAGS:
                case SIOCGIFMETRIC:
                case SIOCGIFMTU:
-@@ -1870,6 +1878,7 @@ COMPATIBLE_IOCTL(TCSETSW)
+@@ -1870,6 +1878,7 @@
  COMPATIBLE_IOCTL(TCSETSF)
  COMPATIBLE_IOCTL(TIOCLINUX)
  COMPATIBLE_IOCTL(TIOCSBRK)
@@ -963894,7 +963752,7 @@ diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
  COMPATIBLE_IOCTL(TIOCCBRK)
  ULONG_IOCTL(TIOCMIWAIT)
  COMPATIBLE_IOCTL(TIOCGICOUNT)
-@@ -1982,6 +1991,11 @@ COMPATIBLE_IOCTL(TUNSETNOCSUM)
+@@ -1982,6 +1991,11 @@
  COMPATIBLE_IOCTL(TUNSETDEBUG)
  COMPATIBLE_IOCTL(TUNSETPERSIST)
  COMPATIBLE_IOCTL(TUNSETOWNER)
@@ -963906,7 +963764,7 @@ diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
  /* Big V */
  COMPATIBLE_IOCTL(VT_SETMODE)
  COMPATIBLE_IOCTL(VT_GETMODE)
-@@ -2573,6 +2587,7 @@ HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
+@@ -2573,6 +2587,7 @@
  HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
  HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
  HANDLE_IOCTL(TUNSETIFF, dev_ifsioc)
@@ -963914,10 +963772,11 @@ diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
  HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl)
  HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
  HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
-@@ -2726,6 +2741,18 @@ IGNORE_IOCTL(FBIOGETCMAP32)
+@@ -2725,6 +2740,18 @@
+ IGNORE_IOCTL(FBIOGETCMAP32)
  IGNORE_IOCTL(FBIOSCURSOR32)
  IGNORE_IOCTL(FBIOGCURSOR32)
- #endif
++#endif
 +
 +#ifdef CONFIG_XEN
 +HANDLE_IOCTL(IOCTL_PRIVCMD_MMAP_32, privcmd_ioctl_32)
@@ -963929,14 +963788,13 @@ diff -purN linux-2.6.27/fs/compat_ioctl.c linux-2.6.27.19-5.1/fs/compat_ioctl.c
 +COMPATIBLE_IOCTL(IOCTL_EVTCHN_UNBIND)
 +COMPATIBLE_IOCTL(IOCTL_EVTCHN_NOTIFY)
 +COMPATIBLE_IOCTL(IOCTL_EVTCHN_RESET)
-+#endif
+ #endif
  };
  
- #define IOCTL_HASHSIZE 256
-diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
---- linux-2.6.27/fs/dcache.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dcache.c    2009-03-25 16:11:36.000000000 +0000
-@@ -1615,8 +1615,11 @@ static void switch_names(struct dentry *
+diff -r 9608d5473017 fs/dcache.c
+--- a/fs/dcache.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/dcache.c      Wed May 06 16:56:47 2009 +0100
+@@ -1615,8 +1615,11 @@
                         */
                        memcpy(dentry->d_iname, target->d_name.name,
                                        target->d_name.len + 1);
@@ -963948,7 +963806,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
  }
  
  /*
-@@ -1676,7 +1679,6 @@ already_unhashed:
+@@ -1676,7 +1679,6 @@
  
        /* Switch the names.. */
        switch_names(dentry, target);
@@ -963956,7 +963814,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
        do_switch(dentry->d_name.hash, target->d_name.hash);
  
        /* ... and switch the parents */
-@@ -1781,7 +1783,6 @@ static void __d_materialise_dentry(struc
+@@ -1781,7 +1783,6 @@
        struct dentry *dparent, *aparent;
  
        switch_names(dentry, anon);
@@ -963964,7 +963822,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
        do_switch(dentry->d_name.hash, anon->d_name.hash);
  
        dparent = dentry->d_parent;
-@@ -1897,44 +1898,46 @@ static int prepend_name(char **buffer, i
+@@ -1897,44 +1898,46 @@
   * @root: root vfsmnt/dentry (may be modified by this function)
   * @buffer: buffer to return value in
   * @buflen: buffer length
@@ -963972,20 +963830,20 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
   *
 - * Convert a dentry into an ASCII path name. If the entry has been deleted
 - * the string " (deleted)" is appended. Note that this is ambiguous.
-- *
-- * Returns the buffer or an error code if the path was too long.
-- *
-- * "buflen" should be positive. Caller holds the dcache_lock.
 + * Convert a dentry into an ASCII path name. If the entry has been deleted,
 + * then if @flags has D_PATH_FAIL_DELETED set, ERR_PTR(-ENOENT) is returned.
 + * Otherwise, the string " (deleted)" is appended. Note that this is ambiguous.
-  *
-  * If path is not reachable from the supplied root, then the value of
-- * root is changed (without modifying refcounts).
++ *
++ * If path is not reachable from the supplied root, then the value of
 + * root is changed (without modifying refcounts).  The path returned in this
 + * case will be relative (i.e., it will not start with a slash).
-+ *
-+ * Returns the buffer or an error code if the path was too long.
+  *
+  * Returns the buffer or an error code if the path was too long.
+- *
+- * "buflen" should be positive. Caller holds the dcache_lock.
+- *
+- * If path is not reachable from the supplied root, then the value of
+- * root is changed (without modifying refcounts).
   */
  char *__d_path(const struct path *path, struct path *root,
 -             char *buffer, int buflen)
@@ -964032,7 +963890,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
                        if (vfsmnt->mnt_parent == vfsmnt) {
                                goto global_root;
                        }
-@@ -1944,27 +1947,51 @@ char *__d_path(const struct path *path, 
+@@ -1944,27 +1947,51 @@
                }
                parent = dentry->d_parent;
                prefetch(parent);
@@ -964091,7 +963949,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
        goto out;
  }
  
-@@ -2001,10 +2028,8 @@ char *d_path(const struct path *path, ch
+@@ -2001,10 +2028,8 @@
        root = current->fs->root;
        path_get(&root);
        read_unlock(&current->fs->lock);
@@ -964103,7 +963961,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
        path_put(&root);
        return res;
  }
-@@ -2085,11 +2110,11 @@ Elong:
+@@ -2085,11 +2110,11 @@
   *            return NULL;
   *    }
   */
@@ -964119,7 +963977,7 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
  
        if (!page)
                return -ENOMEM;
-@@ -2101,30 +2126,20 @@ asmlinkage long sys_getcwd(char __user *
+@@ -2101,30 +2126,20 @@
        path_get(&root);
        read_unlock(&current->fs->lock);
  
@@ -964130,19 +963988,20 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
 -              unsigned long len;
 -              struct path tmp = root;
 -              char * cwd;
--
--              cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE);
--              spin_unlock(&dcache_lock);
--
 +      tmp = root;
 +      cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE, D_PATH_FAIL_DELETED);
 +      if (IS_ERR(cwd)) {
-               error = PTR_ERR(cwd);
--              if (IS_ERR(cwd))
--                      goto out;
++              error = PTR_ERR(cwd);
 +              goto out;
 +      }
  
+-              cwd = __d_path(&pwd, &tmp, page, PAGE_SIZE);
+-              spin_unlock(&dcache_lock);
+-
+-              error = PTR_ERR(cwd);
+-              if (IS_ERR(cwd))
+-                      goto out;
+-
 -              error = -ERANGE;
 -              len = PAGE_SIZE + page - cwd;
 -              if (len <= size) {
@@ -964162,10 +964021,10 @@ diff -purN linux-2.6.27/fs/dcache.c linux-2.6.27.19-5.1/fs/dcache.c
  
  out:
        path_put(&pwd);
-diff -purN linux-2.6.27/fs/dcookies.c linux-2.6.27.19-5.1/fs/dcookies.c
---- linux-2.6.27/fs/dcookies.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dcookies.c  2009-03-25 16:11:32.000000000 +0000
-@@ -140,7 +140,7 @@ out:
+diff -r 9608d5473017 fs/dcookies.c
+--- a/fs/dcookies.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/dcookies.c    Wed May 06 16:56:47 2009 +0100
+@@ -140,7 +140,7 @@
  /* And here is where the userspace process can look up the cookie value
   * to retrieve the path.
   */
@@ -964174,7 +964033,7 @@ diff -purN linux-2.6.27/fs/dcookies.c linux-2.6.27.19-5.1/fs/dcookies.c
  {
        unsigned long cookie = (unsigned long)cookie64;
        int err = -EINVAL;
-@@ -193,7 +193,13 @@ out:
+@@ -193,7 +193,13 @@
        mutex_unlock(&dcookie_mutex);
        return err;
  }
@@ -964189,9 +964048,9 @@ diff -purN linux-2.6.27/fs/dcookies.c linux-2.6.27.19-5.1/fs/dcookies.c
  
  static int dcookie_init(void)
  {
-diff -purN linux-2.6.27/fs/dlm/dlm_internal.h linux-2.6.27.19-5.1/fs/dlm/dlm_internal.h
---- linux-2.6.27/fs/dlm/dlm_internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/dlm_internal.h  2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/dlm_internal.h
+--- a/fs/dlm/dlm_internal.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/dlm_internal.h    Wed May 06 16:56:47 2009 +0100
 @@ -2,7 +2,7 @@
  *******************************************************************************
  **
@@ -964201,7 +964060,7 @@ diff -purN linux-2.6.27/fs/dlm/dlm_internal.h linux-2.6.27.19-5.1/fs/dlm/dlm_int
  **
  **  This copyrighted material is made available to anyone wishing to use,
  **  modify, copy, or redistribute it subject to the terms and conditions
-@@ -441,7 +441,9 @@ struct dlm_ls {
+@@ -441,7 +441,9 @@
        uint32_t                ls_global_id;   /* global unique lockspace ID */
        uint32_t                ls_exflags;
        int                     ls_lvblen;
@@ -964212,9 +964071,9 @@ diff -purN linux-2.6.27/fs/dlm/dlm_internal.h linux-2.6.27.19-5.1/fs/dlm/dlm_int
        unsigned long           ls_flags;       /* LSFL_ */
        struct kobject          ls_kobj;
  
-diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.c
---- linux-2.6.27/fs/dlm/lockspace.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/lockspace.c     2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/lockspace.c
+--- a/fs/dlm/lockspace.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/lockspace.c       Wed May 06 16:56:47 2009 +0100
 @@ -2,7 +2,7 @@
  *******************************************************************************
  **
@@ -964232,7 +964091,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
  
  static int                    ls_count;
  static struct mutex           ls_lock;
-@@ -246,23 +247,6 @@ static void dlm_scand_stop(void)
+@@ -246,23 +247,6 @@
        kthread_stop(scand_task);
  }
  
@@ -964256,7 +964115,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
  struct dlm_ls *dlm_find_lockspace_global(uint32_t id)
  {
        struct dlm_ls *ls;
-@@ -327,6 +311,7 @@ static void remove_lockspace(struct dlm_
+@@ -327,6 +311,7 @@
        for (;;) {
                spin_lock(&lslist_lock);
                if (ls->ls_count == 0) {
@@ -964264,7 +964123,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
                        list_del(&ls->ls_list);
                        spin_unlock(&lslist_lock);
                        return;
-@@ -381,7 +366,7 @@ static int new_lockspace(char *name, int
+@@ -381,7 +366,7 @@
                         uint32_t flags, int lvblen)
  {
        struct dlm_ls *ls;
@@ -964273,7 +964132,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
        int do_unreg = 0;
  
        if (namelen > DLM_LOCKSPACE_LEN)
-@@ -393,12 +378,32 @@ static int new_lockspace(char *name, int
+@@ -393,12 +378,32 @@
        if (!try_module_get(THIS_MODULE))
                return -EINVAL;
  
@@ -964310,7 +964169,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
  
        ls = kzalloc(sizeof(struct dlm_ls) + namelen, GFP_KERNEL);
        if (!ls)
-@@ -418,8 +423,9 @@ static int new_lockspace(char *name, int
+@@ -418,8 +423,9 @@
                ls->ls_allocation = GFP_KERNEL;
  
        /* ls_exflags are forced to match among nodes, and we don't
@@ -964322,7 +964181,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
  
        size = dlm_config.ci_rsbtbl_size;
        ls->ls_rsbtbl_size = size;
-@@ -510,6 +516,7 @@ static int new_lockspace(char *name, int
+@@ -510,6 +516,7 @@
        down_write(&ls->ls_in_recovery);
  
        spin_lock(&lslist_lock);
@@ -964330,7 +964189,7 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
        list_add(&ls->ls_list, &lslist);
        spin_unlock(&lslist_lock);
  
-@@ -548,7 +555,7 @@ static int new_lockspace(char *name, int
+@@ -548,7 +555,7 @@
        dlm_create_debug_file(ls);
  
        log_debug(ls, "join complete");
@@ -964339,14 +964198,16 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
        *lockspace = ls;
        return 0;
  
-@@ -635,11 +642,32 @@ static int release_lockspace(struct dlm_
+@@ -635,11 +642,32 @@
        struct dlm_lkb *lkb;
        struct dlm_rsb *rsb;
        struct list_head *head;
 -      int i;
 -      int busy = lockspace_busy(ls);
 +      int i, busy, rv;
-+
+-      if (busy > force)
+-              return -EBUSY;
 +      busy = lockspace_busy(ls);
 +
 +      spin_lock(&lslist_lock);
@@ -964369,31 +964230,28 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
 +              log_debug(ls, "release_lockspace no remove %d", rv);
 +              return rv;
 +      }
--      if (busy > force)
--              return -EBUSY;
++
 +      dlm_device_deregister(ls);
  
        if (force < 3)
                do_uevent(ls, 0);
-@@ -720,15 +748,10 @@ static int release_lockspace(struct dlm_
+@@ -720,14 +748,9 @@
        dlm_clear_members(ls);
        dlm_clear_members_gone(ls);
        kfree(ls->ls_node_array);
 +      log_debug(ls, "release_lockspace final free");
        kobject_put(&ls->ls_kobj);
        /* The ls structure will be freed when the kobject is done with */
+-
 -      mutex_lock(&ls_lock);
 -      ls_count--;
 -      if (!ls_count)
 -              threads_stop();
 -      mutex_unlock(&ls_lock);
--
        module_put(THIS_MODULE);
        return 0;
- }
-@@ -750,11 +773,21 @@ static int release_lockspace(struct dlm_
+@@ -750,11 +773,21 @@
  int dlm_release_lockspace(void *lockspace, int force)
  {
        struct dlm_ls *ls;
@@ -964416,10 +964274,10 @@ diff -purN linux-2.6.27/fs/dlm/lockspace.c linux-2.6.27.19-5.1/fs/dlm/lockspace.
 +      return error;
  }
  
-diff -purN linux-2.6.27/fs/dlm/plock.c linux-2.6.27.19-5.1/fs/dlm/plock.c
---- linux-2.6.27/fs/dlm/plock.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/plock.c 2009-03-25 16:11:32.000000000 +0000
-@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *locks
+diff -r 9608d5473017 fs/dlm/plock.c
+--- a/fs/dlm/plock.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/plock.c   Wed May 06 16:56:47 2009 +0100
+@@ -304,7 +304,9 @@
        if (rv == -ENOENT)
                rv = 0;
        else if (rv > 0) {
@@ -964429,9 +964287,9 @@ diff -purN linux-2.6.27/fs/dlm/plock.c linux-2.6.27.19-5.1/fs/dlm/plock.c
                fl->fl_pid = op->info.pid;
                fl->fl_start = op->info.start;
                fl->fl_end = op->info.end;
-diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
---- linux-2.6.27/fs/dlm/user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/user.c  2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/user.c
+--- a/fs/dlm/user.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/user.c    Wed May 06 16:56:47 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (C) 2006-2007 Red Hat, Inc.  All rights reserved.
@@ -964439,7 +964297,7 @@ diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
   *
   * This copyrighted material is made available to anyone wishing to use,
   * modify, copy, or redistribute it subject to the terms and conditions
-@@ -340,10 +340,15 @@ static int device_user_deadlock(struct d
+@@ -340,9 +340,14 @@
        return error;
  }
  
@@ -964447,19 +964305,21 @@ diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
 +static int dlm_device_register(struct dlm_ls *ls, char *name)
  {
        int error, len;
++
 +      /* The device is already registered.  This happens when the
 +         lockspace is created multiple times from userspace. */
 +      if (ls->ls_device.name)
 +              return 0;
-+
        error = -ENOMEM;
        len = strlen(name) + strlen(name_prefix) + 2;
-       ls->ls_device.name = kzalloc(len, GFP_KERNEL);
-@@ -363,6 +368,22 @@ fail:
-       return error;
- }
+@@ -360,6 +365,22 @@
+               kfree(ls->ls_device.name);
+       }
+ fail:
++      return error;
++}
++
 +int dlm_device_deregister(struct dlm_ls *ls)
 +{
 +      int error;
@@ -964473,13 +964333,10 @@ diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
 +      error = misc_deregister(&ls->ls_device);
 +      if (!error)
 +              kfree(ls->ls_device.name);
-+      return error;
-+}
-+
- static int device_user_purge(struct dlm_user_proc *proc,
-                            struct dlm_purge_params *params)
- {
-@@ -397,7 +418,7 @@ static int device_create_lockspace(struc
+       return error;
+ }
+@@ -397,7 +418,7 @@
        if (!ls)
                return -ENOENT;
  
@@ -964488,7 +964345,7 @@ diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
        dlm_put_lockspace(ls);
  
        if (error)
-@@ -421,31 +442,22 @@ static int device_remove_lockspace(struc
+@@ -421,31 +442,22 @@
        if (!ls)
                return -ENOENT;
  
@@ -964529,9 +964386,9 @@ diff -purN linux-2.6.27/fs/dlm/user.c linux-2.6.27.19-5.1/fs/dlm/user.c
        return error;
  }
  
-diff -purN linux-2.6.27/fs/dlm/user.h linux-2.6.27.19-5.1/fs/dlm/user.h
---- linux-2.6.27/fs/dlm/user.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dlm/user.h  2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/dlm/user.h
+--- a/fs/dlm/user.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/dlm/user.h    Wed May 06 16:56:47 2009 +0100
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (C) 2006 Red Hat, Inc.  All rights reserved.
@@ -964546,9 +964403,9 @@ diff -purN linux-2.6.27/fs/dlm/user.h linux-2.6.27.19-5.1/fs/dlm/user.h
 +int dlm_device_deregister(struct dlm_ls *ls);
  
  #endif
-diff -purN linux-2.6.27/fs/dmapi/Makefile linux-2.6.27.19-5.1/fs/dmapi/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/Makefile      2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/Makefile        Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,53 @@
 +#
 +# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
@@ -964603,9 +964460,9 @@ diff -purN linux-2.6.27/fs/dmapi/Makefile linux-2.6.27.19-5.1/fs/dmapi/Makefile
 +                                 dmapi_register.o \
 +                                 dmapi_right.o \
 +                                 dmapi_session.o
-diff -purN linux-2.6.27/fs/dmapi/Status linux-2.6.27.19-5.1/fs/dmapi/Status
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/Status        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/Status
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/Status  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,128 @@
 +Jan21,04 - dm_get_bulkall is now implemented.  roehrich
 +
@@ -964735,9 +964592,9 @@ diff -purN linux-2.6.27/fs/dmapi/Status linux-2.6.27.19-5.1/fs/dmapi/Status
 +
 +- read/write events for memory-mapped I/O?
 +
-diff -purN linux-2.6.27/fs/dmapi/dmapi.h linux-2.6.27.19-5.1/fs/dmapi/dmapi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi.h       2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi.h Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,1086 @@
 +/*
 + * Copyright (c) 1995-2003 Silicon Graphics, Inc.  All Rights Reserved.
@@ -965825,9 +965682,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi.h linux-2.6.27.19-5.1/fs/dmapi/dmapi.h
 +#endif
 +
 +#endif /* __DMAPI_H__ */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_attr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_attr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_attr.c  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_attr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_attr.c    Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,93 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -965922,9 +965779,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_attr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_bulkattr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_bulkattr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_bulkattr.c      2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_bulkattr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_bulkattr.c        Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,170 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -966096,9 +965953,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_bulkattr.c linux-2.6.27.19-5.1/fs/dmapi/d
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_config.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_config.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_config.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_config.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_config.c  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,117 @@
 +/*
 + * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
@@ -966217,9 +966074,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_config.c linux-2.6.27.19-5.1/fs/dmapi/dma
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_dmattr.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_dmattr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_dmattr.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_dmattr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_dmattr.c  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,228 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -966449,9 +966306,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_dmattr.c linux-2.6.27.19-5.1/fs/dmapi/dma
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_event.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_event.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_event.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_event.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_event.c   Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,860 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -967313,9 +967170,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_event.c linux-2.6.27.19-5.1/fs/dmapi/dmap
 +
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_handle.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_handle.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_handle.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_handle.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_handle.c  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,119 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -967436,9 +967293,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_handle.c linux-2.6.27.19-5.1/fs/dmapi/dma
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_hole.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_hole.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_hole.c  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_hole.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_hole.c    Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,119 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -967559,9 +967416,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_hole.c linux-2.6.27.19-5.1/fs/dmapi/dmapi
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_io.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_io.c    2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_io.c      Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,142 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -967705,9 +967562,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_io.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_i
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_kern.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_kern.h  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_kern.h    Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,599 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -968308,9 +968165,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_kern.h linux-2.6.27.19-5.1/fs/dmapi/dmapi
 +#define DM_OPEN_BY_HANDLE     57
 +
 +#endif /* __DMAPI_KERN_H__ */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_mountinfo.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_mountinfo.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_mountinfo.c     2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_mountinfo.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_mountinfo.c       Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,527 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -968839,9 +968696,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_mountinfo.c linux-2.6.27.19-5.1/fs/dmapi/
 +{
 +      return 0;
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_port.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_port.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_port.h  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_port.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_port.h    Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,138 @@
 +/*
 + * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
@@ -968981,9 +968838,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_port.h linux-2.6.27.19-5.1/fs/dmapi/dmapi
 +#define do_mod(a, b)  dmapi_do_mod(&(a), (b), sizeof(a))
 +
 +#endif /* _DMAPI_PORT_H */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_private.h linux-2.6.27.19-5.1/fs/dmapi/dmapi_private.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_private.h       2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_private.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_private.h Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,619 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -969604,9 +969461,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_private.h linux-2.6.27.19-5.1/fs/dmapi/dm
 +                      int             errno);
 +
 +#endif        /* _DMAPI_PRIVATE_H */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_region.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_region.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_region.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_region.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_region.c  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,91 @@
 +/*
 + * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
@@ -969699,9 +969556,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_region.c linux-2.6.27.19-5.1/fs/dmapi/dma
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_register.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_register.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_register.c      2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_register.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_register.c        Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,1644 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -971347,9 +971204,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_register.c linux-2.6.27.19-5.1/fs/dmapi/d
 +      return 0;
 +}
 +#endif /* HAVE_DM_QUEUE_FLUSH */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_right.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_right.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_right.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_right.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_right.c   Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,1256 @@
 +/*
 + * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
@@ -972607,9 +972464,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_right.c linux-2.6.27.19-5.1/fs/dmapi/dmap
 +      dm_app_put_tdp(tdp);
 +      return(error);
 +}
-diff -purN linux-2.6.27/fs/dmapi/dmapi_session.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_session.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_session.c       2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_session.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_session.c Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,1825 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -974436,9 +974293,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_session.c linux-2.6.27.19-5.1/fs/dmapi/dm
 +      return 0;
 +}
 +#endif /* HAVE_DM_QUEUE_FLUSH */
-diff -purN linux-2.6.27/fs/dmapi/dmapi_sysent.c linux-2.6.27.19-5.1/fs/dmapi/dmapi_sysent.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/dmapi_sysent.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/dmapi_sysent.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/dmapi_sysent.c  Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,805 @@
 +/*
 + * Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
@@ -975245,9 +975102,9 @@ diff -purN linux-2.6.27/fs/dmapi/dmapi_sysent.c linux-2.6.27.19-5.1/fs/dmapi/dma
 +EXPORT_SYMBOL(dmapi_unregister);
 +EXPORT_SYMBOL(dmapi_registered);
 +EXPORT_SYMBOL(dm_release_threads);
-diff -purN linux-2.6.27/fs/dmapi/sv.h linux-2.6.27.19-5.1/fs/dmapi/sv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dmapi/sv.h  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/dmapi/sv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/dmapi/sv.h    Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,89 @@
 +/*
 + * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
@@ -975338,10 +975195,10 @@ diff -purN linux-2.6.27/fs/dmapi/sv.h linux-2.6.27.19-5.1/fs/dmapi/sv.h
 +      wake_up_all(&(sv)->waiters)
 +
 +#endif /* __DMAPI_SV_H__ */
-diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
---- linux-2.6.27/fs/dquot.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/dquot.c     2009-03-25 16:11:39.000000000 +0000
-@@ -213,8 +213,6 @@ static struct hlist_head *dquot_hash;
+diff -r 9608d5473017 fs/dquot.c
+--- a/fs/dquot.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/dquot.c       Wed May 06 16:56:47 2009 +0100
+@@ -213,8 +213,6 @@
  
  struct dqstats dqstats;
  
@@ -975350,7 +975207,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  static inline unsigned int
  hashfn(const struct super_block *sb, unsigned int id, int type)
  {
-@@ -417,6 +415,14 @@ out_dqlock:
+@@ -417,6 +415,14 @@
        return ret;
  }
  
@@ -975365,14 +975222,14 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  /* Invalidate all dquots on the list. Note that this function is called after
   * quota is disabled and pointers from inodes removed so there cannot be new
   * quota users. There can still be some users of quotas due to inodes being
-@@ -465,9 +471,44 @@ restart:
+@@ -465,9 +471,44 @@
                remove_dquot_hash(dquot);
                remove_free_dquot(dquot);
                remove_inuse(dquot);
 -              kmem_cache_free(dquot_cachep, dquot);
 +              destroy_dquot(dquot);
-+      }
-+      spin_unlock(&dq_list_lock);
+       }
+       spin_unlock(&dq_list_lock);
 +}
 +
 +/* Call callback for every active dquot on given filesystem */
@@ -975402,8 +975259,8 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
 +              spin_lock(&dq_list_lock);
 +              /* We are safe to continue now because our dquot could not
 +               * be moved out of the inuse list while we hold the reference */
-       }
-       spin_unlock(&dq_list_lock);
++      }
++      spin_unlock(&dq_list_lock);
 +out:
 +      dqput(old_dquot);
 +      mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
@@ -975411,7 +975268,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  }
  
  int vfs_quota_sync(struct super_block *sb, int type)
-@@ -481,7 +522,7 @@ int vfs_quota_sync(struct super_block *s
+@@ -481,7 +522,7 @@
        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
                if (type != -1 && cnt != type)
                        continue;
@@ -975420,7 +975277,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                        continue;
                spin_lock(&dq_list_lock);
                dirty = &dqopt->info[cnt].dqi_dirty_list;
-@@ -506,8 +547,8 @@ int vfs_quota_sync(struct super_block *s
+@@ -506,8 +547,8 @@
        }
  
        for (cnt = 0; cnt < MAXQUOTAS; cnt++)
@@ -975431,7 +975288,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                        sb->dq_op->write_info(sb, cnt);
        spin_lock(&dq_list_lock);
        dqstats.syncs++;
-@@ -529,7 +570,7 @@ static void prune_dqcache(int count)
+@@ -529,7 +570,7 @@
                remove_dquot_hash(dquot);
                remove_free_dquot(dquot);
                remove_inuse(dquot);
@@ -975440,7 +975297,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                count--;
                head = free_dquots.prev;
        }
-@@ -560,7 +601,7 @@ static struct shrinker dqcache_shrinker 
+@@ -560,7 +601,7 @@
   * NOTE: If you change this function please check whether dqput_blocks() works right...
   * MUST be called with either dqptr_sem or dqonoff_mutex held
   */
@@ -975449,7 +975306,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  {
        int ret;
  
-@@ -586,7 +627,7 @@ we_slept:
+@@ -586,7 +627,7 @@
                /* We have more than one user... nothing to do */
                atomic_dec(&dquot->dq_count);
                /* Releasing dquot during quotaoff phase? */
@@ -975458,7 +975315,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                    atomic_read(&dquot->dq_count) == 1)
                        wake_up(&dquot->dq_wait_unused);
                spin_unlock(&dq_list_lock);
-@@ -631,7 +672,10 @@ static struct dquot *get_empty_dquot(str
+@@ -631,7 +672,10 @@
  {
        struct dquot *dquot;
  
@@ -975470,7 +975327,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        if(!dquot)
                return NODQUOT;
  
-@@ -649,15 +693,33 @@ static struct dquot *get_empty_dquot(str
+@@ -649,15 +693,33 @@
  }
  
  /*
@@ -975506,7 +975363,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                return NODQUOT;
  we_slept:
        spin_lock(&dq_list_lock);
-@@ -684,7 +746,7 @@ we_slept:
+@@ -684,7 +746,7 @@
                dqstats.lookups++;
                spin_unlock(&dq_list_lock);
                if (empty)
@@ -975515,7 +975372,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        }
        /* Wait for dq_lock - after this we know that either dquot_release() is already
         * finished or it will be canceled due to dq_count > 1 test */
-@@ -822,7 +884,7 @@ static void drop_dquot_ref(struct super_
+@@ -822,7 +884,7 @@
        }
  }
  
@@ -975524,7 +975381,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  {
        dquot->dq_dqb.dqb_curinodes += number;
  }
-@@ -832,9 +894,10 @@ static inline void dquot_incr_space(stru
+@@ -832,9 +894,10 @@
        dquot->dq_dqb.dqb_curspace += number;
  }
  
@@ -975537,7 +975394,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                dquot->dq_dqb.dqb_curinodes -= number;
        else
                dquot->dq_dqb.dqb_curinodes = 0;
-@@ -845,11 +908,12 @@ static inline void dquot_decr_inodes(str
+@@ -845,11 +908,12 @@
  
  static inline void dquot_decr_space(struct dquot *dquot, qsize_t number)
  {
@@ -975552,7 +975409,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                dquot->dq_dqb.dqb_btime = (time_t) 0;
        clear_bit(DQ_BLKS_B, &dquot->dq_flags);
  }
-@@ -1027,10 +1091,11 @@ static inline char ignore_hardlimit(stru
+@@ -1027,10 +1091,11 @@
  }
  
  /* needs dq_data_lock */
@@ -975566,7 +975423,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                return QUOTA_OK;
  
        if (dquot->dq_dqb.dqb_ihardlimit &&
-@@ -1062,11 +1127,12 @@ static int check_idq(struct dquot *dquot
+@@ -1062,11 +1127,12 @@
  static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype)
  {
        *warntype = QUOTA_NL_NOWARN;
@@ -975581,7 +975438,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
              !ignore_hardlimit(dquot)) {
                if (!prealloc)
                        *warntype = QUOTA_NL_BHARDWARN;
-@@ -1074,7 +1140,7 @@ static int check_bdq(struct dquot *dquot
+@@ -1074,7 +1140,7 @@
        }
  
        if (dquot->dq_dqb.dqb_bsoftlimit &&
@@ -975590,7 +975447,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
            dquot->dq_dqb.dqb_btime && get_seconds() >= dquot->dq_dqb.dqb_btime &&
              !ignore_hardlimit(dquot)) {
                if (!prealloc)
-@@ -1083,7 +1149,7 @@ static int check_bdq(struct dquot *dquot
+@@ -1083,7 +1149,7 @@
        }
  
        if (dquot->dq_dqb.dqb_bsoftlimit &&
@@ -975599,7 +975456,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
            dquot->dq_dqb.dqb_btime == 0) {
                if (!prealloc) {
                        *warntype = QUOTA_NL_BSOFTWARN;
-@@ -1100,10 +1166,11 @@ static int check_bdq(struct dquot *dquot
+@@ -1100,10 +1166,11 @@
        return QUOTA_OK;
  }
  
@@ -975613,7 +975470,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                return QUOTA_NL_NOWARN;
  
        if (dquot->dq_dqb.dqb_curinodes - inodes <= dquot->dq_dqb.dqb_isoftlimit)
-@@ -1117,15 +1184,13 @@ static int info_idq_free(struct dquot *d
+@@ -1117,15 +1184,13 @@
  static int info_bdq_free(struct dquot *dquot, qsize_t space)
  {
        if (test_bit(DQ_FAKE_B, &dquot->dq_flags) ||
@@ -975633,7 +975490,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                return QUOTA_NL_BHARDBELOW;
        return QUOTA_NL_NOWARN;
  }
-@@ -1170,17 +1235,23 @@ out_err:
+@@ -1170,17 +1235,23 @@
   *    Release all quotas referenced by inode
   *    Transaction must be started at an entry
   */
@@ -975659,7 +975516,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
        return 0;
  }
-@@ -1268,7 +1339,7 @@ warn_put_all:
+@@ -1268,7 +1339,7 @@
  /*
   * This operation can block, but only after everything is updated
   */
@@ -975668,7 +975525,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  {
        int cnt, ret = NO_QUOTA;
        char warntype[MAXQUOTAS];
-@@ -1353,7 +1424,7 @@ out_sub:
+@@ -1353,7 +1424,7 @@
  /*
   * This operation can block, but only after everything is updated
   */
@@ -975677,7 +975534,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  {
        unsigned int cnt;
        char warntype[MAXQUOTAS];
-@@ -1499,7 +1570,7 @@ warn_put_all:
+@@ -1499,7 +1570,7 @@
  /* Wrapper for transferring ownership of an inode */
  int vfs_dq_transfer(struct inode *inode, struct iattr *iattr)
  {
@@ -975686,7 +975543,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                vfs_dq_init(inode);
                if (inode->i_sb->dq_op->transfer(inode, iattr) == NO_QUOTA)
                        return 1;
-@@ -1540,51 +1611,22 @@ struct dquot_operations dquot_operations
+@@ -1540,50 +1611,21 @@
        .write_info     = dquot_commit_info
  };
  
@@ -975735,18 +975592,17 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        int cnt, ret = 0;
        struct quota_info *dqopt = sb_dqopt(sb);
        struct inode *toputinode[MAXQUOTAS];
++
 +      /* Cannot turn off usage accounting without turning off limits, or
 +       * suspend quotas and simultaneously turn quotas off. */
 +      if ((flags & DQUOT_USAGE_ENABLED && !(flags & DQUOT_LIMITS_ENABLED))
 +          || (flags & DQUOT_SUSPENDED && flags & (DQUOT_LIMITS_ENABLED |
 +          DQUOT_USAGE_ENABLED)))
 +              return -EINVAL;
-+
        /* We need to serialize quota_off() for device */
        mutex_lock(&dqopt->dqonoff_mutex);
-@@ -1593,7 +1635,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1593,7 +1635,7 @@
         * sometimes we are called when fill_super() failed and calling
         * sync_fs() in such cases does no good.
         */
@@ -975755,7 +975611,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                mutex_unlock(&dqopt->dqonoff_mutex);
                return 0;
        }
-@@ -1601,17 +1643,28 @@ int vfs_quota_off(struct super_block *sb
+@@ -1601,17 +1643,28 @@
                toputinode[cnt] = NULL;
                if (type != -1 && cnt != type)
                        continue;
@@ -975792,7 +975648,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  
                /* Note: these are blocking operations */
                drop_dquot_ref(sb, cnt);
-@@ -1627,7 +1680,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1627,7 +1680,7 @@
                put_quota_format(dqopt->info[cnt].dqi_format);
  
                toputinode[cnt] = dqopt->files[cnt];
@@ -975801,7 +975657,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                        dqopt->files[cnt] = NULL;
                dqopt->info[cnt].dqi_flags = 0;
                dqopt->info[cnt].dqi_igrace = 0;
-@@ -1635,6 +1688,11 @@ int vfs_quota_off(struct super_block *sb
+@@ -1635,6 +1688,11 @@
                dqopt->ops[cnt] = NULL;
        }
        mutex_unlock(&dqopt->dqonoff_mutex);
@@ -975813,7 +975669,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        /* Sync the superblock so that buffers with quota data are written to
         * disk (and so userspace sees correct data afterwards). */
        if (sb->s_op->sync_fs)
-@@ -1650,7 +1708,7 @@ int vfs_quota_off(struct super_block *sb
+@@ -1650,7 +1708,7 @@
                        mutex_lock(&dqopt->dqonoff_mutex);
                        /* If quota was reenabled in the meantime, we have
                         * nothing to do */
@@ -975822,7 +975678,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                                mutex_lock_nested(&toputinode[cnt]->i_mutex, I_MUTEX_QUOTA);
                                toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
                                  S_NOATIME | S_NOQUOTA);
-@@ -1659,26 +1717,43 @@ int vfs_quota_off(struct super_block *sb
+@@ -1659,26 +1717,43 @@
                                mark_inode_dirty(toputinode[cnt]);
                        }
                        mutex_unlock(&dqopt->dqonoff_mutex);
@@ -975851,14 +975707,14 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
 -      if (sb->s_bdev)
 -              invalidate_bdev(sb->s_bdev);
        return ret;
- }
++}
++
 +int vfs_quota_off(struct super_block *sb, int type, int remount)
 +{
 +      return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED :
 +                               (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED));
-+}
-+
+ }
  /*
   *    Turn quotas on on a device
   */
@@ -975874,7 +975730,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  {
        struct quota_format_type *fmt = find_quota_format(format_id);
        struct super_block *sb = inode->i_sb;
-@@ -1700,27 +1775,37 @@ static int vfs_quota_on_inode(struct ino
+@@ -1700,27 +1775,37 @@
                error = -EINVAL;
                goto out_fmt;
        }
@@ -975927,7 +975783,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  
        error = -EIO;
        dqopt->files[type] = igrab(inode);
-@@ -1741,7 +1826,7 @@ static int vfs_quota_on_inode(struct ino
+@@ -1741,7 +1826,7 @@
        }
        mutex_unlock(&dqopt->dqio_mutex);
        mutex_unlock(&inode->i_mutex);
@@ -975936,7 +975792,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  
        add_dquot_ref(sb, type);
        mutex_unlock(&dqopt->dqonoff_mutex);
-@@ -1774,20 +1859,23 @@ static int vfs_quota_on_remount(struct s
+@@ -1774,20 +1859,23 @@
        struct quota_info *dqopt = sb_dqopt(sb);
        struct inode *inode;
        int ret;
@@ -975964,7 +975820,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        iput(inode);
  
        return ret;
-@@ -1803,12 +1891,12 @@ int vfs_quota_on_path(struct super_block
+@@ -1803,12 +1891,12 @@
        if (path->mnt->mnt_sb != sb)
                error = -EXDEV;
        else
@@ -975980,10 +975836,13 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path,
                 int remount)
  {
-@@ -1827,6 +1915,50 @@ int vfs_quota_on(struct super_block *sb,
- }
- /*
+@@ -1824,6 +1912,50 @@
+               path_put(&nd.path);
+       }
+       return error;
++}
++
++/*
 + * More powerful function for turning on quotas allowing setting
 + * of individual quota flags
 + */
@@ -976025,13 +975884,10 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
 +
 +load_quota:
 +      return vfs_load_quota_inode(inode, type, format_id, flags);
-+}
-+
-+/*
-  * This function is used when filesystem needs to initialize quotas
-  * during mount time.
-  */
-@@ -1847,7 +1979,8 @@ int vfs_quota_on_mount(struct super_bloc
+ }
+ /*
+@@ -1847,7 +1979,8 @@
  
        error = security_quota_on(dentry);
        if (!error)
@@ -976041,7 +975897,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  
  out:
        dput(dentry);
-@@ -1870,14 +2003,24 @@ int vfs_dq_quota_on_remount(struct super
+@@ -1870,14 +2003,24 @@
        return ret;
  }
  
@@ -976068,7 +975924,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        di->dqb_curspace = dm->dqb_curspace;
        di->dqb_ihardlimit = dm->dqb_ihardlimit;
        di->dqb_isoftlimit = dm->dqb_isoftlimit;
-@@ -1922,28 +2065,36 @@ static int do_set_dqblk(struct dquot *dq
+@@ -1922,28 +2065,36 @@
        if (di->dqb_valid & QIF_SPACE) {
                dm->dqb_curspace = di->dqb_curspace;
                check_blim = 1;
@@ -976110,7 +975966,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                        dm->dqb_btime = 0;
                        clear_bit(DQ_BLKS_B, &dquot->dq_flags);
                }
-@@ -1974,12 +2125,14 @@ int vfs_set_dqblk(struct super_block *sb
+@@ -1974,12 +2125,14 @@
        int rc;
  
        mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
@@ -976128,7 +975984,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
        return rc;
  }
-@@ -1990,7 +2143,7 @@ int vfs_get_dqinfo(struct super_block *s
+@@ -1990,7 +2143,7 @@
        struct mem_dqinfo *mi;
    
        mutex_lock(&sb_dqopt(sb)->dqonoff_mutex);
@@ -976137,7 +975993,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
                mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
                return -ESRCH;
        }
-@@ -2009,11 +2162,12 @@ int vfs_get_dqinfo(struct super_block *s
+@@ -2009,11 +2162,12 @@
  int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
  {
        struct mem_dqinfo *mi;
@@ -976153,7 +976009,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
        }
        mi = sb_dqopt(sb)->info + type;
        spin_lock(&dq_data_lock);
-@@ -2027,8 +2181,9 @@ int vfs_set_dqinfo(struct super_block *s
+@@ -2027,8 +2181,9 @@
        mark_info_dirty(sb, type);
        /* Force write to disk */
        sb->dq_op->write_info(sb, type);
@@ -976164,7 +976020,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  }
  
  struct quotactl_ops vfs_quotactl_ops = {
-@@ -2190,10 +2345,13 @@ EXPORT_SYMBOL(register_quota_format);
+@@ -2190,10 +2345,13 @@
  EXPORT_SYMBOL(unregister_quota_format);
  EXPORT_SYMBOL(dqstats);
  EXPORT_SYMBOL(dq_data_lock);
@@ -976178,7 +976034,7 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  EXPORT_SYMBOL(vfs_quota_sync);
  EXPORT_SYMBOL(vfs_get_dqinfo);
  EXPORT_SYMBOL(vfs_set_dqinfo);
-@@ -2206,7 +2364,11 @@ EXPORT_SYMBOL(dquot_release);
+@@ -2206,7 +2364,11 @@
  EXPORT_SYMBOL(dquot_mark_dquot_dirty);
  EXPORT_SYMBOL(dquot_initialize);
  EXPORT_SYMBOL(dquot_drop);
@@ -976190,10 +976046,10 @@ diff -purN linux-2.6.27/fs/dquot.c linux-2.6.27.19-5.1/fs/dquot.c
  EXPORT_SYMBOL(dquot_alloc_space);
  EXPORT_SYMBOL(dquot_alloc_inode);
  EXPORT_SYMBOL(dquot_free_space);
-diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inode.c
---- linux-2.6.27/fs/ecryptfs/inode.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ecryptfs/inode.c    2009-03-25 16:11:37.000000000 +0000
-@@ -403,19 +403,24 @@ static int ecryptfs_link(struct dentry *
+diff -r 9608d5473017 fs/ecryptfs/inode.c
+--- a/fs/ecryptfs/inode.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ecryptfs/inode.c      Wed May 06 16:56:47 2009 +0100
+@@ -403,19 +403,24 @@
                         struct dentry *new_dentry)
  {
        struct dentry *lower_old_dentry;
@@ -976220,7 +976076,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        if (rc || !lower_new_dentry->d_inode)
                goto out_lock;
        rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0);
-@@ -440,11 +445,12 @@ static int ecryptfs_unlink(struct inode 
+@@ -440,11 +445,12 @@
  {
        int rc = 0;
        struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
@@ -976234,7 +976090,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        if (rc) {
                printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
                goto out_unlock;
-@@ -464,6 +470,7 @@ static int ecryptfs_symlink(struct inode
+@@ -464,6 +470,7 @@
  {
        int rc;
        struct dentry *lower_dentry;
@@ -976242,7 +976098,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        struct dentry *lower_dir_dentry;
        char *encoded_symname;
        int encoded_symlen;
-@@ -471,6 +478,7 @@ static int ecryptfs_symlink(struct inode
+@@ -471,6 +478,7 @@
  
        lower_dentry = ecryptfs_dentry_to_lower(dentry);
        dget(lower_dentry);
@@ -976250,7 +976106,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        lower_dir_dentry = lock_parent(lower_dentry);
        encoded_symlen = ecryptfs_encode_filename(crypt_stat, symname,
                                                  strlen(symname),
-@@ -479,7 +487,7 @@ static int ecryptfs_symlink(struct inode
+@@ -479,7 +487,7 @@
                rc = encoded_symlen;
                goto out_lock;
        }
@@ -976259,7 +976115,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
                         encoded_symname);
        kfree(encoded_symname);
        if (rc || !lower_dentry->d_inode)
-@@ -501,11 +509,14 @@ static int ecryptfs_mkdir(struct inode *
+@@ -501,11 +509,14 @@
  {
        int rc;
        struct dentry *lower_dentry;
@@ -976275,7 +976131,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        if (rc || !lower_dentry->d_inode)
                goto out;
        rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -524,14 +535,16 @@ out:
+@@ -524,14 +535,16 @@
  static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
  {
        struct dentry *lower_dentry;
@@ -976293,7 +976149,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        dput(lower_dentry);
        if (!rc)
                d_delete(lower_dentry);
-@@ -549,11 +562,14 @@ ecryptfs_mknod(struct inode *dir, struct
+@@ -549,11 +562,14 @@
  {
        int rc;
        struct dentry *lower_dentry;
@@ -976309,7 +976165,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        if (rc || !lower_dentry->d_inode)
                goto out;
        rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-@@ -574,19 +590,24 @@ ecryptfs_rename(struct inode *old_dir, s
+@@ -574,19 +590,24 @@
  {
        int rc;
        struct dentry *lower_old_dentry;
@@ -976335,7 +976191,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        if (rc)
                goto out_lock;
        fsstack_copy_attr_all(new_dir, lower_new_dir_dentry->d_inode, NULL);
-@@ -673,10 +694,11 @@ static void *ecryptfs_follow_link(struct
+@@ -673,10 +694,11 @@
        ecryptfs_printk(KERN_DEBUG, "Calling readlink w/ "
                        "dentry->d_name.name = [%s]\n", dentry->d_name.name);
        rc = dentry->d_inode->i_op->readlink(dentry, (char __user *)buf, len);
@@ -976348,7 +976204,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        rc = 0;
        nd_set_link(nd, buf);
        goto out;
-@@ -849,6 +871,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -849,6 +871,7 @@
  {
        int rc = 0;
        struct dentry *lower_dentry;
@@ -976356,7 +976212,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        struct inode *inode;
        struct inode *lower_inode;
        struct ecryptfs_crypt_stat *crypt_stat;
-@@ -859,6 +882,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -859,6 +882,7 @@
        inode = dentry->d_inode;
        lower_inode = ecryptfs_inode_to_lower(inode);
        lower_dentry = ecryptfs_dentry_to_lower(dentry);
@@ -976364,7 +976220,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        mutex_lock(&crypt_stat->cs_mutex);
        if (S_ISDIR(dentry->d_inode->i_mode))
                crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
-@@ -910,7 +934,7 @@ static int ecryptfs_setattr(struct dentr
+@@ -910,7 +934,7 @@
                ia->ia_valid &= ~ATTR_MODE;
  
        mutex_lock(&lower_dentry->d_inode->i_mutex);
@@ -976373,10 +976229,10 @@ diff -purN linux-2.6.27/fs/ecryptfs/inode.c linux-2.6.27.19-5.1/fs/ecryptfs/inod
        mutex_unlock(&lower_dentry->d_inode->i_mutex);
  out:
        fsstack_copy_attr_all(inode, lower_inode, NULL);
-diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/keystore.c
---- linux-2.6.27/fs/ecryptfs/keystore.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ecryptfs/keystore.c 2009-03-25 16:11:37.000000000 +0000
-@@ -1037,17 +1037,14 @@ static int
+diff -r 9608d5473017 fs/ecryptfs/keystore.c
+--- a/fs/ecryptfs/keystore.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ecryptfs/keystore.c   Wed May 06 16:56:47 2009 +0100
+@@ -1037,16 +1037,13 @@
  decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
                                         struct ecryptfs_crypt_stat *crypt_stat)
  {
@@ -976389,14 +976245,13 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                .flags = CRYPTO_TFM_REQ_MAY_SLEEP
        };
        int rc = 0;
+-
 -      sg_init_table(&dst_sg, 1);
 -      sg_init_table(&src_sg, 1);
--
        if (unlikely(ecryptfs_verbosity > 0)) {
                ecryptfs_printk(
-                       KERN_DEBUG, "Session key encryption key (size [%d]):\n",
-@@ -1066,8 +1063,8 @@ decrypt_passphrase_encrypted_session_key
+@@ -1066,8 +1063,8 @@
        }
        rc = virt_to_scatterlist(auth_tok->session_key.encrypted_key,
                                 auth_tok->session_key.encrypted_key_size,
@@ -976407,7 +976262,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                printk(KERN_ERR "Internal error whilst attempting to convert "
                        "auth_tok->session_key.encrypted_key to scatterlist; "
                        "expected rc = 1; got rc = [%d]. "
-@@ -1079,8 +1076,8 @@ decrypt_passphrase_encrypted_session_key
+@@ -1079,8 +1076,8 @@
                auth_tok->session_key.encrypted_key_size;
        rc = virt_to_scatterlist(auth_tok->session_key.decrypted_key,
                                 auth_tok->session_key.decrypted_key_size,
@@ -976418,7 +976273,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                printk(KERN_ERR "Internal error whilst attempting to convert "
                        "auth_tok->session_key.decrypted_key to scatterlist; "
                        "expected rc = 1; got rc = [%d]\n", rc);
-@@ -1096,7 +1093,7 @@ decrypt_passphrase_encrypted_session_key
+@@ -1096,7 +1093,7 @@
                rc = -EINVAL;
                goto out;
        }
@@ -976427,7 +976282,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                                      auth_tok->session_key.encrypted_key_size);
        mutex_unlock(tfm_mutex);
        if (unlikely(rc)) {
-@@ -1541,8 +1538,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1541,8 +1538,8 @@
        size_t i;
        size_t encrypted_session_key_valid = 0;
        char session_key_encryption_key[ECRYPTFS_MAX_KEY_BYTES];
@@ -976438,7 +976293,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
        struct mutex *tfm_mutex = NULL;
        u8 cipher_code;
        size_t packet_size_length;
-@@ -1621,8 +1618,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1621,8 +1618,8 @@
                ecryptfs_dump_hex(session_key_encryption_key, 16);
        }
        rc = virt_to_scatterlist(crypt_stat->key, key_rec->enc_key_size,
@@ -976449,7 +976304,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
                                "for crypt_stat session key; expected rc = 1; "
                                "got rc = [%d]. key_rec->enc_key_size = [%d]\n",
-@@ -1631,8 +1628,8 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1631,8 +1628,8 @@
                goto out;
        }
        rc = virt_to_scatterlist(key_rec->enc_key, key_rec->enc_key_size,
@@ -976460,7 +976315,7 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                ecryptfs_printk(KERN_ERR, "Error generating scatterlist "
                                "for crypt_stat encrypted session key; "
                                "expected rc = 1; got rc = [%d]. "
-@@ -1653,7 +1650,7 @@ write_tag_3_packet(char *dest, size_t *r
+@@ -1653,7 +1650,7 @@
        rc = 0;
        ecryptfs_printk(KERN_DEBUG, "Encrypting [%d] bytes of the key\n",
                        crypt_stat->key_size);
@@ -976469,10 +976324,10 @@ diff -purN linux-2.6.27/fs/ecryptfs/keystore.c linux-2.6.27.19-5.1/fs/ecryptfs/k
                                      (*key_rec).enc_key_size);
        mutex_unlock(tfm_mutex);
        if (rc) {
-diff -purN linux-2.6.27/fs/eventfd.c linux-2.6.27.19-5.1/fs/eventfd.c
---- linux-2.6.27/fs/eventfd.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/eventfd.c   2009-03-25 16:11:39.000000000 +0000
-@@ -198,7 +198,7 @@ struct file *eventfd_fget(int fd)
+diff -r 9608d5473017 fs/eventfd.c
+--- a/fs/eventfd.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/eventfd.c     Wed May 06 16:56:47 2009 +0100
+@@ -198,7 +198,7 @@
        return file;
  }
  
@@ -976481,7 +976336,7 @@ diff -purN linux-2.6.27/fs/eventfd.c linux-2.6.27.19-5.1/fs/eventfd.c
  {
        int fd;
        struct eventfd_ctx *ctx;
-@@ -228,8 +228,7 @@ asmlinkage long sys_eventfd2(unsigned in
+@@ -228,8 +228,7 @@
        return fd;
  }
  
@@ -976491,9 +976346,9 @@ diff -purN linux-2.6.27/fs/eventfd.c linux-2.6.27.19-5.1/fs/eventfd.c
        return sys_eventfd2(count, 0);
  }
 -
-diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
---- linux-2.6.27/fs/eventpoll.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/eventpoll.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/eventpoll.c
+--- a/fs/eventpoll.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/eventpoll.c   Wed May 06 16:56:47 2009 +0100
 @@ -102,6 +102,8 @@
  
  #define EP_UNACTIVE_PTR ((void *) -1L)
@@ -976503,7 +976358,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  struct epoll_filefd {
        struct file *file;
        int fd;
-@@ -200,6 +202,9 @@ struct eventpoll {
+@@ -200,6 +202,9 @@
         * holding ->lock.
         */
        struct epitem *ovflist;
@@ -976513,7 +976368,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  };
  
  /* Wait structure used by the poll hooks */
-@@ -227,9 +232,15 @@ struct ep_pqueue {
+@@ -227,9 +232,15 @@
  };
  
  /*
@@ -976530,10 +976385,11 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  
  /* Safe wake up implementation */
  static struct poll_safewake psw;
-@@ -240,6 +251,25 @@ static struct kmem_cache *epi_cache __re
+@@ -239,6 +250,25 @@
  /* Slab cache used to allocate "struct eppoll_entry" */
  static struct kmem_cache *pwq_cache __read_mostly;
++
 +#ifdef CONFIG_SYSCTL
 +
 +#include <linux/sysctl.h>
@@ -976552,11 +976408,10 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
 +      { .ctl_name = 0 }
 +};
 +#endif /* CONFIG_SYSCTL */
-+
  
  /* Setup the structure that is used as key for the RB tree */
- static inline void ep_set_ffd(struct epoll_filefd *ffd,
-@@ -402,6 +432,8 @@ static int ep_remove(struct eventpoll *e
+@@ -402,6 +432,8 @@
        /* At this point it is safe to free the eventpoll item */
        kmem_cache_free(epi_cache, epi);
  
@@ -976565,7 +976420,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_remove(%p, %p)\n",
                     current, ep, file));
  
-@@ -449,6 +481,7 @@ static void ep_free(struct eventpoll *ep
+@@ -449,6 +481,7 @@
  
        mutex_unlock(&epmutex);
        mutex_destroy(&ep->mtx);
@@ -976573,7 +976428,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
        kfree(ep);
  }
  
-@@ -532,10 +565,15 @@ void eventpoll_release_file(struct file 
+@@ -532,10 +565,15 @@
  
  static int ep_alloc(struct eventpoll **pep)
  {
@@ -976592,7 +976447,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  
        spin_lock_init(&ep->lock);
        mutex_init(&ep->mtx);
-@@ -544,12 +582,17 @@ static int ep_alloc(struct eventpoll **p
+@@ -544,12 +582,17 @@
        INIT_LIST_HEAD(&ep->rdllist);
        ep->rbr = RB_ROOT;
        ep->ovflist = EP_UNACTIVE_PTR;
@@ -976610,7 +976465,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  }
  
  /*
-@@ -703,9 +746,11 @@ static int ep_insert(struct eventpoll *e
+@@ -703,9 +746,11 @@
        struct epitem *epi;
        struct ep_pqueue epq;
  
@@ -976624,7 +976479,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  
        /* Item initialization follow here ... */
        INIT_LIST_HEAD(&epi->rdllink);
-@@ -735,6 +780,7 @@ static int ep_insert(struct eventpoll *e
+@@ -735,6 +780,7 @@
         * install process. Namely an allocation for a wait queue failed due
         * high memory pressure.
         */
@@ -976632,7 +976487,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
        if (epi->nwait < 0)
                goto error_unregister;
  
-@@ -765,6 +811,8 @@ static int ep_insert(struct eventpoll *e
+@@ -765,6 +811,8 @@
  
        spin_unlock_irqrestore(&ep->lock, flags);
  
@@ -976641,7 +976496,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
        /* We have to call this outside the lock */
        if (pwake)
                ep_poll_safewake(&psw, &ep->poll_wait);
-@@ -789,7 +837,7 @@ error_unregister:
+@@ -789,7 +837,7 @@
        spin_unlock_irqrestore(&ep->lock, flags);
  
        kmem_cache_free(epi_cache, epi);
@@ -976650,7 +976505,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
        return error;
  }
  
-@@ -1043,7 +1091,7 @@ retry:
+@@ -1043,7 +1091,7 @@
  /*
   * Open an eventpoll file descriptor.
   */
@@ -976659,7 +976514,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  {
        int error, fd = -1;
        struct eventpoll *ep;
-@@ -1082,7 +1130,7 @@ error_return:
+@@ -1082,7 +1130,7 @@
        return fd;
  }
  
@@ -976668,7 +976523,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  {
        if (size < 0)
                return -EINVAL;
-@@ -1095,8 +1143,8 @@ asmlinkage long sys_epoll_create(int siz
+@@ -1095,8 +1143,8 @@
   * the eventpoll file that enables the insertion/removal/change of
   * file descriptors inside the interest set.
   */
@@ -976679,7 +976534,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  {
        int error;
        struct file *file, *tfile;
-@@ -1193,8 +1241,8 @@ error_return:
+@@ -1193,8 +1241,8 @@
   * Implement the event wait interface for the eventpoll file. It is the kernel
   * part of the user space epoll_wait(2).
   */
@@ -976690,7 +976545,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  {
        int error;
        struct file *file;
-@@ -1251,9 +1299,9 @@ error_return:
+@@ -1251,9 +1299,9 @@
   * Implement the event wait interface for the eventpoll file. It is the kernel
   * part of the user space epoll_pwait(2).
   */
@@ -976703,7 +976558,7 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  {
        int error;
        sigset_t ksigmask, sigsaved;
-@@ -1295,7 +1343,14 @@ asmlinkage long sys_epoll_pwait(int epfd
+@@ -1295,7 +1343,14 @@
  
  static int __init eventpoll_init(void)
  {
@@ -976719,9 +976574,9 @@ diff -purN linux-2.6.27/fs/eventpoll.c linux-2.6.27.19-5.1/fs/eventpoll.c
  
        /* Initialize the structure used to perform safe poll wait head wake ups */
        ep_poll_safewake_init(&psw);
-diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
---- linux-2.6.27/fs/exec.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/exec.c      2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/exec.c
+--- a/fs/exec.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/exec.c        Wed May 06 16:56:47 2009 +0100
 @@ -50,6 +50,7 @@
  #include <linux/cn_proc.h>
  #include <linux/audit.h>
@@ -976730,7 +976585,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
  
  #include <asm/uaccess.h>
  #include <asm/mmu_context.h>
-@@ -105,7 +106,7 @@ static inline void put_binfmt(struct lin
+@@ -105,7 +106,7 @@
   *
   * Also note that we take the address to load from from the file itself.
   */
@@ -976739,7 +976594,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
  {
        struct file *file;
        struct nameidata nd;
-@@ -690,6 +691,14 @@ struct file *open_exec(const char *name)
+@@ -690,6 +691,14 @@
        if (IS_ERR(file))
                return file;
  
@@ -976754,7 +976609,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
        err = deny_write_access(file);
        if (err) {
                fput(file);
-@@ -1164,6 +1173,7 @@ EXPORT_SYMBOL(remove_arg_zero);
+@@ -1164,6 +1173,7 @@
   */
  int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
  {
@@ -976762,7 +976617,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
        int try,retval;
        struct linux_binfmt *fmt;
  #ifdef __alpha__
-@@ -1224,8 +1234,15 @@ int search_binary_handler(struct linux_b
+@@ -1224,8 +1234,15 @@
                                continue;
                        read_unlock(&binfmt_lock);
                        retval = fn(bprm, regs);
@@ -976779,7 +976634,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
                                put_binfmt(fmt);
                                allow_write_access(bprm->file);
                                if (bprm->file)
-@@ -1339,6 +1356,7 @@ int do_execve(char * filename,
+@@ -1339,6 +1356,7 @@
        current->flags &= ~PF_KTHREAD;
        retval = search_binary_handler(bprm,regs);
        if (retval >= 0) {
@@ -976787,7 +976642,7 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
                /* execve success */
                security_bprm_free(bprm);
                acct_update_integrals(current);
-@@ -1827,7 +1845,8 @@ int do_coredump(long signr, int exit_cod
+@@ -1827,7 +1845,8 @@
                goto close_fail;
        if (!file->f_op->write)
                goto close_fail;
@@ -976797,10 +976652,10 @@ diff -purN linux-2.6.27/fs/exec.c linux-2.6.27.19-5.1/fs/exec.c
                goto close_fail;
  
        retval = binfmt->core_dump(signr, regs, file, core_limit);
-diff -purN linux-2.6.27/fs/ext2/balloc.c linux-2.6.27.19-5.1/fs/ext2/balloc.c
---- linux-2.6.27/fs/ext2/balloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/balloc.c       2009-03-25 16:11:39.000000000 +0000
-@@ -1295,6 +1295,7 @@ retry_alloc:
+diff -r 9608d5473017 fs/ext2/balloc.c
+--- a/fs/ext2/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/balloc.c Wed May 06 16:56:47 2009 +0100
+@@ -1295,6 +1295,7 @@
         * turn off reservation for this allocation
         */
        if (my_rsv && (free_blocks < windowsz)
@@ -976808,7 +976663,7 @@ diff -purN linux-2.6.27/fs/ext2/balloc.c linux-2.6.27.19-5.1/fs/ext2/balloc.c
                && (rsv_is_empty(&my_rsv->rsv_window)))
                my_rsv = NULL;
  
-@@ -1332,7 +1333,7 @@ retry_alloc:
+@@ -1332,7 +1333,7 @@
                 * free blocks is less than half of the reservation
                 * window size.
                 */
@@ -976817,10 +976672,10 @@ diff -purN linux-2.6.27/fs/ext2/balloc.c linux-2.6.27.19-5.1/fs/ext2/balloc.c
                        continue;
  
                brelse(bitmap_bh);
-diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
---- linux-2.6.27/fs/ext2/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/dir.c  2009-03-25 16:11:39.000000000 +0000
-@@ -103,7 +103,7 @@ static int ext2_commit_chunk(struct page
+diff -r 9608d5473017 fs/ext2/dir.c
+--- a/fs/ext2/dir.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/dir.c    Wed May 06 16:56:47 2009 +0100
+@@ -103,7 +103,7 @@
        return err;
  }
  
@@ -976829,7 +976684,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
  {
        struct inode *dir = page->mapping->host;
        struct super_block *sb = dir->i_sb;
-@@ -146,10 +146,10 @@ out:
+@@ -146,10 +146,10 @@
        /* Too bad, we had an error */
  
  Ebadsize:
@@ -976844,7 +976699,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
        goto fail;
  Eshort:
        error = "rec_len is smaller than minimal";
-@@ -166,32 +166,36 @@ Espan:
+@@ -166,32 +166,36 @@
  Einumber:
        error = "inode out of bounds";
  bad_entry:
@@ -976894,7 +976749,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
                if (PageError(page))
                        goto fail;
        }
-@@ -292,7 +296,7 @@ ext2_readdir (struct file * filp, void *
+@@ -292,7 +296,7 @@
        for ( ; n < npages; n++, offset = 0) {
                char *kaddr, *limit;
                ext2_dirent *de;
@@ -976903,7 +976758,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
  
                if (IS_ERR(page)) {
                        ext2_error(sb, __func__,
-@@ -361,6 +365,7 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -361,6 +365,7 @@
        struct page *page = NULL;
        struct ext2_inode_info *ei = EXT2_I(dir);
        ext2_dirent * de;
@@ -976911,7 +976766,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
  
        if (npages == 0)
                goto out;
-@@ -374,7 +379,7 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -374,7 +379,7 @@
        n = start;
        do {
                char *kaddr;
@@ -976920,7 +976775,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
                if (!IS_ERR(page)) {
                        kaddr = page_address(page);
                        de = (ext2_dirent *) kaddr;
-@@ -391,7 +396,9 @@ struct ext2_dir_entry_2 * ext2_find_entr
+@@ -391,7 +396,9 @@
                                de = ext2_next_entry(de);
                        }
                        ext2_put_page(page);
@@ -976931,7 +976786,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
                if (++n >= npages)
                        n = 0;
                /* next page is past the blocks we've got */
-@@ -414,7 +421,7 @@ found:
+@@ -414,7 +421,7 @@
  
  struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p)
  {
@@ -976940,7 +976795,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
        ext2_dirent *de = NULL;
  
        if (!IS_ERR(page)) {
-@@ -487,7 +494,7 @@ int ext2_add_link (struct dentry *dentry
+@@ -487,7 +494,7 @@
        for (n = 0; n <= npages; n++) {
                char *dir_end;
  
@@ -976949,7 +976804,7 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
                err = PTR_ERR(page);
                if (IS_ERR(page))
                        goto out;
-@@ -655,14 +662,17 @@ int ext2_empty_dir (struct inode * inode
+@@ -655,14 +662,17 @@
  {
        struct page *page = NULL;
        unsigned long i, npages = dir_pages(inode);
@@ -976969,9 +976824,9 @@ diff -purN linux-2.6.27/fs/ext2/dir.c linux-2.6.27.19-5.1/fs/ext2/dir.c
  
                kaddr = page_address(page);
                de = (ext2_dirent *)kaddr;
-diff -purN linux-2.6.27/fs/ext2/fsync.c linux-2.6.27.19-5.1/fs/ext2/fsync.c
---- linux-2.6.27/fs/ext2/fsync.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/fsync.c        2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/ext2/fsync.c
+--- a/fs/ext2/fsync.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/fsync.c  Wed May 06 16:56:47 2009 +0100
 @@ -24,6 +24,7 @@
  
  #include "ext2.h"
@@ -977007,10 +976862,10 @@ diff -purN linux-2.6.27/fs/ext2/fsync.c linux-2.6.27.19-5.1/fs/ext2/fsync.c
        if (!(inode->i_state & I_DIRTY))
                return ret;
        if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
-diff -purN linux-2.6.27/fs/ext2/super.c linux-2.6.27.19-5.1/fs/ext2/super.c
---- linux-2.6.27/fs/ext2/super.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext2/super.c        2009-03-25 16:11:39.000000000 +0000
-@@ -1177,9 +1177,12 @@ static int ext2_remount (struct super_bl
+diff -r 9608d5473017 fs/ext2/super.c
+--- a/fs/ext2/super.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext2/super.c  Wed May 06 16:56:47 2009 +0100
+@@ -1177,9 +1177,12 @@
        es = sbi->s_es;
        if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) !=
            (old_mount_opt & EXT2_MOUNT_XIP)) &&
@@ -977026,18 +976881,18 @@ diff -purN linux-2.6.27/fs/ext2/super.c linux-2.6.27.19-5.1/fs/ext2/super.c
        if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
                return 0;
        if (*flags & MS_RDONLY) {
-diff -purN linux-2.6.27/fs/ext3/Makefile linux-2.6.27.19-5.1/fs/ext3/Makefile
---- linux-2.6.27/fs/ext3/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/Makefile       2009-03-25 16:11:35.000000000 +0000
-@@ -10,3 +10,4 @@ ext3-y       := balloc.o bitmap.o dir.o file.o
+diff -r 9608d5473017 fs/ext3/Makefile
+--- a/fs/ext3/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/Makefile Wed May 06 16:56:47 2009 +0100
+@@ -10,3 +10,4 @@
  ext3-$(CONFIG_EXT3_FS_XATTR)   += xattr.o xattr_user.o xattr_trusted.o
  ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
  ext3-$(CONFIG_EXT3_FS_SECURITY)        += xattr_security.o
 +ext3-$(CONFIG_EXT3_FS_NFS4ACL)         += nfs4acl.o
-diff -purN linux-2.6.27/fs/ext3/acl.c linux-2.6.27.19-5.1/fs/ext3/acl.c
---- linux-2.6.27/fs/ext3/acl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/acl.c  2009-03-25 16:11:35.000000000 +0000
-@@ -282,7 +282,7 @@ ext3_set_acl(handle_t *handle, struct in
+diff -r 9608d5473017 fs/ext3/acl.c
+--- a/fs/ext3/acl.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/acl.c    Wed May 06 16:56:47 2009 +0100
+@@ -282,7 +282,7 @@
        return error;
  }
  
@@ -977046,23 +976901,23 @@ diff -purN linux-2.6.27/fs/ext3/acl.c linux-2.6.27.19-5.1/fs/ext3/acl.c
  ext3_check_acl(struct inode *inode, int mask)
  {
        struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
-@@ -298,12 +298,6 @@ ext3_check_acl(struct inode *inode, int 
-       return -EAGAIN;
- }
+@@ -296,12 +296,6 @@
+       }
  
+       return -EAGAIN;
+-}
+-
 -int
 -ext3_permission(struct inode *inode, int mask)
 -{
 -      return generic_permission(inode, mask, ext3_check_acl);
--}
--
+ }
  /*
-  * Initialize the ACLs of a new inode. Called from ext3_new_inode.
-  *
-diff -purN linux-2.6.27/fs/ext3/acl.h linux-2.6.27.19-5.1/fs/ext3/acl.h
---- linux-2.6.27/fs/ext3/acl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/acl.h  2009-03-25 16:11:35.000000000 +0000
-@@ -58,13 +58,13 @@ static inline int ext3_acl_count(size_t 
+diff -r 9608d5473017 fs/ext3/acl.h
+--- a/fs/ext3/acl.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/acl.h    Wed May 06 16:56:47 2009 +0100
+@@ -58,13 +58,13 @@
  #define EXT3_ACL_NOT_CACHED ((void *)-1)
  
  /* acl.c */
@@ -977078,10 +976933,10 @@ diff -purN linux-2.6.27/fs/ext3/acl.h linux-2.6.27.19-5.1/fs/ext3/acl.h
  
  static inline int
  ext3_acl_chmod(struct inode *inode)
-diff -purN linux-2.6.27/fs/ext3/balloc.c linux-2.6.27.19-5.1/fs/ext3/balloc.c
---- linux-2.6.27/fs/ext3/balloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/balloc.c       2009-03-25 16:11:35.000000000 +0000
-@@ -1547,6 +1547,7 @@ retry_alloc:
+diff -r 9608d5473017 fs/ext3/balloc.c
+--- a/fs/ext3/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/balloc.c Wed May 06 16:56:47 2009 +0100
+@@ -1547,6 +1547,7 @@
         * turn off reservation for this allocation
         */
        if (my_rsv && (free_blocks < windowsz)
@@ -977089,7 +976944,7 @@ diff -purN linux-2.6.27/fs/ext3/balloc.c linux-2.6.27.19-5.1/fs/ext3/balloc.c
                && (rsv_is_empty(&my_rsv->rsv_window)))
                my_rsv = NULL;
  
-@@ -1585,7 +1586,7 @@ retry_alloc:
+@@ -1585,7 +1586,7 @@
                 * free blocks is less than half of the reservation
                 * window size.
                 */
@@ -977098,10 +976953,10 @@ diff -purN linux-2.6.27/fs/ext3/balloc.c linux-2.6.27.19-5.1/fs/ext3/balloc.c
                        continue;
  
                brelse(bitmap_bh);
-diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
---- linux-2.6.27/fs/ext3/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/dir.c  2009-03-25 16:11:32.000000000 +0000
-@@ -102,6 +102,7 @@ static int ext3_readdir(struct file * fi
+diff -r 9608d5473017 fs/ext3/dir.c
+--- a/fs/ext3/dir.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/dir.c    Wed May 06 16:56:47 2009 +0100
+@@ -102,6 +102,7 @@
        int err;
        struct inode *inode = filp->f_path.dentry->d_inode;
        int ret = 0;
@@ -977109,7 +976964,7 @@ diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
  
        sb = inode->i_sb;
  
-@@ -148,9 +149,12 @@ static int ext3_readdir(struct file * fi
+@@ -148,9 +149,12 @@
                 * of recovering data when there's a bad sector
                 */
                if (!bh) {
@@ -977125,7 +976980,7 @@ diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
                        /* corrupt size?  Maybe no more blocks to read */
                        if (filp->f_pos > inode->i_blocks << 9)
                                break;
-@@ -410,7 +414,7 @@ static int call_filldir(struct file * fi
+@@ -410,7 +414,7 @@
                                get_dtype(sb, fname->file_type));
                if (error) {
                        filp->f_pos = curr_pos;
@@ -977134,7 +976989,7 @@ diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
                        return error;
                }
                fname = fname->next;
-@@ -449,11 +453,12 @@ static int ext3_dx_readdir(struct file *
+@@ -449,11 +453,12 @@
         * If there are any leftover names on the hash collision
         * chain, return them first.
         */
@@ -977152,7 +977007,7 @@ diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
                info->curr_node = rb_first(&info->root);
  
        while (1) {
-@@ -484,9 +489,14 @@ static int ext3_dx_readdir(struct file *
+@@ -484,9 +489,14 @@
                info->curr_minor_hash = fname->minor_hash;
                if (call_filldir(filp, dirent, filldir, fname))
                        break;
@@ -977169,9 +977024,9 @@ diff -purN linux-2.6.27/fs/ext3/dir.c linux-2.6.27.19-5.1/fs/ext3/dir.c
                        if (info->next_hash == ~0) {
                                filp->f_pos = EXT3_HTREE_EOF;
                                break;
-diff -purN linux-2.6.27/fs/ext3/file.c linux-2.6.27.19-5.1/fs/ext3/file.c
---- linux-2.6.27/fs/ext3/file.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/file.c 2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/file.c
+--- a/fs/ext3/file.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/file.c   Wed May 06 16:56:47 2009 +0100
 @@ -23,8 +23,10 @@
  #include <linux/jbd.h>
  #include <linux/ext3_fs.h>
@@ -977183,7 +977038,7 @@ diff -purN linux-2.6.27/fs/ext3/file.c linux-2.6.27.19-5.1/fs/ext3/file.c
  
  /*
   * Called when an inode is released. Note that this is different
-@@ -134,5 +136,7 @@ const struct inode_operations ext3_file_
+@@ -134,5 +136,7 @@
        .removexattr    = generic_removexattr,
  #endif
        .permission     = ext3_permission,
@@ -977191,9 +977046,9 @@ diff -purN linux-2.6.27/fs/ext3/file.c linux-2.6.27.19-5.1/fs/ext3/file.c
 +      .may_delete     = ext3_may_delete,
  };
  
-diff -purN linux-2.6.27/fs/ext3/fsync.c linux-2.6.27.19-5.1/fs/ext3/fsync.c
---- linux-2.6.27/fs/ext3/fsync.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/fsync.c        2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/fsync.c
+--- a/fs/ext3/fsync.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/fsync.c  Wed May 06 16:56:47 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/sched.h>
  #include <linux/writeback.h>
@@ -977202,7 +977057,7 @@ diff -purN linux-2.6.27/fs/ext3/fsync.c linux-2.6.27.19-5.1/fs/ext3/fsync.c
  #include <linux/ext3_fs.h>
  #include <linux/ext3_jbd.h>
  
-@@ -84,7 +85,10 @@ int ext3_sync_file(struct file * file, s
+@@ -84,7 +85,10 @@
                        .sync_mode = WB_SYNC_ALL,
                        .nr_to_write = 0, /* sys_fsync did this */
                };
@@ -977213,9 +977068,9 @@ diff -purN linux-2.6.27/fs/ext3/fsync.c linux-2.6.27.19-5.1/fs/ext3/fsync.c
        }
  out:
        return ret;
-diff -purN linux-2.6.27/fs/ext3/ialloc.c linux-2.6.27.19-5.1/fs/ext3/ialloc.c
---- linux-2.6.27/fs/ext3/ialloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/ialloc.c       2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/ialloc.c
+--- a/fs/ext3/ialloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/ialloc.c Wed May 06 16:56:47 2009 +0100
 @@ -28,6 +28,7 @@
  
  #include "xattr.h"
@@ -977224,7 +977079,7 @@ diff -purN linux-2.6.27/fs/ext3/ialloc.c linux-2.6.27.19-5.1/fs/ext3/ialloc.c
  
  /*
   * ialloc.c contains the inodes allocation and deallocation routines
-@@ -595,7 +596,10 @@ got:
+@@ -595,7 +596,10 @@
                goto fail_drop;
        }
  
@@ -977236,9 +977091,9 @@ diff -purN linux-2.6.27/fs/ext3/ialloc.c linux-2.6.27.19-5.1/fs/ext3/ialloc.c
        if (err)
                goto fail_free_drop;
  
-diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
---- linux-2.6.27/fs/ext3/inode.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/inode.c        2009-03-25 16:11:33.000000000 +0000
+diff -r 9608d5473017 fs/ext3/inode.c
+--- a/fs/ext3/inode.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/inode.c  Wed May 06 16:56:47 2009 +0100
 @@ -38,6 +38,7 @@
  #include <linux/bio.h>
  #include "xattr.h"
@@ -977247,7 +977102,7 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
  
  static int ext3_writepage_trans_blocks(struct inode *inode);
  
-@@ -1152,7 +1153,7 @@ static int ext3_write_begin(struct file 
+@@ -1152,7 +1153,7 @@
        to = from + len;
  
  retry:
@@ -977256,7 +977111,7 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
        if (!page)
                return -ENOMEM;
        *pagep = page;
-@@ -2699,6 +2700,9 @@ struct inode *ext3_iget(struct super_blo
+@@ -2699,6 +2700,9 @@
        ei->i_acl = EXT3_ACL_NOT_CACHED;
        ei->i_default_acl = EXT3_ACL_NOT_CACHED;
  #endif
@@ -977266,7 +977121,7 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
        ei->i_block_alloc_info = NULL;
  
        ret = __ext3_get_inode_loc(inode, &iloc, 0);
-@@ -2998,6 +3002,65 @@ int ext3_write_inode(struct inode *inode
+@@ -2998,6 +3002,65 @@
        return ext3_force_commit(inode->i_sb);
  }
  
@@ -977332,7 +977187,7 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
  /*
   * ext3_setattr()
   *
-@@ -3021,7 +3084,7 @@ int ext3_setattr(struct dentry *dentry, 
+@@ -3021,7 +3084,7 @@
        int error, rc = 0;
        const unsigned int ia_valid = attr->ia_valid;
  
@@ -977341,7 +977196,7 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
        if (error)
                return error;
  
-@@ -3078,8 +3141,12 @@ int ext3_setattr(struct dentry *dentry, 
+@@ -3078,8 +3141,12 @@
        if (inode->i_nlink)
                ext3_orphan_del(NULL, inode);
  
@@ -977356,9 +977211,9 @@ diff -purN linux-2.6.27/fs/ext3/inode.c linux-2.6.27.19-5.1/fs/ext3/inode.c
  
  err_out:
        ext3_std_error(inode->i_sb, error);
-diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
---- linux-2.6.27/fs/ext3/namei.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/namei.c        2009-03-25 16:11:34.000000000 +0000
+diff -r 9608d5473017 fs/ext3/namei.c
+--- a/fs/ext3/namei.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/namei.c  Wed May 06 16:56:47 2009 +0100
 @@ -40,6 +40,7 @@
  #include "namei.h"
  #include "xattr.h"
@@ -977367,7 +977222,7 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
  
  /*
   * define how far ahead to read directories while searching them.
-@@ -1374,7 +1375,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1374,7 +1375,7 @@
        struct fake_dirent *fde;
  
        blocksize =  dir->i_sb->s_blocksize;
@@ -977376,10 +977231,11 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
        retval = ext3_journal_get_write_access(handle, bh);
        if (retval) {
                ext3_std_error(dir->i_sb, retval);
-@@ -1383,6 +1384,19 @@ static int make_indexed_dir(handle_t *ha
+@@ -1382,6 +1383,19 @@
+               return retval;
        }
        root = (struct dx_root *) bh->b_data;
++
 +      /* The 0th block becomes the root, move the dirents out */
 +      fde = &root->dotdot;
 +      de = (struct ext3_dir_entry_2 *)((char *)fde +
@@ -977392,11 +977248,10 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
 +              return -EIO;
 +      }
 +      len = ((char *) root) + blocksize - (char *) de;
-+
        bh2 = ext3_append (handle, dir, &block, &retval);
        if (!(bh2)) {
-               brelse(bh);
-@@ -1391,11 +1405,6 @@ static int make_indexed_dir(handle_t *ha
+@@ -1391,11 +1405,6 @@
        EXT3_I(dir)->i_flags |= EXT3_INDEX_FL;
        data1 = bh2->b_data;
  
@@ -977408,7 +977263,7 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
        memcpy (data1, de, len);
        de = (struct ext3_dir_entry_2 *) data1;
        top = data1 + len;
-@@ -2187,8 +2196,7 @@ retry:
+@@ -2187,8 +2196,7 @@
                 * We have a transaction open.  All is sweetness.  It also sets
                 * i_size in generic_commit_write().
                 */
@@ -977418,7 +977273,7 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
                if (err) {
                        drop_nlink(inode);
                        ext3_mark_inode_dirty(handle, inode);
-@@ -2405,6 +2413,16 @@ end_rename:
+@@ -2405,6 +2413,16 @@
        return retval;
  }
  
@@ -977435,7 +977290,7 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
  /*
   * directories can handle most operations...
   */
-@@ -2426,6 +2444,8 @@ const struct inode_operations ext3_dir_i
+@@ -2426,6 +2444,8 @@
        .removexattr    = generic_removexattr,
  #endif
        .permission     = ext3_permission,
@@ -977444,25 +977299,25 @@ diff -purN linux-2.6.27/fs/ext3/namei.c linux-2.6.27.19-5.1/fs/ext3/namei.c
  };
  
  const struct inode_operations ext3_special_inode_operations = {
-@@ -2437,4 +2457,6 @@ const struct inode_operations ext3_speci
+@@ -2437,4 +2457,6 @@
        .removexattr    = generic_removexattr,
  #endif
        .permission     = ext3_permission,
 +      .may_create     = ext3_may_create,
 +      .may_delete     = ext3_may_delete,
  };
-diff -purN linux-2.6.27/fs/ext3/namei.h linux-2.6.27.19-5.1/fs/ext3/namei.h
---- linux-2.6.27/fs/ext3/namei.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/namei.h        2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/namei.h
+--- a/fs/ext3/namei.h  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/namei.h  Wed May 06 16:56:47 2009 +0100
 @@ -5,4 +5,5 @@
   *
  */
  
 +extern int ext3_permission (struct inode *, int);
  extern struct dentry *ext3_get_parent(struct dentry *child);
-diff -purN linux-2.6.27/fs/ext3/nfs4acl.c linux-2.6.27.19-5.1/fs/ext3/nfs4acl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/nfs4acl.c      2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/ext3/nfs4acl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ext3/nfs4acl.c        Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,370 @@
 +/*
 + * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
@@ -977834,9 +977689,9 @@ diff -purN linux-2.6.27/fs/ext3/nfs4acl.c linux-2.6.27.19-5.1/fs/ext3/nfs4acl.c
 +      .set    = ext3_xattr_set_nfs4acl,
 +};
 +#endif
-diff -purN linux-2.6.27/fs/ext3/nfs4acl.h linux-2.6.27.19-5.1/fs/ext3/nfs4acl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/nfs4acl.h      2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 fs/ext3/nfs4acl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ext3/nfs4acl.h        Wed May 06 16:56:47 2009 +0100
 @@ -0,0 +1,36 @@
 +#ifndef __FS_EXT3_NFS4ACL_H
 +#define __FS_EXT3_NFS4ACL_H
@@ -977874,10 +977729,10 @@ diff -purN linux-2.6.27/fs/ext3/nfs4acl.h linux-2.6.27.19-5.1/fs/ext3/nfs4acl.h
 +#endif  /* CONFIG_FS_EXT3_NFS4ACL */
 +
 +#endif  /* __FS_EXT3_NFS4ACL_H */
-diff -purN linux-2.6.27/fs/ext3/resize.c linux-2.6.27.19-5.1/fs/ext3/resize.c
---- linux-2.6.27/fs/ext3/resize.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/resize.c       2009-03-25 16:11:32.000000000 +0000
-@@ -790,7 +790,8 @@ int ext3_group_add(struct super_block *s
+diff -r 9608d5473017 fs/ext3/resize.c
+--- a/fs/ext3/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/resize.c Wed May 06 16:56:47 2009 +0100
+@@ -790,7 +790,8 @@
  
        if (reserved_gdb || gdb_off == 0) {
                if (!EXT3_HAS_COMPAT_FEATURE(sb,
@@ -977887,9 +977742,9 @@ diff -purN linux-2.6.27/fs/ext3/resize.c linux-2.6.27.19-5.1/fs/ext3/resize.c
                        ext3_warning(sb, __func__,
                                     "No reserved GDT blocks, can't resize");
                        return -EPERM;
-diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
---- linux-2.6.27/fs/ext3/super.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/super.c        2009-03-25 16:11:34.000000000 +0000
+diff -r 9608d5473017 fs/ext3/super.c
+--- a/fs/ext3/super.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/super.c  Wed May 06 16:56:47 2009 +0100
 @@ -36,12 +36,14 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
@@ -977905,7 +977760,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
  #include "namei.h"
  
  static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
-@@ -454,6 +456,9 @@ static struct inode *ext3_alloc_inode(st
+@@ -454,6 +456,9 @@
        ei->i_acl = EXT3_ACL_NOT_CACHED;
        ei->i_default_acl = EXT3_ACL_NOT_CACHED;
  #endif
@@ -977915,21 +977770,21 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
        ei->i_block_alloc_info = NULL;
        ei->vfs_inode.i_version = 1;
        return &ei->vfs_inode;
-@@ -516,6 +521,13 @@ static void ext3_clear_inode(struct inod
+@@ -514,6 +519,13 @@
+                       EXT3_I(inode)->i_default_acl != EXT3_ACL_NOT_CACHED) {
+               posix_acl_release(EXT3_I(inode)->i_default_acl);
                EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED;
-       }
- #endif
++      }
++#endif
 +#ifdef CONFIG_EXT3_FS_NFS4ACL
 +      if (EXT3_I(inode)->i_nfs4acl &&
 +                      EXT3_I(inode)->i_nfs4acl != EXT3_NFS4ACL_NOT_CACHED) {
 +              nfs4acl_put(EXT3_I(inode)->i_nfs4acl);
 +              EXT3_I(inode)->i_nfs4acl = EXT3_NFS4ACL_NOT_CACHED;
-+      }
-+#endif
+       }
+ #endif
        ext3_discard_reservation(inode);
-       EXT3_I(inode)->i_block_alloc_info = NULL;
-       if (unlikely(rsv))
-@@ -750,7 +762,7 @@ enum {
+@@ -750,7 +762,7 @@
        Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
        Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro,
        Opt_nouid32, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov,
@@ -977938,7 +977793,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
        Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh,
        Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,
        Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
-@@ -782,6 +794,7 @@ static match_table_t tokens = {
+@@ -782,6 +794,7 @@
        {Opt_user_xattr, "user_xattr"},
        {Opt_nouser_xattr, "nouser_xattr"},
        {Opt_acl, "acl"},
@@ -977946,17 +977801,17 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
        {Opt_noacl, "noacl"},
        {Opt_reservation, "reservation"},
        {Opt_noreservation, "noreservation"},
-@@ -925,19 +938,33 @@ static int parse_options (char *options,
+@@ -925,19 +938,33 @@
                        printk("EXT3 (no)user_xattr options not supported\n");
                        break;
  #endif
--#ifdef CONFIG_EXT3_FS_POSIX_ACL
-               case Opt_acl:
--                      set_opt(sbi->s_mount_opt, POSIX_ACL);
++              case Opt_acl:
 +                      args[0].to = args[0].from;
 +                      /* fall through */
 +              case Opt_acl_flavor:
-+#ifdef CONFIG_EXT3_FS_POSIX_ACL
+ #ifdef CONFIG_EXT3_FS_POSIX_ACL
+-              case Opt_acl:
+-                      set_opt(sbi->s_mount_opt, POSIX_ACL);
 +                      if (match_string(&args[0], "") ||
 +                          match_string(&args[0], "posix")) {
 +                              set_opt(sbi->s_mount_opt, POSIX_ACL);
@@ -977988,7 +977843,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
                case Opt_reservation:
                        set_opt(sbi->s_mount_opt, RESERVATION);
                        break;
-@@ -1018,8 +1045,7 @@ static int parse_options (char *options,
+@@ -1018,8 +1045,7 @@
                case Opt_grpjquota:
                        qtype = GRPQUOTA;
  set_qf_name:
@@ -977998,7 +977853,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
                            !sbi->s_qf_names[qtype]) {
                                printk(KERN_ERR
                                        "EXT3-fs: Cannot change journaled "
-@@ -1058,8 +1084,7 @@ set_qf_name:
+@@ -1058,8 +1084,7 @@
                case Opt_offgrpjquota:
                        qtype = GRPQUOTA;
  clear_qf_name:
@@ -978008,7 +977863,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
                            sbi->s_qf_names[qtype]) {
                                printk(KERN_ERR "EXT3-fs: Cannot change "
                                        "journaled quota options when "
-@@ -1078,8 +1103,7 @@ clear_qf_name:
+@@ -1078,8 +1103,7 @@
                case Opt_jqfmt_vfsv0:
                        qfmt = QFMT_VFS_V0;
  set_qf_format:
@@ -978018,7 +977873,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
                            sbi->s_jquota_fmt != qfmt) {
                                printk(KERN_ERR "EXT3-fs: Cannot change "
                                        "journaled quota options when "
-@@ -1098,8 +1122,7 @@ set_qf_format:
+@@ -1098,8 +1122,7 @@
                        set_opt(sbi->s_mount_opt, GRPQUOTA);
                        break;
                case Opt_noquota:
@@ -978028,7 +977883,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
                                printk(KERN_ERR "EXT3-fs: Cannot change quota "
                                        "options when quota turned on.\n");
                                return 0;
-@@ -1603,14 +1626,19 @@ static int ext3_fill_super (struct super
+@@ -1603,14 +1626,19 @@
        sbi->s_resuid = le16_to_cpu(es->s_def_resuid);
        sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
  
@@ -978050,7 +977905,7 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
  
        if (le32_to_cpu(es->s_rev_level) == EXT3_GOOD_OLD_REV &&
            (EXT3_HAS_COMPAT_FEATURE(sb, ~0U) ||
-@@ -2263,6 +2291,13 @@ static void ext3_commit_super (struct su
+@@ -2263,6 +2291,13 @@
        es->s_free_blocks_count = cpu_to_le32(ext3_count_free_blocks(sb));
        es->s_free_inodes_count = cpu_to_le32(ext3_count_free_inodes(sb));
        BUFFER_TRACE(sbh, "marking dirty");
@@ -978064,26 +977919,26 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
        mark_buffer_dirty(sbh);
        if (sync)
                sync_dirty_buffer(sbh);
-@@ -2365,13 +2400,12 @@ static void ext3_write_super (struct sup
+@@ -2365,13 +2400,12 @@
  
  static int ext3_sync_fs(struct super_block *sb, int wait)
  {
 -      tid_t target;
--
-       sb->s_dirt = 0;
--      if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
--              if (wait)
--                      log_wait_commit(EXT3_SB(sb)->s_journal, target);
--      }
++      sb->s_dirt = 0;
 +      if (wait)
 +              ext3_force_commit(sb);
 +      else
 +              journal_start_commit(EXT3_SB(sb)->s_journal, NULL);
-+
+-      sb->s_dirt = 0;
+-      if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
+-              if (wait)
+-                      log_wait_commit(EXT3_SB(sb)->s_journal, target);
+-      }
        return 0;
  }
  
-@@ -2447,8 +2481,12 @@ static int ext3_remount (struct super_bl
+@@ -2447,8 +2481,12 @@
        if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
                ext3_abort(sb, __func__, "Abort forced by user");
  
@@ -978098,10 +977953,10 @@ diff -purN linux-2.6.27/fs/ext3/super.c linux-2.6.27.19-5.1/fs/ext3/super.c
  
        es = sbi->s_es;
  
-diff -purN linux-2.6.27/fs/ext3/xattr.c linux-2.6.27.19-5.1/fs/ext3/xattr.c
---- linux-2.6.27/fs/ext3/xattr.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/xattr.c        2009-03-25 16:11:34.000000000 +0000
-@@ -114,6 +114,9 @@ static struct xattr_handler *ext3_xattr_
+diff -r 9608d5473017 fs/ext3/xattr.c
+--- a/fs/ext3/xattr.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/xattr.c  Wed May 06 16:56:47 2009 +0100
+@@ -114,6 +114,9 @@
  #ifdef CONFIG_EXT3_FS_SECURITY
        [EXT3_XATTR_INDEX_SECURITY]          = &ext3_xattr_security_handler,
  #endif
@@ -978111,22 +977966,22 @@ diff -purN linux-2.6.27/fs/ext3/xattr.c linux-2.6.27.19-5.1/fs/ext3/xattr.c
  };
  
  struct xattr_handler *ext3_xattr_handlers[] = {
-@@ -126,6 +129,12 @@ struct xattr_handler *ext3_xattr_handler
+@@ -125,6 +128,12 @@
+ #endif
  #ifdef CONFIG_EXT3_FS_SECURITY
        &ext3_xattr_security_handler,
- #endif
++#endif
 +#ifdef CONFIG_EXT3_FS_NFS4ACL
 +      &ext3_nfs4acl_xattr_handler,
 +#ifdef NFS4ACL_DEBUG
 +      &ext3_masked_nfs4acl_xattr_handler,
 +#endif
-+#endif
+ #endif
        NULL
  };
-diff -purN linux-2.6.27/fs/ext3/xattr.h linux-2.6.27.19-5.1/fs/ext3/xattr.h
---- linux-2.6.27/fs/ext3/xattr.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext3/xattr.h        2009-03-25 16:11:33.000000000 +0000
+diff -r 9608d5473017 fs/ext3/xattr.h
+--- a/fs/ext3/xattr.h  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext3/xattr.h  Wed May 06 16:56:47 2009 +0100
 @@ -21,6 +21,7 @@
  #define EXT3_XATTR_INDEX_TRUSTED              4
  #define       EXT3_XATTR_INDEX_LUSTRE                 5
@@ -978135,7 +977990,7 @@ diff -purN linux-2.6.27/fs/ext3/xattr.h linux-2.6.27.19-5.1/fs/ext3/xattr.h
  
  struct ext3_xattr_header {
        __le32  h_magic;        /* magic number for identification */
-@@ -63,6 +64,10 @@ extern struct xattr_handler ext3_xattr_t
+@@ -63,6 +64,10 @@
  extern struct xattr_handler ext3_xattr_acl_access_handler;
  extern struct xattr_handler ext3_xattr_acl_default_handler;
  extern struct xattr_handler ext3_xattr_security_handler;
@@ -978146,10 +978001,10 @@ diff -purN linux-2.6.27/fs/ext3/xattr.h linux-2.6.27.19-5.1/fs/ext3/xattr.h
  
  extern ssize_t ext3_listxattr(struct dentry *, char *, size_t);
  
-diff -purN linux-2.6.27/fs/ext4/acl.h linux-2.6.27.19-5.1/fs/ext4/acl.h
---- linux-2.6.27/fs/ext4/acl.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/acl.h  2009-03-25 16:11:36.000000000 +0000
-@@ -51,18 +51,18 @@ static inline int ext4_acl_count(size_t 
+diff -r 9608d5473017 fs/ext4/acl.h
+--- a/fs/ext4/acl.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/acl.h    Wed May 06 16:56:47 2009 +0100
+@@ -51,18 +51,18 @@
        }
  }
  
@@ -978173,16 +978028,16 @@ diff -purN linux-2.6.27/fs/ext4/acl.h linux-2.6.27.19-5.1/fs/ext4/acl.h
  #include <linux/sched.h>
  #define ext4_permission NULL
  
-@@ -77,5 +77,5 @@ ext4_init_acl(handle_t *handle, struct i
+@@ -77,5 +77,5 @@
  {
        return 0;
  }
 -#endif  /* CONFIG_EXT4DEV_FS_POSIX_ACL */
 +#endif  /* CONFIG_EXT4_FS_POSIX_ACL */
  
-diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
---- linux-2.6.27/fs/ext4/balloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/balloc.c       2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/balloc.c
+--- a/fs/ext4/balloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/balloc.c Wed May 06 16:56:47 2009 +0100
 @@ -20,6 +20,7 @@
  #include "ext4.h"
  #include "ext4_jbd2.h"
@@ -978191,7 +978046,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
  
  /*
   * balloc.c contains the blocks allocation and deallocation routines
-@@ -83,6 +84,7 @@ static int ext4_group_used_meta_blocks(s
+@@ -83,6 +84,7 @@
        }
        return used_blocks;
  }
@@ -978199,7 +978054,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
  /* Initializes an uninitialized block bitmap if given, and returns the
   * number of blocks free in the group. */
  unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
-@@ -99,10 +101,10 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -99,10 +101,10 @@
                 * essentially implementing a per-group read-only flag. */
                if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
                        ext4_error(sb, __func__,
@@ -978214,7 +978069,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
                        memset(bh->b_data, 0xff, sb->s_blocksize);
                        return 0;
                }
-@@ -132,7 +134,7 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -132,7 +134,7 @@
                 */
                group_blocks = ext4_blocks_count(sbi->s_es) -
                        le32_to_cpu(sbi->s_es->s_first_data_block) -
@@ -978223,7 +978078,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        } else {
                group_blocks = EXT4_BLOCKS_PER_GROUP(sb);
        }
-@@ -200,20 +202,20 @@ unsigned ext4_init_block_bitmap(struct s
+@@ -200,20 +202,20 @@
   * @bh:                       pointer to the buffer head to store the block
   *                    group descriptor
   */
@@ -978253,7 +978108,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
  
                return NULL;
        }
-@@ -222,10 +224,10 @@ struct ext4_group_desc * ext4_get_group_
+@@ -222,10 +224,10 @@
        group_desc = block_group >> EXT4_DESC_PER_BLOCK_BITS(sb);
        offset = block_group & (EXT4_DESC_PER_BLOCK(sb) - 1);
        if (!sbi->s_group_desc[group_desc]) {
@@ -978268,7 +978123,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
                return NULL;
        }
  
-@@ -302,8 +304,8 @@ err_out:
+@@ -302,8 +304,8 @@
  struct buffer_head *
  ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group)
  {
@@ -978279,7 +978134,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        ext4_fsblk_t bitmap_blk;
  
        desc = ext4_get_group_desc(sb, block_group, NULL);
-@@ -314,27 +316,50 @@ ext4_read_block_bitmap(struct super_bloc
+@@ -314,27 +316,50 @@
        if (unlikely(!bh)) {
                ext4_error(sb, __func__,
                            "Cannot read block bitmap - "
@@ -978303,9 +978158,9 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
                ext4_init_block_bitmap(sb, bh, block_group, desc);
 +              set_bitmap_uptodate(bh);
                set_buffer_uptodate(bh);
--              unlock_buffer(bh);
-               spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
-+              unlock_buffer(bh);
++              spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
+               unlock_buffer(bh);
+-              spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
                return bh;
        }
        spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
@@ -978334,7 +978189,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
                            block_group, bitmap_blk);
                return NULL;
        }
-@@ -345,356 +370,50 @@ ext4_read_block_bitmap(struct super_bloc
+@@ -345,356 +370,50 @@
         */
        return bh;
  }
@@ -978348,8 +978203,8 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 - * windows.
 - *
 - */
--
--/**
+ /**
 - * __rsv_window_dump() -- Dump the filesystem block allocation reservation map
 - * @rb_root:          root of per-filesystem reservation rb tree
 - * @verbose:          verbose mode
@@ -978441,8 +978296,8 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -              return 0;
 -      return 1;
 -}
- /**
+-
+-/**
 - * search_reserve_window()
 - * @rb_root:          root of reservation tree
 - * @goal:             target allocation block
@@ -978683,10 +978538,10 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                          "block = %llu, count = %lu", block, count);
 -              goto error_return;
 -      }
--
--      ext4_debug ("freeing block(s) %llu-%llu\n", block, block + count - 1);
 +      ext4_debug("Adding block(s) %llu-%llu\n", block, block + count - 1);
  
+-      ext4_debug ("freeing block(s) %llu-%llu\n", block, block + count - 1);
+-
 -do_more:
 -      overflow = 0;
        ext4_get_group_no_and_offset(sb, block, &block_group, &bit);
@@ -978709,7 +978564,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        if (!desc)
                goto error_return;
  
-@@ -703,18 +422,17 @@ do_more:
+@@ -703,18 +422,17 @@
            in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) ||
            in_range(block + count - 1, ext4_inode_table(sb, desc),
                     sbi->s_itb_per_group)) {
@@ -978733,7 +978588,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        BUFFER_TRACE(bitmap_bh, "getting undo access");
        err = ext4_journal_get_undo_access(handle, bitmap_bh);
        if (err)
-@@ -729,90 +447,43 @@ do_more:
+@@ -729,90 +447,43 @@
        err = ext4_journal_get_write_access(handle, gd_bh);
        if (err)
                goto error_return;
@@ -978842,26 +978697,26 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
  
        /* We dirtied the bitmap block */
        BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-@@ -821,15 +492,10 @@ do_more:
+@@ -821,15 +492,10 @@
        /* And the group descriptor block */
        BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
        ret = ext4_journal_dirty_metadata(handle, gd_bh);
 -      if (!err) err = ret;
 -      *pdquot_freed_blocks += group_freed;
--
++      if (!err)
++              err = ret;
++      sb->s_dirt = 1;
 -      if (overflow && !err) {
 -              block += count;
 -              count = overflow;
 -              goto do_more;
 -      }
-+      if (!err)
-+              err = ret;
-       sb->s_dirt = 1;
-+
+-      sb->s_dirt = 1;
  error_return:
        brelse(bitmap_bh);
        ext4_std_error(sb, err);
-@@ -848,792 +514,86 @@ void ext4_free_blocks(handle_t *handle, 
+@@ -848,792 +514,86 @@
                        ext4_fsblk_t block, unsigned long count,
                        int metadata)
  {
@@ -978904,7 +978759,10 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 - * ext4_test_allocatable()
 - * @nr:                       given allocation block group
 - * @bh:                       bufferhead contains the bitmap of the given block group
-- *
++ * ext4_has_free_blocks()
++ * @sbi:      in-core super block structure.
++ * @nblocks:  number of needed blocks
+  *
 - * For ext4 allocations, we must not reuse any blocks which are
 - * allocated in the bitmap buffer's "last committed data" copy.  This
 - * prevents deletes from freeing up the page for reuse until we have
@@ -978919,15 +978777,24 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 - * @@@ We may want to make this allocation behaviour conditional on
 - * data-writes at some point, and disable it for metadata allocations or
 - * sync-data inodes.
-- */
++ * Check if filesystem has nblocks free & available for allocation.
++ * On success return 1, return 0 on failure.
+  */
 -static int ext4_test_allocatable(ext4_grpblk_t nr, struct buffer_head *bh)
--{
++int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
+ {
 -      int ret;
 -      struct journal_head *jh = bh2jh(bh);
--
++      s64 free_blocks, dirty_blocks, root_blocks;
++      struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
++      struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
 -      if (ext4_test_bit(nr, bh->b_data))
 -              return 0;
--
++      free_blocks  = percpu_counter_read_positive(fbc);
++      dirty_blocks = percpu_counter_read_positive(dbc);
++      root_blocks = ext4_r_blocks_count(sbi->s_es);
 -      jbd_lock_bh_state(bh);
 -      if (!jh->b_committed_data)
 -              ret = 1;
@@ -979130,10 +978997,23 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                                                              bitmap_bh);
 -                                      i++, grp_goal--)
 -                              ;
--              }
--      }
++      if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
++                                              EXT4_FREEBLOCKS_WATERMARK) {
++              free_blocks  = percpu_counter_sum_positive(fbc);
++              dirty_blocks = percpu_counter_sum_positive(dbc);
++              if (dirty_blocks < 0) {
++                      printk(KERN_CRIT "Dirty block accounting "
++                                      "went wrong %lld\n",
++                                      (long long)dirty_blocks);
+               }
+       }
 -      start = grp_goal;
--
++      /* Check whether we have space after
++       * accounting for current dirty blocks & root reserved blocks.
++       */
++      if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
++              return 1;
 -      if (!claim_block(sb_bgl_lock(EXT4_SB(sb), group),
 -              grp_goal, bitmap_bh)) {
 -              /*
@@ -979145,7 +979025,13 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -              if (start >= end)
 -                      goto fail_access;
 -              goto repeat;
--      }
++      /* Hm, nope.  Are (enough) root reserved blocks available? */
++      if (sbi->s_resuid == current_fsuid() ||
++          ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
++          capable(CAP_SYS_RESOURCE)) {
++              if (free_blocks >= (nblocks + dirty_blocks))
++                      return 1;
+       }
 -      num++;
 -      grp_goal++;
 -      while (num < *count && grp_goal < end
@@ -979276,10 +979162,10 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -
 -      if (prev != my_rsv)
 -              ext4_rsv_window_add(sb, my_rsv);
--
--      return 0;
--}
--
+       return 0;
+ }
 -/**
 - *    alloc_new_reservation()--allocate a new reservation window
 - *
@@ -979315,17 +979201,13 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 - *    @sb: the super block
 - *    @group: the group we are trying to allocate in
 - *    @bitmap_bh: the block group block bitmap
-+ * ext4_has_free_blocks()
-+ * @sbi:      in-core super block structure.
-+ * @nblocks:  number of needed blocks
-  *
-+ * Check if filesystem has nblocks free & available for allocation.
-+ * On success return 1, return 0 on failure.
-  */
+- *
+- */
 -static int alloc_new_reservation(struct ext4_reserve_window_node *my_rsv,
 -              ext4_grpblk_t grp_goal, struct super_block *sb,
 -              ext4_group_t group, struct buffer_head *bitmap_bh)
-+int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
++int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
++                                              s64 nblocks)
  {
 -      struct ext4_reserve_window_node *search_head;
 -      ext4_fsblk_t group_first_block, group_end_block, start_block;
@@ -979342,15 +979224,9 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -              start_block = group_first_block;
 -      else
 -              start_block = grp_goal + group_first_block;
-+      s64 free_blocks, dirty_blocks, root_blocks;
-+      struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
-+      struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
+-
 -      size = my_rsv->rsv_goal_size;
-+      free_blocks  = percpu_counter_read_positive(fbc);
-+      dirty_blocks = percpu_counter_read_positive(dbc);
-+      root_blocks = ext4_r_blocks_count(sbi->s_es);
+-
 -      if (!rsv_is_empty(&my_rsv->rsv_window)) {
 -              /*
 -               * if the old reservation is cross group boundary
@@ -979383,16 +979259,8 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                      if (size > EXT4_MAX_RESERVE_BLOCKS)
 -                              size = EXT4_MAX_RESERVE_BLOCKS;
 -                      my_rsv->rsv_goal_size= size;
-+      if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
-+                                              EXT4_FREEBLOCKS_WATERMARK) {
-+              free_blocks  = percpu_counter_sum_positive(fbc);
-+              dirty_blocks = percpu_counter_sum_positive(dbc);
-+              if (dirty_blocks < 0) {
-+                      printk(KERN_CRIT "Dirty block accounting "
-+                                      "went wrong %lld\n",
-+                                      (long long)dirty_blocks);
-               }
-       }
+-              }
+-      }
 -
 -      spin_lock(rsv_lock);
 -      /*
@@ -979462,7 +979330,12 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -      search_head = my_rsv;
 -      spin_lock(rsv_lock);
 -      goto retry;
--}
++      if (ext4_has_free_blocks(sbi, nblocks)) {
++              percpu_counter_add(&sbi->s_dirtyblocks_counter, nblocks);
++              return 0;
++      } else
++              return -ENOSPC;
+ }
 -
 -/**
 - * try_to_extend_reservation()
@@ -979553,9 +979426,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -       * Make sure we use undo access for the bitmap, because it is critical
 -       * that we do the frozen_data COW on bitmap buffers in all cases even
 -       * if the buffer is in BJ_Forget state in the committing transaction.
-+      /* Check whether we have space after
-+       * accounting for current dirty blocks & root reserved blocks.
-        */
+-       */
 -      BUFFER_TRACE(bitmap_bh, "get undo access for new block");
 -      fatal = ext4_journal_get_undo_access(handle, bitmap_bh);
 -      if (fatal) {
@@ -979620,9 +979491,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                              try_to_extend_reservation(my_rsv, sb,
 -                                                      *count - curr);
 -              }
-+      if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
-+              return 1;
+-
 -              if ((my_rsv->rsv_start > group_last_block) ||
 -                              (my_rsv->rsv_end < group_first_block)) {
 -                      rsv_window_dump(&EXT4_SB(sb)->s_rsv_window_root, 1);
@@ -979647,20 +979516,13 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                      return -1;
 -              }
 -              return ret;
-+      /* Hm, nope.  Are (enough) root reserved blocks available? */
-+      if (sbi->s_resuid == current_fsuid() ||
-+          ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
-+          capable(CAP_SYS_RESOURCE)) {
-+              if (free_blocks >= (nblocks + dirty_blocks))
-+                      return 1;
-       }
+-      }
+-
 -      BUFFER_TRACE(bitmap_bh, "journal_release_buffer");
 -      ext4_journal_release_buffer(handle, bitmap_bh);
 -      return ret;
-+      return 0;
- }
+-}
+-
 -/**
 - * ext4_has_free_blocks()
 - * @sbi:      in-core super block structure.
@@ -979672,9 +979534,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 - */
 -ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi,
 -                                              ext4_fsblk_t nblocks)
-+int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
-+                                              s64 nblocks)
- {
+-{
 -      ext4_fsblk_t free_blocks;
 -      ext4_fsblk_t root_blocks = 0;
 -
@@ -979691,21 +979551,16 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -#endif
 -      if (free_blocks <= root_blocks)
 -              /* we don't have free space */
-+      if (ext4_has_free_blocks(sbi, nblocks)) {
-+              percpu_counter_add(&sbi->s_dirtyblocks_counter, nblocks);
-               return 0;
+-              return 0;
 -      if (free_blocks - root_blocks < nblocks)
 -              return free_blocks - root_blocks;
 -      return nblocks;
 - }
 -
-+      } else
-+              return -ENOSPC;
-+}
  
  /**
   * ext4_should_retry_alloc()
-@@ -1657,402 +617,45 @@ int ext4_should_retry_alloc(struct super
+@@ -1657,400 +617,43 @@
        return jbd2_journal_force_commit_nested(EXT4_SB(sb)->s_journal);
  }
  
@@ -980082,8 +979937,8 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
                spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
        }
        return ret;
- }
+-}
+-
 -/*
 - * ext4_new_meta_block() -- allocate block for meta data (indexing) blocks
 - *
@@ -980119,12 +979974,10 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
 -                              unsigned long *count, int *errp)
 -{
 -      return do_blk_alloc(handle, inode, iblock, goal, count, errp, 0);
--}
--
+ }
  /**
-  * ext4_count_free_blocks() -- count filesystem free blocks
-  * @sb:               superblock
-@@ -2068,7 +671,7 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2068,7 +671,7 @@
  #ifdef EXT4FS_DEBUG
        struct ext4_super_block *es;
        ext4_fsblk_t bitmap_count;
@@ -980133,7 +979986,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        struct buffer_head *bitmap_bh = NULL;
  
        es = EXT4_SB(sb)->s_es;
-@@ -2088,15 +691,14 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2088,15 +691,14 @@
                        continue;
  
                x = ext4_count_free(bitmap_bh, sb->s_blocksize);
@@ -980153,7 +980006,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        return bitmap_count;
  #else
        desc_count = 0;
-@@ -2105,7 +707,7 @@ ext4_fsblk_t ext4_count_free_blocks(stru
+@@ -2105,7 +707,7 @@
                gdp = ext4_get_group_desc(sb, i, NULL);
                if (!gdp)
                        continue;
@@ -980162,7 +980015,7 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
        }
  
        return desc_count;
-@@ -2183,8 +785,9 @@ unsigned long ext4_bg_num_gdb(struct sup
+@@ -2183,8 +785,9 @@
  
        if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) ||
                        metagroup < first_meta_bg)
@@ -980173,9 +980026,9 @@ diff -purN linux-2.6.27/fs/ext4/balloc.c linux-2.6.27.19-5.1/fs/ext4/balloc.c
  
  }
 +
-diff -purN linux-2.6.27/fs/ext4/bitmap.c linux-2.6.27.19-5.1/fs/ext4/bitmap.c
---- linux-2.6.27/fs/ext4/bitmap.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/bitmap.c       2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/bitmap.c
+--- a/fs/ext4/bitmap.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/bitmap.c Wed May 06 16:56:47 2009 +0100
 @@ -15,17 +15,16 @@
  
  static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
@@ -980198,10 +980051,10 @@ diff -purN linux-2.6.27/fs/ext4/bitmap.c linux-2.6.27.19-5.1/fs/ext4/bitmap.c
  }
  
  #endif  /*  EXT4FS_DEBUG  */
-diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
---- linux-2.6.27/fs/ext4/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/dir.c  2009-03-25 16:11:36.000000000 +0000
-@@ -33,10 +33,10 @@ static unsigned char ext4_filetype_table
+diff -r 9608d5473017 fs/ext4/dir.c
+--- a/fs/ext4/dir.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/dir.c    Wed May 06 16:56:47 2009 +0100
+@@ -33,10 +33,10 @@
  };
  
  static int ext4_readdir(struct file *, void *, filldir_t);
@@ -980216,7 +980069,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
  
  const struct file_operations ext4_dir_operations = {
        .llseek         = generic_file_llseek,
-@@ -61,12 +61,12 @@ static unsigned char get_dtype(struct su
+@@ -61,12 +61,12 @@
  }
  
  
@@ -980234,7 +980087,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
        const int rlen = ext4_rec_len_from_disk(de->rec_len);
  
        if (rlen < EXT4_DIR_REC_LEN(1))
-@@ -82,26 +82,27 @@ int ext4_check_dir_entry (const char * f
+@@ -82,26 +82,27 @@
                error_msg = "inode out of bounds";
  
        if (error_msg != NULL)
@@ -980268,7 +980121,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
  
        sb = inode->i_sb;
  
-@@ -148,9 +149,13 @@ static int ext4_readdir(struct file * fi
+@@ -148,9 +149,13 @@
                 * of recovering data when there's a bad sector
                 */
                if (!bh) {
@@ -980285,7 +980138,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
                        /* corrupt size?  Maybe no more blocks to read */
                        if (filp->f_pos > inode->i_blocks << 9)
                                break;
-@@ -187,14 +192,14 @@ revalidate:
+@@ -187,14 +192,14 @@
                while (!error && filp->f_pos < inode->i_size
                       && offset < sb->s_blocksize) {
                        de = (struct ext4_dir_entry_2 *) (bh->b_data + offset);
@@ -980303,7 +980156,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
                                ret = stored;
                                goto out;
                        }
-@@ -218,12 +223,12 @@ revalidate:
+@@ -218,12 +223,12 @@
                                        break;
                                if (version != filp->f_version)
                                        goto revalidate;
@@ -980318,7 +980171,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
        }
  out:
        return ret;
-@@ -290,9 +295,9 @@ static void free_rb_tree_fname(struct rb
+@@ -290,9 +295,9 @@
                parent = rb_parent(n);
                fname = rb_entry(n, struct fname, rb_hash);
                while (fname) {
@@ -980330,7 +980183,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
                }
                if (!parent)
                        root->rb_node = NULL;
-@@ -331,7 +336,7 @@ int ext4_htree_store_dirent(struct file 
+@@ -331,7 +336,7 @@
                             struct ext4_dir_entry_2 *dirent)
  {
        struct rb_node **p, *parent = NULL;
@@ -980339,7 +980192,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
        struct dir_private_info *info;
        int len;
  
-@@ -388,19 +393,20 @@ int ext4_htree_store_dirent(struct file 
+@@ -388,19 +393,20 @@
   * for all entres on the fname linked list.  (Normally there is only
   * one entry on the linked list, unless there are 62 bit hash collisions.)
   */
@@ -980363,7 +980216,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
                return 0;
        }
        curr_pos = hash2pos(fname->hash, fname->minor_hash);
-@@ -419,8 +425,8 @@ static int call_filldir(struct file * fi
+@@ -419,8 +425,8 @@
        return 0;
  }
  
@@ -980374,7 +980227,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
  {
        struct dir_private_info *info = filp->private_data;
        struct inode *inode = filp->f_path.dentry->d_inode;
-@@ -453,17 +459,8 @@ static int ext4_dx_readdir(struct file *
+@@ -453,17 +459,8 @@
        if (info->extra_fname) {
                if (call_filldir(filp, dirent, filldir, info->extra_fname))
                        goto finished;
@@ -980393,7 +980246,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
        } else if (!info->curr_node)
                info->curr_node = rb_first(&info->root);
  
-@@ -495,9 +492,14 @@ static int ext4_dx_readdir(struct file *
+@@ -495,9 +492,14 @@
                info->curr_minor_hash = fname->minor_hash;
                if (call_filldir(filp, dirent, filldir, fname))
                        break;
@@ -980410,7 +980263,7 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
                        if (info->next_hash == ~0) {
                                filp->f_pos = EXT4_HTREE_EOF;
                                break;
-@@ -511,7 +513,7 @@ finished:
+@@ -511,7 +513,7 @@
        return 0;
  }
  
@@ -980419,9 +980272,9 @@ diff -purN linux-2.6.27/fs/ext4/dir.c linux-2.6.27.19-5.1/fs/ext4/dir.c
  {
        if (filp->private_data)
                ext4_htree_free_dir_info(filp->private_data);
-diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
---- linux-2.6.27/fs/ext4/ext4.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4.h 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/ext4.h
+--- a/fs/ext4/ext4.h   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4.h   Wed May 06 16:56:47 2009 +0100
 @@ -19,6 +19,7 @@
  #include <linux/types.h>
  #include <linux/blkdev.h>
@@ -980442,7 +980295,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
        } while (0)
  #else
  #define ext4_debug(f, a...)   do {} while (0)
-@@ -94,9 +95,9 @@ struct ext4_allocation_request {
+@@ -94,9 +95,9 @@
        /* phys. block for ^^^ */
        ext4_fsblk_t pright;
        /* how many blocks we want to allocate */
@@ -980454,7 +980307,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  };
  
  /*
-@@ -128,7 +129,7 @@ struct ext4_allocation_request {
+@@ -128,7 +129,7 @@
  #else
  # define EXT4_BLOCK_SIZE(s)           (EXT4_MIN_BLOCK_SIZE << (s)->s_log_block_size)
  #endif
@@ -980463,7 +980316,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #ifdef __KERNEL__
  # define EXT4_BLOCK_SIZE_BITS(s)      ((s)->s_blocksize_bits)
  #else
-@@ -156,12 +157,12 @@ struct ext4_group_desc
+@@ -156,12 +157,12 @@
        __le32  bg_block_bitmap_lo;     /* Blocks bitmap block */
        __le32  bg_inode_bitmap_lo;     /* Inodes bitmap block */
        __le32  bg_inode_table_lo;      /* Inodes table block */
@@ -980480,7 +980333,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
        __le16  bg_checksum;            /* crc16(sb_uuid+group+desc) */
        __le32  bg_block_bitmap_hi;     /* Blocks bitmap block MSB */
        __le32  bg_inode_bitmap_hi;     /* Inodes bitmap block MSB */
-@@ -169,7 +170,7 @@ struct ext4_group_desc
+@@ -169,7 +170,7 @@
        __le16  bg_free_blocks_count_hi;/* Free blocks count MSB */
        __le16  bg_free_inodes_count_hi;/* Free inodes count MSB */
        __le16  bg_used_dirs_count_hi;  /* Directories count MSB */
@@ -980489,7 +980342,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
        __u32   bg_reserved2[3];
  };
  
-@@ -245,7 +246,7 @@ struct flex_groups {
+@@ -245,7 +246,7 @@
  #define EXT4_RESERVED_FL              0x80000000 /* reserved for ext4 lib */
  
  #define EXT4_FL_USER_VISIBLE          0x000BDFFF /* User visible flags */
@@ -980498,7 +980351,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  /*
   * Inode dynamic state flags
-@@ -291,8 +292,6 @@ struct ext4_new_group_data {
+@@ -291,8 +292,6 @@
  #define       EXT4_IOC_SETFLAGS               FS_IOC_SETFLAGS
  #define       EXT4_IOC_GETVERSION             _IOR('f', 3, long)
  #define       EXT4_IOC_SETVERSION             _IOW('f', 4, long)
@@ -980507,7 +980360,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #define       EXT4_IOC_GETVERSION_OLD         FS_IOC_GETVERSION
  #define       EXT4_IOC_SETVERSION_OLD         FS_IOC_SETVERSION
  #ifdef CONFIG_JBD2_DEBUG
-@@ -300,7 +299,10 @@ struct ext4_new_group_data {
+@@ -300,7 +299,10 @@
  #endif
  #define EXT4_IOC_GETRSVSZ             _IOR('f', 5, long)
  #define EXT4_IOC_SETRSVSZ             _IOW('f', 6, long)
@@ -980519,7 +980372,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  /*
   * ioctl commands in 32 bit emulation
-@@ -510,7 +512,6 @@ do {                                                                              \
+@@ -510,7 +512,6 @@
  /*
   * Mount flags
   */
@@ -980527,7 +980380,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #define EXT4_MOUNT_OLDALLOC           0x00002  /* Don't use the new Orlov allocator */
  #define EXT4_MOUNT_GRPID              0x00004 /* Create files with directory's group */
  #define EXT4_MOUNT_DEBUG              0x00008 /* Some debugging messages */
-@@ -538,7 +539,6 @@ do {                                                                              \
+@@ -538,7 +539,6 @@
  #define EXT4_MOUNT_JOURNAL_CHECKSUM   0x800000 /* Journal checksums */
  #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT       0x1000000 /* Journal Async Commit */
  #define EXT4_MOUNT_I_VERSION            0x2000000 /* i_version support */
@@ -980535,7 +980388,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #define EXT4_MOUNT_DELALLOC           0x8000000 /* Delalloc support */
  /* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
  #ifndef _LINUX_EXT2_FS_H
-@@ -667,7 +667,7 @@ struct ext4_super_block {
+@@ -667,7 +667,7 @@
  };
  
  #ifdef __KERNEL__
@@ -980544,7 +980397,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  {
        return sb->s_fs_info;
  }
-@@ -725,11 +725,11 @@ static inline int ext4_valid_inum(struct
+@@ -725,11 +725,11 @@
   */
  
  #define EXT4_HAS_COMPAT_FEATURE(sb,mask)                      \
@@ -980559,16 +980412,16 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #define EXT4_SET_COMPAT_FEATURE(sb,mask)                      \
        EXT4_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
  #define EXT4_SET_RO_COMPAT_FEATURE(sb,mask)                   \
-@@ -789,6 +789,8 @@ static inline int ext4_valid_inum(struct
+@@ -788,6 +788,8 @@
+  */
  #define       EXT4_DEF_RESUID         0
  #define       EXT4_DEF_RESGID         0
-+#define EXT4_DEF_INODE_READAHEAD_BLKS 32
 +
++#define EXT4_DEF_INODE_READAHEAD_BLKS 32
  /*
   * Default mount options
-  */
-@@ -888,6 +890,9 @@ static inline __le16 ext4_rec_len_to_dis
+@@ -888,6 +890,9 @@
  #define DX_HASH_LEGACY                0
  #define DX_HASH_HALF_MD4      1
  #define DX_HASH_TEA           2
@@ -980578,7 +980431,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  #ifdef __KERNEL__
  
-@@ -952,7 +957,25 @@ ext4_group_first_block_no(struct super_b
+@@ -952,7 +957,25 @@
  #define ERR_BAD_DX_DIR        -75000
  
  void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
@@ -980605,7 +980458,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  /*
   * Function prototypes
-@@ -966,6 +989,9 @@ void ext4_get_group_no_and_offset(struct
+@@ -966,6 +989,9 @@
  # define ATTRIB_NORET __attribute__((noreturn))
  # define NORET_AND    noreturn,
  
@@ -980615,7 +980468,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  /* balloc.c */
  extern unsigned int ext4_block_group(struct super_block *sb,
                        ext4_fsblk_t blocknr);
-@@ -974,55 +1000,44 @@ extern ext4_grpblk_t ext4_block_group_of
+@@ -974,55 +1000,44 @@
  extern int ext4_bg_has_super(struct super_block *sb, ext4_group_t group);
  extern unsigned long ext4_bg_num_gdb(struct super_block *sb,
                        ext4_group_t group);
@@ -980686,7 +980539,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  /* mballoc.c */
  extern long ext4_mb_stats;
-@@ -1032,17 +1047,18 @@ extern int ext4_mb_release(struct super_
+@@ -1032,17 +1047,18 @@
  extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
                                struct ext4_allocation_request *, int *);
  extern int ext4_mb_reserve_blocks(struct super_block *, int);
@@ -980709,7 +980562,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  /* inode.c */
  int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
                struct buffer_head *bh, ext4_fsblk_t blocknr);
-@@ -1050,24 +1066,19 @@ struct buffer_head *ext4_getblk(handle_t
+@@ -1050,24 +1066,19 @@
                                                ext4_lblk_t, int, int *);
  struct buffer_head *ext4_bread(handle_t *, struct inode *,
                                                ext4_lblk_t, int, int *);
@@ -980739,7 +980592,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  extern void ext4_set_inode_flags(struct inode *);
  extern void ext4_get_inode_flags(struct ext4_inode_info *);
  extern void ext4_set_aops(struct inode *inode);
-@@ -1080,11 +1091,10 @@ extern int ext4_page_mkwrite(struct vm_a
+@@ -1080,11 +1091,10 @@
  
  /* ioctl.c */
  extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
@@ -980753,7 +980606,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  /* namei.c */
  extern int ext4_orphan_add(handle_t *, struct inode *);
  extern int ext4_orphan_del(handle_t *, struct inode *);
-@@ -1099,14 +1109,17 @@ extern int ext4_group_extend(struct supe
+@@ -1099,14 +1109,17 @@
                                ext4_fsblk_t n_blocks_count);
  
  /* super.c */
@@ -980776,7 +980629,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  extern int ext4_update_compat_feature(handle_t *handle, struct super_block *sb,
                                        __u32 compat);
  extern int ext4_update_rocompat_feature(handle_t *handle,
-@@ -1119,12 +1132,28 @@ extern ext4_fsblk_t ext4_inode_bitmap(st
+@@ -1119,12 +1132,28 @@
                                      struct ext4_group_desc *bg);
  extern ext4_fsblk_t ext4_inode_table(struct super_block *sb,
                                     struct ext4_group_desc *bg);
@@ -980805,7 +980658,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  
  static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
  {
-@@ -1179,7 +1208,7 @@ static inline void ext4_isize_set(struct
+@@ -1179,7 +1208,7 @@
  
  static inline
  struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
@@ -980814,10 +980667,11 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  {
         struct ext4_group_info ***grp_info;
         long indexv, indexh;
-@@ -1207,6 +1236,72 @@ do {                                                            \
+@@ -1206,6 +1235,72 @@
+       if ((errno))                                            \
                __ext4_std_error((sb), __func__, (errno));      \
  } while (0)
++
 +#ifdef CONFIG_SMP
 +/* Each CPU can accumulate FBC_BATCH blocks in their local
 + * counters. So we need to make sure we have free blocks more
@@ -980883,11 +980737,10 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
 +      return bit_spin_is_locked(EXT4_GROUP_INFO_LOCKED_BIT,
 +                                              &(grinfo->bb_state));
 +}
-+
  /*
   * Inodes and files operations
-  */
-@@ -1232,18 +1327,37 @@ extern int ext4_ext_writepage_trans_bloc
+@@ -1232,18 +1327,37 @@
  extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks,
                                       int chunk);
  extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
@@ -980929,10 +980782,10 @@ diff -purN linux-2.6.27/fs/ext4/ext4.h linux-2.6.27.19-5.1/fs/ext4/ext4.h
  #endif        /* __KERNEL__ */
  
  #endif        /* _EXT4_H */
-diff -purN linux-2.6.27/fs/ext4/ext4_extents.h linux-2.6.27.19-5.1/fs/ext4/ext4_extents.h
---- linux-2.6.27/fs/ext4/ext4_extents.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_extents.h 2009-03-25 16:11:36.000000000 +0000
-@@ -181,11 +181,6 @@ static inline unsigned short ext_depth(s
+diff -r 9608d5473017 fs/ext4/ext4_extents.h
+--- a/fs/ext4/ext4_extents.h   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_extents.h   Wed May 06 16:56:47 2009 +0100
+@@ -181,11 +181,6 @@
        return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
  }
  
@@ -980944,10 +980797,10 @@ diff -purN linux-2.6.27/fs/ext4/ext4_extents.h linux-2.6.27.19-5.1/fs/ext4/ext4_
  static inline void
  ext4_ext_invalidate_cache(struct inode *inode)
  {
-diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
---- linux-2.6.27/fs/ext4/ext4_i.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_i.h       2009-03-25 16:11:36.000000000 +0000
-@@ -31,39 +31,7 @@ typedef unsigned long long ext4_fsblk_t;
+diff -r 9608d5473017 fs/ext4/ext4_i.h
+--- a/fs/ext4/ext4_i.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_i.h Wed May 06 16:56:47 2009 +0100
+@@ -31,39 +31,7 @@
  typedef __u32 ext4_lblk_t;
  
  /* data type for block group number */
@@ -980988,7 +980841,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
  
  #define rsv_start rsv_window._rsv_start
  #define rsv_end rsv_window._rsv_end
-@@ -97,11 +65,8 @@ struct ext4_inode_info {
+@@ -97,11 +65,8 @@
        ext4_group_t    i_block_group;
        __u32   i_state;                /* Dynamic state flags for ext4 */
  
@@ -981001,7 +980854,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
        /*
         * Extended attributes can be read independently of the main file
         * data. Taking i_mutex even when reading would cause contention
-@@ -111,7 +76,7 @@ struct ext4_inode_info {
+@@ -111,7 +76,7 @@
         */
        struct rw_semaphore xattr_sem;
  #endif
@@ -981010,7 +980863,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
        struct posix_acl        *i_acl;
        struct posix_acl        *i_default_acl;
  #endif
-@@ -135,9 +100,6 @@ struct ext4_inode_info {
+@@ -135,9 +100,6 @@
         */
        loff_t  i_disksize;
  
@@ -981020,7 +980873,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
        /*
         * i_data_sem is for serialising ext4_truncate() against
         * ext4_getblock().  In the 2.4 ext2 design, great chunks of inode's
-@@ -152,7 +114,6 @@ struct ext4_inode_info {
+@@ -152,7 +114,6 @@
        struct inode vfs_inode;
        struct jbd2_inode jinode;
  
@@ -981028,7 +980881,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
        struct ext4_ext_cache i_cached_extent;
        /*
         * File creation time. Its function is same as that of
-@@ -165,10 +126,14 @@ struct ext4_inode_info {
+@@ -165,10 +126,14 @@
        spinlock_t i_prealloc_lock;
  
        /* allocation reservation info for delalloc */
@@ -981046,10 +980899,10 @@ diff -purN linux-2.6.27/fs/ext4/ext4_i.h linux-2.6.27.19-5.1/fs/ext4/ext4_i.h
        spinlock_t i_block_reservation_lock;
  };
  
-diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
---- linux-2.6.27/fs/ext4/ext4_sb.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h      2009-03-25 16:11:36.000000000 +0000
-@@ -40,8 +40,8 @@ struct ext4_sb_info {
+diff -r 9608d5473017 fs/ext4/ext4_sb.h
+--- a/fs/ext4/ext4_sb.h        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ext4_sb.h        Wed May 06 16:56:47 2009 +0100
+@@ -40,8 +40,8 @@
        unsigned long s_blocks_last;    /* Last seen block count */
        loff_t s_bitmap_maxbytes;       /* max bytes for bitmap files */
        struct buffer_head * s_sbh;     /* Buffer containing the super block */
@@ -981060,7 +980913,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
        unsigned long  s_mount_opt;
        ext4_fsblk_t s_sb_block;
        uid_t s_resuid;
-@@ -52,23 +52,26 @@ struct ext4_sb_info {
+@@ -52,23 +52,26 @@
        int s_desc_per_block_bits;
        int s_inode_size;
        int s_first_ino;
@@ -981090,7 +980943,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
        struct list_head s_orphan;
        unsigned long s_commit_interval;
        struct block_device *journal_bdev;
-@@ -106,12 +109,12 @@ struct ext4_sb_info {
+@@ -106,12 +109,12 @@
  
        /* tunables */
        unsigned long s_stripe;
@@ -981109,7 +980962,7 @@ diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
        /* where last allocation was done - for stream allocation */
        unsigned long s_mb_last_group;
        unsigned long s_mb_last_start;
-@@ -121,7 +124,6 @@ struct ext4_sb_info {
+@@ -121,7 +124,6 @@
        int s_mb_history_cur;
        int s_mb_history_max;
        int s_mb_history_num;
@@ -981117,10 +980970,10 @@ diff -purN linux-2.6.27/fs/ext4/ext4_sb.h linux-2.6.27.19-5.1/fs/ext4/ext4_sb.h
        spinlock_t s_mb_history_lock;
        int s_mb_history_filter;
  
-diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
---- linux-2.6.27/fs/ext4/extents.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/extents.c      2009-03-25 16:11:36.000000000 +0000
-@@ -190,7 +190,7 @@ ext4_ext_new_meta_block(handle_t *handle
+diff -r 9608d5473017 fs/ext4/extents.c
+--- a/fs/ext4/extents.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/extents.c        Wed May 06 16:56:47 2009 +0100
+@@ -190,7 +190,7 @@
        ext4_fsblk_t goal, newblock;
  
        goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block));
@@ -981129,7 +980982,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        return newblock;
  }
  
-@@ -383,8 +383,8 @@ static void ext4_ext_show_leaf(struct in
+@@ -383,8 +383,8 @@
        ext_debug("\n");
  }
  #else
@@ -981140,7 +980993,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  #endif
  
  void ext4_ext_drop_refs(struct ext4_ext_path *path)
-@@ -440,9 +440,10 @@ ext4_ext_binsearch_idx(struct inode *ino
+@@ -440,9 +440,10 @@
                for (k = 0; k < le16_to_cpu(eh->eh_entries); k++, ix++) {
                  if (k != 0 &&
                      le32_to_cpu(ix->ei_block) <= le32_to_cpu(ix[-1].ei_block)) {
@@ -981154,7 +981007,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
                                       le32_to_cpu(ix->ei_block),
                                       le32_to_cpu(ix[-1].ei_block));
                        }
-@@ -1158,15 +1159,13 @@ ext4_ext_search_right(struct inode *inod
+@@ -1158,15 +1159,13 @@
        while (--depth >= 0) {
                ix = path[depth].p_idx;
                if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
@@ -981174,7 +981027,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        /* we've found index to the right, let's
         * follow it and find the closest allocated
         * block to the right */
-@@ -1199,7 +1198,6 @@ ext4_ext_search_right(struct inode *inod
+@@ -1199,7 +1198,6 @@
        *phys = ext_pblock(ex);
        put_bh(bh);
        return 0;
@@ -981182,7 +981035,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  }
  
  /*
-@@ -1475,7 +1473,7 @@ int ext4_ext_insert_extent(handle_t *han
+@@ -1475,7 +1473,7 @@
                                struct ext4_ext_path *path,
                                struct ext4_extent *newext)
  {
@@ -981191,7 +981044,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        struct ext4_extent *ex, *fex;
        struct ext4_extent *nearex; /* nearest extent */
        struct ext4_ext_path *npath = NULL;
-@@ -1620,7 +1618,6 @@ cleanup:
+@@ -1620,7 +1618,6 @@
                ext4_ext_drop_refs(npath);
                kfree(npath);
        }
@@ -981199,7 +981052,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        ext4_ext_invalidate_cache(inode);
        return err;
  }
-@@ -2124,7 +2121,6 @@ static int ext4_ext_remove_space(struct 
+@@ -2124,7 +2121,6 @@
                }
        }
  out:
@@ -981207,7 +981060,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        ext4_ext_drop_refs(path);
        kfree(path);
        ext4_journal_stop(handle);
-@@ -2142,7 +2138,7 @@ void ext4_ext_init(struct super_block *s
+@@ -2142,7 +2138,7 @@
         */
  
        if (test_opt(sb, EXTENTS)) {
@@ -981216,7 +981069,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  #ifdef AGGRESSIVE_TEST
                printk(", aggressive tests");
  #endif
-@@ -2271,7 +2267,7 @@ static int ext4_ext_convert_to_initializ
+@@ -2271,7 +2267,7 @@
                                                struct inode *inode,
                                                struct ext4_ext_path *path,
                                                ext4_lblk_t iblock,
@@ -981225,7 +981078,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  {
        struct ext4_extent *ex, newex, orig_ex;
        struct ext4_extent *ex1 = NULL;
-@@ -2569,26 +2565,26 @@ fix_extent_len:
+@@ -2569,26 +2565,26 @@
   */
  int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
                        ext4_lblk_t iblock,
@@ -981260,7 +981113,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
                        if (!create) {
                                /*
                                 * block isn't allocated yet and
-@@ -2597,7 +2593,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2597,7 +2593,7 @@
                                goto out2;
                        }
                        /* we should allocate requested block */
@@ -981269,7 +981122,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
                        /* block is already allocated */
                        newblock = iblock
                                   - le32_to_cpu(newex.ee_block)
-@@ -2696,11 +2692,8 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2696,11 +2692,8 @@
                goto out2;
        }
        /*
@@ -981282,7 +981135,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  
        /* find neighbour allocated blocks */
        ar.lleft = iblock;
-@@ -2748,7 +2741,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2748,7 +2741,7 @@
        if (!newblock)
                goto out2;
        ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
@@ -981291,7 +981144,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  
        /* try to insert new extent into found leaf and return */
        ext4_ext_store_pblock(&newex, newblock);
-@@ -2760,7 +2753,7 @@ int ext4_ext_get_blocks(handle_t *handle
+@@ -2760,7 +2753,7 @@
                /* free data blocks we just allocated */
                /* not a good idea to call discard here directly,
                 * but otherwise we'd need to call it every free() */
@@ -981300,7 +981153,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
                ext4_free_blocks(handle, inode, ext_pblock(&newex),
                                        ext4_ext_get_actual_len(&newex), 0);
                goto out2;
-@@ -2824,7 +2817,7 @@ void ext4_ext_truncate(struct inode *ino
+@@ -2824,7 +2817,7 @@
        down_write(&EXT4_I(inode)->i_data_sem);
        ext4_ext_invalidate_cache(inode);
  
@@ -981309,7 +981162,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
  
        /*
         * TODO: optimization is possible here.
-@@ -2877,10 +2870,11 @@ static void ext4_falloc_update_inode(str
+@@ -2877,10 +2870,11 @@
         * Update only when preallocation was requested beyond
         * the file size.
         */
@@ -981325,7 +981178,7 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        }
  
  }
-@@ -2897,7 +2891,7 @@ long ext4_fallocate(struct inode *inode,
+@@ -2897,7 +2891,7 @@
        handle_t *handle;
        ext4_lblk_t block;
        loff_t new_size;
@@ -981334,9 +981187,9 @@ diff -purN linux-2.6.27/fs/ext4/extents.c linux-2.6.27.19-5.1/fs/ext4/extents.c
        int ret = 0;
        int ret2 = 0;
        int retries = 0;
-diff -purN linux-2.6.27/fs/ext4/file.c linux-2.6.27.19-5.1/fs/ext4/file.c
---- linux-2.6.27/fs/ext4/file.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/file.c 2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/file.c
+--- a/fs/ext4/file.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/file.c   Wed May 06 16:56:48 2009 +0100
 @@ -31,14 +31,14 @@
   * from ext4_file_open: open gets called at every open, but release
   * gets called only when /all/ the files are closed.
@@ -981354,7 +981207,7 @@ diff -purN linux-2.6.27/fs/ext4/file.c linux-2.6.27.19-5.1/fs/ext4/file.c
                up_write(&EXT4_I(inode)->i_data_sem);
        }
        if (is_dx(inode) && filp->private_data)
-@@ -162,7 +162,7 @@ const struct inode_operations ext4_file_
+@@ -162,7 +162,7 @@
        .truncate       = ext4_truncate,
        .setattr        = ext4_setattr,
        .getattr        = ext4_getattr,
@@ -981363,9 +981216,9 @@ diff -purN linux-2.6.27/fs/ext4/file.c linux-2.6.27.19-5.1/fs/ext4/file.c
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
        .listxattr      = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/fsync.c linux-2.6.27.19-5.1/fs/ext4/fsync.c
---- linux-2.6.27/fs/ext4/fsync.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/fsync.c        2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/fsync.c
+--- a/fs/ext4/fsync.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/fsync.c  Wed May 06 16:56:48 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/writeback.h>
  #include <linux/jbd2.h>
@@ -981374,7 +981227,7 @@ diff -purN linux-2.6.27/fs/ext4/fsync.c linux-2.6.27.19-5.1/fs/ext4/fsync.c
  #include "ext4.h"
  #include "ext4_jbd2.h"
  
-@@ -43,7 +44,7 @@
+@@ -43,13 +44,17 @@
   * inode to disk.
   */
  
@@ -981383,21 +981236,20 @@ diff -purN linux-2.6.27/fs/ext4/fsync.c linux-2.6.27.19-5.1/fs/ext4/fsync.c
  {
        struct inode *inode = dentry->d_inode;
        journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
-@@ -51,6 +52,10 @@ int ext4_sync_file(struct file * file, s
+       int ret = 0;
  
        J_ASSERT(ext4_journal_current_handle() == NULL);
++
 +      trace_mark(ext4_sync_file, "dev %s datasync %d ino %ld parent %ld",
 +                 inode->i_sb->s_id, datasync, inode->i_ino,
 +                 dentry->d_parent->d_inode->i_ino);
-+
        /*
         * data=writeback:
-        *  The caller's filemap_fdatawrite()/wait will sync the data.
-diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
---- linux-2.6.27/fs/ext4/hash.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/hash.c 2009-03-25 16:11:36.000000000 +0000
-@@ -27,7 +27,7 @@ static void TEA_transform(__u32 buf[4], 
+diff -r 9608d5473017 fs/ext4/hash.c
+--- a/fs/ext4/hash.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/hash.c   Wed May 06 16:56:48 2009 +0100
+@@ -27,7 +27,7 @@
                sum += DELTA;
                b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b);
                b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d);
@@ -981406,7 +981258,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
  
        buf[0] += b0;
        buf[1] += b1;
-@@ -35,23 +35,43 @@ static void TEA_transform(__u32 buf[4], 
+@@ -35,23 +35,43 @@
  
  
  /* The old legacy hash */
@@ -981416,26 +981268,10 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
 -      __u32 hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
 +      __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
 +      const unsigned char *ucp = (const unsigned char *) name;
-+
-+      while (len--) {
-+              hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373));
-+
-+              if (hash & 0x80000000)
-+                      hash -= 0x7fffffff;
-+              hash1 = hash0;
-+              hash0 = hash;
-+      }
-+      return hash0 << 1;
-+}
-+
-+static __u32 dx_hack_hash_signed(const char *name, int len)
-+{
-+      __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
-+      const signed char *scp = (const signed char *) name;
 +
        while (len--) {
 -              __u32 hash = hash1 + (hash0 ^ (*name++ * 7152373));
-+              hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373));
++              hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373));
  
 -              if (hash & 0x80000000) hash -= 0x7fffffff;
 +              if (hash & 0x80000000)
@@ -981448,6 +981284,22 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
  }
  
 -static void str2hashbuf(const char *msg, int len, __u32 *buf, int num)
++static __u32 dx_hack_hash_signed(const char *name, int len)
++{
++      __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9;
++      const signed char *scp = (const signed char *) name;
++
++      while (len--) {
++              hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373));
++
++              if (hash & 0x80000000)
++                      hash -= 0x7fffffff;
++              hash1 = hash0;
++              hash0 = hash;
++      }
++      return hash0 << 1;
++}
++
 +static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num)
  {
        __u32   pad, val;
@@ -981456,7 +981308,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
  
        pad = (__u32)len | ((__u32)len << 8);
        pad |= pad << 16;
-@@ -59,10 +79,38 @@ static void str2hashbuf(const char *msg,
+@@ -59,10 +79,38 @@
        val = pad;
        if (len > num*4)
                len = num * 4;
@@ -981497,7 +981349,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
                if ((i % 4) == 3) {
                        *buf++ = val;
                        val = pad;
-@@ -95,6 +143,8 @@ int ext4fs_dirhash(const char *name, int
+@@ -95,6 +143,8 @@
        const char      *p;
        int             i;
        __u32           in[8], buf[4];
@@ -981506,7 +981358,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
  
        /* Initialize the default seed for the hash checksum functions */
        buf[0] = 0x67452301;
-@@ -104,7 +154,7 @@ int ext4fs_dirhash(const char *name, int
+@@ -104,7 +154,7 @@
  
        /* Check to see if the seed is all zero's */
        if (hinfo->seed) {
@@ -981515,7 +981367,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
                        if (hinfo->seed[i])
                                break;
                }
-@@ -113,13 +163,18 @@ int ext4fs_dirhash(const char *name, int
+@@ -113,13 +163,18 @@
        }
  
        switch (hinfo->hash_version) {
@@ -981536,7 +981388,7 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
                        half_md4_transform(buf, in);
                        len -= 32;
                        p += 32;
-@@ -127,10 +182,12 @@ int ext4fs_dirhash(const char *name, int
+@@ -127,10 +182,12 @@
                minor_hash = buf[2];
                hash = buf[1];
                break;
@@ -981550,10 +981402,10 @@ diff -purN linux-2.6.27/fs/ext4/hash.c linux-2.6.27.19-5.1/fs/ext4/hash.c
                        TEA_transform(buf, in);
                        len -= 16;
                        p += 16;
-diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
---- linux-2.6.27/fs/ext4/ialloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ialloc.c       2009-03-25 16:11:36.000000000 +0000
-@@ -74,17 +74,17 @@ unsigned ext4_init_inode_bitmap(struct s
+diff -r 9608d5473017 fs/ext4/ialloc.c
+--- a/fs/ext4/ialloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ialloc.c Wed May 06 16:56:48 2009 +0100
+@@ -74,17 +74,17 @@
        /* If checksum is bad mark all blocks and inodes use to prevent
         * allocation, essentially implementing a per-group read-only flag. */
        if (!ext4_group_desc_csum_verify(sbi, block_group, gdp)) {
@@ -981576,7 +981428,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        bh->b_data);
  
        return EXT4_INODES_PER_GROUP(sb);
-@@ -111,27 +111,49 @@ ext4_read_inode_bitmap(struct super_bloc
+@@ -111,27 +111,49 @@
        if (unlikely(!bh)) {
                ext4_error(sb, __func__,
                            "Cannot read inode bitmap - "
@@ -981599,9 +981451,9 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                ext4_init_inode_bitmap(sb, bh, block_group, desc);
 +              set_bitmap_uptodate(bh);
                set_buffer_uptodate(bh);
--              unlock_buffer(bh);
-               spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
-+              unlock_buffer(bh);
++              spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
+               unlock_buffer(bh);
+-              spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
                return bh;
        }
        spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));
@@ -981630,7 +981482,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                            block_group, bitmap_blk);
                return NULL;
        }
-@@ -154,39 +176,40 @@ ext4_read_inode_bitmap(struct super_bloc
+@@ -154,39 +176,40 @@
   * though), and then we'd have two inodes sharing the
   * same inode number and space on the harddisk.
   */
@@ -981682,7 +981534,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
  
        /*
         * Note: we must free any quota before locking the superblock,
-@@ -200,12 +223,12 @@ void ext4_free_inode (handle_t *handle, 
+@@ -200,12 +223,12 @@
        is_directory = S_ISDIR(inode->i_mode);
  
        /* Do this BEFORE marking the inode not in use or returning an error */
@@ -981698,7 +981550,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                goto error_return;
        }
        block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb);
-@@ -222,10 +245,10 @@ void ext4_free_inode (handle_t *handle, 
+@@ -222,10 +245,10 @@
        /* Ok, now we can actually update the inode bitmaps.. */
        if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
                                        bit, bitmap_bh->b_data))
@@ -981712,7 +981564,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
  
                BUFFER_TRACE(bh2, "get_write_access");
                fatal = ext4_journal_get_write_access(handle, bh2);
-@@ -233,9 +256,12 @@ void ext4_free_inode (handle_t *handle, 
+@@ -233,9 +256,12 @@
  
                if (gdp) {
                        spin_lock(sb_bgl_lock(sbi, block_group));
@@ -981728,7 +981580,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        gdp->bg_checksum = ext4_group_desc_csum(sbi,
                                                        block_group, gdp);
                        spin_unlock(sb_bgl_lock(sbi, block_group));
-@@ -287,14 +313,14 @@ static int find_group_dir(struct super_b
+@@ -287,14 +313,14 @@
        avefreei = freei / ngroups;
  
        for (group = 0; group < ngroups; group++) {
@@ -981748,7 +981600,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        *best_group = group;
                        best_desc = desc;
                        ret = 0;
-@@ -366,7 +392,7 @@ found_flexbg:
+@@ -366,7 +392,7 @@
        for (i = best_flex * flex_size; i < ngroups &&
                     i < (best_flex + 1) * flex_size; i++) {
                desc = ext4_get_group_desc(sb, i, &bh);
@@ -981757,7 +981609,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        *best_group = i;
                        goto out;
                }
-@@ -440,17 +466,17 @@ static int find_group_orlov(struct super
+@@ -440,17 +466,17 @@
                for (i = 0; i < ngroups; i++) {
                        grp = (parent_group + i) % ngroups;
                        desc = ext4_get_group_desc(sb, grp, NULL);
@@ -981780,7 +981632,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                }
                if (ret == 0)
                        return ret;
-@@ -476,13 +502,13 @@ static int find_group_orlov(struct super
+@@ -476,13 +502,13 @@
        for (i = 0; i < ngroups; i++) {
                *group = (parent_group + i) % ngroups;
                desc = ext4_get_group_desc(sb, *group, NULL);
@@ -981798,7 +981650,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        continue;
                return 0;
        }
-@@ -491,8 +517,8 @@ fallback:
+@@ -491,8 +517,8 @@
        for (i = 0; i < ngroups; i++) {
                *group = (parent_group + i) % ngroups;
                desc = ext4_get_group_desc(sb, *group, NULL);
@@ -981809,7 +981661,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        return 0;
        }
  
-@@ -521,8 +547,8 @@ static int find_group_other(struct super
+@@ -521,8 +547,8 @@
         */
        *group = parent_group;
        desc = ext4_get_group_desc(sb, *group, NULL);
@@ -981820,7 +981672,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                return 0;
  
        /*
-@@ -545,8 +571,8 @@ static int find_group_other(struct super
+@@ -545,8 +571,8 @@
                if (*group >= ngroups)
                        *group -= ngroups;
                desc = ext4_get_group_desc(sb, *group, NULL);
@@ -981831,7 +981683,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        return 0;
        }
  
-@@ -559,7 +585,7 @@ static int find_group_other(struct super
+@@ -559,11 +585,84 @@
                if (++*group >= ngroups)
                        *group = 0;
                desc = ext4_get_group_desc(sb, *group, NULL);
@@ -981840,10 +981692,10 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        return 0;
        }
  
-@@ -567,6 +593,79 @@ static int find_group_other(struct super
- }
- /*
+       return -1;
++}
++
++/*
 + * claim the inode from the inode bitmap. If the group
 + * is uninit we need to take the groups's sb_bgl_lock
 + * and clear the uninit flag. The inode bitmap update
@@ -981914,13 +981766,10 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
 +err_ret:
 +      spin_unlock(sb_bgl_lock(sbi, group));
 +      return retval;
-+}
-+
-+/*
-  * There are two policies for allocating an inode.  If the new inode is
-  * a directory, then a forward search is made for a block group with both
-  * free space and a low directory-to-inode ratio; if that fails, then of
-@@ -576,16 +675,16 @@ static int find_group_other(struct super
+ }
+ /*
+@@ -576,16 +675,16 @@
   * For other inodes, search forward from the parent directory's block
   * group to find a free inode.
   */
@@ -981943,7 +981792,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        struct ext4_inode_info *ei;
        struct ext4_sb_info *sbi;
        int ret2, err = 0;
-@@ -613,7 +712,7 @@ struct inode *ext4_new_inode(handle_t *h
+@@ -613,7 +712,7 @@
        }
  
        if (S_ISDIR(mode)) {
@@ -981952,7 +981801,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        ret2 = find_group_dir(sb, dir, &group);
                else
                        ret2 = find_group_orlov(sb, dir, &group);
-@@ -628,40 +727,50 @@ got_group:
+@@ -628,40 +727,50 @@
        for (i = 0; i < sbi->s_groups_count; i++) {
                err = -EIO;
  
@@ -982015,7 +981864,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
  
                        if (++ino < EXT4_INODES_PER_GROUP(sb))
                                goto repeat_in_this_group;
-@@ -681,30 +790,16 @@ repeat_in_this_group:
+@@ -681,30 +790,16 @@
        goto out;
  
  got:
@@ -982051,14 +981900,14 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                        goto fail;
                }
  
-@@ -712,63 +807,29 @@ got:
+@@ -712,63 +807,29 @@
                spin_lock(sb_bgl_lock(sbi, group));
                /* recheck and clear flag under lock if we still need to */
                if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
--                      gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
-                       free = ext4_free_blocks_after_init(sb, group, gdp);
++                      free = ext4_free_blocks_after_init(sb, group, gdp);
+                       gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
+-                      free = ext4_free_blocks_after_init(sb, group, gdp);
 -                      gdp->bg_free_blocks_count = cpu_to_le16(free);
-+                      gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
 +                      ext4_free_blks_set(sb, gdp, free);
 +                      gdp->bg_checksum = ext4_group_desc_csum(sbi, group,
 +                                                              gdp);
@@ -982127,7 +981976,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
  
        percpu_counter_dec(&sbi->s_freeinodes_counter);
        if (S_ISDIR(mode))
-@@ -782,15 +843,15 @@ got:
+@@ -782,15 +843,15 @@
                spin_unlock(sb_bgl_lock(sbi, flex_group));
        }
  
@@ -982146,7 +981995,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        inode->i_mode = mode;
  
        inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);
-@@ -816,7 +877,6 @@ got:
+@@ -816,7 +877,6 @@
                ei->i_flags &= ~EXT4_DIRSYNC_FL;
        ei->i_file_acl = 0;
        ei->i_dtime = 0;
@@ -982154,7 +982003,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        ei->i_block_group = group;
  
        ext4_set_inode_flags(inode);
-@@ -832,7 +892,7 @@ got:
+@@ -832,7 +892,7 @@
        ei->i_extra_isize = EXT4_SB(sb)->s_want_extra_isize;
  
        ret = inode;
@@ -982163,7 +982012,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                err = -EDQUOT;
                goto fail_drop;
        }
-@@ -841,7 +901,7 @@ got:
+@@ -841,7 +901,7 @@
        if (err)
                goto fail_free_drop;
  
@@ -982172,7 +982021,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        if (err)
                goto fail_free_drop;
  
-@@ -867,7 +927,7 @@ out:
+@@ -867,7 +927,7 @@
        iput(inode);
        ret = ERR_PTR(err);
  really_out:
@@ -982181,7 +982030,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        return ret;
  
  fail_free_drop:
-@@ -878,7 +938,7 @@ fail_drop:
+@@ -878,7 +938,7 @@
        inode->i_flags |= S_NOQUOTA;
        inode->i_nlink = 0;
        iput(inode);
@@ -982190,7 +982039,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        return ERR_PTR(err);
  }
  
-@@ -959,7 +1019,7 @@ error:
+@@ -959,7 +1019,7 @@
        return ERR_PTR(err);
  }
  
@@ -982199,7 +982048,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
  {
        unsigned long desc_count;
        struct ext4_group_desc *gdp;
-@@ -974,10 +1034,10 @@ unsigned long ext4_count_free_inodes (st
+@@ -974,10 +1034,10 @@
        bitmap_count = 0;
        gdp = NULL;
        for (i = 0; i < EXT4_SB(sb)->s_groups_count; i++) {
@@ -982212,7 +982061,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                brelse(bitmap_bh);
                bitmap_bh = ext4_read_inode_bitmap(sb, i);
                if (!bitmap_bh)
-@@ -985,20 +1045,21 @@ unsigned long ext4_count_free_inodes (st
+@@ -985,20 +1045,21 @@
  
                x = ext4_count_free(bitmap_bh, EXT4_INODES_PER_GROUP(sb) / 8);
                printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n",
@@ -982239,7 +982088,7 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
                cond_resched();
        }
        return desc_count;
-@@ -1006,16 +1067,16 @@ unsigned long ext4_count_free_inodes (st
+@@ -1006,16 +1067,16 @@
  }
  
  /* Called at mount-time, super-block is locked */
@@ -982259,10 +982108,10 @@ diff -purN linux-2.6.27/fs/ext4/ialloc.c linux-2.6.27.19-5.1/fs/ext4/ialloc.c
        }
        return count;
  }
-diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
---- linux-2.6.27/fs/ext4/inode.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/inode.c        2009-03-25 16:11:36.000000000 +0000
-@@ -190,7 +190,7 @@ static int ext4_journal_test_restart(han
+diff -r 9608d5473017 fs/ext4/inode.c
+--- a/fs/ext4/inode.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/inode.c  Wed May 06 16:56:48 2009 +0100
+@@ -190,7 +190,7 @@
  /*
   * Called at the last iput() if i_nlink is zero.
   */
@@ -982271,7 +982120,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  {
        handle_t *handle;
        int err;
-@@ -330,11 +330,11 @@ static int ext4_block_to_path(struct ino
+@@ -330,11 +330,11 @@
        int final = 0;
  
        if (i_block < 0) {
@@ -982285,7 +982134,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                offsets[n++] = EXT4_IND_BLOCK;
                offsets[n++] = i_block;
                final = ptrs;
-@@ -400,14 +400,14 @@ static Indirect *ext4_get_branch(struct 
+@@ -400,14 +400,14 @@
  
        *err = 0;
        /* i_data is not going away, no lock needed */
@@ -982302,7 +982151,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                /* Reader: end */
                if (!p->key)
                        goto no_block;
-@@ -443,7 +443,7 @@ no_block:
+@@ -443,7 +443,7 @@
  static ext4_fsblk_t ext4_find_near(struct inode *inode, Indirect *ind)
  {
        struct ext4_inode_info *ei = EXT4_I(inode);
@@ -982311,7 +982160,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        __le32 *p;
        ext4_fsblk_t bg_start;
        ext4_fsblk_t last_block;
-@@ -486,18 +486,9 @@ static ext4_fsblk_t ext4_find_near(struc
+@@ -486,18 +486,9 @@
  static ext4_fsblk_t ext4_find_goal(struct inode *inode, ext4_lblk_t block,
                Indirect *partial)
  {
@@ -982319,19 +982168,21 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -
 -      block_i =  EXT4_I(inode)->i_block_alloc_info;
 -
-       /*
+-      /*
 -       * try the heuristic for sequential allocation,
 -       * failing that at least try to get decent locality.
-+       * XXX need to get goal block from mballoc's data structures
-        */
+-       */
 -      if (block_i && (block == block_i->last_alloc_logical_block + 1)
 -              && (block_i->last_alloc_physical_block != 0)) {
 -              return block_i->last_alloc_physical_block + 1;
 -      }
++      /*
++       * XXX need to get goal block from mballoc's data structures
++       */
  
        return ext4_find_near(inode, partial);
  }
-@@ -514,10 +505,10 @@ static ext4_fsblk_t ext4_find_goal(struc
+@@ -514,10 +505,10 @@
   *    return the total number of blocks to be allocate, including the
   *    direct and indirect blocks.
   */
@@ -982344,7 +982195,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        /*
         * Simple case, [t,d]Indirect block(s) has not allocated yet
-@@ -555,6 +546,7 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -555,6 +546,7 @@
                                int indirect_blks, int blks,
                                ext4_fsblk_t new_blocks[4], int *err)
  {
@@ -982352,7 +982203,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        int target, i;
        unsigned long count = 0, blk_allocated = 0;
        int index = 0;
-@@ -603,10 +595,15 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -603,10 +595,15 @@
        if (!target)
                goto allocated;
        /* Now allocate data blocks */
@@ -982372,7 +982223,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        if (*err && (target == blks)) {
                /*
                 * if the allocation failed and we didn't allocate
-@@ -622,7 +619,7 @@ static int ext4_alloc_blocks(handle_t *h
+@@ -622,7 +619,7 @@
                 */
                        new_blocks[index] = current_block;
                }
@@ -982381,7 +982232,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        }
  allocated:
        /* total number of blocks allocated for direct blocks */
-@@ -630,7 +627,7 @@ allocated:
+@@ -630,7 +627,7 @@
        *err = 0;
        return ret;
  failed_out:
@@ -982390,7 +982241,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                ext4_free_blocks(handle, inode, new_blocks[i], 1, 0);
        return ret;
  }
-@@ -703,7 +700,7 @@ static int ext4_alloc_branch(handle_t *h
+@@ -703,7 +700,7 @@
                branch[n].p = (__le32 *) bh->b_data + offsets[n];
                branch[n].key = cpu_to_le32(new_blocks[n]);
                *branch[n].p = branch[n].key;
@@ -982399,7 +982250,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        current_block = new_blocks[n];
                        /*
                         * End of chain, update the last new metablock of
-@@ -730,7 +727,7 @@ failed:
+@@ -730,7 +727,7 @@
                BUFFER_TRACE(branch[i].bh, "call jbd2_journal_forget");
                ext4_journal_forget(handle, branch[i].bh);
        }
@@ -982408,7 +982259,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                ext4_free_blocks(handle, inode, new_blocks[i], 1, 0);
  
        ext4_free_blocks(handle, inode, new_blocks[i], num, 0);
-@@ -757,10 +754,8 @@ static int ext4_splice_branch(handle_t *
+@@ -757,10 +754,8 @@
  {
        int i;
        int err = 0;
@@ -982419,7 +982270,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        /*
         * If we're splicing into a [td]indirect block (as opposed to the
         * inode) then we need to get write access to the [td]indirect block
-@@ -783,18 +778,7 @@ static int ext4_splice_branch(handle_t *
+@@ -783,18 +778,7 @@
        if (num == 0 && blks > 1) {
                current_block = le32_to_cpu(where->key) + 1;
                for (i = 1; i < blks; i++)
@@ -982439,7 +982290,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        }
  
        /* We are done with atomic stuff, now do the rest of housekeeping */
-@@ -861,10 +845,10 @@ err_out:
+@@ -861,10 +845,10 @@
   * down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block
   * (ie, create is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
   */
@@ -982454,7 +982305,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  {
        int err = -EIO;
        ext4_lblk_t offsets[4];
-@@ -914,12 +898,8 @@ int ext4_get_blocks_handle(handle_t *han
+@@ -914,12 +898,8 @@
                goto cleanup;
  
        /*
@@ -982468,7 +982319,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        goal = ext4_find_goal(inode, iblock, partial);
  
        /* the number of blocks need to allocate for [d,t]indirect blocks */
-@@ -1030,19 +1010,20 @@ static void ext4_da_update_reserve_space
+@@ -1030,19 +1010,20 @@
        BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks);
        mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb;
  
@@ -982497,7 +982348,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
  }
  
-@@ -1069,7 +1050,7 @@ static void ext4_da_update_reserve_space
+@@ -1069,7 +1050,7 @@
   * It returns the error in case of allocation failure.
   */
  int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
@@ -982506,7 +982357,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        int create, int extend_disksize, int flag)
  {
        int retval;
-@@ -1241,7 +1222,7 @@ struct buffer_head *ext4_getblk(handle_t
+@@ -1241,7 +1222,7 @@
                        BUFFER_TRACE(bh, "call get_create_access");
                        fatal = ext4_journal_get_create_access(handle, bh);
                        if (!fatal && !buffer_uptodate(bh)) {
@@ -982515,7 +982366,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                                set_buffer_uptodate(bh);
                        }
                        unlock_buffer(bh);
-@@ -1266,7 +1247,7 @@ err:
+@@ -1266,7 +1247,7 @@
  struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
                               ext4_lblk_t block, int create, int *err)
  {
@@ -982524,7 +982375,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        bh = ext4_getblk(handle, inode, block, create, err);
        if (!bh)
-@@ -1282,13 +1263,13 @@ struct buffer_head *ext4_bread(handle_t 
+@@ -1282,13 +1263,13 @@
        return NULL;
  }
  
@@ -982545,7 +982396,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  {
        struct buffer_head *bh;
        unsigned block_start, block_end;
-@@ -1296,9 +1277,9 @@ static int walk_page_buffers(    handle_t *
+@@ -1296,9 +1277,9 @@
        int err, ret = 0;
        struct buffer_head *next;
  
@@ -982558,7 +982409,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        {
                next = bh->b_this_page;
                block_end = block_start + blocksize;
-@@ -1351,26 +1332,26 @@ static int ext4_write_begin(struct file 
+@@ -1351,26 +1332,26 @@
                                loff_t pos, unsigned len, unsigned flags,
                                struct page **pagep, void **fsdata)
  {
@@ -982584,25 +982435,28 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -      if (IS_ERR(handle)) {
 -              ret = PTR_ERR(handle);
 -              goto out;
+-      }
+-
+-      page = __grab_cache_page(mapping, index);
 +      handle = ext4_journal_start(inode, needed_blocks);
 +      if (IS_ERR(handle)) {
 +              ret = PTR_ERR(handle);
 +              goto out;
-       }
--      page = __grab_cache_page(mapping, index);
++      }
++
 +      page = grab_cache_page_write_begin(mapping, index, flags);
        if (!page) {
                ext4_journal_stop(handle);
                ret = -ENOMEM;
-@@ -1387,9 +1368,16 @@ retry:
+@@ -1387,9 +1368,16 @@
        }
  
        if (ret) {
 -              unlock_page(page);
-+              unlock_page(page);
-               ext4_journal_stop(handle);
+-              ext4_journal_stop(handle);
 -              page_cache_release(page);
++              unlock_page(page);
++              ext4_journal_stop(handle);
 +              page_cache_release(page);
 +              /*
 +               * block_write_begin may have instantiated a few blocks
@@ -982614,7 +982468,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        }
  
        if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
-@@ -1426,16 +1414,18 @@ static int ext4_ordered_write_end(struct
+@@ -1426,16 +1414,18 @@
        ret = ext4_jbd2_file_inode(handle, inode);
  
        if (ret == 0) {
@@ -982640,7 +982494,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                ret2 = generic_write_end(file, mapping, pos, len, copied,
                                                        page, fsdata);
                copied = ret2;
-@@ -1460,8 +1450,14 @@ static int ext4_writeback_write_end(stru
+@@ -1460,8 +1450,14 @@
        loff_t new_i_size;
  
        new_i_size = pos + copied;
@@ -982657,7 +982511,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        ret2 = generic_write_end(file, mapping, pos, len, copied,
                                                        page, fsdata);
-@@ -1486,6 +1482,7 @@ static int ext4_journalled_write_end(str
+@@ -1486,6 +1482,7 @@
        int ret = 0, ret2;
        int partial = 0;
        unsigned from, to;
@@ -982665,7 +982519,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        from = pos & (PAGE_CACHE_SIZE - 1);
        to = from + len;
-@@ -1500,11 +1497,12 @@ static int ext4_journalled_write_end(str
+@@ -1500,11 +1497,12 @@
                                to, &partial, write_end_fn);
        if (!partial)
                SetPageUptodate(page);
@@ -982681,7 +982535,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                ret2 = ext4_mark_inode_dirty(handle, inode);
                if (!ret)
                        ret = ret2;
-@@ -1521,6 +1519,7 @@ static int ext4_journalled_write_end(str
+@@ -1521,6 +1519,7 @@
  
  static int ext4_da_reserve_space(struct inode *inode, int nrblocks)
  {
@@ -982689,7 +982543,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
         struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
         unsigned long md_needed, mdblocks, total = 0;
  
-@@ -1529,6 +1528,7 @@ static int ext4_da_reserve_space(struct 
+@@ -1529,6 +1528,7 @@
         * in order to allocate nrblocks
         * worse case is one extent per block
         */
@@ -982697,7 +982551,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
        total = EXT4_I(inode)->i_reserved_data_blocks + nrblocks;
        mdblocks = ext4_calc_metadata_amount(inode, total);
-@@ -1537,13 +1537,14 @@ static int ext4_da_reserve_space(struct 
+@@ -1537,13 +1537,14 @@
        md_needed = mdblocks - EXT4_I(inode)->i_reserved_meta_blocks;
        total = md_needed + nrblocks;
  
@@ -982716,7 +982570,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        EXT4_I(inode)->i_reserved_data_blocks += nrblocks;
        EXT4_I(inode)->i_reserved_meta_blocks = mdblocks;
  
-@@ -1585,8 +1586,8 @@ static void ext4_da_release_space(struct
+@@ -1585,8 +1586,8 @@
  
        release = to_free + mdb_free;
  
@@ -982727,7 +982581,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        /* update per-inode reservations */
        BUG_ON(to_free > EXT4_I(inode)->i_reserved_data_blocks);
-@@ -1629,7 +1630,8 @@ struct mpage_da_data {
+@@ -1629,7 +1630,8 @@
        get_block_t *get_block;
        struct writeback_control *wbc;
        int io_done;
@@ -982737,17 +982591,17 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  };
  
  /*
-@@ -1648,18 +1650,25 @@ struct mpage_da_data {
+@@ -1648,18 +1650,25 @@
   */
  static int mpage_da_submit_io(struct mpage_da_data *mpd)
  {
 -      struct address_space *mapping = mpd->inode->i_mapping;
--      int ret = 0, err, nr_pages, i;
--      unsigned long index, end;
 +      long pages_skipped;
-       struct pagevec pvec;
++      struct pagevec pvec;
 +      unsigned long index, end;
-+      int ret = 0, err, nr_pages, i;
+       int ret = 0, err, nr_pages, i;
+-      unsigned long index, end;
+-      struct pagevec pvec;
 +      struct inode *inode = mpd->inode;
 +      struct address_space *mapping = inode->i_mapping;
  
@@ -982768,7 +982622,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE);
                if (nr_pages == 0)
                        break;
-@@ -1671,8 +1680,16 @@ static int mpage_da_submit_io(struct mpa
+@@ -1671,8 +1680,16 @@
                                break;
                        index++;
  
@@ -982786,7 +982640,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                                mpd->pages_written++;
                        /*
                         * In error case, we have to continue because
-@@ -1783,6 +1800,57 @@ static inline void __unmap_underlying_bl
+@@ -1783,6 +1800,57 @@
                unmap_underlying_metadata(bdev, bh->b_blocknr + i);
  }
  
@@ -982844,18 +982698,20 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  /*
   * mpage_da_map_blocks - go through given space
   *
-@@ -1792,32 +1860,69 @@ static inline void __unmap_underlying_bl
+@@ -1792,32 +1860,69 @@
   * The function skips space we know is already mapped to disk blocks.
   *
   */
 -static void mpage_da_map_blocks(struct mpage_da_data *mpd)
+-{
+-      int err = 0;
 +static int  mpage_da_map_blocks(struct mpage_da_data *mpd)
- {
-       int err = 0;
--      struct buffer_head *lbh = &mpd->lbh;
++{
++      int err = 0;
++      struct buffer_head new;
+       struct buffer_head *lbh = &mpd->lbh;
 -      sector_t next = lbh->b_blocknr;
-       struct buffer_head new;
-+      struct buffer_head *lbh = &mpd->lbh;
+-      struct buffer_head new;
 +      sector_t next;
  
        /*
@@ -982923,7 +982779,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        BUG_ON(new.b_size == 0);
  
        if (buffer_new(&new))
-@@ -1830,7 +1935,7 @@ static void mpage_da_map_blocks(struct m
+@@ -1830,7 +1935,7 @@
        if (buffer_delay(lbh) || buffer_unwritten(lbh))
                mpage_put_bnr_to_bhs(mpd, next, &new);
  
@@ -982932,7 +982788,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  }
  
  #define BH_FLAGS ((1 << BH_Uptodate) | (1 << BH_Mapped) | \
-@@ -1899,8 +2004,8 @@ flush_it:
+@@ -1899,8 +2004,8 @@
         * We couldn't merge the block to our extent, so we
         * need to flush current  extent and start new one
         */
@@ -982943,7 +982799,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        mpd->io_done = 1;
        return;
  }
-@@ -1942,8 +2047,8 @@ static int __mpage_da_writepage(struct p
+@@ -1942,8 +2047,8 @@
                 * and start IO on them using writepage()
                 */
                if (mpd->next_page != mpd->first_page) {
@@ -982954,7 +982810,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        /*
                         * skip rest of the page in the page_vec
                         */
-@@ -1991,11 +2096,29 @@ static int __mpage_da_writepage(struct p
+@@ -1991,11 +2096,29 @@
                bh = head;
                do {
                        BUG_ON(buffer_locked(bh));
@@ -982984,22 +982840,27 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        }
                        logical++;
                } while ((bh = bh->b_this_page) != head);
-@@ -2018,39 +2141,42 @@ static int __mpage_da_writepage(struct p
+@@ -2018,39 +2141,42 @@
   */
  static int mpage_da_writepages(struct address_space *mapping,
                               struct writeback_control *wbc,
 -                             get_block_t get_block)
-+                             struct mpage_da_data *mpd)
- {
+-{
 -      struct mpage_da_data mpd;
 -      long to_write;
++                             struct mpage_da_data *mpd)
++{
        int ret;
+-
+-      if (!get_block)
 +      long nr_to_write;
 +      pgoff_t index;
++
++
++
++      if (!mpd->get_block)
+               return generic_writepages(mapping, wbc);
  
--      if (!get_block)
--              return generic_writepages(mapping, wbc);
--
 -      mpd.wbc = wbc;
 -      mpd.inode = mapping->host;
 -      mpd.lbh.b_size = 0;
@@ -983010,13 +982871,11 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -      mpd.get_block = get_block;
 -      mpd.io_done = 0;
 -      mpd.pages_written = 0;
+-
 -      to_write = wbc->nr_to_write;
+-
 -      ret = write_cache_pages(mapping, wbc, __mpage_da_writepage, &mpd);
-+      if (!mpd->get_block)
-+              return generic_writepages(mapping, wbc);
+-
 +      mpd->lbh.b_size = 0;
 +      mpd->lbh.b_state = 0;
 +      mpd->lbh.b_blocknr = 0;
@@ -983038,11 +982897,12 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -              mpage_da_map_blocks(&mpd);
 -              mpage_da_submit_io(&mpd);
 -      }
+-
+-      wbc->nr_to_write = to_write - mpd.pages_written;
 +      if (!mpd->io_done && mpd->next_page != mpd->first_page) {
 +              if (mpage_da_map_blocks(mpd) == 0)
 +                      mpage_da_submit_io(mpd);
--      wbc->nr_to_write = to_write - mpd.pages_written;
++
 +              mpd->io_done = 1;
 +              ret = MPAGE_DA_EXTENT_TAIL;
 +      }
@@ -983050,7 +982910,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        return ret;
  }
  
-@@ -2103,18 +2229,24 @@ static int ext4_da_get_block_write(struc
+@@ -2103,17 +2229,23 @@
        handle_t *handle = NULL;
  
        handle = ext4_journal_current_handle();
@@ -983069,7 +982929,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        if (ret > 0) {
 +
                bh_result->b_size = (ret << inode->i_blkbits);
++
 +              if (ext4_should_order_data(inode)) {
 +                      int retval;
 +                      retval = ext4_jbd2_file_inode(handle, inode);
@@ -983080,11 +982940,10 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 +                               */
 +                              return retval;
 +              }
-+
                /*
                 * Update on-disk size along with block allocation
-                * we don't use 'extend_disksize' as size may change
-@@ -2124,18 +2256,9 @@ static int ext4_da_get_block_write(struc
+@@ -2124,18 +2256,9 @@
                if (disksize > i_size_read(inode))
                        disksize = i_size_read(inode);
                if (disksize > EXT4_I(inode)->i_disksize) {
@@ -983106,7 +982965,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                }
                ret = 0;
        }
-@@ -2181,7 +2304,7 @@ static int ext4_da_writepage(struct page
+@@ -2181,7 +2304,7 @@
  {
        int ret = 0;
        loff_t size;
@@ -983115,7 +982974,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        struct buffer_head *page_bufs;
        struct inode *inode = page->mapping->host;
  
-@@ -2242,6 +2365,8 @@ static int ext4_da_writepage(struct page
+@@ -2242,6 +2365,8 @@
                        unlock_page(page);
                        return 0;
                }
@@ -983124,7 +982983,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        }
  
        if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))
-@@ -2282,11 +2407,14 @@ static int ext4_da_writepages_trans_bloc
+@@ -2282,11 +2407,14 @@
  static int ext4_da_writepages(struct address_space *mapping,
                              struct writeback_control *wbc)
  {
@@ -983132,8 +982991,9 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 +      int range_whole = 0;
        handle_t *handle = NULL;
 -      loff_t range_start = 0;
+-      struct inode *inode = mapping->host;
 +      struct mpage_da_data mpd;
-       struct inode *inode = mapping->host;
++      struct inode *inode = mapping->host;
 +      int pages_written = 0;
 +      long pages_skipped;
        int needed_blocks, ret = 0, nr_to_writebump = 0;
@@ -983141,7 +983001,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);
  
        /*
-@@ -2296,6 +2424,20 @@ static int ext4_da_writepages(struct add
+@@ -2296,6 +2424,20 @@
         */
        if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
                return 0;
@@ -983162,25 +983022,27 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        /*
         * Make sure nr_to_write is >= sbi->s_mb_stream_request
         * This make sure small files blocks are allocated in
-@@ -2306,20 +2448,24 @@ static int ext4_da_writepages(struct add
+@@ -2306,20 +2448,24 @@
                nr_to_writebump = sbi->s_mb_stream_request - wbc->nr_to_write;
                wbc->nr_to_write = sbi->s_mb_stream_request;
        }
-+      if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
-+              range_whole = 1;
+-
 -      if (!wbc->range_cyclic)
 -              /*
 -               * If range_cyclic is not set force range_cont
 -               * and save the old writeback_index
 -               */
 -              wbc->range_cont = 1;
+-
+-      range_start =  wbc->range_start;
++      if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
++              range_whole = 1;
++
 +      if (wbc->range_cyclic)
 +              index = mapping->writeback_index;
 +      else
 +              index = wbc->range_start >> PAGE_CACHE_SHIFT;
--      range_start =  wbc->range_start;
++
 +      mpd.wbc = wbc;
 +      mpd.inode = mapping->host;
 +
@@ -983197,7 +983059,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
                /*
                 * we  insert one extent at a time. So we need
-@@ -2334,63 +2480,87 @@ restart_loop:
+@@ -2334,61 +2480,85 @@
                handle = ext4_journal_start(inode, needed_blocks);
                if (IS_ERR(handle)) {
                        ret = PTR_ERR(handle);
@@ -983220,14 +983082,16 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -                              goto out_writepages;
 -                      }
 -              }
-+              mpd.get_block = ext4_da_get_block_write;
-+              ret = mpage_da_writepages(mapping, wbc, &mpd);
+-
 -              to_write -= wbc->nr_to_write;
 -              ret = mpage_da_writepages(mapping, wbc,
 -                                        ext4_da_get_block_write);
-               ext4_journal_stop(handle);
+-              ext4_journal_stop(handle);
 -              if (ret == MPAGE_DA_EXTENT_TAIL) {
++              mpd.get_block = ext4_da_get_block_write;
++              ret = mpage_da_writepages(mapping, wbc, &mpd);
++
++              ext4_journal_stop(handle);
 +
 +              if (mpd.retval == -ENOSPC) {
 +                      /* commit the transaction which would
@@ -983266,7 +983130,8 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -                              wbc->pages_skipped - pages_skipped;
 -              wbc->pages_skipped = pages_skipped;
 -              goto restart_loop;
-       }
+-      }
++      }
 +      if (pages_skipped != wbc->pages_skipped)
 +              printk(KERN_EMERG "This should not happen leaving %s "
 +                              "with nr_to_write = %ld ret = %d\n",
@@ -983284,10 +983149,11 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  out_writepages:
 -      wbc->nr_to_write = to_write - nr_to_writebump;
 -      wbc->range_start = range_start;
+-      return ret;
 +      wbc->nr_to_write -= nr_to_writebump;
-       return ret;
- }
++      return ret;
++}
++
 +#define FALL_BACK_TO_NONDELALLOC 1
 +static int ext4_nonda_switch(struct super_block *sb)
 +{
@@ -983313,12 +983179,10 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 +              return 1;
 +      }
 +      return 0;
-+}
-+
+ }
  static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
-                               loff_t pos, unsigned len, unsigned flags,
-                               struct page **pagep, void **fsdata)
-@@ -2406,6 +2576,12 @@ static int ext4_da_write_begin(struct fi
+@@ -2406,6 +2576,12 @@
        from = pos & (PAGE_CACHE_SIZE - 1);
        to = from + len;
  
@@ -983331,7 +983195,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  retry:
        /*
         * With delayed allocation, we don't log the i_disksize update
-@@ -2419,7 +2595,7 @@ retry:
+@@ -2419,7 +2595,7 @@
                goto out;
        }
  
@@ -983340,7 +983204,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        if (!page) {
                ext4_journal_stop(handle);
                ret = -ENOMEM;
-@@ -2433,6 +2609,13 @@ retry:
+@@ -2433,6 +2609,13 @@
                unlock_page(page);
                ext4_journal_stop(handle);
                page_cache_release(page);
@@ -983354,7 +983218,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        }
  
        if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
-@@ -2456,7 +2639,7 @@ static int ext4_da_should_update_i_disks
+@@ -2456,7 +2639,7 @@
        bh = page_buffers(page);
        idx = offset >> inode->i_blkbits;
  
@@ -983363,7 +983227,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                bh = bh->b_this_page;
  
        if (!buffer_mapped(bh) || (buffer_delay(bh)))
-@@ -2474,9 +2657,22 @@ static int ext4_da_write_end(struct file
+@@ -2474,9 +2657,22 @@
        handle_t *handle = ext4_journal_current_handle();
        loff_t new_i_size;
        unsigned long start, end;
@@ -983387,7 +983251,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        /*
         * generic_write_end() will run mark_inode_dirty() if i_size
-@@ -2500,6 +2696,11 @@ static int ext4_da_write_end(struct file
+@@ -2500,6 +2696,11 @@
                                EXT4_I(inode)->i_disksize = new_i_size;
                        }
                        up_write(&EXT4_I(inode)->i_data_sem);
@@ -983399,7 +983263,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                }
        }
        ret2 = generic_write_end(file, mapping, pos, len, copied,
-@@ -2591,7 +2792,7 @@ static sector_t ext4_bmap(struct address
+@@ -2591,7 +2792,7 @@
                        return 0;
        }
  
@@ -983408,7 +983272,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  }
  
  static int bget_one(handle_t *handle, struct buffer_head *bh)
-@@ -3197,7 +3398,7 @@ static Indirect *ext4_find_shared(struct
+@@ -3197,7 +3398,7 @@
        if (!partial->key && *partial->p)
                /* Writer: end */
                goto no_top;
@@ -983417,7 +983281,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                ;
        /*
         * OK, we've found the last block that must survive. The rest of our
-@@ -3216,7 +3417,7 @@ static Indirect *ext4_find_shared(struct
+@@ -3216,7 +3417,7 @@
        }
        /* Writer: end */
  
@@ -983426,7 +983290,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                brelse(partial->bh);
                partial--;
        }
-@@ -3408,9 +3609,9 @@ static void ext4_free_branches(handle_t 
+@@ -3408,9 +3609,9 @@
                        /* This zaps the entire block.  Bottom up. */
                        BUFFER_TRACE(bh, "free child branches");
                        ext4_free_branches(handle, inode, bh,
@@ -983439,7 +983303,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
                        /*
                         * We've probably journalled the indirect block several
-@@ -3578,7 +3779,7 @@ void ext4_truncate(struct inode *inode)
+@@ -3578,7 +3779,7 @@
         */
        down_write(&ei->i_data_sem);
  
@@ -983448,7 +983312,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        /*
         * The orphan list entry will now protect us from any crash which
-@@ -3673,41 +3874,6 @@ out_stop:
+@@ -3673,41 +3874,6 @@
        ext4_journal_stop(handle);
  }
  
@@ -983490,12 +983354,15 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  /*
   * ext4_get_inode_loc returns with an extra refcount against the inode's
   * underlying buffer_head on success. If 'in_mem' is true, we have all
-@@ -3717,19 +3883,35 @@ static ext4_fsblk_t ext4_get_inode_block
+@@ -3717,19 +3883,35 @@
  static int __ext4_get_inode_loc(struct inode *inode,
                                struct ext4_iloc *iloc, int in_mem)
  {
 -      ext4_fsblk_t block;
 -      struct buffer_head *bh;
+-
+-      block = ext4_get_inode_block(inode->i_sb, inode->i_ino, iloc);
+-      if (!block)
 +      struct ext4_group_desc  *gdp;
 +      struct buffer_head      *bh;
 +      struct super_block      *sb = inode->i_sb;
@@ -983504,16 +983371,14 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 +
 +      iloc->bh = NULL;
 +      if (!ext4_valid_inum(sb, inode->i_ino))
-+              return -EIO;
+               return -EIO;
  
--      block = ext4_get_inode_block(inode->i_sb, inode->i_ino, iloc);
--      if (!block)
+-      bh = sb_getblk(inode->i_sb, block);
 +      iloc->block_group = (inode->i_ino - 1) / EXT4_INODES_PER_GROUP(sb);
 +      gdp = ext4_get_group_desc(sb, iloc->block_group, NULL);
 +      if (!gdp)
-               return -EIO;
--      bh = sb_getblk(inode->i_sb, block);
++              return -EIO;
++
 +      /*
 +       * Figure out the offset within the block group inode table
 +       */
@@ -983535,7 +983400,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                return -EIO;
        }
        if (!buffer_uptodate(bh)) {
-@@ -3757,28 +3939,12 @@ static int __ext4_get_inode_loc(struct i
+@@ -3757,28 +3939,12 @@
                 */
                if (in_mem) {
                        struct buffer_head *bitmap_bh;
@@ -983553,22 +983418,22 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
 -                                      EXT4_INODES_PER_GROUP(inode->i_sb));
 -                      start = inode_offset & ~(inodes_per_buffer - 1);
 +                      int i, start;
++
++                      start = inode_offset & ~(inodes_per_block - 1);
  
--                      /* Is the inode bitmap in cache? */
+                       /* Is the inode bitmap in cache? */
 -                      desc = ext4_get_group_desc(inode->i_sb,
 -                                              block_group, NULL);
 -                      if (!desc)
 -                              goto make_io;
-+                      start = inode_offset & ~(inodes_per_block - 1);
+-
 -                      bitmap_bh = sb_getblk(inode->i_sb,
 -                              ext4_inode_bitmap(inode->i_sb, desc));
-+                      /* Is the inode bitmap in cache? */
 +                      bitmap_bh = sb_getblk(sb, ext4_inode_bitmap(sb, gdp));
                        if (!bitmap_bh)
                                goto make_io;
  
-@@ -3791,14 +3957,14 @@ static int __ext4_get_inode_loc(struct i
+@@ -3791,14 +3957,14 @@
                                brelse(bitmap_bh);
                                goto make_io;
                        }
@@ -983585,7 +983450,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                                /* all other inodes are free, so skip I/O */
                                memset(bh->b_data, 0, bh->b_size);
                                set_buffer_uptodate(bh);
-@@ -3809,6 +3975,36 @@ static int __ext4_get_inode_loc(struct i
+@@ -3809,6 +3975,36 @@
  
  make_io:
                /*
@@ -983622,7 +983487,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                 * There are other valid inodes in the buffer, this inode
                 * has in-inode xattrs, or we don't have this inode in memory.
                 * Read the block from disk.
-@@ -3818,10 +4014,9 @@ make_io:
+@@ -3818,10 +4014,9 @@
                submit_bh(READ_META, bh);
                wait_on_buffer(bh);
                if (!buffer_uptodate(bh)) {
@@ -983636,7 +983501,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        brelse(bh);
                        return -EIO;
                }
-@@ -3913,11 +4108,10 @@ struct inode *ext4_iget(struct super_blo
+@@ -3913,11 +4108,10 @@
                return inode;
  
        ei = EXT4_I(inode);
@@ -983649,7 +983514,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        ret = __ext4_get_inode_loc(inode, &iloc, 0);
        if (ret < 0)
-@@ -3927,7 +4121,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3927,7 +4121,7 @@
        inode->i_mode = le16_to_cpu(raw_inode->i_mode);
        inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low);
        inode->i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low);
@@ -983658,7 +983523,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                inode->i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
                inode->i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
        }
-@@ -3945,7 +4139,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3945,7 +4139,7 @@
                if (inode->i_mode == 0 ||
                    !(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) {
                        /* this inode is deleted */
@@ -983667,7 +983532,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        ret = -ESTALE;
                        goto bad_inode;
                }
-@@ -3978,7 +4172,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -3978,7 +4172,7 @@
                ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
                if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
                    EXT4_INODE_SIZE(inode->i_sb)) {
@@ -983676,7 +983541,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        ret = -EIO;
                        goto bad_inode;
                }
-@@ -4031,7 +4225,7 @@ struct inode *ext4_iget(struct super_blo
+@@ -4031,7 +4225,7 @@
                        init_special_inode(inode, inode->i_mode,
                           new_decode_dev(le32_to_cpu(raw_inode->i_block[1])));
        }
@@ -983685,7 +983550,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        ext4_set_inode_flags(inode);
        unlock_new_inode(inode);
        return inode;
-@@ -4048,7 +4242,6 @@ static int ext4_inode_blocks_set(handle_
+@@ -4048,7 +4242,6 @@
        struct inode *inode = &(ei->vfs_inode);
        u64 i_blocks = inode->i_blocks;
        struct super_block *sb = inode->i_sb;
@@ -983693,7 +983558,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  
        if (i_blocks <= ~0U) {
                /*
-@@ -4058,36 +4251,27 @@ static int ext4_inode_blocks_set(handle_
+@@ -4058,36 +4251,27 @@
                raw_inode->i_blocks_lo   = cpu_to_le32(i_blocks);
                raw_inode->i_blocks_high = 0;
                ei->i_flags &= ~EXT4_HUGE_FILE_FL;
@@ -983737,7 +983602,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
  }
  
  /*
-@@ -4113,14 +4297,14 @@ static int ext4_do_update_inode(handle_t
+@@ -4113,14 +4297,14 @@
  
        ext4_get_inode_flags(ei);
        raw_inode->i_mode = cpu_to_le16(inode->i_mode);
@@ -983754,7 +983619,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
                        raw_inode->i_uid_high =
                                cpu_to_le16(high_16_bits(inode->i_uid));
                        raw_inode->i_gid_high =
-@@ -4208,7 +4392,7 @@ static int ext4_do_update_inode(handle_t
+@@ -4208,7 +4392,7 @@
        ei->i_state &= ~EXT4_STATE_NEW;
  
  out_brelse:
@@ -983763,20 +983628,21 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        ext4_std_error(inode->i_sb, err);
        return err;
  }
-@@ -4444,9 +4628,10 @@ static int ext4_indirect_trans_blocks(st
+@@ -4444,9 +4628,10 @@
  static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)
  {
        if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
 -              return ext4_indirect_trans_blocks(inode, nrblocks, 0);
 -      return ext4_ext_index_trans_blocks(inode, nrblocks, 0);
+-}
 +              return ext4_indirect_trans_blocks(inode, nrblocks, chunk);
 +      return ext4_ext_index_trans_blocks(inode, nrblocks, chunk);
- }
++}
 +
  /*
   * Account for index blocks, block groups bitmaps and block group
   * descriptor blocks if modify datablocks and index blocks
-@@ -4811,6 +4996,7 @@ int ext4_page_mkwrite(struct vm_area_str
+@@ -4811,6 +4996,7 @@
        loff_t size;
        unsigned long len;
        int ret = -EINVAL;
@@ -983784,7 +983650,7 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        struct file *file = vma->vm_file;
        struct inode *inode = file->f_path.dentry->d_inode;
        struct address_space *mapping = inode->i_mapping;
-@@ -4849,11 +5035,11 @@ int ext4_page_mkwrite(struct vm_area_str
+@@ -4849,11 +5035,11 @@
         * on the same page though
         */
        ret = mapping->a_ops->write_begin(file, mapping, page_offset(page),
@@ -983798,10 +983664,10 @@ diff -purN linux-2.6.27/fs/ext4/inode.c linux-2.6.27.19-5.1/fs/ext4/inode.c
        if (ret < 0)
                goto out_unlock;
        ret = 0;
-diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
---- linux-2.6.27/fs/ext4/ioctl.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/ioctl.c        2009-03-25 16:11:36.000000000 +0000
-@@ -23,9 +23,8 @@ long ext4_ioctl(struct file *filp, unsig
+diff -r 9608d5473017 fs/ext4/ioctl.c
+--- a/fs/ext4/ioctl.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/ioctl.c  Wed May 06 16:56:48 2009 +0100
+@@ -23,9 +23,8 @@
        struct inode *inode = filp->f_dentry->d_inode;
        struct ext4_inode_info *ei = EXT4_I(inode);
        unsigned int flags;
@@ -983812,7 +983678,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  
        switch (cmd) {
        case EXT4_IOC_GETFLAGS:
-@@ -34,7 +33,7 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -34,7 +33,7 @@
                return put_user(flags, (int __user *) arg);
        case EXT4_IOC_SETFLAGS: {
                handle_t *handle = NULL;
@@ -983821,7 +983687,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
                struct ext4_iloc iloc;
                unsigned int oldflags;
                unsigned int jflag;
-@@ -82,6 +81,17 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -82,6 +81,17 @@
                        if (!capable(CAP_SYS_RESOURCE))
                                goto flags_out;
                }
@@ -983839,7 +983705,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  
                handle = ext4_journal_start(inode, 1);
                if (IS_ERR(handle)) {
-@@ -109,6 +119,10 @@ flags_err:
+@@ -109,6 +119,10 @@
  
                if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL))
                        err = ext4_change_inode_journal_flag(inode, jflag);
@@ -983850,7 +983716,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  flags_out:
                mutex_unlock(&inode->i_mutex);
                mnt_drop_write(filp->f_path.mnt);
-@@ -175,53 +189,10 @@ setversion_out:
+@@ -175,53 +189,10 @@
                        return ret;
                }
  #endif
@@ -983905,7 +983771,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  
                if (!capable(CAP_SYS_RESOURCE))
                        return -EPERM;
-@@ -235,8 +206,10 @@ setversion_out:
+@@ -235,8 +206,10 @@
  
                err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count);
                jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
@@ -983917,7 +983783,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
                mnt_drop_write(filp->f_path.mnt);
  
                return err;
-@@ -244,7 +217,7 @@ setversion_out:
+@@ -244,7 +217,7 @@
        case EXT4_IOC_GROUP_ADD: {
                struct ext4_new_group_data input;
                struct super_block *sb = inode->i_sb;
@@ -983926,7 +983792,7 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  
                if (!capable(CAP_SYS_RESOURCE))
                        return -EPERM;
-@@ -259,15 +232,36 @@ setversion_out:
+@@ -259,15 +232,36 @@
  
                err = ext4_group_add(sb, &input);
                jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
@@ -983965,9 +983831,9 @@ diff -purN linux-2.6.27/fs/ext4/ioctl.c linux-2.6.27.19-5.1/fs/ext4/ioctl.c
  
        default:
                return -ENOTTY;
-diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
---- linux-2.6.27/fs/ext4/mballoc.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/mballoc.c      2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/mballoc.c
+--- a/fs/ext4/mballoc.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/mballoc.c        Wed May 06 16:56:49 2009 +0100
 @@ -100,7 +100,7 @@
   * inode as:
   *
@@ -983998,7 +983864,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
  static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
  {
-@@ -445,9 +459,9 @@ static void mb_free_blocks_double(struct
+@@ -445,9 +459,9 @@
                        blocknr += first + i;
                        blocknr +=
                            le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
@@ -984011,7 +983877,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                   inode ? inode->i_ino : 0, blocknr,
                                   first + i, e4b->bd_group);
                }
-@@ -477,9 +491,10 @@ static void mb_cmp_bitmaps(struct ext4_b
+@@ -477,9 +491,10 @@
                b2 = (unsigned char *) bitmap;
                for (i = 0; i < e4b->bd_sb->s_blocksize; i++) {
                        if (b1[i] != b2[i]) {
@@ -984025,17 +983891,17 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                BUG();
                        }
                }
-@@ -533,9 +548,6 @@ static int __mb_check_buddy(struct ext4_
+@@ -532,9 +547,6 @@
+       struct list_head *cur;
        void *buddy;
        void *buddy2;
+-
 -      if (!test_opt(sb, MBALLOC))
 -              return 0;
--
        {
                static int mb_check_counter;
-               if (mb_check_counter++ % 100 != 0)
-@@ -692,8 +704,8 @@ static void ext4_mb_generate_buddy(struc
+@@ -692,8 +704,8 @@
        grp->bb_fragments = fragments;
  
        if (free != grp->bb_free) {
@@ -984046,7 +983912,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        group, free, grp->bb_free);
                /*
                 * If we intent to continue, we consider group descritor
-@@ -718,7 +730,7 @@ static void ext4_mb_generate_buddy(struc
+@@ -718,7 +730,7 @@
   * stored in the inode as
   *
   * {                        page                        }
@@ -984055,14 +983921,16 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
   *
   *
   * one block each for bitmap and buddy information.
-@@ -784,23 +796,45 @@ static int ext4_mb_init_cache(struct pag
+@@ -784,23 +796,45 @@
                if (bh[i] == NULL)
                        goto out;
  
 -              if (bh_uptodate_or_lock(bh[i]))
+-                      continue;
+-
 +              if (bitmap_uptodate(bh[i]))
-                       continue;
++                      continue;
++
 +              lock_buffer(bh[i]);
 +              if (bitmap_uptodate(bh[i])) {
 +                      unlock_buffer(bh[i]);
@@ -984074,9 +983942,9 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                                first_group + i, desc);
 +                      set_bitmap_uptodate(bh[i]);
                        set_buffer_uptodate(bh[i]);
--                      unlock_buffer(bh[i]);
-                       spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
-+                      unlock_buffer(bh[i]);
++                      spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
+                       unlock_buffer(bh[i]);
+-                      spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
                        continue;
                }
                spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i));
@@ -984104,7 +983972,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        }
  
        /* wait for I/O completion */
-@@ -814,6 +848,8 @@ static int ext4_mb_init_cache(struct pag
+@@ -814,6 +848,8 @@
  
        err = 0;
        first_block = page->index * blocks_per_page;
@@ -984113,7 +983981,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        for (i = 0; i < blocks_per_page; i++) {
                int group;
                struct ext4_group_info *grinfo;
-@@ -840,7 +876,6 @@ static int ext4_mb_init_cache(struct pag
+@@ -840,7 +876,6 @@
                        BUG_ON(incore == NULL);
                        mb_debug("put buddy for group %u in page %lu/%x\n",
                                group, page->index, i * blocksize);
@@ -984121,7 +983989,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        grinfo = ext4_get_group_info(sb, group);
                        grinfo->bb_fragments = 0;
                        memset(grinfo->bb_counters, 0,
-@@ -848,7 +883,9 @@ static int ext4_mb_init_cache(struct pag
+@@ -848,7 +883,9 @@
                        /*
                         * incore got set to the group block bitmap below
                         */
@@ -984131,7 +983999,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        incore = NULL;
                } else {
                        /* this is block of bitmap */
-@@ -862,6 +899,7 @@ static int ext4_mb_init_cache(struct pag
+@@ -862,6 +899,7 @@
  
                        /* mark all preallocated blks used in in-core bitmap */
                        ext4_mb_generate_from_pa(sb, data, group);
@@ -984139,25 +984007,27 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        ext4_unlock_group(sb, group);
  
                        /* set incore so that the buddy information can be
-@@ -885,19 +923,22 @@ out:
+@@ -885,19 +923,22 @@
  static noinline_for_stack int
  ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
                                        struct ext4_buddy *e4b)
-+__acquires(e4b->alloc_semp)
- {
+-{
 -      struct ext4_sb_info *sbi = EXT4_SB(sb);
 -      struct inode *inode = sbi->s_buddy_cache;
++__acquires(e4b->alloc_semp)
++{
        int blocks_per_page;
        int block;
        int pnum;
        int poff;
        struct page *page;
        int ret;
+-
+-      mb_debug("load group %lu\n", group);
 +      struct ext4_group_info *grp;
 +      struct ext4_sb_info *sbi = EXT4_SB(sb);
 +      struct inode *inode = sbi->s_buddy_cache;
--      mb_debug("load group %lu\n", group);
++
 +      mb_debug("load group %u\n", group);
  
        blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
@@ -984165,7 +984035,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        e4b->bd_blkbits = sb->s_blocksize_bits;
        e4b->bd_info = ext4_get_group_info(sb, group);
-@@ -905,6 +946,16 @@ ext4_mb_load_buddy(struct super_block *s
+@@ -905,6 +946,16 @@
        e4b->bd_group = group;
        e4b->bd_buddy_page = NULL;
        e4b->bd_bitmap_page = NULL;
@@ -984182,7 +984052,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        /*
         * the buddy cache inode stores the block bitmap
-@@ -920,6 +971,14 @@ ext4_mb_load_buddy(struct super_block *s
+@@ -920,6 +971,14 @@
        page = find_get_page(inode->i_mapping, pnum);
        if (page == NULL || !PageUptodate(page)) {
                if (page)
@@ -984197,7 +984067,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        page_cache_release(page);
                page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
                if (page) {
-@@ -985,15 +1044,23 @@ err:
+@@ -985,15 +1044,23 @@
                page_cache_release(e4b->bd_buddy_page);
        e4b->bd_buddy = NULL;
        e4b->bd_bitmap = NULL;
@@ -984221,7 +984091,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  }
  
  
-@@ -1031,7 +1098,10 @@ static void mb_clear_bits(spinlock_t *lo
+@@ -1031,7 +1098,10 @@
                        cur += 32;
                        continue;
                }
@@ -984233,7 +984103,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                cur++;
        }
  }
-@@ -1049,7 +1119,10 @@ static void mb_set_bits(spinlock_t *lock
+@@ -1049,7 +1119,10 @@
                        cur += 32;
                        continue;
                }
@@ -984245,7 +984115,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                cur++;
        }
  }
-@@ -1094,12 +1167,11 @@ static void mb_free_blocks(struct inode 
+@@ -1094,12 +1167,11 @@
                        blocknr += block;
                        blocknr +=
                            le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
@@ -984261,7 +984131,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                }
                mb_clear_bit(block, EXT4_MB_BITMAP(e4b));
                e4b->bd_info->bb_counters[order]++;
-@@ -1296,13 +1368,20 @@ static void ext4_mb_use_best_found(struc
+@@ -1296,13 +1368,20 @@
        ac->ac_tail = ret & 0xffff;
        ac->ac_buddy = ret >> 16;
  
@@ -984285,7 +984155,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        /* store last allocated for subsequent stream allocation */
        if ((ac->ac_flags & EXT4_MB_HINT_DATA)) {
                spin_lock(&sbi->s_md_lock);
-@@ -1433,8 +1512,10 @@ static int ext4_mb_try_best_found(struct
+@@ -1433,8 +1512,10 @@
  
        BUG_ON(ex.fe_len <= 0);
        err = ext4_mb_load_buddy(ac->ac_sb, group, e4b);
@@ -984297,7 +984167,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        ext4_lock_group(ac->ac_sb, group);
        max = mb_find_extent(e4b, 0, ex.fe_start, ex.fe_len, &ex);
-@@ -1464,8 +1545,10 @@ static int ext4_mb_find_by_goal(struct e
+@@ -1464,8 +1545,10 @@
                return 0;
  
        err = ext4_mb_load_buddy(ac->ac_sb, group, e4b);
@@ -984309,7 +984179,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        ext4_lock_group(ac->ac_sb, group);
        max = mb_find_extent(e4b, 0, ac->ac_g_ex.fe_start,
-@@ -1575,7 +1658,8 @@ static void ext4_mb_complex_scan_group(s
+@@ -1575,7 +1658,8 @@
                         * free blocks even though group info says we
                         * we have free blocks
                         */
@@ -984319,7 +984189,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                        "group info. But bitmap says 0\n",
                                        free);
                        break;
-@@ -1584,7 +1668,8 @@ static void ext4_mb_complex_scan_group(s
+@@ -1584,7 +1668,8 @@
                mb_find_extent(e4b, 0, i, ac->ac_g_ex.fe_len, &ex);
                BUG_ON(ex.fe_len <= 0);
                if (free < ex.fe_len) {
@@ -984329,7 +984199,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                        "group info. But got %d blocks\n",
                                        free, ex.fe_len);
                        /*
-@@ -1692,6 +1777,173 @@ static int ext4_mb_good_group(struct ext
+@@ -1692,6 +1777,173 @@
        return 0;
  }
  
@@ -984503,7 +984373,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  static noinline_for_stack int
  ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
  {
-@@ -1775,7 +2027,7 @@ repeat:
+@@ -1775,7 +2027,7 @@
                                group = 0;
  
                        /* quick check to skip empty groups */
@@ -984512,7 +984382,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        if (grp->bb_free == 0)
                                continue;
  
-@@ -1788,10 +2040,9 @@ repeat:
+@@ -1788,10 +2040,9 @@
                                 * we need full data about the group
                                 * to make a good selection
                                 */
@@ -984524,7 +984394,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        }
  
                        /*
-@@ -1802,8 +2053,10 @@ repeat:
+@@ -1802,8 +2053,10 @@
                                continue;
  
                        err = ext4_mb_load_buddy(sb, group, &e4b);
@@ -984536,7 +984406,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
                        ext4_lock_group(sb, group);
                        if (!ext4_mb_good_group(ac, group, cr)) {
-@@ -1932,13 +2185,13 @@ static int ext4_mb_seq_history_show(stru
+@@ -1932,13 +2185,13 @@
        if (hs->op == EXT4_MB_HISTORY_ALLOC) {
                fmt = "%-5u %-8u %-23s %-23s %-23s %-5u %-5u %-2u "
                        "%-5u %-5s %-5u %-6u\n";
@@ -984553,7 +984423,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        hs->goal.fe_start, hs->goal.fe_len,
                        hs->goal.fe_logical);
                seq_printf(seq, fmt, hs->pid, hs->ino, buf, buf3, buf2,
-@@ -1947,20 +2200,20 @@ static int ext4_mb_seq_history_show(stru
+@@ -1947,20 +2200,20 @@
                                hs->buddy ? 1 << hs->buddy : 0);
        } else if (hs->op == EXT4_MB_HISTORY_PREALLOC) {
                fmt = "%-5u %-8u %-23s %-23s %-23s\n";
@@ -984578,7 +984448,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        hs->result.fe_start, hs->result.fe_len);
                seq_printf(seq, "%-5u %-8u %-23s free\n",
                                hs->pid, hs->ino, buf2);
-@@ -2073,7 +2326,7 @@ static void *ext4_mb_seq_groups_start(st
+@@ -2073,7 +2326,7 @@
                return NULL;
  
        group = *pos + 1;
@@ -984587,7 +984457,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  }
  
  static void *ext4_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-@@ -2086,13 +2339,13 @@ static void *ext4_mb_seq_groups_next(str
+@@ -2086,13 +2339,13 @@
        if (*pos < 0 || *pos >= sbi->s_groups_count)
                return NULL;
        group = *pos + 1;
@@ -984603,7 +984473,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        int i;
        int err;
        struct ext4_buddy e4b;
-@@ -2114,7 +2367,8 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2114,7 +2367,8 @@
                sizeof(struct ext4_group_info);
        err = ext4_mb_load_buddy(sb, group, &e4b);
        if (err) {
@@ -984613,7 +984483,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                return 0;
        }
        ext4_lock_group(sb, group);
-@@ -2122,7 +2376,7 @@ static int ext4_mb_seq_groups_show(struc
+@@ -2122,7 +2376,7 @@
        ext4_unlock_group(sb, group);
        ext4_mb_release_desc(&e4b);
  
@@ -984622,7 +984492,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        sg.info.bb_fragments, sg.info.bb_first_free);
        for (i = 0; i <= 13; i++)
                seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-@@ -2169,9 +2423,10 @@ static void ext4_mb_history_release(stru
+@@ -2169,9 +2423,10 @@
  {
        struct ext4_sb_info *sbi = EXT4_SB(sb);
  
@@ -984636,7 +984506,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        kfree(sbi->s_mb_history);
  }
  
-@@ -2180,10 +2435,10 @@ static void ext4_mb_history_init(struct 
+@@ -2180,10 +2435,10 @@
        struct ext4_sb_info *sbi = EXT4_SB(sb);
        int i;
  
@@ -984650,7 +984520,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                                 &ext4_mb_seq_groups_fops, sb);
        }
  
-@@ -2295,10 +2550,12 @@ int ext4_mb_add_groupinfo(struct super_b
+@@ -2295,10 +2550,12 @@
                        ext4_free_blocks_after_init(sb, group, desc);
        } else {
                meta_group_info[i]->bb_free =
@@ -984664,7 +984534,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
  #ifdef DOUBLE_CHECK
        {
-@@ -2325,54 +2582,6 @@ exit_meta_group_info:
+@@ -2325,54 +2582,6 @@
  } /* ext4_mb_add_groupinfo */
  
  /*
@@ -984719,7 +984589,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
   * Update an existing group.
   * This function is used for online resize
   */
-@@ -2455,7 +2664,7 @@ static int ext4_mb_init_backend(struct s
+@@ -2455,7 +2664,7 @@
                desc = ext4_get_group_desc(sb, i, NULL);
                if (desc == NULL) {
                        printk(KERN_ERR
@@ -984728,7 +984598,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        goto err_freebuddy;
                }
                if (ext4_mb_add_groupinfo(sb, i, desc) != 0)
-@@ -2485,19 +2694,14 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2485,19 +2694,14 @@
        unsigned max;
        int ret;
  
@@ -984748,7 +984618,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                kfree(sbi->s_mb_maxs);
                return -ENOMEM;
        }
-@@ -2520,7 +2724,6 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2520,7 +2724,6 @@
        /* init file for buddy data */
        ret = ext4_mb_init_backend(sb);
        if (ret != 0) {
@@ -984756,7 +984626,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                kfree(sbi->s_mb_offsets);
                kfree(sbi->s_mb_maxs);
                return ret;
-@@ -2540,17 +2743,15 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2540,17 +2743,15 @@
        sbi->s_mb_history_filter = EXT4_MB_HISTORY_DEFAULT;
        sbi->s_mb_group_prealloc = MB_DEFAULT_GROUP_PREALLOC;
  
@@ -984777,7 +984647,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                mutex_init(&lg->lg_mutex);
                for (j = 0; j < PREALLOC_TB_SIZE; j++)
                        INIT_LIST_HEAD(&lg->lg_prealloc_list[j]);
-@@ -2560,7 +2761,7 @@ int ext4_mb_init(struct super_block *sb,
+@@ -2560,7 +2761,7 @@
        ext4_mb_init_per_dev_proc(sb);
        ext4_mb_history_init(sb);
  
@@ -984786,7 +984656,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        return 0;
  }
  
-@@ -2575,7 +2776,7 @@ static void ext4_mb_cleanup_pa(struct ex
+@@ -2575,7 +2776,7 @@
                pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list);
                list_del(&pa->pa_group_list);
                count++;
@@ -984795,17 +984665,17 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        }
        if (count)
                mb_debug("mballoc: %u PAs left\n", count);
-@@ -2589,9 +2790,6 @@ int ext4_mb_release(struct super_block *
+@@ -2588,9 +2789,6 @@
+       int num_meta_group_infos;
        struct ext4_group_info *grinfo;
        struct ext4_sb_info *sbi = EXT4_SB(sb);
+-
 -      if (!test_opt(sb, MBALLOC))
 -              return 0;
--
        /* release freed, non-committed blocks */
        spin_lock(&sbi->s_md_lock);
-       list_splice_init(&sbi->s_closed_transaction,
-@@ -2647,8 +2845,7 @@ int ext4_mb_release(struct super_block *
+@@ -2647,8 +2845,7 @@
                                atomic_read(&sbi->s_mb_discarded));
        }
  
@@ -984815,7 +984685,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        ext4_mb_history_release(sb);
        ext4_mb_destroy_per_dev_proc(sb);
  
-@@ -2658,13 +2855,11 @@ int ext4_mb_release(struct super_block *
+@@ -2658,13 +2855,11 @@
  static noinline_for_stack void
  ext4_mb_free_committed_blocks(struct super_block *sb)
  {
@@ -984825,7 +984695,8 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -      int count = 0;
 -      int count2 = 0;
 -      struct ext4_free_metadata *md;
-       struct ext4_buddy e4b;
+-      struct ext4_buddy e4b;
++      struct ext4_buddy e4b;
 +      struct ext4_group_info *db;
 +      struct ext4_sb_info *sbi = EXT4_SB(sb);
 +      int err, count = 0, count2 = 0;
@@ -984833,7 +984704,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        if (list_empty(&sbi->s_committed_transaction))
                return;
-@@ -2672,44 +2867,46 @@ ext4_mb_free_committed_blocks(struct sup
+@@ -2672,44 +2867,46 @@
        /* there is committed blocks to be freed yet */
        do {
                /* get next array of blocks */
@@ -984851,15 +984722,18 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                spin_unlock(&sbi->s_md_lock);
  
 -              if (md == NULL)
-+              if (entry == NULL)
-                       break;
+-                      break;
+-
 -              mb_debug("gonna free %u blocks in group %lu (0x%p):",
 -                              md->num, md->group, md);
+-
+-              err = ext4_mb_load_buddy(sb, md->group, &e4b);
++              if (entry == NULL)
++                      break;
++
 +              mb_debug("gonna free %u blocks in group %u (0x%p):",
 +                      entry->count, entry->group, entry);
--              err = ext4_mb_load_buddy(sb, md->group, &e4b);
++
 +              err = ext4_mb_load_buddy(sb, entry->group, &e4b);
                /* we expect to find existing buddy because it's pinned */
                BUG_ON(err != 0);
@@ -984880,6 +984754,8 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -              /* balance refcounts from ext4_mb_free_metadata() */
 -              page_cache_release(e4b.bd_buddy_page);
 -              page_cache_release(e4b.bd_bitmap_page);
+-
+-              kfree(md);
 +              ext4_lock_group(sb, entry->group);
 +              /* Take it out of per group rb tree */
 +              rb_erase(&entry->node, &(db->bb_free_root));
@@ -984893,8 +984769,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +                      page_cache_release(e4b.bd_bitmap_page);
 +              }
 +              ext4_unlock_group(sb, entry->group);
--              kfree(md);
++
 +              kmem_cache_free(ext4_free_ext_cachep, entry);
                ext4_mb_release_desc(&e4b);
 -
@@ -984903,7 +984778,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        mb_debug("freed %u blocks in %u structures\n", count, count2);
  }
-@@ -2721,119 +2918,52 @@ ext4_mb_free_committed_blocks(struct sup
+@@ -2721,119 +2918,52 @@
  #define EXT4_MB_STREAM_REQ            "stream_req"
  #define EXT4_MB_GROUP_PREALLOC                "group_prealloc"
  
@@ -984973,9 +984848,10 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        struct ext4_sb_info *sbi = EXT4_SB(sb);
        struct proc_dir_entry *proc;
 -      char devname[64];
+-
 -      if (proc_root_ext4 == NULL) {
 -              sbi->s_mb_proc = NULL;
++
 +      if (sbi->s_proc == NULL)
                return -EINVAL;
 -      }
@@ -984988,7 +984864,8 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -      MB_PROC_HANDLER(EXT4_MB_ORDER2_REQ, order2_reqs);
 -      MB_PROC_HANDLER(EXT4_MB_STREAM_REQ, stream_request);
 -      MB_PROC_HANDLER(EXT4_MB_GROUP_PREALLOC, group_prealloc);
+-
++
 +      EXT4_PROC_HANDLER(EXT4_MB_STATS_NAME, mb_stats);
 +      EXT4_PROC_HANDLER(EXT4_MB_MAX_TO_SCAN_NAME, mb_max_to_scan);
 +      EXT4_PROC_HANDLER(EXT4_MB_MIN_TO_SCAN_NAME, mb_min_to_scan);
@@ -985022,11 +984899,13 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
  static int ext4_mb_destroy_per_dev_proc(struct super_block *sb)
  {
-+#ifdef CONFIG_PROC_FS
-       struct ext4_sb_info *sbi = EXT4_SB(sb);
+-      struct ext4_sb_info *sbi = EXT4_SB(sb);
 -      char devname[64];
+-
 -      if (sbi->s_mb_proc == NULL)
++#ifdef CONFIG_PROC_FS
++      struct ext4_sb_info *sbi = EXT4_SB(sb);
++
 +      if (sbi->s_proc == NULL)
                return -EINVAL;
  
@@ -985049,7 +984928,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        return 0;
  }
  
-@@ -2854,11 +2984,16 @@ int __init init_ext4_mballoc(void)
+@@ -2854,11 +2984,16 @@
                kmem_cache_destroy(ext4_pspace_cachep);
                return -ENOMEM;
        }
@@ -985071,7 +984950,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        return 0;
  }
  
-@@ -2867,9 +3002,7 @@ void exit_ext4_mballoc(void)
+@@ -2867,9 +3002,7 @@
        /* XXX: synchronize_rcu(); */
        kmem_cache_destroy(ext4_pspace_cachep);
        kmem_cache_destroy(ext4_ac_cachep);
@@ -985082,7 +984961,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  }
  
  
-@@ -2879,7 +3012,7 @@ void exit_ext4_mballoc(void)
+@@ -2879,7 +3012,7 @@
   */
  static noinline_for_stack int
  ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
@@ -985091,7 +984970,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  {
        struct buffer_head *bitmap_bh = NULL;
        struct ext4_super_block *es;
-@@ -2912,7 +3045,7 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2912,7 +3045,7 @@
        if (!gdp)
                goto out_err;
  
@@ -985100,7 +984979,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        gdp->bg_free_blocks_count);
  
        err = ext4_journal_get_write_access(handle, gdp_bh);
-@@ -2931,8 +3064,8 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2931,8 +3064,8 @@
            in_range(block + len - 1, ext4_inode_table(sb, gdp),
                     EXT4_SB(sb)->s_itb_per_group)) {
                ext4_error(sb, __func__,
@@ -985111,37 +984990,39 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                /* File system mounted not to panic on error
                 * Fix the bitmap and repeat the block allocation
                 * We leak some of the blocks here.
-@@ -2954,29 +3087,29 @@ ext4_mb_mark_diskspace_used(struct ext4_
+@@ -2954,29 +3087,29 @@
                }
        }
  #endif
 -      mb_set_bits(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group), bitmap_bh->b_data,
--                              ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
--
-       spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
++      spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
 +      mb_set_bits(NULL, bitmap_bh->b_data,
-+                              ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
+                               ac->ac_b_ex.fe_start, ac->ac_b_ex.fe_len);
+-
+-      spin_lock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
        if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
                gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
 -              gdp->bg_free_blocks_count =
 -                      cpu_to_le16(ext4_free_blocks_after_init(sb,
 -                                              ac->ac_b_ex.fe_group,
 -                                              gdp));
+-      }
+-      le16_add_cpu(&gdp->bg_free_blocks_count, -ac->ac_b_ex.fe_len);
 +              ext4_free_blks_set(sb, gdp,
 +                                      ext4_free_blocks_after_init(sb,
 +                                      ac->ac_b_ex.fe_group, gdp));
-       }
--      le16_add_cpu(&gdp->bg_free_blocks_count, -ac->ac_b_ex.fe_len);
++      }
 +      len = ext4_free_blks_count(sb, gdp) - ac->ac_b_ex.fe_len;
 +      ext4_free_blks_set(sb, gdp, len);
        gdp->bg_checksum = ext4_group_desc_csum(sbi, ac->ac_b_ex.fe_group, gdp);
        spin_unlock(sb_bgl_lock(sbi, ac->ac_b_ex.fe_group));
 -
-+      percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len);
-       /*
+-      /*
 -       * free blocks account has already be reduced/reserved
 -       * at write_begin() time for delayed allocation
 -       * do not double accounting
++      percpu_counter_sub(&sbi->s_freeblocks_counter, ac->ac_b_ex.fe_len);
++      /*
 +       * Now reduce the dirty block count also. Should not go negative
         */
        if (!(ac->ac_flags & EXT4_MB_DELALLOC_RESERVED))
@@ -985155,7 +985036,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        if (sbi->s_log_groups_per_flex) {
                ext4_group_t flex_group = ext4_flex_group(sbi,
-@@ -3118,7 +3251,7 @@ ext4_mb_normalize_request(struct ext4_al
+@@ -3118,7 +3251,7 @@
        /* check we don't cross already preallocated blocks */
        rcu_read_lock();
        list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
@@ -985164,7 +985045,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
                if (pa->pa_deleted)
                        continue;
-@@ -3162,7 +3295,7 @@ ext4_mb_normalize_request(struct ext4_al
+@@ -3162,7 +3295,7 @@
        /* XXX: extra loop to check we really don't overlap preallocations */
        rcu_read_lock();
        list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
@@ -985173,7 +985054,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                spin_lock(&pa->pa_lock);
                if (pa->pa_deleted == 0) {
                        pa_end = pa->pa_lstart + pa->pa_len;
-@@ -3394,6 +3527,32 @@ ext4_mb_use_preallocated(struct ext4_all
+@@ -3394,6 +3527,32 @@
  }
  
  /*
@@ -985206,7 +985087,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
   * the function goes through all preallocation in this group and marks them
   * used in in-core bitmap. buddy must be generated from this bitmap
   * Need to be called with ext4 group lock (ext4_lock_group)
-@@ -3433,7 +3592,7 @@ static void ext4_mb_generate_from_pa(str
+@@ -3433,7 +3592,7 @@
                preallocated += len;
                count++;
        }
@@ -985215,7 +985096,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  }
  
  static void ext4_mb_pa_callback(struct rcu_head *head)
-@@ -3450,7 +3609,7 @@ static void ext4_mb_pa_callback(struct r
+@@ -3450,7 +3609,7 @@
  static void ext4_mb_put_pa(struct ext4_allocation_context *ac,
                        struct super_block *sb, struct ext4_prealloc_space *pa)
  {
@@ -985224,7 +985105,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        if (!atomic_dec_and_test(&pa->pa_count) || pa->pa_free != 0)
                return;
-@@ -3666,8 +3825,8 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3666,8 +3825,8 @@
  {
        struct super_block *sb = e4b->bd_sb;
        struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -985235,7 +985116,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        ext4_group_t group;
        ext4_grpblk_t bit;
        sector_t start;
-@@ -3713,8 +3872,9 @@ ext4_mb_release_inode_pa(struct ext4_bud
+@@ -3713,8 +3872,9 @@
                        pa, (unsigned long) pa->pa_lstart,
                        (unsigned long) pa->pa_pstart,
                        (unsigned long) pa->pa_len);
@@ -985247,7 +985128,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                /*
                 * pa is already deleted so we use the value obtained
                 * from the bitmap and continue.
-@@ -3779,7 +3939,7 @@ ext4_mb_discard_group_preallocations(str
+@@ -3779,7 +3939,7 @@
        int busy = 0;
        int free = 0;
  
@@ -985256,7 +985137,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        if (list_empty(&grp->bb_prealloc_list))
                return 0;
-@@ -3787,14 +3947,15 @@ ext4_mb_discard_group_preallocations(str
+@@ -3787,14 +3947,15 @@
        bitmap_bh = ext4_read_block_bitmap(sb, group);
        if (bitmap_bh == NULL) {
                ext4_error(sb, __func__, "Error in reading block "
@@ -985274,7 +985155,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                put_bh(bitmap_bh);
                return 0;
        }
-@@ -3884,7 +4045,7 @@ out:
+@@ -3884,7 +4045,7 @@
   *
   * FIXME!! Make sure it is valid at all the call sites
   */
@@ -985283,7 +985164,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  {
        struct ext4_inode_info *ei = EXT4_I(inode);
        struct super_block *sb = inode->i_sb;
-@@ -3896,7 +4057,7 @@ void ext4_mb_discard_inode_preallocation
+@@ -3896,7 +4057,7 @@
        struct ext4_buddy e4b;
        int err;
  
@@ -985292,7 +985173,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                /*BUG_ON(!list_empty(&ei->i_prealloc_list));*/
                return;
        }
-@@ -3960,15 +4121,16 @@ repeat:
+@@ -3960,15 +4121,16 @@
  
                err = ext4_mb_load_buddy(sb, group, &e4b);
                if (err) {
@@ -985311,7 +985192,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        ext4_mb_release_desc(&e4b);
                        continue;
                }
-@@ -4094,8 +4256,7 @@ static void ext4_mb_group_or_file(struct
+@@ -4094,8 +4256,7 @@
         * per cpu locality group is to reduce the contention between block
         * request from multiple CPUs.
         */
@@ -985321,7 +985202,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        /* we're going to use group allocation */
        ac->ac_flags |= EXT4_MB_HINT_GROUP_ALLOC;
-@@ -4112,8 +4273,8 @@ ext4_mb_initialize_context(struct ext4_a
+@@ -4112,8 +4273,8 @@
        struct ext4_sb_info *sbi = EXT4_SB(sb);
        struct ext4_super_block *es = sbi->s_es;
        ext4_group_t group;
@@ -985332,7 +985213,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        ext4_grpblk_t block;
  
        /* we can't allocate > group size */
-@@ -4156,6 +4317,7 @@ ext4_mb_initialize_context(struct ext4_a
+@@ -4156,6 +4317,7 @@
        ac->ac_pa = NULL;
        ac->ac_bitmap_page = NULL;
        ac->ac_buddy_page = NULL;
@@ -985340,7 +985221,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        ac->ac_lg = NULL;
  
        /* we have to define context: we'll we work with a file or
-@@ -4233,8 +4395,9 @@ ext4_mb_discard_lg_preallocations(struct
+@@ -4233,8 +4395,9 @@
  
                ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL);
                if (ext4_mb_load_buddy(sb, group, &e4b)) {
@@ -985351,7 +985232,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        continue;
                }
                ext4_lock_group(sb, group);
-@@ -4336,6 +4499,8 @@ static int ext4_mb_release_context(struc
+@@ -4336,6 +4499,8 @@
                }
                ext4_mb_put_pa(ac, ac->ac_sb, pa);
        }
@@ -985360,7 +985241,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        if (ac->ac_bitmap_page)
                page_cache_release(ac->ac_bitmap_page);
        if (ac->ac_buddy_page)
-@@ -4369,40 +4534,39 @@ static int ext4_mb_discard_preallocation
+@@ -4369,40 +4534,39 @@
  ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
                                 struct ext4_allocation_request *ar, int *errp)
  {
@@ -985392,6 +985273,8 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -      if (ar->len == 0) {
 -              *errp = -ENOSPC;
 -              return 0;
+-      }
+-
 +              while (ar->len && ext4_claim_free_blocks(sbi, ar->len)) {
 +                      /* let others to free the space */
 +                      yield();
@@ -985402,8 +985285,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +                      return 0;
 +              }
 +              reserv_blks = ar->len;
-       }
--
++      }
        while (ar->len && DQUOT_ALLOC_BLOCK(ar->inode, ar->len)) {
                ar->flags |= EXT4_MB_HINT_NOPREALLOC;
                ar->len--;
@@ -985415,7 +985297,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        }
        inquota = ar->len;
  
-@@ -4439,10 +4603,14 @@ repeat:
+@@ -4439,10 +4603,14 @@
                                ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len)
                        ext4_mb_new_preallocation(ac);
        }
@@ -985432,7 +985314,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
                        ac->ac_b_ex.fe_group = 0;
                        ac->ac_b_ex.fe_start = 0;
                        ac->ac_b_ex.fe_len = 0;
-@@ -4473,6 +4641,13 @@ out2:
+@@ -4473,6 +4641,13 @@
  out1:
        if (ar->len < inquota)
                DQUOT_FREE_BLOCK(ar->inode, inquota - ar->len);
@@ -985446,7 +985328,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  
        return block;
  }
-@@ -4507,65 +4682,97 @@ static void ext4_mb_poll_new_transaction
+@@ -4507,65 +4682,97 @@
        ext4_mb_free_committed_blocks(sb);
  }
  
@@ -985468,8 +985350,9 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  static noinline_for_stack int
  ext4_mb_free_metadata(handle_t *handle, struct ext4_buddy *e4b,
 -                        ext4_group_t group, ext4_grpblk_t block, int count)
+-{
 +                      struct ext4_free_data *new_entry)
- {
++{
 +      ext4_grpblk_t block;
 +      struct ext4_free_data *entry;
        struct ext4_group_info *db = e4b->bd_info;
@@ -985489,6 +985372,46 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -              if (md && db->bb_tid != handle->h_transaction->t_tid) {
 -                      db->bb_md_cur = NULL;
 -                      md = NULL;
+-              }
+-
+-              if (md == NULL) {
+-                      ext4_unlock_group(sb, group);
+-                      md = kmalloc(sizeof(*md), GFP_NOFS);
+-                      if (md == NULL)
+-                              return -ENOMEM;
+-                      md->num = 0;
+-                      md->group = group;
+-
+-                      ext4_lock_group(sb, group);
+-                      if (db->bb_md_cur == NULL) {
+-                              spin_lock(&sbi->s_md_lock);
+-                              list_add(&md->list, &sbi->s_active_transaction);
+-                              spin_unlock(&sbi->s_md_lock);
+-                              /* protect buddy cache from being freed,
+-                               * otherwise we'll refresh it from
+-                               * on-disk bitmap and lose not-yet-available
+-                               * blocks */
+-                              page_cache_get(e4b->bd_buddy_page);
+-                              page_cache_get(e4b->bd_bitmap_page);
+-                              db->bb_md_cur = md;
+-                              db->bb_tid = handle->h_transaction->t_tid;
+-                              mb_debug("new md 0x%p for group %lu\n",
+-                                              md, md->group);
+-                      } else {
+-                              kfree(md);
+-                              md = db->bb_md_cur;
+-                      }
+-              }
+-
+-              BUG_ON(md->num >= EXT4_BB_MAX_BLOCKS);
+-              md->blocks[md->num] = block + i;
+-              md->num++;
+-              if (md->num == EXT4_BB_MAX_BLOCKS) {
+-                      /* no more space, put full container on a sb's list */
+-                      db->bb_md_cur = NULL;
+-              }
+-      }
+-      ext4_unlock_group(sb, group);
 +      new_node = &new_entry->node;
 +      block = new_entry->start_blk;
 +
@@ -985513,38 +985436,12 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +                                      "Double free of blocks %d (%d %d)\n",
 +                                      block, entry->start_blk, entry->count);
 +                      return 0;
-               }
++              }
 +      }
--              if (md == NULL) {
--                      ext4_unlock_group(sb, group);
--                      md = kmalloc(sizeof(*md), GFP_NOFS);
--                      if (md == NULL)
--                              return -ENOMEM;
--                      md->num = 0;
--                      md->group = group;
++
 +      rb_link_node(new_node, parent, n);
 +      rb_insert_color(new_node, &db->bb_free_root);
--                      ext4_lock_group(sb, group);
--                      if (db->bb_md_cur == NULL) {
--                              spin_lock(&sbi->s_md_lock);
--                              list_add(&md->list, &sbi->s_active_transaction);
--                              spin_unlock(&sbi->s_md_lock);
--                              /* protect buddy cache from being freed,
--                               * otherwise we'll refresh it from
--                               * on-disk bitmap and lose not-yet-available
--                               * blocks */
--                              page_cache_get(e4b->bd_buddy_page);
--                              page_cache_get(e4b->bd_bitmap_page);
--                              db->bb_md_cur = md;
--                              db->bb_tid = handle->h_transaction->t_tid;
--                              mb_debug("new md 0x%p for group %lu\n",
--                                              md, md->group);
--                      } else {
--                              kfree(md);
--                              md = db->bb_md_cur;
--                      }
++
 +      /* Now try to see the extent can be merged to left and right */
 +      node = rb_prev(new_node);
 +      if (node) {
@@ -985557,15 +985454,9 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +                      list_del(&entry->list);
 +                      spin_unlock(&sbi->s_md_lock);
 +                      kmem_cache_free(ext4_free_ext_cachep, entry);
-               }
++              }
 +      }
--              BUG_ON(md->num >= EXT4_BB_MAX_BLOCKS);
--              md->blocks[md->num] = block + i;
--              md->num++;
--              if (md->num == EXT4_BB_MAX_BLOCKS) {
--                      /* no more space, put full container on a sb's list */
--                      db->bb_md_cur = NULL;
++
 +      node = rb_next(new_node);
 +      if (node) {
 +              entry = rb_entry(node, struct ext4_free_data, node);
@@ -985576,9 +985467,8 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +                      list_del(&entry->list);
 +                      spin_unlock(&sbi->s_md_lock);
 +                      kmem_cache_free(ext4_free_ext_cachep, entry);
-               }
-       }
--      ext4_unlock_group(sb, group);
++              }
++      }
 +      /* Add the extent to active_transaction list */
 +      spin_lock(&sbi->s_md_lock);
 +      list_add(&new_entry->list, &sbi->s_active_transaction);
@@ -985586,7 +985476,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        return 0;
  }
  
-@@ -4581,7 +4788,7 @@ void ext4_mb_free_blocks(handle_t *handl
+@@ -4581,7 +4788,7 @@
        struct ext4_allocation_context *ac = NULL;
        struct ext4_group_desc *gdp;
        struct ext4_super_block *es;
@@ -985595,7 +985485,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        ext4_grpblk_t bit;
        struct buffer_head *gd_bh;
        ext4_group_t block_group;
-@@ -4665,11 +4872,6 @@ do_more:
+@@ -4665,11 +4872,6 @@
        err = ext4_journal_get_write_access(handle, gd_bh);
        if (err)
                goto error_return;
@@ -985607,7 +985497,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
  #ifdef AGGRESSIVE_CHECK
        {
                int i;
-@@ -4677,13 +4879,6 @@ do_more:
+@@ -4677,13 +4879,6 @@
                        BUG_ON(!mb_test_bit(bit + i, bitmap_bh->b_data));
        }
  #endif
@@ -985621,7 +985511,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        if (ac) {
                ac->ac_b_ex.fe_group = block_group;
                ac->ac_b_ex.fe_start = bit;
-@@ -4691,19 +4886,43 @@ do_more:
+@@ -4691,19 +4886,43 @@
                ext4_mb_store_history(ac);
        }
  
@@ -985634,6 +985524,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 -              /* blocks being freed are metadata. these blocks shouldn't
 -               * be used until this transaction is committed */
 -              ext4_mb_free_metadata(handle, &e4b, block_group, bit, count);
+-      } else {
 +              struct ext4_free_data *new_entry;
 +              /*
 +               * blocks being freed are metadata. these blocks shouldn't
@@ -985644,13 +985535,13 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
 +              new_entry->group  = block_group;
 +              new_entry->count = count;
 +              new_entry->t_tid = handle->h_transaction->t_tid;
-+              ext4_lock_group(sb, block_group);
+               ext4_lock_group(sb, block_group);
 +              mb_clear_bits(sb_bgl_lock(sbi, block_group), bitmap_bh->b_data,
 +                              bit, count);
 +              ext4_mb_free_metadata(handle, &e4b, new_entry);
 +              ext4_unlock_group(sb, block_group);
-       } else {
-               ext4_lock_group(sb, block_group);
++      } else {
++              ext4_lock_group(sb, block_group);
 +              /* need to update group_info->bb_free and bitmap
 +               * with group lock held. generate_buddy look at
 +               * them with group lock_held
@@ -985669,7 +985560,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        gdp->bg_checksum = ext4_group_desc_csum(sbi, block_group, gdp);
        spin_unlock(sb_bgl_lock(sbi, block_group));
        percpu_counter_add(&sbi->s_freeblocks_counter, count);
-@@ -4719,6 +4938,10 @@ do_more:
+@@ -4719,6 +4938,10 @@
  
        *freed += count;
  
@@ -985680,9 +985571,9 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.c linux-2.6.27.19-5.1/fs/ext4/mballoc.c
        /* And the group descriptor block */
        BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
        ret = ext4_journal_dirty_metadata(handle, gd_bh);
-diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
---- linux-2.6.27/fs/ext4/mballoc.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/mballoc.h      2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/mballoc.h
+--- a/fs/ext4/mballoc.h        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/mballoc.h        Wed May 06 16:56:49 2009 +0100
 @@ -18,6 +18,9 @@
  #include <linux/pagemap.h>
  #include <linux/seq_file.h>
@@ -985709,12 +985600,22 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
 +      struct rb_node node;
  
 -struct ext4_free_metadata {
--      ext4_group_t group;
++      /* this links the free block information from ext4_sb_info */
++      struct list_head list;
++
++      /* group which free block extent belongs */
+       ext4_group_t group;
 -      unsigned short num;
 -      ext4_grpblk_t  blocks[EXT4_BB_MAX_BLOCKS];
-+      /* this links the free block information from ext4_sb_info */
-       struct list_head list;
--};
+-      struct list_head list;
++
++      /* free block extent */
++      ext4_grpblk_t start_blk;
++      ext4_grpblk_t count;
++
++      /* transaction which freed this extent */
++      tid_t   t_tid;
+ };
 -
 -struct ext4_group_info {
 -      unsigned long   bb_state;
@@ -985729,25 +985630,17 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
 -#endif
 -      unsigned short  bb_counters[];
 -};
+-
 -#define EXT4_GROUP_INFO_NEED_INIT_BIT 0
 -#define EXT4_GROUP_INFO_LOCKED_BIT    1
-+      /* group which free block extent belongs */
-+      ext4_group_t group;
+-
 -#define EXT4_MB_GRP_NEED_INIT(grp)    \
 -      (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state)))
-+      /* free block extent */
-+      ext4_grpblk_t start_blk;
-+      ext4_grpblk_t count;
-+      /* transaction which freed this extent */
-+      tid_t   t_tid;
-+};
+-
  
  struct ext4_prealloc_space {
        struct list_head        pa_inode_list;
-@@ -209,6 +195,11 @@ struct ext4_allocation_context {
+@@ -209,6 +195,11 @@
        __u8 ac_op;             /* operation, for history only */
        struct page *ac_bitmap_page;
        struct page *ac_buddy_page;
@@ -985759,7 +985652,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
        struct ext4_prealloc_space *ac_pa;
        struct ext4_locality_group *ac_lg;
  };
-@@ -242,6 +233,7 @@ struct ext4_buddy {
+@@ -242,6 +233,7 @@
        struct super_block *bd_sb;
        __u16 bd_blkbits;
        ext4_group_t bd_group;
@@ -985767,7 +985660,7 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
  };
  #define EXT4_MB_BITMAP(e4b)   ((e4b)->bd_bitmap)
  #define EXT4_MB_BUDDY(e4b)    ((e4b)->bd_buddy)
-@@ -251,53 +243,12 @@ static inline void ext4_mb_store_history
+@@ -251,53 +243,12 @@
  {
        return;
  }
@@ -985822,10 +985715,10 @@ diff -purN linux-2.6.27/fs/ext4/mballoc.h linux-2.6.27.19-5.1/fs/ext4/mballoc.h
                                        struct ext4_free_extent *fex)
  {
        ext4_fsblk_t block;
-diff -purN linux-2.6.27/fs/ext4/migrate.c linux-2.6.27.19-5.1/fs/ext4/migrate.c
---- linux-2.6.27/fs/ext4/migrate.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/migrate.c      2009-03-25 16:11:36.000000000 +0000
-@@ -447,8 +447,7 @@ static int free_ext_block(handle_t *hand
+diff -r 9608d5473017 fs/ext4/migrate.c
+--- a/fs/ext4/migrate.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/migrate.c        Wed May 06 16:56:49 2009 +0100
+@@ -447,8 +447,7 @@
  
  }
  
@@ -985835,20 +985728,20 @@ diff -purN linux-2.6.27/fs/ext4/migrate.c linux-2.6.27.19-5.1/fs/ext4/migrate.c
  {
        handle_t *handle;
        int retval = 0, i;
-@@ -516,12 +515,6 @@ int ext4_ext_migrate(struct inode *inode
+@@ -515,12 +514,6 @@
+        * trascation that created the inode. Later as and
         * when we add extents we extent the journal
         */
-       /*
+-      /*
 -       * inode_mutex prevent write and truncate on the file. Read still goes
 -       * through. We take i_data_sem in ext4_ext_swap_inode_data before we
 -       * switch the inode format to prevent read.
 -       */
 -      mutex_lock(&(inode->i_mutex));
--      /*
+       /*
         * Even though we take i_mutex we can still cause block allocation
         * via mmap write to holes. If we have allocated new blocks we fail
-        * migrate.  New block allocation will clear EXT4_EXT_MIGRATE flag.
-@@ -623,7 +616,6 @@ err_out:
+@@ -623,7 +616,6 @@
        tmp_inode->i_nlink = 0;
  
        ext4_journal_stop(handle);
@@ -985856,10 +985749,10 @@ diff -purN linux-2.6.27/fs/ext4/migrate.c linux-2.6.27.19-5.1/fs/ext4/migrate.c
  
        if (tmp_inode)
                iput(tmp_inode);
-diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
---- linux-2.6.27/fs/ext4/namei.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/namei.c        2009-03-25 16:11:36.000000000 +0000
-@@ -151,34 +151,36 @@ struct dx_map_entry
+diff -r 9608d5473017 fs/ext4/namei.c
+--- a/fs/ext4/namei.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/namei.c  Wed May 06 16:56:49 2009 +0100
+@@ -151,34 +151,36 @@
  
  static inline ext4_lblk_t dx_get_block(struct dx_entry *entry);
  static void dx_set_block(struct dx_entry *entry, ext4_lblk_t value);
@@ -985912,7 +985805,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
                             struct inode *inode);
  
-@@ -207,44 +209,44 @@ static inline void dx_set_block(struct d
+@@ -207,44 +209,44 @@
        entry->block = cpu_to_le32(value);
  }
  
@@ -985965,7 +985858,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  {
        unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0);
        return entry_space / sizeof(struct dx_entry);
-@@ -254,12 +256,12 @@ static inline unsigned dx_node_limit (st
+@@ -254,12 +256,12 @@
   * Debug
   */
  #ifdef DX_DEBUG
@@ -985981,7 +985874,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                                0, (unsigned long)dx_get_block(entries + i));
        }
        printk("\n");
-@@ -306,7 +308,7 @@ struct stats dx_show_entries(struct dx_h
+@@ -306,7 +308,7 @@
                             struct dx_entry *entries, int levels)
  {
        unsigned blocksize = dir->i_sb->s_blocksize;
@@ -985990,7 +985883,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        unsigned bcount = 0;
        struct buffer_head *bh;
        int err;
-@@ -325,11 +327,12 @@ struct stats dx_show_entries(struct dx_h
+@@ -325,11 +327,12 @@
                names += stats.names;
                space += stats.space;
                bcount += stats.bcount;
@@ -986006,7 +985899,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        return (struct stats) { names, space, bcount};
  }
  #endif /* DX_DEBUG */
-@@ -344,7 +347,7 @@ struct stats dx_show_entries(struct dx_h
+@@ -344,7 +347,7 @@
   * back to userspace.
   */
  static struct dx_frame *
@@ -986015,7 +985908,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
         struct dx_hash_info *hinfo, struct dx_frame *frame_in, int *err)
  {
        unsigned count, indirect;
-@@ -355,8 +358,6 @@ dx_probe(struct dentry *dentry, struct i
+@@ -355,8 +358,6 @@
        u32 hash;
  
        frame->bh = NULL;
@@ -986024,7 +985917,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!(bh = ext4_bread (NULL,dir, 0, 0, err)))
                goto fail;
        root = (struct dx_root *) bh->b_data;
-@@ -371,9 +372,11 @@ dx_probe(struct dentry *dentry, struct i
+@@ -371,9 +372,11 @@
                goto fail;
        }
        hinfo->hash_version = root->info.hash_version;
@@ -986038,7 +985931,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        hash = hinfo->hash;
  
        if (root->info.unused_flags & 1) {
-@@ -406,7 +409,7 @@ dx_probe(struct dentry *dentry, struct i
+@@ -406,7 +409,7 @@
                goto fail;
        }
  
@@ -986047,7 +985940,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        while (1)
        {
                count = dx_get_count(entries);
-@@ -555,7 +558,7 @@ static int ext4_htree_next_block(struct 
+@@ -555,7 +558,7 @@
                                      0, &err)))
                        return err; /* Failure */
                p++;
@@ -986056,7 +985949,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                p->bh = bh;
                p->at = p->entries = ((struct dx_node *) bh->b_data)->entries;
        }
-@@ -593,7 +596,7 @@ static int htree_dirblock_to_tree(struct
+@@ -593,7 +596,7 @@
                        /* On error, skip the f_pos to the next block. */
                        dir_file->f_pos = (dir_file->f_pos |
                                        (dir->i_sb->s_blocksize - 1)) + 1;
@@ -986065,7 +985958,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                        return count;
                }
                ext4fs_dirhash(de->name, de->name_len, hinfo);
-@@ -635,11 +638,14 @@ int ext4_htree_fill_tree(struct file *di
+@@ -635,11 +638,14 @@
        int ret, err;
        __u32 hashval;
  
@@ -986082,7 +985975,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed;
                count = htree_dirblock_to_tree(dir_file, dir, 0, &hinfo,
                                               start_hash, start_minor_hash);
-@@ -648,7 +654,7 @@ int ext4_htree_fill_tree(struct file *di
+@@ -648,7 +654,7 @@
        }
        hinfo.hash = start_hash;
        hinfo.minor_hash = 0;
@@ -986091,7 +985984,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!frame)
                return err;
  
-@@ -694,8 +700,8 @@ int ext4_htree_fill_tree(struct file *di
+@@ -694,8 +700,8 @@
                        break;
        }
        dx_release(frames);
@@ -986102,7 +985995,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        return count;
  errout:
        dx_release(frames);
-@@ -802,17 +808,17 @@ static inline int ext4_match (int len, c
+@@ -802,17 +808,17 @@
  /*
   * Returns 0 if not found, -1 on failure, and 1 on success
   */
@@ -986125,7 +986018,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  
        de = (struct ext4_dir_entry_2 *) bh->b_data;
        dlimit = bh->b_data + dir->i_sb->s_blocksize;
-@@ -851,12 +857,13 @@ static inline int search_dirblock(struct
+@@ -851,12 +857,13 @@
   * The returned buffer_head has ->b_count elevated.  The caller is expected
   * to brelse() it when appropriate.
   */
@@ -986143,7 +986036,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        ext4_lblk_t start, block, b;
        int ra_max = 0;         /* Number of bh's in the readahead
                                   buffer, bh_use[] */
-@@ -865,16 +872,15 @@ static struct buffer_head * ext4_find_en
+@@ -865,16 +872,15 @@
        int num = 0;
        ext4_lblk_t  nblocks;
        int i, err;
@@ -986162,7 +986055,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                /*
                 * On success, or if the error was file not found,
                 * return.  Otherwise, fall back to doing a search the
-@@ -882,7 +888,8 @@ static struct buffer_head * ext4_find_en
+@@ -882,7 +888,8 @@
                 */
                if (bh || (err != ERR_BAD_DX_DIR))
                        return bh;
@@ -986172,7 +986065,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        }
        nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
        start = EXT4_I(dir)->i_dir_start_lookup;
-@@ -926,7 +933,7 @@ restart:
+@@ -926,7 +933,7 @@
                        brelse(bh);
                        goto next;
                }
@@ -986181,7 +986074,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                            block << EXT4_BLOCK_SIZE_BITS(sb), res_dir);
                if (i == 1) {
                        EXT4_I(dir)->i_dir_start_lookup = block;
-@@ -956,11 +963,11 @@ restart:
+@@ -956,11 +963,11 @@
  cleanup_and_exit:
        /* Clean up the read-ahead blocks */
        for (; ra_ptr < ra_max; ra_ptr++)
@@ -986195,7 +986088,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                       struct ext4_dir_entry_2 **res_dir, int *err)
  {
        struct super_block * sb;
-@@ -971,14 +978,13 @@ static struct buffer_head * ext4_dx_find
+@@ -971,14 +978,13 @@
        struct buffer_head *bh;
        ext4_lblk_t block;
        int retval;
@@ -986213,7 +986106,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                        return NULL;
        } else {
                frame = frames;
-@@ -1010,7 +1016,7 @@ static struct buffer_head * ext4_dx_find
+@@ -1010,7 +1016,7 @@
                                return bh;
                        }
                }
@@ -986222,7 +986115,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                /* Check to see if we should continue to search */
                retval = ext4_htree_next_block(dir, hash, frame,
                                               frames, NULL);
-@@ -1025,28 +1031,28 @@ static struct buffer_head * ext4_dx_find
+@@ -1025,28 +1031,28 @@
  
        *err = -ENOENT;
  errout:
@@ -986260,7 +986153,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                        return ERR_PTR(-EIO);
                }
                inode = ext4_iget(dir->i_sb, ino);
-@@ -1059,18 +1065,17 @@ static struct dentry *ext4_lookup(struct
+@@ -1059,18 +1065,17 @@
  
  struct dentry *ext4_get_parent(struct dentry *child)
  {
@@ -986285,7 +986178,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        inode = NULL;
        if (!bh)
                return ERR_PTR(-ENOENT);
-@@ -1079,7 +1084,7 @@ struct dentry *ext4_get_parent(struct de
+@@ -1079,7 +1084,7 @@
  
        if (!ext4_valid_inum(child->d_inode->i_sb, ino)) {
                ext4_error(child->d_inode->i_sb, "ext4_get_parent",
@@ -986294,7 +986187,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                return ERR_PTR(-EIO);
        }
  
-@@ -1176,9 +1181,9 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1176,9 +1181,9 @@
        u32 hash2;
        struct dx_map_entry *map;
        char *data1 = (*bh)->b_data, *data2;
@@ -986306,7 +986199,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  
        bh2 = ext4_append (handle, dir, &newblock, &err);
        if (!(bh2)) {
-@@ -1201,10 +1206,10 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1201,10 +1206,10 @@
  
        /* create map in the end of data2 block */
        map = (struct dx_map_entry *) (data2 + blocksize);
@@ -986319,7 +986212,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        /* Split the existing block in the middle, size-wise */
        size = 0;
        move = 0;
-@@ -1225,7 +1230,7 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1225,7 +1230,7 @@
  
        /* Fancy dance to stay within two buffers */
        de2 = dx_move_dirents(data1, data2, map + split, count - split);
@@ -986328,7 +986221,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        de->rec_len = ext4_rec_len_to_disk(data1 + blocksize - (char *) de);
        de2->rec_len = ext4_rec_len_to_disk(data2 + blocksize - (char *) de2);
        dxtrace(dx_show_leaf (hinfo, (struct ext4_dir_entry_2 *) data1, blocksize, 1));
-@@ -1237,15 +1242,15 @@ static struct ext4_dir_entry_2 *do_split
+@@ -1237,15 +1242,15 @@
                swap(*bh, bh2);
                de = de2;
        }
@@ -986349,7 +986242,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        return de;
  
  journal_error:
-@@ -1271,12 +1276,12 @@ errout:
+@@ -1271,12 +1276,12 @@
   */
  static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
                             struct inode *inode, struct ext4_dir_entry_2 *de,
@@ -986364,7 +986257,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        unsigned short  reclen;
        int             nlen, rlen, err;
        char            *top;
-@@ -1288,11 +1293,11 @@ static int add_dirent_to_buf(handle_t *h
+@@ -1288,11 +1293,11 @@
                while ((char *) de <= top) {
                        if (!ext4_check_dir_entry("ext4_add_entry", dir, de,
                                                  bh, offset)) {
@@ -986379,7 +986272,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                                return -EEXIST;
                        }
                        nlen = EXT4_DIR_REC_LEN(de->name_len);
-@@ -1329,7 +1334,7 @@ static int add_dirent_to_buf(handle_t *h
+@@ -1329,7 +1334,7 @@
        } else
                de->inode = 0;
        de->name_len = namelen;
@@ -986388,7 +986281,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        /*
         * XXX shouldn't update any times until successful
         * completion of syscall, but too many callers depend
-@@ -1377,7 +1382,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1377,7 +1382,7 @@
        struct fake_dirent *fde;
  
        blocksize =  dir->i_sb->s_blocksize;
@@ -986397,7 +986290,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        retval = ext4_journal_get_write_access(handle, bh);
        if (retval) {
                ext4_std_error(dir->i_sb, retval);
-@@ -1386,7 +1391,7 @@ static int make_indexed_dir(handle_t *ha
+@@ -1386,7 +1391,7 @@
        }
        root = (struct dx_root *) bh->b_data;
  
@@ -986406,7 +986299,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!(bh2)) {
                brelse(bh);
                return retval;
-@@ -1412,12 +1417,14 @@ static int make_indexed_dir(handle_t *ha
+@@ -1412,12 +1417,14 @@
        root->info.info_length = sizeof(root->info);
        root->info.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version;
        entries = root->entries;
@@ -986424,7 +986317,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed;
        ext4fs_dirhash(name, namelen, &hinfo);
        frame = frames;
-@@ -1443,14 +1450,13 @@ static int make_indexed_dir(handle_t *ha
+@@ -1443,14 +1450,13 @@
   * may not sleep between calling this and putting something into
   * the entry, as someone else might have used it while you slept.
   */
@@ -986443,7 +986336,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int     retval;
        int     dx_fallback=0;
        unsigned blocksize;
-@@ -1469,7 +1475,7 @@ static int ext4_add_entry (handle_t *han
+@@ -1469,7 +1475,7 @@
                ext4_mark_inode_dirty(handle, dir);
        }
        blocks = dir->i_size >> sb->s_blocksize_bits;
@@ -986452,7 +986345,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                bh = ext4_bread(handle, dir, block, 0, &retval);
                if(!bh)
                        return retval;
-@@ -1500,13 +1506,13 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1500,13 +1506,13 @@
        struct dx_frame frames[2], *frame;
        struct dx_entry *entries, *at;
        struct dx_hash_info hinfo;
@@ -986469,7 +986362,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!frame)
                return err;
        entries = frame->entries;
-@@ -1527,7 +1533,7 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1527,7 +1533,7 @@
        }
  
        /* Block full, should compress but for now just split */
@@ -986478,7 +986371,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                       dx_get_count(entries), dx_get_limit(entries)));
        /* Need to split index? */
        if (dx_get_count(entries) == dx_get_limit(entries)) {
-@@ -1559,7 +1565,8 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1559,7 +1565,8 @@
                if (levels) {
                        unsigned icount1 = icount/2, icount2 = icount - icount1;
                        unsigned hash2 = dx_get_hash(entries + icount1);
@@ -986488,7 +986381,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  
                        BUFFER_TRACE(frame->bh, "get_write_access"); /* index root */
                        err = ext4_journal_get_write_access(handle,
-@@ -1567,11 +1574,11 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1567,11 +1574,11 @@
                        if (err)
                                goto journal_error;
  
@@ -986505,7 +986398,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  
                        /* Which index block gets the new entry? */
                        if (at - entries >= icount1) {
-@@ -1579,16 +1586,17 @@ static int ext4_dx_add_entry(handle_t *h
+@@ -1579,16 +1586,17 @@
                                frame->entries = entries = entries2;
                                swap(frame->bh, bh2);
                        }
@@ -986527,7 +986420,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                        memcpy((char *) entries2, (char *) entries,
                               icount * sizeof(struct dx_entry));
                        dx_set_limit(entries2, dx_node_limit(dir));
-@@ -1630,12 +1638,12 @@ cleanup:
+@@ -1630,12 +1638,12 @@
   * ext4_delete_entry deletes a directory entry by merging it with the
   * previous entry
   */
@@ -986545,7 +986438,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int i;
  
        i = 0;
-@@ -1716,11 +1724,11 @@ static int ext4_add_nondir(handle_t *han
+@@ -1716,11 +1724,11 @@
   * If the create succeeds, we fill in the inode information
   * with d_instantiate().
   */
@@ -986560,7 +986453,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int err, retries = 0;
  
  retry:
-@@ -1747,8 +1755,8 @@ retry:
+@@ -1747,8 +1755,8 @@
        return err;
  }
  
@@ -986571,7 +986464,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  {
        handle_t *handle;
        struct inode *inode;
-@@ -1767,11 +1775,11 @@ retry:
+@@ -1767,11 +1775,11 @@
        if (IS_DIRSYNC(dir))
                handle->h_sync = 1;
  
@@ -986585,7 +986478,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                inode->i_op = &ext4_special_inode_operations;
  #endif
                err = ext4_add_nondir(handle, dentry, inode);
-@@ -1782,12 +1790,12 @@ retry:
+@@ -1782,12 +1790,12 @@
        return err;
  }
  
@@ -986602,7 +986495,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int err, retries = 0;
  
        if (EXT4_DIR_LINK_MAX(dir))
-@@ -1803,7 +1811,7 @@ retry:
+@@ -1803,7 +1811,7 @@
        if (IS_DIRSYNC(dir))
                handle->h_sync = 1;
  
@@ -986611,7 +986504,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        err = PTR_ERR(inode);
        if (IS_ERR(inode))
                goto out_stop;
-@@ -1811,7 +1819,7 @@ retry:
+@@ -1811,7 +1819,7 @@
        inode->i_op = &ext4_dir_inode_operations;
        inode->i_fop = &ext4_dir_operations;
        inode->i_size = EXT4_I(inode)->i_disksize = inode->i_sb->s_blocksize;
@@ -986620,7 +986513,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!dir_block)
                goto out_clear_inode;
        BUFFER_TRACE(dir_block, "get_write_access");
-@@ -1820,26 +1828,26 @@ retry:
+@@ -1820,26 +1828,26 @@
        de->inode = cpu_to_le32(inode->i_ino);
        de->name_len = 1;
        de->rec_len = ext4_rec_len_to_disk(EXT4_DIR_REC_LEN(de->name_len));
@@ -986652,7 +986545,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                goto out_stop;
        }
        ext4_inc_count(handle, dir);
-@@ -1856,17 +1864,17 @@ out_stop:
+@@ -1856,17 +1864,17 @@
  /*
   * routine to check that the specified directory is empty (for rmdir)
   */
@@ -986676,7 +986569,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                if (err)
                        ext4_error(inode->i_sb, __func__,
                                   "error %d reading directory #%lu offset 0",
-@@ -1881,29 +1889,29 @@ static int empty_dir (struct inode * ino
+@@ -1881,29 +1889,29 @@
        de1 = ext4_next_entry(de);
        if (le32_to_cpu(de->inode) != inode->i_ino ||
                        !le32_to_cpu(de1->inode) ||
@@ -986716,7 +986609,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                                                   err, inode->i_ino, offset);
                                offset += sb->s_blocksize;
                                continue;
-@@ -1917,13 +1925,13 @@ static int empty_dir (struct inode * ino
+@@ -1917,13 +1925,13 @@
                        continue;
                }
                if (le32_to_cpu(de->inode)) {
@@ -986732,7 +986625,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        return 1;
  }
  
-@@ -1954,8 +1962,8 @@ int ext4_orphan_add(handle_t *handle, st
+@@ -1954,8 +1962,8 @@
         * ->i_nlink. For, say it, character device. Not a regular file,
         * not a directory, not a symlink and ->i_nlink > 0.
         */
@@ -986743,7 +986636,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  
        BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "get_write_access");
        err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh);
-@@ -2003,7 +2011,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2003,7 +2011,7 @@
        struct list_head *prev;
        struct ext4_inode_info *ei = EXT4_I(inode);
        struct ext4_sb_info *sbi;
@@ -986752,7 +986645,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        struct ext4_iloc iloc;
        int err = 0;
  
-@@ -2033,7 +2041,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2033,7 +2041,7 @@
                goto out_err;
  
        if (prev == &sbi->s_orphan) {
@@ -986761,7 +986654,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                BUFFER_TRACE(sbi->s_sbh, "get_write_access");
                err = ext4_journal_get_write_access(handle, sbi->s_sbh);
                if (err)
-@@ -2045,7 +2053,7 @@ int ext4_orphan_del(handle_t *handle, st
+@@ -2045,7 +2053,7 @@
                struct inode *i_prev =
                        &list_entry(prev, struct ext4_inode_info, i_orphan)->vfs_inode;
  
@@ -986770,7 +986663,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                          i_prev->i_ino, ino_next);
                err = ext4_reserve_inode_write(handle, i_prev, &iloc2);
                if (err)
-@@ -2069,12 +2077,12 @@ out_brelse:
+@@ -2069,12 +2077,12 @@
        goto out_err;
  }
  
@@ -986787,7 +986680,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        handle_t *handle;
  
        /* Initialize quotas before so that eventual writes go in
-@@ -2085,7 +2093,7 @@ static int ext4_rmdir (struct inode * di
+@@ -2085,7 +2093,7 @@
                return PTR_ERR(handle);
  
        retval = -ENOENT;
@@ -986796,7 +986689,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!bh)
                goto end_rmdir;
  
-@@ -2099,16 +2107,16 @@ static int ext4_rmdir (struct inode * di
+@@ -2099,16 +2107,16 @@
                goto end_rmdir;
  
        retval = -ENOTEMPTY;
@@ -986817,7 +986710,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        inode->i_version++;
        clear_nlink(inode);
        /* There's no need to set i_disksize: the fact that i_nlink is
-@@ -2124,16 +2132,16 @@ static int ext4_rmdir (struct inode * di
+@@ -2124,16 +2132,16 @@
  
  end_rmdir:
        ext4_journal_stop(handle);
@@ -986839,7 +986732,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        handle_t *handle;
  
        /* Initialize quotas before so that eventual writes go
-@@ -2147,7 +2155,7 @@ static int ext4_unlink(struct inode * di
+@@ -2147,7 +2155,7 @@
                handle->h_sync = 1;
  
        retval = -ENOENT;
@@ -986848,7 +986741,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        if (!bh)
                goto end_unlink;
  
-@@ -2158,9 +2166,9 @@ static int ext4_unlink(struct inode * di
+@@ -2158,9 +2166,9 @@
                goto end_unlink;
  
        if (!inode->i_nlink) {
@@ -986861,7 +986754,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                inode->i_nlink = 1;
        }
        retval = ext4_delete_entry(handle, dir, de, bh);
-@@ -2178,15 +2186,15 @@ static int ext4_unlink(struct inode * di
+@@ -2178,15 +2186,15 @@
  
  end_unlink:
        ext4_journal_stop(handle);
@@ -986881,7 +986774,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int l, err, retries = 0;
  
        l = strlen(symname)+1;
-@@ -2203,12 +2211,12 @@ retry:
+@@ -2203,12 +2211,12 @@
        if (IS_DIRSYNC(dir))
                handle->h_sync = 1;
  
@@ -986896,7 +986789,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                inode->i_op = &ext4_symlink_inode_operations;
                ext4_set_aops(inode);
                /*
-@@ -2221,14 +2229,14 @@ retry:
+@@ -2221,14 +2229,14 @@
                if (err) {
                        clear_nlink(inode);
                        ext4_mark_inode_dirty(handle, inode);
@@ -986913,7 +986806,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                inode->i_size = l-1;
        }
        EXT4_I(inode)->i_disksize = inode->i_size;
-@@ -2240,8 +2248,8 @@ out_stop:
+@@ -2240,8 +2248,8 @@
        return err;
  }
  
@@ -986924,7 +986817,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
  {
        handle_t *handle;
        struct inode *inode = old_dentry->d_inode;
-@@ -2284,13 +2292,13 @@ retry:
+@@ -2284,13 +2292,13 @@
   * Anybody can rename anything with this: the permission checks are left to the
   * higher-level routines.
   */
@@ -986943,7 +986836,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        int retval;
  
        old_bh = new_bh = dir_bh = NULL;
-@@ -2308,7 +2316,7 @@ static int ext4_rename (struct inode * o
+@@ -2308,7 +2316,7 @@
        if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
                handle->h_sync = 1;
  
@@ -986952,7 +986845,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        /*
         *  Check for inode number is _not_ due to possible IO errors.
         *  We might rmdir the source, keep it as pwd of some process
-@@ -2321,32 +2329,32 @@ static int ext4_rename (struct inode * o
+@@ -2321,32 +2329,32 @@
                goto end_rename;
  
        new_inode = new_dentry->d_inode;
@@ -986991,7 +986884,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                if (retval)
                        goto end_rename;
        } else {
-@@ -2388,7 +2396,7 @@ static int ext4_rename (struct inode * o
+@@ -2388,7 +2396,7 @@
                struct buffer_head *old_bh2;
                struct ext4_dir_entry_2 *old_de2;
  
@@ -987000,7 +986893,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
                if (old_bh2) {
                        retval = ext4_delete_entry(handle, old_dir,
                                                   old_de2, old_bh2);
-@@ -2433,9 +2441,9 @@ static int ext4_rename (struct inode * o
+@@ -2433,9 +2441,9 @@
        retval = 0;
  
  end_rename:
@@ -987013,7 +986906,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        ext4_journal_stop(handle);
        return retval;
  }
-@@ -2454,7 +2462,7 @@ const struct inode_operations ext4_dir_i
+@@ -2454,7 +2462,7 @@
        .mknod          = ext4_mknod,
        .rename         = ext4_rename,
        .setattr        = ext4_setattr,
@@ -987022,7 +986915,7 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
        .listxattr      = ext4_listxattr,
-@@ -2465,7 +2473,7 @@ const struct inode_operations ext4_dir_i
+@@ -2465,7 +2473,7 @@
  
  const struct inode_operations ext4_special_inode_operations = {
        .setattr        = ext4_setattr,
@@ -987031,10 +986924,10 @@ diff -purN linux-2.6.27/fs/ext4/namei.c linux-2.6.27.19-5.1/fs/ext4/namei.c
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
        .listxattr      = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
---- linux-2.6.27/fs/ext4/resize.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/resize.c       2009-03-25 16:11:36.000000000 +0000
-@@ -50,7 +50,7 @@ static int verify_group_input(struct sup
+diff -r 9608d5473017 fs/ext4/resize.c
+--- a/fs/ext4/resize.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/resize.c Wed May 06 16:56:49 2009 +0100
+@@ -50,7 +50,7 @@
        ext4_get_group_no_and_offset(sb, start, NULL, &offset);
        if (group != sbi->s_groups_count)
                ext4_warning(sb, __func__,
@@ -987043,7 +986936,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
                             input->group, sbi->s_groups_count);
        else if (offset != 0)
                        ext4_warning(sb, __func__, "Last group not full");
-@@ -284,11 +284,9 @@ static int setup_new_group_blocks(struct
+@@ -284,11 +284,9 @@
        if ((err = extend_or_restart_transaction(handle, 2, bh)))
                goto exit_bh;
  
@@ -987056,7 +986949,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
        /* Mark unused entries in inode bitmap used */
        ext4_debug("clear inode bitmap %#04llx (+%llu)\n",
                   input->inode_bitmap, input->inode_bitmap - start);
-@@ -297,7 +295,7 @@ static int setup_new_group_blocks(struct
+@@ -297,7 +295,7 @@
                goto exit_journal;
        }
  
@@ -987065,7 +986958,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
                        bh->b_data);
        ext4_journal_dirty_metadata(handle, bh);
  exit_bh:
-@@ -416,8 +414,8 @@ static int add_new_gdb(handle_t *handle,
+@@ -416,8 +414,8 @@
                       "EXT4-fs: ext4_add_new_gdb: adding group block %lu\n",
                       gdb_num);
  
@@ -987076,7 +986969,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
           * because the user tools have no way of handling this.  Probably a
           * bad time to do it anyways.
           */
-@@ -715,7 +713,7 @@ static void update_backups(struct super_
+@@ -715,7 +713,7 @@
  exit_err:
        if (err) {
                ext4_warning(sb, __func__,
@@ -987085,7 +986978,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
                             "forcing fsck on next reboot", group, err);
                sbi->s_mount_state &= ~EXT4_VALID_FS;
                sbi->s_es->s_state &= cpu_to_le16(~EXT4_VALID_FS);
-@@ -747,6 +745,7 @@ int ext4_group_add(struct super_block *s
+@@ -747,6 +745,7 @@
        struct inode *inode = NULL;
        handle_t *handle;
        int gdb_off, gdb_num;
@@ -987093,15 +986986,15 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
        int err, err2;
  
        gdb_num = input->group / EXT4_DESC_PER_BLOCK(sb);
-@@ -787,6 +786,7 @@ int ext4_group_add(struct super_block *s
+@@ -786,6 +785,7 @@
+                       return PTR_ERR(inode);
                }
        }
 +
        if ((err = verify_group_input(sb, input)))
                goto exit_put;
-@@ -855,6 +855,7 @@ int ext4_group_add(struct super_block *s
+@@ -855,6 +855,7 @@
           * using the new disk blocks.
           */
  
@@ -987109,7 +987002,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
        /* Update group descriptor block for new group */
        gdp = (struct ext4_group_desc *)((char *)primary->b_data +
                                         gdb_off * EXT4_DESC_SIZE(sb));
-@@ -862,19 +863,21 @@ int ext4_group_add(struct super_block *s
+@@ -862,19 +863,21 @@
        ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */
        ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
        ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */
@@ -987137,7 +987030,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
        /*
         * Make the new blocks and inodes valid next.  We do this before
         * increasing the group count so that once the group is enabled,
-@@ -915,6 +918,7 @@ int ext4_group_add(struct super_block *s
+@@ -915,6 +918,7 @@
  
        /* Update the global fs size fields */
        sbi->s_groups_count++;
@@ -987145,10 +987038,11 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
  
        ext4_journal_dirty_metadata(handle, primary);
  
-@@ -929,6 +933,15 @@ int ext4_group_add(struct super_block *s
+@@ -928,6 +932,15 @@
+                          input->free_blocks_count);
        percpu_counter_add(&sbi->s_freeinodes_counter,
                           EXT4_INODES_PER_GROUP(sb));
++
 +      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
 +              ext4_group_t flex_group;
 +              flex_group = ext4_flex_group(sbi, input->group);
@@ -987157,11 +987051,10 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
 +              sbi->s_flex_groups[flex_group].free_inodes +=
 +                      EXT4_INODES_PER_GROUP(sb);
 +      }
-+
        ext4_journal_dirty_metadata(handle, sbi->s_sbh);
        sb->s_dirt = 1;
-@@ -964,12 +977,10 @@ int ext4_group_extend(struct super_block
+@@ -964,12 +977,10 @@
        ext4_group_t o_groups_count;
        ext4_grpblk_t last;
        ext4_grpblk_t add;
@@ -987175,7 +987068,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
  
        /* We don't need to worry about locking wrt other resizers just
         * yet: we're going to revalidate es->s_blocks_count after
-@@ -1068,50 +1079,13 @@ int ext4_group_extend(struct super_block
+@@ -1068,49 +1079,12 @@
        unlock_super(sb);
        ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count,
                   o_blocks_count + add);
@@ -987186,7 +987079,7 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
                   o_blocks_count + add);
        if ((err = ext4_journal_stop(handle)))
                goto exit_put;
+-
 -      /*
 -       * Mark mballoc pages as not up to date so that they will be updated
 -       * next time they are loaded by ext4_mb_load_buddy.
@@ -987224,13 +987117,12 @@ diff -purN linux-2.6.27/fs/ext4/resize.c linux-2.6.27.19-5.1/fs/ext4/resize.c
 -              /* Update free blocks in group info */
 -              ext4_mb_update_group_info(grp, add);
 -      }
--
        if (test_opt(sb, DEBUG))
                printk(KERN_DEBUG "EXT4-fs: extended group to %llu blocks\n",
-                      ext4_blocks_count(es));
-diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
---- linux-2.6.27/fs/ext4/super.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/super.c        2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/super.c
+--- a/fs/ext4/super.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/super.c  Wed May 06 16:56:49 2009 +0100
 @@ -34,6 +34,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
@@ -987240,16 +987132,16 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  #include <linux/log2.h>
  #include <linux/crc16.h>
  #include <asm/uaccess.h>
-@@ -45,6 +47,8 @@
+@@ -44,6 +46,8 @@
+ #include "acl.h"
  #include "namei.h"
  #include "group.h"
-+struct proc_dir_entry *ext4_proc_root;
 +
++struct proc_dir_entry *ext4_proc_root;
  static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
                             unsigned long journal_devnum);
- static int ext4_create_journal(struct super_block *, struct ext4_super_block *,
-@@ -89,6 +93,38 @@ ext4_fsblk_t ext4_inode_table(struct sup
+@@ -89,6 +93,38 @@
                (ext4_fsblk_t)le32_to_cpu(bg->bg_inode_table_hi) << 32 : 0);
  }
  
@@ -987288,10 +987180,12 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  void ext4_block_bitmap_set(struct super_block *sb,
                           struct ext4_group_desc *bg, ext4_fsblk_t blk)
  {
-@@ -113,6 +149,38 @@ void ext4_inode_table_set(struct super_b
+@@ -111,6 +147,38 @@
+       bg->bg_inode_table_lo = cpu_to_le32((u32)blk);
+       if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
                bg->bg_inode_table_hi = cpu_to_le32(blk >> 32);
- }
++}
++
 +void ext4_free_blks_set(struct super_block *sb,
 +                        struct ext4_group_desc *bg, __u32 count)
 +{
@@ -987322,12 +987216,10 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 +      bg->bg_itable_unused_lo = cpu_to_le16((__u16)count);
 +      if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
 +              bg->bg_itable_unused_hi = cpu_to_le16(count >> 16);
-+}
-+
+ }
  /*
-  * Wrappers for jbd2_journal_start/end.
-  *
-@@ -329,7 +397,8 @@ void ext4_abort(struct super_block *sb, 
+@@ -329,7 +397,8 @@
        EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
        sb->s_flags |= MS_RDONLY;
        EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT;
@@ -987337,10 +987229,11 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  }
  
  void ext4_warning(struct super_block *sb, const char *function,
-@@ -345,6 +414,44 @@ void ext4_warning(struct super_block *sb
+@@ -344,6 +413,44 @@
+       printk("\n");
        va_end(args);
  }
++
 +void ext4_grp_locked_error(struct super_block *sb, ext4_group_t grp,
 +                              const char *function, const char *fmt, ...)
 +__releases(bitlock)
@@ -987378,14 +987271,15 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 +      return;
 +}
 +
-+
  void ext4_update_dynamic_rev(struct super_block *sb)
  {
-       struct ext4_super_block *es = EXT4_SB(sb)->s_es;
-@@ -370,66 +477,6 @@ void ext4_update_dynamic_rev(struct supe
+@@ -368,66 +475,6 @@
+        * means they are likely already in use, so leave them alone.  We
+        * can leave it up to e2fsck to clean up any inconsistencies there.
         */
- }
+-}
+-
 -int ext4_update_compat_feature(handle_t *handle,
 -                                      struct super_block *sb, __u32 compat)
 -{
@@ -987444,12 +987338,10 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 -                              EXT4_SB(sb)->s_sbh);
 -      }
 -      return err;
--}
--
+ }
  /*
-  * Open the external journal device
-  */
-@@ -505,13 +552,16 @@ static void ext4_put_super(struct super_
+@@ -505,12 +552,15 @@
        ext4_xattr_put_super(sb);
        jbd2_journal_destroy(sbi->s_journal);
        sbi->s_journal = NULL;
@@ -987460,15 +987352,14 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 -              BUFFER_TRACE(sbi->s_sbh, "marking dirty");
 -              mark_buffer_dirty(sbi->s_sbh);
                ext4_commit_super(sb, es, 1);
-       }
++      }
 +      if (sbi->s_proc) {
 +              remove_proc_entry("inode_readahead_blks", sbi->s_proc);
 +              remove_proc_entry(sb->s_id, ext4_proc_root);
-+      }
+       }
  
        for (i = 0; i < sbi->s_gdb_count; i++)
-               brelse(sbi->s_group_desc[i]);
-@@ -520,6 +570,7 @@ static void ext4_put_super(struct super_
+@@ -520,6 +570,7 @@
        percpu_counter_destroy(&sbi->s_freeblocks_counter);
        percpu_counter_destroy(&sbi->s_freeinodes_counter);
        percpu_counter_destroy(&sbi->s_dirs_counter);
@@ -987476,7 +987367,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        brelse(sbi->s_sbh);
  #ifdef CONFIG_QUOTA
        for (i = 0; i < MAXQUOTAS; i++)
-@@ -562,11 +613,10 @@ static struct inode *ext4_alloc_inode(st
+@@ -562,11 +613,10 @@
        ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
        if (!ei)
                return NULL;
@@ -987489,7 +987380,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        ei->vfs_inode.i_version = 1;
        ei->vfs_inode.i_data.writeback_index = 0;
        memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
-@@ -599,7 +649,7 @@ static void init_once(void *foo)
+@@ -599,7 +649,7 @@
        struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
  
        INIT_LIST_HEAD(&ei->i_orphan);
@@ -987498,7 +987389,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        init_rwsem(&ei->xattr_sem);
  #endif
        init_rwsem(&ei->i_data_sem);
-@@ -625,8 +675,7 @@ static void destroy_inodecache(void)
+@@ -625,8 +675,7 @@
  
  static void ext4_clear_inode(struct inode *inode)
  {
@@ -987508,7 +987399,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (EXT4_I(inode)->i_acl &&
                        EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) {
                posix_acl_release(EXT4_I(inode)->i_acl);
-@@ -638,10 +687,7 @@ static void ext4_clear_inode(struct inod
+@@ -638,10 +687,7 @@
                EXT4_I(inode)->i_default_acl = EXT4_ACL_NOT_CACHED;
        }
  #endif
@@ -987520,7 +987411,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        jbd2_journal_release_jbd_inode(EXT4_SB(inode->i_sb)->s_journal,
                                       &EXT4_I(inode)->jinode);
  }
-@@ -654,7 +700,7 @@ static inline void ext4_show_quota_optio
+@@ -654,7 +700,7 @@
  
        if (sbi->s_jquota_fmt)
                seq_printf(seq, ",jqfmt=%s",
@@ -987529,7 +987420,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
        if (sbi->s_qf_names[USRQUOTA])
                seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]);
-@@ -718,7 +764,7 @@ static int ext4_show_options(struct seq_
+@@ -718,7 +764,7 @@
                seq_puts(seq, ",debug");
        if (test_opt(sb, OLDALLOC))
                seq_puts(seq, ",oldalloc");
@@ -987538,7 +987429,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (test_opt(sb, XATTR_USER) &&
                !(def_mount_opts & EXT4_DEFM_XATTR_USER))
                seq_puts(seq, ",user_xattr");
-@@ -727,7 +773,7 @@ static int ext4_show_options(struct seq_
+@@ -727,7 +773,7 @@
                seq_puts(seq, ",nouser_xattr");
        }
  #endif
@@ -987547,7 +987438,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL))
                seq_puts(seq, ",acl");
        if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL))
-@@ -752,8 +798,6 @@ static int ext4_show_options(struct seq_
+@@ -752,8 +798,6 @@
                seq_puts(seq, ",nobh");
        if (!test_opt(sb, EXTENTS))
                seq_puts(seq, ",noextents");
@@ -987556,18 +987447,18 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (test_opt(sb, I_VERSION))
                seq_puts(seq, ",i_version");
        if (!test_opt(sb, DELALLOC))
-@@ -773,6 +817,10 @@ static int ext4_show_options(struct seq_
+@@ -772,6 +816,10 @@
+               seq_puts(seq, ",data=ordered");
        else if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)
                seq_puts(seq, ",data=writeback");
++
 +      if (sbi->s_inode_readahead_blks != EXT4_DEF_INODE_READAHEAD_BLKS)
 +              seq_printf(seq, ",inode_readahead_blks=%u",
 +                         sbi->s_inode_readahead_blks);
-+
        ext4_show_quota_options(seq, sb);
        return 0;
- }
-@@ -822,7 +870,7 @@ static struct dentry *ext4_fh_to_parent(
+@@ -822,7 +870,7 @@
  }
  
  #ifdef CONFIG_QUOTA
@@ -987576,7 +987467,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  #define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
  
  static int ext4_dquot_initialize(struct inode *inode, int type);
-@@ -896,7 +944,7 @@ static const struct export_operations ex
+@@ -896,7 +944,7 @@
  enum {
        Opt_bsd_df, Opt_minix_df, Opt_grpid, Opt_nogrpid,
        Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro,
@@ -987585,7 +987476,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
        Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh,
        Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,
-@@ -906,10 +954,11 @@ enum {
+@@ -906,10 +954,11 @@
        Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
        Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
        Opt_grpquota, Opt_extents, Opt_noextents, Opt_i_version,
@@ -987599,7 +987490,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        {Opt_bsd_df, "bsddf"},
        {Opt_minix_df, "minixdf"},
        {Opt_grpid, "grpid"},
-@@ -923,8 +972,6 @@ static match_table_t tokens = {
+@@ -923,8 +972,6 @@
        {Opt_err_panic, "errors=panic"},
        {Opt_err_ro, "errors=remount-ro"},
        {Opt_nouid32, "nouid32"},
@@ -987608,7 +987499,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        {Opt_debug, "debug"},
        {Opt_oldalloc, "oldalloc"},
        {Opt_orlov, "orlov"},
-@@ -961,12 +1008,11 @@ static match_table_t tokens = {
+@@ -961,12 +1008,11 @@
        {Opt_extents, "extents"},
        {Opt_noextents, "noextents"},
        {Opt_i_version, "i_version"},
@@ -987622,7 +987513,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        {Opt_err, NULL},
  };
  
-@@ -981,7 +1027,7 @@ static ext4_fsblk_t get_sb_block(void **
+@@ -981,7 +1027,7 @@
        /*todo: use simple_strtoll with >32bit ext4 */
        sb_block = simple_strtoul(options, &options, 0);
        if (*options && *options != ',') {
@@ -987631,7 +987522,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                       (char *) *data);
                return 1;
        }
-@@ -1060,9 +1106,6 @@ static int parse_options(char *options, 
+@@ -1060,9 +1106,6 @@
                case Opt_nouid32:
                        set_opt(sbi->s_mount_opt, NO_UID32);
                        break;
@@ -987641,7 +987532,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                case Opt_debug:
                        set_opt(sbi->s_mount_opt, DEBUG);
                        break;
-@@ -1072,7 +1115,7 @@ static int parse_options(char *options, 
+@@ -1072,7 +1115,7 @@
                case Opt_orlov:
                        clear_opt(sbi->s_mount_opt, OLDALLOC);
                        break;
@@ -987650,7 +987541,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                case Opt_user_xattr:
                        set_opt(sbi->s_mount_opt, XATTR_USER);
                        break;
-@@ -1082,10 +1125,11 @@ static int parse_options(char *options, 
+@@ -1082,10 +1125,11 @@
  #else
                case Opt_user_xattr:
                case Opt_nouser_xattr:
@@ -987664,7 +987555,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                case Opt_acl:
                        set_opt(sbi->s_mount_opt, POSIX_ACL);
                        break;
-@@ -1095,7 +1139,8 @@ static int parse_options(char *options, 
+@@ -1095,7 +1139,8 @@
  #else
                case Opt_acl:
                case Opt_noacl:
@@ -987674,7 +987565,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                        break;
  #endif
                case Opt_reservation:
-@@ -1185,12 +1230,11 @@ static int parse_options(char *options, 
+@@ -1185,12 +1230,11 @@
                case Opt_grpjquota:
                        qtype = GRPQUOTA;
  set_qf_name:
@@ -987690,7 +987581,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                                return 0;
                        }
                        qname = match_strdup(&args[0]);
-@@ -1225,8 +1269,7 @@ set_qf_name:
+@@ -1225,8 +1269,7 @@
                case Opt_offgrpjquota:
                        qtype = GRPQUOTA;
  clear_qf_name:
@@ -987700,7 +987591,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                            sbi->s_qf_names[qtype]) {
                                printk(KERN_ERR "EXT4-fs: Cannot change "
                                        "journaled quota options when "
-@@ -1245,8 +1288,7 @@ clear_qf_name:
+@@ -1245,8 +1288,7 @@
                case Opt_jqfmt_vfsv0:
                        qfmt = QFMT_VFS_V0;
  set_qf_format:
@@ -987710,7 +987601,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                            sbi->s_jquota_fmt != qfmt) {
                                printk(KERN_ERR "EXT4-fs: Cannot change "
                                        "journaled quota options when "
-@@ -1265,7 +1307,7 @@ set_qf_format:
+@@ -1265,7 +1307,7 @@
                        set_opt(sbi->s_mount_opt, GRPQUOTA);
                        break;
                case Opt_noquota:
@@ -987719,7 +987610,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                                printk(KERN_ERR "EXT4-fs: Cannot change quota "
                                        "options when quota turned on.\n");
                                return 0;
-@@ -1357,12 +1399,6 @@ set_qf_format:
+@@ -1357,12 +1399,6 @@
                case Opt_nodelalloc:
                        clear_opt(sbi->s_mount_opt, DELALLOC);
                        break;
@@ -987732,21 +987623,21 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                case Opt_stripe:
                        if (match_int(&args[0], &option))
                                return 0;
-@@ -1373,6 +1409,13 @@ set_qf_format:
+@@ -1372,6 +1408,13 @@
+                       break;
                case Opt_delalloc:
                        set_opt(sbi->s_mount_opt, DELALLOC);
-                       break;
++                      break;
 +              case Opt_inode_readahead_blks:
 +                      if (match_int(&args[0], &option))
 +                              return 0;
 +                      if (option < 0 || option > (1 << 30))
 +                              return 0;
 +                      sbi->s_inode_readahead_blks = option;
-+                      break;
+                       break;
                default:
                        printk(KERN_ERR
-                              "EXT4-fs: Unrecognized mount option \"%s\" "
-@@ -1465,7 +1508,7 @@ static int ext4_setup_super(struct super
+@@ -1465,7 +1508,7 @@
  
        ext4_commit_super(sb, es, 1);
        if (test_opt(sb, DEBUG))
@@ -987755,7 +987646,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                                "bpg=%lu, ipg=%lu, mo=%04lx]\n",
                        sb->s_blocksize,
                        sbi->s_groups_count,
-@@ -1473,14 +1516,14 @@ static int ext4_setup_super(struct super
+@@ -1473,14 +1516,14 @@
                        EXT4_INODES_PER_GROUP(sb),
                        sbi->s_mount_opt);
  
@@ -987774,7 +987665,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        }
        return res;
  }
-@@ -1493,7 +1536,6 @@ static int ext4_fill_flex_info(struct su
+@@ -1493,7 +1536,6 @@
        ext4_group_t flex_group_count;
        ext4_group_t flex_group;
        int groups_per_flex = 0;
@@ -987782,7 +987673,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        int i;
  
        if (!sbi->s_es->s_log_groups_per_flex) {
-@@ -1504,27 +1546,26 @@ static int ext4_fill_flex_info(struct su
+@@ -1504,27 +1546,26 @@
        sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex;
        groups_per_flex = 1 << sbi->s_log_groups_per_flex;
  
@@ -987800,10 +987691,10 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 +                              "%u flex groups\n", flex_group_count);
                goto failed;
        }
+-
 -      gdp = ext4_get_group_desc(sb, 1, &bh);
 -      block_bitmap = ext4_block_bitmap(sb, gdp) - 1;
--
        for (i = 0; i < sbi->s_groups_count; i++) {
                gdp = ext4_get_group_desc(sb, i, &bh);
  
@@ -987817,7 +987708,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        }
  
        return 1;
-@@ -1584,7 +1625,7 @@ static int ext4_check_descriptors(struct
+@@ -1584,7 +1625,7 @@
        if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
                flexbg_flag = 1;
  
@@ -987826,7 +987717,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
        for (i = 0; i < sbi->s_groups_count; i++) {
                struct ext4_group_desc *gdp = ext4_get_group_desc(sb, i, NULL);
-@@ -1598,33 +1639,35 @@ static int ext4_check_descriptors(struct
+@@ -1598,33 +1639,35 @@
                block_bitmap = ext4_block_bitmap(sb, gdp);
                if (block_bitmap < first_block || block_bitmap > last_block) {
                        printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: "
@@ -987870,7 +987761,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                }
                spin_unlock(sb_bgl_lock(sbi, i));
                if (!flexbg_flag)
-@@ -1714,9 +1757,9 @@ static void ext4_orphan_cleanup(struct s
+@@ -1714,9 +1757,9 @@
                DQUOT_INIT(inode);
                if (inode->i_nlink) {
                        printk(KERN_DEBUG
@@ -987882,7 +987773,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                                  inode->i_ino, inode->i_size);
                        ext4_truncate(inode);
                        nr_truncates++;
-@@ -1757,13 +1800,13 @@ static void ext4_orphan_cleanup(struct s
+@@ -1757,13 +1800,13 @@
   *
   * Note, this does *not* consider any metadata overhead for vfs i_blocks.
   */
@@ -987898,7 +987789,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                /*
                 * CONFIG_LSF is not enabled implies the inode
                 * i_block represent total blocks in 512 bytes
-@@ -1793,7 +1836,7 @@ static loff_t ext4_max_size(int blkbits)
+@@ -1793,7 +1836,7 @@
   * block limit, and also a limit of (2^48 - 1) 512-byte sectors in i_blocks.
   * We need to be 1 filesystem block less than the 2^48 sector limit.
   */
@@ -987907,7 +987798,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  {
        loff_t res = EXT4_NDIR_BLOCKS;
        int meta_blocks;
-@@ -1806,11 +1849,11 @@ static loff_t ext4_max_bitmap_size(int b
+@@ -1806,11 +1849,11 @@
         * total number of  512 bytes blocks of the file
         */
  
@@ -987923,7 +987814,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                 */
                upper_limit = (1LL << 32) - 1;
  
-@@ -1914,12 +1957,13 @@ static int ext4_fill_super(struct super_
+@@ -1914,12 +1957,13 @@
        unsigned long journal_devnum = 0;
        unsigned long def_mount_opts;
        struct inode *root;
@@ -987939,7 +987830,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        __u64 blocks_count;
        int err;
  
-@@ -1930,10 +1974,15 @@ static int ext4_fill_super(struct super_
+@@ -1930,9 +1974,14 @@
        sbi->s_mount_opt = 0;
        sbi->s_resuid = EXT4_DEF_RESUID;
        sbi->s_resgid = EXT4_DEF_RESGID;
@@ -987947,15 +987838,14 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        sbi->s_sb_block = sb_block;
  
        unlock_kernel();
++
 +      /* Cleanup superblock name */
 +      for (cp = sb->s_id; (cp = strchr(cp, '/'));)
 +              *cp = '!';
-+
        blocksize = sb_min_blocksize(sb, EXT4_MIN_BLOCK_SIZE);
        if (!blocksize) {
-               printk(KERN_ERR "EXT4-fs: unable to set blocksize\n");
-@@ -1973,11 +2022,11 @@ static int ext4_fill_super(struct super_
+@@ -1973,11 +2022,11 @@
                set_opt(sbi->s_mount_opt, GRPID);
        if (def_mount_opts & EXT4_DEFM_UID16)
                set_opt(sbi->s_mount_opt, NO_UID32);
@@ -987969,7 +987859,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (def_mount_opts & EXT4_DEFM_ACL)
                set_opt(sbi->s_mount_opt, POSIX_ACL);
  #endif
-@@ -2012,11 +2061,6 @@ static int ext4_fill_super(struct super_
+@@ -2012,11 +2061,6 @@
                ext4_warning(sb, __func__,
                        "extents feature not enabled on this filesystem, "
                        "use tune2fs.\n");
@@ -987981,7 +987871,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
        /*
         * enable delayed allocation by default
-@@ -2041,16 +2085,6 @@ static int ext4_fill_super(struct super_
+@@ -2041,16 +2085,6 @@
                       "running e2fsck is recommended\n");
  
        /*
@@ -987998,7 +987888,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
         * Check feature flags regardless of the revision level, since we
         * previously didn't change the revision level when setting the flags,
         * so there is a chance incompat flags are set on a rev 0 filesystem.
-@@ -2058,18 +2092,22 @@ static int ext4_fill_super(struct super_
+@@ -2058,18 +2092,22 @@
        features = EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP);
        if (features) {
                printk(KERN_ERR "EXT4-fs: %s: couldn't mount because of "
@@ -988026,7 +987916,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                /*
                 * Large file size enabled file system can only be
                 * mount if kernel is build with CONFIG_LSF
-@@ -2119,8 +2157,9 @@ static int ext4_fill_super(struct super_
+@@ -2119,8 +2157,9 @@
                }
        }
  
@@ -988038,7 +987928,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
        if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) {
                sbi->s_inode_size = EXT4_GOOD_OLD_INODE_SIZE;
-@@ -2168,6 +2207,18 @@ static int ext4_fill_super(struct super_
+@@ -2168,6 +2207,18 @@
        for (i = 0; i < 4; i++)
                sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]);
        sbi->s_def_hash_version = es->s_def_hash_version;
@@ -988057,7 +987947,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
        if (sbi->s_blocks_per_group > blocksize * 8) {
                printk(KERN_ERR
-@@ -2219,6 +2270,16 @@ static int ext4_fill_super(struct super_
+@@ -2219,6 +2270,16 @@
                goto failed_mount;
        }
  
@@ -988074,7 +987964,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        bgl_lock_init(&sbi->s_blockgroup_lock);
  
        for (i = 0; i < db_count; i++) {
-@@ -2257,24 +2318,14 @@ static int ext4_fill_super(struct super_
+@@ -2257,23 +2318,13 @@
                err = percpu_counter_init(&sbi->s_dirs_counter,
                                ext4_count_dirs(sb));
        }
@@ -988085,7 +987975,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                printk(KERN_ERR "EXT4-fs: insufficient memory\n");
                goto failed_mount3;
        }
+-
 -      /* per fileystem reservation list head & lock */
 -      spin_lock_init(&sbi->s_rsv_window_lock);
 -      sbi->s_rsv_window_root = RB_ROOT;
@@ -988098,11 +987988,10 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 -      sbi->s_rsv_window_head.rsv_alloc_hit = 0;
 -      sbi->s_rsv_window_head.rsv_goal_size = 0;
 -      ext4_rsv_window_add(sb, &sbi->s_rsv_window_head);
--
        sbi->s_stripe = ext4_get_stripe_size(sbi);
  
-       /*
-@@ -2444,6 +2495,21 @@ static int ext4_fill_super(struct super_
+@@ -2444,6 +2495,21 @@
                        "available.\n");
        }
  
@@ -988124,7 +988013,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        /*
         * akpm: core read_super() calls in here with the superblock locked.
         * That deadlocks, because orphan cleanup needs to lock the superblock
-@@ -2463,16 +2529,6 @@ static int ext4_fill_super(struct super_
+@@ -2463,16 +2529,6 @@
               test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered":
               "writeback");
  
@@ -988141,7 +988030,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        lock_kernel();
        return 0;
  
-@@ -2489,11 +2545,16 @@ failed_mount3:
+@@ -2489,11 +2545,16 @@
        percpu_counter_destroy(&sbi->s_freeblocks_counter);
        percpu_counter_destroy(&sbi->s_freeinodes_counter);
        percpu_counter_destroy(&sbi->s_dirs_counter);
@@ -988158,7 +988047,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  #ifdef CONFIG_QUOTA
        for (i = 0; i < MAXQUOTAS; i++)
                kfree(sbi->s_qf_names[i]);
-@@ -2552,7 +2613,7 @@ static journal_t *ext4_get_journal(struc
+@@ -2552,7 +2613,7 @@
                return NULL;
        }
  
@@ -988167,7 +988056,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                  journal_inode, journal_inode->i_size);
        if (!S_ISREG(journal_inode->i_mode)) {
                printk(KERN_ERR "EXT4-fs: invalid journal inode.\n");
-@@ -2715,6 +2776,11 @@ static int ext4_load_journal(struct supe
+@@ -2715,6 +2776,11 @@
                        return -EINVAL;
        }
  
@@ -988179,7 +988068,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) {
                err = jbd2_journal_update_format(journal);
                if (err)  {
-@@ -2799,13 +2865,37 @@ static void ext4_commit_super(struct sup
+@@ -2799,13 +2865,37 @@
  
        if (!sbh)
                return;
@@ -988220,7 +988109,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  }
  
  
-@@ -2820,7 +2910,9 @@ static void ext4_mark_recovery_complete(
+@@ -2820,7 +2910,9 @@
        journal_t *journal = EXT4_SB(sb)->s_journal;
  
        jbd2_journal_lock_updates(journal);
@@ -988231,7 +988120,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        lock_super(sb);
        if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER) &&
            sb->s_flags & MS_RDONLY) {
-@@ -2829,6 +2921,8 @@ static void ext4_mark_recovery_complete(
+@@ -2829,6 +2921,8 @@
                ext4_commit_super(sb, es, 1);
        }
        unlock_super(sb);
@@ -988240,7 +988129,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        jbd2_journal_unlock_updates(journal);
  }
  
-@@ -2890,12 +2984,9 @@ int ext4_force_commit(struct super_block
+@@ -2890,12 +2984,9 @@
  /*
   * Ext4 always journals updates to the superblock itself, so we don't
   * have to propagate any other updates to the superblock on disk at this
@@ -988255,7 +988144,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  static void ext4_write_super(struct super_block *sb)
  {
        if (mutex_trylock(&sb->s_lock) != 0)
-@@ -2905,14 +2996,15 @@ static void ext4_write_super(struct supe
+@@ -2905,14 +2996,15 @@
  
  static int ext4_sync_fs(struct super_block *sb, int wait)
  {
@@ -988277,7 +988166,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  }
  
  /*
-@@ -2928,7 +3020,13 @@ static void ext4_write_super_lockfs(stru
+@@ -2928,7 +3020,13 @@
  
                /* Now we set up the journal barrier. */
                jbd2_journal_lock_updates(journal);
@@ -988292,7 +988181,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  
                /* Journal blocked and flushed, clear needs_recovery flag. */
                EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
-@@ -3026,13 +3124,14 @@ static int ext4_remount(struct super_blo
+@@ -3026,13 +3124,14 @@
                        ext4_mark_recovery_complete(sb, es);
                        lock_super(sb);
                } else {
@@ -988310,7 +988199,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                                err = -EROFS;
                                goto restore_opts;
                        }
-@@ -3049,7 +3148,7 @@ static int ext4_remount(struct super_blo
+@@ -3049,7 +3148,7 @@
                                if (!ext4_group_desc_csum_verify(sbi, g, gdp)) {
                                        printk(KERN_ERR
               "EXT4-fs: ext4_remount: "
@@ -988319,7 +988208,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                g, le16_to_cpu(ext4_group_desc_csum(sbi, g, gdp)),
                                               le16_to_cpu(gdp->bg_checksum));
                                        err = -EINVAL;
-@@ -3162,7 +3261,8 @@ static int ext4_statfs(struct dentry *de
+@@ -3162,7 +3261,8 @@
        buf->f_type = EXT4_SUPER_MAGIC;
        buf->f_bsize = sb->s_blocksize;
        buf->f_blocks = ext4_blocks_count(es) - sbi->s_overhead_last;
@@ -988329,7 +988218,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        ext4_free_blocks_count_set(es, buf->f_bfree);
        buf->f_bavail = buf->f_bfree - ext4_r_blocks_count(es);
        if (buf->f_bfree < ext4_r_blocks_count(es))
-@@ -3367,8 +3467,12 @@ static int ext4_quota_on(struct super_bl
+@@ -3367,8 +3467,12 @@
                 * otherwise be livelocked...
                 */
                jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal);
@@ -988343,7 +988232,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        }
  
        err = vfs_quota_on_path(sb, type, format_id, &nd.path);
-@@ -3432,7 +3536,7 @@ static ssize_t ext4_quota_write(struct s
+@@ -3432,7 +3536,7 @@
        handle_t *handle = journal_current_handle();
  
        if (!handle) {
@@ -988352,10 +988241,11 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
                        " cancelled because transaction is not started.\n",
                        (unsigned long long)off, (unsigned long long)len);
                return -EIO;
-@@ -3493,18 +3597,73 @@ static int ext4_get_sb(struct file_syste
+@@ -3493,18 +3597,73 @@
        return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
  }
  
+-static struct file_system_type ext4dev_fs_type = {
 +#ifdef CONFIG_PROC_FS
 +static int ext4_ui_proc_show(struct seq_file *m, void *v)
 +{
@@ -988386,7 +988276,8 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 +}
 +
 +const struct file_operations ext4_ui_proc_fops = {
-+      .owner          = THIS_MODULE,
+       .owner          = THIS_MODULE,
+-      .name           = "ext4dev",
 +      .open           = ext4_ui_proc_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
@@ -988398,27 +988289,26 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
 +static struct file_system_type ext4_fs_type = {
 +      .owner          = THIS_MODULE,
 +      .name           = "ext4",
-+      .get_sb         = ext4_get_sb,
-+      .kill_sb        = kill_block_super,
-+      .fs_flags       = FS_REQUIRES_DEV,
-+};
-+
+       .get_sb         = ext4_get_sb,
+       .kill_sb        = kill_block_super,
+       .fs_flags       = FS_REQUIRES_DEV,
+ };
 +static int ext4dev_get_sb(struct file_system_type *fs_type,
 +      int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 +{
 +      return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
 +}
 +
- static struct file_system_type ext4dev_fs_type = {
-       .owner          = THIS_MODULE,
-       .name           = "ext4dev",
--      .get_sb         = ext4_get_sb,
++static struct file_system_type ext4dev_fs_type = {
++      .owner          = THIS_MODULE,
++      .name           = "ext4dev",
 +      .get_sb         = ext4dev_get_sb,
-       .kill_sb        = kill_block_super,
-       .fs_flags       = FS_REQUIRES_DEV,
- };
++      .kill_sb        = kill_block_super,
++      .fs_flags       = FS_REQUIRES_DEV,
++};
 +MODULE_ALIAS("ext4dev");
++
  static int __init init_ext4_fs(void)
  {
        int err;
@@ -988427,7 +988317,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        err = init_ext4_mballoc();
        if (err)
                return err;
-@@ -3515,9 +3674,14 @@ static int __init init_ext4_fs(void)
+@@ -3515,9 +3674,14 @@
        err = init_inodecache();
        if (err)
                goto out1;
@@ -988443,7 +988333,7 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
        return 0;
  out:
        destroy_inodecache();
-@@ -3530,10 +3694,12 @@ out2:
+@@ -3530,10 +3694,12 @@
  
  static void __exit exit_ext4_fs(void)
  {
@@ -988456,9 +988346,9 @@ diff -purN linux-2.6.27/fs/ext4/super.c linux-2.6.27.19-5.1/fs/ext4/super.c
  }
  
  MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
-diff -purN linux-2.6.27/fs/ext4/symlink.c linux-2.6.27.19-5.1/fs/ext4/symlink.c
---- linux-2.6.27/fs/ext4/symlink.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/symlink.c      2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/ext4/symlink.c
+--- a/fs/ext4/symlink.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/symlink.c        Wed May 06 16:56:49 2009 +0100
 @@ -23,10 +23,10 @@
  #include "ext4.h"
  #include "xattr.h"
@@ -988472,7 +988362,7 @@ diff -purN linux-2.6.27/fs/ext4/symlink.c linux-2.6.27.19-5.1/fs/ext4/symlink.c
        return NULL;
  }
  
-@@ -34,7 +34,7 @@ const struct inode_operations ext4_symli
+@@ -34,7 +34,7 @@
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
@@ -988481,7 +988371,7 @@ diff -purN linux-2.6.27/fs/ext4/symlink.c linux-2.6.27.19-5.1/fs/ext4/symlink.c
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
        .listxattr      = ext4_listxattr,
-@@ -45,7 +45,7 @@ const struct inode_operations ext4_symli
+@@ -45,7 +45,7 @@
  const struct inode_operations ext4_fast_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = ext4_follow_link,
@@ -988490,10 +988380,10 @@ diff -purN linux-2.6.27/fs/ext4/symlink.c linux-2.6.27.19-5.1/fs/ext4/symlink.c
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
        .listxattr      = ext4_listxattr,
-diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
---- linux-2.6.27/fs/ext4/xattr.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/xattr.c        2009-03-25 16:11:36.000000000 +0000
-@@ -99,12 +99,12 @@ static struct mb_cache *ext4_xattr_cache
+diff -r 9608d5473017 fs/ext4/xattr.c
+--- a/fs/ext4/xattr.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/xattr.c  Wed May 06 16:56:49 2009 +0100
+@@ -99,12 +99,12 @@
  
  static struct xattr_handler *ext4_xattr_handler_map[] = {
        [EXT4_XATTR_INDEX_USER]              = &ext4_xattr_user_handler,
@@ -988508,7 +988398,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
        [EXT4_XATTR_INDEX_SECURITY]          = &ext4_xattr_security_handler,
  #endif
  };
-@@ -112,11 +112,11 @@ static struct xattr_handler *ext4_xattr_
+@@ -112,11 +112,11 @@
  struct xattr_handler *ext4_xattr_handlers[] = {
        &ext4_xattr_user_handler,
        &ext4_xattr_trusted_handler,
@@ -988522,7 +988412,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
        &ext4_xattr_security_handler,
  #endif
        NULL
-@@ -810,8 +810,8 @@ inserted:
+@@ -810,8 +810,8 @@
                        /* We need to allocate a new block */
                        ext4_fsblk_t goal = ext4_group_first_block_no(sb,
                                                EXT4_I(inode)->i_block_group);
@@ -988533,7 +988423,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
                        if (error)
                                goto cleanup;
                        ea_idebug(inode, "creating block %d", block);
-@@ -959,6 +959,7 @@ ext4_xattr_set_handle(handle_t *handle, 
+@@ -959,6 +959,7 @@
        struct ext4_xattr_block_find bs = {
                .s = { .not_found = -ENODATA, },
        };
@@ -988541,7 +988431,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
        int error;
  
        if (!name)
-@@ -966,6 +967,9 @@ ext4_xattr_set_handle(handle_t *handle, 
+@@ -966,6 +967,9 @@
        if (strlen(name) > 255)
                return -ERANGE;
        down_write(&EXT4_I(inode)->xattr_sem);
@@ -988551,7 +988441,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
        error = ext4_get_inode_loc(inode, &is.iloc);
        if (error)
                goto cleanup;
-@@ -1042,6 +1046,8 @@ ext4_xattr_set_handle(handle_t *handle, 
+@@ -1042,6 +1046,8 @@
  cleanup:
        brelse(is.iloc.bh);
        brelse(bs.bh);
@@ -988560,10 +988450,10 @@ diff -purN linux-2.6.27/fs/ext4/xattr.c linux-2.6.27.19-5.1/fs/ext4/xattr.c
        up_write(&EXT4_I(inode)->xattr_sem);
        return error;
  }
-diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
---- linux-2.6.27/fs/ext4/xattr.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ext4/xattr.h        2009-03-25 16:11:36.000000000 +0000
-@@ -51,8 +51,8 @@ struct ext4_xattr_entry {
+diff -r 9608d5473017 fs/ext4/xattr.h
+--- a/fs/ext4/xattr.h  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ext4/xattr.h  Wed May 06 16:56:49 2009 +0100
+@@ -51,8 +51,8 @@
        (((name_len) + EXT4_XATTR_ROUND + \
        sizeof(struct ext4_xattr_entry)) & ~EXT4_XATTR_ROUND)
  #define EXT4_XATTR_NEXT(entry) \
@@ -988574,7 +988464,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
  #define EXT4_XATTR_SIZE(size) \
        (((size) + EXT4_XATTR_ROUND) & ~EXT4_XATTR_ROUND)
  
-@@ -63,7 +63,7 @@ struct ext4_xattr_entry {
+@@ -63,7 +63,7 @@
                EXT4_I(inode)->i_extra_isize))
  #define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1))
  
@@ -988583,7 +988473,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
  
  extern struct xattr_handler ext4_xattr_user_handler;
  extern struct xattr_handler ext4_xattr_trusted_handler;
-@@ -88,7 +88,7 @@ extern void exit_ext4_xattr(void);
+@@ -88,7 +88,7 @@
  
  extern struct xattr_handler *ext4_xattr_handlers[];
  
@@ -988592,7 +988482,7 @@ diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
  
  static inline int
  ext4_xattr_get(struct inode *inode, int name_index, const char *name,
-@@ -141,9 +141,9 @@ ext4_expand_extra_isize_ea(struct inode 
+@@ -141,9 +141,9 @@
  
  #define ext4_xattr_handlers   NULL
  
@@ -988604,9 +988494,9 @@ diff -purN linux-2.6.27/fs/ext4/xattr.h linux-2.6.27.19-5.1/fs/ext4/xattr.h
  extern int ext4_init_security(handle_t *handle, struct inode *inode,
                                struct inode *dir);
  #else
-diff -purN linux-2.6.27/fs/fat/fatent.c linux-2.6.27.19-5.1/fs/fat/fatent.c
---- linux-2.6.27/fs/fat/fatent.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fat/fatent.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/fat/fatent.c
+--- a/fs/fat/fatent.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/fat/fatent.c  Wed May 06 16:56:49 2009 +0100
 @@ -6,6 +6,7 @@
  #include <linux/module.h>
  #include <linux/fs.h>
@@ -988615,7 +988505,7 @@ diff -purN linux-2.6.27/fs/fat/fatent.c linux-2.6.27.19-5.1/fs/fat/fatent.c
  
  struct fatent_operations {
        void (*ent_blocknr)(struct super_block *, int, int *, sector_t *);
-@@ -535,6 +536,7 @@ int fat_free_clusters(struct inode *inod
+@@ -535,6 +536,7 @@
        struct fat_entry fatent;
        struct buffer_head *bhs[MAX_BUF_PER_PAGE];
        int i, err, nr_bhs;
@@ -988623,10 +988513,12 @@ diff -purN linux-2.6.27/fs/fat/fatent.c linux-2.6.27.19-5.1/fs/fat/fatent.c
  
        nr_bhs = 0;
        fatent_init(&fatent);
-@@ -551,6 +553,18 @@ int fat_free_clusters(struct inode *inod
+@@ -549,6 +551,18 @@
+                                    __func__);
+                       err = -EIO;
                        goto error;
-               }
++              }
++
 +              /*
 +               * Issue discard for the sectors we no longer care about,
 +               * batching contiguous clusters into one request
@@ -988637,15 +988529,13 @@ diff -purN linux-2.6.27/fs/fat/fatent.c linux-2.6.27.19-5.1/fs/fat/fatent.c
 +                      sb_issue_discard(sb, fat_clus_to_blknr(sbi, first_cl),
 +                                       nr_clus * sbi->sec_per_clus);
 +                      first_cl = cluster;
-+              }
-+
+               }
                ops->ent_put(&fatent, FAT_ENT_FREE);
-               if (sbi->free_clusters != -1) {
-                       sbi->free_clusters++;
-diff -purN linux-2.6.27/fs/fat/file.c linux-2.6.27.19-5.1/fs/fat/file.c
---- linux-2.6.27/fs/fat/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fat/file.c  2009-03-25 16:11:37.000000000 +0000
-@@ -98,7 +98,7 @@ int fat_generic_ioctl(struct inode *inod
+diff -r 9608d5473017 fs/fat/file.c
+--- a/fs/fat/file.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/fat/file.c    Wed May 06 16:56:49 2009 +0100
+@@ -98,7 +98,7 @@
                 * out the RO attribute for checking by the security
                 * module, just because it maps to a file mode.
                 */
@@ -988654,9 +988544,9 @@ diff -purN linux-2.6.27/fs/fat/file.c linux-2.6.27.19-5.1/fs/fat/file.c
                if (err)
                        goto up;
  
-diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
---- linux-2.6.27/fs/fcntl.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fcntl.c     2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/fcntl.c
+--- a/fs/fcntl.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/fcntl.c       Wed May 06 16:56:49 2009 +0100
 @@ -19,6 +19,7 @@
  #include <linux/signal.h>
  #include <linux/rcupdate.h>
@@ -988665,7 +988555,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  
  #include <asm/poll.h>
  #include <asm/siginfo.h>
-@@ -49,7 +50,7 @@ static int get_close_on_exec(unsigned in
+@@ -49,7 +50,7 @@
        return res;
  }
  
@@ -988674,7 +988564,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  {
        int err = -EBADF;
        struct file * file, *tofree;
-@@ -112,7 +113,7 @@ out_unlock:
+@@ -112,7 +113,7 @@
        return err;
  }
  
@@ -988683,7 +988573,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  {
        if (unlikely(newfd == oldfd)) { /* corner case */
                struct files_struct *files = current->files;
-@@ -125,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int ol
+@@ -125,7 +126,7 @@
        return sys_dup3(oldfd, newfd, 0);
  }
  
@@ -988692,7 +988582,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  {
        int ret = -EBADF;
        struct file *file = fget(fildes);
-@@ -175,6 +176,11 @@ static int setfl(int fd, struct file * f
+@@ -175,6 +176,11 @@
        if (error)
                return error;
  
@@ -988704,7 +988594,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
        if ((arg ^ filp->f_flags) & FASYNC) {
                if (filp->f_op && filp->f_op->fasync) {
                        error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
-@@ -185,6 +191,7 @@ static int setfl(int fd, struct file * f
+@@ -185,6 +191,7 @@
  
        filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
   out:
@@ -988712,7 +988602,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
        return error;
  }
  
-@@ -327,7 +334,7 @@ static long do_fcntl(int fd, unsigned in
+@@ -327,7 +334,7 @@
        return err;
  }
  
@@ -988721,7 +988611,7 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  {     
        struct file *filp;
        long err = -EBADF;
-@@ -350,7 +357,8 @@ out:
+@@ -350,7 +357,8 @@
  }
  
  #if BITS_PER_LONG == 32
@@ -988731,10 +988621,10 @@ diff -purN linux-2.6.27/fs/fcntl.c linux-2.6.27.19-5.1/fs/fcntl.c
  {     
        struct file * filp;
        long err;
-diff -purN linux-2.6.27/fs/file_table.c linux-2.6.27.19-5.1/fs/file_table.c
---- linux-2.6.27/fs/file_table.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/file_table.c        2009-03-25 16:11:35.000000000 +0000
-@@ -210,8 +210,7 @@ int init_file(struct file *file, struct 
+diff -r 9608d5473017 fs/file_table.c
+--- a/fs/file_table.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/file_table.c  Wed May 06 16:56:49 2009 +0100
+@@ -210,8 +210,7 @@
         */
        if ((mode & FMODE_WRITE) && !special_file(dentry->d_inode->i_mode)) {
                file_take_write(file);
@@ -988744,10 +988634,10 @@ diff -purN linux-2.6.27/fs/file_table.c linux-2.6.27.19-5.1/fs/file_table.c
        }
        return error;
  }
-diff -purN linux-2.6.27/fs/filesystems.c linux-2.6.27.19-5.1/fs/filesystems.c
---- linux-2.6.27/fs/filesystems.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/filesystems.c       2009-03-25 16:11:37.000000000 +0000
-@@ -177,7 +177,7 @@ static int fs_maxindex(void)
+diff -r 9608d5473017 fs/filesystems.c
+--- a/fs/filesystems.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/filesystems.c Wed May 06 16:56:49 2009 +0100
+@@ -177,7 +177,7 @@
  /*
   * Whee.. Weird sysv syscall. 
   */
@@ -988756,10 +988646,10 @@ diff -purN linux-2.6.27/fs/filesystems.c linux-2.6.27.19-5.1/fs/filesystems.c
  {
        int retval = -EINVAL;
  
-diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
---- linux-2.6.27/fs/fs-writeback.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fs-writeback.c      2009-03-25 16:11:35.000000000 +0000
-@@ -421,9 +421,6 @@ __writeback_single_inode(struct inode *i
+diff -r 9608d5473017 fs/fs-writeback.c
+--- a/fs/fs-writeback.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/fs-writeback.c        Wed May 06 16:56:49 2009 +0100
+@@ -421,9 +421,6 @@
   * If we're a pdlfush thread, then implement pdflush collision avoidance
   * against the entire list.
   *
@@ -988769,7 +988659,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
   * If `bdi' is non-zero then we're being asked to writeback a specific queue.
   * This function assumes that the blockdev superblock's inodes are backed by
   * a variety of queues, so all inodes are searched.  For other superblocks,
-@@ -443,6 +440,7 @@ void generic_sync_sb_inodes(struct super
+@@ -443,6 +440,7 @@
                                struct writeback_control *wbc)
  {
        const unsigned long start = jiffies;    /* livelock avoidance */
@@ -988777,7 +988667,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
  
        spin_lock(&inode_lock);
        if (!wbc->for_kupdate || list_empty(&sb->s_io))
-@@ -499,10 +497,6 @@ void generic_sync_sb_inodes(struct super
+@@ -499,10 +497,6 @@
                __iget(inode);
                pages_skipped = wbc->pages_skipped;
                __writeback_single_inode(inode, wbc);
@@ -988788,7 +988678,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
                if (current_is_pdflush())
                        writeback_release(bdi);
                if (wbc->pages_skipped != pages_skipped) {
-@@ -523,7 +517,49 @@ void generic_sync_sb_inodes(struct super
+@@ -523,7 +517,49 @@
                if (!list_empty(&sb->s_more_io))
                        wbc->more_io = 1;
        }
@@ -988839,7 +988729,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
        return;         /* Leave any unwritten inodes on s_io */
  }
  EXPORT_SYMBOL_GPL(generic_sync_sb_inodes);
-@@ -531,7 +567,10 @@ EXPORT_SYMBOL_GPL(generic_sync_sb_inodes
+@@ -531,7 +567,10 @@
  static void sync_sb_inodes(struct super_block *sb,
                                struct writeback_control *wbc)
  {
@@ -988851,7 +988741,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
  }
  
  /*
-@@ -588,8 +627,7 @@ restart:
+@@ -588,8 +627,7 @@
  
  /*
   * writeback and wait upon the filesystem's dirty inodes.  The caller will
@@ -988861,7 +988751,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
   *
   * A finite limit is set on the number of pages which will be written.
   * To prevent infinite livelock of sys_sync().
-@@ -600,30 +638,21 @@ restart:
+@@ -600,30 +638,21 @@
  void sync_inodes_sb(struct super_block *sb, int wait)
  {
        struct writeback_control wbc = {
@@ -988877,8 +988767,6 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
 -                      (inodes_stat.nr_inodes - inodes_stat.nr_unused) +
 -                      nr_dirty + nr_unstable;
 -      wbc.nr_to_write += wbc.nr_to_write / 2;         /* Bit more for luck */
--      sync_sb_inodes(sb, &wbc);
--}
 +      if (!wait) {
 +              unsigned long nr_dirty = global_page_state(NR_FILE_DIRTY);
 +              unsigned long nr_unstable = global_page_state(NR_UNSTABLE_NFS);
@@ -988887,7 +988775,10 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
 +                      (inodes_stat.nr_inodes - inodes_stat.nr_unused);
 +      } else
 +              wbc.nr_to_write = LONG_MAX; /* doesn't actually matter */
++
+       sync_sb_inodes(sb, &wbc);
+-}
+-
 -/*
 - * Rather lame livelock avoidance.
 - */
@@ -988898,11 +988789,10 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
 -      list_for_each_entry_reverse(sb, &super_blocks, s_list)
 -              sb->s_syncing = val;
 -      spin_unlock(&sb_lock);
-+      sync_sb_inodes(sb, &wbc);
  }
  
  /**
-@@ -652,9 +681,6 @@ static void __sync_inodes(int wait)
+@@ -652,9 +681,6 @@
        spin_lock(&sb_lock);
  restart:
        list_for_each_entry(sb, &super_blocks, s_list) {
@@ -988912,7 +988802,7 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
                sb->s_count++;
                spin_unlock(&sb_lock);
                down_read(&sb->s_umount);
-@@ -672,13 +698,10 @@ restart:
+@@ -672,13 +698,10 @@
  
  void sync_inodes(int wait)
  {
@@ -988927,10 +988817,10 @@ diff -purN linux-2.6.27/fs/fs-writeback.c linux-2.6.27.19-5.1/fs/fs-writeback.c
  }
  
  /**
-diff -purN linux-2.6.27/fs/fuse/dev.c linux-2.6.27.19-5.1/fs/fuse/dev.c
---- linux-2.6.27/fs/fuse/dev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/dev.c  2009-03-25 16:11:39.000000000 +0000
-@@ -281,7 +281,8 @@ static void request_end(struct fuse_conn
+diff -r 9608d5473017 fs/fuse/dev.c
+--- a/fs/fuse/dev.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/dev.c    Wed May 06 16:56:49 2009 +0100
+@@ -281,7 +281,8 @@
                        fc->blocked = 0;
                        wake_up_all(&fc->blocked_waitq);
                }
@@ -988940,10 +988830,10 @@ diff -purN linux-2.6.27/fs/fuse/dev.c linux-2.6.27.19-5.1/fs/fuse/dev.c
                        clear_bdi_congested(&fc->bdi, READ);
                        clear_bdi_congested(&fc->bdi, WRITE);
                }
-diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
---- linux-2.6.27/fs/fuse/dir.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/dir.c  2009-03-25 16:11:39.000000000 +0000
-@@ -1105,21 +1105,22 @@ static int fuse_dir_fsync(struct file *f
+diff -r 9608d5473017 fs/fuse/dir.c
+--- a/fs/fuse/dir.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/dir.c    Wed May 06 16:56:49 2009 +0100
+@@ -1105,21 +1105,22 @@
        return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
  }
  
@@ -988969,7 +988859,7 @@ diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
  {
        unsigned ivalid = iattr->ia_valid;
  
-@@ -1138,7 +1139,7 @@ static void iattr_to_fattr(struct iattr 
+@@ -1138,7 +1139,7 @@
                if (!(ivalid & ATTR_ATIME_SET))
                        arg->valid |= FATTR_ATIME_NOW;
        }
@@ -988978,7 +988868,7 @@ diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
                arg->valid |= FATTR_MTIME;
                arg->mtime = iattr->ia_mtime.tv_sec;
                arg->mtimensec = iattr->ia_mtime.tv_nsec;
-@@ -1199,8 +1200,8 @@ void fuse_release_nowrite(struct inode *
+@@ -1199,8 +1200,8 @@
   * vmtruncate() doesn't allow for this case, so do the rlimit checking
   * and the actual truncation by hand.
   */
@@ -988989,7 +988879,7 @@ diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
  {
        struct inode *inode = entry->d_inode;
        struct fuse_conn *fc = get_fuse_conn(inode);
-@@ -1244,7 +1245,7 @@ static int fuse_do_setattr(struct dentry
+@@ -1244,7 +1245,7 @@
  
        memset(&inarg, 0, sizeof(inarg));
        memset(&outarg, 0, sizeof(outarg));
@@ -988998,7 +988888,7 @@ diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
        if (file) {
                struct fuse_file *ff = file->private_data;
                inarg.valid |= FATTR_FH;
-@@ -1314,10 +1315,7 @@ error:
+@@ -1314,10 +1315,7 @@
  
  static int fuse_setattr(struct dentry *entry, struct iattr *attr)
  {
@@ -989010,10 +988900,10 @@ diff -purN linux-2.6.27/fs/fuse/dir.c linux-2.6.27.19-5.1/fs/fuse/dir.c
  }
  
  static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
-diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
---- linux-2.6.27/fs/fuse/file.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/file.c 2009-03-25 16:11:39.000000000 +0000
-@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(void)
+diff -r 9608d5473017 fs/fuse/file.c
+--- a/fs/fuse/file.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/file.c   Wed May 06 16:56:49 2009 +0100
+@@ -54,7 +54,7 @@
                ff->reserved_req = fuse_request_alloc();
                if (!ff->reserved_req) {
                        kfree(ff);
@@ -989022,7 +988912,7 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
                } else {
                        INIT_LIST_HEAD(&ff->write_entry);
                        atomic_set(&ff->count, 0);
-@@ -644,7 +644,7 @@ static int fuse_write_begin(struct file 
+@@ -644,7 +644,7 @@
  {
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
  
@@ -989031,7 +988921,7 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
        if (!*pagep)
                return -ENOMEM;
        return 0;
-@@ -777,7 +777,7 @@ static ssize_t fuse_fill_write_pages(str
+@@ -777,7 +777,7 @@
                        break;
  
                err = -ENOMEM;
@@ -989040,7 +988930,7 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
                if (!page)
                        break;
  
-@@ -1465,6 +1465,11 @@ static loff_t fuse_file_llseek(struct fi
+@@ -1465,6 +1465,11 @@
        return retval;
  }
  
@@ -989052,7 +988942,7 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
  static const struct file_operations fuse_file_operations = {
        .llseek         = fuse_file_llseek,
        .read           = do_sync_read,
-@@ -1478,6 +1483,7 @@ static const struct file_operations fuse
+@@ -1478,6 +1483,7 @@
        .fsync          = fuse_fsync,
        .lock           = fuse_file_lock,
        .flock          = fuse_file_flock,
@@ -989060,7 +988950,7 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
        .splice_read    = generic_file_splice_read,
  };
  
-@@ -1491,6 +1497,7 @@ static const struct file_operations fuse
+@@ -1491,6 +1497,7 @@
        .fsync          = fuse_fsync,
        .lock           = fuse_file_lock,
        .flock          = fuse_file_flock,
@@ -989068,10 +988958,10 @@ diff -purN linux-2.6.27/fs/fuse/file.c linux-2.6.27.19-5.1/fs/fuse/file.c
        /* no mmap and splice_read */
  };
  
-diff -purN linux-2.6.27/fs/fuse/fuse_i.h linux-2.6.27.19-5.1/fs/fuse/fuse_i.h
---- linux-2.6.27/fs/fuse/fuse_i.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/fuse_i.h       2009-03-25 16:11:39.000000000 +0000
-@@ -551,6 +551,10 @@ void fuse_truncate(struct address_space 
+diff -r 9608d5473017 fs/fuse/fuse_i.h
+--- a/fs/fuse/fuse_i.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/fuse_i.h Wed May 06 16:56:49 2009 +0100
+@@ -551,6 +551,10 @@
   */
  int fuse_dev_init(void);
  
@@ -989082,10 +988972,10 @@ diff -purN linux-2.6.27/fs/fuse/fuse_i.h linux-2.6.27.19-5.1/fs/fuse/fuse_i.h
  /**
   * Cleanup the client device
   */
-diff -purN linux-2.6.27/fs/fuse/inode.c linux-2.6.27.19-5.1/fs/fuse/inode.c
---- linux-2.6.27/fs/fuse/inode.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/fuse/inode.c        2009-03-25 16:11:39.000000000 +0000
-@@ -292,6 +292,7 @@ static void fuse_put_super(struct super_
+diff -r 9608d5473017 fs/fuse/inode.c
+--- a/fs/fuse/inode.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/fuse/inode.c  Wed May 06 16:56:49 2009 +0100
+@@ -292,6 +292,7 @@
        list_del(&fc->entry);
        fuse_ctl_remove_conn(fc);
        mutex_unlock(&fuse_mutex);
@@ -989093,7 +988983,7 @@ diff -purN linux-2.6.27/fs/fuse/inode.c linux-2.6.27.19-5.1/fs/fuse/inode.c
        fuse_conn_put(fc);
  }
  
-@@ -531,7 +532,6 @@ void fuse_conn_put(struct fuse_conn *fc)
+@@ -531,7 +532,6 @@
                if (fc->destroy_req)
                        fuse_request_free(fc->destroy_req);
                mutex_destroy(&fc->inst_mutex);
@@ -989101,7 +988991,7 @@ diff -purN linux-2.6.27/fs/fuse/inode.c linux-2.6.27.19-5.1/fs/fuse/inode.c
                kfree(fc);
        }
  }
-@@ -832,12 +832,16 @@ static int fuse_fill_super(struct super_
+@@ -832,12 +832,16 @@
        if (!file)
                return -EINVAL;
  
@@ -989120,10 +989010,10 @@ diff -purN linux-2.6.27/fs/fuse/inode.c linux-2.6.27.19-5.1/fs/fuse/inode.c
  
        fc->flags = d.flags;
        fc->user_id = d.user_id;
-diff -purN linux-2.6.27/fs/gfs2/locking/dlm/mount.c linux-2.6.27.19-5.1/fs/gfs2/locking/dlm/mount.c
---- linux-2.6.27/fs/gfs2/locking/dlm/mount.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/gfs2/locking/dlm/mount.c    2009-03-25 16:11:37.000000000 +0000
-@@ -144,7 +144,8 @@ static int gdlm_mount(char *table_name, 
+diff -r 9608d5473017 fs/gfs2/locking/dlm/mount.c
+--- a/fs/gfs2/locking/dlm/mount.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/gfs2/locking/dlm/mount.c      Wed May 06 16:56:49 2009 +0100
+@@ -144,7 +144,8 @@
  
        error = dlm_new_lockspace(ls->fsname, strlen(ls->fsname),
                                  &ls->dlm_lockspace,
@@ -989133,10 +989023,10 @@ diff -purN linux-2.6.27/fs/gfs2/locking/dlm/mount.c linux-2.6.27.19-5.1/fs/gfs2/
                                  GDLM_LVB_SIZE);
        if (error) {
                log_error("dlm_new_lockspace error %d", error);
-diff -purN linux-2.6.27/fs/gfs2/ops_address.c linux-2.6.27.19-5.1/fs/gfs2/ops_address.c
---- linux-2.6.27/fs/gfs2/ops_address.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/gfs2/ops_address.c  2009-03-25 16:11:37.000000000 +0000
-@@ -675,7 +675,7 @@ static int gfs2_write_begin(struct file 
+diff -r 9608d5473017 fs/gfs2/ops_address.c
+--- a/fs/gfs2/ops_address.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/gfs2/ops_address.c    Wed May 06 16:56:49 2009 +0100
+@@ -675,7 +675,7 @@
                goto out_trans_fail;
  
        error = -ENOMEM;
@@ -989145,10 +989035,10 @@ diff -purN linux-2.6.27/fs/gfs2/ops_address.c linux-2.6.27.19-5.1/fs/gfs2/ops_ad
        *pagep = page;
        if (unlikely(!page))
                goto out_endtrans;
-diff -purN linux-2.6.27/fs/hfs/catalog.c linux-2.6.27.19-5.1/fs/hfs/catalog.c
---- linux-2.6.27/fs/hfs/catalog.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfs/catalog.c       2009-03-25 16:11:38.000000000 +0000
-@@ -190,6 +190,10 @@ int hfs_cat_find_brec(struct super_block
+diff -r 9608d5473017 fs/hfs/catalog.c
+--- a/fs/hfs/catalog.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfs/catalog.c Wed May 06 16:56:49 2009 +0100
+@@ -190,6 +190,10 @@
  
        fd->search_key->cat.ParID = rec.thread.ParID;
        len = fd->search_key->cat.CName.len = rec.thread.CName.len;
@@ -989159,10 +989049,10 @@ diff -purN linux-2.6.27/fs/hfs/catalog.c linux-2.6.27.19-5.1/fs/hfs/catalog.c
        memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len);
        return hfs_brec_find(fd);
  }
-diff -purN linux-2.6.27/fs/hfsplus/bitmap.c linux-2.6.27.19-5.1/fs/hfsplus/bitmap.c
---- linux-2.6.27/fs/hfsplus/bitmap.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfsplus/bitmap.c    2009-03-25 16:11:39.000000000 +0000
-@@ -32,6 +32,10 @@ int hfsplus_block_allocate(struct super_
+diff -r 9608d5473017 fs/hfsplus/bitmap.c
+--- a/fs/hfsplus/bitmap.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfsplus/bitmap.c      Wed May 06 16:56:49 2009 +0100
+@@ -32,6 +32,10 @@
        mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex);
        mapping = HFSPLUS_SB(sb).alloc_file->i_mapping;
        page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL);
@@ -989173,7 +989063,7 @@ diff -purN linux-2.6.27/fs/hfsplus/bitmap.c linux-2.6.27.19-5.1/fs/hfsplus/bitma
        pptr = kmap(page);
        curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32;
        i = offset % 32;
-@@ -73,6 +77,10 @@ int hfsplus_block_allocate(struct super_
+@@ -73,6 +77,10 @@
                        break;
                page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS,
                                         NULL);
@@ -989184,7 +989074,7 @@ diff -purN linux-2.6.27/fs/hfsplus/bitmap.c linux-2.6.27.19-5.1/fs/hfsplus/bitma
                curr = pptr = kmap(page);
                if ((size ^ offset) / PAGE_CACHE_BITS)
                        end = pptr + PAGE_CACHE_BITS / 32;
-@@ -120,6 +128,10 @@ found:
+@@ -120,6 +128,10 @@
                offset += PAGE_CACHE_BITS;
                page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS,
                                         NULL);
@@ -989195,25 +989085,25 @@ diff -purN linux-2.6.27/fs/hfsplus/bitmap.c linux-2.6.27.19-5.1/fs/hfsplus/bitma
                pptr = kmap(page);
                curr = pptr;
                end = pptr + PAGE_CACHE_BITS / 32;
-diff -purN linux-2.6.27/fs/hfsplus/catalog.c linux-2.6.27.19-5.1/fs/hfsplus/catalog.c
---- linux-2.6.27/fs/hfsplus/catalog.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hfsplus/catalog.c   2009-03-25 16:11:39.000000000 +0000
-@@ -168,6 +168,11 @@ int hfsplus_find_cat(struct super_block 
-               return -EIO;
-       }
-+      if (be16_to_cpu(tmp.thread.nodeName.length) > 255) {
-+              printk(KERN_ERR "hfs: catalog name length corrupted\n");
+diff -r 9608d5473017 fs/hfsplus/catalog.c
+--- a/fs/hfsplus/catalog.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/hfsplus/catalog.c     Wed May 06 16:56:49 2009 +0100
+@@ -165,6 +165,11 @@
+       type = be16_to_cpu(tmp.type);
+       if (type != HFSPLUS_FOLDER_THREAD && type != HFSPLUS_FILE_THREAD) {
+               printk(KERN_ERR "hfs: found bad thread record in catalog\n");
 +              return -EIO;
 +      }
 +
-       hfsplus_cat_build_key_uni(fd->search_key, be32_to_cpu(tmp.thread.parentID),
-                                &tmp.thread.nodeName);
-       return hfs_brec_find(fd);
-diff -purN linux-2.6.27/fs/hostfs/hostfs_kern.c linux-2.6.27.19-5.1/fs/hostfs/hostfs_kern.c
---- linux-2.6.27/fs/hostfs/hostfs_kern.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hostfs/hostfs_kern.c        2009-03-25 16:11:35.000000000 +0000
-@@ -500,7 +500,7 @@ int hostfs_write_begin(struct file *file
++      if (be16_to_cpu(tmp.thread.nodeName.length) > 255) {
++              printk(KERN_ERR "hfs: catalog name length corrupted\n");
+               return -EIO;
+       }
+diff -r 9608d5473017 fs/hostfs/hostfs_kern.c
+--- a/fs/hostfs/hostfs_kern.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/hostfs/hostfs_kern.c  Wed May 06 16:56:49 2009 +0100
+@@ -500,7 +500,7 @@
  {
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
  
@@ -989222,10 +989112,10 @@ diff -purN linux-2.6.27/fs/hostfs/hostfs_kern.c linux-2.6.27.19-5.1/fs/hostfs/ho
        if (!*pagep)
                return -ENOMEM;
        return 0;
-diff -purN linux-2.6.27/fs/hpfs/namei.c linux-2.6.27.19-5.1/fs/hpfs/namei.c
---- linux-2.6.27/fs/hpfs/namei.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/hpfs/namei.c        2009-03-25 16:11:39.000000000 +0000
-@@ -426,7 +426,7 @@ again:
+diff -r 9608d5473017 fs/hpfs/namei.c
+--- a/fs/hpfs/namei.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/hpfs/namei.c  Wed May 06 16:56:50 2009 +0100
+@@ -426,7 +426,7 @@
                        /*printk("HPFS: truncating file before delete.\n");*/
                        newattrs.ia_size = 0;
                        newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
@@ -989234,10 +989124,10 @@ diff -purN linux-2.6.27/fs/hpfs/namei.c linux-2.6.27.19-5.1/fs/hpfs/namei.c
                        put_write_access(inode);
                        if (!err)
                                goto again;
-diff -purN linux-2.6.27/fs/inode.c linux-2.6.27.19-5.1/fs/inode.c
---- linux-2.6.27/fs/inode.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inode.c     2009-03-25 16:11:36.000000000 +0000
-@@ -1249,7 +1249,7 @@ void file_update_time(struct file *file)
+diff -r 9608d5473017 fs/inode.c
+--- a/fs/inode.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/inode.c       Wed May 06 16:56:50 2009 +0100
+@@ -1249,7 +1249,7 @@
        if (IS_NOCMTIME(inode))
                return;
  
@@ -989246,10 +989136,10 @@ diff -purN linux-2.6.27/fs/inode.c linux-2.6.27.19-5.1/fs/inode.c
        if (err)
                return;
  
-diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
---- linux-2.6.27/fs/inotify.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inotify.c   2009-03-25 16:11:37.000000000 +0000
-@@ -106,6 +106,20 @@ void get_inotify_watch(struct inotify_wa
+diff -r 9608d5473017 fs/inotify.c
+--- a/fs/inotify.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/inotify.c     Wed May 06 16:56:50 2009 +0100
+@@ -106,6 +106,20 @@
  }
  EXPORT_SYMBOL_GPL(get_inotify_watch);
  
@@ -989270,21 +989160,21 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  /**
   * put_inotify_watch - decrements the ref count on a given watch.  cleans up
   * watch references if the count reaches zero.  inotify_watch is freed by
-@@ -124,6 +138,13 @@ void put_inotify_watch(struct inotify_wa
+@@ -123,6 +137,13 @@
+       }
  }
  EXPORT_SYMBOL_GPL(put_inotify_watch);
++
 +void unpin_inotify_watch(struct inotify_watch *watch)
 +{
 +      struct super_block *sb = watch->inode->i_sb;
 +      put_inotify_watch(watch);
 +      deactivate_super(sb);
 +}
-+
  /*
   * inotify_handle_get_wd - returns the next WD for use by the given handle
-  *
-@@ -479,6 +500,112 @@ void inotify_init_watch(struct inotify_w
+@@ -479,6 +500,112 @@
  }
  EXPORT_SYMBOL_GPL(inotify_init_watch);
  
@@ -989397,7 +989287,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  /**
   * inotify_destroy - clean up and destroy an inotify instance
   * @ih: inotify handle
-@@ -490,11 +617,15 @@ void inotify_destroy(struct inotify_hand
+@@ -490,11 +617,15 @@
         * pretty.  We cannot do a simple iteration over the list, because we
         * do not know the inode until we iterate to the watch.  But we need to
         * hold inode->inotify_mutex before ih->mutex.  The following works.
@@ -989413,7 +989303,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  
                mutex_lock(&ih->mutex);
                watches = &ih->watches;
-@@ -503,8 +634,10 @@ void inotify_destroy(struct inotify_hand
+@@ -503,8 +634,10 @@
                        break;
                }
                watch = list_first_entry(watches, struct inotify_watch, h_list);
@@ -989426,7 +989316,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  
                inode = watch->inode;
                mutex_lock(&inode->inotify_mutex);
-@@ -518,7 +651,7 @@ void inotify_destroy(struct inotify_hand
+@@ -518,7 +651,7 @@
  
                mutex_unlock(&ih->mutex);
                mutex_unlock(&inode->inotify_mutex);
@@ -989435,7 +989325,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
        }
  
        /* free this handle: the put matching the get in inotify_init() */
-@@ -719,7 +852,9 @@ void inotify_evict_watch(struct inotify_
+@@ -719,7 +852,9 @@
  int inotify_rm_wd(struct inotify_handle *ih, u32 wd)
  {
        struct inotify_watch *watch;
@@ -989445,7 +989335,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  
        mutex_lock(&ih->mutex);
        watch = idr_find(&ih->idr, wd);
-@@ -727,9 +862,12 @@ int inotify_rm_wd(struct inotify_handle 
+@@ -727,9 +862,12 @@
                mutex_unlock(&ih->mutex);
                return -EINVAL;
        }
@@ -989460,7 +989350,7 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  
        mutex_lock(&inode->inotify_mutex);
        mutex_lock(&ih->mutex);
-@@ -740,7 +878,7 @@ int inotify_rm_wd(struct inotify_handle 
+@@ -740,7 +878,7 @@
  
        mutex_unlock(&ih->mutex);
        mutex_unlock(&inode->inotify_mutex);
@@ -989469,10 +989359,10 @@ diff -purN linux-2.6.27/fs/inotify.c linux-2.6.27.19-5.1/fs/inotify.c
  
        return 0;
  }
-diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
---- linux-2.6.27/fs/inotify_user.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/inotify_user.c      2009-03-25 16:11:38.000000000 +0000
-@@ -372,7 +372,7 @@ static int find_inode(const char __user 
+diff -r 9608d5473017 fs/inotify_user.c
+--- a/fs/inotify_user.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/inotify_user.c        Wed May 06 16:56:50 2009 +0100
+@@ -372,7 +372,7 @@
        if (error)
                return error;
        /* you can only watch an inode if you have read permissions on it */
@@ -989481,7 +989371,7 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
        if (error)
                path_put(path);
        return error;
-@@ -427,10 +427,61 @@ static unsigned int inotify_poll(struct 
+@@ -427,10 +427,61 @@
        return ret;
  }
  
@@ -989544,7 +989434,7 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
        struct inotify_device *dev;
        char __user *start;
        int ret;
-@@ -440,81 +491,43 @@ static ssize_t inotify_read(struct file 
+@@ -440,81 +491,43 @@
        dev = file->private_data;
  
        while (1) {
@@ -989563,11 +989453,6 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
 -              if (file->f_flags & O_NONBLOCK) {
 -                      ret = -EAGAIN;
 -                      break;
--              }
--
--              if (signal_pending(current)) {
--                      ret = -EINTR;
--                      break;
 +              if (kevent) {
 +                      ret = PTR_ERR(kevent);
 +                      if (IS_ERR(kevent))
@@ -989581,21 +989466,33 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
 +                      continue;
                }
  
--              schedule();
--      }
--
--      finish_wait(&dev->wq, &wait);
+-              if (signal_pending(current)) {
+-                      ret = -EINTR;
++              ret = -EAGAIN;
++              if (file->f_flags & O_NONBLOCK)
+                       break;
+-              }
++              ret = -EINTR;
++              if (signal_pending(current))
++                      break;
++
++              if (start != buf)
++                      break;
+               schedule();
+       }
+       finish_wait(&dev->wq, &wait);
 -      if (ret)
 -              return ret;
 -
 -      while (1) {
 -              struct inotify_kernel_event *kevent;
 -
--              ret = buf - start;
++      if (start != buf && ret != -EFAULT)
+               ret = buf - start;
 -              if (list_empty(&dev->events))
-+              ret = -EAGAIN;
-+              if (file->f_flags & O_NONBLOCK)
-                       break;
+-                      break;
 -
 -              kevent = inotify_dev_get_event(dev);
 -              if (event_size + kevent->event.len > count) {
@@ -989606,12 +989503,10 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
 -                               */
 -                              ret = -EINVAL;
 -                      }
-+              ret = -EINTR;
-+              if (signal_pending(current))
-                       break;
+-                      break;
 -              }
 -              remove_kevent(dev, kevent);
+-
 -              /*
 -               * Must perform the copy_to_user outside the mutex in order
 -               * to avoid a lock order reversal with mmap_sem.
@@ -989620,8 +989515,7 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
 -
 -              if (copy_to_user(buf, &kevent->event, event_size)) {
 -                      ret = -EFAULT;
-+              if (start != buf)
-                       break;
+-                      break;
 -              }
 -              buf += event_size;
 -              count -= event_size;
@@ -989634,21 +989528,17 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
 -                      buf += kevent->event.len;
 -                      count -= kevent->event.len;
 -              }
+-
 -              free_kevent(kevent);
 -
 -              mutex_lock(&dev->ev_mutex);
-+              schedule();
-       }
+-      }
 -      mutex_unlock(&dev->ev_mutex);
-+      finish_wait(&dev->wq, &wait);
-+      if (start != buf && ret != -EFAULT)
-+              ret = buf - start;
+-
        return ret;
  }
  
-@@ -579,7 +592,7 @@ static const struct inotify_operations i
+@@ -579,7 +592,7 @@
        .destroy_watch  = free_inotify_user_watch,
  };
  
@@ -989657,7 +989547,7 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
  {
        struct inotify_device *dev;
        struct inotify_handle *ih;
-@@ -658,12 +671,13 @@ out_put_fd:
+@@ -658,12 +671,13 @@
        return ret;
  }
  
@@ -989673,7 +989563,7 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
  {
        struct inode *inode;
        struct inotify_device *dev;
-@@ -707,7 +721,7 @@ fput_and_out:
+@@ -707,7 +721,7 @@
        return ret;
  }
  
@@ -989682,9 +989572,9 @@ diff -purN linux-2.6.27/fs/inotify_user.c linux-2.6.27.19-5.1/fs/inotify_user.c
  {
        struct file *filp;
        struct inotify_device *dev;
-diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
---- linux-2.6.27/fs/ioctl.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ioctl.c     2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/ioctl.c
+--- a/fs/ioctl.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ioctl.c       Wed May 06 16:56:50 2009 +0100
 @@ -13,6 +13,7 @@
  #include <linux/security.h>
  #include <linux/module.h>
@@ -989693,7 +989583,7 @@ diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
  
  #include <asm/ioctls.h>
  
-@@ -123,11 +124,9 @@ static int ioctl_fioasync(unsigned int f
+@@ -123,11 +124,9 @@
  
        /* Did FASYNC state change ? */
        if ((flag ^ filp->f_flags) & FASYNC) {
@@ -989707,7 +989597,7 @@ diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
                        error = -ENOTTY;
        }
        if (error)
-@@ -163,11 +162,17 @@ int do_vfs_ioctl(struct file *filp, unsi
+@@ -163,11 +162,17 @@
                break;
  
        case FIONBIO:
@@ -989725,7 +989615,7 @@ diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
                break;
  
        case FIOQSIZE:
-@@ -191,7 +196,7 @@ int do_vfs_ioctl(struct file *filp, unsi
+@@ -191,7 +196,7 @@
        return error;
  }
  
@@ -989734,19 +989624,19 @@ diff -purN linux-2.6.27/fs/ioctl.c linux-2.6.27.19-5.1/fs/ioctl.c
  {
        struct file *filp;
        int error = -EBADF;
-@@ -201,6 +206,8 @@ asmlinkage long sys_ioctl(unsigned int f
+@@ -200,6 +205,8 @@
+       filp = fget_light(fd, &fput_needed);
        if (!filp)
                goto out;
-+      trace_fs_ioctl(fd, cmd, arg);
 +
++      trace_fs_ioctl(fd, cmd, arg);
        error = security_file_ioctl(filp, cmd, arg);
        if (error)
-               goto out_fput;
-diff -purN linux-2.6.27/fs/ioprio.c linux-2.6.27.19-5.1/fs/ioprio.c
---- linux-2.6.27/fs/ioprio.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ioprio.c    2009-03-25 16:11:38.000000000 +0000
-@@ -65,7 +65,7 @@ static int set_task_ioprio(struct task_s
+diff -r 9608d5473017 fs/ioprio.c
+--- a/fs/ioprio.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ioprio.c      Wed May 06 16:56:50 2009 +0100
+@@ -65,7 +65,7 @@
        return err;
  }
  
@@ -989755,7 +989645,7 @@ diff -purN linux-2.6.27/fs/ioprio.c linux-2.6.27.19-5.1/fs/ioprio.c
  {
        int class = IOPRIO_PRIO_CLASS(ioprio);
        int data = IOPRIO_PRIO_DATA(ioprio);
-@@ -181,7 +181,7 @@ int ioprio_best(unsigned short aprio, un
+@@ -181,7 +181,7 @@
                return aprio;
  }
  
@@ -989764,15 +989654,15 @@ diff -purN linux-2.6.27/fs/ioprio.c linux-2.6.27.19-5.1/fs/ioprio.c
  {
        struct task_struct *g, *p;
        struct user_struct *user;
-@@ -245,4 +245,3 @@ asmlinkage long sys_ioprio_get(int which
+@@ -245,4 +245,3 @@
        read_unlock(&tasklist_lock);
        return ret;
  }
 -
-diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoint.c
---- linux-2.6.27/fs/jbd/checkpoint.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/checkpoint.c    2009-03-25 16:11:38.000000000 +0000
-@@ -93,7 +93,8 @@ static int __try_to_free_cp_buf(struct j
+diff -r 9608d5473017 fs/jbd/checkpoint.c
+--- a/fs/jbd/checkpoint.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/checkpoint.c      Wed May 06 16:56:50 2009 +0100
+@@ -93,7 +93,8 @@
        int ret = 0;
        struct buffer_head *bh = jh2bh(jh);
  
@@ -989782,7 +989672,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
                JBUFFER_TRACE(jh, "remove from checkpoint list");
                ret = __journal_remove_checkpoint(jh) + 1;
                jbd_unlock_bh_state(bh);
-@@ -160,21 +161,25 @@ static void jbd_sync_bh(journal_t *journ
+@@ -160,21 +161,25 @@
   * buffers. Note that we take the buffers in the opposite ordering
   * from the one in which they were submitted for IO.
   *
@@ -989810,7 +989700,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
        while (!released && transaction->t_checkpoint_io_list) {
                jh = transaction->t_checkpoint_io_list;
                bh = jh2bh(jh);
-@@ -194,6 +199,9 @@ restart:
+@@ -194,6 +199,9 @@
                        spin_lock(&journal->j_list_lock);
                        goto restart;
                }
@@ -989820,7 +989710,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
                /*
                 * Now in whatever state the buffer currently is, we know that
                 * it has been written out and so we can drop it from the list
-@@ -203,6 +211,8 @@ restart:
+@@ -203,6 +211,8 @@
                journal_remove_journal_head(bh);
                __brelse(bh);
        }
@@ -989829,7 +989719,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
  }
  
  #define NR_BATCH      64
-@@ -226,7 +236,8 @@ __flush_batch(journal_t *journal, struct
+@@ -226,7 +236,8 @@
   * Try to flush one buffer from the checkpoint list to disk.
   *
   * Return 1 if something happened which requires us to abort the current
@@ -989839,7 +989729,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
   *
   * Called with j_list_lock held and drops it if 1 is returned
   * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
-@@ -256,6 +267,9 @@ static int __process_buffer(journal_t *j
+@@ -256,6 +267,9 @@
                log_wait_commit(journal, tid);
                ret = 1;
        } else if (!buffer_dirty(bh)) {
@@ -989849,7 +989739,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
                J_ASSERT_JH(jh, !buffer_jbddirty(bh));
                BUFFER_TRACE(bh, "remove from checkpoint");
                __journal_remove_checkpoint(jh);
-@@ -263,7 +277,6 @@ static int __process_buffer(journal_t *j
+@@ -263,7 +277,6 @@
                jbd_unlock_bh_state(bh);
                journal_remove_journal_head(bh);
                __brelse(bh);
@@ -989857,7 +989747,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
        } else {
                /*
                 * Important: we are about to write the buffer, and
-@@ -295,6 +308,7 @@ static int __process_buffer(journal_t *j
+@@ -295,6 +308,7 @@
   * to disk. We submit larger chunks of data at once.
   *
   * The journal should be locked before calling this function.
@@ -989865,7 +989755,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
   */
  int log_do_checkpoint(journal_t *journal)
  {
-@@ -318,6 +332,7 @@ int log_do_checkpoint(journal_t *journal
+@@ -318,6 +332,7 @@
         * OK, we need to start writing disk blocks.  Take one transaction
         * and write it.
         */
@@ -989873,7 +989763,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
        spin_lock(&journal->j_list_lock);
        if (!journal->j_checkpoint_transactions)
                goto out;
-@@ -334,7 +349,7 @@ restart:
+@@ -334,7 +349,7 @@
                int batch_count = 0;
                struct buffer_head *bhs[NR_BATCH];
                struct journal_head *jh;
@@ -989882,7 +989772,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
  
                while (!retry && transaction->t_checkpoint_list) {
                        struct buffer_head *bh;
-@@ -347,6 +362,8 @@ restart:
+@@ -347,6 +362,8 @@
                                break;
                        }
                        retry = __process_buffer(journal, jh, bhs,&batch_count);
@@ -989891,7 +989781,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
                        if (!retry && (need_resched() ||
                                spin_needbreak(&journal->j_list_lock))) {
                                spin_unlock(&journal->j_list_lock);
-@@ -371,14 +388,18 @@ restart:
+@@ -371,14 +388,18 @@
                 * Now we have cleaned up the first transaction's checkpoint
                 * list. Let's clean up the second one
                 */
@@ -989914,7 +989804,7 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
  }
  
  /*
-@@ -394,8 +415,9 @@ out:
+@@ -394,8 +415,9 @@
   * This is the only part of the journaling code which really needs to be
   * aware of transaction aborts.  Checkpointing involves writing to the
   * main filesystem area rather than to the journal, so it can proceed
@@ -989926,20 +989816,20 @@ diff -purN linux-2.6.27/fs/jbd/checkpoint.c linux-2.6.27.19-5.1/fs/jbd/checkpoin
   */
  
  int cleanup_journal_tail(journal_t *journal)
-@@ -404,6 +426,9 @@ int cleanup_journal_tail(journal_t *jour
+@@ -403,6 +425,9 @@
+       transaction_t * transaction;
        tid_t           first_tid;
        unsigned long   blocknr, freed;
++
 +      if (is_journal_aborted(journal))
 +              return 1;
-+
        /* OK, work out the oldest transaction remaining in the log, and
         * the log block it starts at.
-        *
-diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
---- linux-2.6.27/fs/jbd/journal.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/journal.c       2009-03-25 16:11:38.000000000 +0000
-@@ -1121,9 +1121,12 @@ recovery_error:
+diff -r 9608d5473017 fs/jbd/journal.c
+--- a/fs/jbd/journal.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/journal.c Wed May 06 16:56:50 2009 +0100
+@@ -1121,9 +1121,12 @@
   *
   * Release a journal_t structure once it is no longer in use by the
   * journaled object.
@@ -989953,7 +989843,7 @@ diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
        /* Wait for the commit thread to wake up and die. */
        journal_kill_thread(journal);
  
-@@ -1146,11 +1149,16 @@ void journal_destroy(journal_t *journal)
+@@ -1146,11 +1149,16 @@
        J_ASSERT(journal->j_checkpoint_transactions == NULL);
        spin_unlock(&journal->j_list_lock);
  
@@ -989974,7 +989864,7 @@ diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
                brelse(journal->j_sb_buffer);
        }
  
-@@ -1160,6 +1168,8 @@ void journal_destroy(journal_t *journal)
+@@ -1160,6 +1168,8 @@
                journal_destroy_revoke(journal);
        kfree(journal->j_wbuf);
        kfree(journal);
@@ -989983,7 +989873,7 @@ diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
  }
  
  
-@@ -1359,10 +1369,16 @@ int journal_flush(journal_t *journal)
+@@ -1359,10 +1369,16 @@
        spin_lock(&journal->j_list_lock);
        while (!err && journal->j_checkpoint_transactions != NULL) {
                spin_unlock(&journal->j_list_lock);
@@ -990000,7 +989890,7 @@ diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
        cleanup_journal_tail(journal);
  
        /* Finally, mark the journal as really needing no recovery.
-@@ -1384,7 +1400,7 @@ int journal_flush(journal_t *journal)
+@@ -1384,7 +1400,7 @@
        J_ASSERT(journal->j_head == journal->j_tail);
        J_ASSERT(journal->j_tail_sequence == journal->j_transaction_sequence);
        spin_unlock(&journal->j_state_lock);
@@ -990009,10 +989899,10 @@ diff -purN linux-2.6.27/fs/jbd/journal.c linux-2.6.27.19-5.1/fs/jbd/journal.c
  }
  
  /**
-diff -purN linux-2.6.27/fs/jbd/recovery.c linux-2.6.27.19-5.1/fs/jbd/recovery.c
---- linux-2.6.27/fs/jbd/recovery.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/recovery.c      2009-03-25 16:11:38.000000000 +0000
-@@ -223,7 +223,7 @@ do {                                                                       \
+diff -r 9608d5473017 fs/jbd/recovery.c
+--- a/fs/jbd/recovery.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/recovery.c        Wed May 06 16:56:50 2009 +0100
+@@ -223,7 +223,7 @@
   */
  int journal_recover(journal_t *journal)
  {
@@ -990021,7 +989911,7 @@ diff -purN linux-2.6.27/fs/jbd/recovery.c linux-2.6.27.19-5.1/fs/jbd/recovery.c
        journal_superblock_t *  sb;
  
        struct recovery_info    info;
-@@ -261,7 +261,10 @@ int journal_recover(journal_t *journal)
+@@ -261,7 +261,10 @@
        journal->j_transaction_sequence = ++info.end_transaction;
  
        journal_clear_revoke(journal);
@@ -990033,10 +989923,10 @@ diff -purN linux-2.6.27/fs/jbd/recovery.c linux-2.6.27.19-5.1/fs/jbd/recovery.c
        return err;
  }
  
-diff -purN linux-2.6.27/fs/jbd/transaction.c linux-2.6.27.19-5.1/fs/jbd/transaction.c
---- linux-2.6.27/fs/jbd/transaction.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd/transaction.c   2009-03-25 16:11:38.000000000 +0000
-@@ -954,9 +954,10 @@ int journal_dirty_data(handle_t *handle,
+diff -r 9608d5473017 fs/jbd/transaction.c
+--- a/fs/jbd/transaction.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd/transaction.c     Wed May 06 16:56:50 2009 +0100
+@@ -954,9 +954,10 @@
        journal_t *journal = handle->h_transaction->t_journal;
        int need_brelse = 0;
        struct journal_head *jh;
@@ -990048,7 +989938,7 @@ diff -purN linux-2.6.27/fs/jbd/transaction.c linux-2.6.27.19-5.1/fs/jbd/transact
  
        jh = journal_add_journal_head(bh);
        JBUFFER_TRACE(jh, "entry");
-@@ -1067,7 +1068,16 @@ int journal_dirty_data(handle_t *handle,
+@@ -1067,7 +1068,16 @@
                                   time if it is redirtied */
                        }
  
@@ -990066,7 +989956,7 @@ diff -purN linux-2.6.27/fs/jbd/transaction.c linux-2.6.27.19-5.1/fs/jbd/transact
                        if (jh->b_transaction != NULL) {
                                JBUFFER_TRACE(jh, "unfile from commit");
                                __journal_temp_unlink_buffer(jh);
-@@ -1108,7 +1118,7 @@ no_journal:
+@@ -1108,7 +1118,7 @@
        }
        JBUFFER_TRACE(jh, "exit");
        journal_put_journal_head(jh);
@@ -990075,10 +989965,10 @@ diff -purN linux-2.6.27/fs/jbd/transaction.c linux-2.6.27.19-5.1/fs/jbd/transact
  }
  
  /**
-diff -purN linux-2.6.27/fs/jbd2/checkpoint.c linux-2.6.27.19-5.1/fs/jbd2/checkpoint.c
---- linux-2.6.27/fs/jbd2/checkpoint.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/checkpoint.c   2009-03-25 16:11:32.000000000 +0000
-@@ -114,7 +114,7 @@ static int __try_to_free_cp_buf(struct j
+diff -r 9608d5473017 fs/jbd2/checkpoint.c
+--- a/fs/jbd2/checkpoint.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/checkpoint.c     Wed May 06 16:56:50 2009 +0100
+@@ -114,7 +114,7 @@
   */
  void __jbd2_log_wait_for_space(journal_t *journal)
  {
@@ -990087,7 +989977,7 @@ diff -purN linux-2.6.27/fs/jbd2/checkpoint.c linux-2.6.27.19-5.1/fs/jbd2/checkpo
        assert_spin_locked(&journal->j_state_lock);
  
        nblocks = jbd_space_needed(journal);
-@@ -126,14 +126,47 @@ void __jbd2_log_wait_for_space(journal_t
+@@ -126,14 +126,47 @@
  
                /*
                 * Test again, another process may have checkpointed while we
@@ -990138,10 +990028,10 @@ diff -purN linux-2.6.27/fs/jbd2/checkpoint.c linux-2.6.27.19-5.1/fs/jbd2/checkpo
                }
                mutex_unlock(&journal->j_checkpoint_mutex);
        }
-diff -purN linux-2.6.27/fs/jbd2/commit.c linux-2.6.27.19-5.1/fs/jbd2/commit.c
---- linux-2.6.27/fs/jbd2/commit.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/commit.c       2009-03-25 16:11:32.000000000 +0000
-@@ -126,8 +126,7 @@ static int journal_submit_commit_record(
+diff -r 9608d5473017 fs/jbd2/commit.c
+--- a/fs/jbd2/commit.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/commit.c Wed May 06 16:56:50 2009 +0100
+@@ -126,8 +126,7 @@
  
        JBUFFER_TRACE(descriptor, "submit commit block");
        lock_buffer(bh);
@@ -990151,7 +990041,7 @@ diff -purN linux-2.6.27/fs/jbd2/commit.c linux-2.6.27.19-5.1/fs/jbd2/commit.c
        set_buffer_uptodate(bh);
        bh->b_end_io = journal_end_buffer_io_sync;
  
-@@ -160,7 +159,7 @@ static int journal_submit_commit_record(
+@@ -160,7 +159,7 @@
                /* And try again, without the barrier */
                lock_buffer(bh);
                set_buffer_uptodate(bh);
@@ -990160,10 +990050,10 @@ diff -purN linux-2.6.27/fs/jbd2/commit.c linux-2.6.27.19-5.1/fs/jbd2/commit.c
                ret = submit_bh(WRITE, bh);
        }
        *cbh = bh;
-diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
---- linux-2.6.27/fs/jbd2/journal.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jbd2/journal.c      2009-03-25 16:11:32.000000000 +0000
-@@ -901,10 +901,7 @@ static struct proc_dir_entry *proc_jbd2_
+diff -r 9608d5473017 fs/jbd2/journal.c
+--- a/fs/jbd2/journal.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/jbd2/journal.c        Wed May 06 16:56:50 2009 +0100
+@@ -901,10 +901,7 @@
  
  static void jbd2_stats_proc_init(journal_t *journal)
  {
@@ -990175,7 +990065,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        if (journal->j_proc_entry) {
                proc_create_data("history", S_IRUGO, journal->j_proc_entry,
                                 &jbd2_seq_history_fops, journal);
-@@ -915,12 +912,9 @@ static void jbd2_stats_proc_init(journal
+@@ -915,12 +912,9 @@
  
  static void jbd2_stats_proc_exit(journal_t *journal)
  {
@@ -990189,7 +990079,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
  }
  
  static void journal_init_stats(journal_t *journal)
-@@ -1018,6 +1012,7 @@ journal_t * jbd2_journal_init_dev(struct
+@@ -1018,6 +1012,7 @@
  {
        journal_t *journal = journal_init_common();
        struct buffer_head *bh;
@@ -990197,7 +990087,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        int n;
  
        if (!journal)
-@@ -1039,6 +1034,10 @@ journal_t * jbd2_journal_init_dev(struct
+@@ -1039,6 +1034,10 @@
        journal->j_fs_dev = fs_dev;
        journal->j_blk_offset = start;
        journal->j_maxlen = len;
@@ -990208,7 +990098,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        jbd2_stats_proc_init(journal);
  
        bh = __getblk(journal->j_dev, start, journal->j_blocksize);
-@@ -1061,6 +1060,7 @@ journal_t * jbd2_journal_init_inode (str
+@@ -1061,6 +1060,7 @@
  {
        struct buffer_head *bh;
        journal_t *journal = journal_init_common();
@@ -990216,7 +990106,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        int err;
        int n;
        unsigned long long blocknr;
-@@ -1070,6 +1070,12 @@ journal_t * jbd2_journal_init_inode (str
+@@ -1070,6 +1070,12 @@
  
        journal->j_dev = journal->j_fs_dev = inode->i_sb->s_bdev;
        journal->j_inode = inode;
@@ -990229,7 +990119,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        jbd_debug(1,
                  "journal %p: inode %s/%ld, size %Ld, bits %d, blksize %ld\n",
                  journal, inode->i_sb->s_id, inode->i_ino,
-@@ -1253,6 +1259,22 @@ void jbd2_journal_update_superblock(jour
+@@ -1253,6 +1259,22 @@
                goto out;
        }
  
@@ -990252,7 +990142,7 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
        spin_lock(&journal->j_state_lock);
        jbd_debug(1,"JBD: updating superblock (start %ld, seq %d, errno %d)\n",
                  journal->j_tail, journal->j_tail_sequence, journal->j_errno);
-@@ -1264,9 +1286,16 @@ void jbd2_journal_update_superblock(jour
+@@ -1264,9 +1286,16 @@
  
        BUFFER_TRACE(bh, "marking dirty");
        mark_buffer_dirty(bh);
@@ -990271,10 +990161,10 @@ diff -purN linux-2.6.27/fs/jbd2/journal.c linux-2.6.27.19-5.1/fs/jbd2/journal.c
                ll_rw_block(SWRITE, 1, &bh);
  
  out:
-diff -purN linux-2.6.27/fs/jffs2/background.c linux-2.6.27.19-5.1/fs/jffs2/background.c
---- linux-2.6.27/fs/jffs2/background.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/background.c  2009-03-25 16:11:35.000000000 +0000
-@@ -85,15 +85,15 @@ static int jffs2_garbage_collect_thread(
+diff -r 9608d5473017 fs/jffs2/background.c
+--- a/fs/jffs2/background.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/background.c    Wed May 06 16:56:50 2009 +0100
+@@ -85,15 +85,15 @@
        for (;;) {
                allow_signal(SIGHUP);
        again:
@@ -990295,9 +990185,9 @@ diff -purN linux-2.6.27/fs/jffs2/background.c linux-2.6.27.19-5.1/fs/jffs2/backg
  
                /* This thread is purely an optimisation. But if it runs when
                   other things could be running, it actually makes things a
-diff -purN linux-2.6.27/fs/jffs2/compr_lzo.c linux-2.6.27.19-5.1/fs/jffs2/compr_lzo.c
---- linux-2.6.27/fs/jffs2/compr_lzo.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/compr_lzo.c   2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/jffs2/compr_lzo.c
+--- a/fs/jffs2/compr_lzo.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/compr_lzo.c     Wed May 06 16:56:50 2009 +0100
 @@ -19,7 +19,7 @@
  
  static void *lzo_mem;
@@ -990307,37 +990197,41 @@ diff -purN linux-2.6.27/fs/jffs2/compr_lzo.c linux-2.6.27.19-5.1/fs/jffs2/compr_
  
  static void free_workspace(void)
  {
-@@ -49,18 +49,21 @@ static int jffs2_lzo_compress(unsigned c
+@@ -49,18 +49,21 @@
  
        mutex_lock(&deflate_mutex);
        ret = lzo1x_1_compress(data_in, *sourcelen, lzo_compress_buf, &compress_size, lzo_mem);
--      mutex_unlock(&deflate_mutex);
--
-       if (ret != LZO_E_OK)
--              return -1;
++      if (ret != LZO_E_OK)
++              goto fail;
++
++      if (compress_size > *dstlen)
 +              goto fail;
++
++      memcpy(cpage_out, lzo_compress_buf, compress_size);
+       mutex_unlock(&deflate_mutex);
  
-       if (compress_size > *dstlen)
+-      if (ret != LZO_E_OK)
 -              return -1;
-+              goto fail;
++      *dstlen = compress_size;
++      return 0;
  
-       memcpy(cpage_out, lzo_compress_buf, compress_size);
+-      if (compress_size > *dstlen)
+-              return -1;
+-
+-      memcpy(cpage_out, lzo_compress_buf, compress_size);
 -      *dstlen = compress_size;
-+      mutex_unlock(&deflate_mutex);
-+      *dstlen = compress_size;
-       return 0;
-+
+-
+-      return 0;
 + fail:
 +      mutex_unlock(&deflate_mutex);
 +      return -1;
  }
  
  static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
-diff -purN linux-2.6.27/fs/jffs2/file.c linux-2.6.27.19-5.1/fs/jffs2/file.c
---- linux-2.6.27/fs/jffs2/file.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/jffs2/file.c        2009-03-25 16:11:35.000000000 +0000
-@@ -132,7 +132,7 @@ static int jffs2_write_begin(struct file
+diff -r 9608d5473017 fs/jffs2/file.c
+--- a/fs/jffs2/file.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/jffs2/file.c  Wed May 06 16:56:50 2009 +0100
+@@ -132,7 +132,7 @@
        uint32_t pageofs = index << PAGE_CACHE_SHIFT;
        int ret = 0;
  
@@ -990346,10 +990240,10 @@ diff -purN linux-2.6.27/fs/jffs2/file.c linux-2.6.27.19-5.1/fs/jffs2/file.c
        if (!pg)
                return -ENOMEM;
        *pagep = pg;
-diff -purN linux-2.6.27/fs/libfs.c linux-2.6.27.19-5.1/fs/libfs.c
---- linux-2.6.27/fs/libfs.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/libfs.c     2009-03-25 16:11:39.000000000 +0000
-@@ -360,7 +360,7 @@ int simple_write_begin(struct file *file
+diff -r 9608d5473017 fs/libfs.c
+--- a/fs/libfs.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/libfs.c       Wed May 06 16:56:50 2009 +0100
+@@ -360,7 +360,7 @@
        index = pos >> PAGE_CACHE_SHIFT;
        from = pos & (PAGE_CACHE_SIZE - 1);
  
@@ -990358,10 +990252,10 @@ diff -purN linux-2.6.27/fs/libfs.c linux-2.6.27.19-5.1/fs/libfs.c
        if (!page)
                return -ENOMEM;
  
-diff -purN linux-2.6.27/fs/lockd/svclock.c linux-2.6.27.19-5.1/fs/lockd/svclock.c
---- linux-2.6.27/fs/lockd/svclock.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/lockd/svclock.c     2009-03-25 16:11:37.000000000 +0000
-@@ -418,7 +418,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, stru
+diff -r 9608d5473017 fs/lockd/svclock.c
+--- a/fs/lockd/svclock.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/lockd/svclock.c       Wed May 06 16:56:50 2009 +0100
+@@ -418,7 +418,7 @@
                        goto out;
                case -EAGAIN:
                        ret = nlm_lck_denied;
@@ -990370,21 +990264,21 @@ diff -purN linux-2.6.27/fs/lockd/svclock.c linux-2.6.27.19-5.1/fs/lockd/svclock.
                case FILE_LOCK_DEFERRED:
                        if (wait)
                                break;
-@@ -434,6 +434,10 @@ nlmsvc_lock(struct svc_rqst *rqstp, stru
+@@ -433,6 +433,10 @@
+                       ret = nlm_lck_denied_nolocks;
                        goto out;
        }
++
 +      ret = nlm_lck_denied;
 +      if (!wait)
 +              goto out;
-+
        ret = nlm_lck_blocked;
  
-       /* Append to list of blocked */
-diff -purN linux-2.6.27/fs/locks.c linux-2.6.27.19-5.1/fs/locks.c
---- linux-2.6.27/fs/locks.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/locks.c     2009-03-25 16:11:36.000000000 +0000
-@@ -1564,7 +1564,7 @@ EXPORT_SYMBOL(flock_lock_file_wait);
+diff -r 9608d5473017 fs/locks.c
+--- a/fs/locks.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/locks.c       Wed May 06 16:56:50 2009 +0100
+@@ -1564,7 +1564,7 @@
   *    %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other
   *    processes read and write access respectively.
   */
@@ -990393,10 +990287,10 @@ diff -purN linux-2.6.27/fs/locks.c linux-2.6.27.19-5.1/fs/locks.c
  {
        struct file *filp;
        struct file_lock *lock;
-diff -purN linux-2.6.27/fs/minix/dir.c linux-2.6.27.19-5.1/fs/minix/dir.c
---- linux-2.6.27/fs/minix/dir.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/minix/dir.c 2009-03-25 16:11:37.000000000 +0000
-@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry
+diff -r 9608d5473017 fs/minix/dir.c
+--- a/fs/minix/dir.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/minix/dir.c   Wed May 06 16:56:50 2009 +0100
+@@ -280,7 +280,7 @@
        return -EINVAL;
  
  got_it:
@@ -990405,10 +990299,10 @@ diff -purN linux-2.6.27/fs/minix/dir.c linux-2.6.27.19-5.1/fs/minix/dir.c
        err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize,
                                        AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
        if (err)
-diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
---- linux-2.6.27/fs/namei.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/namei.c     2009-03-25 16:11:37.000000000 +0000
-@@ -227,9 +227,10 @@ int generic_permission(struct inode *ino
+diff -r 9608d5473017 fs/namei.c
+--- a/fs/namei.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/namei.c       Wed May 06 16:56:50 2009 +0100
+@@ -227,9 +227,10 @@
        return -EACCES;
  }
  
@@ -990420,7 +990314,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
        if (mask & MAY_WRITE) {
                umode_t mode = inode->i_mode;
-@@ -248,9 +249,12 @@ int inode_permission(struct inode *inode
+@@ -248,9 +249,12 @@
                        return -EACCES;
        }
  
@@ -990434,7 +990328,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                if (!retval) {
                        /*
                         * Exec permission on a regular file is denied if none
-@@ -269,7 +273,12 @@ int inode_permission(struct inode *inode
+@@ -269,11 +273,25 @@
        if (retval)
                return retval;
  
@@ -990448,23 +990342,20 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (retval)
                return retval;
  
-@@ -277,6 +286,15 @@ int inode_permission(struct inode *inode
-                       mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
- }
+       return security_inode_permission(inode,
++                      mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
++}
++
 +int path_permission(struct path *path, int mask)
 +{
 +      int retval = __inode_permission(path->dentry->d_inode, mask);
 +      if (retval)
 +              return retval;
 +      return security_path_permission(path,
-+                      mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
-+}
-+
- /**
-  * vfs_permission  -  check for access rights to a given path
-  * @nd:               lookup result that describes the path
-@@ -289,7 +307,7 @@ int inode_permission(struct inode *inode
+                       mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND));
+ }
+@@ -289,7 +307,7 @@
   */
  int vfs_permission(struct nameidata *nd, int mask)
  {
@@ -990473,7 +990364,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  }
  
  /**
-@@ -306,7 +324,7 @@ int vfs_permission(struct nameidata *nd,
+@@ -306,7 +324,7 @@
   */
  int file_permission(struct file *file, int mask)
  {
@@ -990482,7 +990373,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  }
  
  /*
-@@ -392,6 +410,7 @@ void release_open_intent(struct nameidat
+@@ -392,6 +410,7 @@
        else
                fput(nd->intent.open.file);
  }
@@ -990490,7 +990381,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
  static inline struct dentry *
  do_revalidate(struct dentry *dentry, struct nameidata *nd)
-@@ -447,8 +466,9 @@ static struct dentry * cached_lookup(str
+@@ -447,8 +466,9 @@
   * short-cut DAC fails, then call permission() to do more
   * complete permission check.
   */
@@ -990501,7 +990392,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        umode_t mode = inode->i_mode;
  
        if (inode->i_op && inode->i_op->permission)
-@@ -473,7 +493,7 @@ static int exec_permission_lite(struct i
+@@ -473,7 +493,7 @@
  
        return -EACCES;
  ok:
@@ -990510,7 +990401,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  }
  
  /*
-@@ -870,7 +890,7 @@ static int __link_path_walk(const char *
+@@ -870,7 +890,7 @@
                unsigned int c;
  
                nd->flags |= LOOKUP_CONTINUE;
@@ -990519,7 +990410,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                if (err == -EAGAIN)
                        err = vfs_permission(nd, MAY_EXEC);
                if (err)
-@@ -1065,24 +1085,21 @@ static int do_path_lookup(int dfd, const
+@@ -1065,24 +1085,21 @@
                path_get(&fs->pwd);
                read_unlock(&fs->lock);
        } else {
@@ -990546,7 +990437,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                path_get(&file->f_path);
  
                fput_light(file, fput_needed);
-@@ -1245,7 +1262,7 @@ static struct dentry *lookup_hash(struct
+@@ -1245,7 +1262,7 @@
  {
        int err;
  
@@ -990555,7 +990446,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (err)
                return ERR_PTR(err);
        return __lookup_hash(&nd->last, nd->path.dentry, nd);
-@@ -1401,13 +1418,24 @@ static int may_delete(struct inode *dir,
+@@ -1401,13 +1418,24 @@
        BUG_ON(victim->d_parent->d_inode != dir);
        audit_inode_child(victim->d_name.name, victim, dir);
  
@@ -990583,7 +990474,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                return -EPERM;
        if (isdir) {
                if (!S_ISDIR(victim->d_inode->i_mode))
-@@ -1431,13 +1459,28 @@ static int may_delete(struct inode *dir,
+@@ -1431,13 +1459,28 @@
   *  3. We should have write and exec permissions on dir
   *  4. We can't do it if dir is immutable (done in permission())
   */
@@ -990614,7 +990505,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  }
  
  /* 
-@@ -1503,7 +1546,7 @@ void unlock_rename(struct dentry *p1, st
+@@ -1503,7 +1546,7 @@
  int vfs_create(struct inode *dir, struct dentry *dentry, int mode,
                struct nameidata *nd)
  {
@@ -990623,7 +990514,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
        if (error)
                return error;
-@@ -1512,7 +1555,7 @@ int vfs_create(struct inode *dir, struct
+@@ -1512,7 +1555,7 @@
                return -EACCES; /* shouldn't it be ENOSYS? */
        mode &= S_IALLUGO;
        mode |= S_IFREG;
@@ -990632,7 +990523,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
        DQUOT_INIT(dir);
-@@ -1588,7 +1631,7 @@ int may_open(struct nameidata *nd, int a
+@@ -1588,7 +1631,7 @@
                if (!error) {
                        DQUOT_INIT(inode);
  
@@ -990641,7 +990532,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                                            ATTR_MTIME|ATTR_CTIME|ATTR_OPEN,
                                            NULL);
                }
-@@ -1945,9 +1988,10 @@ fail:
+@@ -1945,9 +1988,10 @@
  }
  EXPORT_SYMBOL_GPL(lookup_create);
  
@@ -990654,7 +990545,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
        if (error)
                return error;
-@@ -1962,7 +2006,7 @@ int vfs_mknod(struct inode *dir, struct 
+@@ -1962,7 +2006,7 @@
        if (error)
                return error;
  
@@ -990663,7 +990554,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -1990,8 +2034,8 @@ static int may_mknod(mode_t mode)
+@@ -1990,8 +2034,8 @@
        }
  }
  
@@ -990674,7 +990565,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error;
        char *tmp;
-@@ -2023,11 +2067,12 @@ asmlinkage long sys_mknodat(int dfd, con
+@@ -2023,11 +2067,12 @@
                        error = vfs_create(nd.path.dentry->d_inode,dentry,mode,&nd);
                        break;
                case S_IFCHR: case S_IFBLK:
@@ -990690,7 +990581,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                        break;
        }
        mnt_drop_write(nd.path.mnt);
-@@ -2041,14 +2086,15 @@ out_unlock:
+@@ -2041,14 +2086,15 @@
        return error;
  }
  
@@ -990709,7 +990600,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
        if (error)
                return error;
-@@ -2057,7 +2103,7 @@ int vfs_mkdir(struct inode *dir, struct 
+@@ -2057,7 +2103,7 @@
                return -EPERM;
  
        mode &= (S_IRWXUGO|S_ISVTX);
@@ -990718,7 +990609,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2068,7 +2114,7 @@ int vfs_mkdir(struct inode *dir, struct 
+@@ -2068,7 +2114,7 @@
        return error;
  }
  
@@ -990727,7 +990618,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error = 0;
        char * tmp;
-@@ -2089,7 +2135,7 @@ asmlinkage long sys_mkdirat(int dfd, con
+@@ -2089,7 +2135,7 @@
        error = mnt_want_write(nd.path.mnt);
        if (error)
                goto out_dput;
@@ -990736,7 +990627,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        mnt_drop_write(nd.path.mnt);
  out_dput:
        dput(dentry);
-@@ -2101,7 +2147,7 @@ out_err:
+@@ -2101,7 +2147,7 @@
        return error;
  }
  
@@ -990745,7 +990636,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        return sys_mkdirat(AT_FDCWD, pathname, mode);
  }
-@@ -2133,7 +2179,7 @@ void dentry_unhash(struct dentry *dentry
+@@ -2133,7 +2179,7 @@
        spin_unlock(&dcache_lock);
  }
  
@@ -990754,7 +990645,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error = may_delete(dir, dentry, 1);
  
-@@ -2143,6 +2189,10 @@ int vfs_rmdir(struct inode *dir, struct 
+@@ -2143,6 +2189,10 @@
        if (!dir->i_op || !dir->i_op->rmdir)
                return -EPERM;
  
@@ -990765,7 +990656,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        DQUOT_INIT(dir);
  
        mutex_lock(&dentry->d_inode->i_mutex);
-@@ -2150,12 +2200,9 @@ int vfs_rmdir(struct inode *dir, struct 
+@@ -2150,12 +2200,9 @@
        if (d_mountpoint(dentry))
                error = -EBUSY;
        else {
@@ -990781,7 +990672,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        }
        mutex_unlock(&dentry->d_inode->i_mutex);
        if (!error) {
-@@ -2196,7 +2243,7 @@ static long do_rmdir(int dfd, const char
+@@ -2196,7 +2243,7 @@
        error = mnt_want_write(nd.path.mnt);
        if (error)
                goto exit3;
@@ -990790,7 +990681,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        mnt_drop_write(nd.path.mnt);
  exit3:
        dput(dentry);
-@@ -2208,12 +2255,12 @@ exit1:
+@@ -2208,12 +2255,12 @@
        return error;
  }
  
@@ -990805,7 +990696,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error = may_delete(dir, dentry, 0);
  
-@@ -2229,7 +2276,7 @@ int vfs_unlink(struct inode *dir, struct
+@@ -2229,7 +2276,7 @@
        if (d_mountpoint(dentry))
                error = -EBUSY;
        else {
@@ -990814,7 +990705,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                if (!error)
                        error = dir->i_op->unlink(dir, dentry);
        }
-@@ -2278,7 +2325,7 @@ static long do_unlinkat(int dfd, const c
+@@ -2278,7 +2325,7 @@
                error = mnt_want_write(nd.path.mnt);
                if (error)
                        goto exit2;
@@ -990823,7 +990714,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
                mnt_drop_write(nd.path.mnt);
        exit2:
                dput(dentry);
-@@ -2297,7 +2344,7 @@ slashes:
+@@ -2297,7 +2344,7 @@
        goto exit2;
  }
  
@@ -990832,7 +990723,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        if ((flag & ~AT_REMOVEDIR) != 0)
                return -EINVAL;
-@@ -2308,14 +2355,15 @@ asmlinkage long sys_unlinkat(int dfd, co
+@@ -2308,14 +2355,15 @@
        return do_unlinkat(dfd, pathname);
  }
  
@@ -990851,7 +990742,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  
        if (error)
                return error;
-@@ -2323,7 +2371,7 @@ int vfs_symlink(struct inode *dir, struc
+@@ -2323,7 +2371,7 @@
        if (!dir->i_op || !dir->i_op->symlink)
                return -EPERM;
  
@@ -990860,7 +990751,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2334,8 +2382,8 @@ int vfs_symlink(struct inode *dir, struc
+@@ -2334,8 +2382,8 @@
        return error;
  }
  
@@ -990871,7 +990762,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error;
        char *from;
-@@ -2359,7 +2407,7 @@ asmlinkage long sys_symlinkat(const char
+@@ -2359,7 +2407,7 @@
        error = mnt_want_write(nd.path.mnt);
        if (error)
                goto out_dput;
@@ -990880,7 +990771,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        mnt_drop_write(nd.path.mnt);
  out_dput:
        dput(dentry);
-@@ -2372,12 +2420,12 @@ out_putname:
+@@ -2372,12 +2420,12 @@
        return error;
  }
  
@@ -990895,7 +990786,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        struct inode *inode = old_dentry->d_inode;
        int error;
-@@ -2385,7 +2433,7 @@ int vfs_link(struct dentry *old_dentry, 
+@@ -2385,7 +2433,7 @@
        if (!inode)
                return -ENOENT;
  
@@ -990904,7 +990795,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2402,7 +2450,8 @@ int vfs_link(struct dentry *old_dentry, 
+@@ -2402,7 +2450,8 @@
        if (S_ISDIR(inode->i_mode))
                return -EPERM;
  
@@ -990914,7 +990805,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2424,9 +2473,8 @@ int vfs_link(struct dentry *old_dentry, 
+@@ -2424,9 +2473,8 @@
   * with linux 2.0, and to avoid hard-linking to directories
   * and other special files.  --ADM
   */
@@ -990926,7 +990817,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        struct dentry *new_dentry;
        struct nameidata nd;
-@@ -2456,7 +2504,9 @@ asmlinkage long sys_linkat(int olddfd, c
+@@ -2456,7 +2504,9 @@
        error = mnt_want_write(nd.path.mnt);
        if (error)
                goto out_dput;
@@ -990937,7 +990828,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        mnt_drop_write(nd.path.mnt);
  out_dput:
        dput(new_dentry);
-@@ -2471,7 +2521,7 @@ out:
+@@ -2471,7 +2521,7 @@
        return error;
  }
  
@@ -990946,7 +990837,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
  }
-@@ -2509,7 +2559,8 @@ asmlinkage long sys_link(const char __us
+@@ -2509,7 +2559,8 @@
   *       locking].
   */
  static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
@@ -990956,7 +990847,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error = 0;
        struct inode *target;
-@@ -2524,7 +2575,8 @@ static int vfs_rename_dir(struct inode *
+@@ -2524,7 +2575,8 @@
                        return error;
        }
  
@@ -990966,7 +990857,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2552,12 +2604,14 @@ static int vfs_rename_dir(struct inode *
+@@ -2552,12 +2604,14 @@
  }
  
  static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
@@ -990983,7 +990874,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (error)
                return error;
  
-@@ -2580,7 +2634,8 @@ static int vfs_rename_other(struct inode
+@@ -2580,7 +2634,8 @@
  }
  
  int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
@@ -990993,7 +990884,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        int error;
        int is_dir = S_ISDIR(old_dentry->d_inode->i_mode);
-@@ -2594,7 +2649,7 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2594,7 +2649,7 @@
                return error;
  
        if (!new_dentry->d_inode)
@@ -991002,7 +990893,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        else
                error = may_delete(new_dir, new_dentry, is_dir);
        if (error)
-@@ -2609,9 +2664,11 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2609,9 +2664,11 @@
        old_name = fsnotify_oldname_init(old_dentry->d_name.name);
  
        if (is_dir)
@@ -991016,7 +990907,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (!error) {
                const char *new_name = old_dentry->d_name.name;
                fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
-@@ -2622,8 +2679,8 @@ int vfs_rename(struct inode *old_dir, st
+@@ -2622,8 +2679,8 @@
        return error;
  }
  
@@ -991027,7 +990918,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        struct dentry *old_dir, *new_dir;
        struct dentry *old_dentry, *new_dentry;
-@@ -2688,8 +2745,8 @@ asmlinkage long sys_renameat(int olddfd,
+@@ -2688,8 +2745,8 @@
        error = mnt_want_write(oldnd.path.mnt);
        if (error)
                goto exit5;
@@ -991038,7 +990929,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        mnt_drop_write(oldnd.path.mnt);
  exit5:
        dput(new_dentry);
-@@ -2707,7 +2764,7 @@ exit:
+@@ -2707,7 +2764,7 @@
        return error;
  }
  
@@ -991047,7 +990938,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  {
        return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname);
  }
-@@ -2797,18 +2854,23 @@ void page_put_link(struct dentry *dentry
+@@ -2797,18 +2854,23 @@
        }
  }
  
@@ -991074,7 +990965,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
        if (err)
                goto fail;
  
-@@ -2832,7 +2894,7 @@ fail:
+@@ -2832,7 +2894,7 @@
  int page_symlink(struct inode *inode, const char *symname, int len)
  {
        return __page_symlink(inode, symname, len,
@@ -991083,7 +990974,7 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  }
  
  const struct inode_operations page_symlink_inode_operations = {
-@@ -2857,6 +2919,7 @@ EXPORT_SYMBOL(page_symlink_inode_operati
+@@ -2857,6 +2919,7 @@
  EXPORT_SYMBOL(path_lookup);
  EXPORT_SYMBOL(vfs_path_lookup);
  EXPORT_SYMBOL(inode_permission);
@@ -991091,10 +990982,10 @@ diff -purN linux-2.6.27/fs/namei.c linux-2.6.27.19-5.1/fs/namei.c
  EXPORT_SYMBOL(vfs_permission);
  EXPORT_SYMBOL(file_permission);
  EXPORT_SYMBOL(unlock_rename);
-diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
---- linux-2.6.27/fs/namespace.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/namespace.c 2009-03-25 16:11:35.000000000 +0000
-@@ -130,10 +130,20 @@ struct vfsmount *alloc_vfsmnt(const char
+diff -r 9608d5473017 fs/namespace.c
+--- a/fs/namespace.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/namespace.c   Wed May 06 16:56:50 2009 +0100
+@@ -130,10 +130,20 @@
                INIT_LIST_HEAD(&mnt->mnt_share);
                INIT_LIST_HEAD(&mnt->mnt_slave_list);
                INIT_LIST_HEAD(&mnt->mnt_slave);
@@ -991116,7 +991007,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  out_free_id:
        mnt_free_id(mnt);
  out_free_cache:
-@@ -170,65 +180,38 @@ int __mnt_is_readonly(struct vfsmount *m
+@@ -170,65 +180,38 @@
  }
  EXPORT_SYMBOL_GPL(__mnt_is_readonly);
  
@@ -991143,28 +991034,31 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
 -static int __init init_mnt_writers(void)
 +static inline void dec_mnt_writers(struct vfsmount *mnt)
  {
--      int cpu;
--      for_each_possible_cpu(cpu) {
--              struct mnt_writer *writer = &per_cpu(mnt_writers, cpu);
--              spin_lock_init(&writer->lock);
--              lockdep_set_class(&writer->lock, &writer->lock_class);
--              writer->count = 0;
--      }
--      return 0;
 +#ifdef CONFIG_SMP
 +      (*per_cpu_ptr(mnt->mnt_writers, smp_processor_id()))--;
 +#else
 +      mnt->mnt_writers--;
 +#endif
- }
--fs_initcall(init_mnt_writers);
--static void unlock_mnt_writers(void)
++}
++
 +static unsigned int count_mnt_writers(struct vfsmount *mnt)
- {
++{
 +#ifdef CONFIG_SMP
 +      unsigned int count = 0;
        int cpu;
+-      for_each_possible_cpu(cpu) {
+-              struct mnt_writer *writer = &per_cpu(mnt_writers, cpu);
+-              spin_lock_init(&writer->lock);
+-              lockdep_set_class(&writer->lock, &writer->lock_class);
+-              writer->count = 0;
+-      }
+-      return 0;
+-}
+-fs_initcall(init_mnt_writers);
+-
+-static void unlock_mnt_writers(void)
+-{
+-      int cpu;
 -      struct mnt_writer *cpu_writer;
  
        for_each_possible_cpu(cpu) {
@@ -991204,7 +991098,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  }
  
  /*
-@@ -252,74 +235,71 @@ static inline void use_cpu_writer_for_mo
+@@ -252,74 +235,71 @@
  int mnt_want_write(struct vfsmount *mnt)
  {
        int ret = 0;
@@ -991260,35 +991154,43 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  {
 -      int cpu;
 -      struct mnt_writer *cpu_writer;
--
++      preempt_disable();
++      inc_mnt_writers(mnt);
++      preempt_enable();
++}
++EXPORT_SYMBOL_GPL(mnt_clone_write);
 -      for_each_possible_cpu(cpu) {
 -              cpu_writer = &per_cpu(mnt_writers, cpu);
 -              spin_lock(&cpu_writer->lock);
 -              __clear_mnt_count(cpu_writer);
 -              cpu_writer->mnt = NULL;
--      }
-+      preempt_disable();
-+      inc_mnt_writers(mnt);
-+      preempt_enable();
++/**
++ * mnt_want_write_file - get write access to a file's mount
++ * @file: the file who's mount on which to take a write
++ *
++ * This is like mnt_want_write, but it takes a file and can
++ * do some optimisations if the file is open for write already
++ */
++int mnt_want_write_file(struct vfsmount *mnt, struct file *file)
++{
++      if (!(file->f_mode & FMODE_WRITE))
++              return mnt_want_write(mnt);
++      else {
++              mnt_clone_write(mnt);
++              return 0;
+       }
  }
-+EXPORT_SYMBOL_GPL(mnt_clone_write);
+-
 -/*
 - * These per-cpu write counts are not guaranteed to have
 - * matched increments and decrements on any given cpu.
 - * A file open()ed for write on one cpu and close()d on
 - * another cpu will imbalance this count.  Make sure it
 - * does not get too far out of whack.
-+/**
-+ * mnt_want_write_file - get write access to a file's mount
-+ * @file: the file who's mount on which to take a write
-+ *
-+ * This is like mnt_want_write, but it takes a file and can
-+ * do some optimisations if the file is open for write already
-  */
+- */
 -static void handle_write_count_underflow(struct vfsmount *mnt)
-+int mnt_want_write_file(struct vfsmount *mnt, struct file *file)
- {
+-{
 -      if (atomic_read(&mnt->__mnt_writers) >=
 -          MNT_WRITER_UNDERFLOW_LIMIT)
 -              return;
@@ -991314,20 +991216,15 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
 -                      mnt, atomic_read(&mnt->__mnt_writers));
 -              /* use the flag to keep the dmesg spam down */
 -              mnt->mnt_flags |= MNT_IMBALANCED_WRITE_COUNT;
-+      if (!(file->f_mode & FMODE_WRITE))
-+              return mnt_want_write(mnt);
-+      else {
-+              mnt_clone_write(mnt);
-+              return 0;
-       }
+-      }
 -      spin_unlock(&vfsmount_lock);
 -      unlock_mnt_writers();
- }
+-}
 +EXPORT_SYMBOL_GPL(mnt_want_write_file);
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -331,37 +311,9 @@ static void handle_write_count_underflow
+@@ -331,37 +311,9 @@
   */
  void mnt_drop_write(struct vfsmount *mnt)
  {
@@ -991368,7 +991265,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  }
  EXPORT_SYMBOL_GPL(mnt_drop_write);
  
-@@ -369,24 +321,34 @@ static int mnt_make_readonly(struct vfsm
+@@ -369,24 +321,34 @@
  {
        int ret = 0;
  
@@ -991400,20 +991297,20 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
 -      spin_lock(&vfsmount_lock);
        if (!ret)
                mnt->mnt_flags |= MNT_READONLY;
--      spin_unlock(&vfsmount_lock);
- out:
--      unlock_mnt_writers();
++out:
 +      /*
 +       * MNT_READONLY must become visible before ~MNT_WRITE_HOLD, so writers
 +       * that become unheld will see MNT_READONLY.
 +       */
 +      smp_wmb();
 +      mnt->mnt_flags &= ~MNT_WRITE_HOLD;
-+      spin_unlock(&vfsmount_lock);
+       spin_unlock(&vfsmount_lock);
+-out:
+-      unlock_mnt_writers();
        return ret;
  }
  
-@@ -410,6 +372,9 @@ void free_vfsmnt(struct vfsmount *mnt)
+@@ -410,6 +372,9 @@
  {
        kfree(mnt->mnt_devname);
        mnt_free_id(mnt);
@@ -991423,13 +991320,13 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
        kmem_cache_free(mnt_cache, mnt);
  }
  
-@@ -604,36 +569,14 @@ static struct vfsmount *clone_mnt(struct
+@@ -604,36 +569,14 @@
  
  static inline void __mntput(struct vfsmount *mnt)
  {
 -      int cpu;
        struct super_block *sb = mnt->mnt_sb;
-       /*
+-      /*
 -       * We don't have to hold all of the locks at the
 -       * same time here because we know that we're the
 -       * last reference to mnt and that no new writers
@@ -991450,7 +991347,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
 -              cpu_writer->mnt = NULL;
 -              spin_unlock(&cpu_writer->lock);
 -      }
--      /*
+       /*
         * This probably indicates that somebody messed
         * up a mnt_want/drop_write() pair.  If this
         * happens, the filesystem was probably unable
@@ -991461,7 +991358,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
        dput(mnt->mnt_root);
        free_vfsmnt(mnt);
        deactivate_super(sb);
-@@ -1128,7 +1071,7 @@ static int do_umount(struct vfsmount *mn
+@@ -1128,7 +1071,7 @@
   * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
   */
  
@@ -991470,7 +991367,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  {
        struct path path;
        int retval;
-@@ -1160,7 +1103,7 @@ out:
+@@ -1160,7 +1103,7 @@
  /*
   *    The 2.0 compatible umount. No flags.
   */
@@ -991479,7 +991376,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  {
        return sys_umount(name, 0);
  }
-@@ -1553,8 +1496,13 @@ static noinline int do_remount(struct na
+@@ -1553,8 +1496,13 @@
        if (!err)
                nd->path.mnt->mnt_flags = mnt_flags;
        up_write(&sb->s_umount);
@@ -991494,7 +991391,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
        return err;
  }
  
-@@ -2048,9 +1996,8 @@ struct mnt_namespace *copy_mnt_ns(unsign
+@@ -2048,9 +1996,8 @@
        return new_ns;
  }
  
@@ -991506,7 +991403,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  {
        int retval;
        unsigned long data_page;
-@@ -2175,8 +2122,8 @@ static void chroot_fs_refs(struct path *
+@@ -2175,8 +2122,8 @@
   *    though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
   *    first.
   */
@@ -991517,7 +991414,7 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
  {
        struct vfsmount *tmp;
        struct path new, old, parent_path, root_parent, root;
-@@ -2352,3 +2299,33 @@ void __put_mnt_ns(struct mnt_namespace *
+@@ -2352,3 +2299,33 @@
        release_mounts(&umount_list);
        kfree(ns);
  }
@@ -991551,10 +991448,10 @@ diff -purN linux-2.6.27/fs/namespace.c linux-2.6.27.19-5.1/fs/namespace.c
 +      return res;
 +}
 +EXPORT_SYMBOL(d_namespace_path);
-diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
---- linux-2.6.27/fs/nfs/file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/file.c  2009-03-25 16:11:39.000000000 +0000
-@@ -351,7 +351,7 @@ static int nfs_write_begin(struct file *
+diff -r 9608d5473017 fs/nfs/file.c
+--- a/fs/nfs/file.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/file.c    Wed May 06 16:56:50 2009 +0100
+@@ -351,7 +351,7 @@
                file->f_path.dentry->d_name.name,
                mapping->host->i_ino, len, (long long) pos);
  
@@ -991563,7 +991460,7 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
        if (!page)
                return -ENOMEM;
        *pagep = page;
-@@ -413,7 +413,7 @@ static void nfs_invalidate_page(struct p
+@@ -413,7 +413,7 @@
        if (offset != 0)
                return;
        /* Cancel any unstarted writes on this page */
@@ -991572,7 +991469,7 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
  }
  
  static int nfs_release_page(struct page *page, gfp_t gfp)
-@@ -426,7 +426,7 @@ static int nfs_release_page(struct page 
+@@ -426,13 +426,25 @@
  
  static int nfs_launder_page(struct page *page)
  {
@@ -991581,10 +991478,10 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
  
        dfprintk(PAGECACHE, "NFS: launder_page(%ld, %llu)\n",
                inode->i_ino, (long long)page_offset(page));
-@@ -434,6 +434,18 @@ static int nfs_launder_page(struct page 
        return nfs_wb_page(inode, page);
  }
++
 +#ifdef CONFIG_NFS_SWAP
 +static int nfs_swapon(struct file *file)
 +{
@@ -991596,11 +991493,10 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
 +      return xs_swapper(NFS_CLIENT(file->f_mapping->host)->cl_xprt, 0);
 +}
 +#endif
-+
  const struct address_space_operations nfs_file_aops = {
        .readpage = nfs_readpage,
-       .readpages = nfs_readpages,
-@@ -446,6 +458,12 @@ const struct address_space_operations nf
+@@ -446,6 +458,12 @@
        .releasepage = nfs_release_page,
        .direct_IO = nfs_direct_IO,
        .launder_page = nfs_launder_page,
@@ -991613,7 +991509,7 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
  };
  
  static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page)
-@@ -462,7 +480,7 @@ static int nfs_vm_page_mkwrite(struct vm
+@@ -462,7 +480,7 @@
                (long long)page_offset(page));
  
        lock_page(page);
@@ -991622,10 +991518,10 @@ diff -purN linux-2.6.27/fs/nfs/file.c linux-2.6.27.19-5.1/fs/nfs/file.c
        if (mapping != dentry->d_inode->i_mapping)
                goto out_unlock;
  
-diff -purN linux-2.6.27/fs/nfs/inode.c linux-2.6.27.19-5.1/fs/nfs/inode.c
---- linux-2.6.27/fs/nfs/inode.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/inode.c 2009-03-25 16:11:38.000000000 +0000
-@@ -824,6 +824,12 @@ int nfs_revalidate_mapping_nolock(struct
+diff -r 9608d5473017 fs/nfs/inode.c
+--- a/fs/nfs/inode.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/inode.c   Wed May 06 16:56:50 2009 +0100
+@@ -824,6 +824,12 @@
        struct nfs_inode *nfsi = NFS_I(inode);
        int ret = 0;
  
@@ -991638,10 +991534,10 @@ diff -purN linux-2.6.27/fs/nfs/inode.c linux-2.6.27.19-5.1/fs/nfs/inode.c
        if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)
                        || nfs_attribute_timeout(inode) || NFS_STALE(inode)) {
                ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
-diff -purN linux-2.6.27/fs/nfs/internal.h linux-2.6.27.19-5.1/fs/nfs/internal.h
---- linux-2.6.27/fs/nfs/internal.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/internal.h      2009-03-25 16:11:38.000000000 +0000
-@@ -253,13 +253,14 @@ void nfs_super_set_maxbytes(struct super
+diff -r 9608d5473017 fs/nfs/internal.h
+--- a/fs/nfs/internal.h        Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/internal.h        Wed May 06 16:56:50 2009 +0100
+@@ -253,13 +253,14 @@
  static inline
  unsigned int nfs_page_length(struct page *page)
  {
@@ -991659,10 +991555,10 @@ diff -purN linux-2.6.27/fs/nfs/internal.h linux-2.6.27.19-5.1/fs/nfs/internal.h
                        return ((i_size - 1) & ~PAGE_CACHE_MASK) + 1;
        }
        return 0;
-diff -purN linux-2.6.27/fs/nfs/pagelist.c linux-2.6.27.19-5.1/fs/nfs/pagelist.c
---- linux-2.6.27/fs/nfs/pagelist.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/pagelist.c      2009-03-25 16:11:38.000000000 +0000
-@@ -27,7 +27,7 @@ static inline struct nfs_page *
+diff -r 9608d5473017 fs/nfs/pagelist.c
+--- a/fs/nfs/pagelist.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/pagelist.c        Wed May 06 16:56:50 2009 +0100
+@@ -27,7 +27,7 @@
  nfs_page_alloc(void)
  {
        struct nfs_page *p;
@@ -991671,7 +991567,7 @@ diff -purN linux-2.6.27/fs/nfs/pagelist.c linux-2.6.27.19-5.1/fs/nfs/pagelist.c
        if (p) {
                memset(p, 0, sizeof(*p));
                INIT_LIST_HEAD(&p->wb_list);
-@@ -76,11 +76,11 @@ nfs_create_request(struct nfs_open_conte
+@@ -76,11 +76,11 @@
         * update_nfs_request below if the region is not locked. */
        req->wb_page    = page;
        atomic_set(&req->wb_complete, 0);
@@ -991685,7 +991581,7 @@ diff -purN linux-2.6.27/fs/nfs/pagelist.c linux-2.6.27.19-5.1/fs/nfs/pagelist.c
        req->wb_offset  = offset;
        req->wb_pgbase  = offset;
        req->wb_bytes   = count;
-@@ -376,7 +376,7 @@ void nfs_pageio_cond_complete(struct nfs
+@@ -376,7 +376,7 @@
   * nfs_scan_list - Scan a list for matching requests
   * @nfsi: NFS inode
   * @dst: Destination list
@@ -991694,10 +991590,10 @@ diff -purN linux-2.6.27/fs/nfs/pagelist.c linux-2.6.27.19-5.1/fs/nfs/pagelist.c
   * @npages: idx_start + npages sets the upper bound to scan.
   * @tag: tag to scan for
   *
-diff -purN linux-2.6.27/fs/nfs/read.c linux-2.6.27.19-5.1/fs/nfs/read.c
---- linux-2.6.27/fs/nfs/read.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/read.c  2009-03-25 16:11:38.000000000 +0000
-@@ -477,11 +477,11 @@ static const struct rpc_call_ops nfs_rea
+diff -r 9608d5473017 fs/nfs/read.c
+--- a/fs/nfs/read.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/read.c    Wed May 06 16:56:50 2009 +0100
+@@ -477,11 +477,11 @@
  int nfs_readpage(struct file *file, struct page *page)
  {
        struct nfs_open_context *ctx;
@@ -991711,7 +991607,7 @@ diff -purN linux-2.6.27/fs/nfs/read.c linux-2.6.27.19-5.1/fs/nfs/read.c
        nfs_inc_stats(inode, NFSIOS_VFSREADPAGE);
        nfs_add_stats(inode, NFSIOS_READPAGES, 1);
  
-@@ -528,17 +528,11 @@ static int
+@@ -528,16 +528,10 @@
  readpage_async_filler(void *data, struct page *page)
  {
        struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
@@ -991720,20 +991616,19 @@ diff -purN linux-2.6.27/fs/nfs/read.c linux-2.6.27.19-5.1/fs/nfs/read.c
        struct nfs_page *new;
        unsigned int len;
        int error;
+-
 -      error = nfs_wb_page(inode, page);
 -      if (error)
 -              goto out_unlock;
 -      if (PageUptodate(page))
 -              goto out_unlock;
--
        len = nfs_page_length(page);
        if (len == 0)
-               return nfs_return_empty_page(page);
-diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
---- linux-2.6.27/fs/nfs/write.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs/write.c 2009-03-25 16:11:38.000000000 +0000
-@@ -47,7 +47,7 @@ static mempool_t *nfs_commit_mempool;
+diff -r 9608d5473017 fs/nfs/write.c
+--- a/fs/nfs/write.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfs/write.c   Wed May 06 16:56:50 2009 +0100
+@@ -47,7 +47,7 @@
  
  struct nfs_write_data *nfs_commitdata_alloc(void)
  {
@@ -991742,7 +991637,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  
        if (p) {
                memset(p, 0, sizeof(*p));
-@@ -65,7 +65,7 @@ void nfs_commit_free(struct nfs_write_da
+@@ -65,7 +65,7 @@
  
  struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
  {
@@ -991751,7 +991646,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  
        if (p) {
                memset(p, 0, sizeof(*p));
-@@ -74,7 +74,7 @@ struct nfs_write_data *nfs_writedata_all
+@@ -74,7 +74,7 @@
                if (pagecount <= ARRAY_SIZE(p->page_array))
                        p->pagevec = p->page_array;
                else {
@@ -991760,7 +991655,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                        if (!p->pagevec) {
                                mempool_free(p, nfs_wdata_mempool);
                                p = NULL;
-@@ -106,25 +106,62 @@ static void nfs_context_set_write_error(
+@@ -106,25 +106,62 @@
        set_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags);
  }
  
@@ -991783,8 +991678,8 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
 +              kref_get(&req->wb_kref);
 +
        return req;
- }
++}
++
 +static inline struct nfs_page *
 +nfs_page_find_request_locked(struct nfs_inode *nfsi, struct page *page)
 +{
@@ -991816,8 +991711,8 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
 +              return __nfs_page_has_request(page);
 +
 +      return 0;
-+}
-+
+ }
  static struct nfs_page *nfs_page_find_request(struct page *page)
  {
 -      struct inode *inode = page->mapping->host;
@@ -991830,7 +991725,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        spin_unlock(&inode->i_lock);
        return req;
  }
-@@ -132,16 +169,16 @@ static struct nfs_page *nfs_page_find_re
+@@ -132,16 +169,16 @@
  /* Adjust the file length if we're writing beyond the end */
  static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int count)
  {
@@ -991850,7 +991745,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        if (i_size >= end)
                goto out;
        i_size_write(inode, end);
-@@ -154,7 +191,7 @@ out:
+@@ -154,7 +191,7 @@
  static void nfs_set_pageerror(struct page *page)
  {
        SetPageError(page);
@@ -991859,7 +991754,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  }
  
  /* We can set the PG_uptodate flag if we see that a write request
-@@ -195,7 +232,7 @@ static int nfs_set_page_writeback(struct
+@@ -195,7 +232,7 @@
        int ret = test_set_page_writeback(page);
  
        if (!ret) {
@@ -991868,7 +991763,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                struct nfs_server *nfss = NFS_SERVER(inode);
  
                if (atomic_long_inc_return(&nfss->writeback) >
-@@ -207,7 +244,7 @@ static int nfs_set_page_writeback(struct
+@@ -207,7 +244,7 @@
  
  static void nfs_end_page_writeback(struct page *page)
  {
@@ -991877,7 +991772,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        struct nfs_server *nfss = NFS_SERVER(inode);
  
        end_page_writeback(page);
-@@ -222,13 +259,13 @@ static void nfs_end_page_writeback(struc
+@@ -222,13 +259,13 @@
  static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
                                struct page *page)
  {
@@ -991893,7 +991788,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                if (req == NULL) {
                        spin_unlock(&inode->i_lock);
                        return 0;
-@@ -247,9 +284,12 @@ static int nfs_page_async_flush(struct n
+@@ -247,9 +284,12 @@
                        return ret;
                spin_lock(&inode->i_lock);
        }
@@ -991908,7 +991803,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        }
        if (nfs_set_page_writeback(page) != 0) {
                spin_unlock(&inode->i_lock);
-@@ -265,12 +305,12 @@ static int nfs_page_async_flush(struct n
+@@ -265,12 +305,12 @@
  
  static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, struct nfs_pageio_descriptor *pgio)
  {
@@ -991923,7 +991818,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        return nfs_page_async_flush(pgio, page);
  }
  
-@@ -282,7 +322,7 @@ static int nfs_writepage_locked(struct p
+@@ -282,7 +322,7 @@
        struct nfs_pageio_descriptor pgio;
        int err;
  
@@ -991932,10 +991827,12 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        err = nfs_do_writepage(page, wbc, &pgio);
        nfs_pageio_complete(&pgio);
        if (err < 0)
-@@ -301,6 +341,28 @@ int nfs_writepage(struct page *page, str
+@@ -299,6 +339,28 @@
+       ret = nfs_writepage_locked(page, wbc);
+       unlock_page(page);
        return ret;
- }
++}
++
 +static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
 +              unsigned int offset, unsigned int count);
 +
@@ -991956,12 +991853,10 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
 +out:
 +      unlock_page(page);
 +      return status;
-+}
-+
+ }
  static int nfs_writepages_callback(struct page *page, struct writeback_control *wbc, void *data)
- {
-       int ret;
-@@ -351,8 +413,14 @@ static int nfs_inode_add_request(struct 
+@@ -351,8 +413,14 @@
                if (nfs_have_delegation(inode, FMODE_WRITE))
                        nfsi->change_attr++;
        }
@@ -991978,7 +991873,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        nfsi->npages++;
        kref_get(&req->wb_kref);
        radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index,
-@@ -374,8 +442,10 @@ static void nfs_inode_remove_request(str
+@@ -374,8 +442,10 @@
        BUG_ON (!NFS_WBACK_BUSY(req));
  
        spin_lock(&inode->i_lock);
@@ -991991,7 +991886,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index);
        nfsi->npages--;
        if (!nfsi->npages) {
-@@ -393,6 +463,19 @@ nfs_mark_request_dirty(struct nfs_page *
+@@ -393,6 +463,19 @@
        __set_page_dirty_nobuffers(req->wb_page);
  }
  
@@ -992011,7 +991906,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
  /*
   * Add a request to the inode's commit list.
-@@ -405,29 +488,17 @@ nfs_mark_request_commit(struct nfs_page 
+@@ -405,27 +488,15 @@
  
        spin_lock(&inode->i_lock);
        nfsi->ncommit++;
@@ -992026,8 +991921,8 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
 +      inc_bdi_stat(page_file_mapping(req->wb_page)->backing_dev_info,
 +                      BDI_RECLAIMABLE);
        __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
- }
+-}
+-
 -static int
 -nfs_clear_request_commit(struct nfs_page *req)
 -{
@@ -992039,12 +991934,10 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
 -              return 1;
 -      }
 -      return 0;
--}
--
+ }
  static inline
- int nfs_write_need_commit(struct nfs_write_data *data)
- {
-@@ -437,7 +508,7 @@ int nfs_write_need_commit(struct nfs_wri
+@@ -437,7 +508,7 @@
  static inline
  int nfs_reschedule_unstable_write(struct nfs_page *req)
  {
@@ -992053,20 +991946,20 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                nfs_mark_request_commit(req);
                return 1;
        }
-@@ -453,12 +524,6 @@ nfs_mark_request_commit(struct nfs_page 
+@@ -451,12 +522,6 @@
+ static inline void
+ nfs_mark_request_commit(struct nfs_page *req)
  {
- }
+-}
+-
 -static inline int
 -nfs_clear_request_commit(struct nfs_page *req)
 -{
 -      return 0;
--}
--
+ }
  static inline
- int nfs_write_need_commit(struct nfs_write_data *data)
- {
-@@ -516,8 +581,11 @@ static void nfs_cancel_commit_list(struc
+@@ -516,8 +581,11 @@
  
        while(!list_empty(head)) {
                req = nfs_list_entry(head->next);
@@ -992079,7 +991972,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                nfs_inode_remove_request(req);
                nfs_unlock_request(req);
        }
-@@ -528,7 +596,7 @@ static void nfs_cancel_commit_list(struc
+@@ -528,7 +596,7 @@
   * nfs_scan_commit - Scan an inode for commit requests
   * @inode: NFS inode to scan
   * @dst: destination list
@@ -992088,7 +991981,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
   * @npages: idx_start + npages sets the upper bound to scan.
   *
   * Moves requests from the inode's 'commit' request list.
-@@ -578,7 +646,7 @@ static struct nfs_page *nfs_try_to_updat
+@@ -578,7 +646,7 @@
        spin_lock(&inode->i_lock);
  
        for (;;) {
@@ -992097,7 +991990,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                if (req == NULL)
                        goto out_unlock;
  
-@@ -589,7 +657,8 @@ static struct nfs_page *nfs_try_to_updat
+@@ -589,7 +657,8 @@
                 * Note: nfs_flush_incompatible() will already
                 * have flushed out requests having wrong owners.
                 */
@@ -992107,18 +992000,18 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                    || end < req->wb_offset)
                        goto out_flushme;
  
-@@ -605,10 +674,6 @@ static struct nfs_page *nfs_try_to_updat
+@@ -604,10 +673,6 @@
+                       goto out_err;
                spin_lock(&inode->i_lock);
        }
+-
 -      if (nfs_clear_request_commit(req))
 -              radix_tree_tag_clear(&NFS_I(inode)->nfs_page_tree,
 -                              req->wb_index, NFS_PAGE_TAG_COMMIT);
--
        /* Okay, the request matches. Update the region */
        if (offset < req->wb_offset) {
-               req->wb_offset = offset;
-@@ -639,7 +704,7 @@ out_err:
+@@ -639,7 +704,7 @@
  static struct nfs_page * nfs_setup_write_request(struct nfs_open_context* ctx,
                struct page *page, unsigned int offset, unsigned int bytes)
  {
@@ -992127,7 +992020,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        struct nfs_page *req;
        int error;
  
-@@ -690,11 +755,12 @@ int nfs_flush_incompatible(struct file *
+@@ -690,11 +755,12 @@
                req = nfs_page_find_request(page);
                if (req == NULL)
                        return 0;
@@ -992142,7 +992035,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        } while (status == 0);
        return status;
  }
-@@ -720,7 +786,7 @@ int nfs_updatepage(struct file *file, st
+@@ -720,7 +786,7 @@
                unsigned int offset, unsigned int count)
  {
        struct nfs_open_context *ctx = nfs_file_open_context(file);
@@ -992151,7 +992044,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
        int             status = 0;
  
        nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE);
-@@ -728,7 +794,7 @@ int nfs_updatepage(struct file *file, st
+@@ -728,7 +794,7 @@
        dprintk("NFS:       nfs_updatepage(%s/%s %d@%lld)\n",
                file->f_path.dentry->d_parent->d_name.name,
                file->f_path.dentry->d_name.name, count,
@@ -992160,7 +992053,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  
        /* If we're not using byte range locks, and we know the page
         * is up to date, it may be more efficient to extend the write
-@@ -1003,7 +1069,7 @@ static void nfs_writeback_release_partia
+@@ -1003,7 +1069,7 @@
        }
  
        if (nfs_write_need_commit(data)) {
@@ -992169,7 +992062,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  
                spin_lock(&inode->i_lock);
                if (test_bit(PG_NEED_RESCHED, &req->wb_flags)) {
-@@ -1264,7 +1330,7 @@ nfs_commit_list(struct inode *inode, str
+@@ -1264,7 +1330,7 @@
                nfs_list_remove_request(req);
                nfs_mark_request_commit(req);
                dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
@@ -992178,7 +992071,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                                BDI_RECLAIMABLE);
                nfs_clear_page_tag_locked(req);
        }
-@@ -1295,7 +1361,10 @@ static void nfs_commit_release(void *cal
+@@ -1295,7 +1361,10 @@
        while (!list_empty(&data->pages)) {
                req = nfs_list_entry(data->pages.next);
                nfs_list_remove_request(req);
@@ -992190,7 +992083,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  
                dprintk("NFS:       commit (%s/%lld %d@%lld)",
                        req->wb_context->path.dentry->d_inode->i_sb->s_id,
-@@ -1455,10 +1524,10 @@ int nfs_wb_nocommit(struct inode *inode)
+@@ -1455,10 +1524,10 @@
  int nfs_wb_page_cancel(struct inode *inode, struct page *page)
  {
        struct nfs_page *req;
@@ -992203,7 +992096,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                .sync_mode = WB_SYNC_ALL,
                .nr_to_write = LONG_MAX,
                .range_start = range_start,
-@@ -1471,7 +1540,7 @@ int nfs_wb_page_cancel(struct inode *ino
+@@ -1471,7 +1540,7 @@
                req = nfs_page_find_request(page);
                if (req == NULL)
                        goto out;
@@ -992212,7 +992105,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                        nfs_release_request(req);
                        break;
                }
-@@ -1489,9 +1558,9 @@ int nfs_wb_page_cancel(struct inode *ino
+@@ -1489,9 +1558,9 @@
                if (ret < 0)
                        goto out;
        }
@@ -992224,7 +992117,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
  out:
        return ret;
  }
-@@ -1499,10 +1568,10 @@ out:
+@@ -1499,10 +1568,10 @@
  static int nfs_wb_page_priority(struct inode *inode, struct page *page,
                                int how)
  {
@@ -992237,7 +992130,7 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                .sync_mode = WB_SYNC_ALL,
                .nr_to_write = LONG_MAX,
                .range_start = range_start,
-@@ -1517,7 +1586,7 @@ static int nfs_wb_page_priority(struct i
+@@ -1517,7 +1586,7 @@
                                goto out_error;
                } else if (!PagePrivate(page))
                        break;
@@ -992246,9 +992139,9 @@ diff -purN linux-2.6.27/fs/nfs/write.c linux-2.6.27.19-5.1/fs/nfs/write.c
                if (ret < 0)
                        goto out_error;
        } while (PagePrivate(page));
-diff -purN linux-2.6.27/fs/nfs4acl_base.c linux-2.6.27.19-5.1/fs/nfs4acl_base.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_base.c      2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_base.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_base.c        Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,573 @@
 +/*
 + * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
@@ -992823,9 +992716,9 @@ diff -purN linux-2.6.27/fs/nfs4acl_base.c linux-2.6.27.19-5.1/fs/nfs4acl_base.c
 +      return acl;
 +}
 +EXPORT_SYMBOL_GPL(nfs4acl_inherit);
-diff -purN linux-2.6.27/fs/nfs4acl_compat.c linux-2.6.27.19-5.1/fs/nfs4acl_compat.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_compat.c    2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_compat.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_compat.c      Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,757 @@
 +/*
 + * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
@@ -993584,9 +993477,9 @@ diff -purN linux-2.6.27/fs/nfs4acl_compat.c linux-2.6.27.19-5.1/fs/nfs4acl_compa
 +out:
 +      return retval;
 +}
-diff -purN linux-2.6.27/fs/nfs4acl_xattr.c linux-2.6.27.19-5.1/fs/nfs4acl_xattr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfs4acl_xattr.c     2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/nfs4acl_xattr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/nfs4acl_xattr.c       Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,146 @@
 +/*
 + * Copyright (C) 2006 Andreas Gruenbacher <a.gruenbacher@computer.org>
@@ -993734,10 +993627,10 @@ diff -purN linux-2.6.27/fs/nfs4acl_xattr.c linux-2.6.27.19-5.1/fs/nfs4acl_xattr.
 +      }
 +}
 +EXPORT_SYMBOL_GPL(nfs4acl_to_xattr);
-diff -purN linux-2.6.27/fs/nfsctl.c linux-2.6.27.19-5.1/fs/nfsctl.c
---- linux-2.6.27/fs/nfsctl.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsctl.c    2009-03-25 16:11:35.000000000 +0000
-@@ -82,8 +82,8 @@ static struct {
+diff -r 9608d5473017 fs/nfsctl.c
+--- a/fs/nfsctl.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsctl.c      Wed May 06 16:56:50 2009 +0100
+@@ -82,8 +82,8 @@
        },
  };
  
@@ -993748,10 +993641,10 @@ diff -purN linux-2.6.27/fs/nfsctl.c linux-2.6.27.19-5.1/fs/nfsctl.c
  {
        struct file *file;
        void __user *p = &arg->u;
-diff -purN linux-2.6.27/fs/nfsd/nfs4recover.c linux-2.6.27.19-5.1/fs/nfsd/nfs4recover.c
---- linux-2.6.27/fs/nfsd/nfs4recover.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4recover.c  2009-03-25 16:11:39.000000000 +0000
-@@ -158,7 +158,8 @@ nfsd4_create_clid_dir(struct nfs4_client
+diff -r 9608d5473017 fs/nfsd/nfs4recover.c
+--- a/fs/nfsd/nfs4recover.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4recover.c    Wed May 06 16:56:50 2009 +0100
+@@ -158,7 +158,8 @@
        status = mnt_want_write(rec_dir.path.mnt);
        if (status)
                goto out_put;
@@ -993761,7 +993654,7 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4recover.c linux-2.6.27.19-5.1/fs/nfsd/nfs4re
        mnt_drop_write(rec_dir.path.mnt);
  out_put:
        dput(dentry);
-@@ -263,7 +264,7 @@ nfsd4_remove_clid_file(struct dentry *di
+@@ -263,7 +264,7 @@
                return -EINVAL;
        }
        mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
@@ -993770,7 +993663,7 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4recover.c linux-2.6.27.19-5.1/fs/nfsd/nfs4re
        mutex_unlock(&dir->d_inode->i_mutex);
        return status;
  }
-@@ -278,7 +279,7 @@ nfsd4_clear_clid_dir(struct dentry *dir,
+@@ -278,7 +279,7 @@
         * a kernel from the future.... */
        nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
        mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
@@ -993779,10 +993672,10 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4recover.c linux-2.6.27.19-5.1/fs/nfsd/nfs4re
        mutex_unlock(&dir->d_inode->i_mutex);
        return status;
  }
-diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4state.c
---- linux-2.6.27/fs/nfsd/nfs4state.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4state.c    2009-03-25 16:11:39.000000000 +0000
-@@ -2767,6 +2767,25 @@ out:
+diff -r 9608d5473017 fs/nfsd/nfs4state.c
+--- a/fs/nfsd/nfs4state.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4state.c      Wed May 06 16:56:50 2009 +0100
+@@ -2767,6 +2767,25 @@
  }
  
  /*
@@ -993808,7 +993701,7 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4stat
   * LOCKT operation
   */
  __be32
-@@ -2774,7 +2793,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2774,7 +2793,6 @@
            struct nfsd4_lockt *lockt)
  {
        struct inode *inode;
@@ -993816,7 +993709,7 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4stat
        struct file_lock file_lock;
        int error;
        __be32 status;
-@@ -2822,7 +2840,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2822,7 +2840,6 @@
                file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner;
        file_lock.fl_pid = current->tgid;
        file_lock.fl_flags = FL_POSIX;
@@ -993824,7 +993717,7 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4stat
  
        file_lock.fl_start = lockt->lt_offset;
        if ((lockt->lt_length == ~(u64)0) || LOFF_OVERFLOW(lockt->lt_offset, lockt->lt_length))
-@@ -2832,16 +2849,8 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru
+@@ -2832,16 +2849,8 @@
  
        nfs4_transform_lock_offset(&file_lock);
  
@@ -993842,10 +993735,10 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4state.c linux-2.6.27.19-5.1/fs/nfsd/nfs4stat
        if (error) {
                status = nfserrno(error);
                goto out;
-diff -purN linux-2.6.27/fs/nfsd/nfs4xdr.c linux-2.6.27.19-5.1/fs/nfsd/nfs4xdr.c
---- linux-2.6.27/fs/nfsd/nfs4xdr.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/nfs4xdr.c      2009-03-25 16:11:39.000000000 +0000
-@@ -1446,7 +1446,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
+diff -r 9608d5473017 fs/nfsd/nfs4xdr.c
+--- a/fs/nfsd/nfs4xdr.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/nfs4xdr.c        Wed May 06 16:56:50 2009 +0100
+@@ -1446,7 +1446,7 @@
        }
        if (bmval0 & (FATTR4_WORD0_ACL | FATTR4_WORD0_ACLSUPPORT
                        | FATTR4_WORD0_SUPPORTED_ATTRS)) {
@@ -993854,10 +993747,10 @@ diff -purN linux-2.6.27/fs/nfsd/nfs4xdr.c linux-2.6.27.19-5.1/fs/nfsd/nfs4xdr.c
                aclsupport = (err == 0);
                if (bmval0 & FATTR4_WORD0_ACL) {
                        if (err == -EOPNOTSUPP)
-diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
---- linux-2.6.27/fs/nfsd/vfs.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/nfsd/vfs.c  2009-03-25 16:11:39.000000000 +0000
-@@ -358,6 +358,15 @@ nfsd_setattr(struct svc_rqst *rqstp, str
+diff -r 9608d5473017 fs/nfsd/vfs.c
+--- a/fs/nfsd/vfs.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/nfsd/vfs.c    Wed May 06 16:56:50 2009 +0100
+@@ -358,6 +358,15 @@
                        goto out_nfserr;
                }
                DQUOT_INIT(inode);
@@ -993873,7 +993766,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        }
  
        /* sanitize the mode change */
-@@ -388,7 +397,10 @@ nfsd_setattr(struct svc_rqst *rqstp, str
+@@ -388,7 +397,10 @@
        err = nfserr_notsync;
        if (!check_guard || guardtime == inode->i_ctime.tv_sec) {
                fh_lock(fhp);
@@ -993885,7 +993778,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                err = nfserrno(host_err);
                fh_unlock(fhp);
        }
-@@ -408,11 +420,12 @@ out_nfserr:
+@@ -408,11 +420,12 @@
  #if defined(CONFIG_NFSD_V2_ACL) || \
      defined(CONFIG_NFSD_V3_ACL) || \
      defined(CONFIG_NFSD_V4)
@@ -993900,7 +993793,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (buflen <= 0)
                return buflen;
  
-@@ -420,13 +433,14 @@ static ssize_t nfsd_getxattr(struct dent
+@@ -420,13 +433,14 @@
        if (!*buf)
                return -ENOMEM;
  
@@ -993917,7 +993810,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  {
        int len;
        size_t buflen;
-@@ -445,7 +459,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
+@@ -445,7 +459,7 @@
                goto out;
        }
  
@@ -993926,7 +993819,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  out:
        kfree(buf);
        return error;
-@@ -458,6 +472,7 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -458,6 +472,7 @@
        __be32 error;
        int host_error;
        struct dentry *dentry;
@@ -993934,7 +993827,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        struct inode *inode;
        struct posix_acl *pacl = NULL, *dpacl = NULL;
        unsigned int flags = 0;
-@@ -468,6 +483,7 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -468,6 +483,7 @@
                return error;
  
        dentry = fhp->fh_dentry;
@@ -993942,7 +993835,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        inode = dentry->d_inode;
        if (S_ISDIR(inode->i_mode))
                flags = NFS4_ACL_DIR;
-@@ -478,12 +494,14 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqst
+@@ -478,12 +494,14 @@
        } else if (host_error < 0)
                goto out_nfserr;
  
@@ -993959,7 +993852,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  
  out_release:
        posix_acl_release(pacl);
-@@ -496,13 +514,13 @@ out_nfserr:
+@@ -496,13 +514,13 @@
  }
  
  static struct posix_acl *
@@ -993975,7 +993868,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (!buflen)
                buflen = -ENODATA;
        if (buflen <= 0)
-@@ -514,14 +532,15 @@ _get_posix_acl(struct dentry *dentry, ch
+@@ -514,14 +532,15 @@
  }
  
  int
@@ -993993,7 +993886,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (IS_ERR(pacl) && PTR_ERR(pacl) == -ENODATA)
                pacl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
        if (IS_ERR(pacl)) {
-@@ -531,7 +550,7 @@ nfsd4_get_nfs4_acl(struct svc_rqst *rqst
+@@ -531,7 +550,7 @@
        }
  
        if (S_ISDIR(inode->i_mode)) {
@@ -994002,7 +993895,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                if (IS_ERR(dpacl) && PTR_ERR(dpacl) == -ENODATA)
                        dpacl = NULL;
                else if (IS_ERR(dpacl)) {
-@@ -906,6 +925,10 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+@@ -906,6 +925,10 @@
        if (ra && ra->p_set)
                file->f_ra = ra->p_ra;
  
@@ -994013,7 +993906,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (file->f_op->splice_read && rqstp->rq_splice_ok) {
                struct splice_desc sd = {
                        .len            = 0,
-@@ -938,19 +961,23 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
+@@ -938,19 +961,23 @@
                *count = host_err;
                err = 0;
                fsnotify_access(file->f_path.dentry);
@@ -994040,7 +993933,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        mutex_unlock(&dentry->d_inode->i_mutex);
  }
  
-@@ -998,6 +1025,10 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -998,6 +1025,10 @@
        if (stable && !EX_WGATHER(exp))
                file->f_flags |= O_SYNC;
  
@@ -994051,7 +993944,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        /* Write the data. */
        oldfs = get_fs(); set_fs(KERNEL_DS);
        host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset);
-@@ -1009,7 +1040,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1009,7 +1040,7 @@
  
        /* clear setuid/setgid flag after write */
        if (host_err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID)))
@@ -994060,7 +993953,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  
        if (host_err >= 0 && stable) {
                static ino_t    last_ino;
-@@ -1050,8 +1081,12 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
+@@ -1050,8 +1081,12 @@
        dprintk("nfsd: write complete host_err=%d\n", host_err);
        if (host_err >= 0)
                err = 0;
@@ -994074,7 +993967,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  out:
        return err;
  }
-@@ -1187,6 +1222,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1187,6 +1222,7 @@
                int type, dev_t rdev, struct svc_fh *resfhp)
  {
        struct dentry   *dentry, *dchild = NULL;
@@ -994082,7 +993975,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        struct inode    *dirp;
        __be32          err;
        __be32          err2;
-@@ -1204,6 +1240,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1204,6 +1240,7 @@
                goto out;
  
        dentry = fhp->fh_dentry;
@@ -994090,7 +993983,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        dirp = dentry->d_inode;
  
        err = nfserr_notdir;
-@@ -1220,7 +1257,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1220,7 +1257,7 @@
                host_err = PTR_ERR(dchild);
                if (IS_ERR(dchild))
                        goto out_nfserr;
@@ -994099,7 +993992,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                if (err)
                        goto out;
        } else {
-@@ -1270,13 +1307,14 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1270,13 +1307,14 @@
                host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);
                break;
        case S_IFDIR:
@@ -994116,7 +994009,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                break;
        }
        if (host_err < 0) {
-@@ -1284,7 +1322,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
+@@ -1284,7 +1322,7 @@
                goto out_nfserr;
        }
  
@@ -994125,7 +994018,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                err = nfserrno(nfsd_sync_dir(dentry));
                write_inode_now(dchild->d_inode, 1);
        }
-@@ -1514,6 +1552,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1514,6 +1552,7 @@
                                struct iattr *iap)
  {
        struct dentry   *dentry, *dnew;
@@ -994133,7 +994026,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        __be32          err, cerr;
        int             host_err;
  
-@@ -1538,6 +1577,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1538,6 +1577,7 @@
        if (host_err)
                goto out_nfserr;
  
@@ -994141,7 +994034,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (unlikely(path[plen] != 0)) {
                char *path_alloced = kmalloc(plen+1, GFP_KERNEL);
                if (path_alloced == NULL)
-@@ -1545,14 +1585,16 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1545,14 +1585,16 @@
                else {
                        strncpy(path_alloced, path, plen);
                        path_alloced[plen] = 0;
@@ -994161,7 +994054,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                        host_err = nfsd_sync_dir(dentry);
        }
        err = nfserrno(host_err);
-@@ -1560,7 +1602,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
+@@ -1560,7 +1602,7 @@
  
        mnt_drop_write(fhp->fh_export->ex_path.mnt);
  
@@ -994170,7 +994063,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        dput(dnew);
        if (err==0) err = cerr;
  out:
-@@ -1615,7 +1657,8 @@ nfsd_link(struct svc_rqst *rqstp, struct
+@@ -1615,7 +1657,8 @@
                err = nfserrno(host_err);
                goto out_dput;
        }
@@ -994180,7 +994073,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (!host_err) {
                if (EX_ISSYNC(ffhp->fh_export)) {
                        err = nfserrno(nfsd_sync_dir(ddir));
-@@ -1716,7 +1759,8 @@ nfsd_rename(struct svc_rqst *rqstp, stru
+@@ -1716,7 +1759,8 @@
        if (host_err)
                goto out_dput_new;
  
@@ -994190,7 +994083,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (!host_err && EX_ISSYNC(tfhp->fh_export)) {
                host_err = nfsd_sync_dir(tdentry);
                if (!host_err)
-@@ -1754,6 +1798,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1754,6 +1798,7 @@
                                char *fname, int flen)
  {
        struct dentry   *dentry, *rdentry;
@@ -994198,7 +994091,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        struct inode    *dirp;
        __be32          err;
        int             host_err;
-@@ -1768,6 +1813,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1768,6 +1813,7 @@
        fh_lock_nested(fhp, I_MUTEX_PARENT);
        dentry = fhp->fh_dentry;
        dirp = dentry->d_inode;
@@ -994206,7 +994099,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  
        rdentry = lookup_one_len(fname, dentry, flen);
        host_err = PTR_ERR(rdentry);
-@@ -1789,21 +1835,21 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
+@@ -1789,21 +1835,21 @@
  
        if (type != S_IFDIR) { /* It's UNLINK */
  #ifdef MSNFS
@@ -994232,7 +994125,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
                host_err = nfsd_sync_dir(dentry);
  
  out_drop:
-@@ -2036,7 +2082,8 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
+@@ -2036,7 +2082,8 @@
                return ERR_PTR(-EOPNOTSUPP);
        }
  
@@ -994242,7 +994135,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        if (size < 0)
                return ERR_PTR(size);
  
-@@ -2048,6 +2095,7 @@ nfsd_get_posix_acl(struct svc_fh *fhp, i
+@@ -2048,6 +2095,7 @@
  int
  nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
  {
@@ -994250,7 +994143,7 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
        struct inode *inode = fhp->fh_dentry->d_inode;
        char *name;
        void *value = NULL;
-@@ -2080,21 +2128,24 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
+@@ -2080,21 +2128,24 @@
        } else
                size = 0;
  
@@ -994279,9 +994172,9 @@ diff -purN linux-2.6.27/fs/nfsd/vfs.c linux-2.6.27.19-5.1/fs/nfsd/vfs.c
  
  getout:
        kfree(value);
-diff -purN linux-2.6.27/fs/novfs/Makefile linux-2.6.27.19-5.1/fs/novfs/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/Makefile      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/Makefile        Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,19 @@
 +#
 +# Makefile for the Novell NetWare Client for Linux filesystem.
@@ -994302,9 +994195,9 @@ diff -purN linux-2.6.27/fs/novfs/Makefile linux-2.6.27.19-5.1/fs/novfs/Makefile
 +
 +novfs-objs := inode.o proc.o profile.o daemon.o file.o scope.o nwcapi.o
 +
-diff -purN linux-2.6.27/fs/novfs/commands.h linux-2.6.27.19-5.1/fs/novfs/commands.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/commands.h    2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/commands.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/commands.h      Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,955 @@
 +/*
 + * NetWare Redirector for Linux
@@ -995261,9 +995154,9 @@ diff -purN linux-2.6.27/fs/novfs/commands.h linux-2.6.27.19-5.1/fs/novfs/command
 +#pragma pack(pop)
 +
 +#endif        /* __NOVFS_COMMANDS_H */
-diff -purN linux-2.6.27/fs/novfs/daemon.c linux-2.6.27.19-5.1/fs/novfs/daemon.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/daemon.c      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/daemon.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/daemon.c        Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,2129 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -997394,9 +997287,9 @@ diff -purN linux-2.6.27/fs/novfs/daemon.c linux-2.6.27.19-5.1/fs/novfs/daemon.c
 +      goto exit2;
 +}
 +
-diff -purN linux-2.6.27/fs/novfs/file.c linux-2.6.27.19-5.1/fs/novfs/file.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/file.c        2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/file.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/file.c  Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,1981 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -999379,9 +999272,9 @@ diff -purN linux-2.6.27/fs/novfs/file.c linux-2.6.27.19-5.1/fs/novfs/file.c
 +
 +      return (retCode);
 +}
-diff -purN linux-2.6.27/fs/novfs/inode.c linux-2.6.27.19-5.1/fs/novfs/inode.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/inode.c       2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/inode.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/inode.c Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,4729 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1004112,9 +1004005,9 @@ diff -purN linux-2.6.27/fs/novfs/inode.c linux-2.6.27.19-5.1/fs/novfs/inode.c
 +MODULE_AUTHOR("Novell Inc.");
 +MODULE_DESCRIPTION("Novell NetWare Client for Linux");
 +MODULE_VERSION(NOVFS_VERSION_STRING);
-diff -purN linux-2.6.27/fs/novfs/nwcapi.c linux-2.6.27.19-5.1/fs/novfs/nwcapi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwcapi.c      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwcapi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwcapi.c        Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,2208 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1006324,9 +1006217,9 @@ diff -purN linux-2.6.27/fs/novfs/nwcapi.c linux-2.6.27.19-5.1/fs/novfs/nwcapi.c
 +      kfree(cmd);
 +      return (status);
 +}
-diff -purN linux-2.6.27/fs/novfs/nwcapi.h linux-2.6.27.19-5.1/fs/novfs/nwcapi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwcapi.h      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwcapi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwcapi.h        Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,1416 @@
 +/*
 + * NetWare Redirector for Linux
@@ -1007744,9 +1007637,9 @@ diff -purN linux-2.6.27/fs/novfs/nwcapi.h linux-2.6.27.19-5.1/fs/novfs/nwcapi.h
 +};
 +
 +#endif /* __NWCLNX_H__ */
-diff -purN linux-2.6.27/fs/novfs/nwerror.h linux-2.6.27.19-5.1/fs/novfs/nwerror.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/nwerror.h     2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/nwerror.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/nwerror.h       Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,658 @@
 +/*
 + * NetWare Redirector for Linux
@@ -1008406,9 +1008299,9 @@ diff -purN linux-2.6.27/fs/novfs/nwerror.h linux-2.6.27.19-5.1/fs/novfs/nwerror.
 +#define NWE_FAILURE                   0x89FF  // 255 Generic Failure
 +
 +#endif        /* __NOVFS_ERROR_H */
-diff -purN linux-2.6.27/fs/novfs/proc.c linux-2.6.27.19-5.1/fs/novfs/proc.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/proc.c        2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/proc.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/proc.c  Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,153 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1008563,9 +1008456,9 @@ diff -purN linux-2.6.27/fs/novfs/proc.c linux-2.6.27.19-5.1/fs/novfs/proc.c
 +
 +      DbgPrint("Uninit_Procfs_Interface done\n");
 +}
-diff -purN linux-2.6.27/fs/novfs/profile.c linux-2.6.27.19-5.1/fs/novfs/profile.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/profile.c     2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/profile.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/profile.c       Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,710 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1009277,9 +1009170,9 @@ diff -purN linux-2.6.27/fs/novfs/profile.c linux-2.6.27.19-5.1/fs/novfs/profile.
 +}
 +
 +
-diff -purN linux-2.6.27/fs/novfs/scope.c linux-2.6.27.19-5.1/fs/novfs/scope.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/scope.c       2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/scope.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/scope.c Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,659 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1009940,9 +1009833,9 @@ diff -purN linux-2.6.27/fs/novfs/scope.c linux-2.6.27.19-5.1/fs/novfs/scope.c
 +}
 +
 +
-diff -purN linux-2.6.27/fs/novfs/vfs.h linux-2.6.27.19-5.1/fs/novfs/vfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/novfs/vfs.h 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 fs/novfs/vfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/novfs/vfs.h   Wed May 06 16:56:50 2009 +0100
 @@ -0,0 +1,451 @@
 +/*
 + * Novell NCP Redirector for Linux
@@ -1010395,10 +1010288,10 @@ diff -purN linux-2.6.27/fs/novfs/vfs.h linux-2.6.27.19-5.1/fs/novfs/vfs.h
 +
 +#endif        /* __NOVFS_H */
 +
-diff -purN linux-2.6.27/fs/ocfs2/Makefile linux-2.6.27.19-5.1/fs/ocfs2/Makefile
---- linux-2.6.27/fs/ocfs2/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/Makefile      2009-03-25 16:11:38.000000000 +0000
-@@ -34,7 +34,14 @@ ocfs2-objs := \
+diff -r 9608d5473017 fs/ocfs2/Makefile
+--- a/fs/ocfs2/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/Makefile        Wed May 06 16:56:51 2009 +0100
+@@ -34,7 +34,14 @@
        symlink.o               \
        sysfile.o               \
        uptodate.o              \
@@ -1010414,9 +1010307,9 @@ diff -purN linux-2.6.27/fs/ocfs2/Makefile linux-2.6.27.19-5.1/fs/ocfs2/Makefile
  
  ocfs2_stackglue-objs := stackglue.o
  ocfs2_stack_o2cb-objs := stack_o2cb.o
-diff -purN linux-2.6.27/fs/ocfs2/acl.c linux-2.6.27.19-5.1/fs/ocfs2/acl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/acl.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/acl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/acl.c   Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,479 @@
 +/* -*- mode: c; c-basic-offset: 8; -*-
 + * vim: noexpandtab sw=8 ts=8 sts=0:
@@ -1010897,9 +1010790,9 @@ diff -purN linux-2.6.27/fs/ocfs2/acl.c linux-2.6.27.19-5.1/fs/ocfs2/acl.c
 +      .get    = ocfs2_xattr_get_acl_default,
 +      .set    = ocfs2_xattr_set_acl_default,
 +};
-diff -purN linux-2.6.27/fs/ocfs2/acl.h linux-2.6.27.19-5.1/fs/ocfs2/acl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/acl.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/acl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/acl.h   Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,58 @@
 +/* -*- mode: c; c-basic-offset: 8; -*-
 + * vim: noexpandtab sw=8 ts=8 sts=0:
@@ -1010959,9 +1010852,9 @@ diff -purN linux-2.6.27/fs/ocfs2/acl.h linux-2.6.27.19-5.1/fs/ocfs2/acl.h
 +#endif /* CONFIG_OCFS2_FS_POSIX_ACL*/
 +
 +#endif /* OCFS2_ACL_H */
-diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
---- linux-2.6.27/fs/ocfs2/alloc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/alloc.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/alloc.c
+--- a/fs/ocfs2/alloc.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/alloc.c Wed May 06 16:56:51 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/slab.h>
  #include <linux/highmem.h>
@@ -1011311,7 +1011204,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  static void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc);
  static int ocfs2_cache_extent_block_free(struct ocfs2_cached_dealloc_ctxt *ctxt,
                                         struct ocfs2_extent_block *eb);
-@@ -205,17 +540,6 @@ static struct ocfs2_path *ocfs2_new_path
+@@ -205,17 +540,6 @@
  }
  
  /*
@@ -1011329,7 +1011222,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
   * Convenience function to journal all components in a path.
   */
  static int ocfs2_journal_access_path(struct inode *inode, handle_t *handle,
-@@ -368,39 +692,35 @@ struct ocfs2_merge_ctxt {
+@@ -368,39 +692,35 @@
   */
  int ocfs2_num_free_extents(struct ocfs2_super *osb,
                           struct inode *inode,
@@ -1011341,21 +1011234,25 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 +      struct ocfs2_extent_list *el = NULL;
        struct ocfs2_extent_block *eb;
        struct buffer_head *eb_bh = NULL;
-+      u64 last_eb_blk = 0;
-       mlog_entry_void();
+-
+-      mlog_entry_void();
+-
 -      if (!OCFS2_IS_VALID_DINODE(fe)) {
 -              OCFS2_RO_ON_INVALID_DINODE(inode->i_sb, fe);
 -              retval = -EIO;
 -              goto bail;
 -      }
-+      el = et->et_root_el;
-+      last_eb_blk = ocfs2_et_get_last_eb_blk(et);
+-
 -      if (fe->i_last_eb_blk) {
 -              retval = ocfs2_read_block(osb, le64_to_cpu(fe->i_last_eb_blk),
 -                                        &eb_bh, OCFS2_BH_CACHED, inode);
++      u64 last_eb_blk = 0;
++
++      mlog_entry_void();
++
++      el = et->et_root_el;
++      last_eb_blk = ocfs2_et_get_last_eb_blk(et);
++
 +      if (last_eb_blk) {
 +              retval = ocfs2_read_block(inode, last_eb_blk,
 +                                        &eb_bh);
@@ -1011379,7 +1011276,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        mlog_exit(retval);
        return retval;
-@@ -486,8 +806,7 @@ static int ocfs2_create_new_meta_bhs(str
+@@ -486,8 +806,7 @@
  bail:
        if (status < 0) {
                for(i = 0; i < wanted; i++) {
@@ -1011389,7 +1011286,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        bhs[i] = NULL;
                }
        }
-@@ -531,7 +850,7 @@ static inline u32 ocfs2_sum_rightmost_re
+@@ -531,7 +850,7 @@
  static int ocfs2_add_branch(struct ocfs2_super *osb,
                            handle_t *handle,
                            struct inode *inode,
@@ -1011398,7 +1011295,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                            struct buffer_head *eb_bh,
                            struct buffer_head **last_eb_bh,
                            struct ocfs2_alloc_context *meta_ac)
-@@ -540,7 +859,6 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -540,7 +859,6 @@
        u64 next_blkno, new_last_eb_blk;
        struct buffer_head *bh;
        struct buffer_head **new_eb_bhs = NULL;
@@ -1011406,12 +1011303,13 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        struct ocfs2_extent_block *eb;
        struct ocfs2_extent_list  *eb_el;
        struct ocfs2_extent_list  *el;
-@@ -550,13 +868,11 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -549,14 +867,12 @@
+       mlog_entry_void();
  
        BUG_ON(!last_eb_bh || !*last_eb_bh);
--      fe = (struct ocfs2_dinode *) fe_bh->b_data;
 -
+-      fe = (struct ocfs2_dinode *) fe_bh->b_data;
        if (eb_bh) {
                eb = (struct ocfs2_extent_block *) eb_bh->b_data;
                el = &eb->h_list;
@@ -1011421,7 +1011319,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        /* we never add a branch to a leaf. */
        BUG_ON(!el->l_tree_depth);
-@@ -646,7 +962,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -646,7 +962,7 @@
                mlog_errno(status);
                goto bail;
        }
@@ -1011430,7 +1011328,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                      OCFS2_JOURNAL_ACCESS_WRITE);
        if (status < 0) {
                mlog_errno(status);
-@@ -662,7 +978,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -662,7 +978,7 @@
        }
  
        /* Link the new branch into the rest of the tree (el will
@@ -1011439,7 +1011337,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        i = le16_to_cpu(el->l_next_free_rec);
        el->l_recs[i].e_blkno = cpu_to_le64(next_blkno);
        el->l_recs[i].e_cpos = cpu_to_le32(new_cpos);
-@@ -671,7 +987,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -671,7 +987,7 @@
  
        /* fe needs a new last extent block pointer, as does the
         * next_leaf on the previously last-extent-block. */
@@ -1011448,7 +1011346,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        eb = (struct ocfs2_extent_block *) (*last_eb_bh)->b_data;
        eb->h_next_leaf_blk = cpu_to_le64(new_last_eb_blk);
-@@ -679,7 +995,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -679,7 +995,7 @@
        status = ocfs2_journal_dirty(handle, *last_eb_bh);
        if (status < 0)
                mlog_errno(status);
@@ -1011457,7 +1011355,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (status < 0)
                mlog_errno(status);
        if (eb_bh) {
-@@ -700,8 +1016,7 @@ static int ocfs2_add_branch(struct ocfs2
+@@ -700,8 +1016,7 @@
  bail:
        if (new_eb_bhs) {
                for (i = 0; i < new_blocks; i++)
@@ -1011467,7 +1011365,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                kfree(new_eb_bhs);
        }
  
-@@ -717,16 +1032,15 @@ bail:
+@@ -717,16 +1032,15 @@
  static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
                                  handle_t *handle,
                                  struct inode *inode,
@@ -1011480,13 +1011378,14 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        u32 new_clusters;
        struct buffer_head *new_eb_bh = NULL;
 -      struct ocfs2_dinode *fe;
-       struct ocfs2_extent_block *eb;
+-      struct ocfs2_extent_block *eb;
 -      struct ocfs2_extent_list  *fe_el;
++      struct ocfs2_extent_block *eb;
 +      struct ocfs2_extent_list  *root_el;
        struct ocfs2_extent_list  *eb_el;
  
        mlog_entry_void();
-@@ -746,8 +1060,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -746,8 +1060,7 @@
        }
  
        eb_el = &eb->h_list;
@@ -1011496,7 +1011395,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        status = ocfs2_journal_access(handle, inode, new_eb_bh,
                                      OCFS2_JOURNAL_ACCESS_CREATE);
-@@ -756,11 +1069,11 @@ static int ocfs2_shift_tree_depth(struct
+@@ -756,11 +1069,11 @@
                goto bail;
        }
  
@@ -1011513,7 +1011412,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        status = ocfs2_journal_dirty(handle, new_eb_bh);
        if (status < 0) {
-@@ -768,7 +1081,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -768,7 +1081,7 @@
                goto bail;
        }
  
@@ -1011522,7 +1011421,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                      OCFS2_JOURNAL_ACCESS_WRITE);
        if (status < 0) {
                mlog_errno(status);
-@@ -777,21 +1090,21 @@ static int ocfs2_shift_tree_depth(struct
+@@ -777,21 +1090,21 @@
  
        new_clusters = ocfs2_sum_rightmost_rec(eb_el);
  
@@ -1011547,15 +1011446,16 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
         * becomes the allocated extent block */
 -      if (fe_el->l_tree_depth == cpu_to_le16(1))
 -              fe->i_last_eb_blk = eb->h_blkno;
+-
+-      status = ocfs2_journal_dirty(handle, fe_bh);
 +      if (root_el->l_tree_depth == cpu_to_le16(1))
 +              ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno));
--      status = ocfs2_journal_dirty(handle, fe_bh);
++
 +      status = ocfs2_journal_dirty(handle, et->et_root_bh);
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -801,8 +1114,7 @@ static int ocfs2_shift_tree_depth(struct
+@@ -801,8 +1114,7 @@
        new_eb_bh = NULL;
        status = 0;
  bail:
@@ -1011565,7 +1011465,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        mlog_exit(status);
        return status;
-@@ -817,22 +1129,21 @@ bail:
+@@ -817,22 +1129,21 @@
   * 1) a lowest extent block is found, then we pass it back in
   *    *lowest_eb_bh and return '0'
   *
@@ -1011591,7 +1011491,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        struct ocfs2_extent_block *eb;
        struct ocfs2_extent_list  *el;
        struct buffer_head *bh = NULL;
-@@ -842,8 +1153,7 @@ static int ocfs2_find_branch_target(stru
+@@ -842,8 +1153,7 @@
  
        *target_bh = NULL;
  
@@ -1011601,7 +1011501,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        while(le16_to_cpu(el->l_tree_depth) > 1) {
                if (le16_to_cpu(el->l_next_free_rec) == 0) {
-@@ -864,13 +1174,10 @@ static int ocfs2_find_branch_target(stru
+@@ -864,13 +1174,10 @@
                        goto bail;
                }
  
@@ -1011609,16 +1011509,17 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 -                      brelse(bh);
 -                      bh = NULL;
 -              }
-+              brelse(bh);
-+              bh = NULL;
+-
 -              status = ocfs2_read_block(osb, blkno, &bh, OCFS2_BH_CACHED,
 -                                        inode);
++              brelse(bh);
++              bh = NULL;
++
 +              status = ocfs2_read_block(inode, blkno, &bh);
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-@@ -886,8 +1193,7 @@ static int ocfs2_find_branch_target(stru
+@@ -886,8 +1193,7 @@
  
                if (le16_to_cpu(el->l_next_free_rec) <
                    le16_to_cpu(el->l_count)) {
@@ -1011628,7 +1011529,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        lowest_bh = bh;
                        get_bh(lowest_bh);
                }
-@@ -895,14 +1201,13 @@ static int ocfs2_find_branch_target(stru
+@@ -895,14 +1201,13 @@
  
        /* If we didn't find one and the fe doesn't have any room,
         * then return '1' */
@@ -1011646,7 +1011547,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        mlog_exit(status);
        return status;
-@@ -919,19 +1224,19 @@ bail:
+@@ -919,19 +1224,19 @@
   * *last_eb_bh will be updated by ocfs2_add_branch().
   */
  static int ocfs2_grow_tree(struct inode *inode, handle_t *handle,
@@ -1011670,7 +1011571,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (shift < 0) {
                ret = shift;
                mlog_errno(ret);
-@@ -948,7 +1253,7 @@ static int ocfs2_grow_tree(struct inode 
+@@ -948,7 +1253,7 @@
                /* ocfs2_shift_tree_depth will return us a buffer with
                 * the new extent block (so we can pass that to
                 * ocfs2_add_branch). */
@@ -1011679,7 +1011580,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                             meta_ac, &bh);
                if (ret < 0) {
                        mlog_errno(ret);
-@@ -975,7 +1280,7 @@ static int ocfs2_grow_tree(struct inode 
+@@ -975,7 +1280,7 @@
        /* call ocfs2_add_branch to add the final part of the tree with
         * the new data. */
        mlog(0, "add branch. bh = %p\n", bh);
@@ -1011688,7 +1011589,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                               meta_ac);
        if (ret < 0) {
                mlog_errno(ret);
-@@ -1245,8 +1550,7 @@ static int __ocfs2_find_path(struct inod
+@@ -1245,8 +1550,7 @@
  
                brelse(bh);
                bh = NULL;
@@ -1011698,7 +1011599,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -2067,11 +2371,11 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2067,11 +2371,11 @@
                                     struct ocfs2_path *right_path,
                                     int subtree_index,
                                     struct ocfs2_cached_dealloc_ctxt *dealloc,
@@ -1011713,7 +1011614,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        struct ocfs2_extent_list *right_leaf_el, *left_leaf_el;
        struct ocfs2_extent_block *eb;
  
-@@ -2123,7 +2427,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2123,7 +2427,7 @@
                 * We have to update i_last_eb_blk during the meta
                 * data delete.
                 */
@@ -1011722,7 +1011623,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                           OCFS2_JOURNAL_ACCESS_WRITE);
                if (ret) {
                        mlog_errno(ret);
-@@ -2198,7 +2502,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2198,7 +2502,7 @@
                ocfs2_update_edge_lengths(inode, handle, left_path);
  
                eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
@@ -1011731,7 +1011632,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
                /*
                 * Removal of the extent in the left leaf was skipped
-@@ -2208,7 +2512,7 @@ static int ocfs2_rotate_subtree_left(str
+@@ -2208,7 +2512,7 @@
                if (right_has_empty)
                        ocfs2_remove_empty_extent(left_leaf_el);
  
@@ -1011740,7 +1011641,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret)
                        mlog_errno(ret);
  
-@@ -2331,7 +2635,8 @@ static int __ocfs2_rotate_tree_left(stru
+@@ -2331,7 +2635,8 @@
                                    handle_t *handle, int orig_credits,
                                    struct ocfs2_path *path,
                                    struct ocfs2_cached_dealloc_ctxt *dealloc,
@@ -1011750,7 +1011651,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  {
        int ret, subtree_root, deleted;
        u32 right_cpos;
-@@ -2404,7 +2709,7 @@ static int __ocfs2_rotate_tree_left(stru
+@@ -2404,7 +2709,7 @@
  
                ret = ocfs2_rotate_subtree_left(inode, handle, left_path,
                                                right_path, subtree_root,
@@ -1011759,7 +1011660,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret == -EAGAIN) {
                        /*
                         * The rotation has to temporarily stop due to
-@@ -2447,29 +2752,20 @@ out:
+@@ -2447,29 +2752,20 @@
  }
  
  static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
@@ -1011773,9 +1011674,9 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        u32 cpos;
        struct ocfs2_path *left_path = NULL;
 -      struct ocfs2_dinode *di;
-       struct ocfs2_extent_block *eb;
-       struct ocfs2_extent_list *el;
+-      struct ocfs2_extent_block *eb;
+-      struct ocfs2_extent_list *el;
+-
 -      /*
 -       * XXX: This code assumes that the root is an inode, which is
 -       * true for now but may change as tree code gets generic.
@@ -1011788,14 +1011689,18 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 -                          (unsigned long long)OCFS2_I(inode)->ip_blkno);
 -              goto out;
 -      }
+-
++      struct ocfs2_extent_block *eb;
++      struct ocfs2_extent_list *el;
++
++
 +      ret = ocfs2_et_sanity_check(inode, et);
 +      if (ret)
 +              goto out;
        /*
         * There's two ways we handle this depending on
         * whether path is the only existing one.
-@@ -2526,7 +2822,7 @@ static int ocfs2_remove_rightmost_path(s
+@@ -2526,7 +2822,7 @@
                ocfs2_update_edge_lengths(inode, handle, left_path);
  
                eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data;
@@ -1011804,7 +1011709,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        } else {
                /*
                 * 'path' is also the leftmost path which
-@@ -2537,12 +2833,12 @@ static int ocfs2_remove_rightmost_path(s
+@@ -2537,12 +2833,12 @@
                 */
                ocfs2_unlink_path(inode, handle, dealloc, path, 1);
  
@@ -1011819,7 +1011724,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        }
  
        ocfs2_journal_dirty(handle, path_root_bh(path));
-@@ -2570,7 +2866,8 @@ out:
+@@ -2570,7 +2866,8 @@
   */
  static int ocfs2_rotate_tree_left(struct inode *inode, handle_t *handle,
                                  struct ocfs2_path *path,
@@ -1011829,7 +1011734,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  {
        int ret, orig_credits = handle->h_buffer_credits;
        struct ocfs2_path *tmp_path = NULL, *restart_path = NULL;
-@@ -2584,7 +2881,7 @@ static int ocfs2_rotate_tree_left(struct
+@@ -2584,7 +2881,7 @@
        if (path->p_tree_depth == 0) {
  rightmost_no_delete:
                /*
@@ -1011838,7 +1011743,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                 * it up front.
                 */
                ret = ocfs2_rotate_rightmost_leaf_left(inode, handle,
-@@ -2638,7 +2935,7 @@ rightmost_no_delete:
+@@ -2638,7 +2935,7 @@
                 */
  
                ret = ocfs2_remove_rightmost_path(inode, handle, path,
@@ -1011847,7 +1011752,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret)
                        mlog_errno(ret);
                goto out;
-@@ -2650,7 +2947,7 @@ rightmost_no_delete:
+@@ -2650,7 +2947,7 @@
         */
  try_rotate:
        ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits, path,
@@ -1011856,7 +1011761,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (ret && ret != -EAGAIN) {
                mlog_errno(ret);
                goto out;
-@@ -2662,7 +2959,7 @@ try_rotate:
+@@ -2662,7 +2959,7 @@
  
                ret = __ocfs2_rotate_tree_left(inode, handle, orig_credits,
                                               tmp_path, dealloc,
@@ -1011865,7 +1011770,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret && ret != -EAGAIN) {
                        mlog_errno(ret);
                        goto out;
-@@ -2948,6 +3245,7 @@ static int ocfs2_merge_rec_left(struct i
+@@ -2948,6 +3245,7 @@
                                handle_t *handle,
                                struct ocfs2_extent_rec *split_rec,
                                struct ocfs2_cached_dealloc_ctxt *dealloc,
@@ -1011873,7 +1011778,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                int index)
  {
        int ret, i, subtree_index = 0, has_empty_extent = 0;
-@@ -3068,7 +3366,8 @@ static int ocfs2_merge_rec_left(struct i
+@@ -3068,7 +3366,8 @@
                    le16_to_cpu(el->l_next_free_rec) == 1) {
  
                        ret = ocfs2_remove_rightmost_path(inode, handle,
@@ -1011883,7 +1011788,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        if (ret) {
                                mlog_errno(ret);
                                goto out;
-@@ -3095,7 +3394,8 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3095,7 +3394,8 @@
                                     int split_index,
                                     struct ocfs2_extent_rec *split_rec,
                                     struct ocfs2_cached_dealloc_ctxt *dealloc,
@@ -1011893,7 +1011798,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
  {
        int ret = 0;
-@@ -3113,7 +3413,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3113,7 +3413,7 @@
                 * illegal.
                 */
                ret = ocfs2_rotate_tree_left(inode, handle, path,
@@ -1011902,7 +1011807,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -3156,7 +3456,8 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3156,7 +3456,8 @@
                BUG_ON(!ocfs2_is_empty_extent(&el->l_recs[0]));
  
                /* The merge left us with an empty extent, remove it. */
@@ -1011912,7 +1011817,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -3170,7 +3471,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3170,7 +3471,7 @@
                 */
                ret = ocfs2_merge_rec_left(inode, path,
                                           handle, rec,
@@ -1011921,7 +1011826,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                           split_index);
  
                if (ret) {
-@@ -3179,7 +3480,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3179,7 +3480,7 @@
                }
  
                ret = ocfs2_rotate_tree_left(inode, handle, path,
@@ -1011930,7 +1011835,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                /*
                 * Error from this last rotate is not critical, so
                 * print but don't bubble it up.
-@@ -3199,7 +3500,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3199,7 +3500,7 @@
                        ret = ocfs2_merge_rec_left(inode,
                                                   path,
                                                   handle, split_rec,
@@ -1011939,7 +1011844,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                                   split_index);
                        if (ret) {
                                mlog_errno(ret);
-@@ -3222,7 +3523,7 @@ static int ocfs2_try_to_merge_extent(str
+@@ -3222,7 +3523,7 @@
                         * our leaf. Try to rotate it away.
                         */
                        ret = ocfs2_rotate_tree_left(inode, handle, path,
@@ -1011948,10 +1011853,12 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        if (ret)
                                mlog_errno(ret);
                        ret = 0;
-@@ -3356,16 +3657,6 @@ rotate:
+@@ -3354,16 +3655,6 @@
+        * extent record, or by virtue of an l_next_rec < l_count.
+        */
        ocfs2_rotate_leaf(el, insert_rec);
- }
+-}
+-
 -static inline void ocfs2_update_dinode_clusters(struct inode *inode,
 -                                              struct ocfs2_dinode *di,
 -                                              u32 clusters)
@@ -1011960,12 +1011867,10 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 -      spin_lock(&OCFS2_I(inode)->ip_lock);
 -      OCFS2_I(inode)->ip_clusters = le32_to_cpu(di->i_clusters);
 -      spin_unlock(&OCFS2_I(inode)->ip_lock);
--}
--
+ }
  static void ocfs2_adjust_rightmost_records(struct inode *inode,
-                                          handle_t *handle,
-                                          struct ocfs2_path *path,
-@@ -3567,8 +3858,8 @@ static void ocfs2_split_record(struct in
+@@ -3567,8 +3858,8 @@
  }
  
  /*
@@ -1011976,7 +1011881,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
   *
   * right_path is the path we want to do the actual insert
   * in. left_path should only be passed in if we need to update that
-@@ -3665,7 +3956,7 @@ out:
+@@ -3665,7 +3956,7 @@
  
  static int ocfs2_do_insert_extent(struct inode *inode,
                                  handle_t *handle,
@@ -1011985,23 +1011890,26 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                  struct ocfs2_extent_rec *insert_rec,
                                  struct ocfs2_insert_type *type)
  {
-@@ -3673,13 +3964,11 @@ static int ocfs2_do_insert_extent(struct
+@@ -3673,13 +3964,11 @@
        u32 cpos;
        struct ocfs2_path *right_path = NULL;
        struct ocfs2_path *left_path = NULL;
 -      struct ocfs2_dinode *di;
-       struct ocfs2_extent_list *el;
+-      struct ocfs2_extent_list *el;
+-
 -      di = (struct ocfs2_dinode *) di_bh->b_data;
 -      el = &di->id2.i_list;
-+      el = et->et_root_el;
+-
 -      ret = ocfs2_journal_access(handle, inode, di_bh,
++      struct ocfs2_extent_list *el;
++
++      el = et->et_root_el;
++
 +      ret = ocfs2_journal_access(handle, inode, et->et_root_bh,
                                   OCFS2_JOURNAL_ACCESS_WRITE);
        if (ret) {
                mlog_errno(ret);
-@@ -3691,7 +3980,7 @@ static int ocfs2_do_insert_extent(struct
+@@ -3691,7 +3980,7 @@
                goto out_update_clusters;
        }
  
@@ -1012010,7 +1011918,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (!right_path) {
                ret = -ENOMEM;
                mlog_errno(ret);
-@@ -3741,7 +4030,7 @@ static int ocfs2_do_insert_extent(struct
+@@ -3741,7 +4030,7 @@
                 * ocfs2_rotate_tree_right() might have extended the
                 * transaction without re-journaling our tree root.
                 */
@@ -1012019,21 +1011927,22 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                           OCFS2_JOURNAL_ACCESS_WRITE);
                if (ret) {
                        mlog_errno(ret);
-@@ -3766,10 +4055,10 @@ static int ocfs2_do_insert_extent(struct
+@@ -3766,10 +4055,10 @@
  
  out_update_clusters:
        if (type->ins_split == SPLIT_NONE)
 -              ocfs2_update_dinode_clusters(inode, di,
 -                                           le16_to_cpu(insert_rec->e_leaf_clusters));
+-
+-      ret = ocfs2_journal_dirty(handle, di_bh);
 +              ocfs2_et_update_clusters(inode, et,
 +                                       le16_to_cpu(insert_rec->e_leaf_clusters));
--      ret = ocfs2_journal_dirty(handle, di_bh);
++
 +      ret = ocfs2_journal_dirty(handle, et->et_root_bh);
        if (ret)
                mlog_errno(ret);
  
-@@ -3899,7 +4188,8 @@ out:
+@@ -3899,7 +4188,8 @@
  static void ocfs2_figure_contig_type(struct inode *inode,
                                     struct ocfs2_insert_type *insert,
                                     struct ocfs2_extent_list *el,
@@ -1012043,7 +1011952,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  {
        int i;
        enum ocfs2_contig_type contig_type = CONTIG_NONE;
-@@ -3915,6 +4205,21 @@ static void ocfs2_figure_contig_type(str
+@@ -3915,6 +4205,21 @@
                }
        }
        insert->ins_contig = contig_type;
@@ -1012065,7 +1011974,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  }
  
  /*
-@@ -3923,8 +4228,8 @@ static void ocfs2_figure_contig_type(str
+@@ -3923,8 +4228,8 @@
   * ocfs2_figure_appending_type() will figure out whether we'll have to
   * insert at the tail of the rightmost leaf.
   *
@@ -1012076,7 +1011985,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
   * then the logic here makes sense.
   */
  static void ocfs2_figure_appending_type(struct ocfs2_insert_type *insert,
-@@ -3975,14 +4280,13 @@ set_tail_append:
+@@ -3975,14 +4280,13 @@
   * structure.
   */
  static int ocfs2_figure_insert_type(struct inode *inode,
@@ -1012092,7 +1012001,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        struct ocfs2_extent_block *eb;
        struct ocfs2_extent_list *el;
        struct ocfs2_path *path = NULL;
-@@ -3990,7 +4294,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -3990,7 +4294,7 @@
  
        insert->ins_split = SPLIT_NONE;
  
@@ -1012101,7 +1012010,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
  
        if (el->l_tree_depth) {
-@@ -4000,9 +4304,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -4000,9 +4304,7 @@
                 * ocfs2_figure_insert_type() and ocfs2_add_branch()
                 * may want it later.
                 */
@@ -1012112,7 +1012021,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_exit(ret);
                        goto out;
-@@ -4023,12 +4325,12 @@ static int ocfs2_figure_insert_type(stru
+@@ -4023,12 +4325,12 @@
                le16_to_cpu(el->l_next_free_rec);
  
        if (!insert->ins_tree_depth) {
@@ -1012127,7 +1012036,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (!path) {
                ret = -ENOMEM;
                mlog_errno(ret);
-@@ -4057,7 +4359,7 @@ static int ocfs2_figure_insert_type(stru
+@@ -4057,7 +4359,7 @@
           *     into two types of appends: simple record append, or a
           *     rotate inside the tail leaf.
         */
@@ -1012136,7 +1012045,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        /*
         * The insert code isn't quite ready to deal with all cases of
-@@ -4078,7 +4380,8 @@ static int ocfs2_figure_insert_type(stru
+@@ -4078,7 +4380,8 @@
         * the case that we're doing a tail append, so maybe we can
         * take advantage of that information somehow.
         */
@@ -1012146,7 +1012055,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                /*
                 * Ok, ocfs2_find_path() returned us the rightmost
                 * tree path. This might be an appending insert. There are
-@@ -4108,7 +4411,7 @@ out:
+@@ -4108,7 +4411,7 @@
  int ocfs2_insert_extent(struct ocfs2_super *osb,
                        handle_t *handle,
                        struct inode *inode,
@@ -1012155,7 +1012064,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        u32 cpos,
                        u64 start_blk,
                        u32 new_clusters,
-@@ -4121,26 +4424,21 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4121,26 +4424,21 @@
        struct ocfs2_insert_type insert = {0, };
        struct ocfs2_extent_rec rec;
  
@@ -1012163,7 +1012072,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 -
        mlog(0, "add %u clusters at position %u to inode %llu\n",
             new_clusters, cpos, (unsigned long long)OCFS2_I(inode)->ip_blkno);
+-
 -      mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) &&
 -                      (OCFS2_I(inode)->ip_clusters != cpos),
 -                      "Device %s, asking for sparse allocation: inode %llu, "
@@ -1012171,24 +1012080,25 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 -                      osb->dev_str,
 -                      (unsigned long long)OCFS2_I(inode)->ip_blkno, cpos,
 -                      OCFS2_I(inode)->ip_clusters);
--
        memset(&rec, 0, sizeof(rec));
        rec.e_cpos = cpu_to_le32(cpos);
        rec.e_blkno = cpu_to_le64(start_blk);
        rec.e_leaf_clusters = cpu_to_le16(new_clusters);
        rec.e_flags = flags;
+-
+-      status = ocfs2_figure_insert_type(inode, fe_bh, &last_eb_bh, &rec,
 +      status = ocfs2_et_insert_check(inode, et, &rec);
 +      if (status) {
 +              mlog_errno(status);
 +              goto bail;
 +      }
--      status = ocfs2_figure_insert_type(inode, fe_bh, &last_eb_bh, &rec,
++
 +      status = ocfs2_figure_insert_type(inode, et, &last_eb_bh, &rec,
                                          &free_records, &insert);
        if (status < 0) {
                mlog_errno(status);
-@@ -4154,7 +4452,7 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4154,7 +4452,7 @@
             free_records, insert.ins_tree_depth);
  
        if (insert.ins_contig == CONTIG_NONE && free_records == 0) {
@@ -1012197,7 +1012107,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                         &insert.ins_tree_depth, &last_eb_bh,
                                         meta_ac);
                if (status) {
-@@ -4164,20 +4462,127 @@ int ocfs2_insert_extent(struct ocfs2_sup
+@@ -4164,17 +4462,124 @@
        }
  
        /* Finally, we can add clusters. This might rotate the tree for us. */
@@ -1012212,12 +1012122,14 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  bail:
 -      if (last_eb_bh)
 -              brelse(last_eb_bh);
+-
+-      mlog_exit(status);
 +      brelse(last_eb_bh);
-       mlog_exit(status);
-       return status;
- }
++
++      mlog_exit(status);
++      return status;
++}
++
 +/*
 + * Allcate and add clusters into the extent b-tree.
 + * The new clusters(clusters_to_add) will be inserted at logical_offset.
@@ -1012323,13 +1012235,10 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 +      mlog_exit(status);
 +      if (reason_ret)
 +              *reason_ret = reason;
-+      return status;
-+}
-+
- static void ocfs2_make_right_split_rec(struct super_block *sb,
-                                      struct ocfs2_extent_rec *split_rec,
-                                      u32 cpos,
-@@ -4201,7 +4606,7 @@ static void ocfs2_make_right_split_rec(s
+       return status;
+ }
+@@ -4201,7 +4606,7 @@
  static int ocfs2_split_and_insert(struct inode *inode,
                                  handle_t *handle,
                                  struct ocfs2_path *path,
@@ -1012338,7 +1012247,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                  struct buffer_head **last_eb_bh,
                                  int split_index,
                                  struct ocfs2_extent_rec *orig_split_rec,
-@@ -4215,7 +4620,6 @@ static int ocfs2_split_and_insert(struct
+@@ -4215,7 +4620,6 @@
        struct ocfs2_extent_rec split_rec = *orig_split_rec;
        struct ocfs2_insert_type insert;
        struct ocfs2_extent_block *eb;
@@ -1012346,7 +1012255,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
  leftright:
        /*
-@@ -4224,8 +4628,7 @@ leftright:
+@@ -4224,8 +4628,7 @@
         */
        rec = path_leaf_el(path)->l_recs[split_index];
  
@@ -1012356,7 +1012265,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        depth = le16_to_cpu(rightmost_el->l_tree_depth);
        if (depth) {
-@@ -4236,8 +4639,8 @@ leftright:
+@@ -4236,8 +4639,8 @@
  
        if (le16_to_cpu(rightmost_el->l_next_free_rec) ==
            le16_to_cpu(rightmost_el->l_count)) {
@@ -1012367,7 +1012276,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -4274,8 +4677,7 @@ leftright:
+@@ -4274,8 +4677,7 @@
                do_leftright = 1;
        }
  
@@ -1012377,7 +1012286,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (ret) {
                mlog_errno(ret);
                goto out;
-@@ -4317,8 +4719,9 @@ out:
+@@ -4317,8 +4719,9 @@
   * of the tree is required. All other cases will degrade into a less
   * optimal tree layout.
   *
@@ -1012389,7 +1012298,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
   *
   * This code is optimized for readability - several passes might be
   * made over certain portions of the tree. All of those blocks will
-@@ -4326,7 +4729,7 @@ out:
+@@ -4326,7 +4729,7 @@
   * extra overhead is not expressed in terms of disk reads.
   */
  static int __ocfs2_mark_extent_written(struct inode *inode,
@@ -1012398,21 +1012307,22 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                       handle_t *handle,
                                       struct ocfs2_path *path,
                                       int split_index,
-@@ -4366,11 +4769,9 @@ static int __ocfs2_mark_extent_written(s
+@@ -4366,11 +4769,9 @@
         */
        if (path->p_tree_depth) {
                struct ocfs2_extent_block *eb;
 -              struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
+-
 -              ret = ocfs2_read_block(OCFS2_SB(inode->i_sb),
 -                                     le64_to_cpu(di->i_last_eb_blk),
 -                                     &last_eb_bh, OCFS2_BH_CACHED, inode);
++
 +              ret = ocfs2_read_block(inode, ocfs2_et_get_last_eb_blk(et),
 +                                     &last_eb_bh);
                if (ret) {
                        mlog_exit(ret);
                        goto out;
-@@ -4403,7 +4804,7 @@ static int __ocfs2_mark_extent_written(s
+@@ -4403,7 +4804,7 @@
                if (ctxt.c_split_covers_rec)
                        el->l_recs[split_index] = *split_rec;
                else
@@ -1012421,7 +1012331,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                                     &last_eb_bh, split_index,
                                                     split_rec, meta_ac);
                if (ret)
-@@ -4411,7 +4812,7 @@ static int __ocfs2_mark_extent_written(s
+@@ -4411,7 +4812,7 @@
        } else {
                ret = ocfs2_try_to_merge_extent(inode, handle, path,
                                                split_index, split_rec,
@@ -1012430,7 +1012340,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret)
                        mlog_errno(ret);
        }
-@@ -4429,7 +4830,8 @@ out:
+@@ -4429,7 +4830,8 @@
   *
   * The caller is responsible for passing down meta_ac if we'll need it.
   */
@@ -1012440,24 +1012350,26 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                              handle_t *handle, u32 cpos, u32 len, u32 phys,
                              struct ocfs2_alloc_context *meta_ac,
                              struct ocfs2_cached_dealloc_ctxt *dealloc)
-@@ -4455,10 +4857,14 @@ int ocfs2_mark_extent_written(struct ino
+@@ -4455,10 +4857,14 @@
        /*
         * XXX: This should be fixed up so that we just re-insert the
         * next extent records.
+-       */
+-      ocfs2_extent_map_trunc(inode, 0);
+-
+-      left_path = ocfs2_new_inode_path(di_bh);
 +       *
 +       * XXX: This is a hack on the extent tree, maybe it should be
 +       * an op?
-        */
--      ocfs2_extent_map_trunc(inode, 0);
++       */
 +      if (et->et_ops == &ocfs2_dinode_et_ops)
 +              ocfs2_extent_map_trunc(inode, 0);
--      left_path = ocfs2_new_inode_path(di_bh);
++
 +      left_path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
        if (!left_path) {
                ret = -ENOMEM;
                mlog_errno(ret);
-@@ -4489,8 +4895,9 @@ int ocfs2_mark_extent_written(struct ino
+@@ -4489,8 +4895,9 @@
        split_rec.e_flags = path_leaf_el(left_path)->l_recs[index].e_flags;
        split_rec.e_flags &= ~OCFS2_EXT_UNWRITTEN;
  
@@ -1012469,7 +1012381,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (ret)
                mlog_errno(ret);
  
-@@ -4499,13 +4906,12 @@ out:
+@@ -4499,13 +4906,12 @@
        return ret;
  }
  
@@ -1012484,7 +1012396,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        struct buffer_head *last_eb_bh = NULL;
        struct ocfs2_extent_block *eb;
        struct ocfs2_extent_list *rightmost_el, *el;
-@@ -4522,9 +4928,8 @@ static int ocfs2_split_tree(struct inode
+@@ -4522,9 +4928,8 @@
  
        depth = path->p_tree_depth;
        if (depth > 0) {
@@ -1012496,7 +1012408,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret < 0) {
                        mlog_errno(ret);
                        goto out;
-@@ -4535,7 +4940,8 @@ static int ocfs2_split_tree(struct inode
+@@ -4535,7 +4940,8 @@
        } else
                rightmost_el = path_leaf_el(path);
  
@@ -1012506,7 +1012418,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        ret = ocfs2_extend_trans(handle, credits);
        if (ret) {
                mlog_errno(ret);
-@@ -4544,7 +4950,7 @@ static int ocfs2_split_tree(struct inode
+@@ -4544,7 +4950,7 @@
  
        if (le16_to_cpu(rightmost_el->l_next_free_rec) ==
            le16_to_cpu(rightmost_el->l_count)) {
@@ -1012515,7 +1012427,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                      meta_ac);
                if (ret) {
                        mlog_errno(ret);
-@@ -4558,7 +4964,7 @@ static int ocfs2_split_tree(struct inode
+@@ -4558,7 +4964,7 @@
        insert.ins_split = SPLIT_RIGHT;
        insert.ins_tree_depth = depth;
  
@@ -1012524,7 +1012436,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (ret)
                mlog_errno(ret);
  
-@@ -4570,7 +4976,8 @@ out:
+@@ -4570,7 +4976,8 @@
  static int ocfs2_truncate_rec(struct inode *inode, handle_t *handle,
                              struct ocfs2_path *path, int index,
                              struct ocfs2_cached_dealloc_ctxt *dealloc,
@@ -1012534,7 +1012446,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  {
        int ret;
        u32 left_cpos, rec_range, trunc_range;
-@@ -4582,7 +4989,7 @@ static int ocfs2_truncate_rec(struct ino
+@@ -4582,7 +4989,7 @@
        struct ocfs2_extent_block *eb;
  
        if (ocfs2_is_empty_extent(&el->l_recs[0]) && index > 0) {
@@ -1012543,7 +1012455,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -4713,7 +5120,7 @@ static int ocfs2_truncate_rec(struct ino
+@@ -4713,7 +5120,7 @@
  
        ocfs2_journal_dirty(handle, path_leaf_bh(path));
  
@@ -1012552,7 +1012464,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (ret) {
                mlog_errno(ret);
                goto out;
-@@ -4724,7 +5131,8 @@ out:
+@@ -4724,7 +5131,8 @@
        return ret;
  }
  
@@ -1012562,7 +1012474,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        u32 cpos, u32 len, handle_t *handle,
                        struct ocfs2_alloc_context *meta_ac,
                        struct ocfs2_cached_dealloc_ctxt *dealloc)
-@@ -4733,11 +5141,11 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4733,11 +5141,11 @@
        u32 rec_range, trunc_range;
        struct ocfs2_extent_rec *rec;
        struct ocfs2_extent_list *el;
@@ -1012576,23 +1012488,28 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (!path) {
                ret = -ENOMEM;
                mlog_errno(ret);
-@@ -4790,13 +5198,13 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4790,13 +5198,13 @@
  
        if (le32_to_cpu(rec->e_cpos) == cpos || rec_range == trunc_range) {
                ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
 -                                       cpos, len);
-+                                       cpos, len, et);
-               if (ret) {
-                       mlog_errno(ret);
-                       goto out;
-               }
-       } else {
+-              if (ret) {
+-                      mlog_errno(ret);
+-                      goto out;
+-              }
+-      } else {
 -              ret = ocfs2_split_tree(inode, di_bh, handle, path, index,
++                                       cpos, len, et);
++              if (ret) {
++                      mlog_errno(ret);
++                      goto out;
++              }
++      } else {
 +              ret = ocfs2_split_tree(inode, et, handle, path, index,
                                       trunc_range, meta_ac);
                if (ret) {
                        mlog_errno(ret);
-@@ -4845,7 +5253,7 @@ int ocfs2_remove_extent(struct inode *in
+@@ -4845,7 +5253,7 @@
                }
  
                ret = ocfs2_truncate_rec(inode, handle, path, index, dealloc,
@@ -1012601,10 +1012518,13 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -4857,6 +5265,78 @@ out:
-       return ret;
- }
+@@ -4854,6 +5262,78 @@
  
+ out:
+       ocfs2_free_path(path);
++      return ret;
++}
++
 +int ocfs2_remove_btree_range(struct inode *inode,
 +                           struct ocfs2_extent_tree *et,
 +                           u32 cpos, u32 phys_cpos, u32 len,
@@ -1012674,13 +1012594,10 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 +      if (meta_ac)
 +              ocfs2_free_alloc_context(meta_ac);
 +
-+      return ret;
-+}
-+
- int ocfs2_truncate_log_needs_flush(struct ocfs2_super *osb)
- {
-       struct buffer_head *tl_bh = osb->osb_tl_bh;
-@@ -5188,8 +5668,7 @@ static int ocfs2_get_truncate_log_info(s
+       return ret;
+ }
+@@ -5188,8 +5668,7 @@
                goto bail;
        }
  
@@ -1012690,7 +1012607,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (status < 0) {
                iput(inode);
                mlog_errno(status);
-@@ -5264,8 +5743,7 @@ int ocfs2_begin_truncate_log_recovery(st
+@@ -5264,8 +5743,7 @@
  bail:
        if (tl_inode)
                iput(tl_inode);
@@ -1012700,7 +1012617,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        if (status < 0 && (*tl_copy)) {
                kfree(*tl_copy);
-@@ -5404,7 +5882,10 @@ int ocfs2_truncate_log_init(struct ocfs2
+@@ -5404,7 +5882,10 @@
   */
  
  /*
@@ -1012712,7 +1012629,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
   */
  struct ocfs2_cached_block_free {
        struct ocfs2_cached_block_free          *free_next;
-@@ -5419,10 +5900,10 @@ struct ocfs2_per_slot_free_list {
+@@ -5419,10 +5900,10 @@
        struct ocfs2_cached_block_free          *f_first;
  };
  
@@ -1012727,7 +1012644,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  {
        int ret;
        u64 bg_blkno;
-@@ -5497,6 +5978,82 @@ out:
+@@ -5497,6 +5978,82 @@
        return ret;
  }
  
@@ -1012810,7 +1012727,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  int ocfs2_run_deallocs(struct ocfs2_super *osb,
                       struct ocfs2_cached_dealloc_ctxt *ctxt)
  {
-@@ -5512,8 +6069,10 @@ int ocfs2_run_deallocs(struct ocfs2_supe
+@@ -5512,8 +6069,10 @@
                if (fl->f_first) {
                        mlog(0, "Free items: (type %u, slot %d)\n",
                             fl->f_inode_type, fl->f_slot);
@@ -1012823,10 +1012740,12 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                        if (ret2)
                                mlog_errno(ret2);
                        if (!ret)
-@@ -5524,6 +6083,17 @@ int ocfs2_run_deallocs(struct ocfs2_supe
-               kfree(fl);
-       }
+@@ -5522,6 +6081,17 @@
  
+               ctxt->c_first_suballocator = fl->f_next_suballocator;
+               kfree(fl);
++      }
++
 +      if (ctxt->c_global_allocator) {
 +              ret2 = ocfs2_free_cached_clusters(osb,
 +                                                ctxt->c_global_allocator);
@@ -1012836,12 +1012755,10 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 +                      ret = ret2;
 +
 +              ctxt->c_global_allocator = NULL;
-+      }
-+
-       return ret;
- }
+       }
  
-@@ -5954,6 +6524,8 @@ static int ocfs2_do_truncate(struct ocfs
+       return ret;
+@@ -5954,6 +6524,8 @@
                goto bail;
        }
  
@@ -1012850,7 +1012767,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        spin_lock(&OCFS2_I(inode)->ip_lock);
        OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) -
                                      clusters_to_del;
-@@ -6008,20 +6580,13 @@ bail:
+@@ -6008,20 +6580,13 @@
        return status;
  }
  
@@ -1012872,7 +1012789,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  static void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
                                     unsigned int from, unsigned int to,
                                     struct page *page, int zero, u64 *phys)
-@@ -6040,17 +6605,18 @@ static void ocfs2_map_and_dirty_page(str
+@@ -6040,17 +6605,18 @@
         * here if they aren't - ocfs2_map_page_blocks()
         * might've skipped some
         */
@@ -1012900,7 +1012817,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (ret < 0)
                        mlog_errno(ret);
        }
-@@ -6215,20 +6781,29 @@ out:
+@@ -6215,20 +6781,29 @@
        return ret;
  }
  
@@ -1012909,9 +1012826,10 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
 +                                           struct ocfs2_dinode *di)
  {
        unsigned int blocksize = 1 << inode->i_sb->s_blocksize_bits;
-+      unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size);
+-
 -      memset(&di->id2, 0, blocksize - offsetof(struct ocfs2_dinode, id2));
++      unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size);
++
 +      if (le16_to_cpu(di->i_dyn_features) & OCFS2_INLINE_XATTR_FL)
 +              memset(&di->id2, 0, blocksize -
 +                                  offsetof(struct ocfs2_dinode, id2) -
@@ -1012934,20 +1012852,21 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  }
  
  void ocfs2_set_inode_data_inline(struct inode *inode, struct ocfs2_dinode *di)
-@@ -6245,9 +6820,10 @@ void ocfs2_set_inode_data_inline(struct 
+@@ -6245,9 +6820,10 @@
         * We clear the entire i_data structure here so that all
         * fields can be properly initialized.
         */
 -      ocfs2_zero_dinode_id2(inode, di);
-+      ocfs2_zero_dinode_id2_with_xattr(inode, di);
+-
 -      idata->id_count = cpu_to_le16(ocfs2_max_inline_data(inode->i_sb));
++      ocfs2_zero_dinode_id2_with_xattr(inode, di);
++
 +      idata->id_count = cpu_to_le16(
 +                      ocfs2_max_inline_data_with_xattr(inode->i_sb, di));
  }
  
  int ocfs2_convert_inline_data_to_extents(struct inode *inode,
-@@ -6262,6 +6838,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6262,6 +6838,8 @@
        struct ocfs2_alloc_context *data_ac = NULL;
        struct page **pages = NULL;
        loff_t end = osb->s_clustersize;
@@ -1012956,7 +1012875,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        has_data = i_size_read(inode) ? 1 : 0;
  
-@@ -6281,7 +6859,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6281,7 +6859,8 @@
                }
        }
  
@@ -1012966,7 +1012885,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (IS_ERR(handle)) {
                ret = PTR_ERR(handle);
                mlog_errno(ret);
-@@ -6300,6 +6879,13 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6300,6 +6879,13 @@
                unsigned int page_end;
                u64 phys;
  
@@ -1012980,7 +1012899,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off,
                                           &num);
                if (ret) {
-@@ -6361,7 +6947,8 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6361,7 +6947,8 @@
                 * this proves to be false, we could always re-build
                 * the in-inode data from our pages.
                 */
@@ -1012990,7 +1012909,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                                          0, block, 1, 0, NULL);
                if (ret) {
                        mlog_errno(ret);
-@@ -6372,6 +6959,10 @@ int ocfs2_convert_inline_data_to_extents
+@@ -6372,6 +6959,10 @@
        }
  
  out_commit:
@@ -1013001,7 +1012920,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        ocfs2_commit_trans(osb, handle);
  
  out_unlock:
-@@ -6404,13 +6995,14 @@ int ocfs2_commit_truncate(struct ocfs2_s
+@@ -6404,13 +6995,14 @@
        handle_t *handle = NULL;
        struct inode *tl_inode = osb->osb_tl_inode;
        struct ocfs2_path *path = NULL;
@@ -1013017,7 +1012936,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
        if (!path) {
                status = -ENOMEM;
                mlog_errno(status);
-@@ -6581,8 +7173,8 @@ int ocfs2_prepare_truncate(struct ocfs2_
+@@ -6581,8 +7173,8 @@
        ocfs2_init_dealloc_ctxt(&(*tc)->tc_dealloc);
  
        if (fe->id2.i_list.l_tree_depth) {
@@ -1013028,7 +1012947,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-@@ -6695,8 +7287,7 @@ static void ocfs2_free_truncate_context(
+@@ -6695,8 +7287,7 @@
                mlog(ML_NOTICE,
                     "Truncate completion has non-empty dealloc context\n");
  
@@ -1013038,9 +1012957,9 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.c linux-2.6.27.19-5.1/fs/ocfs2/alloc.c
  
        kfree(tc);
  }
-diff -purN linux-2.6.27/fs/ocfs2/alloc.h linux-2.6.27.19-5.1/fs/ocfs2/alloc.h
---- linux-2.6.27/fs/ocfs2/alloc.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/alloc.h       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/alloc.h
+--- a/fs/ocfs2/alloc.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/alloc.h Wed May 06 16:56:51 2009 +0100
 @@ -26,30 +26,107 @@
  #ifndef OCFS2_ALLOC_H
  #define OCFS2_ALLOC_H
@@ -1013155,7 +1013074,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.h linux-2.6.27.19-5.1/fs/ocfs2/alloc.h
  {
        /*
         * Rather than do all the work of determining how much we need
-@@ -59,7 +136,7 @@ static inline int ocfs2_extend_meta_need
+@@ -59,7 +136,7 @@
         * new tree_depth==0 extent_block, and one block at the new
         * top-of-the tree.
         */
@@ -1013164,7 +1013083,7 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.h linux-2.6.27.19-5.1/fs/ocfs2/alloc.h
  }
  
  void ocfs2_dinode_new_extent_list(struct inode *inode, struct ocfs2_dinode *di);
-@@ -95,10 +172,18 @@ int __ocfs2_flush_truncate_log(struct oc
+@@ -95,10 +172,18 @@
   */
  struct ocfs2_cached_dealloc_ctxt {
        struct ocfs2_per_slot_free_list         *c_first_suballocator;
@@ -1013183,9 +1013102,9 @@ diff -purN linux-2.6.27/fs/ocfs2/alloc.h linux-2.6.27.19-5.1/fs/ocfs2/alloc.h
  }
  int ocfs2_run_deallocs(struct ocfs2_super *osb,
                       struct ocfs2_cached_dealloc_ctxt *ctxt);
-diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
---- linux-2.6.27/fs/ocfs2/aops.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/aops.c        2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/aops.c
+--- a/fs/ocfs2/aops.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/aops.c  Wed May 06 16:56:51 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/swap.h>
  #include <linux/pipe_fs_i.h>
@@ -1013194,7 +1013113,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  
  #define MLOG_MASK_PREFIX ML_FILE_IO
  #include <cluster/masklog.h>
-@@ -68,9 +69,7 @@ static int ocfs2_symlink_get_block(struc
+@@ -68,9 +69,7 @@
                goto bail;
        }
  
@@ -1013205,7 +1013124,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -128,8 +127,7 @@ static int ocfs2_symlink_get_block(struc
+@@ -128,8 +127,7 @@
        err = 0;
  
  bail:
@@ -1013215,7 +1013134,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  
        mlog_exit(err);
        return err;
-@@ -261,13 +259,11 @@ static int ocfs2_readpage_inline(struct 
+@@ -261,13 +259,11 @@
  {
        int ret;
        struct buffer_head *di_bh = NULL;
@@ -1013230,7 +1013149,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
        if (ret) {
                mlog_errno(ret);
                goto out;
-@@ -485,11 +481,14 @@ handle_t *ocfs2_start_walk_page_trans(st
+@@ -485,11 +481,14 @@
        }
  
        if (ocfs2_should_order_data(inode)) {
@@ -1013246,7 +1013165,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
                        mlog_errno(ret);
        }
  out:
-@@ -669,7 +668,7 @@ static void ocfs2_invalidatepage(struct 
+@@ -669,7 +668,7 @@
  {
        journal_t *journal = OCFS2_SB(page->mapping->host->i_sb)->journal->j_journal;
  
@@ -1013255,7 +1013174,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  }
  
  static int ocfs2_releasepage(struct page *page, gfp_t wait)
-@@ -678,7 +677,7 @@ static int ocfs2_releasepage(struct page
+@@ -678,7 +677,7 @@
  
        if (!page_has_buffers(page))
                return 0;
@@ -1013264,7 +1013183,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  }
  
  static ssize_t ocfs2_direct_IO(int rw,
-@@ -1074,11 +1073,15 @@ static void ocfs2_write_failure(struct i
+@@ -1074,11 +1073,15 @@
                tmppage = wc->w_pages[i];
  
                if (page_has_buffers(tmppage)) {
@@ -1013281,7 +1013200,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  
                        block_commit_write(tmppage, from, to);
                }
-@@ -1242,6 +1245,7 @@ static int ocfs2_write_cluster(struct ad
+@@ -1242,6 +1245,7 @@
        int ret, i, new, should_zero = 0;
        u64 v_blkno, p_blkno;
        struct inode *inode = mapping->host;
@@ -1013289,7 +1013208,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  
        new = phys == 0 ? 1 : 0;
        if (new || unwritten)
-@@ -1255,10 +1259,10 @@ static int ocfs2_write_cluster(struct ad
+@@ -1255,10 +1259,10 @@
                 * any additional semaphores or cluster locks.
                 */
                tmp_pos = cpos;
@@ -1013304,7 +1013223,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
                /*
                 * This shouldn't happen because we must have already
                 * calculated the correct meta data allocation required. The
-@@ -1276,7 +1280,8 @@ static int ocfs2_write_cluster(struct ad
+@@ -1276,7 +1280,8 @@
                        goto out;
                }
        } else if (unwritten) {
@@ -1013314,7 +1013233,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
                                                wc->w_handle, cpos, 1, phys,
                                                meta_ac, &wc->w_dealloc);
                if (ret < 0) {
-@@ -1665,6 +1670,7 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1665,6 +1670,7 @@
        struct ocfs2_alloc_context *data_ac = NULL;
        struct ocfs2_alloc_context *meta_ac = NULL;
        handle_t *handle;
@@ -1013322,7 +1013241,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  
        ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, di_bh);
        if (ret) {
-@@ -1712,14 +1718,23 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1712,14 +1718,23 @@
                 * ocfs2_lock_allocators(). It greatly over-estimates
                 * the work to be done.
                 */
@@ -1013349,7 +1013268,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
                                                    clusters_to_alloc);
  
        }
-@@ -1736,6 +1751,11 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1736,6 +1751,11 @@
  
        wc->w_handle = handle;
  
@@ -1013361,7 +1013280,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
        /*
         * We don't want this to fail in ocfs2_write_end(), so do it
         * here.
-@@ -1744,7 +1764,7 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1744,7 +1764,7 @@
                                   OCFS2_JOURNAL_ACCESS_WRITE);
        if (ret) {
                mlog_errno(ret);
@@ -1013370,7 +1013289,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
        }
  
        /*
-@@ -1757,14 +1777,14 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1757,14 +1777,14 @@
                                         mmap_page);
        if (ret) {
                mlog_errno(ret);
@@ -1013387,7 +1013306,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
        }
  
        if (data_ac)
-@@ -1776,6 +1796,10 @@ success:
+@@ -1776,6 +1796,10 @@
        *pagep = wc->w_target_page;
        *fsdata = wc;
        return 0;
@@ -1013398,7 +1013317,7 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
  out_commit:
        ocfs2_commit_trans(osb, handle);
  
-@@ -1905,11 +1929,15 @@ int ocfs2_write_end_nolock(struct addres
+@@ -1905,11 +1929,15 @@
                }
  
                if (page_has_buffers(tmppage)) {
@@ -1013415,10 +1013334,10 @@ diff -purN linux-2.6.27/fs/ocfs2/aops.c linux-2.6.27.19-5.1/fs/ocfs2/aops.c
                        block_commit_write(tmppage, from, to);
                }
        }
-diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.c
---- linux-2.6.27/fs/ocfs2/buffer_head_io.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.c      2009-03-25 16:11:38.000000000 +0000
-@@ -66,7 +66,7 @@ int ocfs2_write_block(struct ocfs2_super
+diff -r 9608d5473017 fs/ocfs2/buffer_head_io.c
+--- a/fs/ocfs2/buffer_head_io.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/buffer_head_io.c        Wed May 06 16:56:51 2009 +0100
+@@ -66,7 +66,7 @@
        /* remove from dirty list before I/O. */
        clear_buffer_dirty(bh);
  
@@ -1013427,7 +1013346,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
        bh->b_end_io = end_buffer_write_sync;
        submit_bh(WRITE, bh);
  
-@@ -88,22 +88,98 @@ out:
+@@ -88,22 +88,98 @@
        return ret;
  }
  
@@ -1013436,8 +1013355,9 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
 -                    struct inode *inode)
 +int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
 +                         unsigned int nr, struct buffer_head *bhs[])
-+{
-+      int status = 0;
+ {
+       int status = 0;
+-      struct super_block *sb;
 +      unsigned int i;
 +      struct buffer_head *bh;
 +
@@ -1013513,9 +1013433,8 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
 +
 +int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
 +                    struct buffer_head *bhs[], int flags)
- {
-       int status = 0;
--      struct super_block *sb;
++{
++      int status = 0;
        int i, ignore_cache = 0;
        struct buffer_head *bh;
  
@@ -1013534,7 +1013453,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
                status = -EINVAL;
                mlog_errno(status);
                goto bail;
-@@ -122,26 +198,19 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -122,26 +198,19 @@
                goto bail;
        }
  
@@ -1013565,7 +1013484,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
  
                /* There are three read-ahead cases here which we need to
                 * be concerned with. All three assume a buffer has
-@@ -167,26 +236,25 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -167,26 +236,25 @@
                 *    before our is-it-in-flight check.
                 */
  
@@ -1013597,7 +1013516,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
                        if (buffer_dirty(bh)) {
                                /* This should probably be a BUG, or
                                 * at least return an error. */
-@@ -221,7 +289,7 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -221,7 +289,7 @@
                         * previously read-ahead buffer may have
                         * completed I/O while we were waiting for the
                         * buffer lock. */
@@ -1013606,7 +1013525,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
                            && !(flags & OCFS2_BH_READAHEAD)
                            && ocfs2_buffer_uptodate(inode, bh)) {
                                unlock_buffer(bh);
-@@ -265,15 +333,14 @@ int ocfs2_read_blocks(struct ocfs2_super
+@@ -265,15 +333,14 @@
                /* Always set the buffer in the cache, even if it was
                 * a forced read, or read-ahead which hasn't yet
                 * completed. */
@@ -1013626,9 +1013545,9 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.c linux-2.6.27.19-5.1/fs/ocfs2/b
  
  bail:
  
-diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.h linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.h
---- linux-2.6.27/fs/ocfs2/buffer_head_io.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/buffer_head_io.h      2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/buffer_head_io.h
+--- a/fs/ocfs2/buffer_head_io.h        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/buffer_head_io.h        Wed May 06 16:56:51 2009 +0100
 @@ -31,31 +31,29 @@
  void ocfs2_end_buffer_io_sync(struct buffer_head *bh,
                             int uptodate);
@@ -1013670,7 +1013589,7 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.h linux-2.6.27.19-5.1/fs/ocfs2/b
  {
        int status = 0;
  
-@@ -65,8 +63,7 @@ static inline int ocfs2_read_block(struc
+@@ -65,8 +63,7 @@
                goto bail;
        }
  
@@ -1013680,10 +1013599,10 @@ diff -purN linux-2.6.27/fs/ocfs2/buffer_head_io.h linux-2.6.27.19-5.1/fs/ocfs2/b
  
  bail:
        return status;
-diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.c linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.c
---- linux-2.6.27/fs/ocfs2/cluster/masklog.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.c     2009-03-25 16:11:38.000000000 +0000
-@@ -109,6 +109,7 @@ static struct mlog_attribute mlog_attrs[
+diff -r 9608d5473017 fs/ocfs2/cluster/masklog.c
+--- a/fs/ocfs2/cluster/masklog.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/cluster/masklog.c       Wed May 06 16:56:51 2009 +0100
+@@ -109,6 +109,7 @@
        define_mask(CONN),
        define_mask(QUORUM),
        define_mask(EXPORT),
@@ -1013691,9 +1013610,9 @@ diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.c linux-2.6.27.19-5.1/fs/ocfs2/
        define_mask(ERROR),
        define_mask(NOTICE),
        define_mask(KTHREAD),
-diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.h linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.h
---- linux-2.6.27/fs/ocfs2/cluster/masklog.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/cluster/masklog.h     2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/cluster/masklog.h
+--- a/fs/ocfs2/cluster/masklog.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/cluster/masklog.h       Wed May 06 16:56:51 2009 +0100
 @@ -112,6 +112,8 @@
  #define ML_CONN               0x0000000004000000ULL /* net connection management */
  #define ML_QUORUM     0x0000000008000000ULL /* net connection quorum */
@@ -1013703,9 +1013622,9 @@ diff -purN linux-2.6.27/fs/ocfs2/cluster/masklog.h linux-2.6.27.19-5.1/fs/ocfs2/
  /* bits that are infrequently given and frequently matched in the high word */
  #define ML_ERROR      0x0000000100000000ULL /* sent to KERN_ERR */
  #define ML_NOTICE     0x0000000200000000ULL /* setn to KERN_NOTICE */
-diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
---- linux-2.6.27/fs/ocfs2/dir.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dir.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dir.c
+--- a/fs/ocfs2/dir.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dir.c   Wed May 06 16:56:51 2009 +0100
 @@ -40,6 +40,7 @@
  #include <linux/types.h>
  #include <linux/slab.h>
@@ -1013714,10 +1013633,11 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
  #define MLOG_MASK_PREFIX ML_NAMEI
  #include <cluster/masklog.h>
-@@ -82,6 +83,49 @@ static int ocfs2_do_extend_dir(struct su
+@@ -81,6 +82,49 @@
+                              struct ocfs2_alloc_context *data_ac,
                               struct ocfs2_alloc_context *meta_ac,
                               struct buffer_head **new_bh);
++
 +struct buffer_head *ocfs2_bread(struct inode *inode,
 +                              int block, int *err, int reada)
 +{
@@ -1013760,11 +1013680,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
 +      *err = -EIO;
 +      return NULL;
 +}
-+
  /*
   * bh passed here can be an inode block or a dir data block, depending
-  * on the inode inline data flag.
-@@ -188,8 +232,7 @@ static struct buffer_head *ocfs2_find_en
+@@ -188,8 +232,7 @@
        struct ocfs2_dinode *di;
        struct ocfs2_inline_data *data;
  
@@ -1013774,7 +1013693,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        if (ret) {
                mlog_errno(ret);
                goto out;
-@@ -260,14 +303,13 @@ restart:
+@@ -260,14 +303,13 @@
                }
                if ((bh = bh_use[ra_ptr++]) == NULL)
                        goto next;
@@ -1013792,7 +1013711,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                        goto next;
                }
                i = ocfs2_search_dirblock(bh, dir, name, namelen,
-@@ -417,8 +459,7 @@ static inline int ocfs2_delete_entry_id(
+@@ -417,8 +459,7 @@
        struct ocfs2_dinode *di;
        struct ocfs2_inline_data *data;
  
@@ -1013802,7 +1013721,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        if (ret) {
                mlog_errno(ret);
                goto out;
-@@ -596,8 +637,7 @@ static int ocfs2_dir_foreach_blk_id(stru
+@@ -596,8 +637,7 @@
        struct ocfs2_inline_data *data;
        struct ocfs2_dir_entry *de;
  
@@ -1013812,7 +1013731,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        if (ret) {
                mlog(ML_ERROR, "Unable to read inode block for dir %llu\n",
                     (unsigned long long)OCFS2_I(inode)->ip_blkno);
-@@ -716,8 +756,7 @@ static int ocfs2_dir_foreach_blk_el(stru
+@@ -716,8 +756,7 @@
                        for (i = ra_sectors >> (sb->s_blocksize_bits - 9);
                             i > 0; i--) {
                                tmp = ocfs2_bread(inode, ++blk, &err, 1);
@@ -1013822,7 +1013741,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                        }
                        last_ra_blk = blk;
                        ra_sectors = 8;
-@@ -899,10 +938,8 @@ int ocfs2_find_files_on_disk(const char 
+@@ -899,10 +938,8 @@
  leave:
        if (status < 0) {
                *dirent = NULL;
@@ -1013835,7 +1013754,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        }
  
        mlog_exit(status);
-@@ -951,8 +988,7 @@ int ocfs2_check_dir_for_entry(struct ino
+@@ -951,8 +988,7 @@
  
        ret = 0;
  bail:
@@ -1013845,7 +1013764,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        mlog_exit(ret);
        return ret;
-@@ -1127,8 +1163,7 @@ static int ocfs2_fill_new_dir_el(struct 
+@@ -1127,8 +1163,7 @@
  
        status = 0;
  bail:
@@ -1013855,7 +1013774,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        mlog_exit(status);
        return status;
-@@ -1182,9 +1217,9 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1182,9 +1217,9 @@
                                   unsigned int blocks_wanted,
                                   struct buffer_head **first_block_bh)
  {
@@ -1013866,7 +1013785,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        u64 blkno, bytes = blocks_wanted << sb->s_blocksize_bits;
        struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
        struct ocfs2_inode_info *oi = OCFS2_I(dir);
-@@ -1192,6 +1227,10 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1192,6 +1227,10 @@
        struct buffer_head *dirdata_bh = NULL;
        struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
        handle_t *handle;
@@ -1013877,7 +1013796,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        alloc = ocfs2_clusters_for_bytes(sb, bytes);
  
-@@ -1227,6 +1266,12 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1227,6 +1266,12 @@
                goto out_sem;
        }
  
@@ -1013890,7 +1013809,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        /*
         * Try to claim as many clusters as the bitmap can give though
         * if we only get one now, that's enough to continue. The rest
-@@ -1305,8 +1350,8 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1305,8 +1350,8 @@
         * This should never fail as our extent list is empty and all
         * related blocks have been journaled already.
         */
@@ -1013901,7 +1013820,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        if (ret) {
                mlog_errno(ret);
                goto out_commit;
-@@ -1337,8 +1382,8 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1337,8 +1382,8 @@
                }
                blkno = ocfs2_clusters_to_blocks(dir->i_sb, bit_off);
  
@@ -1013912,7 +1013831,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                if (ret) {
                        mlog_errno(ret);
                        goto out_commit;
-@@ -1349,6 +1394,9 @@ static int ocfs2_expand_inline_dir(struc
+@@ -1349,6 +1394,9 @@
        dirdata_bh = NULL;
  
  out_commit:
@@ -1013922,7 +1013841,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        ocfs2_commit_trans(osb, handle);
  
  out_sem:
-@@ -1373,7 +1421,7 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1373,7 +1421,7 @@
                               struct buffer_head **new_bh)
  {
        int status;
@@ -1013931,7 +1013850,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        u64 p_blkno, v_blkno;
  
        spin_lock(&OCFS2_I(dir)->ip_lock);
-@@ -1383,9 +1431,16 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1383,9 +1431,16 @@
        if (extend) {
                u32 offset = OCFS2_I(dir)->ip_clusters;
  
@@ -1013951,7 +1013870,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                BUG_ON(status == -EAGAIN);
                if (status < 0) {
                        mlog_errno(status);
-@@ -1408,6 +1463,8 @@ static int ocfs2_do_extend_dir(struct su
+@@ -1408,6 +1463,8 @@
        }
        status = 0;
  bail:
@@ -1013960,7 +1013879,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        mlog_exit(status);
        return status;
  }
-@@ -1430,12 +1487,14 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1430,12 +1487,14 @@
        int credits, num_free_extents, drop_alloc_sem = 0;
        loff_t dir_i_size;
        struct ocfs2_dinode *fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;
@@ -1013975,7 +1013894,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        mlog_entry_void();
  
-@@ -1479,7 +1538,8 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1479,7 +1538,8 @@
        spin_lock(&OCFS2_I(dir)->ip_lock);
        if (dir_i_size == ocfs2_clusters_to_bytes(sb, OCFS2_I(dir)->ip_clusters)) {
                spin_unlock(&OCFS2_I(dir)->ip_lock);
@@ -1013985,7 +1013904,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                if (num_free_extents < 0) {
                        status = num_free_extents;
                        mlog_errno(status);
-@@ -1487,7 +1547,7 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1487,7 +1547,7 @@
                }
  
                if (!num_free_extents) {
@@ -1013994,7 +1013913,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
                        if (status < 0) {
                                if (status != -ENOSPC)
                                        mlog_errno(status);
-@@ -1502,7 +1562,7 @@ static int ocfs2_extend_dir(struct ocfs2
+@@ -1502,7 +1562,7 @@
                        goto bail;
                }
  
@@ -1014003,7 +1013922,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
        } else {
                spin_unlock(&OCFS2_I(dir)->ip_lock);
                credits = OCFS2_SIMPLE_DIR_EXTEND_CREDITS;
-@@ -1568,8 +1628,7 @@ bail:
+@@ -1568,8 +1628,7 @@
        if (meta_ac)
                ocfs2_free_alloc_context(meta_ac);
  
@@ -1014013,7 +1013932,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        mlog_exit(status);
        return status;
-@@ -1696,8 +1755,7 @@ static int ocfs2_find_dir_space_el(struc
+@@ -1696,8 +1755,7 @@
  
        status = 0;
  bail:
@@ -1014023,7 +1013942,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
  
        mlog_exit(status);
        return status;
-@@ -1756,7 +1814,6 @@ int ocfs2_prepare_dir_for_insert(struct 
+@@ -1756,7 +1814,6 @@
        *ret_de_bh = bh;
        bh = NULL;
  out:
@@ -1014032,10 +1013951,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dir.c linux-2.6.27.19-5.1/fs/ocfs2/dir.c
 +      brelse(bh);
        return ret;
  }
-diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmfs.c linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmfs.c
---- linux-2.6.27/fs/ocfs2/dlm/dlmfs.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmfs.c   2009-03-25 16:11:38.000000000 +0000
-@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
+diff -r 9608d5473017 fs/ocfs2/dlm/dlmfs.c
+--- a/fs/ocfs2/dlm/dlmfs.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/dlmfs.c     Wed May 06 16:56:51 2009 +0100
+@@ -608,8 +608,10 @@
                                0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
                                        SLAB_MEM_SPREAD),
                                dlmfs_init_once);
@@ -1014047,10 +1013966,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmfs.c linux-2.6.27.19-5.1/fs/ocfs2/dlm/dl
        cleanup_inode = 1;
  
        user_dlm_worker = create_singlethread_workqueue("user_dlm");
-diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmthread.c linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmthread.c
---- linux-2.6.27/fs/ocfs2/dlm/dlmthread.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/dlmthread.c       2009-03-25 16:11:38.000000000 +0000
-@@ -181,7 +181,8 @@ static int dlm_purge_lockres(struct dlm_
+diff -r 9608d5473017 fs/ocfs2/dlm/dlmthread.c
+--- a/fs/ocfs2/dlm/dlmthread.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/dlmthread.c Wed May 06 16:56:51 2009 +0100
+@@ -181,7 +181,8 @@
  
                spin_lock(&res->spinlock);
                /* This ensures that clear refmap is sent after the set */
@@ -1014060,9 +1013979,9 @@ diff -purN linux-2.6.27/fs/ocfs2/dlm/dlmthread.c linux-2.6.27.19-5.1/fs/ocfs2/dl
                spin_unlock(&res->spinlock);
  
                /* clear our bit from the master's refmap, ignore errors */
-diff -purN linux-2.6.27/fs/ocfs2/dlm/userdlm.h linux-2.6.27.19-5.1/fs/ocfs2/dlm/userdlm.h
---- linux-2.6.27/fs/ocfs2/dlm/userdlm.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlm/userdlm.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dlm/userdlm.h
+--- a/fs/ocfs2/dlm/userdlm.h   Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlm/userdlm.h   Wed May 06 16:56:51 2009 +0100
 @@ -33,7 +33,7 @@
  #include <linux/workqueue.h>
  
@@ -1014072,9 +1013991,9 @@ diff -purN linux-2.6.27/fs/ocfs2/dlm/userdlm.h linux-2.6.27.19-5.1/fs/ocfs2/dlm/
                                               * the lvb */
  #define USER_LOCK_BUSY          (0x00000002) /* we are currently in
                                               * dlm_lock */
-diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.c
---- linux-2.6.27/fs/ocfs2/dlmglue.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.c     2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/dlmglue.c
+--- a/fs/ocfs2/dlmglue.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlmglue.c       Wed May 06 16:56:51 2009 +0100
 @@ -32,6 +32,7 @@
  #include <linux/debugfs.h>
  #include <linux/seq_file.h>
@@ -1014091,7 +1014010,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  
  #include "buffer_head_io.h"
  
-@@ -68,6 +70,7 @@ struct ocfs2_mask_waiter {
+@@ -68,6 +70,7 @@
  static struct ocfs2_super *ocfs2_get_dentry_osb(struct ocfs2_lock_res *lockres);
  static struct ocfs2_super *ocfs2_get_inode_osb(struct ocfs2_lock_res *lockres);
  static struct ocfs2_super *ocfs2_get_file_osb(struct ocfs2_lock_res *lockres);
@@ -1014099,7 +1014018,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  
  /*
   * Return value from ->downconvert_worker functions.
-@@ -102,6 +105,7 @@ static int ocfs2_dentry_convert_worker(s
+@@ -102,6 +105,7 @@
  static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
                                     struct ocfs2_lock_res *lockres);
  
@@ -1014107,7 +1014026,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  
  #define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
  
-@@ -258,6 +262,12 @@ static struct ocfs2_lock_res_ops ocfs2_f
+@@ -258,6 +262,12 @@
        .flags          = 0,
  };
  
@@ -1014120,21 +1014039,21 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  static inline int ocfs2_is_inode_lock(struct ocfs2_lock_res *lockres)
  {
        return lockres->l_type == OCFS2_LOCK_TYPE_META ||
-@@ -279,6 +289,13 @@ static inline struct ocfs2_dentry_lock *
-       return (struct ocfs2_dentry_lock *)lockres->l_priv;
- }
+@@ -277,6 +287,13 @@
+       BUG_ON(lockres->l_type != OCFS2_LOCK_TYPE_DENTRY);
  
+       return (struct ocfs2_dentry_lock *)lockres->l_priv;
++}
++
 +static inline struct ocfs2_mem_dqinfo *ocfs2_lock_res_qinfo(struct ocfs2_lock_res *lockres)
 +{
 +      BUG_ON(lockres->l_type != OCFS2_LOCK_TYPE_QINFO);
 +
 +      return (struct ocfs2_mem_dqinfo *)lockres->l_priv;
-+}
-+
+ }
  static inline struct ocfs2_super *ocfs2_get_lockres_osb(struct ocfs2_lock_res *lockres)
- {
-       if (lockres->l_ops->get_osb)
-@@ -507,6 +524,13 @@ static struct ocfs2_super *ocfs2_get_ino
+@@ -507,6 +524,13 @@
        return OCFS2_SB(inode->i_sb);
  }
  
@@ -1014148,10 +1014067,12 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  static struct ocfs2_super *ocfs2_get_file_osb(struct ocfs2_lock_res *lockres)
  {
        struct ocfs2_file_private *fp = lockres->l_priv;
-@@ -609,6 +633,17 @@ void ocfs2_file_lock_res_init(struct ocf
+@@ -607,6 +631,17 @@
+                                  OCFS2_LOCK_TYPE_FLOCK, &ocfs2_flock_lops,
+                                  fp);
        lockres->l_flags |= OCFS2_LOCK_NOCACHE;
- }
++}
++
 +void ocfs2_qinfo_lock_res_init(struct ocfs2_lock_res *lockres,
 +                             struct ocfs2_mem_dqinfo *info)
 +{
@@ -1014161,12 +1014082,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
 +      ocfs2_lock_res_init_common(OCFS2_SB(info->dqi_gi.dqi_sb), lockres,
 +                                 OCFS2_LOCK_TYPE_QINFO, &ocfs2_qinfo_lops,
 +                                 info);
-+}
-+
+ }
  void ocfs2_lock_res_free(struct ocfs2_lock_res *res)
- {
-       mlog_entry_void();
-@@ -2024,8 +2059,7 @@ static int ocfs2_inode_lock_update(struc
+@@ -2024,8 +2059,7 @@
        } else {
                /* Boo, we have to go to disk. */
                /* read bh, cast, ocfs2_refresh_inode */
@@ -1014176,7 +1014095,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
                if (status < 0) {
                        mlog_errno(status);
                        goto bail_refresh;
-@@ -2086,11 +2120,7 @@ static int ocfs2_assign_bh(struct inode 
+@@ -2086,11 +2120,7 @@
                return 0;
        }
  
@@ -1014189,18 +1014108,18 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
        if (status < 0)
                mlog_errno(status);
  
-@@ -2846,9 +2876,8 @@ static void ocfs2_unlock_ast(void *opaqu
+@@ -2846,9 +2876,8 @@
  
        lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
        lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
--      spin_unlock_irqrestore(&lockres->l_lock, flags);
++      wake_up(&lockres->l_event);
+       spin_unlock_irqrestore(&lockres->l_lock, flags);
 -
-       wake_up(&lockres->l_event);
-+      spin_unlock_irqrestore(&lockres->l_lock, flags);
+-      wake_up(&lockres->l_event);
  
        mlog_exit_void();
  }
-@@ -3455,6 +3484,108 @@ static int ocfs2_dentry_convert_worker(s
+@@ -3455,6 +3484,108 @@
        return UNBLOCK_CONTINUE_POST;
  }
  
@@ -1014309,10 +1014228,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.c linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  /*
   * This is the filesystem locking protocol.  It provides the lock handling
   * hooks for the underlying DLM.  It has a maximum version number.
-diff -purN linux-2.6.27/fs/ocfs2/dlmglue.h linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.h
---- linux-2.6.27/fs/ocfs2/dlmglue.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.h     2009-03-25 16:11:38.000000000 +0000
-@@ -49,6 +49,17 @@ struct ocfs2_meta_lvb {
+diff -r 9608d5473017 fs/ocfs2/dlmglue.h
+--- a/fs/ocfs2/dlmglue.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/dlmglue.h       Wed May 06 16:56:51 2009 +0100
+@@ -49,6 +49,17 @@
        __be32       lvb_reserved2;
  };
  
@@ -1014330,7 +1014249,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.h linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  /* ocfs2_inode_lock_full() 'arg_flags' flags */
  /* don't wait on recovery. */
  #define OCFS2_META_LOCK_RECOVERY      (0x01)
-@@ -69,6 +80,9 @@ void ocfs2_dentry_lock_res_init(struct o
+@@ -69,6 +80,9 @@
  struct ocfs2_file_private;
  void ocfs2_file_lock_res_init(struct ocfs2_lock_res *lockres,
                              struct ocfs2_file_private *fp);
@@ -1014340,7 +1014259,7 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.h linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  void ocfs2_lock_res_free(struct ocfs2_lock_res *res);
  int ocfs2_create_new_inode_locks(struct inode *inode);
  int ocfs2_drop_inode_locks(struct inode *inode);
-@@ -103,6 +117,9 @@ int ocfs2_dentry_lock(struct dentry *den
+@@ -103,6 +117,9 @@
  void ocfs2_dentry_unlock(struct dentry *dentry, int ex);
  int ocfs2_file_lock(struct file *file, int ex, int trylock);
  void ocfs2_file_unlock(struct file *file);
@@ -1014350,10 +1014269,10 @@ diff -purN linux-2.6.27/fs/ocfs2/dlmglue.h linux-2.6.27.19-5.1/fs/ocfs2/dlmglue.
  
  void ocfs2_mark_lockres_freeing(struct ocfs2_lock_res *lockres);
  void ocfs2_simple_drop_lockres(struct ocfs2_super *osb,
-diff -purN linux-2.6.27/fs/ocfs2/extent_map.c linux-2.6.27.19-5.1/fs/ocfs2/extent_map.c
---- linux-2.6.27/fs/ocfs2/extent_map.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/extent_map.c  2009-03-25 16:11:38.000000000 +0000
-@@ -335,9 +335,9 @@ static int ocfs2_figure_hole_clusters(st
+diff -r 9608d5473017 fs/ocfs2/extent_map.c
+--- a/fs/ocfs2/extent_map.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/extent_map.c    Wed May 06 16:56:51 2009 +0100
+@@ -335,9 +335,9 @@
                if (le64_to_cpu(eb->h_next_leaf_blk) == 0ULL)
                        goto no_more_extents;
  
@@ -1014365,7 +1014284,7 @@ diff -purN linux-2.6.27/fs/ocfs2/extent_map.c linux-2.6.27.19-5.1/fs/ocfs2/exten
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -373,6 +373,66 @@ out:
+@@ -373,6 +373,66 @@
        return ret;
  }
  
@@ -1014432,7 +1014351,7 @@ diff -purN linux-2.6.27/fs/ocfs2/extent_map.c linux-2.6.27.19-5.1/fs/ocfs2/exten
  int ocfs2_get_clusters(struct inode *inode, u32 v_cluster,
                       u32 *p_cluster, u32 *num_clusters,
                       unsigned int *extent_flags)
-@@ -398,8 +458,7 @@ int ocfs2_get_clusters(struct inode *ino
+@@ -398,8 +458,7 @@
        if (ret == 0)
                goto out;
  
@@ -1014442,10 +1014361,10 @@ diff -purN linux-2.6.27/fs/ocfs2/extent_map.c linux-2.6.27.19-5.1/fs/ocfs2/exten
        if (ret) {
                mlog_errno(ret);
                goto out;
-diff -purN linux-2.6.27/fs/ocfs2/extent_map.h linux-2.6.27.19-5.1/fs/ocfs2/extent_map.h
---- linux-2.6.27/fs/ocfs2/extent_map.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/extent_map.h  2009-03-25 16:11:38.000000000 +0000
-@@ -50,4 +50,7 @@ int ocfs2_get_clusters(struct inode *ino
+diff -r 9608d5473017 fs/ocfs2/extent_map.h
+--- a/fs/ocfs2/extent_map.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/extent_map.h    Wed May 06 16:56:51 2009 +0100
+@@ -50,4 +50,7 @@
  int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,
                                u64 *ret_count, unsigned int *extent_flags);
  
@@ -1014453,9 +1014372,9 @@ diff -purN linux-2.6.27/fs/ocfs2/extent_map.h linux-2.6.27.19-5.1/fs/ocfs2/exten
 +                           u32 *p_cluster, u32 *num_clusters,
 +                           struct ocfs2_extent_list *el);
  #endif  /* _EXTENT_MAP_H */
-diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
---- linux-2.6.27/fs/ocfs2/file.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/file.c        2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/file.c
+--- a/fs/ocfs2/file.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/file.c  Wed May 06 16:56:51 2009 +0100
 @@ -35,6 +35,7 @@
  #include <linux/mount.h>
  #include <linux/writeback.h>
@@ -1014474,7 +1014393,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
  #include "buffer_head_io.h"
  
-@@ -184,7 +188,7 @@ static int ocfs2_sync_file(struct file *
+@@ -184,7 +188,7 @@
                goto bail;
  
        journal = osb->journal->j_journal;
@@ -1014483,7 +1014402,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
  bail:
        mlog_exit(err);
-@@ -246,8 +250,8 @@ int ocfs2_update_inode_atime(struct inod
+@@ -246,8 +250,8 @@
        mlog_entry_void();
  
        handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
@@ -1014494,7 +1014413,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                mlog_errno(ret);
                goto out;
        }
-@@ -302,17 +306,17 @@ bail:
+@@ -302,17 +306,17 @@
        return status;
  }
  
@@ -1014517,7 +1014436,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                mlog_errno(ret);
                goto out;
        }
-@@ -488,7 +492,7 @@ bail:
+@@ -488,7 +492,7 @@
  }
  
  /*
@@ -1014526,7 +1014445,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
   * we'll update all the disk stuff, and oip->alloc_size
   *
   * expect stuff to be locked, a transaction started and enough data /
-@@ -497,189 +501,25 @@ bail:
+@@ -497,189 +501,25 @@
   * Will return -EAGAIN, and a reason if a restart is needed.
   * If passed in, *reason will always be set, even in error.
   */
@@ -1014558,7 +1014477,9 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
 -      u32 bit_off, num_bits;
 -      u64 block;
 -      u8 flags = 0;
--
++      int ret;
++      struct ocfs2_extent_tree et;
 -      BUG_ON(!clusters_to_add);
 -
 -      if (mark_unwritten)
@@ -1014711,9 +1014632,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
 -                      mlog_errno(ret);
 -              goto out;
 -      }
-+      int ret;
-+      struct ocfs2_extent_tree et;
+-
 -out:
 -      if (ret) {
 -              if (*meta_ac) {
@@ -1014733,7 +1014652,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        return ret;
  }
-@@ -698,6 +538,9 @@ static int __ocfs2_extend_allocation(str
+@@ -698,6 +538,9 @@
        struct ocfs2_alloc_context *meta_ac = NULL;
        enum ocfs2_alloc_restarted why;
        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
@@ -1014743,7 +1014662,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        mlog_entry("(clusters_to_add = %u)\n", clusters_to_add);
  
-@@ -707,8 +550,7 @@ static int __ocfs2_extend_allocation(str
+@@ -707,8 +550,7 @@
         */
        BUG_ON(mark_unwritten && !ocfs2_sparse_alloc(osb));
  
@@ -1014753,7 +1014672,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        if (status < 0) {
                mlog_errno(status);
                goto leave;
-@@ -724,14 +566,21 @@ static int __ocfs2_extend_allocation(str
+@@ -724,14 +566,21 @@
  restart_all:
        BUG_ON(le32_to_cpu(fe->i_clusters) != OCFS2_I(inode)->ip_clusters);
  
@@ -1014778,7 +1014697,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        handle = ocfs2_start_trans(osb, credits);
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
-@@ -740,6 +589,12 @@ restart_all:
+@@ -740,6 +589,12 @@
                goto leave;
        }
  
@@ -1014791,7 +1014710,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  restarted_transaction:
        /* reserve a write to the file entry early on - that we if we
         * run out of credits in the allocation path, we can still
-@@ -753,16 +608,16 @@ restarted_transaction:
+@@ -753,16 +608,16 @@
  
        prev_clusters = OCFS2_I(inode)->ip_clusters;
  
@@ -1014818,7 +1014737,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        if ((status < 0) && (status != -EAGAIN)) {
                if (status != -ENOSPC)
                        mlog_errno(status);
-@@ -789,7 +644,7 @@ restarted_transaction:
+@@ -789,7 +644,7 @@
                        mlog(0, "restarting transaction.\n");
                        /* TODO: This can be more intelligent. */
                        credits = ocfs2_calc_extend_credits(osb->sb,
@@ -1014827,7 +1014746,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                                                            clusters_to_add);
                        status = ocfs2_extend_trans(handle, credits);
                        if (status < 0) {
-@@ -810,6 +665,9 @@ restarted_transaction:
+@@ -810,6 +665,9 @@
             OCFS2_I(inode)->ip_clusters, (long long)i_size_read(inode));
  
  leave:
@@ -1014837,7 +1014756,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        if (handle) {
                ocfs2_commit_trans(osb, handle);
                handle = NULL;
-@@ -826,10 +684,8 @@ leave:
+@@ -826,10 +684,8 @@
                restart_func = 0;
                goto restart_all;
        }
@@ -1014850,7 +1014769,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        mlog_exit(status);
        return status;
-@@ -837,8 +693,7 @@ leave:
+@@ -837,8 +693,7 @@
  
  /* Some parts of this taken from generic_cont_expand, which turned out
   * to be too fragile to do exactly what we need without us having to
@@ -1014860,7 +1014779,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  static int ocfs2_write_zero_page(struct inode *inode,
                                 u64 size)
  {
-@@ -1044,6 +899,9 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1044,6 +899,9 @@
        struct ocfs2_super *osb = OCFS2_SB(sb);
        struct buffer_head *bh = NULL;
        handle_t *handle = NULL;
@@ -1014870,7 +1014789,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        mlog_entry("(0x%p, '%.*s')\n", dentry,
                   dentry->d_name.len, dentry->d_name.name);
-@@ -1096,9 +954,15 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1096,9 +954,15 @@
                        goto bail_unlock;
                }
  
@@ -1014888,7 +1014807,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                        status = ocfs2_extend_file(inode, bh, attr->ia_size);
                if (status < 0) {
                        if (status != -ENOSPC)
-@@ -1108,11 +972,47 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1108,11 +972,47 @@
                }
        }
  
@@ -1014941,7 +1014860,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        }
  
        /*
-@@ -1135,13 +1035,24 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1135,13 +1035,24 @@
  bail_commit:
        ocfs2_commit_trans(osb, handle);
  bail_unlock:
@@ -1014968,7 +1014887,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        mlog_exit(status);
        return status;
-@@ -1189,7 +1100,7 @@ int ocfs2_permission(struct inode *inode
+@@ -1189,7 +1100,7 @@
                goto out;
        }
  
@@ -1014977,7 +1014896,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  
        ocfs2_inode_unlock(inode, 0);
  out:
-@@ -1209,8 +1120,8 @@ static int __ocfs2_write_remove_suid(str
+@@ -1209,8 +1120,8 @@
                   (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_mode);
  
        handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
@@ -1014988,7 +1014907,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                mlog_errno(ret);
                goto out;
        }
-@@ -1284,8 +1195,7 @@ static int ocfs2_write_remove_suid(struc
+@@ -1284,8 +1195,7 @@
        struct buffer_head *bh = NULL;
        struct ocfs2_inode_info *oi = OCFS2_I(inode);
  
@@ -1014998,7 +1014917,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        if (ret < 0) {
                mlog_errno(ret);
                goto out;
-@@ -1311,9 +1221,8 @@ static int ocfs2_allocate_unwritten_exte
+@@ -1311,9 +1221,8 @@
        struct buffer_head *di_bh = NULL;
  
        if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
@@ -1015010,7 +1014929,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                if (ret) {
                        mlog_errno(ret);
                        goto out;
-@@ -1382,80 +1291,6 @@ out:
+@@ -1382,80 +1291,6 @@
        return ret;
  }
  
@@ -1015091,7 +1015010,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
  /*
   * Truncate a byte range, avoiding pages within partial clusters. This
   * preserves those pages for the zeroing code to write to.
-@@ -1505,8 +1340,8 @@ static int ocfs2_zero_partial_clusters(s
+@@ -1505,8 +1340,8 @@
                goto out;
  
        handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
@@ -1015102,7 +1015021,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                mlog_errno(ret);
                goto out;
        }
-@@ -1555,7 +1390,9 @@ static int ocfs2_remove_inode_range(stru
+@@ -1555,7 +1390,9 @@
        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
        struct ocfs2_cached_dealloc_ctxt dealloc;
        struct address_space *mapping = inode->i_mapping;
@@ -1015112,7 +1015031,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        ocfs2_init_dealloc_ctxt(&dealloc);
  
        if (byte_len == 0)
-@@ -1611,9 +1448,9 @@ static int ocfs2_remove_inode_range(stru
+@@ -1611,9 +1448,9 @@
  
                /* Only do work for non-holes */
                if (phys_cpos != 0) {
@@ -1015125,7 +1015044,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                        if (ret) {
                                mlog_errno(ret);
                                goto out;
-@@ -2019,6 +1856,13 @@ relock:
+@@ -2019,6 +1856,13 @@
                written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
                                                    ppos, count, ocount);
                if (written < 0) {
@@ -1015139,7 +1015058,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                        ret = written;
                        goto out_dio;
                }
-@@ -2040,7 +1884,7 @@ out_dio:
+@@ -2040,7 +1884,7 @@
                 */
                if (old_size != i_size_read(inode) ||
                    old_clusters != OCFS2_I(inode)->ip_clusters) {
@@ -1015148,7 +1015067,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
                        if (ret < 0)
                                written = ret;
                }
-@@ -2227,6 +2071,10 @@ const struct inode_operations ocfs2_file
+@@ -2227,6 +2071,10 @@
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
@@ -1015159,7 +1015078,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
        .fallocate      = ocfs2_fallocate,
  };
  
-@@ -2236,6 +2084,10 @@ const struct inode_operations ocfs2_spec
+@@ -2236,7 +2084,58 @@
        .permission     = ocfs2_permission,
  };
  
@@ -1015168,37 +1015087,6 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
 + * ocfs2_fops_no_plocks and ocfs2_dops_no_plocks!
 + */
  const struct file_operations ocfs2_fops = {
-       .llseek         = generic_file_llseek,
-       .read           = do_sync_read,
-@@ -2250,6 +2102,7 @@ const struct file_operations ocfs2_fops 
- #ifdef CONFIG_COMPAT
-       .compat_ioctl   = ocfs2_compat_ioctl,
- #endif
-+      .lock           = ocfs2_lock,
-       .flock          = ocfs2_flock,
-       .splice_read    = ocfs2_file_splice_read,
-       .splice_write   = ocfs2_file_splice_write,
-@@ -2266,5 +2119,51 @@ const struct file_operations ocfs2_dops 
- #ifdef CONFIG_COMPAT
-       .compat_ioctl   = ocfs2_compat_ioctl,
- #endif
-+      .lock           = ocfs2_lock,
-+      .flock          = ocfs2_flock,
-+};
-+
-+/*
-+ * POSIX-lockless variants of our file_operations.
-+ *
-+ * These will be used if the underlying cluster stack does not support
-+ * posix file locking, if the user passes the "localflocks" mount
-+ * option, or if we have a local-only fs.
-+ *
-+ * ocfs2_flock is in here because all stacks handle UNIX file locks,
-+ * so we still want it in the case of no stack support for
-+ * plocks. Internally, it will do the right thing when asked to ignore
-+ * the cluster.
-+ */
-+const struct file_operations ocfs2_fops_no_plocks = {
 +      .llseek         = generic_file_llseek,
 +      .read           = do_sync_read,
 +      .write          = do_sync_write,
@@ -1015212,12 +1015100,13 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
 +#ifdef CONFIG_COMPAT
 +      .compat_ioctl   = ocfs2_compat_ioctl,
 +#endif
++      .lock           = ocfs2_lock,
 +      .flock          = ocfs2_flock,
 +      .splice_read    = ocfs2_file_splice_read,
 +      .splice_write   = ocfs2_file_splice_write,
 +};
 +
-+const struct file_operations ocfs2_dops_no_plocks = {
++const struct file_operations ocfs2_dops = {
 +      .llseek         = generic_file_llseek,
 +      .read           = generic_read_dir,
 +      .readdir        = ocfs2_readdir,
@@ -1015228,11 +1015117,38 @@ diff -purN linux-2.6.27/fs/ocfs2/file.c linux-2.6.27.19-5.1/fs/ocfs2/file.c
 +#ifdef CONFIG_COMPAT
 +      .compat_ioctl   = ocfs2_compat_ioctl,
 +#endif
-       .flock          = ocfs2_flock,
++      .lock           = ocfs2_lock,
++      .flock          = ocfs2_flock,
++};
++
++/*
++ * POSIX-lockless variants of our file_operations.
++ *
++ * These will be used if the underlying cluster stack does not support
++ * posix file locking, if the user passes the "localflocks" mount
++ * option, or if we have a local-only fs.
++ *
++ * ocfs2_flock is in here because all stacks handle UNIX file locks,
++ * so we still want it in the case of no stack support for
++ * plocks. Internally, it will do the right thing when asked to ignore
++ * the cluster.
++ */
++const struct file_operations ocfs2_fops_no_plocks = {
+       .llseek         = generic_file_llseek,
+       .read           = do_sync_read,
+       .write          = do_sync_write,
+@@ -2255,7 +2154,7 @@
+       .splice_write   = ocfs2_file_splice_write,
  };
-diff -purN linux-2.6.27/fs/ocfs2/file.h linux-2.6.27.19-5.1/fs/ocfs2/file.h
---- linux-2.6.27/fs/ocfs2/file.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/file.h        2009-03-25 16:11:38.000000000 +0000
+-const struct file_operations ocfs2_dops = {
++const struct file_operations ocfs2_dops_no_plocks = {
+       .llseek         = generic_file_llseek,
+       .read           = generic_read_dir,
+       .readdir        = ocfs2_readdir,
+diff -r 9608d5473017 fs/ocfs2/file.h
+--- a/fs/ocfs2/file.h  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/file.h  Wed May 06 16:56:51 2009 +0100
 @@ -28,9 +28,12 @@
  
  extern const struct file_operations ocfs2_fops;
@@ -1015246,7 +1015162,7 @@ diff -purN linux-2.6.27/fs/ocfs2/file.h linux-2.6.27.19-5.1/fs/ocfs2/file.h
  
  struct ocfs2_file_private {
        struct file             *fp_file;
-@@ -38,27 +41,21 @@ struct ocfs2_file_private {
+@@ -38,27 +41,21 @@
        struct ocfs2_lock_res   fp_flock;
  };
  
@@ -1015287,9 +1015203,9 @@ diff -purN linux-2.6.27/fs/ocfs2/file.h linux-2.6.27.19-5.1/fs/ocfs2/file.h
  int ocfs2_setattr(struct dentry *dentry, struct iattr *attr);
  int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
                  struct kstat *stat);
-diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
---- linux-2.6.27/fs/ocfs2/inode.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/inode.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/inode.c
+--- a/fs/ocfs2/inode.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/inode.c Wed May 06 16:56:51 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/slab.h>
  #include <linux/highmem.h>
@@ -1015306,7 +1015222,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
  
  #include "buffer_head_io.h"
  
-@@ -219,6 +221,7 @@ int ocfs2_populate_inode(struct inode *i
+@@ -219,12 +221,17 @@
        struct super_block *sb;
        struct ocfs2_super *osb;
        int status = -EINVAL;
@@ -1015314,18 +1015230,17 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
  
        mlog_entry("(0x%p, size:%llu)\n", inode,
                   (unsigned long long)le64_to_cpu(fe->i_size));
-@@ -226,6 +229,10 @@ int ocfs2_populate_inode(struct inode *i
        sb = inode->i_sb;
        osb = OCFS2_SB(sb);
++
 +      if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) ||
 +          ocfs2_mount_local(osb) || !ocfs2_stack_supports_plocks())
 +              use_plocks = 0;
-+
        /* this means that read_inode cannot create a superblock inode
         * today.  change if needed. */
-       if (!OCFS2_IS_VALID_DINODE(fe) ||
-@@ -278,14 +285,18 @@ int ocfs2_populate_inode(struct inode *i
+@@ -278,14 +285,18 @@
  
        inode->i_nlink = le16_to_cpu(fe->i_links_count);
  
@@ -1015345,7 +1015260,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
        } else if (fe->i_flags & cpu_to_le32(OCFS2_SUPER_BLOCK_FL)) {
                mlog(0, "superblock inode: i_ino=%lu\n", inode->i_ino);
                /* we can't actually hit this as read_inode can't
-@@ -295,13 +306,19 @@ int ocfs2_populate_inode(struct inode *i
+@@ -295,13 +306,19 @@
  
        switch (inode->i_mode & S_IFMT) {
            case S_IFREG:
@@ -1015367,7 +1015282,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
                    i_size_write(inode, le64_to_cpu(fe->i_size));
                    break;
            case S_IFLNK:
-@@ -448,8 +465,11 @@ static int ocfs2_read_locked_inode(struc
+@@ -448,8 +465,11 @@
                }
        }
  
@@ -1015381,7 +1015296,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -522,6 +542,9 @@ static int ocfs2_truncate_for_delete(str
+@@ -522,6 +542,9 @@
         * data and fast symlinks.
         */
        if (fe->i_clusters) {
@@ -1015391,7 +1015306,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
                handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
                if (IS_ERR(handle)) {
                        status = PTR_ERR(handle);
-@@ -597,7 +620,8 @@ static int ocfs2_remove_inode(struct ino
+@@ -597,7 +620,8 @@
                goto bail;
        }
  
@@ -1015401,7 +1015316,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                mlog_errno(status);
-@@ -629,6 +653,7 @@ static int ocfs2_remove_inode(struct ino
+@@ -629,6 +653,7 @@
        }
  
        ocfs2_remove_from_cache(inode, di_bh);
@@ -1015409,21 +1015324,21 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
  
        status = ocfs2_free_dinode(handle, inode_alloc_inode,
                                   inode_alloc_bh, di);
-@@ -730,6 +755,13 @@ static int ocfs2_wipe_inode(struct inode
-               goto bail_unlock_dir;
-       }
-+      /*Free extended attribute resources associated with this inode.*/
-+      status = ocfs2_xattr_remove(inode, di_bh);
+@@ -725,6 +750,13 @@
+        * inode delete underneath us -- this will result in two nodes
+        * truncating the same file! */
+       status = ocfs2_truncate_for_delete(osb, inode, di_bh);
 +      if (status < 0) {
 +              mlog_errno(status);
 +              goto bail_unlock_dir;
 +      }
 +
-       status = ocfs2_remove_inode(inode, di_bh, orphan_dir_inode,
-                                   orphan_dir_bh);
-       if (status < 0)
-@@ -904,7 +936,10 @@ void ocfs2_delete_inode(struct inode *in
++      /*Free extended attribute resources associated with this inode.*/
++      status = ocfs2_xattr_remove(inode, di_bh);
+       if (status < 0) {
+               mlog_errno(status);
+               goto bail_unlock_dir;
+@@ -904,7 +936,10 @@
  
        mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino);
  
@@ -1015435,7 +1015350,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
                mlog(0, "Skipping delete of bad inode\n");
                goto bail;
        }
-@@ -1082,6 +1117,14 @@ void ocfs2_clear_inode(struct inode *ino
+@@ -1082,6 +1117,14 @@
        oi->ip_dir_start_lookup = 0;
        oi->ip_blkno = 0ULL;
  
@@ -1015450,10 +1015365,13 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
  bail:
        mlog_exit_void();
  }
-@@ -1107,58 +1150,6 @@ void ocfs2_drop_inode(struct inode *inod
- }
+@@ -1104,58 +1147,6 @@
+               generic_drop_inode(inode);
  
- /*
+       mlog_exit_void();
+-}
+-
+-/*
 - * TODO: this should probably be merged into ocfs2_get_block
 - *
 - * However, you now need to pay attention to the cont_prepare_write()
@@ -1015503,16 +1015421,13 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.c linux-2.6.27.19-5.1/fs/ocfs2/inode.c
 -      }
 -      *err = -EIO;
 -      return NULL;
--}
--
--/*
-  * This is called from our getattr.
-  */
- int ocfs2_inode_revalidate(struct dentry *dentry)
-diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
---- linux-2.6.27/fs/ocfs2/inode.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/inode.h       2009-03-25 16:11:38.000000000 +0000
-@@ -40,6 +40,9 @@ struct ocfs2_inode_info
+ }
+ /*
+diff -r 9608d5473017 fs/ocfs2/inode.h
+--- a/fs/ocfs2/inode.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/inode.h Wed May 06 16:56:51 2009 +0100
+@@ -40,6 +40,9 @@
        /* protects allocation changes on this inode. */
        struct rw_semaphore             ip_alloc_sem;
  
@@ -1015522,7 +1015437,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
        /* These fields are protected by ip_lock */
        spinlock_t                      ip_lock;
        u32                             ip_open_count;
-@@ -68,6 +71,7 @@ struct ocfs2_inode_info
+@@ -68,6 +71,7 @@
        struct ocfs2_extent_map         ip_extent_map;
  
        struct inode                    vfs_inode;
@@ -1015530,7 +1015445,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
  };
  
  /*
-@@ -113,8 +117,6 @@ extern struct kmem_cache *ocfs2_inode_ca
+@@ -113,8 +117,6 @@
  
  extern const struct address_space_operations ocfs2_aops;
  
@@ -1015539,7 +1015454,7 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
  void ocfs2_clear_inode(struct inode *inode);
  void ocfs2_delete_inode(struct inode *inode);
  void ocfs2_drop_inode(struct inode *inode);
-@@ -140,6 +142,8 @@ int ocfs2_mark_inode_dirty(handle_t *han
+@@ -140,6 +142,8 @@
                           struct buffer_head *bh);
  int ocfs2_aio_read(struct file *file, struct kiocb *req, struct iocb *iocb);
  int ocfs2_aio_write(struct file *file, struct kiocb *req, struct iocb *iocb);
@@ -1015548,10 +1015463,10 @@ diff -purN linux-2.6.27/fs/ocfs2/inode.h linux-2.6.27.19-5.1/fs/ocfs2/inode.h
  
  void ocfs2_set_inode_flags(struct inode *inode);
  void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
-diff -purN linux-2.6.27/fs/ocfs2/ioctl.c linux-2.6.27.19-5.1/fs/ocfs2/ioctl.c
---- linux-2.6.27/fs/ocfs2/ioctl.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ioctl.c       2009-03-25 16:11:38.000000000 +0000
-@@ -102,8 +102,7 @@ bail_unlock:
+diff -r 9608d5473017 fs/ocfs2/ioctl.c
+--- a/fs/ocfs2/ioctl.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ioctl.c Wed May 06 16:56:51 2009 +0100
+@@ -102,8 +102,7 @@
  bail:
        mutex_unlock(&inode->i_mutex);
  
@@ -1015561,9 +1015476,9 @@ diff -purN linux-2.6.27/fs/ocfs2/ioctl.c linux-2.6.27.19-5.1/fs/ocfs2/ioctl.c
  
        mlog_exit(status);
        return status;
-diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.c
---- linux-2.6.27/fs/ocfs2/journal.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/journal.c     2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/journal.c
+--- a/fs/ocfs2/journal.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/journal.c       Wed May 06 16:56:51 2009 +0100
 @@ -45,6 +45,7 @@
  #include "slot_map.h"
  #include "super.h"
@@ -1015572,7 +1015487,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  #include "buffer_head_io.h"
  
-@@ -52,10 +53,10 @@ DEFINE_SPINLOCK(trans_inc_lock);
+@@ -52,10 +53,10 @@
  
  static int ocfs2_force_read_journal(struct inode *inode);
  static int ocfs2_recover_node(struct ocfs2_super *osb,
@@ -1015585,10 +1015500,11 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb,
                                      int dirty, int replayed);
  static int ocfs2_trylock_journal(struct ocfs2_super *osb,
-@@ -64,6 +65,17 @@ static int ocfs2_recover_orphans(struct 
+@@ -63,6 +64,17 @@
+ static int ocfs2_recover_orphans(struct ocfs2_super *osb,
                                 int slot);
  static int ocfs2_commit_thread(void *arg);
++
 +static inline int ocfs2_wait_on_mount(struct ocfs2_super *osb)
 +{
 +      return __ocfs2_wait_on_mount(osb, 0);
@@ -1015598,12 +1015514,11 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
 +{
 +      return __ocfs2_wait_on_mount(osb, 1);
 +}
-+
 +
  
  /*
-  * The recovery_list is a simple linked list of node numbers to recover.
-@@ -215,9 +227,9 @@ static int ocfs2_commit_cache(struct ocf
+@@ -215,9 +227,9 @@
                goto finally;
        }
  
@@ -1015616,7 +1015531,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0) {
                up_write(&journal->j_trans_barrier);
                mlog_errno(status);
-@@ -256,15 +268,13 @@ handle_t *ocfs2_start_trans(struct ocfs2
+@@ -256,15 +268,13 @@
        BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE);
        BUG_ON(max_buffs <= 0);
  
@@ -1015636,7 +1015551,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (IS_ERR(handle)) {
                up_read(&osb->journal->j_trans_barrier);
  
-@@ -285,16 +295,18 @@ handle_t *ocfs2_start_trans(struct ocfs2
+@@ -285,16 +295,18 @@
  int ocfs2_commit_trans(struct ocfs2_super *osb,
                       handle_t *handle)
  {
@@ -1015658,7 +1015573,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        return ret;
  }
-@@ -304,7 +316,7 @@ int ocfs2_commit_trans(struct ocfs2_supe
+@@ -304,7 +316,7 @@
   * transaction. extend_trans will either extend the current handle by
   * nblocks, or commit it and start a new one with nblocks credits.
   *
@@ -1015667,7 +1015582,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
   * and then restart the transaction. Before calling
   * ocfs2_extend_trans(), any changed blocks should have been
   * dirtied. After calling it, all blocks which need to be changed must
-@@ -332,7 +344,7 @@ int ocfs2_extend_trans(handle_t *handle,
+@@ -332,7 +344,7 @@
  #ifdef CONFIG_OCFS2_DEBUG_FS
        status = 1;
  #else
@@ -1015676,7 +1015591,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -340,8 +352,10 @@ int ocfs2_extend_trans(handle_t *handle,
+@@ -340,8 +352,10 @@
  #endif
  
        if (status > 0) {
@@ -1015689,7 +1015604,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-@@ -393,11 +407,11 @@ int ocfs2_journal_access(handle_t *handl
+@@ -393,11 +407,11 @@
        switch (type) {
        case OCFS2_JOURNAL_ACCESS_CREATE:
        case OCFS2_JOURNAL_ACCESS_WRITE:
@@ -1015703,7 +1015618,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                break;
  
        default:
-@@ -422,7 +436,7 @@ int ocfs2_journal_dirty(handle_t *handle
+@@ -422,7 +436,7 @@
        mlog_entry("(bh->b_blocknr=%llu)\n",
                   (unsigned long long)bh->b_blocknr);
  
@@ -1015712,7 +1015627,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0)
                mlog(ML_ERROR, "Could not dirty metadata buffer. "
                     "(bh->b_blocknr=%llu)\n",
-@@ -432,6 +446,7 @@ int ocfs2_journal_dirty(handle_t *handle
+@@ -432,6 +446,7 @@
        return status;
  }
  
@@ -1015720,7 +1015635,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  int ocfs2_journal_dirty_data(handle_t *handle,
                             struct buffer_head *bh)
  {
-@@ -443,8 +458,9 @@ int ocfs2_journal_dirty_data(handle_t *h
+@@ -443,8 +458,9 @@
  
        return err;
  }
@@ -1015731,7 +1015646,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  void ocfs2_set_journal_params(struct ocfs2_super *osb)
  {
-@@ -457,9 +473,9 @@ void ocfs2_set_journal_params(struct ocf
+@@ -457,9 +473,9 @@
        spin_lock(&journal->j_state_lock);
        journal->j_commit_interval = commit_interval;
        if (osb->s_mount_opt & OCFS2_MOUNT_BARRIER)
@@ -1015743,7 +1015658,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        spin_unlock(&journal->j_state_lock);
  }
  
-@@ -524,14 +540,14 @@ int ocfs2_journal_init(struct ocfs2_jour
+@@ -524,14 +540,14 @@
        mlog(0, "inode->ip_clusters = %u\n", OCFS2_I(inode)->ip_clusters);
  
        /* call the kernels journal init function now */
@@ -1015760,7 +1015675,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        mlog(0, "j_journal->j_maxlen = %u\n", j_journal->j_maxlen);
  
        *dirty = (le32_to_cpu(di->id1.journal1.ij_flags) &
-@@ -550,8 +566,7 @@ done:
+@@ -550,8 +566,7 @@
        if (status < 0) {
                if (inode_lock)
                        ocfs2_inode_unlock(inode, 1);
@@ -1015770,7 +1015685,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                if (inode) {
                        OCFS2_I(inode)->ip_open_count--;
                        iput(inode);
-@@ -639,7 +654,7 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -639,7 +654,7 @@
        if (journal->j_state != OCFS2_JOURNAL_LOADED)
                goto done;
  
@@ -1015779,7 +1015694,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (!igrab(inode))
                BUG();
  
-@@ -668,9 +683,9 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -668,9 +683,9 @@
        BUG_ON(atomic_read(&(osb->journal->j_num_trans)) != 0);
  
        if (ocfs2_mount_local(osb)) {
@@ -1015792,7 +1015707,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                if (status < 0)
                        mlog_errno(status);
        }
-@@ -686,7 +701,8 @@ void ocfs2_journal_shutdown(struct ocfs2
+@@ -686,7 +701,8 @@
        }
  
        /* Shutdown the kernel journal system */
@@ -1015802,7 +1015717,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        OCFS2_I(inode)->ip_open_count--;
  
-@@ -711,15 +727,15 @@ static void ocfs2_clear_journal_error(st
+@@ -711,15 +727,15 @@
  {
        int olderr;
  
@@ -1015821,7 +1015736,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        }
  }
  
-@@ -734,7 +750,7 @@ int ocfs2_journal_load(struct ocfs2_jour
+@@ -734,7 +750,7 @@
  
        osb = journal->j_osb;
  
@@ -1015830,7 +1015745,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0) {
                mlog(ML_ERROR, "Failed to load journal!\n");
                goto done;
-@@ -778,7 +794,7 @@ int ocfs2_journal_wipe(struct ocfs2_jour
+@@ -778,7 +794,7 @@
  
        BUG_ON(!journal);
  
@@ -1015839,7 +1015754,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -847,9 +863,8 @@ static int ocfs2_force_read_journal(stru
+@@ -847,9 +863,8 @@
  
                /* We are reading journal data which should not
                 * be put in the uptodate cache */
@@ -1015851,7 +1015766,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-@@ -865,8 +880,7 @@ static int ocfs2_force_read_journal(stru
+@@ -865,8 +880,7 @@
  
  bail:
        for(i = 0; i < CONCURRENT_JOURNAL_FILL; i++)
@@ -1015861,7 +1015776,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        mlog_exit(status);
        return status;
  }
-@@ -876,6 +890,7 @@ struct ocfs2_la_recovery_item {
+@@ -876,6 +890,7 @@
        int                     lri_slot;
        struct ocfs2_dinode     *lri_la_dinode;
        struct ocfs2_dinode     *lri_tl_dinode;
@@ -1015869,7 +1015784,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  };
  
  /* Does the second half of the recovery process. By this point, the
-@@ -896,6 +911,7 @@ void ocfs2_complete_recovery(struct work
+@@ -896,6 +911,7 @@
        struct ocfs2_super *osb = journal->j_osb;
        struct ocfs2_dinode *la_dinode, *tl_dinode;
        struct ocfs2_la_recovery_item *item, *n;
@@ -1015877,16 +1015792,16 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        LIST_HEAD(tmp_la_list);
  
        mlog_entry_void();
-@@ -911,6 +927,8 @@ void ocfs2_complete_recovery(struct work
+@@ -910,6 +926,8 @@
+               list_del_init(&item->lri_list);
  
                mlog(0, "Complete recovery for slot %d\n", item->lri_slot);
-+              ocfs2_wait_on_quotas(osb);
 +
++              ocfs2_wait_on_quotas(osb);
                la_dinode = item->lri_la_dinode;
                if (la_dinode) {
-                       mlog(0, "Clean up local alloc %llu\n",
-@@ -941,6 +959,16 @@ void ocfs2_complete_recovery(struct work
+@@ -941,6 +959,16 @@
                if (ret < 0)
                        mlog_errno(ret);
  
@@ -1015903,7 +1015818,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                kfree(item);
        }
  
-@@ -954,7 +982,8 @@ void ocfs2_complete_recovery(struct work
+@@ -954,7 +982,8 @@
  static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
                                            int slot_num,
                                            struct ocfs2_dinode *la_dinode,
@@ -1015913,7 +1015828,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  {
        struct ocfs2_la_recovery_item *item;
  
-@@ -969,6 +998,9 @@ static void ocfs2_queue_recovery_complet
+@@ -969,6 +998,9 @@
                if (tl_dinode)
                        kfree(tl_dinode);
  
@@ -1015923,7 +1015838,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                mlog_errno(-ENOMEM);
                return;
        }
-@@ -977,6 +1009,7 @@ static void ocfs2_queue_recovery_complet
+@@ -977,6 +1009,7 @@
        item->lri_la_dinode = la_dinode;
        item->lri_slot = slot_num;
        item->lri_tl_dinode = tl_dinode;
@@ -1015931,7 +1015846,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        spin_lock(&journal->j_lock);
        list_add_tail(&item->lri_list, &journal->j_la_cleanups);
-@@ -996,6 +1029,7 @@ void ocfs2_complete_mount_recovery(struc
+@@ -996,6 +1029,7 @@
                ocfs2_queue_recovery_completion(journal,
                                                osb->slot_num,
                                                osb->local_alloc_copy,
@@ -1015939,7 +1015854,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                                                NULL);
                ocfs2_schedule_truncate_log_flush(osb, 0);
  
-@@ -1004,11 +1038,26 @@ void ocfs2_complete_mount_recovery(struc
+@@ -1004,11 +1038,26 @@
        }
  }
  
@@ -1015967,7 +1015882,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        mlog_entry_void();
  
-@@ -1017,6 +1066,11 @@ static int __ocfs2_recovery_thread(void 
+@@ -1017,6 +1066,11 @@
                goto bail;
        }
  
@@ -1015979,7 +1015894,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  restart:
        status = ocfs2_super_lock(osb, 1);
        if (status < 0) {
-@@ -1030,8 +1084,28 @@ restart:
+@@ -1030,8 +1084,28 @@
                 * clear it until ocfs2_recover_node() has succeeded. */
                node_num = rm->rm_entries[0];
                spin_unlock(&osb->osb_lock);
@@ -1016009,7 +1015924,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                if (!status) {
                        ocfs2_recovery_map_clear(osb, node_num);
                } else {
-@@ -1053,13 +1127,25 @@ restart:
+@@ -1053,13 +1127,25 @@
        if (status < 0)
                mlog_errno(status);
  
@@ -1016036,17 +1015951,17 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  bail:
        mutex_lock(&osb->recovery_lock);
-@@ -1074,6 +1160,9 @@ bail:
+@@ -1073,6 +1159,9 @@
+       wake_up(&osb->recovery_event);
  
        mutex_unlock(&osb->recovery_lock);
++
 +      if (rm_quota)
 +              kfree(rm_quota);
-+
        mlog_exit(status);
        /* no one is callint kthread_stop() for us so the kthread() api
-        * requires that we call do_exit().  And it isn't exported, but
-@@ -1133,7 +1222,8 @@ static int ocfs2_read_journal_inode(stru
+@@ -1133,7 +1222,8 @@
        }
        SET_INODE_JOURNAL(inode);
  
@@ -1016056,7 +1015971,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -1229,19 +1319,19 @@ static int ocfs2_replay_journal(struct o
+@@ -1229,19 +1319,19 @@
        }
  
        mlog(0, "calling journal_init_inode\n");
@@ -1016079,7 +1015994,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                goto done;
        }
  
-@@ -1249,9 +1339,9 @@ static int ocfs2_replay_journal(struct o
+@@ -1249,9 +1339,9 @@
  
        /* wipe the journal */
        mlog(0, "flushing the journal.\n");
@@ -1016092,7 +1016007,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        if (status < 0)
                mlog_errno(status);
  
-@@ -1272,7 +1362,7 @@ static int ocfs2_replay_journal(struct o
+@@ -1272,7 +1362,7 @@
        if (!igrab(inode))
                BUG();
  
@@ -1016101,7 +1016016,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  done:
        /* drop the lock on this nodes journal */
-@@ -1282,8 +1372,7 @@ done:
+@@ -1282,8 +1372,7 @@
        if (inode)
                iput(inode);
  
@@ -1016111,7 +1016026,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        mlog_exit(status);
        return status;
-@@ -1302,31 +1391,19 @@ done:
+@@ -1302,30 +1391,18 @@
   * far less concerning.
   */
  static int ocfs2_recover_node(struct ocfs2_super *osb,
@@ -1016133,7 +1016048,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
        /* Should not ever be called to recover ourselves -- in that
         * case we should've called ocfs2_journal_load instead. */
        BUG_ON(osb->node_num == node_num);
+-
 -      slot_num = ocfs2_node_num_to_slot(osb, node_num);
 -      if (slot_num == -ENOENT) {
 -              status = 0;
@@ -1016142,11 +1016057,10 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
 -      }
 -
 -      mlog(0, "node %d was using slot %d\n", node_num, slot_num);
--
        status = ocfs2_replay_journal(osb, node_num, slot_num);
        if (status < 0) {
-               if (status == -EBUSY) {
-@@ -1362,7 +1439,7 @@ static int ocfs2_recover_node(struct ocf
+@@ -1362,7 +1439,7 @@
  
        /* This will kfree the memory pointed to by la_copy and tl_copy */
        ocfs2_queue_recovery_completion(osb->journal, slot_num, la_copy,
@@ -1016155,7 +1016069,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        status = 0;
  done:
-@@ -1657,13 +1734,14 @@ static int ocfs2_recover_orphans(struct 
+@@ -1657,13 +1734,14 @@
        return ret;
  }
  
@@ -1016172,9 +1016086,9 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.c linux-2.6.27.19-5.1/fs/ocfs2/journal.
                   atomic_read(&osb->vol_state) == VOLUME_DISABLED);
  
        /* If there's an error on mount, then we may never get to the
-diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.h
---- linux-2.6.27/fs/ocfs2/journal.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/journal.h     2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/journal.h
+--- a/fs/ocfs2/journal.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/journal.h       Wed May 06 16:56:51 2009 +0100
 @@ -27,7 +27,12 @@
  #define OCFS2_JOURNAL_H
  
@@ -1016189,7 +1016103,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  enum ocfs2_journal_state {
        OCFS2_JOURNAL_FREE = 0,
-@@ -168,6 +173,7 @@ void   ocfs2_recovery_thread(struct ocfs
+@@ -168,6 +173,7 @@
                             int node_num);
  int    ocfs2_mark_dead_nodes(struct ocfs2_super *osb);
  void   ocfs2_complete_mount_recovery(struct ocfs2_super *osb);
@@ -1016197,7 +1016111,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  static inline void ocfs2_start_checkpoint(struct ocfs2_super *osb)
  {
-@@ -215,8 +221,8 @@ static inline void ocfs2_checkpoint_inod
+@@ -215,8 +221,8 @@
   *                          buffer. Will have to call ocfs2_journal_dirty once
   *                          we've actually dirtied it. Type is one of . or .
   *  ocfs2_journal_dirty    - Mark a journalled buffer as having dirty data.
@@ -1016208,7 +1016122,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
   */
  
  /* You must always start_trans with a number of buffs > 0, but it's
-@@ -268,8 +274,10 @@ int                  ocfs2_journal_acces
+@@ -268,8 +274,10 @@
   */
  int                  ocfs2_journal_dirty(handle_t *handle,
                                         struct buffer_head *bh);
@@ -1016219,7 +1016133,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  /*
   *  Credit Macros:
-@@ -283,6 +291,40 @@ int                  ocfs2_journal_dirty
+@@ -283,6 +291,40 @@
  /* simple file updates like chmod, etc. */
  #define OCFS2_INODE_UPDATE_CREDITS 1
  
@@ -1016260,7 +1016174,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  /* group extend. inode update and last group update. */
  #define OCFS2_GROUP_EXTEND_CREDITS    (OCFS2_INODE_UPDATE_CREDITS + 1)
  
-@@ -293,8 +335,11 @@ int                  ocfs2_journal_dirty
+@@ -293,8 +335,11 @@
   * prev. group desc. if we relink. */
  #define OCFS2_SUBALLOC_ALLOC (3)
  
@@ -1016274,7 +1016188,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  /* dinode + group descriptor update. We don't relink on free yet. */
  #define OCFS2_SUBALLOC_FREE  (2)
-@@ -303,16 +348,23 @@ int                  ocfs2_journal_dirty
+@@ -303,16 +348,23 @@
  #define OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC (OCFS2_SUBALLOC_FREE                       \
                                         + OCFS2_TRUNCATE_LOG_UPDATE)
  
@@ -1016302,7 +1016216,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  /* local alloc metadata change + main bitmap updates */
  #define OCFS2_WINDOW_MOVE_CREDITS (OCFS2_INODE_UPDATE_CREDITS                 \
-@@ -322,13 +374,21 @@ int                  ocfs2_journal_dirty
+@@ -322,13 +374,21 @@
   * for the dinode, one for the new block. */
  #define OCFS2_SIMPLE_DIR_EXTEND_CREDITS (2)
  
@@ -1016328,7 +1016242,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
  /* dinode + orphan dir dinode + inode alloc dinode + orphan dir entry +
   * inode alloc group descriptor */
-@@ -337,14 +397,28 @@ int                  ocfs2_journal_dirty
+@@ -337,14 +397,28 @@
  /* dinode update, old dir dinode update, new dir dinode update, old
   * dir dir entry, new dir dir entry, dir entry update for renaming
   * directory + target unlink */
@@ -1016361,7 +1016275,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  
        /* bitmap dinode, group desc. + relinked group. */
        bitmap_blocks = OCFS2_SUBALLOC_ALLOC;
-@@ -355,27 +429,28 @@ static inline int ocfs2_calc_extend_cred
+@@ -355,27 +429,28 @@
         * however many metadata chunks needed * a remaining suballoc
         * alloc. */
        sysfile_bitmap_blocks = 1 +
@@ -1016396,7 +1016310,7 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
  }
  
  static inline int ocfs2_calc_group_alloc_credits(struct super_block *sb,
-@@ -412,7 +487,21 @@ static inline int ocfs2_calc_tree_trunc_
+@@ -412,7 +487,21 @@
        /* update to the truncate log. */
        credits += OCFS2_TRUNCATE_LOG_UPDATE;
  
@@ -1016418,9 +1016332,9 @@ diff -purN linux-2.6.27/fs/ocfs2/journal.h linux-2.6.27.19-5.1/fs/ocfs2/journal.
 +}
 +
  #endif /* OCFS2_JOURNAL_H */
-diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/localalloc.c
---- linux-2.6.27/fs/ocfs2/localalloc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/localalloc.c  2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/localalloc.c
+--- a/fs/ocfs2/localalloc.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/localalloc.c    Wed May 06 16:56:51 2009 +0100
 @@ -28,6 +28,7 @@
  #include <linux/slab.h>
  #include <linux/highmem.h>
@@ -1016429,16 +1016343,16 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
  #define MLOG_MASK_PREFIX ML_DISK_ALLOC
  #include <cluster/masklog.h>
-@@ -47,8 +48,6 @@
+@@ -46,8 +47,6 @@
+ #include "buffer_head_io.h"
  
  #define OCFS2_LOCAL_ALLOC(dinode)     (&((dinode)->id2.i_lab))
--static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb);
 -
+-static inline int ocfs2_local_alloc_window_bits(struct ocfs2_super *osb);
  static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
  
- static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
-@@ -75,24 +74,129 @@ static int ocfs2_local_alloc_new_window(
+@@ -75,24 +74,129 @@
  static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
                                          struct inode *local_alloc_inode);
  
@@ -1016446,11 +1016360,14 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
 +#ifdef CONFIG_OCFS2_FS_STATS
 +
 +static int ocfs2_la_debug_open(struct inode *inode, struct file *file)
-+{
+ {
+-      BUG_ON(osb->s_clustersize_bits > 20);
 +      file->private_data = inode->i_private;
 +      return 0;
 +}
-+
+-      /* Size local alloc windows by the megabyte */
+-      return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
 +#define LA_DEBUG_BUF_SZ       PAGE_CACHE_SIZE
 +#define LA_DEBUG_VER  1
 +static ssize_t ocfs2_la_debug_read(struct file *file, char __user *userbuf,
@@ -1016522,14 +1016439,11 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
 +#endif
 +
 +static inline int ocfs2_la_state_enabled(struct ocfs2_super *osb)
- {
--      BUG_ON(osb->s_clustersize_bits > 20);
++{
 +      return (osb->local_alloc_state == OCFS2_LA_THROTTLED ||
 +              osb->local_alloc_state == OCFS2_LA_ENABLED);
 +}
--      /* Size local alloc windows by the megabyte */
--      return osb->local_alloc_size << (20 - osb->s_clustersize_bits);
++
 +void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb,
 +                                    unsigned int num_clusters)
 +{
@@ -1016565,16 +1016479,16 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
 -      int la_bits = ocfs2_local_alloc_window_bits(osb);
        int ret = 0;
 +      int la_bits;
-+
-+      spin_lock(&osb->osb_lock);
-+      la_bits = osb->local_alloc_bits;
  
 -      if (osb->local_alloc_state != OCFS2_LA_ENABLED)
++      spin_lock(&osb->osb_lock);
++      la_bits = osb->local_alloc_bits;
++
 +      if (!ocfs2_la_state_enabled(osb))
                goto bail;
  
        /* la_bits should be at least twice the size (in clusters) of
-@@ -106,6 +210,7 @@ int ocfs2_alloc_should_use_local(struct 
+@@ -106,6 +210,7 @@
  bail:
        mlog(0, "state=%d, bits=%llu, la_bits=%d, ret=%d\n",
             osb->local_alloc_state, (unsigned long long)bits, la_bits, ret);
@@ -1016582,7 +1016496,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        return ret;
  }
  
-@@ -120,14 +225,18 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -120,14 +225,18 @@
  
        mlog_entry_void();
  
@@ -1016605,7 +1016519,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        }
  
        /* read the alloc off disk */
-@@ -139,8 +248,8 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -139,8 +248,8 @@
                goto bail;
        }
  
@@ -1016616,7 +1016530,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -185,13 +294,14 @@ int ocfs2_load_local_alloc(struct ocfs2_
+@@ -185,13 +294,14 @@
  
  bail:
        if (status < 0)
@@ -1016635,19 +1016549,19 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        mlog_exit(status);
        return status;
-@@ -217,6 +327,11 @@ void ocfs2_shutdown_local_alloc(struct o
+@@ -216,6 +326,11 @@
+       struct ocfs2_dinode *alloc = NULL;
  
        mlog_entry_void();
++
 +      cancel_delayed_work(&osb->la_enable_wq);
 +      flush_workqueue(ocfs2_wq);
 +
 +      ocfs2_shutdown_la_debug(osb);
-+
        if (osb->local_alloc_state == OCFS2_LA_UNUSED)
                goto out;
-@@ -295,8 +410,7 @@ out_commit:
+@@ -295,8 +410,7 @@
        ocfs2_commit_trans(osb, handle);
  
  out_unlock:
@@ -1016657,7 +1016571,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        ocfs2_inode_unlock(main_bm_inode, 1);
  
-@@ -345,8 +459,8 @@ int ocfs2_begin_local_alloc_recovery(str
+@@ -345,8 +459,8 @@
  
        mutex_lock(&inode->i_mutex);
  
@@ -1016668,7 +1016582,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -372,8 +486,7 @@ bail:
+@@ -372,8 +486,7 @@
                *alloc_copy = NULL;
        }
  
@@ -1016678,7 +1016592,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        if (inode) {
                mutex_unlock(&inode->i_mutex);
-@@ -441,8 +554,7 @@ out_unlock:
+@@ -441,8 +554,7 @@
  out_mutex:
        mutex_unlock(&main_bm_inode->i_mutex);
  
@@ -1016688,7 +1016602,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        iput(main_bm_inode);
  
-@@ -453,8 +565,48 @@ out:
+@@ -453,8 +565,48 @@
        return status;
  }
  
@@ -1016738,17 +1016652,11 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
   * local alloc. You lose them when you drop i_mutex.
   *
   * We will add ourselves to the transaction passed in, but may start
-@@ -485,16 +637,18 @@ int ocfs2_reserve_local_alloc_bits(struc
+@@ -485,16 +637,18 @@
  
        mutex_lock(&local_alloc_inode->i_mutex);
  
 -      if (osb->local_alloc_state != OCFS2_LA_ENABLED) {
--              status = -ENOSPC;
--              goto bail;
--      }
--
--      if (bits_wanted > ocfs2_local_alloc_window_bits(osb)) {
--              mlog(0, "Asking for more than my max window size!\n");
 +      /*
 +       * We must double check state and allocator bits because
 +       * another process may have changed them while holding i_mutex.
@@ -1016760,11 +1016668,17 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
                status = -ENOSPC;
                goto bail;
        }
+-
+-      if (bits_wanted > ocfs2_local_alloc_window_bits(osb)) {
+-              mlog(0, "Asking for more than my max window size!\n");
+-              status = -ENOSPC;
+-              goto bail;
+-      }
 +      spin_unlock(&osb->osb_lock);
  
        alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
  
-@@ -522,6 +676,36 @@ int ocfs2_reserve_local_alloc_bits(struc
+@@ -522,6 +676,36 @@
                                mlog_errno(status);
                        goto bail;
                }
@@ -1016801,7 +1016715,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        }
  
        ac->ac_inode = local_alloc_inode;
-@@ -789,6 +973,85 @@ bail:
+@@ -789,6 +973,85 @@
        return status;
  }
  
@@ -1016887,7 +1016801,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
                                                struct ocfs2_alloc_context **ac,
                                                struct inode **bitmap_inode,
-@@ -803,12 +1066,21 @@ static int ocfs2_local_alloc_reserve_for
+@@ -803,12 +1066,21 @@
                goto bail;
        }
  
@@ -1016912,7 +1016826,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
                goto bail;
        }
  
-@@ -849,7 +1121,7 @@ static int ocfs2_local_alloc_new_window(
+@@ -849,7 +1121,7 @@
                     "one\n");
  
        mlog(0, "Allocating %u clusters for a new window.\n",
@@ -1016921,7 +1016835,7 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        /* Instruct the allocation code to try the most recently used
         * cluster group. We'll re-record the group used this pass
-@@ -859,9 +1131,36 @@ static int ocfs2_local_alloc_new_window(
+@@ -859,9 +1131,36 @@
        /* we used the generic suballoc reserve function, but we set
         * everything up nicely, so there's no reason why we can't use
         * the more specific cluster api to claim bits. */
@@ -1016960,16 +1016874,16 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
        if (status < 0) {
                if (status != -ENOSPC)
                        mlog_errno(status);
-@@ -905,6 +1204,8 @@ static int ocfs2_local_alloc_slide_windo
+@@ -904,6 +1203,8 @@
+       struct ocfs2_alloc_context *ac = NULL;
  
        mlog_entry_void();
-+      ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE);
 +
++      ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_SLIDE);
        /* This will lock the main bitmap for us. */
        status = ocfs2_local_alloc_reserve_for_window(osb,
-                                                     &ac,
-@@ -976,8 +1277,7 @@ bail:
+@@ -976,8 +1277,7 @@
        if (handle)
                ocfs2_commit_trans(osb, handle);
  
@@ -1016979,10 +1016893,10 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.c linux-2.6.27.19-5.1/fs/ocfs2/local
  
        if (main_bm_inode)
                iput(main_bm_inode);
-diff -purN linux-2.6.27/fs/ocfs2/localalloc.h linux-2.6.27.19-5.1/fs/ocfs2/localalloc.h
---- linux-2.6.27/fs/ocfs2/localalloc.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/localalloc.h  2009-03-25 16:11:38.000000000 +0000
-@@ -52,4 +52,8 @@ int ocfs2_claim_local_alloc_bits(struct 
+diff -r 9608d5473017 fs/ocfs2/localalloc.h
+--- a/fs/ocfs2/localalloc.h    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/localalloc.h    Wed May 06 16:56:51 2009 +0100
+@@ -52,4 +52,8 @@
                                 u32 *bit_off,
                                 u32 *num_bits);
  
@@ -1016991,9 +1016905,9 @@ diff -purN linux-2.6.27/fs/ocfs2/localalloc.h linux-2.6.27.19-5.1/fs/ocfs2/local
 +void ocfs2_la_enable_worker(struct work_struct *work);
 +
  #endif /* OCFS2_LOCALALLOC_H */
-diff -purN linux-2.6.27/fs/ocfs2/locks.c linux-2.6.27.19-5.1/fs/ocfs2/locks.c
---- linux-2.6.27/fs/ocfs2/locks.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/locks.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/locks.c
+--- a/fs/ocfs2/locks.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/locks.c Wed May 06 16:56:51 2009 +0100
 @@ -24,6 +24,7 @@
   */
  
@@ -1017010,7 +1016924,7 @@ diff -purN linux-2.6.27/fs/ocfs2/locks.c linux-2.6.27.19-5.1/fs/ocfs2/locks.c
  #include "locks.h"
  
  static int ocfs2_do_flock(struct file *file, struct inode *inode,
-@@ -123,3 +125,16 @@ int ocfs2_flock(struct file *file, int c
+@@ -123,3 +125,16 @@
        else
                return ocfs2_do_flock(file, inode, cmd, fl);
  }
@@ -1017027,9 +1016941,9 @@ diff -purN linux-2.6.27/fs/ocfs2/locks.c linux-2.6.27.19-5.1/fs/ocfs2/locks.c
 +
 +      return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl);
 +}
-diff -purN linux-2.6.27/fs/ocfs2/locks.h linux-2.6.27.19-5.1/fs/ocfs2/locks.h
---- linux-2.6.27/fs/ocfs2/locks.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/locks.h       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/locks.h
+--- a/fs/ocfs2/locks.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/locks.h Wed May 06 16:56:51 2009 +0100
 @@ -27,5 +27,6 @@
  #define OCFS2_LOCKS_H
  
@@ -1017037,10 +1016951,10 @@ diff -purN linux-2.6.27/fs/ocfs2/locks.h linux-2.6.27.19-5.1/fs/ocfs2/locks.h
 +int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl);
  
  #endif /* OCFS2_LOCKS_H */
-diff -purN linux-2.6.27/fs/ocfs2/mmap.c linux-2.6.27.19-5.1/fs/ocfs2/mmap.c
---- linux-2.6.27/fs/ocfs2/mmap.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/mmap.c        2009-03-25 16:11:38.000000000 +0000
-@@ -113,7 +113,11 @@ static int __ocfs2_page_mkwrite(struct i
+diff -r 9608d5473017 fs/ocfs2/mmap.c
+--- a/fs/ocfs2/mmap.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/mmap.c  Wed May 06 16:56:51 2009 +0100
+@@ -113,7 +113,11 @@
         * ocfs2_write_begin_nolock().
         */
        if (!PageUptodate(page) || page->mapping != inode->i_mapping) {
@@ -1017053,9 +1016967,9 @@ diff -purN linux-2.6.27/fs/ocfs2/mmap.c linux-2.6.27.19-5.1/fs/ocfs2/mmap.c
                goto out;
        }
  
-diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
---- linux-2.6.27/fs/ocfs2/namei.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/namei.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/namei.c
+--- a/fs/ocfs2/namei.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/namei.c Wed May 06 16:56:51 2009 +0100
 @@ -40,6 +40,7 @@
  #include <linux/types.h>
  #include <linux/slab.h>
@@ -1017086,7 +1017000,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
                              struct ocfs2_alloc_context *inode_ac);
  
  static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb,
-@@ -185,6 +188,35 @@ bail:
+@@ -185,6 +188,35 @@
        return ret;
  }
  
@@ -1017122,7 +1017036,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  static int ocfs2_mknod(struct inode *dir,
                       struct dentry *dentry,
                       int mode,
-@@ -200,6 +232,13 @@ static int ocfs2_mknod(struct inode *dir
+@@ -200,6 +232,13 @@
        struct inode *inode = NULL;
        struct ocfs2_alloc_context *inode_ac = NULL;
        struct ocfs2_alloc_context *data_ac = NULL;
@@ -1017136,7 +1017050,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
                   (unsigned long)dev, dentry->d_name.len,
-@@ -249,17 +288,46 @@ static int ocfs2_mknod(struct inode *dir
+@@ -249,17 +288,46 @@
                goto leave;
        }
  
@@ -1017190,7 +1017104,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                handle = NULL;
-@@ -267,10 +335,19 @@ static int ocfs2_mknod(struct inode *dir
+@@ -267,10 +335,19 @@
                goto leave;
        }
  
@@ -1017212,7 +1017126,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (status < 0) {
                mlog_errno(status);
                goto leave;
-@@ -299,6 +376,22 @@ static int ocfs2_mknod(struct inode *dir
+@@ -299,6 +376,22 @@
                inc_nlink(dir);
        }
  
@@ -1017235,7 +1017149,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        status = ocfs2_add_entry(handle, dentry, inode,
                                 OCFS2_I(inode)->ip_blkno, parent_fe_bh,
                                 de_bh);
-@@ -319,6 +412,8 @@ static int ocfs2_mknod(struct inode *dir
+@@ -319,6 +412,8 @@
        d_instantiate(dentry, inode);
        status = 0;
  leave:
@@ -1017244,24 +1017158,24 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (handle)
                ocfs2_commit_trans(osb, handle);
  
-@@ -327,17 +422,16 @@ leave:
+@@ -327,23 +422,25 @@
        if (status == -ENOSPC)
                mlog(0, "Disk is full\n");
  
 -      if (new_fe_bh)
 -              brelse(new_fe_bh);
--
--      if (de_bh)
--              brelse(de_bh);
--
--      if (parent_fe_bh)
--              brelse(parent_fe_bh);
 +      brelse(new_fe_bh);
 +      brelse(de_bh);
 +      brelse(parent_fe_bh);
 +      kfree(si.name);
 +      kfree(si.value);
  
+-      if (de_bh)
+-              brelse(de_bh);
+-
+-      if (parent_fe_bh)
+-              brelse(parent_fe_bh);
+-
 -      if ((status < 0) && inode)
 +      if ((status < 0) && inode) {
 +              clear_nlink(inode);
@@ -1017270,17 +1017184,16 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        if (inode_ac)
                ocfs2_free_alloc_context(inode_ac);
-@@ -345,6 +439,9 @@ leave:
        if (data_ac)
                ocfs2_free_alloc_context(data_ac);
++
 +      if (xattr_ac)
 +              ocfs2_free_alloc_context(xattr_ac);
-+
        mlog_exit(status);
  
-       return status;
-@@ -352,12 +449,12 @@ leave:
+@@ -352,12 +449,12 @@
  
  static int ocfs2_mknod_locked(struct ocfs2_super *osb,
                              struct inode *dir,
@@ -1017295,7 +1017208,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
                              struct ocfs2_alloc_context *inode_ac)
  {
        int status = 0;
-@@ -365,14 +462,12 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -365,14 +462,12 @@
        struct ocfs2_extent_list *fel;
        u64 fe_blkno = 0;
        u16 suballoc_bit;
@@ -1017312,7 +1017225,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        status = ocfs2_claim_new_inode(osb, handle, inode_ac, &suballoc_bit,
                                       &fe_blkno);
-@@ -381,23 +476,11 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -381,23 +476,11 @@
                goto leave;
        }
  
@@ -1017336,7 +1017249,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        spin_lock(&osb->osb_lock);
        inode->i_generation = osb->s_next_generation++;
        spin_unlock(&osb->osb_lock);
-@@ -425,17 +508,11 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -425,17 +508,11 @@
        fe->i_blkno = cpu_to_le64(fe_blkno);
        fe->i_suballoc_bit = cpu_to_le16(suballoc_bit);
        fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot);
@@ -1017358,7 +1017271,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        fe->i_links_count = cpu_to_le16(inode->i_nlink);
  
        fe->i_last_eb_blk = 0;
-@@ -450,7 +527,7 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -450,7 +527,7 @@
        /*
         * If supported, directories start with inline data.
         */
@@ -1017367,7 +1017280,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
                u16 feat = le16_to_cpu(fe->i_dyn_features);
  
                fe->i_dyn_features = cpu_to_le16(feat | OCFS2_INLINE_DATA_FL);
-@@ -488,15 +565,12 @@ static int ocfs2_mknod_locked(struct ocf
+@@ -488,15 +565,12 @@
        status = 0; /* error in ocfs2_create_new_inode_locks is not
                     * critical */
  
@@ -1017383,7 +1017296,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        }
  
        mlog_exit(status);
-@@ -590,7 +664,7 @@ static int ocfs2_link(struct dentry *old
+@@ -590,7 +664,7 @@
                goto out_unlock_inode;
        }
  
@@ -1017392,7 +1017305,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (IS_ERR(handle)) {
                err = PTR_ERR(handle);
                handle = NULL;
-@@ -647,12 +721,9 @@ out_unlock_inode:
+@@ -647,12 +721,9 @@
  out:
        ocfs2_inode_unlock(dir, 1);
  
@@ -1017408,7 +1017321,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(err);
  
-@@ -780,7 +851,7 @@ static int ocfs2_unlink(struct inode *di
+@@ -780,7 +851,7 @@
                }
        }
  
@@ -1017417,7 +1017330,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                handle = NULL;
-@@ -851,17 +922,10 @@ leave:
+@@ -851,17 +922,10 @@
                iput(orphan_dir);
        }
  
@@ -1017439,7 +1017352,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
  
-@@ -1193,7 +1257,7 @@ static int ocfs2_rename(struct inode *ol
+@@ -1193,7 +1257,7 @@
                }
        }
  
@@ -1017448,7 +1017361,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                handle = NULL;
-@@ -1372,24 +1436,15 @@ bail:
+@@ -1372,24 +1436,15 @@
  
        if (new_inode)
                iput(new_inode);
@@ -1017482,7 +1017395,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
  
-@@ -1492,8 +1547,7 @@ bail:
+@@ -1492,8 +1547,7 @@
  
        if (bhs) {
                for(i = 0; i < blocks; i++)
@@ -1017492,7 +1017405,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
                kfree(bhs);
        }
  
-@@ -1518,6 +1572,13 @@ static int ocfs2_symlink(struct inode *d
+@@ -1518,6 +1572,13 @@
        handle_t *handle = NULL;
        struct ocfs2_alloc_context *inode_ac = NULL;
        struct ocfs2_alloc_context *data_ac = NULL;
@@ -1017506,13 +1017419,16 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_entry("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
                   dentry, symname, dentry->d_name.len, dentry->d_name.name);
-@@ -1564,17 +1625,46 @@ static int ocfs2_symlink(struct inode *d
+@@ -1564,17 +1625,46 @@
                goto bail;
        }
  
 -      /* don't reserve bitmap space for fast symlinks. */
 -      if (l > ocfs2_fast_symlink_chars(sb)) {
 -              status = ocfs2_reserve_clusters(osb, 1, &data_ac);
+-              if (status < 0) {
+-                      if (status != -ENOSPC)
+-                              mlog_errno(status);
 +      inode = ocfs2_get_init_inode(dir, S_IFLNK | S_IRWXUGO);
 +      if (!inode) {
 +              status = -ENOMEM;
@@ -1017526,24 +1017442,22 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
 +              if (status == -EOPNOTSUPP)
 +                      si.enable = 0;
 +              else {
-+                      mlog_errno(status);
-+                      goto bail;
-+              }
-+      }
-+
-+      /* calculate meta data/clusters for setting security xattr */
-+      if (si.enable) {
-+              status = ocfs2_calc_security_init(dir, &si, &want_clusters,
-+                                                &xattr_credits, &xattr_ac);
-               if (status < 0) {
--                      if (status != -ENOSPC)
--                              mlog_errno(status);
 +                      mlog_errno(status);
                        goto bail;
                }
        }
  
 -      handle = ocfs2_start_trans(osb, credits);
++      /* calculate meta data/clusters for setting security xattr */
++      if (si.enable) {
++              status = ocfs2_calc_security_init(dir, &si, &want_clusters,
++                                                &xattr_credits, &xattr_ac);
++              if (status < 0) {
++                      mlog_errno(status);
++                      goto bail;
++              }
++      }
++
 +      /* don't reserve bitmap space for fast symlinks. */
 +      if (l > ocfs2_fast_symlink_chars(sb))
 +              want_clusters += 1;
@@ -1017559,7 +1017473,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                handle = NULL;
-@@ -1582,10 +1672,18 @@ static int ocfs2_symlink(struct inode *d
+@@ -1582,10 +1672,18 @@
                goto bail;
        }
  
@@ -1017582,7 +1017496,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -1598,10 +1696,16 @@ static int ocfs2_symlink(struct inode *d
+@@ -1598,10 +1696,16 @@
                u32 offset = 0;
  
                inode->i_op = &ocfs2_symlink_inode_operations;
@@ -1017603,7 +1017517,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
                if (status < 0) {
                        if (status != -ENOSPC && status != -EINTR) {
                                mlog(ML_ERROR,
-@@ -1636,6 +1740,15 @@ static int ocfs2_symlink(struct inode *d
+@@ -1636,6 +1740,15 @@
                }
        }
  
@@ -1017619,7 +1017533,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        status = ocfs2_add_entry(handle, dentry, inode,
                                 le64_to_cpu(fe->i_blkno), parent_fe_bh,
                                 de_bh);
-@@ -1654,23 +1767,31 @@ static int ocfs2_symlink(struct inode *d
+@@ -1654,23 +1767,31 @@
        dentry->d_op = &ocfs2_dentry_ops;
        d_instantiate(dentry, inode);
  bail:
@@ -1017658,7 +1017572,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
  
-@@ -1759,8 +1880,7 @@ leave:
+@@ -1759,8 +1880,7 @@
                iput(orphan_dir_inode);
        }
  
@@ -1017668,7 +1017582,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
        return status;
-@@ -1780,10 +1900,9 @@ static int ocfs2_orphan_add(struct ocfs2
+@@ -1780,10 +1900,9 @@
  
        mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino);
  
@@ -1017681,7 +1017595,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
        if (status < 0) {
                mlog_errno(status);
                goto leave;
-@@ -1829,8 +1948,7 @@ static int ocfs2_orphan_add(struct ocfs2
+@@ -1829,8 +1948,7 @@
             (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num);
  
  leave:
@@ -1017691,7 +1017605,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
        return status;
-@@ -1898,8 +2016,7 @@ int ocfs2_orphan_del(struct ocfs2_super 
+@@ -1898,8 +2016,7 @@
        }
  
  leave:
@@ -1017701,7 +1017615,7 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
  
        mlog_exit(status);
        return status;
-@@ -1918,4 +2035,8 @@ const struct inode_operations ocfs2_dir_
+@@ -1918,4 +2035,8 @@
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
@@ -1017710,9 +1017624,9 @@ diff -purN linux-2.6.27/fs/ocfs2/namei.c linux-2.6.27.19-5.1/fs/ocfs2/namei.c
 +      .listxattr      = ocfs2_listxattr,
 +      .removexattr    = generic_removexattr,
  };
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
---- linux-2.6.27/fs/ocfs2/ocfs2.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2.h
+--- a/fs/ocfs2/ocfs2.h Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2.h Wed May 06 16:56:51 2009 +0100
 @@ -34,7 +34,12 @@
  #include <linux/workqueue.h>
  #include <linux/kref.h>
@@ -1017727,7 +1017641,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  
  /* For union ocfs2_dlm_lksb */
  #include "stackglue.h"
-@@ -80,7 +85,7 @@ enum ocfs2_unlock_action {
+@@ -80,7 +85,7 @@
  };
  
  /* ocfs2_lock_res->l_flags flags. */
@@ -1017736,7 +1017650,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
                                               * the lvb */
  #define OCFS2_LOCK_BUSY          (0x00000002) /* we are currently in
                                               * dlm_lock */
-@@ -156,6 +161,7 @@ enum ocfs2_vol_state
+@@ -156,6 +161,7 @@
  {
        VOLUME_INIT = 0,
        VOLUME_MOUNTED,
@@ -1017744,7 +1017658,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
        VOLUME_DISMOUNTED,
        VOLUME_DISABLED
  };
-@@ -171,9 +177,13 @@ struct ocfs2_alloc_stats
+@@ -171,9 +177,13 @@
  
  enum ocfs2_local_alloc_state
  {
@@ -1017761,7 +1017675,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  };
  
  enum ocfs2_mount_options
-@@ -184,6 +194,11 @@ enum ocfs2_mount_options
+@@ -184,6 +194,11 @@
        OCFS2_MOUNT_ERRORS_PANIC = 1 << 3, /* Panic on errors */
        OCFS2_MOUNT_DATA_WRITEBACK = 1 << 4, /* No data ordering */
        OCFS2_MOUNT_LOCALFLOCKS = 1 << 5, /* No cluster aware user file locks */
@@ -1017773,7 +1017687,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  };
  
  #define OCFS2_OSB_SOFT_RO     0x0001
-@@ -194,6 +209,7 @@ enum ocfs2_mount_options
+@@ -194,6 +209,7 @@
  struct ocfs2_journal;
  struct ocfs2_slot_info;
  struct ocfs2_recovery_map;
@@ -1017781,7 +1017695,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  struct ocfs2_super
  {
        struct task_struct *commit_task;
-@@ -214,6 +230,7 @@ struct ocfs2_super
+@@ -214,6 +230,7 @@
        u32 bitmap_cpg;
        u8 *uuid;
        char *uuid_str;
@@ -1017789,7 +1017703,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
        u8 *vol_label;
        u64 first_cluster_group_blkno;
        u32 fs_generation;
-@@ -241,6 +258,7 @@ struct ocfs2_super
+@@ -241,6 +258,7 @@
        int s_sectsize_bits;
        int s_clustersize;
        int s_clustersize_bits;
@@ -1017797,7 +1017711,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  
        atomic_t vol_state;
        struct mutex recovery_lock;
-@@ -252,15 +270,32 @@ struct ocfs2_super
+@@ -252,15 +270,32 @@
        struct ocfs2_journal *journal;
        unsigned long osb_commit_interval;
  
@@ -1017833,7 +1017747,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  
        struct ocfs2_alloc_stats alloc_stats;
        char dev_str[20];               /* "major,minor" of the device */
-@@ -340,6 +375,13 @@ static inline int ocfs2_supports_inline_
+@@ -340,6 +375,13 @@
        return 0;
  }
  
@@ -1017847,17 +1017761,17 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  /* set / clear functions because cluster events can make these happen
   * in parallel so we want the transitions to be atomic. this also
   * means that any future flags osb_flags must be protected by spinlock
-@@ -437,6 +479,9 @@ static inline int ocfs2_uses_extended_sl
+@@ -436,6 +478,9 @@
+               (unsigned long long)le64_to_cpu((____gd)->bg_blkno), 7, \
                (____gd)->bg_signature);                                \
  } while (0)
++
 +#define OCFS2_IS_VALID_XATTR_BLOCK(ptr)                                       \
 +      (!strcmp((ptr)->xb_signature, OCFS2_XATTR_BLOCK_SIGNATURE))
-+
  static inline unsigned long ino_from_blkno(struct super_block *sb,
                                           u64 blkno)
- {
-@@ -554,6 +599,14 @@ static inline unsigned int ocfs2_pages_p
+@@ -554,6 +599,14 @@
        return pages_per_cluster;
  }
  
@@ -1017872,9 +1017786,9 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2.h
  static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb)
  {
        spin_lock(&osb->osb_lock);
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_fs.h
---- linux-2.6.27/fs/ocfs2/ocfs2_fs.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_fs.h    2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2_fs.h
+--- a/fs/ocfs2/ocfs2_fs.h      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2_fs.h      Wed May 06 16:56:51 2009 +0100
 @@ -64,6 +64,7 @@
  #define OCFS2_INODE_SIGNATURE         "INODE01"
  #define OCFS2_EXTENT_BLOCK_SIGNATURE  "EXBLK01"
@@ -1017928,7 +1017842,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  /*
   * backup superblock flag is used to indicate that this volume
   * has backup superblocks.
-@@ -149,10 +156,21 @@
+@@ -149,9 +156,20 @@
  #define OCFS2_FEATURE_COMPAT_BACKUP_SB                0x0001
  
  /*
@@ -1017940,16 +1017854,15 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
   * Unwritten extents support.
   */
  #define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN     0x0001
++
 +/*
 + * Maintain quota information for this filesystem
 + */
 +#define OCFS2_FEATURE_RO_COMPAT_USRQUOTA      0x0002
 +#define OCFS2_FEATURE_RO_COMPAT_GRPQUOTA      0x0004
-+
  /* The byte offset of the first backup block will be 1G.
   * The following will be 4G, 16G, 64G, 256G and 1T.
-  */
 @@ -182,6 +200,7 @@
  #define OCFS2_HEARTBEAT_FL    (0x00000200)    /* Heartbeat area */
  #define OCFS2_CHAIN_FL                (0x00000400)    /* Chain allocator */
@@ -1017958,7 +1017871,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  
  /*
   * Flags on ocfs2_dinode.i_dyn_features
-@@ -299,6 +318,12 @@ struct ocfs2_new_group_input {
+@@ -299,6 +318,12 @@
   */
  #define OCFS2_DEFAULT_LOCAL_ALLOC_SIZE        8
  
@@ -1017971,7 +1017884,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  struct ocfs2_system_inode_info {
        char    *si_name;
        int     si_iflags;
-@@ -313,13 +338,17 @@ enum {
+@@ -313,13 +338,17 @@
  #define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE
        HEARTBEAT_SYSTEM_INODE,
        GLOBAL_BITMAP_SYSTEM_INODE,
@@ -1017990,7 +1017903,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
        NUM_SYSTEM_INODES
  };
  
-@@ -333,6 +362,8 @@ static struct ocfs2_system_inode_info oc
+@@ -333,6 +362,8 @@
        [SLOT_MAP_SYSTEM_INODE]                 = { "slot_map", 0, S_IFREG | 0644 },
        [HEARTBEAT_SYSTEM_INODE]                = { "heartbeat", OCFS2_HEARTBEAT_FL, S_IFREG | 0644 },
        [GLOBAL_BITMAP_SYSTEM_INODE]            = { "global_bitmap", 0, S_IFREG | 0644 },
@@ -1017999,7 +1017912,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  
        /* Slot-specific system inodes (one copy per slot) */
        [ORPHAN_DIR_SYSTEM_INODE]               = { "orphan_dir:%04d", 0, S_IFDIR | 0755 },
-@@ -340,7 +371,9 @@ static struct ocfs2_system_inode_info oc
+@@ -340,7 +371,9 @@
        [INODE_ALLOC_SYSTEM_INODE]              = { "inode_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_CHAIN_FL, S_IFREG | 0644 },
        [JOURNAL_SYSTEM_INODE]                  = { "journal:%04d", OCFS2_JOURNAL_FL, S_IFREG | 0644 },
        [LOCAL_ALLOC_SYSTEM_INODE]              = { "local_alloc:%04d", OCFS2_BITMAP_FL | OCFS2_LOCAL_ALLOC_FL, S_IFREG | 0644 },
@@ -1018010,7 +1017923,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  };
  
  /* Parameter passed from mount.ocfs2 to module */
-@@ -563,7 +596,7 @@ struct ocfs2_super_block {
+@@ -563,7 +596,7 @@
  /*40*/        __le16 s_max_slots;             /* Max number of simultaneous mounts
                                           before tunefs required */
        __le16 s_tunefs_flag;
@@ -1018019,7 +1017932,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
        __le64 s_first_cluster_group;   /* Block offset of 1st cluster
                                         * group header */
  /*50*/        __u8  s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */
-@@ -571,7 +604,11 @@ struct ocfs2_super_block {
+@@ -571,7 +604,11 @@
  /*A0*/  struct ocfs2_cluster_info s_cluster_info; /* Selected userspace
                                                     stack.  Only valid
                                                     with INCOMPAT flag. */
@@ -1018032,7 +1017945,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  /*140*/
  
        /*
-@@ -621,7 +658,8 @@ struct ocfs2_dinode {
+@@ -621,7 +658,8 @@
                                           belongs to */
        __le16 i_suballoc_bit;          /* Bit offset in suballocator
                                           block group */
@@ -1018042,7 +1017955,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
        __le32 i_clusters;              /* Cluster count */
        __le32 i_uid;                   /* Owner UID */
        __le32 i_gid;                   /* Owning GID */
-@@ -640,11 +678,12 @@ struct ocfs2_dinode {
+@@ -640,11 +678,12 @@
        __le32 i_atime_nsec;
        __le32 i_ctime_nsec;
        __le32 i_mtime_nsec;
@@ -1018057,7 +1017970,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  /*B8*/        union {
                __le64 i_pad1;          /* Generic way to refer to this
                                           64bit union */
-@@ -715,6 +754,232 @@ struct ocfs2_group_desc
+@@ -715,6 +754,232 @@
  /*40*/        __u8    bg_bitmap[0];
  };
  
@@ -1018290,7 +1018203,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  #ifdef __KERNEL__
  static inline int ocfs2_fast_symlink_chars(struct super_block *sb)
  {
-@@ -728,6 +993,20 @@ static inline int ocfs2_max_inline_data(
+@@ -728,12 +993,44 @@
                offsetof(struct ocfs2_dinode, id2.i_data.id_data);
  }
  
@@ -1018311,10 +1018224,13 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  static inline int ocfs2_extent_recs_per_inode(struct super_block *sb)
  {
        int size;
-@@ -738,6 +1017,24 @@ static inline int ocfs2_extent_recs_per_
-       return size / sizeof(struct ocfs2_extent_rec);
- }
  
+       size = sb->s_blocksize -
+               offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
++
++      return size / sizeof(struct ocfs2_extent_rec);
++}
++
 +static inline int ocfs2_extent_recs_per_inode_with_xattr(
 +                                              struct super_block *sb,
 +                                              struct ocfs2_dinode *di)
@@ -1018329,17 +1018245,14 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
 +      else
 +              size = sb->s_blocksize -
 +                      offsetof(struct ocfs2_dinode, id2.i_list.l_recs);
-+
-+      return size / sizeof(struct ocfs2_extent_rec);
-+}
-+
- static inline int ocfs2_chain_recs_per_inode(struct super_block *sb)
- {
-       int size;
-@@ -801,6 +1098,17 @@ static inline u64 ocfs2_backup_super_blk
-       return 0;
  
+       return size / sizeof(struct ocfs2_extent_rec);
  }
+@@ -800,6 +1097,17 @@
+       return 0;
++}
 +
 +static inline u16 ocfs2_xattr_recs_per_xb(struct super_block *sb)
 +{
@@ -1018350,11 +1018263,10 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
 +                       xb_attrs.xb_root.xt_list.l_recs);
 +
 +      return size / sizeof(struct ocfs2_extent_rec);
-+}
+ }
  #else
  static inline int ocfs2_fast_symlink_chars(int blocksize)
- {
-@@ -884,6 +1192,17 @@ static inline uint64_t ocfs2_backup_supe
+@@ -884,6 +1192,17 @@
  
        return 0;
  }
@@ -1018372,9 +1018284,9 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_fs.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_f
  #endif  /* __KERNEL__ */
  
  
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_jbd_compat.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_jbd_compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_jbd_compat.h    2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/ocfs2_jbd_compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/ocfs2_jbd_compat.h      Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,82 @@
 +/* -*- mode: c; c-basic-offset: 8; -*-
 + * vim: noexpandtab sw=8 ts=8 sts=0:
@@ -1018458,10 +1018370,10 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_jbd_compat.h linux-2.6.27.19-5.1/fs/ocfs2
 +
 +
 +#endif  /* OCFS2_JBD_COMPAT_H */
-diff -purN linux-2.6.27/fs/ocfs2/ocfs2_lockid.h linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_lockid.h
---- linux-2.6.27/fs/ocfs2/ocfs2_lockid.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/ocfs2_lockid.h        2009-03-25 16:11:38.000000000 +0000
-@@ -46,6 +46,7 @@ enum ocfs2_lock_type {
+diff -r 9608d5473017 fs/ocfs2/ocfs2_lockid.h
+--- a/fs/ocfs2/ocfs2_lockid.h  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/ocfs2_lockid.h  Wed May 06 16:56:51 2009 +0100
+@@ -46,6 +46,7 @@
        OCFS2_LOCK_TYPE_DENTRY,
        OCFS2_LOCK_TYPE_OPEN,
        OCFS2_LOCK_TYPE_FLOCK,
@@ -1018469,7 +1018381,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_lockid.h linux-2.6.27.19-5.1/fs/ocfs2/ocf
        OCFS2_NUM_LOCK_TYPES
  };
  
-@@ -77,6 +78,9 @@ static inline char ocfs2_lock_type_char(
+@@ -77,6 +78,9 @@
                case OCFS2_LOCK_TYPE_FLOCK:
                        c = 'F';
                        break;
@@ -1018479,7 +1018391,7 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_lockid.h linux-2.6.27.19-5.1/fs/ocfs2/ocf
                default:
                        c = '\0';
        }
-@@ -95,6 +99,7 @@ static char *ocfs2_lock_type_strings[] =
+@@ -95,6 +99,7 @@
        [OCFS2_LOCK_TYPE_DENTRY] = "Dentry",
        [OCFS2_LOCK_TYPE_OPEN] = "Open",
        [OCFS2_LOCK_TYPE_FLOCK] = "Flock",
@@ -1018487,9 +1018399,9 @@ diff -purN linux-2.6.27/fs/ocfs2/ocfs2_lockid.h linux-2.6.27.19-5.1/fs/ocfs2/ocf
  };
  
  static inline const char *ocfs2_lock_type_string(enum ocfs2_lock_type type)
-diff -purN linux-2.6.27/fs/ocfs2/quota.h linux-2.6.27.19-5.1/fs/ocfs2/quota.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota.h       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota.h Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,121 @@
 +/*
 + * quota.h for OCFS2
@@ -1018612,9 +1018524,9 @@ diff -purN linux-2.6.27/fs/ocfs2/quota.h linux-2.6.27.19-5.1/fs/ocfs2/quota.h
 +extern struct dquot_operations ocfs2_quota_operations;
 +
 +#endif /* _OCFS2_QUOTA_H */
-diff -purN linux-2.6.27/fs/ocfs2/quota_global.c linux-2.6.27.19-5.1/fs/ocfs2/quota_global.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota_global.c        2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota_global.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota_global.c  Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,946 @@
 +/*
 + *  Implementation of operations over global quota file
@@ -1019562,9 +1019474,9 @@ diff -purN linux-2.6.27/fs/ocfs2/quota_global.c linux-2.6.27.19-5.1/fs/ocfs2/quo
 +      .alloc_dquot    = ocfs2_alloc_dquot,
 +      .destroy_dquot  = ocfs2_destroy_dquot,
 +};
-diff -purN linux-2.6.27/fs/ocfs2/quota_local.c linux-2.6.27.19-5.1/fs/ocfs2/quota_local.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/quota_local.c 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/quota_local.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/quota_local.c   Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,1252 @@
 +/*
 + *  Implementation of operations over local quota file
@@ -1020818,10 +1020730,10 @@ diff -purN linux-2.6.27/fs/ocfs2/quota_local.c linux-2.6.27.19-5.1/fs/ocfs2/quot
 +{
 +      unregister_quota_format(&ocfs2_quota_format);
 +}
-diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
---- linux-2.6.27/fs/ocfs2/resize.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/resize.c      2009-03-25 16:11:38.000000000 +0000
-@@ -200,7 +200,7 @@ static int update_backups(struct inode *
+diff -r 9608d5473017 fs/ocfs2/resize.c
+--- a/fs/ocfs2/resize.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/resize.c        Wed May 06 16:56:51 2009 +0100
+@@ -200,7 +200,7 @@
                if (cluster > clusters)
                        break;
  
@@ -1020830,7 +1020742,7 @@ diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
                if (ret < 0) {
                        mlog_errno(ret);
                        break;
-@@ -236,8 +236,8 @@ static void ocfs2_update_super_and_backu
+@@ -236,8 +236,8 @@
         * update the superblock last.
         * It doesn't matter if the write failed.
         */
@@ -1020841,7 +1020753,7 @@ diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
        if (ret < 0) {
                mlog_errno(ret);
                goto out;
-@@ -332,8 +332,7 @@ int ocfs2_group_extend(struct inode * in
+@@ -332,8 +332,7 @@
        lgd_blkno = ocfs2_which_cluster_group(main_bm_inode,
                                              first_new_cluster - 1);
  
@@ -1020851,7 +1020763,7 @@ diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
        if (ret < 0) {
                mlog_errno(ret);
                goto out_unlock;
-@@ -540,7 +539,7 @@ int ocfs2_group_add(struct inode *inode,
+@@ -540,7 +539,7 @@
                goto out_unlock;
        }
  
@@ -1020860,10 +1020772,10 @@ diff -purN linux-2.6.27/fs/ocfs2/resize.c linux-2.6.27.19-5.1/fs/ocfs2/resize.c
        if (ret < 0) {
                mlog(ML_ERROR, "Can't read the group descriptor # %llu "
                     "from the device.", (unsigned long long)input->group);
-diff -purN linux-2.6.27/fs/ocfs2/slot_map.c linux-2.6.27.19-5.1/fs/ocfs2/slot_map.c
---- linux-2.6.27/fs/ocfs2/slot_map.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/slot_map.c    2009-03-25 16:11:38.000000000 +0000
-@@ -150,8 +150,8 @@ int ocfs2_refresh_slot_info(struct ocfs2
+diff -r 9608d5473017 fs/ocfs2/slot_map.c
+--- a/fs/ocfs2/slot_map.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/slot_map.c      Wed May 06 16:56:51 2009 +0100
+@@ -150,8 +150,8 @@
         * be !NULL.  Thus, ocfs2_read_blocks() will ignore blocknr.  If
         * this is not true, the read of -1 (UINT64_MAX) will fail.
         */
@@ -1020874,7 +1020786,7 @@ diff -purN linux-2.6.27/fs/ocfs2/slot_map.c linux-2.6.27.19-5.1/fs/ocfs2/slot_ma
        if (ret == 0) {
                spin_lock(&osb->osb_lock);
                ocfs2_update_slot_info(si);
-@@ -404,7 +404,8 @@ static int ocfs2_map_slot_buffers(struct
+@@ -404,7 +404,8 @@
                     (unsigned long long)blkno);
  
                bh = NULL;  /* Acquire a fresh bh */
@@ -1020884,9 +1020796,9 @@ diff -purN linux-2.6.27/fs/ocfs2/slot_map.c linux-2.6.27.19-5.1/fs/ocfs2/slot_ma
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack_user.c
---- linux-2.6.27/fs/ocfs2/stack_user.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stack_user.c  2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/stack_user.c
+--- a/fs/ocfs2/stack_user.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stack_user.c    Wed May 06 16:56:51 2009 +0100
 @@ -28,6 +28,7 @@
  #include "ocfs2.h"  /* For struct ocfs2_lock_res */
  #include "stackglue.h"
@@ -1020895,7 +1020807,7 @@ diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack
  
  /*
   * The control protocol starts with a handshake.  Until the handshake
-@@ -739,6 +740,9 @@ static int user_dlm_lock_status(union oc
+@@ -739,11 +740,45 @@
  
  static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
  {
@@ -1020905,10 +1020817,10 @@ diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack
        return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
  }
  
-@@ -746,6 +750,37 @@ static void user_dlm_dump_lksb(union ocf
+ static void user_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb)
  {
- }
++}
++
 +static int user_plock(struct ocfs2_cluster_connection *conn,
 +                    u64 ino,
 +                    struct file *file,
@@ -1020938,12 +1020850,10 @@ diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack
 +              return dlm_posix_unlock(conn->cc_lockspace, ino, file, fl);
 +      else
 +              return dlm_posix_lock(conn->cc_lockspace, ino, file, cmd, fl);
-+}
-+
+ }
  /*
-  * Compare a requested locking protocol version against the current one.
-  *
-@@ -839,6 +874,7 @@ static struct ocfs2_stack_operations ocf
+@@ -839,6 +874,7 @@
        .dlm_unlock     = user_dlm_unlock,
        .lock_status    = user_dlm_lock_status,
        .lock_lvb       = user_dlm_lvb,
@@ -1020951,10 +1020861,10 @@ diff -purN linux-2.6.27/fs/ocfs2/stack_user.c linux-2.6.27.19-5.1/fs/ocfs2/stack
        .dump_lksb      = user_dlm_dump_lksb,
  };
  
-diff -purN linux-2.6.27/fs/ocfs2/stackglue.c linux-2.6.27.19-5.1/fs/ocfs2/stackglue.c
---- linux-2.6.27/fs/ocfs2/stackglue.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stackglue.c   2009-03-25 16:11:38.000000000 +0000
-@@ -288,6 +288,26 @@ void ocfs2_dlm_dump_lksb(union ocfs2_dlm
+diff -r 9608d5473017 fs/ocfs2/stackglue.c
+--- a/fs/ocfs2/stackglue.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stackglue.c     Wed May 06 16:56:51 2009 +0100
+@@ -288,6 +288,26 @@
  }
  EXPORT_SYMBOL_GPL(ocfs2_dlm_dump_lksb);
  
@@ -1020981,21 +1020891,21 @@ diff -purN linux-2.6.27/fs/ocfs2/stackglue.c linux-2.6.27.19-5.1/fs/ocfs2/stackg
  int ocfs2_cluster_connect(const char *stack_name,
                          const char *group,
                          int grouplen,
-diff -purN linux-2.6.27/fs/ocfs2/stackglue.h linux-2.6.27.19-5.1/fs/ocfs2/stackglue.h
---- linux-2.6.27/fs/ocfs2/stackglue.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/stackglue.h   2009-03-25 16:11:38.000000000 +0000
-@@ -28,6 +28,10 @@
+diff -r 9608d5473017 fs/ocfs2/stackglue.h
+--- a/fs/ocfs2/stackglue.h     Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/stackglue.h     Wed May 06 16:56:51 2009 +0100
+@@ -27,6 +27,10 @@
  #include "dlm/dlmapi.h"
  #include <linux/dlm.h>
++
 +/* Needed for plock-related prototypes */
 +struct file;
 +struct file_lock;
-+
  /*
   * dlmconstants.h does not have a LOCAL flag.  We hope to remove it
-  * some day, but right now we need it.  Let's fake it.  This value is larger
-@@ -187,6 +191,17 @@ struct ocfs2_stack_operations {
+@@ -187,6 +191,17 @@
        void *(*lock_lvb)(union ocfs2_dlm_lksb *lksb);
  
        /*
@@ -1021013,7 +1020923,7 @@ diff -purN linux-2.6.27/fs/ocfs2/stackglue.h linux-2.6.27.19-5.1/fs/ocfs2/stackg
         * This is an optoinal debugging hook.  If provided, the
         * stack can dump debugging information about this lock.
         */
-@@ -240,6 +255,10 @@ int ocfs2_dlm_lock_status(union ocfs2_dl
+@@ -240,6 +255,10 @@
  void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb);
  void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb);
  
@@ -1021024,10 +1020934,10 @@ diff -purN linux-2.6.27/fs/ocfs2/stackglue.h linux-2.6.27.19-5.1/fs/ocfs2/stackg
  void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto);
  
  
-diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballoc.c
---- linux-2.6.27/fs/ocfs2/suballoc.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/suballoc.c    2009-03-25 16:11:38.000000000 +0000
-@@ -62,15 +62,18 @@ static int ocfs2_block_group_fill(handle
+diff -r 9608d5473017 fs/ocfs2/suballoc.c
+--- a/fs/ocfs2/suballoc.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/suballoc.c      Wed May 06 16:56:51 2009 +0100
+@@ -62,15 +62,18 @@
                                  struct ocfs2_chain_list *cl);
  static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
                                   struct inode *alloc_inode,
@@ -1021047,7 +1020957,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                                    u16 *bit_off, u16 *bits_found);
  static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb,
                                     struct ocfs2_alloc_context *ac,
-@@ -110,8 +113,11 @@ static inline void ocfs2_block_to_cluste
+@@ -110,8 +113,11 @@
                                                u64 data_blkno,
                                                u64 *bg_blkno,
                                                u16 *bg_bit_off);
@@ -1021060,7 +1020970,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  {
        struct inode *inode = ac->ac_inode;
  
-@@ -124,10 +130,8 @@ static void ocfs2_free_ac_resource(struc
+@@ -124,10 +130,8 @@
                iput(inode);
                ac->ac_inode = NULL;
        }
@@ -1021073,7 +1020983,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  }
  
  void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac)
-@@ -276,7 +280,8 @@ static inline u16 ocfs2_find_smallest_ch
+@@ -276,7 +280,8 @@
   */
  static int ocfs2_block_group_alloc(struct ocfs2_super *osb,
                                   struct inode *alloc_inode,
@@ -1021083,7 +1020993,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  {
        int status, credits;
        struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data;
-@@ -294,9 +299,9 @@ static int ocfs2_block_group_alloc(struc
+@@ -294,9 +299,9 @@
        mlog_entry_void();
  
        cl = &fe->id2.i_chain;
@@ -1021096,7 +1021006,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        if (status < 0) {
                if (status != -ENOSPC)
                        mlog_errno(status);
-@@ -394,8 +399,7 @@ bail:
+@@ -394,8 +399,7 @@
        if (ac)
                ocfs2_free_alloc_context(ac);
  
@@ -1021106,7 +1021016,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
        mlog_exit(status);
        return status;
-@@ -469,7 +473,8 @@ static int ocfs2_reserve_suballoc_bits(s
+@@ -469,7 +473,8 @@
                        goto bail;
                }
  
@@ -1021116,7 +1021026,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                if (status < 0) {
                        if (status != -ENOSPC)
                                mlog_errno(status);
-@@ -486,16 +491,15 @@ static int ocfs2_reserve_suballoc_bits(s
+@@ -486,16 +491,15 @@
        get_bh(bh);
        ac->ac_bh = bh;
  bail:
@@ -1021137,7 +1021047,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  {
        int status;
        u32 slot;
-@@ -507,7 +511,7 @@ int ocfs2_reserve_new_metadata(struct oc
+@@ -507,7 +511,7 @@
                goto bail;
        }
  
@@ -1021146,10 +1021056,12 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        (*ac)->ac_which = OCFS2_AC_USE_META;
        slot = osb->slot_num;
        (*ac)->ac_group_search = ocfs2_block_group_search;
-@@ -532,6 +536,15 @@ bail:
-       return status;
- }
+@@ -530,6 +534,15 @@
  
+       mlog_exit(status);
+       return status;
++}
++
 +int ocfs2_reserve_new_metadata(struct ocfs2_super *osb,
 +                             struct ocfs2_extent_list *root_el,
 +                             struct ocfs2_alloc_context **ac)
@@ -1021157,27 +1021069,25 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
 +      return ocfs2_reserve_new_metadata_blocks(osb,
 +                                      ocfs2_extend_meta_needed(root_el),
 +                                      ac);
-+}
-+
+ }
  static int ocfs2_steal_inode_from_other_nodes(struct ocfs2_super *osb,
-                                             struct ocfs2_alloc_context *ac)
- {
-@@ -582,6 +595,14 @@ int ocfs2_reserve_new_inode(struct ocfs2
-       (*ac)->ac_group_search = ocfs2_block_group_search;
+@@ -580,6 +593,14 @@
+       (*ac)->ac_which = OCFS2_AC_USE_INODE;
  
-       /*
+       (*ac)->ac_group_search = ocfs2_block_group_search;
++
++      /*
 +       * stat(2) can't handle i_ino > 32bits, so we tell the
 +       * lower levels not to allocate us a block group past that
 +       * limit.  The 'inode64' mount option avoids this behavior.
 +       */
 +      if (!(osb->s_mount_opt & OCFS2_MOUNT_INODE64))
 +              (*ac)->ac_max_block = (u32)~0U;
-+
-+      /*
+       /*
         * slot is set when we successfully steal inode from other nodes.
-        * It is reset in 3 places:
-        * 1. when we flush the truncate log
-@@ -661,9 +682,9 @@ bail:
+@@ -661,9 +682,9 @@
  /* Callers don't need to care which bitmap (local alloc or main) to
   * use so we figure it out for them, but unfortunately this clutters
   * things a bit. */
@@ -1021190,7 +1021100,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  {
        int status;
  
-@@ -677,24 +698,20 @@ int ocfs2_reserve_clusters(struct ocfs2_
+@@ -677,24 +698,20 @@
        }
  
        (*ac)->ac_bits_wanted = bits_wanted;
@@ -1021221,21 +1021131,21 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                }
        }
  
-@@ -718,6 +735,13 @@ bail:
-       return status;
- }
+@@ -716,6 +733,13 @@
  
+       mlog_exit(status);
+       return status;
++}
++
 +int ocfs2_reserve_clusters(struct ocfs2_super *osb,
 +                         u32 bits_wanted,
 +                         struct ocfs2_alloc_context **ac)
 +{
 +      return ocfs2_reserve_clusters_with_limit(osb, bits_wanted, 0, ac);
-+}
-+
+ }
  /*
-  * More or less lifted from ext3. I'll leave their description below:
-  *
-@@ -1000,11 +1024,14 @@ static inline int ocfs2_block_group_reas
+@@ -1000,11 +1024,14 @@
  static int ocfs2_cluster_group_search(struct inode *inode,
                                      struct buffer_head *group_bh,
                                      u32 bits_wanted, u32 min_bits,
@@ -1021250,7 +1021160,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        u16 tmp_off, tmp_found;
        unsigned int max_bits, gd_cluster_off;
  
-@@ -1037,6 +1064,17 @@ static int ocfs2_cluster_group_search(st
+@@ -1037,6 +1064,17 @@
                if (ret)
                        return ret;
  
@@ -1021268,7 +1021178,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                /* ocfs2_block_group_find_clear_bits() might
                 * return success, but we still want to return
                 * -ENOSPC unless it found the minimum number
-@@ -1045,6 +1083,12 @@ static int ocfs2_cluster_group_search(st
+@@ -1045,6 +1083,12 @@
                        *bit_off = tmp_off;
                        *bits_found = tmp_found;
                        search = 0; /* success */
@@ -1021281,7 +1021191,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                }
        }
  
-@@ -1054,19 +1098,31 @@ static int ocfs2_cluster_group_search(st
+@@ -1054,19 +1098,31 @@
  static int ocfs2_block_group_search(struct inode *inode,
                                    struct buffer_head *group_bh,
                                    u32 bits_wanted, u32 min_bits,
@@ -1021314,7 +1021224,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
        return ret;
  }
-@@ -1116,8 +1172,7 @@ static int ocfs2_search_one_group(struct
+@@ -1116,8 +1172,7 @@
        struct ocfs2_group_desc *gd;
        struct inode *alloc_inode = ac->ac_inode;
  
@@ -1021324,7 +1021234,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        if (ret < 0) {
                mlog_errno(ret);
                return ret;
-@@ -1131,7 +1186,7 @@ static int ocfs2_search_one_group(struct
+@@ -1131,7 +1186,7 @@
        }
  
        ret = ac->ac_group_search(alloc_inode, group_bh, bits_wanted, min_bits,
@@ -1021333,7 +1021243,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        if (ret < 0) {
                if (ret != -ENOSPC)
                        mlog_errno(ret);
-@@ -1186,9 +1241,9 @@ static int ocfs2_search_chain(struct ocf
+@@ -1186,9 +1241,9 @@
             bits_wanted, chain,
             (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno);
  
@@ -1021345,7 +1021255,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -1204,21 +1259,20 @@ static int ocfs2_search_chain(struct ocf
+@@ -1204,21 +1259,20 @@
        /* for now, the chain search is a bit simplistic. We just use
         * the 1st group with any empty bits. */
        while ((status = ac->ac_group_search(alloc_inode, group_bh,
@@ -1021374,7 +1021284,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
-@@ -1307,10 +1361,8 @@ static int ocfs2_search_chain(struct ocf
+@@ -1307,10 +1361,8 @@
        *bg_blkno = le64_to_cpu(bg->bg_blkno);
        *bits_left = le16_to_cpu(bg->bg_free_bits_count);
  bail:
@@ -1021387,7 +1021297,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
        mlog_exit(status);
        return status;
-@@ -1723,7 +1775,6 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1723,7 +1775,6 @@
  {
        int status = 0;
        u32 tmp_used;
@@ -1021395,7 +1021305,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        struct ocfs2_dinode *fe = (struct ocfs2_dinode *) alloc_bh->b_data;
        struct ocfs2_chain_list *cl = &fe->id2.i_chain;
        struct buffer_head *group_bh = NULL;
-@@ -1742,8 +1793,7 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1742,8 +1793,7 @@
             (unsigned long long)OCFS2_I(alloc_inode)->ip_blkno, count,
             (unsigned long long)bg_blkno, start_bit);
  
@@ -1021405,7 +1021315,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
        if (status < 0) {
                mlog_errno(status);
                goto bail;
-@@ -1784,8 +1834,7 @@ int ocfs2_free_suballoc_bits(handle_t *h
+@@ -1784,8 +1834,7 @@
        }
  
  bail:
@@ -1021415,7 +1021325,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
        mlog_exit(status);
        return status;
-@@ -1838,9 +1887,15 @@ int ocfs2_free_clusters(handle_t *handle
+@@ -1838,9 +1887,15 @@
        status = ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh,
                                          bg_start_bit, bg_blkno,
                                          num_clusters);
@@ -1021424,15 +1021334,15 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
                mlog_errno(status);
 +              goto out;
 +      }
-+
 +      ocfs2_local_alloc_seen_free_bits(OCFS2_SB(bitmap_inode->i_sb),
 +                                       num_clusters);
++
 +out:
        mlog_exit(status);
        return status;
  }
-@@ -1891,3 +1946,84 @@ static inline void ocfs2_debug_suballoc_
+@@ -1891,3 +1946,84 @@
                       (unsigned long long)fe->id2.i_chain.cl_recs[i].c_blkno);
        }
  }
@@ -1021517,9 +1021427,9 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.c linux-2.6.27.19-5.1/fs/ocfs2/suballo
 +
 +      return ret;
 +}
-diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballoc.h
---- linux-2.6.27/fs/ocfs2/suballoc.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/suballoc.h    2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/suballoc.h
+--- a/fs/ocfs2/suballoc.h      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/suballoc.h      Wed May 06 16:56:51 2009 +0100
 @@ -28,10 +28,11 @@
  
  typedef int (group_search_t)(struct inode *,
@@ -1021536,7 +1021446,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
  struct ocfs2_alloc_context {
        struct inode *ac_inode;    /* which bitmap are we allocating from? */
-@@ -51,6 +52,8 @@ struct ocfs2_alloc_context {
+@@ -51,6 +52,8 @@
        group_search_t *ac_group_search;
  
        u64    ac_last_group;
@@ -1021545,7 +1021455,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballo
  };
  
  void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac);
-@@ -59,9 +62,17 @@ static inline int ocfs2_alloc_context_bi
+@@ -59,9 +62,17 @@
        return ac->ac_bits_wanted - ac->ac_bits_given;
  }
  
@@ -1021564,7 +1021474,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballo
  int ocfs2_reserve_new_inode(struct ocfs2_super *osb,
                            struct ocfs2_alloc_context **ac);
  int ocfs2_reserve_clusters(struct ocfs2_super *osb,
-@@ -147,6 +158,7 @@ static inline int ocfs2_is_cluster_bitma
+@@ -147,6 +158,7 @@
   * apis above. */
  int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb,
                                      struct ocfs2_alloc_context *ac);
@@ -1021572,7 +1021482,7 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballo
  
  /* given a cluster offset, calculate which block group it belongs to
   * and return that block offset. */
-@@ -156,4 +168,8 @@ u64 ocfs2_which_cluster_group(struct ino
+@@ -156,4 +168,8 @@
  int ocfs2_check_group_descriptor(struct super_block *sb,
                                 struct ocfs2_dinode *di,
                                 struct ocfs2_group_desc *gd);
@@ -1021581,9 +1021491,9 @@ diff -purN linux-2.6.27/fs/ocfs2/suballoc.h linux-2.6.27.19-5.1/fs/ocfs2/suballo
 +                        struct ocfs2_alloc_context **data_ac,
 +                        struct ocfs2_alloc_context **meta_ac);
  #endif /* _CHAINALLOC_H_ */
-diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
---- linux-2.6.27/fs/ocfs2/super.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/super.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/super.c
+--- a/fs/ocfs2/super.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/super.c Wed May 06 16:56:51 2009 +0100
 @@ -41,6 +41,7 @@
  #include <linux/debugfs.h>
  #include <linux/mount.h>
@@ -1021607,7 +1021517,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
  /* OCFS2 needs to schedule several differnt types of work which
   * require cluster locking, disk I/O, recovery waits, etc. Since these
-@@ -123,6 +128,9 @@ static int ocfs2_get_sector(struct super
+@@ -123,6 +128,9 @@
  static void ocfs2_write_super(struct super_block *sb);
  static struct inode *ocfs2_alloc_inode(struct super_block *sb);
  static void ocfs2_destroy_inode(struct inode *inode);
@@ -1021617,7 +1021527,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
  static const struct super_operations ocfs2_sops = {
        .statfs         = ocfs2_statfs,
-@@ -136,6 +144,8 @@ static const struct super_operations ocf
+@@ -136,6 +144,8 @@
        .put_super      = ocfs2_put_super,
        .remount_fs     = ocfs2_remount,
        .show_options   = ocfs2_show_options,
@@ -1021626,7 +1021536,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  };
  
  enum {
-@@ -154,6 +164,13 @@ enum {
+@@ -154,6 +164,13 @@
        Opt_localalloc,
        Opt_localflocks,
        Opt_stack,
@@ -1021640,7 +1021550,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        Opt_err,
  };
  
-@@ -173,6 +190,13 @@ static match_table_t tokens = {
+@@ -173,6 +190,13 @@
        {Opt_localalloc, "localalloc=%d"},
        {Opt_localflocks, "localflocks"},
        {Opt_stack, "cluster_stack=%s"},
@@ -1021654,7 +1021564,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        {Opt_err, NULL}
  };
  
-@@ -205,14 +229,28 @@ static int ocfs2_sync_fs(struct super_bl
+@@ -205,12 +229,26 @@
                ocfs2_schedule_truncate_log_flush(osb, 0);
        }
  
@@ -1021668,8 +1021578,8 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
 +                                           target);
        }
        return 0;
- }
++}
++
 +static int ocfs2_need_system_inode(struct ocfs2_super *osb, int ino)
 +{
 +      if (!OCFS2_HAS_RO_COMPAT_FEATURE(osb->sb, OCFS2_FEATURE_RO_COMPAT_USRQUOTA)
@@ -1021681,12 +1021591,10 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
 +              || ino == LOCAL_GROUP_QUOTA_SYSTEM_INODE))
 +              return 0;
 +      return 1;
-+}
-+
+ }
  static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)
- {
-       struct inode *new = NULL;
-@@ -239,6 +277,8 @@ static int ocfs2_init_global_system_inod
+@@ -239,6 +277,8 @@
  
        for (i = OCFS2_FIRST_ONLINE_SYSTEM_INODE;
             i <= OCFS2_LAST_GLOBAL_SYSTEM_INODE; i++) {
@@ -1021695,7 +1021603,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                new = ocfs2_get_system_file_inode(osb, i, osb->slot_num);
                if (!new) {
                        ocfs2_release_system_inodes(osb);
-@@ -269,6 +309,8 @@ static int ocfs2_init_local_system_inode
+@@ -269,6 +309,8 @@
        for (i = OCFS2_LAST_GLOBAL_SYSTEM_INODE + 1;
             i < NUM_SYSTEM_INODES;
             i++) {
@@ -1021704,7 +1021612,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                new = ocfs2_get_system_file_inode(osb, i, osb->slot_num);
                if (!new) {
                        ocfs2_release_system_inodes(osb);
-@@ -325,6 +367,7 @@ static struct inode *ocfs2_alloc_inode(s
+@@ -325,6 +367,7 @@
        if (!oi)
                return NULL;
  
@@ -1021712,7 +1021620,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        return &oi->vfs_inode;
  }
  
-@@ -406,8 +449,23 @@ static int ocfs2_remount(struct super_bl
+@@ -406,8 +449,23 @@
                goto out;
        }
  
@@ -1021736,7 +1021644,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                /* Lock here so the check of HARD_RO and the potential
                 * setting of SOFT_RO is atomic. */
                spin_lock(&osb->osb_lock);
-@@ -443,11 +501,28 @@ static int ocfs2_remount(struct super_bl
+@@ -443,11 +501,28 @@
                }
  unlock_osb:
                spin_unlock(&osb->osb_lock);
@@ -1021765,7 +1021673,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                osb->s_mount_opt = parsed_options.mount_opt;
                osb->s_atime_quantum = parsed_options.atime_quantum;
                osb->preferred_slot = parsed_options.slot;
-@@ -601,6 +676,131 @@ static int ocfs2_verify_userspace_stack(
+@@ -601,6 +676,131 @@
        return 0;
  }
  
@@ -1021897,7 +1021805,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
  {
        struct dentry *root;
-@@ -633,11 +833,32 @@ static int ocfs2_fill_super(struct super
+@@ -633,17 +833,41 @@
        }
        brelse(bh);
        bh = NULL;
@@ -1021931,17 +1021839,16 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        status = ocfs2_verify_userspace_stack(osb, &parsed_options);
        if (status)
-@@ -645,6 +866,9 @@ static int ocfs2_fill_super(struct super
+               goto read_super_error;
  
        sb->s_magic = OCFS2_SUPER_MAGIC;
++
 +      sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
 +              ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-+
        /* Hard readonly mode only if: bdev_read_only, MS_RDONLY,
         * heartbeat=none */
-       if (bdev_read_only(sb->s_bdev)) {
-@@ -739,12 +963,33 @@ static int ocfs2_fill_super(struct super
+@@ -739,12 +963,33 @@
        atomic_set(&osb->vol_state, VOLUME_MOUNTED);
        wake_up(&osb->osb_mount_event);
  
@@ -1021977,7 +1021884,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        if (inode)
                iput(inode);
-@@ -847,6 +1092,12 @@ static int ocfs2_parse_options(struct su
+@@ -847,6 +1092,12 @@
                case Opt_data_writeback:
                        mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK;
                        break;
@@ -1021990,7 +1021897,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                case Opt_atime_quantum:
                        if (match_int(&args[0], &option)) {
                                status = 0;
-@@ -873,7 +1124,7 @@ static int ocfs2_parse_options(struct su
+@@ -873,7 +1124,7 @@
                        if (option < 0)
                                return 0;
                        if (option == 0)
@@ -1021999,7 +1021906,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                        mopt->commit_interval = HZ * option;
                        break;
                case Opt_localalloc:
-@@ -918,6 +1169,44 @@ static int ocfs2_parse_options(struct su
+@@ -918,6 +1169,44 @@
                               OCFS2_STACK_LABEL_LEN);
                        mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
                        break;
@@ -1022044,7 +1021951,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
                default:
                        mlog(ML_ERROR,
                             "Unrecognized mount option \"%s\" "
-@@ -938,6 +1227,7 @@ static int ocfs2_show_options(struct seq
+@@ -938,6 +1227,7 @@
  {
        struct ocfs2_super *osb = OCFS2_SB(mnt->mnt_sb);
        unsigned long opts = osb->s_mount_opt;
@@ -1022052,7 +1021959,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        if (opts & OCFS2_MOUNT_HB_LOCAL)
                seq_printf(s, ",_netdev,heartbeat=local");
-@@ -970,8 +1260,9 @@ static int ocfs2_show_options(struct seq
+@@ -970,8 +1260,9 @@
                seq_printf(s, ",commit=%u",
                           (unsigned) (osb->osb_commit_interval / HZ));
  
@@ -1022064,7 +1021971,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        if (opts & OCFS2_MOUNT_LOCALFLOCKS)
                seq_printf(s, ",localflocks,");
-@@ -980,12 +1271,32 @@ static int ocfs2_show_options(struct seq
+@@ -980,12 +1271,32 @@
                seq_printf(s, ",cluster_stack=%.*s", OCFS2_STACK_LABEL_LEN,
                           osb->osb_cluster_stack);
  
@@ -1022097,21 +1022004,21 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        mlog_entry_void();
  
-@@ -1003,6 +1314,13 @@ static int __init ocfs2_init(void)
+@@ -1002,6 +1313,13 @@
+               mlog_errno(status);
                goto leave;
        }
++
 +      status = init_ocfs2_quota_format();
 +      if (status < 0) {
 +              mlog_errno(status);
 +              goto leave;
 +      }
 +      added_format = 1;
-+
        ocfs2_wq = create_singlethread_workqueue("ocfs2_wq");
        if (!ocfs2_wq) {
-               status = -ENOMEM;
-@@ -1021,6 +1339,8 @@ leave:
+@@ -1021,6 +1339,8 @@
        if (status < 0) {
                ocfs2_free_mem_caches();
                exit_ocfs2_uptodate_cache();
@@ -1022120,16 +1022027,16 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        }
  
        mlog_exit(status);
-@@ -1040,6 +1360,8 @@ static void __exit ocfs2_exit(void)
+@@ -1039,6 +1359,8 @@
+               flush_workqueue(ocfs2_wq);
                destroy_workqueue(ocfs2_wq);
        }
-+      exit_ocfs2_quota_format();
 +
++      exit_ocfs2_quota_format();
        debugfs_remove(ocfs2_debugfs_root);
  
-       ocfs2_free_mem_caches();
-@@ -1132,6 +1454,7 @@ static void ocfs2_inode_init_once(void *
+@@ -1132,6 +1454,7 @@
        oi->ip_dir_start_lookup = 0;
  
        init_rwsem(&oi->ip_alloc_sem);
@@ -1022137,7 +1022044,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        mutex_init(&oi->ip_io_mutex);
  
        oi->ip_blkno = 0ULL;
-@@ -1154,8 +1477,27 @@ static int ocfs2_initialize_mem_caches(v
+@@ -1154,8 +1477,27 @@
                                       (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
                                                SLAB_MEM_SPREAD),
                                       ocfs2_inode_init_once);
@@ -1022166,13 +1022073,13 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        return 0;
  }
-@@ -1164,8 +1506,15 @@ static void ocfs2_free_mem_caches(void)
+@@ -1164,8 +1506,15 @@
  {
        if (ocfs2_inode_cachep)
                kmem_cache_destroy(ocfs2_inode_cachep);
--
-       ocfs2_inode_cachep = NULL;
-+
++      ocfs2_inode_cachep = NULL;
+-      ocfs2_inode_cachep = NULL;
 +      if (ocfs2_dquot_cachep)
 +              kmem_cache_destroy(ocfs2_dquot_cachep);
 +      ocfs2_dquot_cachep = NULL;
@@ -1022183,16 +1022090,16 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  }
  
  static int ocfs2_get_sector(struct super_block *sb,
-@@ -1265,6 +1614,8 @@ static void ocfs2_dismount_volume(struct
+@@ -1264,6 +1613,8 @@
+       BUG_ON(!sb);
        osb = OCFS2_SB(sb);
        BUG_ON(!osb);
-+      ocfs2_disable_quotas(osb);
 +
++      ocfs2_disable_quotas(osb);
        ocfs2_shutdown_local_alloc(osb);
  
-       ocfs2_truncate_log_shutdown(osb);
-@@ -1375,6 +1726,9 @@ static int ocfs2_initialize_super(struct
+@@ -1375,6 +1726,9 @@
        sb->s_fs_info = osb;
        sb->s_op = &ocfs2_sops;
        sb->s_export_op = &ocfs2_export_ops;
@@ -1022202,7 +1022109,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        sb->s_time_gran = 1;
        sb->s_flags |= MS_NOATIME;
        /* this is needed to support O_LARGEFILE */
-@@ -1421,8 +1775,12 @@ static int ocfs2_initialize_super(struct
+@@ -1421,8 +1775,12 @@
  
        osb->slot_num = OCFS2_INVALID_SLOT;
  
@@ -1022215,7 +1022122,7 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
  
        init_waitqueue_head(&osb->osb_mount_event);
  
-@@ -1568,6 +1926,7 @@ static int ocfs2_initialize_super(struct
+@@ -1568,6 +1926,7 @@
        osb->first_cluster_group_blkno =
                le64_to_cpu(di->id2.i_super.s_first_cluster_group);
        osb->fs_generation = le32_to_cpu(di->i_fs_generation);
@@ -1022223,9 +1022130,9 @@ diff -purN linux-2.6.27/fs/ocfs2/super.c linux-2.6.27.19-5.1/fs/ocfs2/super.c
        mlog(0, "vol_label: %s\n", osb->vol_label);
        mlog(0, "uuid: %s\n", osb->uuid_str);
        mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n",
-diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.c
---- linux-2.6.27/fs/ocfs2/symlink.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/symlink.c     2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/symlink.c
+--- a/fs/ocfs2/symlink.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/symlink.c       Wed May 06 16:56:51 2009 +0100
 @@ -50,6 +50,7 @@
  #include "inode.h"
  #include "journal.h"
@@ -1022234,7 +1022141,7 @@ diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.
  
  #include "buffer_head_io.h"
  
-@@ -83,11 +84,7 @@ static char *ocfs2_fast_symlink_getlink(
+@@ -83,11 +84,7 @@
  
        mlog_entry_void();
  
@@ -1022247,7 +1022154,7 @@ diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.
        if (status < 0) {
                mlog_errno(status);
                link = ERR_PTR(status);
-@@ -157,8 +154,7 @@ bail:
+@@ -157,8 +154,7 @@
                kunmap(page);
                page_cache_release(page);
        }
@@ -1022257,7 +1022164,7 @@ diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.
  
        return ERR_PTR(status);
  }
-@@ -168,10 +164,18 @@ const struct inode_operations ocfs2_syml
+@@ -168,10 +164,18 @@
        .follow_link    = ocfs2_follow_link,
        .getattr        = ocfs2_getattr,
        .setattr        = ocfs2_setattr,
@@ -1022276,9 +1022183,9 @@ diff -purN linux-2.6.27/fs/ocfs2/symlink.c linux-2.6.27.19-5.1/fs/ocfs2/symlink.
 +      .listxattr      = ocfs2_listxattr,
 +      .removexattr    = generic_removexattr,
  };
-diff -purN linux-2.6.27/fs/ocfs2/uptodate.c linux-2.6.27.19-5.1/fs/ocfs2/uptodate.c
---- linux-2.6.27/fs/ocfs2/uptodate.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/uptodate.c    2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/uptodate.c
+--- a/fs/ocfs2/uptodate.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/uptodate.c      Wed May 06 16:56:51 2009 +0100
 @@ -53,7 +53,11 @@
  #include <linux/highmem.h>
  #include <linux/buffer_head.h>
@@ -1022292,7 +1022199,7 @@ diff -purN linux-2.6.27/fs/ocfs2/uptodate.c linux-2.6.27.19-5.1/fs/ocfs2/uptodat
  
  #define MLOG_MASK_PREFIX ML_UPTODATE
  
-@@ -511,14 +515,10 @@ static void ocfs2_remove_metadata_tree(s
+@@ -511,14 +515,10 @@
        ci->ci_num_cached--;
  }
  
@@ -1022309,7 +1022216,7 @@ diff -purN linux-2.6.27/fs/ocfs2/uptodate.c linux-2.6.27.19-5.1/fs/ocfs2/uptodat
        struct ocfs2_meta_cache_item *item = NULL;
        struct ocfs2_inode_info *oi = OCFS2_I(inode);
        struct ocfs2_caching_info *ci = &oi->ip_metadata_cache;
-@@ -544,6 +544,30 @@ void ocfs2_remove_from_cache(struct inod
+@@ -544,6 +544,30 @@
                kmem_cache_free(ocfs2_uptodate_cachep, item);
  }
  
@@ -1022340,10 +1022247,10 @@ diff -purN linux-2.6.27/fs/ocfs2/uptodate.c linux-2.6.27.19-5.1/fs/ocfs2/uptodat
  int __init init_ocfs2_uptodate_cache(void)
  {
        ocfs2_uptodate_cachep = kmem_cache_create("ocfs2_uptodate",
-diff -purN linux-2.6.27/fs/ocfs2/uptodate.h linux-2.6.27.19-5.1/fs/ocfs2/uptodate.h
---- linux-2.6.27/fs/ocfs2/uptodate.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/uptodate.h    2009-03-25 16:11:38.000000000 +0000
-@@ -40,6 +40,9 @@ void ocfs2_set_new_buffer_uptodate(struc
+diff -r 9608d5473017 fs/ocfs2/uptodate.h
+--- a/fs/ocfs2/uptodate.h      Wed May 06 15:47:13 2009 +0100
++++ b/fs/ocfs2/uptodate.h      Wed May 06 16:56:51 2009 +0100
+@@ -40,6 +40,9 @@
                                   struct buffer_head *bh);
  void ocfs2_remove_from_cache(struct inode *inode,
                             struct buffer_head *bh);
@@ -1022353,9 +1022260,9 @@ diff -purN linux-2.6.27/fs/ocfs2/uptodate.h linux-2.6.27.19-5.1/fs/ocfs2/uptodat
  int ocfs2_buffer_read_ahead(struct inode *inode,
                            struct buffer_head *bh);
  
-diff -purN linux-2.6.27/fs/ocfs2/xattr.c linux-2.6.27.19-5.1/fs/ocfs2/xattr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/xattr.c       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/xattr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/xattr.c Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,5299 @@
 +/* -*- mode: c; c-basic-offset: 8; -*-
 + * vim: noexpandtab sw=8 ts=8 sts=0:
@@ -1027656,9 +1027563,9 @@ diff -purN linux-2.6.27/fs/ocfs2/xattr.c linux-2.6.27.19-5.1/fs/ocfs2/xattr.c
 +      .get    = ocfs2_xattr_user_get,
 +      .set    = ocfs2_xattr_user_set,
 +};
-diff -purN linux-2.6.27/fs/ocfs2/xattr.h linux-2.6.27.19-5.1/fs/ocfs2/xattr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ocfs2/xattr.h       2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/ocfs2/xattr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/ocfs2/xattr.h Wed May 06 16:56:51 2009 +0100
 @@ -0,0 +1,73 @@
 +/* -*- mode: c; c-basic-offset: 8; -*-
 + * vim: noexpandtab sw=8 ts=8 sts=0:
@@ -1027733,9 +1027640,9 @@ diff -purN linux-2.6.27/fs/ocfs2/xattr.h linux-2.6.27.19-5.1/fs/ocfs2/xattr.h
 +                        int *, int *, struct ocfs2_alloc_context **);
 +
 +#endif /* OCFS2_XATTR_H */
-diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
---- linux-2.6.27/fs/open.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/open.c      2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/open.c
+--- a/fs/open.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/open.c        Wed May 06 16:56:51 2009 +0100
 @@ -29,6 +29,7 @@
  #include <linux/rcupdate.h>
  #include <linux/audit.h>
@@ -1027744,7 +1027651,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  
  int vfs_statfs(struct dentry *dentry, struct kstatfs *buf)
  {
-@@ -122,7 +123,7 @@ static int vfs_statfs64(struct dentry *d
+@@ -122,7 +123,7 @@
        return 0;
  }
  
@@ -1027753,7 +1027660,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error;
-@@ -138,8 +139,7 @@ asmlinkage long sys_statfs(const char __
+@@ -138,8 +139,7 @@
        return error;
  }
  
@@ -1027763,7 +1027670,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        long error;
-@@ -157,8 +157,7 @@ asmlinkage long sys_statfs64(const char 
+@@ -157,8 +157,7 @@
        return error;
  }
  
@@ -1027773,7 +1027680,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file * file;
        struct statfs tmp;
-@@ -176,7 +175,7 @@ out:
+@@ -176,7 +175,7 @@
        return error;
  }
  
@@ -1027782,7 +1027689,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file * file;
        struct statfs64 tmp;
-@@ -197,8 +196,8 @@ out:
+@@ -197,8 +196,8 @@
        return error;
  }
  
@@ -1027793,7 +1027700,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        int err;
        struct iattr newattrs;
-@@ -209,16 +208,15 @@ int do_truncate(struct dentry *dentry, l
+@@ -209,16 +208,15 @@
  
        newattrs.ia_size = length;
        newattrs.ia_valid = ATTR_SIZE | time_attrs;
@@ -1027813,7 +1027720,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mutex_unlock(&dentry->d_inode->i_mutex);
        return err;
  }
-@@ -251,7 +249,7 @@ static long do_sys_truncate(const char _
+@@ -251,7 +249,7 @@
        if (error)
                goto dput_and_out;
  
@@ -1027822,7 +1027729,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        if (error)
                goto mnt_drop_write_and_out;
  
-@@ -274,7 +272,7 @@ static long do_sys_truncate(const char _
+@@ -274,7 +272,7 @@
        error = locks_verify_truncate(inode, NULL, length);
        if (!error) {
                DQUOT_INIT(inode);
@@ -1027831,7 +1027738,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        }
  
  put_write_and_out:
-@@ -287,7 +285,7 @@ out:
+@@ -287,7 +285,7 @@
        return error;
  }
  
@@ -1027840,7 +1027747,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */
        return do_sys_truncate(path, (long)length);
-@@ -329,14 +327,15 @@ static long do_sys_ftruncate(unsigned in
+@@ -329,14 +327,15 @@
  
        error = locks_verify_truncate(inode, file, length);
        if (!error)
@@ -1027858,7 +1027765,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        long ret = do_sys_ftruncate(fd, length, 1);
        /* avoid REGPARM breakage on x86: */
-@@ -346,21 +345,35 @@ asmlinkage long sys_ftruncate(unsigned i
+@@ -346,21 +345,35 @@
  
  /* LFS versions of truncate are only needed on 32 bit machines */
  #if BITS_PER_LONG == 32
@@ -1027897,7 +1027804,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file *file;
        struct inode *inode;
-@@ -417,13 +430,20 @@ out_fput:
+@@ -417,13 +430,20 @@
  out:
        return ret;
  }
@@ -1027919,7 +1027826,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        struct inode *inode;
-@@ -474,7 +494,7 @@ asmlinkage long sys_faccessat(int dfd, c
+@@ -474,7 +494,7 @@
                        goto out_path_release;
        }
  
@@ -1027928,7 +1027835,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        /* SuS v2 requires we report a read only fs too */
        if (res || !(mode & S_IWOTH) || special_file(inode->i_mode))
                goto out_path_release;
-@@ -503,12 +523,12 @@ out:
+@@ -503,12 +523,12 @@
        return res;
  }
  
@@ -1027943,7 +1027850,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error;
-@@ -517,7 +537,7 @@ asmlinkage long sys_chdir(const char __u
+@@ -517,7 +537,7 @@
        if (error)
                goto out;
  
@@ -1027952,7 +1027859,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        if (error)
                goto dput_and_out;
  
-@@ -529,7 +549,7 @@ out:
+@@ -529,7 +549,7 @@
        return error;
  }
  
@@ -1027961,7 +1027868,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file *file;
        struct inode *inode;
-@@ -546,7 +566,7 @@ asmlinkage long sys_fchdir(unsigned int 
+@@ -546,7 +566,7 @@
        if (!S_ISDIR(inode->i_mode))
                goto out_putf;
  
@@ -1027970,7 +1027877,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        if (!error)
                set_fs_pwd(current->fs, &file->f_path);
  out_putf:
-@@ -555,7 +575,7 @@ out:
+@@ -555,7 +575,7 @@
        return error;
  }
  
@@ -1027979,7 +1027886,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error;
-@@ -564,7 +584,7 @@ asmlinkage long sys_chroot(const char __
+@@ -564,7 +584,7 @@
        if (error)
                goto out;
  
@@ -1027988,7 +1027895,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        if (error)
                goto dput_and_out;
  
-@@ -580,7 +600,7 @@ out:
+@@ -580,7 +600,7 @@
        return error;
  }
  
@@ -1027997,7 +1027904,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct inode * inode;
        struct dentry * dentry;
-@@ -597,15 +617,15 @@ asmlinkage long sys_fchmod(unsigned int 
+@@ -597,15 +617,15 @@
  
        audit_inode(NULL, dentry);
  
@@ -1028016,7 +1027923,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mutex_unlock(&inode->i_mutex);
        mnt_drop_write(file->f_path.mnt);
  out_putf:
-@@ -614,8 +634,7 @@ out:
+@@ -614,8 +634,7 @@
        return err;
  }
  
@@ -1028026,7 +1027933,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        struct inode *inode;
-@@ -635,7 +654,7 @@ asmlinkage long sys_fchmodat(int dfd, co
+@@ -635,7 +654,7 @@
                mode = inode->i_mode;
        newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
        newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
@@ -1028035,7 +1027942,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mutex_unlock(&inode->i_mutex);
        mnt_drop_write(path.mnt);
  dput_and_out:
-@@ -644,12 +663,13 @@ out:
+@@ -644,12 +663,13 @@
        return error;
  }
  
@@ -1028051,7 +1027958,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct inode *inode = dentry->d_inode;
        int error;
-@@ -667,14 +687,17 @@ static int chown_common(struct dentry * 
+@@ -667,14 +687,17 @@
        if (!S_ISDIR(inode->i_mode))
                newattrs.ia_valid |=
                        ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV;
@@ -1028071,7 +1027978,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error;
-@@ -685,7 +708,7 @@ asmlinkage long sys_chown(const char __u
+@@ -685,7 +708,7 @@
        error = mnt_want_write(path.mnt);
        if (error)
                goto out_release;
@@ -1028080,7 +1027987,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mnt_drop_write(path.mnt);
  out_release:
        path_put(&path);
-@@ -693,8 +716,8 @@ out:
+@@ -693,8 +716,8 @@
        return error;
  }
  
@@ -1028091,7 +1027998,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error = -EINVAL;
-@@ -710,7 +733,7 @@ asmlinkage long sys_fchownat(int dfd, co
+@@ -710,7 +733,7 @@
        error = mnt_want_write(path.mnt);
        if (error)
                goto out_release;
@@ -1028100,7 +1028007,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mnt_drop_write(path.mnt);
  out_release:
        path_put(&path);
-@@ -718,7 +741,7 @@ out:
+@@ -718,7 +741,7 @@
        return error;
  }
  
@@ -1028109,7 +1028016,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct path path;
        int error;
-@@ -729,7 +752,7 @@ asmlinkage long sys_lchown(const char __
+@@ -729,7 +752,7 @@
        error = mnt_want_write(path.mnt);
        if (error)
                goto out_release;
@@ -1028118,7 +1028025,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mnt_drop_write(path.mnt);
  out_release:
        path_put(&path);
-@@ -737,8 +760,7 @@ out:
+@@ -737,8 +760,7 @@
        return error;
  }
  
@@ -1028128,7 +1028035,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file * file;
        int error = -EBADF;
-@@ -748,12 +770,12 @@ asmlinkage long sys_fchown(unsigned int 
+@@ -748,12 +770,12 @@
        if (!file)
                goto out;
  
@@ -1028143,7 +1028050,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        mnt_drop_write(file->f_path.mnt);
  out_fput:
        fput(file);
-@@ -1023,13 +1045,14 @@ long do_sys_open(int dfd, const char __u
+@@ -1023,13 +1045,14 @@
                                fsnotify_open(f->f_path.dentry);
                                fd_install(fd, f);
                        }
@@ -1028159,7 +1028066,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        long ret;
  
-@@ -1042,8 +1065,8 @@ asmlinkage long sys_open(const char __us
+@@ -1042,8 +1065,8 @@
        return ret;
  }
  
@@ -1028170,7 +1028077,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        long ret;
  
-@@ -1062,7 +1085,7 @@ asmlinkage long sys_openat(int dfd, cons
+@@ -1062,7 +1085,7 @@
   * For backward compatibility?  Maybe this should be moved
   * into arch/i386 instead?
   */
@@ -1028179,7 +1028086,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);
  }
-@@ -1098,7 +1121,7 @@ EXPORT_SYMBOL(filp_close);
+@@ -1098,7 +1121,7 @@
   * releasing the fd. This ensures that one clone task can't release
   * an fd while another clone is opening it.
   */
@@ -1028188,7 +1028095,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        struct file * filp;
        struct files_struct *files = current->files;
-@@ -1112,6 +1135,7 @@ asmlinkage long sys_close(unsigned int f
+@@ -1112,6 +1135,7 @@
        filp = fdt->fd[fd];
        if (!filp)
                goto out_unlock;
@@ -1028196,7 +1028103,7 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
        rcu_assign_pointer(fdt->fd[fd], NULL);
        FD_CLR(fd, fdt->close_on_exec);
        __put_unused_fd(files, fd);
-@@ -1131,14 +1155,13 @@ out_unlock:
+@@ -1131,14 +1155,13 @@
        spin_unlock(&files->file_lock);
        return -EBADF;
  }
@@ -1028212,10 +1028119,10 @@ diff -purN linux-2.6.27/fs/open.c linux-2.6.27.19-5.1/fs/open.c
  {
        if (capable(CAP_SYS_TTY_CONFIG)) {
                /* XXX: this needs locking */
-diff -purN linux-2.6.27/fs/partitions/check.c linux-2.6.27.19-5.1/fs/partitions/check.c
---- linux-2.6.27/fs/partitions/check.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/partitions/check.c  2009-03-25 16:11:35.000000000 +0000
-@@ -480,11 +480,14 @@ int rescan_partitions(struct gendisk *di
+diff -r 9608d5473017 fs/partitions/check.c
+--- a/fs/partitions/check.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/partitions/check.c    Wed May 06 16:56:51 2009 +0100
+@@ -480,11 +480,14 @@
        res = invalidate_partition(disk, 0);
        if (res)
                return res;
@@ -1028231,7 +1028138,7 @@ diff -purN linux-2.6.27/fs/partitions/check.c linux-2.6.27.19-5.1/fs/partitions/
        if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
                return 0;
        if (IS_ERR(state))      /* I/O error reading the partition table */
-@@ -498,10 +501,23 @@ int rescan_partitions(struct gendisk *di
+@@ -498,10 +501,23 @@
                sector_t from = state->parts[p].from;
                if (!size)
                        continue;
@@ -1028257,10 +1028164,10 @@ diff -purN linux-2.6.27/fs/partitions/check.c linux-2.6.27.19-5.1/fs/partitions/
                }
                res = add_partition(disk, p, from, size, state->parts[p].flags);
                if (res) {
-diff -purN linux-2.6.27/fs/pipe.c linux-2.6.27.19-5.1/fs/pipe.c
---- linux-2.6.27/fs/pipe.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/pipe.c      2009-03-25 16:11:32.000000000 +0000
-@@ -1051,7 +1051,7 @@ int do_pipe(int *fd)
+diff -r 9608d5473017 fs/pipe.c
+--- a/fs/pipe.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/pipe.c        Wed May 06 16:56:51 2009 +0100
+@@ -1051,7 +1051,7 @@
   * sys_pipe() is the normal C calling standard for creating
   * a pipe. It's not the way Unix traditionally does this, though.
   */
@@ -1028269,7 +1028176,7 @@ diff -purN linux-2.6.27/fs/pipe.c linux-2.6.27.19-5.1/fs/pipe.c
  {
        int fd[2];
        int error;
-@@ -1067,7 +1067,7 @@ asmlinkage long __weak sys_pipe2(int __u
+@@ -1067,7 +1067,7 @@
        return error;
  }
  
@@ -1028278,9 +1028185,9 @@ diff -purN linux-2.6.27/fs/pipe.c linux-2.6.27.19-5.1/fs/pipe.c
  {
        return sys_pipe2(fildes, 0);
  }
-diff -purN linux-2.6.27/fs/proc/array.c linux-2.6.27.19-5.1/fs/proc/array.c
---- linux-2.6.27/fs/proc/array.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/array.c        2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/proc/array.c
+--- a/fs/proc/array.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/array.c  Wed May 06 16:56:51 2009 +0100
 @@ -81,6 +81,7 @@
  #include <linux/seq_file.h>
  #include <linux/pid_namespace.h>
@@ -1028289,18 +1028196,18 @@ diff -purN linux-2.6.27/fs/proc/array.c linux-2.6.27.19-5.1/fs/proc/array.c
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
-@@ -190,6 +191,8 @@ static inline void task_state(struct seq
+@@ -189,6 +190,8 @@
+               ppid, tpid,
                p->uid, p->euid, p->suid, p->fsuid,
                p->gid, p->egid, p->sgid, p->fsgid);
-+      task_utrace_proc_status(m, p);
 +
++      task_utrace_proc_status(m, p);
        task_lock(p);
        if (p->files)
-               fdt = files_fdtable(p->files);
-diff -purN linux-2.6.27/fs/proc/mmu.c linux-2.6.27.19-5.1/fs/proc/mmu.c
---- linux-2.6.27/fs/proc/mmu.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/mmu.c  2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/proc/mmu.c
+--- a/fs/proc/mmu.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/mmu.c    Wed May 06 16:56:51 2009 +0100
 @@ -14,11 +14,21 @@
  #include <asm/pgtable.h>
  #include "internal.h"
@@ -1028323,7 +1028230,7 @@ diff -purN linux-2.6.27/fs/proc/mmu.c linux-2.6.27.19-5.1/fs/proc/mmu.c
  
        vmi->used = 0;
  
-@@ -30,7 +40,8 @@ void get_vmalloc_info(struct vmalloc_inf
+@@ -30,7 +40,8 @@
  
                prev_end = VMALLOC_START;
  
@@ -1028333,7 +1028240,7 @@ diff -purN linux-2.6.27/fs/proc/mmu.c linux-2.6.27.19-5.1/fs/proc/mmu.c
  
                for (vma = vmlist; vma; vma = vma->next) {
                        unsigned long addr = (unsigned long) vma->addr;
-@@ -55,6 +66,7 @@ void get_vmalloc_info(struct vmalloc_inf
+@@ -55,6 +66,7 @@
                if (VMALLOC_END - prev_end > vmi->largest_chunk)
                        vmi->largest_chunk = VMALLOC_END - prev_end;
  
@@ -1028342,13 +1028249,14 @@ diff -purN linux-2.6.27/fs/proc/mmu.c linux-2.6.27.19-5.1/fs/proc/mmu.c
 +                      read_unlock(&vmlist_lock);
        }
  }
-diff -purN linux-2.6.27/fs/proc/proc_misc.c linux-2.6.27.19-5.1/fs/proc/proc_misc.c
---- linux-2.6.27/fs/proc/proc_misc.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/proc_misc.c    2009-03-25 16:11:39.000000000 +0000
-@@ -239,6 +239,120 @@ static int meminfo_read_proc(char *page,
+diff -r 9608d5473017 fs/proc/proc_misc.c
+--- a/fs/proc/proc_misc.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/proc_misc.c      Wed May 06 16:56:51 2009 +0100
+@@ -238,6 +238,120 @@
+       return proc_calc_metrics(page, start, off, count, eof, len);
  #undef K
  }
++
 +#ifdef        CONFIG_KDB
 +#include <linux/kdb.h>
 +#include <linux/kdbprivate.h>
@@ -1028462,14 +1028370,13 @@ diff -purN linux-2.6.27/fs/proc/proc_misc.c linux-2.6.27.19-5.1/fs/proc/proc_mis
 +#endif
 +}
 +#endif        /* CONFIG_KDB */
-+
  static int fragmentation_open(struct inode *inode, struct file *file)
  {
-       (void)inode;
-diff -purN linux-2.6.27/fs/proc/proc_sysctl.c linux-2.6.27.19-5.1/fs/proc/proc_sysctl.c
---- linux-2.6.27/fs/proc/proc_sysctl.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/proc_sysctl.c  2009-03-25 16:11:39.000000000 +0000
-@@ -31,6 +31,7 @@ static struct inode *proc_sys_make_inode
+diff -r 9608d5473017 fs/proc/proc_sysctl.c
+--- a/fs/proc/proc_sysctl.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/proc_sysctl.c    Wed May 06 16:56:51 2009 +0100
+@@ -31,6 +31,7 @@
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
        inode->i_mode = table->mode;
@@ -1028477,10 +1028384,10 @@ diff -purN linux-2.6.27/fs/proc/proc_sysctl.c linux-2.6.27.19-5.1/fs/proc/proc_s
        if (!table->child) {
                inode->i_mode |= S_IFREG;
                inode->i_op = &proc_sys_inode_operations;
-diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.c
---- linux-2.6.27/fs/proc/task_mmu.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/proc/task_mmu.c     2009-03-25 16:11:39.000000000 +0000
-@@ -198,11 +198,8 @@ static int do_maps_open(struct inode *in
+diff -r 9608d5473017 fs/proc/task_mmu.c
+--- a/fs/proc/task_mmu.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/proc/task_mmu.c       Wed May 06 16:56:52 2009 +0100
+@@ -198,20 +198,14 @@
        return ret;
  }
  
@@ -1028493,17 +1028400,16 @@ diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.
        struct mm_struct *mm = vma->vm_mm;
        struct file *file = vma->vm_file;
        int flags = vma->vm_flags;
-@@ -210,9 +207,6 @@ static int show_map(struct seq_file *m, 
+       unsigned long ino = 0;
        dev_t dev = 0;
        int len;
+-
 -      if (maps_protect && !ptrace_may_access(task, PTRACE_MODE_READ))
 -              return -EACCES;
--
        if (file) {
                struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
-               dev = inode->i_sb->s_dev;
-@@ -257,6 +251,18 @@ static int show_map(struct seq_file *m, 
+@@ -257,6 +251,18 @@
                }
        }
        seq_putc(m, '\n');
@@ -1028522,7 +1028428,7 @@ diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.
  
        if (m->count < m->size)  /* vma is copied successfully */
                m->version = (vma != get_gate_vma(task))? vma->vm_start: 0;
-@@ -367,23 +373,25 @@ static int smaps_pte_range(pmd_t *pmd, u
+@@ -367,23 +373,25 @@
  
  static int show_smap(struct seq_file *m, void *v)
  {
@@ -1028552,7 +1028458,7 @@ diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.
  
        seq_printf(m,
                   "Size:           %8lu kB\n"
-@@ -405,7 +413,9 @@ static int show_smap(struct seq_file *m,
+@@ -405,7 +413,9 @@
                   mss.referenced >> 10,
                   mss.swap >> 10);
  
@@ -1028563,7 +1028469,7 @@ diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.
  }
  
  static const struct seq_operations proc_pid_smaps_op = {
-@@ -553,9 +563,9 @@ static u64 swap_pte_to_pagemap_entry(pte
+@@ -553,9 +563,9 @@
        return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
  }
  
@@ -1028575,10 +1028481,10 @@ diff -purN linux-2.6.27/fs/proc/task_mmu.c linux-2.6.27.19-5.1/fs/proc/task_mmu.
        if (is_swap_pte(pte))
                pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
                        | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
-diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
---- linux-2.6.27/fs/quota.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota.c     2009-03-25 16:11:37.000000000 +0000
-@@ -73,7 +73,7 @@ static int generic_quotactl_valid(struct
+diff -r 9608d5473017 fs/quota.c
+--- a/fs/quota.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota.c       Wed May 06 16:56:52 2009 +0100
+@@ -73,7 +73,7 @@
                case Q_SETQUOTA:
                case Q_GETQUOTA:
                        /* This is just informative test so we are satisfied without a lock */
@@ -1028587,7 +1028493,7 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
                                return -ESRCH;
        }
  
-@@ -160,6 +160,9 @@ static void quota_sync_sb(struct super_b
+@@ -160,6 +160,9 @@
        int cnt;
  
        sb->s_qcop->quota_sync(sb, type);
@@ -1028597,7 +1028503,7 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
        /* This is not very clever (and fast) but currently I don't know about
         * any other simple way of getting quota data to disk and we must get
         * them there for userspace to be visible... */
-@@ -175,7 +178,7 @@ static void quota_sync_sb(struct super_b
+@@ -175,7 +178,7 @@
        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
                if (type != -1 && cnt != type)
                        continue;
@@ -1028606,7 +1028512,7 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
                        continue;
                mutex_lock_nested(&sb_dqopt(sb)->files[cnt]->i_mutex, I_MUTEX_QUOTA);
                truncate_inode_pages(&sb_dqopt(sb)->files[cnt]->i_data, 0);
-@@ -201,7 +204,7 @@ restart:
+@@ -201,7 +204,7 @@
                for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
                        if (type != -1 && type != cnt)
                                continue;
@@ -1028615,7 +1028521,7 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
                                continue;
                        if (!info_dirty(&sb_dqopt(sb)->info[cnt]) &&
                            list_empty(&sb_dqopt(sb)->info[cnt].dqi_dirty_list))
-@@ -245,7 +248,7 @@ static int do_quotactl(struct super_bloc
+@@ -245,7 +248,7 @@
                        __u32 fmt;
  
                        down_read(&sb_dqopt(sb)->dqptr_sem);
@@ -1028624,7 +1028530,7 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
                                up_read(&sb_dqopt(sb)->dqptr_sem);
                                return -ESRCH;
                        }
-@@ -368,7 +371,8 @@ static inline struct super_block *quotac
+@@ -368,7 +371,8 @@
   * calls. Maybe we need to add the process quotas etc. in the future,
   * but we probably should use rlimits for that.
   */
@@ -1028634,9 +1028540,9 @@ diff -purN linux-2.6.27/fs/quota.c linux-2.6.27.19-5.1/fs/quota.c
  {
        uint cmds, type;
        struct super_block *sb = NULL;
-diff -purN linux-2.6.27/fs/quota_tree.c linux-2.6.27.19-5.1/fs/quota_tree.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_tree.c        2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quota_tree.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quota_tree.c  Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,645 @@
 +/*
 + *    vfsv0 quota IO operations on file
@@ -1029283,9 +1029189,9 @@ diff -purN linux-2.6.27/fs/quota_tree.c linux-2.6.27.19-5.1/fs/quota_tree.c
 +      return 0;
 +}
 +EXPORT_SYMBOL(qtree_release_dquot);
-diff -purN linux-2.6.27/fs/quota_tree.h linux-2.6.27.19-5.1/fs/quota_tree.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_tree.h        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/quota_tree.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quota_tree.h  Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,25 @@
 +/*
 + *    Definitions of structures for vfsv0 quota format
@@ -1029312,9 +1029218,9 @@ diff -purN linux-2.6.27/fs/quota_tree.h linux-2.6.27.19-5.1/fs/quota_tree.h
 +#define QT_TREEOFF    1               /* Offset of tree in file in blocks */
 +
 +#endif /* _LINUX_QUOTAIO_TREE_H */
-diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
---- linux-2.6.27/fs/quota_v1.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_v1.c  2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/quota_v1.c
+--- a/fs/quota_v1.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota_v1.c    Wed May 06 16:56:52 2009 +0100
 @@ -3,25 +3,39 @@
  #include <linux/quota.h>
  #include <linux/quotaops.h>
@@ -1029331,7 +1029237,7 @@ diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
  MODULE_AUTHOR("Jan Kara");
  MODULE_DESCRIPTION("Old quota format support");
  MODULE_LICENSE("GPL");
++
 +#define QUOTABLOCK_BITS 10
 +#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
 +
@@ -1029344,7 +1029250,7 @@ diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
 +{
 +      return blocks << QUOTABLOCK_BITS;
 +}
-+
  static void v1_disk2mem_dqblk(struct mem_dqblk *m, struct v1_disk_dqblk *d)
  {
        m->dqb_ihardlimit = d->dqb_ihardlimit;
@@ -1029359,7 +1029265,7 @@ diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
        m->dqb_itime = d->dqb_itime;
        m->dqb_btime = d->dqb_btime;
  }
-@@ -31,9 +45,9 @@ static void v1_mem2disk_dqblk(struct v1_
+@@ -31,9 +45,9 @@
        d->dqb_ihardlimit = m->dqb_ihardlimit;
        d->dqb_isoftlimit = m->dqb_isoftlimit;
        d->dqb_curinodes = m->dqb_curinodes;
@@ -1029372,9 +1029278,9 @@ diff -purN linux-2.6.27/fs/quota_v1.c linux-2.6.27.19-5.1/fs/quota_v1.c
        d->dqb_itime = m->dqb_itime;
        d->dqb_btime = m->dqb_btime;
  }
-diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
---- linux-2.6.27/fs/quota_v2.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quota_v2.c  2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quota_v2.c
+--- a/fs/quota_v2.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/quota_v2.c    Wed May 06 16:56:52 2009 +0100
 @@ -6,7 +6,6 @@
  #include <linux/fs.h>
  #include <linux/mount.h>
@@ -1029400,15 +1029306,15 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 +static void v2_mem2diskdqb(void *dp, struct dquot *dquot);
 +static void v2_disk2memdqb(struct dquot *dquot, void *dp);
 +static int v2_is_id(void *dp, struct dquot *dquot);
-+
+-#define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
+-#define GETENTRIES(buf) ((struct v2_disk_dqblk *)(((char *)buf)+sizeof(struct v2_disk_dqdbheader)))
 +static struct qtree_fmt_operations v2_qtree_ops = {
 +      .mem2disk_dqblk = v2_mem2diskdqb,
 +      .disk2mem_dqblk = v2_disk2memdqb,
 +      .is_id = v2_is_id,
 +};
--#define GETIDINDEX(id, depth) (((id) >> ((V2_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
--#define GETENTRIES(buf) ((struct v2_disk_dqblk *)(((char *)buf)+sizeof(struct v2_disk_dqdbheader)))
++
 +#define QUOTABLOCK_BITS 10
 +#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
 +
@@ -1029424,7 +1029330,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
  
  /* Check whether given file is really vfsv0 quotafile */
  static int v2_check_quota_file(struct super_block *sb, int type)
-@@ -50,7 +70,8 @@ static int v2_check_quota_file(struct su
+@@ -50,7 +70,8 @@
  static int v2_read_file_info(struct super_block *sb, int type)
  {
        struct v2_disk_dqinfo dinfo;
@@ -1029434,7 +1029340,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        ssize_t size;
  
        size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
-@@ -60,15 +81,29 @@ static int v2_read_file_info(struct supe
+@@ -60,15 +81,29 @@
                        sb->s_id);
                return -1;
        }
@@ -1029467,7 +1029373,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        return 0;
  }
  
-@@ -76,7 +111,8 @@ static int v2_read_file_info(struct supe
+@@ -76,7 +111,8 @@
  static int v2_write_file_info(struct super_block *sb, int type)
  {
        struct v2_disk_dqinfo dinfo;
@@ -1029477,7 +1029383,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        ssize_t size;
  
        spin_lock(&dq_data_lock);
-@@ -85,9 +121,9 @@ static int v2_write_file_info(struct sup
+@@ -85,9 +121,9 @@
        dinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace);
        dinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK);
        spin_unlock(&dq_data_lock);
@@ -1029490,7 +1029396,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
               sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
        if (size != sizeof(struct v2_disk_dqinfo)) {
-@@ -98,574 +134,75 @@ static int v2_write_file_info(struct sup
+@@ -98,574 +134,75 @@
        return 0;
  }
  
@@ -1029536,16 +1029442,23 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        d->dqb_curspace = cpu_to_le64(m->dqb_curspace);
        d->dqb_btime = cpu_to_le64(m->dqb_btime);
 -      d->dqb_id = cpu_to_le32(id);
--}
--
++      d->dqb_id = cpu_to_le32(dquot->dq_id);
++      if (qtree_entry_unused(info, dp))
++              d->dqb_itime = cpu_to_le64(1);
+ }
 -static dqbuf_t getdqbuf(void)
--{
++static int v2_is_id(void *dp, struct dquot *dquot)
+ {
 -      dqbuf_t buf = kmalloc(V2_DQBLKSIZE, GFP_NOFS);
 -      if (!buf)
 -              printk(KERN_WARNING "VFS: Not enough memory for quota buffers.\n");
 -      return buf;
 -}
--
++      struct v2_disk_dqblk *d = dp;
++      struct qtree_mem_dqinfo *info =
++                      sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv;
 -static inline void freedqbuf(dqbuf_t buf)
 -{
 -      kfree(buf);
@@ -1029556,14 +1029469,10 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -      memset(buf, 0, V2_DQBLKSIZE);
 -      return sb->s_op->quota_read(sb, type, (char *)buf,
 -             V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
-+      d->dqb_id = cpu_to_le32(dquot->dq_id);
-+      if (qtree_entry_unused(info, dp))
-+              d->dqb_itime = cpu_to_le64(1);
- }
+-}
+-
 -static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
-+static int v2_is_id(void *dp, struct dquot *dquot)
- {
+-{
 -      return sb->s_op->quota_write(sb, type, (char *)buf,
 -             V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
 -}
@@ -1029663,10 +1029572,7 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -      struct mem_dqinfo *info = sb_dqinfo(sb, type);
 -      struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
 -      int err;
-+      struct v2_disk_dqblk *d = dp;
-+      struct qtree_mem_dqinfo *info =
-+                      sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv;
+-
 -      if (!tmpbuf)
 -              return -ENOMEM;
 -      dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry);
@@ -1029751,9 +1029657,8 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -out_buf:
 -      freedqbuf(buf);
 -      return 0;
-+      return le32_to_cpu(d->dqb_id) == dquot->dq_id;
- }
+-}
+-
 -/* Insert reference to structure into the trie */
 -static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth)
 -{
@@ -1029808,18 +1029713,16 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -
 -/* Wrapper for inserting quota structure into tree */
 -static inline int dq_insert_tree(struct dquot *dquot)
-+static int v2_read_dquot(struct dquot *dquot)
- {
+-{
 -      int tmp = V2_DQTREEOFF;
 -      return do_insert_tree(dquot, &tmp, 0);
-+      return qtree_read_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
- }
+-}
+-
 -/*
 - *    We don't have to be afraid of deadlocks as we never have quotas on quota files...
 - */
- static int v2_write_dquot(struct dquot *dquot)
- {
+-static int v2_write_dquot(struct dquot *dquot)
+-{
 -      int type = dquot->dq_type;
 -      ssize_t ret;
 -      struct v2_disk_dqblk ddquot, empty;
@@ -1030029,11 +1029932,10 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -static inline loff_t find_dqentry(struct dquot *dquot)
 -{
 -      return find_tree_dqentry(dquot, V2_DQTREEOFF, 0);
-+      return qtree_write_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++      return le32_to_cpu(d->dqb_id) == dquot->dq_id;
  }
  
--static int v2_read_dquot(struct dquot *dquot)
-+static int v2_release_dquot(struct dquot *dquot)
+ static int v2_read_dquot(struct dquot *dquot)
  {
 -      int type = dquot->dq_type;
 -      loff_t offset;
@@ -1030086,21 +1029988,30 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
 -      dqstats.reads++;
 -
 -      return ret;
-+      return qtree_release_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++      return qtree_read_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
  }
  
 -/* Check whether dquot should not be deleted. We know we are
 - * the only one operating on dquot (thanks to dq_lock) */
--static int v2_release_dquot(struct dquot *dquot)
-+static int v2_free_file_info(struct super_block *sb, int type)
++static int v2_write_dquot(struct dquot *dquot)
++{
++      return qtree_write_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++}
++
+ static int v2_release_dquot(struct dquot *dquot)
  {
 -      if (test_bit(DQ_FAKE_B, &dquot->dq_flags) && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace))
 -              return v2_delete_dquot(dquot);
++      return qtree_release_dquot(sb_dqinfo(dquot->dq_sb, dquot->dq_type)->dqi_priv, dquot);
++}
++
++static int v2_free_file_info(struct super_block *sb, int type)
++{
 +      kfree(sb_dqinfo(sb, type)->dqi_priv);
        return 0;
  }
  
-@@ -673,7 +210,7 @@ static struct quota_format_ops v2_format
+@@ -673,7 +210,7 @@
        .check_quota_file       = v2_check_quota_file,
        .read_file_info         = v2_read_file_info,
        .write_file_info        = v2_write_file_info,
@@ -1030109,9 +1030020,9 @@ diff -purN linux-2.6.27/fs/quota_v2.c linux-2.6.27.19-5.1/fs/quota_v2.c
        .read_dqblk             = v2_read_dquot,
        .commit_dqblk           = v2_write_dquot,
        .release_dqblk          = v2_release_dquot,
-diff -purN linux-2.6.27/fs/quotaio_v1.h linux-2.6.27.19-5.1/fs/quotaio_v1.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quotaio_v1.h        2009-03-25 16:11:36.000000000 +0000
+diff -r 9608d5473017 fs/quotaio_v1.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quotaio_v1.h  Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,33 @@
 +#ifndef _LINUX_QUOTAIO_V1_H
 +#define _LINUX_QUOTAIO_V1_H
@@ -1030146,9 +1030057,9 @@ diff -purN linux-2.6.27/fs/quotaio_v1.h linux-2.6.27.19-5.1/fs/quotaio_v1.h
 +#define v1_dqoff(UID)      ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))
 +
 +#endif        /* _LINUX_QUOTAIO_V1_H */
-diff -purN linux-2.6.27/fs/quotaio_v2.h linux-2.6.27.19-5.1/fs/quotaio_v2.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/quotaio_v2.h        2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/quotaio_v2.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/quotaio_v2.h  Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,60 @@
 +/*
 + *    Definitions of structures for vfsv0 quota format
@@ -1030210,9 +1030121,9 @@ diff -purN linux-2.6.27/fs/quotaio_v2.h linux-2.6.27.19-5.1/fs/quotaio_v2.h
 +#define V2_DQBLKSIZE_BITS 10                          /* Size of leaf block in tree */
 +
 +#endif /* _LINUX_QUOTAIO_V2_H */
-diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
---- linux-2.6.27/fs/read_write.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/read_write.c        2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/read_write.c
+--- a/fs/read_write.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/read_write.c  Wed May 06 16:56:52 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/syscalls.h>
  #include <linux/pagemap.h>
@@ -1030221,7 +1030132,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  #include "read_write.h"
  
  #include <asm/uaccess.h>
-@@ -112,7 +113,7 @@ loff_t vfs_llseek(struct file *file, lof
+@@ -112,7 +113,7 @@
  }
  EXPORT_SYMBOL(vfs_llseek);
  
@@ -1030230,7 +1030141,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        off_t retval;
        struct file * file;
-@@ -130,15 +131,18 @@ asmlinkage off_t sys_lseek(unsigned int 
+@@ -130,15 +131,18 @@
                if (res != (loff_t)retval)
                        retval = -EOVERFLOW;    /* LFS: should only happen on 32 bit platforms */
        }
@@ -1030252,16 +1030163,16 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        int retval;
        struct file * file;
-@@ -157,6 +161,8 @@ asmlinkage long sys_llseek(unsigned int 
+@@ -156,6 +160,8 @@
        offset = vfs_llseek(file, ((loff_t) offset_high << 32) | offset_low,
                        origin);
-+      trace_fs_llseek(fd, offset, origin);
 +
++      trace_fs_llseek(fd, offset, origin);
        retval = (int)offset;
        if (offset >= 0) {
-               retval = -EFAULT;
-@@ -334,7 +340,7 @@ static inline void file_pos_write(struct
+@@ -334,7 +340,7 @@
        file->f_pos = pos;
  }
  
@@ -1030270,7 +1030181,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -344,6 +350,7 @@ asmlinkage ssize_t sys_read(unsigned int
+@@ -344,6 +350,7 @@
        if (file) {
                loff_t pos = file_pos_read(file);
                ret = vfs_read(file, buf, count, &pos);
@@ -1030278,7 +1030189,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
                file_pos_write(file, pos);
                fput_light(file, fput_needed);
        }
-@@ -351,7 +358,8 @@ asmlinkage ssize_t sys_read(unsigned int
+@@ -351,7 +358,8 @@
        return ret;
  }
  
@@ -1030288,7 +1030199,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -361,6 +369,7 @@ asmlinkage ssize_t sys_write(unsigned in
+@@ -361,6 +369,7 @@
        if (file) {
                loff_t pos = file_pos_read(file);
                ret = vfs_write(file, buf, count, &pos);
@@ -1030296,7 +1030207,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
                file_pos_write(file, pos);
                fput_light(file, fput_needed);
        }
-@@ -368,8 +377,8 @@ asmlinkage ssize_t sys_write(unsigned in
+@@ -368,8 +377,8 @@
        return ret;
  }
  
@@ -1030307,7 +1030218,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -381,16 +390,27 @@ asmlinkage ssize_t sys_pread64(unsigned 
+@@ -381,16 +390,27 @@
        file = fget_light(fd, &fput_needed);
        if (file) {
                ret = -ESPIPE;
@@ -1030338,7 +1030249,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -402,13 +422,23 @@ asmlinkage ssize_t sys_pwrite64(unsigned
+@@ -402,13 +422,23 @@
        file = fget_light(fd, &fput_needed);
        if (file) {
                ret = -ESPIPE;
@@ -1030363,7 +1030274,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  
  /*
   * Reduce an iovec's length in-place.  Return the resulting number of segments
-@@ -637,8 +667,8 @@ ssize_t vfs_writev(struct file *file, co
+@@ -637,8 +667,8 @@
  
  EXPORT_SYMBOL(vfs_writev);
  
@@ -1030374,7 +1030285,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -648,6 +678,7 @@ sys_readv(unsigned long fd, const struct
+@@ -648,6 +678,7 @@
        if (file) {
                loff_t pos = file_pos_read(file);
                ret = vfs_readv(file, vec, vlen, &pos);
@@ -1030382,7 +1030293,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
                file_pos_write(file, pos);
                fput_light(file, fput_needed);
        }
-@@ -658,8 +689,8 @@ sys_readv(unsigned long fd, const struct
+@@ -658,8 +689,8 @@
        return ret;
  }
  
@@ -1030393,7 +1030304,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        struct file *file;
        ssize_t ret = -EBADF;
-@@ -669,6 +700,7 @@ sys_writev(unsigned long fd, const struc
+@@ -669,6 +700,7 @@
        if (file) {
                loff_t pos = file_pos_read(file);
                ret = vfs_writev(file, vec, vlen, &pos);
@@ -1030401,7 +1030312,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
                file_pos_write(file, pos);
                fput_light(file, fput_needed);
        }
-@@ -777,7 +809,7 @@ out:
+@@ -777,7 +809,7 @@
        return retval;
  }
  
@@ -1030410,7 +1030321,7 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        loff_t pos;
        off_t off;
-@@ -796,7 +828,7 @@ asmlinkage ssize_t sys_sendfile(int out_
+@@ -796,7 +828,7 @@
        return do_sendfile(out_fd, in_fd, NULL, count, 0);
  }
  
@@ -1030419,10 +1030330,10 @@ diff -purN linux-2.6.27/fs/read_write.c linux-2.6.27.19-5.1/fs/read_write.c
  {
        loff_t pos;
        ssize_t ret;
-diff -purN linux-2.6.27/fs/readdir.c linux-2.6.27.19-5.1/fs/readdir.c
---- linux-2.6.27/fs/readdir.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/readdir.c   2009-03-25 16:11:39.000000000 +0000
-@@ -102,7 +102,8 @@ efault:
+diff -r 9608d5473017 fs/readdir.c
+--- a/fs/readdir.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/readdir.c     Wed May 06 16:56:52 2009 +0100
+@@ -102,7 +102,8 @@
        return -EFAULT;
  }
  
@@ -1030432,7 +1030343,7 @@ diff -purN linux-2.6.27/fs/readdir.c linux-2.6.27.19-5.1/fs/readdir.c
  {
        int error;
        struct file * file;
-@@ -187,7 +188,8 @@ efault:
+@@ -187,7 +188,8 @@
        return -EFAULT;
  }
  
@@ -1030442,7 +1030353,7 @@ diff -purN linux-2.6.27/fs/readdir.c linux-2.6.27.19-5.1/fs/readdir.c
  {
        struct file * file;
        struct linux_dirent __user * lastdirent;
-@@ -271,7 +273,8 @@ efault:
+@@ -271,7 +273,8 @@
        return -EFAULT;
  }
  
@@ -1030452,10 +1030363,10 @@ diff -purN linux-2.6.27/fs/readdir.c linux-2.6.27.19-5.1/fs/readdir.c
  {
        struct file * file;
        struct linux_dirent64 __user * lastdirent;
-diff -purN linux-2.6.27/fs/reiserfs/Makefile linux-2.6.27.19-5.1/fs/reiserfs/Makefile
---- linux-2.6.27/fs/reiserfs/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/Makefile   2009-03-25 16:11:37.000000000 +0000
-@@ -7,10 +7,10 @@ obj-$(CONFIG_REISERFS_FS) += reiserfs.o
+diff -r 9608d5473017 fs/reiserfs/Makefile
+--- a/fs/reiserfs/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/Makefile     Wed May 06 16:56:52 2009 +0100
+@@ -7,10 +7,10 @@
  reiserfs-objs := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o \
                 super.o prints.o objectid.o lbalance.o ibalance.o stree.o \
                 hashes.o tail_conversion.o journal.o resize.o \
@@ -1030468,16 +1030379,16 @@ diff -purN linux-2.6.27/fs/reiserfs/Makefile linux-2.6.27.19-5.1/fs/reiserfs/Mak
  endif
  
  ifeq ($(CONFIG_REISERFS_FS_SECURITY),y)
-diff -purN linux-2.6.27/fs/reiserfs/README linux-2.6.27.19-5.1/fs/reiserfs/README
---- linux-2.6.27/fs/reiserfs/README    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/README     2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/README
+--- a/fs/reiserfs/README       Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/README       Wed May 06 16:56:52 2009 +0100
 @@ -1,4 +1,4 @@
 -[LICENSING] 
 +[LICENSING]
  
  ReiserFS is hereby licensed under the GNU General
  Public License version 2.
-@@ -31,7 +31,7 @@ the GPL as not allowing those additional
+@@ -31,7 +31,7 @@
  it wrongly, and Richard Stallman agrees with me, when carefully read
  you can see that those restrictions on additional terms do not apply
  to the owner of the copyright, and my interpretation of this shall
@@ -1030486,9 +1030397,9 @@ diff -purN linux-2.6.27/fs/reiserfs/README linux-2.6.27.19-5.1/fs/reiserfs/READM
  
  Finally, nothing in this license shall be interpreted to allow you to
  fail to fairly credit me, or to remove my credits, without my
-diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bitmap.c
---- linux-2.6.27/fs/reiserfs/bitmap.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/bitmap.c   2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/bitmap.c
+--- a/fs/reiserfs/bitmap.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/bitmap.c     Wed May 06 16:56:52 2009 +0100
 @@ -40,8 +40,8 @@
  
  #define SET_OPTION(optname) \
@@ -1030500,7 +1030411,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
      } while(0)
  #define TEST_OPTION(optname, s) \
      test_bit(_ALLOC_ ## optname , &SB_ALLOC_OPTS(s))
-@@ -64,9 +64,9 @@ int is_reusable(struct super_block *s, b
+@@ -64,9 +64,9 @@
        unsigned int bmap_count = reiserfs_bmap_count(s);
  
        if (block == 0 || block >= SB_BLOCK_COUNT(s)) {
@@ -1030513,7 +1030424,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                return 0;
        }
  
-@@ -79,31 +79,30 @@ int is_reusable(struct super_block *s, b
+@@ -79,31 +79,30 @@
                b_blocknr_t bmap1 = REISERFS_SB(s)->s_sbh->b_blocknr + 1;
                if (block >= bmap1 &&
                    block <= bmap1 + bmap_count) {
@@ -1030556,7 +1030467,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                return 0;
        }
  
-@@ -154,8 +153,8 @@ static int scan_bitmap_block(struct reis
+@@ -154,8 +153,8 @@
  /* - I mean `a window of zero bits' as in description of this function - Zam. */
  
        if (!bi) {
@@ -1030567,7 +1030478,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                return 0;
        }
  
-@@ -400,11 +399,8 @@ static void _reiserfs_free_block(struct 
+@@ -400,11 +399,8 @@
        get_bit_address(s, block, &nr, &offset);
  
        if (nr >= reiserfs_bmap_count(s)) {
@@ -1030581,7 +1030492,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                return;
        }
  
-@@ -416,9 +412,8 @@ static void _reiserfs_free_block(struct 
+@@ -416,9 +412,8 @@
  
        /* clear bit for the given block in bit map */
        if (!reiserfs_test_and_clear_le_bit(offset, bmbh->b_data)) {
@@ -1030593,7 +1030504,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
        }
        apbi[nr].free_count++;
        journal_mark_dirty(th, s, bmbh);
-@@ -445,7 +440,7 @@ void reiserfs_free_block(struct reiserfs
+@@ -445,7 +440,7 @@
                return;
  
        if (block > sb_block_count(REISERFS_SB(s)->s_rs)) {
@@ -1030602,7 +1030513,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                               "Trying to free block outside file system "
                               "boundaries (%lu > %lu)",
                               block, sb_block_count(REISERFS_SB(s)->s_rs));
-@@ -477,9 +472,8 @@ static void __discard_prealloc(struct re
+@@ -477,9 +472,8 @@
        BUG_ON(!th->t_trans_id);
  #ifdef CONFIG_REISERFS_CHECK
        if (ei->i_prealloc_count < 0)
@@ -1030614,7 +1030525,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
  #endif
        while (ei->i_prealloc_count > 0) {
                reiserfs_free_prealloc_block(th, inode, ei->i_prealloc_block);
-@@ -515,9 +509,9 @@ void reiserfs_discard_all_prealloc(struc
+@@ -515,9 +509,9 @@
                                i_prealloc_list);
  #ifdef CONFIG_REISERFS_CHECK
                if (!ei->i_prealloc_count) {
@@ -1030627,7 +1030538,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                }
  #endif
                __discard_prealloc(th, ei);
-@@ -631,12 +625,12 @@ int reiserfs_parse_alloc_options(struct 
+@@ -631,12 +625,12 @@
                        continue;
                }
  
@@ -1030643,7 +1030554,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
        return 0;
  }
  
-@@ -1145,17 +1139,18 @@ static int use_preallocated_list_if_avai
+@@ -1145,17 +1139,18 @@
                                              int amount_needed)
  {
        struct inode *inode = hint->inode;
@@ -1030667,7 +1030578,7 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
                                break;
                        }
                }
-@@ -1219,7 +1214,9 @@ void reiserfs_cache_bitmap_metadata(stru
+@@ -1219,7 +1214,9 @@
        unsigned long *cur = (unsigned long *)(bh->b_data + bh->b_size);
  
        /* The first bit must ALWAYS be 1 */
@@ -1030678,10 +1030589,10 @@ diff -purN linux-2.6.27/fs/reiserfs/bitmap.c linux-2.6.27.19-5.1/fs/reiserfs/bit
  
        info->free_count = 0;
  
-diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
---- linux-2.6.27/fs/reiserfs/dir.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/dir.c      2009-03-25 16:11:37.000000000 +0000
-@@ -41,10 +41,10 @@ static int reiserfs_dir_fsync(struct fil
+diff -r 9608d5473017 fs/reiserfs/dir.c
+--- a/fs/reiserfs/dir.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/dir.c        Wed May 06 16:56:52 2009 +0100
+@@ -41,10 +41,10 @@
  
  #define store_ih(where,what) copy_item_head (where, what)
  
@@ -1030695,7 +1030606,7 @@ diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
        struct cpu_key pos_key; /* key of current position in the directory (key of directory entry) */
        INITIALIZE_PATH(path_to_entry);
        struct buffer_head *bh;
-@@ -64,13 +64,9 @@ static int reiserfs_readdir(struct file 
+@@ -64,12 +64,8 @@
  
        /* form key for search the next directory entry using f_pos field of
           file structure */
@@ -1030704,13 +1030615,12 @@ diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
 -                   3);
 +      make_cpu_key(&pos_key, inode, *pos ?: DOT_OFFSET, TYPE_DIRENTRY, 3);
        next_pos = cpu_key_k_offset(&pos_key);
--      /*  reiserfs_warning (inode->i_sb, "reiserfs_readdir 1: f_pos = %Ld", filp->f_pos); */
 -
+-      /*  reiserfs_warning (inode->i_sb, "reiserfs_readdir 1: f_pos = %Ld", filp->f_pos); */
        path_to_entry.reada = PATH_READA;
        while (1) {
-             research:
-@@ -144,7 +140,7 @@ static int reiserfs_readdir(struct file 
+@@ -144,7 +140,7 @@
                                /* Ignore the .reiserfs_priv entry */
                                if (reiserfs_xattrs(inode->i_sb) &&
                                    !old_format_only(inode->i_sb) &&
@@ -1030719,7 +1030629,7 @@ diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
                                    REISERFS_SB(inode->i_sb)->priv_root &&
                                    REISERFS_SB(inode->i_sb)->priv_root->d_inode
                                    && deh_objectid(deh) ==
-@@ -156,7 +152,7 @@ static int reiserfs_readdir(struct file 
+@@ -156,7 +152,7 @@
                                }
  
                                d_off = deh_offset(deh);
@@ -1030728,7 +1030638,7 @@ diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
                                d_ino = deh_objectid(deh);
                                if (d_reclen <= 32) {
                                        local_buf = small_buf;
-@@ -223,15 +219,21 @@ static int reiserfs_readdir(struct file 
+@@ -223,13 +219,19 @@
  
        }                       /* while */
  
@@ -1030742,21 +1030652,19 @@ diff -purN linux-2.6.27/fs/reiserfs/dir.c linux-2.6.27.19-5.1/fs/reiserfs/dir.c
 +out:
        reiserfs_write_unlock(inode->i_sb);
        return ret;
- }
++}
++
 +static int reiserfs_readdir(struct file *file, void *dirent, filldir_t filldir)
 +{
 +      struct dentry *dentry = file->f_path.dentry;
 +      return reiserfs_readdir_dentry(dentry, dirent, filldir, &file->f_pos);
-+}
-+
+ }
  /* compose directory item containing "." and ".." entries (entries are
-    not aligned to 4 byte boundary) */
- /* the last four params are LE */
-diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/do_balan.c
---- linux-2.6.27/fs/reiserfs/do_balan.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/do_balan.c 2009-03-25 16:11:37.000000000 +0000
-@@ -29,6 +29,43 @@ struct tree_balance *cur_tb = NULL; /* d
+diff -r 9608d5473017 fs/reiserfs/do_balan.c
+--- a/fs/reiserfs/do_balan.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/do_balan.c   Wed May 06 16:56:52 2009 +0100
+@@ -29,6 +29,43 @@
                                           is interrupting do_balance */
  #endif
  
@@ -1030800,7 +1030708,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
                                       struct buffer_head *bh, int flag)
  {
-@@ -39,21 +76,21 @@ inline void do_balance_mark_leaf_dirty(s
+@@ -39,21 +76,21 @@
  #define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty
  #define do_balance_mark_sb_dirty do_balance_mark_leaf_dirty
  
@@ -1030825,7 +1030733,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  
  Vladimir made the perceptive comment that we should offload most of
  the decision making in this function into fix_nodes/check_balance, and
-@@ -86,6 +123,7 @@ static int balance_leaf_when_delete(stru
+@@ -86,6 +123,7 @@
               "PAP-12010: tree can not be empty");
  
        ih = B_N_PITEM_HEAD(tbS0, item_pos);
@@ -1030833,7 +1030741,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  
        /* Delete or truncate the item */
  
-@@ -96,10 +134,6 @@ static int balance_leaf_when_delete(stru
+@@ -96,10 +134,6 @@
                       "vs-12013: mode Delete, insert size %d, ih to be deleted %h",
                       -tb->insert_size[0], ih);
  
@@ -1030844,7 +1030752,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                leaf_delete_items(&bi, 0, item_pos, 1, -1);
  
                if (!item_pos && tb->CFL[0]) {
-@@ -121,10 +155,6 @@ static int balance_leaf_when_delete(stru
+@@ -121,10 +155,6 @@
                break;
  
        case M_CUT:{            /* cut item in S[0] */
@@ -1030855,7 +1030763,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                        if (is_direntry_le_ih(ih)) {
  
                                /* UFS unlink semantics are such that you can only delete one directory entry at a time. */
-@@ -153,8 +183,8 @@ static int balance_leaf_when_delete(stru
+@@ -153,8 +183,8 @@
  
        default:
                print_cur_tb("12040");
@@ -1030866,7 +1030774,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                               (flag ==
                                M_PASTE) ? "PASTE" : ((flag ==
                                                       M_INSERT) ? "INSERT" :
-@@ -258,15 +288,15 @@ static int balance_leaf(struct tree_bala
+@@ -258,15 +288,15 @@
      )
  {
        struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
@@ -1030885,7 +1030793,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                   it is the number of entries from the item that are shifted into S_new
                                   else
                                   it is the number of bytes from the item that are shifted into S_new
-@@ -325,11 +355,7 @@ static int balance_leaf(struct tree_bala
+@@ -325,11 +355,7 @@
                                               ih_item_len(ih));
  
                                        /* Insert new item into L[0] */
@@ -1030898,7 +1030806,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_insert_into_buf(&bi,
                                                             n + item_pos -
                                                             ret_val, ih, body,
-@@ -369,11 +395,7 @@ static int balance_leaf(struct tree_bala
+@@ -369,11 +395,7 @@
                                            leaf_shift_left(tb, tb->lnum[0] - 1,
                                                            tb->lbytes);
                                        /* Insert new item into L[0] */
@@ -1030911,7 +1030819,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_insert_into_buf(&bi,
                                                             n + item_pos -
                                                             ret_val, ih, body,
-@@ -429,13 +451,7 @@ static int balance_leaf(struct tree_bala
+@@ -429,13 +451,7 @@
                                                        }
  
                                                        /* Append given directory entry to directory item */
@@ -1030926,7 +1030834,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                        leaf_paste_in_buffer
                                                            (&bi,
                                                             n + item_pos -
-@@ -449,8 +465,7 @@ static int balance_leaf(struct tree_bala
+@@ -449,8 +465,7 @@
                                                        /* when we have merge directory item, pos_in_item has been changed too */
  
                                                        /* paste new directory entry. 1 is entry number */
@@ -1030936,7 +1030844,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                           n +
                                                                           item_pos
                                                                           -
-@@ -524,13 +539,7 @@ static int balance_leaf(struct tree_bala
+@@ -524,13 +539,7 @@
                                                                             (tbS0,
                                                                              item_pos)));
                                                        /* Append to body of item in L[0] */
@@ -1030951,7 +1030859,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                        leaf_paste_in_buffer
                                                            (&bi,
                                                             n + item_pos -
-@@ -681,11 +690,7 @@ static int balance_leaf(struct tree_bala
+@@ -681,11 +690,7 @@
                                            leaf_shift_left(tb, tb->lnum[0],
                                                            tb->lbytes);
                                        /* Append to body of item in L[0] */
@@ -1030964,7 +1030872,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_paste_in_buffer(&bi,
                                                             n + item_pos -
                                                             ret_val,
-@@ -699,7 +704,7 @@ static int balance_leaf(struct tree_bala
+@@ -699,7 +704,7 @@
                                                           n + item_pos -
                                                           ret_val);
                                        if (is_direntry_le_ih(pasted))
@@ -1030973,7 +1030881,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                   n +
                                                                   item_pos -
                                                                   ret_val,
-@@ -722,8 +727,9 @@ static int balance_leaf(struct tree_bala
+@@ -722,8 +727,9 @@
                                }
                                break;
                        default:        /* cases d and t */
@@ -1030985,7 +1030893,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                               (flag ==
                                                M_DELETE) ? "DELETE" : ((flag ==
                                                                         M_CUT)
-@@ -776,11 +782,7 @@ static int balance_leaf(struct tree_bala
+@@ -776,11 +782,7 @@
                                        set_le_ih_k_offset(ih, offset);
                                        put_ih_item_len(ih, tb->rbytes);
                                        /* Insert part of the item into R[0] */
@@ -1030998,7 +1030906,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        if ((old_len - tb->rbytes) > zeros_num) {
                                                r_zeros_number = 0;
                                                r_body =
-@@ -817,11 +819,7 @@ static int balance_leaf(struct tree_bala
+@@ -817,11 +819,7 @@
                                                             tb->rnum[0] - 1,
                                                             tb->rbytes);
                                        /* Insert new item into R[0] */
@@ -1031011,7 +1030919,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_insert_into_buf(&bi,
                                                             item_pos - n +
                                                             tb->rnum[0] - 1,
-@@ -881,21 +879,14 @@ static int balance_leaf(struct tree_bala
+@@ -881,21 +879,14 @@
                                                            pos_in_item -
                                                            entry_count +
                                                            tb->rbytes - 1;
@@ -1031035,7 +1030943,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                           0,
                                                                           paste_entry_position,
                                                                           1,
-@@ -1019,12 +1010,7 @@ static int balance_leaf(struct tree_bala
+@@ -1019,12 +1010,7 @@
                                                    (tb, tb->CFR[0], 0);
  
                                                /* Append part of body into R[0] */
@@ -1031049,7 +1030957,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                if (n_rem > zeros_num) {
                                                        r_zeros_number = 0;
                                                        r_body =
-@@ -1071,12 +1057,7 @@ static int balance_leaf(struct tree_bala
+@@ -1071,12 +1057,7 @@
                                                             tb->rbytes);
                                        /* append item in R[0] */
                                        if (pos_in_item >= 0) {
@@ -1031063,7 +1030971,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                leaf_paste_in_buffer(&bi,
                                                                     item_pos -
                                                                     n +
-@@ -1096,7 +1077,7 @@ static int balance_leaf(struct tree_bala
+@@ -1096,7 +1077,7 @@
                                                           tb->rnum[0]);
                                        if (is_direntry_le_ih(pasted)
                                            && pos_in_item >= 0) {
@@ -1031072,7 +1030980,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                   item_pos -
                                                                   n +
                                                                   tb->rnum[0],
-@@ -1136,8 +1117,8 @@ static int balance_leaf(struct tree_bala
+@@ -1136,8 +1117,8 @@
                        }
                        break;
                default:        /* cases d and t */
@@ -1031083,7 +1030991,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                       (flag ==
                                        M_DELETE) ? "DELETE" : ((flag ==
                                                                 M_CUT) ? "CUT"
-@@ -1167,8 +1148,8 @@ static int balance_leaf(struct tree_bala
+@@ -1167,8 +1148,8 @@
                   not set correctly */
                if (tb->CFL[0]) {
                        if (!tb->CFR[0])
@@ -1031094,7 +1031002,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                        copy_key(B_N_PDELIM_KEY(tb->CFL[0], tb->lkey[0]),
                                 B_N_PDELIM_KEY(tb->CFR[0], tb->rkey[0]));
                        do_balance_mark_internal_dirty(tb, tb->CFL[0], 0);
-@@ -1232,10 +1213,7 @@ static int balance_leaf(struct tree_bala
+@@ -1232,10 +1213,7 @@
                                        put_ih_item_len(ih, sbytes[i]);
  
                                        /* Insert part of the item into S_new[i] before 0-th item */
@@ -1031106,7 +1031014,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  
                                        if ((old_len - sbytes[i]) > zeros_num) {
                                                r_zeros_number = 0;
-@@ -1267,10 +1245,7 @@ static int balance_leaf(struct tree_bala
+@@ -1267,10 +1245,7 @@
                                                        S_new[i]);
  
                                        /* Insert new item into S_new[i] */
@@ -1031118,7 +1031026,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_insert_into_buf(&bi,
                                                             item_pos - n +
                                                             snum[i] - 1, ih,
-@@ -1327,10 +1302,7 @@ static int balance_leaf(struct tree_bala
+@@ -1327,10 +1302,7 @@
                                                             sbytes[i] - 1,
                                                             S_new[i]);
                                                        /* Paste given directory entry to directory item */
@@ -1031130,7 +1031038,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                        leaf_paste_in_buffer
                                                            (&bi, 0,
                                                             pos_in_item -
-@@ -1339,8 +1311,7 @@ static int balance_leaf(struct tree_bala
+@@ -1339,8 +1311,7 @@
                                                             tb->insert_size[0],
                                                             body, zeros_num);
                                                        /* paste new directory entry */
@@ -1031140,7 +1031048,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                           0,
                                                                           pos_in_item
                                                                           -
-@@ -1401,11 +1372,7 @@ static int balance_leaf(struct tree_bala
+@@ -1401,11 +1372,7 @@
                                                if (n_rem < 0)
                                                        n_rem = 0;
                                                /* Append part of body into S_new[0] */
@@ -1031153,7 +1031061,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                if (n_rem > zeros_num) {
                                                        r_zeros_number = 0;
                                                        r_body =
-@@ -1475,7 +1442,10 @@ static int balance_leaf(struct tree_bala
+@@ -1475,7 +1442,10 @@
                                            && (pos_in_item != ih_item_len(ih_check)
                                                || tb->insert_size[0] <= 0))
                                                reiserfs_panic(tb->tb_sb,
@@ -1031165,7 +1031073,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  #endif                                /* CONFIG_REISERFS_CHECK */
  
                                        leaf_mi =
-@@ -1489,10 +1459,7 @@ static int balance_leaf(struct tree_bala
+@@ -1489,10 +1459,7 @@
                                               leaf_mi);
  
                                        /* paste into item */
@@ -1031177,7 +1031085,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                        leaf_paste_in_buffer(&bi,
                                                             item_pos - n +
                                                             snum[i],
-@@ -1505,7 +1472,7 @@ static int balance_leaf(struct tree_bala
+@@ -1505,7 +1472,7 @@
                                                           item_pos - n +
                                                           snum[i]);
                                        if (is_direntry_le_ih(pasted)) {
@@ -1031186,7 +1031094,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                   item_pos -
                                                                   n + snum[i],
                                                                   pos_in_item,
-@@ -1535,8 +1502,8 @@ static int balance_leaf(struct tree_bala
+@@ -1535,8 +1502,8 @@
                        }
                        break;
                default:        /* cases d and t */
@@ -1031197,7 +1031105,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                       (flag ==
                                        M_DELETE) ? "DELETE" : ((flag ==
                                                                 M_CUT) ? "CUT"
-@@ -1559,10 +1526,7 @@ static int balance_leaf(struct tree_bala
+@@ -1559,10 +1526,7 @@
  
                switch (flag) {
                case M_INSERT:  /* insert item into S[0] */
@@ -1031209,7 +1031117,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                        leaf_insert_into_buf(&bi, item_pos, ih, body,
                                             zeros_num);
  
-@@ -1589,14 +1553,7 @@ static int balance_leaf(struct tree_bala
+@@ -1589,14 +1553,7 @@
                                                       "PAP-12260: insert_size is 0 already");
  
                                                /* prepare space */
@@ -1031225,7 +1031133,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                leaf_paste_in_buffer(&bi,
                                                                     item_pos,
                                                                     pos_in_item,
-@@ -1606,7 +1563,7 @@ static int balance_leaf(struct tree_bala
+@@ -1606,7 +1563,7 @@
                                                                     zeros_num);
  
                                                /* paste entry */
@@ -1031234,7 +1031142,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                                   item_pos,
                                                                   pos_in_item,
                                                                   1,
-@@ -1644,14 +1601,7 @@ static int balance_leaf(struct tree_bala
+@@ -1644,14 +1601,7 @@
                                                RFALSE(tb->insert_size[0] <= 0,
                                                       "PAP-12275: insert size must not be %d",
                                                       tb->insert_size[0]);
@@ -1031250,7 +1031158,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                leaf_paste_in_buffer(&bi,
                                                                     item_pos,
                                                                     pos_in_item,
-@@ -1681,10 +1631,11 @@ static int balance_leaf(struct tree_bala
+@@ -1681,10 +1631,11 @@
                                                        print_cur_tb("12285");
                                                        reiserfs_panic(tb->
                                                                       tb_sb,
@@ -1031266,7 +1031174,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                }
                                        }
  #endif                                /* CONFIG_REISERFS_CHECK */
-@@ -1697,11 +1648,10 @@ static int balance_leaf(struct tree_bala
+@@ -1697,11 +1648,10 @@
        if (flag == M_PASTE && tb->insert_size[0]) {
                print_cur_tb("12290");
                reiserfs_panic(tb->tb_sb,
@@ -1031279,7 +1031187,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
        return 0;
  }                             /* Leaf level of the tree is balanced (end of balance_leaf) */
  
-@@ -1724,7 +1674,6 @@ void make_empty_node(struct buffer_info 
+@@ -1724,7 +1674,6 @@
  struct buffer_head *get_FEB(struct tree_balance *tb)
  {
        int i;
@@ -1031287,7 +1031195,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
        struct buffer_info bi;
  
        for (i = 0; i < MAX_FEB_SIZE; i++)
-@@ -1732,19 +1681,15 @@ struct buffer_head *get_FEB(struct tree_
+@@ -1732,19 +1681,15 @@
                        break;
  
        if (i == MAX_FEB_SIZE)
@@ -1031312,7 +1031220,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  }
  
  /* This is now used because reiserfs_free_block has to be able to
-@@ -1755,15 +1700,16 @@ static void store_thrown(struct tree_bal
+@@ -1755,15 +1700,16 @@
        int i;
  
        if (buffer_dirty(bh))
@@ -1031332,7 +1031240,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
  }
  
  static void free_thrown(struct tree_balance *tb)
-@@ -1774,8 +1720,8 @@ static void free_thrown(struct tree_bala
+@@ -1774,8 +1720,8 @@
                if (tb->thrown[i]) {
                        blocknr = tb->thrown[i]->b_blocknr;
                        if (buffer_dirty(tb->thrown[i]))
@@ -1031343,7 +1031251,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                                 blocknr);
                        brelse(tb->thrown[i]);  /* incremented in store_thrown */
                        reiserfs_free_block(tb->transaction_handle, NULL,
-@@ -1873,20 +1819,19 @@ static void check_internal_node(struct s
+@@ -1873,20 +1819,19 @@
        for (i = 0; i <= B_NR_ITEMS(bh); i++, dc++) {
                if (!is_reusable(s, dc_block_number(dc), 1)) {
                        print_cur_tb(mes);
@@ -1031369,7 +1031277,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                return 1;
        }
        return 0;
-@@ -1897,26 +1842,28 @@ static int check_before_balancing(struct
+@@ -1897,26 +1842,28 @@
        int retval = 0;
  
        if (cur_tb) {
@@ -1031408,7 +1031316,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
        check_leaf(PATH_PLAST_BUFFER(tb->tb_path));
  
        return retval;
-@@ -1930,8 +1877,8 @@ static void check_after_balance_leaf(str
+@@ -1930,8 +1877,8 @@
                    dc_size(B_N_CHILD
                            (tb->FL[0], get_left_neighbor_position(tb, 0)))) {
                        print_cur_tb("12221");
@@ -1031419,7 +1031327,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                }
        }
        if (tb->rnum[0]) {
-@@ -1940,8 +1887,8 @@ static void check_after_balance_leaf(str
+@@ -1940,8 +1887,8 @@
                    dc_size(B_N_CHILD
                            (tb->FR[0], get_right_neighbor_position(tb, 0)))) {
                        print_cur_tb("12222");
@@ -1031430,7 +1031338,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                }
        }
        if (PATH_H_PBUFFER(tb->tb_path, 1) &&
-@@ -1955,7 +1902,7 @@ static void check_after_balance_leaf(str
+@@ -1955,7 +1902,7 @@
                                               PATH_H_POSITION(tb->tb_path,
                                                               1))));
                print_cur_tb("12223");
@@ -1031439,7 +1031347,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                                 "B_FREE_SPACE (PATH_H_PBUFFER(tb->tb_path,0)) = %d; "
                                 "MAX_CHILD_SIZE (%d) - dc_size( %y, %d ) [%d] = %d",
                                 left,
-@@ -1966,8 +1913,7 @@ static void check_after_balance_leaf(str
+@@ -1966,8 +1913,7 @@
                                         (PATH_H_PBUFFER(tb->tb_path, 1),
                                          PATH_H_POSITION(tb->tb_path, 1))),
                                 right);
@@ -1031449,7 +1031357,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
        }
  }
  
-@@ -2037,7 +1983,7 @@ static inline void do_balance_starts(str
+@@ -2037,7 +1983,7 @@
        /* store_print_tb (tb); */
  
        /* do not delete, just comment it out */
@@ -1031458,7 +1031366,7 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
             "check");*/
        RFALSE(check_before_balancing(tb), "PAP-12340: locked buffers in TB");
  #ifdef CONFIG_REISERFS_CHECK
-@@ -2102,14 +2048,13 @@ void do_balance(struct tree_balance *tb,
+@@ -2102,14 +2048,13 @@
        tb->need_balance_dirty = 0;
  
        if (FILESYSTEM_CHANGED_TB(tb)) {
@@ -1031477,9 +1031385,9 @@ diff -purN linux-2.6.27/fs/reiserfs/do_balan.c linux-2.6.27.19-5.1/fs/reiserfs/d
                unfix_nodes(tb);
                return;
        }
-diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.c
---- linux-2.6.27/fs/reiserfs/file.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/file.c     2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/file.c
+--- a/fs/reiserfs/file.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/file.c       Wed May 06 16:56:52 2009 +0100
 @@ -20,14 +20,14 @@
  ** insertion/balancing, for files that are written in one write.
  ** It avoids unnecessary tail packings (balances) for files that are written in
@@ -1031498,7 +1031406,7 @@ diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.
  */
  static int reiserfs_file_release(struct inode *inode, struct file *filp)
  {
-@@ -76,7 +76,7 @@ static int reiserfs_file_release(struct 
+@@ -76,7 +76,7 @@
                         * and let the admin know what is going on.
                         */
                        igrab(inode);
@@ -1031507,7 +1031415,7 @@ diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.
                                         "pinning inode %lu because the "
                                         "preallocation can't be freed",
                                         inode->i_ino);
-@@ -134,23 +134,23 @@ static void reiserfs_vfs_truncate_file(s
+@@ -134,23 +134,23 @@
   * be removed...
   */
  
@@ -1031543,7 +1031451,7 @@ diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.
  }
  
  /* taken fs/buffer.c:__block_commit_write */
-@@ -223,7 +223,7 @@ int reiserfs_commit_page(struct inode *i
+@@ -223,7 +223,7 @@
  }
  
  /* Write @count bytes at position @ppos in a file indicated by @file
@@ -1031552,9 +1031460,9 @@ diff -purN linux-2.6.27/fs/reiserfs/file.c linux-2.6.27.19-5.1/fs/reiserfs/file.
  
     generic_file_write() is only appropriate for filesystems that are not seeking to optimize performance and want
     something simple that works.  It is not for serious use by general purpose filesystems, excepting the one that it was
-diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/fix_node.c
---- linux-2.6.27/fs/reiserfs/fix_node.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/fix_node.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/fix_node.c
+--- a/fs/reiserfs/fix_node.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/fix_node.c   Wed May 06 16:56:52 2009 +0100
 @@ -30,8 +30,8 @@
   ** get_direct_parent
   ** get_neighbors
@@ -1031566,7 +1031474,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   **/
  
  #include <linux/time.h>
-@@ -135,8 +135,7 @@ static void create_virtual_node(struct t
+@@ -135,8 +135,7 @@
                vn->vn_free_ptr +=
                    op_create_vi(vn, vi, is_affected, tb->insert_size[0]);
                if (tb->vn_buf + tb->vn_buf_size < vn->vn_free_ptr)
@@ -1031576,7 +1031484,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                       "virtual node space consumed");
  
                if (!is_affected)
-@@ -186,8 +185,9 @@ static void create_virtual_node(struct t
+@@ -186,8 +185,9 @@
                             && I_ENTRY_COUNT(B_N_PITEM_HEAD(Sh, 0)) == 1)) {
                                /* node contains more than 1 item, or item is not directory item, or this item contains more than 1 entry */
                                print_block(Sh, 0, -1, -1);
@@ -1031588,7 +1031496,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                               key, vn->vn_affected_item_num,
                                               vn->vn_mode, M_DELETE);
                        }
-@@ -377,9 +377,9 @@ static int get_num_ver(int mode, struct 
+@@ -377,9 +377,9 @@
        int needed_nodes;
        int start_item,         /* position of item we start filling node from */
         end_item,              /* position of item we finish filling node by */
@@ -1031600,7 +1031508,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                   we do node include into node that is being filled */
        int split_item_positions[2];    /* these are positions in virtual item of
                                           items, that are split between S[0] and
-@@ -496,8 +496,8 @@ static int get_num_ver(int mode, struct 
+@@ -496,8 +496,8 @@
                snum012[needed_nodes - 1 + 3] = units;
  
                if (needed_nodes > 2)
@@ -1031611,7 +1031519,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                snum012[needed_nodes - 1]++;
                split_item_positions[needed_nodes - 1] = i;
                needed_nodes++;
-@@ -533,8 +533,8 @@ static int get_num_ver(int mode, struct 
+@@ -533,8 +533,8 @@
  
                if (vn->vn_vi[split_item_num].vi_index != TYPE_DIRENTRY &&
                    vn->vn_vi[split_item_num].vi_index != TYPE_INDIRECT)
@@ -1031622,7 +1031530,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
        }
  
        /* now we know S2bytes, calculate S1bytes */
-@@ -569,7 +569,7 @@ extern struct tree_balance *cur_tb;
+@@ -569,7 +569,7 @@
  
  /* Set parameters for balancing.
   * Performs write of results of analysis of balancing into structure tb,
@@ -1031631,7 +1031539,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   * Parameters:
   *    tb      tree_balance structure;
   *    h       current level of the node;
-@@ -749,25 +749,26 @@ else \
+@@ -749,25 +749,26 @@
                  -1, -1);\
  }
  
@@ -1031640,17 +1031548,9 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  {
 -      int n_counter;
 +      int i;
-+
-+      pathrelse(tb->tb_path);
  
 -      decrement_counters_in_path(p_s_tb->tb_path);
-+      for (i = 0; i < MAX_HEIGHT; i++) {
-+              brelse(tb->L[i]);
-+              brelse(tb->R[i]);
-+              brelse(tb->FL[i]);
-+              brelse(tb->FR[i]);
-+              brelse(tb->CFL[i]);
-+              brelse(tb->CFR[i]);
++      pathrelse(tb->tb_path);
  
 -      for (n_counter = 0; n_counter < MAX_HEIGHT; n_counter++) {
 -              decrement_bcount(p_s_tb->L[n_counter]);
@@ -1031665,6 +1031565,14 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -              p_s_tb->CFL[n_counter] = NULL;
 -              decrement_bcount(p_s_tb->CFR[n_counter]);
 -              p_s_tb->CFR[n_counter] = NULL;
++      for (i = 0; i < MAX_HEIGHT; i++) {
++              brelse(tb->L[i]);
++              brelse(tb->R[i]);
++              brelse(tb->FL[i]);
++              brelse(tb->FR[i]);
++              brelse(tb->CFL[i]);
++              brelse(tb->CFR[i]);
++
 +              tb->L[i] = NULL;
 +              tb->R[i] = NULL;
 +              tb->FL[i] = NULL;
@@ -1031674,7 +1031582,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
        }
  }
  
-@@ -777,14 +778,14 @@ static void free_buffers_in_tb(struct tr
+@@ -777,14 +778,14 @@
   *            NO_DISK_SPACE - no disk space.
   */
  /* The function is NOT SCHEDULE-SAFE! */
@@ -1031696,7 +1031604,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        /* number_of_freeblk is the number of empty blocks which have been
           acquired for use by the balancing algorithm minus the number of
-@@ -792,7 +793,7 @@ static int get_empty_nodes(struct tree_b
+@@ -792,7 +793,7 @@
           number_of_freeblk = tb->cur_blknum can be non-zero if a schedule occurs
           after empty blocks are acquired, and the balancing analysis is
           then restarted, amount_needed is the number needed by this level
@@ -1031705,7 +1031613,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
           Note that for systems with many processes writing, it would be
           more layout optimal to calculate the total number needed by all
-@@ -800,54 +801,54 @@ static int get_empty_nodes(struct tree_b
+@@ -800,54 +801,54 @@
  
        /* Initiate number_of_freeblk to the amount acquired prior to the restart of
           the analysis or 0 if not restarted, then subtract the amount needed
@@ -1031786,7 +1031694,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  }
  
  /* Get free space of the left neighbor, which is stored in the parent
-@@ -895,35 +896,36 @@ static int get_rfree(struct tree_balance
+@@ -895,35 +896,36 @@
  }
  
  /* Check whether left neighbor is in memory. */
@@ -1031841,7 +1031749,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
                RFALSE(buffer_uptodate(left) && !B_IS_IN_TREE(left),
                       "vs-8170: left neighbor (%b %z) is not in the tree",
-@@ -938,10 +940,10 @@ static int is_left_neighbor_in_cache(str
+@@ -938,10 +940,10 @@
  #define LEFT_PARENTS  'l'
  #define RIGHT_PARENTS 'r'
  
@@ -1031854,7 +1031762,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  }
  
  /* Calculate far left/right parent of the left/right neighbor of the current node, that
-@@ -952,77 +954,77 @@ static void decrement_key(struct cpu_key
+@@ -952,77 +954,77 @@
                SCHEDULE_OCCURRED - schedule occurred while the function worked;
   *            CARRY_ON         - schedule didn't occur while the function worked;
   */
@@ -1031969,7 +1031877,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                        return REPEAT_SEARCH;
                }
        }
-@@ -1032,128 +1034,131 @@ static int get_far_parent(struct tree_ba
+@@ -1032,128 +1034,131 @@
  
        /* Form key to get parent of the left/right neighbor. */
        le_key2cpu_key(&s_lr_father_key,
@@ -1032108,13 +1032016,21 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -      p_s_tb->FL[n_h] = p_s_curf;     /* New initialization of FL[n_h]. */
 -      decrement_bcount(p_s_tb->CFL[n_h]);
 -      p_s_tb->CFL[n_h] = p_s_curcf;   /* New initialization of CFL[n_h]. */
--
++      brelse(tb->FL[h]);
++      tb->FL[h] = curf;       /* New initialization of FL[h]. */
++      brelse(tb->CFL[h]);
++      tb->CFL[h] = curcf;     /* New initialization of CFL[h]. */
 -      RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
 -             (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
 -             "PAP-8195: FL (%b) or CFL (%b) is invalid", p_s_curf, p_s_curcf);
--
++      RFALSE((curf && !B_IS_IN_TREE(curf)) ||
++             (curcf && !B_IS_IN_TREE(curcf)),
++             "PAP-8195: FL (%b) or CFL (%b) is invalid", curf, curcf);
 -/* Get parent FR[n_h] of R[n_h]. */
--
++/* Get parent FR[h] of R[h]. */
 -/* Current node is the last child of F[n_h]. FR[n_h] != F[n_h]. */
 -      if (n_position == B_NR_ITEMS(PATH_H_PBUFFER(p_s_path, n_h + 1))) {
 -/* Calculate current parent of R[n_h], which is the right neighbor of F[n_h].
@@ -1032122,17 +1032038,6 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -   not equal FR[n_path_offset] and CFR[n_h] not equal F[n_h]. */
 -              if ((n_ret_value =
 -                   get_far_parent(p_s_tb, n_h + 1, &p_s_curf, &p_s_curcf,
-+      brelse(tb->FL[h]);
-+      tb->FL[h] = curf;       /* New initialization of FL[h]. */
-+      brelse(tb->CFL[h]);
-+      tb->CFL[h] = curcf;     /* New initialization of CFL[h]. */
-+
-+      RFALSE((curf && !B_IS_IN_TREE(curf)) ||
-+             (curcf && !B_IS_IN_TREE(curcf)),
-+             "PAP-8195: FL (%b) or CFL (%b) is invalid", curf, curcf);
-+
-+/* Get parent FR[h] of R[h]. */
-+
 +/* Current node is the last child of F[h]. FR[h] != F[h]. */
 +      if (position == B_NR_ITEMS(PATH_H_PBUFFER(path, h + 1))) {
 +/* Calculate current parent of R[h], which is the right neighbor of F[h].
@@ -1032151,40 +1032056,36 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -              get_bh(p_s_curf);
 -              get_bh(p_s_curf);
 -              p_s_tb->rkey[n_h] = n_position;
--      }
--
--      decrement_bcount(p_s_tb->FR[n_h]);
--      p_s_tb->FR[n_h] = p_s_curf;     /* New initialization of FR[n_path_offset]. */
--
--      decrement_bcount(p_s_tb->CFR[n_h]);
--      p_s_tb->CFR[n_h] = p_s_curcf;   /* New initialization of CFR[n_path_offset]. */
--
--      RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
--             (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
--             "PAP-8205: FR (%b) or CFR (%b) is invalid", p_s_curf, p_s_curcf);
 +/* Current node is not the last child of its parent F[h]. */
 +              curf = PATH_OFFSET_PBUFFER(path, path_offset - 1);
 +              curcf = PATH_OFFSET_PBUFFER(path, path_offset - 1);
 +              get_bh(curf);
 +              get_bh(curf);
 +              tb->rkey[h] = position;
-+      }
-+
+       }
+-      decrement_bcount(p_s_tb->FR[n_h]);
+-      p_s_tb->FR[n_h] = p_s_curf;     /* New initialization of FR[n_path_offset]. */
 +      brelse(tb->FR[h]);
 +      /* New initialization of FR[path_offset]. */
 +      tb->FR[h] = curf;
-+
+-      decrement_bcount(p_s_tb->CFR[n_h]);
+-      p_s_tb->CFR[n_h] = p_s_curcf;   /* New initialization of CFR[n_path_offset]. */
 +      brelse(tb->CFR[h]);
 +      /* New initialization of CFR[path_offset]. */
 +      tb->CFR[h] = curcf;
-+
+-      RFALSE((p_s_curf && !B_IS_IN_TREE(p_s_curf)) ||
+-             (p_s_curcf && !B_IS_IN_TREE(p_s_curcf)),
+-             "PAP-8205: FR (%b) or CFR (%b) is invalid", p_s_curf, p_s_curcf);
 +      RFALSE((curf && !B_IS_IN_TREE(curf)) ||
 +             (curcf && !B_IS_IN_TREE(curcf)),
 +             "PAP-8205: FR (%b) or CFR (%b) is invalid", curf, curcf);
  
        return CARRY_ON;
  }
-@@ -1203,7 +1208,7 @@ static inline int can_node_be_removed(in
+@@ -1203,7 +1208,7 @@
   *    h       current level of the node;
   *    inum    item number in S[h];
   *    mode    i - insert, p - paste;
@@ -1032193,7 +1032094,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   *            0 - balancing for higher levels needed;
   *           -1 - no balancing for higher levels needed;
   *           -2 - no disk space.
-@@ -1217,7 +1222,7 @@ static int ip_check_balance(struct tree_
+@@ -1217,7 +1222,7 @@
                                   contains node being balanced.  The mnemonic is
                                   that the attempted change in node space used level
                                   is levbytes bytes. */
@@ -1032202,7 +1032103,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        int lfree, sfree, rfree /* free space in L, S and R */ ;
  
-@@ -1238,7 +1243,7 @@ static int ip_check_balance(struct tree_
+@@ -1238,7 +1243,7 @@
        /* we perform 8 calls to get_num_ver().  For each call we calculate five parameters.
           where 4th parameter is s1bytes and 5th - s2bytes
         */
@@ -1032211,7 +1032112,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                           0,1 - do not shift and do not shift but bottle
                                           2 - shift only whole item to left
                                           3 - shift to left and bottle as much as possible
-@@ -1255,24 +1260,24 @@ static int ip_check_balance(struct tree_
+@@ -1255,24 +1260,24 @@
        /* Calculate balance parameters for creating new root. */
        if (!Sh) {
                if (!h)
@@ -1032244,7 +1032145,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        sfree = B_FREE_SPACE(Sh);
  
-@@ -1287,7 +1292,7 @@ static int ip_check_balance(struct tree_
+@@ -1287,7 +1292,7 @@
  
        create_virtual_node(tb, h);
  
@@ -1032253,7 +1032154,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
           determine maximal number of items we can shift to the left neighbor (in tb structure)
           and the maximal number of bytes that can flow to the left neighbor
           from the left most liquid item that cannot be shifted from S[0] entirely (returned value)
-@@ -1348,13 +1353,13 @@ static int ip_check_balance(struct tree_
+@@ -1348,13 +1353,13 @@
  
        {
                int lpar, rpar, nset, lset, rset, lrset;
@@ -1032270,7 +1032171,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                 */
  #define FLOW 1
  #define NO_FLOW 0             /* do not any splitting */
-@@ -1544,7 +1549,7 @@ static int ip_check_balance(struct tree_
+@@ -1544,7 +1549,7 @@
   *    h       current level of the node;
   *    inum    item number in S[h];
   *    mode    i - insert, p - paste;
@@ -1032279,7 +1032180,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   *            0 - balancing for higher levels needed;
   *           -1 - no balancing for higher levels needed;
   *           -2 - no disk space.
-@@ -1559,7 +1564,7 @@ static int dc_check_balance_internal(str
+@@ -1559,7 +1564,7 @@
        /* Sh is the node whose balance is currently being checked,
           and Fh is its father.  */
        struct buffer_head *Sh, *Fh;
@@ -1032288,7 +1032189,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
        int lfree, rfree /* free space in L and R */ ;
  
        Sh = PATH_H_PBUFFER(tb->tb_path, h);
-@@ -1584,8 +1589,8 @@ static int dc_check_balance_internal(str
+@@ -1584,8 +1589,8 @@
                return CARRY_ON;
        }
  
@@ -1032299,7 +1032200,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        /* get free space of neighbors */
        rfree = get_rfree(tb, h);
-@@ -1727,7 +1732,7 @@ static int dc_check_balance_internal(str
+@@ -1727,7 +1732,7 @@
   *    h       current level of the node;
   *    inum    item number in S[h];
   *    mode    i - insert, p - paste;
@@ -1032308,7 +1032209,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   *            0 - balancing for higher levels needed;
   *           -1 - no balancing for higher levels needed;
   *           -2 - no disk space.
-@@ -1742,7 +1747,7 @@ static int dc_check_balance_leaf(struct 
+@@ -1742,7 +1747,7 @@
           attempted change in node space used level is levbytes bytes. */
        int levbytes;
        /* the maximal item size */
@@ -1032317,7 +1032218,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
        /* S0 is the node whose balance is currently being checked,
           and F0 is its father.  */
        struct buffer_head *S0, *F0;
-@@ -1764,8 +1769,8 @@ static int dc_check_balance_leaf(struct 
+@@ -1764,8 +1769,8 @@
                return NO_BALANCING_NEEDED;
        }
  
@@ -1032328,7 +1032229,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        /* get free space of neighbors */
        rfree = get_rfree(tb, h);
-@@ -1821,7 +1826,7 @@ static int dc_check_balance_leaf(struct 
+@@ -1821,7 +1826,7 @@
   *    h       current level of the node;
   *    inum    item number in S[h];
   *    mode    d - delete, c - cut.
@@ -1032337,7 +1032238,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   *            0 - balancing for higher levels needed;
   *           -1 - no balancing for higher levels needed;
   *           -2 - no disk space.
-@@ -1850,7 +1855,7 @@ static int dc_check_balance(struct tree_
+@@ -1850,7 +1855,7 @@
   *    h       current level of the node;
   *    inum    item number in S[h];
   *    mode    i - insert, p - paste, d - delete, c - cut.
@@ -1032346,7 +1032247,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   *            0 - balancing for higher levels needed;
   *           -1 - no balancing for higher levels needed;
   *           -2 - no disk space.
-@@ -1884,137 +1889,138 @@ static int check_balance(int mode,
+@@ -1884,137 +1889,138 @@
  }
  
  /* Check whether parent at the path is the really parent of the current node.*/
@@ -1032433,21 +1032334,19 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -      unsigned long n_son_number;
 -      struct super_block *p_s_sb = p_s_tb->tb_sb;
 -      struct buffer_head *p_s_bh;
--
--      PROC_INFO_INC(p_s_sb, get_neighbors[n_h]);
--
--      if (p_s_tb->lnum[n_h]) {
--              /* We need left neighbor to balance S[n_h]. */
--              PROC_INFO_INC(p_s_sb, need_l_neighbor[n_h]);
--              p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
 +      int child_position,
 +          path_offset = PATH_H_PATH_OFFSET(tb->tb_path, h + 1);
 +      unsigned long son_number;
 +      struct super_block *sb = tb->tb_sb;
 +      struct buffer_head *bh;
-+
+-      PROC_INFO_INC(p_s_sb, get_neighbors[n_h]);
 +      PROC_INFO_INC(sb, get_neighbors[h]);
-+
+-      if (p_s_tb->lnum[n_h]) {
+-              /* We need left neighbor to balance S[n_h]. */
+-              PROC_INFO_INC(p_s_sb, need_l_neighbor[n_h]);
+-              p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
 +      if (tb->lnum[h]) {
 +              /* We need left neighbor to balance S[h]. */
 +              PROC_INFO_INC(sb, need_l_neighbor[h]);
@@ -1032512,16 +1032411,15 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
 -      if (p_s_tb->rnum[n_h]) {        /* We need right neighbor to balance S[n_path_offset]. */
 -              PROC_INFO_INC(p_s_sb, need_r_neighbor[n_h]);
 -              p_s_bh = PATH_OFFSET_PBUFFER(p_s_tb->tb_path, n_path_offset);
--
--              RFALSE(p_s_bh == p_s_tb->FR[n_h] &&
--                     PATH_OFFSET_POSITION(p_s_tb->tb_path,
--                                          n_path_offset) >=
--                     B_NR_ITEMS(p_s_bh),
 +      /* We need right neighbor to balance S[path_offset]. */
 +      if (tb->rnum[h]) {      /* We need right neighbor to balance S[path_offset]. */
 +              PROC_INFO_INC(sb, need_r_neighbor[h]);
 +              bh = PATH_OFFSET_PBUFFER(tb->tb_path, path_offset);
-+
+-              RFALSE(p_s_bh == p_s_tb->FR[n_h] &&
+-                     PATH_OFFSET_POSITION(p_s_tb->tb_path,
+-                                          n_path_offset) >=
+-                     B_NR_ITEMS(p_s_bh),
 +              RFALSE(bh == tb->FR[h] &&
 +                     PATH_OFFSET_POSITION(tb->tb_path,
 +                                          path_offset) >=
@@ -1032568,7 +1032466,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  
        }
        return CARRY_ON;
-@@ -2088,52 +2094,46 @@ static int get_mem_for_virtual_node(stru
+@@ -2088,52 +2094,46 @@
  }
  
  #ifdef CONFIG_REISERFS_CHECK
@@ -1032580,67 +1032478,62 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  {
 -      if (p_s_bh) {
 -              if (atomic_read(&(p_s_bh->b_count)) <= 0) {
--
++      if (bh) {
++              if (atomic_read(&(bh->b_count)) <= 0)
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-1: tb_buffer_sanity_check(): negative or zero reference counter for buffer %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
--
++                      reiserfs_panic(sb, "jmacd-1", "negative or zero "
++                                     "reference counter for buffer %s[%d] "
++                                     "(%b)", descr, level, bh);
 -              if (!buffer_uptodate(p_s_bh)) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-2: tb_buffer_sanity_check(): buffer is not up to date %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
--
++              if (!buffer_uptodate(bh))
++                      reiserfs_panic(sb, "jmacd-2", "buffer is not up "
++                                     "to date %s[%d] (%b)",
++                                     descr, level, bh);
 -              if (!B_IS_IN_TREE(p_s_bh)) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-3: tb_buffer_sanity_check(): buffer is not in tree %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
-+      if (bh) {
-+              if (atomic_read(&(bh->b_count)) <= 0)
++              if (!B_IS_IN_TREE(bh))
++                      reiserfs_panic(sb, "jmacd-3", "buffer is not "
++                                     "in tree %s[%d] (%b)",
++                                     descr, level, bh);
  
 -              if (p_s_bh->b_bdev != p_s_sb->s_bdev) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-4: tb_buffer_sanity_check(): buffer has wrong device %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
--
++              if (bh->b_bdev != sb->s_bdev)
++                      reiserfs_panic(sb, "jmacd-4", "buffer has wrong "
++                                     "device %s[%d] (%b)",
++                                     descr, level, bh);
 -              if (p_s_bh->b_size != p_s_sb->s_blocksize) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-5: tb_buffer_sanity_check(): buffer has wrong blocksize %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
--
++              if (bh->b_size != sb->s_blocksize)
++                      reiserfs_panic(sb, "jmacd-5", "buffer has wrong "
++                                     "blocksize %s[%d] (%b)",
++                                     descr, level, bh);
 -              if (p_s_bh->b_blocknr > SB_BLOCK_COUNT(p_s_sb)) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "jmacd-6: tb_buffer_sanity_check(): buffer block number too high %s[%d] (%b)\n",
 -                                     descr, level, p_s_bh);
 -              }
-+                      reiserfs_panic(sb, "jmacd-1", "negative or zero "
-+                                     "reference counter for buffer %s[%d] "
-+                                     "(%b)", descr, level, bh);
-+
-+              if (!buffer_uptodate(bh))
-+                      reiserfs_panic(sb, "jmacd-2", "buffer is not up "
-+                                     "to date %s[%d] (%b)",
-+                                     descr, level, bh);
-+
-+              if (!B_IS_IN_TREE(bh))
-+                      reiserfs_panic(sb, "jmacd-3", "buffer is not "
-+                                     "in tree %s[%d] (%b)",
-+                                     descr, level, bh);
-+
-+              if (bh->b_bdev != sb->s_bdev)
-+                      reiserfs_panic(sb, "jmacd-4", "buffer has wrong "
-+                                     "device %s[%d] (%b)",
-+                                     descr, level, bh);
-+
-+              if (bh->b_size != sb->s_blocksize)
-+                      reiserfs_panic(sb, "jmacd-5", "buffer has wrong "
-+                                     "blocksize %s[%d] (%b)",
-+                                     descr, level, bh);
-+
 +              if (bh->b_blocknr > SB_BLOCK_COUNT(sb))
 +                      reiserfs_panic(sb, "jmacd-6", "buffer block "
 +                                     "number too high %s[%d] (%b)",
@@ -1032655,7 +1032548,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                   const char *descr, int level)
  {;
  }
-@@ -2144,7 +2144,7 @@ static int clear_all_dirty_bits(struct s
+@@ -2144,7 +2144,7 @@
        return reiserfs_prepare_for_journal(s, bh, 0);
  }
  
@@ -1032664,7 +1032557,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
  {
        struct buffer_head *locked;
  #ifdef CONFIG_REISERFS_CHECK
-@@ -2156,95 +2156,94 @@ static int wait_tb_buffers_until_unlocke
+@@ -2156,95 +2156,94 @@
  
                locked = NULL;
  
@@ -1032803,7 +1032696,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                                }
                        }
                }
-@@ -2257,10 +2256,10 @@ static int wait_tb_buffers_until_unlocke
+@@ -2257,10 +2256,10 @@
                 ** --clm
                 */
                for (i = 0; !locked && i < MAX_FEB_SIZE; i++) {
@@ -1032817,7 +1032710,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                        }
                }
  
-@@ -2268,21 +2267,20 @@ static int wait_tb_buffers_until_unlocke
+@@ -2268,21 +2267,20 @@
  #ifdef CONFIG_REISERFS_CHECK
                        repeat_counter++;
                        if ((repeat_counter % 10000) == 0) {
@@ -1032844,7 +1032737,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                }
  
        } while (locked);
-@@ -2295,15 +2293,15 @@ static int wait_tb_buffers_until_unlocke
+@@ -2295,15 +2293,15 @@
   *    analyze what and where should be moved;
   *    get sufficient number of new nodes;
   * Balancing will start only after all resources will be collected at a time.
@@ -1032863,7 +1032756,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
   * Latency might be improved by first gathering a list of what buffers are needed
   * and then getting as many of them in parallel as possible? -Hans
   *
-@@ -2312,159 +2310,160 @@ static int wait_tb_buffers_until_unlocke
+@@ -2312,159 +2310,160 @@
   *    tb      tree_balance structure;
   *    inum    item number in S[h];
   *      pos_in_item - comment this if you can
@@ -1033103,7 +1032996,7 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
                        goto repeat;
                } else {
                        return CARRY_ON;
-@@ -2485,57 +2484,57 @@ int fix_nodes(int n_op_mode, struct tree
+@@ -2485,57 +2484,57 @@
  
                /* Release path buffers. */
                if (wait_tb_buffers_run) {
@@ -1033192,9 +1033085,9 @@ diff -purN linux-2.6.27/fs/reiserfs/fix_node.c linux-2.6.27.19-5.1/fs/reiserfs/f
     wanted to make lines shorter */
  void unfix_nodes(struct tree_balance *tb)
  {
-diff -purN linux-2.6.27/fs/reiserfs/hashes.c linux-2.6.27.19-5.1/fs/reiserfs/hashes.c
---- linux-2.6.27/fs/reiserfs/hashes.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/hashes.c   2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/hashes.c
+--- a/fs/reiserfs/hashes.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/hashes.c     Wed May 06 16:56:52 2009 +0100
 @@ -7,7 +7,7 @@
   * (see Applied Cryptography, 2nd edition, p448).
   *
@@ -1033204,10 +1033097,10 @@ diff -purN linux-2.6.27/fs/reiserfs/hashes.c linux-2.6.27.19-5.1/fs/reiserfs/has
   * Jeremy has agreed to the contents of reiserfs/README. -Hans
   * Yura's function is added (04/07/2000)
   */
-diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/ibalance.c
---- linux-2.6.27/fs/reiserfs/ibalance.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/ibalance.c 2009-03-25 16:11:37.000000000 +0000
-@@ -105,8 +105,8 @@ static void internal_define_dest_src_inf
+diff -r 9608d5473017 fs/reiserfs/ibalance.c
+--- a/fs/reiserfs/ibalance.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/ibalance.c   Wed May 06 16:56:52 2009 +0100
+@@ -105,8 +105,8 @@
                break;
  
        default:
@@ -1033218,7 +1033111,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
                               shift_mode);
        }
  }
-@@ -278,7 +278,7 @@ static void internal_delete_childs(struc
+@@ -278,7 +278,7 @@
  
  /* copy cpy_num node pointers and cpy_num - 1 items from buffer src to buffer dest
  * last_first == FIRST_TO_LAST means, that we copy first items from src to tail of dest
@@ -1033227,7 +1033120,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
   */
  static void internal_copy_pointers_items(struct buffer_info *dest_bi,
                                         struct buffer_head *src,
-@@ -385,7 +385,7 @@ static void internal_move_pointers_items
+@@ -385,7 +385,7 @@
        if (last_first == FIRST_TO_LAST) {      /* shift_left occurs */
                first_pointer = 0;
                first_item = 0;
@@ -1033236,7 +1033129,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
                   for key - with first_item */
                internal_delete_pointers_items(src_bi, first_pointer,
                                               first_item, cpy_num - del_par);
-@@ -453,7 +453,7 @@ static void internal_insert_key(struct b
+@@ -453,7 +453,7 @@
        }
  }
  
@@ -1033245,7 +1033138,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
   * Copy pointer_amount node pointers and pointer_amount - 1 items from buffer src to buffer dest.
   * Replace  d_key'th key in buffer cfl.
   * Delete pointer_amount items and node pointers from buffer src.
-@@ -518,7 +518,7 @@ static void internal_shift1_left(struct 
+@@ -518,7 +518,7 @@
        /*    internal_move_pointers_items (tb->L[h], tb->S[h], FIRST_TO_LAST, pointer_amount, 1); */
  }
  
@@ -1033254,7 +1033147,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
   * Copy n node pointers and n - 1 items from buffer src to buffer dest.
   * Replace  d_key'th key in buffer cfr.
   * Delete n items and node pointers from buffer src.
-@@ -702,8 +702,8 @@ static void balance_internal_when_delete
+@@ -702,8 +702,8 @@
  
                return;
        }
@@ -1033265,7 +1033158,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
                       h, tb->lnum[h], h, tb->rnum[h]);
  }
  
-@@ -749,7 +749,7 @@ int balance_internal(struct tree_balance
+@@ -749,7 +749,7 @@
         this means that new pointers and items must be inserted AFTER *
         child_pos
         }
@@ -1033274,7 +1033167,7 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
         {
         it is the position of the leftmost pointer that must be deleted (together with
         its corresponding key to the left of the pointer)
-@@ -940,8 +940,8 @@ int balance_internal(struct tree_balance
+@@ -940,8 +940,8 @@
                struct block_head *blkh;
  
                if (tb->blknum[h] != 1)
@@ -1033285,10 +1033178,10 @@ diff -purN linux-2.6.27/fs/reiserfs/ibalance.c linux-2.6.27.19-5.1/fs/reiserfs/i
                /* S[h] = empty buffer from the list FEB. */
                tbSh = get_FEB(tb);
                blkh = B_BLK_HEAD(tbSh);
-diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inode.c
---- linux-2.6.27/fs/reiserfs/inode.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/inode.c    2009-03-25 16:11:37.000000000 +0000
-@@ -52,7 +52,7 @@ void reiserfs_delete_inode(struct inode 
+diff -r 9608d5473017 fs/reiserfs/inode.c
+--- a/fs/reiserfs/inode.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/inode.c      Wed May 06 16:56:52 2009 +0100
+@@ -52,7 +52,7 @@
                /* Do quota update inside a transaction for journaled quotas. We must do that
                 * after delete_object so that quota updates go into the same transaction as
                 * stat data deletion */
@@ -1033297,7 +1033190,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                        DQUOT_FREE_INODE(inode);
  
                if (journal_end(&th, inode->i_sb, jbegin_count))
-@@ -363,7 +363,7 @@ static int _get_block_create_0(struct in
+@@ -363,7 +363,7 @@
                }
                /* make sure we don't read more bytes than actually exist in
                 ** the file.  This can happen in odd cases where i_size isn't
@@ -1033306,7 +1033199,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 ** extra bytes at the end of the direct item
                 */
                if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size)
-@@ -438,15 +438,15 @@ static int reiserfs_bmap(struct inode *i
+@@ -438,15 +438,15 @@
  ** -ENOENT instead of a valid buffer.  block_prepare_write expects to
  ** be able to do i/o on the buffers returned, unless an error value
  ** is also returned.
@@ -1033325,7 +1033218,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
  ** don't use this function.
  */
  static int reiserfs_get_block_create_0(struct inode *inode, sector_t block,
-@@ -602,7 +602,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -602,7 +602,7 @@
        int done;
        int fs_gen;
        struct reiserfs_transaction_handle *th = NULL;
@@ -1033334,7 +1033227,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
           . 3 balancings in direct->indirect conversion
           . 1 block involved into reiserfs_update_sd()
           XXX in practically impossible worst case direct2indirect()
-@@ -754,7 +754,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -754,7 +754,7 @@
                reiserfs_write_unlock(inode->i_sb);
  
                /* the item was found, so new blocks were not added to the file
@@ -1033343,7 +1033236,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 ** transaction
                 */
                return retval;
-@@ -841,10 +841,12 @@ int reiserfs_get_block(struct inode *ino
+@@ -841,10 +841,12 @@
                                                          tail_offset);
                                if (retval) {
                                        if (retval != -ENOSPC)
@@ -1033360,7 +1033253,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                        if (allocated_block_nr) {
                                                /* the bitmap, the super, and the stat data == 3 */
                                                if (!th)
-@@ -984,7 +986,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -984,7 +986,7 @@
  
                /* this loop could log more blocks than we had originally asked
                 ** for.  So, we have to allow the transaction to end if it is
@@ -1033369,7 +1033262,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 ** consistent if we crash before the function returns
                 **
                 ** release the path so that anybody waiting on the path before
-@@ -995,7 +997,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -995,7 +997,7 @@
                        if (retval)
                                goto failure;
                }
@@ -1033378,7 +1033271,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 ** long time.  reschedule if needed
                 */
                cond_resched();
-@@ -1006,8 +1008,7 @@ int reiserfs_get_block(struct inode *ino
+@@ -1006,8 +1008,7 @@
                        goto failure;
                }
                if (retval == POSITION_FOUND) {
@@ -1033388,7 +1033281,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                         "%K should not be found", &key);
                        retval = -EEXIST;
                        if (allocated_block_nr)
-@@ -1299,8 +1300,7 @@ static void update_stat_data(struct tree
+@@ -1299,8 +1300,7 @@
        ih = PATH_PITEM_HEAD(path);
  
        if (!is_statdata_le_ih(ih))
@@ -1033398,7 +1033291,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                               INODE_PKEY(inode), ih);
  
        if (stat_data_v1(ih)) {
-@@ -1332,10 +1332,9 @@ void reiserfs_update_sd_size(struct reis
+@@ -1332,10 +1332,9 @@
                /* look for the object's stat data */
                retval = search_item(inode->i_sb, &key, &path);
                if (retval == IO_ERROR) {
@@ -1033412,7 +1033305,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                        return;
                }
                if (retval == ITEM_NOT_FOUND) {
-@@ -1345,9 +1344,9 @@ void reiserfs_update_sd_size(struct reis
+@@ -1345,9 +1344,9 @@
                                /*reiserfs_warning (inode->i_sb, "vs-13050: reiserfs_update_sd: i_nlink == 0, stat data not found"); */
                                return;
                        }
@@ -1033425,7 +1033318,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                         INODE_PKEY(inode), inode->i_nlink,
                                         pos);
                        reiserfs_check_path(&path);
-@@ -1424,10 +1423,9 @@ void reiserfs_read_locked_inode(struct i
+@@ -1424,10 +1423,9 @@
        /* look for the object's stat data */
        retval = search_item(inode->i_sb, &key, &path_to_sd);
        if (retval == IO_ERROR) {
@@ -1033439,7 +1033332,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                reiserfs_make_bad_inode(inode);
                return;
        }
-@@ -1446,7 +1444,7 @@ void reiserfs_read_locked_inode(struct i
+@@ -1446,7 +1444,7 @@
           update sd on unlink all that is required is to check for nlink
           here. This bug was first found by Sizif when debugging
           SquidNG/Butterfly, forgotten, and found again after Philippe
@@ -1033448,7 +1033341,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
  
           More logical fix would require changes in fs/inode.c:iput() to
           remove inode from hash-table _after_ fs cleaned disk stuff up and
-@@ -1457,8 +1455,7 @@ void reiserfs_read_locked_inode(struct i
+@@ -1457,8 +1455,7 @@
           during mount (fs/reiserfs/super.c:finish_unfinished()). */
        if ((inode->i_nlink == 0) &&
            !REISERFS_SB(inode->i_sb)->s_is_unlinked_ok) {
@@ -1033458,7 +1033351,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                 "dead inode read from disk %K. "
                                 "This is likely to be race with knfsd. Ignore",
                                 &key);
-@@ -1564,7 +1561,7 @@ struct dentry *reiserfs_fh_to_dentry(str
+@@ -1564,7 +1561,7 @@
         */
        if (fh_type > fh_len) {
                if (fh_type != 6 || fh_len != 5)
@@ -1033467,7 +1033360,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                "nfsd/reiserfs, fhtype=%d, len=%d - odd",
                                fh_type, fh_len);
                fh_type = 5;
-@@ -1631,7 +1628,7 @@ int reiserfs_write_inode(struct inode *i
+@@ -1631,7 +1628,7 @@
        if (inode->i_sb->s_flags & MS_RDONLY)
                return -EROFS;
        /* memory pressure can sometimes initiate write_inode calls with sync == 1,
@@ -1033476,7 +1033369,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
         ** inode needs to reach disk for safety, and they can safely be
         ** ignored because the altered inode has already been logged.
         */
-@@ -1689,13 +1686,13 @@ static int reiserfs_new_directory(struct
+@@ -1689,13 +1686,13 @@
        /* look for place in the tree for new item */
        retval = search_item(sb, &key, path);
        if (retval == IO_ERROR) {
@@ -1033493,7 +1033386,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                 "object with this key exists (%k)",
                                 &(ih->ih_key));
                return -EEXIST;
-@@ -1729,13 +1726,13 @@ static int reiserfs_new_symlink(struct r
+@@ -1729,13 +1726,13 @@
        /* look for place in the tree for new item */
        retval = search_item(sb, &key, path);
        if (retval == IO_ERROR) {
@@ -1033510,7 +1033403,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                                 "object with this key exists (%k)",
                                 &(ih->ih_key));
                return -EEXIST;
-@@ -1748,7 +1745,7 @@ static int reiserfs_new_symlink(struct r
+@@ -1748,7 +1745,7 @@
  /* inserts the stat data into the tree, and then calls
     reiserfs_new_directory (to insert ".", ".." item if new object is
     directory) or reiserfs_new_symlink (to insert symlink body if new
@@ -1033519,7 +1033412,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
  
     NOTE! uid and gid must already be set in the inode.  If we return
     non-zero due to an error, we have to drop the quota previously allocated
-@@ -1756,10 +1753,11 @@ static int reiserfs_new_symlink(struct r
+@@ -1756,10 +1753,11 @@
     if we return non-zero, we also end the transaction.  */
  int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
                       struct inode *dir, int mode, const char *symname,
@@ -1033533,7 +1033426,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
  {
        struct super_block *sb;
        INITIALIZE_PATH(path_to_key);
-@@ -1790,7 +1788,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1790,7 +1788,7 @@
                goto out_bad_inode;
        }
        if (old_format_only(sb))
@@ -1033542,7 +1033435,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 ** this is as good as reiserfs can do right now.
                 ** note that the private part of inode isn't filled in yet, we have
                 ** to use the directory.
-@@ -1922,9 +1920,8 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1922,9 +1920,8 @@
                goto out_inserted_sd;
        }
  
@@ -1033553,7 +1033446,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                if (retval) {
                        err = retval;
                        reiserfs_check_path(&path_to_key);
-@@ -1932,10 +1929,23 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1932,10 +1929,23 @@
                        goto out_inserted_sd;
                }
        } else if (inode->i_sb->s_flags & MS_POSIXACL) {
@@ -1033580,7 +1033473,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        }
  
        insert_inode_hash(inode);
-@@ -1965,19 +1975,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1965,19 +1975,7 @@
        out_inserted_sd:
        inode->i_nlink = 0;
        th->t_trans_id = 0;     /* so the caller can't use this handle later */
@@ -1033601,7 +1033494,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        return err;
  }
  
-@@ -1994,7 +1992,7 @@ int reiserfs_new_inode(struct reiserfs_t
+@@ -1994,7 +1992,7 @@
  **
  ** on failure, nonzero is returned, page_result and bh_result are untouched.
  */
@@ -1033610,7 +1033503,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                          struct page **page_result,
                          struct buffer_head **bh_result)
  {
-@@ -2002,11 +2000,11 @@ static int grab_tail_page(struct inode *
+@@ -2002,11 +2000,11 @@
        /* we want the page with the last byte in the file,
         ** not the page that will hold the next byte for appending
         */
@@ -1033625,7 +1033518,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        struct buffer_head *bh;
        struct buffer_head *head;
        struct page *page;
-@@ -2020,7 +2018,7 @@ static int grab_tail_page(struct inode *
+@@ -2020,7 +2018,7 @@
        if ((offset & (blocksize - 1)) == 0) {
                return -ENOENT;
        }
@@ -1033634,7 +1033527,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        error = -ENOMEM;
        if (!page) {
                goto out;
-@@ -2049,10 +2047,8 @@ static int grab_tail_page(struct inode *
+@@ -2049,10 +2047,8 @@
                 ** I've screwed up the code to find the buffer, or the code to
                 ** call prepare_write
                 */
@@ -1033647,7 +1033540,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                error = -EIO;
                goto unlock;
        }
-@@ -2074,57 +2070,58 @@ static int grab_tail_page(struct inode *
+@@ -2074,57 +2070,58 @@
  **
  ** some code taken from block_truncate_page
  */
@@ -1033726,7 +1033619,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        if (error)
                goto out;
  
-@@ -2135,7 +2132,7 @@ int reiserfs_truncate_file(struct inode 
+@@ -2135,7 +2132,7 @@
        }
        
        if (update_timestamps) {
@@ -1033735,7 +1033628,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                if (error)
                        goto out;
        }
-@@ -2154,14 +2151,14 @@ int reiserfs_truncate_file(struct inode 
+@@ -2154,14 +2151,14 @@
                page_cache_release(page);
        }
  
@@ -1033752,7 +1033645,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        return error;
  }
  
-@@ -2213,9 +2210,8 @@ static int map_block_for_writepage(struc
+@@ -2213,9 +2210,8 @@
        /* we've found an unformatted node */
        if (indirect_item_found(retval, ih)) {
                if (bytes_copied > 0) {
@@ -1033764,7 +1033657,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                }
                if (!get_block_num(item, pos_in_item)) {
                        /* crap, we are writing to a hole */
-@@ -2272,9 +2268,8 @@ static int map_block_for_writepage(struc
+@@ -2272,9 +2268,8 @@
                        goto research;
                }
        } else {
@@ -1033776,7 +1033669,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                retval = -EIO;
                goto out;
        }
-@@ -2317,8 +2312,8 @@ static int map_block_for_writepage(struc
+@@ -2317,8 +2312,8 @@
        return retval;
  }
  
@@ -1033787,7 +1033680,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
   * start/recovery path as __block_write_full_page, along with special
   * code to handle reiserfs tails.
   */
-@@ -2458,7 +2453,7 @@ static int reiserfs_write_full_page(stru
+@@ -2458,7 +2453,7 @@
        unlock_page(page);
  
        /*
@@ -1033796,7 +1033689,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
         * the first submit_bh can bring the page out of writeback.
         * be careful with the buffers.
         */
-@@ -2477,8 +2472,8 @@ static int reiserfs_write_full_page(stru
+@@ -2477,8 +2472,8 @@
        if (nr == 0) {
                /*
                 * if this page only had a direct item, it is very possible for
@@ -1033807,7 +1033700,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
                 * pipe without locking the page
                 */
                bh = head;
-@@ -2497,7 +2492,7 @@ static int reiserfs_write_full_page(stru
+@@ -2497,7 +2492,7 @@
  
        fail:
        /* catches various errors, we need to make sure any valid dirty blocks
@@ -1033816,7 +1033709,7 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
         * writeback
         */
        ClearPageUptodate(page);
-@@ -2565,7 +2560,7 @@ static int reiserfs_write_begin(struct f
+@@ -2565,7 +2560,7 @@
        }
  
        index = pos >> PAGE_CACHE_SHIFT;
@@ -1033825,10 +1033718,10 @@ diff -purN linux-2.6.27/fs/reiserfs/inode.c linux-2.6.27.19-5.1/fs/reiserfs/inod
        if (!page)
                return -ENOMEM;
        *pagep = page;
-diff -purN linux-2.6.27/fs/reiserfs/ioctl.c linux-2.6.27.19-5.1/fs/reiserfs/ioctl.c
---- linux-2.6.27/fs/reiserfs/ioctl.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/ioctl.c    2009-03-25 16:11:37.000000000 +0000
-@@ -189,7 +189,7 @@ int reiserfs_unpack(struct inode *inode,
+diff -r 9608d5473017 fs/reiserfs/ioctl.c
+--- a/fs/reiserfs/ioctl.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/ioctl.c      Wed May 06 16:56:52 2009 +0100
+@@ -189,7 +189,7 @@
        }
  
        /* we unpack by finding the page with the tail, and calling
@@ -1033837,10 +1033730,10 @@ diff -purN linux-2.6.27/fs/reiserfs/ioctl.c linux-2.6.27.19-5.1/fs/reiserfs/ioct
         ** reiserfs_get_block to unpack the tail for us.
         */
        index = inode->i_size >> PAGE_CACHE_SHIFT;
-diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/item_ops.c
---- linux-2.6.27/fs/reiserfs/item_ops.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/item_ops.c 2009-03-25 16:11:37.000000000 +0000
-@@ -97,7 +97,8 @@ static int sd_unit_num(struct virtual_it
+diff -r 9608d5473017 fs/reiserfs/item_ops.c
+--- a/fs/reiserfs/item_ops.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/item_ops.c   Wed May 06 16:56:52 2009 +0100
+@@ -97,7 +97,8 @@
  
  static void sd_print_vi(struct virtual_item *vi)
  {
@@ -1033850,7 +1033743,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                         vi->vi_index, vi->vi_type, vi->vi_ih);
  }
  
-@@ -190,7 +191,8 @@ static int direct_unit_num(struct virtua
+@@ -190,7 +191,8 @@
  
  static void direct_print_vi(struct virtual_item *vi)
  {
@@ -1033860,7 +1033753,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                         vi->vi_index, vi->vi_type, vi->vi_ih);
  }
  
-@@ -278,7 +280,7 @@ static void indirect_print_item(struct i
+@@ -278,7 +280,7 @@
        unp = (__le32 *) item;
  
        if (ih_item_len(ih) % UNFM_P_SIZE)
@@ -1033869,7 +1033762,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
  
        printk("%d pointers\n[ ", (int)I_UNFM_NUM(ih));
        for (j = 0; j < I_UNFM_NUM(ih); j++) {
-@@ -334,7 +336,8 @@ static int indirect_unit_num(struct virt
+@@ -334,7 +336,8 @@
  
  static void indirect_print_vi(struct virtual_item *vi)
  {
@@ -1033879,7 +1033772,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                         vi->vi_index, vi->vi_type, vi->vi_ih);
  }
  
-@@ -359,7 +362,7 @@ static struct item_operations indirect_o
+@@ -359,7 +362,7 @@
  
  static int direntry_bytes_number(struct item_head *ih, int block_size)
  {
@@ -1033888,7 +1033781,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                         "bytes number is asked for direntry");
        return 0;
  }
-@@ -514,8 +517,9 @@ static int direntry_create_vi(struct vir
+@@ -514,8 +517,9 @@
                    ((is_affected
                      && (vn->vn_mode == M_PASTE
                          || vn->vn_mode == M_CUT)) ? insert_size : 0)) {
@@ -1033900,7 +1033793,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                                       vn->vn_mode, insert_size);
                }
        }
-@@ -546,7 +550,8 @@ static int direntry_check_left(struct vi
+@@ -546,7 +550,8 @@
        }
  
        if (entries == dir_u->entry_count) {
@@ -1033910,7 +1033803,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                               dir_u->entry_count);
        }
  
-@@ -614,7 +619,8 @@ static void direntry_print_vi(struct vir
+@@ -614,7 +619,8 @@
        int i;
        struct direntry_uarea *dir_u = vi->vi_uarea;
  
@@ -1033920,7 +1033813,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
                         vi->vi_index, vi->vi_type, vi->vi_ih, dir_u->flags);
        printk("%d entries: ", dir_u->entry_count);
        for (i = 0; i < dir_u->entry_count; i++)
-@@ -642,43 +648,43 @@ static struct item_operations direntry_o
+@@ -642,43 +648,43 @@
  //
  static int errcatch_bytes_number(struct item_head *ih, int block_size)
  {
@@ -1033976,7 +1033869,7 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
        return 0;               // We might return -1 here as well, but it won't help as create_virtual_node() from where
        // this operation is called from is of return type void.
  }
-@@ -686,36 +692,36 @@ static int errcatch_create_vi(struct vir
+@@ -686,36 +692,36 @@
  static int errcatch_check_left(struct virtual_item *vi, int free,
                               int start_skip, int end_skip)
  {
@@ -1034023,9 +1033916,9 @@ diff -purN linux-2.6.27/fs/reiserfs/item_ops.c linux-2.6.27.19-5.1/fs/reiserfs/i
  }
  
  static struct item_operations errcatch_ops = {
-diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/journal.c
---- linux-2.6.27/fs/reiserfs/journal.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/journal.c  2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/journal.c
+--- a/fs/reiserfs/journal.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/journal.c    Wed May 06 16:56:52 2009 +0100
 @@ -1,36 +1,36 @@
  /*
  ** Write ahead logging implementation copyright Chris Mason 2000
@@ -1034077,7 +1033970,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  **                    from within kupdate, it will ignore the immediate flag
  */
  
-@@ -82,6 +82,8 @@ static struct workqueue_struct *commit_w
+@@ -82,6 +82,8 @@
  #define LIST_TOUCHED 1
  #define LIST_DIRTY   2
  #define LIST_COMMIT_PENDING  4        /* someone will commit this list */
@@ -1034086,7 +1033979,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
  /* flags for do_journal_end */
  #define FLUSH_ALL   1         /* flush commit and real blocks */
-@@ -97,7 +99,7 @@ static int flush_commit_list(struct supe
+@@ -97,7 +99,7 @@
                             struct reiserfs_journal_list *jl, int flushall);
  static int can_dirty(struct reiserfs_journal_cnode *cn);
  static int journal_join(struct reiserfs_transaction_handle *th,
@@ -1034095,7 +1033988,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  static int release_journal_dev(struct super_block *super,
                               struct reiserfs_journal *journal);
  static int dirty_one_transaction(struct super_block *s,
-@@ -113,12 +115,12 @@ enum {
+@@ -113,12 +115,12 @@
  };
  
  static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
@@ -1034104,14 +1033997,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                              unsigned long nblocks, int join);
  
 -static void init_journal_hash(struct super_block *p_s_sb)
-+static void init_journal_hash(struct super_block *sb)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void init_journal_hash(struct super_block *sb)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        memset(journal->j_hash_table, 0,
               JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *));
  }
-@@ -145,7 +147,7 @@ static void disable_barrier(struct super
+@@ -145,7 +147,7 @@
  }
  
  static struct reiserfs_bitmap_node *allocate_bitmap_node(struct super_block
@@ -1034120,7 +1034014,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_bitmap_node *bn;
        static int id;
-@@ -154,7 +156,7 @@ static struct reiserfs_bitmap_node *allo
+@@ -154,7 +156,7 @@
        if (!bn) {
                return NULL;
        }
@@ -1034129,19 +1034023,20 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        if (!bn->data) {
                kfree(bn);
                return NULL;
-@@ -164,9 +166,9 @@ static struct reiserfs_bitmap_node *allo
+@@ -164,9 +166,9 @@
        return bn;
  }
  
 -static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *p_s_sb)
-+static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *sb)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static struct reiserfs_bitmap_node *get_bitmap_node(struct super_block *sb)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct reiserfs_bitmap_node *bn = NULL;
        struct list_head *entry = journal->j_bitmap_nodes.next;
  
-@@ -176,21 +178,21 @@ static struct reiserfs_bitmap_node *get_
+@@ -176,21 +178,21 @@
        if (entry != &journal->j_bitmap_nodes) {
                bn = list_entry(entry, struct reiserfs_bitmap_node, list);
                list_del(entry);
@@ -1034167,15 +1034062,17 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        journal->j_used_bitmap_nodes--;
        if (journal->j_free_bitmap_nodes > REISERFS_MAX_BITMAP_NODES) {
                kfree(bn->data);
-@@ -201,46 +203,46 @@ static inline void free_bitmap_node(stru
+@@ -201,46 +203,46 @@
        }
  }
  
 -static void allocate_bitmap_nodes(struct super_block *p_s_sb)
-+static void allocate_bitmap_nodes(struct super_block *sb)
- {
-       int i;
+-{
+-      int i;
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void allocate_bitmap_nodes(struct super_block *sb)
++{
++      int i;
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct reiserfs_bitmap_node *bn = NULL;
        for (i = 0; i < REISERFS_MIN_BITMAP_NODES; i++) {
@@ -1034186,12 +1034083,16 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        journal->j_free_bitmap_nodes++;
                } else {
 -                      break;  // this is ok, we'll try again when more are needed 
-+                      break;  /* this is ok, we'll try again when more are needed */
-               }
-       }
- }
+-              }
+-      }
+-}
+-
 -static int set_bit_in_list_bitmap(struct super_block *p_s_sb,
++                      break;  /* this is ok, we'll try again when more are needed */
++              }
++      }
++}
++
 +static int set_bit_in_list_bitmap(struct super_block *sb,
                                  b_blocknr_t block,
                                  struct reiserfs_list_bitmap *jb)
@@ -1034225,7 +1034126,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        jb->bitmaps[i] = NULL;
                }
        }
-@@ -249,7 +251,7 @@ static void cleanup_bitmap_list(struct s
+@@ -249,7 +251,7 @@
  /*
  ** only call this on FS unmount.
  */
@@ -1034234,7 +1034135,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                             struct reiserfs_list_bitmap *jb_array)
  {
        int i;
-@@ -257,16 +259,16 @@ static int free_list_bitmaps(struct supe
+@@ -257,16 +259,16 @@
        for (i = 0; i < JOURNAL_NUM_BITMAPS; i++) {
                jb = jb_array + i;
                jb->journal_list = NULL;
@@ -1034247,14 +1034148,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  }
  
 -static int free_bitmap_nodes(struct super_block *p_s_sb)
-+static int free_bitmap_nodes(struct super_block *sb)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static int free_bitmap_nodes(struct super_block *sb)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct list_head *next = journal->j_bitmap_nodes.next;
        struct reiserfs_bitmap_node *bn;
  
-@@ -283,10 +285,10 @@ static int free_bitmap_nodes(struct supe
+@@ -283,10 +285,10 @@
  }
  
  /*
@@ -1034267,7 +1034169,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                   struct reiserfs_list_bitmap *jb_array,
                                   unsigned int bmap_nr)
  {
-@@ -300,30 +302,30 @@ int reiserfs_allocate_list_bitmaps(struc
+@@ -300,30 +302,30 @@
                jb->journal_list = NULL;
                jb->bitmaps = vmalloc(mem);
                if (!jb->bitmaps) {
@@ -1034304,7 +1034206,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_list_bitmap *jb = NULL;
  
        for (j = 0; j < (JOURNAL_NUM_BITMAPS * 3); j++) {
-@@ -331,7 +333,7 @@ static struct reiserfs_list_bitmap *get_
+@@ -331,7 +333,7 @@
                journal->j_list_bitmap_index = (i + 1) % JOURNAL_NUM_BITMAPS;
                jb = journal->j_list_bitmap + i;
                if (journal->j_list_bitmap[i].journal_list) {
@@ -1034313,7 +1034215,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                          journal->j_list_bitmap[i].
                                          journal_list, 1);
                        if (!journal->j_list_bitmap[i].journal_list) {
-@@ -348,7 +350,7 @@ static struct reiserfs_list_bitmap *get_
+@@ -348,7 +350,7 @@
        return jb;
  }
  
@@ -1034322,45 +1034224,51 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  ** allocates a new chunk of X nodes, and links them all together as a list.
  ** Uses the cnode->next and cnode->prev pointers
  ** returns NULL on failure
-@@ -376,14 +378,14 @@ static struct reiserfs_journal_cnode *al
+@@ -376,14 +378,14 @@
  }
  
  /*
 -** pulls a cnode off the free list, or returns NULL on failure 
-+** pulls a cnode off the free list, or returns NULL on failure
- */
+-*/
 -static struct reiserfs_journal_cnode *get_cnode(struct super_block *p_s_sb)
-+static struct reiserfs_journal_cnode *get_cnode(struct super_block *sb)
- {
-       struct reiserfs_journal_cnode *cn;
+-{
+-      struct reiserfs_journal_cnode *cn;
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+      struct reiserfs_journal *journal = SB_JOURNAL(sb);
+-
 -      reiserfs_check_lock_depth(p_s_sb, "get_cnode");
++** pulls a cnode off the free list, or returns NULL on failure
++*/
++static struct reiserfs_journal_cnode *get_cnode(struct super_block *sb)
++{
++      struct reiserfs_journal_cnode *cn;
++      struct reiserfs_journal *journal = SB_JOURNAL(sb);
++
 +      reiserfs_check_lock_depth(sb, "get_cnode");
  
        if (journal->j_cnode_free <= 0) {
                return NULL;
-@@ -403,14 +405,14 @@ static struct reiserfs_journal_cnode *ge
+@@ -403,14 +405,14 @@
  }
  
  /*
 -** returns a cnode to the free list 
-+** returns a cnode to the free list
- */
+-*/
 -static void free_cnode(struct super_block *p_s_sb,
++** returns a cnode to the free list
++*/
 +static void free_cnode(struct super_block *sb,
                       struct reiserfs_journal_cnode *cn)
  {
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+      struct reiserfs_journal *journal = SB_JOURNAL(sb);
+-
 -      reiserfs_check_lock_depth(p_s_sb, "free_cnode");
++      struct reiserfs_journal *journal = SB_JOURNAL(sb);
++
 +      reiserfs_check_lock_depth(sb, "free_cnode");
  
        journal->j_cnode_used--;
        journal->j_cnode_free++;
-@@ -436,8 +438,8 @@ void reiserfs_check_lock_depth(struct su
+@@ -436,8 +438,8 @@
  {
  #ifdef CONFIG_SMP
        if (current->lock_depth < 0) {
@@ -1034371,7 +1034279,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        }
  #else
        ;
-@@ -481,11 +483,11 @@ static inline struct reiserfs_journal_cn
+@@ -481,11 +483,11 @@
  ** reject it on the next call to reiserfs_in_journal
  **
  */
@@ -1034385,7 +1034293,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal_cnode *cn;
        struct reiserfs_list_bitmap *jb;
        int i;
-@@ -493,14 +495,14 @@ int reiserfs_in_journal(struct super_blo
+@@ -493,14 +495,14 @@
  
        *next_zero_bit = 0;     /* always start this at zero. */
  
@@ -1034402,7 +1034310,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        jb = journal->j_list_bitmap + i;
                        if (jb->journal_list && jb->bitmaps[bmap_nr] &&
                            test_bit(bit_nr,
-@@ -510,28 +512,28 @@ int reiserfs_in_journal(struct super_blo
+@@ -510,28 +512,28 @@
                                    find_next_zero_bit((unsigned long *)
                                                       (jb->bitmaps[bmap_nr]->
                                                        data),
@@ -1034426,39 +1034334,45 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        /* is it in the current transaction.  This should never happen */
 -      if ((cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, bl))) {
-+      if ((cn = get_journal_hash_dev(sb, journal->j_hash_table, bl))) {
-               BUG();
-               return 1;
-       }
+-              BUG();
+-              return 1;
+-      }
+-
 -      PROC_INFO_INC(p_s_sb, journal.in_journal_reusable);
++      if ((cn = get_journal_hash_dev(sb, journal->j_hash_table, bl))) {
++              BUG();
++              return 1;
++      }
++
 +      PROC_INFO_INC(sb, journal.in_journal_reusable);
        /* safe for reuse */
        return 0;
  }
-@@ -553,16 +555,16 @@ static inline void insert_journal_hash(s
+@@ -553,16 +555,16 @@
  }
  
  /* lock the current transaction */
 -static inline void lock_journal(struct super_block *p_s_sb)
-+static inline void lock_journal(struct super_block *sb)
- {
+-{
 -      PROC_INFO_INC(p_s_sb, journal.lock_journal);
 -      mutex_lock(&SB_JOURNAL(p_s_sb)->j_mutex);
++static inline void lock_journal(struct super_block *sb)
++{
 +      PROC_INFO_INC(sb, journal.lock_journal);
 +      mutex_lock(&SB_JOURNAL(sb)->j_mutex);
  }
  
  /* unlock the current transaction */
 -static inline void unlock_journal(struct super_block *p_s_sb)
-+static inline void unlock_journal(struct super_block *sb)
- {
+-{
 -      mutex_unlock(&SB_JOURNAL(p_s_sb)->j_mutex);
++static inline void unlock_journal(struct super_block *sb)
++{
 +      mutex_unlock(&SB_JOURNAL(sb)->j_mutex);
  }
  
  static inline void get_journal_list(struct reiserfs_journal_list *jl)
-@@ -574,7 +576,7 @@ static inline void put_journal_list(stru
+@@ -574,7 +576,7 @@
                                    struct reiserfs_journal_list *jl)
  {
        if (jl->j_refcount < 1) {
@@ -1034467,7 +1034381,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               jl->j_trans_id, jl->j_refcount);
        }
        if (--jl->j_refcount == 0)
-@@ -586,20 +588,20 @@ static inline void put_journal_list(stru
+@@ -586,20 +588,20 @@
  ** it gets called by flush_commit_list, and cleans up any data stored about blocks freed during a
  ** transaction.
  */
@@ -1034491,7 +1034405,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_journal *journal = SB_JOURNAL(s);
        struct list_head *entry = &journal->j_journal_list;
-@@ -644,8 +646,8 @@ static void reiserfs_end_buffer_io_sync(
+@@ -644,8 +646,8 @@
        char b[BDEVNAME_SIZE];
  
        if (buffer_journaled(bh)) {
@@ -1034502,7 +1034416,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 bh->b_blocknr, bdevname(bh->b_bdev, b));
        }
        if (uptodate)
-@@ -933,9 +935,9 @@ static int flush_older_commits(struct su
+@@ -933,9 +935,9 @@
        struct reiserfs_journal_list *other_jl;
        struct reiserfs_journal_list *first_jl;
        struct list_head *entry;
@@ -1034515,7 +1034429,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        find_first:
        /*
-@@ -1014,7 +1016,7 @@ static int flush_commit_list(struct supe
+@@ -1014,7 +1016,7 @@
        int i;
        b_blocknr_t bn;
        struct buffer_head *tbh = NULL;
@@ -1034524,7 +1034438,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal *journal = SB_JOURNAL(s);
        int barrier = 0;
        int retval = 0;
-@@ -1031,6 +1033,14 @@ static int flush_commit_list(struct supe
+@@ -1031,6 +1033,14 @@
        /* before we can put our commit blocks on disk, we have to make sure everyone older than
         ** us is on disk too
         */
@@ -1034539,7 +1034453,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        BUG_ON(jl->j_len <= 0);
        BUG_ON(trans_id == journal->j_trans_id);
  
-@@ -1122,7 +1132,8 @@ static int flush_commit_list(struct supe
+@@ -1122,7 +1132,8 @@
                        sync_dirty_buffer(tbh);
                if (unlikely(!buffer_uptodate(tbh))) {
  #ifdef CONFIG_REISERFS_CHECK
@@ -1034549,7 +1034463,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  #endif
                        retval = -EIO;
                }
-@@ -1154,14 +1165,14 @@ static int flush_commit_list(struct supe
+@@ -1154,14 +1165,14 @@
         * up propagating the write error out to the filesystem. */
        if (unlikely(!buffer_uptodate(jl->j_commit_bh))) {
  #ifdef CONFIG_REISERFS_CHECK
@@ -1034566,7 +1034480,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 journal->j_last_commit_id, jl->j_trans_id);
        }
        journal->j_last_commit_id = jl->j_trans_id;
-@@ -1191,8 +1202,8 @@ static int flush_commit_list(struct supe
+@@ -1191,8 +1202,8 @@
  }
  
  /*
@@ -1034577,7 +1034491,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  */
  static struct reiserfs_journal_list *find_newer_jl_for_cn(struct
                                                          reiserfs_journal_cnode
-@@ -1236,11 +1247,11 @@ static void remove_journal_hash(struct s
+@@ -1236,11 +1247,11 @@
  ** journal list for this transaction.  Aside from freeing the cnode, this also allows the
  ** block to be reallocated for data blocks if it had been deleted.
  */
@@ -1034591,7 +1034505,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal_cnode *cn, *last;
        cn = jl->j_realblock;
  
-@@ -1250,18 +1261,18 @@ static void remove_all_from_journal_list
+@@ -1250,18 +1261,18 @@
        while (cn) {
                if (cn->blocknr != 0) {
                        if (debug) {
@@ -1034613,7 +1034527,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        }
        jl->j_realblock = NULL;
  }
-@@ -1273,12 +1284,12 @@ static void remove_all_from_journal_list
+@@ -1273,12 +1284,12 @@
  ** called by flush_journal_list, before it calls remove_all_from_journal_list
  **
  */
@@ -1034629,7 +1034543,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        if (reiserfs_is_journal_aborted(journal))
                return -EIO;
-@@ -1288,8 +1299,8 @@ static int _update_journal_header_block(
+@@ -1288,8 +1299,8 @@
                        wait_on_buffer((journal->j_header_bh));
                        if (unlikely(!buffer_uptodate(journal->j_header_bh))) {
  #ifdef CONFIG_REISERFS_CHECK
@@ -1034640,7 +1034554,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  #endif
                                return -EIO;
                        }
-@@ -1302,49 +1313,49 @@ static int _update_journal_header_block(
+@@ -1302,49 +1313,49 @@
                jh->j_first_unflushed_offset = cpu_to_le32(offset);
                jh->j_mount_id = cpu_to_le32(journal->j_mount_id);
  
@@ -1034678,14 +1034592,17 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +static int update_journal_header_block(struct super_block *sb,
                                       unsigned long offset,
 -                                     unsigned long trans_id)
-+                                     unsigned int trans_id)
- {
+-{
 -      return _update_journal_header_block(p_s_sb, offset, trans_id);
-+      return _update_journal_header_block(sb, offset, trans_id);
- }
+-}
+-
 -/* 
 -** flush any and all journal lists older than you are 
++                                     unsigned int trans_id)
++{
++      return _update_journal_header_block(sb, offset, trans_id);
++}
++
 +/*
 +** flush any and all journal lists older than you are
  ** can only be called from flush_journal_list
@@ -1034703,7 +1034620,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        /* we know we are the only ones flushing things, no extra race
         * protection is required.
-@@ -1358,7 +1369,7 @@ static int flush_older_journal_lists(str
+@@ -1358,7 +1369,7 @@
        if (other_jl->j_trans_id < trans_id) {
                BUG_ON(other_jl->j_refcount <= 0);
                /* do not flush all */
@@ -1034712,7 +1034629,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
                /* other_jl is now deleted from the list */
                goto restart;
-@@ -1381,8 +1392,8 @@ static void del_from_work_list(struct su
+@@ -1381,8 +1392,8 @@
  ** always set flushall to 1, unless you are calling from inside
  ** flush_journal_list
  **
@@ -1034723,7 +1034640,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  ** do_journal_end, or by journal_release
  */
  static int flush_journal_list(struct super_block *s,
-@@ -1401,8 +1412,7 @@ static int flush_journal_list(struct sup
+@@ -1401,8 +1412,7 @@
        BUG_ON(j_len_saved <= 0);
  
        if (atomic_read(&journal->j_wcount) != 0) {
@@ -1034733,7 +1034650,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 atomic_read(&journal->j_wcount));
        }
        BUG_ON(jl->j_trans_id == 0);
-@@ -1416,8 +1426,7 @@ static int flush_journal_list(struct sup
+@@ -1416,8 +1426,7 @@
  
        count = 0;
        if (j_len_saved > journal->j_trans_max) {
@@ -1034743,7 +1034660,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               j_len_saved, jl->j_trans_id);
                return 0;
        }
-@@ -1430,7 +1439,7 @@ static int flush_journal_list(struct sup
+@@ -1430,7 +1439,7 @@
                goto flush_older_and_return;
        }
  
@@ -1034752,7 +1034669,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** the commit lists of any olders transactions
         */
        flush_commit_list(s, jl, 1);
-@@ -1445,12 +1454,12 @@ static int flush_journal_list(struct sup
+@@ -1445,12 +1454,12 @@
                goto flush_older_and_return;
        }
  
@@ -1034769,7 +1034686,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        }
        cn = jl->j_realblock;
        while (cn) {
-@@ -1474,8 +1483,8 @@ static int flush_journal_list(struct sup
+@@ -1474,8 +1483,8 @@
                if (!pjl && cn->bh) {
                        saved_bh = cn->bh;
  
@@ -1034780,7 +1034697,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                         */
                        get_bh(saved_bh);
  
-@@ -1498,8 +1507,8 @@ static int flush_journal_list(struct sup
+@@ -1498,8 +1507,8 @@
                        goto free_cnode;
                }
  
@@ -1034791,7 +1034708,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                 */
                if (saved_bh == NULL) {
                        goto free_cnode;
-@@ -1510,8 +1519,8 @@ static int flush_journal_list(struct sup
+@@ -1510,8 +1519,8 @@
                 ** is not marked JDirty_wait
                 */
                if ((!was_jwait) && !buffer_locked(saved_bh)) {
@@ -1034802,7 +1034719,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                         "not in a newer tranasction",
                                         (unsigned long long)saved_bh->
                                         b_blocknr, was_dirty ? ' ' : '!',
-@@ -1529,8 +1538,8 @@ static int flush_journal_list(struct sup
+@@ -1529,8 +1538,8 @@
                                unlock_buffer(saved_bh);
                        count++;
                } else {
@@ -1034813,7 +1034730,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                         (unsigned long long)saved_bh->
                                         b_blocknr, __func__);
                }
-@@ -1541,8 +1550,8 @@ static int flush_journal_list(struct sup
+@@ -1541,8 +1550,8 @@
                        /* we incremented this to keep others from taking the buffer head away */
                        put_bh(saved_bh);
                        if (atomic_read(&(saved_bh->b_count)) < 0) {
@@ -1034824,7 +1034741,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        }
                }
        }
-@@ -1551,18 +1560,18 @@ static int flush_journal_list(struct sup
+@@ -1551,18 +1560,18 @@
                while (cn) {
                        if (test_bit(BLOCK_NEEDS_FLUSH, &cn->state)) {
                                if (!cn->bh) {
@@ -1034849,7 +1034766,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  #endif
                                        err = -EIO;
                                }
-@@ -1587,7 +1596,7 @@ static int flush_journal_list(struct sup
+@@ -1587,7 +1596,7 @@
                               __func__);
        flush_older_and_return:
  
@@ -1034858,7 +1034775,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** real blocks from all older transactions to disk.  This is because
         ** once the header block is updated, this transaction will not be
         ** replayed after a crash
-@@ -1597,7 +1606,7 @@ static int flush_journal_list(struct sup
+@@ -1597,7 +1606,7 @@
        }
  
        err = journal->j_errno;
@@ -1034867,7 +1034784,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** transaction, we must make sure it can never be replayed
         **
         ** since we are only called from do_journal_end, we know for sure there
-@@ -1623,7 +1632,7 @@ static int flush_journal_list(struct sup
+@@ -1623,7 +1632,7 @@
  
        if (journal->j_last_flush_id != 0 &&
            (jl->j_trans_id - journal->j_last_flush_id) != 1) {
@@ -1034876,7 +1034793,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 journal->j_last_flush_id, jl->j_trans_id);
        }
        journal->j_last_flush_id = jl->j_trans_id;
-@@ -1637,7 +1646,7 @@ static int flush_journal_list(struct sup
+@@ -1637,7 +1646,7 @@
        jl->j_realblock = NULL;
        jl->j_commit_bh = NULL;
        jl->j_trans_id = 0;
@@ -1034885,7 +1034802,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        put_journal_list(s, jl);
        if (flushall)
                mutex_unlock(&journal->j_flush_mutex);
-@@ -1758,13 +1767,13 @@ static int dirty_one_transaction(struct 
+@@ -1758,13 +1767,13 @@
  static int kupdate_transactions(struct super_block *s,
                                struct reiserfs_journal_list *jl,
                                struct reiserfs_journal_list **next_jl,
@@ -1034901,7 +1034818,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct buffer_chunk chunk;
        struct list_head *entry;
        struct reiserfs_journal *journal = SB_JOURNAL(s);
-@@ -1833,7 +1842,7 @@ static int flush_used_journal_lists(stru
+@@ -1833,7 +1842,7 @@
        int limit = 256;
        struct reiserfs_journal_list *tjl;
        struct reiserfs_journal_list *flush_jl;
@@ -1034910,14 +1034827,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal *journal = SB_JOURNAL(s);
  
        flush_jl = tjl = jl;
-@@ -1909,22 +1918,22 @@ void remove_journal_hash(struct super_bl
+@@ -1909,22 +1918,22 @@
        }
  }
  
 -static void free_journal_ram(struct super_block *p_s_sb)
-+static void free_journal_ram(struct super_block *sb)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static void free_journal_ram(struct super_block *sb)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        kfree(journal->j_current_jl);
        journal->j_num_lists--;
@@ -1034938,7 +1034856,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        vfree(journal);
  }
  
-@@ -1933,27 +1942,27 @@ static void free_journal_ram(struct supe
+@@ -1933,27 +1942,27 @@
  ** of read_super() yet.  Any other caller must keep error at 0.
  */
  static int do_journal_release(struct reiserfs_transaction_handle *th,
@@ -1034976,7 +1034894,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        flushed = 1;
                }
        }
-@@ -1961,26 +1970,26 @@ static int do_journal_release(struct rei
+@@ -1961,26 +1970,26 @@
        /* this also catches errors during the do_journal_end above */
        if (!error && reiserfs_is_journal_aborted(journal)) {
                memset(&myth, 0, sizeof(myth));
@@ -1035011,14 +1034929,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        return 0;
  }
-@@ -1989,41 +1998,41 @@ static int do_journal_release(struct rei
+@@ -1989,41 +1998,41 @@
  ** call on unmount.  flush all journal trans, release all alloc'd ram
  */
  int journal_release(struct reiserfs_transaction_handle *th,
 -                  struct super_block *p_s_sb)
-+                  struct super_block *sb)
- {
+-{
 -      return do_journal_release(th, p_s_sb, 0);
++                  struct super_block *sb)
++{
 +      return do_journal_release(th, sb, 0);
  }
  
@@ -1035027,9 +1034946,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  */
  int journal_release_error(struct reiserfs_transaction_handle *th,
 -                        struct super_block *p_s_sb)
-+                        struct super_block *sb)
- {
+-{
 -      return do_journal_release(th, p_s_sb, 1);
++                        struct super_block *sb)
++{
 +      return do_journal_release(th, sb, 1);
  }
  
@@ -1035053,9 +1034973,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +/* returns 0 if it did not find a description block
  ** returns -1 if it found a corrupt commit block
 -** returns 1 if both desc and commit were valid 
-+** returns 1 if both desc and commit were valid
- */
+-*/
 -static int journal_transaction_is_valid(struct super_block *p_s_sb,
++** returns 1 if both desc and commit were valid
++*/
 +static int journal_transaction_is_valid(struct super_block *sb,
                                        struct buffer_head *d_bh,
 -                                      unsigned long *oldest_invalid_trans_id,
@@ -1035063,7 +1034984,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                        unsigned long *newest_mount_id)
  {
        struct reiserfs_journal_desc *desc;
-@@ -2039,7 +2048,7 @@ static int journal_transaction_is_valid(
+@@ -2039,7 +2048,7 @@
            && !memcmp(get_journal_desc_magic(d_bh), JOURNAL_DESC_MAGIC, 8)) {
                if (oldest_invalid_trans_id && *oldest_invalid_trans_id
                    && get_desc_trans_id(desc) > *oldest_invalid_trans_id) {
@@ -1035072,7 +1034993,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                       "journal-986: transaction "
                                       "is valid returning because trans_id %d is greater than "
                                       "oldest_invalid %lu",
-@@ -2049,7 +2058,7 @@ static int journal_transaction_is_valid(
+@@ -2049,7 +2058,7 @@
                }
                if (newest_mount_id
                    && *newest_mount_id > get_desc_mount_id(desc)) {
@@ -1035081,7 +1035002,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                       "journal-1087: transaction "
                                       "is valid returning because mount_id %d is less than "
                                       "newest_mount_id %lu",
-@@ -2057,36 +2066,37 @@ static int journal_transaction_is_valid(
+@@ -2057,36 +2066,37 @@
                                       *newest_mount_id);
                        return -1;
                }
@@ -1035130,7 +1035051,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                               "journal-1004: "
                                               "transaction_is_valid setting oldest invalid trans_id "
                                               "to %d",
-@@ -2095,11 +2105,11 @@ static int journal_transaction_is_valid(
+@@ -2095,11 +2105,11 @@
                        return -1;
                }
                brelse(c_bh);
@@ -1035144,7 +1035065,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               get_desc_trans_len(desc),
                               get_desc_trans_id(desc));
                return 1;
-@@ -2121,63 +2131,63 @@ static void brelse_array(struct buffer_h
+@@ -2121,63 +2131,63 @@
  ** this either reads in a replays a transaction, or returns because the transaction
  ** is invalid, or too old.
  */
@@ -1035225,7 +1035146,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               get_commit_trans_id(commit),
                               get_commit_trans_len(commit));
                brelse(c_bh);
-@@ -2195,38 +2205,41 @@ static int journal_read_transaction(stru
+@@ -2195,38 +2205,41 @@
                brelse(d_bh);
                kfree(log_blocks);
                kfree(real_blocks);
@@ -1035281,7 +1035202,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                      abort_replay:
                        brelse_array(log_blocks, i);
                        brelse_array(real_blocks, i);
-@@ -2242,8 +2255,9 @@ static int journal_read_transaction(stru
+@@ -2242,8 +2255,9 @@
        for (i = 0; i < get_desc_trans_len(desc); i++) {
                wait_on_buffer(log_blocks[i]);
                if (!buffer_uptodate(log_blocks[i])) {
@@ -1035293,7 +1035214,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        brelse_array(log_blocks + i,
                                     get_desc_trans_len(desc) - i);
                        brelse_array(real_blocks, get_desc_trans_len(desc));
-@@ -2266,8 +2280,9 @@ static int journal_read_transaction(stru
+@@ -2266,8 +2280,9 @@
        for (i = 0; i < get_desc_trans_len(desc); i++) {
                wait_on_buffer(real_blocks[i]);
                if (!buffer_uptodate(real_blocks[i])) {
@@ -1035305,7 +1035226,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        brelse_array(real_blocks + i,
                                     get_desc_trans_len(desc) - i);
                        brelse(c_bh);
-@@ -2279,15 +2294,15 @@ static int journal_read_transaction(stru
+@@ -2279,15 +2294,15 @@
                brelse(real_blocks[i]);
        }
        cur_dblock =
@@ -1035326,14 +1035247,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        journal->j_last_flush_trans_id = trans_id;
        journal->j_trans_id = trans_id + 1;
        /* check for trans_id overflow */
-@@ -2352,12 +2367,12 @@ static struct buffer_head *reiserfs_brea
+@@ -2352,12 +2367,12 @@
  **
  ** On exit, it sets things up so the first transaction will work correctly.
  */
 -static int journal_read(struct super_block *p_s_sb)
-+static int journal_read(struct super_block *sb)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++static int journal_read(struct super_block *sb)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct reiserfs_journal_desc *desc;
 -      unsigned long oldest_trans_id = 0;
@@ -1035343,7 +1035265,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        time_t start;
        unsigned long oldest_start = 0;
        unsigned long cur_dblock = 0;
-@@ -2370,46 +2385,46 @@ static int journal_read(struct super_blo
+@@ -2370,46 +2385,46 @@
        int ret;
        char b[BDEVNAME_SIZE];
  
@@ -1035405,7 +1035327,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                if (!ret) {
                        continue_replay = 0;
                }
-@@ -2417,9 +2432,9 @@ static int journal_read(struct super_blo
+@@ -2417,9 +2432,9 @@
                goto start_log_replay;
        }
  
@@ -1035418,7 +1035340,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                return -1;
        }
  
-@@ -2428,17 +2443,17 @@ static int journal_read(struct super_blo
+@@ -2428,17 +2443,17 @@
         */
        while (continue_replay
               && cur_dblock <
@@ -1035442,7 +1035364,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                                 &oldest_invalid_trans_id,
                                                 &newest_mount_id);
                if (ret == 1) {
-@@ -2447,26 +2462,26 @@ static int journal_read(struct super_blo
+@@ -2447,26 +2462,26 @@
                                oldest_trans_id = get_desc_trans_id(desc);
                                oldest_start = d_bh->b_blocknr;
                                newest_mount_id = get_desc_mount_id(desc);
@@ -1035474,7 +1035396,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                               "journal-1299: Setting "
                                               "newest_mount_id to %d",
                                               get_desc_mount_id(desc));
-@@ -2481,17 +2496,17 @@ static int journal_read(struct super_blo
+@@ -2481,17 +2496,17 @@
        start_log_replay:
        cur_dblock = oldest_start;
        if (oldest_trans_id) {
@@ -1035495,7 +1035417,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                             oldest_trans_id, newest_mount_id);
                if (ret < 0) {
                        return ret;
-@@ -2499,14 +2514,14 @@ static int journal_read(struct super_blo
+@@ -2499,14 +2514,14 @@
                        break;
                }
                cur_dblock =
@@ -1035512,7 +1035434,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               "journal-1225: No valid " "transactions found");
        }
        /* j_start does not get set correctly if we don't replay any transactions.
-@@ -2526,16 +2541,16 @@ static int journal_read(struct super_blo
+@@ -2526,16 +2541,16 @@
        } else {
                journal->j_mount_id = newest_mount_id + 1;
        }
@@ -1035533,7 +1035455,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                         journal->j_last_flush_trans_id)) {
                /* replay failed, caller must call free_journal_ram and abort
                 ** the mount
-@@ -2556,13 +2571,19 @@ static struct reiserfs_journal_list *all
+@@ -2556,13 +2571,19 @@
        INIT_LIST_HEAD(&jl->j_bh_list);
        mutex_init(&jl->j_commit_mutex);
        SB_JOURNAL(s)->j_num_lists++;
@@ -1035548,14 +1035470,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  }
  
 -static void journal_list_init(struct super_block *p_s_sb)
-+static void journal_list_init(struct super_block *sb)
- {
+-{
 -      SB_JOURNAL(p_s_sb)->j_current_jl = alloc_journal_list(p_s_sb);
++static void journal_list_init(struct super_block *sb)
++{
 +      SB_JOURNAL(sb)->j_current_jl = alloc_journal_list(sb);
  }
  
  static int release_journal_dev(struct super_block *super,
-@@ -2580,9 +2601,8 @@ static int release_journal_dev(struct su
+@@ -2580,9 +2601,8 @@
        }
  
        if (result != 0) {
@@ -1035567,7 +1035490,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        }
        return result;
  }
-@@ -2611,7 +2631,7 @@ static int journal_init_dev(struct super
+@@ -2611,7 +2631,7 @@
                if (IS_ERR(journal->j_dev_bd)) {
                        result = PTR_ERR(journal->j_dev_bd);
                        journal->j_dev_bd = NULL;
@@ -1035576,7 +1035499,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                         "cannot init journal device '%s': %i",
                                         __bdevname(jdev, b), result);
                        return result;
-@@ -2659,30 +2679,30 @@ static int journal_init_dev(struct super
+@@ -2659,30 +2679,30 @@
   */
  #define REISERFS_STANDARD_BLKSIZE (4096)
  
@@ -1035617,7 +1035540,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        return 1;
                }
        } else {
-@@ -2690,9 +2710,11 @@ static int check_advise_trans_params(str
+@@ -2690,9 +2710,11 @@
                     The file system was created by old version
                   of mkreiserfs, so some fields contain zeros,
                   and we need to advise proper values for them */
@@ -1035632,7 +1035555,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                journal->j_trans_max = JOURNAL_TRANS_MAX_DEFAULT;
                journal->j_max_batch = JOURNAL_MAX_BATCH_DEFAULT;
                journal->j_max_commit_age = JOURNAL_MAX_COMMIT_AGE;
-@@ -2703,10 +2725,10 @@ static int check_advise_trans_params(str
+@@ -2703,10 +2725,10 @@
  /*
  ** must be called once on fs mount.  calls journal_read for you
  */
@@ -1035645,7 +1035568,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct buffer_head *bhjh;
        struct reiserfs_super_block *rs;
        struct reiserfs_journal_header *jh;
-@@ -2714,10 +2736,10 @@ int journal_init(struct super_block *p_s
+@@ -2714,10 +2736,10 @@
        struct reiserfs_journal_list *jl;
        char b[BDEVNAME_SIZE];
  
@@ -1035659,7 +1035582,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                return 1;
        }
        memset(journal, 0, sizeof(struct reiserfs_journal));
-@@ -2726,51 +2748,51 @@ int journal_init(struct super_block *p_s
+@@ -2726,51 +2748,51 @@
        INIT_LIST_HEAD(&journal->j_working_list);
        INIT_LIST_HEAD(&journal->j_journal_list);
        journal->j_persistent_trans = 0;
@@ -1035667,9 +1035590,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +      if (reiserfs_allocate_list_bitmaps(sb,
                                           journal->j_list_bitmap,
 -                                         reiserfs_bmap_count(p_s_sb)))
-+                                         reiserfs_bmap_count(sb)))
-               goto free_and_return;
+-              goto free_and_return;
 -      allocate_bitmap_nodes(p_s_sb);
++                                         reiserfs_bmap_count(sb)))
++              goto free_and_return;
 +      allocate_bitmap_nodes(sb);
  
        /* reserved for journal area support */
@@ -1035703,22 +1035627,28 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 -                               SB_JOURNAL_1st_RESERVED_BLOCK(p_s_sb),
 -                               SB_ONDISK_JOURNAL_SIZE(p_s_sb),
 -                               p_s_sb->s_blocksize);
-+                               SB_JOURNAL_1st_RESERVED_BLOCK(sb),
-+                               SB_ONDISK_JOURNAL_SIZE(sb),
-+                               sb->s_blocksize);
-               goto free_and_return;
-       }
+-              goto free_and_return;
+-      }
+-
 -      if (journal_init_dev(p_s_sb, journal, j_dev_name) != 0) {
 -              reiserfs_warning(p_s_sb,
 -                               "sh-462: unable to initialize jornal device");
+-              goto free_and_return;
+-      }
+-
+-      rs = SB_DISK_SUPER_BLOCK(p_s_sb);
++                               SB_JOURNAL_1st_RESERVED_BLOCK(sb),
++                               SB_ONDISK_JOURNAL_SIZE(sb),
++                               sb->s_blocksize);
++              goto free_and_return;
++      }
++
 +      if (journal_init_dev(sb, journal, j_dev_name) != 0) {
 +              reiserfs_warning(sb, "sh-462",
 +                               "unable to initialize jornal device");
-               goto free_and_return;
-       }
--      rs = SB_DISK_SUPER_BLOCK(p_s_sb);
++              goto free_and_return;
++      }
++
 +      rs = SB_DISK_SUPER_BLOCK(sb);
  
        /* read journal header */
@@ -1035736,7 +1035666,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                goto free_and_return;
        }
        jh = (struct reiserfs_journal_header *)(bhjh->b_data);
-@@ -2779,10 +2801,10 @@ int journal_init(struct super_block *p_s
+@@ -2779,10 +2801,10 @@
        if (is_reiserfs_jr(rs)
            && (le32_to_cpu(jh->jh_journal.jp_journal_magic) !=
                sb_jp_journal_magic(rs))) {
@@ -1035751,7 +1035681,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 bdevname(journal->j_dev_bd, b),
                                 sb_jp_journal_magic(rs));
                brelse(bhjh);
-@@ -2795,7 +2817,7 @@ int journal_init(struct super_block *p_s
+@@ -2795,7 +2817,7 @@
            le32_to_cpu(jh->jh_journal.jp_journal_max_commit_age);
        journal->j_max_trans_age = JOURNAL_MAX_TRANS_AGE;
  
@@ -1035760,7 +1035690,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                goto free_and_return;
        journal->j_default_max_commit_age = journal->j_max_commit_age;
  
-@@ -2804,12 +2826,12 @@ int journal_init(struct super_block *p_s
+@@ -2804,12 +2826,12 @@
                journal->j_max_trans_age = commit_max_age;
        }
  
@@ -1035776,7 +1035706,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                      journal->j_trans_max,
                      journal->j_max_batch,
                      journal->j_max_commit_age, journal->j_max_trans_age);
-@@ -2817,7 +2839,8 @@ int journal_init(struct super_block *p_s
+@@ -2817,7 +2839,8 @@
        brelse(bhjh);
  
        journal->j_list_bitmap_index = 0;
@@ -1035786,7 +1035716,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        memset(journal->j_list_hash_table, 0,
               JOURNAL_HASH_SIZE * sizeof(struct reiserfs_journal_cnode *));
-@@ -2849,7 +2872,7 @@ int journal_init(struct super_block *p_s
+@@ -2849,7 +2872,7 @@
        journal->j_must_wait = 0;
  
        if (journal->j_cnode_free == 0) {
@@ -1035795,7 +1035725,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 "allocation failed (%ld bytes). Journal is "
                                 "too large for available memory. Usually "
                                 "this is due to a journal that is too large.",
-@@ -2857,16 +2880,17 @@ int journal_init(struct super_block *p_s
+@@ -2857,16 +2880,17 @@
                goto free_and_return;
        }
  
@@ -1035807,19 +1035737,21 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        if (!jl->j_list_bitmap) {
 -              reiserfs_warning(p_s_sb,
 -                               "journal-2005, get_list_bitmap failed for journal list 0");
-+              reiserfs_warning(sb, "journal-2005",
-+                               "get_list_bitmap failed for journal list 0");
-               goto free_and_return;
-       }
+-              goto free_and_return;
+-      }
 -      if (journal_read(p_s_sb) < 0) {
 -              reiserfs_warning(p_s_sb, "Replay Failure, unable to mount");
++              reiserfs_warning(sb, "journal-2005",
++                               "get_list_bitmap failed for journal list 0");
++              goto free_and_return;
++      }
 +      if (journal_read(sb) < 0) {
 +              reiserfs_warning(sb, "reiserfs-2006",
 +                               "Replay Failure, unable to mount");
                goto free_and_return;
        }
  
-@@ -2875,10 +2899,10 @@ int journal_init(struct super_block *p_s
+@@ -2875,10 +2899,10 @@
                commit_wq = create_workqueue("reiserfs");
  
        INIT_DELAYED_WORK(&journal->j_work, flush_async_commits);
@@ -1035832,7 +1035764,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        return 1;
  }
  
-@@ -2909,7 +2933,7 @@ int journal_transaction_should_end(struc
+@@ -2909,7 +2933,7 @@
        return 0;
  }
  
@@ -1035841,7 +1035773,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  ** kernel_lock to be held
  */
  void reiserfs_block_writes(struct reiserfs_transaction_handle *th)
-@@ -2967,7 +2991,7 @@ static void wake_queued_writers(struct s
+@@ -2967,7 +2991,7 @@
                wake_up(&journal->j_join_wait);
  }
  
@@ -1035850,7 +1035782,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_journal *journal = SB_JOURNAL(sb);
        unsigned long bcount = journal->j_bcount;
-@@ -2994,43 +3018,43 @@ static void let_transaction_grow(struct 
+@@ -2994,43 +3018,43 @@
  ** expect to use in nblocks.
  */
  static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
@@ -1035906,7 +1035838,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** we don't sleep if there aren't other writers
         */
  
-@@ -3045,7 +3069,7 @@ static int do_journal_begin_r(struct rei
+@@ -3045,7 +3069,7 @@
            || (!join && journal->j_cnode_free < (journal->j_trans_max * 3))) {
  
                old_trans_id = journal->j_trans_id;
@@ -1035915,7 +1035847,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
                if (!join && (journal->j_len_alloc + nblocks + 2) >=
                    journal->j_max_batch &&
-@@ -3053,7 +3077,7 @@ static int do_journal_begin_r(struct rei
+@@ -3053,7 +3077,7 @@
                    (journal->j_len_alloc * 75)) {
                        if (atomic_read(&journal->j_wcount) > 10) {
                                sched_count++;
@@ -1035924,7 +1035856,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                goto relock;
                        }
                }
-@@ -3063,25 +3087,25 @@ static int do_journal_begin_r(struct rei
+@@ -3063,25 +3087,25 @@
                if (atomic_read(&journal->j_jlock)) {
                        while (journal->j_trans_id == old_trans_id &&
                               atomic_read(&journal->j_jlock)) {
@@ -1035941,9 +1035873,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                /* someone might have ended the transaction while we joined */
                if (old_trans_id != journal->j_trans_id) {
 -                      retval = do_journal_end(&myth, p_s_sb, 1, 0);
-+                      retval = do_journal_end(&myth, sb, 1, 0);
-               } else {
+-              } else {
 -                      retval = do_journal_end(&myth, p_s_sb, 1, COMMIT_NOW);
++                      retval = do_journal_end(&myth, sb, 1, 0);
++              } else {
 +                      retval = do_journal_end(&myth, sb, 1, COMMIT_NOW);
                }
  
@@ -1035955,7 +1035888,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                goto relock;
        }
        /* we are the first writer, set trans_id */
-@@ -3093,7 +3117,7 @@ static int do_journal_begin_r(struct rei
+@@ -3093,7 +3117,7 @@
        th->t_blocks_logged = 0;
        th->t_blocks_allocated = nblocks;
        th->t_trans_id = journal->j_trans_id;
@@ -1035964,7 +1035897,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        INIT_LIST_HEAD(&th->t_list);
        get_fs_excl();
        return 0;
-@@ -3103,7 +3127,7 @@ static int do_journal_begin_r(struct rei
+@@ -3103,7 +3127,7 @@
        /* Re-set th->t_super, so we can properly keep track of how many
         * persistent transactions there are. We need to do this so if this
         * call is part of a failed restart_transaction, we can free it later */
@@ -1035973,7 +1035906,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        return retval;
  }
  
-@@ -3154,7 +3178,7 @@ int reiserfs_end_persistent_transaction(
+@@ -3154,7 +3178,7 @@
  }
  
  static int journal_join(struct reiserfs_transaction_handle *th,
@@ -1035982,7 +1035915,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_transaction_handle *cur_th = current->journal_info;
  
-@@ -3163,11 +3187,11 @@ static int journal_join(struct reiserfs_
+@@ -3163,11 +3187,11 @@
         */
        th->t_handle_save = cur_th;
        BUG_ON(cur_th && cur_th->t_refcount > 1);
@@ -1035996,7 +1035929,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_transaction_handle *cur_th = current->journal_info;
  
-@@ -3176,11 +3200,11 @@ int journal_join_abort(struct reiserfs_t
+@@ -3176,11 +3200,11 @@
         */
        th->t_handle_save = cur_th;
        BUG_ON(cur_th && cur_th->t_refcount > 1);
@@ -1036010,7 +1035943,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  {
        struct reiserfs_transaction_handle *cur_th = current->journal_info;
        int ret;
-@@ -3188,28 +3212,29 @@ int journal_begin(struct reiserfs_transa
+@@ -3188,28 +3212,29 @@
        th->t_handle_save = NULL;
        if (cur_th) {
                /* we are nesting into the current transaction */
@@ -1036046,7 +1035979,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        BUG_ON(current->journal_info != th);
  
        /* I guess this boils down to being the reciprocal of clm-2100 above.
-@@ -3229,32 +3254,32 @@ int journal_begin(struct reiserfs_transa
+@@ -3229,32 +3254,32 @@
  **
  ** if it was dirty, cleans and files onto the clean list.  I can't let it be dirty again until the
  ** transaction is committed.
@@ -1036056,9 +1035989,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  */
  int journal_mark_dirty(struct reiserfs_transaction_handle *th,
 -                     struct super_block *p_s_sb, struct buffer_head *bh)
-+                     struct super_block *sb, struct buffer_head *bh)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++                     struct super_block *sb, struct buffer_head *bh)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct reiserfs_journal_cnode *cn = NULL;
        int count_already_incd = 0;
@@ -1036087,7 +1036021,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                return 0;
        }
  
-@@ -3263,7 +3288,8 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3263,7 +3288,8 @@
         ** could get to disk too early.  NOT GOOD.
         */
        if (!prepared || buffer_dirty(bh)) {
@@ -1036097,7 +1036031,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                 "%cPREPARED %cLOCKED %cDIRTY %cJDIRTY_WAIT",
                                 (unsigned long long)bh->b_blocknr,
                                 prepared ? ' ' : '!',
-@@ -3273,23 +3299,23 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3273,23 +3299,23 @@
        }
  
        if (atomic_read(&(journal->j_wcount)) <= 0) {
@@ -1036127,7 +1036061,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                clear_buffer_journal_dirty(bh);
        }
  
-@@ -3301,9 +3327,9 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3301,9 +3327,9 @@
  
        /* now put this guy on the end */
        if (!cn) {
@@ -1036139,7 +1036073,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                }
  
                if (th->t_blocks_logged == th->t_blocks_allocated) {
-@@ -3315,7 +3341,7 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3315,7 +3341,7 @@
  
                cn->bh = bh;
                cn->blocknr = bh->b_blocknr;
@@ -1036148,7 +1036082,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                cn->jlist = NULL;
                insert_journal_hash(journal->j_hash_table, cn);
                if (!count_already_incd) {
-@@ -3336,11 +3362,11 @@ int journal_mark_dirty(struct reiserfs_t
+@@ -3336,11 +3362,11 @@
  }
  
  int journal_end(struct reiserfs_transaction_handle *th,
@@ -1036163,16 +1036097,19 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        if (!th->t_trans_id) {
                WARN_ON(1);
-@@ -3363,26 +3389,26 @@ int journal_end(struct reiserfs_transact
+@@ -3363,26 +3389,26 @@
                }
                return 0;
        } else {
 -              return do_journal_end(th, p_s_sb, nblocks, 0);
-+              return do_journal_end(th, sb, nblocks, 0);
-       }
- }
+-      }
+-}
+-
 -/* removes from the current transaction, relsing and descrementing any counters.  
++              return do_journal_end(th, sb, nblocks, 0);
++      }
++}
++
 +/* removes from the current transaction, relsing and descrementing any counters.
  ** also files the removed buffer directly onto the clean list
  **
@@ -1036187,15 +1036124,17 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct buffer_head *bh;
        struct reiserfs_journal_cnode *cn;
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
-+      struct reiserfs_journal *journal = SB_JOURNAL(sb);
-       int ret = 0;
+-      int ret = 0;
+-
 -      cn = get_journal_hash_dev(p_s_sb, journal->j_hash_table, blocknr);
++      struct reiserfs_journal *journal = SB_JOURNAL(sb);
++      int ret = 0;
++
 +      cn = get_journal_hash_dev(sb, journal->j_hash_table, blocknr);
        if (!cn || !cn->bh) {
                return ret;
        }
-@@ -3400,7 +3426,7 @@ static int remove_from_transaction(struc
+@@ -3400,7 +3426,7 @@
                journal->j_last = cn->prev;
        }
        if (bh)
@@ -1036204,7 +1036143,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                    bh->b_blocknr, 0);
        clear_buffer_journaled(bh);     /* don't log this one */
  
-@@ -3410,14 +3436,14 @@ static int remove_from_transaction(struc
+@@ -3410,14 +3436,14 @@
                clear_buffer_journal_test(bh);
                put_bh(bh);
                if (atomic_read(&(bh->b_count)) < 0) {
@@ -1036222,7 +1036161,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        return ret;
  }
  
-@@ -3465,22 +3491,22 @@ static int can_dirty(struct reiserfs_jou
+@@ -3465,22 +3491,22 @@
  }
  
  /* syncs the commit blocks, but does not force the real buffers to disk
@@ -1036231,9 +1036170,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  */
  int journal_end_sync(struct reiserfs_transaction_handle *th,
 -                   struct super_block *p_s_sb, unsigned long nblocks)
-+                   struct super_block *sb, unsigned long nblocks)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++                   struct super_block *sb, unsigned long nblocks)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
  
        BUG_ON(!th->t_trans_id);
@@ -1036244,14 +1036184,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +              reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb),
                                             1);
 -              journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb));
-+              journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
-       }
+-      }
 -      return do_journal_end(th, p_s_sb, nblocks, COMMIT_NOW | WAIT);
++              journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
++      }
 +      return do_journal_end(th, sb, nblocks, COMMIT_NOW | WAIT);
  }
  
  /*
-@@ -3490,7 +3516,7 @@ static void flush_async_commits(struct w
+@@ -3490,7 +3516,7 @@
  {
        struct reiserfs_journal *journal =
                container_of(work, struct reiserfs_journal, j_work.work);
@@ -1036260,7 +1036201,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal_list *jl;
        struct list_head *entry;
  
-@@ -3499,7 +3525,7 @@ static void flush_async_commits(struct w
+@@ -3499,7 +3525,7 @@
                /* last entry is the youngest, commit it and you get everything */
                entry = journal->j_journal_list.prev;
                jl = JOURNAL_LIST_ENTRY(entry);
@@ -1036269,7 +1036210,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        }
        unlock_kernel();
  }
-@@ -3508,11 +3534,11 @@ static void flush_async_commits(struct w
+@@ -3508,11 +3534,11 @@
  ** flushes any old transactions to disk
  ** ends the current transaction if it is too old
  */
@@ -1036283,7 +1036224,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        now = get_seconds();
        /* safety check so we don't flush while we are replaying the log during
-@@ -3529,35 +3555,35 @@ int reiserfs_flush_old_commits(struct su
+@@ -3529,35 +3555,35 @@
            journal->j_trans_start_time > 0 &&
            journal->j_len > 0 &&
            (now - journal->j_trans_start_time) > journal->j_max_trans_age) {
@@ -1036303,10 +1036244,12 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                         ** an async commit so that kreiserfsd can do it later
                         */
 -                      do_journal_end(&th, p_s_sb, 1, COMMIT_NOW | WAIT);
-+                      do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT);
-               }
-       }
+-              }
+-      }
 -      return p_s_sb->s_dirt;
++                      do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT);
++              }
++      }
 +      return sb->s_dirt;
  }
  
@@ -1036330,7 +1036273,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                             int flags)
  {
  
-@@ -3566,13 +3592,13 @@ static int check_journal_end(struct reis
+@@ -3566,13 +3592,13 @@
        int commit_now = flags & COMMIT_NOW;
        int wait_on_commit = flags & WAIT;
        struct reiserfs_journal_list *jl;
@@ -1036347,7 +1036290,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                               th->t_trans_id, journal->j_trans_id);
        }
  
-@@ -3581,7 +3607,7 @@ static int check_journal_end(struct reis
+@@ -3581,7 +3607,7 @@
                atomic_dec(&(journal->j_wcount));
        }
  
@@ -1036356,7 +1036299,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** will be dealt with by next transaction that actually writes something, but should be taken
         ** care of in this trans
         */
-@@ -3590,7 +3616,7 @@ static int check_journal_end(struct reis
+@@ -3590,7 +3616,7 @@
        /* if wcount > 0, and we are called to with flush or commit_now,
         ** we wait on j_join_wait.  We will wake up when the last writer has
         ** finished the transaction, and started it on its way to the disk.
@@ -1036365,7 +1036308,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         ** because the rest of journal end was already done for this transaction.
         */
        if (atomic_read(&(journal->j_wcount)) > 0) {
-@@ -3605,31 +3631,31 @@ static int check_journal_end(struct reis
+@@ -3605,31 +3631,31 @@
                        if (flush) {
                                journal->j_next_full_flush = 1;
                        }
@@ -1036395,34 +1036338,40 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +                          && journal_list_still_alive(sb, trans_id)
                            && wait_on_commit) {
 -                              flush_commit_list(p_s_sb, jl, 1);
-+                              flush_commit_list(sb, jl, 1);
-                       }
-                       return 0;
-               }
+-                      }
+-                      return 0;
+-              }
 -              unlock_journal(p_s_sb);
++                              flush_commit_list(sb, jl, 1);
++                      }
++                      return 0;
++              }
 +              unlock_journal(sb);
                return 0;
        }
  
-@@ -3646,13 +3672,13 @@ static int check_journal_end(struct reis
+@@ -3646,13 +3672,13 @@
            && journal->j_len_alloc < journal->j_max_batch
            && journal->j_cnode_free > (journal->j_trans_max * 3)) {
                journal->j_bcount++;
 -              unlock_journal(p_s_sb);
-+              unlock_journal(sb);
-               return 0;
-       }
+-              return 0;
+-      }
+-
 -      if (journal->j_start > SB_ONDISK_JOURNAL_SIZE(p_s_sb)) {
 -              reiserfs_panic(p_s_sb,
 -                             "journal-003: journal_end: j_start (%ld) is too high\n",
++              unlock_journal(sb);
++              return 0;
++      }
++
 +      if (journal->j_start > SB_ONDISK_JOURNAL_SIZE(sb)) {
 +              reiserfs_panic(sb, "journal-003",
 +                             "j_start (%ld) is too high",
                               journal->j_start);
        }
        return 1;
-@@ -3661,7 +3687,7 @@ static int check_journal_end(struct reis
+@@ -3661,7 +3687,7 @@
  /*
  ** Does all the work that makes deleting blocks safe.
  ** when deleting a block mark BH_JNew, just remove it from the current transaction, clean it's buffer_head and move on.
@@ -1036431,14 +1036380,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  ** otherwise:
  ** set a bit for the block in the journal bitmap.  That will prevent it from being allocated for unformatted nodes
  ** before this transaction has finished.
-@@ -3673,16 +3699,16 @@ static int check_journal_end(struct reis
+@@ -3673,16 +3699,16 @@
  ** Then remove it from the current transaction, decrementing any counters and filing it on the clean list.
  */
  int journal_mark_freed(struct reiserfs_transaction_handle *th,
 -                     struct super_block *p_s_sb, b_blocknr_t blocknr)
-+                     struct super_block *sb, b_blocknr_t blocknr)
- {
+-{
 -      struct reiserfs_journal *journal = SB_JOURNAL(p_s_sb);
++                     struct super_block *sb, b_blocknr_t blocknr)
++{
 +      struct reiserfs_journal *journal = SB_JOURNAL(sb);
        struct reiserfs_journal_cnode *cn = NULL;
        struct buffer_head *bh = NULL;
@@ -1036451,7 +1036401,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        if (cn && cn->bh) {
                bh = cn->bh;
                get_bh(bh);
-@@ -3692,15 +3718,15 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3692,15 +3718,15 @@
                clear_buffer_journal_new(bh);
                clear_prepared_bits(bh);
                reiserfs_clean_and_file_buffer(bh);
@@ -1036463,15 +1036413,16 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                if (!jb) {
 -                      reiserfs_panic(p_s_sb,
 -                                     "journal-1702: journal_mark_freed, journal_list_bitmap is NULL\n");
+-              }
+-              set_bit_in_list_bitmap(p_s_sb, blocknr, jb);
 +                      reiserfs_panic(sb, "journal-1702",
 +                                     "journal_list_bitmap is NULL");
-               }
--              set_bit_in_list_bitmap(p_s_sb, blocknr, jb);
++              }
 +              set_bit_in_list_bitmap(sb, blocknr, jb);
  
                /* Note, the entire while loop is not allowed to schedule.  */
  
-@@ -3708,13 +3734,13 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3708,13 +3734,13 @@
                        clear_prepared_bits(bh);
                        reiserfs_clean_and_file_buffer(bh);
                }
@@ -1036488,7 +1036439,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                set_bit(BLOCK_FREED, &cn->state);
                                if (cn->bh) {
                                        if (!cleaned) {
-@@ -3730,8 +3756,9 @@ int journal_mark_freed(struct reiserfs_t
+@@ -3730,8 +3756,9 @@
                                                put_bh(cn->bh);
                                                if (atomic_read
                                                    (&(cn->bh->b_count)) < 0) {
@@ -1036500,7 +1036451,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                                }
                                        }
                                        if (cn->jlist) {        /* since we are clearing the bh, we MUST dec nonzerolen */
-@@ -3821,7 +3848,7 @@ static int __commit_trans_jl(struct inod
+@@ -3821,7 +3848,7 @@
  
  int reiserfs_commit_for_inode(struct inode *inode)
  {
@@ -1036509,7 +1036460,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl;
  
        /* for the whole inode, assume unset id means it was
-@@ -3836,18 +3863,18 @@ int reiserfs_commit_for_inode(struct ino
+@@ -3836,18 +3863,18 @@
        return __commit_trans_jl(inode, id, jl);
  }
  
@@ -1036532,14 +1036483,15 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                          journal->j_list_hash_table,
                                          bh->b_blocknr);
                if (cn && can_dirty(cn)) {
-@@ -3864,12 +3891,12 @@ extern struct tree_balance *cur_tb;
+@@ -3864,12 +3891,12 @@
  ** be written to disk while we are altering it.  So, we must:
  ** clean it
  ** wait on it.
 -** 
-+**
- */
+-*/
 -int reiserfs_prepare_for_journal(struct super_block *p_s_sb,
++**
++*/
 +int reiserfs_prepare_for_journal(struct super_block *sb,
                                 struct buffer_head *bh, int wait)
  {
@@ -1036548,7 +1036500,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        if (!trylock_buffer(bh)) {
                if (!wait)
-@@ -3906,7 +3933,7 @@ static void flush_old_journal_lists(stru
+@@ -3906,7 +3933,7 @@
        }
  }
  
@@ -1036557,7 +1036509,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  ** long and ugly.  If flush, will not return until all commit
  ** blocks and all real buffers in the trans are on disk.
  ** If no_async, won't return until all commit blocks are on disk.
-@@ -3917,10 +3944,10 @@ static void flush_old_journal_lists(stru
+@@ -3917,10 +3944,10 @@
  ** journal lists, etc just won't happen.
  */
  static int do_journal_end(struct reiserfs_transaction_handle *th,
@@ -1036570,7 +1036522,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        struct reiserfs_journal_cnode *cn, *next, *jl_cn;
        struct reiserfs_journal_cnode *last_cn = NULL;
        struct reiserfs_journal_desc *desc;
-@@ -3935,7 +3962,7 @@ static int do_journal_end(struct reiserf
+@@ -3935,7 +3962,7 @@
        struct reiserfs_journal_list *jl, *temp_jl;
        struct list_head *entry, *safe;
        unsigned long jindex;
@@ -1036579,7 +1036531,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        int trans_half;
  
        BUG_ON(th->t_refcount > 1);
-@@ -3943,21 +3970,21 @@ static int do_journal_end(struct reiserf
+@@ -3943,21 +3970,21 @@
  
        /* protect flush_older_commits from doing mistakes if the
             transaction ID counter gets overflowed.  */
@@ -1036598,15 +1036550,17 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 +              reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb),
                                             1);
 -              journal_mark_dirty(th, p_s_sb, SB_BUFFER_WITH_SB(p_s_sb));
-+              journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
-       }
+-      }
+-
 -      lock_journal(p_s_sb);
++              journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
++      }
++
 +      lock_journal(sb);
        if (journal->j_next_full_flush) {
                flags |= FLUSH_ALL;
                flush = 1;
-@@ -3967,13 +3994,13 @@ static int do_journal_end(struct reiserf
+@@ -3967,13 +3994,13 @@
                wait_on_commit = 1;
        }
  
@@ -1036625,7 +1036579,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                goto out;
        }
  
-@@ -4002,8 +4029,8 @@ static int do_journal_end(struct reiserf
+@@ -4002,8 +4029,8 @@
  
        /* setup description block */
        d_bh =
@@ -1036636,7 +1036590,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                           journal->j_start);
        set_buffer_uptodate(d_bh);
        desc = (struct reiserfs_journal_desc *)(d_bh)->b_data;
-@@ -4012,9 +4039,9 @@ static int do_journal_end(struct reiserf
+@@ -4012,9 +4039,9 @@
        set_desc_trans_id(desc, journal->j_trans_id);
  
        /* setup commit block.  Don't write (keep it clean too) this one until after everyone else is written */
@@ -1036648,7 +1036602,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        commit = (struct reiserfs_journal_commit *)c_bh->b_data;
        memset(c_bh->b_data, 0, c_bh->b_size);
        set_commit_trans_id(commit, journal->j_trans_id);
-@@ -4047,13 +4074,13 @@ static int do_journal_end(struct reiserf
+@@ -4047,13 +4074,13 @@
         **  for each real block, add it to the journal list hash,
         ** copy into real block index array in the commit or desc block
         */
@@ -1036666,7 +1036620,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        }
                        if (i == 0) {
                                jl->j_realblock = jl_cn;
-@@ -4064,18 +4091,19 @@ static int do_journal_end(struct reiserf
+@@ -4064,18 +4091,19 @@
                                last_cn->next = jl_cn;
                        }
                        last_cn = jl_cn;
@@ -1036691,7 +1036645,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        jl_cn->bh = cn->bh;
                        jl_cn->jlist = jl;
                        insert_journal_hash(journal->j_list_hash_table, jl_cn);
-@@ -4116,11 +4144,11 @@ static int do_journal_end(struct reiserf
+@@ -4116,11 +4144,11 @@
                        char *addr;
                        struct page *page;
                        tmp_bh =
@@ -1036706,7 +1036660,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                        set_buffer_uptodate(tmp_bh);
                        page = cn->bh->b_page;
                        addr = kmap(page);
-@@ -4134,12 +4162,13 @@ static int do_journal_end(struct reiserf
+@@ -4134,12 +4162,13 @@
                        clear_buffer_journaled(cn->bh);
                } else {
                        /* JDirty cleared sometime during transaction.  don't log this one */
@@ -1036723,7 +1036677,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                cn = next;
                cond_resched();
        }
-@@ -4149,7 +4178,9 @@ static int do_journal_end(struct reiserf
+@@ -4149,7 +4178,9 @@
         ** so we dirty/relse c_bh in flush_commit_list, with commit_left <= 1.
         */
  
@@ -1036734,7 +1036688,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        /* now it is safe to insert this transaction on the main list */
        list_add_tail(&jl->j_list, &journal->j_journal_list);
-@@ -4160,7 +4191,7 @@ static int do_journal_end(struct reiserf
+@@ -4160,7 +4191,7 @@
        old_start = journal->j_start;
        journal->j_start =
            (journal->j_start + journal->j_len +
@@ -1036743,7 +1036697,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
        atomic_set(&(journal->j_wcount), 0);
        journal->j_bcount = 0;
        journal->j_last = NULL;
-@@ -4175,7 +4206,7 @@ static int do_journal_end(struct reiserf
+@@ -4175,7 +4206,7 @@
        journal->j_len_alloc = 0;
        journal->j_next_full_flush = 0;
        journal->j_next_async_flush = 0;
@@ -1036752,7 +1036706,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        // make sure reiserfs_add_jh sees the new current_jl before we
        // write out the tails
-@@ -4204,14 +4235,14 @@ static int do_journal_end(struct reiserf
+@@ -4204,14 +4235,14 @@
         ** queue don't wait for this proc to flush journal lists and such.
         */
        if (flush) {
@@ -1036772,7 +1036726,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
         */
        first_jl:
        list_for_each_safe(entry, safe, &journal->j_journal_list) {
-@@ -4219,11 +4250,11 @@ static int do_journal_end(struct reiserf
+@@ -4219,11 +4250,11 @@
                if (journal->j_start <= temp_jl->j_start) {
                        if ((journal->j_start + journal->j_trans_max + 1) >=
                            temp_jl->j_start) {
@@ -1036786,7 +1036740,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                /* if we don't cross into the next transaction and we don't
                                 * wrap, there is no way we can overlap any later transactions
                                 * break now
-@@ -4232,11 +4263,11 @@ static int do_journal_end(struct reiserf
+@@ -4232,11 +4263,11 @@
                        }
                } else if ((journal->j_start +
                            journal->j_trans_max + 1) >
@@ -1036801,7 +1036755,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
                                goto first_jl;
                        } else {
                                /* we don't overlap anything from out start to the end of the
-@@ -4247,46 +4278,47 @@ static int do_journal_end(struct reiserf
+@@ -4247,46 +4278,47 @@
                        }
                }
        }
@@ -1036861,7 +1036815,7 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
  
        sb->s_flags |= MS_RDONLY;
        set_bit(J_ABORTED, &journal->j_state);
-@@ -4296,19 +4328,3 @@ static void __reiserfs_journal_abort_har
+@@ -4296,19 +4328,3 @@
  #endif
  }
  
@@ -1036881,10 +1036835,10 @@ diff -purN linux-2.6.27/fs/reiserfs/journal.c linux-2.6.27.19-5.1/fs/reiserfs/jo
 -{
 -      __reiserfs_journal_abort_soft(sb, errno);
 -}
-diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/lbalance.c
---- linux-2.6.27/fs/reiserfs/lbalance.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/lbalance.c 2009-03-25 16:11:37.000000000 +0000
-@@ -111,7 +111,7 @@ static void leaf_copy_dir_entries(struct
+diff -r 9608d5473017 fs/reiserfs/lbalance.c
+--- a/fs/reiserfs/lbalance.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/lbalance.c   Wed May 06 16:56:52 2009 +0100
+@@ -111,7 +111,7 @@
        item_num_in_dest =
            (last_first == FIRST_TO_LAST) ? (B_NR_ITEMS(dest) - 1) : 0;
  
@@ -1036893,7 +1036847,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                           (last_first ==
                            FIRST_TO_LAST) ? I_ENTRY_COUNT(B_N_PITEM_HEAD(dest,
                                                                          item_num_in_dest))
-@@ -119,8 +119,8 @@ static void leaf_copy_dir_entries(struct
+@@ -119,8 +119,8 @@
                           DEH_SIZE * copy_count + copy_records_len);
  }
  
@@ -1036904,7 +1036858,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
     (if last_first) or beginning (!last_first) of the DEST */
  /* returns 1 if anything was copied, else 0 */
  static int leaf_copy_boundary_item(struct buffer_info *dest_bi,
-@@ -168,10 +168,11 @@ static int leaf_copy_boundary_item(struc
+@@ -168,10 +168,11 @@
                        if (bytes_or_entries == ih_item_len(ih)
                            && is_indirect_le_ih(ih))
                                if (get_ih_free_space(ih))
@@ -1036920,7 +1036874,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                }
  #endif
  
-@@ -395,7 +396,7 @@ static void leaf_item_bottle(struct buff
+@@ -395,7 +396,7 @@
                else {
                        struct item_head n_ih;
  
@@ -1036929,7 +1036883,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                           part defined by 'cpy_bytes'; create new item header; change old item_header (????);
                           n_ih = new item_header;
                         */
-@@ -425,7 +426,7 @@ static void leaf_item_bottle(struct buff
+@@ -425,7 +426,7 @@
                else {
                        struct item_head n_ih;
  
@@ -1036938,7 +1036892,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                           part defined by 'cpy_bytes'; create new item header;
                           n_ih = new item_header;
                         */
-@@ -622,9 +623,8 @@ static void leaf_define_dest_src_infos(i
+@@ -622,9 +623,8 @@
                break;
  
        default:
@@ -1036950,7 +1036904,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
        }
        RFALSE(!src_bi->bi_bh || !dest_bi->bi_bh,
               "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly",
-@@ -674,9 +674,9 @@ int leaf_shift_left(struct tree_balance 
+@@ -674,9 +674,9 @@
  #ifdef CONFIG_REISERFS_CHECK
                        if (tb->tb_mode == M_PASTE || tb->tb_mode == M_INSERT) {
                                print_cur_tb("vs-10275");
@@ -1036963,7 +1036917,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                        }
  #endif
  
-@@ -724,7 +724,7 @@ int leaf_shift_right(struct tree_balance
+@@ -724,7 +724,7 @@
  static void leaf_delete_items_entirely(struct buffer_info *bi,
                                       int first, int del_num);
  /*  If del_bytes == -1, starting from position 'first' delete del_num items in whole in buffer CUR.
@@ -1036972,7 +1036926,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
      If last_first == 0. Starting from position 'first' delete del_num-1 items in whole. Delete part of body of
      the first item. Part defined by del_bytes. Don't delete first item header
      If last_first == 1. Starting from position 'first+1' delete del_num-1 items in whole. Delete part of body of
-@@ -783,7 +783,7 @@ void leaf_delete_items(struct buffer_inf
+@@ -783,7 +783,7 @@
                                /* len = body len of item */
                                len = ih_item_len(ih);
  
@@ -1036981,7 +1036935,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                           do not delete item header
                         */
                        leaf_cut_from_buffer(cur_bi, B_NR_ITEMS(bh) - 1,
-@@ -865,7 +865,7 @@ void leaf_insert_into_buf(struct buffer_
+@@ -865,7 +865,7 @@
        }
  }
  
@@ -1036990,7 +1036944,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
     When item is a directory, this only prepare space for new entries */
  void leaf_paste_in_buffer(struct buffer_info *bi, int affected_item_num,
                          int pos_in_item, int paste_size,
-@@ -889,9 +889,12 @@ void leaf_paste_in_buffer(struct buffer_
+@@ -889,9 +889,12 @@
  
  #ifdef CONFIG_REISERFS_CHECK
        if (zeros_number > paste_size) {
@@ -1037005,7 +1036959,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                               zeros_number, paste_size);
        }
  #endif                                /* CONFIG_REISERFS_CHECK */
-@@ -1019,7 +1022,7 @@ static int leaf_cut_entries(struct buffe
+@@ -1019,7 +1022,7 @@
  /*  when cut item is part of regular file
          pos_in_item - first byte that must be cut
          cut_size - number of bytes to be cut beginning from pos_in_item
@@ -1037014,7 +1036968,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
     when cut item is part of directory
          pos_in_item - number of first deleted entry
          cut_size - count of deleted entries
-@@ -1191,7 +1194,7 @@ static void leaf_delete_items_entirely(s
+@@ -1191,7 +1194,7 @@
  }
  
  /* paste new_entry_count entries (new_dehs, records) into position before to item_num-th item */
@@ -1037023,7 +1036977,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                        int item_num,
                        int before,
                        int new_entry_count,
-@@ -1203,6 +1206,7 @@ void leaf_paste_entries(struct buffer_he
+@@ -1203,6 +1206,7 @@
        struct reiserfs_de_head *deh;
        char *insert_point;
        int i, old_entry_num;
@@ -1037031,7 +1036985,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
  
        if (new_entry_count == 0)
                return;
-@@ -1271,7 +1275,7 @@ void leaf_paste_entries(struct buffer_he
+@@ -1271,7 +1275,7 @@
        /* change item key if necessary (when we paste before 0-th entry */
        if (!before) {
                set_le_ih_k_offset(ih, deh_offset(new_dehs));
@@ -1037040,7 +1036994,7 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                       &new_dehs->deh_offset, SHORT_KEY_SIZE);*/
        }
  #ifdef CONFIG_REISERFS_CHECK
-@@ -1287,13 +1291,17 @@ void leaf_paste_entries(struct buffer_he
+@@ -1287,13 +1291,17 @@
                        prev = (i != 0) ? deh_location(&(deh[i - 1])) : 0;
  
                        if (prev && prev <= deh_location(&(deh[i])))
@@ -1037064,10 +1037018,10 @@ diff -purN linux-2.6.27/fs/reiserfs/lbalance.c linux-2.6.27.19-5.1/fs/reiserfs/l
                }
        }
  #endif
-diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/namei.c
---- linux-2.6.27/fs/reiserfs/namei.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/namei.c    2009-03-25 16:11:37.000000000 +0000
-@@ -106,7 +106,7 @@ key of the first directory entry in it.
+diff -r 9608d5473017 fs/reiserfs/namei.c
+--- a/fs/reiserfs/namei.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/namei.c      Wed May 06 16:56:52 2009 +0100
+@@ -106,7 +106,7 @@
  This function first calls search_by_key, then, if item whose first
  entry matches is not found it looks for the entry inside directory
  item found by search_by_key. Fills the path to the entry, and to the
@@ -1037076,7 +1037030,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
  */
  
-@@ -120,8 +120,8 @@ int search_by_entry_key(struct super_blo
+@@ -120,8 +120,8 @@
        switch (retval) {
        case ITEM_NOT_FOUND:
                if (!PATH_LAST_POSITION(path)) {
@@ -1037087,7 +1037041,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                        pathrelse(path);
                        return IO_ERROR;
                }
-@@ -135,8 +135,7 @@ int search_by_entry_key(struct super_blo
+@@ -135,8 +135,7 @@
  
        default:
                pathrelse(path);
@@ -1037097,7 +1037051,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                return IO_ERROR;
        }
  
-@@ -146,10 +145,9 @@ int search_by_entry_key(struct super_blo
+@@ -146,10 +145,9 @@
        if (!is_direntry_le_ih(de->de_ih) ||
            COMP_SHORT_KEYS(&(de->de_ih->ih_key), key)) {
                print_block(de->de_bh, 0, -1, -1);
@@ -1037111,7 +1037065,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        }
  #endif                                /* CONFIG_REISERFS_CHECK */
  
-@@ -300,8 +298,7 @@ static int reiserfs_find_entry(struct in
+@@ -300,8 +298,7 @@
                    search_by_entry_key(dir->i_sb, &key_to_search,
                                        path_to_entry, de);
                if (retval == IO_ERROR) {
@@ -1037121,7 +1037075,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                        return IO_ERROR;
                }
  
-@@ -361,9 +358,10 @@ static struct dentry *reiserfs_lookup(st
+@@ -361,9 +358,10 @@
                        return ERR_PTR(-EACCES);
                }
  
@@ -1037135,7 +1037089,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        }
        reiserfs_write_unlock(dir->i_sb);
        if (retval == IO_ERROR) {
-@@ -373,7 +371,7 @@ static struct dentry *reiserfs_lookup(st
+@@ -373,7 +371,7 @@
        return d_splice_alias(inode, dentry);
  }
  
@@ -1037144,7 +1037098,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  ** looks up the dentry of the parent directory for child.
  ** taken from ext2_get_parent
  */
-@@ -412,7 +410,7 @@ struct dentry *reiserfs_get_parent(struc
+@@ -412,7 +410,7 @@
        return parent;
  }
  
@@ -1037153,7 +1037107,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
  insert definition of when hidden directories are used here -Hans
  
-@@ -493,10 +491,9 @@ static int reiserfs_add_entry(struct rei
+@@ -493,10 +491,9 @@
                }
  
                if (retval != NAME_FOUND) {
@@ -1037167,7 +1037121,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                }
  
                return -EEXIST;
-@@ -507,8 +504,9 @@ static int reiserfs_add_entry(struct rei
+@@ -507,8 +504,9 @@
                                MAX_GENERATION_NUMBER + 1);
        if (gen_number > MAX_GENERATION_NUMBER) {
                /* there is no free generation number */
@@ -1037179,7 +1037133,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                if (buffer != small_buf)
                        kfree(buffer);
                pathrelse(&path);
-@@ -524,10 +522,9 @@ static int reiserfs_add_entry(struct rei
+@@ -524,10 +522,9 @@
        if (gen_number != 0) {  /* we need to re-search for the insertion point */
                if (search_by_entry_key(dir->i_sb, &entry_key, &path, &de) !=
                    NAME_NOT_FOUND) {
@@ -1037193,7 +1037147,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
                        if (buffer != small_buf)
                                kfree(buffer);
-@@ -571,7 +568,7 @@ static int drop_new_inode(struct inode *
+@@ -571,7 +568,7 @@
        return 0;
  }
  
@@ -1037202,7 +1037156,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  ** DQUOT_INIT needs lots of credits so it's better to have it
  ** outside of a transaction, so we had to pull some bits of
  ** reiserfs_new_inode out into this func.
-@@ -610,20 +607,22 @@ static int reiserfs_create(struct inode 
+@@ -610,19 +607,21 @@
            2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) +
                 REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb));
        struct reiserfs_transaction_handle th;
@@ -1037224,14 +1037178,13 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
 +      }
 +      jbegin_count += retval;
        reiserfs_write_lock(dir->i_sb);
+-
 -      if (locked)
 -              reiserfs_write_lock_xattrs(dir->i_sb);
--
        retval = journal_begin(&th, dir->i_sb, jbegin_count);
        if (retval) {
-               drop_new_inode(inode);
-@@ -632,15 +631,10 @@ static int reiserfs_create(struct inode 
+@@ -632,14 +631,9 @@
  
        retval =
            reiserfs_new_inode(&th, dir, mode, NULL, 0 /*i_size */ , dentry,
@@ -1037239,16 +1037192,15 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
 +                             inode, &security);
        if (retval)
                goto out_failed;
+-
 -      if (locked) {
 -              reiserfs_write_unlock_xattrs(dir->i_sb);
 -              locked = 0;
 -      }
--
        inode->i_op = &reiserfs_file_inode_operations;
        inode->i_fop = &reiserfs_file_operations;
-       inode->i_mapping->a_ops = &reiserfs_address_space_operations;
-@@ -665,8 +659,6 @@ static int reiserfs_create(struct inode 
+@@ -665,8 +659,6 @@
        retval = journal_end(&th, dir->i_sb, jbegin_count);
  
        out_failed:
@@ -1037257,7 +1037209,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        reiserfs_write_unlock(dir->i_sb);
        return retval;
  }
-@@ -677,12 +669,12 @@ static int reiserfs_mknod(struct inode *
+@@ -677,12 +669,12 @@
        int retval;
        struct inode *inode;
        struct reiserfs_transaction_handle th;
@@ -1037271,7 +1037223,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
        if (!new_valid_dev(rdev))
                return -EINVAL;
-@@ -692,13 +684,15 @@ static int reiserfs_mknod(struct inode *
+@@ -692,12 +684,14 @@
        }
        new_inode_init(inode, dir, mode);
  
@@ -1037285,14 +1037237,13 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
 +      }
 +      jbegin_count += retval;
        reiserfs_write_lock(dir->i_sb);
+-
 -      if (locked)
 -              reiserfs_write_lock_xattrs(dir->i_sb);
--
        retval = journal_begin(&th, dir->i_sb, jbegin_count);
        if (retval) {
-               drop_new_inode(inode);
-@@ -707,16 +701,11 @@ static int reiserfs_mknod(struct inode *
+@@ -707,14 +701,9 @@
  
        retval =
            reiserfs_new_inode(&th, dir, mode, NULL, 0 /*i_size */ , dentry,
@@ -1037300,17 +1037251,15 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
 +                             inode, &security);
        if (retval) {
                goto out_failed;
-       }
+-      }
+-
 -      if (locked) {
 -              reiserfs_write_unlock_xattrs(dir->i_sb);
 -              locked = 0;
--      }
--
-       inode->i_op = &reiserfs_special_inode_operations;
-       init_special_inode(inode, inode->i_mode, rdev);
+       }
  
-@@ -744,8 +733,6 @@ static int reiserfs_mknod(struct inode *
+       inode->i_op = &reiserfs_special_inode_operations;
+@@ -744,8 +733,6 @@
        retval = journal_end(&th, dir->i_sb, jbegin_count);
  
        out_failed:
@@ -1037319,7 +1037268,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        reiserfs_write_unlock(dir->i_sb);
        return retval;
  }
-@@ -755,12 +742,12 @@ static int reiserfs_mkdir(struct inode *
+@@ -755,12 +742,12 @@
        int retval;
        struct inode *inode;
        struct reiserfs_transaction_handle th;
@@ -1037333,7 +1037282,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
  #ifdef DISPLACE_NEW_PACKING_LOCALITIES
        /* set flag that new packing locality created and new blocks for the content     * of that directory are not displaced yet */
-@@ -772,11 +759,14 @@ static int reiserfs_mkdir(struct inode *
+@@ -772,11 +759,14 @@
        }
        new_inode_init(inode, dir, mode);
  
@@ -1037352,7 +1037301,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
        retval = journal_begin(&th, dir->i_sb, jbegin_count);
        if (retval) {
-@@ -792,17 +782,12 @@ static int reiserfs_mkdir(struct inode *
+@@ -792,15 +782,10 @@
            retval = reiserfs_new_inode(&th, dir, mode, NULL /*symlink */ ,
                                        old_format_only(dir->i_sb) ?
                                        EMPTY_DIR_SIZE_V1 : EMPTY_DIR_SIZE,
@@ -1037361,17 +1037310,15 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        if (retval) {
                dir->i_nlink--;
                goto out_failed;
-       }
+-      }
+-
 -      if (locked) {
 -              reiserfs_write_unlock_xattrs(dir->i_sb);
 -              locked = 0;
--      }
--
-       reiserfs_update_inode_transaction(inode);
-       reiserfs_update_inode_transaction(dir);
+       }
  
-@@ -830,8 +815,6 @@ static int reiserfs_mkdir(struct inode *
+       reiserfs_update_inode_transaction(inode);
+@@ -830,8 +815,6 @@
        d_instantiate(dentry, inode);
        retval = journal_end(&th, dir->i_sb, jbegin_count);
        out_failed:
@@ -1037380,7 +1037327,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        reiserfs_write_unlock(dir->i_sb);
        return retval;
  }
-@@ -840,7 +823,7 @@ static inline int reiserfs_empty_dir(str
+@@ -840,7 +823,7 @@
  {
        /* we can cheat because an old format dir cannot have
         ** EMPTY_DIR_SIZE, and a new format dir cannot have
@@ -1037389,7 +1037336,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
         ** regardless of disk format version, the directory is empty.
         */
        if (inode->i_size != EMPTY_DIR_SIZE &&
-@@ -906,8 +889,9 @@ static int reiserfs_rmdir(struct inode *
+@@ -906,8 +889,9 @@
                goto end_rmdir;
  
        if (inode->i_nlink != 2 && inode->i_nlink != 1)
@@ -1037401,7 +1037348,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
        clear_nlink(inode);
        inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-@@ -983,10 +967,9 @@ static int reiserfs_unlink(struct inode 
+@@ -983,10 +967,9 @@
        }
  
        if (!inode->i_nlink) {
@@ -1037415,7 +1037362,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                inode->i_nlink = 1;
        }
  
-@@ -1040,6 +1023,7 @@ static int reiserfs_symlink(struct inode
+@@ -1040,6 +1023,7 @@
        char *name;
        int item_len;
        struct reiserfs_transaction_handle th;
@@ -1037423,21 +1037370,21 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        int mode = S_IFLNK | S_IRWXUGO;
        /* We need blocks for transaction + (user+group)*(quotas for new inode + update of quota for directory owner) */
        int jbegin_count =
-@@ -1052,6 +1036,13 @@ static int reiserfs_symlink(struct inode
+@@ -1051,6 +1035,13 @@
+               return -ENOMEM;
        }
        new_inode_init(inode, parent_dir, mode);
++
 +      retval = reiserfs_security_init(parent_dir, inode, &security);
 +      if (retval < 0) {
 +              drop_new_inode(inode);
 +              return retval;
 +      }
 +      jbegin_count += retval;
-+
        reiserfs_write_lock(parent_dir->i_sb);
        item_len = ROUND_UP(strlen(symname));
-       if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize)) {
-@@ -1069,8 +1060,6 @@ static int reiserfs_symlink(struct inode
+@@ -1069,8 +1060,6 @@
        memcpy(name, symname, strlen(symname));
        padd_item(name, item_len, strlen(symname));
  
@@ -1037446,7 +1037393,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        retval = journal_begin(&th, parent_dir->i_sb, jbegin_count);
        if (retval) {
                drop_new_inode(inode);
-@@ -1080,7 +1069,7 @@ static int reiserfs_symlink(struct inode
+@@ -1080,7 +1069,7 @@
  
        retval =
            reiserfs_new_inode(&th, parent_dir, mode, name, strlen(symname),
@@ -1037455,7 +1037402,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
        kfree(name);
        if (retval) {           /* reiserfs_new_inode iputs for us */
                goto out_failed;
-@@ -1174,7 +1163,7 @@ static int reiserfs_link(struct dentry *
+@@ -1174,7 +1163,7 @@
        return retval;
  }
  
@@ -1037464,7 +1037411,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  static int de_still_valid(const char *name, int len,
                          struct reiserfs_dir_entry *de)
  {
-@@ -1197,15 +1186,14 @@ static int entry_points_to_object(const 
+@@ -1197,15 +1186,14 @@
  
        if (inode) {
                if (!de_visible(de->de_deh + de->de_entry_num))
@@ -1037483,7 +1037430,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
        return 1;
  }
-@@ -1219,10 +1207,10 @@ static void set_ino_in_dir_entry(struct 
+@@ -1219,10 +1207,10 @@
        de->de_deh[de->de_entry_num].deh_objectid = key->k_objectid;
  }
  
@@ -1037496,7 +1037443,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
   */
  static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                           struct inode *new_dir, struct dentry *new_dentry)
-@@ -1276,7 +1264,7 @@ static int reiserfs_rename(struct inode 
+@@ -1276,7 +1264,7 @@
  
        old_inode_mode = old_inode->i_mode;
        if (S_ISDIR(old_inode_mode)) {
@@ -1037505,7 +1037452,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                // and that its new parent directory has not too many links
                // already
  
-@@ -1287,8 +1275,8 @@ static int reiserfs_rename(struct inode 
+@@ -1287,8 +1275,8 @@
                        }
                }
  
@@ -1037516,7 +1037463,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                 */
                dot_dot_de.de_gen_number_bit_string = NULL;
                retval =
-@@ -1319,8 +1307,8 @@ static int reiserfs_rename(struct inode 
+@@ -1319,8 +1307,8 @@
                               new_dentry->d_name.len, old_inode, 0);
        if (retval == -EEXIST) {
                if (!new_dentry_inode) {
@@ -1037527,7 +1037474,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                }
        } else if (retval) {
                int err = journal_end(&th, old_dir->i_sb, jbegin_count);
-@@ -1398,9 +1386,9 @@ static int reiserfs_rename(struct inode 
+@@ -1398,9 +1386,9 @@
                   this stuff, yes? Then, having
                   gathered everything into RAM we
                   should lock the buffers, yes?  -Hans */
@@ -1037540,7 +1037487,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                 ** issues -chris
                 */
                /* sanity checking before doing the rename - avoid races many
-@@ -1478,7 +1466,7 @@ static int reiserfs_rename(struct inode 
+@@ -1478,7 +1466,7 @@
        }
  
        if (S_ISDIR(old_inode_mode)) {
@@ -1037549,7 +1037496,7 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
                set_ino_in_dir_entry(&dot_dot_de, INODE_PKEY(new_dir));
                journal_mark_dirty(&th, new_dir->i_sb, dot_dot_de.de_bh);
  
-@@ -1500,8 +1488,8 @@ static int reiserfs_rename(struct inode 
+@@ -1500,8 +1488,8 @@
        if (reiserfs_cut_from_item
            (&th, &old_entry_path, &(old_de.de_entry_key), old_dir, NULL,
             0) < 0)
@@ -1037560,9 +1037507,9 @@ diff -purN linux-2.6.27/fs/reiserfs/namei.c linux-2.6.27.19-5.1/fs/reiserfs/name
  
        old_dir->i_size -= DEH_SIZE + old_de.de_entrylen;
  
-diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/objectid.c
---- linux-2.6.27/fs/reiserfs/objectid.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/objectid.c 2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/objectid.c
+--- a/fs/reiserfs/objectid.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/objectid.c   Wed May 06 16:56:52 2009 +0100
 @@ -18,8 +18,7 @@
  static void check_objectid_map(struct super_block *s, __le32 * map)
  {
@@ -1037573,7 +1037520,7 @@ diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/o
                               (long unsigned int)le32_to_cpu(map[0]));
  
        // FIXME: add something else here
-@@ -61,7 +60,7 @@ __u32 reiserfs_get_unused_objectid(struc
+@@ -61,7 +60,7 @@
        /* comment needed -Hans */
        unused_objectid = le32_to_cpu(map[1]);
        if (unused_objectid == U32_MAX) {
@@ -1037582,7 +1037529,7 @@ diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/o
                reiserfs_restore_prepared_buffer(s, SB_BUFFER_WITH_SB(s));
                return 0;
        }
-@@ -160,9 +159,8 @@ void reiserfs_release_objectid(struct re
+@@ -160,9 +159,8 @@
                i += 2;
        }
  
@@ -1037594,7 +1037541,7 @@ diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/o
  }
  
  int reiserfs_convert_objectid_map_v1(struct super_block *s)
-@@ -182,7 +180,7 @@ int reiserfs_convert_objectid_map_v1(str
+@@ -182,7 +180,7 @@
  
        if (cur_size > new_size) {
                /* mark everyone used that was listed as free at the end of the objectid
@@ -1037603,17 +1037550,16 @@ diff -purN linux-2.6.27/fs/reiserfs/objectid.c linux-2.6.27.19-5.1/fs/reiserfs/o
                 */
                objectid_map[new_size - 1] = objectid_map[cur_size - 1];
                set_sb_oid_cursize(disk_sb, new_size);
-diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/prints.c
---- linux-2.6.27/fs/reiserfs/prints.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/prints.c   2009-03-25 16:11:37.000000000 +0000
-@@ -157,19 +157,31 @@ static void sprintf_disk_child(char *buf
+diff -r 9608d5473017 fs/reiserfs/prints.c
+--- a/fs/reiserfs/prints.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/prints.c     Wed May 06 16:56:52 2009 +0100
+@@ -157,19 +157,31 @@
                dc_size(dc));
  }
  
 -static char *is_there_reiserfs_struct(char *fmt, int *what, int *skip)
 +static void sprintf_journal_list(char *buf, struct reiserfs_journal_list *jl)
- {
--      char *k = fmt;
++{
 +      sprintf(buf, "[j_start=%lu, j_state=%lu, j_len=%lu, j_nonzerolen=%d, "
 +                   "j_commit_left=%u, j_older_commits_done=%u, j_trans_id=%u, "
 +                   "j_timestamp=%ld, j_refcount=%d (%08x%08x%08x%08x%08x%08x)]",
@@ -1037625,12 +1037571,13 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
 +                   jl->j_magic1, jl->j_magic2, jl->j_magic3, jl->j_magic4,
 +                   jl->j_magic5, jl->j_magic6);
 +}
--      *skip = 0;
++
 +static char *is_there_reiserfs_struct(char *fmt, int *what)
-+{
-+      char *k = fmt;
+ {
+       char *k = fmt;
  
+-      *skip = 0;
+-
        while ((k = strchr(k, '%')) != NULL) {
                if (k[1] == 'k' || k[1] == 'K' || k[1] == 'h' || k[1] == 't' ||
 -                  k[1] == 'z' || k[1] == 'b' || k[1] == 'y' || k[1] == 'a') {
@@ -1037643,7 +1037590,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
                k++;
        }
        return k;
-@@ -181,30 +193,29 @@ static char *is_there_reiserfs_struct(ch
+@@ -181,29 +193,28 @@
     appropriative printk. With this reiserfs_warning you can use format
     specification for complex structures like you used to do with
     printfs for integers, doubles and pointers. For instance, to print
@@ -1037677,14 +1037624,13 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
                *k = 0;
  
                p += vsprintf(p, fmt1, args);
+-
 -              for (i = 0; i < skip; i++)
 -                      j = va_arg(args, int);
--
                switch (what) {
                case 'k':
-                       sprintf_le_key(p, va_arg(args, struct reiserfs_key *));
-@@ -237,21 +248,27 @@ static void prepare_error_buf(const char
+@@ -237,21 +248,27 @@
                                        va_arg(args,
                                               struct reiserfs_de_head *));
                        break;
@@ -1037716,7 +1037662,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
     %z to print block head (arg must be struct buffer_head *
     %b to print buffer_head
  */
-@@ -264,14 +281,17 @@ static void prepare_error_buf(const char
+@@ -264,14 +281,17 @@
      va_end( args );\
  }
  
@@ -1037738,7 +1037684,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  }
  
  /* No newline.. reiserfs_info calls can be followed by printk's */
-@@ -279,10 +299,10 @@ void reiserfs_info(struct super_block *s
+@@ -279,10 +299,10 @@
  {
        do_reiserfs_warning(fmt);
        if (sb)
@@ -1037752,7 +1037698,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  }
  
  /* No newline.. reiserfs_printk calls can be followed by printk's */
-@@ -297,10 +317,10 @@ void reiserfs_debug(struct super_block *
+@@ -297,10 +317,10 @@
  #ifdef CONFIG_REISERFS_CHECK
        do_reiserfs_warning(fmt);
        if (s)
@@ -1037766,7 +1037712,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  #endif
  }
  
-@@ -314,17 +334,17 @@ void reiserfs_debug(struct super_block *
+@@ -314,17 +334,17 @@
      maintainer-errorid.  Don't bother with reusing errorids, there are
      lots of numbers out there.
  
@@ -1037788,7 +1037734,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  
      Numbering scheme for panic used by Vladimir and Anatoly( Hans completely ignores this scheme, and considers it
      pointless complexity):
-@@ -353,14 +373,46 @@ void reiserfs_debug(struct super_block *
+@@ -353,14 +373,46 @@
  extern struct tree_balance *cur_tb;
  #endif
  
@@ -1037838,7 +1037784,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  }
  
  void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
-@@ -368,18 +420,18 @@ void reiserfs_abort(struct super_block *
+@@ -368,18 +420,18 @@
        do_reiserfs_warning(fmt);
  
        if (reiserfs_error_panic(sb)) {
@@ -1037863,7 +1037809,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  }
  
  /* this prints internal nodes (4 keys/items in line) (dc_number,
-@@ -681,12 +733,10 @@ static void check_leaf_block_head(struct
+@@ -681,12 +733,10 @@
        blkh = B_BLK_HEAD(bh);
        nr = blkh_nr_item(blkh);
        if (nr > (bh->b_size - BLKH_SIZE) / IH_SIZE)
@@ -1037878,7 +1037824,7 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
                               bh);
  
  }
-@@ -697,21 +747,15 @@ static void check_internal_block_head(st
+@@ -697,21 +747,15 @@
  
        blkh = B_BLK_HEAD(bh);
        if (!(B_LEVEL(bh) > DISK_LEAF_NODE_LEVEL && B_LEVEL(bh) <= MAX_HEIGHT))
@@ -1037903,10 +1037849,10 @@ diff -purN linux-2.6.27/fs/reiserfs/prints.c linux-2.6.27.19-5.1/fs/reiserfs/pri
  
  }
  
-diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/procfs.c
---- linux-2.6.27/fs/reiserfs/procfs.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/procfs.c   2009-03-25 16:11:37.000000000 +0000
-@@ -323,7 +323,7 @@ static int show_journal(struct seq_file 
+diff -r 9608d5473017 fs/reiserfs/procfs.c
+--- a/fs/reiserfs/procfs.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/procfs.c     Wed May 06 16:56:52 2009 +0100
+@@ -323,7 +323,7 @@
                   /* incore fields */
                   "j_1st_reserved_block: \t%i\n"
                   "j_state: \t%li\n"
@@ -1037915,7 +1037861,7 @@ diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/pro
                   "j_mount_id: \t%lu\n"
                   "j_start: \t%lu\n"
                   "j_len: \t%lu\n"
-@@ -331,7 +331,7 @@ static int show_journal(struct seq_file 
+@@ -331,7 +331,7 @@
                   "j_wcount: \t%i\n"
                   "j_bcount: \t%lu\n"
                   "j_first_unflushed_offset: \t%lu\n"
@@ -1037924,7 +1037870,7 @@ diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/pro
                   "j_trans_start_time: \t%li\n"
                   "j_list_bitmap_index: \t%i\n"
                   "j_must_wait: \t%i\n"
-@@ -505,7 +505,7 @@ int reiserfs_proc_info_init(struct super
+@@ -505,7 +505,7 @@
                add_file(sb, "journal", show_journal);
                return 0;
        }
@@ -1037933,7 +1037879,7 @@ diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/pro
                         proc_info_root_name, b);
        return 1;
  }
-@@ -561,8 +561,7 @@ int reiserfs_proc_info_global_init(void)
+@@ -561,8 +561,7 @@
                if (proc_info_root) {
                        proc_info_root->owner = THIS_MODULE;
                } else {
@@ -1037943,7 +1037889,7 @@ diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/pro
                                         proc_info_root_name);
                        return 1;
                }
-@@ -637,7 +636,7 @@ int reiserfs_global_version_in_proc(char
+@@ -637,7 +636,7 @@
   *
   */
  
@@ -1037952,9 +1037898,9 @@ diff -purN linux-2.6.27/fs/reiserfs/procfs.c linux-2.6.27.19-5.1/fs/reiserfs/pro
   * Make Linus happy.
   * Local variables:
   * c-indentation-style: "K&R"
-diff -purN linux-2.6.27/fs/reiserfs/resize.c linux-2.6.27.19-5.1/fs/reiserfs/resize.c
---- linux-2.6.27/fs/reiserfs/resize.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/resize.c   2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/resize.c
+--- a/fs/reiserfs/resize.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/resize.c     Wed May 06 16:56:52 2009 +0100
 @@ -1,8 +1,8 @@
 -/* 
 +/*
@@ -1037966,7 +1037912,7 @@ diff -purN linux-2.6.27/fs/reiserfs/resize.c linux-2.6.27.19-5.1/fs/reiserfs/res
   * Written by Alexander Zarochentcev.
   *
   * The kernel part of the (on-line) reiserfs resizer.
-@@ -101,7 +101,7 @@ int reiserfs_resize(struct super_block *
+@@ -101,7 +101,7 @@
                        memcpy(jbitmap[i].bitmaps, jb->bitmaps, copy_size);
  
                        /* just in case vfree schedules on us, copy the new
@@ -1037975,9 +1037921,9 @@ diff -purN linux-2.6.27/fs/reiserfs/resize.c linux-2.6.27.19-5.1/fs/reiserfs/res
                         ** old one
                         */
                        node_tmp = jb->bitmaps;
-diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stree.c
---- linux-2.6.27/fs/reiserfs/stree.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/stree.c    2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/stree.c
+--- a/fs/reiserfs/stree.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/stree.c      Wed May 06 16:56:52 2009 +0100
 @@ -23,7 +23,6 @@
   * get_rkey
   * key_in_buffer
@@ -1038023,7 +1037969,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
     0 if key1 == key2
     1 if key1 > key2 */
  inline int comp_short_keys(const struct reiserfs_key *le_key,
-@@ -136,15 +135,15 @@ static inline int comp_keys(const struct
+@@ -136,15 +135,15 @@
  inline int comp_short_le_keys(const struct reiserfs_key *key1,
                              const struct reiserfs_key *key2)
  {
@@ -1038046,7 +1037992,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        return 1;
        }
        return 0;
-@@ -175,52 +174,51 @@ inline int comp_le_keys(const struct rei
+@@ -175,52 +174,51 @@
   *  Binary search toolkit function                                        *
   *  Search for an item in the array by the item key                       *
   *  Returns:    1 if found,  0 if not found;                              *
@@ -1038126,7 +1038072,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
        return ITEM_NOT_FOUND;
  }
  
-@@ -243,90 +241,88 @@ static const struct reiserfs_key MAX_KEY
+@@ -243,90 +241,88 @@
     of the path, and going upwards.  We must check the path's validity at each step.  If the key is not in
     the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this
     case we return a special key, either MIN_KEY or MAX_KEY. */
@@ -1038257,7 +1038203,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                return &MAX_KEY;
        return &MIN_KEY;
  }
-@@ -336,60 +332,29 @@ inline const struct reiserfs_key *get_rk
+@@ -336,58 +332,27 @@
     the path.  These delimiting keys are stored at least one level above that buffer in the tree. If the
     buffer is the first or last node in the tree order then one of the delimiting keys may be absent, and in
     this case get_lkey and get_rkey return a special key which is MIN_KEY or MAX_KEY. */
@@ -1038293,8 +1038239,8 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
 +              /* key must be less than right delimitiing key */
                return 0;
        return 1;
- }
+-}
+-
 -inline void decrement_bcount(struct buffer_head *p_s_bh)
 -{
 -      if (p_s_bh) {
@@ -1038324,12 +1038270,10 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
 -              decrement_bcount(bh);
 -      }
 -      p_s_search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET;
--}
--
+ }
  int reiserfs_check_path(struct treepath *p)
- {
-       RFALSE(p->path_length != ILLEGAL_PATH_ELEMENT_OFFSET,
-@@ -397,40 +362,38 @@ int reiserfs_check_path(struct treepath 
+@@ -397,40 +362,38 @@
        return 0;
  }
  
@@ -1038390,7 +1038334,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  }
  
  static int is_leaf(char *buf, int blocksize, struct buffer_head *bh)
-@@ -444,23 +407,24 @@ static int is_leaf(char *buf, int blocks
+@@ -444,23 +407,24 @@
  
        blkh = (struct block_head *)buf;
        if (blkh_level(blkh) != DISK_LEAF_NODE_LEVEL) {
@@ -1038420,7 +1038364,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                return 0;
        }
        // FIXME: it is_leaf will hit performance too much - we may have
-@@ -471,29 +435,29 @@ static int is_leaf(char *buf, int blocks
+@@ -471,29 +435,29 @@
        prev_location = blocksize;
        for (i = 0; i < nr; i++, ih++) {
                if (le_ih_k_type(ih) == TYPE_ANY) {
@@ -1038459,7 +1038403,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        return 0;
                }
                prev_location = ih_location(ih);
-@@ -514,24 +478,23 @@ static int is_internal(char *buf, int bl
+@@ -514,24 +478,23 @@
        nr = blkh_level(blkh);
        if (nr <= DISK_LEAF_NODE_LEVEL || nr > MAX_HEIGHT) {
                /* this level is not possible for internal nodes */
@@ -1038490,7 +1038434,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                return 0;
        }
        // one may imagine much more checks
-@@ -543,8 +506,8 @@ static int is_internal(char *buf, int bl
+@@ -543,8 +506,8 @@
  static int is_tree_node(struct buffer_head *bh, int level)
  {
        if (B_LEVEL(bh) != level) {
@@ -1038501,7 +1038445,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                 B_LEVEL(bh), level);
                return 0;
        }
-@@ -580,10 +543,10 @@ static void search_by_key_reada(struct s
+@@ -580,10 +543,10 @@
  /**************************************************************************
   * Algorithm   SearchByKey                                                *
   *             look for item in the Disk S+Tree by its key                *
@@ -1038515,7 +1038459,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
   **************************************************************************/
  
  /* This function fills up the path from the root to the leaf as it
-@@ -600,22 +563,22 @@ static void search_by_key_reada(struct s
+@@ -600,22 +563,22 @@
     correctness of the top of the path but need not be checked for the
     correctness of the bottom of the path */
  /* The function is NOT SCHEDULE-SAFE! */
@@ -1038545,7 +1038489,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
        int right_neighbor_of_leaf_node;
        int fs_gen;
        struct buffer_head *reada_bh[SEARCH_BY_KEY_READA];
-@@ -623,80 +586,79 @@ int search_by_key(struct super_block *p_
+@@ -623,80 +586,79 @@
        int reada_count = 0;
  
  #ifdef CONFIG_REISERFS_CHECK
@@ -1038659,7 +1038603,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        expected_level = -1;
                        right_neighbor_of_leaf_node = 0;
  
-@@ -704,53 +666,53 @@ int search_by_key(struct super_block *p_
+@@ -704,53 +666,53 @@
                        continue;
                }
  
@@ -1038735,7 +1038679,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
                /* if item was not found we choose the position which is to
                   the left of the found item. This requires no code,
-@@ -759,24 +721,24 @@ int search_by_key(struct super_block *p_
+@@ -759,24 +721,24 @@
                /* So we have chosen a position in the current node which is
                   an internal node.  Now we calculate child block number by
                   position in the node. */
@@ -1038769,7 +1038713,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                        pos--;
                                else
                                        pos++;
-@@ -784,9 +746,9 @@ int search_by_key(struct super_block *p_
+@@ -784,9 +746,9 @@
                                /*
                                 * check to make sure we're in the same object
                                 */
@@ -1038781,7 +1038725,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                        break;
                                }
                        }
-@@ -795,11 +757,11 @@ int search_by_key(struct super_block *p_
+@@ -795,11 +757,11 @@
  }
  
  /* Form the path to an item and position in this item which contains
@@ -1038796,7 +1038740,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
     entry more than the entry with maximal key which is less than the
     sought key.
  
-@@ -810,48 +772,48 @@ int search_by_key(struct super_block *p_
+@@ -810,48 +772,48 @@
     units of directory entries.  */
  
  /* The function is NOT SCHEDULE-SAFE! */
@@ -1038857,7 +1038801,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
        if (comp_short_keys(&(p_le_ih->ih_key), p_cpu_key)) {
                return FILE_NOT_FOUND;
-@@ -863,10 +825,10 @@ int search_for_position_by_key(struct su
+@@ -863,10 +825,10 @@
  
        /* Needed byte is contained in the item pointed to by the path. */
        if (item_offset <= offset &&
@@ -1038871,7 +1038815,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                }
                return POSITION_FOUND;
        }
-@@ -874,30 +836,30 @@ int search_for_position_by_key(struct su
+@@ -874,30 +836,30 @@
        /* Needed byte is not contained in the item pointed to by the
           path. Set pos_in_item out of the item. */
        if (is_indirect_le_ih(p_le_ih))
@@ -1038909,7 +1038853,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
        return memcmp(stored_ih, ih, IH_SIZE);
  }
  
-@@ -924,9 +886,9 @@ static inline int prepare_for_direct_ite
+@@ -924,9 +886,9 @@
        }
        // new file gets truncated
        if (get_inode_item_key_version(inode) == KEY_FORMAT_3_6) {
@@ -1038921,7 +1038865,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                if (round_len < le_ih_k_offset(le_ih)) {
                        *cut_size = -(IH_SIZE + ih_item_len(le_ih));
                        return M_DELETE;        /* Delete this item. */
-@@ -986,96 +948,95 @@ static inline int prepare_for_direntry_i
+@@ -986,96 +948,95 @@
      In case of file truncate calculate whether this item must be deleted/truncated or last
      unformatted node of this item will be converted to a direct item.
      This function returns a determination of what balance mode the calling function should employ. */
@@ -1039046,7 +1038990,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        result = M_DELETE;
                        break;
                    }
-@@ -1083,12 +1044,12 @@ static char prepare_for_delete_or_cut(st
+@@ -1083,12 +1044,12 @@
                /* a trick.  If the buffer has been logged, this will do nothing.  If
                ** we've broken the loop without logging it, it will restore the
                ** buffer */
@@ -1039063,7 +1039007,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                /* Nothing were cut. maybe convert last unformatted node to the
                 * direct item? */
                result = M_CONVERT;
-@@ -1098,45 +1059,45 @@ static char prepare_for_delete_or_cut(st
+@@ -1098,45 +1059,45 @@
  }
  
  /* Calculate number of bytes which will be deleted or cut during balance */
@@ -1039132,7 +1039076,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  }
  
  void padd_item(char *item, int total_length, int length)
-@@ -1175,73 +1136,77 @@ char head2type(struct item_head *ih)
+@@ -1175,73 +1136,77 @@
  }
  #endif
  
@@ -1039244,7 +1039188,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
        quota_cut_bytes = ih_item_len(q_ih);
  
        /* hack so the quota code doesn't have to guess if the file
-@@ -1250,15 +1215,15 @@ int reiserfs_delete_item(struct reiserfs
+@@ -1250,15 +1215,15 @@
         ** split into multiple items, and we only want to decrement for
         ** the unfm node once
         */
@@ -1039264,7 +1039208,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                int off;
                char *data;
  
-@@ -1276,31 +1241,31 @@ int reiserfs_delete_item(struct reiserfs
+@@ -1276,31 +1241,31 @@
                 ** The unformatted node must be dirtied later on.  We can't be
                 ** sure here if the entire tail has been deleted yet.
                 **
@@ -1039305,7 +1039249,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  }
  
  /* Summary Of Mechanisms For Handling Collisions Between Processes:
-@@ -1338,10 +1303,9 @@ void reiserfs_delete_solid_item(struct r
+@@ -1338,10 +1303,9 @@
        while (1) {
                retval = search_item(th->t_super, &cpu_key, &path);
                if (retval == IO_ERROR) {
@@ -1039319,7 +1039263,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        break;
                }
                if (retval != ITEM_FOUND) {
-@@ -1355,9 +1319,8 @@ void reiserfs_delete_solid_item(struct r
+@@ -1355,9 +1319,8 @@
                             GET_GENERATION_NUMBER(le_key_k_offset
                                                   (le_key_version(key),
                                                    key)) == 1))
@@ -1039331,7 +1039275,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                        break;
                }
                if (!tb_init) {
-@@ -1389,8 +1352,7 @@ void reiserfs_delete_solid_item(struct r
+@@ -1389,8 +1352,7 @@
                        break;
                }
                // IO_ERROR, NO_DISK_SPACE, etc
@@ -1039341,7 +1039285,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                 "could not delete %K due to fix_nodes failure",
                                 &cpu_key);
                unfix_nodes(&tb);
-@@ -1462,36 +1424,37 @@ static void unmap_buffers(struct page *p
+@@ -1462,36 +1424,37 @@
  }
  
  static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th,
@@ -1039397,7 +1039341,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  }
  
  /* we did indirect_to_direct conversion. And we have inserted direct
-@@ -1515,8 +1478,8 @@ static void indirect_to_direct_roll_back
+@@ -1515,8 +1478,8 @@
                /* look for the last byte of the tail */
                if (search_for_position_by_key(inode->i_sb, &tail_key, path) ==
                    POSITION_NOT_FOUND)
@@ -1039408,7 +1039352,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                RFALSE(path->pos_in_item !=
                       ih_item_len(PATH_PITEM_HEAD(path)) - 1,
                       "vs-5616: appended bytes found");
-@@ -1533,38 +1496,39 @@ static void indirect_to_direct_roll_back
+@@ -1533,38 +1496,39 @@
                set_cpu_key_k_offset(&tail_key,
                                     cpu_key_k_offset(&tail_key) - removed);
        }
@@ -1039461,7 +1039405,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
        /* Repeat this loop until we either cut the item without needing
           to balance, or we fix_nodes without schedule occurring */
-@@ -1574,144 +1538,142 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1574,144 +1538,142 @@
                   free unformatted nodes which are pointed to by the cut
                   pointers. */
  
@@ -1039674,7 +1039618,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                       le_ih, s_cut_balance.insert_size[0]);
                }
                /* it would be useful to make sure, that right neighboring
-@@ -1719,23 +1681,23 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1719,23 +1681,23 @@
        }
  #endif
  
@@ -1039705,7 +1039649,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  }
  
  static void truncate_directory(struct reiserfs_transaction_handle *th,
-@@ -1743,8 +1705,7 @@ static void truncate_directory(struct re
+@@ -1743,8 +1705,7 @@
  {
        BUG_ON(!th->t_trans_id);
        if (inode->i_nlink)
@@ -1039715,7 +1039659,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
        set_le_key_k_offset(KEY_FORMAT_3_5, INODE_PKEY(inode), DOT_OFFSET);
        set_le_key_k_type(KEY_FORMAT_3_5, INODE_PKEY(inode), TYPE_DIRENTRY);
-@@ -1756,8 +1717,8 @@ static void truncate_directory(struct re
+@@ -1756,8 +1717,8 @@
  
  /* Truncate file to the new size. Note, this must be called with a transaction
     already started */
@@ -1039726,7 +1039670,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                         struct page *page,     /* up to date for last block */
                         int update_timestamps  /* when it is called by
                                                   file_release to convert
-@@ -1768,47 +1729,45 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1768,47 +1729,45 @@
        INITIALIZE_PATH(s_search_path); /* Path to the current object item. */
        struct item_head *p_le_ih;      /* Pointer to an item header. */
        struct cpu_key s_item_key;      /* Key to search for a previous file item. */
@@ -1039790,7 +1039734,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
                err = -EIO;
                goto out;
-@@ -1819,56 +1778,56 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1819,56 +1778,56 @@
        /* Get real file size (total length of all file items) */
        p_le_ih = PATH_PITEM_HEAD(&s_search_path);
        if (is_statdata_le_ih(p_le_ih))
@@ -1039863,7 +1039807,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                 ** many more blocks than a transaction can hold.  So, we do a polite
                 ** journal end here, and if the transaction needs ending, we make
                 ** sure the file is consistent before ending the current trans
-@@ -1877,37 +1836,38 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1877,37 +1836,38 @@
                if (journal_transaction_should_end(th, 0) ||
                    reiserfs_transaction_free_space(th) <= JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD) {
                        int orig_len_alloc = th->t_blocks_allocated;
@@ -1039915,7 +1039859,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  
        out:
        pathrelse(&s_search_path);
-@@ -1917,7 +1877,7 @@ int reiserfs_do_truncate(struct reiserfs
+@@ -1917,7 +1877,7 @@
  #ifdef CONFIG_REISERFS_CHECK
  // this makes sure, that we __append__, not overwrite or add holes
  static void check_research_for_paste(struct treepath *path,
@@ -1039924,7 +1039868,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  {
        struct item_head *found_ih = get_ih(path);
  
-@@ -1925,36 +1885,36 @@ static void check_research_for_paste(str
+@@ -1925,36 +1885,36 @@
                if (le_ih_k_offset(found_ih) +
                    op_bytes_number(found_ih,
                                    get_last_bh(path)->b_size) !=
@@ -1039975,7 +1039919,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  {                             /* Size of pasted bytes.             */
        struct tree_balance s_paste_balance;
        int retval;
-@@ -1967,18 +1927,18 @@ int reiserfs_paste_into_item(struct reis
+@@ -1967,18 +1927,18 @@
  #ifdef REISERQUOTA_DEBUG
        reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE,
                       "reiserquota paste_into_item(): allocating %u id=%u type=%c",
@@ -1040001,7 +1039945,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  #endif
  
        /* DQUOT_* can schedule, must check before the fix_nodes */
-@@ -1988,33 +1948,33 @@ int reiserfs_paste_into_item(struct reis
+@@ -1988,33 +1948,33 @@
  
        while ((retval =
                fix_nodes(M_PASTE, &s_paste_balance, NULL,
@@ -1040043,7 +1039987,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                return 0;
        }
        retval = (retval == NO_DISK_SPACE) ? -ENOSPC : -EIO;
-@@ -2024,18 +1984,24 @@ int reiserfs_paste_into_item(struct reis
+@@ -2024,18 +1984,24 @@
  #ifdef REISERQUOTA_DEBUG
        reiserfs_debug(inode->i_sb, REISERFS_DEBUG_CODE,
                       "reiserquota paste_into_item(): freeing %u id=%u type=%c",
@@ -1040076,7 +1040020,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
        struct tree_balance s_ins_balance;
        int retval;
        int fs_gen = 0;
-@@ -2045,28 +2011,27 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2045,28 +2011,27 @@
  
        if (inode) {            /* Do we count quotas for item? */
                fs_gen = get_generation(inode->i_sb);
@@ -1040111,7 +1040055,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  #ifdef DISPLACE_NEW_PACKING_LOCALITIES
        s_ins_balance.key = key->on_disk_key;
  #endif
-@@ -2076,19 +2041,18 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2076,19 +2041,18 @@
        }
  
        while ((retval =
@@ -1040135,7 +1040079,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                                         "key %K already exists in the tree",
                                         key);
                        retval = -EEXIST;
-@@ -2098,7 +2062,7 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2098,7 +2062,7 @@
  
        /* make balancing after all resources will be collected at a time */
        if (retval == CARRY_ON) {
@@ -1040144,7 +1040088,7 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
                return 0;
        }
  
-@@ -2109,7 +2073,7 @@ int reiserfs_insert_item(struct reiserfs
+@@ -2109,7 +2073,7 @@
  #ifdef REISERQUOTA_DEBUG
        reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
                       "reiserquota insert_item(): freeing %u id=%u type=%c",
@@ -1040153,10 +1040097,10 @@ diff -purN linux-2.6.27/fs/reiserfs/stree.c linux-2.6.27.19-5.1/fs/reiserfs/stre
  #endif
        if (inode)
                DQUOT_FREE_SPACE_NODIRTY(inode, quota_bytes);
-diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/super.c
---- linux-2.6.27/fs/reiserfs/super.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/super.c    2009-03-25 16:11:37.000000000 +0000
-@@ -181,9 +181,9 @@ static int finish_unfinished(struct supe
+diff -r 9608d5473017 fs/reiserfs/super.c
+--- a/fs/reiserfs/super.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/super.c      Wed May 06 16:56:52 2009 +0100
+@@ -181,9 +181,9 @@
                if (REISERFS_SB(s)->s_qf_names[i]) {
                        int ret = reiserfs_quota_on_mount(s, i);
                        if (ret < 0)
@@ -1040169,7 +1040113,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                }
        }
  #endif
-@@ -193,17 +193,16 @@ static int finish_unfinished(struct supe
+@@ -193,17 +193,16 @@
        while (!retval) {
                retval = search_item(s, &max_cpu_key, &path);
                if (retval != ITEM_NOT_FOUND) {
@@ -1040191,7 +1040135,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        break;
                }
                item_pos--;
-@@ -233,8 +232,7 @@ static int finish_unfinished(struct supe
+@@ -233,8 +232,7 @@
                if (!inode) {
                        /* the unlink almost completed, it just did not manage to remove
                           "save" link and release objectid */
@@ -1040201,7 +1040145,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         &obj_key);
                        retval = remove_save_link_only(s, &save_link_key, 1);
                        continue;
-@@ -242,8 +240,8 @@ static int finish_unfinished(struct supe
+@@ -242,8 +240,8 @@
  
                if (!truncate && inode->i_nlink) {
                        /* file is not unlinked */
@@ -1040212,7 +1040156,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         &obj_key);
                        retval = remove_save_link_only(s, &save_link_key, 0);
                        continue;
-@@ -255,8 +253,9 @@ static int finish_unfinished(struct supe
+@@ -255,8 +253,9 @@
                           The only imaginable way is to execute unfinished truncate request
                           then boot into old kernel, remove the file and create dir with
                           the same key. */
@@ -1040224,7 +1040168,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         INODE_PKEY(inode));
                        retval = remove_save_link_only(s, &save_link_key, 0);
                        truncate = 0;
-@@ -286,9 +285,10 @@ static int finish_unfinished(struct supe
+@@ -286,9 +285,10 @@
                                /* removal gets completed in iput */
                                retval = 0;
                        } else {
@@ -1040238,7 +1040182,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                retval = remove_save_link_only(s,
                                                        &save_link_key, 0);
                        }
-@@ -358,8 +358,9 @@ void add_save_link(struct reiserfs_trans
+@@ -358,8 +358,9 @@
        } else {
                /* truncate */
                if (S_ISDIR(inode->i_mode))
@@ -1040250,7 +1040194,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         INODE_PKEY(inode));
                set_cpu_key_k_offset(&key, 1);
                set_cpu_key_k_type(&key, TYPE_INDIRECT);
-@@ -374,9 +375,9 @@ void add_save_link(struct reiserfs_trans
+@@ -374,9 +375,9 @@
        retval = search_item(inode->i_sb, &key, &path);
        if (retval != ITEM_NOT_FOUND) {
                if (retval != -ENOSPC)
@@ -1040263,7 +1040207,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                pathrelse(&path);
                return;
        }
-@@ -389,9 +390,8 @@ void add_save_link(struct reiserfs_trans
+@@ -389,9 +390,8 @@
            reiserfs_insert_item(th, &path, &key, &ih, NULL, (char *)&link);
        if (retval) {
                if (retval != -ENOSPC)
@@ -1040275,7 +1040219,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
        } else {
                if (truncate)
                        REISERFS_I(inode)->i_flags |=
-@@ -490,8 +490,7 @@ static void reiserfs_put_super(struct su
+@@ -490,8 +490,7 @@
        print_statistics(s);
  
        if (REISERFS_SB(s)->reserved_blocks != 0) {
@@ -1040285,7 +1040229,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 REISERFS_SB(s)->reserved_blocks);
        }
  
-@@ -557,8 +556,8 @@ static void reiserfs_dirty_inode(struct 
+@@ -557,8 +556,8 @@
  
        int err = 0;
        if (inode->i_sb->s_flags & MS_RDONLY) {
@@ -1040296,7 +1040240,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 inode->i_ino);
                return;
        }
-@@ -755,7 +754,7 @@ static int reiserfs_getopt(struct super_
+@@ -755,7 +754,7 @@
                           char **opt_arg, unsigned long *bit_flags)
  {
        char *p;
@@ -1040305,7 +1040249,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
           ^   ^  ^
           |   |  +-- option_end
           |   +-- arg_start
-@@ -790,13 +789,15 @@ static int reiserfs_getopt(struct super_
+@@ -790,13 +789,15 @@
                        if (bit_flags) {
                                if (opt->clrmask ==
                                    (1 << REISERFS_UNSUPPORTED_OPT))
@@ -1040323,7 +1040267,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                                         p);
                                else
                                        *bit_flags |= opt->setmask;
-@@ -805,7 +806,8 @@ static int reiserfs_getopt(struct super_
+@@ -805,7 +806,8 @@
                }
        }
        if (!opt->option_name) {
@@ -1040333,7 +1040277,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                return -1;
        }
  
-@@ -813,8 +815,9 @@ static int reiserfs_getopt(struct super_
+@@ -813,8 +815,9 @@
        switch (*p) {
        case '=':
                if (!opt->arg_required) {
@@ -1040345,7 +1040289,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         opt->option_name);
                        return -1;
                }
-@@ -822,14 +825,15 @@ static int reiserfs_getopt(struct super_
+@@ -822,14 +825,15 @@
  
        case 0:
                if (opt->arg_required) {
@@ -1040365,7 +1040309,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 opt->option_name);
                return -1;
        }
-@@ -841,7 +845,8 @@ static int reiserfs_getopt(struct super_
+@@ -841,7 +845,8 @@
            && !(opt->arg_required & (1 << REISERFS_OPT_ALLOWEMPTY))
            && !strlen(p)) {
                /* this catches "option=," if not allowed */
@@ -1040375,7 +1040319,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 opt->option_name);
                return -1;
        }
-@@ -863,7 +868,8 @@ static int reiserfs_getopt(struct super_
+@@ -863,7 +868,8 @@
                }
        }
  
@@ -1040385,7 +1040329,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                         opt->option_name);
        return -1;
  }
-@@ -953,9 +959,9 @@ static int reiserfs_parse_options(struct
+@@ -953,9 +959,9 @@
                                *blocks = simple_strtoul(arg, &p, 0);
                                if (*p != '\0') {
                                        /* NNN does not look like a number */
@@ -1040398,7 +1040342,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                        return 0;
                                }
                        }
-@@ -966,8 +972,8 @@ static int reiserfs_parse_options(struct
+@@ -966,8 +972,8 @@
                        unsigned long val = simple_strtoul(arg, &p, 0);
                        /* commit=NNN (time in seconds) */
                        if (*p != '\0' || val >= (unsigned int)-1) {
@@ -1040409,7 +1040353,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                                 arg);
                                return 0;
                        }
-@@ -975,16 +981,18 @@ static int reiserfs_parse_options(struct
+@@ -975,16 +981,18 @@
                }
  
                if (c == 'w') {
@@ -1040432,7 +1040376,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                        return 0;
                                }
                                *jdev_name = arg;
-@@ -994,32 +1002,37 @@ static int reiserfs_parse_options(struct
+@@ -994,32 +1002,37 @@
                if (c == 'u' || c == 'g') {
                        int qtype = c == 'u' ? USRQUOTA : GRPQUOTA;
  
@@ -1040480,7 +1040424,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                        return 0;
                                }
                                strcpy(qf_names[qtype], arg);
-@@ -1037,22 +1050,24 @@ static int reiserfs_parse_options(struct
+@@ -1037,22 +1050,24 @@
                        else if (!strcmp(arg, "vfsv0"))
                                *qfmt = QFMT_VFS_V0;
                        else {
@@ -1040513,7 +1040457,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        return 0;
                }
  #endif
-@@ -1061,15 +1076,15 @@ static int reiserfs_parse_options(struct
+@@ -1061,15 +1076,15 @@
  #ifdef CONFIG_QUOTA
        if (!REISERFS_SB(s)->s_jquota_fmt && !*qfmt
            && (qf_names[USRQUOTA] || qf_names[GRPQUOTA])) {
@@ -1040534,7 +1040478,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                return 0;
        }
  #endif
-@@ -1129,14 +1144,15 @@ static void handle_attrs(struct super_bl
+@@ -1129,14 +1144,15 @@
  
        if (reiserfs_attrs(s)) {
                if (old_format_only(s)) {
@@ -1040554,7 +1040498,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
                }
        }
-@@ -1278,6 +1294,8 @@ static int reiserfs_remount(struct super
+@@ -1278,6 +1294,8 @@
                REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);
                s->s_flags &= ~MS_RDONLY;
                set_sb_umount_state(rs, REISERFS_ERROR_FS);
@@ -1040563,7 +1040507,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                /* mark_buffer_dirty (SB_BUFFER_WITH_SB (s), 1); */
                journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
                REISERFS_SB(s)->s_mount_state = REISERFS_VALID_FS;
-@@ -1312,7 +1330,7 @@ static int read_super_block(struct super
+@@ -1312,7 +1330,7 @@
  
        bh = sb_bread(s, offset / s->s_blocksize);
        if (!bh) {
@@ -1040572,7 +1040516,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 "bread failed (dev %s, block %lu, size %lu)",
                                 reiserfs_bdevname(s), offset / s->s_blocksize,
                                 s->s_blocksize);
-@@ -1326,15 +1344,15 @@ static int read_super_block(struct super
+@@ -1326,15 +1344,15 @@
        }
        //
        // ok, reiserfs signature (old or new) found in at the given offset
@@ -1040591,7 +1040535,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 reiserfs_bdevname(s), offset / s->s_blocksize,
                                 s->s_blocksize);
                return 1;
-@@ -1342,8 +1360,8 @@ static int read_super_block(struct super
+@@ -1342,8 +1360,8 @@
  
        rs = (struct reiserfs_super_block *)bh->b_data;
        if (sb_blocksize(rs) != s->s_blocksize) {
@@ -1040602,7 +1040546,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 reiserfs_bdevname(s),
                                 (unsigned long long)bh->b_blocknr,
                                 s->s_blocksize);
-@@ -1353,9 +1371,10 @@ static int read_super_block(struct super
+@@ -1353,9 +1371,10 @@
  
        if (rs->s_v1.s_root_block == cpu_to_le32(-1)) {
                brelse(bh);
@@ -1040616,7 +1040560,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 "get newer reiserfsprogs package");
                return 1;
        }
-@@ -1367,18 +1386,15 @@ static int read_super_block(struct super
+@@ -1367,18 +1386,15 @@
                /* magic is of non-standard journal filesystem, look at s_version to
                   find which format is in use */
                if (sb_version(rs) == REISERFS_VERSION_2)
@@ -1040642,7 +1040586,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        return 1;
                }
        } else
-@@ -1408,8 +1424,7 @@ static int reread_meta_blocks(struct sup
+@@ -1408,8 +1424,7 @@
        ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s)));
        wait_on_buffer(SB_BUFFER_WITH_SB(s));
        if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) {
@@ -1040652,7 +1040596,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                return 1;
        }
  
-@@ -1452,8 +1467,8 @@ static __u32 find_hash_out(struct super_
+@@ -1452,8 +1467,8 @@
                        if (reiserfs_rupasov_hash(s)) {
                                hash = YURA_HASH;
                        }
@@ -1040663,7 +1040607,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        break;
                }
                r5hash = GET_HASH_VALUE(r5_hash(de.de_name, de.de_namelen));
-@@ -1473,10 +1488,10 @@ static __u32 find_hash_out(struct super_
+@@ -1473,10 +1488,10 @@
                        && (yurahash ==
                            GET_HASH_VALUE(deh_offset
                                           (&(de.de_deh[de.de_entry_num])))))) {
@@ -1040678,7 +1040622,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        hash = UNSET_HASH;
                        break;
                }
-@@ -1490,7 +1505,8 @@ static __u32 find_hash_out(struct super_
+@@ -1490,7 +1505,8 @@
                         (deh_offset(&(de.de_deh[de.de_entry_num]))) == r5hash)
                        hash = R5_HASH;
                else {
@@ -1040688,7 +1040632,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                        hash = UNSET_HASH;
                }
        } while (0);
-@@ -1514,21 +1530,24 @@ static int what_hash(struct super_block 
+@@ -1514,21 +1530,24 @@
                code = find_hash_out(s);
  
        if (code != UNSET_HASH && reiserfs_hash_detect(s)) {
@@ -1040718,7 +1040662,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                         "unable to force r5 hash",
                                         reiserfs_hashname(code));
                        code = UNSET_HASH;
-@@ -1544,7 +1563,7 @@ static int what_hash(struct super_block 
+@@ -1544,7 +1563,7 @@
                }
        }
  
@@ -1040727,7 +1040671,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
         ** the super
         */
        if (code != UNSET_HASH &&
-@@ -1587,9 +1606,9 @@ static int function2code(hashf_t func)
+@@ -1587,9 +1606,9 @@
        return 0;
  }
  
@@ -1040739,7 +1040683,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
  
  static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
  {
-@@ -1623,10 +1642,6 @@ static int reiserfs_fill_super(struct su
+@@ -1623,10 +1642,6 @@
        REISERFS_SB(s)->s_alloc_options.preallocmin = 0;
        /* Preallocate by 16 blocks (17-1) at once */
        REISERFS_SB(s)->s_alloc_options.preallocsize = 17;
@@ -1040750,7 +1040694,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
        /* setup default block allocator options */
        reiserfs_init_alloc_options(s);
  
-@@ -1641,8 +1656,7 @@ static int reiserfs_fill_super(struct su
+@@ -1641,8 +1656,7 @@
  #endif
  
        if (blocks) {
@@ -1040760,7 +1040704,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                goto error;
        }
  
-@@ -1651,8 +1665,7 @@ static int reiserfs_fill_super(struct su
+@@ -1651,8 +1665,7 @@
                old_format = 1;
        /* try new format (64-th 1k block), which can contain reiserfs super block */
        else if (read_super_block(s, REISERFS_DISK_OFFSET_IN_BYTES)) {
@@ -1040770,7 +1040714,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                      reiserfs_bdevname(s));
                goto error;
        }
-@@ -1664,13 +1677,12 @@ static int reiserfs_fill_super(struct su
+@@ -1664,13 +1677,12 @@
        if (s->s_bdev && s->s_bdev->bd_inode
            && i_size_read(s->s_bdev->bd_inode) <
            sb_block_count(rs) * sb_blocksize(rs)) {
@@ -1040790,7 +1040734,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                goto error;
        }
  
-@@ -1678,14 +1690,13 @@ static int reiserfs_fill_super(struct su
+@@ -1678,14 +1690,13 @@
        sbi->s_mount_state = REISERFS_VALID_FS;
  
        if ((errval = reiserfs_init_bitmap_cache(s))) {
@@ -1040808,7 +1040752,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
  #endif
  
        /* make data=ordered the default */
-@@ -1701,13 +1712,16 @@ static int reiserfs_fill_super(struct su
+@@ -1701,13 +1712,16 @@
        } else {
                reiserfs_info(s, "using writeback data mode\n");
        }
@@ -1040829,7 +1040773,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                goto error;
        } else {
                jinit_done = 1; /* once this is set, journal_release must be called
-@@ -1715,8 +1729,8 @@ static int reiserfs_fill_super(struct su
+@@ -1715,8 +1729,8 @@
                                 */
        }
        if (reread_meta_blocks(s)) {
@@ -1040840,7 +1040784,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                goto error;
        }
  
-@@ -1724,8 +1738,8 @@ static int reiserfs_fill_super(struct su
+@@ -1724,8 +1738,8 @@
                goto error;
  
        if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
@@ -1040851,7 +1040795,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                s->s_flags |= MS_RDONLY;
        }
        args.objectid = REISERFS_ROOT_OBJECTID;
-@@ -1734,8 +1748,7 @@ static int reiserfs_fill_super(struct su
+@@ -1734,8 +1748,7 @@
            iget5_locked(s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor,
                         reiserfs_init_locked_inode, (void *)(&args));
        if (!root_inode) {
@@ -1040861,7 +1040805,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                goto error;
        }
  
-@@ -1784,7 +1797,7 @@ static int reiserfs_fill_super(struct su
+@@ -1784,7 +1797,7 @@
                 * avoiding corruption. -jeffm */
                if (bmap_would_wrap(reiserfs_bmap_count(s)) &&
                    sb_bmap_nr(rs) != 0) {
@@ -1040870,7 +1040814,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                        "claims to use %u bitmap blocks in "
                                        "its super block, but requires %u. "
                                        "Clearing to zero.", sb_bmap_nr(rs),
-@@ -1817,7 +1830,9 @@ static int reiserfs_fill_super(struct su
+@@ -1817,7 +1830,9 @@
                        } else if (!silent) {
                                reiserfs_info(s, "using 3.5.x disk format\n");
                        }
@@ -1040881,7 +1040825,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
  
                journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
                errval = journal_end(&th, s, 1);
-@@ -2083,8 +2098,8 @@ static int reiserfs_quota_on(struct supe
+@@ -2083,8 +2098,8 @@
        if (!(REISERFS_I(inode)->i_flags & i_nopack_mask)) {
                err = reiserfs_unpack(inode, NULL);
                if (err) {
@@ -1040892,7 +1040836,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                " (%d). Cannot turn on quotas.", err);
                        err = -EINVAL;
                        goto out;
-@@ -2095,8 +2110,8 @@ static int reiserfs_quota_on(struct supe
+@@ -2095,8 +2110,8 @@
        if (REISERFS_SB(sb)->s_qf_names[type]) {
                /* Quotafile not of fs root? */
                if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)
@@ -1040903,7 +1040847,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
                                 "Journalled quota will not work.");
        }
  
-@@ -2247,9 +2262,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2247,9 +2262,6 @@
                return ret;
        }
  
@@ -1040913,7 +1040857,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
        reiserfs_proc_info_global_init();
        reiserfs_proc_register_global("version",
                                      reiserfs_global_version_in_proc);
-@@ -2260,9 +2272,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2260,9 +2272,6 @@
                return 0;
        }
  
@@ -1040923,7 +1040867,7 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
        reiserfs_proc_unregister_global("version");
        reiserfs_proc_info_global_done();
        destroy_inodecache();
-@@ -2272,7 +2281,6 @@ static int __init init_reiserfs_fs(void)
+@@ -2272,7 +2281,6 @@
  
  static void __exit exit_reiserfs_fs(void)
  {
@@ -1040931,10 +1040875,10 @@ diff -purN linux-2.6.27/fs/reiserfs/super.c linux-2.6.27.19-5.1/fs/reiserfs/supe
        reiserfs_proc_unregister_global("version");
        reiserfs_proc_info_global_done();
        unregister_filesystem(&reiserfs_fs_type);
-diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/reiserfs/tail_conversion.c
---- linux-2.6.27/fs/reiserfs/tail_conversion.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/tail_conversion.c  2009-03-25 16:11:37.000000000 +0000
-@@ -26,7 +26,7 @@ int direct2indirect(struct reiserfs_tran
+diff -r 9608d5473017 fs/reiserfs/tail_conversion.c
+--- a/fs/reiserfs/tail_conversion.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/tail_conversion.c    Wed May 06 16:56:52 2009 +0100
+@@ -26,7 +26,7 @@
                                   converted item. */
        struct item_head ind_ih;        /* new indirect item to be inserted or
                                           key of unfm pointer to be pasted */
@@ -1040943,7 +1040887,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
        unp_t unfm_ptr;         /* Handle on an unformatted node
                                   that will be inserted in the
                                   tree. */
-@@ -35,7 +35,7 @@ int direct2indirect(struct reiserfs_tran
+@@ -35,7 +35,7 @@
  
        REISERFS_SB(sb)->s_direct2indirect++;
  
@@ -1040952,7 +1040896,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
  
        /* and key to search for append or insert pointer to the new
           unformatted node. */
-@@ -46,11 +46,11 @@ int direct2indirect(struct reiserfs_tran
+@@ -46,11 +46,11 @@
        /* Set the key to search for the place for new unfm pointer */
        make_cpu_key(&end_key, inode, tail_offset, TYPE_INDIRECT, 4);
  
@@ -1040968,7 +1040912,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                pathrelse(path);
                return -EIO;
        }
-@@ -64,17 +64,17 @@ int direct2indirect(struct reiserfs_tran
+@@ -64,17 +64,17 @@
                set_ih_free_space(&ind_ih, 0);  /* delete at nearest future */
                put_ih_item_len(&ind_ih, UNFM_P_SIZE);
                PATH_LAST_POSITION(path)++;
@@ -1040990,7 +1040934,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
        }
        // note: from here there are two keys which have matching first
        // three key components. They only differ by the fourth one.
-@@ -92,14 +92,13 @@ int direct2indirect(struct reiserfs_tran
+@@ -92,14 +92,13 @@
                   last item of the file */
                if (search_for_position_by_key(sb, &end_key, path) ==
                    POSITION_FOUND)
@@ -1041007,7 +1040951,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                    + ih_item_len(p_le_ih) - 1;
  
                /* we only send the unbh pointer if the buffer is not up to date.
-@@ -114,11 +113,11 @@ int direct2indirect(struct reiserfs_tran
+@@ -114,11 +113,11 @@
                } else {
                        up_to_date_bh = unbh;
                }
@@ -1041022,7 +1040966,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                        // done: file does not have direct items anymore
                        break;
  
-@@ -130,7 +129,7 @@ int direct2indirect(struct reiserfs_tran
+@@ -130,7 +129,7 @@
                unsigned pgoff =
                    (tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1);
                char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0);
@@ -1041031,7 +1040975,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                kunmap_atomic(kaddr, KM_USER0);
        }
  
-@@ -171,14 +170,18 @@ void reiserfs_unmap_buffer(struct buffer
+@@ -171,14 +170,18 @@
     what we expect from it (number of cut bytes). But when tail remains
     in the unformatted node, we set mode to SKIP_BALANCING and unlock
     inode */
@@ -1041055,7 +1040999,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
        char *tail;
        int tail_len, round_tail_len;
        loff_t pos, pos1;       /* position of first byte of the tail */
-@@ -186,22 +189,22 @@ int indirect2direct(struct reiserfs_tran
+@@ -186,22 +189,22 @@
  
        BUG_ON(!th->t_trans_id);
  
@@ -1041084,7 +1041028,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
        pos1 = pos;
  
        // we are protected by i_mutex. The tail can not disapper, not
-@@ -210,27 +213,26 @@ int indirect2direct(struct reiserfs_tran
+@@ -210,27 +213,26 @@
  
        tail = (char *)kmap(page);      /* this can schedule */
  
@@ -1041121,7 +1041065,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                          pos1 + 1, TYPE_DIRECT, round_tail_len,
                          0xffff /*ih_free_space */ );
  
-@@ -240,13 +242,13 @@ int indirect2direct(struct reiserfs_tran
+@@ -240,13 +242,13 @@
         */
        tail = tail + (pos & (PAGE_CACHE_SIZE - 1));
  
@@ -1041138,7 +1041082,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
                                 tail ? tail : NULL) < 0) {
                /* No disk memory. So we can not convert last unformatted node
                   to the direct item.  In this case we used to adjust
-@@ -255,12 +257,12 @@ int indirect2direct(struct reiserfs_tran
+@@ -255,12 +257,12 @@
                   unformatted node. For now i_size is considered as guard for
                   going out of file size */
                kunmap(page);
@@ -1041153,7 +1041097,7 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
  
        // note: we have now the same as in above direct2indirect
        // conversion: there are two keys which have matching first three
-@@ -268,11 +270,11 @@ int indirect2direct(struct reiserfs_tran
+@@ -268,11 +270,11 @@
  
        /* We have inserted new direct item and must remove last
           unformatted node. */
@@ -1041169,9 +1041113,9 @@ diff -purN linux-2.6.27/fs/reiserfs/tail_conversion.c linux-2.6.27.19-5.1/fs/rei
 -      return n_block_size - round_tail_len;
 +      return block_size - round_tail_len;
  }
-diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xattr.c
---- linux-2.6.27/fs/reiserfs/xattr.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr.c    2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr.c
+--- a/fs/reiserfs/xattr.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr.c      Wed May 06 16:56:52 2009 +0100
 @@ -27,6 +27,10 @@
   * these are special cases for filesystem ACLs, they are interpreted by the
   * kernel, in addition, they are negatively and positively cached and attached
@@ -1041216,20 +1041160,13 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +}
  
 -      /* This needs to be created at mount-time */
--      if (!privroot)
--              return ERR_PTR(-ENODATA);
 +static int xattr_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 +{
 +      BUG_ON(!mutex_is_locked(&dir->i_mutex));
 +      DQUOT_INIT(dir);
 +      return dir->i_op->mkdir(dir, dentry, mode);
 +}
--      mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
--      if (REISERFS_SB(sb)->xattr_root) {
--              xaroot = dget(REISERFS_SB(sb)->xattr_root);
--              goto out;
--      }
++
 +/* We use I_MUTEX_CHILD here to silence lockdep. It's safe because xattr
 + * mutation ops aren't called during rename or splace, which are the
 + * only other users of I_MUTEX_CHILD. It violates the ordering, but that's
@@ -1041239,11 +1041176,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +      int error;
 +      BUG_ON(!mutex_is_locked(&dir->i_mutex));
 +      DQUOT_INIT(dir);
--      xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
--      if (IS_ERR(xaroot)) {
--              goto out;
--      } else if (!xaroot->d_inode) {
++
 +      mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD);
 +      error = dir->i_op->unlink(dir, dentry);
 +      mutex_unlock(&dentry->d_inode->i_mutex);
@@ -1041285,10 +1041218,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +      if (IS_ERR(dentry))
 +              return dentry;
 +      else if (!dentry->d_inode) {
-               int err = -ENODATA;
--              if (flags == 0 || flags & XATTR_CREATE)
--                      err = privroot->d_inode->i_op->mkdir(privroot->d_inode,
--                                                           xaroot, 0700);
++              int err = -ENODATA;
 +
 +              if (xattr_may_create(flags)) {
 +                      mutex_lock_nested(&parent->d_inode->i_mutex,
@@ -1041297,28 +1041227,47 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +                      mutex_unlock(&parent->d_inode->i_mutex);
 +              }
 +
-               if (err) {
--                      dput(xaroot);
--                      xaroot = ERR_PTR(err);
--                      goto out;
++              if (err) {
 +                      dput(dentry);
 +                      dentry = ERR_PTR(err);
-               }
-       }
--      REISERFS_SB(sb)->xattr_root = dget(xaroot);
--      out:
--      mutex_unlock(&privroot->d_inode->i_mutex);
--      dput(privroot);
--      return xaroot;
++              }
++      }
++
 +      return dentry;
 +}
 +
 +static struct dentry *open_xa_root(struct super_block *sb, int flags)
 +{
 +      struct dentry *privroot = REISERFS_SB(sb)->priv_root;
-+      if (!privroot)
-+              return ERR_PTR(-ENODATA);
+       if (!privroot)
+               return ERR_PTR(-ENODATA);
+-
+-      mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
+-      if (REISERFS_SB(sb)->xattr_root) {
+-              xaroot = dget(REISERFS_SB(sb)->xattr_root);
+-              goto out;
+-      }
+-
+-      xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
+-      if (IS_ERR(xaroot)) {
+-              goto out;
+-      } else if (!xaroot->d_inode) {
+-              int err = -ENODATA;
+-              if (flags == 0 || flags & XATTR_CREATE)
+-                      err = privroot->d_inode->i_op->mkdir(privroot->d_inode,
+-                                                           xaroot, 0700);
+-              if (err) {
+-                      dput(xaroot);
+-                      xaroot = ERR_PTR(err);
+-                      goto out;
+-              }
+-      }
+-      REISERFS_SB(sb)->xattr_root = dget(xaroot);
+-
+-      out:
+-      mutex_unlock(&privroot->d_inode->i_mutex);
+-      dput(privroot);
+-      return xaroot;
 +      return lookup_or_create_dir(privroot, XAROOT_NAME, flags);
  }
  
@@ -1041343,8 +1041292,49 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      if (IS_ERR(xadir)) {
 -              dput(xaroot);
 -              return xadir;
--      }
--
++
++      xadir = lookup_or_create_dir(xaroot, namebuf, flags);
++      dput(xaroot);
++      return xadir;
++
++}
++
++/* The following are side effects of other operations that aren't explicitly
++ * modifying extended attributes. This includes operations such as permissions
++ * or ownership changes, object deletions, etc. */
++struct reiserfs_dentry_buf {
++      struct dentry *xadir;
++      int count;
++      struct dentry *dentries[8];
++};
++
++static int
++fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
++                  u64 ino, unsigned int d_type)
++{
++      struct reiserfs_dentry_buf *dbuf = buf;
++      struct dentry *dentry;
++
++      if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
++              return -ENOSPC;
++
++      if (name[0] == '.' && (name[1] == '\0' ||
++                             (name[1] == '.' && name[2] == '\0')))
++              return 0;
++
++      dentry = lookup_one_len(name, dbuf->xadir, namelen);
++      if (IS_ERR(dentry)) {
++              return PTR_ERR(dentry);
++      } else if (!dentry->d_inode) {
++              /* A directory entry exists, but no file? */
++              reiserfs_error(dentry->d_sb, "xattr-20003",
++                             "Corrupted directory: xattr %s listed but "
++                             "not found for file %s.\n",
++                             dentry->d_name.name, dbuf->xadir->d_name.name);
++              dput(dentry);
++              return -EIO;
+       }
 -      if (!xadir->d_inode) {
 -              int err;
 -              if (flags == 0 || flags & XATTR_CREATE) {
@@ -1041359,58 +1041349,171 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                              dput(xadir);
 -                              return ERR_PTR(err);
 -                      }
--              }
++      dbuf->dentries[dbuf->count++] = dentry;
++      return 0;
++}
++
++static void
++cleanup_dentry_buf(struct reiserfs_dentry_buf *buf)
++{
++      int i;
++      for (i = 0; i < buf->count; i++)
++              if (buf->dentries[i])
++                      dput(buf->dentries[i]);
++}
++
++static int reiserfs_for_each_xattr(struct inode *inode,
++                                 int (*action)(struct dentry *, void *),
++                                 void *data)
++{
++      struct dentry *dir;
++      int i, err = 0;
++      loff_t pos = 0;
++      struct reiserfs_dentry_buf buf = {
++              .count = 0,
++      };
++
++      /* Skip out, an xattr has no xattrs associated with it */
++      if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1)
++              return 0;
++
++      dir = open_xa_dir(inode, XATTR_REPLACE);
++      if (IS_ERR(dir)) {
++              err = PTR_ERR(dir);
++              goto out;
++      } else if (!dir->d_inode) {
++              err = 0;
++              goto out_dir;
++      }
++
++      mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
++      buf.xadir = dir;
++      err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos);
++      while ((err == 0 || err == -ENOSPC) && buf.count) {
++              err = 0;
++
++              for (i = 0; i < buf.count && buf.dentries[i]; i++) {
++                      int lerr = 0;
++                      struct dentry *dentry = buf.dentries[i];
++
++                      if (err == 0 && !S_ISDIR(dentry->d_inode->i_mode))
++                              lerr = action(dentry, data);
++
++                      dput(dentry);
++                      buf.dentries[i] = NULL;
++                      err = lerr ?: err;
+               }
 -              if (!xadir->d_inode) {
 -                      dput(xaroot);
 -                      dput(xadir);
 -                      return ERR_PTR(-ENODATA);
--              }
--      }
-+      xadir = lookup_or_create_dir(xaroot, namebuf, flags);
-       dput(xaroot);
-       return xadir;
++              buf.count = 0;
++              if (!err)
++                      err = reiserfs_readdir_dentry(dir, &buf,
++                                                    fill_with_dentries, &pos);
++      }
++      mutex_unlock(&dir->d_inode->i_mutex);
++
++      /* Clean up after a failed readdir */
++      cleanup_dentry_buf(&buf);
 +
++      if (!err) {
++              /* We start a transaction here to avoid a ABBA situation
++               * between the xattr root's i_mutex and the journal lock.
++               * This doesn't incur much additional overhead since the
++               * new transaction will just nest inside the
++               * outer transaction. */
++              int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 +
++                           4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb);
++              struct reiserfs_transaction_handle th;
++              err = journal_begin(&th, inode->i_sb, blocks);
++              if (!err) {
++                      int jerror;
++                      mutex_lock_nested(&dir->d_parent->d_inode->i_mutex,
++                                        I_MUTEX_XATTR);
++                      err = action(dir, data);
++                      jerror = journal_end(&th, inode->i_sb, blocks);
++                      mutex_unlock(&dir->d_parent->d_inode->i_mutex);
++                      err = jerror ?: err;
+               }
+       }
+-
+-      dput(xaroot);
+-      return xadir;
++out_dir:
++      dput(dir);
++out:
++      /* -ENODATA isn't an error */
++      if (err == -ENODATA)
++              err = 0;
++      return err;
  }
  
--/* Returns a dentry corresponding to a specific extended attribute file
-- * for the inode. If flags allow, the file is created. Otherwise, a
-- * valid or negative dentry, or an error is returned. */
++static int delete_one_xattr(struct dentry *dentry, void *data)
++{
++      struct inode *dir = dentry->d_parent->d_inode;
++
++      /* This is the xattr dir, handle specially. */
++      if (S_ISDIR(dentry->d_inode->i_mode))
++              return xattr_rmdir(dir, dentry);
++
++      return xattr_unlink(dir, dentry);
++}
++
++static int chown_one_xattr(struct dentry *dentry, void *data)
++{
++      struct iattr *attrs = data;
++      return reiserfs_setattr(dentry, attrs);
++}
++
++/* No i_mutex, but the inode is unconnected. */
++int reiserfs_delete_xattrs(struct inode *inode)
++{
++      int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL);
++      if (err)
++              reiserfs_warning(inode->i_sb, "jdm-20004",
++                               "Couldn't delete all xattrs (%d)\n", err);
++      return err;
++}
++
++/* inode->i_mutex: down */
++int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
++{
++      int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs);
++      if (err)
++              reiserfs_warning(inode->i_sb, "jdm-20007",
++                               "Couldn't chown all xattrs (%d)\n", err);
++      return err;
++}
++
++#ifdef CONFIG_REISERFS_FS_XATTR
+ /* Returns a dentry corresponding to a specific extended attribute file
+  * for the inode. If flags allow, the file is created. Otherwise, a
+  * valid or negative dentry, or an error is returned. */
 -static struct dentry *get_xa_file_dentry(const struct inode *inode,
 -                                       const char *name, int flags)
--{
--      struct dentry *xadir, *xafile;
--      int err = 0;
-+/* The following are side effects of other operations that aren't explicitly
-+ * modifying extended attributes. This includes operations such as permissions
-+ * or ownership changes, object deletions, etc. */
-+struct reiserfs_dentry_buf {
-+      struct dentry *xadir;
-+      int count;
-+      struct dentry *dentries[8];
-+};
++static struct dentry *xattr_lookup(struct inode *inode, const char *name,
++                                  int flags)
+ {
+       struct dentry *xadir, *xafile;
+       int err = 0;
  
--      xadir = open_xa_dir(inode, flags);
+       xadir = open_xa_dir(inode, flags);
 -      if (IS_ERR(xadir)) {
--              return ERR_CAST(xadir);
++      if (IS_ERR(xadir))
+               return ERR_CAST(xadir);
 -      } else if (xadir && !xadir->d_inode) {
 -              dput(xadir);
 -              return ERR_PTR(-ENODATA);
 -      }
-+static int
-+fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset,
-+                  u64 ino, unsigned int d_type)
-+{
-+      struct reiserfs_dentry_buf *dbuf = buf;
-+      struct dentry *dentry;
  
--      xafile = lookup_one_len(name, xadir, strlen(name));
--      if (IS_ERR(xafile)) {
+       xafile = lookup_one_len(name, xadir, strlen(name));
+       if (IS_ERR(xafile)) {
 -              dput(xadir);
 -              return ERR_CAST(xafile);
--      }
-+      if (dbuf->count == ARRAY_SIZE(dbuf->dentries))
-+              return -ENOSPC;
++              err = PTR_ERR(xafile);
++              goto out;
+       }
  
 -      if (xafile->d_inode) {  /* file exists */
 -              if (flags & XATTR_CREATE) {
@@ -1041425,40 +1041528,38 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -               * the same xattr */
 -              err = xadir->d_inode->i_op->create(xadir->d_inode, xafile,
 -                                                 0700 | S_IFREG, NULL);
-+      if (name[0] == '.' && (name[1] == '\0' ||
-+                             (name[1] == '.' && name[2] == '\0')))
-+              return 0;
++      if (xafile->d_inode && (flags & XATTR_CREATE))
++              err = -EEXIST;
  
 -              if (err) {
 -                      dput(xafile);
 -                      goto out;
--              }
-+      dentry = lookup_one_len(name, dbuf->xadir, namelen);
-+      if (IS_ERR(dentry)) {
-+              return PTR_ERR(dentry);
-+      } else if (!dentry->d_inode) {
-+              /* A directory entry exists, but no file? */
-+              reiserfs_error(dentry->d_sb, "xattr-20003",
-+                             "Corrupted directory: xattr %s listed but "
-+                             "not found for file %s.\n",
-+                             dentry->d_name.name, dbuf->xadir->d_name.name);
-+              dput(dentry);
-+              return -EIO;
++      if (!xafile->d_inode) {
++              err = -ENODATA;
++              if (xattr_may_create(flags)) {
++                      mutex_lock_nested(&xadir->d_inode->i_mutex,
++                                        I_MUTEX_XATTR);
++                      err = xattr_create(xadir->d_inode, xafile,
++                                            0700|S_IFREG);
++                      mutex_unlock(&xadir->d_inode->i_mutex);
+               }
        }
  
 -      out:
--      dput(xadir);
--      if (err)
++      if (err)
++              dput(xafile);
++out:
+       dput(xadir);
+       if (err)
 -              xafile = ERR_PTR(err);
 -      else if (!xafile->d_inode) {
 -              dput(xafile);
 -              xafile = ERR_PTR(-ENODATA);
 -      }
--      return xafile;
-+      dbuf->dentries[dbuf->count++] = dentry;
-+      return 0;
- }
++              return ERR_PTR(err);
+       return xafile;
+-}
+-
 -/*
 - * this is very similar to fs/reiserfs/dir.c:reiserfs_readdir, but
 - * we need to drop the path before calling the filldir struct.  That
@@ -1041473,9 +1041574,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 - * changing underneath us.
 - */
 -static int __xattr_readdir(struct inode *inode, void *dirent, filldir_t filldir)
-+static void
-+cleanup_dentry_buf(struct reiserfs_dentry_buf *buf)
- {
+-{
 -      struct cpu_key pos_key; /* key of current position in the directory (key of directory entry) */
 -      INITIALIZE_PATH(path_to_entry);
 -      struct buffer_head *bh;
@@ -1041511,110 +1041610,32 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                      pathrelse(&path_to_entry);
 -                      return -EIO;
 -              }
-+      int i;
-+      for (i = 0; i < buf->count; i++)
-+              if (buf->dentries[i])
-+                      dput(buf->dentries[i]);
-+}
+-
 -              if (search_res == NAME_NOT_FOUND)
 -                      de.de_entry_num--;
-+static int reiserfs_for_each_xattr(struct inode *inode,
-+                                 int (*action)(struct dentry *, void *),
-+                                 void *data)
-+{
-+      struct dentry *dir;
-+      int i, err = 0;
-+      loff_t pos = 0;
-+      struct reiserfs_dentry_buf buf = {
-+              .count = 0,
-+      };
+-
 -              set_de_name_and_namelen(&de);
 -              entry_num = de.de_entry_num;
 -              deh = &(de.de_deh[entry_num]);
-+      /* Skip out, an xattr has no xattrs associated with it */
-+      if (IS_PRIVATE(inode) || get_inode_sd_version(inode) == STAT_DATA_V1)
-+              return 0;
+-
 -              bh = de.de_bh;
 -              ih = de.de_ih;
-+      dir = open_xa_dir(inode, XATTR_REPLACE);
-+      if (IS_ERR(dir)) {
-+              err = PTR_ERR(dir);
-+              goto out;
-+      } else if (!dir->d_inode) {
-+              err = 0;
-+              goto out_dir;
-+      }
+-
 -              if (!is_direntry_le_ih(ih)) {
 -                      reiserfs_warning(inode->i_sb, "not direntry %h", ih);
 -                      break;
 -              }
 -              copy_item_head(&tmp_ih, ih);
-+      mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
-+      buf.xadir = dir;
-+      err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos);
-+      while ((err == 0 || err == -ENOSPC) && buf.count) {
-+              err = 0;
-+
-+              for (i = 0; i < buf.count && buf.dentries[i]; i++) {
-+                      int lerr = 0;
-+                      struct dentry *dentry = buf.dentries[i];
-+
-+                      if (err == 0 && !S_ISDIR(dentry->d_inode->i_mode))
-+                              lerr = action(dentry, data);
-+
-+                      dput(dentry);
-+                      buf.dentries[i] = NULL;
-+                      err = lerr ?: err;
-+              }
-+              buf.count = 0;
-+              if (!err)
-+                      err = reiserfs_readdir_dentry(dir, &buf,
-+                                                    fill_with_dentries, &pos);
-+      }
-+      mutex_unlock(&dir->d_inode->i_mutex);
+-
 -              /* we must have found item, that is item of this directory, */
 -              RFALSE(COMP_SHORT_KEYS(&(ih->ih_key), &pos_key),
 -                     "vs-9000: found item %h does not match to dir we readdir %K",
 -                     ih, &pos_key);
-+      /* Clean up after a failed readdir */
-+      cleanup_dentry_buf(&buf);
+-
 -              if (deh_offset(deh) <= DOT_DOT_OFFSET) {
 -                      break;
-+      if (!err) {
-+              /* We start a transaction here to avoid a ABBA situation
-+               * between the xattr root's i_mutex and the journal lock.
-+               * This doesn't incur much additional overhead since the
-+               * new transaction will just nest inside the
-+               * outer transaction. */
-+              int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 +
-+                           4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb);
-+              struct reiserfs_transaction_handle th;
-+              err = journal_begin(&th, inode->i_sb, blocks);
-+              if (!err) {
-+                      int jerror;
-+                      mutex_lock_nested(&dir->d_parent->d_inode->i_mutex,
-+                                        I_MUTEX_XATTR);
-+                      err = action(dir, data);
-+                      jerror = journal_end(&th, inode->i_sb, blocks);
-+                      mutex_unlock(&dir->d_parent->d_inode->i_mutex);
-+                      err = jerror ?: err;
-               }
-+      }
-+out_dir:
-+      dput(dir);
-+out:
-+      /* -ENODATA isn't an error */
-+      if (err == -ENODATA)
-+              err = 0;
-+      return err;
-+}
+-              }
+-
 -              /* look for the previous entry in the directory */
 -              next_pos = deh_offset(deh) - 1;
 -
@@ -1041634,10 +1041655,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                      /* too big to send back to VFS */
 -                      continue;
 -              }
-+static int delete_one_xattr(struct dentry *dentry, void *data)
-+{
-+      struct inode *dir = dentry->d_parent->d_inode;
+-
 -              /* Ignore the .reiserfs_priv entry */
 -              if (reiserfs_xattrs(inode->i_sb) &&
 -                  !old_format_only(inode->i_sb) &&
@@ -1041646,10 +1041664,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                              (REISERFS_SB(inode->i_sb)->priv_root->d_inode)->
 -                              k_objectid))
 -                      continue;
-+      /* This is the xattr dir, handle specially. */
-+      if (S_ISDIR(dentry->d_inode->i_mode))
-+              return xattr_rmdir(dir, dentry);
+-
 -              if (d_reclen <= 32) {
 -                      local_buf = small_buf;
 -              } else {
@@ -1041660,20 +1041675,13 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                      }
 -                      if (item_moved(&tmp_ih, &path_to_entry)) {
 -                              kfree(local_buf);
-+      return xattr_unlink(dir, dentry);
-+}
+-
 -                              /* sigh, must retry.  Do this same offset again */
 -                              next_pos = d_off;
 -                              goto research;
 -                      }
 -              }
-+static int chown_one_xattr(struct dentry *dentry, void *data)
-+{
-+      struct iattr *attrs = data;
-+      return reiserfs_setattr(dentry, attrs);
-+}
+-
 -              // Note, that we copy name to user space via temporary
 -              // buffer (local_buf) because filldir will block if
 -              // user space buffer is swapped out. At that time
@@ -1041697,29 +1041705,12 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                      kfree(local_buf);
 -              }
 -      }                       /* while */
-+/* No i_mutex, but the inode is unconnected. */
-+int reiserfs_delete_xattrs(struct inode *inode)
-+{
-+      int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL);
-+      if (err)
-+              reiserfs_warning(inode->i_sb, "jdm-20004",
-+                               "Couldn't delete all xattrs (%d)\n", err);
-+      return err;
-+}
+-
 -      end:
 -      pathrelse(&path_to_entry);
 -      return 0;
-+/* inode->i_mutex: down */
-+int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
-+{
-+      int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs);
-+      if (err)
-+              reiserfs_warning(inode->i_sb, "jdm-20007",
-+                               "Couldn't chown all xattrs (%d)\n", err);
-+      return err;
- }
+-}
+-
 -/*
 - * this could be done with dedicated readdir ops for the xattr files,
 - * but I want to get something working asap
@@ -1041728,59 +1041719,20 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 - */
 -static
 -int xattr_readdir(struct inode *inode, filldir_t filler, void *buf)
-+#ifdef CONFIG_REISERFS_FS_XATTR
-+/* Returns a dentry corresponding to a specific extended attribute file
-+ * for the inode. If flags allow, the file is created. Otherwise, a
-+ * valid or negative dentry, or an error is returned. */
-+static struct dentry *xattr_lookup(struct inode *inode, const char *name,
-+                                  int flags)
- {
+-{
 -      int res = -ENOENT;
 -      mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
 -      if (!IS_DEADDIR(inode)) {
 -              lock_kernel();
 -              res = __xattr_readdir(inode, buf, filler);
 -              unlock_kernel();
-+      struct dentry *xadir, *xafile;
-+      int err = 0;
-+
-+      xadir = open_xa_dir(inode, flags);
-+      if (IS_ERR(xadir))
-+              return ERR_CAST(xadir);
-+
-+      xafile = lookup_one_len(name, xadir, strlen(name));
-+      if (IS_ERR(xafile)) {
-+              err = PTR_ERR(xafile);
-+              goto out;
-       }
+-      }
 -      mutex_unlock(&inode->i_mutex);
 -      return res;
-+
-+      if (xafile->d_inode && (flags & XATTR_CREATE))
-+              err = -EEXIST;
-+
-+      if (!xafile->d_inode) {
-+              err = -ENODATA;
-+              if (xattr_may_create(flags)) {
-+                      mutex_lock_nested(&xadir->d_inode->i_mutex,
-+                                        I_MUTEX_XATTR);
-+                      err = xattr_create(xadir->d_inode, xafile,
-+                                            0700|S_IFREG);
-+                      mutex_unlock(&xadir->d_inode->i_mutex);
-+              }
-+      }
-+
-+      if (err)
-+              dput(xafile);
-+out:
-+      dput(xadir);
-+      if (err)
-+              return ERR_PTR(err);
-+      return xafile;
  }
  
  /* Internal operations on file data */
-@@ -375,14 +383,14 @@ static inline void reiserfs_put_page(str
+@@ -375,14 +383,14 @@
        page_cache_release(page);
  }
  
@@ -1041797,7 +1041749,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
        if (!IS_ERR(page)) {
                kmap(page);
                if (PageError(page))
-@@ -405,6 +413,45 @@ int reiserfs_commit_write(struct file *f
+@@ -405,6 +413,45 @@
  int reiserfs_prepare_write(struct file *f, struct page *page,
                           unsigned from, unsigned to);
  
@@ -1041843,7 +1041795,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
  
  /* Generic extended attribute operations that can be used by xa plugins */
  
-@@ -412,58 +459,32 @@ int reiserfs_prepare_write(struct file *
+@@ -412,58 +459,32 @@
   * inode->i_mutex: down
   */
  int
@@ -1041913,7 +1041865,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
        while (buffer_pos < buffer_size || buffer_pos == 0) {
                size_t chunk;
                size_t skip = 0;
-@@ -473,10 +494,10 @@ reiserfs_xattr_set(struct inode *inode, 
+@@ -473,10 +494,10 @@
                else
                        chunk = buffer_size - buffer_pos;
  
@@ -1041926,7 +1041878,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
                }
  
                lock_page(page);
-@@ -510,28 +531,61 @@ reiserfs_xattr_set(struct inode *inode, 
+@@ -510,28 +531,61 @@
                        break;
        }
  
@@ -1042001,7 +1041953,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
                   size_t buffer_size)
  {
        ssize_t err = 0;
-@@ -540,7 +594,6 @@ reiserfs_xattr_get(const struct inode *i
+@@ -540,7 +594,6 @@
        size_t file_pos = 0;
        size_t buffer_pos = 0;
        struct page *page;
@@ -1042009,7 +1041961,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
        __u32 hash = 0;
  
        if (name == NULL)
-@@ -551,25 +604,25 @@ reiserfs_xattr_get(const struct inode *i
+@@ -551,25 +604,25 @@
        if (get_inode_sd_version(inode) == STAT_DATA_V1)
                return -EOPNOTSUPP;
  
@@ -1042041,7 +1041993,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
        }
  
        while (file_pos < isize) {
-@@ -581,10 +634,10 @@ reiserfs_xattr_get(const struct inode *i
+@@ -581,10 +634,10 @@
                else
                        chunk = isize - file_pos;
  
@@ -1042054,7 +1042006,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
                }
  
                lock_page(page);
-@@ -598,12 +651,12 @@ reiserfs_xattr_get(const struct inode *i
+@@ -598,12 +651,12 @@
                        if (rxh->h_magic != cpu_to_le32(REISERFS_XATTR_MAGIC)) {
                                unlock_page(page);
                                reiserfs_put_page(page);
@@ -1042069,7 +1042021,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
                        }
                        hash = le32_to_cpu(rxh->h_hash);
                }
-@@ -618,256 +671,83 @@ reiserfs_xattr_get(const struct inode *i
+@@ -618,256 +671,83 @@
  
        if (xattr_hash(buffer, isize - sizeof(struct reiserfs_xattr_header)) !=
            hash) {
@@ -1042081,8 +1042033,10 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
        }
  
 -      out_dput:
--      dput(dentry);
--
++out_unlock:
++      up_read(&REISERFS_I(inode)->i_xattr_sem);
+       dput(dentry);
 -      out:
 -      return err;
 -}
@@ -1042125,10 +1042079,8 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -              d_delete(dentry);
 -
 -      out_file:
-+out_unlock:
-+      up_read(&REISERFS_I(inode)->i_xattr_sem);
-       dput(dentry);
+-      dput(dentry);
+-
 -      out:
 -      return err;
 -}
@@ -1042220,28 +1042172,15 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      if (!err)
 -              REISERFS_I(inode)->i_flags =
 -                  REISERFS_I(inode)->i_flags & ~i_has_xattr_dir;
-+out:
-       return err;
- }
+-      return err;
+-}
+-
 -struct reiserfs_chown_buf {
 -      struct inode *inode;
 -      struct dentry *xadir;
 -      struct iattr *attrs;
-+/* Actual operations that are exported to VFS-land */
-+struct xattr_handler *reiserfs_xattr_handlers[] = {
-+      &reiserfs_xattr_user_handler,
-+      &reiserfs_xattr_trusted_handler,
-+#ifdef CONFIG_REISERFS_FS_SECURITY
-+      &reiserfs_xattr_security_handler,
-+#endif
-+#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-+      &reiserfs_posix_acl_access_handler,
-+      &reiserfs_posix_acl_default_handler,
-+#endif
-+      NULL
- };
+-};
+-
 -/* XXX: If there is a better way to do this, I'd love to hear about it */
 -static int
 -reiserfs_chown_xattrs_filler(void *buf, const char *name, int namelen,
@@ -1042266,32 +1042205,14 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -
 -      return err;
 -}
-+/*
-+ * In order to implement different sets of xattr operations for each xattr
-+ * prefix with the generic xattr API, a filesystem should create a
-+ * null-terminated array of struct xattr_handler (one for each prefix) and
-+ * hang a pointer to it off of the s_xattr field of the superblock.
-+ *
-+ * The generic_fooxattr() functions will use this list to dispatch xattr
-+ * operations to the correct xattr_handler.
-+ */
-+#define for_each_xattr_handler(handlers, handler)             \
-+              for ((handler) = *(handlers)++;                 \
-+                      (handler) != NULL;                      \
-+                      (handler) = *(handlers)++)
+-
 -int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
-+/* This is the implementation for the xattr plugin infrastructure */
-+static inline struct xattr_handler *
-+find_xattr_handler_prefix(struct xattr_handler **handlers,
-+                         const char *name)
- {
+-{
 -      struct dentry *dir;
 -      int err = 0;
 -      struct reiserfs_chown_buf buf;
 -      unsigned int ia_valid = attrs->ia_valid;
-+      struct xattr_handler *xah;
+-
 -      /* Skip out, an xattr has no xattrs associated with it */
 -      if (is_reiserfs_priv_object(inode) ||
 -          get_inode_sd_version(inode) == STAT_DATA_V1 ||
@@ -1042309,9 +1042230,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -              dput(dir);
 -              goto out;
 -      }
-+      if (!handlers)
-+              return NULL;
+-
 -      lock_kernel();
 -
 -      attrs->ia_valid &= (ATTR_UID | ATTR_GID | ATTR_CTIME);
@@ -1042323,11 +1042242,8 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      if (err) {
 -              unlock_kernel();
 -              goto out_dir;
-+      for_each_xattr_handler(handlers, xah) {
-+              if (strncmp(xah->prefix, name, strlen(xah->prefix)) == 0)
-+                      break;
-       }
+-      }
+-
 -      err = notify_change(dir, attrs);
 -      unlock_kernel();
 -
@@ -1042336,11 +1042252,56 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -
 -      out:
 -      attrs->ia_valid = ia_valid;
--      return err;
-+      return xah;
++out:
+       return err;
  }
  
--/* Actual operations that are exported to VFS-land */
+ /* Actual operations that are exported to VFS-land */
++struct xattr_handler *reiserfs_xattr_handlers[] = {
++      &reiserfs_xattr_user_handler,
++      &reiserfs_xattr_trusted_handler,
++#ifdef CONFIG_REISERFS_FS_SECURITY
++      &reiserfs_xattr_security_handler,
++#endif
++#ifdef CONFIG_REISERFS_FS_POSIX_ACL
++      &reiserfs_posix_acl_access_handler,
++      &reiserfs_posix_acl_default_handler,
++#endif
++      NULL
++};
++
++/*
++ * In order to implement different sets of xattr operations for each xattr
++ * prefix with the generic xattr API, a filesystem should create a
++ * null-terminated array of struct xattr_handler (one for each prefix) and
++ * hang a pointer to it off of the s_xattr field of the superblock.
++ *
++ * The generic_fooxattr() functions will use this list to dispatch xattr
++ * operations to the correct xattr_handler.
++ */
++#define for_each_xattr_handler(handlers, handler)             \
++              for ((handler) = *(handlers)++;                 \
++                      (handler) != NULL;                      \
++                      (handler) = *(handlers)++)
++
++/* This is the implementation for the xattr plugin infrastructure */
++static inline struct xattr_handler *
++find_xattr_handler_prefix(struct xattr_handler **handlers,
++                         const char *name)
++{
++      struct xattr_handler *xah;
++
++      if (!handlers)
++              return NULL;
++
++      for_each_xattr_handler(handlers, xah) {
++              if (strncmp(xah->prefix, name, strlen(xah->prefix)) == 0)
++                      break;
++      }
++
++      return xah;
++}
++
  
  /*
   * Inode operation getxattr()
@@ -1042372,7 +1042333,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
  }
  
  /*
-@@ -879,27 +759,15 @@ int
+@@ -879,27 +759,15 @@
  reiserfs_setxattr(struct dentry *dentry, const char *name, const void *value,
                  size_t size, int flags)
  {
@@ -1042406,7 +1042367,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
  }
  
  /*
-@@ -909,86 +777,66 @@ reiserfs_setxattr(struct dentry *dentry,
+@@ -909,86 +777,66 @@
   */
  int reiserfs_removexattr(struct dentry *dentry, const char *name)
  {
@@ -1042474,18 +1042435,6 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                  find_xattr_handler_prefix(name);
 -              if (!xah)
 -                      return 0;       /* Unsupported xattr name, skip it */
--
--              /* We call ->list() twice because the operation isn't required to just
--               * return the name back - we want to make sure we have enough space */
--              len += xah->list(b->r_inode, name, namelen, NULL);
--
--              if (len) {
--                      if (b->r_pos + len + 1 <= b->r_size) {
--                              char *p = b->r_buf + b->r_pos;
--                              p += xah->list(b->r_inode, name, namelen, p);
--                              *p++ = '\0';
--                      }
--                      b->r_pos += len + 1;
 +      struct listxattr_buf *b = (struct listxattr_buf *)buf;
 +      size_t size;
 +      if (name[0] != '.' ||
@@ -1042502,11 +1042451,23 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +                              return -ERANGE;
 +              } else {
 +                      size = handler->list(b->inode, NULL, 0, name, namelen);
-               }
--      }
++              }
  
+-              /* We call ->list() twice because the operation isn't required to just
+-               * return the name back - we want to make sure we have enough space */
+-              len += xah->list(b->r_inode, name, namelen, NULL);
+-
+-              if (len) {
+-                      if (b->r_pos + len + 1 <= b->r_size) {
+-                              char *p = b->r_buf + b->r_pos;
+-                              p += xah->list(b->r_inode, name, namelen, p);
+-                              *p++ = '\0';
+-                      }
+-                      b->r_pos += len + 1;
+-              }
 +              b->pos += size;
-+      }
+       }
+-
        return 0;
  }
  
@@ -1042532,7 +1042493,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
  
        if (!dentry->d_inode)
                return -EINVAL;
-@@ -997,130 +845,104 @@ ssize_t reiserfs_listxattr(struct dentry
+@@ -997,129 +845,103 @@
            get_inode_sd_version(dentry->d_inode) == STAT_DATA_V1)
                return -EOPNOTSUPP;
  
@@ -1042558,7 +1042519,9 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +      mutex_unlock(&dir->d_inode->i_mutex);
  
 -      REISERFS_I(dentry->d_inode)->i_flags |= i_has_xattr_dir;
--
++      if (!err)
++              err = buf.pos;
 -      err = xattr_readdir(dir->d_inode, reiserfs_listxattr_filler, &buf);
 -      if (err)
 -              goto out_dir;
@@ -1042567,9 +1042530,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -              err = -ERANGE;
 -      else
 -              err = buf.r_pos;
-+      if (!err)
-+              err = buf.pos;
+-
 -      out_dir:
        dput(dir);
 -
@@ -1042582,15 +1042543,17 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -/* This is the implementation for the xattr plugin infrastructure */
 -static LIST_HEAD(xattr_handlers);
 -static DEFINE_RWLOCK(handler_lock);
--
++static int reiserfs_check_acl(struct inode *inode, int mask)
++{
++      struct posix_acl *acl;
++      int error = -EAGAIN; /* do regular unix permission checks by default */
 -static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char
 -                                                              *prefix)
-+static int reiserfs_check_acl(struct inode *inode, int mask)
- {
+-{
 -      struct reiserfs_xattr_handler *xah = NULL;
 -      struct list_head *p;
-+      struct posix_acl *acl;
-+      int error = -EAGAIN; /* do regular unix permission checks by default */
++      acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
  
 -      read_lock(&handler_lock);
 -      list_for_each(p, &xattr_handlers) {
@@ -1042598,8 +1042561,6 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -              if (strncmp(xah->prefix, prefix, strlen(xah->prefix)) == 0)
 -                      break;
 -              xah = NULL;
-+      acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
-+
 +      if (acl) {
 +              if (!IS_ERR(acl)) {
 +                      error = posix_acl_permission(inode, acl, mask);
@@ -1042655,8 +1042616,16 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      if (!list_empty(&xattr_handlers)) {
 -              write_unlock(&handler_lock);
 -              return 0;
--      }
--
++      int err;
++      struct inode *inode = dentry->d_parent->d_inode;
++      mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
++      err = xattr_mkdir(inode, dentry, 0700);
++      mutex_unlock(&inode->i_mutex);
++      if (err) {
++              dput(dentry);
++              dentry = NULL;
+       }
 -      /* Add the handlers */
 -      list_add_tail(&user_handler.handlers, &xattr_handlers);
 -      list_add_tail(&trusted_handler.handlers, &xattr_handlers);
@@ -1042667,7 +1042636,10 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      list_add_tail(&posix_acl_access_handler.handlers, &xattr_handlers);
 -      list_add_tail(&posix_acl_default_handler.handlers, &xattr_handlers);
 -#endif
--
++      if (dentry && dentry->d_inode)
++              reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr "
++                            "storage.\n", PRIVROOT_NAME);
 -      /* Run initializers, if available */
 -      list_for_each(p, &xattr_handlers) {
 -              xah = list_entry(p, struct reiserfs_xattr_handler, handlers);
@@ -1042677,34 +1042649,11 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -                              list_del_init(p);
 -                              break;
 -                      }
--              }
-+      int err;
-+      struct inode *inode = dentry->d_parent->d_inode;
-+      mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
-+      err = xattr_mkdir(inode, dentry, 0700);
-+      mutex_unlock(&inode->i_mutex);
-+      if (err) {
-+              dput(dentry);
-+              dentry = NULL;
-       }
--      /* Clean up other handlers, if any failed */
--      if (err)
--              __unregister_handlers();
-+      if (dentry && dentry->d_inode)
-+              reiserfs_info(dentry->d_sb, "Created %s - reserved for xattr "
-+                            "storage.\n", PRIVROOT_NAME);
--      write_unlock(&handler_lock);
-       return err;
- }
--void reiserfs_xattr_unregister_handlers(void)
++      return err;
++}
++
 +static int xattr_mount_check(struct super_block *s)
- {
--      write_lock(&handler_lock);
--      __unregister_handlers();
--      write_unlock(&handler_lock);
++{
 +      /* We need generation numbers to ensure that the oid mapping is correct
 +       * v3.5 filesystems don't have them. */
 +      if (old_format_only(s)) {
@@ -1042716,21 +1042665,32 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 +                                       "on pre-v3.6 format filesystems. "
 +                                       "Failing mount.");
 +                      return -EOPNOTSUPP;
-+              }
-+      }
-+
+               }
+       }
+-      /* Clean up other handlers, if any failed */
+-      if (err)
+-              __unregister_handlers();
+-
+-      write_unlock(&handler_lock);
+-      return err;
 +      return 0;
  }
  
+-void reiserfs_xattr_unregister_handlers(void)
+-{
+-      write_lock(&handler_lock);
+-      __unregister_handlers();
+-      write_unlock(&handler_lock);
+-}
 +#else
 +int __init reiserfs_xattr_register_handlers(void) { return 0; }
 +void reiserfs_xattr_unregister_handlers(void) {}
 +#endif
-+
  /* This will catch lookups from the fs root to .reiserfs_priv */
  static int
- xattr_lookup_poison(struct dentry *dentry, struct qstr *q1, struct qstr *name)
-@@ -1147,48 +969,23 @@ int reiserfs_xattr_init(struct super_blo
+@@ -1147,48 +969,23 @@
  {
        int err = 0;
  
@@ -1042789,7 +1042749,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
                                dput(dentry);
                                dentry = NULL;
                        }
-@@ -1197,73 +994,41 @@ int reiserfs_xattr_init(struct super_blo
+@@ -1197,73 +994,41 @@
  
                if (!err && dentry) {
                        s->s_root->d_op = &xattr_lookup_poison_ops;
@@ -1042884,9 +1042844,9 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr.c linux-2.6.27.19-5.1/fs/reiserfs/xatt
 -      else
 -              return generic_permission(inode, mask, reiserfs_check_acl);
 -}
-diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_acl.c
---- linux-2.6.27/fs/reiserfs/xattr_acl.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_acl.c        2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr_acl.c
+--- a/fs/reiserfs/xattr_acl.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_acl.c  Wed May 06 16:56:52 2009 +0100
 @@ -10,15 +10,17 @@
  #include <linux/reiserfs_acl.h>
  #include <asm/uaccess.h>
@@ -1042908,7 +1042868,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        if (!reiserfs_posixacl(inode->i_sb))
                return -EOPNOTSUPP;
        if (!is_owner_or_cap(inode))
-@@ -36,7 +38,21 @@ xattr_set_acl(struct inode *inode, int t
+@@ -36,7 +38,21 @@
        } else
                acl = NULL;
  
@@ -1042931,7 +1042891,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
  
        release_and_out:
        posix_acl_release(acl);
-@@ -172,6 +188,29 @@ static void *posix_acl_to_disk(const str
+@@ -172,6 +188,29 @@
        return ERR_PTR(-EINVAL);
  }
  
@@ -1042961,7 +1042921,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
  /*
   * Inode operation get_posix_acl().
   *
-@@ -199,11 +238,11 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -199,11 +238,11 @@
                return ERR_PTR(-EINVAL);
        }
  
@@ -1042978,7 +1042938,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
  
        size = reiserfs_xattr_get(inode, name, NULL, 0);
        if (size < 0) {
-@@ -229,7 +268,7 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -229,7 +268,7 @@
        } else {
                acl = posix_acl_from_disk(value, retval);
                if (!IS_ERR(acl))
@@ -1042987,7 +1042947,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        }
  
        kfree(value);
-@@ -243,12 +282,13 @@ struct posix_acl *reiserfs_get_acl(struc
+@@ -243,12 +282,13 @@
   * BKL held [before 2.5.x]
   */
  static int
@@ -1043003,7 +1042963,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        int error;
        struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
  
-@@ -285,31 +325,28 @@ reiserfs_set_acl(struct inode *inode, in
+@@ -285,31 +325,28 @@
                value = posix_acl_to_disk(acl, &size);
                if (IS_ERR(value))
                        return (int)PTR_ERR(value);
@@ -1043051,7 +1043011,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
  
        return error;
  }
-@@ -317,7 +354,8 @@ reiserfs_set_acl(struct inode *inode, in
+@@ -317,7 +354,8 @@
  /* dir->i_mutex: locked,
   * inode is new and not released into the wild yet */
  int
@@ -1043061,7 +1043021,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
                             struct inode *inode)
  {
        struct posix_acl *acl;
-@@ -335,8 +373,8 @@ reiserfs_inherit_default_acl(struct inod
+@@ -335,8 +373,8 @@
        /* Don't apply ACLs to objects in the .reiserfs_priv tree.. This
         * would be useless since permissions are ignored, and a pain because
         * it introduces locking cycles */
@@ -1043072,7 +1043032,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
                goto apply_umask;
        }
  
-@@ -354,7 +392,8 @@ reiserfs_inherit_default_acl(struct inod
+@@ -354,7 +392,8 @@
  
                /* Copy the default ACL to the default ACL of a new directory */
                if (S_ISDIR(inode->i_mode)) {
@@ -1043082,7 +1043042,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
                        if (err)
                                goto cleanup;
                }
-@@ -375,9 +414,9 @@ reiserfs_inherit_default_acl(struct inod
+@@ -375,9 +414,9 @@
  
                        /* If we need an ACL.. */
                        if (need_acl > 0) {
@@ -1043095,7 +1043055,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
                                if (err)
                                        goto cleanup_copy;
                        }
-@@ -395,25 +434,45 @@ reiserfs_inherit_default_acl(struct inod
+@@ -395,25 +434,45 @@
        return err;
  }
  
@@ -1043156,7 +1043116,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
  }
  
  int reiserfs_acl_chmod(struct inode *inode)
-@@ -429,9 +488,7 @@ int reiserfs_acl_chmod(struct inode *ino
+@@ -429,9 +488,7 @@
                return 0;
        }
  
@@ -1043166,7 +1043126,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        if (!acl)
                return 0;
        if (IS_ERR(acl))
-@@ -442,18 +499,20 @@ int reiserfs_acl_chmod(struct inode *ino
+@@ -442,18 +499,20 @@
                return -ENOMEM;
        error = posix_acl_chmod_masq(clone, inode->i_mode);
        if (!error) {
@@ -1043199,7 +1043159,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        }
        posix_acl_release(clone);
        return error;
-@@ -477,38 +536,22 @@ posix_acl_access_set(struct inode *inode
+@@ -477,38 +536,22 @@
        return xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
  }
  
@@ -1043218,25 +1043178,27 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
 -      }
 -
 -      return 0;
--}
--
++      const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
++      if (!reiserfs_posixacl(inode->i_sb))
++              return 0;
++      if (list && size <= list_size)
++              memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
++      return size;
+ }
 -static int
 -posix_acl_access_list(struct inode *inode, const char *name, int namelen,
 -                    char *out)
 -{
 -      int len = namelen;
-+      const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS);
-       if (!reiserfs_posixacl(inode->i_sb))
-               return 0;
+-      if (!reiserfs_posixacl(inode->i_sb))
+-              return 0;
 -      if (out)
 -              memcpy(out, name, len);
 -
 -      return len;
-+      if (list && size <= list_size)
-+              memcpy(list, POSIX_ACL_XATTR_ACCESS, size);
-+      return size;
- }
+-}
+-
 -struct reiserfs_xattr_handler posix_acl_access_handler = {
 +struct xattr_handler reiserfs_posix_acl_access_handler = {
        .prefix = POSIX_ACL_XATTR_ACCESS,
@@ -1043246,7 +1043208,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
        .list = posix_acl_access_list,
  };
  
-@@ -530,37 +573,21 @@ posix_acl_default_set(struct inode *inod
+@@ -530,37 +573,21 @@
        return xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
  }
  
@@ -1043265,25 +1043227,27 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
 -      }
 -
 -      return 0;
--}
--
++      const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
++      if (!reiserfs_posixacl(inode->i_sb))
++              return 0;
++      if (list && size <= list_size)
++              memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
++      return size;
+ }
 -static int
 -posix_acl_default_list(struct inode *inode, const char *name, int namelen,
 -                     char *out)
 -{
 -      int len = namelen;
-+      const size_t size = sizeof(POSIX_ACL_XATTR_DEFAULT);
-       if (!reiserfs_posixacl(inode->i_sb))
-               return 0;
+-      if (!reiserfs_posixacl(inode->i_sb))
+-              return 0;
 -      if (out)
 -              memcpy(out, name, len);
 -
 -      return len;
-+      if (list && size <= list_size)
-+              memcpy(list, POSIX_ACL_XATTR_DEFAULT, size);
-+      return size;
- }
+-}
+-
 -struct reiserfs_xattr_handler posix_acl_default_handler = {
 +struct xattr_handler reiserfs_posix_acl_default_handler = {
        .prefix = POSIX_ACL_XATTR_DEFAULT,
@@ -1043292,9 +1043256,9 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_acl.c linux-2.6.27.19-5.1/fs/reiserfs/
 -      .del = posix_acl_default_del,
        .list = posix_acl_default_list,
  };
-diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_security.c
---- linux-2.6.27/fs/reiserfs/xattr_security.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_security.c   2009-03-25 16:11:37.000000000 +0000
+diff -r 9608d5473017 fs/reiserfs/xattr_security.c
+--- a/fs/reiserfs/xattr_security.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_security.c     Wed May 06 16:56:52 2009 +0100
 @@ -4,6 +4,7 @@
  #include <linux/pagemap.h>
  #include <linux/xattr.h>
@@ -1043303,7 +1043267,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
  #include <asm/uaccess.h>
  
  static int
-@@ -12,7 +13,7 @@ security_get(struct inode *inode, const 
+@@ -12,7 +13,7 @@
        if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
                return -EINVAL;
  
@@ -1043312,7 +1043276,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
                return -EPERM;
  
        return reiserfs_xattr_get(inode, name, buffer, size);
-@@ -25,41 +26,84 @@ security_set(struct inode *inode, const 
+@@ -25,41 +26,84 @@
        if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
                return -EINVAL;
  
@@ -1043333,27 +1043297,36 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
  
 -      if (is_reiserfs_priv_object(inode))
 -              return -EPERM;
+-
+-      return 0;
+-}
+-
+-static int
+-security_list(struct inode *inode, const char *name, int namelen, char *out)
+-{
+-      int len = namelen;
+-
+-      if (is_reiserfs_priv_object(inode))
 +      if (IS_PRIVATE(inode))
-+              return 0;
+               return 0;
  
--      return 0;
+-      if (out)
+-              memcpy(out, name, len);
 +      if (list && len <= list_len) {
 +              memcpy(list, name, namelen);
 +              list[namelen] = '\0';
 +      }
-+
-+      return len;
+       return len;
  }
  
--static int
--security_list(struct inode *inode, const char *name, int namelen, char *out)
+-struct reiserfs_xattr_handler security_handler = {
 +/* Initializes the security context for a new inode and returns the number
 + * of blocks needed for the transaction. If successful, reiserfs_security
 + * must be released using reiserfs_security_free when the caller is done. */
 +int reiserfs_security_init(struct inode *dir, struct inode *inode,
 +                         struct reiserfs_security_handle *sec)
- {
--      int len = namelen;
++{
 +      int blocks = 0;
 +      int error = security_inode_init_security(inode, dir, &sec->name,
 +                                               &sec->value, &sec->length);
@@ -1043376,9 +1043349,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
 +      }
 +      return blocks;
 +}
--      if (is_reiserfs_priv_object(inode))
--              return 0;
++
 +int reiserfs_security_write(struct reiserfs_transaction_handle *th,
 +                          struct inode *inode,
 +                          struct reiserfs_security_handle *sec)
@@ -1043386,15 +1043357,12 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
 +      int error;
 +      if (strlen(sec->name) < sizeof(XATTR_SECURITY_PREFIX))
 +              return -EINVAL;
--      if (out)
--              memcpy(out, name, len);
++
 +      error = reiserfs_xattr_set_handle(th, inode, sec->name, sec->value,
 +                                        sec->length, XATTR_CREATE);
 +      if (error == -ENODATA || error == -EOPNOTSUPP)
 +              error = 0;
--      return len;
++
 +      return error;
 +}
 +
@@ -1043404,9 +1043372,8 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
 +      kfree(sec->value);
 +      sec->name = NULL;
 +      sec->value = NULL;
- }
--struct reiserfs_xattr_handler security_handler = {
++}
++
 +struct xattr_handler reiserfs_xattr_security_handler = {
        .prefix = XATTR_SECURITY_PREFIX,
        .get = security_get,
@@ -1043414,10 +1043381,10 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_security.c linux-2.6.27.19-5.1/fs/reis
 -      .del = security_del,
        .list = security_list,
  };
-diff -purN linux-2.6.27/fs/reiserfs/xattr_trusted.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_trusted.c
---- linux-2.6.27/fs/reiserfs/xattr_trusted.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_trusted.c    2009-03-25 16:11:37.000000000 +0000
-@@ -13,10 +13,7 @@ trusted_get(struct inode *inode, const c
+diff -r 9608d5473017 fs/reiserfs/xattr_trusted.c
+--- a/fs/reiserfs/xattr_trusted.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_trusted.c      Wed May 06 16:56:52 2009 +0100
+@@ -13,10 +13,7 @@
        if (strlen(name) < sizeof(XATTR_TRUSTED_PREFIX))
                return -EINVAL;
  
@@ -1043429,7 +1043396,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_trusted.c linux-2.6.27.19-5.1/fs/reise
                return -EPERM;
  
        return reiserfs_xattr_get(inode, name, buffer, size);
-@@ -29,50 +26,30 @@ trusted_set(struct inode *inode, const c
+@@ -29,50 +26,30 @@
        if (strlen(name) < sizeof(XATTR_TRUSTED_PREFIX))
                return -EINVAL;
  
@@ -1043490,21 +1043457,21 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_trusted.c linux-2.6.27.19-5.1/fs/reise
 -      .del = trusted_del,
        .list = trusted_list,
  };
-diff -purN linux-2.6.27/fs/reiserfs/xattr_user.c linux-2.6.27.19-5.1/fs/reiserfs/xattr_user.c
---- linux-2.6.27/fs/reiserfs/xattr_user.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/reiserfs/xattr_user.c       2009-03-25 16:11:37.000000000 +0000
-@@ -6,10 +6,6 @@
+diff -r 9608d5473017 fs/reiserfs/xattr_user.c
+--- a/fs/reiserfs/xattr_user.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/reiserfs/xattr_user.c Wed May 06 16:56:52 2009 +0100
+@@ -5,10 +5,6 @@
+ #include <linux/xattr.h>
  #include <linux/reiserfs_xattr.h>
  #include <asm/uaccess.h>
+-
 -#ifdef CONFIG_REISERFS_FS_POSIX_ACL
 -# include <linux/reiserfs_acl.h>
 -#endif
--
  static int
  user_get(struct inode *inode, const char *name, void *buffer, size_t size)
- {
-@@ -25,7 +21,6 @@ static int
+@@ -25,7 +21,6 @@
  user_set(struct inode *inode, const char *name, const void *buffer,
         size_t size, int flags)
  {
@@ -1043512,7 +1043479,7 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_user.c linux-2.6.27.19-5.1/fs/reiserfs
        if (strlen(name) < sizeof(XATTR_USER_PREFIX))
                return -EINVAL;
  
-@@ -34,33 +29,23 @@ user_set(struct inode *inode, const char
+@@ -34,33 +29,23 @@
        return reiserfs_xattr_set(inode, name, buffer, size, flags);
  }
  
@@ -1043522,18 +1043489,18 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_user.c linux-2.6.27.19-5.1/fs/reiserfs
  {
 -      if (strlen(name) < sizeof(XATTR_USER_PREFIX))
 -              return -EINVAL;
--
--      if (!reiserfs_xattrs_user(inode->i_sb))
++      const size_t len = name_len + 1;
+       if (!reiserfs_xattrs_user(inode->i_sb))
 -              return -EOPNOTSUPP;
 -      return 0;
 -}
-+      const size_t len = name_len + 1;
+-
 -static int
 -user_list(struct inode *inode, const char *name, int namelen, char *out)
 -{
 -      int len = namelen;
-       if (!reiserfs_xattrs_user(inode->i_sb))
+-      if (!reiserfs_xattrs_user(inode->i_sb))
                return 0;
 -
 -      if (out)
@@ -1043554,9 +1043521,9 @@ diff -purN linux-2.6.27/fs/reiserfs/xattr_user.c linux-2.6.27.19-5.1/fs/reiserfs
 -      .del = user_del,
        .list = user_list,
  };
-diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
---- linux-2.6.27/fs/select.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/select.c    2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/select.c
+--- a/fs/select.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/select.c      Wed May 06 16:56:52 2009 +0100
 @@ -24,6 +24,7 @@
  #include <linux/fdtable.h>
  #include <linux/fs.h>
@@ -1043565,7 +1043532,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  
  #include <asm/uaccess.h>
  
-@@ -232,6 +233,7 @@ int do_select(int n, fd_set_bits *fds, s
+@@ -232,6 +233,7 @@
                                file = fget_light(i, &fput_needed);
                                if (file) {
                                        f_op = file->f_op;
@@ -1043573,7 +1043540,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
                                        mask = DEFAULT_POLLMASK;
                                        if (f_op && f_op->poll)
                                                mask = (*f_op->poll)(file, retval ? NULL : wait);
-@@ -374,8 +376,8 @@ out_nofds:
+@@ -374,8 +376,8 @@
        return ret;
  }
  
@@ -1043584,7 +1043551,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  {
        s64 timeout = -1;
        struct timeval tv;
-@@ -427,9 +429,9 @@ sticky:
+@@ -427,9 +429,9 @@
  }
  
  #ifdef HAVE_SET_RESTORE_SIGMASK
@@ -1043597,7 +1043564,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  {
        s64 timeout = MAX_SCHEDULE_TIMEOUT;
        sigset_t ksigmask, sigsaved;
-@@ -513,8 +515,9 @@ sticky:
+@@ -513,8 +515,9 @@
   * which has a pointer to the sigset_t itself followed by a size_t containing
   * the sigset size.
   */
@@ -1043609,7 +1043576,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  {
        size_t sigsetsize = 0;
        sigset_t __user *up = NULL;
-@@ -527,7 +530,7 @@ asmlinkage long sys_pselect6(int n, fd_s
+@@ -527,7 +530,7 @@
                        return -EFAULT;
        }
  
@@ -1043618,7 +1043585,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  }
  #endif /* HAVE_SET_RESTORE_SIGMASK */
  
-@@ -560,6 +563,7 @@ static inline unsigned int do_pollfd(str
+@@ -560,6 +563,7 @@
                file = fget_light(fd, &fput_needed);
                mask = POLLNVAL;
                if (file != NULL) {
@@ -1043626,7 +1043593,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
                        mask = DEFAULT_POLLMASK;
                        if (file->f_op && file->f_op->poll)
                                mask = file->f_op->poll(file, pwait);
-@@ -727,8 +731,8 @@ static long do_restart_poll(struct resta
+@@ -727,8 +731,8 @@
        return ret;
  }
  
@@ -1043637,7 +1043604,7 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  {
        s64 timeout_jiffies;
        int ret;
-@@ -761,9 +765,9 @@ asmlinkage long sys_poll(struct pollfd _
+@@ -761,9 +765,9 @@
  }
  
  #ifdef HAVE_SET_RESTORE_SIGMASK
@@ -1043650,13 +1043617,14 @@ diff -purN linux-2.6.27/fs/select.c linux-2.6.27.19-5.1/fs/select.c
  {
        sigset_t ksigmask, sigsaved;
        struct timespec ts;
-diff -purN linux-2.6.27/fs/seq_file.c linux-2.6.27.19-5.1/fs/seq_file.c
---- linux-2.6.27/fs/seq_file.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/seq_file.c  2009-03-25 16:11:39.000000000 +0000
-@@ -54,6 +54,64 @@ int seq_open(struct file *file, const st
+diff -r 9608d5473017 fs/seq_file.c
+--- a/fs/seq_file.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/seq_file.c    Wed May 06 16:56:52 2009 +0100
+@@ -53,6 +53,64 @@
+       return 0;
  }
  EXPORT_SYMBOL(seq_open);
++
 +static int traverse(struct seq_file *m, loff_t offset)
 +{
 +      loff_t pos = 0, index;
@@ -1043714,14 +1043682,14 @@ diff -purN linux-2.6.27/fs/seq_file.c linux-2.6.27.19-5.1/fs/seq_file.c
 +      m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
 +      return !m->buf ? -ENOMEM : -EAGAIN;
 +}
-+
  /**
   *    seq_read -      ->read() method for sequential files.
-  *    @file: the file to read from
-@@ -186,63 +244,6 @@ Efault:
+@@ -185,63 +243,6 @@
+       goto Done;
  }
  EXPORT_SYMBOL(seq_read);
+-
 -static int traverse(struct seq_file *m, loff_t offset)
 -{
 -      loff_t pos = 0, index;
@@ -1043778,11 +1043746,10 @@ diff -purN linux-2.6.27/fs/seq_file.c linux-2.6.27.19-5.1/fs/seq_file.c
 -      m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
 -      return !m->buf ? -ENOMEM : -EAGAIN;
 -}
--
  /**
   *    seq_lseek -     ->llseek() method for sequential files.
-  *    @file: the file in question
-@@ -412,9 +413,7 @@ int seq_path_root(struct seq_file *m, st
+@@ -412,9 +413,7 @@
                char *s = m->buf + m->count;
                char *p;
  
@@ -1043793,10 +1043760,10 @@ diff -purN linux-2.6.27/fs/seq_file.c linux-2.6.27.19-5.1/fs/seq_file.c
                err = PTR_ERR(p);
                if (!IS_ERR(p)) {
                        s = mangle_path(s, p, esc);
-diff -purN linux-2.6.27/fs/signalfd.c linux-2.6.27.19-5.1/fs/signalfd.c
---- linux-2.6.27/fs/signalfd.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/signalfd.c  2009-03-25 16:11:36.000000000 +0000
-@@ -205,8 +205,8 @@ static const struct file_operations sign
+diff -r 9608d5473017 fs/signalfd.c
+--- a/fs/signalfd.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/signalfd.c    Wed May 06 16:56:52 2009 +0100
+@@ -205,8 +205,8 @@
        .read           = signalfd_read,
  };
  
@@ -1043807,7 +1043774,7 @@ diff -purN linux-2.6.27/fs/signalfd.c linux-2.6.27.19-5.1/fs/signalfd.c
  {
        sigset_t sigmask;
        struct signalfd_ctx *ctx;
-@@ -259,8 +259,8 @@ asmlinkage long sys_signalfd4(int ufd, s
+@@ -259,8 +259,8 @@
        return ufd;
  }
  
@@ -1043818,10 +1043785,10 @@ diff -purN linux-2.6.27/fs/signalfd.c linux-2.6.27.19-5.1/fs/signalfd.c
  {
        return sys_signalfd4(ufd, user_mask, sizemask, 0);
  }
-diff -purN linux-2.6.27/fs/smbfs/file.c linux-2.6.27.19-5.1/fs/smbfs/file.c
---- linux-2.6.27/fs/smbfs/file.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/smbfs/file.c        2009-03-25 16:11:35.000000000 +0000
-@@ -297,7 +297,7 @@ static int smb_write_begin(struct file *
+diff -r 9608d5473017 fs/smbfs/file.c
+--- a/fs/smbfs/file.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/smbfs/file.c  Wed May 06 16:56:52 2009 +0100
+@@ -297,7 +297,7 @@
                        struct page **pagep, void **fsdata)
  {
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
@@ -1043830,10 +1043797,10 @@ diff -purN linux-2.6.27/fs/smbfs/file.c linux-2.6.27.19-5.1/fs/smbfs/file.c
        if (!*pagep)
                return -ENOMEM;
        return 0;
-diff -purN linux-2.6.27/fs/splice.c linux-2.6.27.19-5.1/fs/splice.c
---- linux-2.6.27/fs/splice.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/splice.c    2009-03-25 16:11:38.000000000 +0000
-@@ -1434,8 +1434,8 @@ static long vmsplice_to_pipe(struct file
+diff -r 9608d5473017 fs/splice.c
+--- a/fs/splice.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/splice.c      Wed May 06 16:56:52 2009 +0100
+@@ -1434,8 +1434,8 @@
   * Currently we punt and implement it as a normal copy, see pipe_to_user().
   *
   */
@@ -1043844,7 +1043811,7 @@ diff -purN linux-2.6.27/fs/splice.c linux-2.6.27.19-5.1/fs/splice.c
  {
        struct file *file;
        long error;
-@@ -1460,9 +1460,9 @@ asmlinkage long sys_vmsplice(int fd, con
+@@ -1460,9 +1460,9 @@
        return error;
  }
  
@@ -1043857,7 +1043824,7 @@ diff -purN linux-2.6.27/fs/splice.c linux-2.6.27.19-5.1/fs/splice.c
  {
        long error;
        struct file *in, *out;
-@@ -1684,7 +1684,7 @@ static long do_tee(struct file *in, stru
+@@ -1684,7 +1684,7 @@
        return ret;
  }
  
@@ -1043866,9 +1043833,9 @@ diff -purN linux-2.6.27/fs/splice.c linux-2.6.27.19-5.1/fs/splice.c
  {
        struct file *in;
        int error, fput_in;
-diff -purN linux-2.6.27/fs/squashfs/Makefile linux-2.6.27.19-5.1/fs/squashfs/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/Makefile   2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/Makefile     Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,7 @@
 +#
 +# Makefile for the linux squashfs routines.
@@ -1043877,9 +1043844,9 @@ diff -purN linux-2.6.27/fs/squashfs/Makefile linux-2.6.27.19-5.1/fs/squashfs/Mak
 +obj-$(CONFIG_SQUASHFS) += squashfs.o
 +squashfs-y += inode.o
 +squashfs-y += squashfs2_0.o
-diff -purN linux-2.6.27/fs/squashfs/inode.c linux-2.6.27.19-5.1/fs/squashfs/inode.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/inode.c    2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/inode.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/inode.c      Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,2174 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
@@ -1046055,9 +1046022,9 @@ diff -purN linux-2.6.27/fs/squashfs/inode.c linux-2.6.27.19-5.1/fs/squashfs/inod
 +MODULE_DESCRIPTION("squashfs 3.4, a compressed read-only filesystem");
 +MODULE_AUTHOR("Phillip Lougher <phillip@lougher.demon.co.uk>");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/fs/squashfs/squashfs.h linux-2.6.27.19-5.1/fs/squashfs/squashfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/squashfs.h 2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/squashfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/squashfs.h   Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,86 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
@@ -1046145,9 +1046112,9 @@ diff -purN linux-2.6.27/fs/squashfs/squashfs.h linux-2.6.27.19-5.1/fs/squashfs/s
 +      return 0;
 +}
 +#endif
-diff -purN linux-2.6.27/fs/squashfs/squashfs2_0.c linux-2.6.27.19-5.1/fs/squashfs/squashfs2_0.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/squashfs/squashfs2_0.c      2009-03-25 16:11:38.000000000 +0000
+diff -r 9608d5473017 fs/squashfs/squashfs2_0.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/squashfs/squashfs2_0.c        Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,740 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
@@ -1046889,10 +1046856,10 @@ diff -purN linux-2.6.27/fs/squashfs/squashfs2_0.c linux-2.6.27.19-5.1/fs/squashf
 +
 +      return 1;
 +}
-diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
---- linux-2.6.27/fs/stat.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/stat.c      2009-03-25 16:11:39.000000000 +0000
-@@ -152,7 +152,7 @@ static int cp_old_stat(struct kstat *sta
+diff -r 9608d5473017 fs/stat.c
+--- a/fs/stat.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/stat.c        Wed May 06 16:56:52 2009 +0100
+@@ -152,7 +152,7 @@
        return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
  }
  
@@ -1046901,7 +1046868,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
-@@ -162,7 +162,8 @@ asmlinkage long sys_stat(char __user * f
+@@ -162,7 +162,8 @@
  
        return error;
  }
@@ -1046911,7 +1046878,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
-@@ -172,7 +173,8 @@ asmlinkage long sys_lstat(char __user * 
+@@ -172,7 +173,8 @@
  
        return error;
  }
@@ -1046921,7 +1046888,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_fstat(fd, &stat);
-@@ -235,7 +237,7 @@ static int cp_new_stat(struct kstat *sta
+@@ -235,7 +237,7 @@
        return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
  }
  
@@ -1046930,7 +1046897,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_stat_fd(AT_FDCWD, filename, &stat);
-@@ -246,7 +248,7 @@ asmlinkage long sys_newstat(char __user 
+@@ -246,7 +248,7 @@
        return error;
  }
  
@@ -1046939,7 +1046906,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_lstat_fd(AT_FDCWD, filename, &stat);
-@@ -258,8 +260,8 @@ asmlinkage long sys_newlstat(char __user
+@@ -258,8 +260,8 @@
  }
  
  #if !defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_SYS_NEWFSTATAT)
@@ -1046950,7 +1046917,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = -EINVAL;
-@@ -280,7 +282,7 @@ out:
+@@ -280,7 +282,7 @@
  }
  #endif
  
@@ -1046959,7 +1046926,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_fstat(fd, &stat);
-@@ -291,8 +293,8 @@ asmlinkage long sys_newfstat(unsigned in
+@@ -291,8 +293,8 @@
        return error;
  }
  
@@ -1046970,7 +1046937,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct path path;
        int error;
-@@ -306,7 +308,7 @@ asmlinkage long sys_readlinkat(int dfd, 
+@@ -306,7 +308,7 @@
  
                error = -EINVAL;
                if (inode->i_op && inode->i_op->readlink) {
@@ -1046979,7 +1046946,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
                        if (!error) {
                                touch_atime(path.mnt, path.dentry);
                                error = inode->i_op->readlink(path.dentry,
-@@ -318,8 +320,8 @@ asmlinkage long sys_readlinkat(int dfd, 
+@@ -318,8 +320,8 @@
        return error;
  }
  
@@ -1046990,7 +1046957,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        return sys_readlinkat(AT_FDCWD, path, buf, bufsiz);
  }
-@@ -365,7 +367,7 @@ static long cp_new_stat64(struct kstat *
+@@ -365,7 +367,7 @@
        return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
  }
  
@@ -1046999,7 +1046966,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_stat(filename, &stat);
-@@ -375,7 +377,8 @@ asmlinkage long sys_stat64(char __user *
+@@ -375,7 +377,8 @@
  
        return error;
  }
@@ -1047009,7 +1046976,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_lstat(filename, &stat);
-@@ -385,7 +388,8 @@ asmlinkage long sys_lstat64(char __user 
+@@ -385,7 +388,8 @@
  
        return error;
  }
@@ -1047019,7 +1046986,7 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = vfs_fstat(fd, &stat);
-@@ -396,8 +400,8 @@ asmlinkage long sys_fstat64(unsigned lon
+@@ -396,8 +400,8 @@
        return error;
  }
  
@@ -1047030,10 +1046997,10 @@ diff -purN linux-2.6.27/fs/stat.c linux-2.6.27.19-5.1/fs/stat.c
  {
        struct kstat stat;
        int error = -EINVAL;
-diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
---- linux-2.6.27/fs/super.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/super.c     2009-03-25 16:11:37.000000000 +0000
-@@ -534,7 +534,7 @@ rescan:
+diff -r 9608d5473017 fs/super.c
+--- a/fs/super.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/super.c       Wed May 06 16:56:52 2009 +0100
+@@ -534,7 +534,7 @@
        return NULL;
  }
  
@@ -1047042,7 +1047009,7 @@ diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
  {
          struct super_block *s;
          struct ustat tmp;
-@@ -597,16 +597,10 @@ retry:
+@@ -597,16 +597,10 @@
        file_list_unlock();
  }
  
@@ -1047063,7 +1047030,7 @@ diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
  {
        int retval;
        int remount_rw;
-@@ -617,13 +611,14 @@ int do_remount_sb(struct super_block *sb
+@@ -617,13 +611,14 @@
  #endif
        if (flags & MS_RDONLY)
                acct_auto_close(sb);
@@ -1047080,10 +1047047,12 @@ diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
                        mark_files_ro(sb);
                else if (!fs_may_remount_ro(sb))
                        return -EBUSY;
-@@ -646,6 +641,21 @@ int do_remount_sb(struct super_block *sb
+@@ -644,6 +639,21 @@
+       if (remount_rw)
+               DQUOT_ON_REMOUNT(sb);
        return 0;
- }
++}
++
 +/**
 + *    do_remount_sb - asks filesystem to change mount options.
 + *    @sb:    superblock in question
@@ -1047097,12 +1047066,10 @@ diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
 +{
 +      return __do_remount_sb(sb, flags, data,
 +                      REMOUNT_SHRINK_DCACHE|(force? REMOUNT_FORCE : 0));
-+}
-+
+ }
  static void do_emergency_remount(unsigned long foo)
- {
-       struct super_block *sb;
-@@ -877,7 +887,7 @@ int get_sb_single(struct file_system_typ
+@@ -877,7 +887,7 @@
                }
                s->s_flags |= MS_ACTIVE;
        }
@@ -1047111,10 +1047078,10 @@ diff -purN linux-2.6.27/fs/super.c linux-2.6.27.19-5.1/fs/super.c
        return simple_set_mnt(mnt, s);
  }
  
-diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
---- linux-2.6.27/fs/sync.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sync.c      2009-03-25 16:11:39.000000000 +0000
-@@ -36,7 +36,7 @@ static void do_sync(unsigned long wait)
+diff -r 9608d5473017 fs/sync.c
+--- a/fs/sync.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/sync.c        Wed May 06 16:56:52 2009 +0100
+@@ -36,7 +36,7 @@
                laptop_sync_completion();
  }
  
@@ -1047123,7 +1047090,7 @@ diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
  {
        do_sync(1);
        return 0;
-@@ -118,12 +118,12 @@ static long __do_fsync(unsigned int fd, 
+@@ -118,12 +118,12 @@
        return ret;
  }
  
@@ -1047138,7 +1047105,7 @@ diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
  {
        return __do_fsync(fd, 1);
  }
-@@ -175,8 +175,8 @@ asmlinkage long sys_fdatasync(unsigned i
+@@ -175,8 +175,8 @@
   * already-instantiated disk blocks, there are no guarantees here that the data
   * will be available after a crash.
   */
@@ -1047149,7 +1047116,7 @@ diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
  {
        int ret;
        struct file *file;
-@@ -236,14 +236,32 @@ out_put:
+@@ -236,14 +236,32 @@
  out:
        return ret;
  }
@@ -1047184,7 +1047151,7 @@ diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
  
  /*
   * `endbyte' is inclusive
-@@ -269,7 +287,7 @@ int do_sync_mapping_range(struct address
+@@ -269,7 +287,7 @@
  
        if (flags & SYNC_FILE_RANGE_WRITE) {
                ret = __filemap_fdatawrite_range(mapping, offset, endbyte,
@@ -1047193,10 +1047160,10 @@ diff -purN linux-2.6.27/fs/sync.c linux-2.6.27.19-5.1/fs/sync.c
                if (ret < 0)
                        goto out;
        }
-diff -purN linux-2.6.27/fs/sysfs/bin.c linux-2.6.27.19-5.1/fs/sysfs/bin.c
---- linux-2.6.27/fs/sysfs/bin.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/bin.c 2009-03-25 16:11:39.000000000 +0000
-@@ -62,6 +62,9 @@ read(struct file *file, char __user *use
+diff -r 9608d5473017 fs/sysfs/bin.c
+--- a/fs/sysfs/bin.c   Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/bin.c   Wed May 06 16:56:52 2009 +0100
+@@ -62,6 +62,9 @@
        loff_t offs = *off;
        int count = min_t(size_t, bytes, PAGE_SIZE);
  
@@ -1047206,20 +1047173,20 @@ diff -purN linux-2.6.27/fs/sysfs/bin.c linux-2.6.27.19-5.1/fs/sysfs/bin.c
        if (size) {
                if (offs > size)
                        return 0;
-@@ -119,6 +122,9 @@ static ssize_t write(struct file *file, 
+@@ -118,6 +121,9 @@
+       int size = dentry->d_inode->i_size;
        loff_t offs = *off;
        int count = min_t(size_t, bytes, PAGE_SIZE);
++
 +      if (!bytes)
 +              return 0;
-+
        if (size) {
                if (offs > size)
-                       return 0;
-diff -purN linux-2.6.27/fs/sysfs/file.c linux-2.6.27.19-5.1/fs/sysfs/file.c
---- linux-2.6.27/fs/sysfs/file.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/file.c        2009-03-25 16:11:39.000000000 +0000
-@@ -16,6 +16,7 @@
+diff -r 9608d5473017 fs/sysfs/file.c
+--- a/fs/sysfs/file.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/file.c  Wed May 06 16:56:52 2009 +0100
+@@ -16,12 +16,16 @@
  #include <linux/slab.h>
  #include <linux/fsnotify.h>
  #include <linux/namei.h>
@@ -1047227,17 +1047194,16 @@ diff -purN linux-2.6.27/fs/sysfs/file.c linux-2.6.27.19-5.1/fs/sysfs/file.c
  #include <linux/poll.h>
  #include <linux/list.h>
  #include <linux/mutex.h>
-@@ -23,6 +24,9 @@
+ #include <asm/uaccess.h>
  
  #include "sysfs.h"
++
 +/* used in crash dumps to help with debugging */
 +static char last_sysfs_file[PATH_MAX];
-+
  /*
   * There's one sysfs_buffer for each open file and one
-  * sysfs_open_dirent for each sysfs_dirent with one or more open
-@@ -328,6 +332,11 @@ static int sysfs_open_file(struct inode 
+@@ -328,6 +332,11 @@
        struct sysfs_buffer *buffer;
        struct sysfs_ops *ops;
        int error = -EACCES;
@@ -1047249,21 +1047215,21 @@ diff -purN linux-2.6.27/fs/sysfs/file.c linux-2.6.27.19-5.1/fs/sysfs/file.c
  
        /* need attr_sd for attr and ops, its parent for kobj */
        if (!sysfs_get_active_two(attr_sd))
-@@ -389,6 +398,11 @@ static int sysfs_open_file(struct inode 
+@@ -387,6 +396,11 @@
+  err_out:
+       sysfs_put_active_two(attr_sd);
        return error;
- }
++}
++
 +void sysfs_printk_last_file(void)
 +{
 +      printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
-+}
-+
+ }
  static int sysfs_release(struct inode *inode, struct file *filp)
- {
-       struct sysfs_dirent *sd = filp->f_path.dentry->d_fsdata;
-diff -purN linux-2.6.27/fs/sysfs/mount.c linux-2.6.27.19-5.1/fs/sysfs/mount.c
---- linux-2.6.27/fs/sysfs/mount.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/sysfs/mount.c       2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/sysfs/mount.c
+--- a/fs/sysfs/mount.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/sysfs/mount.c Wed May 06 16:56:52 2009 +0100
 @@ -22,7 +22,7 @@
  /* Random magic number */
  #define SYSFS_MAGIC 0x62656572
@@ -1047273,10 +1047239,10 @@ diff -purN linux-2.6.27/fs/sysfs/mount.c linux-2.6.27.19-5.1/fs/sysfs/mount.c
  struct super_block * sysfs_sb = NULL;
  struct kmem_cache *sysfs_dir_cachep;
  
-diff -purN linux-2.6.27/fs/timerfd.c linux-2.6.27.19-5.1/fs/timerfd.c
---- linux-2.6.27/fs/timerfd.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/timerfd.c   2009-03-25 16:11:39.000000000 +0000
-@@ -179,7 +179,7 @@ static struct file *timerfd_fget(int fd)
+diff -r 9608d5473017 fs/timerfd.c
+--- a/fs/timerfd.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/timerfd.c     Wed May 06 16:56:52 2009 +0100
+@@ -179,7 +179,7 @@
        return file;
  }
  
@@ -1047285,7 +1047251,7 @@ diff -purN linux-2.6.27/fs/timerfd.c linux-2.6.27.19-5.1/fs/timerfd.c
  {
        int ufd;
        struct timerfd_ctx *ctx;
-@@ -210,9 +210,9 @@ asmlinkage long sys_timerfd_create(int c
+@@ -210,9 +210,9 @@
        return ufd;
  }
  
@@ -1047298,7 +1047264,7 @@ diff -purN linux-2.6.27/fs/timerfd.c linux-2.6.27.19-5.1/fs/timerfd.c
  {
        struct file *file;
        struct timerfd_ctx *ctx;
-@@ -267,7 +267,7 @@ asmlinkage long sys_timerfd_settime(int 
+@@ -267,7 +267,7 @@
        return 0;
  }
  
@@ -1047307,10 +1047273,10 @@ diff -purN linux-2.6.27/fs/timerfd.c linux-2.6.27.19-5.1/fs/timerfd.c
  {
        struct file *file;
        struct timerfd_ctx *ctx;
-diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
---- linux-2.6.27/fs/ubifs/file.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/ubifs/file.c        2009-03-25 16:11:32.000000000 +0000
-@@ -213,7 +213,8 @@ static void release_existing_page_budget
+diff -r 9608d5473017 fs/ubifs/file.c
+--- a/fs/ubifs/file.c  Wed May 06 15:47:13 2009 +0100
++++ b/fs/ubifs/file.c  Wed May 06 16:56:52 2009 +0100
+@@ -213,7 +213,8 @@
  }
  
  static int write_begin_slow(struct address_space *mapping,
@@ -1047320,7 +1047286,7 @@ diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
  {
        struct inode *inode = mapping->host;
        struct ubifs_info *c = inode->i_sb->s_fs_info;
-@@ -241,7 +242,7 @@ static int write_begin_slow(struct addre
+@@ -241,7 +242,7 @@
        if (unlikely(err))
                return err;
  
@@ -1047329,7 +1047295,7 @@ diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
        if (unlikely(!page)) {
                ubifs_release_budget(c, &req);
                return -ENOMEM;
-@@ -432,7 +433,7 @@ static int ubifs_write_begin(struct file
+@@ -432,7 +433,7 @@
                return -EROFS;
  
        /* Try out the fast-path part first */
@@ -1047338,7 +1047304,7 @@ diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
        if (unlikely(!page))
                return -ENOMEM;
  
-@@ -477,7 +478,7 @@ static int ubifs_write_begin(struct file
+@@ -477,7 +478,7 @@
                unlock_page(page);
                page_cache_release(page);
  
@@ -1047347,9 +1047313,9 @@ diff -purN linux-2.6.27/fs/ubifs/file.c linux-2.6.27.19-5.1/fs/ubifs/file.c
        }
  
        /*
-diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
---- linux-2.6.27/fs/utimes.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/utimes.c    2009-03-25 16:11:39.000000000 +0000
+diff -r 9608d5473017 fs/utimes.c
+--- a/fs/utimes.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/utimes.c      Wed May 06 16:56:52 2009 +0100
 @@ -24,7 +24,7 @@
   * must be owner or have write permission.
   * Else, update from *times, must be owner or super user.
@@ -1047359,7 +1047325,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
  {
        struct timespec tv[2];
  
-@@ -48,7 +48,8 @@ static bool nsec_valid(long nsec)
+@@ -48,7 +48,8 @@
        return nsec >= 0 && nsec <= 999999999;
  }
  
@@ -1047369,7 +1047335,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
  {
        int error;
        struct iattr newattrs;
-@@ -102,7 +103,7 @@ static int utimes_common(struct path *pa
+@@ -102,7 +103,7 @@
                }
        }
        mutex_lock(&inode->i_mutex);
@@ -1047378,7 +1047344,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
        mutex_unlock(&inode->i_mutex);
  
  mnt_drop_write_and_out:
-@@ -149,7 +150,7 @@ long do_utimes(int dfd, char __user *fil
+@@ -149,7 +150,7 @@
                if (!file)
                        goto out;
  
@@ -1047387,7 +1047353,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
                fput(file);
        } else {
                struct path path;
-@@ -162,7 +163,7 @@ long do_utimes(int dfd, char __user *fil
+@@ -162,7 +163,7 @@
                if (error)
                        goto out;
  
@@ -1047396,7 +1047362,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
                path_put(&path);
        }
  
-@@ -170,7 +171,8 @@ out:
+@@ -170,7 +171,8 @@
        return error;
  }
  
@@ -1047406,7 +1047372,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
  {
        struct timespec tstimes[2];
  
-@@ -187,7 +189,8 @@ asmlinkage long sys_utimensat(int dfd, c
+@@ -187,7 +189,8 @@
        return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags);
  }
  
@@ -1047416,7 +1047382,7 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
  {
        struct timeval times[2];
        struct timespec tstimes[2];
-@@ -214,7 +217,8 @@ asmlinkage long sys_futimesat(int dfd, c
+@@ -214,7 +217,8 @@
        return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0);
  }
  
@@ -1047426,10 +1047392,10 @@ diff -purN linux-2.6.27/fs/utimes.c linux-2.6.27.19-5.1/fs/utimes.c
  {
        return sys_futimesat(AT_FDCWD, filename, utimes);
  }
-diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
---- linux-2.6.27/fs/xattr.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xattr.c     2009-03-25 16:11:37.000000000 +0000
-@@ -67,8 +67,8 @@ xattr_permission(struct inode *inode, co
+diff -r 9608d5473017 fs/xattr.c
+--- a/fs/xattr.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xattr.c       Wed May 06 16:56:52 2009 +0100
+@@ -67,8 +67,8 @@
  }
  
  int
@@ -1047440,7 +1047406,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct inode *inode = dentry->d_inode;
        int error;
-@@ -78,7 +78,7 @@ vfs_setxattr(struct dentry *dentry, cons
+@@ -78,7 +78,7 @@
                return error;
  
        mutex_lock(&inode->i_mutex);
@@ -1047449,7 +1047415,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        if (error)
                goto out;
        error = -EOPNOTSUPP;
-@@ -86,7 +86,7 @@ vfs_setxattr(struct dentry *dentry, cons
+@@ -86,7 +86,7 @@
                error = inode->i_op->setxattr(dentry, name, value, size, flags);
                if (!error) {
                        fsnotify_xattr(dentry);
@@ -1047458,7 +1047424,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
                                                     size, flags);
                }
        } else if (!strncmp(name, XATTR_SECURITY_PREFIX,
-@@ -131,7 +131,8 @@ out_noalloc:
+@@ -131,7 +131,8 @@
  EXPORT_SYMBOL_GPL(xattr_getsecurity);
  
  ssize_t
@@ -1047468,7 +1047434,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct inode *inode = dentry->d_inode;
        int error;
-@@ -140,7 +141,7 @@ vfs_getxattr(struct dentry *dentry, cons
+@@ -140,7 +141,7 @@
        if (error)
                return error;
  
@@ -1047477,7 +1047443,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        if (error)
                return error;
  
-@@ -167,18 +168,20 @@ nolsm:
+@@ -167,18 +168,20 @@
  EXPORT_SYMBOL_GPL(vfs_getxattr);
  
  ssize_t
@@ -1047504,7 +1047470,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
                if (size && error > size)
                        error = -ERANGE;
        }
-@@ -187,7 +190,8 @@ vfs_listxattr(struct dentry *d, char *li
+@@ -187,7 +190,8 @@
  EXPORT_SYMBOL_GPL(vfs_listxattr);
  
  int
@@ -1047514,7 +1047480,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct inode *inode = dentry->d_inode;
        int error;
-@@ -199,7 +203,7 @@ vfs_removexattr(struct dentry *dentry, c
+@@ -199,7 +203,7 @@
        if (error)
                return error;
  
@@ -1047523,7 +1047489,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        if (error)
                return error;
  
-@@ -218,8 +222,8 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
+@@ -218,8 +222,8 @@
   * Extended attribute SET operations
   */
  static long
@@ -1047534,7 +1047500,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        int error;
        void *kvalue = NULL;
-@@ -246,14 +250,14 @@ setxattr(struct dentry *d, const char __
+@@ -246,14 +250,14 @@
                }
        }
  
@@ -1047553,7 +1047519,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        int error;
-@@ -263,16 +267,16 @@ sys_setxattr(const char __user *pathname
+@@ -263,16 +267,16 @@
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -1047574,7 +1047540,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        int error;
-@@ -282,16 +286,15 @@ sys_lsetxattr(const char __user *pathnam
+@@ -282,16 +286,15 @@
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -1047594,7 +1047560,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct file *f;
        struct dentry *dentry;
-@@ -302,9 +305,10 @@ sys_fsetxattr(int fd, const char __user 
+@@ -302,9 +305,10 @@
                return error;
        dentry = f->f_path.dentry;
        audit_inode(NULL, dentry);
@@ -1047607,7 +1047573,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
                mnt_drop_write(f->f_path.mnt);
        }
        fput(f);
-@@ -315,8 +319,8 @@ sys_fsetxattr(int fd, const char __user 
+@@ -315,8 +319,8 @@
   * Extended attribute GET operations
   */
  static ssize_t
@@ -1047618,7 +1047584,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        ssize_t error;
        void *kvalue = NULL;
-@@ -336,7 +340,7 @@ getxattr(struct dentry *d, const char __
+@@ -336,7 +340,7 @@
                        return -ENOMEM;
        }
  
@@ -1047627,7 +1047593,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        if (error > 0) {
                if (size && copy_to_user(value, kvalue, error))
                        error = -EFAULT;
-@@ -349,9 +353,8 @@ getxattr(struct dentry *d, const char __
+@@ -349,9 +353,8 @@
        return error;
  }
  
@@ -1047639,7 +1047605,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        ssize_t error;
-@@ -359,14 +362,13 @@ sys_getxattr(const char __user *pathname
+@@ -359,14 +362,13 @@
        error = user_path(pathname, &path);
        if (error)
                return error;
@@ -1047657,7 +1047623,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        ssize_t error;
-@@ -374,13 +376,13 @@ sys_lgetxattr(const char __user *pathnam
+@@ -374,13 +376,13 @@
        error = user_lpath(pathname, &path);
        if (error)
                return error;
@@ -1047674,7 +1047640,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct file *f;
        ssize_t error = -EBADF;
-@@ -389,7 +391,7 @@ sys_fgetxattr(int fd, const char __user 
+@@ -389,7 +391,7 @@
        if (!f)
                return error;
        audit_inode(NULL, f->f_path.dentry);
@@ -1047683,7 +1047649,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        fput(f);
        return error;
  }
-@@ -398,7 +400,8 @@ sys_fgetxattr(int fd, const char __user 
+@@ -398,7 +400,8 @@
   * Extended attribute LIST operations
   */
  static ssize_t
@@ -1047693,7 +1047659,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        ssize_t error;
        char *klist = NULL;
-@@ -411,7 +414,7 @@ listxattr(struct dentry *d, char __user 
+@@ -411,7 +414,7 @@
                        return -ENOMEM;
        }
  
@@ -1047702,7 +1047668,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        if (error > 0) {
                if (size && copy_to_user(list, klist, error))
                        error = -EFAULT;
-@@ -424,8 +427,8 @@ listxattr(struct dentry *d, char __user 
+@@ -424,8 +427,8 @@
        return error;
  }
  
@@ -1047713,7 +1047679,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        ssize_t error;
-@@ -433,13 +436,13 @@ sys_listxattr(const char __user *pathnam
+@@ -433,13 +436,13 @@
        error = user_path(pathname, &path);
        if (error)
                return error;
@@ -1047730,7 +1047696,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        ssize_t error;
-@@ -447,13 +450,12 @@ sys_llistxattr(const char __user *pathna
+@@ -447,13 +450,12 @@
        error = user_lpath(pathname, &path);
        if (error)
                return error;
@@ -1047746,7 +1047712,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct file *f;
        ssize_t error = -EBADF;
-@@ -462,7 +464,7 @@ sys_flistxattr(int fd, char __user *list
+@@ -462,7 +464,7 @@
        if (!f)
                return error;
        audit_inode(NULL, f->f_path.dentry);
@@ -1047755,7 +1047721,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
        fput(f);
        return error;
  }
-@@ -471,7 +473,8 @@ sys_flistxattr(int fd, char __user *list
+@@ -471,7 +473,8 @@
   * Extended attribute REMOVE operations
   */
  static long
@@ -1047765,7 +1047731,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        int error;
        char kname[XATTR_NAME_MAX + 1];
-@@ -482,11 +485,11 @@ removexattr(struct dentry *d, const char
+@@ -482,11 +485,11 @@
        if (error < 0)
                return error;
  
@@ -1047780,7 +1047746,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        int error;
-@@ -496,15 +499,15 @@ sys_removexattr(const char __user *pathn
+@@ -496,15 +499,15 @@
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -1047799,7 +1047765,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct path path;
        int error;
-@@ -514,15 +517,14 @@ sys_lremovexattr(const char __user *path
+@@ -514,15 +517,14 @@
                return error;
        error = mnt_want_write(path.mnt);
        if (!error) {
@@ -1047817,7 +1047783,7 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
  {
        struct file *f;
        struct dentry *dentry;
-@@ -533,9 +535,9 @@ sys_fremovexattr(int fd, const char __us
+@@ -533,9 +535,9 @@
                return error;
        dentry = f->f_path.dentry;
        audit_inode(NULL, dentry);
@@ -1047829,13 +1047795,14 @@ diff -purN linux-2.6.27/fs/xattr.c linux-2.6.27.19-5.1/fs/xattr.c
                mnt_drop_write(f->f_path.mnt);
        }
        fput(f);
-diff -purN linux-2.6.27/fs/xfs/Kconfig linux-2.6.27.19-5.1/fs/xfs/Kconfig
---- linux-2.6.27/fs/xfs/Kconfig        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/Kconfig 2009-03-25 16:11:35.000000000 +0000
-@@ -35,6 +35,19 @@ config XFS_QUOTA
+diff -r 9608d5473017 fs/xfs/Kconfig
+--- a/fs/xfs/Kconfig   Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/Kconfig   Wed May 06 16:56:52 2009 +0100
+@@ -34,6 +34,19 @@
+         README.quota in the xfsprogs package.  XFS quota can be used either
          with or without the generic quota support enabled (CONFIG_QUOTA) -
          they are completely independent subsystems.
++
 +config XFS_DMAPI
 +      tristate "XFS DMAPI support"
 +      depends on XFS_FS
@@ -1047848,23 +1047815,22 @@ diff -purN linux-2.6.27/fs/xfs/Kconfig linux-2.6.27.19-5.1/fs/xfs/Kconfig
 +        storage management systems.
 +
 +        If unsure, say N.
-+
  config XFS_POSIX_ACL
        bool "XFS POSIX ACL support"
-       depends on XFS_FS
-diff -purN linux-2.6.27/fs/xfs/Makefile linux-2.6.27.19-5.1/fs/xfs/Makefile
---- linux-2.6.27/fs/xfs/Makefile       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/Makefile        2009-03-25 16:11:35.000000000 +0000
-@@ -38,6 +38,8 @@ ifeq ($(CONFIG_XFS_QUOTA),y)
+diff -r 9608d5473017 fs/xfs/Makefile
+--- a/fs/xfs/Makefile  Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/Makefile  Wed May 06 16:56:52 2009 +0100
+@@ -37,6 +37,8 @@
+ ifeq ($(CONFIG_XFS_QUOTA),y)
  xfs-$(CONFIG_PROC_FS)         += quota/xfs_qm_stats.o
  endif
-+obj-$(CONFIG_XFS_DMAPI)         += dmapi/
 +
++obj-$(CONFIG_XFS_DMAPI)         += dmapi/
  xfs-$(CONFIG_XFS_RT)          += xfs_rtalloc.o
  xfs-$(CONFIG_XFS_POSIX_ACL)   += xfs_acl.o
- xfs-$(CONFIG_PROC_FS)         += $(XFS_LINUX)/xfs_stats.o
-@@ -107,7 +109,8 @@ xfs-y                              += $(addprefix $(XFS_LINUX)/, \
+@@ -107,7 +109,8 @@
                                   xfs_lrw.o \
                                   xfs_super.o \
                                   xfs_vnode.o \
@@ -1047874,9 +1047840,9 @@ diff -purN linux-2.6.27/fs/xfs/Makefile linux-2.6.27.19-5.1/fs/xfs/Makefile
  
  # Objects in support/
  xfs-y                         += $(addprefix support/, \
-diff -purN linux-2.6.27/fs/xfs/dmapi/Makefile linux-2.6.27.19-5.1/fs/xfs/dmapi/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/Makefile  2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/Makefile    Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,28 @@
 +#
 +# Copyright (c) 2006 Silicon Graphics, Inc.
@@ -1047906,9 +1047872,9 @@ diff -purN linux-2.6.27/fs/xfs/dmapi/Makefile linux-2.6.27.19-5.1/fs/xfs/dmapi/M
 +obj-$(CONFIG_XFS_DMAPI)               += xfs_dmapi.o
 +
 +xfs_dmapi-y                   += xfs_dm.o
-diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.c linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.c  2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/xfs_dm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/xfs_dm.c    Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,3337 @@
 +/*
 + * Copyright (c) 2000-2006 Silicon Graphics, Inc.
@@ -1051247,9 +1051213,9 @@ diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.c linux-2.6.27.19-5.1/fs/xfs/dmapi/x
 +
 +module_init(xfs_dm_init);
 +module_exit(xfs_dm_exit);
-diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.h linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/dmapi/xfs_dm.h  2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/dmapi/xfs_dm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/dmapi/xfs_dm.h    Wed May 06 16:56:52 2009 +0100
 @@ -0,0 +1,23 @@
 +/*
 + * Copyright (c) 2006 Silicon Graphics, Inc.
@@ -1051274,10 +1051240,10 @@ diff -purN linux-2.6.27/fs/xfs/dmapi/xfs_dm.h linux-2.6.27.19-5.1/fs/xfs/dmapi/x
 +extern struct file_system_type xfs_fs_type;
 +
 +#endif /* __XFS_DM_H__ */
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_aops.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_aops.c    2009-03-25 16:11:35.000000000 +0000
-@@ -1147,16 +1147,6 @@ error:
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_aops.c
+--- a/fs/xfs/linux-2.6/xfs_aops.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_aops.c      Wed May 06 16:56:53 2009 +0100
+@@ -1147,16 +1147,6 @@
        if (iohead)
                xfs_cancel_ioend(iohead);
  
@@ -1051294,7 +1051260,7 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.27.19-5.1/fs/xfs/l
        return err;
  }
  
-@@ -1185,7 +1175,7 @@ xfs_vm_writepage(
+@@ -1185,7 +1175,7 @@
        struct page             *page,
        struct writeback_control *wbc)
  {
@@ -1051303,15 +1051269,15 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.27.19-5.1/fs/xfs/l
        int                     need_trans;
        int                     delalloc, unmapped, unwritten;
        struct inode            *inode = page->mapping->host;
-@@ -1231,19 +1221,16 @@ xfs_vm_writepage(
+@@ -1231,19 +1221,16 @@
         * to real space and flush out to disk.
         */
        error = xfs_page_state_convert(inode, page, wbc, 1, unmapped);
 -      if (error == -EAGAIN)
--              goto out_fail;
-       if (unlikely(error < 0))
++      if (unlikely(error < 0))
+               goto out_fail;
+-      if (unlikely(error < 0))
 -              goto out_unlock;
-+              goto out_fail;
  
        return 0;
  
@@ -1051326,10 +1051292,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.27.19-5.1/fs/xfs/l
        return error;
  }
  
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.c     2009-03-25 16:11:35.000000000 +0000
-@@ -187,7 +187,7 @@ free_address(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_buf.c
+--- a/fs/xfs/linux-2.6/xfs_buf.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_buf.c       Wed May 06 16:56:53 2009 +0100
+@@ -187,7 +187,7 @@
  {
        a_list_t        *aentry;
  
@@ -1051338,7 +1051304,7 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.27.19-5.1/fs/xfs/li
        /*
         * Xen needs to be able to make sure it can get an exclusive
         * RO mapping of pages it wants to turn into a pagetable.  If
-@@ -1001,12 +1001,13 @@ xfs_buf_iodone_work(
+@@ -1001,12 +1001,13 @@
         * We can get an EOPNOTSUPP to ordered writes.  Here we clear the
         * ordered flag and reissue them.  Because we can't tell the higher
         * layers directly that they should not issue ordered I/O anymore, they
@@ -1051353,7 +1051319,7 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.27.19-5.1/fs/xfs/li
                xfs_buf_iorequest(bp);
        } else if (bp->b_iodone)
                (*(bp->b_iodone))(bp);
-@@ -1113,8 +1114,7 @@ xfs_buf_bio_end_io(
+@@ -1113,8 +1114,7 @@
        unsigned int            blocksize = bp->b_target->bt_bsize;
        struct bio_vec          *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
  
@@ -1051363,10 +1051329,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.c linux-2.6.27.19-5.1/fs/xfs/li
  
        do {
                struct page     *page = bvec->bv_page;
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.h linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.h
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_buf.h     2009-03-25 16:11:35.000000000 +0000
-@@ -85,6 +85,14 @@ typedef enum {
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_buf.h
+--- a/fs/xfs/linux-2.6/xfs_buf.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_buf.h       Wed May 06 16:56:53 2009 +0100
+@@ -85,6 +85,14 @@
         * modifications being lost.
         */
        _XBF_PAGE_LOCKED = (1 << 22),
@@ -1051381,9 +1051347,9 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_buf.h linux-2.6.27.19-5.1/fs/xfs/li
  } xfs_buf_flags_t;
  
  typedef enum {
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_file.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_file.c    2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_file.c
+--- a/fs/xfs/linux-2.6/xfs_file.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_file.c      Wed May 06 16:56:53 2009 +0100
 @@ -43,6 +43,9 @@
  #include <linux/smp_lock.h>
  
@@ -1051394,10 +1051360,11 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/l
  
  STATIC_INLINE ssize_t
  __xfs_file_read(
-@@ -204,6 +207,23 @@ xfs_file_fsync(
+@@ -203,6 +206,23 @@
+       xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED);
        return -xfs_fsync(XFS_I(dentry->d_inode));
  }
++
 +#ifdef HAVE_DMAPI
 +STATIC int
 +xfs_vm_fault(
@@ -1051414,11 +1051381,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/l
 +      return filemap_fault(vma, vmf);
 +}
 +#endif /* HAVE_DMAPI */
-+
  /*
   * Unfortunately we can't just use the clean and simple readdir implementation
-  * below, because nfs might call back into ->lookup from the filldir callback
-@@ -372,6 +392,11 @@ xfs_file_mmap(
+@@ -372,6 +392,11 @@
        vma->vm_ops = &xfs_file_vm_ops;
        vma->vm_flags |= VM_CAN_NONLINEAR;
  
@@ -1051430,10 +1051396,11 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/l
        file_accessed(filp);
        return 0;
  }
-@@ -418,6 +443,47 @@ xfs_file_ioctl_invis(
+@@ -417,6 +442,47 @@
+        */
        return error;
  }
++
 +#ifdef HAVE_DMAPI
 +#ifdef HAVE_VMOP_MPROTECT
 +STATIC int
@@ -1051474,11 +1051441,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/l
 +      return 0;
 +}
 +#endif /* HAVE_FOP_OPEN_EXEC */
-+
  /*
   * mmap()d file has taken write protection fault and is being made
-  * writable. We can set the page state up correctly for a writable
-@@ -487,3 +553,13 @@ static struct vm_operations_struct xfs_f
+@@ -487,3 +553,13 @@
        .fault          = filemap_fault,
        .page_mkwrite   = xfs_vm_page_mkwrite,
  };
@@ -1051492,10 +1051458,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_file.c linux-2.6.27.19-5.1/fs/xfs/l
 +#endif
 +};
 +#endif /* HAVE_DMAPI */
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_iops.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_iops.c    2009-03-25 16:11:35.000000000 +0000
-@@ -601,7 +601,12 @@ xfs_vn_setattr(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_iops.c
+--- a/fs/xfs/linux-2.6/xfs_iops.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_iops.c      Wed May 06 16:56:53 2009 +0100
+@@ -601,7 +601,12 @@
        struct dentry   *dentry,
        struct iattr    *iattr)
  {
@@ -1051509,9 +1051475,9 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.27.19-5.1/fs/xfs/l
  }
  
  /*
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_ksyms.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_ksyms.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_ksyms.c   2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_ksyms.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/fs/xfs/linux-2.6/xfs_ksyms.c     Wed May 06 16:56:53 2009 +0100
 @@ -0,0 +1,99 @@
 +/*
 + * Copyright (c) 2004-2008 Silicon Graphics, Inc.
@@ -1051612,9 +1051578,9 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_ksyms.c linux-2.6.27.19-5.1/fs/xfs/
 +EXPORT_SYMBOL(xfs_attr_list);
 +EXPORT_SYMBOL(kmem_alloc);
 +EXPORT_SYMBOL(xfs_change_file_space);
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_linux.h
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_linux.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_linux.h   2009-03-25 16:11:35.000000000 +0000
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_linux.h
+--- a/fs/xfs/linux-2.6/xfs_linux.h     Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_linux.h     Wed May 06 16:56:53 2009 +0100
 @@ -180,6 +180,10 @@
  #define xfs_itruncate_data(ip, off)   \
        (-vmtruncate(VFS_I(ip), (off)))
@@ -1051626,10 +1051592,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.27.19-5.1/fs/xfs/
  
  /* Move the kernel do_div definition off to one side */
  
-diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_super.c
---- linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/linux-2.6/xfs_super.c   2009-03-25 16:11:35.000000000 +0000
-@@ -1323,7 +1323,7 @@ xfs_fs_remount(
+diff -r 9608d5473017 fs/xfs/linux-2.6/xfs_super.c
+--- a/fs/xfs/linux-2.6/xfs_super.c     Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/linux-2.6/xfs_super.c     Wed May 06 16:56:53 2009 +0100
+@@ -1323,7 +1323,7 @@
        "XFS: mount option \"%s\" not supported for remount\n", p);
                        return -EINVAL;
  #else
@@ -1051638,7 +1051604,7 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c linux-2.6.27.19-5.1/fs/xfs/
  #endif
                }
        }
-@@ -1835,8 +1835,16 @@ xfs_fs_get_sb(
+@@ -1835,8 +1835,16 @@
        void                    *data,
        struct vfsmount         *mnt)
  {
@@ -1051656,7 +1051622,7 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c linux-2.6.27.19-5.1/fs/xfs/
  }
  
  static struct super_operations xfs_super_operations = {
-@@ -1861,13 +1869,14 @@ static struct quotactl_ops xfs_quotactl_
+@@ -1861,13 +1869,14 @@
        .set_xquota             = xfs_fs_setxquota,
  };
  
@@ -1051672,10 +1051638,10 @@ diff -purN linux-2.6.27/fs/xfs/linux-2.6/xfs_super.c linux-2.6.27.19-5.1/fs/xfs/
  
  STATIC int __init
  xfs_alloc_trace_bufs(void)
-diff -purN linux-2.6.27/fs/xfs/xfs_da_btree.c linux-2.6.27.19-5.1/fs/xfs/xfs_da_btree.c
---- linux-2.6.27/fs/xfs/xfs_da_btree.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_da_btree.c  2009-03-25 16:11:35.000000000 +0000
-@@ -1566,11 +1566,14 @@ xfs_da_grow_inode(xfs_da_args_t *args, x
+diff -r 9608d5473017 fs/xfs/xfs_da_btree.c
+--- a/fs/xfs/xfs_da_btree.c    Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_da_btree.c    Wed May 06 16:56:53 2009 +0100
+@@ -1566,11 +1566,14 @@
        int nmap, error, w, count, c, got, i, mapi;
        xfs_trans_t *tp;
        xfs_mount_t *mp;
@@ -1051690,7 +1051656,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_da_btree.c linux-2.6.27.19-5.1/fs/xfs/xfs_da_
        /*
         * For new directories adjust the file offset and block count.
         */
-@@ -1647,6 +1650,8 @@ xfs_da_grow_inode(xfs_da_args_t *args, x
+@@ -1647,6 +1650,8 @@
        }
        if (mapp != &map)
                kmem_free(mapp);
@@ -1051699,10 +1051665,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_da_btree.c linux-2.6.27.19-5.1/fs/xfs/xfs_da_
        *new_blkno = (xfs_dablk_t)bno;
        return 0;
  }
-diff -purN linux-2.6.27/fs/xfs/xfs_dir2.c linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c
---- linux-2.6.27/fs/xfs/xfs_dir2.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c      2009-03-25 16:11:36.000000000 +0000
-@@ -525,11 +525,13 @@ xfs_dir2_grow_inode(
+diff -r 9608d5473017 fs/xfs/xfs_dir2.c
+--- a/fs/xfs/xfs_dir2.c        Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_dir2.c        Wed May 06 16:56:53 2009 +0100
+@@ -525,11 +525,13 @@
        xfs_mount_t     *mp;
        int             nmap;           /* number of bmap entries */
        xfs_trans_t     *tp;
@@ -1051716,7 +1051682,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_dir2.c linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c
        /*
         * Set lowest possible block in the space requested.
         */
-@@ -622,7 +624,11 @@ xfs_dir2_grow_inode(
+@@ -622,7 +624,11 @@
         */
        if (mapp != &map)
                kmem_free(mapp);
@@ -1051728,10 +1051694,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_dir2.c linux-2.6.27.19-5.1/fs/xfs/xfs_dir2.c
        /*
         * Update file's size if this is the data space and it grew.
         */
-diff -purN linux-2.6.27/fs/xfs/xfs_dmops.c linux-2.6.27.19-5.1/fs/xfs/xfs_dmops.c
---- linux-2.6.27/fs/xfs/xfs_dmops.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_dmops.c     2009-03-25 16:11:35.000000000 +0000
-@@ -41,16 +41,29 @@ int
+diff -r 9608d5473017 fs/xfs/xfs_dmops.c
+--- a/fs/xfs/xfs_dmops.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_dmops.c       Wed May 06 16:56:53 2009 +0100
+@@ -41,16 +41,29 @@
  xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
  {
        if (args->flags & XFSMNT_DMAPI) {
@@ -1051765,10 +1051731,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_dmops.c linux-2.6.27.19-5.1/fs/xfs/xfs_dmops.
 +      if (mp->m_dm_ops != &xfs_dmcore_stub)
 +              symbol_put(xfs_dmcore_xfs);
  }
-diff -purN linux-2.6.27/fs/xfs/xfs_inode.c linux-2.6.27.19-5.1/fs/xfs/xfs_inode.c
---- linux-2.6.27/fs/xfs/xfs_inode.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_inode.c     2009-03-25 16:11:36.000000000 +0000
-@@ -1414,7 +1414,7 @@ xfs_itruncate_start(
+diff -r 9608d5473017 fs/xfs/xfs_inode.c
+--- a/fs/xfs/xfs_inode.c       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_inode.c       Wed May 06 16:56:53 2009 +0100
+@@ -1414,7 +1414,7 @@
        mp = ip->i_mount;
  
        /* wait for the completion of any pending DIOs */
@@ -1051777,10 +1051743,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_inode.c linux-2.6.27.19-5.1/fs/xfs/xfs_inode.
                vn_iowait(ip);
  
        /*
-diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
---- linux-2.6.27/fs/xfs/xfs_log.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_log.c       2009-03-25 16:11:35.000000000 +0000
-@@ -563,6 +563,11 @@ xfs_log_mount(
+diff -r 9608d5473017 fs/xfs/xfs_log.c
+--- a/fs/xfs/xfs_log.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_log.c Wed May 06 16:56:53 2009 +0100
+@@ -563,6 +563,11 @@
        }
  
        mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks);
@@ -1051792,7 +1051758,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
  
        /*
         * Initialize the AIL now we have a log.
-@@ -601,6 +606,7 @@ xfs_log_mount(
+@@ -601,6 +606,7 @@
        return 0;
  error:
        xfs_log_unmount_dealloc(mp);
@@ -1051800,7 +1051766,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
        return error;
  }     /* xfs_log_mount */
  
-@@ -1033,11 +1039,12 @@ xlog_iodone(xfs_buf_t *bp)
+@@ -1033,11 +1039,12 @@
        l = iclog->ic_log;
  
        /*
@@ -1051816,7 +1051782,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
                l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER;
                xfs_fs_cmn_err(CE_WARN, l->l_mp,
                                "xlog_iodone: Barriers are no longer supported"
-@@ -1216,7 +1223,9 @@ xlog_alloc_log(xfs_mount_t       *mp,
+@@ -1216,7 +1223,9 @@
        int                     i;
        int                     iclogsize;
  
@@ -1051827,7 +1051793,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
  
        log->l_mp          = mp;
        log->l_targ        = log_target;
-@@ -1248,6 +1257,8 @@ xlog_alloc_log(xfs_mount_t       *mp,
+@@ -1248,6 +1257,8 @@
        xlog_get_iclog_buffer_size(mp, log);
  
        bp = xfs_buf_get_empty(log->l_iclog_size, mp->m_logdev_targp);
@@ -1051836,7 +1051802,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
        XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
        XFS_BUF_SET_BDSTRAT_FUNC(bp, xlog_bdstrat_cb);
        XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
-@@ -1274,13 +1285,17 @@ xlog_alloc_log(xfs_mount_t     *mp,
+@@ -1274,13 +1285,17 @@
        iclogsize = log->l_iclog_size;
        ASSERT(log->l_iclog_size >= 4096);
        for (i=0; i < log->l_iclog_bufs; i++) {
@@ -1051856,7 +1051822,7 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
                if (!XFS_BUF_CPSEMA(bp))
                        ASSERT(0);
                XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
-@@ -1322,6 +1337,25 @@ xlog_alloc_log(xfs_mount_t      *mp,
+@@ -1322,6 +1337,25 @@
        log->l_iclog->ic_prev = prev_iclog;     /* re-write 1st prev ptr */
  
        return log;
@@ -1051882,10 +1051848,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log.c linux-2.6.27.19-5.1/fs/xfs/xfs_log.c
  }     /* xlog_alloc_log */
  
  
-diff -purN linux-2.6.27/fs/xfs/xfs_log_recover.c linux-2.6.27.19-5.1/fs/xfs/xfs_log_recover.c
---- linux-2.6.27/fs/xfs/xfs_log_recover.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_log_recover.c       2009-03-25 16:11:35.000000000 +0000
-@@ -1419,7 +1419,13 @@ xlog_recover_add_to_trans(
+diff -r 9608d5473017 fs/xfs/xfs_log_recover.c
+--- a/fs/xfs/xfs_log_recover.c Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_log_recover.c Wed May 06 16:56:53 2009 +0100
+@@ -1419,7 +1419,13 @@
                return 0;
        item = trans->r_itemq;
        if (item == NULL) {
@@ -1051900,10 +1051866,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_log_recover.c linux-2.6.27.19-5.1/fs/xfs/xfs_
                if (len == sizeof(xfs_trans_header_t))
                        xlog_recover_add_item(&trans->r_itemq);
                memcpy(&trans->r_theader, dp, len); /* d, s, l */
-diff -purN linux-2.6.27/fs/xfs/xfs_mount.h linux-2.6.27.19-5.1/fs/xfs/xfs_mount.h
---- linux-2.6.27/fs/xfs/xfs_mount.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_mount.h     2009-03-25 16:11:35.000000000 +0000
-@@ -341,6 +341,7 @@ typedef struct xfs_mount {
+diff -r 9608d5473017 fs/xfs/xfs_mount.h
+--- a/fs/xfs/xfs_mount.h       Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_mount.h       Wed May 06 16:56:53 2009 +0100
+@@ -341,6 +341,7 @@
        spinlock_t              m_sync_lock;    /* work item list lock */
        int                     m_sync_seq;     /* sync thread generation no. */
        wait_queue_head_t       m_wait_single_sync_task;
@@ -1051911,10 +1051877,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_mount.h linux-2.6.27.19-5.1/fs/xfs/xfs_mount.
  } xfs_mount_t;
  
  /*
-diff -purN linux-2.6.27/fs/xfs/xfs_rename.c linux-2.6.27.19-5.1/fs/xfs/xfs_rename.c
---- linux-2.6.27/fs/xfs/xfs_rename.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/fs/xfs/xfs_rename.c    2009-03-25 16:11:35.000000000 +0000
-@@ -212,7 +212,7 @@ xfs_rename(
+diff -r 9608d5473017 fs/xfs/xfs_rename.c
+--- a/fs/xfs/xfs_rename.c      Wed May 06 15:47:13 2009 +0100
++++ b/fs/xfs/xfs_rename.c      Wed May 06 16:56:54 2009 +0100
+@@ -212,7 +212,7 @@
        if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
                     (target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
                error = XFS_ERROR(EXDEV);
@@ -1051923,10 +1051889,10 @@ diff -purN linux-2.6.27/fs/xfs/xfs_rename.c linux-2.6.27.19-5.1/fs/xfs/xfs_renam
                xfs_trans_cancel(tp, cancel_flags);
                goto std_return;
        }
-diff -purN linux-2.6.27/include/acpi/acdisasm.h linux-2.6.27.19-5.1/include/acpi/acdisasm.h
---- linux-2.6.27/include/acpi/acdisasm.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acdisasm.h        2009-03-25 16:11:52.000000000 +0000
-@@ -186,6 +186,8 @@ extern struct acpi_dmtable_info acpi_dm_
+diff -r 9608d5473017 include/acpi/acdisasm.h
+--- a/include/acpi/acdisasm.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acdisasm.h  Wed May 06 16:56:54 2009 +0100
+@@ -186,6 +186,8 @@
  extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
  extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
  extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
@@ -1051935,7 +1051901,7 @@ diff -purN linux-2.6.27/include/acpi/acdisasm.h linux-2.6.27.19-5.1/include/acpi
  extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
  extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
  extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
-@@ -197,8 +199,10 @@ extern struct acpi_dmtable_info acpi_dm_
+@@ -197,8 +199,10 @@
  extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
  extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
  extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
@@ -1051946,10 +1051912,10 @@ diff -purN linux-2.6.27/include/acpi/acdisasm.h linux-2.6.27.19-5.1/include/acpi
  extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
  extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
  
-diff -purN linux-2.6.27/include/acpi/acglobal.h linux-2.6.27.19-5.1/include/acpi/acglobal.h
---- linux-2.6.27/include/acpi/acglobal.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acglobal.h        2009-03-25 16:11:52.000000000 +0000
-@@ -246,6 +246,7 @@ ACPI_EXTERN u8 acpi_gbl_system_awake_and
+diff -r 9608d5473017 include/acpi/acglobal.h
+--- a/include/acpi/acglobal.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acglobal.h  Wed May 06 16:56:54 2009 +0100
+@@ -246,6 +246,7 @@
  
  extern u8 acpi_gbl_shutdown;
  extern u32 acpi_gbl_startup_flags;
@@ -1051957,10 +1051923,10 @@ diff -purN linux-2.6.27/include/acpi/acglobal.h linux-2.6.27.19-5.1/include/acpi
  extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
  extern const char *acpi_gbl_highest_dstate_names[4];
  extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-diff -purN linux-2.6.27/include/acpi/acpi_bus.h linux-2.6.27.19-5.1/include/acpi/acpi_bus.h
---- linux-2.6.27/include/acpi/acpi_bus.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpi_bus.h        2009-03-25 16:11:52.000000000 +0000
-@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *
+diff -r 9608d5473017 include/acpi/acpi_bus.h
+--- a/include/acpi/acpi_bus.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpi_bus.h  Wed May 06 16:56:54 2009 +0100
+@@ -46,7 +46,7 @@
  acpi_status
  acpi_evaluate_integer(acpi_handle handle,
                      acpi_string pathname,
@@ -1051969,7 +1051935,7 @@ diff -purN linux-2.6.27/include/acpi/acpi_bus.h linux-2.6.27.19-5.1/include/acpi
  acpi_status
  acpi_evaluate_reference(acpi_handle handle,
                        acpi_string pathname,
-@@ -327,6 +327,9 @@ int acpi_bus_get_private_data(acpi_handl
+@@ -327,6 +327,9 @@
  extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
  extern int register_acpi_notifier(struct notifier_block *);
  extern int unregister_acpi_notifier(struct notifier_block *);
@@ -1051979,7 +1051945,7 @@ diff -purN linux-2.6.27/include/acpi/acpi_bus.h linux-2.6.27.19-5.1/include/acpi
  /*
   * External Functions
   */
-@@ -373,6 +376,8 @@ struct acpi_bus_type {
+@@ -373,6 +376,8 @@
  int register_acpi_bus_type(struct acpi_bus_type *);
  int unregister_acpi_bus_type(struct acpi_bus_type *);
  struct device *acpi_get_physical_device(acpi_handle);
@@ -1051988,9 +1051954,9 @@ diff -purN linux-2.6.27/include/acpi/acpi_bus.h linux-2.6.27.19-5.1/include/acpi
  /* helper */
  acpi_handle acpi_get_child(acpi_handle, acpi_integer);
  acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
-diff -purN linux-2.6.27/include/acpi/acpi_drivers.h linux-2.6.27.19-5.1/include/acpi/acpi_drivers.h
---- linux-2.6.27/include/acpi/acpi_drivers.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpi_drivers.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/acpi/acpi_drivers.h
+--- a/include/acpi/acpi_drivers.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpi_drivers.h      Wed May 06 16:56:54 2009 +0100
 @@ -41,6 +41,7 @@
   */
  
@@ -1051999,7 +1051965,7 @@ diff -purN linux-2.6.27/include/acpi/acpi_drivers.h linux-2.6.27.19-5.1/include/
  #define ACPI_PROCESSOR_HID            "ACPI0007"
  #define ACPI_SYSTEM_HID                       "LNXSYSTM"
  #define ACPI_THERMAL_HID              "LNXTHERM"
-@@ -115,12 +116,17 @@ int acpi_processor_set_thermal_limit(acp
+@@ -115,12 +116,17 @@
  /*--------------------------------------------------------------------------
                                    Dock Station
    -------------------------------------------------------------------------- */
@@ -1052018,7 +1051984,7 @@ diff -purN linux-2.6.27/include/acpi/acpi_drivers.h linux-2.6.27.19-5.1/include/
                                        void *context);
  extern void unregister_hotplug_dock_device(acpi_handle handle);
  #else
-@@ -136,7 +142,7 @@ static inline void unregister_dock_notif
+@@ -136,7 +142,7 @@
  {
  }
  static inline int register_hotplug_dock_device(acpi_handle handle,
@@ -1052027,10 +1051993,10 @@ diff -purN linux-2.6.27/include/acpi/acpi_drivers.h linux-2.6.27.19-5.1/include/
                                               void *context)
  {
        return -ENODEV;
-diff -purN linux-2.6.27/include/acpi/acpiosxf.h linux-2.6.27.19-5.1/include/acpi/acpiosxf.h
---- linux-2.6.27/include/acpi/acpiosxf.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/acpiosxf.h        2009-03-25 16:11:52.000000000 +0000
-@@ -193,6 +193,9 @@ acpi_status
+diff -r 9608d5473017 include/acpi/acpiosxf.h
+--- a/include/acpi/acpiosxf.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/acpiosxf.h  Wed May 06 16:56:54 2009 +0100
+@@ -193,6 +193,9 @@
  acpi_os_execute(acpi_execute_type type,
                acpi_osd_exec_callback function, void *context);
  
@@ -1052040,10 +1052006,10 @@ diff -purN linux-2.6.27/include/acpi/acpiosxf.h linux-2.6.27.19-5.1/include/acpi
  void acpi_os_wait_events_complete(void *context);
  
  void acpi_os_sleep(acpi_integer milliseconds);
-diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/actbl1.h
---- linux-2.6.27/include/acpi/actbl1.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/actbl1.h  2009-03-25 16:11:52.000000000 +0000
-@@ -908,7 +908,9 @@ enum acpi_madt_type {
+diff -r 9608d5473017 include/acpi/actbl1.h
+--- a/include/acpi/actbl1.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/actbl1.h    Wed May 06 16:56:54 2009 +0100
+@@ -908,7 +908,9 @@
        ACPI_MADT_TYPE_IO_SAPIC = 6,
        ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
        ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
@@ -1052054,10 +1052020,11 @@ diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/a
  };
  
  /*
-@@ -1009,6 +1011,26 @@ struct acpi_madt_interrupt_source {
+@@ -1008,6 +1010,26 @@
+ /* Flags field above */
  
  #define ACPI_MADT_CPEI_OVERRIDE     (1)
++
 +/* 9: Processor Local X2_APIC (07/2008) */
 +
 +struct acpi_madt_local_x2apic {
@@ -1052077,11 +1052044,10 @@ diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/a
 +      u8 lint;                /* LINTn to which NMI is connected */
 +      u8 reserved[3];
 +};
-+
  /*
   * Common flags fields for MADT subtables
-  */
-@@ -1150,10 +1172,15 @@ struct acpi_table_srat {
+@@ -1150,10 +1172,15 @@
  enum acpi_srat_type {
        ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
        ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
@@ -1052099,7 +1052065,7 @@ diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/a
  
  struct acpi_srat_cpu_affinity {
        struct acpi_subtable_header header;
-@@ -1165,9 +1192,7 @@ struct acpi_srat_cpu_affinity {
+@@ -1165,9 +1192,7 @@
        u32 reserved;           /* Reserved, must be zero */
  };
  
@@ -1052110,10 +1052076,11 @@ diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/a
  
  struct acpi_srat_mem_affinity {
        struct acpi_subtable_header header;
-@@ -1186,6 +1211,20 @@ struct acpi_srat_mem_affinity {
+@@ -1185,6 +1210,20 @@
+ #define ACPI_SRAT_MEM_ENABLED       (1)       /* 00: Use affinity structure */
  #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)    /* 01: Memory region is hot pluggable */
  #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)    /* 02: Memory region is non-volatile */
++
 +/* 2: Processor Local X2_APIC Affinity (07/2008) */
 +
 +struct acpi_srat_x2apic_cpu_affinity {
@@ -1052127,14 +1052094,13 @@ diff -purN linux-2.6.27/include/acpi/actbl1.h linux-2.6.27.19-5.1/include/acpi/a
 +/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
 +
 +#define ACPI_SRAT_CPU_ENABLED       (1)       /* 00: Use affinity structure */
-+
  /*******************************************************************************
   *
-  * TCPA - Trusted Computing Platform Alliance table
-diff -purN linux-2.6.27/include/acpi/actypes.h linux-2.6.27.19-5.1/include/acpi/actypes.h
---- linux-2.6.27/include/acpi/actypes.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/actypes.h 2009-03-25 16:11:52.000000000 +0000
-@@ -1225,8 +1225,8 @@ struct acpi_resource {
+diff -r 9608d5473017 include/acpi/actypes.h
+--- a/include/acpi/actypes.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/actypes.h   Wed May 06 16:56:54 2009 +0100
+@@ -1225,8 +1225,8 @@
  
  #pragma pack()
  
@@ -1052144,9 +1052110,9 @@ diff -purN linux-2.6.27/include/acpi/actypes.h linux-2.6.27.19-5.1/include/acpi/
  #define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
  
  #define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
-diff -purN linux-2.6.27/include/acpi/pdc_intel.h linux-2.6.27.19-5.1/include/acpi/pdc_intel.h
---- linux-2.6.27/include/acpi/pdc_intel.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/pdc_intel.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/acpi/pdc_intel.h
+--- a/include/acpi/pdc_intel.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/pdc_intel.h Wed May 06 16:56:54 2009 +0100
 @@ -14,6 +14,7 @@
  #define ACPI_PDC_SMP_T_SWCOORD                (0x0080)
  #define ACPI_PDC_C_C1_FFH             (0x0100)
@@ -1052163,26 +1052129,27 @@ diff -purN linux-2.6.27/include/acpi/pdc_intel.h linux-2.6.27.19-5.1/include/acp
                                         ACPI_PDC_P_FFH)
  
  #define ACPI_PDC_C_CAPABILITY_SMP     (ACPI_PDC_SMP_C2C3  | \
-diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acpi/processor.h
---- linux-2.6.27/include/acpi/processor.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/acpi/processor.h       2009-03-25 16:11:52.000000000 +0000
-@@ -17,6 +17,12 @@
+diff -r 9608d5473017 include/acpi/processor.h
+--- a/include/acpi/processor.h Wed May 06 15:47:13 2009 +0100
++++ b/include/acpi/processor.h Wed May 06 16:56:54 2009 +0100
+@@ -16,6 +16,12 @@
+ #define ACPI_PROCESSOR_MAX_THROTTLING 16
  #define ACPI_PROCESSOR_MAX_THROTTLE   250     /* 25% */
  #define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4
++
 +#ifdef CONFIG_XEN
 +#define NR_ACPI_CPUS                  (NR_CPUS < 256 ? 256 : NR_CPUS)
 +#else
 +#define NR_ACPI_CPUS                  NR_CPUS
 +#endif /* CONFIG_XEN */
-+
  #define ACPI_PDC_REVISION_ID          0x1
  
- #define ACPI_PSD_REV0_REVISION                0       /* Support for _PSD as in ACPI 3.0 */
-@@ -42,6 +48,17 @@
+@@ -41,6 +47,17 @@
+ /* Power Management */
  
  struct acpi_processor_cx;
++
 +#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
 +struct acpi_csd_package {
 +      acpi_integer num_entries;
@@ -1052193,11 +1052160,10 @@ diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acp
 +      acpi_integer index;
 +} __attribute__ ((packed));
 +#endif
-+
  struct acpi_power_register {
        u8 descriptor;
-       u16 length;
-@@ -74,6 +91,12 @@ struct acpi_processor_cx {
+@@ -74,6 +91,12 @@
        u32 power;
        u32 usage;
        u64 time;
@@ -1052210,7 +1052176,7 @@ diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acp
        struct acpi_processor_cx_policy promotion;
        struct acpi_processor_cx_policy demotion;
        char desc[ACPI_CX_DESC_LEN];
-@@ -304,6 +327,9 @@ static inline void acpi_processor_ppc_ex
+@@ -304,6 +327,9 @@
  {
        return;
  }
@@ -1052220,7 +1052186,7 @@ diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acp
  static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
  {
        static unsigned int printout = 1;
-@@ -316,6 +342,7 @@ static inline int acpi_processor_ppc_has
+@@ -316,6 +342,7 @@
        }
        return 0;
  }
@@ -1052228,7 +1052194,7 @@ diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acp
  #endif                                /* CONFIG_CPU_FREQ */
  
  /* in processor_throttling.c */
-@@ -352,4 +379,120 @@ static inline void acpi_thermal_cpufreq_
+@@ -352,4 +379,120 @@
  }
  #endif
  
@@ -1052349,10 +1052315,10 @@ diff -purN linux-2.6.27/include/acpi/processor.h linux-2.6.27.19-5.1/include/acp
 +#endif /* CONFIG_XEN */
 +
  #endif
-diff -purN linux-2.6.27/include/asm-cris/arch-v32/spinlock.h linux-2.6.27.19-5.1/include/asm-cris/arch-v32/spinlock.h
---- linux-2.6.27/include/asm-cris/arch-v32/spinlock.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-cris/arch-v32/spinlock.h   2009-03-25 16:11:51.000000000 +0000
-@@ -121,6 +121,8 @@ static  inline int __raw_write_trylock(r
+diff -r 9608d5473017 include/asm-cris/arch-v32/spinlock.h
+--- a/include/asm-cris/arch-v32/spinlock.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-cris/arch-v32/spinlock.h     Wed May 06 16:56:54 2009 +0100
+@@ -121,6 +121,8 @@
        return 1;
  }
  
@@ -1052361,10 +1052327,10 @@ diff -purN linux-2.6.27/include/asm-cris/arch-v32/spinlock.h linux-2.6.27.19-5.1
  
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-cris/thread_info.h linux-2.6.27.19-5.1/include/asm-cris/thread_info.h
---- linux-2.6.27/include/asm-cris/thread_info.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-cris/thread_info.h 2009-03-25 16:11:51.000000000 +0000
-@@ -88,6 +88,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-cris/thread_info.h
+--- a/include/asm-cris/thread_info.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-cris/thread_info.h   Wed May 06 16:56:54 2009 +0100
+@@ -88,6 +88,7 @@
  #define TIF_RESTORE_SIGMASK   9       /* restore signal mask in do_signal() */
  #define TIF_POLLING_NRFLAG    16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
  #define TIF_MEMDIE            17
@@ -1052372,7 +1052338,7 @@ diff -purN linux-2.6.27/include/asm-cris/thread_info.h linux-2.6.27.19-5.1/inclu
  
  #define _TIF_SYSCALL_TRACE    (1<<TIF_SYSCALL_TRACE)
  #define _TIF_NOTIFY_RESUME    (1<<TIF_NOTIFY_RESUME)
-@@ -95,6 +96,7 @@ struct thread_info {
+@@ -95,6 +96,7 @@
  #define _TIF_NEED_RESCHED     (1<<TIF_NEED_RESCHED)
  #define _TIF_RESTORE_SIGMASK  (1<<TIF_RESTORE_SIGMASK)
  #define _TIF_POLLING_NRFLAG   (1<<TIF_POLLING_NRFLAG)
@@ -1052380,9 +1052346,9 @@ diff -purN linux-2.6.27/include/asm-cris/thread_info.h linux-2.6.27.19-5.1/inclu
  
  #define _TIF_WORK_MASK                0x0000FFFE      /* work to do on interrupt/exception return */
  #define _TIF_ALLWORK_MASK     0x0000FFFF      /* work to do on any return to u-space */
-diff -purN linux-2.6.27/include/asm-generic/memory_model.h linux-2.6.27.19-5.1/include/asm-generic/memory_model.h
---- linux-2.6.27/include/asm-generic/memory_model.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/memory_model.h     2009-03-25 16:11:46.000000000 +0000
+diff -r 9608d5473017 include/asm-generic/memory_model.h
+--- a/include/asm-generic/memory_model.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/memory_model.h       Wed May 06 16:56:54 2009 +0100
 @@ -34,7 +34,7 @@
  
  #define __pfn_to_page(pfn)                    \
@@ -1052392,10 +1052358,10 @@ diff -purN linux-2.6.27/include/asm-generic/memory_model.h linux-2.6.27.19-5.1/i
        NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\
  })
  
-diff -purN linux-2.6.27/include/asm-generic/pci.h linux-2.6.27.19-5.1/include/asm-generic/pci.h
---- linux-2.6.27/include/asm-generic/pci.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/pci.h      2009-03-25 16:11:46.000000000 +0000
-@@ -43,7 +43,9 @@ pcibios_select_root(struct pci_dev *pdev
+diff -r 9608d5473017 include/asm-generic/pci.h
+--- a/include/asm-generic/pci.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/pci.h        Wed May 06 16:56:54 2009 +0100
+@@ -43,7 +43,9 @@
        return root;
  }
  
@@ -1052405,10 +1052371,10 @@ diff -purN linux-2.6.27/include/asm-generic/pci.h linux-2.6.27.19-5.1/include/as
  
  #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
  static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
-diff -purN linux-2.6.27/include/asm-generic/siginfo.h linux-2.6.27.19-5.1/include/asm-generic/siginfo.h
---- linux-2.6.27/include/asm-generic/siginfo.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/siginfo.h  2009-03-25 16:11:46.000000000 +0000
-@@ -224,6 +224,12 @@ typedef struct siginfo {
+diff -r 9608d5473017 include/asm-generic/siginfo.h
+--- a/include/asm-generic/siginfo.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/siginfo.h    Wed May 06 16:56:54 2009 +0100
+@@ -224,6 +224,12 @@
  #define NSIGPOLL      6
  
  /*
@@ -1052421,9 +1052387,9 @@ diff -purN linux-2.6.27/include/asm-generic/siginfo.h linux-2.6.27.19-5.1/includ
   * sigevent definitions
   * 
   * It seems likely that SIGEV_THREAD will have to be handled from 
-diff -purN linux-2.6.27/include/asm-generic/vmlinux.lds.h linux-2.6.27.19-5.1/include/asm-generic/vmlinux.lds.h
---- linux-2.6.27/include/asm-generic/vmlinux.lds.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-generic/vmlinux.lds.h      2009-03-25 16:11:46.000000000 +0000
+diff -r 9608d5473017 include/asm-generic/vmlinux.lds.h
+--- a/include/asm-generic/vmlinux.lds.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-generic/vmlinux.lds.h        Wed May 06 16:56:54 2009 +0100
 @@ -52,7 +52,10 @@
        . = ALIGN(8);                                                   \
        VMLINUX_SYMBOL(__start___markers) = .;                          \
@@ -1052470,10 +1052436,11 @@ diff -purN linux-2.6.27/include/asm-generic/vmlinux.lds.h linux-2.6.27.19-5.1/in
  
  #define INIT_TEXT                                                     \
        *(.init.text)                                                   \
-@@ -291,6 +305,26 @@
+@@ -290,6 +304,26 @@
+       DEV_DISCARD(exit.text)                                          \
        CPU_DISCARD(exit.text)                                          \
        MEM_DISCARD(exit.text)
++
 +#ifdef CONFIG_STACK_UNWIND
 +#define EH_FRAME                                                      \
 +              /* Unwind data binary search table */                   \
@@ -1052493,14 +1052460,13 @@ diff -purN linux-2.6.27/include/asm-generic/vmlinux.lds.h linux-2.6.27.19-5.1/in
 +#else
 +#define EH_FRAME
 +#endif
-+
                /* DWARF debug sections.
                Symbols in the DWARF debugging sections are relative to
-               the beginning of the section so we begin them at 0.  */
-diff -purN linux-2.6.27/include/asm-m32r/spinlock.h linux-2.6.27.19-5.1/include/asm-m32r/spinlock.h
---- linux-2.6.27/include/asm-m32r/spinlock.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m32r/spinlock.h    2009-03-25 16:11:46.000000000 +0000
-@@ -316,6 +316,9 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 include/asm-m32r/spinlock.h
+--- a/include/asm-m32r/spinlock.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m32r/spinlock.h      Wed May 06 16:56:54 2009 +0100
+@@ -316,6 +316,9 @@
        return 0;
  }
  
@@ -1052510,9 +1052476,9 @@ diff -purN linux-2.6.27/include/asm-m32r/spinlock.h linux-2.6.27.19-5.1/include/
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/include/asm-m68k/ioctls.h linux-2.6.27.19-5.1/include/asm-m68k/ioctls.h
---- linux-2.6.27/include/asm-m68k/ioctls.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m68k/ioctls.h      2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 include/asm-m68k/ioctls.h
+--- a/include/asm-m68k/ioctls.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m68k/ioctls.h        Wed May 06 16:56:54 2009 +0100
 @@ -52,6 +52,7 @@
  #define TCSETSF2      _IOW('T',0x2D, struct termios2)
  #define TIOCGPTN      _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -1052521,27 +1052487,27 @@ diff -purN linux-2.6.27/include/asm-m68k/ioctls.h linux-2.6.27.19-5.1/include/as
  
  #define FIONCLEX      0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX               0x5451
-diff -purN linux-2.6.27/include/asm-m68k/thread_info.h linux-2.6.27.19-5.1/include/asm-m68k/thread_info.h
---- linux-2.6.27/include/asm-m68k/thread_info.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-m68k/thread_info.h 2009-03-25 16:11:53.000000000 +0000
-@@ -52,5 +52,6 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-m68k/thread_info.h
+--- a/include/asm-m68k/thread_info.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-m68k/thread_info.h   Wed May 06 16:56:54 2009 +0100
+@@ -52,5 +52,6 @@
  #define TIF_DELAYED_TRACE     14      /* single step a syscall */
  #define TIF_SYSCALL_TRACE     15      /* syscall trace active */
  #define TIF_MEMDIE            16
 +#define TIF_FREEZE            17      /* thread is freezing for suspend */
  
  #endif        /* _ASM_M68K_THREAD_INFO_H */
-diff -purN linux-2.6.27/include/asm-mips/Kbuild linux-2.6.27.19-5.1/include/asm-mips/Kbuild
---- linux-2.6.27/include/asm-mips/Kbuild       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/Kbuild        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/Kbuild
+--- a/include/asm-mips/Kbuild  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/Kbuild  Wed May 06 16:56:54 2009 +0100
 @@ -1,3 +1,4 @@
  include include/asm-generic/Kbuild.asm
  
  header-y += cachectl.h sgidefs.h sysmips.h
 +header-y += perfmon.h
-diff -purN linux-2.6.27/include/asm-mips/ioctls.h linux-2.6.27.19-5.1/include/asm-mips/ioctls.h
---- linux-2.6.27/include/asm-mips/ioctls.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/ioctls.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/ioctls.h
+--- a/include/asm-mips/ioctls.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/ioctls.h        Wed May 06 16:56:54 2009 +0100
 @@ -83,6 +83,7 @@
  #define TCSETSF2      _IOW('T', 0x2D, struct termios2)
  #define TIOCGPTN      _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
@@ -1052550,9 +1052516,9 @@ diff -purN linux-2.6.27/include/asm-mips/ioctls.h linux-2.6.27.19-5.1/include/as
  
  /* I hope the range from 0x5480 on is free ... */
  #define TIOCSCTTY     0x5480          /* become controlling tty */
-diff -purN linux-2.6.27/include/asm-mips/perfmon.h linux-2.6.27.19-5.1/include/asm-mips/perfmon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/perfmon.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/perfmon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-mips/perfmon.h       Wed May 06 16:56:54 2009 +0100
 @@ -0,0 +1,34 @@
 +/*
 + * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
@@ -1052588,9 +1052554,9 @@ diff -purN linux-2.6.27/include/asm-mips/perfmon.h linux-2.6.27.19-5.1/include/a
 +#define PFM_ARCH_MAX_PMDS     (256+64) /* 256 HW 64 SW */
 +
 +#endif /* _ASM_MIPS64_PERFMON_H_ */
-diff -purN linux-2.6.27/include/asm-mips/perfmon_kern.h linux-2.6.27.19-5.1/include/asm-mips/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/perfmon_kern.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/asm-mips/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-mips/perfmon_kern.h  Wed May 06 16:56:54 2009 +0100
 @@ -0,0 +1,412 @@
 +/*
 + * Copyright (c) 2005 Philip Mucci.
@@ -1053004,10 +1052970,10 @@ diff -purN linux-2.6.27/include/asm-mips/perfmon_kern.h linux-2.6.27.19-5.1/incl
 +
 +#endif /* __KERNEL__ */
 +#endif /* _ASM_MIPS64_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/include/asm-mips/spinlock.h linux-2.6.27.19-5.1/include/asm-mips/spinlock.h
---- linux-2.6.27/include/asm-mips/spinlock.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/spinlock.h    2009-03-25 16:11:52.000000000 +0000
-@@ -368,6 +368,8 @@ static inline int __raw_write_trylock(ra
+diff -r 9608d5473017 include/asm-mips/spinlock.h
+--- a/include/asm-mips/spinlock.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/spinlock.h      Wed May 06 16:56:54 2009 +0100
+@@ -368,6 +368,8 @@
        return ret;
  }
  
@@ -1053016,10 +1052982,10 @@ diff -purN linux-2.6.27/include/asm-mips/spinlock.h linux-2.6.27.19-5.1/include/
  
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
-diff -purN linux-2.6.27/include/asm-mips/system.h linux-2.6.27.19-5.1/include/asm-mips/system.h
---- linux-2.6.27/include/asm-mips/system.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/system.h      2009-03-25 16:11:52.000000000 +0000
-@@ -67,6 +67,10 @@ do {                                                                        \
+diff -r 9608d5473017 include/asm-mips/system.h
+--- a/include/asm-mips/system.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/system.h        Wed May 06 16:56:54 2009 +0100
+@@ -67,6 +67,10 @@
        __mips_mt_fpaff_switch_to(prev);                                \
        if (cpu_has_dsp)                                                \
                __save_dsp(prev);                                       \
@@ -1053030,10 +1052996,10 @@ diff -purN linux-2.6.27/include/asm-mips/system.h linux-2.6.27.19-5.1/include/as
        (last) = resume(prev, next, task_thread_info(next));            \
  } while (0)
  
-diff -purN linux-2.6.27/include/asm-mips/thread_info.h linux-2.6.27.19-5.1/include/asm-mips/thread_info.h
---- linux-2.6.27/include/asm-mips/thread_info.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-mips/thread_info.h 2009-03-25 16:11:52.000000000 +0000
-@@ -114,6 +114,7 @@ register struct thread_info *__current_t
+diff -r 9608d5473017 include/asm-mips/thread_info.h
+--- a/include/asm-mips/thread_info.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-mips/thread_info.h   Wed May 06 16:56:54 2009 +0100
+@@ -114,6 +114,7 @@
  #define TIF_NEED_RESCHED      2       /* rescheduling necessary */
  #define TIF_SYSCALL_AUDIT     3       /* syscall auditing active */
  #define TIF_SECCOMP           4       /* secure computing */
@@ -1053041,7 +1053007,7 @@ diff -purN linux-2.6.27/include/asm-mips/thread_info.h linux-2.6.27.19-5.1/inclu
  #define TIF_RESTORE_SIGMASK   9       /* restore signal mask in do_signal() */
  #define TIF_USEDFPU           16      /* FPU was used by this task this quantum (SMP) */
  #define TIF_POLLING_NRFLAG    17      /* true if poll_idle() is polling TIF_NEED_RESCHED */
-@@ -124,6 +125,7 @@ register struct thread_info *__current_t
+@@ -124,6 +125,7 @@
  #define TIF_32BIT_REGS                22      /* also implies 16/32 fprs */
  #define TIF_32BIT_ADDR                23      /* 32-bit address space (o32/n32) */
  #define TIF_FPUBOUND          24      /* thread bound to FPU-full CPU set */
@@ -1053049,7 +1053015,7 @@ diff -purN linux-2.6.27/include/asm-mips/thread_info.h linux-2.6.27.19-5.1/inclu
  #define TIF_SYSCALL_TRACE     31      /* syscall trace active */
  
  #define _TIF_SYSCALL_TRACE    (1<<TIF_SYSCALL_TRACE)
-@@ -140,6 +142,8 @@ register struct thread_info *__current_t
+@@ -140,6 +142,8 @@
  #define _TIF_32BIT_REGS               (1<<TIF_32BIT_REGS)
  #define _TIF_32BIT_ADDR               (1<<TIF_32BIT_ADDR)
  #define _TIF_FPUBOUND         (1<<TIF_FPUBOUND)
@@ -1053058,10 +1053024,10 @@ diff -purN linux-2.6.27/include/asm-mips/thread_info.h linux-2.6.27.19-5.1/inclu
  
  /* work to do on interrupt/exception return */
  #define _TIF_WORK_MASK                (0x0000ffef & ~_TIF_SECCOMP)
-diff -purN linux-2.6.27/include/asm-parisc/spinlock.h linux-2.6.27.19-5.1/include/asm-parisc/spinlock.h
---- linux-2.6.27/include/asm-parisc/spinlock.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/spinlock.h  2009-03-25 16:11:46.000000000 +0000
-@@ -187,6 +187,9 @@ static __inline__ int __raw_write_can_lo
+diff -r 9608d5473017 include/asm-parisc/spinlock.h
+--- a/include/asm-parisc/spinlock.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/spinlock.h    Wed May 06 16:56:54 2009 +0100
+@@ -187,6 +187,9 @@
        return !rw->counter;
  }
  
@@ -1053071,10 +1053037,10 @@ diff -purN linux-2.6.27/include/asm-parisc/spinlock.h linux-2.6.27.19-5.1/includ
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/include/asm-parisc/thread_info.h linux-2.6.27.19-5.1/include/asm-parisc/thread_info.h
---- linux-2.6.27/include/asm-parisc/thread_info.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/thread_info.h       2009-03-25 16:11:46.000000000 +0000
-@@ -58,6 +58,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-parisc/thread_info.h
+--- a/include/asm-parisc/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/thread_info.h Wed May 06 16:56:54 2009 +0100
+@@ -58,6 +58,7 @@
  #define TIF_32BIT               4       /* 32 bit binary */
  #define TIF_MEMDIE            5
  #define TIF_RESTORE_SIGMASK   6       /* restore saved signal mask */
@@ -1053082,7 +1053048,7 @@ diff -purN linux-2.6.27/include/asm-parisc/thread_info.h linux-2.6.27.19-5.1/inc
  
  #define _TIF_SYSCALL_TRACE    (1 << TIF_SYSCALL_TRACE)
  #define _TIF_SIGPENDING               (1 << TIF_SIGPENDING)
-@@ -65,6 +66,7 @@ struct thread_info {
+@@ -65,6 +66,7 @@
  #define _TIF_POLLING_NRFLAG   (1 << TIF_POLLING_NRFLAG)
  #define _TIF_32BIT            (1 << TIF_32BIT)
  #define _TIF_RESTORE_SIGMASK  (1 << TIF_RESTORE_SIGMASK)
@@ -1053090,10 +1053056,10 @@ diff -purN linux-2.6.27/include/asm-parisc/thread_info.h linux-2.6.27.19-5.1/inc
  
  #define _TIF_USER_WORK_MASK     (_TIF_SIGPENDING | \
                                   _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
-diff -purN linux-2.6.27/include/asm-parisc/tlbflush.h linux-2.6.27.19-5.1/include/asm-parisc/tlbflush.h
---- linux-2.6.27/include/asm-parisc/tlbflush.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-parisc/tlbflush.h  2009-03-25 16:11:46.000000000 +0000
-@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct m
+diff -r 9608d5473017 include/asm-parisc/tlbflush.h
+--- a/include/asm-parisc/tlbflush.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-parisc/tlbflush.h    Wed May 06 16:56:54 2009 +0100
+@@ -44,9 +44,12 @@
  {
        BUG_ON(mm == &init_mm); /* Should never happen */
  
@@ -1053107,10 +1053073,10 @@ diff -purN linux-2.6.27/include/asm-parisc/tlbflush.h linux-2.6.27.19-5.1/includ
        if (mm) {
                if (mm->context != 0)
                        free_sid(mm->context);
-diff -purN linux-2.6.27/include/asm-um/thread_info.h linux-2.6.27.19-5.1/include/asm-um/thread_info.h
---- linux-2.6.27/include/asm-um/thread_info.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-um/thread_info.h   2009-03-25 16:11:53.000000000 +0000
-@@ -69,6 +69,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 include/asm-um/thread_info.h
+--- a/include/asm-um/thread_info.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-um/thread_info.h     Wed May 06 16:56:54 2009 +0100
+@@ -69,6 +69,7 @@
  #define TIF_MEMDIE            5
  #define TIF_SYSCALL_AUDIT     6
  #define TIF_RESTORE_SIGMASK   7
@@ -1053118,17 +1053084,17 @@ diff -purN linux-2.6.27/include/asm-um/thread_info.h linux-2.6.27.19-5.1/include
  
  #define _TIF_SYSCALL_TRACE    (1 << TIF_SYSCALL_TRACE)
  #define _TIF_SIGPENDING               (1 << TIF_SIGPENDING)
-@@ -77,5 +78,6 @@ static inline struct thread_info *curren
+@@ -77,5 +78,6 @@
  #define _TIF_MEMDIE           (1 << TIF_MEMDIE)
  #define _TIF_SYSCALL_AUDIT    (1 << TIF_SYSCALL_AUDIT)
  #define _TIF_RESTORE_SIGMASK  (1 << TIF_RESTORE_SIGMASK)
 +#define _TIF_FREEZE           (1 << TIF_FREEZE)
  
  #endif
-diff -purN linux-2.6.27/include/asm-x86/Kbuild linux-2.6.27.19-5.1/include/asm-x86/Kbuild
---- linux-2.6.27/include/asm-x86/Kbuild        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/Kbuild 2009-03-25 16:11:47.000000000 +0000
-@@ -9,6 +9,7 @@ header-y += prctl.h
+diff -r 9608d5473017 include/asm-x86/Kbuild
+--- a/include/asm-x86/Kbuild   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/Kbuild   Wed May 06 16:56:54 2009 +0100
+@@ -9,6 +9,7 @@
  header-y += ptrace-abi.h
  header-y += sigcontext32.h
  header-y += ucontext.h
@@ -1053136,21 +1053102,21 @@ diff -purN linux-2.6.27/include/asm-x86/Kbuild linux-2.6.27.19-5.1/include/asm-x
  header-y += processor-flags.h
  
  unifdef-y += e820.h
-diff -purN linux-2.6.27/include/asm-x86/acpi.h linux-2.6.27.19-5.1/include/asm-x86/acpi.h
---- linux-2.6.27/include/asm-x86/acpi.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/acpi.h 2009-03-25 16:11:47.000000000 +0000
-@@ -30,6 +30,10 @@
+diff -r 9608d5473017 include/asm-x86/acpi.h
+--- a/include/asm-x86/acpi.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/acpi.h   Wed May 06 16:56:54 2009 +0100
+@@ -29,6 +29,10 @@
+ #include <asm/processor.h>
  #include <asm/mmu.h>
  #include <asm/mpspec.h>
++
 +#ifdef CONFIG_XEN
 +#include <xen/interface/platform.h>
 +#endif
-+
  #define COMPILER_DEPENDENT_INT64   long long
  #define COMPILER_DEPENDENT_UINT64  unsigned long long
-@@ -124,6 +128,27 @@ extern unsigned long acpi_wakeup_address
+@@ -124,6 +128,27 @@
  /* early initialization routine */
  extern void acpi_reserve_bootmem(void);
  
@@ -1053178,7 +1053144,7 @@ diff -purN linux-2.6.27/include/asm-x86/acpi.h linux-2.6.27.19-5.1/include/asm-x
  /*
   * Check if the CPU can handle C2 and deeper
   */
-@@ -156,7 +181,9 @@ static inline void disable_acpi(void) { 
+@@ -156,7 +181,9 @@
  
  #endif /* !CONFIG_ACPI */
  
@@ -1053188,18 +1053154,18 @@ diff -purN linux-2.6.27/include/asm-x86/acpi.h linux-2.6.27.19-5.1/include/asm-x
  
  struct bootnode;
  
-diff -purN linux-2.6.27/include/asm-x86/ansidecl.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl.h       Wed May 06 16:56:54 2009 +0100
 @@ -0,0 +1,5 @@
 +#ifdef CONFIG_X86_32
 +# include "ansidecl_32.h"
 +#else
 +# include "ansidecl_64.h"
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/ansidecl_32.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl_32.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl_32.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,383 @@
 +/* ANSI and traditional C compatability macros
 +   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -1053584,9 +1053550,9 @@ diff -purN linux-2.6.27/include/asm-x86/ansidecl_32.h linux-2.6.27.19-5.1/includ
 +#endif
 +
 +#endif        /* ansidecl.h   */
-diff -purN linux-2.6.27/include/asm-x86/ansidecl_64.h linux-2.6.27.19-5.1/include/asm-x86/ansidecl_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ansidecl_64.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ansidecl_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/ansidecl_64.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,383 @@
 +/* ANSI and traditional C compatability macros
 +   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -1053971,9 +1053937,9 @@ diff -purN linux-2.6.27/include/asm-x86/ansidecl_64.h linux-2.6.27.19-5.1/includ
 +#endif
 +
 +#endif        /* ansidecl.h   */
-diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x86/apic.h
---- linux-2.6.27/include/asm-x86/apic.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/apic.h
+--- a/include/asm-x86/apic.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/apic.h   Wed May 06 16:56:55 2009 +0100
 @@ -5,12 +5,18 @@
  #include <linux/delay.h>
  
@@ -1053993,7 +1053959,7 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
  
  /*
   * Debugging macros
-@@ -36,6 +42,7 @@ extern void generic_apic_probe(void);
+@@ -36,6 +42,7 @@
  #ifdef CONFIG_X86_LOCAL_APIC
  
  extern unsigned int apic_verbosity;
@@ -1054001,7 +1053967,7 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
  extern int local_apic_timer_c2_ok;
  
  extern int ioapic_force;
-@@ -47,15 +54,13 @@ extern int disable_apic;
+@@ -47,15 +54,13 @@
  #ifdef CONFIG_PARAVIRT
  #include <asm/paravirt.h>
  #else
@@ -1054018,7 +1053984,7 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
  {
        volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
  
-@@ -64,15 +69,69 @@ static inline void native_apic_write(uns
+@@ -64,14 +69,68 @@
                       ASM_OUTPUT2("0" (v), "m" (*addr)));
  }
  
@@ -1054079,7 +1054045,7 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
 +#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle)
 +
  extern int get_physical_broadcast(void);
++
 +#ifdef CONFIG_X86_64
 +static inline void ack_x2APIC_irq(void)
 +{
@@ -1054087,11 +1054053,10 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
 +      native_apic_msr_write(APIC_EOI, 0);
 +}
 +#endif
-+
  static inline void ack_APIC_irq(void)
  {
-       /*
-@@ -85,6 +144,7 @@ static inline void ack_APIC_irq(void)
+@@ -85,6 +144,7 @@
        /* Docs say use 0 for future compatibility */
        apic_write(APIC_EOI, 0);
  }
@@ -1054099,18 +1054064,17 @@ diff -purN linux-2.6.27/include/asm-x86/apic.h linux-2.6.27.19-5.1/include/asm-x
  
  extern int lapic_get_maxlvt(void);
  extern void clear_local_APIC(void);
-diff -purN linux-2.6.27/include/asm-x86/apicdef.h linux-2.6.27.19-5.1/include/asm-x86/apicdef.h
---- linux-2.6.27/include/asm-x86/apicdef.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/apicdef.h      2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/apicdef.h
+--- a/include/asm-x86/apicdef.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/apicdef.h        Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
  #ifndef _ASM_X86_APICDEF_H
  #define _ASM_X86_APICDEF_H
-+#ifndef CONFIG_XEN
 +
++#ifndef CONFIG_XEN
  /*
   * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
-  *
 @@ -105,6 +107,7 @@
  #define       APIC_TMICT      0x380
  #define       APIC_TMCCT      0x390
@@ -1054138,16 +1054102,16 @@ diff -purN linux-2.6.27/include/asm-x86/apicdef.h linux-2.6.27.19-5.1/include/as
  
  #ifdef CONFIG_X86_32
  # define MAX_IO_APICS 64
-@@ -136,6 +151,8 @@
+@@ -135,6 +150,8 @@
+ # define MAX_IO_APICS 128
  # define MAX_LOCAL_APIC 32768
  #endif
-+#ifndef CONFIG_XEN
 +
++#ifndef CONFIG_XEN
  /*
   * All x86-64 systems are xAPIC compatible.
-  * In the following, "apicid" is a physical APIC ID.
-@@ -406,6 +423,8 @@ struct local_apic {
+@@ -406,6 +423,8 @@
  
  #undef u32
  
@@ -1054156,18 +1054120,18 @@ diff -purN linux-2.6.27/include/asm-x86/apicdef.h linux-2.6.27.19-5.1/include/as
  #ifdef CONFIG_X86_32
   #define BAD_APICID 0xFFu
  #else
-diff -purN linux-2.6.27/include/asm-x86/bfd.h linux-2.6.27.19-5.1/include/asm-x86/bfd.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,5 @@
 +#ifdef CONFIG_X86_32
 +# include "bfd_32.h"
 +#else
 +# include "bfd_64.h"
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/bfd_32.h linux-2.6.27.19-5.1/include/asm-x86/bfd_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd_32.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd_32.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,4921 @@
 +/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
 +   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
@@ -1059090,9 +1059054,9 @@ diff -purN linux-2.6.27/include/asm-x86/bfd_32.h linux-2.6.27.19-5.1/include/asm
 +}
 +#endif
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/bfd_64.h linux-2.6.27.19-5.1/include/asm-x86/bfd_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/bfd_64.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/bfd_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/bfd_64.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,4917 @@
 +/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
 +   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
@@ -1064011,10 +1063975,10 @@ diff -purN linux-2.6.27/include/asm-x86/bfd_64.h linux-2.6.27.19-5.1/include/asm
 +}
 +#endif
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/cacheflush.h linux-2.6.27.19-5.1/include/asm-x86/cacheflush.h
---- linux-2.6.27/include/asm-x86/cacheflush.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/cacheflush.h   2009-03-25 16:11:47.000000000 +0000
-@@ -63,6 +63,7 @@ int set_memory_x(unsigned long addr, int
+diff -r 9608d5473017 include/asm-x86/cacheflush.h
+--- a/include/asm-x86/cacheflush.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/cacheflush.h     Wed May 06 16:56:55 2009 +0100
+@@ -63,6 +63,7 @@
  int set_memory_nx(unsigned long addr, int numpages);
  int set_memory_ro(unsigned long addr, int numpages);
  int set_memory_rw(unsigned long addr, int numpages);
@@ -1064022,7 +1063986,7 @@ diff -purN linux-2.6.27/include/asm-x86/cacheflush.h linux-2.6.27.19-5.1/include
  int set_memory_np(unsigned long addr, int numpages);
  int set_memory_4k(unsigned long addr, int numpages);
  
-@@ -92,6 +93,7 @@ int set_pages_x(struct page *page, int n
+@@ -92,6 +93,7 @@
  int set_pages_nx(struct page *page, int numpages);
  int set_pages_ro(struct page *page, int numpages);
  int set_pages_rw(struct page *page, int numpages);
@@ -1064030,7 +1063994,7 @@ diff -purN linux-2.6.27/include/asm-x86/cacheflush.h linux-2.6.27.19-5.1/include
  
  
  void clflush_cache_range(void *addr, unsigned int size);
-@@ -100,6 +102,7 @@ void cpa_init(void);
+@@ -100,6 +102,7 @@
  
  #ifdef CONFIG_DEBUG_RODATA
  void mark_rodata_ro(void);
@@ -1064038,9 +1064002,9 @@ diff -purN linux-2.6.27/include/asm-x86/cacheflush.h linux-2.6.27.19-5.1/include
  extern const int rodata_test_data;
  #endif
  
-diff -purN linux-2.6.27/include/asm-x86/cpufeature.h linux-2.6.27.19-5.1/include/asm-x86/cpufeature.h
---- linux-2.6.27/include/asm-x86/cpufeature.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/cpufeature.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/cpufeature.h
+--- a/include/asm-x86/cpufeature.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/cpufeature.h     Wed May 06 16:56:55 2009 +0100
 @@ -82,6 +82,8 @@
  #define X86_FEATURE_11AP      (3*32+19) /* Bad local APIC aka 11AP */
  #define X86_FEATURE_NOPL      (3*32+20) /* The NOPL (0F 1F) instructions */
@@ -1064059,7 +1064023,7 @@ diff -purN linux-2.6.27/include/asm-x86/cpufeature.h linux-2.6.27.19-5.1/include
  
  /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
  #define X86_FEATURE_XSTORE    (5*32+ 2) /* on-CPU RNG present (xstore insn) */
-@@ -193,6 +197,8 @@ extern const char * const x86_power_flag
+@@ -193,6 +197,8 @@
  #define cpu_has_arch_perfmon  boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
  #define cpu_has_pat           boot_cpu_has(X86_FEATURE_PAT)
  #define cpu_has_xmm4_2                boot_cpu_has(X86_FEATURE_XMM4_2)
@@ -1064068,10 +1064032,10 @@ diff -purN linux-2.6.27/include/asm-x86/cpufeature.h linux-2.6.27.19-5.1/include
  
  #if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
  # define cpu_has_invlpg               1
-diff -purN linux-2.6.27/include/asm-x86/dma-mapping.h linux-2.6.27.19-5.1/include/asm-x86/dma-mapping.h
---- linux-2.6.27/include/asm-x86/dma-mapping.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/dma-mapping.h  2009-03-25 16:11:47.000000000 +0000
-@@ -74,7 +74,7 @@ static inline struct dma_mapping_ops *ge
+diff -r 9608d5473017 include/asm-x86/dma-mapping.h
+--- a/include/asm-x86/dma-mapping.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/dma-mapping.h    Wed May 06 16:56:55 2009 +0100
+@@ -74,7 +74,7 @@
  /* Make sure we keep the same behaviour */
  static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  {
@@ -1064080,7 +1064044,7 @@ diff -purN linux-2.6.27/include/asm-x86/dma-mapping.h linux-2.6.27.19-5.1/includ
        return 0;
  #else
        struct dma_mapping_ops *ops = get_dma_ops(dev);
-@@ -223,8 +223,13 @@ static inline dma_addr_t dma_map_page(st
+@@ -223,8 +223,13 @@
        struct dma_mapping_ops *ops = get_dma_ops(dev);
  
        BUG_ON(!valid_dma_direction(direction));
@@ -1064094,10 +1064058,10 @@ diff -purN linux-2.6.27/include/asm-x86/dma-mapping.h linux-2.6.27.19-5.1/includ
  }
  
  static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
-diff -purN linux-2.6.27/include/asm-x86/efi.h linux-2.6.27.19-5.1/include/asm-x86/efi.h
---- linux-2.6.27/include/asm-x86/efi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/efi.h  2009-03-25 16:11:47.000000000 +0000
-@@ -49,6 +49,20 @@ extern u64 efi_call5(void *fp, u64 arg1,
+diff -r 9608d5473017 include/asm-x86/efi.h
+--- a/include/asm-x86/efi.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/efi.h    Wed May 06 16:56:55 2009 +0100
+@@ -49,6 +49,20 @@
  extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
                     u64 arg4, u64 arg5, u64 arg6);
  
@@ -1064118,10 +1064082,10 @@ diff -purN linux-2.6.27/include/asm-x86/efi.h linux-2.6.27.19-5.1/include/asm-x8
  #define efi_call_phys0(f)                     \
        efi_call0((void *)(f))
  #define efi_call_phys1(f, a1)                 \
-diff -purN linux-2.6.27/include/asm-x86/genapic_32.h linux-2.6.27.19-5.1/include/asm-x86/genapic_32.h
---- linux-2.6.27/include/asm-x86/genapic_32.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/genapic_32.h   2009-03-25 16:11:47.000000000 +0000
-@@ -23,7 +23,7 @@ struct genapic {
+diff -r 9608d5473017 include/asm-x86/genapic_32.h
+--- a/include/asm-x86/genapic_32.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/genapic_32.h     Wed May 06 16:56:55 2009 +0100
+@@ -23,7 +23,7 @@
        int (*probe)(void);
  
        int (*apic_id_registered)(void);
@@ -1064130,7 +1064094,7 @@ diff -purN linux-2.6.27/include/asm-x86/genapic_32.h linux-2.6.27.19-5.1/include
        int int_delivery_mode;
        int int_dest_mode;
        int ESR_DISABLE;
-@@ -56,11 +56,12 @@ struct genapic {
+@@ -56,11 +56,12 @@
  
        unsigned (*get_apic_id)(unsigned long x);
        unsigned long apic_id_mask;
@@ -1064145,7 +1064109,7 @@ diff -purN linux-2.6.27/include/asm-x86/genapic_32.h linux-2.6.27.19-5.1/include
        void (*send_IPI_allbutself)(int vector);
        void (*send_IPI_all)(int vector);
  #endif
-@@ -106,6 +107,7 @@ struct genapic {
+@@ -106,6 +107,7 @@
        APICFUNC(cpu_mask_to_apicid)                    \
        APICFUNC(acpi_madt_oem_check)                   \
        IPIFUNC(send_IPI_mask)                          \
@@ -1064153,18 +1064117,17 @@ diff -purN linux-2.6.27/include/asm-x86/genapic_32.h linux-2.6.27.19-5.1/include
        IPIFUNC(send_IPI_allbutself)                    \
        IPIFUNC(send_IPI_all)                           \
        APICFUNC(enable_apic_mode)                      \
-diff -purN linux-2.6.27/include/asm-x86/genapic_64.h linux-2.6.27.19-5.1/include/asm-x86/genapic_64.h
---- linux-2.6.27/include/asm-x86/genapic_64.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/genapic_64.h   2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/genapic_64.h
+--- a/include/asm-x86/genapic_64.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/genapic_64.h     Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
  #ifndef _ASM_GENAPIC_H
  #define _ASM_GENAPIC_H 1
-+#include <linux/cpumask.h>
 +
++#include <linux/cpumask.h>
  /*
   * Copyright 2004 James Cleverdon, IBM.
-  * Subject to the GNU Public License, v.2
 @@ -14,27 +16,37 @@
  
  struct genapic {
@@ -1064207,7 +1064170,7 @@ diff -purN linux-2.6.27/include/asm-x86/genapic_64.h linux-2.6.27.19-5.1/include
  enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
  extern enum uv_system_type get_uv_system_type(void);
  extern int is_uv_system(void);
-@@ -44,6 +56,10 @@ DECLARE_PER_CPU(int, x2apic_extra_bits);
+@@ -44,6 +56,10 @@
  extern void uv_cpu_init(void);
  extern void uv_system_init(void);
  extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
@@ -1064218,10 +1064181,10 @@ diff -purN linux-2.6.27/include/asm-x86/genapic_64.h linux-2.6.27.19-5.1/include
  
  extern void setup_apic_routing(void);
  
-diff -purN linux-2.6.27/include/asm-x86/hw_irq.h linux-2.6.27.19-5.1/include/asm-x86/hw_irq.h
---- linux-2.6.27/include/asm-x86/hw_irq.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/hw_irq.h       2009-03-25 16:11:47.000000000 +0000
-@@ -73,7 +73,9 @@ extern void enable_IO_APIC(void);
+diff -r 9608d5473017 include/asm-x86/hw_irq.h
+--- a/include/asm-x86/hw_irq.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/hw_irq.h Wed May 06 16:56:55 2009 +0100
+@@ -73,7 +73,9 @@
  #endif
  
  /* IPI functions */
@@ -1064231,9 +1064194,9 @@ diff -purN linux-2.6.27/include/asm-x86/hw_irq.h linux-2.6.27.19-5.1/include/asm
  extern void send_IPI(int dest, int vector);
  
  /* Statistics */
-diff -purN linux-2.6.27/include/asm-x86/hypervisor.h linux-2.6.27.19-5.1/include/asm-x86/hypervisor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/hypervisor.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/hypervisor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/hypervisor.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,30 @@
 +/*
 + * Copyright (C) 2008, VMware, Inc.
@@ -1064265,10 +1064228,10 @@ diff -purN linux-2.6.27/include/asm-x86/hypervisor.h linux-2.6.27.19-5.1/include
 +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
 +#include_next <asm/hypervisor.h>
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/i8253.h linux-2.6.27.19-5.1/include/asm-x86/i8253.h
---- linux-2.6.27/include/asm-x86/i8253.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/i8253.h        2009-03-25 16:11:47.000000000 +0000
-@@ -8,10 +8,14 @@
+diff -r 9608d5473017 include/asm-x86/i8253.h
+--- a/include/asm-x86/i8253.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/i8253.h  Wed May 06 16:56:55 2009 +0100
+@@ -8,9 +8,13 @@
  
  extern spinlock_t i8253_lock;
  
@@ -1064277,16 +1064240,15 @@ diff -purN linux-2.6.27/include/asm-x86/i8253.h linux-2.6.27.19-5.1/include/asm-
  extern struct clock_event_device *global_clock_event;
  
  extern void setup_pit_timer(void);
-+#endif
 +
++#endif
  #define inb_pit               inb_p
  #define outb_pit      outb_p
-diff -purN linux-2.6.27/include/asm-x86/i8259.h linux-2.6.27.19-5.1/include/asm-x86/i8259.h
---- linux-2.6.27/include/asm-x86/i8259.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/i8259.h        2009-03-25 16:11:47.000000000 +0000
-@@ -57,4 +57,7 @@ static inline void outb_pic(unsigned cha
+diff -r 9608d5473017 include/asm-x86/i8259.h
+--- a/include/asm-x86/i8259.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/i8259.h  Wed May 06 16:56:55 2009 +0100
+@@ -57,4 +57,7 @@
  
  extern struct irq_chip i8259A_chip;
  
@@ -1064294,9 +1064256,9 @@ diff -purN linux-2.6.27/include/asm-x86/i8259.h linux-2.6.27.19-5.1/include/asm-
 +extern void unmask_8259A(void);
 +
  #endif        /* __ASM_I8259_H__ */
-diff -purN linux-2.6.27/include/asm-x86/io.h linux-2.6.27.19-5.1/include/asm-x86/io.h
---- linux-2.6.27/include/asm-x86/io.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/io.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/io.h
+--- a/include/asm-x86/io.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/io.h     Wed May 06 16:56:55 2009 +0100
 @@ -12,7 +12,6 @@
   */
  #ifndef __ASSEMBLY__
@@ -1064305,7 +1064267,7 @@ diff -purN linux-2.6.27/include/asm-x86/io.h linux-2.6.27.19-5.1/include/asm-x86
  extern void early_ioremap_reset(void);
  extern void *early_ioremap(unsigned long offset, unsigned long size);
  extern void early_iounmap(void *addr, unsigned long size);
-@@ -92,7 +91,6 @@ extern void __iomem *ioremap_wc(unsigned
+@@ -92,7 +91,6 @@
   * A boot-time mapping is currently limited to at most 16 pages.
   */
  extern void early_ioremap_init(void);
@@ -1064313,10 +1064275,10 @@ diff -purN linux-2.6.27/include/asm-x86/io.h linux-2.6.27.19-5.1/include/asm-x86
  extern void early_ioremap_reset(void);
  extern void *early_ioremap(unsigned long offset, unsigned long size);
  extern void early_iounmap(void *addr, unsigned long size);
-diff -purN linux-2.6.27/include/asm-x86/io_apic.h linux-2.6.27.19-5.1/include/asm-x86/io_apic.h
---- linux-2.6.27/include/asm-x86/io_apic.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/io_apic.h      2009-03-25 16:11:47.000000000 +0000
-@@ -107,6 +107,20 @@ struct IO_APIC_route_entry {
+diff -r 9608d5473017 include/asm-x86/io_apic.h
+--- a/include/asm-x86/io_apic.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/io_apic.h        Wed May 06 16:56:55 2009 +0100
+@@ -107,6 +107,20 @@
  
  } __attribute__ ((packed));
  
@@ -1064337,7 +1064299,7 @@ diff -purN linux-2.6.27/include/asm-x86/io_apic.h linux-2.6.27.19-5.1/include/as
  #ifdef CONFIG_X86_IO_APIC
  
  /*
-@@ -160,8 +174,18 @@ extern int skip_ioapic_setup;
+@@ -160,8 +174,18 @@
  /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
  extern int timer_through_8259;
  
@@ -1064356,7 +1064318,7 @@ diff -purN linux-2.6.27/include/asm-x86/io_apic.h linux-2.6.27.19-5.1/include/as
        skip_ioapic_setup = 1;
  }
  
-@@ -183,6 +207,12 @@ extern int io_apic_set_pci_routing(int i
+@@ -183,6 +207,12 @@
  extern int (*ioapic_renumber_irq)(int ioapic, int irq);
  extern void ioapic_init_mappings(void);
  
@@ -1064369,9 +1064331,9 @@ diff -purN linux-2.6.27/include/asm-x86/io_apic.h linux-2.6.27.19-5.1/include/as
  #else  /* !CONFIG_X86_IO_APIC */
  #define io_apic_assign_pci_irqs 0
  static const int timer_through_8259 = 0;
-diff -purN linux-2.6.27/include/asm-x86/ioctls.h linux-2.6.27.19-5.1/include/asm-x86/ioctls.h
---- linux-2.6.27/include/asm-x86/ioctls.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ioctls.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/ioctls.h
+--- a/include/asm-x86/ioctls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ioctls.h Wed May 06 16:56:55 2009 +0100
 @@ -54,6 +54,7 @@
  #define TIOCGPTN      _IOR('T', 0x30, unsigned int)
                                /* Get Pty Number (of pty-mux device) */
@@ -1064380,19 +1064342,18 @@ diff -purN linux-2.6.27/include/asm-x86/ioctls.h linux-2.6.27.19-5.1/include/asm
  
  #define FIONCLEX      0x5450
  #define FIOCLEX               0x5451
-diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x86/ipi.h
---- linux-2.6.27/include/asm-x86/ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ipi.h  2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,8 @@
+diff -r 9608d5473017 include/asm-x86/ipi.h
+--- a/include/asm-x86/ipi.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ipi.h    Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,7 @@
  #ifndef __ASM_IPI_H
  #define __ASM_IPI_H
-+#ifndef CONFIG_XEN
 +
++#ifndef CONFIG_XEN
  /*
   * Copyright 2004 James Cleverdon, IBM.
-  * Subject to the GNU Public License, v.2
-@@ -49,6 +51,12 @@ static inline int __prepare_ICR2(unsigne
+@@ -49,6 +51,12 @@
        return SET_APIC_DEST_FIELD(mask);
  }
  
@@ -1064405,7 +1064366,7 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
  static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
                                       unsigned int dest)
  {
-@@ -64,7 +72,7 @@ static inline void __send_IPI_shortcut(u
+@@ -64,7 +72,7 @@
        /*
         * Wait for idle.
         */
@@ -1064414,7 +1064375,7 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
  
        /*
         * No need to touch the target chip field
-@@ -74,7 +82,7 @@ static inline void __send_IPI_shortcut(u
+@@ -74,7 +82,7 @@
        /*
         * Send the IPI. The write to APIC_ICR fires this off.
         */
@@ -1064423,7 +1064384,7 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
  }
  
  /*
-@@ -92,13 +100,13 @@ static inline void __send_IPI_dest_field
+@@ -92,13 +100,13 @@
        if (unlikely(vector == NMI_VECTOR))
                safe_apic_wait_icr_idle();
        else
@@ -1064439,7 +1064400,7 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
  
        /*
         * program the ICR
-@@ -108,10 +116,10 @@ static inline void __send_IPI_dest_field
+@@ -108,10 +116,10 @@
        /*
         * Send the IPI. The write to APIC_ICR fires this off.
         */
@@ -1064452,7 +1064413,7 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
  {
        unsigned long flags;
        unsigned long query_cpu;
-@@ -122,11 +130,29 @@ static inline void send_IPI_mask_sequenc
+@@ -122,11 +130,29 @@
         * - mbligh
         */
        local_irq_save(flags);
@@ -1064484,10 +1064445,10 @@ diff -purN linux-2.6.27/include/asm-x86/ipi.h linux-2.6.27.19-5.1/include/asm-x8
 +#endif /* CONFIG_XEN */
 +
  #endif /* __ASM_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/irq.h linux-2.6.27.19-5.1/include/asm-x86/irq.h
---- linux-2.6.27/include/asm-x86/irq.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq.h  2009-03-25 16:11:47.000000000 +0000
-@@ -15,7 +15,7 @@ static inline int irq_canonicalize(int i
+diff -r 9608d5473017 include/asm-x86/irq.h
+--- a/include/asm-x86/irq.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/irq.h    Wed May 06 16:56:55 2009 +0100
+@@ -15,7 +15,7 @@
        return ((irq == 2) ? 9 : irq);
  }
  
@@ -1064496,9 +1064457,9 @@ diff -purN linux-2.6.27/include/asm-x86/irq.h linux-2.6.27.19-5.1/include/asm-x8
  # define ARCH_HAS_NMI_WATCHDOG
  #endif
  
-diff -purN linux-2.6.27/include/asm-x86/irq_remapping.h linux-2.6.27.19-5.1/include/asm-x86/irq_remapping.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq_remapping.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/irq_remapping.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/irq_remapping.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,8 @@
 +#ifndef _ASM_IRQ_REMAPPING_H
 +#define _ASM_IRQ_REMAPPING_H
@@ -1064508,9 +1064469,9 @@ diff -purN linux-2.6.27/include/asm-x86/irq_remapping.h linux-2.6.27.19-5.1/incl
 +#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/irq_vectors.h linux-2.6.27.19-5.1/include/asm-x86/irq_vectors.h
---- linux-2.6.27/include/asm-x86/irq_vectors.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/irq_vectors.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/irq_vectors.h
+--- a/include/asm-x86/irq_vectors.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/irq_vectors.h    Wed May 06 16:56:55 2009 +0100
 @@ -16,6 +16,7 @@
  #else
  # define IA32_SYSCALL_VECTOR  0x80
@@ -1064519,7 +1064480,7 @@ diff -purN linux-2.6.27/include/asm-x86/irq_vectors.h linux-2.6.27.19-5.1/includ
  
  /*
   * Reserve the lowest usable priority level 0x20 - 0x2f for triggering
-@@ -85,6 +86,12 @@
+@@ -85,11 +86,22 @@
  #endif
  
  /*
@@ -1064532,21 +1064493,19 @@ diff -purN linux-2.6.27/include/asm-x86/irq_vectors.h linux-2.6.27.19-5.1/includ
   * Local APIC timer IRQ vector is on a different priority level,
   * to work around the 'lost local interrupt if more than 2 IRQ
   * sources per level' errata.
-@@ -92,6 +99,11 @@
+  */
  #define LOCAL_TIMER_VECTOR    0xef
- /*
++
++/*
 + * Perfmon PMU interrupt vector
 + */
 +#define LOCAL_PERFMON_VECTOR  0xee
-+
-+/*
+ /*
   * First APIC vector available to drivers: (vectors 0x30-0xee) we
-  * start at 0x31(0x41) to spread out vectors evenly between priority
-  * levels. (0x80 is the syscall vector)
-diff -purN linux-2.6.27/include/asm-x86/kdb.h linux-2.6.27.19-5.1/include/asm-x86/kdb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdb.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/kdb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/kdb.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,138 @@
 +#ifndef       _ASM_KDB_H
 +#define _ASM_KDB_H
@@ -1064686,9 +1064645,9 @@ diff -purN linux-2.6.27/include/asm-x86/kdb.h linux-2.6.27.19-5.1/include/asm-x8
 +#endif
 +
 +#endif        /* !_ASM_KDB_H */
-diff -purN linux-2.6.27/include/asm-x86/kdbprivate.h linux-2.6.27.19-5.1/include/asm-x86/kdbprivate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdbprivate.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/kdbprivate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/kdbprivate.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,241 @@
 +#ifndef _ASM_KDBPRIVATE_H
 +#define _ASM_KDBPRIVATE_H
@@ -1064931,10 +1064890,10 @@ diff -purN linux-2.6.27/include/asm-x86/kdbprivate.h linux-2.6.27.19-5.1/include
 +#endif        /* !CONFIG_X86_32 */
 +
 +#endif        /* !_ASM_KDBPRIVATE_H */
-diff -purN linux-2.6.27/include/asm-x86/kdebug.h linux-2.6.27.19-5.1/include/asm-x86/kdebug.h
---- linux-2.6.27/include/asm-x86/kdebug.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kdebug.h       2009-03-25 16:11:47.000000000 +0000
-@@ -15,6 +15,8 @@ enum die_val {
+diff -r 9608d5473017 include/asm-x86/kdebug.h
+--- a/include/asm-x86/kdebug.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kdebug.h Wed May 06 16:56:55 2009 +0100
+@@ -15,6 +15,8 @@
        DIE_DIE,
        DIE_NMIWATCHDOG,
        DIE_KERNELDEBUG,
@@ -1064943,10 +1064902,10 @@ diff -purN linux-2.6.27/include/asm-x86/kdebug.h linux-2.6.27.19-5.1/include/asm
        DIE_TRAP,
        DIE_GPF,
        DIE_CALL,
-diff -purN linux-2.6.27/include/asm-x86/kexec.h linux-2.6.27.19-5.1/include/asm-x86/kexec.h
---- linux-2.6.27/include/asm-x86/kexec.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kexec.h        2009-03-25 16:11:47.000000000 +0000
-@@ -170,6 +170,19 @@ relocate_kernel(unsigned long indirectio
+diff -r 9608d5473017 include/asm-x86/kexec.h
+--- a/include/asm-x86/kexec.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kexec.h  Wed May 06 16:56:55 2009 +0100
+@@ -170,6 +170,19 @@
                unsigned long start_address) ATTRIB_NORET;
  #endif
  
@@ -1064966,10 +1064925,10 @@ diff -purN linux-2.6.27/include/asm-x86/kexec.h linux-2.6.27.19-5.1/include/asm-
  #endif /* __ASSEMBLY__ */
  
  #endif /* _KEXEC_H */
-diff -purN linux-2.6.27/include/asm-x86/kmap_types.h linux-2.6.27.19-5.1/include/asm-x86/kmap_types.h
---- linux-2.6.27/include/asm-x86/kmap_types.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/kmap_types.h   2009-03-25 16:11:47.000000000 +0000
-@@ -21,7 +21,8 @@ D(9) KM_IRQ0,
+diff -r 9608d5473017 include/asm-x86/kmap_types.h
+--- a/include/asm-x86/kmap_types.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/kmap_types.h     Wed May 06 16:56:55 2009 +0100
+@@ -21,7 +21,8 @@
  D(10) KM_IRQ1,
  D(11) KM_SOFTIRQ0,
  D(12) KM_SOFTIRQ1,
@@ -1064979,10 +1064938,10 @@ diff -purN linux-2.6.27/include/asm-x86/kmap_types.h linux-2.6.27.19-5.1/include
  };
  
  #undef D
-diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_apic.h        2009-03-25 16:11:47.000000000 +0000
-@@ -10,7 +10,7 @@ static inline int apic_id_registered(voi
+diff -r 9608d5473017 include/asm-x86/mach-bigsmp/mach_apic.h
+--- a/include/asm-x86/mach-bigsmp/mach_apic.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-bigsmp/mach_apic.h  Wed May 06 16:56:55 2009 +0100
+@@ -10,7 +10,7 @@
  }
  
  /* Round robin the irqs amoung the online cpus */
@@ -1064991,7 +1064950,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h linux-2.6.27.19-
  { 
        static unsigned long cpu = NR_CPUS;
        do {
-@@ -19,7 +19,7 @@ static inline cpumask_t target_cpus(void
+@@ -19,7 +19,7 @@
                else
                        cpu = next_cpu(cpu, cpu_online_map);
        } while (cpu >= NR_CPUS);
@@ -1065000,7 +1064959,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h linux-2.6.27.19-
  }
  
  #undef APIC_DEST_LOGICAL
-@@ -126,12 +126,12 @@ static inline int check_phys_apicid_pres
+@@ -126,12 +126,12 @@
  }
  
  /* As we are using single CPU as destination, pick only one CPU here */
@@ -1065015,9 +1064974,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_apic.h linux-2.6.27.19-
        apicid = cpu_to_logical_apicid(cpu);
        return apicid;
  }
-diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-bigsmp/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-bigsmp/mach_ipi.h
+--- a/include/asm-x86/mach-bigsmp/mach_ipi.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-bigsmp/mach_ipi.h   Wed May 06 16:56:55 2009 +0100
 @@ -1,25 +1,30 @@
  #ifndef __ASM_MACH_IPI_H
  #define __ASM_MACH_IPI_H
@@ -1065031,22 +1064990,22 @@ diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h linux-2.6.27.19-5
        send_IPI_mask_sequence(mask, vector);
  }
  
--static inline void send_IPI_allbutself(int vector)
 +static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
--      cpumask_t mask = cpu_online_map;
--      cpu_clear(smp_processor_id(), mask);
++{
 +      cpumask_t allbutself = *mask;
 +      cpu_clear(smp_processor_id(), allbutself);
 +
 +      if (!cpus_empty(allbutself))
 +              send_IPI_mask_sequence(&allbutself, vector);
 +}
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+-      cpumask_t mask = cpu_online_map;
+-      cpu_clear(smp_processor_id(), mask);
+-
 -      if (!cpus_empty(mask))
 -              send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
 +      send_IPI_mask_allbutself(&cpu_online_map, vector);
  }
  
@@ -1065057,21 +1065016,21 @@ diff -purN linux-2.6.27/include/asm-x86/mach-bigsmp/mach_ipi.h linux-2.6.27.19-5
  }
  
  #endif /* __ASM_MACH_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-default/entry_arch.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/entry_arch.h
---- linux-2.6.27/include/asm-x86/mach-default/entry_arch.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/entry_arch.h      2009-03-25 16:11:47.000000000 +0000
-@@ -32,4 +32,8 @@ BUILD_INTERRUPT(spurious_interrupt,SPURI
+diff -r 9608d5473017 include/asm-x86/mach-default/entry_arch.h
+--- a/include/asm-x86/mach-default/entry_arch.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/entry_arch.h        Wed May 06 16:56:55 2009 +0100
+@@ -32,4 +32,8 @@
  BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR)
  #endif
  
 +#ifdef CONFIG_PERFMON
 +BUILD_INTERRUPT(pmu_interrupt,LOCAL_PERFMON_VECTOR)
-+#endif
-+
  #endif
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_apic.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apic.h       2009-03-25 16:11:47.000000000 +0000
++
++#endif
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_apic.h
+--- a/include/asm-x86/mach-default/mach_apic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_apic.h Wed May 06 16:56:55 2009 +0100
 @@ -8,12 +8,12 @@
  
  #define APIC_DFR_VALUE        (APIC_DFR_FLAT)
@@ -1065088,7 +1065047,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19
  #endif
  } 
  
-@@ -30,6 +30,8 @@ static inline cpumask_t target_cpus(void
+@@ -30,6 +30,8 @@
  #define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
  #define phys_pkg_id   (genapic->phys_pkg_id)
  #define vector_allocation_domain    (genapic->vector_allocation_domain)
@@ -1065097,7 +1065056,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19
  extern void setup_apic_routing(void);
  #else
  #define INT_DELIVERY_MODE dest_LowestPrio
-@@ -54,12 +56,12 @@ static inline void init_apic_ldr(void)
+@@ -54,12 +56,12 @@
  
  static inline int apic_id_registered(void)
  {
@@ -1065113,7 +1065072,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19
  }
  
  static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
-@@ -113,7 +115,7 @@ static inline int cpu_to_logical_apicid(
+@@ -113,7 +115,7 @@
  
  static inline int cpu_present_to_apicid(int mps_cpu)
  {
@@ -1065122,9 +1065081,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apic.h linux-2.6.27.19
                return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
        else
                return BAD_APICID;
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apicdef.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apicdef.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_apicdef.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_apicdef.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_apicdef.h
+--- a/include/asm-x86/mach-default/mach_apicdef.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_apicdef.h      Wed May 06 16:56:55 2009 +0100
 @@ -4,9 +4,9 @@
  #include <asm/apic.h>
  
@@ -1065138,9 +1065097,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_apicdef.h linux-2.6.27
  #else
  #define               APIC_ID_MASK            (0xF<<24)
  static inline unsigned get_apic_id(unsigned long x) 
-diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-default/mach_ipi.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-default/mach_ipi.h
+--- a/include/asm-x86/mach-default/mach_ipi.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-default/mach_ipi.h  Wed May 06 16:56:55 2009 +0100
 @@ -4,7 +4,8 @@
  /* Avoid include hell */
  #define NMI_VECTOR 0x02
@@ -1065151,7 +1065110,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h linux-2.6.27.19-
  void __send_IPI_shortcut(unsigned int shortcut, int vector);
  
  extern int no_broadcast;
-@@ -12,28 +13,27 @@ extern int no_broadcast;
+@@ -12,28 +13,27 @@
  #ifdef CONFIG_X86_64
  #include <asm/genapic.h>
  #define send_IPI_mask (genapic->send_IPI_mask)
@@ -1065187,10 +1065146,10 @@ diff -purN linux-2.6.27/include/asm-x86/mach-default/mach_ipi.h linux-2.6.27.19-
        else
                __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
  }
-diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_apic.h        2009-03-25 16:11:47.000000000 +0000
-@@ -9,12 +9,12 @@ static inline int apic_id_registered(voi
+diff -r 9608d5473017 include/asm-x86/mach-es7000/mach_apic.h
+--- a/include/asm-x86/mach-es7000/mach_apic.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-es7000/mach_apic.h  Wed May 06 16:56:55 2009 +0100
+@@ -9,12 +9,12 @@
                return (1);
  }
  
@@ -1065206,7 +1065165,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-
  #endif
  }
  #define TARGET_CPUS   (target_cpus())
-@@ -81,7 +81,7 @@ static inline void setup_apic_routing(vo
+@@ -81,7 +81,7 @@
        int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
        printk("Enabling APIC mode:  %s.  Using %d I/O APICs, target cpus %lx\n",
                (apic_version[apic] == 0x14) ? 
@@ -1065215,7 +1065174,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-
  }
  
  static inline int multi_timer_check(int apic, int irq)
-@@ -141,18 +141,18 @@ static inline void setup_portio_remap(vo
+@@ -141,18 +141,18 @@
  extern unsigned int boot_cpu_physical_apicid;
  static inline int check_phys_apicid_present(int cpu_physical_apicid)
  {
@@ -1065237,7 +1065196,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-
        /* Return id to all */
        if (num_bits_set == NR_CPUS)
  #if defined CONFIG_ES7000_CLUSTERED_APIC
-@@ -164,10 +164,10 @@ static inline unsigned int cpu_mask_to_a
+@@ -164,10 +164,10 @@
         * The cpus in the mask must all be on the apic cluster.  If are not 
         * on the same apicid cluster return default value of TARGET_CPUS. 
         */
@@ -1065250,9 +1065209,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_apic.h linux-2.6.27.19-
                        int new_apicid = cpu_to_logical_apicid(cpu);
                        if (apicid_cluster(apicid) != 
                                        apicid_cluster(new_apicid)){
-diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-es7000/mach_ipi.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-es7000/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-es7000/mach_ipi.h
+--- a/include/asm-x86/mach-es7000/mach_ipi.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-es7000/mach_ipi.h   Wed May 06 16:56:55 2009 +0100
 @@ -1,24 +1,30 @@
  #ifndef __ASM_MACH_IPI_H
  #define __ASM_MACH_IPI_H
@@ -1065291,9 +1065250,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-es7000/mach_ipi.h linux-2.6.27.19-5
  }
  
  #endif /* __ASM_MACH_IPI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-generic/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-generic/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-generic/mach_ipi.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-generic/mach_ipi.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-generic/mach_ipi.h
+--- a/include/asm-x86/mach-generic/mach_ipi.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-generic/mach_ipi.h  Wed May 06 16:56:55 2009 +0100
 @@ -4,6 +4,7 @@
  #include <asm/genapic.h>
  
@@ -1065302,9 +1065261,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-generic/mach_ipi.h linux-2.6.27.19-
  #define send_IPI_allbutself (genapic->send_IPI_allbutself)
  #define send_IPI_all (genapic->send_IPI_all)
  
-diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_apic.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-numaq/mach_apic.h
+--- a/include/asm-x86/mach-numaq/mach_apic.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-numaq/mach_apic.h   Wed May 06 16:56:55 2009 +0100
 @@ -7,9 +7,9 @@
  
  #define APIC_DFR_VALUE        (APIC_DFR_CLUSTER)
@@ -1065317,7 +1065276,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h linux-2.6.27.19-5
  }
  
  #define TARGET_CPUS (target_cpus())
-@@ -124,7 +124,7 @@ static inline void enable_apic_mode(void
+@@ -124,7 +124,7 @@
   * We use physical apicids here, not logical, so just return the default
   * physical broadcast to stop people from breaking us
   */
@@ -1065326,9 +1065285,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_apic.h linux-2.6.27.19-5
  {
        return (int) 0xF;
  }
-diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-numaq/mach_ipi.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-numaq/mach_ipi.h
+--- a/include/asm-x86/mach-numaq/mach_ipi.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-numaq/mach_ipi.h    Wed May 06 16:56:55 2009 +0100
 @@ -1,25 +1,31 @@
  #ifndef __ASM_MACH_IPI_H
  #define __ASM_MACH_IPI_H
@@ -1065342,22 +1065301,22 @@ diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h linux-2.6.27.19-5.
        send_IPI_mask_sequence(mask, vector);
  }
  
--static inline void send_IPI_allbutself(int vector)
 +static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
--      cpumask_t mask = cpu_online_map;
--      cpu_clear(smp_processor_id(), mask);
++{
 +      cpumask_t allbutself = *mask;
 +      cpu_clear(smp_processor_id(), allbutself);
 +
 +      if (!cpus_empty(allbutself))
 +              send_IPI_mask_sequence(&allbutself, vector);
 +}
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+-      cpumask_t mask = cpu_online_map;
+-      cpu_clear(smp_processor_id(), mask);
+-
 -      if (!cpus_empty(mask))
 -              send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
 +      send_IPI_mask_allbutself(&cpu_online_map, vector);
  }
  
@@ -1065369,9 +1065328,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-numaq/mach_ipi.h linux-2.6.27.19-5.
  
  #endif /* __ASM_MACH_IPI_H */
 +
-diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_apic.h
---- linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_apic.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-summit/mach_apic.h
+--- a/include/asm-x86/mach-summit/mach_apic.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-summit/mach_apic.h  Wed May 06 16:56:55 2009 +0100
 @@ -14,13 +14,13 @@
  
  #define APIC_DFR_VALUE        (APIC_DFR_CLUSTER)
@@ -1065388,7 +1065347,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h linux-2.6.27.19-
  } 
  #define TARGET_CPUS   (target_cpus())
  
-@@ -138,14 +138,14 @@ static inline void enable_apic_mode(void
+@@ -138,14 +138,14 @@
  {
  }
  
@@ -1065405,7 +1065364,7 @@ diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h linux-2.6.27.19-
        /* Return id to all */
        if (num_bits_set == NR_CPUS)
                return (int) 0xFF;
-@@ -153,10 +153,10 @@ static inline unsigned int cpu_mask_to_a
+@@ -153,10 +153,10 @@
         * The cpus in the mask must all be on the apic cluster.  If are not 
         * on the same apicid cluster return default value of TARGET_CPUS. 
         */
@@ -1065418,9 +1065377,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_apic.h linux-2.6.27.19-
                        int new_apicid = cpu_to_logical_apicid(cpu);
                        if (apicid_cluster(apicid) != 
                                        apicid_cluster(new_apicid)){
-diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_ipi.h
---- linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-summit/mach_ipi.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-summit/mach_ipi.h
+--- a/include/asm-x86/mach-summit/mach_ipi.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mach-summit/mach_ipi.h   Wed May 06 16:56:55 2009 +0100
 @@ -1,25 +1,31 @@
  #ifndef __ASM_MACH_IPI_H
  #define __ASM_MACH_IPI_H
@@ -1065434,22 +1065393,22 @@ diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h linux-2.6.27.19-5
        send_IPI_mask_sequence(mask, vector);
  }
  
--static inline void send_IPI_allbutself(int vector)
 +static inline void send_IPI_mask_allbutself(const cpumask_t *mask, int vector)
- {
--      cpumask_t mask = cpu_online_map;
--      cpu_clear(smp_processor_id(), mask);
++{
 +      cpumask_t allbutself = *mask;
 +      cpu_clear(smp_processor_id(), allbutself);
 +
 +      if (!cpus_empty(allbutself))
 +              send_IPI_mask_sequence(&allbutself, vector);
 +}
++
+ static inline void send_IPI_allbutself(int vector)
+ {
+-      cpumask_t mask = cpu_online_map;
+-      cpu_clear(smp_processor_id(), mask);
+-
 -      if (!cpus_empty(mask))
 -              send_IPI_mask(mask, vector);
-+static inline void send_IPI_allbutself(int vector)
-+{
 +      send_IPI_mask_allbutself(&cpu_online_map, vector);
  }
  
@@ -1065461,9 +1065420,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-summit/mach_ipi.h linux-2.6.27.19-5
  
  #endif /* __ASM_MACH_IPI_H */
 +
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/agp.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/agp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/agp.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/agp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/agp.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,43 @@
 +#ifndef _ASM_X86_AGP_H
 +#define _ASM_X86_AGP_H
@@ -1065508,9 +1065467,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/agp.h linux-2.6.27.19-5.1/i
 +      dma_free_coherent(NULL,PAGE_SIZE<<(order),(table),virt_to_bus(table))
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/desc.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/desc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/desc.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/desc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/desc.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,423 @@
 +#ifndef _ASM_DESC_H_
 +#define _ASM_DESC_H_
@@ -1065935,9 +1065894,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/desc.h linux-2.6.27.19-5.1/
 +#endif /* __ASSEMBLY__ */
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/dma-mapping.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/dma-mapping.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/dma-mapping.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/dma-mapping.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/dma-mapping.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,17 @@
 +#ifndef _ASM_DMA_MAPPING_H_
 +
@@ -1065956,9 +1065915,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/dma-mapping.h linux-2.6.27.
 +extern int range_straddles_page_boundary(paddr_t p, size_t size);
 +
 +#endif /* _ASM_DMA_MAPPING_H_ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,64 @@
 +#ifndef _ASM_FIXMAP_H
 +#define _ASM_FIXMAP_H
@@ -1066024,9 +1065983,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap.h linux-2.6.27.19-5.
 +      return __virt_to_fix(vaddr);
 +}
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_32.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap_32.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,129 @@
 +/*
 + * fixmap.h: compile-time virtual memory allocation
@@ -1066157,9 +1066116,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_32.h linux-2.6.27.19
 +
 +#endif /* !__ASSEMBLY__ */
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/fixmap_64.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/fixmap_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/fixmap_64.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,92 @@
 +/*
 + * fixmap.h: compile-time virtual memory allocation
@@ -1066253,9 +1066212,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/fixmap_64.h linux-2.6.27.19
 +#define FIXADDR_USER_END      (FIXADDR_USER_START + PAGE_SIZE)
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/gnttab_dma.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/gnttab_dma.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/gnttab_dma.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/gnttab_dma.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/gnttab_dma.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,41 @@
 +/*
 + * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
@@ -1066298,9 +1066257,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/gnttab_dma.h linux-2.6.27.1
 +}
 +
 +#endif /* _ASM_I386_GNTTAB_DMA_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/highmem.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/highmem.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/highmem.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/highmem.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/highmem.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,99 @@
 +/*
 + * highmem.h: virtual kernel memory mappings for high memory
@@ -1066401,9 +1066360,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/highmem.h linux-2.6.27.19-5
 +#endif /* __KERNEL__ */
 +
 +#endif /* _ASM_HIGHMEM_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,414 @@
 +/******************************************************************************
 + * hypercall.h
@@ -1066819,9 +1066778,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall.h linux-2.6.27.19
 +}
 +
 +#endif /* __HYPERCALL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_32.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall_32.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,62 @@
 +#define HYPERCALL_arg1 "ebx"
 +#define HYPERCALL_arg2 "ecx"
@@ -1066885,9 +1066844,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_32.h linux-2.6.27
 +      return _hypercall5(int, update_va_mapping_otherdomain, va,
 +                         new_val.pte_low, pte_hi, flags, domid);
 +}
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypercall_64.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypercall_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypercall_64.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,54 @@
 +#define HYPERCALL_arg1 "rdi"
 +#define HYPERCALL_arg2 "rsi"
@@ -1066943,9 +1066902,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypercall_64.h linux-2.6.27
 +{
 +      return _hypercall2(int, set_segment_base, reg, value);
 +}
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypervisor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypervisor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/hypervisor.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/hypervisor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/hypervisor.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,362 @@
 +/******************************************************************************
 + * hypervisor.h
@@ -1067309,9 +1067268,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/hypervisor.h linux-2.6.27.1
 +#endif
 +
 +#endif /* __HYPERVISOR_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,103 @@
 +#ifndef _ASM_X86_IO_H
 +#define _ASM_X86_IO_H
@@ -1067416,9 +1067375,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io.h linux-2.6.27.19-5.1/in
 +
 +
 +#endif /* _ASM_X86_IO_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_32.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io_32.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,295 @@
 +#ifndef _ASM_IO_H
 +#define _ASM_IO_H
@@ -1067715,9 +1067674,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_32.h linux-2.6.27.19-5.1
 +#define ARCH_HAS_DEV_MEM
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/io_64.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/io_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/io_64.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,264 @@
 +#ifndef _ASM_IO_H
 +#define _ASM_IO_H
@@ -1067983,9 +1067942,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/io_64.h linux-2.6.27.19-5.1
 +#define ARCH_HAS_DEV_MEM
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irq_vectors.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irq_vectors.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irq_vectors.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/irq_vectors.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/irq_vectors.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,52 @@
 +#ifndef _ASM_IRQ_VECTORS_H
 +#define _ASM_IRQ_VECTORS_H
@@ -1068039,9 +1067998,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irq_vectors.h linux-2.6.27.
 +#define NR_IRQ_VECTORS                NR_IRQS
 +
 +#endif /* _ASM_IRQ_VECTORS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irqflags.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irqflags.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/irqflags.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/irqflags.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/irqflags.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,217 @@
 +#ifndef _X86_IRQFLAGS_H_
 +#define _X86_IRQFLAGS_H_
@@ -1068260,18 +1068219,18 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/irqflags.h linux-2.6.27.19-
 +
 +#endif /* __ASSEMBLY__ */
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,5 @@
 +#ifdef CONFIG_X86_32
 +# include "maddr_32.h"
 +#else
 +# include "maddr_64.h"
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_32.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr_32.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,182 @@
 +#ifndef _I386_MADDR_H
 +#define _I386_MADDR_H
@@ -1068455,9 +1068414,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_32.h linux-2.6.27.19-
 +#define mfn_to_virt(m)                (__va(mfn_to_pfn(m) << PAGE_SHIFT))
 +
 +#endif /* _I386_MADDR_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/maddr_64.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/maddr_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/maddr_64.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,163 @@
 +#ifndef _X86_64_MADDR_H
 +#define _X86_64_MADDR_H
@@ -1068622,9 +1068581,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/maddr_64.h linux-2.6.27.19-
 +
 +#endif /* _X86_64_MADDR_H */
 +
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,42 @@
 +#ifndef __ASM_X86_MMU_CONTEXT_H
 +#define __ASM_X86_MMU_CONTEXT_H
@@ -1068668,9 +1068627,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context.h linux-2.6.27.
 +
 +
 +#endif /* __ASM_X86_MMU_CONTEXT_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_32.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context_32.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,84 @@
 +#ifndef __I386_SCHED_H
 +#define __I386_SCHED_H
@@ -1068756,9 +1068715,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_32.h linux-2.6.
 +      asm("movl %0,%%gs": :"r" (0));
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/mmu_context_64.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/mmu_context_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/mmu_context_64.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,109 @@
 +#ifndef __X86_64_MMU_CONTEXT_H
 +#define __X86_64_MMU_CONTEXT_H
@@ -1068869,9 +1068828,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/mmu_context_64.h linux-2.6.
 +} while (0)
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/page.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/page.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,249 @@
 +#ifndef _ASM_X86_PAGE_H
 +#define _ASM_X86_PAGE_H
@@ -1069122,9 +1069081,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page.h linux-2.6.27.19-5.1/
 +
 +#endif        /* __KERNEL__ */
 +#endif        /* _ASM_X86_PAGE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/page_64.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/page_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/page_64.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,113 @@
 +#ifndef _X86_64_PAGE_H
 +#define _X86_64_PAGE_H
@@ -1069239,9 +1069198,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/page_64.h linux-2.6.27.19-5
 +
 +
 +#endif /* _X86_64_PAGE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,120 @@
 +#ifndef __x86_PCI_H
 +#define __x86_PCI_H
@@ -1069363,9 +1069322,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci.h linux-2.6.27.19-5.1/i
 +#endif
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_32.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci_32.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,56 @@
 +#ifndef __i386_PCI_H
 +#define __i386_PCI_H
@@ -1069423,9 +1069382,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_32.h linux-2.6.27.19-5.
 +
 +
 +#endif /* __i386_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pci_64.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pci_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pci_64.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,68 @@
 +#ifndef __x8664_PCI_H
 +#define __x8664_PCI_H
@@ -1069495,9 +1069454,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pci_64.h linux-2.6.27.19-5.
 +#endif /* __KERNEL__ */
 +
 +#endif /* __x8664_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgalloc.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgalloc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgalloc.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgalloc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgalloc.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,135 @@
 +#ifndef _ASM_X86_PGALLOC_H
 +#define _ASM_X86_PGALLOC_H
@@ -1069634,9 +1069593,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgalloc.h linux-2.6.27.19-5
 +#endif        /* PAGETABLE_LEVELS > 2 */
 +
 +#endif        /* _ASM_X86_PGALLOC_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable-3level-defs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,24 @@
 +#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
 +#define _I386_PGTABLE_3LEVEL_DEFS_H
@@ -1069662,9 +1069621,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level-defs.h linux
 +#define PTRS_PER_PTE  512
 +
 +#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable-3level.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable-3level.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable-3level.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,179 @@
 +#ifndef _I386_PGTABLE_3LEVEL_H
 +#define _I386_PGTABLE_3LEVEL_H
@@ -1069845,9 +1069804,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable-3level.h linux-2.6.
 +#define __swp_entry_to_pte(x)         ((pte_t){ { .pte_high = (x).val } })
 +
 +#endif /* _I386_PGTABLE_3LEVEL_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,644 @@
 +#ifndef _ASM_X86_PGTABLE_H
 +#define _ASM_X86_PGTABLE_H
@@ -1070493,9 +1070452,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable.h linux-2.6.27.19-5
 +#endif        /* __ASSEMBLY__ */
 +
 +#endif        /* _ASM_X86_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_32.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_32.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable_32.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,198 @@
 +#ifndef _I386_PGTABLE_H
 +#define _I386_PGTABLE_H
@@ -1070695,9 +1070654,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_32.h linux-2.6.27.1
 +      direct_remap_pfn_range(vma, from, pfn, size, prot, DOMID_IO)
 +
 +#endif /* _I386_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/pgtable_64.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/pgtable_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/pgtable_64.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,330 @@
 +#ifndef _X86_64_PGTABLE_H
 +#define _X86_64_PGTABLE_H
@@ -1071029,9 +1070988,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/pgtable_64.h linux-2.6.27.1
 +#endif /* !__ASSEMBLY__ */
 +
 +#endif /* _X86_64_PGTABLE_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/processor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/processor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/processor.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/processor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/processor.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,896 @@
 +#ifndef __ASM_X86_PROCESSOR_H
 +#define __ASM_X86_PROCESSOR_H
@@ -1071929,9 +1071888,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/processor.h linux-2.6.27.19
 +extern int set_tsc_mode(unsigned int val);
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/segment.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/segment.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/segment.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/segment.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/segment.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,216 @@
 +#ifndef _ASM_X86_SEGMENT_H_
 +#define _ASM_X86_SEGMENT_H_
@@ -1072149,9 +1072108,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/segment.h linux-2.6.27.19-5
 +#endif
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/smp.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/smp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/smp.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/smp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/smp.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,223 @@
 +#ifndef _ASM_X86_SMP_H_
 +#define _ASM_X86_SMP_H_
@@ -1072376,9 +1072335,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/smp.h linux-2.6.27.19-5.1/i
 +
 +#endif /* __ASSEMBLY__ */
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/spinlock.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/spinlock.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/spinlock.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/spinlock.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/spinlock.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,432 @@
 +#ifndef _X86_SPINLOCK_H_
 +#define _X86_SPINLOCK_H_
@@ -1072812,9 +1072771,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/spinlock.h linux-2.6.27.19-
 +#define _raw_write_relax(lock)        cpu_relax()
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/swiotlb.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/swiotlb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/swiotlb.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/swiotlb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/swiotlb.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,8 @@
 +#ifndef _ASM_SWIOTLB_H
 +
@@ -1072824,9 +1072783,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/swiotlb.h linux-2.6.27.19-5
 +                                 int dir);
 +
 +#endif /* _ASM_SWIOTLB_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/synch_bitops.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/synch_bitops.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/synch_bitops.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/synch_bitops.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/synch_bitops.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,126 @@
 +#ifndef __XEN_SYNCH_BITOPS_H__
 +#define __XEN_SYNCH_BITOPS_H__
@@ -1072954,9 +1072913,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/synch_bitops.h linux-2.6.27
 +#define synch_cmpxchg_subword synch_cmpxchg
 +
 +#endif /* __XEN_SYNCH_BITOPS_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/system.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/system.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,406 @@
 +#ifndef _ASM_X86_SYSTEM_H_
 +#define _ASM_X86_SYSTEM_H_
@@ -1073364,9 +1073323,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system.h linux-2.6.27.19-5.
 +}
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/system_64.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/system_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/system_64.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,20 @@
 +#ifndef __ASM_SYSTEM_H
 +#define __ASM_SYSTEM_H
@@ -1073388,9 +1073347,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/system_64.h linux-2.6.27.19
 +#include <linux/irqflags.h>
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/tlbflush.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/tlbflush.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/tlbflush.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/tlbflush.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/tlbflush.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,107 @@
 +#ifndef _ASM_X86_TLBFLUSH_H
 +#define _ASM_X86_TLBFLUSH_H
@@ -1073499,9 +1073458,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/tlbflush.h linux-2.6.27.19-
 +}
 +
 +#endif /* _ASM_X86_TLBFLUSH_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/vga.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/vga.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/vga.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/vga.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/vga.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,20 @@
 +/*
 + *    Access to VGA videoram
@@ -1073523,9 +1073482,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/vga.h linux-2.6.27.19-5.1/i
 +#define vga_writeb(x, y) (*(y) = (x))
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xenoprof.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xenoprof.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xenoprof.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xenoprof.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xenoprof.h  Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,48 @@
 +/******************************************************************************
 + * asm-i386/mach-xen/asm/xenoprof.h
@@ -1073575,18 +1073534,18 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xenoprof.h linux-2.6.27.19-
 +
 +#endif /* CONFIG_XEN */
 +#endif /* __ASM_XENOPROF_H__ */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xor.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xor.h       Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,5 @@
 +#ifdef CONFIG_X86_32
 +# include "../../xor_32.h"
 +#else
 +# include "xor_64.h"
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xor_64.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/asm/xor_64.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/asm/xor_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/asm/xor_64.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,337 @@
 +#ifndef ASM_X86__XOR_64_H
 +#define ASM_X86__XOR_64_H
@@ -1073925,9 +1073884,9 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/asm/xor_64.h linux-2.6.27.19-5.
 +#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
 +
 +#endif /* ASM_X86__XOR_64_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_apic.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_apic.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_apic.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_apic.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_apic.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,54 @@
 +#ifndef __ASM_MACH_APIC_H
 +#define __ASM_MACH_APIC_H
@@ -1073983,20 +1073942,20 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_apic.h linux-2.6.27.19-5.1
 +#endif /* CONFIG_X86_64 */
 +
 +#endif /* __ASM_MACH_APIC_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_time.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_time.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_time.h   2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_time.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_time.h     Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,2 @@
 +#include "../mc146818rtc_32.h"
 +#include "../mach-default/mach_time.h"
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_timer.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_timer.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_timer.h  2009-03-25 16:11:47.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_timer.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_timer.h    Wed May 06 16:56:55 2009 +0100
+@@ -0,0 +1,1 @@
 +#include "../mach-default/mach_timer.h"
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_traps.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_traps.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/mach_traps.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/mach_traps.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/mach_traps.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,33 @@
 +/*
 + *  include/asm-xen/asm-i386/mach-xen/mach_traps.h
@@ -1074031,19 +1073990,19 @@ diff -purN linux-2.6.27/include/asm-x86/mach-xen/mach_traps.h linux-2.6.27.19-5.
 +static inline void reassert_nmi(void) {}
 +
 +#endif /* !_MACH_TRAPS_H */
-diff -purN linux-2.6.27/include/asm-x86/mach-xen/setup_arch.h linux-2.6.27.19-5.1/include/asm-x86/mach-xen/setup_arch.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mach-xen/setup_arch.h  2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/mach-xen/setup_arch.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/mach-xen/setup_arch.h    Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,5 @@
 +/* Hook to call BIOS initialisation function */
 +
 +#define ARCH_SETUP machine_specific_arch_setup();
 +
 +void __init machine_specific_arch_setup(void);
-diff -purN linux-2.6.27/include/asm-x86/mmu.h linux-2.6.27.19-5.1/include/asm-x86/mmu.h
---- linux-2.6.27/include/asm-x86/mmu.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mmu.h  2009-03-25 16:11:47.000000000 +0000
-@@ -16,11 +16,14 @@ typedef struct {
+diff -r 9608d5473017 include/asm-x86/mmu.h
+--- a/include/asm-x86/mmu.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mmu.h    Wed May 06 16:56:55 2009 +0100
+@@ -16,11 +16,14 @@
        rwlock_t ldtlock;
  #endif
        int size;
@@ -1074059,10 +1074018,10 @@ diff -purN linux-2.6.27/include/asm-x86/mmu.h linux-2.6.27.19-5.1/include/asm-x8
  void leave_mm(int cpu);
  #else
  static inline void leave_mm(int cpu)
-diff -purN linux-2.6.27/include/asm-x86/mmzone_32.h linux-2.6.27.19-5.1/include/asm-x86/mmzone_32.h
---- linux-2.6.27/include/asm-x86/mmzone_32.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/mmzone_32.h    2009-03-25 16:11:47.000000000 +0000
-@@ -34,10 +34,14 @@ static inline void get_memcfg_numa(void)
+diff -r 9608d5473017 include/asm-x86/mmzone_32.h
+--- a/include/asm-x86/mmzone_32.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/mmzone_32.h      Wed May 06 16:56:55 2009 +0100
+@@ -34,9 +34,13 @@
  
  extern int early_pfn_to_nid(unsigned long pfn);
  
@@ -1074071,15 +1074030,14 @@ diff -purN linux-2.6.27/include/asm-x86/mmzone_32.h linux-2.6.27.19-5.1/include/
  #else /* !CONFIG_NUMA */
  
  #define get_memcfg_numa get_memcfg_numa_flat
-+static inline void resume_map_numa_kva(pgd_t *pgd) {}
 +
++static inline void resume_map_numa_kva(pgd_t *pgd) {}
  #endif /* CONFIG_NUMA */
  
- #ifdef CONFIG_DISCONTIGMEM
-diff -purN linux-2.6.27/include/asm-x86/msidef.h linux-2.6.27.19-5.1/include/asm-x86/msidef.h
---- linux-2.6.27/include/asm-x86/msidef.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/msidef.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/msidef.h
+--- a/include/asm-x86/msidef.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/msidef.h Wed May 06 16:56:55 2009 +0100
 @@ -48,4 +48,8 @@
  #define  MSI_ADDR_DEST_ID(dest)               (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
                                         MSI_ADDR_DEST_ID_MASK)
@@ -1074089,19 +1074047,19 @@ diff -purN linux-2.6.27/include/asm-x86/msidef.h linux-2.6.27.19-5.1/include/asm
 +#define MSI_ADDR_IR_INDEX1(index)     ((index & 0x8000) >> 13)
 +#define MSI_ADDR_IR_INDEX2(index)     ((index & 0x7fff) << 5)
  #endif /* ASM_MSIDEF_H */
-diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x86/nmi.h
---- linux-2.6.27/include/asm-x86/nmi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/nmi.h  2009-03-25 16:11:47.000000000 +0000
-@@ -5,8 +5,6 @@
+diff -r 9608d5473017 include/asm-x86/nmi.h
+--- a/include/asm-x86/nmi.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/nmi.h    Wed May 06 16:56:55 2009 +0100
+@@ -4,8 +4,6 @@
+ #include <linux/pm.h>
  #include <asm/irq.h>
  #include <asm/io.h>
--#ifdef ARCH_HAS_NMI_WATCHDOG
 -
+-#ifdef ARCH_HAS_NMI_WATCHDOG
  /**
   * do_nmi_callback
-  *
-@@ -20,6 +18,11 @@ extern void default_do_nmi(struct pt_reg
+@@ -20,6 +18,11 @@
  #endif
  
  extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
@@ -1074113,7 +1074071,7 @@ diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x8
  extern int check_nmi_watchdog(void);
  extern int nmi_watchdog_enabled;
  extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
-@@ -46,7 +49,6 @@ struct ctl_table;
+@@ -46,7 +49,6 @@
  struct file;
  extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
                        void __user *, size_t *, loff_t *);
@@ -1074121,7 +1074079,7 @@ diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x8
  
  void __trigger_all_cpu_backtrace(void);
  #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
-@@ -69,7 +71,6 @@ static inline int nmi_watchdog_active(vo
+@@ -69,7 +71,6 @@
         */
        return nmi_watchdog & 0x3;
  }
@@ -1074129,7 +1074087,7 @@ diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x8
  
  void lapic_watchdog_stop(void);
  int lapic_watchdog_init(unsigned nmi_hz);
-@@ -78,6 +79,9 @@ unsigned lapic_adjust_nmi_hz(unsigned hz
+@@ -78,6 +79,9 @@
  int lapic_watchdog_ok(void);
  void disable_lapic_nmi_watchdog(void);
  void enable_lapic_nmi_watchdog(void);
@@ -1074139,10 +1074097,10 @@ diff -purN linux-2.6.27/include/asm-x86/nmi.h linux-2.6.27.19-5.1/include/asm-x8
  void stop_nmi(void);
  void restart_nmi(void);
  
-diff -purN linux-2.6.27/include/asm-x86/paravirt.h linux-2.6.27.19-5.1/include/asm-x86/paravirt.h
---- linux-2.6.27/include/asm-x86/paravirt.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/paravirt.h     2009-03-25 16:11:47.000000000 +0000
-@@ -200,15 +200,8 @@ struct pv_irq_ops {
+diff -r 9608d5473017 include/asm-x86/paravirt.h
+--- a/include/asm-x86/paravirt.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/paravirt.h       Wed May 06 16:56:55 2009 +0100
+@@ -200,15 +200,8 @@
  
  struct pv_apic_ops {
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -1074158,7 +1074116,7 @@ diff -purN linux-2.6.27/include/asm-x86/paravirt.h linux-2.6.27.19-5.1/include/a
        void (*startup_ipi_hook)(int phys_apicid,
                                 unsigned long start_eip,
                                 unsigned long start_esp);
-@@ -898,19 +891,6 @@ static inline void slow_down_io(void)
+@@ -898,19 +891,6 @@
  }
  
  #ifdef CONFIG_X86_LOCAL_APIC
@@ -1074178,10 +1074136,10 @@ diff -purN linux-2.6.27/include/asm-x86/paravirt.h linux-2.6.27.19-5.1/include/a
  static inline void setup_boot_clock(void)
  {
        PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
-diff -purN linux-2.6.27/include/asm-x86/pci.h linux-2.6.27.19-5.1/include/asm-x86/pci.h
---- linux-2.6.27/include/asm-x86/pci.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pci.h  2009-03-25 16:11:47.000000000 +0000
-@@ -19,6 +19,8 @@ struct pci_sysdata {
+diff -r 9608d5473017 include/asm-x86/pci.h
+--- a/include/asm-x86/pci.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pci.h    Wed May 06 16:56:55 2009 +0100
+@@ -19,6 +19,8 @@
  };
  
  extern int pci_routeirq;
@@ -1074190,10 +1074148,10 @@ diff -purN linux-2.6.27/include/asm-x86/pci.h linux-2.6.27.19-5.1/include/asm-x8
  
  /* scan a bus after allocating a pci_sysdata for it */
  extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
-diff -purN linux-2.6.27/include/asm-x86/pci_64.h linux-2.6.27.19-5.1/include/asm-x86/pci_64.h
---- linux-2.6.27/include/asm-x86/pci_64.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pci_64.h       2009-03-25 16:11:47.000000000 +0000
-@@ -34,8 +34,6 @@ extern void pci_iommu_alloc(void);
+diff -r 9608d5473017 include/asm-x86/pci_64.h
+--- a/include/asm-x86/pci_64.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pci_64.h Wed May 06 16:56:55 2009 +0100
+@@ -34,8 +34,6 @@
   */
  #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
  
@@ -1074202,7 +1074160,7 @@ diff -purN linux-2.6.27/include/asm-x86/pci_64.h linux-2.6.27.19-5.1/include/asm
  #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)     \
        dma_addr_t ADDR_NAME;
  #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)               \
-@@ -49,18 +47,6 @@ extern void pci_iommu_alloc(void);
+@@ -49,18 +47,6 @@
  #define pci_unmap_len_set(PTR, LEN_NAME, VAL)         \
        (((PTR)->LEN_NAME) = (VAL))
  
@@ -1074221,10 +1074179,10 @@ diff -purN linux-2.6.27/include/asm-x86/pci_64.h linux-2.6.27.19-5.1/include/asm
  #endif /* __KERNEL__ */
  
  #endif /* __x8664_PCI_H */
-diff -purN linux-2.6.27/include/asm-x86/pda.h linux-2.6.27.19-5.1/include/asm-x86/pda.h
---- linux-2.6.27/include/asm-x86/pda.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pda.h  2009-03-25 16:11:47.000000000 +0000
-@@ -26,9 +26,13 @@ struct x8664_pda {
+diff -r 9608d5473017 include/asm-x86/pda.h
+--- a/include/asm-x86/pda.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pda.h    Wed May 06 16:56:55 2009 +0100
+@@ -26,9 +26,13 @@
        short in_bootmem;               /* pda lives in bootmem */
        unsigned int __softirq_pending;
        unsigned int __nmi_count;       /* number of NMI on this CPUs */
@@ -1074238,9 +1074196,9 @@ diff -purN linux-2.6.27/include/asm-x86/pda.h linux-2.6.27.19-5.1/include/asm-x8
        unsigned apic_timer_irqs;
        unsigned irq0_irqs;
        unsigned irq_resched_count;
-diff -purN linux-2.6.27/include/asm-x86/perfmon.h linux-2.6.27.19-5.1/include/asm-x86/perfmon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,34 @@
 +/*
 + * Copyright (c) 2007 Hewlett-Packard Development Company, L.P.
@@ -1074276,9 +1074234,9 @@ diff -purN linux-2.6.27/include/asm-x86/perfmon.h linux-2.6.27.19-5.1/include/as
 +#define PFM_ARCH_MAX_PMDS     (256+64) /* 256 HW 64 SW */
 +
 +#endif /* _ASM_X86_PERFMON_H_ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_kern.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_kern.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_kern.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,538 @@
 +/*
 + * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
@@ -1074818,9 +1074776,9 @@ diff -purN linux-2.6.27/include/asm-x86/perfmon_kern.h linux-2.6.27.19-5.1/inclu
 +#endif /* CONFIG_PEFMON */
 +
 +#endif /* _ASM_X86_PERFMON_KERN_H_ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_core_smpl.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_core_smpl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_core_smpl.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_pebs_core_smpl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_pebs_core_smpl.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,164 @@
 +/*
 + * Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P.
@@ -1074986,9 +1074944,9 @@ diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_core_smpl.h linux-2.6.27.19
 +                                 (PFM_PEBS_CORE_SMPL_VERSION_MIN & 0xffff))
 +
 +#endif /* __PERFMON_PEBS_CORE_SMPL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_p4_smpl.h linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_p4_smpl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/perfmon_pebs_p4_smpl.h 2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/perfmon_pebs_p4_smpl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/perfmon_pebs_p4_smpl.h   Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,193 @@
 +/*
 + * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
@@ -1075183,10 +1075141,10 @@ diff -purN linux-2.6.27/include/asm-x86/perfmon_pebs_p4_smpl.h linux-2.6.27.19-5
 +                                 (PFM_PEBS_P4_SMPL_VERSION_MIN & 0xffff))
 +
 +#endif /* __PERFMON_PEBS_P4_SMPL_H__ */
-diff -purN linux-2.6.27/include/asm-x86/pgalloc.h linux-2.6.27.19-5.1/include/asm-x86/pgalloc.h
---- linux-2.6.27/include/asm-x86/pgalloc.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/pgalloc.h      2009-03-25 16:11:47.000000000 +0000
-@@ -42,6 +42,7 @@ static inline void pte_free_kernel(struc
+diff -r 9608d5473017 include/asm-x86/pgalloc.h
+--- a/include/asm-x86/pgalloc.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/pgalloc.h        Wed May 06 16:56:55 2009 +0100
+@@ -42,6 +42,7 @@
  
  static inline void pte_free(struct mm_struct *mm, struct page *pte)
  {
@@ -1075194,10 +1075152,10 @@ diff -purN linux-2.6.27/include/asm-x86/pgalloc.h linux-2.6.27.19-5.1/include/as
        __free_page(pte);
  }
  
-diff -purN linux-2.6.27/include/asm-x86/processor.h linux-2.6.27.19-5.1/include/asm-x86/processor.h
---- linux-2.6.27/include/asm-x86/processor.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/processor.h    2009-03-25 16:11:47.000000000 +0000
-@@ -109,6 +109,7 @@ struct cpuinfo_x86 {
+diff -r 9608d5473017 include/asm-x86/processor.h
+--- a/include/asm-x86/processor.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/processor.h      Wed May 06 16:56:55 2009 +0100
+@@ -109,6 +109,7 @@
        /* Index into per_cpu list: */
        u16                     cpu_index;
  #endif
@@ -1075205,17 +1075163,17 @@ diff -purN linux-2.6.27/include/asm-x86/processor.h linux-2.6.27.19-5.1/include/
  } __attribute__((__aligned__(SMP_CACHE_BYTES)));
  
  #define X86_VENDOR_INTEL      0
-@@ -122,6 +123,9 @@ struct cpuinfo_x86 {
+@@ -121,6 +122,9 @@
+ #define X86_VENDOR_NUM                9
  
  #define X86_VENDOR_UNKNOWN    0xff
++
 +#define X86_HYPER_VENDOR_NONE  0
 +#define X86_HYPER_VENDOR_VMWARE 1
-+
  /*
   * capabilities of CPUs
-  */
-@@ -161,6 +165,7 @@ extern void init_scattered_cpuid_feature
+@@ -161,6 +165,7 @@
  extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
  extern unsigned short num_cache_leaves;
  
@@ -1075223,13 +1075181,14 @@ diff -purN linux-2.6.27/include/asm-x86/processor.h linux-2.6.27.19-5.1/include/
  #if defined(CONFIG_X86_HT) || defined(CONFIG_X86_64)
  extern void detect_ht(struct cpuinfo_x86 *c);
  #else
-diff -purN linux-2.6.27/include/asm-x86/ptrace.h linux-2.6.27.19-5.1/include/asm-x86/ptrace.h
---- linux-2.6.27/include/asm-x86/ptrace.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/ptrace.h       2009-03-25 16:11:47.000000000 +0000
-@@ -16,6 +16,29 @@
+diff -r 9608d5473017 include/asm-x86/ptrace.h
+--- a/include/asm-x86/ptrace.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/ptrace.h Wed May 06 16:56:55 2009 +0100
+@@ -15,6 +15,29 @@
+ #ifdef __i386__
  /* this struct defines the way the registers are stored on the
     stack during a system call. */
++
 +enum EFLAGS {
 +        EF_CF   = 0x00000001,
 +        EF_PF   = 0x00000004,
@@ -1075252,11 +1075211,10 @@ diff -purN linux-2.6.27/include/asm-x86/ptrace.h linux-2.6.27.19-5.1/include/asm
 +        EF_VIP  = 0x00100000,   /* virtual interrupt pending */
 +        EF_ID   = 0x00200000,   /* id */
 +};
-+
  #ifndef __KERNEL__
  
- struct pt_regs {
-@@ -213,6 +236,11 @@ static inline unsigned long frame_pointe
+@@ -213,6 +236,11 @@
        return regs->bp;
  }
  
@@ -1075268,7 +1075226,7 @@ diff -purN linux-2.6.27/include/asm-x86/ptrace.h linux-2.6.27.19-5.1/include/asm
  /*
   * These are defined as per linux/ptrace.h, which see.
   */
-@@ -221,7 +249,9 @@ extern void user_enable_single_step(stru
+@@ -221,7 +249,9 @@
  extern void user_disable_single_step(struct task_struct *);
  
  extern void user_enable_block_step(struct task_struct *);
@@ -1075279,10 +1075237,10 @@ diff -purN linux-2.6.27/include/asm-x86/ptrace.h linux-2.6.27.19-5.1/include/asm
  #define arch_has_block_step() (1)
  #else
  #define arch_has_block_step() (boot_cpu_data.x86 >= 6)
-diff -purN linux-2.6.27/include/asm-x86/scatterlist.h linux-2.6.27.19-5.1/include/asm-x86/scatterlist.h
---- linux-2.6.27/include/asm-x86/scatterlist.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/scatterlist.h  2009-03-25 16:11:47.000000000 +0000
-@@ -24,7 +24,7 @@ struct scatterlist {
+diff -r 9608d5473017 include/asm-x86/scatterlist.h
+--- a/include/asm-x86/scatterlist.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/scatterlist.h    Wed May 06 16:56:55 2009 +0100
+@@ -24,7 +24,7 @@
   * returns.
   */
  #define sg_dma_address(sg)    ((sg)->dma_address)
@@ -1075291,10 +1075249,10 @@ diff -purN linux-2.6.27/include/asm-x86/scatterlist.h linux-2.6.27.19-5.1/includ
  # define sg_dma_len(sg)               ((sg)->length)
  #else
  # define sg_dma_len(sg)               ((sg)->dma_length)
-diff -purN linux-2.6.27/include/asm-x86/smp.h linux-2.6.27.19-5.1/include/asm-x86/smp.h
---- linux-2.6.27/include/asm-x86/smp.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/smp.h  2009-03-25 16:11:47.000000000 +0000
-@@ -53,7 +53,7 @@ struct smp_ops {
+diff -r 9608d5473017 include/asm-x86/smp.h
+--- a/include/asm-x86/smp.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/smp.h    Wed May 06 16:56:55 2009 +0100
+@@ -53,7 +53,7 @@
        void (*smp_send_stop)(void);
        void (*smp_send_reschedule)(int cpu);
  
@@ -1075303,7 +1075261,7 @@ diff -purN linux-2.6.27/include/asm-x86/smp.h linux-2.6.27.19-5.1/include/asm-x8
        void (*send_call_func_single_ipi)(int cpu);
  };
  
-@@ -103,14 +103,14 @@ static inline void arch_send_call_functi
+@@ -103,14 +103,14 @@
  
  static inline void arch_send_call_function_ipi(cpumask_t mask)
  {
@@ -1075320,7 +1075278,7 @@ diff -purN linux-2.6.27/include/asm-x86/smp.h linux-2.6.27.19-5.1/include/asm-x8
  void native_send_call_func_single_ipi(int cpu);
  
  extern int __cpu_disable(void);
-@@ -165,30 +165,33 @@ extern int safe_smp_processor_id(void);
+@@ -165,30 +165,33 @@
  
  #ifdef CONFIG_X86_LOCAL_APIC
  
@@ -1075361,10 +1075319,10 @@ diff -purN linux-2.6.27/include/asm-x86/smp.h linux-2.6.27.19-5.1/include/asm-x8
  }
  # endif /* APIC_DEFINITION */
  
-diff -purN linux-2.6.27/include/asm-x86/spinlock.h linux-2.6.27.19-5.1/include/asm-x86/spinlock.h
---- linux-2.6.27/include/asm-x86/spinlock.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/spinlock.h     2009-03-25 16:11:47.000000000 +0000
-@@ -362,6 +362,9 @@ static inline void __raw_write_unlock(ra
+diff -r 9608d5473017 include/asm-x86/spinlock.h
+--- a/include/asm-x86/spinlock.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/spinlock.h       Wed May 06 16:56:55 2009 +0100
+@@ -362,6 +362,9 @@
                     : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
  }
  
@@ -1075374,9 +1075332,9 @@ diff -purN linux-2.6.27/include/asm-x86/spinlock.h linux-2.6.27.19-5.1/include/a
  #define _raw_spin_relax(lock) cpu_relax()
  #define _raw_read_relax(lock) cpu_relax()
  #define _raw_write_relax(lock)        cpu_relax()
-diff -purN linux-2.6.27/include/asm-x86/syscall.h linux-2.6.27.19-5.1/include/asm-x86/syscall.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/syscall.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/syscall.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/syscall.h        Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,213 @@
 +/*
 + * Access to user system call parameters and results
@@ -1075591,10 +1075549,10 @@ diff -purN linux-2.6.27/include/asm-x86/syscall.h linux-2.6.27.19-5.1/include/as
 +#endif        /* CONFIG_X86_32 */
 +
 +#endif        /* _ASM_SYSCALL_H */
-diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/include/asm-x86/thread_info.h
---- linux-2.6.27/include/asm-x86/thread_info.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/thread_info.h  2009-03-25 16:11:47.000000000 +0000
-@@ -71,6 +71,7 @@ struct thread_info {
+diff -r 9608d5473017 include/asm-x86/thread_info.h
+--- a/include/asm-x86/thread_info.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/thread_info.h    Wed May 06 16:56:55 2009 +0100
+@@ -71,6 +71,7 @@
   * Warning: layout of LSW is hardcoded in entry.S
   */
  #define TIF_SYSCALL_TRACE     0       /* syscall trace active */
@@ -1075602,7 +1075560,7 @@ diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/includ
  #define TIF_SIGPENDING                2       /* signal pending */
  #define TIF_NEED_RESCHED      3       /* rescheduling necessary */
  #define TIF_SINGLESTEP                4       /* reenable singlestep on user return*/
-@@ -78,6 +79,7 @@ struct thread_info {
+@@ -78,6 +79,7 @@
  #define TIF_SYSCALL_EMU               6       /* syscall emulation active */
  #define TIF_SYSCALL_AUDIT     7       /* syscall auditing active */
  #define TIF_SECCOMP           8       /* secure computing */
@@ -1075610,7 +1075568,7 @@ diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/includ
  #define TIF_MCE_NOTIFY                10      /* notify userspace of an MCE */
  #define TIF_NOTSC             16      /* TSC is not accessible in userland */
  #define TIF_IA32              17      /* 32bit process */
-@@ -91,8 +93,13 @@ struct thread_info {
+@@ -91,8 +93,13 @@
  #define TIF_DEBUGCTLMSR               25      /* uses thread_struct.debugctlmsr */
  #define TIF_DS_AREA_MSR               26      /* uses thread_struct.ds_area_msr */
  #define TIF_BTS_TRACE_TS      27      /* record scheduling event timestamps */
@@ -1075624,7 +1075582,7 @@ diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/includ
  #define _TIF_SIGPENDING               (1 << TIF_SIGPENDING)
  #define _TIF_SINGLESTEP               (1 << TIF_SINGLESTEP)
  #define _TIF_NEED_RESCHED     (1 << TIF_NEED_RESCHED)
-@@ -112,6 +119,9 @@ struct thread_info {
+@@ -112,6 +119,9 @@
  #define _TIF_DEBUGCTLMSR      (1 << TIF_DEBUGCTLMSR)
  #define _TIF_DS_AREA_MSR      (1 << TIF_DS_AREA_MSR)
  #define _TIF_BTS_TRACE_TS     (1 << TIF_BTS_TRACE_TS)
@@ -1075634,7 +1075592,7 @@ diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/includ
  
  /* work to do in syscall_trace_enter() */
  #define _TIF_WORK_SYSCALL_ENTRY       \
-@@ -133,13 +143,18 @@ struct thread_info {
+@@ -133,13 +143,18 @@
  
  /* Only used for 64 bit */
  #define _TIF_DO_NOTIFY_MASK                                           \
@@ -1075655,10 +1075613,10 @@ diff -purN linux-2.6.27/include/asm-x86/thread_info.h linux-2.6.27.19-5.1/includ
  #define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
  #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
  
-diff -purN linux-2.6.27/include/asm-x86/time.h linux-2.6.27.19-5.1/include/asm-x86/time.h
---- linux-2.6.27/include/asm-x86/time.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/time.h 2009-03-25 16:11:47.000000000 +0000
-@@ -58,4 +58,10 @@ static inline int native_set_wallclock(u
+diff -r 9608d5473017 include/asm-x86/time.h
+--- a/include/asm-x86/time.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/time.h   Wed May 06 16:56:55 2009 +0100
+@@ -58,4 +58,10 @@
  
  extern unsigned long __init calibrate_cpu(void);
  
@@ -1075666,13 +1075624,13 @@ diff -purN linux-2.6.27/include/asm-x86/time.h linux-2.6.27.19-5.1/include/asm-x
 +extern int xen_independent_wallclock(void);
 +extern unsigned long xen_read_persistent_clock(void);
 +extern int xen_update_persistent_clock(void);
-+#endif
-+
  #endif
-diff -purN linux-2.6.27/include/asm-x86/traps.h linux-2.6.27.19-5.1/include/asm-x86/traps.h
---- linux-2.6.27/include/asm-x86/traps.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/traps.h        2009-03-25 16:11:47.000000000 +0000
-@@ -23,6 +23,9 @@ asmlinkage void spurious_interrupt_bug(v
++
++#endif
+diff -r 9608d5473017 include/asm-x86/traps.h
+--- a/include/asm-x86/traps.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/traps.h  Wed May 06 16:56:55 2009 +0100
+@@ -23,6 +23,9 @@
  #ifdef CONFIG_X86_MCE
  asmlinkage void machine_check(void);
  #endif /* CONFIG_X86_MCE */
@@ -1075682,7 +1075640,7 @@ diff -purN linux-2.6.27/include/asm-x86/traps.h linux-2.6.27.19-5.1/include/asm-
  
  void do_divide_error(struct pt_regs *, long);
  void do_overflow(struct pt_regs *, long);
-@@ -48,6 +51,9 @@ void math_error(void __user *);
+@@ -48,6 +51,9 @@
  void do_coprocessor_error(struct pt_regs *, long);
  void do_simd_coprocessor_error(struct pt_regs *, long);
  void do_spurious_interrupt_bug(struct pt_regs *, long);
@@ -1075692,13 +1075650,13 @@ diff -purN linux-2.6.27/include/asm-x86/traps.h linux-2.6.27.19-5.1/include/asm-
  unsigned long patch_espfix_desc(unsigned long, unsigned long);
  asmlinkage void math_emulate(long);
  
-diff -purN linux-2.6.27/include/asm-x86/unwind.h linux-2.6.27.19-5.1/include/asm-x86/unwind.h
---- linux-2.6.27/include/asm-x86/unwind.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/unwind.h       2009-03-25 16:11:47.000000000 +0000
-@@ -1,6 +1,163 @@
+diff -r 9608d5473017 include/asm-x86/unwind.h
+--- a/include/asm-x86/unwind.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/unwind.h Wed May 06 16:56:55 2009 +0100
+@@ -1,5 +1,162 @@
  #ifndef _ASM_X86_UNWIND_H
  #define _ASM_X86_UNWIND_H
++
 +/*
 + * Copyright (C) 2002-2007 Novell, Inc.
 + *    Jan Beulich <jbeulich@novell.com>
@@ -1075855,20 +1075813,19 @@ diff -purN linux-2.6.27/include/asm-x86/unwind.h linux-2.6.27.19-5.1/include/asm
 +}
 +
 +#else
-+
  #define UNW_PC(frame) ((void)(frame), 0UL)
  #define UNW_SP(frame) ((void)(frame), 0UL)
- #define UNW_FP(frame) ((void)(frame), 0UL)
-@@ -10,4 +167,6 @@ static inline int arch_unw_user_mode(con
+@@ -10,4 +167,6 @@
        return 0;
  }
  
 +#endif
 +
  #endif /* _ASM_X86_UNWIND_H */
-diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/asm-x86/uv/bios.h
---- linux-2.6.27/include/asm-x86/uv/bios.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/bios.h      2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/bios.h
+--- a/include/asm-x86/uv/bios.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/uv/bios.h        Wed May 06 16:56:55 2009 +0100
 @@ -2,9 +2,7 @@
  #define _ASM_X86_BIOS_H
  
@@ -1075930,7 +1075887,7 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
  
  enum {
        BIOS_FREQ_BASE_PLATFORM = 0,
-@@ -31,38 +66,55 @@ enum {
+@@ -31,38 +66,55 @@
        BIOS_FREQ_BASE_REALTIME_CLOCK = 2
  };
  
@@ -1075941,6 +1075898,12 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
 -              isrv.v0 = 0;                                            \
 -              isrv.v1 = 0;                                            \
 -      } while (0)
+-
+-enum {
+-      BIOS_STATUS_SUCCESS             =  0,
+-      BIOS_STATUS_UNIMPLEMENTED       = -1,
+-      BIOS_STATUS_EINVAL              = -2,
+-      BIOS_STATUS_ERROR               = -3
 +union partition_info_u {
 +      u64     val;
 +      struct {
@@ -1075949,15 +1075912,8 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
 +                      coherence_id    : 16,
 +                      region_size     : 24;
 +      };
-+};
+ };
  
--enum {
--      BIOS_STATUS_SUCCESS             =  0,
--      BIOS_STATUS_UNIMPLEMENTED       = -1,
--      BIOS_STATUS_EINVAL              = -2,
--      BIOS_STATUS_ERROR               = -3
--};
--
 -struct uv_bios_retval {
 -      /*
 -       * A zero status value indicates call completed without error.
@@ -1075970,12 +1075926,6 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
 -      u64 v0;
 -      u64 v1;
 -      u64 v2;
--};
--
--extern long
--x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
--                 unsigned long *drift_info);
--extern const char *x86_bios_strerror(long status);
 +union uv_watchlist_u {
 +      u64     val;
 +      struct {
@@ -1075983,8 +1075933,12 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
 +                      size    : 32,
 +                      filler  : 16;
 +      };
-+};
-+
+ };
+-extern long
+-x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
+-                 unsigned long *drift_info);
+-extern const char *x86_bios_strerror(long status);
 +enum uv_memprotect {
 +      UV_MEMPROT_RESTRICT_ACCESS,
 +      UV_MEMPROT_ALLOW_AMO,
@@ -1076018,9 +1075972,9 @@ diff -purN linux-2.6.27/include/asm-x86/uv/bios.h linux-2.6.27.19-5.1/include/as
 +extern struct kobject *sgi_uv_kobj;   /* /sys/firmware/sgi_uv */
  
  #endif /* _ASM_X86_BIOS_H */
-diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/asm-x86/uv/uv_hub.h
---- linux-2.6.27/include/asm-x86/uv/uv_hub.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/uv_hub.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/uv_hub.h
+--- a/include/asm-x86/uv/uv_hub.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/uv/uv_hub.h      Wed May 06 16:56:55 2009 +0100
 @@ -13,6 +13,7 @@
  
  #include <linux/numa.h>
@@ -1076046,7 +1076000,7 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
  /*
   * The following defines attributes of the HUB chip. These attributes are
   * frequently referenced and are kept in the per-cpu data areas of each cpu.
-@@ -130,7 +141,9 @@ struct uv_hub_info_s {
+@@ -130,7 +141,9 @@
        unsigned char   blade_processor_id;
        unsigned char   m_val;
        unsigned char   n_val;
@@ -1076056,7 +1076010,7 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
  DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
  #define uv_hub_info           (&__get_cpu_var(__uv_hub_info))
  #define uv_cpu_hub_info(cpu)  (&per_cpu(__uv_hub_info, cpu))
-@@ -162,6 +175,30 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
+@@ -162,6 +175,30 @@
  
  #define UV_APIC_PNODE_SHIFT   6
  
@@ -1076087,7 +1076041,7 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
  /*
   * Macros for converting between kernel virtual addresses, socket local physical
   * addresses, and UV global physical addresses.
-@@ -173,7 +210,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
+@@ -173,7 +210,7 @@
  static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
  {
        if (paddr < uv_hub_info->lowmem_remap_top)
@@ -1076096,7 +1076050,7 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
        return paddr | uv_hub_info->gnode_upper;
  }
  
-@@ -181,19 +218,7 @@ static inline unsigned long uv_soc_phys_
+@@ -181,19 +218,7 @@
  /* socket virtual --> UV global physical address */
  static inline unsigned long uv_gpa(void *v)
  {
@@ -1076117,10 +1076071,12 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
  }
  
  /* pnode, offset --> socket virtual */
-@@ -276,6 +301,16 @@ static inline void uv_write_local_mmr(un
+@@ -274,6 +299,16 @@
+ static inline void uv_write_local_mmr(unsigned long offset, unsigned long val)
+ {
        *uv_local_mmr_address(offset) = val;
- }
++}
++
 +static inline unsigned char uv_read_local_mmr8(unsigned long offset)
 +{
 +      return *((unsigned char *)uv_local_mmr_address(offset));
@@ -1076129,12 +1076085,10 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
 +static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val)
 +{
 +      *((unsigned char *)uv_local_mmr_address(offset)) = val;
-+}
-+
+ }
  /*
-  * Structures and definitions for converting between cpu, node, pnode, and blade
-  * numbers.
-@@ -350,5 +385,21 @@ static inline int uv_num_possible_blades
+@@ -350,5 +385,21 @@
        return uv_possible_blades;
  }
  
@@ -1076156,9 +1076110,9 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_hub.h linux-2.6.27.19-5.1/include/
 +
  #endif /* __ASM_X86_UV_HUB__ */
  
-diff -purN linux-2.6.27/include/asm-x86/uv/uv_irq.h linux-2.6.27.19-5.1/include/asm-x86/uv/uv_irq.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/uv/uv_irq.h    2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/uv/uv_irq.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/uv/uv_irq.h      Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,36 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1076196,10 +1076150,10 @@ diff -purN linux-2.6.27/include/asm-x86/uv/uv_irq.h linux-2.6.27.19-5.1/include/
 +extern void uv_teardown_irq(unsigned int, int, unsigned long);
 +
 +#endif /* _ASM_X86_UV_UV_IRQ_H */
-diff -purN linux-2.6.27/include/asm-x86/vmi.h linux-2.6.27.19-5.1/include/asm-x86/vmi.h
---- linux-2.6.27/include/asm-x86/vmi.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/vmi.h  2009-03-25 16:11:47.000000000 +0000
-@@ -223,9 +223,15 @@ struct pci_header {
+diff -r 9608d5473017 include/asm-x86/vmi.h
+--- a/include/asm-x86/vmi.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/vmi.h    Wed May 06 16:56:55 2009 +0100
+@@ -223,9 +223,15 @@
  } __attribute__((packed));
  
  /* Function prototypes for bootstrapping */
@@ -1076216,9 +1076170,9 @@ diff -purN linux-2.6.27/include/asm-x86/vmi.h linux-2.6.27.19-5.1/include/asm-x8
  
  /* State needed to start an application processor in an SMP system. */
  struct vmi_ap_state {
-diff -purN linux-2.6.27/include/asm-x86/vmware.h linux-2.6.27.19-5.1/include/asm-x86/vmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/vmware.h       2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/vmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/asm-x86/vmware.h Wed May 06 16:56:55 2009 +0100
 @@ -0,0 +1,27 @@
 +/*
 + * Copyright (C) 2008, VMware, Inc.
@@ -1076247,10 +1076201,10 @@ diff -purN linux-2.6.27/include/asm-x86/vmware.h linux-2.6.27.19-5.1/include/asm
 +extern void vmware_set_feature_bits(struct cpuinfo_x86 *c);
 +
 +#endif
-diff -purN linux-2.6.27/include/asm-x86/xen/hypercall.h linux-2.6.27.19-5.1/include/asm-x86/xen/hypercall.h
---- linux-2.6.27/include/asm-x86/xen/hypercall.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/hypercall.h        2009-03-25 16:11:47.000000000 +0000
-@@ -264,7 +264,7 @@ HYPERVISOR_fpu_taskswitch(int set)
+diff -r 9608d5473017 include/asm-x86/xen/hypercall.h
+--- a/include/asm-x86/xen/hypercall.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/hypercall.h  Wed May 06 16:56:56 2009 +0100
+@@ -264,7 +264,7 @@
  static inline int
  HYPERVISOR_sched_op(int cmd, void *arg)
  {
@@ -1076259,9 +1076213,9 @@ diff -purN linux-2.6.27/include/asm-x86/xen/hypercall.h linux-2.6.27.19-5.1/incl
  }
  
  static inline long
-diff -purN linux-2.6.27/include/asm-x86/xen/interface.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface.h
---- linux-2.6.27/include/asm-x86/xen/interface.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface.h        2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/asm-x86/xen/interface.h
+--- a/include/asm-x86/xen/interface.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface.h  Wed May 06 16:56:56 2009 +0100
 @@ -10,17 +10,17 @@
  #define __ASM_X86_XEN_INTERFACE_H
  
@@ -1076303,7 +1076257,7 @@ diff -purN linux-2.6.27/include/asm-x86/xen/interface.h linux-2.6.27.19-5.1/incl
  #endif
  
  #ifndef HYPERVISOR_VIRT_START
-@@ -103,7 +97,7 @@ struct trap_info {
+@@ -103,7 +97,7 @@
      uint16_t      cs;      /* code selector                                 */
      unsigned long address; /* code offset                                   */
  };
@@ -1076312,7 +1076266,7 @@ diff -purN linux-2.6.27/include/asm-x86/xen/interface.h linux-2.6.27.19-5.1/incl
  
  struct arch_shared_info {
      unsigned long max_pfn;                  /* max pfn that appears in table */
-@@ -157,7 +151,7 @@ struct vcpu_guest_context {
+@@ -157,7 +151,7 @@
      uint64_t      gs_base_user;
  #endif
  };
@@ -1076321,10 +1076275,10 @@ diff -purN linux-2.6.27/include/asm-x86/xen/interface.h linux-2.6.27.19-5.1/incl
  #endif        /* !__ASSEMBLY__ */
  
  /*
-diff -purN linux-2.6.27/include/asm-x86/xen/interface_32.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface_32.h
---- linux-2.6.27/include/asm-x86/xen/interface_32.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface_32.h     2009-03-25 16:11:47.000000000 +0000
-@@ -62,7 +62,7 @@ struct cpu_user_regs {
+diff -r 9608d5473017 include/asm-x86/xen/interface_32.h
+--- a/include/asm-x86/xen/interface_32.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface_32.h       Wed May 06 16:56:56 2009 +0100
+@@ -62,7 +62,7 @@
      uint16_t fs, _pad4;
      uint16_t gs, _pad5;
  };
@@ -1076333,10 +1076287,10 @@ diff -purN linux-2.6.27/include/asm-x86/xen/interface_32.h linux-2.6.27.19-5.1/i
  
  typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
  
-diff -purN linux-2.6.27/include/asm-x86/xen/interface_64.h linux-2.6.27.19-5.1/include/asm-x86/xen/interface_64.h
---- linux-2.6.27/include/asm-x86/xen/interface_64.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-x86/xen/interface_64.h     2009-03-25 16:11:47.000000000 +0000
-@@ -136,7 +136,7 @@ struct cpu_user_regs {
+diff -r 9608d5473017 include/asm-x86/xen/interface_64.h
+--- a/include/asm-x86/xen/interface_64.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-x86/xen/interface_64.h       Wed May 06 16:56:56 2009 +0100
+@@ -136,7 +136,7 @@
      uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base.     */
      uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
  };
@@ -1076345,10 +1076299,10 @@ diff -purN linux-2.6.27/include/asm-x86/xen/interface_64.h linux-2.6.27.19-5.1/i
  
  #undef __DECL_REG
  
-diff -purN linux-2.6.27/include/asm-xtensa/thread_info.h linux-2.6.27.19-5.1/include/asm-xtensa/thread_info.h
---- linux-2.6.27/include/asm-xtensa/thread_info.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/asm-xtensa/thread_info.h       2009-03-25 16:11:52.000000000 +0000
-@@ -134,6 +134,7 @@ static inline struct thread_info *curren
+diff -r 9608d5473017 include/asm-xtensa/thread_info.h
+--- a/include/asm-xtensa/thread_info.h Wed May 06 15:47:13 2009 +0100
++++ b/include/asm-xtensa/thread_info.h Wed May 06 16:56:56 2009 +0100
+@@ -134,6 +134,7 @@
  #define TIF_MEMDIE            5
  #define TIF_RESTORE_SIGMASK   6       /* restore signal mask in do_signal() */
  #define TIF_POLLING_NRFLAG    16      /* true if poll_idle() is polling TIF_NEED_RESCHED */
@@ -1076356,7 +1076310,7 @@ diff -purN linux-2.6.27/include/asm-xtensa/thread_info.h linux-2.6.27.19-5.1/inc
  
  #define _TIF_SYSCALL_TRACE    (1<<TIF_SYSCALL_TRACE)
  #define _TIF_SIGPENDING               (1<<TIF_SIGPENDING)
-@@ -142,6 +143,7 @@ static inline struct thread_info *curren
+@@ -142,6 +143,7 @@
  #define _TIF_IRET             (1<<TIF_IRET)
  #define _TIF_POLLING_NRFLAG   (1<<TIF_POLLING_NRFLAG)
  #define _TIF_RESTORE_SIGMASK  (1<<TIF_RESTORE_SIGMASK)
@@ -1076364,9 +1076318,9 @@ diff -purN linux-2.6.27/include/asm-xtensa/thread_info.h linux-2.6.27.19-5.1/inc
  
  #define _TIF_WORK_MASK                0x0000FFFE      /* work to do on interrupt/exception return */
  #define _TIF_ALLWORK_MASK     0x0000FFFF      /* work to do on any return to u-space */
-diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/via_drm.h
---- linux-2.6.27/include/drm/via_drm.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/drm/via_drm.h  2009-03-25 16:11:53.000000000 +0000
+diff -r 9608d5473017 include/drm/via_drm.h
+--- a/include/drm/via_drm.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/drm/via_drm.h    Wed May 06 16:56:56 2009 +0100
 @@ -51,6 +51,12 @@
  #define VIA_LOG_MIN_TEX_REGION_SIZE 16
  #endif
@@ -1076437,7 +1076391,7 @@ diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/vi
  
  typedef struct {
        uint32_t offset;
-@@ -141,6 +165,8 @@ typedef struct _drm_via_init {
+@@ -141,6 +165,8 @@
        unsigned long fb_offset;
        unsigned long mmio_offset;
        unsigned long agpAddr;
@@ -1076446,7 +1076400,7 @@ diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/vi
  } drm_via_init_t;
  
  typedef struct _drm_via_futex {
-@@ -245,6 +271,12 @@ typedef union drm_via_irqwait {
+@@ -245,6 +271,12 @@
        struct drm_wait_vblank_reply reply;
  } drm_via_irqwait_t;
  
@@ -1076459,7 +1076413,7 @@ diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/vi
  typedef struct drm_via_blitsync {
        uint32_t sync_handle;
        unsigned engine;
-@@ -272,4 +304,13 @@ typedef struct drm_via_dmablit {
+@@ -272,4 +304,13 @@
        drm_via_blitsync_t sync;
  } drm_via_dmablit_t;
  
@@ -1076473,10 +1076427,10 @@ diff -purN linux-2.6.27/include/drm/via_drm.h linux-2.6.27.19-5.1/include/drm/vi
 +} ;
 +extern struct drm_via_video_save_head *via_video_save_head;
  #endif                                /* _VIA_DRM_H_ */
-diff -purN linux-2.6.27/include/linux/Kbuild linux-2.6.27.19-5.1/include/linux/Kbuild
---- linux-2.6.27/include/linux/Kbuild  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/Kbuild   2009-03-25 16:11:48.000000000 +0000
-@@ -41,6 +41,7 @@ header-y += baycom.h
+diff -r 9608d5473017 include/linux/Kbuild
+--- a/include/linux/Kbuild     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/Kbuild     Wed May 06 16:56:56 2009 +0100
+@@ -41,6 +41,7 @@
  header-y += bfs_fs.h
  header-y += blkpg.h
  header-y += bpqether.h
@@ -1076484,7 +1076438,7 @@ diff -purN linux-2.6.27/include/linux/Kbuild linux-2.6.27.19-5.1/include/linux/K
  header-y += can.h
  header-y += cdk.h
  header-y += chio.h
-@@ -162,6 +163,8 @@ header-y += video_decoder.h
+@@ -162,6 +163,8 @@
  header-y += video_encoder.h
  header-y += videotext.h
  header-y += x25.h
@@ -1076493,7 +1076447,7 @@ diff -purN linux-2.6.27/include/linux/Kbuild linux-2.6.27.19-5.1/include/linux/K
  
  unifdef-y += acct.h
  unifdef-y += adb.h
-@@ -180,6 +183,7 @@ unifdef-y += audit.h
+@@ -180,6 +183,7 @@
  unifdef-y += auto_fs.h
  unifdef-y += auxvec.h
  unifdef-y += binfmts.h
@@ -1076501,10 +1076455,10 @@ diff -purN linux-2.6.27/include/linux/Kbuild linux-2.6.27.19-5.1/include/linux/K
  unifdef-y += capability.h
  unifdef-y += capi.h
  unifdef-y += cciss_ioctl.h
-diff -purN linux-2.6.27/include/linux/acpi.h linux-2.6.27.19-5.1/include/linux/acpi.h
---- linux-2.6.27/include/linux/acpi.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/acpi.h   2009-03-25 16:11:48.000000000 +0000
-@@ -202,6 +202,52 @@ extern bool wmi_has_guid(const char *gui
+diff -r 9608d5473017 include/linux/acpi.h
+--- a/include/linux/acpi.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/acpi.h     Wed May 06 16:56:56 2009 +0100
+@@ -202,6 +202,52 @@
  
  #endif        /* CONFIG_ACPI_WMI */
  
@@ -1076557,10 +1076511,10 @@ diff -purN linux-2.6.27/include/linux/acpi.h linux-2.6.27.19-5.1/include/linux/a
  extern int acpi_blacklisted(void);
  #ifdef CONFIG_DMI
  extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
-diff -purN linux-2.6.27/include/linux/aio.h linux-2.6.27.19-5.1/include/linux/aio.h
---- linux-2.6.27/include/linux/aio.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/aio.h    2009-03-25 16:11:49.000000000 +0000
-@@ -199,6 +199,11 @@ struct kioctx {
+diff -r 9608d5473017 include/linux/aio.h
+--- a/include/linux/aio.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/aio.h      Wed May 06 16:56:56 2009 +0100
+@@ -199,6 +199,11 @@
        struct aio_ring_info    ring_info;
  
        struct delayed_work     wq;
@@ -1076572,10 +1076526,10 @@ diff -purN linux-2.6.27/include/linux/aio.h linux-2.6.27.19-5.1/include/linux/ai
  };
  
  /* prototypes */
-diff -purN linux-2.6.27/include/linux/ata.h linux-2.6.27.19-5.1/include/linux/ata.h
---- linux-2.6.27/include/linux/ata.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ata.h    2009-03-25 16:11:50.000000000 +0000
-@@ -681,12 +681,17 @@ static inline int ata_id_current_chs_val
+diff -r 9608d5473017 include/linux/ata.h
+--- a/include/linux/ata.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ata.h      Wed May 06 16:56:56 2009 +0100
+@@ -681,12 +681,17 @@
  
  static inline int ata_id_is_cfa(const u16 *id)
  {
@@ -1076598,9 +1076552,9 @@ diff -purN linux-2.6.27/include/linux/ata.h linux-2.6.27.19-5.1/include/linux/at
                return 1;
        return 0;
  }
-diff -purN linux-2.6.27/include/linux/audit.h linux-2.6.27.19-5.1/include/linux/audit.h
---- linux-2.6.27/include/linux/audit.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/audit.h  2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/audit.h
+--- a/include/linux/audit.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/audit.h    Wed May 06 16:56:56 2009 +0100
 @@ -33,7 +33,7 @@
   * 1200 - 1299 messages internal to the audit daemon
   * 1300 - 1399 audit event messages
@@ -1076610,21 +1076564,21 @@ diff -purN linux-2.6.27/include/linux/audit.h linux-2.6.27.19-5.1/include/linux/
   * 1600 - 1699 kernel crypto events
   * 1700 - 1799 kernel anomaly records
   * 1800 - 1999 future kernel use (maybe integrity labels and related events)
-@@ -119,6 +119,13 @@
+@@ -118,6 +118,13 @@
+ #define AUDIT_MAC_IPSEC_EVENT 1415    /* Audit an IPSec event */
  #define AUDIT_MAC_UNLBL_STCADD        1416    /* NetLabel: add a static label */
  #define AUDIT_MAC_UNLBL_STCDEL        1417    /* NetLabel: del a static label */
++
 +#define AUDIT_APPARMOR_AUDIT  1501    /* AppArmor audited grants */
 +#define AUDIT_APPARMOR_ALLOWED        1502    /* Allowed Access for learning */
 +#define AUDIT_APPARMOR_DENIED 1503
 +#define AUDIT_APPARMOR_HINT   1504    /* Process Tracking information */
 +#define AUDIT_APPARMOR_STATUS 1505    /* Changes in config */
 +#define AUDIT_APPARMOR_ERROR  1506    /* Internal AppArmor Errors */
-+
  #define AUDIT_FIRST_KERN_ANOM_MSG   1700
  #define AUDIT_LAST_KERN_ANOM_MSG    1799
- #define AUDIT_ANOM_PROMISCUOUS      1700 /* Device changed promiscuous mode */
-@@ -545,6 +552,9 @@ extern void                    audit_log(struct audit_
+@@ -545,6 +552,9 @@
                                      __attribute__((format(printf,4,5)));
  
  extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
@@ -1076634,10 +1076588,10 @@ diff -purN linux-2.6.27/include/linux/audit.h linux-2.6.27.19-5.1/include/linux/
  extern void               audit_log_format(struct audit_buffer *ab,
                                             const char *fmt, ...)
                            __attribute__((format(printf,2,3)));
-diff -purN linux-2.6.27/include/linux/binfmts.h linux-2.6.27.19-5.1/include/linux/binfmts.h
---- linux-2.6.27/include/linux/binfmts.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/binfmts.h        2009-03-25 16:11:50.000000000 +0000
-@@ -36,6 +36,7 @@ struct linux_binprm{
+diff -r 9608d5473017 include/linux/binfmts.h
+--- a/include/linux/binfmts.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/binfmts.h  Wed May 06 16:56:56 2009 +0100
+@@ -36,6 +36,7 @@
        unsigned long p; /* current top of mem */
        unsigned int sh_bang:1,
                     misc_bang:1;
@@ -1076645,7 +1076599,7 @@ diff -purN linux-2.6.27/include/linux/binfmts.h linux-2.6.27.19-5.1/include/linu
        struct file * file;
        int e_uid, e_gid;
        kernel_cap_t cap_post_exec_permitted;
-@@ -58,6 +59,7 @@ struct linux_binprm{
+@@ -58,6 +59,7 @@
  #define BINPRM_FLAGS_EXECFD_BIT 1
  #define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
  
@@ -1076653,16 +1076607,16 @@ diff -purN linux-2.6.27/include/linux/binfmts.h linux-2.6.27.19-5.1/include/linu
  
  /*
   * This structure defines the functions that are used to load the binary formats that
-diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bio.h
---- linux-2.6.27/include/linux/bio.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/bio.h    2009-03-25 16:11:50.000000000 +0000
-@@ -26,21 +26,8 @@
+diff -r 9608d5473017 include/linux/bio.h
+--- a/include/linux/bio.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/bio.h      Wed May 06 16:56:56 2009 +0100
+@@ -26,20 +26,7 @@
  
  #ifdef CONFIG_BLOCK
  
 -/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
  #include <asm/io.h>
+-
 -#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
 -#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
 -#define BIOVEC_VIRT_OVERSIZE(x)       ((x) > BIO_VMERGE_MAX_SIZE)
@@ -1076674,11 +1076628,10 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
 -#ifndef BIO_VMERGE_BOUNDARY
 -#define BIO_VMERGE_BOUNDARY   0
 -#endif
--
  #define BIO_DEBUG
  
- #ifdef BIO_DEBUG
-@@ -88,25 +75,21 @@ struct bio {
+@@ -88,24 +75,20 @@
        /* Number of segments in this BIO after
         * physical address coalescing is performed.
         */
@@ -1076705,13 +1076658,12 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
 +      unsigned int            bi_seg_back_size;
  
        unsigned int            bi_max_vecs;    /* max bvl_vecs we can hold */
-+      unsigned int            bi_comp_cpu;    /* completion CPU */
 +
++      unsigned int            bi_comp_cpu;    /* completion CPU */
        struct bio_vec          *bi_io_vec;     /* the actual vec list */
  
-       bio_end_io_t            *bi_end_io;
-@@ -126,11 +109,14 @@ struct bio {
+@@ -126,11 +109,14 @@
  #define BIO_UPTODATE  0       /* ok after I/O completion */
  #define BIO_RW_BLOCK  1       /* RW_AHEAD set, and read/write would block */
  #define BIO_EOF               2       /* out-out-bounds error */
@@ -1076727,7 +1076679,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  #define bio_flagged(bio, flag)        ((bio)->bi_flags & (1 << (flag)))
  
  /*
-@@ -144,18 +130,36 @@ struct bio {
+@@ -144,18 +130,36 @@
  /*
   * bio bi_rw flags
   *
@@ -1076772,7 +1076724,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  
  /*
   * upper 16 bits of bi_rw define the io priority of this bio
-@@ -182,17 +186,21 @@ struct bio {
+@@ -182,17 +186,21 @@
  #define bio_sectors(bio)      ((bio)->bi_size >> 9)
  #define bio_barrier(bio)      ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
  #define bio_sync(bio)         ((bio)->bi_rw & (1 << BIO_RW_SYNC))
@@ -1076798,7 +1076750,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  }
  
  static inline void *bio_data(struct bio *bio)
-@@ -236,8 +244,6 @@ static inline void *bio_data(struct bio 
+@@ -236,8 +244,6 @@
        ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
  #endif
  
@@ -1076807,7 +1076759,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
        (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
  #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
-@@ -335,7 +341,6 @@ extern void bio_free(struct bio *, struc
+@@ -335,7 +341,6 @@
  extern void bio_endio(struct bio *, int);
  struct request_queue;
  extern int bio_phys_segments(struct request_queue *, struct bio *);
@@ -1076815,7 +1076767,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  
  extern void __bio_clone(struct bio *, struct bio *);
  extern struct bio *bio_clone(struct bio *, gfp_t);
-@@ -346,6 +351,7 @@ extern int bio_add_page(struct bio *, st
+@@ -346,6 +351,7 @@
  extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
                           unsigned int, unsigned int);
  extern int bio_get_nr_vecs(struct block_device *);
@@ -1076823,22 +1076775,22 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
                                unsigned long, unsigned int, int);
  struct sg_iovec;
-@@ -368,6 +374,14 @@ extern struct bio_vec *bvec_alloc_bs(gfp
+@@ -366,6 +372,14 @@
+ void zero_fill_bio(struct bio *bio);
+ extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
  extern unsigned int bvec_nr_vecs(unsigned short idx);
- /*
++
++/*
 + * Allow queuer to specify a completion CPU for this bio
 + */
 +static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
 +{
 +      bio->bi_comp_cpu = cpu;
 +}
-+
-+/*
+ /*
   * bio_set is used to allow other portions of the IO system to
-  * allocate their own private memory pools for bio and iovec structures.
-  * These memory pools in turn all allocate from the bio_slab
-@@ -445,6 +459,14 @@ static inline char *__bio_kmap_irq(struc
+@@ -445,6 +459,14 @@
        __bio_kmap_irq((bio), (bio)->bi_idx, (flags))
  #define bio_kunmap_irq(buf,flags)     __bio_kunmap_irq(buf, flags)
  
@@ -1076853,7 +1076805,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  #if defined(CONFIG_BLK_DEV_INTEGRITY)
  
  #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)]))
-@@ -479,7 +501,7 @@ extern void bio_integrity_endio(struct b
+@@ -479,7 +501,7 @@
  extern void bio_integrity_advance(struct bio *, unsigned int);
  extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
  extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
@@ -1076862,7 +1076814,7 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  extern int bioset_integrity_create(struct bio_set *, int);
  extern void bioset_integrity_free(struct bio_set *);
  extern void bio_integrity_init_slab(void);
-@@ -490,7 +512,7 @@ extern void bio_integrity_init_slab(void
+@@ -490,7 +512,7 @@
  #define bioset_integrity_create(a, b) (0)
  #define bio_integrity_prep(a)         (0)
  #define bio_integrity_enabled(a)      (0)
@@ -1076871,9 +1076823,9 @@ diff -purN linux-2.6.27/include/linux/bio.h linux-2.6.27.19-5.1/include/linux/bi
  #define bioset_integrity_free(a)      do { } while (0)
  #define bio_integrity_free(a, b)      do { } while (0)
  #define bio_integrity_endio(a, b)     do { } while (0)
-diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux/blkdev.h
---- linux-2.6.27/include/linux/blkdev.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/blkdev.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/blkdev.h
+--- a/include/linux/blkdev.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/blkdev.h   Wed May 06 16:56:56 2009 +0100
 @@ -17,6 +17,7 @@
  #include <linux/module.h>
  #include <linux/stringify.h>
@@ -1076882,7 +1076834,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  #include <asm/scatterlist.h>
  
-@@ -54,7 +55,6 @@ enum rq_cmd_type_bits {
+@@ -54,7 +55,6 @@
        REQ_TYPE_PM_SUSPEND,            /* suspend request */
        REQ_TYPE_PM_RESUME,             /* resume request */
        REQ_TYPE_PM_SHUTDOWN,           /* shutdown request */
@@ -1076890,7 +1076842,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
        REQ_TYPE_SPECIAL,               /* driver defined type */
        REQ_TYPE_LINUX_BLOCK,           /* generic block layer message */
        /*
-@@ -76,19 +76,20 @@ enum rq_cmd_type_bits {
+@@ -76,19 +76,20 @@
   *
   */
  enum {
@@ -1076917,7 +1076869,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
        __REQ_SORTED,           /* elevator knows about this request */
        __REQ_SOFTBARRIER,      /* may not be passed by ioscheduler */
        __REQ_HARDBARRIER,      /* may not be passed by drive either */
-@@ -111,7 +112,10 @@ enum rq_flag_bits {
+@@ -111,7 +112,10 @@
  };
  
  #define REQ_RW                (1 << __REQ_RW)
@@ -1076929,7 +1076881,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  #define REQ_SORTED    (1 << __REQ_SORTED)
  #define REQ_SOFTBARRIER       (1 << __REQ_SOFTBARRIER)
  #define REQ_HARDBARRIER       (1 << __REQ_HARDBARRIER)
-@@ -140,12 +144,14 @@ enum rq_flag_bits {
+@@ -140,12 +144,14 @@
   */
  struct request {
        struct list_head queuelist;
@@ -1076945,7 +1076897,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
        /* Maintain bio traversal state for part by part I/O submission.
         * hard_* are block layer internals, no driver should touch them!
-@@ -190,13 +196,6 @@ struct request {
+@@ -190,13 +196,6 @@
         */
        unsigned short nr_phys_segments;
  
@@ -1076959,7 +1076911,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
        unsigned short ioprio;
  
        void *special;
-@@ -220,6 +219,8 @@ struct request {
+@@ -220,6 +219,8 @@
        void *data;
        void *sense;
  
@@ -1076968,19 +1076920,19 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
        unsigned int timeout;
        int retries;
  
-@@ -233,6 +234,11 @@ struct request {
+@@ -232,6 +233,11 @@
+       /* for bidi */
        struct request *next_rq;
  };
++
 +static inline unsigned short req_get_ioprio(struct request *req)
 +{
 +      return req->ioprio;
 +}
-+
  /*
   * State information carried for REQ_TYPE_PM_SUSPEND and REQ_TYPE_PM_RESUME
-  * requests. Some step values could eventually be made generic.
-@@ -252,6 +258,7 @@ typedef void (request_fn_proc) (struct r
+@@ -252,6 +258,7 @@
  typedef int (make_request_fn) (struct request_queue *q, struct bio *bio);
  typedef int (prep_rq_fn) (struct request_queue *, struct request *);
  typedef void (unplug_fn) (struct request_queue *);
@@ -1076988,7 +1076940,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  struct bio_vec;
  struct bvec_merge_data {
-@@ -265,6 +272,15 @@ typedef int (merge_bvec_fn) (struct requ
+@@ -265,6 +272,15 @@
  typedef void (prepare_flush_fn) (struct request_queue *, struct request *);
  typedef void (softirq_done_fn)(struct request *);
  typedef int (dma_drain_needed_fn)(struct request *);
@@ -1077004,7 +1076956,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  enum blk_queue_state {
        Queue_down,
-@@ -307,10 +323,13 @@ struct request_queue
+@@ -307,10 +323,13 @@
        make_request_fn         *make_request_fn;
        prep_rq_fn              *prep_rq_fn;
        unplug_fn               *unplug_fn;
@@ -1077018,7 +1076970,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
        /*
         * Dispatch queue sorting
-@@ -385,6 +404,10 @@ struct request_queue
+@@ -385,6 +404,10 @@
        unsigned int            nr_sorted;
        unsigned int            in_flight;
  
@@ -1077029,7 +1076981,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
        /*
         * sg stuff
         */
-@@ -421,6 +444,8 @@ struct request_queue
+@@ -421,6 +444,8 @@
  #define QUEUE_FLAG_ELVSWITCH  8       /* don't use elevator, just do FIFO */
  #define QUEUE_FLAG_BIDI               9       /* queue supports bidi requests */
  #define QUEUE_FLAG_NOMERGES    10     /* disable merge attempts */
@@ -1077038,7 +1076990,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  static inline int queue_is_locked(struct request_queue *q)
  {
-@@ -527,25 +552,34 @@ enum {
+@@ -527,25 +552,34 @@
  #define blk_queue_stopped(q)  test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
  #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
  #define blk_queue_flushing(q) ((q)->ordseq)
@@ -1077075,7 +1077027,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  #define blk_bidi_rq(rq)               ((rq)->next_rq != NULL)
  #define blk_empty_barrier(rq) (blk_barrier_rq(rq) && blk_fs_request(rq) && !(rq)->hard_nr_sectors)
  /* rq->queuelist of dequeued request must be list_empty() */
-@@ -592,7 +626,8 @@ static inline void blk_clear_queue_full(
+@@ -592,7 +626,8 @@
  #define RQ_NOMERGE_FLAGS      \
        (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
  #define rq_mergeable(rq)      \
@@ -1077085,7 +1077037,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  /*
   * q->prep_rq_fn return values
-@@ -623,6 +658,7 @@ extern unsigned long blk_max_low_pfn, bl
+@@ -623,6 +658,7 @@
   * default timeout for SG_IO if none specified
   */
  #define BLK_DEFAULT_SG_TIMEOUT        (60 * HZ)
@@ -1077093,7 +1077045,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  #ifdef CONFIG_BOUNCE
  extern int init_emergency_isa_pool(void);
-@@ -664,6 +700,10 @@ extern void __blk_put_request(struct req
+@@ -664,6 +700,10 @@
  extern struct request *blk_get_request(struct request_queue *, int, gfp_t);
  extern void blk_insert_request(struct request_queue *, struct request *, int, void *);
  extern void blk_requeue_request(struct request_queue *, struct request *);
@@ -1077104,7 +1077056,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  extern void blk_plug_device(struct request_queue *);
  extern void blk_plug_device_unlocked(struct request_queue *);
  extern int blk_remove_plug(struct request_queue *);
-@@ -734,6 +774,8 @@ static inline void blk_run_address_space
+@@ -734,6 +774,8 @@
                blk_run_backing_dev(mapping->backing_dev_info, NULL);
  }
  
@@ -1077113,7 +1077065,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  /*
   * blk_end_request() and friends.
   * __blk_end_request() and end_request() must be called with
-@@ -756,6 +798,11 @@ extern int blk_end_request_callback(stru
+@@ -756,6 +798,11 @@
                                unsigned int nr_bytes,
                                int (drv_callback)(struct request *));
  extern void blk_complete_request(struct request *);
@@ -1077125,19 +1077077,19 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  /*
   * blk_end_request() takes bytes instead of sectors as a complete size.
-@@ -765,11 +812,6 @@ extern void blk_complete_request(struct 
+@@ -764,11 +811,6 @@
+  */
  extern unsigned int blk_rq_bytes(struct request *rq);
  extern unsigned int blk_rq_cur_bytes(struct request *rq);
+-
 -static inline void blkdev_dequeue_request(struct request *req)
 -{
 -      elv_dequeue_request(req->q, req);
 -}
--
  /*
   * Access functions for manipulating queue properties
-  */
-@@ -790,12 +832,16 @@ extern void blk_queue_update_dma_pad(str
+@@ -790,12 +832,16 @@
  extern int blk_queue_dma_drain(struct request_queue *q,
                               dma_drain_needed_fn *dma_drain_needed,
                               void *buf, unsigned int size);
@@ -1077154,7 +1077106,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
  extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *);
  extern int blk_do_ordered(struct request_queue *, struct request **);
-@@ -837,6 +883,16 @@ static inline struct request *blk_map_qu
+@@ -837,6 +883,16 @@
  }
  
  extern int blkdev_issue_flush(struct block_device *, sector_t *);
@@ -1077171,16 +1077123,16 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  
  /*
  * command filter functions
-@@ -852,6 +908,8 @@ extern void blk_set_cmd_filter_defaults(
+@@ -851,6 +907,8 @@
+ #define BLK_DEF_MAX_SECTORS 1024
  
  #define MAX_SEGMENT_SIZE      65536
-+#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
 +
++#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
  #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
  
- static inline int queue_hardsect_size(struct request_queue *q)
-@@ -900,7 +958,7 @@ static inline void put_dev_sector(Sector
+@@ -900,7 +958,7 @@
  }
  
  struct work_struct;
@@ -1077189,7 +1077141,7 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  void kblockd_flush_work(struct work_struct *work);
  
  #define MODULE_ALIAS_BLOCKDEV(major,minor) \
-@@ -945,7 +1003,7 @@ struct blk_integrity {
+@@ -945,7 +1003,7 @@
  
  extern int blk_integrity_register(struct gendisk *, struct blk_integrity *);
  extern void blk_integrity_unregister(struct gendisk *);
@@ -1077198,19 +1077150,19 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
  extern int blk_rq_count_integrity_sg(struct request *);
  
-@@ -962,6 +1020,11 @@ static inline struct blk_integrity *bdev
+@@ -960,6 +1018,11 @@
+ static inline struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
+ {
        return bdev->bd_disk->integrity;
- }
++}
++
 +static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk)
 +{
 +      return disk->integrity;
-+}
-+
+ }
  static inline unsigned int bdev_get_tag_size(struct block_device *bdev)
- {
-       struct blk_integrity *bi = bdev_get_integrity(bdev);
-@@ -1004,6 +1067,7 @@ static inline int blk_integrity_rq(struc
+@@ -1004,6 +1067,7 @@
  #define blk_rq_count_integrity_sg(a)          (0)
  #define blk_rq_map_integrity_sg(a, b)         (0)
  #define bdev_get_integrity(a)                 (0)
@@ -1077218,9 +1077170,9 @@ diff -purN linux-2.6.27/include/linux/blkdev.h linux-2.6.27.19-5.1/include/linux
  #define bdev_get_tag_size(a)                  (0)
  #define blk_integrity_compare(a, b)           (0)
  #define blk_integrity_register(a, b)          (0)
-diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include/linux/blktrace_api.h
---- linux-2.6.27/include/linux/blktrace_api.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/blktrace_api.h   2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/blktrace_api.h
+--- a/include/linux/blktrace_api.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/blktrace_api.h     Wed May 06 16:56:56 2009 +0100
 @@ -1,8 +1,10 @@
  #ifndef BLKTRACE_H
  #define BLKTRACE_H
@@ -1077232,7 +1077184,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  
  /*
   * Trace categories
-@@ -21,6 +23,8 @@ enum blktrace_cat {
+@@ -21,6 +23,8 @@
        BLK_TC_NOTIFY   = 1 << 10,      /* special message */
        BLK_TC_AHEAD    = 1 << 11,      /* readahead */
        BLK_TC_META     = 1 << 12,      /* metadata */
@@ -1077241,7 +1077193,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  
        BLK_TC_END      = 1 << 15,      /* only 16-bits, reminder */
  };
-@@ -47,6 +51,8 @@ enum blktrace_act {
+@@ -47,6 +51,8 @@
        __BLK_TA_SPLIT,                 /* bio was split */
        __BLK_TA_BOUNCE,                /* bio was bounced */
        __BLK_TA_REMAP,                 /* bio was remapped */
@@ -1077250,7 +1077202,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  };
  
  /*
-@@ -77,6 +83,8 @@ enum blktrace_notify {
+@@ -77,6 +83,8 @@
  #define BLK_TA_SPLIT          (__BLK_TA_SPLIT)
  #define BLK_TA_BOUNCE         (__BLK_TA_BOUNCE)
  #define BLK_TA_REMAP          (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
@@ -1077259,7 +1077211,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  
  #define BLK_TN_PROCESS                (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
  #define BLK_TN_TIMESTAMP      (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
-@@ -89,17 +97,17 @@ enum blktrace_notify {
+@@ -89,17 +97,17 @@
   * The trace itself
   */
  struct blk_io_trace {
@@ -1077288,7 +1077240,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  };
  
  /*
-@@ -117,6 +125,25 @@ enum {
+@@ -117,6 +125,25 @@
        Blktrace_stopped,
  };
  
@@ -1077314,7 +1077266,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  struct blk_trace {
        int trace_state;
        struct rchan *rchan;
-@@ -133,21 +160,6 @@ struct blk_trace {
+@@ -133,21 +160,6 @@
        atomic_t dropped;
  };
  
@@ -1077336,17 +1077288,17 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
  extern void blk_trace_shutdown(struct request_queue *);
  extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
-@@ -195,6 +207,9 @@ static inline void blk_add_trace_rq(stru
+@@ -194,6 +206,9 @@
        if (likely(!bt))
                return;
++
 +      if (blk_discard_rq(rq))
 +              rw |= (1 << BIO_RW_DISCARD);
-+
        if (blk_pc_request(rq)) {
                what |= BLK_TC_ACT(BLK_TC_PC);
-               __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd);
-@@ -307,6 +322,34 @@ static inline void blk_add_trace_remap(s
+@@ -307,6 +322,34 @@
        __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
  }
  
@@ -1077381,7 +1077333,7 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
                           char __user *arg);
  extern int blk_trace_startstop(struct request_queue *q, int start);
-@@ -320,6 +363,7 @@ extern int blk_trace_remove(struct reque
+@@ -320,6 +363,7 @@
  #define blk_add_trace_generic(q, rq, rw, what)        do { } while (0)
  #define blk_add_trace_pdu_int(q, what, bio, pdu)      do { } while (0)
  #define blk_add_trace_remap(q, bio, dev, f, t)        do {} while (0)
@@ -1077389,10 +1077341,10 @@ diff -purN linux-2.6.27/include/linux/blktrace_api.h linux-2.6.27.19-5.1/include
  #define do_blk_trace_setup(q, name, dev, buts)        (-ENOTTY)
  #define blk_trace_setup(q, name, dev, arg)    (-ENOTTY)
  #define blk_trace_startstop(q, start)         (-ENOTTY)
-diff -purN linux-2.6.27/include/linux/buffer_head.h linux-2.6.27.19-5.1/include/linux/buffer_head.h
---- linux-2.6.27/include/linux/buffer_head.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/buffer_head.h    2009-03-25 16:11:50.000000000 +0000
-@@ -35,6 +35,7 @@ enum bh_state_bits {
+diff -r 9608d5473017 include/linux/buffer_head.h
+--- a/include/linux/buffer_head.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/buffer_head.h      Wed May 06 16:56:56 2009 +0100
+@@ -35,6 +35,7 @@
        BH_Ordered,     /* ordered write */
        BH_Eopnotsupp,  /* operation not supported (barrier) */
        BH_Unwritten,   /* Buffer is allocated on disk but not written */
@@ -1077400,7 +1077352,7 @@ diff -purN linux-2.6.27/include/linux/buffer_head.h linux-2.6.27.19-5.1/include/
  
        BH_PrivateStart,/* not a state bit, but the first bit available
                         * for private allocation by other entities
-@@ -344,7 +345,7 @@ static inline void invalidate_inode_buff
+@@ -344,7 +345,7 @@
  static inline int remove_inode_buffers(struct inode *inode) { return 1; }
  static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; }
  static inline void invalidate_bdev(struct block_device *bdev) {}
@@ -1077409,9 +1077361,9 @@ diff -purN linux-2.6.27/include/linux/buffer_head.h linux-2.6.27.19-5.1/include/
  
  #endif /* CONFIG_BLOCK */
  #endif /* _LINUX_BUFFER_HEAD_H */
-diff -purN linux-2.6.27/include/linux/can/core.h linux-2.6.27.19-5.1/include/linux/can/core.h
---- linux-2.6.27/include/linux/can/core.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/can/core.h       2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/can/core.h
+--- a/include/linux/can/core.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/can/core.h Wed May 06 16:56:56 2009 +0100
 @@ -19,7 +19,7 @@
  #include <linux/skbuff.h>
  #include <linux/netdevice.h>
@@ -1077421,10 +1077373,10 @@ diff -purN linux-2.6.27/include/linux/can/core.h linux-2.6.27.19-5.1/include/lin
  
  /* increment this number each time you change some user-space interface */
  #define CAN_ABI_VERSION "8"
-diff -purN linux-2.6.27/include/linux/capability.h linux-2.6.27.19-5.1/include/linux/capability.h
---- linux-2.6.27/include/linux/capability.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/capability.h     2009-03-25 16:11:48.000000000 +0000
-@@ -68,6 +68,9 @@ typedef struct __user_cap_data_struct {
+diff -r 9608d5473017 include/linux/capability.h
+--- a/include/linux/capability.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/capability.h       Wed May 06 16:56:56 2009 +0100
+@@ -68,6 +68,9 @@
  #define VFS_CAP_U32             VFS_CAP_U32_2
  #define VFS_CAP_REVISION      VFS_CAP_REVISION_2
  
@@ -1077434,10 +1077386,10 @@ diff -purN linux-2.6.27/include/linux/capability.h linux-2.6.27.19-5.1/include/l
  
  struct vfs_cap_data {
        __le32 magic_etc;            /* Little endian */
-diff -purN linux-2.6.27/include/linux/cgroup_subsys.h linux-2.6.27.19-5.1/include/linux/cgroup_subsys.h
---- linux-2.6.27/include/linux/cgroup_subsys.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cgroup_subsys.h  2009-03-25 16:11:48.000000000 +0000
-@@ -48,3 +48,9 @@ SUBSYS(devices)
+diff -r 9608d5473017 include/linux/cgroup_subsys.h
+--- a/include/linux/cgroup_subsys.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cgroup_subsys.h    Wed May 06 16:56:56 2009 +0100
+@@ -48,3 +48,9 @@
  #endif
  
  /* */
@@ -1077447,10 +1077399,10 @@ diff -purN linux-2.6.27/include/linux/cgroup_subsys.h linux-2.6.27.19-5.1/includ
 +#endif
 +
 +/* */
-diff -purN linux-2.6.27/include/linux/compat.h linux-2.6.27.19-5.1/include/linux/compat.h
---- linux-2.6.27/include/linux/compat.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/compat.h 2009-03-25 16:11:49.000000000 +0000
-@@ -278,5 +278,18 @@ asmlinkage long compat_sys_timerfd_setti
+diff -r 9608d5473017 include/linux/compat.h
+--- a/include/linux/compat.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/compat.h   Wed May 06 16:56:56 2009 +0100
+@@ -278,5 +278,18 @@
  asmlinkage long compat_sys_timerfd_gettime(int ufd,
                                   struct compat_itimerspec __user *otmr);
  
@@ -1077469,10 +1077421,10 @@ diff -purN linux-2.6.27/include/linux/compat.h linux-2.6.27.19-5.1/include/linux
 +
  #endif /* CONFIG_COMPAT */
  #endif /* _LINUX_COMPAT_H */
-diff -purN linux-2.6.27/include/linux/console.h linux-2.6.27.19-5.1/include/linux/console.h
---- linux-2.6.27/include/linux/console.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/console.h        2009-03-25 16:11:49.000000000 +0000
-@@ -63,6 +63,7 @@ extern const struct consw dummy_con; /* 
+diff -r 9608d5473017 include/linux/console.h
+--- a/include/linux/console.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/console.h  Wed May 06 16:56:56 2009 +0100
+@@ -63,6 +63,7 @@
  extern const struct consw vga_con;    /* VGA text console */
  extern const struct consw newport_con;        /* SGI Newport console  */
  extern const struct consw prom_con;   /* SPARC PROM console */
@@ -1077480,7 +1077432,7 @@ diff -purN linux-2.6.27/include/linux/console.h linux-2.6.27.19-5.1/include/linu
  
  int con_is_bound(const struct consw *csw);
  int register_con_driver(const struct consw *csw, int first, int last);
-@@ -142,7 +143,12 @@ void vcs_remove_sysfs(struct tty_struct 
+@@ -142,7 +143,12 @@
  
  /* Some debug stub to catch some of the obvious races in the VT code */
  #if 1
@@ -1077493,10 +1077445,10 @@ diff -purN linux-2.6.27/include/linux/console.h linux-2.6.27.19-5.1/include/linu
  #else
  #define WARN_CONSOLE_UNLOCKED()
  #endif
-diff -purN linux-2.6.27/include/linux/console_struct.h linux-2.6.27.19-5.1/include/linux/console_struct.h
---- linux-2.6.27/include/linux/console_struct.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/console_struct.h 2009-03-25 16:11:49.000000000 +0000
-@@ -53,7 +53,7 @@ struct vc_data {
+diff -r 9608d5473017 include/linux/console_struct.h
+--- a/include/linux/console_struct.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/console_struct.h   Wed May 06 16:56:56 2009 +0100
+@@ -53,7 +53,7 @@
        unsigned short  vc_hi_font_mask;        /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
        struct console_font vc_font;            /* Current VC font set */
        unsigned short  vc_video_erase_char;    /* Background erase character */
@@ -1077505,7 +1077457,7 @@ diff -purN linux-2.6.27/include/linux/console_struct.h linux-2.6.27.19-5.1/inclu
        /* VT terminal data */
        unsigned int    vc_state;               /* Escape sequence parser state */
        unsigned int    vc_npar,vc_par[NPAR];   /* Parameters of current escape sequence */
-@@ -107,6 +107,9 @@ struct vc_data {
+@@ -107,6 +107,9 @@
        struct vc_data **vc_display_fg;         /* [!] Ptr to var holding fg console for this display */
        unsigned long   vc_uni_pagedir;
        unsigned long   *vc_uni_pagedir_loc;  /* [!] Location of uni_pagedir variable for this console */
@@ -1077515,10 +1077467,10 @@ diff -purN linux-2.6.27/include/linux/console_struct.h linux-2.6.27.19-5.1/inclu
        /* additional information is in vt_kern.h */
  };
  
-diff -purN linux-2.6.27/include/linux/cpufreq.h linux-2.6.27.19-5.1/include/linux/cpufreq.h
---- linux-2.6.27/include/linux/cpufreq.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cpufreq.h        2009-03-25 16:11:48.000000000 +0000
-@@ -282,7 +282,7 @@ int cpufreq_update_policy(unsigned int c
+diff -r 9608d5473017 include/linux/cpufreq.h
+--- a/include/linux/cpufreq.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cpufreq.h  Wed May 06 16:56:56 2009 +0100
+@@ -282,7 +282,7 @@
  unsigned int cpufreq_get(unsigned int cpu);
  
  /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
@@ -1077527,9 +1077479,9 @@ diff -purN linux-2.6.27/include/linux/cpufreq.h linux-2.6.27.19-5.1/include/linu
  unsigned int cpufreq_quick_get(unsigned int cpu);
  #else
  static inline unsigned int cpufreq_quick_get(unsigned int cpu)
-diff -purN linux-2.6.27/include/linux/cpumask.h linux-2.6.27.19-5.1/include/linux/cpumask.h
---- linux-2.6.27/include/linux/cpumask.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/cpumask.h        2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/cpumask.h
+--- a/include/linux/cpumask.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/cpumask.h  Wed May 06 16:56:56 2009 +0100
 @@ -109,6 +109,7 @@
   *
   * for_each_cpu_mask(cpu, mask)               for-loop cpu over mask using NR_CPUS
@@ -1077538,7 +1077490,7 @@ diff -purN linux-2.6.27/include/linux/cpumask.h linux-2.6.27.19-5.1/include/linu
   *
   * int num_online_cpus()              Number of online CPUs
   * int num_possible_cpus()            Number of all possible CPUs
-@@ -400,29 +401,41 @@ static inline void __cpus_fold(cpumask_t
+@@ -400,28 +401,40 @@
  
  #if NR_CPUS == 1
  
@@ -1077580,13 +1077532,12 @@ diff -purN linux-2.6.27/include/linux/cpumask.h linux-2.6.27.19-5.1/include/linu
 +              (cpu) = cpumask_next_and((cpu), &(mask), &(and)),       \
 +              (cpu) < nr_cpu_ids;)
  #endif
-+#define cpumask_first_and(mask, and) cpumask_next_and(-1, (mask), (and))
 +
++#define cpumask_first_and(mask, and) cpumask_next_and(-1, (mask), (and))
  #if NR_CPUS <= 64
  
- #define next_cpu_nr(n, src)           next_cpu(n, src)
-@@ -432,12 +445,14 @@ int __any_online_cpu(const cpumask_t *ma
+@@ -432,12 +445,14 @@
  #else /* NR_CPUS > 64 */
  
  int __next_cpu_nr(int n, const cpumask_t *srcp);
@@ -1077604,10 +1077555,10 @@ diff -purN linux-2.6.27/include/linux/cpumask.h linux-2.6.27.19-5.1/include/linu
  
  #endif /* NR_CPUS > 64 */
  
-diff -purN linux-2.6.27/include/linux/dcache.h linux-2.6.27.19-5.1/include/linux/dcache.h
---- linux-2.6.27/include/linux/dcache.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dcache.h 2009-03-25 16:11:50.000000000 +0000
-@@ -299,9 +299,12 @@ extern int d_validate(struct dentry *, s
+diff -r 9608d5473017 include/linux/dcache.h
+--- a/include/linux/dcache.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dcache.h   Wed May 06 16:56:56 2009 +0100
+@@ -299,9 +299,12 @@
  /*
   * helper function for dentry_operations.d_dname() members
   */
@@ -1077621,9 +1077572,9 @@ diff -purN linux-2.6.27/include/linux/dcache.h linux-2.6.27.19-5.1/include/linux
  extern char *d_path(const struct path *, char *, int);
  extern char *dentry_path(struct dentry *, char *, int);
  
-diff -purN linux-2.6.27/include/linux/dcbnl.h linux-2.6.27.19-5.1/include/linux/dcbnl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dcbnl.h  2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dcbnl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dcbnl.h    Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,326 @@
 +#ifndef __LINUX_DCBNL_H__
 +#define __LINUX_DCBNL_H__
@@ -1077951,10 +1077902,10 @@ diff -purN linux-2.6.27/include/linux/dcbnl.h linux-2.6.27.19-5.1/include/linux/
 +
 +
 +#endif /* __LINUX_DCBNL_H__ */
-diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/include/linux/device-mapper.h
---- linux-2.6.27/include/linux/device-mapper.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/device-mapper.h  2009-03-25 16:11:47.000000000 +0000
-@@ -46,6 +46,8 @@ typedef void (*dm_dtr_fn) (struct dm_tar
+diff -r 9608d5473017 include/linux/device-mapper.h
+--- a/include/linux/device-mapper.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/device-mapper.h    Wed May 06 16:56:56 2009 +0100
+@@ -46,6 +46,8 @@
   */
  typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
                          union map_info *map_context);
@@ -1077963,7 +1077914,7 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
  
  /*
   * Returns:
-@@ -58,6 +60,9 @@ typedef int (*dm_map_fn) (struct dm_targ
+@@ -58,6 +60,9 @@
  typedef int (*dm_endio_fn) (struct dm_target *ti,
                            struct bio *bio, int error,
                            union map_info *map_context);
@@ -1077973,21 +1077924,21 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
  
  typedef void (*dm_flush_fn) (struct dm_target *ti);
  typedef void (*dm_presuspend_fn) (struct dm_target *ti);
-@@ -77,6 +82,13 @@ typedef int (*dm_ioctl_fn) (struct dm_ta
+@@ -76,6 +81,13 @@
  typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
                            struct bio_vec *biovec, int max_size);
++
 +/*
 + * Returns:
 + *    0: The target can handle the next I/O immediately.
 + *    1: The target can't handle the next I/O immediately.
 + */
 +typedef int (*dm_busy_fn) (struct dm_target *ti);
-+
  void dm_error(const char *message);
  
- /*
-@@ -103,7 +115,9 @@ struct target_type {
+@@ -103,7 +115,9 @@
        dm_ctr_fn ctr;
        dm_dtr_fn dtr;
        dm_map_fn map;
@@ -1077997,7 +1077948,7 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
        dm_flush_fn flush;
        dm_presuspend_fn presuspend;
        dm_postsuspend_fn postsuspend;
-@@ -113,6 +127,7 @@ struct target_type {
+@@ -113,6 +127,7 @@
        dm_message_fn message;
        dm_ioctl_fn ioctl;
        dm_merge_fn merge;
@@ -1078005,7 +1077956,7 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
  };
  
  struct io_restrictions {
-@@ -125,6 +140,7 @@ struct io_restrictions {
+@@ -125,6 +140,7 @@
        unsigned short max_hw_segments;
        unsigned short max_phys_segments;
        unsigned char no_cluster; /* inverted so that 0 is default */
@@ -1078013,7 +1077964,7 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
  };
  
  struct dm_target {
-@@ -348,4 +364,12 @@ static inline unsigned long to_bytes(sec
+@@ -348,4 +364,12 @@
        return (n << SECTOR_SHIFT);
  }
  
@@ -1078026,10 +1077977,10 @@ diff -purN linux-2.6.27/include/linux/device-mapper.h linux-2.6.27.19-5.1/includ
 +int dm_underlying_device_busy(struct request_queue *q);
 +
  #endif        /* _LINUX_DEVICE_MAPPER_H */
-diff -purN linux-2.6.27/include/linux/device.h linux-2.6.27.19-5.1/include/linux/device.h
---- linux-2.6.27/include/linux/device.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/device.h 2009-03-25 16:11:48.000000000 +0000
-@@ -524,22 +524,40 @@ extern const char *dev_driver_string(con
+diff -r 9608d5473017 include/linux/device.h
+--- a/include/linux/device.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/device.h   Wed May 06 16:56:56 2009 +0100
+@@ -524,22 +524,40 @@
        printk(level "%s %s: " format , dev_driver_string(dev) , \
               dev_name(dev) , ## arg)
  
@@ -1078078,9 +1078029,9 @@ diff -purN linux-2.6.27/include/linux/device.h linux-2.6.27.19-5.1/include/linux
  #define dev_dbg(dev, format, arg...)          \
        dev_printk(KERN_DEBUG , dev , format , ## arg)
  #else
-diff -purN linux-2.6.27/include/linux/dis-asm.h linux-2.6.27.19-5.1/include/linux/dis-asm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dis-asm.h        2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dis-asm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dis-asm.h  Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,347 @@
 +/* Interface between the opcode library and its callers.
 +
@@ -1078429,9 +1078380,9 @@ diff -purN linux-2.6.27/include/linux/dis-asm.h linux-2.6.27.19-5.1/include/linu
 +#endif
 +
 +#endif /* ! defined (DIS_ASM_H) */
-diff -purN linux-2.6.27/include/linux/dlm.h linux-2.6.27.19-5.1/include/linux/dlm.h
---- linux-2.6.27/include/linux/dlm.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dlm.h    2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/dlm.h
+--- a/include/linux/dlm.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dlm.h      Wed May 06 16:56:56 2009 +0100
 @@ -2,7 +2,7 @@
  *******************************************************************************
  **
@@ -1078441,7 +1078392,7 @@ diff -purN linux-2.6.27/include/linux/dlm.h linux-2.6.27.19-5.1/include/linux/dl
  **
  **  This copyrighted material is made available to anyone wishing to use,
  **  modify, copy, or redistribute it subject to the terms and conditions
-@@ -65,9 +65,12 @@ struct dlm_lksb {
+@@ -65,9 +65,12 @@
        char *   sb_lvbptr;
  };
  
@@ -1078454,9 +1078405,9 @@ diff -purN linux-2.6.27/include/linux/dlm.h linux-2.6.27.19-5.1/include/linux/dl
  
  #ifdef __KERNEL__
  
-diff -purN linux-2.6.27/include/linux/dlm_device.h linux-2.6.27.19-5.1/include/linux/dlm_device.h
---- linux-2.6.27/include/linux/dlm_device.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dlm_device.h     2009-03-25 16:11:47.000000000 +0000
+diff -r 9608d5473017 include/linux/dlm_device.h
+--- a/include/linux/dlm_device.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dlm_device.h       Wed May 06 16:56:56 2009 +0100
 @@ -26,7 +26,7 @@
  /* Version of the device interface */
  #define DLM_DEVICE_VERSION_MAJOR 6
@@ -1078466,9 +1078417,9 @@ diff -purN linux-2.6.27/include/linux/dlm_device.h linux-2.6.27.19-5.1/include/l
  
  /* struct passed to the lock write */
  struct dlm_lock_params {
-diff -purN linux-2.6.27/include/linux/dm-regions.h linux-2.6.27.19-5.1/include/linux/dm-regions.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dm-regions.h     2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dm-regions.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dm-regions.h       Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,115 @@
 +/*
 + * Copyright (C) 2003 Sistina Software Limited.
@@ -1078585,9 +1078536,9 @@ diff -purN linux-2.6.27/include/linux/dm-regions.h linux-2.6.27.19-5.1/include/l
 +void dm_rh_start_recovery(struct dm_rh_client *rh);
 +
 +#endif /* #ifdef DM_REGION_HASH_H */
-diff -purN linux-2.6.27/include/linux/dmar.h linux-2.6.27.19-5.1/include/linux/dmar.h
---- linux-2.6.27/include/linux/dmar.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dmar.h   2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dmar.h
+--- a/include/linux/dmar.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dmar.h     Wed May 06 16:56:56 2009 +0100
 @@ -25,9 +25,98 @@
  #include <linux/types.h>
  #include <linux/msi.h>
@@ -1078688,7 +1078639,7 @@ diff -purN linux-2.6.27/include/linux/dmar.h linux-2.6.27.19-5.1/include/linux/d
  extern const char *dmar_get_fault_reason(u8 fault_reason);
  
  /* Can't use the common MSI interrupt functions
-@@ -40,47 +129,30 @@ extern void dmar_msi_write(int irq, stru
+@@ -40,47 +129,30 @@
  extern int dmar_set_interrupt(struct intel_iommu *iommu);
  extern int arch_setup_dmar_msi(unsigned int irq);
  
@@ -1078745,10 +1078696,10 @@ diff -purN linux-2.6.27/include/linux/dmar.h linux-2.6.27.19-5.1/include/linux/d
 -
  #endif /* !CONFIG_DMAR */
  #endif /* __DMAR_H__ */
-diff -purN linux-2.6.27/include/linux/dmi.h linux-2.6.27.19-5.1/include/linux/dmi.h
---- linux-2.6.27/include/linux/dmi.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dmi.h    2009-03-25 16:11:48.000000000 +0000
-@@ -75,24 +75,29 @@ struct dmi_device {
+diff -r 9608d5473017 include/linux/dmi.h
+--- a/include/linux/dmi.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dmi.h      Wed May 06 16:56:56 2009 +0100
+@@ -75,24 +75,29 @@
  #ifdef CONFIG_DMI
  
  extern int dmi_check_system(const struct dmi_system_id *list);
@@ -1078778,9 +1078729,9 @@ diff -purN linux-2.6.27/include/linux/dmi.h linux-2.6.27.19-5.1/include/linux/dm
  #define dmi_available 0
  static inline int dmi_walk(void (*decode)(const struct dmi_header *))
        { return -1; }
-diff -purN linux-2.6.27/include/linux/dqblk_qtree.h linux-2.6.27.19-5.1/include/linux/dqblk_qtree.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_qtree.h    2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_qtree.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dqblk_qtree.h      Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,56 @@
 +/*
 + *    Definitions of structures and functions for quota formats using trie
@@ -1078838,9 +1078789,9 @@ diff -purN linux-2.6.27/include/linux/dqblk_qtree.h linux-2.6.27.19-5.1/include/
 +}
 +
 +#endif /* _LINUX_DQBLK_QTREE_H */
-diff -purN linux-2.6.27/include/linux/dqblk_v1.h linux-2.6.27.19-5.1/include/linux/dqblk_v1.h
---- linux-2.6.27/include/linux/dqblk_v1.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_v1.h       2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_v1.h
+--- a/include/linux/dqblk_v1.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dqblk_v1.h Wed May 06 16:56:56 2009 +0100
 @@ -17,8 +17,4 @@
  #define V1_DEL_ALLOC 0
  #define V1_DEL_REWRITE 2
@@ -1078850,9 +1078801,9 @@ diff -purN linux-2.6.27/include/linux/dqblk_v1.h linux-2.6.27.19-5.1/include/lin
 -};
 -
  #endif        /* _LINUX_DQBLK_V1_H */
-diff -purN linux-2.6.27/include/linux/dqblk_v2.h linux-2.6.27.19-5.1/include/linux/dqblk_v2.h
---- linux-2.6.27/include/linux/dqblk_v2.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dqblk_v2.h       2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/dqblk_v2.h
+--- a/include/linux/dqblk_v2.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/dqblk_v2.h Wed May 06 16:56:56 2009 +0100
 @@ -1,26 +1,19 @@
  /*
 - *    Definitions of structures for vfsv0 quota format
@@ -1078887,9 +1078838,9 @@ diff -purN linux-2.6.27/include/linux/dqblk_v2.h linux-2.6.27.19-5.1/include/lin
 +#define V2_DEL_REWRITE QTREE_DEL_REWRITE
  
  #endif /* _LINUX_DQBLK_V2_H */
-diff -purN linux-2.6.27/include/linux/dynamic_printk.h linux-2.6.27.19-5.1/include/linux/dynamic_printk.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/dynamic_printk.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/dynamic_printk.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/dynamic_printk.h   Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,93 @@
 +#ifndef _DYNAMIC_PRINTK_H
 +#define _DYNAMIC_PRINTK_H
@@ -1078984,10 +1078935,10 @@ diff -purN linux-2.6.27/include/linux/dynamic_printk.h linux-2.6.27.19-5.1/inclu
 +#endif
 +
 +#endif
-diff -purN linux-2.6.27/include/linux/efi.h linux-2.6.27.19-5.1/include/linux/efi.h
---- linux-2.6.27/include/linux/efi.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/efi.h    2009-03-25 16:11:50.000000000 +0000
-@@ -208,6 +208,9 @@ typedef efi_status_t efi_set_virtual_add
+diff -r 9608d5473017 include/linux/efi.h
+--- a/include/linux/efi.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/efi.h      Wed May 06 16:56:56 2009 +0100
+@@ -208,6 +208,9 @@
  #define EFI_GLOBAL_VARIABLE_GUID \
      EFI_GUID(  0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c )
  
@@ -1078997,7 +1078948,7 @@ diff -purN linux-2.6.27/include/linux/efi.h linux-2.6.27.19-5.1/include/linux/ef
  typedef struct {
        efi_guid_t guid;
        unsigned long table;
-@@ -255,6 +258,7 @@ extern struct efi {
+@@ -255,6 +258,7 @@
        unsigned long boot_info;        /* boot info table */
        unsigned long hcdp;             /* HCDP table */
        unsigned long uga;              /* UGA table */
@@ -1079005,10 +1078956,10 @@ diff -purN linux-2.6.27/include/linux/efi.h linux-2.6.27.19-5.1/include/linux/ef
        efi_get_time_t *get_time;
        efi_set_time_t *set_time;
        efi_get_wakeup_time_t *get_wakeup_time;
-diff -purN linux-2.6.27/include/linux/elevator.h linux-2.6.27.19-5.1/include/linux/elevator.h
---- linux-2.6.27/include/linux/elevator.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/elevator.h       2009-03-25 16:11:50.000000000 +0000
-@@ -112,6 +112,7 @@ extern struct request *elv_latter_reques
+diff -r 9608d5473017 include/linux/elevator.h
+--- a/include/linux/elevator.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/elevator.h Wed May 06 16:56:56 2009 +0100
+@@ -112,6 +112,7 @@
  extern int elv_register_queue(struct request_queue *q);
  extern void elv_unregister_queue(struct request_queue *q);
  extern int elv_may_queue(struct request_queue *, int);
@@ -1079016,7 +1078967,7 @@ diff -purN linux-2.6.27/include/linux/elevator.h linux-2.6.27.19-5.1/include/lin
  extern void elv_completed_request(struct request_queue *, struct request *);
  extern int elv_set_request(struct request_queue *, struct request *, gfp_t);
  extern void elv_put_request(struct request_queue *, struct request *);
-@@ -173,15 +174,15 @@ enum {
+@@ -173,15 +174,15 @@
  #define rb_entry_rq(node)     rb_entry((node), struct request, rb_node)
  
  /*
@@ -1079036,9 +1078987,9 @@ diff -purN linux-2.6.27/include/linux/elevator.h linux-2.6.27.19-5.1/include/lin
        } while (0)
  
  /*
-diff -purN linux-2.6.27/include/linux/elfnote.h linux-2.6.27.19-5.1/include/linux/elfnote.h
---- linux-2.6.27/include/linux/elfnote.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/elfnote.h        2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/elfnote.h
+--- a/include/linux/elfnote.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/elfnote.h  Wed May 06 16:56:56 2009 +0100
 @@ -52,7 +52,7 @@
  4484:.balign 4                                ;       \
  .popsection                           ;
@@ -1079048,10 +1078999,10 @@ diff -purN linux-2.6.27/include/linux/elfnote.h linux-2.6.27.19-5.1/include/linu
        ELFNOTE_START(name, type, "")           \
                desc                    ;       \
        ELFNOTE_END
-diff -purN linux-2.6.27/include/linux/ext3_fs.h linux-2.6.27.19-5.1/include/linux/ext3_fs.h
---- linux-2.6.27/include/linux/ext3_fs.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ext3_fs.h        2009-03-25 16:11:49.000000000 +0000
-@@ -380,6 +380,7 @@ struct ext3_inode {
+diff -r 9608d5473017 include/linux/ext3_fs.h
+--- a/include/linux/ext3_fs.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ext3_fs.h  Wed May 06 16:56:56 2009 +0100
+@@ -380,6 +380,7 @@
  #define EXT3_MOUNT_QUOTA              0x80000 /* Some quota option set */
  #define EXT3_MOUNT_USRQUOTA           0x100000 /* "old" user quota */
  #define EXT3_MOUNT_GRPQUOTA           0x200000 /* "old" group quota */
@@ -1079059,10 +1079010,10 @@ diff -purN linux-2.6.27/include/linux/ext3_fs.h linux-2.6.27.19-5.1/include/linu
  
  /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
  #ifndef _LINUX_EXT2_FS_H
-diff -purN linux-2.6.27/include/linux/ext3_fs_i.h linux-2.6.27.19-5.1/include/linux/ext3_fs_i.h
---- linux-2.6.27/include/linux/ext3_fs_i.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ext3_fs_i.h      2009-03-25 16:11:50.000000000 +0000
-@@ -107,6 +107,9 @@ struct ext3_inode_info {
+diff -r 9608d5473017 include/linux/ext3_fs_i.h
+--- a/include/linux/ext3_fs_i.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ext3_fs_i.h        Wed May 06 16:56:56 2009 +0100
+@@ -107,6 +107,9 @@
        struct posix_acl        *i_acl;
        struct posix_acl        *i_default_acl;
  #endif
@@ -1079072,10 +1079023,10 @@ diff -purN linux-2.6.27/include/linux/ext3_fs_i.h linux-2.6.27.19-5.1/include/li
  
        struct list_head i_orphan;      /* unlinked but open inodes */
  
-diff -purN linux-2.6.27/include/linux/fb.h linux-2.6.27.19-5.1/include/linux/fb.h
---- linux-2.6.27/include/linux/fb.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/fb.h     2009-03-25 16:11:48.000000000 +0000
-@@ -849,6 +849,14 @@ struct fb_info {
+diff -r 9608d5473017 include/linux/fb.h
+--- a/include/linux/fb.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/fb.h       Wed May 06 16:56:56 2009 +0100
+@@ -849,6 +849,14 @@
        void *fbcon_par;                /* fbcon use-only private area */
        /* From here on everything is device dependent */
        void *par;      
@@ -1079090,9 +1079041,9 @@ diff -purN linux-2.6.27/include/linux/fb.h linux-2.6.27.19-5.1/include/linux/fb.
  };
  
  #ifdef MODULE
-diff -purN linux-2.6.27/include/linux/firmware-map.h linux-2.6.27.19-5.1/include/linux/firmware-map.h
---- linux-2.6.27/include/linux/firmware-map.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/firmware-map.h   2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/firmware-map.h
+--- a/include/linux/firmware-map.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/firmware-map.h     Wed May 06 16:56:56 2009 +0100
 @@ -24,21 +24,19 @@
   */
  #ifdef CONFIG_FIRMWARE_MEMMAP
@@ -1079120,9 +1079071,9 @@ diff -purN linux-2.6.27/include/linux/firmware-map.h linux-2.6.27.19-5.1/include
  {
        return 0;
  }
-diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linux/freezer.h
---- linux-2.6.27/include/linux/freezer.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/freezer.h        2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/freezer.h
+--- a/include/linux/freezer.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/freezer.h  Wed May 06 16:56:56 2009 +0100
 @@ -6,7 +6,7 @@
  #include <linux/sched.h>
  #include <linux/wait.h>
@@ -1079132,7 +1079083,7 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
  /*
   * Check if a process has been frozen
   */
-@@ -39,29 +39,14 @@ static inline void clear_freeze_flag(str
+@@ -39,28 +39,13 @@
        clear_tsk_thread_flag(p, TIF_FREEZE);
  }
  
@@ -1079146,7 +1079097,8 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
 - * frozen and no one would thaw it.
 - */
 -static inline int thaw_process(struct task_struct *p)
--{
++static inline bool should_send_signal(struct task_struct *p)
+ {
 -      task_lock(p);
 -      if (frozen(p)) {
 -              p->flags &= ~PF_FROZEN;
@@ -1079157,21 +1079109,19 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
 -      clear_freeze_flag(p);
 -      task_unlock(p);
 -      return 0;
-+static inline bool should_send_signal(struct task_struct *p)
-+{
 +      return !(p->flags & PF_FREEZER_NOSIG);
  }
++
 +/* Takes and releases task alloc lock using task_lock() */
 +extern int thaw_process(struct task_struct *p);
-+
  extern void refrigerator(void);
  extern int freeze_processes(void);
- extern void thaw_processes(void);
-@@ -75,6 +60,15 @@ static inline int try_to_freeze(void)
+@@ -74,6 +59,15 @@
+       } else
                return 0;
  }
++
 +extern bool freeze_task(struct task_struct *p, bool sig_only);
 +extern void cancel_freezing(struct task_struct *p);
 +
@@ -1079180,11 +1079130,10 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
 +#else /* !CONFIG_CGROUP_FREEZER */
 +static inline int cgroup_frozen(struct task_struct *task) { return 0; }
 +#endif /* !CONFIG_CGROUP_FREEZER */
-+
  /*
   * The PF_FREEZER_SKIP flag should be set by a vfork parent right before it
-  * calls wait_for_completion(&vfork) and reset right after it returns from this
-@@ -166,7 +160,7 @@ static inline void set_freezable_with_si
+@@ -166,7 +160,7 @@
        } while (try_to_freeze());                                      \
        __retval;                                                       \
  })
@@ -1079193,7 +1079142,7 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
  static inline int frozen(struct task_struct *p) { return 0; }
  static inline int freezing(struct task_struct *p) { return 0; }
  static inline void set_freeze_flag(struct task_struct *p) {}
-@@ -191,6 +185,6 @@ static inline void set_freezable_with_si
+@@ -191,6 +185,6 @@
  #define wait_event_freezable_timeout(wq, condition, timeout)          \
                wait_event_interruptible_timeout(wq, condition, timeout)
  
@@ -1079201,10 +1079150,10 @@ diff -purN linux-2.6.27/include/linux/freezer.h linux-2.6.27.19-5.1/include/linu
 +#endif /* !CONFIG_FREEZER */
  
  #endif        /* FREEZER_H_INCLUDED */
-diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.h
---- linux-2.6.27/include/linux/fs.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/fs.h     2009-03-25 16:11:50.000000000 +0000
-@@ -86,7 +86,9 @@ extern int dir_notify_enable;
+diff -r 9608d5473017 include/linux/fs.h
+--- a/include/linux/fs.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/fs.h       Wed May 06 16:56:56 2009 +0100
+@@ -86,7 +86,9 @@
  #define READ_META     (READ | (1 << BIO_RW_META))
  #define WRITE_SYNC    (WRITE | (1 << BIO_RW_SYNC))
  #define SWRITE_SYNC   (SWRITE | (1 << BIO_RW_SYNC))
@@ -1079215,7 +1079164,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  #define SEL_IN                1
  #define SEL_OUT               2
-@@ -128,6 +130,7 @@ extern int dir_notify_enable;
+@@ -128,6 +130,7 @@
  #define MS_RELATIME   (1<<21) /* Update atime relative to mtime/ctime. */
  #define MS_KERNMOUNT  (1<<22) /* this is a kern_mount call */
  #define MS_I_VERSION  (1<<23) /* Update inode I_version field */
@@ -1079223,7 +1079172,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  #define MS_ACTIVE     (1<<30)
  #define MS_NOUSER     (1<<31)
  
-@@ -178,6 +181,7 @@ extern int dir_notify_enable;
+@@ -178,6 +181,7 @@
  #define IS_MANDLOCK(inode)    __IS_FLG(inode, MS_MANDLOCK)
  #define IS_NOATIME(inode)   __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
  #define IS_I_VERSION(inode)   __IS_FLG(inode, MS_I_VERSION)
@@ -1079231,7 +1079180,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  #define IS_NOQUOTA(inode)     ((inode)->i_flags & S_NOQUOTA)
  #define IS_APPEND(inode)      ((inode)->i_flags & S_APPEND)
-@@ -222,6 +226,7 @@ extern int dir_notify_enable;
+@@ -222,6 +226,7 @@
  #define BLKTRACESTART _IO(0x12,116)
  #define BLKTRACESTOP _IO(0x12,117)
  #define BLKTRACETEARDOWN _IO(0x12,118)
@@ -1079239,7 +1079188,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  #define BMAP_IOCTL 1          /* obsolete - kept for compatibility */
  #define FIBMAP           _IO(0x00,1)  /* bmap access */
-@@ -337,6 +342,7 @@ typedef void (dio_iodone_t)(struct kiocb
+@@ -337,6 +342,7 @@
  #define ATTR_KILL_PRIV        (1 << 14)
  #define ATTR_OPEN     (1 << 15) /* Truncating from open(O_TRUNC) */
  #define ATTR_TIMES_SET        (1 << 16)
@@ -1079247,7 +1079196,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  /*
   * This is the Inode Attributes structure, used for notify_change().  It
-@@ -361,6 +367,10 @@ struct iattr {
+@@ -361,6 +367,10 @@
         * Not an attribute, but an auxilary info for filesystems wanting to
         * implement an ftruncate() like method.  NOTE: filesystem should
         * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
@@ -1079258,7 +1079207,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
         */
        struct file     *ia_file;
  };
-@@ -403,6 +413,9 @@ enum positive_aop_returns {
+@@ -403,6 +413,9 @@
  
  #define AOP_FLAG_UNINTERRUPTIBLE      0x0001 /* will not do a short write */
  #define AOP_FLAG_CONT_EXPAND          0x0002 /* called from cont_expand */
@@ -1079268,7 +1079217,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  /*
   * oh the beauties of C type declarations.
-@@ -507,6 +520,15 @@ struct address_space_operations {
+@@ -507,6 +520,15 @@
        int (*launder_page) (struct page *);
        int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
                                        unsigned long);
@@ -1079284,7 +1079233,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  };
  
  /*
-@@ -1077,6 +1099,9 @@ struct super_block {
+@@ -1077,6 +1099,9 @@
        struct rw_semaphore     s_umount;
        struct mutex            s_lock;
        int                     s_count;
@@ -1079294,7 +1079243,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
        int                     s_syncing;
        int                     s_need_sync_fs;
        atomic_t                s_active;
-@@ -1160,13 +1185,13 @@ extern void unlock_super(struct super_bl
+@@ -1160,13 +1185,13 @@
   */
  extern int vfs_permission(struct nameidata *, int);
  extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
@@ -1079315,19 +1079264,19 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  
  /*
   * VFS dentry helper functions.
-@@ -1179,6 +1204,11 @@ extern void dentry_unhash(struct dentry 
+@@ -1177,6 +1202,11 @@
+  * VFS file helper functions.
+  */
  extern int file_permission(struct file *, int);
- /*
++
++/*
 + * VFS path helper functions.
 + */
 +extern int path_permission(struct path *, int);
-+
-+/*
+ /*
   * File types
-  *
-  * NOTE! These match bits 12..15 of stat.st_mode
-@@ -1259,7 +1289,10 @@ struct file_operations {
+@@ -1259,7 +1289,10 @@
        int (*flock) (struct file *, int, struct file_lock *);
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
        ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
@@ -1079338,7 +1079287,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  };
  
  struct inode_operations {
-@@ -1278,6 +1311,8 @@ struct inode_operations {
+@@ -1278,6 +1311,8 @@
        void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
        int (*permission) (struct inode *, int);
@@ -1079347,7 +1079296,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
        int (*setattr) (struct dentry *, struct iattr *);
        int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
        int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
-@@ -1321,6 +1356,8 @@ struct super_operations {
+@@ -1321,6 +1356,8 @@
        void (*clear_inode) (struct inode *);
        void (*umount_begin) (struct super_block *);
  
@@ -1079356,7 +1079305,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
        int (*show_options)(struct seq_file *, struct vfsmount *);
        int (*show_stats)(struct seq_file *, struct vfsmount *);
  #ifdef CONFIG_QUOTA
-@@ -1612,8 +1649,8 @@ static inline int break_lease(struct ino
+@@ -1612,8 +1649,8 @@
  
  /* fs/open.c */
  
@@ -1079367,7 +1079316,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  extern long do_sys_open(int dfd, const char __user *filename, int flags,
                        int mode);
  extern struct file *filp_open(const char *, int, int);
-@@ -1718,6 +1755,9 @@ extern int fs_may_remount_ro(struct supe
+@@ -1718,6 +1755,9 @@
   */
  #define bio_data_dir(bio)     ((bio)->bi_rw & 1)
  
@@ -1079377,7 +1079326,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  extern int check_disk_change(struct block_device *);
  extern int __invalidate_device(struct block_device *);
  extern int invalidate_partition(struct gendisk *, int);
-@@ -1771,7 +1811,8 @@ extern int do_remount_sb(struct super_bl
+@@ -1771,7 +1811,8 @@
  #ifdef CONFIG_BLOCK
  extern sector_t bmap(struct inode *, sector_t);
  #endif
@@ -1079387,7 +1079336,7 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  extern int inode_permission(struct inode *, int);
  extern int generic_permission(struct inode *, int,
                int (*check_acl)(struct inode *, int));
-@@ -1959,7 +2000,7 @@ extern int page_readlink(struct dentry *
+@@ -1959,7 +2000,7 @@
  extern void *page_follow_link_light(struct dentry *, struct nameidata *);
  extern void page_put_link(struct dentry *, struct nameidata *, void *);
  extern int __page_symlink(struct inode *inode, const char *symname, int len,
@@ -1079396,10 +1079345,10 @@ diff -purN linux-2.6.27/include/linux/fs.h linux-2.6.27.19-5.1/include/linux/fs.
  extern int page_symlink(struct inode *inode, const char *symname, int len);
  extern const struct inode_operations page_symlink_inode_operations;
  extern int generic_readlink(struct dentry *, char __user *, int);
-diff -purN linux-2.6.27/include/linux/genhd.h linux-2.6.27.19-5.1/include/linux/genhd.h
---- linux-2.6.27/include/linux/genhd.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/genhd.h  2009-03-25 16:11:49.000000000 +0000
-@@ -109,6 +109,7 @@ struct hd_struct {
+diff -r 9608d5473017 include/linux/genhd.h
+--- a/include/linux/genhd.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/genhd.h    Wed May 06 16:56:56 2009 +0100
+@@ -109,6 +109,7 @@
  #define GENHD_FL_UP                           16
  #define GENHD_FL_SUPPRESS_PARTITION_INFO      32
  #define GENHD_FL_FAIL                         64
@@ -1079407,10 +1079356,10 @@ diff -purN linux-2.6.27/include/linux/genhd.h linux-2.6.27.19-5.1/include/linux/
  
  struct gendisk {
        int major;                      /* major number of driver */
-diff -purN linux-2.6.27/include/linux/gfp.h linux-2.6.27.19-5.1/include/linux/gfp.h
---- linux-2.6.27/include/linux/gfp.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/gfp.h    2009-03-25 16:11:49.000000000 +0000
-@@ -43,6 +43,7 @@ struct vm_area_struct;
+diff -r 9608d5473017 include/linux/gfp.h
+--- a/include/linux/gfp.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/gfp.h      Wed May 06 16:56:56 2009 +0100
+@@ -43,6 +43,7 @@
  #define __GFP_REPEAT  ((__force gfp_t)0x400u) /* See above */
  #define __GFP_NOFAIL  ((__force gfp_t)0x800u) /* See above */
  #define __GFP_NORETRY ((__force gfp_t)0x1000u)/* See above */
@@ -1079418,7 +1079367,7 @@ diff -purN linux-2.6.27/include/linux/gfp.h linux-2.6.27.19-5.1/include/linux/gf
  #define __GFP_COMP    ((__force gfp_t)0x4000u)/* Add compound page metadata */
  #define __GFP_ZERO    ((__force gfp_t)0x8000u)/* Return zeroed page on success */
  #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
-@@ -88,7 +89,7 @@ struct vm_area_struct;
+@@ -88,7 +89,7 @@
  /* Control page allocator reclaim behavior */
  #define GFP_RECLAIM_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\
                        __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\
@@ -1079427,10 +1079376,10 @@ diff -purN linux-2.6.27/include/linux/gfp.h linux-2.6.27.19-5.1/include/linux/gf
  
  /* Control allocation constraints */
  #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
-diff -purN linux-2.6.27/include/linux/hid.h linux-2.6.27.19-5.1/include/linux/hid.h
---- linux-2.6.27/include/linux/hid.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/hid.h    2009-03-25 16:11:49.000000000 +0000
-@@ -298,6 +298,7 @@ struct hid_item {
+diff -r 9608d5473017 include/linux/hid.h
+--- a/include/linux/hid.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/hid.h      Wed May 06 16:56:56 2009 +0100
+@@ -298,6 +298,7 @@
  #define HID_QUIRK_RDESC_SAMSUNG_REMOTE                0x00000040
  #define HID_QUIRK_RDESC_MICROSOFT_RECV_1028   0x00000080
  #define HID_QUIRK_RDESC_SUNPLUS_WDESKTOP      0x00000100
@@ -1079438,10 +1079387,10 @@ diff -purN linux-2.6.27/include/linux/hid.h linux-2.6.27.19-5.1/include/linux/hi
  
  /*
   * This is the global environment of the parser. This information is
-diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linux/highmem.h
---- linux-2.6.27/include/linux/highmem.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/highmem.h        2009-03-25 16:11:50.000000000 +0000
-@@ -62,6 +62,7 @@ static inline void *kmap_atomic(struct p
+diff -r 9608d5473017 include/linux/highmem.h
+--- a/include/linux/highmem.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/highmem.h  Wed May 06 16:56:56 2009 +0100
+@@ -62,6 +62,7 @@
  
  #endif /* CONFIG_HIGHMEM */
  
@@ -1079449,7 +1079398,7 @@ diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linu
  /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
  static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
  {
-@@ -69,6 +70,7 @@ static inline void clear_user_highpage(s
+@@ -69,6 +70,7 @@
        clear_user_page(addr, vaddr, page);
        kunmap_atomic(addr, KM_USER0);
  }
@@ -1079457,7 +1079406,7 @@ diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linu
  
  #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
  /**
-@@ -115,12 +117,14 @@ alloc_zeroed_user_highpage_movable(struc
+@@ -115,12 +117,14 @@
        return __alloc_zeroed_user_highpage(__GFP_MOVABLE, vma, vaddr);
  }
  
@@ -1079472,7 +1079421,7 @@ diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linu
  
  static inline void zero_user_segments(struct page *page,
        unsigned start1, unsigned end1,
-@@ -174,6 +178,8 @@ static inline void copy_user_highpage(st
+@@ -174,6 +178,8 @@
  
  #endif
  
@@ -1079481,17 +1079430,17 @@ diff -purN linux-2.6.27/include/linux/highmem.h linux-2.6.27.19-5.1/include/linu
  static inline void copy_highpage(struct page *to, struct page *from)
  {
        char *vfrom, *vto;
-@@ -185,4 +191,6 @@ static inline void copy_highpage(struct 
+@@ -185,4 +191,6 @@
        kunmap_atomic(vto, KM_USER1);
  }
  
 +#endif
 +
  #endif /* _LINUX_HIGHMEM_H */
-diff -purN linux-2.6.27/include/linux/idr.h linux-2.6.27.19-5.1/include/linux/idr.h
---- linux-2.6.27/include/linux/idr.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/idr.h    2009-03-25 16:11:50.000000000 +0000
-@@ -52,13 +52,14 @@ struct idr_layer {
+diff -r 9608d5473017 include/linux/idr.h
+--- a/include/linux/idr.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/idr.h      Wed May 06 16:56:56 2009 +0100
+@@ -52,13 +52,14 @@
        unsigned long            bitmap; /* A zero bit means "space here" */
        struct idr_layer        *ary[1<<IDR_BITS];
        int                      count;  /* When zero, we can release it */
@@ -1079507,10 +1079456,10 @@ diff -purN linux-2.6.27/include/linux/idr.h linux-2.6.27.19-5.1/include/linux/id
        int               id_free_cnt;
        spinlock_t        lock;
  };
-diff -purN linux-2.6.27/include/linux/if_vlan.h linux-2.6.27.19-5.1/include/linux/if_vlan.h
---- linux-2.6.27/include/linux/if_vlan.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/if_vlan.h        2009-03-25 16:11:49.000000000 +0000
-@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct
+diff -r 9608d5473017 include/linux/if_vlan.h
+--- a/include/linux/if_vlan.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/if_vlan.h  Wed May 06 16:56:56 2009 +0100
+@@ -114,6 +114,8 @@
  
  extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
                             u16 vlan_tci, int polling);
@@ -1079519,22 +1079468,22 @@ diff -purN linux-2.6.27/include/linux/if_vlan.h linux-2.6.27.19-5.1/include/linu
  #else
  static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
  {
-@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(stru
+@@ -132,6 +134,11 @@
+ {
        BUG();
        return NET_XMIT_SUCCESS;
- }
++}
 +
 +static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
 +{
 +      return 0;
-+}
+ }
  #endif
  
- /**
-diff -purN linux-2.6.27/include/linux/inotify.h linux-2.6.27.19-5.1/include/linux/inotify.h
---- linux-2.6.27/include/linux/inotify.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/inotify.h        2009-03-25 16:11:50.000000000 +0000
-@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(
+diff -r 9608d5473017 include/linux/inotify.h
+--- a/include/linux/inotify.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/inotify.h  Wed May 06 16:56:56 2009 +0100
+@@ -134,6 +134,8 @@
                                        struct inotify_watch *);
  extern void get_inotify_watch(struct inotify_watch *);
  extern void put_inotify_watch(struct inotify_watch *);
@@ -1079543,7 +1079492,7 @@ diff -purN linux-2.6.27/include/linux/inotify.h linux-2.6.27.19-5.1/include/linu
  
  #else
  
-@@ -228,6 +230,15 @@ static inline void put_inotify_watch(str
+@@ -228,6 +230,15 @@
  {
  }
  
@@ -1079559,10 +1079508,10 @@ diff -purN linux-2.6.27/include/linux/inotify.h linux-2.6.27.19-5.1/include/linu
  #endif        /* CONFIG_INOTIFY */
  
  #endif        /* __KERNEL __ */
-diff -purN linux-2.6.27/include/linux/interrupt.h linux-2.6.27.19-5.1/include/linux/interrupt.h
---- linux-2.6.27/include/linux/interrupt.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/interrupt.h      2009-03-25 16:11:49.000000000 +0000
-@@ -218,6 +218,12 @@ static inline int disable_irq_wake(unsig
+diff -r 9608d5473017 include/linux/interrupt.h
+--- a/include/linux/interrupt.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/interrupt.h        Wed May 06 16:56:56 2009 +0100
+@@ -218,6 +218,12 @@
  }
  #endif /* CONFIG_GENERIC_HARDIRQS */
  
@@ -1079575,10 +1079524,10 @@ diff -purN linux-2.6.27/include/linux/interrupt.h linux-2.6.27.19-5.1/include/li
  #ifndef __ARCH_SET_SOFTIRQ_PENDING
  #define set_softirq_pending(x) (local_softirq_pending() = (x))
  #define or_softirq_pending(x)  (local_softirq_pending() |= (x))
-diff -purN linux-2.6.27/include/linux/irq.h linux-2.6.27.19-5.1/include/linux/irq.h
---- linux-2.6.27/include/linux/irq.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/irq.h    2009-03-25 16:11:49.000000000 +0000
-@@ -62,6 +62,8 @@ typedef      void (*irq_flow_handler_t)(unsig
+diff -r 9608d5473017 include/linux/irq.h
+--- a/include/linux/irq.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/irq.h      Wed May 06 16:56:56 2009 +0100
+@@ -62,6 +62,8 @@
  #define IRQ_MOVE_PENDING      0x00200000      /* need to re-target IRQ destination */
  #define IRQ_NO_BALANCING      0x00400000      /* IRQ is excluded from balancing */
  #define IRQ_SPURIOUS_DISABLED 0x00800000      /* IRQ was disabled by the spurious trap */
@@ -1079587,7 +1079536,7 @@ diff -purN linux-2.6.27/include/linux/irq.h linux-2.6.27.19-5.1/include/linux/ir
  
  #ifdef CONFIG_IRQ_PER_CPU
  # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
-@@ -294,7 +296,7 @@ static inline void generic_handle_irq(un
+@@ -294,7 +296,7 @@
  
  /* Handling of unhandled and spurious interrupts: */
  extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
@@ -1079596,10 +1079545,10 @@ diff -purN linux-2.6.27/include/linux/irq.h linux-2.6.27.19-5.1/include/linux/ir
  
  /* Resending of interrupts :*/
  void check_irq_resend(struct irq_desc *desc, unsigned int irq);
-diff -purN linux-2.6.27/include/linux/jbd.h linux-2.6.27.19-5.1/include/linux/jbd.h
---- linux-2.6.27/include/linux/jbd.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/jbd.h    2009-03-25 16:11:50.000000000 +0000
-@@ -908,7 +908,7 @@ extern int    journal_set_features
+diff -r 9608d5473017 include/linux/jbd.h
+--- a/include/linux/jbd.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/jbd.h      Wed May 06 16:56:56 2009 +0100
+@@ -908,7 +908,7 @@
                   (journal_t *, unsigned long, unsigned long, unsigned long);
  extern int       journal_create     (journal_t *);
  extern int       journal_load       (journal_t *journal);
@@ -1079608,10 +1079557,10 @@ diff -purN linux-2.6.27/include/linux/jbd.h linux-2.6.27.19-5.1/include/linux/jb
  extern int       journal_recover    (journal_t *journal);
  extern int       journal_wipe       (journal_t *, int);
  extern int       journal_skip_recovery        (journal_t *);
-diff -purN linux-2.6.27/include/linux/jbd2.h linux-2.6.27.19-5.1/include/linux/jbd2.h
---- linux-2.6.27/include/linux/jbd2.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/jbd2.h   2009-03-25 16:11:50.000000000 +0000
-@@ -850,7 +850,8 @@ struct journal_s
+diff -r 9608d5473017 include/linux/jbd2.h
+--- a/include/linux/jbd2.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/jbd2.h     Wed May 06 16:56:56 2009 +0100
+@@ -850,7 +850,8 @@
         */
        struct block_device     *j_dev;
        int                     j_blocksize;
@@ -1079621,9 +1079570,9 @@ diff -purN linux-2.6.27/include/linux/jbd2.h linux-2.6.27.19-5.1/include/linux/j
  
        /*
         * Device which holds the client fs.  For internal journal this will be
-diff -purN linux-2.6.27/include/linux/kdb.h linux-2.6.27.19-5.1/include/linux/kdb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kdb.h    2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/kdb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/kdb.h      Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,175 @@
 +#ifndef _KDB_H
 +#define _KDB_H
@@ -1079800,9 +1079749,9 @@ diff -purN linux-2.6.27/include/linux/kdb.h linux-2.6.27.19-5.1/include/linux/kd
 +#endif /* CONFIG_KDB_KDUMP */
 +
 +#endif        /* !_KDB_H */
-diff -purN linux-2.6.27/include/linux/kdbprivate.h linux-2.6.27.19-5.1/include/linux/kdbprivate.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kdbprivate.h     2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/kdbprivate.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/kdbprivate.h       Wed May 06 16:56:56 2009 +0100
 @@ -0,0 +1,503 @@
 +#ifndef _KDBPRIVATE_H
 +#define _KDBPRIVATE_H
@@ -1080307,9 +1080256,9 @@ diff -purN linux-2.6.27/include/linux/kdbprivate.h linux-2.6.27.19-5.1/include/l
 +#endif /* CONFIG_KDB_KDUMP */
 +
 +#endif        /* !_KDBPRIVATE_H */
-diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux/kernel.h
---- linux-2.6.27/include/linux/kernel.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kernel.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/kernel.h
+--- a/include/linux/kernel.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/kernel.h   Wed May 06 16:56:57 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/log2.h>
  #include <linux/typecheck.h>
@@ -1080318,7 +1080267,7 @@ diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux
  #include <asm/byteorder.h>
  #include <asm/bug.h>
  
-@@ -235,7 +236,9 @@ extern int oops_in_progress;               /* If set,
+@@ -235,7 +236,9 @@
  extern int panic_timeout;
  extern int panic_on_oops;
  extern int panic_on_unrecovered_nmi;
@@ -1080328,7 +1080277,7 @@ diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux
  extern const char *print_tainted(void);
  extern void add_taint(unsigned);
  extern int root_mountflags;
-@@ -260,6 +263,14 @@ extern enum system_states {
+@@ -260,6 +263,14 @@
  #define TAINT_DIE                     (1<<7)
  #define TAINT_OVERRIDDEN_ACPI_TABLE   (1<<8)
  #define TAINT_WARN                    (1<<9)
@@ -1080343,7 +1080292,7 @@ diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux
  
  extern void dump_stack(void) __cold;
  
-@@ -288,28 +299,52 @@ static inline char *pack_hex_byte(char *
+@@ -288,28 +299,52 @@
        return buf;
  }
  
@@ -1080406,24 +1080355,24 @@ diff -purN linux-2.6.27/include/linux/kernel.h linux-2.6.27.19-5.1/include/linux
  #endif
  
  /*
-diff -purN linux-2.6.27/include/linux/kexec.h linux-2.6.27.19-5.1/include/linux/kexec.h
---- linux-2.6.27/include/linux/kexec.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/kexec.h  2009-03-25 16:11:48.000000000 +0000
-@@ -46,6 +46,13 @@
+diff -r 9608d5473017 include/linux/kexec.h
+--- a/include/linux/kexec.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/kexec.h    Wed May 06 16:56:57 2009 +0100
+@@ -45,6 +45,13 @@
+ #define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) +              \
                            KEXEC_CORE_NOTE_NAME_BYTES +                \
                            KEXEC_CORE_NOTE_DESC_BYTES )
++
 +#ifndef KEXEC_ARCH_HAS_PAGE_MACROS
 +#define kexec_page_to_pfn(page)  page_to_pfn(page)
 +#define kexec_pfn_to_page(pfn)   pfn_to_page(pfn)
 +#define kexec_virt_to_phys(addr) virt_to_phys(addr)
 +#define kexec_phys_to_virt(addr) phys_to_virt(addr)
 +#endif
-+
  /*
   * This structure is used to hold the arguments that are used when loading
-  * kernel binaries.
-@@ -108,6 +115,12 @@ struct kimage {
+@@ -108,6 +115,12 @@
  extern void machine_kexec(struct kimage *image);
  extern int machine_kexec_prepare(struct kimage *image);
  extern void machine_kexec_cleanup(struct kimage *image);
@@ -1080436,7 +1080385,7 @@ diff -purN linux-2.6.27/include/linux/kexec.h linux-2.6.27.19-5.1/include/linux/
  extern asmlinkage long sys_kexec_load(unsigned long entry,
                                        unsigned long nr_segments,
                                        struct kexec_segment __user *segments,
-@@ -154,6 +167,7 @@ unsigned long paddr_vmcoreinfo_note(void
+@@ -154,6 +167,7 @@
  
  extern struct kimage *kexec_image;
  extern struct kimage *kexec_crash_image;
@@ -1080444,17 +1080393,17 @@ diff -purN linux-2.6.27/include/linux/kexec.h linux-2.6.27.19-5.1/include/linux/
  
  #ifndef kexec_flush_icache_page
  #define kexec_flush_icache_page(page)
-@@ -208,5 +222,6 @@ struct pt_regs;
+@@ -208,5 +222,6 @@
  struct task_struct;
  static inline void crash_kexec(struct pt_regs *regs) { }
  static inline int kexec_should_crash(struct task_struct *p) { return 0; }
 +#define dump_after_notifier 0
  #endif /* CONFIG_KEXEC */
  #endif /* LINUX_KEXEC_H */
-diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux/libata.h
---- linux-2.6.27/include/linux/libata.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/libata.h 2009-03-25 16:11:49.000000000 +0000
-@@ -186,6 +186,8 @@ enum {
+diff -r 9608d5473017 include/linux/libata.h
+--- a/include/linux/libata.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/libata.h   Wed May 06 16:56:57 2009 +0100
+@@ -186,6 +186,8 @@
        ATA_FLAG_PIO_POLLING    = (1 << 9), /* use polling PIO if LLD
                                             * doesn't handle PIO interrupts */
        ATA_FLAG_NCQ            = (1 << 10), /* host supports NCQ */
@@ -1080463,7 +1080412,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
        ATA_FLAG_DEBUGMSG       = (1 << 13),
        ATA_FLAG_IGN_SIMPLEX    = (1 << 15), /* ignore SIMPLEX */
        ATA_FLAG_NO_IORDY       = (1 << 16), /* controller lacks iordy */
-@@ -250,7 +252,7 @@ enum {
+@@ -250,7 +252,7 @@
         * HHD424020F7SV00.  Increase to 2secs when parallel probing
         * is in place.
         */
@@ -1080472,7 +1080421,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  
        /* Spec mandates to wait for ">= 2ms" before checking status
         * after reset.  We wait 150ms, because that was the magic
-@@ -321,6 +323,8 @@ enum {
+@@ -321,6 +323,8 @@
        ATA_EH_LPM              = (1 << 4),  /* link power management action */
  
        ATA_EH_PERDEV_MASK      = ATA_EH_REVALIDATE,
@@ -1080481,17 +1080430,17 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  
        /* ata_eh_info->flags */
        ATA_EHI_HOTPLUGGED      = (1 << 0),  /* could have been hotplugged */
-@@ -335,6 +339,9 @@ enum {
+@@ -334,6 +338,9 @@
+       ATA_EHI_POST_SETMODE    = (1 << 20), /* revaildating after setmode */
  
        ATA_EHI_DID_RESET       = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
++
 +      /* mask of flags to transfer *to* the slave link */
 +      ATA_EHI_TO_SLAVE_MASK   = ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET,
-+
        /* max tries if error condition is still set after ->error_handler */
        ATA_EH_MAX_TRIES        = 5,
-@@ -364,6 +371,10 @@ enum {
+@@ -364,6 +371,10 @@
        ATA_HORKAGE_IPM         = (1 << 7),     /* Link PM problems */
        ATA_HORKAGE_IVB         = (1 << 8),     /* cbl det validity bit bugs */
        ATA_HORKAGE_STUCK_ERR   = (1 << 9),     /* stuck ERR on next PACKET */
@@ -1080502,7 +1080451,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  
         /* DMA mask for user DMA control: User visible values; DO NOT
            renumber */
-@@ -688,7 +699,8 @@ struct ata_port {
+@@ -688,7 +699,8 @@
        unsigned int            qc_active;
        int                     nr_active_links; /* #links with active qcs */
  
@@ -1080512,7 +1080461,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  
        int                     nr_pmp_links;   /* nr of available PMP links */
        struct ata_link         *pmp_link;      /* array of PMP links */
-@@ -772,8 +784,8 @@ struct ata_port_operations {
+@@ -772,8 +784,8 @@
        /*
         * Optional features
         */
@@ -1080523,7 +1080472,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
        void (*pmp_attach)(struct ata_port *ap);
        void (*pmp_detach)(struct ata_port *ap);
        int  (*enable_pm)(struct ata_port *ap, enum link_pm policy);
-@@ -895,6 +907,7 @@ extern void ata_port_disable(struct ata_
+@@ -895,6 +907,7 @@
  extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports);
  extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,
                        const struct ata_port_info * const * ppi, int n_ports);
@@ -1080531,7 +1080480,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  extern int ata_host_start(struct ata_host *host);
  extern int ata_host_register(struct ata_host *host,
                             struct scsi_host_template *sht);
-@@ -920,8 +933,8 @@ extern int sata_scr_valid(struct ata_lin
+@@ -920,8 +933,8 @@
  extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
  extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
  extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val);
@@ -1080542,7 +1080491,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  #ifdef CONFIG_PM
  extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
  extern void ata_host_resume(struct ata_host *host);
-@@ -1134,7 +1147,7 @@ static inline bool sata_pmp_attached(str
+@@ -1134,7 +1147,7 @@
  
  static inline int ata_is_host_link(const struct ata_link *link)
  {
@@ -1080551,7 +1080500,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  }
  #else /* CONFIG_SATA_PMP */
  static inline bool sata_pmp_supported(struct ata_port *ap)
-@@ -1167,7 +1180,7 @@ static inline int sata_srst_pmp(struct a
+@@ -1167,7 +1180,7 @@
        printk("%sata%u: "fmt, lv, (ap)->print_id , ##args)
  
  #define ata_link_printk(link, lv, fmt, args...) do { \
@@ -1080560,7 +1080509,7 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
                printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,   \
                       (link)->pmp , ##args); \
        else \
-@@ -1265,34 +1278,17 @@ static inline int ata_link_active(struct
+@@ -1265,34 +1278,17 @@
        return ata_tag_valid(link->active_tag) || link->sactive;
  }
  
@@ -1080570,7 +1080519,10 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
 -              return ap->pmp_link;
 -      return &ap->link;
 -}
--
++extern struct ata_link *__ata_port_next_link(struct ata_port *ap,
++                                           struct ata_link *link,
++                                           bool dev_only);
 -static inline struct ata_link *ata_port_next_link(struct ata_link *link)
 -{
 -      struct ata_port *ap = link->ap;
@@ -1080588,10 +1080540,6 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
 -
 -#define __ata_port_for_each_link(lk, ap) \
 -      for ((lk) = &(ap)->link; (lk); (lk) = ata_port_next_link(lk))
-+extern struct ata_link *__ata_port_next_link(struct ata_port *ap,
-+                                           struct ata_link *link,
-+                                           bool dev_only);
-+
 +#define __ata_port_for_each_link(link, ap) \
 +      for ((link) = __ata_port_next_link((ap), NULL, false); (link); \
 +           (link) = __ata_port_next_link((ap), (link), false))
@@ -1080604,10 +1080552,10 @@ diff -purN linux-2.6.27/include/linux/libata.h linux-2.6.27.19-5.1/include/linux
  
  #define ata_link_for_each_dev(dev, link) \
        for ((dev) = (link)->device; \
-diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.h
---- linux-2.6.27/include/linux/mm.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mm.h     2009-03-25 16:11:48.000000000 +0000
-@@ -113,6 +113,9 @@ extern unsigned int kobjsize(const void 
+diff -r 9608d5473017 include/linux/mm.h
+--- a/include/linux/mm.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mm.h       Wed May 06 16:56:57 2009 +0100
+@@ -113,6 +113,9 @@
  #define VM_CAN_NONLINEAR 0x08000000   /* Has ->fault & does nonlinear pages */
  #define VM_MIXEDMAP   0x10000000      /* Can contain "struct page" and pure PFN pages */
  #define VM_SAO                0x20000000      /* Strong Access Ordering (powerpc) */
@@ -1080617,7 +1080565,7 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
  
  #ifndef VM_STACK_DEFAULT_FLAGS                /* arch can override this */
  #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
-@@ -171,6 +174,9 @@ struct vm_operations_struct {
+@@ -171,6 +174,9 @@
        void (*close)(struct vm_area_struct * area);
        int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
  
@@ -1080627,7 +1080575,7 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
        /* notification that a previously read-only page is about to become
         * writable, if an error is returned it will cause a SIGBUS */
        int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
-@@ -180,6 +186,13 @@ struct vm_operations_struct {
+@@ -180,6 +186,13 @@
         */
        int (*access)(struct vm_area_struct *vma, unsigned long addr,
                      void *buf, int len, int write);
@@ -1080641,7 +1080589,7 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
  #ifdef CONFIG_NUMA
        /*
         * set_policy() op must add a reference to any non-NULL @new mempolicy
-@@ -253,7 +266,6 @@ static inline int put_page_testzero(stru
+@@ -253,7 +266,6 @@
   */
  static inline int get_page_unless_zero(struct page *page)
  {
@@ -1080649,7 +1080597,7 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
        return atomic_inc_not_zero(&page->_count);
  }
  
-@@ -643,6 +655,17 @@ static inline struct address_space *page
+@@ -643,6 +655,17 @@
        return mapping;
  }
  
@@ -1080667,10 +1080615,13 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
  static inline int PageAnon(struct page *page)
  {
        return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
-@@ -659,6 +682,20 @@ static inline pgoff_t page_index(struct 
-       return page->index;
- }
+@@ -656,6 +679,20 @@
+ {
+       if (unlikely(PageSwapCache(page)))
+               return page_private(page);
++      return page->index;
++}
++
 +extern pgoff_t __page_file_index(struct page *page);
 +
 +/*
@@ -1080682,13 +1080633,10 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
 +      if (unlikely(PageSwapCache(page)))
 +              return __page_file_index(page);
 +
-+      return page->index;
-+}
-+
- /*
-  * The atomic page->_mapcount, like _count, starts from -1:
-  * so that transitions both from it and to it can be tracked,
-@@ -779,6 +816,8 @@ void free_pgd_range(struct mmu_gather *t
+       return page->index;
+ }
+@@ -779,6 +816,8 @@
                unsigned long end, unsigned long floor, unsigned long ceiling);
  int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
                        struct vm_area_struct *vma);
@@ -1080697,7 +1080645,7 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
  void unmap_mapping_range(struct address_space *mapping,
                loff_t const holebegin, loff_t const holelen, int even_cows);
  int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
-@@ -1169,6 +1208,7 @@ void page_cache_async_readahead(struct a
+@@ -1169,6 +1208,7 @@
  unsigned long max_sane_readahead(unsigned long nr);
  
  /* Do stack extension */
@@ -1080705,10 +1080653,10 @@ diff -purN linux-2.6.27/include/linux/mm.h linux-2.6.27.19-5.1/include/linux/mm.
  extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
  #ifdef CONFIG_IA64
  extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
-diff -purN linux-2.6.27/include/linux/mm_types.h linux-2.6.27.19-5.1/include/linux/mm_types.h
---- linux-2.6.27/include/linux/mm_types.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mm_types.h       2009-03-25 16:11:49.000000000 +0000
-@@ -74,6 +74,8 @@ struct page {
+diff -r 9608d5473017 include/linux/mm_types.h
+--- a/include/linux/mm_types.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mm_types.h Wed May 06 16:56:57 2009 +0100
+@@ -74,6 +74,8 @@
        union {
                pgoff_t index;          /* Our offset within mapping. */
                void *freelist;         /* SLUB: freelist req. slab lock */
@@ -1080717,10 +1080665,10 @@ diff -purN linux-2.6.27/include/linux/mm_types.h linux-2.6.27.19-5.1/include/lin
        };
        struct list_head lru;           /* Pageout list, eg. active_list
                                         * protected by zone->lru_lock !
-diff -purN linux-2.6.27/include/linux/mmzone.h linux-2.6.27.19-5.1/include/linux/mmzone.h
---- linux-2.6.27/include/linux/mmzone.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mmzone.h 2009-03-25 16:11:49.000000000 +0000
-@@ -206,7 +206,10 @@ enum zone_type {
+diff -r 9608d5473017 include/linux/mmzone.h
+--- a/include/linux/mmzone.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mmzone.h   Wed May 06 16:56:57 2009 +0100
+@@ -206,7 +206,10 @@
  
  struct zone {
        /* Fields commonly accessed by the page allocator */
@@ -1080732,7 +1080680,7 @@ diff -purN linux-2.6.27/include/linux/mmzone.h linux-2.6.27.19-5.1/include/linux
        /*
         * We don't know if the memory that we're going to allocate will be freeable
         * or/and it will be released eventually, so to avoid totally wasting several
-@@ -674,6 +677,7 @@ int sysctl_min_unmapped_ratio_sysctl_han
+@@ -674,6 +677,7 @@
                        struct file *, void __user *, size_t *, loff_t *);
  int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
                        struct file *, void __user *, size_t *, loff_t *);
@@ -1080740,9 +1080688,9 @@ diff -purN linux-2.6.27/include/linux/mmzone.h linux-2.6.27.19-5.1/include/linux
  
  extern int numa_zonelist_order_handler(struct ctl_table *, int,
                        struct file *, void __user *, size_t *, loff_t *);
-diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux/module.h
---- linux-2.6.27/include/linux/module.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/module.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/module.h
+--- a/include/linux/module.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/module.h   Wed May 06 16:56:57 2009 +0100
 @@ -16,6 +16,7 @@
  #include <linux/kobject.h>
  #include <linux/moduleparam.h>
@@ -1080751,7 +1080699,7 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
  #include <asm/local.h>
  
  #include <asm/module.h>
-@@ -332,6 +333,11 @@ struct module
+@@ -332,6 +333,11 @@
        unsigned int num_markers;
  #endif
  
@@ -1080763,7 +1080711,7 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
  #ifdef CONFIG_MODULE_UNLOAD
        /* What modules depend on me? */
        struct list_head modules_which_use_me;
-@@ -343,9 +349,8 @@ struct module
+@@ -343,9 +349,8 @@
        void (*exit)(void);
  
        /* Reference counts */
@@ -1080774,7 +1080722,7 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
  };
  #ifndef MODULE_ARCH_INIT
  #define MODULE_ARCH_INIT {}
-@@ -363,6 +368,7 @@ static inline int module_is_live(struct 
+@@ -363,6 +368,7 @@
  struct module *module_text_address(unsigned long addr);
  struct module *__module_text_address(unsigned long addr);
  int is_module_address(unsigned long addr);
@@ -1080782,7 +1080730,7 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
  
  /* Returns 0 and fills in value, defined and namebuf, or -ERANGE if
     symnum out of range. */
-@@ -387,7 +393,6 @@ void symbol_put_addr(void *addr);
+@@ -387,7 +393,6 @@
  static inline void __module_get(struct module *module)
  {
        if (module) {
@@ -1080790,17 +1080738,17 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
                local_inc(&module->ref[get_cpu()].count);
                put_cpu();
        }
-@@ -454,6 +459,9 @@ extern void print_modules(void);
+@@ -453,6 +458,9 @@
+ extern void print_modules(void);
  
  extern void module_update_markers(void);
++
 +extern void module_update_tracepoints(void);
 +extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
-+
  #else /* !CONFIG_MODULES... */
  #define EXPORT_SYMBOL(sym)
- #define EXPORT_SYMBOL_GPL(sym)
-@@ -558,6 +566,15 @@ static inline void module_update_markers
+@@ -558,6 +566,15 @@
  {
  }
  
@@ -1080816,10 +1080764,10 @@ diff -purN linux-2.6.27/include/linux/module.h linux-2.6.27.19-5.1/include/linux
  #endif /* CONFIG_MODULES */
  
  struct device_driver;
-diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/mount.h
---- linux-2.6.27/include/linux/mount.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mount.h  2009-03-25 16:11:48.000000000 +0000
-@@ -32,6 +32,7 @@ struct mnt_namespace;
+diff -r 9608d5473017 include/linux/mount.h
+--- a/include/linux/mount.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mount.h    Wed May 06 16:56:57 2009 +0100
+@@ -32,6 +32,7 @@
  
  #define MNT_SHRINKABLE        0x100
  #define MNT_IMBALANCED_WRITE_COUNT    0x200 /* just for debugging */
@@ -1080827,7 +1080775,7 @@ diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/
  
  #define MNT_SHARED    0x1000  /* if the vfsmount is a shared mount */
  #define MNT_UNBINDABLE        0x2000  /* if the vfsmount is a unbindable mount */
-@@ -66,13 +67,30 @@ struct vfsmount {
+@@ -66,12 +67,29 @@
        int mnt_expiry_mark;            /* true if marked for expiry */
        int mnt_pinned;
        int mnt_ghosts;
@@ -1080845,7 +1080793,7 @@ diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/
 +#endif
 +#endif
  };
++
 +static inline int *get_mnt_writers_ptr(struct vfsmount *mnt)
 +{
 +#ifdef CONFIG_SMP
@@ -1080854,11 +1080802,10 @@ diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/
 +      return &mnt->mnt_writers;
 +#endif
 +}
-+
  static inline struct vfsmount *mntget(struct vfsmount *mnt)
  {
-       if (mnt)
-@@ -81,6 +99,8 @@ static inline struct vfsmount *mntget(st
+@@ -81,6 +99,8 @@
  }
  
  extern int mnt_want_write(struct vfsmount *mnt);
@@ -1080867,17 +1080814,17 @@ diff -purN linux-2.6.27/include/linux/mount.h linux-2.6.27.19-5.1/include/linux/
  extern void mnt_drop_write(struct vfsmount *mnt);
  extern void mntput_no_expire(struct vfsmount *mnt);
  extern void mnt_pin(struct vfsmount *mnt);
-@@ -114,4 +134,6 @@ extern void mark_mounts_for_expiry(struc
+@@ -114,4 +134,6 @@
  extern spinlock_t vfsmount_lock;
  extern dev_t name_to_dev_t(char *name);
  
 +extern char *d_namespace_path(struct dentry *, struct vfsmount *, char *, int);
 +
  #endif /* _LINUX_MOUNT_H */
-diff -purN linux-2.6.27/include/linux/msg.h linux-2.6.27.19-5.1/include/linux/msg.h
---- linux-2.6.27/include/linux/msg.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/msg.h    2009-03-25 16:11:49.000000000 +0000
-@@ -60,8 +60,8 @@ struct msginfo {
+diff -r 9608d5473017 include/linux/msg.h
+--- a/include/linux/msg.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/msg.h      Wed May 06 16:56:57 2009 +0100
+@@ -60,8 +60,8 @@
  #define MSG_MEM_SCALE 32
  
  #define MSGMNI    16   /* <= IPCMNI */     /* max # of msg queue identifiers */
@@ -1080888,10 +1080835,10 @@ diff -purN linux-2.6.27/include/linux/msg.h linux-2.6.27.19-5.1/include/linux/ms
  
  /* unused */
  #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
-diff -purN linux-2.6.27/include/linux/mtd/blktrans.h linux-2.6.27.19-5.1/include/linux/mtd/blktrans.h
---- linux-2.6.27/include/linux/mtd/blktrans.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mtd/blktrans.h   2009-03-25 16:11:49.000000000 +0000
-@@ -41,6 +41,8 @@ struct mtd_blktrans_ops {
+diff -r 9608d5473017 include/linux/mtd/blktrans.h
+--- a/include/linux/mtd/blktrans.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mtd/blktrans.h     Wed May 06 16:56:57 2009 +0100
+@@ -41,6 +41,8 @@
                    unsigned long block, char *buffer);
        int (*writesect)(struct mtd_blktrans_dev *dev,
                     unsigned long block, char *buffer);
@@ -1080900,10 +1080847,10 @@ diff -purN linux-2.6.27/include/linux/mtd/blktrans.h linux-2.6.27.19-5.1/include
  
        /* Block layer ioctls */
        int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
-diff -purN linux-2.6.27/include/linux/mtd/cfi.h linux-2.6.27.19-5.1/include/linux/mtd/cfi.h
---- linux-2.6.27/include/linux/mtd/cfi.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/mtd/cfi.h        2009-03-25 16:11:49.000000000 +0000
-@@ -281,9 +281,25 @@ struct cfi_private {
+diff -r 9608d5473017 include/linux/mtd/cfi.h
+--- a/include/linux/mtd/cfi.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/mtd/cfi.h  Wed May 06 16:56:57 2009 +0100
+@@ -281,9 +281,25 @@
  /*
   * Returns the command address according to the given geometry.
   */
@@ -1080931,7 +1080878,7 @@ diff -purN linux-2.6.27/include/linux/mtd/cfi.h linux-2.6.27.19-5.1/include/linu
  }
  
  /*
-@@ -429,7 +445,7 @@ static inline uint32_t cfi_send_gen_cmd(
+@@ -429,7 +445,7 @@
                                int type, map_word *prev_val)
  {
        map_word val;
@@ -1080940,9 +1080887,9 @@ diff -purN linux-2.6.27/include/linux/mtd/cfi.h linux-2.6.27.19-5.1/include/linu
  
        val = cfi_build_cmd(cmd, map, cfi);
  
-diff -purN linux-2.6.27/include/linux/netdevice.h linux-2.6.27.19-5.1/include/linux/netdevice.h
---- linux-2.6.27/include/linux/netdevice.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/netdevice.h      2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/netdevice.h
+--- a/include/linux/netdevice.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/netdevice.h        Wed May 06 16:56:57 2009 +0100
 @@ -42,6 +42,9 @@
  #include <linux/workqueue.h>
  
@@ -1080953,7 +1080900,7 @@ diff -purN linux-2.6.27/include/linux/netdevice.h linux-2.6.27.19-5.1/include/li
  
  struct vlan_group;
  struct ethtool_ops;
-@@ -749,6 +752,11 @@ struct net_device
+@@ -749,6 +752,11 @@
        /* for setting kernel sock attribute on TCP connection setup */
  #define GSO_MAX_SIZE          65536
        unsigned int            gso_max_size;
@@ -1080965,9 +1080912,9 @@ diff -purN linux-2.6.27/include/linux/netdevice.h linux-2.6.27.19-5.1/include/li
  };
  #define to_net_dev(d) container_of(d, struct net_device, dev)
  
-diff -purN linux-2.6.27/include/linux/netfilter_ipv4/ipt_ipv4options.h linux-2.6.27.19-5.1/include/linux/netfilter_ipv4/ipt_ipv4options.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/netfilter_ipv4/ipt_ipv4options.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/netfilter_ipv4/ipt_ipv4options.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/netfilter_ipv4/ipt_ipv4options.h   Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,21 @@
 +#ifndef __ipt_ipv4options_h_included__
 +#define __ipt_ipv4options_h_included__
@@ -1080990,9 +1080937,9 @@ diff -purN linux-2.6.27/include/linux/netfilter_ipv4/ipt_ipv4options.h linux-2.6
 +
 +
 +#endif /* __ipt_ipv4options_h_included__ */
-diff -purN linux-2.6.27/include/linux/nfs4acl.h linux-2.6.27.19-5.1/include/linux/nfs4acl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs4acl.h        2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/nfs4acl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/nfs4acl.h  Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,225 @@
 +#ifndef __NFS4ACL_H
 +#define __NFS4ACL_H
@@ -1081219,9 +1081166,9 @@ diff -purN linux-2.6.27/include/linux/nfs4acl.h linux-2.6.27.19-5.1/include/linu
 +extern int nfs4acl_write_through(struct nfs4acl **acl);
 +
 +#endif /* __NFS4ACL_H */
-diff -purN linux-2.6.27/include/linux/nfs4acl_xattr.h linux-2.6.27.19-5.1/include/linux/nfs4acl_xattr.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs4acl_xattr.h  2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/nfs4acl_xattr.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/nfs4acl_xattr.h    Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,32 @@
 +#ifndef __NFS4ACL_XATTR_H
 +#define __NFS4ACL_XATTR_H
@@ -1081255,10 +1081202,10 @@ diff -purN linux-2.6.27/include/linux/nfs4acl_xattr.h linux-2.6.27.19-5.1/includ
 +extern void nfs4acl_to_xattr(const struct nfs4acl *, void *);
 +
 +#endif /* __NFS4ACL_XATTR_H */
-diff -purN linux-2.6.27/include/linux/nfs_fs.h linux-2.6.27.19-5.1/include/linux/nfs_fs.h
---- linux-2.6.27/include/linux/nfs_fs.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfs_fs.h 2009-03-25 16:11:50.000000000 +0000
-@@ -372,8 +372,11 @@ static inline struct nfs_open_context *n
+diff -r 9608d5473017 include/linux/nfs_fs.h
+--- a/include/linux/nfs_fs.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/nfs_fs.h   Wed May 06 16:56:57 2009 +0100
+@@ -372,8 +372,11 @@
  
  static inline struct rpc_cred *nfs_file_cred(struct file *file)
  {
@@ -1081272,7 +1081219,7 @@ diff -purN linux-2.6.27/include/linux/nfs_fs.h linux-2.6.27.19-5.1/include/linux
        return NULL;
  }
  
-@@ -462,6 +465,8 @@ extern int  nfs_flush_incompatible(struc
+@@ -462,6 +465,8 @@
  extern int  nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
  extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
  extern void nfs_writedata_release(void *);
@@ -1081281,10 +1081228,10 @@ diff -purN linux-2.6.27/include/linux/nfs_fs.h linux-2.6.27.19-5.1/include/linux
  
  /*
   * Try to write back everything synchronously (but check the
-diff -purN linux-2.6.27/include/linux/nfsd/nfsd.h linux-2.6.27.19-5.1/include/linux/nfsd/nfsd.h
---- linux-2.6.27/include/linux/nfsd/nfsd.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/nfsd/nfsd.h      2009-03-25 16:11:50.000000000 +0000
-@@ -85,7 +85,8 @@ __be32               nfsd_setattr(struct svc_rqst *, 
+diff -r 9608d5473017 include/linux/nfsd/nfsd.h
+--- a/include/linux/nfsd/nfsd.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/nfsd/nfsd.h        Wed May 06 16:56:57 2009 +0100
+@@ -85,7 +85,8 @@
  #ifdef CONFIG_NFSD_V4
  __be32          nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
                      struct nfs4_acl *);
@@ -1081294,9 +1081241,9 @@ diff -purN linux-2.6.27/include/linux/nfsd/nfsd.h linux-2.6.27.19-5.1/include/li
  #endif /* CONFIG_NFSD_V4 */
  __be32                nfsd_create(struct svc_rqst *, struct svc_fh *,
                                char *name, int len, struct iattr *attrs,
-diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/linux/oprofile.h
---- linux-2.6.27/include/linux/oprofile.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/oprofile.h       2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/oprofile.h
+--- a/include/linux/oprofile.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/oprofile.h Wed May 06 16:56:57 2009 +0100
 @@ -16,6 +16,9 @@
  #include <linux/types.h>
  #include <linux/spinlock.h>
@@ -1081324,7 +1081271,7 @@ diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/lin
  
  struct super_block;
  struct dentry;
-@@ -47,6 +51,12 @@ struct oprofile_operations {
+@@ -47,6 +51,12 @@
        /* create any necessary configuration files in the oprofile fs.
         * Optional. */
        int (*create_files)(struct super_block * sb, struct dentry * root);
@@ -1081337,7 +1081284,7 @@ diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/lin
        /* Do any necessary interrupt setup. Optional. */
        int (*setup)(void);
        /* Do any necessary interrupt shutdown. Optional. */
-@@ -84,13 +94,6 @@ int oprofile_arch_init(struct oprofile_o
+@@ -84,13 +94,6 @@
  void oprofile_arch_exit(void);
  
  /**
@@ -1081351,7 +1081298,7 @@ diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/lin
   * Add a sample. This may be called from any context. Pass
   * smp_processor_id() as cpu.
   */
-@@ -113,6 +116,8 @@ void oprofile_add_pc(unsigned long pc, i
+@@ -113,6 +116,8 @@
  /* add a backtrace entry, to be called from the ->backtrace callback */
  void oprofile_add_trace(unsigned long eip);
  
@@ -1081360,7 +1081307,7 @@ diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/lin
  
  /**
   * Create a file of the given name as a child of the given root, with
-@@ -160,5 +165,14 @@ int oprofilefs_ulong_from_user(unsigned 
+@@ -160,5 +165,14 @@
  
  /** lock for read/write safety */
  extern spinlock_t oprofilefs_lock;
@@ -1081375,9 +1081322,9 @@ diff -purN linux-2.6.27/include/linux/oprofile.h linux-2.6.27.19-5.1/include/lin
 +void oprofile_cpu_buffer_inc_smpl_lost(void);
   
  #endif /* OPROFILE_H */
-diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/linux/page-flags.h
---- linux-2.6.27/include/linux/page-flags.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/page-flags.h     2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/page-flags.h
+--- a/include/linux/page-flags.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/page-flags.h       Wed May 06 16:56:57 2009 +0100
 @@ -71,6 +71,7 @@
   */
  enum pageflags {
@@ -1081386,7 +1081333,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
        PG_error,
        PG_referenced,
        PG_uptodate,
-@@ -84,6 +85,7 @@ enum pageflags {
+@@ -84,6 +85,7 @@
        PG_private,             /* If pagecache, has fs-private data */
        PG_writeback,           /* Page is under writeback */
  #ifdef CONFIG_PAGEFLAGS_EXTENDED
@@ -1081394,7 +1081341,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
        PG_head,                /* A head page */
        PG_tail,                /* A tail page */
  #else
-@@ -96,14 +98,23 @@ enum pageflags {
+@@ -96,14 +98,23 @@
  #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
        PG_uncached,            /* Page has been mapped as uncached */
  #endif
@@ -1081418,7 +1081365,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
  
        /* SLOB */
        PG_slob_page = PG_active,
-@@ -147,15 +158,21 @@ static inline int TestSetPage##uname(str
+@@ -147,15 +158,21 @@
  static inline int TestClearPage##uname(struct page *page)             \
                { return test_and_clear_bit(PG_##lname, &page->flags); }
  
@@ -1081441,7 +1081388,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
                        { return 0; }
  
  #define TESTSCFLAG(uname, lname)                                      \
-@@ -164,6 +181,7 @@ static inline int Page##uname(struct pag
+@@ -164,6 +181,7 @@
  struct page;  /* forward declaration */
  
  TESTPAGEFLAG(Locked, locked)
@@ -1081449,7 +1081396,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
  PAGEFLAG(Error, error)
  PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced)
  PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty)
-@@ -171,8 +189,12 @@ PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, 
+@@ -171,8 +189,12 @@
  PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
  __PAGEFLAG(Slab, slab)
  PAGEFLAG(Checked, checked)            /* Used by some filesystems */
@@ -1081462,7 +1081409,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
  PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
  PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
        __SETPAGEFLAG(Private, private)
-@@ -262,6 +284,26 @@ static inline void SetPageUptodate(struc
+@@ -262,6 +284,26 @@
  
  CLEARPAGEFLAG(Uptodate, uptodate)
  
@@ -1081489,7 +1081436,7 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
  extern void cancel_dirty_page(struct page *page, unsigned int account_size);
  
  int test_clear_page_writeback(struct page *page);
-@@ -326,9 +368,24 @@ static inline void __ClearPageTail(struc
+@@ -326,9 +368,24 @@
  
  #endif /* !PAGEFLAGS_EXTENDED */
  
@@ -1081516,10 +1081463,10 @@ diff -purN linux-2.6.27/include/linux/page-flags.h linux-2.6.27.19-5.1/include/l
  
  /*
   * Flags checked in bad_page().  Pages on the free list should not have
-diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linux/pagemap.h
---- linux-2.6.27/include/linux/pagemap.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pagemap.h        2009-03-25 16:11:49.000000000 +0000
-@@ -161,7 +161,7 @@ static inline int page_cache_add_specula
+diff -r 9608d5473017 include/linux/pagemap.h
+--- a/include/linux/pagemap.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pagemap.h  Wed May 06 16:56:57 2009 +0100
+@@ -161,7 +161,7 @@
        if (unlikely(!atomic_add_unless(&page->_count, count, 0)))
                return 0;
  #endif
@@ -1081528,7 +1081475,7 @@ diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linu
  
        return 1;
  }
-@@ -213,7 +213,8 @@ unsigned find_get_pages_contig(struct ad
+@@ -213,7 +213,8 @@
  unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
                        int tag, unsigned int nr_pages, struct page **pages);
  
@@ -1081538,19 +1081485,19 @@ diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linu
  
  /*
   * Returns locked page at given index in given cache, creating it if needed.
-@@ -258,6 +259,11 @@ static inline loff_t page_offset(struct 
+@@ -256,6 +257,11 @@
+ static inline loff_t page_offset(struct page *page)
+ {
        return ((loff_t)page->index) << PAGE_CACHE_SHIFT;
- }
++}
++
 +static inline loff_t page_file_offset(struct page *page)
 +{
 +      return ((loff_t)page_file_index(page)) << PAGE_CACHE_SHIFT;
-+}
-+
+ }
  static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
-                                       unsigned long address)
- {
-@@ -325,6 +331,7 @@ static inline void lock_page_nosync(stru
+@@ -325,6 +331,7 @@
   * Never use this directly!
   */
  extern void wait_on_page_bit(struct page *page, int bit_nr);
@@ -1081558,7 +1081505,7 @@ diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linu
  
  /* 
   * Wait for a page to be unlocked.
-@@ -335,8 +342,9 @@ extern void wait_on_page_bit(struct page
+@@ -335,8 +342,9 @@
   */
  static inline void wait_on_page_locked(struct page *page)
  {
@@ -1081569,7 +1081516,7 @@ diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linu
  }
  
  /* 
-@@ -344,6 +352,7 @@ static inline void wait_on_page_locked(s
+@@ -344,6 +352,7 @@
   */
  static inline void wait_on_page_writeback(struct page *page)
  {
@@ -1081577,10 +1081524,10 @@ diff -purN linux-2.6.27/include/linux/pagemap.h linux-2.6.27.19-5.1/include/linu
        if (PageWriteback(page))
                wait_on_page_bit(page, PG_writeback);
  }
-diff -purN linux-2.6.27/include/linux/parser.h linux-2.6.27.19-5.1/include/linux/parser.h
---- linux-2.6.27/include/linux/parser.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/parser.h 2009-03-25 16:11:48.000000000 +0000
-@@ -26,6 +26,7 @@ typedef struct {
+diff -r 9608d5473017 include/linux/parser.h
+--- a/include/linux/parser.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/parser.h   Wed May 06 16:56:57 2009 +0100
+@@ -26,6 +26,7 @@
  } substring_t;
  
  int match_token(char *, match_table_t table, substring_t args[]);
@@ -1081588,18 +1081535,18 @@ diff -purN linux-2.6.27/include/linux/parser.h linux-2.6.27.19-5.1/include/linux
  int match_int(substring_t *, int *result);
  int match_octal(substring_t *, int *result);
  int match_hex(substring_t *, int *result);
-diff -purN linux-2.6.27/include/linux/pci-acpi.h linux-2.6.27.19-5.1/include/linux/pci-acpi.h
---- linux-2.6.27/include/linux/pci-acpi.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci-acpi.h       2009-03-25 16:11:49.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 include/linux/pci-acpi.h
+--- a/include/linux/pci-acpi.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci-acpi.h Wed May 06 16:56:57 2009 +0100
+@@ -7,6 +7,8 @@
  #ifndef _PCI_ACPI_H_
  #define _PCI_ACPI_H_
-+#include <linux/acpi.h>
 +
++#include <linux/acpi.h>
  #define OSC_QUERY_TYPE                        0
  #define OSC_SUPPORT_TYPE              1
- #define OSC_CONTROL_TYPE              2
 @@ -48,15 +50,7 @@
  
  #ifdef CONFIG_ACPI
@@ -1081617,7 +1081564,7 @@ diff -purN linux-2.6.27/include/linux/pci-acpi.h linux-2.6.27.19-5.1/include/lin
  static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
  {
        /* Find root host bridge */
-@@ -73,8 +67,6 @@ typedef u32          acpi_status;
+@@ -73,8 +67,6 @@
  #endif    
  static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
  {return AE_ERROR;}
@@ -1081626,10 +1081573,10 @@ diff -purN linux-2.6.27/include/linux/pci-acpi.h linux-2.6.27.19-5.1/include/lin
  static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
  { return NULL; }
  #endif
-diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pci.h
---- linux-2.6.27/include/linux/pci.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci.h    2009-03-25 16:11:49.000000000 +0000
-@@ -64,6 +64,11 @@ struct pci_slot {
+diff -r 9608d5473017 include/linux/pci.h
+--- a/include/linux/pci.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci.h      Wed May 06 16:56:57 2009 +0100
+@@ -64,6 +64,11 @@
        struct kobject kobj;
  };
  
@@ -1081641,19 +1081588,19 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
  /* File state for mmap()s on /proc/bus/pci/X/Y */
  enum pci_mmap_state {
        pci_mmap_io,
-@@ -128,6 +133,11 @@ enum pci_dev_flags {
+@@ -126,6 +131,11 @@
+       PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
+       /* Device configuration is irrevocably lost if disabled into D3 */
        PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
- };
++};
++
 +enum pci_irq_reroute_variant {
 +      INTEL_IRQ_REROUTE_VARIANT = 1,
 +      MAX_IRQ_REROUTE_VARIANTS = 3
-+};
-+
+ };
  typedef unsigned short __bitwise pci_bus_flags_t;
- enum pci_bus_flags {
-       PCI_BUS_FLAGS_NO_MSI   = (__force pci_bus_flags_t) 1,
-@@ -201,6 +211,9 @@ struct pci_dev {
+@@ -201,6 +211,9 @@
         * directly, use the values stored here. They might be different!
         */
        unsigned int    irq;
@@ -1081663,7 +1081610,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
        struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
  
        /* These fields are used by common fixups */
-@@ -212,6 +225,7 @@ struct pci_dev {
+@@ -212,6 +225,7 @@
        unsigned int    no_msi:1;       /* device may not use msi */
        unsigned int    block_ucfg_access:1;    /* userspace config space access is blocked */
        unsigned int    broken_parity_status:1; /* Device generates false positive parity */
@@ -1081671,7 +1081618,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
        unsigned int    msi_enabled:1;
        unsigned int    msix_enabled:1;
        unsigned int    is_managed:1;
-@@ -225,7 +239,7 @@ struct pci_dev {
+@@ -225,7 +239,7 @@
        int rom_attr_enabled;           /* has display of the rom attribute been enabled? */
        struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
        struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
@@ -1081680,7 +1081627,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
        struct list_head msi_list;
  #endif
        struct pci_vpd *vpd;
-@@ -509,7 +523,8 @@ struct pci_bus *pci_create_bus(struct de
+@@ -509,7 +523,8 @@
  struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
                                int busnr);
  struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
@@ -1081690,7 +1081637,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
  void pci_destroy_slot(struct pci_slot *slot);
  void pci_update_slot_number(struct pci_slot *slot, int slot_nr);
  int pci_scan_slot(struct pci_bus *bus, int devfn);
-@@ -629,11 +644,14 @@ int pcie_set_readrq(struct pci_dev *dev,
+@@ -629,11 +644,14 @@
  void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
  int __must_check pci_assign_resource(struct pci_dev *dev, int i);
  int pci_select_bars(struct pci_dev *dev, unsigned long flags);
@@ -1081706,7 +1081653,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
  
  /* Power management related routines */
  int pci_save_state(struct pci_dev *dev);
-@@ -755,6 +773,16 @@ static inline void msi_remove_pci_irq_ve
+@@ -755,6 +773,16 @@
  
  static inline void pci_restore_msi_state(struct pci_dev *dev)
  { }
@@ -1081723,7 +1081670,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
  #else
  extern int pci_enable_msi(struct pci_dev *dev);
  extern void pci_msi_shutdown(struct pci_dev *dev);
-@@ -765,6 +793,21 @@ extern void pci_msix_shutdown(struct pci
+@@ -765,6 +793,21 @@
  extern void pci_disable_msix(struct pci_dev *dev);
  extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
  extern void pci_restore_msi_state(struct pci_dev *dev);
@@ -1081745,7 +1081692,7 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
  #endif
  
  #ifdef CONFIG_HT_IRQ
-@@ -1116,5 +1159,7 @@ static inline void pci_mmcfg_early_init(
+@@ -1116,5 +1159,7 @@
  static inline void pci_mmcfg_late_init(void) { }
  #endif
  
@@ -1081753,10 +1081700,10 @@ diff -purN linux-2.6.27/include/linux/pci.h linux-2.6.27.19-5.1/include/linux/pc
 +
  #endif /* __KERNEL__ */
  #endif /* LINUX_PCI_H */
-diff -purN linux-2.6.27/include/linux/pci_hotplug.h linux-2.6.27.19-5.1/include/linux/pci_hotplug.h
---- linux-2.6.27/include/linux/pci_hotplug.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci_hotplug.h    2009-03-25 16:11:49.000000000 +0000
-@@ -142,8 +142,6 @@ struct hotplug_slot_info {
+diff -r 9608d5473017 include/linux/pci_hotplug.h
+--- a/include/linux/pci_hotplug.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci_hotplug.h      Wed May 06 16:56:57 2009 +0100
+@@ -142,8 +142,6 @@
  
  /**
   * struct hotplug_slot - used to register a physical slot with the hotplug pci core
@@ -1081765,7 +1081712,7 @@ diff -purN linux-2.6.27/include/linux/pci_hotplug.h linux-2.6.27.19-5.1/include/
   * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot
   * @info: pointer to the &struct hotplug_slot_info for the initial values for
   * this slot.
-@@ -153,7 +151,6 @@ struct hotplug_slot_info {
+@@ -153,7 +151,6 @@
   * needs.
   */
  struct hotplug_slot {
@@ -1081773,7 +1081720,7 @@ diff -purN linux-2.6.27/include/linux/pci_hotplug.h linux-2.6.27.19-5.1/include/
        struct hotplug_slot_ops         *ops;
        struct hotplug_slot_info        *info;
        void (*release) (struct hotplug_slot *slot);
-@@ -165,7 +162,13 @@ struct hotplug_slot {
+@@ -165,7 +162,13 @@
  };
  #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj)
  
@@ -1081788,9 +1081735,9 @@ diff -purN linux-2.6.27/include/linux/pci_hotplug.h linux-2.6.27.19-5.1/include/
  extern int pci_hp_deregister(struct hotplug_slot *slot);
  extern int __must_check pci_hp_change_slot_info       (struct hotplug_slot *slot,
                                                 struct hotplug_slot_info *info);
-diff -purN linux-2.6.27/include/linux/pci_ids.h linux-2.6.27.19-5.1/include/linux/pci_ids.h
---- linux-2.6.27/include/linux/pci_ids.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pci_ids.h        2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/pci_ids.h
+--- a/include/linux/pci_ids.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pci_ids.h  Wed May 06 16:56:57 2009 +0100
 @@ -1301,6 +1301,7 @@
  #define PCI_DEVICE_ID_VIA_VT3351      0x0351
  #define PCI_DEVICE_ID_VIA_VT3364      0x0364
@@ -1081893,10 +1081840,10 @@ diff -purN linux-2.6.27/include/linux/pci_ids.h linux-2.6.27.19-5.1/include/linu
  #define PCI_DEVICE_ID_INTEL_IOAT_SNB  0x402f
  #define PCI_DEVICE_ID_INTEL_5100_16   0x65f0
  #define PCI_DEVICE_ID_INTEL_5100_21   0x65f5
-diff -purN linux-2.6.27/include/linux/percpu_counter.h linux-2.6.27.19-5.1/include/linux/percpu_counter.h
---- linux-2.6.27/include/linux/percpu_counter.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/percpu_counter.h 2009-03-25 16:11:48.000000000 +0000
-@@ -35,7 +35,7 @@ int percpu_counter_init_irq(struct percp
+diff -r 9608d5473017 include/linux/percpu_counter.h
+--- a/include/linux/percpu_counter.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/percpu_counter.h   Wed May 06 16:56:57 2009 +0100
+@@ -35,7 +35,7 @@
  void percpu_counter_destroy(struct percpu_counter *fbc);
  void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
  void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
@@ -1081905,7 +1081852,7 @@ diff -purN linux-2.6.27/include/linux/percpu_counter.h linux-2.6.27.19-5.1/inclu
  
  static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
  {
-@@ -44,19 +44,13 @@ static inline void percpu_counter_add(st
+@@ -44,19 +44,13 @@
  
  static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
  {
@@ -1081927,9 +1081874,9 @@ diff -purN linux-2.6.27/include/linux/percpu_counter.h linux-2.6.27.19-5.1/inclu
  }
  
  static inline s64 percpu_counter_read(struct percpu_counter *fbc)
-diff -purN linux-2.6.27/include/linux/perfmon.h linux-2.6.27.19-5.1/include/linux/perfmon.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon.h        2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon.h  Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,213 @@
 +/*
 + * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
@@ -1082144,9 +1082091,9 @@ diff -purN linux-2.6.27/include/linux/perfmon.h linux-2.6.27.19-5.1/include/linu
 +#define PFM_VERSION_MINOR(x)   ((x) & 0xffff)
 +
 +#endif /* __LINUX_PERFMON_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_dfl_smpl.h linux-2.6.27.19-5.1/include/linux/perfmon_dfl_smpl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_dfl_smpl.h       2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_dfl_smpl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_dfl_smpl.h Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,78 @@
 +/*
 + * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
@@ -1082226,9 +1082173,9 @@ diff -purN linux-2.6.27/include/linux/perfmon_dfl_smpl.h linux-2.6.27.19-5.1/inc
 +                              (PFM_DFL_SMPL_VERSION_MIN & 0xffff))
 +
 +#endif /* __PERFMON_DFL_SMPL_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_fmt.h linux-2.6.27.19-5.1/include/linux/perfmon_fmt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_fmt.h    2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_fmt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_fmt.h      Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,74 @@
 +/*
 + * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
@@ -1082304,9 +1082251,9 @@ diff -purN linux-2.6.27/include/linux/perfmon_fmt.h linux-2.6.27.19-5.1/include/
 +void pfm_sysfs_remove_fmt(struct pfm_smpl_fmt *fmt);
 +
 +#endif /* __PERFMON_FMT_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_kern.h linux-2.6.27.19-5.1/include/linux/perfmon_kern.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_kern.h   2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_kern.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_kern.h     Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,551 @@
 +/*
 + * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
@@ -1082859,9 +1082806,9 @@ diff -purN linux-2.6.27/include/linux/perfmon_kern.h linux-2.6.27.19-5.1/include
 +#endif /* CONFIG_PERFMON */
 +
 +#endif /* __LINUX_PERFMON_KERN_H__ */
-diff -purN linux-2.6.27/include/linux/perfmon_pmu.h linux-2.6.27.19-5.1/include/linux/perfmon_pmu.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/perfmon_pmu.h    2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/perfmon_pmu.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/perfmon_pmu.h      Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,192 @@
 +/*
 + * Copyright (c) 2006 Hewlett-Packard Development Company, L.P.
@@ -1083055,10 +1083002,10 @@ diff -purN linux-2.6.27/include/linux/perfmon_pmu.h linux-2.6.27.19-5.1/include/
 +int pfm_sysfs_add_pmu(struct pfm_pmu_config *pmu);
 +
 +#endif /* __PERFMON_PMU_H__ */
-diff -purN linux-2.6.27/include/linux/pid.h linux-2.6.27.19-5.1/include/linux/pid.h
---- linux-2.6.27/include/linux/pid.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pid.h    2009-03-25 16:11:48.000000000 +0000
-@@ -123,6 +123,24 @@ extern struct pid *alloc_pid(struct pid_
+diff -r 9608d5473017 include/linux/pid.h
+--- a/include/linux/pid.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pid.h      Wed May 06 16:56:57 2009 +0100
+@@ -123,6 +123,24 @@
  extern void free_pid(struct pid *pid);
  
  /*
@@ -1083083,27 +1083030,27 @@ diff -purN linux-2.6.27/include/linux/pid.h linux-2.6.27.19-5.1/include/linux/pi
   * the helpers to get the pid's id seen from different namespaces
   *
   * pid_nr()    : global id, i.e. the id seen from the init namespace;
-diff -purN linux-2.6.27/include/linux/pkt_sched.h linux-2.6.27.19-5.1/include/linux/pkt_sched.h
---- linux-2.6.27/include/linux/pkt_sched.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pkt_sched.h      2009-03-25 16:11:49.000000000 +0000
-@@ -123,6 +123,13 @@ struct tc_prio_qopt
+diff -r 9608d5473017 include/linux/pkt_sched.h
+--- a/include/linux/pkt_sched.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pkt_sched.h        Wed May 06 16:56:57 2009 +0100
+@@ -121,6 +121,13 @@
+ {
+       int     bands;                  /* Number of bands */
        __u8    priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
- };
++};
++
 +/* MULTIQ section */
 +
 +struct tc_multiq_qopt {
 +      __u16   bands;                  /* Number of bands */
 +      __u16   max_bands;              /* Maximum number of queues */
-+};
-+
- /* TBF section */
+ };
  
- struct tc_tbf_qopt
-diff -purN linux-2.6.27/include/linux/pnp.h linux-2.6.27.19-5.1/include/linux/pnp.h
---- linux-2.6.27/include/linux/pnp.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/pnp.h    2009-03-25 16:11:49.000000000 +0000
-@@ -22,9 +22,11 @@ struct pnp_dev;
+ /* TBF section */
+diff -r 9608d5473017 include/linux/pnp.h
+--- a/include/linux/pnp.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/pnp.h      Wed May 06 16:56:57 2009 +0100
+@@ -22,9 +22,11 @@
   * Resource Management
   */
  #ifdef CONFIG_PNP
@@ -1083117,29 +1083064,29 @@ diff -purN linux-2.6.27/include/linux/pnp.h linux-2.6.27.19-5.1/include/linux/pn
  {
        return NULL;
  }
-diff -purN linux-2.6.27/include/linux/ptrace.h linux-2.6.27.19-5.1/include/linux/ptrace.h
---- linux-2.6.27/include/linux/ptrace.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/ptrace.h 2009-03-25 16:11:49.000000000 +0000
-@@ -27,6 +27,10 @@
+diff -r 9608d5473017 include/linux/ptrace.h
+--- a/include/linux/ptrace.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/ptrace.h   Wed May 06 16:56:57 2009 +0100
+@@ -26,6 +26,10 @@
+ #define PTRACE_GETEVENTMSG    0x4201
  #define PTRACE_GETSIGINFO     0x4202
  #define PTRACE_SETSIGINFO     0x4203
++
 +/* PTRACE SELF requests                                       */
 +#define PTRACE_SELF_ON                0x4281
 +#define PTRACE_SELF_OFF               0x4282
-+
  /* options set using PTRACE_SETOPTIONS */
  #define PTRACE_O_TRACESYSGOOD 0x00000001
- #define PTRACE_O_TRACEFORK    0x00000002
 @@ -78,7 +82,21 @@
  
  #include <linux/compiler.h>           /* For unlikely.  */
  #include <linux/sched.h>              /* For struct task_struct.  */
 +#include <linux/unistd.h>             /* For syscall definitions  */
-+
 +#define PTS_INSTRUMENTED      0x00000001
 +#define PTS_SELF      0x00000002
++
 +static inline int is_self_ptracing(unsigned long syscall)
 +{
 +      if (!(current->instrumentation & PTS_SELF))
@@ -1083153,9 +1083100,9 @@ diff -purN linux-2.6.27/include/linux/ptrace.h linux-2.6.27.19-5.1/include/linux
  
  extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
  extern struct task_struct *ptrace_get_task_struct(pid_t pid);
-diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/quota.h
---- linux-2.6.27/include/linux/quota.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quota.h  2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/quota.h
+--- a/include/linux/quota.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quota.h    Wed May 06 16:56:57 2009 +0100
 @@ -41,15 +41,6 @@
  #define __DQUOT_VERSION__     "dquot_6.5.1"
  #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1
@@ -1083209,7 +1083156,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
  #define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)
  #define QIF_USAGE     (QIF_SPACE | QIF_INODES)
  #define QIF_TIMES     (QIF_BTIME | QIF_ITIME)
-@@ -174,7 +179,7 @@ enum {
+@@ -174,7 +179,7 @@
  #include <asm/atomic.h>
  
  typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
@@ -1083218,7 +1083165,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
  
  extern spinlock_t dq_data_lock;
  
-@@ -189,12 +194,12 @@ extern spinlock_t dq_data_lock;
+@@ -189,12 +194,12 @@
   * Data for one user/group kept in memory
   */
  struct mem_dqblk {
@@ -1083236,7 +1083183,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
        time_t dqb_btime;       /* time limit for excessive disk use */
        time_t dqb_itime;       /* time limit for excessive inode use */
  };
-@@ -214,10 +219,7 @@ struct mem_dqinfo {
+@@ -214,10 +219,7 @@
        unsigned int dqi_igrace;
        qsize_t dqi_maxblimit;
        qsize_t dqi_maxilimit;
@@ -1083248,7 +1083195,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
  };
  
  struct super_block;
-@@ -251,6 +253,11 @@ extern struct dqstats dqstats;
+@@ -251,6 +253,11 @@
  #define DQ_FAKE_B     3       /* no limits only usage */
  #define DQ_READ_B     4       /* dquot was read into memory */
  #define DQ_ACTIVE_B   5       /* dquot is active (dquot_release not called) */
@@ -1083260,7 +1083207,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
  
  struct dquot {
        struct hlist_node dq_hash;      /* Hash list in memory */
-@@ -289,11 +296,13 @@ struct dquot_operations {
+@@ -289,11 +296,13 @@
        int (*initialize) (struct inode *, int);
        int (*drop) (struct inode *);
        int (*alloc_space) (struct inode *, qsize_t, int);
@@ -1083276,7 +1083223,7 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
        int (*acquire_dquot) (struct dquot *);          /* Quota is going to be created on disk */
        int (*release_dquot) (struct dquot *);          /* Quota is going to be deleted from disk */
        int (*mark_dirty) (struct dquot *);             /* Dquot is marked dirty */
-@@ -322,12 +331,42 @@ struct quota_format_type {
+@@ -322,12 +331,42 @@
        struct quota_format_type *qf_next;
  };
  
@@ -1083323,9 +1083270,9 @@ diff -purN linux-2.6.27/include/linux/quota.h linux-2.6.27.19-5.1/include/linux/
  
  struct quota_info {
        unsigned int flags;                     /* Flags for diskquotas on this device */
-diff -purN linux-2.6.27/include/linux/quotaio_v1.h linux-2.6.27.19-5.1/include/linux/quotaio_v1.h
---- linux-2.6.27/include/linux/quotaio_v1.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaio_v1.h     1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 include/linux/quotaio_v1.h
+--- a/include/linux/quotaio_v1.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaio_v1.h       Wed May 06 16:56:57 2009 +0100
 @@ -1,33 +0,0 @@
 -#ifndef _LINUX_QUOTAIO_V1_H
 -#define _LINUX_QUOTAIO_V1_H
@@ -1083360,9 +1083307,9 @@ diff -purN linux-2.6.27/include/linux/quotaio_v1.h linux-2.6.27.19-5.1/include/l
 -#define v1_dqoff(UID)      ((loff_t)((UID) * sizeof (struct v1_disk_dqblk)))
 -
 -#endif        /* _LINUX_QUOTAIO_V1_H */
-diff -purN linux-2.6.27/include/linux/quotaio_v2.h linux-2.6.27.19-5.1/include/linux/quotaio_v2.h
---- linux-2.6.27/include/linux/quotaio_v2.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaio_v2.h     1970-01-01 01:00:00.000000000 +0100
+diff -r 9608d5473017 include/linux/quotaio_v2.h
+--- a/include/linux/quotaio_v2.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaio_v2.h       Wed May 06 16:56:57 2009 +0100
 @@ -1,79 +0,0 @@
 -/*
 - *    Definitions of structures for vfsv0 quota format
@@ -1083443,10 +1083390,10 @@ diff -purN linux-2.6.27/include/linux/quotaio_v2.h linux-2.6.27.19-5.1/include/l
 -#define V2_DQSTRINBLK ((V2_DQBLKSIZE - sizeof(struct v2_disk_dqdbheader)) / sizeof(struct v2_disk_dqblk))     /* Number of entries in one blocks */
 -
 -#endif /* _LINUX_QUOTAIO_V2_H */
-diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/linux/quotaops.h
---- linux-2.6.27/include/linux/quotaops.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/quotaops.h       2009-03-25 16:11:48.000000000 +0000
-@@ -27,12 +27,19 @@ void sync_dquots(struct super_block *sb,
+diff -r 9608d5473017 include/linux/quotaops.h
+--- a/include/linux/quotaops.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/quotaops.h Wed May 06 16:56:57 2009 +0100
+@@ -27,12 +27,19 @@
  
  int dquot_initialize(struct inode *inode, int type);
  int dquot_drop(struct inode *inode);
@@ -1083468,7 +1083415,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
  
  int dquot_transfer(struct inode *inode, struct iattr *iattr);
  int dquot_commit(struct dquot *dquot);
-@@ -43,11 +50,14 @@ int dquot_mark_dquot_dirty(struct dquot 
+@@ -43,11 +50,14 @@
  
  int vfs_quota_on(struct super_block *sb, int type, int format_id,
        char *path, int remount);
@@ -1083483,7 +1083430,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
  int vfs_quota_sync(struct super_block *sb, int type);
  int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
  int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
-@@ -67,24 +77,22 @@ static inline struct mem_dqinfo *sb_dqin
+@@ -67,30 +77,53 @@
   * Functions for checking status of quota
   */
  
@@ -1083516,10 +1083463,11 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
  }
  
  static inline int sb_any_quota_suspended(struct super_block *sb)
-@@ -93,6 +101,31 @@ static inline int sb_any_quota_suspended
+ {
+       return sb_has_quota_suspended(sb, USRQUOTA) ||
                sb_has_quota_suspended(sb, GRPQUOTA);
- }
++}
++
 +/* Does kernel know about any quota information for given sb + type? */
 +static inline int sb_has_quota_loaded(struct super_block *sb, int type)
 +{
@@ -1083543,12 +1083491,10 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
 +{
 +      return sb_has_quota_active(sb, USRQUOTA) ||
 +             sb_has_quota_active(sb, GRPQUOTA);
-+}
-+
+ }
  /*
-  * Operations supported for diskquotas.
-  */
-@@ -107,7 +140,7 @@ extern struct quotactl_ops vfs_quotactl_
+@@ -107,7 +140,7 @@
  static inline void vfs_dq_init(struct inode *inode)
  {
        BUG_ON(!inode->i_sb);
@@ -1083557,7 +1083503,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                inode->i_sb->dq_op->initialize(inode, -1);
  }
  
-@@ -115,7 +148,7 @@ static inline void vfs_dq_init(struct in
+@@ -115,7 +148,7 @@
   * a transaction (deadlocks possible otherwise) */
  static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr)
  {
@@ -1083566,7 +1083512,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                /* Used space is updated in alloc_space() */
                if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA)
                        return 1;
-@@ -135,7 +168,7 @@ static inline int vfs_dq_prealloc_space(
+@@ -135,7 +168,7 @@
  
  static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr)
  {
@@ -1083575,7 +1083521,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                /* Used space is updated in alloc_space() */
                if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA)
                        return 1;
-@@ -155,7 +188,7 @@ static inline int vfs_dq_alloc_space(str
+@@ -155,7 +188,7 @@
  
  static inline int vfs_dq_alloc_inode(struct inode *inode)
  {
@@ -1083584,7 +1083530,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                vfs_dq_init(inode);
                if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA)
                        return 1;
-@@ -165,7 +198,7 @@ static inline int vfs_dq_alloc_inode(str
+@@ -165,7 +198,7 @@
  
  static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
  {
@@ -1083593,7 +1083539,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                inode->i_sb->dq_op->free_space(inode, nr);
        else
                inode_sub_bytes(inode, nr);
-@@ -179,7 +212,7 @@ static inline void vfs_dq_free_space(str
+@@ -179,7 +212,7 @@
  
  static inline void vfs_dq_free_inode(struct inode *inode)
  {
@@ -1083602,7 +1083548,7 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
                inode->i_sb->dq_op->free_inode(inode, 1);
  }
  
-@@ -200,12 +233,12 @@ static inline int vfs_dq_off(struct supe
+@@ -200,12 +233,12 @@
  
  #else
  
@@ -1083617,33 +1083563,33 @@ diff -purN linux-2.6.27/include/linux/quotaops.h linux-2.6.27.19-5.1/include/lin
  {
        return 0;
  }
-@@ -220,6 +253,22 @@ static inline int sb_any_quota_suspended
-       return 0;
+@@ -216,6 +249,22 @@
  }
  
-+/* Does kernel know about any quota information for given sb + type? */
-+static inline int sb_has_quota_loaded(struct super_block *sb, int type)
+ static inline int sb_any_quota_suspended(struct super_block *sb)
 +{
 +      return 0;
 +}
 +
-+static inline int sb_any_quota_loaded(struct super_block *sb)
++/* Does kernel know about any quota information for given sb + type? */
++static inline int sb_has_quota_loaded(struct super_block *sb, int type)
 +{
 +      return 0;
 +}
 +
-+static inline int sb_any_quota_active(struct super_block *sb)
++static inline int sb_any_quota_loaded(struct super_block *sb)
 +{
 +      return 0;
 +}
 +
- /*
-  * NO-OP when quota not configured.
-  */
-diff -purN linux-2.6.27/include/linux/radix-tree.h linux-2.6.27.19-5.1/include/linux/radix-tree.h
---- linux-2.6.27/include/linux/radix-tree.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/radix-tree.h     2009-03-25 16:11:48.000000000 +0000
-@@ -136,7 +136,7 @@ do {                                                                       \
++static inline int sb_any_quota_active(struct super_block *sb)
+ {
+       return 0;
+ }
+diff -r 9608d5473017 include/linux/radix-tree.h
+--- a/include/linux/radix-tree.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/radix-tree.h       Wed May 06 16:56:57 2009 +0100
+@@ -136,7 +136,7 @@
   */
  static inline void *radix_tree_deref_slot(void **pslot)
  {
@@ -1083652,10 +1083598,10 @@ diff -purN linux-2.6.27/include/linux/radix-tree.h linux-2.6.27.19-5.1/include/l
        if (unlikely(radix_tree_is_indirect_ptr(ret)))
                ret = RADIX_TREE_RETRY;
        return ret;
-diff -purN linux-2.6.27/include/linux/raid/md_k.h linux-2.6.27.19-5.1/include/linux/raid/md_k.h
---- linux-2.6.27/include/linux/raid/md_k.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/raid/md_k.h      2009-03-25 16:11:48.000000000 +0000
-@@ -200,6 +200,8 @@ struct mddev_s
+diff -r 9608d5473017 include/linux/raid/md_k.h
+--- a/include/linux/raid/md_k.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/raid/md_k.h        Wed May 06 16:56:57 2009 +0100
+@@ -200,6 +200,8 @@
         * RESHAPE:  A reshape is happening
         *
         * If neither SYNC or RESHAPE are set, then it is a recovery.
@@ -1083664,20 +1083610,20 @@ diff -purN linux-2.6.27/include/linux/raid/md_k.h linux-2.6.27.19-5.1/include/li
         */
  #define       MD_RECOVERY_RUNNING     0
  #define       MD_RECOVERY_SYNC        1
-@@ -212,6 +214,9 @@ struct mddev_s
+@@ -211,6 +213,9 @@
+ #define       MD_RECOVERY_CHECK       7
  #define MD_RECOVERY_RESHAPE   8
  #define       MD_RECOVERY_FROZEN      9
 +
-+#define       MD_RECOVERY_DISABLED    16
 +
++#define       MD_RECOVERY_DISABLED    16
        unsigned long                   recovery;
  
-       int                             in_sync;        /* know to not need resync */
-diff -purN linux-2.6.27/include/linux/rcupdate.h linux-2.6.27.19-5.1/include/linux/rcupdate.h
---- linux-2.6.27/include/linux/rcupdate.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/rcupdate.h       2009-03-25 16:11:49.000000000 +0000
-@@ -133,6 +133,26 @@ struct rcu_head {
+diff -r 9608d5473017 include/linux/rcupdate.h
+--- a/include/linux/rcupdate.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/rcupdate.h Wed May 06 16:56:57 2009 +0100
+@@ -133,6 +133,26 @@
  #define rcu_read_unlock_bh() __rcu_read_unlock_bh()
  
  /**
@@ -1083704,10 +1083650,10 @@ diff -purN linux-2.6.27/include/linux/rcupdate.h linux-2.6.27.19-5.1/include/lin
   * rcu_dereference - fetch an RCU-protected pointer in an
   * RCU read-side critical section.  This pointer may later
   * be safely dereferenced.
-diff -purN linux-2.6.27/include/linux/reboot.h linux-2.6.27.19-5.1/include/linux/reboot.h
---- linux-2.6.27/include/linux/reboot.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reboot.h 2009-03-25 16:11:48.000000000 +0000
-@@ -53,7 +53,14 @@ extern void machine_power_off(void);
+diff -r 9608d5473017 include/linux/reboot.h
+--- a/include/linux/reboot.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reboot.h   Wed May 06 16:56:57 2009 +0100
+@@ -53,7 +53,14 @@
  
  extern void machine_shutdown(void);
  struct pt_regs;
@@ -1083722,10 +1083668,10 @@ diff -purN linux-2.6.27/include/linux/reboot.h linux-2.6.27.19-5.1/include/linux
  
  /* 
   * Architecture independent implemenations of sys_reboot commands.
-diff -purN linux-2.6.27/include/linux/reiserfs_acl.h linux-2.6.27.19-5.1/include/linux/reiserfs_acl.h
---- linux-2.6.27/include/linux/reiserfs_acl.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_acl.h   2009-03-25 16:11:49.000000000 +0000
-@@ -49,13 +49,12 @@ static inline int reiserfs_acl_count(siz
+diff -r 9608d5473017 include/linux/reiserfs_acl.h
+--- a/include/linux/reiserfs_acl.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_acl.h     Wed May 06 16:56:57 2009 +0100
+@@ -49,13 +49,12 @@
  #ifdef CONFIG_REISERFS_FS_POSIX_ACL
  struct posix_acl *reiserfs_get_acl(struct inode *inode, int type);
  int reiserfs_acl_chmod(struct inode *inode);
@@ -1083743,10 +1083689,12 @@ diff -purN linux-2.6.27/include/linux/reiserfs_acl.h linux-2.6.27.19-5.1/include
  
  static inline void reiserfs_init_acl_access(struct inode *inode)
  {
-@@ -75,16 +74,6 @@ static inline struct posix_acl *reiserfs
+@@ -73,16 +72,6 @@
+ static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
+ {
        return NULL;
- }
+-}
+-
 -static inline int reiserfs_xattr_posix_acl_init(void)
 -{
 -      return 0;
@@ -1083755,15 +1083703,13 @@ diff -purN linux-2.6.27/include/linux/reiserfs_acl.h linux-2.6.27.19-5.1/include
 -static inline int reiserfs_xattr_posix_acl_exit(void)
 -{
 -      return 0;
--}
--
+ }
  static inline int reiserfs_acl_chmod(struct inode *inode)
- {
-       return 0;
-diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs.h
---- linux-2.6.27/include/linux/reiserfs_fs.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs.h    2009-03-25 16:11:50.000000000 +0000
-@@ -79,15 +79,21 @@ struct fid;
+diff -r 9608d5473017 include/linux/reiserfs_fs.h
+--- a/include/linux/reiserfs_fs.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs.h      Wed May 06 16:56:57 2009 +0100
+@@ -79,15 +79,21 @@
  */
  #define REISERFS_DEBUG_CODE 5 /* extra messages to help find/debug errors */
  
@@ -1083791,7 +1083737,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
  
-@@ -171,7 +177,11 @@ struct reiserfs_super_block {
+@@ -171,7 +177,11 @@
        __le32 s_flags;         /* Right now used only by inode-attributes, if enabled */
        unsigned char s_uuid[16];       /* filesystem unique identifier */
        unsigned char s_label[16];      /* filesystem volume label */
@@ -1083804,30 +1083750,30 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
                                 * reiserfs_convert_objectid_map_v1()
                                 * so any additions must be updated
                                 * there as well. */
-@@ -553,10 +563,8 @@ static inline int uniqueness2type(__u32 
+@@ -553,10 +563,8 @@
                return TYPE_DIRECT;
        case V1_DIRENTRY_UNIQUENESS:
                return TYPE_DIRENTRY;
--      default:
++      case V1_ANY_UNIQUENESS:
+       default:
 -              reiserfs_warning(NULL, "vs-500: unknown uniqueness %d",
 -                               uniqueness);
-       case V1_ANY_UNIQUENESS:
-+      default:
+-      case V1_ANY_UNIQUENESS:
                return TYPE_ANY;
        }
  }
-@@ -573,9 +581,8 @@ static inline __u32 type2uniqueness(int 
+@@ -573,9 +581,8 @@
                return V1_DIRECT_UNIQUENESS;
        case TYPE_DIRENTRY:
                return V1_DIRENTRY_UNIQUENESS;
--      default:
++      case TYPE_ANY:
+       default:
 -              reiserfs_warning(NULL, "vs-501: unknown type %d", type);
-       case TYPE_ANY:
-+      default:
+-      case TYPE_ANY:
                return V1_ANY_UNIQUENESS;
        }
  }
-@@ -687,9 +694,9 @@ static inline void cpu_key_k_offset_dec(
+@@ -687,9 +694,9 @@
  #define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key)))
  #define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key)))
  
@@ -1083840,7 +1083786,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  /* maximal length of item */
  #define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE)
-@@ -744,25 +751,25 @@ struct block_head {
+@@ -744,25 +751,25 @@
  #define DISK_LEAF_NODE_LEVEL  1       /* Leaf node level. */
  
  /* Given the buffer head of a formatted node, resolve to the block head of that node. */
@@ -1083850,14 +1083796,13 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
 -#define B_NR_ITEMS(p_s_bh)            (blkh_nr_item(B_BLK_HEAD(p_s_bh)))
 -#define B_LEVEL(p_s_bh)               (blkh_level(B_BLK_HEAD(p_s_bh)))
 -#define B_FREE_SPACE(p_s_bh)          (blkh_free_space(B_BLK_HEAD(p_s_bh)))
--
--#define PUT_B_NR_ITEMS(p_s_bh,val)    do { set_blkh_nr_item(B_BLK_HEAD(p_s_bh),val); } while (0)
--#define PUT_B_LEVEL(p_s_bh,val)       do { set_blkh_level(B_BLK_HEAD(p_s_bh),val); } while (0)
--#define PUT_B_FREE_SPACE(p_s_bh,val)  do { set_blkh_free_space(B_BLK_HEAD(p_s_bh),val); } while (0)
 +#define B_NR_ITEMS(bh)                        (blkh_nr_item(B_BLK_HEAD(bh)))
 +#define B_LEVEL(bh)                   (blkh_level(B_BLK_HEAD(bh)))
 +#define B_FREE_SPACE(bh)              (blkh_free_space(B_BLK_HEAD(bh)))
-+
+-#define PUT_B_NR_ITEMS(p_s_bh,val)    do { set_blkh_nr_item(B_BLK_HEAD(p_s_bh),val); } while (0)
+-#define PUT_B_LEVEL(p_s_bh,val)       do { set_blkh_level(B_BLK_HEAD(p_s_bh),val); } while (0)
+-#define PUT_B_FREE_SPACE(p_s_bh,val)  do { set_blkh_free_space(B_BLK_HEAD(p_s_bh),val); } while (0)
 +#define PUT_B_NR_ITEMS(bh, val)               do { set_blkh_nr_item(B_BLK_HEAD(bh), val); } while (0)
 +#define PUT_B_LEVEL(bh, val)          do { set_blkh_level(B_BLK_HEAD(bh), val); } while (0)
 +#define PUT_B_FREE_SPACE(bh, val)     do { set_blkh_free_space(B_BLK_HEAD(bh), val); } while (0)
@@ -1083878,7 +1083823,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  /***************************************************************************/
  /*                             STAT DATA                                   */
-@@ -1112,12 +1119,13 @@ struct disk_child {
+@@ -1112,12 +1119,13 @@
  #define put_dc_size(dc_p, val)   do { (dc_p)->dc_size = cpu_to_le16(val); } while(0)
  
  /* Get disk child by buffer header and position in the tree node. */
@@ -1083896,7 +1083841,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
   /* maximal value of field child_size in structure disk_child */
   /* child size is the combined size of all items and their headers */
-@@ -1188,33 +1196,33 @@ struct treepath {
+@@ -1188,33 +1196,33 @@
  struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,}
  
  /* Get path element by path and path position. */
@@ -1083938,7 +1083883,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  #define get_last_bh(path) PATH_PLAST_BUFFER(path)
  #define get_ih(path) PATH_PITEM_HEAD(path)
-@@ -1444,6 +1452,16 @@ struct buffer_info {
+@@ -1444,6 +1452,16 @@
        int bi_position;
  };
  
@@ -1083955,7 +1083900,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  /* there are 4 types of items: stat data, directory item, indirect, direct.
  +-------------------+------------+--------------+------------+
  |                 |  k_offset  | k_uniqueness | mergeable? |
-@@ -1494,7 +1512,7 @@ extern struct item_operations *item_ops[
+@@ -1494,7 +1512,7 @@
  #define COMP_SHORT_KEYS comp_short_keys
  
  /* number of blocks pointed to by the indirect item */
@@ -1083964,7 +1083909,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  /* the used space within the unformatted node corresponding to pos within the item pointed to by ih */
  #define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size))
-@@ -1598,6 +1616,10 @@ struct reiserfs_journal_header {
+@@ -1598,6 +1616,10 @@
  #define JOURNAL_MAX_COMMIT_AGE 30
  #define JOURNAL_MAX_TRANS_AGE 30
  #define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
@@ -1083975,7 +1083920,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  #ifdef CONFIG_QUOTA
  /* We need to update data and inode (atime) */
  #define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0)
-@@ -1672,7 +1694,7 @@ struct reiserfs_transaction_handle {
+@@ -1672,7 +1694,7 @@
        int t_refcount;
        int t_blocks_logged;    /* number of blocks this writer has logged */
        int t_blocks_allocated; /* number of blocks this writer allocated */
@@ -1083984,7 +1083929,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
        void *t_handle_save;    /* save existing current->journal_info */
        unsigned displace_new_blocks:1; /* if new block allocation occurres, that block
                                           should be displaced from others */
-@@ -1748,13 +1770,13 @@ int journal_end_sync(struct reiserfs_tra
+@@ -1748,13 +1770,13 @@
  int journal_mark_freed(struct reiserfs_transaction_handle *,
                       struct super_block *, b_blocknr_t blocknr);
  int journal_transaction_should_end(struct reiserfs_transaction_handle *, int);
@@ -1084003,7 +1083948,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
  int reiserfs_allocate_list_bitmaps(struct super_block *s,
                                   struct reiserfs_list_bitmap *, unsigned int);
-@@ -1771,8 +1793,8 @@ int reiserfs_convert_objectid_map_v1(str
+@@ -1771,8 +1793,8 @@
  
  /* stree.c */
  int B_IS_IN_TREE(const struct buffer_head *);
@@ -1084014,7 +1083959,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  // first key is in cpu form, second - le
  extern int comp_short_keys(const struct reiserfs_key *le_key,
-@@ -1807,20 +1829,20 @@ static inline void copy_key(struct reise
+@@ -1807,20 +1829,20 @@
        memcpy(to, from, KEY_SIZE);
  }
  
@@ -1084045,7 +1083990,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
                         struct treepath *path,
-@@ -1843,14 +1865,14 @@ int reiserfs_cut_from_item(struct reiser
+@@ -1843,14 +1865,14 @@
  int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
                         struct treepath *path,
                         const struct cpu_key *key,
@@ -1084063,7 +1084008,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
                         int update_timestamps);
  
  #define i_block_size(inode) ((inode)->i_sb->s_blocksize)
-@@ -1894,10 +1916,12 @@ void make_le_item_head(struct item_head 
+@@ -1894,10 +1916,12 @@
                       loff_t offset, int type, int length, int entry_count);
  struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key);
  
@@ -1084077,7 +1084022,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  void reiserfs_update_sd_size(struct reiserfs_transaction_handle *th,
                             struct inode *inode, loff_t size);
-@@ -1955,7 +1979,7 @@ int reiserfs_global_version_in_proc(char
+@@ -1955,7 +1979,7 @@
  #define PROC_INFO_MAX( sb, field, value ) VOID_V
  #define PROC_INFO_INC( sb, field ) VOID_V
  #define PROC_INFO_ADD( sb, field, val ) VOID_V
@@ -1084086,7 +1084031,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  #endif
  
  /* dir.c */
-@@ -1963,6 +1987,7 @@ extern const struct inode_operations rei
+@@ -1963,6 +1987,7 @@
  extern const struct inode_operations reiserfs_symlink_inode_operations;
  extern const struct inode_operations reiserfs_special_inode_operations;
  extern const struct file_operations reiserfs_dir_operations;
@@ -1084094,7 +1084039,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  
  /* tail_conversion.c */
  int direct2indirect(struct reiserfs_transaction_handle *, struct inode *,
-@@ -1979,13 +2004,20 @@ extern const struct address_space_operat
+@@ -1979,13 +2004,20 @@
  
  /* fix_nodes.c */
  
@@ -1084118,7 +1084063,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
  void reiserfs_info(struct super_block *s, const char *fmt, ...);
  void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...);
  void print_indirect_item(struct buffer_head *bh, int item_num);
-@@ -2022,7 +2054,7 @@ void leaf_paste_in_buffer(struct buffer_
+@@ -2022,7 +2054,7 @@
                          int zeros_number);
  void leaf_cut_from_buffer(struct buffer_info *bi, int cut_item_num,
                          int pos_in_item, int cut_size);
@@ -1084127,7 +1084072,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
                        int new_entry_count, struct reiserfs_de_head *new_dehs,
                        const char *records, int paste_size);
  /* ibalance.c */
-@@ -2200,7 +2232,4 @@ int reiserfs_unpack(struct inode *inode,
+@@ -2200,7 +2232,4 @@
  #define reiserfs_write_lock( sb ) lock_kernel()
  #define reiserfs_write_unlock( sb ) unlock_kernel()
  
@@ -1084135,10 +1084080,10 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs.h linux-2.6.27.19-5.1/include/
 -#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
 -
  #endif                                /* _LINUX_REISER_FS_H */
-diff -purN linux-2.6.27/include/linux/reiserfs_fs_i.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs_i.h
---- linux-2.6.27/include/linux/reiserfs_fs_i.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs_i.h  2009-03-25 16:11:48.000000000 +0000
-@@ -51,7 +51,7 @@ struct reiserfs_inode_info {
+diff -r 9608d5473017 include/linux/reiserfs_fs_i.h
+--- a/include/linux/reiserfs_fs_i.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs_i.h    Wed May 06 16:56:57 2009 +0100
+@@ -51,7 +51,7 @@
        /* we use these for fsync or O_SYNC to decide which transaction
         ** needs to be committed in order for this inode to be properly
         ** flushed */
@@ -1084147,7 +1084092,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_i.h linux-2.6.27.19-5.1/includ
        struct reiserfs_journal_list *i_jl;
        struct mutex i_mmap;
  #ifdef CONFIG_REISERFS_FS_POSIX_ACL
-@@ -59,7 +59,7 @@ struct reiserfs_inode_info {
+@@ -59,7 +59,7 @@
        struct posix_acl *i_acl_default;
  #endif
  #ifdef CONFIG_REISERFS_FS_XATTR
@@ -1084156,10 +1084101,10 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_i.h linux-2.6.27.19-5.1/includ
  #endif
        struct inode vfs_inode;
  };
-diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/include/linux/reiserfs_fs_sb.h
---- linux-2.6.27/include/linux/reiserfs_fs_sb.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_fs_sb.h 2009-03-25 16:11:50.000000000 +0000
-@@ -14,7 +14,7 @@ typedef enum {
+diff -r 9608d5473017 include/linux/reiserfs_fs_sb.h
+--- a/include/linux/reiserfs_fs_sb.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_fs_sb.h   Wed May 06 16:56:57 2009 +0100
+@@ -14,7 +14,7 @@
  } reiserfs_super_block_flags;
  
  /* struct reiserfs_super_block accessors/mutators
@@ -1084168,7 +1084113,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
   * little endian format. */
  #define sb_block_count(sbp)         (le32_to_cpu((sbp)->s_v1.s_block_count))
  #define set_sb_block_count(sbp,v)   ((sbp)->s_v1.s_block_count = cpu_to_le32(v))
-@@ -73,6 +73,9 @@ typedef enum {
+@@ -73,6 +73,9 @@
  #define sb_version(sbp)            (le16_to_cpu((sbp)->s_v1.s_version))
  #define set_sb_version(sbp,v)      ((sbp)->s_v1.s_version = cpu_to_le16(v))
  
@@ -1084178,7 +1084123,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
  #define sb_reserved_for_journal(sbp) \
                (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal))
  #define set_sb_reserved_for_journal(sbp,v) \
-@@ -80,16 +83,16 @@ typedef enum {
+@@ -80,16 +83,16 @@
  
  /* LOGGING -- */
  
@@ -1084199,7 +1084144,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
  ** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal
  ** to wrap, which slows things down.  If you need high speed meta data updates, the journal should be big enough
  ** to prevent wrapping before dirty meta blocks get to disk.
-@@ -146,6 +149,12 @@ struct reiserfs_list_bitmap {
+@@ -146,6 +149,12 @@
  ** and to make sure every real block in a transaction is on disk before allowing the log area
  ** to be overwritten */
  struct reiserfs_journal_list {
@@ -1084212,7 +1084157,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
        unsigned long j_start;
        unsigned long j_state;
        unsigned long j_len;
-@@ -153,7 +162,7 @@ struct reiserfs_journal_list {
+@@ -153,7 +162,7 @@
        atomic_t j_commit_left;
        atomic_t j_older_commits_done;  /* all commits older than this on disk */
        struct mutex j_commit_mutex;
@@ -1084221,7 +1084166,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
        time_t j_timestamp;
        struct reiserfs_list_bitmap *j_list_bitmap;
        struct buffer_head *j_commit_bh;        /* commit buffer head */
-@@ -181,7 +190,7 @@ struct reiserfs_journal {
+@@ -181,7 +190,7 @@
        int j_1st_reserved_block;       /* first block on s_dev of reserved area journal */
  
        unsigned long j_state;
@@ -1084230,7 +1084175,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
        unsigned long j_mount_id;
        unsigned long j_start;  /* start of current waiting commit (index into j_ap_blocks) */
        unsigned long j_len;    /* length of current waiting commit */
-@@ -222,10 +231,10 @@ struct reiserfs_journal {
+@@ -222,10 +231,10 @@
        int j_num_work_lists;   /* number that need attention from kreiserfsd */
  
        /* debugging to make sure things are flushed in order */
@@ -1084243,7 +1084188,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
  
        struct list_head j_bitmap_nodes;
        struct list_head j_dirty_buffers;
-@@ -238,7 +247,7 @@ struct reiserfs_journal {
+@@ -238,7 +247,7 @@
  
        struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */
        struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */
@@ -1084252,7 +1084197,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
                                                                                   the transactions */
        struct list_head j_prealloc_list;       /* list of inodes which have preallocated blocks */
        int j_persistent_trans;
-@@ -398,10 +407,7 @@ struct reiserfs_sb_info {
+@@ -398,10 +407,7 @@
        int reserved_blocks;    /* amount of blocks reserved for further allocations */
        spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
        struct dentry *priv_root;       /* root of /.reiserfs_priv */
@@ -1084263,7 +1084208,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
        int j_errno;
  #ifdef CONFIG_QUOTA
        char *s_qf_names[MAXQUOTAS];
-@@ -425,7 +431,7 @@ enum reiserfs_mount_options {
+@@ -425,7 +431,7 @@
                                   partition will be dealt with in a
                                   manner of 3.5.x */
  
@@ -1084272,7 +1084217,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
  ** reiserfs disks from 3.5.19 or earlier.  99% of the time, this option
  ** is not required.  If the normal autodection code can't determine which
  ** hash to use (because both hashes had the same value for a file)
-@@ -450,7 +456,6 @@ enum reiserfs_mount_options {
+@@ -450,7 +456,6 @@
        REISERFS_NO_UNHASHED_RELOCATION,
        REISERFS_HASHED_RELOCATION,
        REISERFS_ATTRS,
@@ -1084280,7 +1084225,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
        REISERFS_XATTRS_USER,
        REISERFS_POSIXACL,
        REISERFS_BARRIER_NONE,
-@@ -488,7 +493,7 @@ enum reiserfs_mount_options {
+@@ -488,7 +493,7 @@
  #define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG))
  #define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED))
  #define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK))
@@ -1084289,10 +1084234,10 @@ diff -purN linux-2.6.27/include/linux/reiserfs_fs_sb.h linux-2.6.27.19-5.1/inclu
  #define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER))
  #define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL))
  #define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))
-diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/include/linux/reiserfs_xattr.h
---- linux-2.6.27/include/linux/reiserfs_xattr.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reiserfs_xattr.h 2009-03-25 16:11:49.000000000 +0000
-@@ -15,6 +15,12 @@ struct reiserfs_xattr_header {
+diff -r 9608d5473017 include/linux/reiserfs_xattr.h
+--- a/include/linux/reiserfs_xattr.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/reiserfs_xattr.h   Wed May 06 16:56:57 2009 +0100
+@@ -15,6 +15,12 @@
        __le32 h_hash;          /* hash of the value */
  };
  
@@ -1084305,7 +1084250,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
  #ifdef __KERNEL__
  
  #include <linux/init.h>
-@@ -29,22 +35,13 @@ struct iattr;
+@@ -29,22 +35,13 @@
  struct super_block;
  struct nameidata;
  
@@ -1084333,7 +1084278,7 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
  #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
  ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
                          void *buffer, size_t size);
-@@ -52,104 +49,97 @@ int reiserfs_setxattr(struct dentry *den
+@@ -52,105 +49,98 @@
                      const void *value, size_t size, int flags);
  ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
  int reiserfs_removexattr(struct dentry *dentry, const char *name);
@@ -1084349,7 +1084294,10 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
 +int reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *,
 +                            struct inode *, const char *, const void *,
 +                            size_t, int);
-+
+-extern struct reiserfs_xattr_handler user_handler;
+-extern struct reiserfs_xattr_handler trusted_handler;
+-extern struct reiserfs_xattr_handler security_handler;
 +extern struct xattr_handler reiserfs_xattr_user_handler;
 +extern struct xattr_handler reiserfs_xattr_trusted_handler;
 +extern struct xattr_handler reiserfs_xattr_security_handler;
@@ -1084361,18 +1084309,32 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
 +                          struct reiserfs_security_handle *sec);
 +void reiserfs_security_free(struct reiserfs_security_handle *sec);
 +#endif
-+
+-int reiserfs_xattr_register_handlers(void) __init;
+-void reiserfs_xattr_unregister_handlers(void);
+-
+-static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
 +#define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header))
 +static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size)
-+{
+ {
+-      down_write(&REISERFS_XATTR_DIR_SEM(sb));
+-}
+-static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
+-{
+-      up_write(&REISERFS_XATTR_DIR_SEM(sb));
+-}
+-static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
+-{
+-      down_read(&REISERFS_XATTR_DIR_SEM(sb));
 +      loff_t ret = 0;
 +      if (reiserfs_file_data_log(inode)) {
 +              ret = _ROUND_UP(xattr_size(size), inode->i_sb->s_blocksize);
 +              ret >>= inode->i_sb->s_blocksize_bits;
 +      }
 +      return ret;
-+}
-+
+ }
+-static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
 +/* We may have to create up to 3 objects: xattr root, xattr dir, xattr file.
 + * Let's try to be smart about it.
 + * xattr root: We cache it. If it's not cached, we may need to create it.
@@ -1084385,40 +1084347,11 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
 + * THIS VALUE.
 + */
 +static inline size_t reiserfs_xattr_jcreate_nblocks(struct inode *inode)
-+{
-+      size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+
-+      if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
-+              nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+              if (REISERFS_SB(inode->i_sb)->xattr_root == NULL)
-+                      nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
-+      }
--extern struct reiserfs_xattr_handler user_handler;
--extern struct reiserfs_xattr_handler trusted_handler;
--extern struct reiserfs_xattr_handler security_handler;
--
--int reiserfs_xattr_register_handlers(void) __init;
--void reiserfs_xattr_unregister_handlers(void);
--
--static inline void reiserfs_write_lock_xattrs(struct super_block *sb)
--{
--      down_write(&REISERFS_XATTR_DIR_SEM(sb));
--}
--static inline void reiserfs_write_unlock_xattrs(struct super_block *sb)
--{
--      up_write(&REISERFS_XATTR_DIR_SEM(sb));
--}
--static inline void reiserfs_read_lock_xattrs(struct super_block *sb)
--{
--      down_read(&REISERFS_XATTR_DIR_SEM(sb));
--}
--
--static inline void reiserfs_read_unlock_xattrs(struct super_block *sb)
--{
+ {
 -      up_read(&REISERFS_XATTR_DIR_SEM(sb));
 -}
--
++      size_t nblocks = JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
 -static inline void reiserfs_write_lock_xattr_i(struct inode *inode)
 -{
 -      down_write(&REISERFS_I(inode)->xattr_sem);
@@ -1084431,7 +1084364,12 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
 -{
 -      down_read(&REISERFS_I(inode)->xattr_sem);
 -}
--
++      if ((REISERFS_I(inode)->i_flags & i_has_xattr_dir) == 0) {
++              nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
++              if (REISERFS_SB(inode->i_sb)->xattr_root == NULL)
++                      nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
++      }
 -static inline void reiserfs_read_unlock_xattr_i(struct inode *inode)
 -{
 -      up_read(&REISERFS_I(inode)->xattr_sem);
@@ -1084468,45 +1084406,48 @@ diff -purN linux-2.6.27/include/linux/reiserfs_xattr.h linux-2.6.27.19-5.1/inclu
 -#define reiserfs_xattr_unregister_handlers()
 -
 -static inline int reiserfs_delete_xattrs(struct inode *inode)
-+static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
- {
+-{
 -      return 0;
 -};
 -static inline int reiserfs_chown_xattrs(struct inode *inode,
 -                                      struct iattr *attrs)
-+}
-+#endif  /*  CONFIG_REISERFS_FS_XATTR  */
-+
+-{
+-      return 0;
+-};
+-static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
+-{
+-      sb->s_flags = (sb->s_flags & ~MS_POSIXACL);     /* to be sure */
+-      return 0;
+-};
+ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
+ {
+ }
+ #endif  /*  CONFIG_REISERFS_FS_XATTR  */
 +#ifndef CONFIG_REISERFS_FS_SECURITY
 +static inline int reiserfs_security_init(struct inode *dir,
 +                                       struct inode *inode,
 +                                       struct reiserfs_security_handle *sec)
- {
-       return 0;
--};
--static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
++{
++      return 0;
 +}
 +static inline int
 +reiserfs_security_write(struct reiserfs_transaction_handle *th,
 +                      struct inode *inode,
 +                      struct reiserfs_security_handle *sec)
- {
--      sb->s_flags = (sb->s_flags & ~MS_POSIXACL);     /* to be sure */
-       return 0;
--};
--static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
--{
- }
--#endif  /*  CONFIG_REISERFS_FS_XATTR  */
++{
++      return 0;
++}
 +static inline void reiserfs_security_free(struct reiserfs_security_handle *sec)
 +{}
 +#endif
++
  #endif  /*  __KERNEL__  */
  
-diff -purN linux-2.6.27/include/linux/reserve.h linux-2.6.27.19-5.1/include/linux/reserve.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/reserve.h        2009-03-25 16:11:50.000000000 +0000
+ #endif  /*  _LINUX_REISERFS_XATTR_H  */
+diff -r 9608d5473017 include/linux/reserve.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/reserve.h  Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,198 @@
 +/*
 + * Memory reserve management.
@@ -1084706,10 +1084647,10 @@ diff -purN linux-2.6.27/include/linux/reserve.h linux-2.6.27.19-5.1/include/linu
 +}
 +
 +#endif /* _LINUX_RESERVE_H */
-diff -purN linux-2.6.27/include/linux/resource.h linux-2.6.27.19-5.1/include/linux/resource.h
---- linux-2.6.27/include/linux/resource.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/resource.h       2009-03-25 16:11:48.000000000 +0000
-@@ -59,10 +59,10 @@ struct rlimit {
+diff -r 9608d5473017 include/linux/resource.h
+--- a/include/linux/resource.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/resource.h Wed May 06 16:56:57 2009 +0100
+@@ -59,10 +59,10 @@
  #define _STK_LIM      (8*1024*1024)
  
  /*
@@ -1084722,25 +1084663,25 @@ diff -purN linux-2.6.27/include/linux/resource.h linux-2.6.27.19-5.1/include/lin
  
  /*
   * Due to binary compatibility, the actual resource numbers
-diff -purN linux-2.6.27/include/linux/rtnetlink.h linux-2.6.27.19-5.1/include/linux/rtnetlink.h
---- linux-2.6.27/include/linux/rtnetlink.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/rtnetlink.h      2009-03-25 16:11:49.000000000 +0000
-@@ -107,6 +107,11 @@ enum {
+diff -r 9608d5473017 include/linux/rtnetlink.h
+--- a/include/linux/rtnetlink.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/rtnetlink.h        Wed May 06 16:56:57 2009 +0100
+@@ -106,6 +106,11 @@
+ #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
        RTM_GETADDRLABEL,
  #define RTM_GETADDRLABEL RTM_GETADDRLABEL
++
 +      RTM_GETDCB = 78,
 +#define RTM_GETDCB RTM_GETDCB
 +      RTM_SETDCB,
 +#define RTM_SETDCB RTM_SETDCB
-+
        __RTM_MAX,
  #define RTM_MAX               (((__RTM_MAX + 3) & ~3) - 1)
- };
-diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/sched.h
---- linux-2.6.27/include/linux/sched.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sched.h  2009-03-25 16:11:49.000000000 +0000
-@@ -96,6 +96,7 @@ struct exec_domain;
+diff -r 9608d5473017 include/linux/sched.h
+--- a/include/linux/sched.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sched.h    Wed May 06 16:56:57 2009 +0100
+@@ -96,6 +96,7 @@
  struct futex_pi_state;
  struct robust_list_head;
  struct bio;
@@ -1084748,7 +1084689,7 @@ diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/
  
  /*
   * List of flags we want to share for kernel threads,
-@@ -407,8 +408,9 @@ extern int get_dumpable(struct mm_struct
+@@ -407,8 +408,9 @@
  #define MMF_DUMP_FILTER_BITS  5
  #define MMF_DUMP_FILTER_MASK \
        (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
@@ -1084760,18 +1084701,18 @@ diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/
  
  struct sighand_struct {
        atomic_t                count;
-@@ -587,6 +589,10 @@ struct user_struct {
+@@ -586,6 +588,10 @@
+ #ifdef CONFIG_INOTIFY_USER
        atomic_t inotify_watches; /* How many inotify watches does this user have? */
        atomic_t inotify_devs;  /* How many inotify devs does this user have opened? */
- #endif
++#endif
 +#ifdef CONFIG_EPOLL
 +      atomic_t epoll_devs;    /* DO NOT USE, ONLY HERE TO KEEP ABI STABLE */
 +      atomic_t epoll_watches; /* The number of file descriptors currently watched */
-+#endif
+ #endif
  #ifdef CONFIG_POSIX_MQUEUE
        /* protected by mq_lock */
-       unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
-@@ -1015,13 +1021,12 @@ struct sched_rt_entity {
+@@ -1015,13 +1021,12 @@
        int nr_cpus_allowed;
  
        struct sched_rt_entity *back;
@@ -1084786,7 +1084727,7 @@ diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/
  };
  
  struct task_struct {
-@@ -1196,6 +1201,11 @@ struct task_struct {
+@@ -1196,6 +1201,11 @@
  #endif
        seccomp_t seccomp;
  
@@ -1084798,7 +1084739,7 @@ diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/
  /* Thread group tracking */
        u32 parent_exec_id;
        u32 self_exec_id;
-@@ -1286,7 +1296,9 @@ struct task_struct {
+@@ -1286,7 +1296,9 @@
        atomic_t fs_excl;       /* holding fs exclusive resources */
        struct rcu_head rcu;
  
@@ -1084809,35 +1084750,35 @@ diff -purN linux-2.6.27/include/linux/sched.h linux-2.6.27.19-5.1/include/linux/
         * cache last used pipe for splice
         */
        struct pipe_inode_info *splice_pipe;
-@@ -1301,6 +1313,10 @@ struct task_struct {
+@@ -1300,6 +1312,10 @@
+ #ifdef CONFIG_LATENCYTOP
        int latency_record_count;
        struct latency_record latency_record[LT_SAVECOUNT];
- #endif
++#endif
 +      u64     instrumentation;
 +#ifdef CONFIG_PERFMON
 +      struct pfm_context *pfm_context;
-+#endif
+ #endif
  };
  
- /*
-@@ -1537,6 +1553,13 @@ extern cputime_t task_gtime(struct task_
+@@ -1536,6 +1552,13 @@
+ /* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */
  #define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
  #define used_math() tsk_used_math(current)
++
 +static inline void tsk_restore_flags(struct task_struct *p,
 +                                   unsigned long pflags, unsigned long mask)
 +{
 +      p->flags &= ~mask;
 +      p->flags |= pflags & mask;
 +}
-+
  #ifdef CONFIG_SMP
  extern int set_cpus_allowed_ptr(struct task_struct *p,
-                               const cpumask_t *new_mask);
-diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/linux/security.h
---- linux-2.6.27/include/linux/security.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/security.h       2009-03-25 16:11:48.000000000 +0000
-@@ -54,9 +54,11 @@ extern void cap_capset_set(struct task_s
+diff -r 9608d5473017 include/linux/security.h
+--- a/include/linux/security.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/security.h Wed May 06 16:56:57 2009 +0100
+@@ -54,9 +54,11 @@
  extern int cap_bprm_set_security(struct linux_binprm *bprm);
  extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
  extern int cap_bprm_secureexec(struct linux_binprm *bprm);
@@ -1084852,7 +1084793,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  extern int cap_inode_need_killpriv(struct dentry *dentry);
  extern int cap_inode_killpriv(struct dentry *dentry);
  extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
-@@ -337,23 +339,28 @@ static inline void security_free_mnt_opt
+@@ -337,23 +339,28 @@
   *    Check permission to create a regular file.
   *    @dir contains inode structure of the parent of the new file.
   *    @dentry contains the dentry structure for the file to be created.
@@ -1084881,7 +1084822,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    @old_name contains the pathname of file.
   *    Return 0 if permission is granted.
   * @inode_mkdir:
-@@ -361,12 +368,14 @@ static inline void security_free_mnt_opt
+@@ -361,12 +368,14 @@
   *    associated with inode strcture @dir.
   *    @dir containst the inode structure of parent of the directory to be created.
   *    @dentry contains the dentry structure of new directory.
@@ -1084896,7 +1084837,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    Return 0 if permission is granted.
   * @inode_mknod:
   *    Check permissions when creating a special file (or a socket or a fifo
-@@ -375,6 +384,7 @@ static inline void security_free_mnt_opt
+@@ -375,6 +384,7 @@
   *    and not this hook.
   *    @dir contains the inode structure of parent of the new file.
   *    @dentry contains the dentry structure of the new file.
@@ -1084904,7 +1084845,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    @mode contains the mode of the new file.
   *    @dev contains the device number.
   *    Return 0 if permission is granted.
-@@ -382,12 +392,15 @@ static inline void security_free_mnt_opt
+@@ -382,12 +392,15 @@
   *    Check for permission to rename a file or directory.
   *    @old_dir contains the inode structure for parent of the old link.
   *    @old_dentry contains the dentry structure of the old link.
@@ -1084920,7 +1084861,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    Return 0 if permission is granted.
   * @inode_follow_link:
   *    Check permission to follow a symbolic link when looking up a pathname.
-@@ -411,6 +424,7 @@ static inline void security_free_mnt_opt
+@@ -411,6 +424,7 @@
   *    file attributes change (such as when a file is truncated, chown/chmod
   *    operations, transferring disk quotas, etc).
   *    @dentry contains the dentry structure for the file.
@@ -1084928,7 +1084869,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    @attr is the iattr structure containing the new file attributes.
   *    Return 0 if permission is granted.
   * @inode_getattr:
-@@ -426,18 +440,18 @@ static inline void security_free_mnt_opt
+@@ -426,18 +440,18 @@
   *    inode.
   * @inode_setxattr:
   *    Check permission before setting the extended attributes
@@ -1084951,7 +1084892,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   *    Return 0 if permission is granted.
   * @inode_removexattr:
   *    Check permission before removing the extended attribute
-@@ -578,6 +592,20 @@ static inline void security_free_mnt_opt
+@@ -578,6 +592,20 @@
   *    file_permission, and recheck access if anything has changed
   *    since inode_permission.
   *
@@ -1084972,7 +1084913,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
   * Security hooks for task operations.
   *
   * @task_create:
-@@ -1354,32 +1382,45 @@ struct security_operations {
+@@ -1354,32 +1382,45 @@
        void (*inode_free_security) (struct inode *inode);
        int (*inode_init_security) (struct inode *inode, struct inode *dir,
                                    char **name, void **value, size_t *len);
@@ -1085038,7 +1084979,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
        int (*inode_need_killpriv) (struct dentry *dentry);
        int (*inode_killpriv) (struct dentry *dentry);
        int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc);
-@@ -1407,6 +1448,7 @@ struct security_operations {
+@@ -1407,6 +1448,7 @@
                                    struct fown_struct *fown, int sig);
        int (*file_receive) (struct file *file);
        int (*dentry_open) (struct file *file);
@@ -1085046,7 +1084987,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  
        int (*task_create) (unsigned long clone_flags);
        int (*task_alloc_security) (struct task_struct *p);
-@@ -1622,30 +1664,43 @@ int security_inode_alloc(struct inode *i
+@@ -1622,30 +1664,43 @@
  void security_inode_free(struct inode *inode);
  int security_inode_init_security(struct inode *inode, struct inode *dir,
                                  char **name, void **value, size_t *len);
@@ -1085108,7 +1085049,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  int security_inode_need_killpriv(struct dentry *dentry);
  int security_inode_killpriv(struct dentry *dentry);
  int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc);
-@@ -1668,6 +1723,7 @@ int security_file_send_sigiotask(struct 
+@@ -1668,6 +1723,7 @@
                                 struct fown_struct *fown, int sig);
  int security_file_receive(struct file *file);
  int security_dentry_open(struct file *file);
@@ -1085116,7 +1085057,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  int security_task_create(unsigned long clone_flags);
  int security_task_alloc(struct task_struct *p);
  void security_task_free(struct task_struct *p);
-@@ -1968,26 +2024,31 @@ static inline int security_inode_init_se
+@@ -1968,26 +2024,31 @@
  
  static inline int security_inode_create(struct inode *dir,
                                         struct dentry *dentry,
@@ -1085151,7 +1085092,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
                                          const char *old_name)
  {
        return 0;
-@@ -1995,19 +2056,22 @@ static inline int security_inode_symlink
+@@ -1995,19 +2056,22 @@
  
  static inline int security_inode_mkdir(struct inode *dir,
                                        struct dentry *dentry,
@@ -1085175,7 +1085116,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
                                        int mode, dev_t dev)
  {
        return 0;
-@@ -2015,13 +2079,16 @@ static inline int security_inode_mknod(s
+@@ -2015,13 +2079,16 @@
  
  static inline int security_inode_rename(struct inode *old_dir,
                                         struct dentry *old_dentry,
@@ -1085194,7 +1085135,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  {
        return 0;
  }
-@@ -2038,7 +2105,8 @@ static inline int security_inode_permiss
+@@ -2038,7 +2105,8 @@
  }
  
  static inline int security_inode_setattr(struct dentry *dentry,
@@ -1085204,7 +1085145,7 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  {
        return 0;
  }
-@@ -2053,30 +2121,42 @@ static inline void security_inode_delete
+@@ -2053,30 +2121,42 @@
  { }
  
  static inline int security_inode_setxattr(struct dentry *dentry,
@@ -1085254,22 +1085195,22 @@ diff -purN linux-2.6.27/include/linux/security.h linux-2.6.27.19-5.1/include/lin
  }
  
  static inline int security_inode_need_killpriv(struct dentry *dentry)
-@@ -2177,6 +2257,11 @@ static inline int security_dentry_open(s
-       return 0;
+@@ -2173,6 +2253,11 @@
  }
  
-+static inline int security_path_permission(struct path *path, int mask)
+ static inline int security_dentry_open(struct file *file)
 +{
 +      return 0;
 +}
 +
- static inline int security_task_create(unsigned long clone_flags)
++static inline int security_path_permission(struct path *path, int mask)
  {
        return 0;
-diff -purN linux-2.6.27/include/linux/sem.h linux-2.6.27.19-5.1/include/linux/sem.h
---- linux-2.6.27/include/linux/sem.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sem.h    2009-03-25 16:11:48.000000000 +0000
-@@ -63,7 +63,7 @@ struct  seminfo {
+ }
+diff -r 9608d5473017 include/linux/sem.h
+--- a/include/linux/sem.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sem.h      Wed May 06 16:56:57 2009 +0100
+@@ -63,7 +63,7 @@
        int semaem;
  };
  
@@ -1085278,9 +1085219,9 @@ diff -purN linux-2.6.27/include/linux/sem.h linux-2.6.27.19-5.1/include/linux/se
  #define SEMMSL  250             /* <= 8 000 max num of semaphores per id */
  #define SEMMNS  (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
  #define SEMOPM  32            /* <= 1 000 max num of ops per semop call */
-diff -purN linux-2.6.27/include/linux/shm.h linux-2.6.27.19-5.1/include/linux/shm.h
---- linux-2.6.27/include/linux/shm.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/shm.h    2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/shm.h
+--- a/include/linux/shm.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/shm.h      Wed May 06 16:56:57 2009 +0100
 @@ -14,7 +14,7 @@
   * be increased by sysctl
   */
@@ -1085290,10 +1085231,10 @@ diff -purN linux-2.6.27/include/linux/shm.h linux-2.6.27.19-5.1/include/linux/sh
  #define SHMMIN 1                       /* min shared seg size (bytes) */
  #define SHMMNI 4096                    /* max num of segs system wide */
  #ifdef __KERNEL__
-diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux/skbuff.h
---- linux-2.6.27/include/linux/skbuff.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/skbuff.h 2009-03-25 16:11:48.000000000 +0000
-@@ -217,6 +217,8 @@ typedef unsigned char *sk_buff_data_t;
+diff -r 9608d5473017 include/linux/skbuff.h
+--- a/include/linux/skbuff.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/skbuff.h   Wed May 06 16:56:57 2009 +0100
+@@ -217,6 +217,8 @@
   *    @local_df: allow local fragmentation
   *    @cloned: Head may be cloned (check refcnt to be sure)
   *    @nohdr: Payload reference only, must not modify header
@@ -1085302,7 +1085243,7 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
   *    @pkt_type: Packet class
   *    @fclone: skbuff clone status
   *    @ip_summed: Driver fed us an IP checksum
-@@ -320,7 +322,14 @@ struct sk_buff {
+@@ -320,7 +322,14 @@
  #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
        __u8                    do_not_encrypt:1;
  #endif
@@ -1085318,7 +1085259,7 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
  
  #ifdef CONFIG_NET_DMA
        dma_cookie_t            dma_cookie;
-@@ -353,10 +362,22 @@ struct sk_buff {
+@@ -353,10 +362,22 @@
  
  #include <asm/system.h>
  
@@ -1085342,7 +1085283,7 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
  static inline struct sk_buff *alloc_skb(unsigned int size,
                                        gfp_t priority)
  {
-@@ -366,7 +387,7 @@ static inline struct sk_buff *alloc_skb(
+@@ -366,7 +387,7 @@
  static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
                                               gfp_t priority)
  {
@@ -1085351,7 +1085292,7 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
  }
  
  extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
-@@ -829,6 +850,9 @@ static inline void skb_fill_page_desc(st
+@@ -829,6 +850,9 @@
        skb_shinfo(skb)->nr_frags = i + 1;
  }
  
@@ -1085361,7 +1085302,7 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
  #define SKB_PAGE_ASSERT(skb)  BUG_ON(skb_shinfo(skb)->nr_frags)
  #define SKB_FRAG_ASSERT(skb)  BUG_ON(skb_shinfo(skb)->frag_list)
  #define SKB_LINEAR_ASSERT(skb)  BUG_ON(skb_is_nonlinear(skb))
-@@ -1213,7 +1237,8 @@ static inline void __skb_queue_purge(str
+@@ -1213,7 +1237,8 @@
  static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
                                              gfp_t gfp_mask)
  {
@@ -1085371,10 +1085312,12 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
        if (likely(skb))
                skb_reserve(skb, NET_SKB_PAD);
        return skb;
-@@ -1243,6 +1268,27 @@ static inline struct sk_buff *netdev_all
+@@ -1241,6 +1266,27 @@
+               unsigned int length)
+ {
        return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
- }
++}
++
 +extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
 +extern void __netdev_free_page(struct net_device *dev, struct page *page);
 +
@@ -1085394,12 +1085337,10 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
 +static inline void netdev_free_page(struct net_device *dev, struct page *page)
 +{
 +      __netdev_free_page(dev, page);
-+}
-+
+ }
  /**
-  *    skb_clone_writable - is the header of a clone writable
-  *    @skb: buffer to check
-@@ -1725,5 +1771,12 @@ static inline void skb_forward_csum(stru
+@@ -1725,5 +1771,12 @@
  }
  
  bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off);
@@ -1085412,10 +1085353,10 @@ diff -purN linux-2.6.27/include/linux/skbuff.h linux-2.6.27.19-5.1/include/linux
 +
  #endif        /* __KERNEL__ */
  #endif        /* _LINUX_SKBUFF_H */
-diff -purN linux-2.6.27/include/linux/slab.h linux-2.6.27.19-5.1/include/linux/slab.h
---- linux-2.6.27/include/linux/slab.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/slab.h   2009-03-25 16:11:48.000000000 +0000
-@@ -65,6 +65,8 @@ void kmem_cache_free(struct kmem_cache *
+diff -r 9608d5473017 include/linux/slab.h
+--- a/include/linux/slab.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/slab.h     Wed May 06 16:56:57 2009 +0100
+@@ -65,6 +65,8 @@
  unsigned int kmem_cache_size(struct kmem_cache *);
  const char *kmem_cache_name(struct kmem_cache *);
  int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
@@ -1085424,7 +1085365,7 @@ diff -purN linux-2.6.27/include/linux/slab.h linux-2.6.27.19-5.1/include/linux/s
  
  /*
   * Please use this macro to create slab caches. Simply specify the
-@@ -100,6 +102,8 @@ void * __must_check __krealloc(const voi
+@@ -100,6 +102,8 @@
  void * __must_check krealloc(const void *, size_t, gfp_t);
  void kfree(const void *);
  size_t ksize(const void *);
@@ -1085433,25 +1085374,25 @@ diff -purN linux-2.6.27/include/linux/slab.h linux-2.6.27.19-5.1/include/linux/s
  
  /*
   * Allocator specific definitions. These are mainly used to establish optimized
-@@ -226,13 +230,14 @@ static inline void *kmem_cache_alloc_nod
+@@ -226,12 +230,13 @@
   */
  #if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
  extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
--#define kmalloc_track_caller(size, flags) \
--      __kmalloc_track_caller(size, flags, __builtin_return_address(0))
- #else
--#define kmalloc_track_caller(size, flags) \
++#else
 +#define __kmalloc_track_caller(size, flags, ip) \
-       __kmalloc(size, flags)
- #endif /* DEBUG_SLAB */
-+#define kmalloc_track_caller(size, flags) \
-+      __kmalloc_track_caller(size, flags, __builtin_return_address(0))
++      __kmalloc(size, flags)
++#endif /* DEBUG_SLAB */
 +
+ #define kmalloc_track_caller(size, flags) \
+       __kmalloc_track_caller(size, flags, __builtin_return_address(0))
+-#else
+-#define kmalloc_track_caller(size, flags) \
+-      __kmalloc(size, flags)
+-#endif /* DEBUG_SLAB */
  #ifdef CONFIG_NUMA
  /*
-  * kmalloc_node_track_caller is a special version of kmalloc_node that
-@@ -244,21 +249,22 @@ extern void *__kmalloc_track_caller(size
+@@ -244,20 +249,21 @@
   */
  #if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
  extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *);
@@ -1085472,18 +1085413,17 @@ diff -purN linux-2.6.27/include/linux/slab.h linux-2.6.27.19-5.1/include/linux/s
 +      __kmalloc_track_caller(size, flags, ip)
  
  #endif /* DEBUG_SLAB */
++
 +#define kmalloc_node_track_caller(size, flags, node) \
 +      __kmalloc_node_track_caller(size, flags, node, \
 +                      __builtin_return_address(0))
-+
  /*
   * Shortcuts
-  */
-diff -purN linux-2.6.27/include/linux/slub_def.h linux-2.6.27.19-5.1/include/linux/slub_def.h
---- linux-2.6.27/include/linux/slub_def.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/slub_def.h       2009-03-25 16:11:48.000000000 +0000
-@@ -38,6 +38,7 @@ struct kmem_cache_cpu {
+diff -r 9608d5473017 include/linux/slub_def.h
+--- a/include/linux/slub_def.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/slub_def.h Wed May 06 16:56:57 2009 +0100
+@@ -38,6 +38,7 @@
        int node;               /* The node of the page (or -1 for debug) */
        unsigned int offset;    /* Freepointer offset (in word units) */
        unsigned int objsize;   /* Size of an object (from kmem_cache) */
@@ -1085491,10 +1085431,10 @@ diff -purN linux-2.6.27/include/linux/slub_def.h linux-2.6.27.19-5.1/include/lin
  #ifdef CONFIG_SLUB_STATS
        unsigned stat[NR_SLUB_STAT_ITEMS];
  #endif
-diff -purN linux-2.6.27/include/linux/spinlock.h linux-2.6.27.19-5.1/include/linux/spinlock.h
---- linux-2.6.27/include/linux/spinlock.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/spinlock.h       2009-03-25 16:11:50.000000000 +0000
-@@ -148,9 +148,11 @@ do {                                                              \
+diff -r 9608d5473017 include/linux/spinlock.h
+--- a/include/linux/spinlock.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/spinlock.h Wed May 06 16:56:57 2009 +0100
+@@ -148,9 +148,11 @@
   extern int _raw_spin_trylock(spinlock_t *lock);
   extern void _raw_spin_unlock(spinlock_t *lock);
   extern void _raw_read_lock(rwlock_t *lock);
@@ -1085506,7 +1085446,7 @@ diff -purN linux-2.6.27/include/linux/spinlock.h linux-2.6.27.19-5.1/include/lin
   extern int _raw_write_trylock(rwlock_t *lock);
   extern void _raw_write_unlock(rwlock_t *lock);
  #else
-@@ -160,9 +162,13 @@ do {                                                              \
+@@ -160,9 +162,13 @@
  # define _raw_spin_trylock(lock)      __raw_spin_trylock(&(lock)->raw_lock)
  # define _raw_spin_unlock(lock)               __raw_spin_unlock(&(lock)->raw_lock)
  # define _raw_read_lock(rwlock)               __raw_read_lock(&(rwlock)->raw_lock)
@@ -1085520,9 +1085460,9 @@ diff -purN linux-2.6.27/include/linux/spinlock.h linux-2.6.27.19-5.1/include/lin
  # define _raw_write_trylock(rwlock)   __raw_write_trylock(&(rwlock)->raw_lock)
  # define _raw_write_unlock(rwlock)    __raw_write_unlock(&(rwlock)->raw_lock)
  #endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs.h linux-2.6.27.19-5.1/include/linux/squashfs_fs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs.h    2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs.h      Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,935 @@
 +#ifndef SQUASHFS_FS
 +#define SQUASHFS_FS
@@ -1086459,9 +1086399,9 @@ diff -purN linux-2.6.27/include/linux/squashfs_fs.h linux-2.6.27.19-5.1/include/
 +
 +#endif
 +#endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs_i.h linux-2.6.27.19-5.1/include/linux/squashfs_fs_i.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs_i.h  2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs_i.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs_i.h    Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,45 @@
 +#ifndef SQUASHFS_FS_I
 +#define SQUASHFS_FS_I
@@ -1086508,9 +1086448,9 @@ diff -purN linux-2.6.27/include/linux/squashfs_fs_i.h linux-2.6.27.19-5.1/includ
 +      struct inode    vfs_inode;
 +};
 +#endif
-diff -purN linux-2.6.27/include/linux/squashfs_fs_sb.h linux-2.6.27.19-5.1/include/linux/squashfs_fs_sb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/squashfs_fs_sb.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/squashfs_fs_sb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/squashfs_fs_sb.h   Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,79 @@
 +#ifndef SQUASHFS_FS_SB
 +#define SQUASHFS_FS_SB
@@ -1086591,9 +1086531,9 @@ diff -purN linux-2.6.27/include/linux/squashfs_fs_sb.h linux-2.6.27.19-5.1/inclu
 +      int                     (*read_fragment_index_table)(struct super_block *s);
 +};
 +#endif
-diff -purN linux-2.6.27/include/linux/string_helpers.h linux-2.6.27.19-5.1/include/linux/string_helpers.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/string_helpers.h 2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/string_helpers.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/string_helpers.h   Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,16 @@
 +#ifndef _LINUX_STRING_HELPERS_H_
 +#define _LINUX_STRING_HELPERS_H_
@@ -1086611,10 +1086551,10 @@ diff -purN linux-2.6.27/include/linux/string_helpers.h linux-2.6.27.19-5.1/inclu
 +                  char *buf, int len);
 +
 +#endif
-diff -purN linux-2.6.27/include/linux/sunrpc/xprt.h linux-2.6.27.19-5.1/include/linux/sunrpc/xprt.h
---- linux-2.6.27/include/linux/sunrpc/xprt.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sunrpc/xprt.h    2009-03-25 16:11:48.000000000 +0000
-@@ -147,7 +147,9 @@ struct rpc_xprt {
+diff -r 9608d5473017 include/linux/sunrpc/xprt.h
+--- a/include/linux/sunrpc/xprt.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sunrpc/xprt.h      Wed May 06 16:56:57 2009 +0100
+@@ -147,7 +147,9 @@
        unsigned int            max_reqs;       /* total slots */
        unsigned long           state;          /* transport state */
        unsigned char           shutdown   : 1, /* being shut down */
@@ -1086625,7 +1086565,7 @@ diff -purN linux-2.6.27/include/linux/sunrpc/xprt.h linux-2.6.27.19-5.1/include/
        unsigned int            bind_index;     /* bind function index */
  
        /*
-@@ -249,6 +251,7 @@ void                       xprt_release_rqst_cong(struct rpc
+@@ -249,6 +251,7 @@
  void                  xprt_disconnect_done(struct rpc_xprt *xprt);
  void                  xprt_force_disconnect(struct rpc_xprt *xprt);
  void                  xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie);
@@ -1086633,10 +1086573,10 @@ diff -purN linux-2.6.27/include/linux/sunrpc/xprt.h linux-2.6.27.19-5.1/include/
  
  /*
   * Reserved bit positions in xprt->state
-diff -purN linux-2.6.27/include/linux/suspend.h linux-2.6.27.19-5.1/include/linux/suspend.h
---- linux-2.6.27/include/linux/suspend.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/suspend.h        2009-03-25 16:11:50.000000000 +0000
-@@ -232,6 +232,7 @@ extern unsigned long get_safe_page(gfp_t
+diff -r 9608d5473017 include/linux/suspend.h
+--- a/include/linux/suspend.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/suspend.h  Wed May 06 16:56:57 2009 +0100
+@@ -232,6 +232,7 @@
  
  extern void hibernation_set_ops(struct platform_hibernation_ops *ops);
  extern int hibernate(void);
@@ -1086644,7 +1086584,7 @@ diff -purN linux-2.6.27/include/linux/suspend.h linux-2.6.27.19-5.1/include/linu
  #else /* CONFIG_HIBERNATION */
  static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
  static inline void swsusp_set_page_free(struct page *p) {}
-@@ -239,6 +240,7 @@ static inline void swsusp_unset_page_fre
+@@ -239,6 +240,7 @@
  
  static inline void hibernation_set_ops(struct platform_hibernation_ops *ops) {}
  static inline int hibernate(void) { return -ENOSYS; }
@@ -1086652,10 +1086592,10 @@ diff -purN linux-2.6.27/include/linux/suspend.h linux-2.6.27.19-5.1/include/linu
  #endif /* CONFIG_HIBERNATION */
  
  #ifdef CONFIG_PM_SLEEP
-diff -purN linux-2.6.27/include/linux/swap.h linux-2.6.27.19-5.1/include/linux/swap.h
---- linux-2.6.27/include/linux/swap.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/swap.h   2009-03-25 16:11:48.000000000 +0000
-@@ -120,6 +120,7 @@ enum {
+diff -r 9608d5473017 include/linux/swap.h
+--- a/include/linux/swap.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/swap.h     Wed May 06 16:56:57 2009 +0100
+@@ -120,6 +120,7 @@
        SWP_USED        = (1 << 0),     /* is slot in swap_info[] used? */
        SWP_WRITEOK     = (1 << 1),     /* ok to write to this swap?    */
        SWP_ACTIVE      = (SWP_USED | SWP_WRITEOK),
@@ -1086663,7 +1086603,7 @@ diff -purN linux-2.6.27/include/linux/swap.h linux-2.6.27.19-5.1/include/linux/s
                                        /* add others here before... */
        SWP_SCANNING    = (1 << 8),     /* refcount in scan_swap_map */
  };
-@@ -217,6 +218,8 @@ extern void swap_unplug_io_fn(struct bac
+@@ -217,6 +218,8 @@
  /* linux/mm/page_io.c */
  extern int swap_readpage(struct file *, struct page *);
  extern int swap_writepage(struct page *page, struct writeback_control *wbc);
@@ -1086672,7 +1086612,7 @@ diff -purN linux-2.6.27/include/linux/swap.h linux-2.6.27.19-5.1/include/linux/s
  extern void end_swap_bio_read(struct bio *bio, int err);
  
  /* linux/mm/swap_state.c */
-@@ -249,6 +252,7 @@ extern unsigned int count_swap_pages(int
+@@ -249,6 +252,7 @@
  extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t);
  extern sector_t swapdev_block(int, pgoff_t);
  extern struct swap_info_struct *get_swap_info_struct(unsigned);
@@ -1086680,10 +1086620,10 @@ diff -purN linux-2.6.27/include/linux/swap.h linux-2.6.27.19-5.1/include/linux/s
  extern int can_share_swap_page(struct page *);
  extern int remove_exclusive_swap_page(struct page *);
  struct backing_dev_info;
-diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/linux/syscalls.h
---- linux-2.6.27/include/linux/syscalls.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/syscalls.h       2009-03-25 16:11:48.000000000 +0000
-@@ -29,6 +29,13 @@ struct msqid_ds;
+diff -r 9608d5473017 include/linux/syscalls.h
+--- a/include/linux/syscalls.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/syscalls.h Wed May 06 16:56:57 2009 +0100
+@@ -29,6 +29,13 @@
  struct new_utsname;
  struct nfsctl_arg;
  struct __old_kernel_stat;
@@ -1086697,7 +1086637,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  struct pollfd;
  struct rlimit;
  struct rusage;
-@@ -54,6 +61,7 @@ struct compat_stat;
+@@ -54,6 +61,7 @@
  struct compat_timeval;
  struct robust_list_head;
  struct getcpu_cache;
@@ -1086705,10 +1086645,11 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  
  #include <linux/types.h>
  #include <linux/aio_abi.h>
-@@ -65,6 +73,74 @@ struct getcpu_cache;
+@@ -64,6 +72,74 @@
+ #include <asm/signal.h>
  #include <linux/quota.h>
  #include <linux/key.h>
++
 +#define __SC_DECL1(t1, a1)    t1 a1
 +#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
 +#define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__)
@@ -1086776,11 +1086717,10 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
 +      asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
 +
 +#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
-+
  asmlinkage long sys_time(time_t __user *tloc);
  asmlinkage long sys_stime(time_t __user *tptr);
- asmlinkage long sys_gettimeofday(struct timeval __user *tv,
-@@ -77,7 +153,7 @@ asmlinkage long sys_times(struct tms __u
+@@ -77,7 +153,7 @@
  
  asmlinkage long sys_gettid(void);
  asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
@@ -1086789,7 +1086729,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_getpid(void);
  asmlinkage long sys_getppid(void);
  asmlinkage long sys_getuid(void);
-@@ -166,7 +242,7 @@ asmlinkage long sys_kexec_load(unsigned 
+@@ -166,7 +242,7 @@
                                unsigned long flags);
  
  asmlinkage long sys_exit(int error_code);
@@ -1086798,7 +1086738,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
                                int options, struct rusage __user *ru);
  asmlinkage long sys_waitid(int which, pid_t pid,
-@@ -196,7 +272,7 @@ asmlinkage long sys_tkill(int pid, int s
+@@ -196,7 +272,7 @@
  asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
  asmlinkage long sys_sgetmask(void);
  asmlinkage long sys_ssetmask(int newmask);
@@ -1086807,7 +1086747,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_pause(void);
  
  asmlinkage long sys_sync(void);
-@@ -246,29 +322,29 @@ asmlinkage long sys_lsetxattr(const char
+@@ -246,29 +322,29 @@
                              const void __user *value, size_t size, int flags);
  asmlinkage long sys_fsetxattr(int fd, const char __user *name,
                              const void __user *value, size_t size, int flags);
@@ -1086852,7 +1086792,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
                        unsigned long prot, unsigned long pgoff,
                        unsigned long flags);
-@@ -321,10 +397,10 @@ asmlinkage long sys_io_submit(aio_contex
+@@ -321,10 +397,10 @@
                                struct iocb __user * __user *);
  asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
                              struct io_event __user *result);
@@ -1086867,7 +1086807,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_readlink(const char __user *path,
                                char __user *buf, int bufsiz);
  asmlinkage long sys_creat(const char __user *pathname, int mode);
-@@ -368,26 +444,25 @@ asmlinkage long sys_utime(char __user *f
+@@ -368,26 +444,25 @@
                                struct utimbuf __user *times);
  asmlinkage long sys_utimes(char __user *filename,
                                struct timeval __user *utimes);
@@ -1086910,7 +1086850,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_getcwd(char __user *buf, unsigned long size);
  asmlinkage long sys_mkdir(const char __user *pathname, int mode);
  asmlinkage long sys_chdir(const char __user *filename);
-@@ -477,7 +552,7 @@ asmlinkage long sys_shmctl(int shmid, in
+@@ -477,7 +552,7 @@
  asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
  asmlinkage long sys_mq_unlink(const char __user *name);
  asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout);
@@ -1086919,7 +1086859,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
  asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
  
-@@ -531,11 +606,6 @@ asmlinkage long sys_move_pages(pid_t pid
+@@ -531,11 +606,6 @@
                                const int __user *nodes,
                                int __user *status,
                                int flags);
@@ -1086931,7 +1086871,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_mbind(unsigned long start, unsigned long len,
                                unsigned long mode,
                                unsigned long __user *nmask,
-@@ -550,7 +620,7 @@ asmlinkage long sys_inotify_init(void);
+@@ -550,7 +620,7 @@
  asmlinkage long sys_inotify_init1(int flags);
  asmlinkage long sys_inotify_add_watch(int fd, const char __user *path,
                                        u32 mask);
@@ -1086940,7 +1086880,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  
  asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,
                                 __u32 __user *ustatus);
-@@ -584,13 +654,6 @@ asmlinkage long sys_readlinkat(int dfd, 
+@@ -584,13 +654,6 @@
                               int bufsiz);
  asmlinkage long sys_utimensat(int dfd, char __user *filename,
                                struct timespec __user *utimes, int flags);
@@ -1086954,7 +1086894,7 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  asmlinkage long sys_unshare(unsigned long unshare_flags);
  
  asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
-@@ -622,6 +685,15 @@ asmlinkage long sys_timerfd_gettime(int 
+@@ -622,6 +685,15 @@
  asmlinkage long sys_eventfd(unsigned int count);
  asmlinkage long sys_eventfd2(unsigned int count, int flags);
  asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
@@ -1086970,10 +1086910,10 @@ diff -purN linux-2.6.27/include/linux/syscalls.h linux-2.6.27.19-5.1/include/lin
  
  int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
  
-diff -purN linux-2.6.27/include/linux/sysctl.h linux-2.6.27.19-5.1/include/linux/sysctl.h
---- linux-2.6.27/include/linux/sysctl.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sysctl.h 2009-03-25 16:11:50.000000000 +0000
-@@ -69,6 +69,7 @@ enum
+diff -r 9608d5473017 include/linux/sysctl.h
+--- a/include/linux/sysctl.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sysctl.h   Wed May 06 16:56:57 2009 +0100
+@@ -69,6 +69,7 @@
        CTL_BUS=8,              /* Busses */
        CTL_ABI=9,              /* Binary emulation */
        CTL_CPU=10,             /* CPU stuff (speed scaling, etc) */
@@ -1086981,7 +1086921,7 @@ diff -purN linux-2.6.27/include/linux/sysctl.h linux-2.6.27.19-5.1/include/linux
        CTL_ARLAN=254,          /* arlan wireless driver */
        CTL_S390DBF=5677,       /* s390 debug */
        CTL_SUNRPC=7249,        /* sunrpc debug */
-@@ -163,6 +164,9 @@ enum
+@@ -163,6 +164,9 @@
        KERN_MAX_LOCK_DEPTH=74,
        KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
        KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
@@ -1086991,7 +1086931,7 @@ diff -purN linux-2.6.27/include/linux/sysctl.h linux-2.6.27.19-5.1/include/linux
  };
  
  
-@@ -996,6 +1000,8 @@ extern int proc_doulongvec_minmax(struct
+@@ -996,6 +1000,8 @@
  extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
                                      struct file *, void __user *, size_t *, loff_t *);
  
@@ -1087000,19 +1086940,19 @@ diff -purN linux-2.6.27/include/linux/sysctl.h linux-2.6.27.19-5.1/include/linux
  extern int do_sysctl (int __user *name, int nlen,
                      void __user *oldval, size_t __user *oldlenp,
                      void __user *newval, size_t newlen);
-diff -purN linux-2.6.27/include/linux/sysfs.h linux-2.6.27.19-5.1/include/linux/sysfs.h
---- linux-2.6.27/include/linux/sysfs.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/sysfs.h  2009-03-25 16:11:48.000000000 +0000
-@@ -121,6 +121,8 @@ void sysfs_notify(struct kobject *kobj, 
+diff -r 9608d5473017 include/linux/sysfs.h
+--- a/include/linux/sysfs.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/sysfs.h    Wed May 06 16:56:57 2009 +0100
+@@ -120,6 +120,8 @@
+ void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
  
  extern int __must_check sysfs_init(void);
-+void sysfs_printk_last_file(void);
 +
++void sysfs_printk_last_file(void);
  #else /* CONFIG_SYSFS */
  
- static inline int sysfs_schedule_callback(struct kobject *kobj,
-@@ -231,6 +233,11 @@ static inline int __must_check sysfs_ini
+@@ -231,6 +233,11 @@
        return 0;
  }
  
@@ -1087024,17 +1086964,17 @@ diff -purN linux-2.6.27/include/linux/sysfs.h linux-2.6.27.19-5.1/include/linux/
  #endif /* CONFIG_SYSFS */
  
  #endif /* _SYSFS_H_ */
-diff -purN linux-2.6.27/include/linux/tc_act/Kbuild linux-2.6.27.19-5.1/include/linux/tc_act/Kbuild
---- linux-2.6.27/include/linux/tc_act/Kbuild   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tc_act/Kbuild    2009-03-25 16:11:49.000000000 +0000
-@@ -3,3 +3,4 @@ header-y += tc_ipt.h
+diff -r 9608d5473017 include/linux/tc_act/Kbuild
+--- a/include/linux/tc_act/Kbuild      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/tc_act/Kbuild      Wed May 06 16:56:57 2009 +0100
+@@ -3,3 +3,4 @@
  header-y += tc_mirred.h
  header-y += tc_pedit.h
  header-y += tc_nat.h
 +header-y += tc_skbedit.h
-diff -purN linux-2.6.27/include/linux/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/include/linux/tc_act/tc_skbedit.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tc_act/tc_skbedit.h      2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/tc_act/tc_skbedit.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/tc_act/tc_skbedit.h        Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,44 @@
 +/*
 + * Copyright (c) 2008, Intel Corporation.
@@ -1087080,10 +1087020,10 @@ diff -purN linux-2.6.27/include/linux/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/in
 +#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
 +
 +#endif
-diff -purN linux-2.6.27/include/linux/time.h linux-2.6.27.19-5.1/include/linux/time.h
---- linux-2.6.27/include/linux/time.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/time.h   2009-03-25 16:11:50.000000000 +0000
-@@ -99,6 +99,7 @@ extern unsigned long read_persistent_clo
+diff -r 9608d5473017 include/linux/time.h
+--- a/include/linux/time.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/time.h     Wed May 06 16:56:57 2009 +0100
+@@ -99,6 +99,7 @@
  extern int update_persistent_clock(struct timespec now);
  extern int no_sync_cmos_clock __read_mostly;
  void timekeeping_init(void);
@@ -1087091,10 +1087031,10 @@ diff -purN linux-2.6.27/include/linux/time.h linux-2.6.27.19-5.1/include/linux/t
  
  unsigned long get_seconds(void);
  struct timespec current_kernel_time(void);
-diff -purN linux-2.6.27/include/linux/timer.h linux-2.6.27.19-5.1/include/linux/timer.h
---- linux-2.6.27/include/linux/timer.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/timer.h  2009-03-25 16:11:48.000000000 +0000
-@@ -186,4 +186,9 @@ unsigned long __round_jiffies_relative(u
+diff -r 9608d5473017 include/linux/timer.h
+--- a/include/linux/timer.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/timer.h    Wed May 06 16:56:57 2009 +0100
+@@ -186,4 +186,9 @@
  unsigned long round_jiffies(unsigned long j);
  unsigned long round_jiffies_relative(unsigned long j);
  
@@ -1087104,9 +1087044,9 @@ diff -purN linux-2.6.27/include/linux/timer.h linux-2.6.27.19-5.1/include/linux/
 +unsigned long round_jiffies_up_relative(unsigned long j);
 +
  #endif
-diff -purN linux-2.6.27/include/linux/topology.h linux-2.6.27.19-5.1/include/linux/topology.h
---- linux-2.6.27/include/linux/topology.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/topology.h       2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/topology.h
+--- a/include/linux/topology.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/topology.h Wed May 06 16:56:57 2009 +0100
 @@ -49,7 +49,7 @@
        for_each_online_node(node)                      \
                if (nr_cpus_node(node))
@@ -1087116,7 +1087056,7 @@ diff -purN linux-2.6.27/include/linux/topology.h linux-2.6.27.19-5.1/include/lin
  
  /* Conform to ACPI 2.0 SLIT distance definitions */
  #define LOCAL_DISTANCE                10
-@@ -99,8 +99,7 @@ void arch_update_cpu_topology(void);
+@@ -99,8 +99,7 @@
                                | SD_BALANCE_FORK       \
                                | SD_BALANCE_EXEC       \
                                | SD_WAKE_AFFINE        \
@@ -1087126,9 +1087066,9 @@ diff -purN linux-2.6.27/include/linux/topology.h linux-2.6.27.19-5.1/include/lin
        .last_balance           = jiffies,              \
        .balance_interval       = 1,                    \
  }
-diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/linux/tracehook.h
---- linux-2.6.27/include/linux/tracehook.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tracehook.h      2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/linux/tracehook.h
+--- a/include/linux/tracehook.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/tracehook.h        Wed May 06 16:56:57 2009 +0100
 @@ -49,6 +49,7 @@
  #include <linux/sched.h>
  #include <linux/ptrace.h>
@@ -1087137,7 +1087077,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
  struct linux_binprm;
  
  /**
-@@ -63,6 +64,8 @@ struct linux_binprm;
+@@ -63,6 +64,8 @@
   */
  static inline int tracehook_expect_breakpoints(struct task_struct *task)
  {
@@ -1087146,7 +1087086,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return (task_ptrace(task) & PT_PTRACED) != 0;
  }
  
-@@ -111,6 +114,9 @@ static inline void ptrace_report_syscall
+@@ -111,6 +114,9 @@
  static inline __must_check int tracehook_report_syscall_entry(
        struct pt_regs *regs)
  {
@@ -1087156,7 +1087096,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        ptrace_report_syscall(regs);
        return 0;
  }
-@@ -134,6 +140,8 @@ static inline __must_check int tracehook
+@@ -134,6 +140,8 @@
   */
  static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  {
@@ -1087165,7 +1087105,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        ptrace_report_syscall(regs);
  }
  
-@@ -155,6 +163,8 @@ static inline int tracehook_unsafe_exec(
+@@ -155,6 +163,8 @@
                else
                        unsafe |= LSM_UNSAFE_PTRACE;
        }
@@ -1087174,7 +1087114,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return unsafe;
  }
  
-@@ -173,6 +183,8 @@ static inline struct task_struct *traceh
+@@ -173,6 +183,8 @@
  {
        if (task_ptrace(tsk) & PT_PTRACED)
                return rcu_dereference(tsk->parent);
@@ -1087183,7 +1087123,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return NULL;
  }
  
-@@ -194,6 +206,8 @@ static inline void tracehook_report_exec
+@@ -194,6 +206,8 @@
                                         struct linux_binprm *bprm,
                                         struct pt_regs *regs)
  {
@@ -1087192,7 +1087132,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        if (!ptrace_event(PT_TRACE_EXEC, PTRACE_EVENT_EXEC, 0) &&
            unlikely(task_ptrace(current) & PT_PTRACED))
                send_sig(SIGTRAP, current, 0);
-@@ -211,6 +225,8 @@ static inline void tracehook_report_exec
+@@ -211,6 +225,8 @@
   */
  static inline void tracehook_report_exit(long *exit_code)
  {
@@ -1087201,7 +1087141,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
  }
  
-@@ -254,6 +270,7 @@ static inline int tracehook_prepare_clon
+@@ -254,6 +270,7 @@
  static inline void tracehook_finish_clone(struct task_struct *child,
                                          unsigned long clone_flags, int trace)
  {
@@ -1087209,7 +1087149,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        ptrace_init_task(child, (clone_flags & CLONE_PTRACE) || trace);
  }
  
-@@ -280,6 +297,8 @@ static inline void tracehook_report_clon
+@@ -280,6 +297,8 @@
                                          unsigned long clone_flags,
                                          pid_t pid, struct task_struct *child)
  {
@@ -1087218,7 +1087158,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        if (unlikely(trace) || unlikely(clone_flags & CLONE_PTRACE)) {
                /*
                 * The child starts up with an immediate SIGSTOP.
-@@ -345,6 +364,11 @@ static inline void tracehook_report_vfor
+@@ -345,6 +364,11 @@
   */
  static inline void tracehook_prepare_release_task(struct task_struct *task)
  {
@@ -1087230,7 +1087170,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
  }
  
  /**
-@@ -358,7 +382,25 @@ static inline void tracehook_prepare_rel
+@@ -358,7 +382,25 @@
   */
  static inline void tracehook_finish_release_task(struct task_struct *task)
  {
@@ -1087256,7 +1087196,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
  }
  
  /**
-@@ -380,6 +422,8 @@ static inline void tracehook_signal_hand
+@@ -380,6 +422,8 @@
                                            const struct k_sigaction *ka,
                                            struct pt_regs *regs, int stepping)
  {
@@ -1087265,7 +1087205,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        if (stepping)
                ptrace_notify(SIGTRAP);
  }
-@@ -400,6 +444,8 @@ static inline int tracehook_consider_ign
+@@ -400,6 +444,8 @@
                                                    int sig,
                                                    void __user *handler)
  {
@@ -1087274,7 +1087214,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return (task_ptrace(task) & PT_PTRACED) != 0;
  }
  
-@@ -421,6 +467,9 @@ static inline int tracehook_consider_fat
+@@ -421,6 +467,9 @@
                                                  int sig,
                                                  void __user *handler)
  {
@@ -1087284,7 +1087224,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return (task_ptrace(task) & PT_PTRACED) != 0;
  }
  
-@@ -435,6 +484,8 @@ static inline int tracehook_consider_fat
+@@ -435,6 +484,8 @@
   */
  static inline int tracehook_force_sigpending(void)
  {
@@ -1087293,7 +1087233,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return 0;
  }
  
-@@ -464,6 +515,8 @@ static inline int tracehook_get_signal(s
+@@ -464,6 +515,8 @@
                                       siginfo_t *info,
                                       struct k_sigaction *return_ka)
  {
@@ -1087302,7 +1087242,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return 0;
  }
  
-@@ -484,6 +537,8 @@ static inline int tracehook_get_signal(s
+@@ -484,6 +537,8 @@
   */
  static inline int tracehook_notify_jctl(int notify, int why)
  {
@@ -1087311,7 +1087251,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        return notify || (current->ptrace & PT_PTRACED);
  }
  
-@@ -507,6 +562,10 @@ static inline int tracehook_notify_jctl(
+@@ -507,6 +562,10 @@
  static inline int tracehook_notify_death(struct task_struct *task,
                                         void **death_cookie, int group_dead)
  {
@@ -1087322,7 +1087262,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
        if (task->exit_signal == -1)
                return task->ptrace ? SIGCHLD : DEATH_REAP;
  
-@@ -543,6 +602,12 @@ static inline void tracehook_report_deat
+@@ -543,6 +602,12 @@
                                          int signal, void *death_cookie,
                                          int group_dead)
  {
@@ -1087335,7 +1087275,7 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
  }
  
  #ifdef TIF_NOTIFY_RESUME
-@@ -572,10 +637,14 @@ static inline void set_notify_resume(str
+@@ -572,10 +637,14 @@
   * asynchronously, this will be called again before we return to
   * user mode.
   *
@@ -1087351,9 +1087291,9 @@ diff -purN linux-2.6.27/include/linux/tracehook.h linux-2.6.27.19-5.1/include/li
  }
  #endif        /* TIF_NOTIFY_RESUME */
  
-diff -purN linux-2.6.27/include/linux/tracepoint.h linux-2.6.27.19-5.1/include/linux/tracepoint.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/tracepoint.h     2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/tracepoint.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/tracepoint.h       Wed May 06 16:56:57 2009 +0100
 @@ -0,0 +1,134 @@
 +#ifndef _LINUX_TRACEPOINT_H
 +#define _LINUX_TRACEPOINT_H
@@ -1087489,9 +1087429,9 @@ diff -purN linux-2.6.27/include/linux/tracepoint.h linux-2.6.27.19-5.1/include/l
 +#define tracepoint_synchronize_unregister() synchronize_sched()
 +
 +#endif
-diff -purN linux-2.6.27/include/linux/unwind.h linux-2.6.27.19-5.1/include/linux/unwind.h
---- linux-2.6.27/include/linux/unwind.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/unwind.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/unwind.h
+--- a/include/linux/unwind.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/unwind.h   Wed May 06 16:56:57 2009 +0100
 @@ -14,6 +14,63 @@
  
  struct module;
@@ -1087556,7 +1087496,7 @@ diff -purN linux-2.6.27/include/linux/unwind.h linux-2.6.27.19-5.1/include/linux
  struct unwind_frame_info {};
  
  static inline void unwind_init(void) {}
-@@ -28,12 +85,12 @@ static inline void *unwind_add_table(str
+@@ -28,11 +85,11 @@
        return NULL;
  }
  
@@ -1087565,22 +1087505,40 @@ diff -purN linux-2.6.27/include/linux/unwind.h linux-2.6.27.19-5.1/include/linux
  static inline void unwind_remove_table(void *handle, int init_only)
  {
  }
--#endif
 -
+-#endif
  static inline int unwind_init_frame_info(struct unwind_frame_info *info,
                                           struct task_struct *tsk,
-                                          const struct pt_regs *regs)
-@@ -65,4 +122,6 @@ static inline int unwind_to_user(struct 
+@@ -65,4 +122,6 @@
        return -ENOSYS;
  }
  
 +#endif
 +
  #endif /* _LINUX_UNWIND_H */
-diff -purN linux-2.6.27/include/linux/usb/ehci_def.h linux-2.6.27.19-5.1/include/linux/usb/ehci_def.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb/ehci_def.h   2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/usb.h
+--- a/include/linux/usb.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/usb.h      Wed May 06 16:56:58 2009 +0100
+@@ -108,6 +108,7 @@
+  *    (in probe()), bound to a driver, or unbinding (in disconnect())
+  * @is_active: flag set when the interface is bound and not suspended.
+  * @sysfs_files_created: sysfs attributes exist
++ * @unregistering: flag set when the interface is being unregistered
+  * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
+  *    capability during autosuspend.
+  * @needs_altsetting0: flag set when a set-interface request for altsetting 0
+@@ -163,6 +164,7 @@
+       enum usb_interface_condition condition;         /* state of binding */
+       unsigned is_active:1;           /* the interface is not suspended */
+       unsigned sysfs_files_created:1; /* the sysfs attributes exist */
++      unsigned unregistering:1;       /* unregistration is in progress */
+       unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
+       unsigned needs_altsetting0:1;   /* switch to altsetting 0 is pending */
+       unsigned needs_binding:1;       /* needs delayed unbind/rebind */
+diff -r 9608d5473017 include/linux/usb/ehci_def.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/usb/ehci_def.h     Wed May 06 16:56:58 2009 +0100
 @@ -0,0 +1,160 @@
 +/*
 + * Copyright (c) 2001-2002 by David Brownell
@@ -1087742,28 +1087700,9 @@ diff -purN linux-2.6.27/include/linux/usb/ehci_def.h linux-2.6.27.19-5.1/include
 +} __attribute__ ((packed));
 +
 +#endif /* __LINUX_USB_EHCI_DEF_H */
-diff -purN linux-2.6.27/include/linux/usb.h linux-2.6.27.19-5.1/include/linux/usb.h
---- linux-2.6.27/include/linux/usb.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb.h    2009-03-25 16:11:49.000000000 +0000
-@@ -108,6 +108,7 @@ enum usb_interface_condition {
-  *    (in probe()), bound to a driver, or unbinding (in disconnect())
-  * @is_active: flag set when the interface is bound and not suspended.
-  * @sysfs_files_created: sysfs attributes exist
-+ * @unregistering: flag set when the interface is being unregistered
-  * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
-  *    capability during autosuspend.
-  * @needs_altsetting0: flag set when a set-interface request for altsetting 0
-@@ -163,6 +164,7 @@ struct usb_interface {
-       enum usb_interface_condition condition;         /* state of binding */
-       unsigned is_active:1;           /* the interface is not suspended */
-       unsigned sysfs_files_created:1; /* the sysfs attributes exist */
-+      unsigned unregistering:1;       /* unregistration is in progress */
-       unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
-       unsigned needs_altsetting0:1;   /* switch to altsetting 0 is pending */
-       unsigned needs_binding:1;       /* needs delayed unbind/rebind */
-diff -purN linux-2.6.27/include/linux/usb_usual.h linux-2.6.27.19-5.1/include/linux/usb_usual.h
---- linux-2.6.27/include/linux/usb_usual.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/usb_usual.h      2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/usb_usual.h
+--- a/include/linux/usb_usual.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/usb_usual.h        Wed May 06 16:56:58 2009 +0100
 @@ -52,8 +52,9 @@
        US_FLAG(MAX_SECTORS_MIN,0x00002000)                     \
                /* Sets max_sectors to arch min */              \
@@ -1087776,9 +1087715,9 @@ diff -purN linux-2.6.27/include/linux/usb_usual.h linux-2.6.27.19-5.1/include/li
  
  #define US_FLAG(name, value)  US_FL_##name = value ,
  enum { US_DO_ALL_FLAGS };
-diff -purN linux-2.6.27/include/linux/utrace.h linux-2.6.27.19-5.1/include/linux/utrace.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/utrace.h 2009-03-25 16:11:49.000000000 +0000
+diff -r 9608d5473017 include/linux/utrace.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/linux/utrace.h   Wed May 06 16:56:58 2009 +0100
 @@ -0,0 +1,711 @@
 +/*
 + * utrace infrastructure interface for debugging user processes
@@ -1088491,9 +1088430,9 @@ diff -purN linux-2.6.27/include/linux/utrace.h linux-2.6.27.19-5.1/include/linux
 +#endif        /* CONFIG_UTRACE */
 +
 +#endif        /* linux/utrace.h */
-diff -purN linux-2.6.27/include/linux/vermagic.h linux-2.6.27.19-5.1/include/linux/vermagic.h
---- linux-2.6.27/include/linux/vermagic.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/vermagic.h       2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/vermagic.h
+--- a/include/linux/vermagic.h Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/vermagic.h Wed May 06 16:56:58 2009 +0100
 @@ -22,6 +22,11 @@
  #else
  #define MODULE_VERMAGIC_MODVERSIONS ""
@@ -1088513,10 +1088452,10 @@ diff -purN linux-2.6.27/include/linux/vermagic.h linux-2.6.27.19-5.1/include/lin
 -      MODULE_ARCH_VERMAGIC
 +      MODULE_VERMAGIC_XEN MODULE_ARCH_VERMAGIC
  
-diff -purN linux-2.6.27/include/linux/wait.h linux-2.6.27.19-5.1/include/linux/wait.h
---- linux-2.6.27/include/linux/wait.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/wait.h   2009-03-25 16:11:48.000000000 +0000
-@@ -141,6 +141,8 @@ static inline void __remove_wait_queue(w
+diff -r 9608d5473017 include/linux/wait.h
+--- a/include/linux/wait.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/wait.h     Wed May 06 16:56:58 2009 +0100
+@@ -141,6 +141,8 @@
        list_del(&old->task_list);
  }
  
@@ -1088525,7 +1088464,7 @@ diff -purN linux-2.6.27/include/linux/wait.h linux-2.6.27.19-5.1/include/linux/w
  void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
  extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
  extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
-@@ -342,16 +344,19 @@ do {                                                                     \
+@@ -342,16 +344,19 @@
        for (;;) {                                                      \
                prepare_to_wait_exclusive(&wq, &__wait,                 \
                                        TASK_INTERRUPTIBLE);            \
@@ -1088547,7 +1088486,7 @@ diff -purN linux-2.6.27/include/linux/wait.h linux-2.6.27.19-5.1/include/linux/w
  } while (0)
  
  #define wait_event_interruptible_exclusive(wq, condition)             \
-@@ -440,6 +445,8 @@ extern long interruptible_sleep_on_timeo
+@@ -440,6 +445,8 @@
  void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
  void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
  void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
@@ -1088556,10 +1088495,10 @@ diff -purN linux-2.6.27/include/linux/wait.h linux-2.6.27.19-5.1/include/linux/w
  int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
  int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
  
-diff -purN linux-2.6.27/include/linux/writeback.h linux-2.6.27.19-5.1/include/linux/writeback.h
---- linux-2.6.27/include/linux/writeback.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/writeback.h      2009-03-25 16:11:50.000000000 +0000
-@@ -30,7 +30,7 @@ static inline int task_is_pdflush(struct
+diff -r 9608d5473017 include/linux/writeback.h
+--- a/include/linux/writeback.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/writeback.h        Wed May 06 16:56:58 2009 +0100
+@@ -30,7 +30,7 @@
  enum writeback_sync_modes {
        WB_SYNC_NONE,   /* Don't wait on anything */
        WB_SYNC_ALL,    /* Wait on every mapping */
@@ -1088568,9 +1088507,9 @@ diff -purN linux-2.6.27/include/linux/writeback.h linux-2.6.27.19-5.1/include/li
  };
  
  /*
-diff -purN linux-2.6.27/include/linux/xattr.h linux-2.6.27.19-5.1/include/linux/xattr.h
---- linux-2.6.27/include/linux/xattr.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/linux/xattr.h  2009-03-25 16:11:48.000000000 +0000
+diff -r 9608d5473017 include/linux/xattr.h
+--- a/include/linux/xattr.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/linux/xattr.h    Wed May 06 16:56:58 2009 +0100
 @@ -16,6 +16,8 @@
  #ifdef  __KERNEL__
  
@@ -1088580,7 +1088519,7 @@ diff -purN linux-2.6.27/include/linux/xattr.h linux-2.6.27.19-5.1/include/linux/
  
  /* Namespaces */
  #define XATTR_OS2_PREFIX "os2."
-@@ -47,10 +49,10 @@ struct xattr_handler {
+@@ -47,10 +49,10 @@
  };
  
  ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
@@ -1088595,10 +1088534,10 @@ diff -purN linux-2.6.27/include/linux/xattr.h linux-2.6.27.19-5.1/include/linux/
  
  ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size);
  ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size);
-diff -purN linux-2.6.27/include/math-emu/op-common.h linux-2.6.27.19-5.1/include/math-emu/op-common.h
---- linux-2.6.27/include/math-emu/op-common.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/math-emu/op-common.h   2009-03-25 16:11:51.000000000 +0000
-@@ -139,18 +139,27 @@ do {                                                             \
+diff -r 9608d5473017 include/math-emu/op-common.h
+--- a/include/math-emu/op-common.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/math-emu/op-common.h     Wed May 06 16:56:58 2009 +0100
+@@ -139,18 +139,27 @@
        if (X##_e <= _FP_WFRACBITS_##fs)                        \
          {                                                     \
            _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs);    \
@@ -1088630,9 +1088569,9 @@ diff -purN linux-2.6.27/include/math-emu/op-common.h linux-2.6.27.19-5.1/include
              }                                                 \
            if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) ||          \
                (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW))     \
-diff -purN linux-2.6.27/include/net/af_unix.h linux-2.6.27.19-5.1/include/net/af_unix.h
---- linux-2.6.27/include/net/af_unix.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/af_unix.h  2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/af_unix.h
+--- a/include/net/af_unix.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/net/af_unix.h    Wed May 06 16:56:58 2009 +0100
 @@ -9,6 +9,7 @@
  extern void unix_inflight(struct file *fp);
  extern void unix_notinflight(struct file *fp);
@@ -1088641,7 +1088580,7 @@ diff -purN linux-2.6.27/include/net/af_unix.h linux-2.6.27.19-5.1/include/net/af
  
  #define UNIX_HASH_SIZE        256
  
-@@ -54,6 +55,7 @@ struct unix_sock {
+@@ -54,6 +55,7 @@
          atomic_long_t           inflight;
          spinlock_t            lock;
        unsigned int            gc_candidate : 1;
@@ -1088649,9 +1088588,9 @@ diff -purN linux-2.6.27/include/net/af_unix.h linux-2.6.27.19-5.1/include/net/af
          wait_queue_head_t       peer_wait;
  };
  #define unix_sk(__sk) ((struct unix_sock *)__sk)
-diff -purN linux-2.6.27/include/net/dcbnl.h linux-2.6.27.19-5.1/include/net/dcbnl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/dcbnl.h    2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/dcbnl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/net/dcbnl.h      Wed May 06 16:56:58 2009 +0100
 @@ -0,0 +1,40 @@
 +#ifndef __NET_DCBNL_H__
 +#define __NET_DCBNL_H__
@@ -1088693,20 +1088632,19 @@ diff -purN linux-2.6.27/include/net/dcbnl.h linux-2.6.27.19-5.1/include/net/dcbn
 +};
 +
 +#endif /* __NET_DCBNL_H__ */
-diff -purN linux-2.6.27/include/net/inet_frag.h linux-2.6.27.19-5.1/include/net/inet_frag.h
---- linux-2.6.27/include/net/inet_frag.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/inet_frag.h        2009-03-25 16:11:45.000000000 +0000
-@@ -1,6 +1,9 @@
+diff -r 9608d5473017 include/net/inet_frag.h
+--- a/include/net/inet_frag.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/net/inet_frag.h  Wed May 06 16:56:58 2009 +0100
+@@ -1,5 +1,8 @@
  #ifndef __NET_FRAG_H__
  #define __NET_FRAG_H__
++
 +#include <linux/reserve.h>
 +#include <linux/mutex.h>
-+
  struct netns_frags {
        int                     nqueues;
-       atomic_t                mem;
-@@ -10,6 +13,10 @@ struct netns_frags {
+@@ -10,6 +13,10 @@
        int                     timeout;
        int                     high_thresh;
        int                     low_thresh;
@@ -1088717,10 +1088655,10 @@ diff -purN linux-2.6.27/include/net/inet_frag.h linux-2.6.27.19-5.1/include/net/
  };
  
  struct inet_frag_queue {
-diff -purN linux-2.6.27/include/net/netns/ipv6.h linux-2.6.27.19-5.1/include/net/netns/ipv6.h
---- linux-2.6.27/include/net/netns/ipv6.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/netns/ipv6.h       2009-03-25 16:11:45.000000000 +0000
-@@ -24,6 +24,8 @@ struct netns_sysctl_ipv6 {
+diff -r 9608d5473017 include/net/netns/ipv6.h
+--- a/include/net/netns/ipv6.h Wed May 06 15:47:13 2009 +0100
++++ b/include/net/netns/ipv6.h Wed May 06 16:56:58 2009 +0100
+@@ -24,6 +24,8 @@
        int ip6_rt_mtu_expires;
        int ip6_rt_min_advmss;
        int icmpv6_time;
@@ -1088729,7 +1088667,7 @@ diff -purN linux-2.6.27/include/net/netns/ipv6.h linux-2.6.27.19-5.1/include/net
  };
  
  struct netns_ipv6 {
-@@ -55,5 +57,7 @@ struct netns_ipv6 {
+@@ -55,5 +57,7 @@
        struct sock             *ndisc_sk;
        struct sock             *tcp_sk;
        struct sock             *igmp_sk;
@@ -1088737,9 +1088675,9 @@ diff -purN linux-2.6.27/include/net/netns/ipv6.h linux-2.6.27.19-5.1/include/net
 +      struct mem_reserve      ip6_rt_reserve;
  };
  #endif
-diff -purN linux-2.6.27/include/net/scm.h linux-2.6.27.19-5.1/include/net/scm.h
---- linux-2.6.27/include/net/scm.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/scm.h      2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/scm.h
+--- a/include/net/scm.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/net/scm.h        Wed May 06 16:56:58 2009 +0100
 @@ -14,8 +14,9 @@
  
  struct scm_fp_list
@@ -1088752,19 +1088690,19 @@ diff -purN linux-2.6.27/include/net/scm.h linux-2.6.27.19-5.1/include/net/scm.h
  };
  
  struct scm_cookie
-diff -purN linux-2.6.27/include/net/sctp/checksum.h linux-2.6.27.19-5.1/include/net/sctp/checksum.h
---- linux-2.6.27/include/net/sctp/checksum.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/sctp/checksum.h    2009-03-25 16:11:45.000000000 +0000
-@@ -79,5 +79,5 @@ static inline __be32 sctp_update_cksum(_
+diff -r 9608d5473017 include/net/sctp/checksum.h
+--- a/include/net/sctp/checksum.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/net/sctp/checksum.h      Wed May 06 16:56:58 2009 +0100
+@@ -79,5 +79,5 @@
  
  static inline __be32 sctp_end_cksum(__be32 crc32)
  {
 -      return ~crc32;
 +      return (__force __be32)~cpu_to_le32((__force u32)crc32);
  }
-diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.h
---- linux-2.6.27/include/net/sock.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/sock.h     2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/sock.h
+--- a/include/net/sock.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/net/sock.h       Wed May 06 16:56:59 2009 +0100
 @@ -50,6 +50,7 @@
  #include <linux/skbuff.h>     /* struct sk_buff */
  #include <linux/mm.h>
@@ -1088773,7 +1088711,7 @@ diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.
  
  #include <linux/filter.h>
  
-@@ -413,6 +414,7 @@ enum sock_flags {
+@@ -413,6 +414,7 @@
        SOCK_RCVTSTAMPNS, /* %SO_TIMESTAMPNS setting */
        SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */
        SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
@@ -1088781,10 +1088719,12 @@ diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.
  };
  
  static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
-@@ -435,6 +437,50 @@ static inline int sock_flag(struct sock 
+@@ -433,6 +435,50 @@
+ static inline int sock_flag(struct sock *sk, enum sock_flags flag)
+ {
        return test_bit(flag, &sk->sk_flags);
- }
++}
++
 +static inline int sk_has_memalloc(struct sock *sk)
 +{
 +      return sock_flag(sk, SOCK_MEMALLOC);
@@ -1088827,15 +1088767,15 @@ diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.
 +static inline gfp_t sk_allocation(struct sock *sk, gfp_t gfp_mask)
 +{
 +      return gfp_mask | (sk->sk_allocation & __GFP_MEMALLOC);
-+}
-+
- static inline void sk_acceptq_removed(struct sock *sk)
- {
-       sk->sk_ack_backlog--;
-@@ -482,6 +528,16 @@ static inline void sk_add_backlog(struct
-       skb->next = NULL;
  }
  
+ static inline void sk_acceptq_removed(struct sock *sk)
+@@ -480,6 +526,16 @@
+               sk->sk_backlog.tail = skb;
+       }
+       skb->next = NULL;
++}
++
 +extern int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb);
 +
 +static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
@@ -1088844,12 +1088784,10 @@ diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.
 +              return __sk_backlog_rcv(sk, skb);
 +
 +      return sk->sk_backlog_rcv(sk, skb);
-+}
-+
+ }
  #define sk_wait_event(__sk, __timeo, __condition)                     \
-       ({      int __rc;                                               \
-               release_sock(__sk);                                     \
-@@ -737,12 +793,13 @@ static inline int sk_wmem_schedule(struc
+@@ -737,12 +793,13 @@
                __sk_mem_schedule(sk, size, SK_MEM_SEND);
  }
  
@@ -1088866,9 +1088804,9 @@ diff -purN linux-2.6.27/include/net/sock.h linux-2.6.27.19-5.1/include/net/sock.
  }
  
  static inline void sk_mem_reclaim(struct sock *sk)
-diff -purN linux-2.6.27/include/net/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/include/net/tc_act/tc_skbedit.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/tc_act/tc_skbedit.h        2009-03-25 16:11:45.000000000 +0000
+diff -r 9608d5473017 include/net/tc_act/tc_skbedit.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/net/tc_act/tc_skbedit.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,34 @@
 +/*
 + * Copyright (c) 2008, Intel Corporation.
@@ -1088904,10 +1088842,10 @@ diff -purN linux-2.6.27/include/net/tc_act/tc_skbedit.h linux-2.6.27.19-5.1/incl
 +      container_of(pc, struct tcf_skbedit, common)
 +
 +#endif /* __NET_TC_SKBEDIT_H */
-diff -purN linux-2.6.27/include/net/tcp.h linux-2.6.27.19-5.1/include/net/tcp.h
---- linux-2.6.27/include/net/tcp.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/net/tcp.h      2009-03-25 16:11:45.000000000 +0000
-@@ -894,7 +894,7 @@ static inline int tcp_prequeue(struct so
+diff -r 9608d5473017 include/net/tcp.h
+--- a/include/net/tcp.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/net/tcp.h        Wed May 06 16:56:59 2009 +0100
+@@ -894,7 +894,7 @@
                        BUG_ON(sock_owned_by_user(sk));
  
                        while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
@@ -1088916,9 +1088854,9 @@ diff -purN linux-2.6.27/include/net/tcp.h linux-2.6.27.19-5.1/include/net/tcp.h
                                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPPREQUEUEDROPPED);
                        }
  
-diff -purN linux-2.6.27/include/scsi/fc/fc_els.h linux-2.6.27.19-5.1/include/scsi/fc/fc_els.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_els.h       2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_els.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_els.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,816 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1089736,9 +1089674,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_els.h linux-2.6.27.19-5.1/include/scs
 +};
 +
 +#endif /* _FC_ELS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_encaps.h linux-2.6.27.19-5.1/include/scsi/fc/fc_encaps.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_encaps.h    2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_encaps.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_encaps.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,138 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1089878,9 +1089816,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_encaps.h linux-2.6.27.19-5.1/include/
 +}
 +
 +#endif /* _FC_ENCAPS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fc2.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fc2.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fc2.h       2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fc2.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fc2.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,124 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090006,9 +1089944,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_fc2.h linux-2.6.27.19-5.1/include/scs
 +#define ESB_ST_PRI_INUSE    (1 << 21)   /* priority / preemption in use */
 +
 +#endif /* _FC_FC2_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fcoe.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fcoe.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fcoe.h      2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fcoe.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fcoe.h        Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,114 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090124,9 +1090062,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_fcoe.h linux-2.6.27.19-5.1/include/sc
 +}
 +
 +#endif /* _FC_FCOE_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fcp.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fcp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fcp.h       2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fcp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fcp.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,199 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090327,9 +1090265,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_fcp.h linux-2.6.27.19-5.1/include/scs
 +};
 +
 +#endif /* _FC_FCP_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_fs.h linux-2.6.27.19-5.1/include/scsi/fc/fc_fs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_fs.h        2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_fs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_fs.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,345 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090676,9 +1090614,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_fs.h linux-2.6.27.19-5.1/include/scsi
 +#define FC_DEF_R_A_TOV        10000UL
 +
 +#endif /* _FC_FS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_gs.h linux-2.6.27.19-5.1/include/scsi/fc/fc_gs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_gs.h        2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_gs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_gs.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,93 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090773,9 +1090711,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_gs.h linux-2.6.27.19-5.1/include/scsi
 +};
 +
 +#endif /* _FC_GS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc/fc_ns.h linux-2.6.27.19-5.1/include/scsi/fc/fc_ns.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc/fc_ns.h        2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc/fc_ns.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc/fc_ns.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,159 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1090936,9 +1090874,9 @@ diff -purN linux-2.6.27/include/scsi/fc/fc_ns.h linux-2.6.27.19-5.1/include/scsi
 +} __attribute__((__packed__));
 +
 +#endif /* _FC_NS_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_encode.h linux-2.6.27.19-5.1/include/scsi/fc_encode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_encode.h       2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_encode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_encode.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,309 @@
 +/*
 + * Copyright(c) 2008 Intel Corporation. All rights reserved.
@@ -1091249,9 +1091187,9 @@ diff -purN linux-2.6.27/include/scsi/fc_encode.h linux-2.6.27.19-5.1/include/scs
 +      return 0;
 +}
 +#endif /* _FC_ENCODE_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_frame.h linux-2.6.27.19-5.1/include/scsi/fc_frame.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_frame.h        2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_frame.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_frame.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,242 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1091495,9 +1091433,9 @@ diff -purN linux-2.6.27/include/scsi/fc_frame.h linux-2.6.27.19-5.1/include/scsi
 +void fc_frame_leak_check(void);
 +
 +#endif /* _FC_FRAME_H_ */
-diff -purN linux-2.6.27/include/scsi/fc_transport_fcoe.h linux-2.6.27.19-5.1/include/scsi/fc_transport_fcoe.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/fc_transport_fcoe.h       2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/fc_transport_fcoe.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/fc_transport_fcoe.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,54 @@
 +#ifndef FC_TRANSPORT_FCOE_H
 +#define FC_TRANSPORT_FCOE_H
@@ -1091553,10 +1091491,10 @@ diff -purN linux-2.6.27/include/scsi/fc_transport_fcoe.h linux-2.6.27.19-5.1/inc
 +/* fcow_sw is the default transport */
 +extern struct fcoe_transport fcoe_sw_transport;
 +#endif /* FC_TRANSPORT_FCOE_H */
-diff -purN linux-2.6.27/include/scsi/iscsi_if.h linux-2.6.27.19-5.1/include/scsi/iscsi_if.h
---- linux-2.6.27/include/scsi/iscsi_if.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/iscsi_if.h        2009-03-25 16:11:50.000000000 +0000
-@@ -213,6 +213,7 @@ enum iscsi_err {
+diff -r 9608d5473017 include/scsi/iscsi_if.h
+--- a/include/scsi/iscsi_if.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/iscsi_if.h  Wed May 06 16:56:59 2009 +0100
+@@ -213,6 +213,7 @@
        ISCSI_ERR_DATA_DGST             = ISCSI_ERR_BASE + 15,
        ISCSI_ERR_PARAM_NOT_FOUND       = ISCSI_ERR_BASE + 16,
        ISCSI_ERR_NO_SCSI_CMD           = ISCSI_ERR_BASE + 17,
@@ -1091564,7 +1091502,7 @@ diff -purN linux-2.6.27/include/scsi/iscsi_if.h linux-2.6.27.19-5.1/include/scsi
  };
  
  /*
-@@ -333,6 +334,7 @@ enum iscsi_host_param {
+@@ -333,6 +334,7 @@
  #define CAP_FW_DB             0x200
  #define CAP_SENDTARGETS_OFFLOAD       0x400
  #define CAP_DATA_PATH_OFFLOAD 0x800
@@ -1091572,9 +1091510,9 @@ diff -purN linux-2.6.27/include/scsi/iscsi_if.h linux-2.6.27.19-5.1/include/scsi
  
  /*
   * These flags describes reason of stop_conn() call
-diff -purN linux-2.6.27/include/scsi/libfc.h linux-2.6.27.19-5.1/include/scsi/libfc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libfc.h   2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/libfc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/libfc.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,930 @@
 +/*
 + * Copyright(c) 2007 Intel Corporation. All rights reserved.
@@ -1092506,9 +1092444,9 @@ diff -purN linux-2.6.27/include/scsi/libfc.h linux-2.6.27.19-5.1/include/scsi/li
 +void fc_destroy_rport(void);
 +
 +#endif /* _LIBFC_H_ */
-diff -purN linux-2.6.27/include/scsi/libfcoe.h linux-2.6.27.19-5.1/include/scsi/libfcoe.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libfcoe.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/libfcoe.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/libfcoe.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,177 @@
 +/*
 + * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
@@ -1092687,10 +1092625,10 @@ diff -purN linux-2.6.27/include/scsi/libfcoe.h linux-2.6.27.19-5.1/include/scsi/
 +int __init fcoe_sw_init(void);
 +int __exit fcoe_sw_exit(void);
 +#endif /* _LIBFCOE_H */
-diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi/libiscsi.h
---- linux-2.6.27/include/scsi/libiscsi.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/libiscsi.h        2009-03-25 16:11:51.000000000 +0000
-@@ -75,7 +75,7 @@ enum {
+diff -r 9608d5473017 include/scsi/libiscsi.h
+--- a/include/scsi/libiscsi.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/libiscsi.h  Wed May 06 16:56:59 2009 +0100
+@@ -75,7 +75,7 @@
  /* this must be a power of two greater than ISCSI_MGMT_CMDS_MAX */
  #define ISCSI_TOTAL_CMDS_MIN          16
  #define ISCSI_AGE_SHIFT                       28
@@ -1092699,7 +1092637,7 @@ diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi
  
  #define ISCSI_ADDRESS_BUF_LEN         64
  
-@@ -287,6 +287,10 @@ struct iscsi_session {
+@@ -287,6 +287,10 @@
        struct iscsi_pool       cmdpool;        /* PDU's pool */
  };
  
@@ -1092710,7 +1092648,7 @@ diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi
  struct iscsi_host {
        char                    *initiatorname;
        /* hw address or netdev iscsi connection is bound to */
-@@ -295,6 +299,13 @@ struct iscsi_host {
+@@ -295,6 +299,13 @@
        /* local address */
        int                     local_port;
        char                    local_address[ISCSI_ADDRESS_BUF_LEN];
@@ -1092724,7 +1092662,7 @@ diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi
  };
  
  /*
-@@ -351,6 +362,8 @@ extern void iscsi_conn_stop(struct iscsi
+@@ -351,6 +362,8 @@
  extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
                           int);
  extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
@@ -1092733,7 +1092671,7 @@ diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi
  extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
                                enum iscsi_param param, char *buf);
  extern void iscsi_suspend_tx(struct iscsi_conn *conn);
-@@ -373,8 +386,10 @@ extern int __iscsi_complete_pdu(struct i
+@@ -373,8 +386,10 @@
                                char *, int);
  extern int iscsi_verify_itt(struct iscsi_conn *, itt_t);
  extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t);
@@ -1092744,10 +1092682,10 @@ diff -purN linux-2.6.27/include/scsi/libiscsi.h linux-2.6.27.19-5.1/include/scsi
  extern void __iscsi_get_task(struct iscsi_task *task);
  
  /*
-diff -purN linux-2.6.27/include/scsi/scsi.h linux-2.6.27.19-5.1/include/scsi/scsi.h
---- linux-2.6.27/include/scsi/scsi.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi.h    2009-03-25 16:11:51.000000000 +0000
-@@ -381,6 +381,11 @@ static inline int scsi_is_wlun(unsigned 
+diff -r 9608d5473017 include/scsi/scsi.h
+--- a/include/scsi/scsi.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi.h      Wed May 06 16:56:59 2009 +0100
+@@ -381,6 +381,11 @@
  #define DID_IMM_RETRY   0x0c  /* Retry without decrementing retry count  */
  #define DID_REQUEUE   0x0d    /* Requeue command (no immediate retry) also
                                 * without decrementing the retry count    */
@@ -1092759,7 +1092697,7 @@ diff -purN linux-2.6.27/include/scsi/scsi.h linux-2.6.27.19-5.1/include/scsi/scs
  #define DRIVER_OK       0x00  /* Driver status                           */
  
  /*
-@@ -426,6 +431,7 @@ static inline int scsi_is_wlun(unsigned 
+@@ -426,6 +431,7 @@
  #define SCSI_MLQUEUE_HOST_BUSY   0x1055
  #define SCSI_MLQUEUE_DEVICE_BUSY 0x1056
  #define SCSI_MLQUEUE_EH_RETRY    0x1057
@@ -1092767,10 +1092705,10 @@ diff -purN linux-2.6.27/include/scsi/scsi.h linux-2.6.27.19-5.1/include/scsi/scs
  
  /*
   *  Use these to separate status msg and our bytes
-diff -purN linux-2.6.27/include/scsi/scsi_cmnd.h linux-2.6.27.19-5.1/include/scsi/scsi_cmnd.h
---- linux-2.6.27/include/scsi/scsi_cmnd.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_cmnd.h       2009-03-25 16:11:50.000000000 +0000
-@@ -75,7 +75,6 @@ struct scsi_cmnd {
+diff -r 9608d5473017 include/scsi/scsi_cmnd.h
+--- a/include/scsi/scsi_cmnd.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_cmnd.h Wed May 06 16:56:59 2009 +0100
+@@ -75,7 +75,6 @@
  
        int retries;
        int allowed;
@@ -1092778,7 +1092716,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_cmnd.h linux-2.6.27.19-5.1/include/scs
  
        unsigned char prot_op;
        unsigned char prot_type;
-@@ -86,7 +85,6 @@ struct scsi_cmnd {
+@@ -86,7 +85,6 @@
        /* These elements define the operation we are about to perform */
        unsigned char *cmnd;
  
@@ -1092786,7 +1092724,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_cmnd.h linux-2.6.27.19-5.1/include/scs
  
        /* These elements define the operation we ultimately want to perform */
        struct scsi_data_buffer sdb;
-@@ -139,7 +137,6 @@ extern void scsi_put_command(struct scsi
+@@ -139,7 +137,6 @@
  extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *,
                               struct device *);
  extern void scsi_finish_command(struct scsi_cmnd *cmd);
@@ -1092794,10 +1092732,10 @@ diff -purN linux-2.6.27/include/scsi/scsi_cmnd.h linux-2.6.27.19-5.1/include/scs
  
  extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
                                 size_t *offset, size_t *len);
-diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/scsi/scsi_device.h
---- linux-2.6.27/include/scsi/scsi_device.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_device.h     2009-03-25 16:11:51.000000000 +0000
-@@ -42,9 +42,11 @@ enum scsi_device_state {
+diff -r 9608d5473017 include/scsi/scsi_device.h
+--- a/include/scsi/scsi_device.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_device.h       Wed May 06 16:56:59 2009 +0100
+@@ -42,9 +42,11 @@
                                 * originate in the mid-layer) */
        SDEV_OFFLINE,           /* Device offlined (by error handling or
                                 * user request */
@@ -1092812,7 +1092750,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
  };
  
  enum scsi_device_event {
-@@ -94,7 +96,8 @@ struct scsi_device {
+@@ -94,7 +96,8 @@
        void *hostdata;         /* available to low-level driver */
        char type;
        char scsi_level;
@@ -1092822,7 +1092760,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
        unsigned char inquiry_len;      /* valid bytes in 'inquiry' */
        unsigned char * inquiry;        /* INQUIRY response data */
        const char * vendor;            /* [back_compat] point into 'inquiry' ... */
-@@ -157,8 +160,6 @@ struct scsi_device {
+@@ -157,8 +160,6 @@
        atomic_t iodone_cnt;
        atomic_t ioerr_cnt;
  
@@ -1092831,7 +1092769,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
        struct device           sdev_gendev,
                                sdev_dev;
  
-@@ -172,6 +173,7 @@ struct scsi_device {
+@@ -172,6 +173,7 @@
  struct scsi_dh_devlist {
        char *vendor;
        char *model;
@@ -1092839,7 +1092777,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
  };
  
  struct scsi_device_handler {
-@@ -236,6 +238,16 @@ struct scsi_target {
+@@ -236,6 +238,16 @@
                                                 * for the device at a time. */
        unsigned int            pdt_1f_for_no_lun;      /* PDT = 0x1f */
                                                /* means no lun present */
@@ -1092856,7 +1092794,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
  
        char                    scsi_level;
        struct execute_work     ew;
-@@ -384,9 +396,23 @@ static inline unsigned int sdev_id(struc
+@@ -384,9 +396,23 @@
  #define scmd_id(scmd) sdev_id((scmd)->device)
  #define scmd_channel(scmd) sdev_channel((scmd)->device)
  
@@ -1092881,34 +1092819,34 @@ diff -purN linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27.19-5.1/include/s
  }
  
  /* accessor functions for the SCSI parameters */
-diff -purN linux-2.6.27/include/scsi/scsi_driver.h linux-2.6.27.19-5.1/include/scsi/scsi_driver.h
---- linux-2.6.27/include/scsi/scsi_driver.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_driver.h     2009-03-25 16:11:50.000000000 +0000
-@@ -32,5 +32,6 @@ int scsi_setup_blk_pc_cmnd(struct scsi_d
+diff -r 9608d5473017 include/scsi/scsi_driver.h
+--- a/include/scsi/scsi_driver.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_driver.h       Wed May 06 16:56:59 2009 +0100
+@@ -32,5 +32,6 @@
  int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
  int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
  int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
 +int scsi_prep_fn(struct request_queue *, struct request *);
  
  #endif /* _SCSI_SCSI_DRIVER_H */
-diff -purN linux-2.6.27/include/scsi/scsi_host.h linux-2.6.27.19-5.1/include/scsi/scsi_host.h
---- linux-2.6.27/include/scsi/scsi_host.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_host.h       2009-03-25 16:11:50.000000000 +0000
-@@ -43,13 +43,6 @@ struct blk_queue_tags;
+diff -r 9608d5473017 include/scsi/scsi_host.h
+--- a/include/scsi/scsi_host.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_host.h Wed May 06 16:56:59 2009 +0100
+@@ -42,13 +42,6 @@
  #define DISABLE_CLUSTERING 0
  #define ENABLE_CLUSTERING 1
+-
 -enum scsi_eh_timer_return {
 -      EH_NOT_HANDLED,
 -      EH_HANDLED,
 -      EH_RESET_TIMER,
 -};
 -
--
  struct scsi_host_template {
        struct module *module;
-       const char *name;
-@@ -347,7 +340,7 @@ struct scsi_host_template {
+@@ -347,7 +340,7 @@
         *
         * Status: OPTIONAL
         */
@@ -1092917,7 +1092855,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_host.h linux-2.6.27.19-5.1/include/scs
  
        /*
         * Name of proc directory
-@@ -696,6 +689,10 @@ static inline void *shost_priv(struct Sc
+@@ -696,6 +689,10 @@
  
  int scsi_is_host_device(const struct device *);
  
@@ -1092928,10 +1092866,12 @@ diff -purN linux-2.6.27/include/scsi/scsi_host.h linux-2.6.27.19-5.1/include/scs
  static inline struct Scsi_Host *dev_to_shost(struct device *dev)
  {
        while (!scsi_is_host_device(dev)) {
-@@ -706,6 +703,26 @@ static inline struct Scsi_Host *dev_to_s
+@@ -704,6 +701,26 @@
+               dev = dev->parent;
+       }
        return container_of(dev, struct Scsi_Host, shost_gendev);
- }
++}
++
 +/*
 + * walks object list backward, to find the first physical
 + * device object. If none is found return the original device.
@@ -1092950,14 +1092890,12 @@ diff -purN linux-2.6.27/include/scsi/scsi_host.h linux-2.6.27.19-5.1/include/scs
 +              dev = dev->parent;
 +      }
 +      return dev?dev:orig;
-+}
-+
+ }
  static inline int scsi_host_in_recovery(struct Scsi_Host *shost)
- {
-       return shost->shost_state == SHOST_RECOVERY ||
-diff -purN linux-2.6.27/include/scsi/scsi_netlink.h linux-2.6.27.19-5.1/include/scsi/scsi_netlink.h
---- linux-2.6.27/include/scsi/scsi_netlink.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_netlink.h    2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_netlink.h
+--- a/include/scsi/scsi_netlink.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_netlink.h      Wed May 06 16:56:59 2009 +0100
 @@ -22,6 +22,9 @@
  #ifndef SCSI_NETLINK_H
  #define SCSI_NETLINK_H
@@ -1092978,17 +1092916,17 @@ diff -purN linux-2.6.27/include/scsi/scsi_netlink.h linux-2.6.27.19-5.1/include/
  
  
  /* SCSI_TRANSPORT_MSG event message header */
-@@ -53,9 +57,44 @@ struct scsi_nl_hdr {
+@@ -53,9 +57,44 @@
  /* scsi_nl_hdr->transport value */
  #define SCSI_NL_TRANSPORT                     0
  #define SCSI_NL_TRANSPORT_FC                  1
 -#define SCSI_NL_MAX_TRANSPORTS                        2
 +#define SCSI_NL_TRANSPORT_ML                  2
 +#define SCSI_NL_MAX_TRANSPORTS                        3
-+
-+/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */
  
 -/* scsi_nl_hdr->msgtype values are defined in each transport */
++/* Transport-based scsi_nl_hdr->msgtype values are defined in each transport */
++
 +/*
 + * GENERIC SCSI scsi_nl_hdr->msgtype Values
 + */
@@ -1093025,7 +1092963,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_netlink.h linux-2.6.27.19-5.1/include/
  
  
  /*
-@@ -83,5 +122,28 @@ struct scsi_nl_hdr {
+@@ -83,5 +122,28 @@
        }
  
  
@@ -1093054,9 +1092992,9 @@ diff -purN linux-2.6.27/include/scsi/scsi_netlink.h linux-2.6.27.19-5.1/include/
 +
  #endif /* SCSI_NETLINK_H */
  
-diff -purN linux-2.6.27/include/scsi/scsi_netlink_ml.h linux-2.6.27.19-5.1/include/scsi/scsi_netlink_ml.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_netlink_ml.h 2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_netlink_ml.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/scsi/scsi_netlink_ml.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,64 @@
 +/*
 + *  SCSI Midlayer Netlink Interface
@@ -1093122,9 +1093060,9 @@ diff -purN linux-2.6.27/include/scsi/scsi_netlink_ml.h linux-2.6.27.19-5.1/inclu
 +
 +#endif /* SCSI_NETLINK_ML_H */
 +
-diff -purN linux-2.6.27/include/scsi/scsi_transport.h linux-2.6.27.19-5.1/include/scsi/scsi_transport.h
---- linux-2.6.27/include/scsi/scsi_transport.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport.h  2009-03-25 16:11:50.000000000 +0000
+diff -r 9608d5473017 include/scsi/scsi_transport.h
+--- a/include/scsi/scsi_transport.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport.h    Wed May 06 16:56:59 2009 +0100
 @@ -21,6 +21,7 @@
  #define SCSI_TRANSPORT_H
  
@@ -1093133,7 +1093071,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport.h linux-2.6.27.19-5.1/includ
  #include <scsi/scsi_host.h>
  #include <scsi/scsi_device.h>
  
-@@ -64,7 +65,7 @@ struct scsi_transport_template {
+@@ -64,7 +65,7 @@
         *                      begin counting again
         * EH_NOT_HANDLED       Begin normal error recovery
         */
@@ -1093142,10 +1093080,10 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport.h linux-2.6.27.19-5.1/includ
  
        /*
         * Used as callback for the completion of i_t_nexus request
-diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/include/scsi/scsi_transport_fc.h
---- linux-2.6.27/include/scsi/scsi_transport_fc.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport_fc.h       2009-03-25 16:11:50.000000000 +0000
-@@ -167,6 +167,26 @@ enum fc_tgtid_binding_type  {
+diff -r 9608d5473017 include/scsi/scsi_transport_fc.h
+--- a/include/scsi/scsi_transport_fc.h Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport_fc.h Wed May 06 16:56:59 2009 +0100
+@@ -167,6 +167,26 @@
  struct device_attribute dev_attr_vport_##_name =      \
        __ATTR(_name,_mode,_show,_store)
  
@@ -1093172,7 +1093110,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/inc
  
  /*
   * FC Virtual Port Attributes
-@@ -197,7 +217,6 @@ struct device_attribute dev_attr_vport_#
+@@ -197,7 +217,6 @@
   * managed by the transport w/o driver interaction.
   */
  
@@ -1093180,7 +1093118,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/inc
  struct fc_vport {
        /* Fixed Attributes */
  
-@@ -338,6 +357,8 @@ struct fc_rport {  /* aka fc_starget_attr
+@@ -338,6 +357,8 @@
  /* bit field values for struct fc_rport "flags" field: */
  #define FC_RPORT_DEVLOSS_PENDING      0x01
  #define FC_RPORT_SCAN_PENDING         0x02
@@ -1093189,7 +1093127,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/inc
  
  #define       dev_to_rport(d)                         \
        container_of(d, struct fc_rport, dev)
-@@ -659,12 +680,15 @@ fc_remote_port_chkready(struct fc_rport 
+@@ -659,12 +680,15 @@
                if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
                        result = 0;
                else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
@@ -1093207,7 +1093145,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/inc
                break;
        default:
                result = DID_NO_CONNECT << 16;
-@@ -732,6 +756,8 @@ void fc_host_post_vendor_event(struct Sc
+@@ -732,6 +756,8 @@
         *   be sure to read the Vendor Type and ID formatting requirements
         *   specified in scsi_netlink.h
         */
@@ -1093216,10 +1093154,10 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_fc.h linux-2.6.27.19-5.1/inc
  int fc_vport_terminate(struct fc_vport *vport);
  
  #endif /* SCSI_TRANSPORT_FC_H */
-diff -purN linux-2.6.27/include/scsi/scsi_transport_iscsi.h linux-2.6.27.19-5.1/include/scsi/scsi_transport_iscsi.h
---- linux-2.6.27/include/scsi/scsi_transport_iscsi.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/scsi/scsi_transport_iscsi.h    2009-03-25 16:11:50.000000000 +0000
-@@ -56,6 +56,9 @@ struct sockaddr;
+diff -r 9608d5473017 include/scsi/scsi_transport_iscsi.h
+--- a/include/scsi/scsi_transport_iscsi.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/scsi/scsi_transport_iscsi.h      Wed May 06 16:56:59 2009 +0100
+@@ -56,6 +56,9 @@
   *                    is not supported, and a -Exx value on other error
   * @start_conn:               set connection to be operational
   * @stop_conn:                suspend/recover/terminate connection
@@ -1093229,7 +1093167,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_iscsi.h linux-2.6.27.19-5.1/
   * @send_pdu:         send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text.
   * @session_recovery_timedout: notify LLD a block during recovery timed out
   * @init_task:                Initialize a iscsi_task and any internal structs.
-@@ -109,6 +112,10 @@ struct iscsi_transport {
+@@ -109,6 +112,10 @@
        int (*set_host_param) (struct Scsi_Host *shost,
                               enum iscsi_host_param param, char *buf,
                               int buflen);
@@ -1093240,7 +1093178,7 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_iscsi.h linux-2.6.27.19-5.1/
        int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
                         char *data, uint32_t data_size);
        void (*get_stats) (struct iscsi_cls_conn *conn,
-@@ -207,7 +214,7 @@ extern void iscsi_host_for_each_session(
+@@ -207,7 +214,7 @@
  struct iscsi_endpoint {
        void *dd_data;                  /* LLD private data */
        struct device dev;
@@ -1093249,9 +1093187,9 @@ diff -purN linux-2.6.27/include/scsi/scsi_transport_iscsi.h linux-2.6.27.19-5.1/
  };
  
  /*
-diff -purN linux-2.6.27/include/trace/filemap.h linux-2.6.27.19-5.1/include/trace/filemap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/filemap.h        2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/filemap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/filemap.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,13 @@
 +#ifndef _TRACE_FILEMAP_H
 +#define _TRACE_FILEMAP_H
@@ -1093266,9 +1093204,9 @@ diff -purN linux-2.6.27/include/trace/filemap.h linux-2.6.27.19-5.1/include/trac
 +      TPARGS(page, bit_nr));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/fs.h linux-2.6.27.19-5.1/include/trace/fs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/fs.h     2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/fs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/fs.h       Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,65 @@
 +#ifndef _TRACE_FS_H
 +#define _TRACE_FS_H
@@ -1093335,9 +1093273,9 @@ diff -purN linux-2.6.27/include/trace/fs.h linux-2.6.27.19-5.1/include/trace/fs.
 +      TPPROTO(int fd),
 +      TPARGS(fd));
 +#endif
-diff -purN linux-2.6.27/include/trace/hugetlb.h linux-2.6.27.19-5.1/include/trace/hugetlb.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/hugetlb.h        2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/hugetlb.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/hugetlb.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,28 @@
 +#ifndef _TRACE_HUGETLB_H
 +#define _TRACE_HUGETLB_H
@@ -1093367,9 +1093305,9 @@ diff -purN linux-2.6.27/include/trace/hugetlb.h linux-2.6.27.19-5.1/include/trac
 +      TPARGS(inode, offset, freed));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/ipc.h linux-2.6.27.19-5.1/include/trace/ipc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipc.h    2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipc.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,15 @@
 +#ifndef _TRACE_IPC_H
 +#define _TRACE_IPC_H
@@ -1093386,9 +1093324,9 @@ diff -purN linux-2.6.27/include/trace/ipc.h linux-2.6.27.19-5.1/include/trace/ip
 +      TPPROTO(long id, int flags),
 +      TPARGS(id, flags));
 +#endif
-diff -purN linux-2.6.27/include/trace/ipv4.h linux-2.6.27.19-5.1/include/trace/ipv4.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipv4.h   2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipv4.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipv4.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,14 @@
 +#ifndef _TRACE_IPV4_H
 +#define _TRACE_IPV4_H
@@ -1093404,9 +1093342,9 @@ diff -purN linux-2.6.27/include/trace/ipv4.h linux-2.6.27.19-5.1/include/trace/i
 +      TPARGS(ifa));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/ipv6.h linux-2.6.27.19-5.1/include/trace/ipv6.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/ipv6.h   2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/ipv6.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/ipv6.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,14 @@
 +#ifndef _TRACE_IPV6_H
 +#define _TRACE_IPV6_H
@@ -1093422,9 +1093360,9 @@ diff -purN linux-2.6.27/include/trace/ipv6.h linux-2.6.27.19-5.1/include/trace/i
 +      TPARGS(ifa));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/irq.h linux-2.6.27.19-5.1/include/trace/irq.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/irq.h    2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/irq.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/irq.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,36 @@
 +#ifndef _TRACE_IRQ_H
 +#define _TRACE_IRQ_H
@@ -1093462,9 +1093400,9 @@ diff -purN linux-2.6.27/include/trace/irq.h linux-2.6.27.19-5.1/include/trace/ir
 +      TPARGS(t));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/kernel.h linux-2.6.27.19-5.1/include/trace/kernel.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/kernel.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/kernel.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/kernel.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,13 @@
 +#ifndef _TRACE_KERNEL_H
 +#define _TRACE_KERNEL_H
@@ -1093479,9 +1093417,9 @@ diff -purN linux-2.6.27/include/trace/kernel.h linux-2.6.27.19-5.1/include/trace
 +      TPARGS(mod));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/memory.h linux-2.6.27.19-5.1/include/trace/memory.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/memory.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/memory.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/memory.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,14 @@
 +#ifndef _TRACE_MEMORY_H
 +#define _TRACE_MEMORY_H
@@ -1093497,9 +1093435,9 @@ diff -purN linux-2.6.27/include/trace/memory.h linux-2.6.27.19-5.1/include/trace
 +      TPARGS(res));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/net.h linux-2.6.27.19-5.1/include/trace/net.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/net.h    2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/net.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/net.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,14 @@
 +#ifndef _TRACE_NET_H
 +#define _TRACE_NET_H
@@ -1093515,9 +1093453,9 @@ diff -purN linux-2.6.27/include/trace/net.h linux-2.6.27.19-5.1/include/trace/ne
 +      TPARGS(skb));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/page_alloc.h linux-2.6.27.19-5.1/include/trace/page_alloc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/page_alloc.h     2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/page_alloc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/page_alloc.h       Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,16 @@
 +#ifndef _TRACE_PAGE_ALLOC_H
 +#define _TRACE_PAGE_ALLOC_H
@@ -1093535,9 +1093473,9 @@ diff -purN linux-2.6.27/include/trace/page_alloc.h linux-2.6.27.19-5.1/include/t
 +      TPARGS(page, order));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/sched.h linux-2.6.27.19-5.1/include/trace/sched.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/sched.h  2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/sched.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/sched.h    Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,45 @@
 +#ifndef _TRACE_SCHED_H
 +#define _TRACE_SCHED_H
@@ -1093584,9 +1093522,9 @@ diff -purN linux-2.6.27/include/trace/sched.h linux-2.6.27.19-5.1/include/trace/
 +      TPARGS(sig, p));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/socket.h linux-2.6.27.19-5.1/include/trace/socket.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/socket.h 2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/socket.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/socket.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,26 @@
 +#ifndef _TRACE_SOCKET_H
 +#define _TRACE_SOCKET_H
@@ -1093614,9 +1093552,9 @@ diff -purN linux-2.6.27/include/trace/socket.h linux-2.6.27.19-5.1/include/trace
 +      TPPROTO(int call, unsigned long a0),
 +      TPARGS(call, a0));
 +#endif
-diff -purN linux-2.6.27/include/trace/swap.h linux-2.6.27.19-5.1/include/trace/swap.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/swap.h   2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/swap.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/swap.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,20 @@
 +#ifndef _TRACE_SWAP_H
 +#define _TRACE_SWAP_H
@@ -1093638,9 +1093576,9 @@ diff -purN linux-2.6.27/include/trace/swap.h linux-2.6.27.19-5.1/include/trace/s
 +      TPARGS(file));
 +
 +#endif
-diff -purN linux-2.6.27/include/trace/timer.h linux-2.6.27.19-5.1/include/trace/timer.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/trace/timer.h  2009-03-25 16:11:51.000000000 +0000
+diff -r 9608d5473017 include/trace/timer.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/trace/timer.h    Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,24 @@
 +#ifndef _TRACE_TIMER_H
 +#define _TRACE_TIMER_H
@@ -1093666,9 +1093604,9 @@ diff -purN linux-2.6.27/include/trace/timer.h linux-2.6.27.19-5.1/include/trace/
 +      TPPROTO(struct task_struct *p),
 +      TPARGS(p));
 +#endif
-diff -purN linux-2.6.27/include/xen/balloon.h linux-2.6.27.19-5.1/include/xen/balloon.h
---- linux-2.6.27/include/xen/balloon.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/balloon.h  2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/balloon.h
+--- a/include/xen/balloon.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/balloon.h    Wed May 06 16:56:59 2009 +0100
 @@ -36,7 +36,7 @@
  
  #include <linux/spinlock.h>
@@ -1093678,20 +1093616,20 @@ diff -purN linux-2.6.27/include/xen/balloon.h linux-2.6.27.19-5.1/include/xen/ba
  /*
   * Inform the balloon driver that it should allow some slop for device-driver
   * memory activities.
-@@ -47,6 +47,10 @@ void balloon_update_driver_allowance(lon
+@@ -46,6 +46,10 @@
+ /* Allocate/free a set of empty pages in low memory (i.e., no RAM mapped). */
  struct page **alloc_empty_pages_and_pagevec(int nr_pages);
  void free_empty_pages_and_pagevec(struct page **pagevec, int nr_pages);
++
 +/* Free an empty page range (not allocated through
 +   alloc_empty_pages_and_pagevec), adding to the balloon. */
 +void free_empty_pages(struct page **pagevec, int nr_pages);
-+
  void balloon_release_driver_page(struct page *page);
  
- /*
-diff -purN linux-2.6.27/include/xen/blkif.h linux-2.6.27.19-5.1/include/xen/blkif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/blkif.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/blkif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/blkif.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,123 @@
 +/* 
 + * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1093816,9 +1093754,9 @@ diff -purN linux-2.6.27/include/xen/blkif.h linux-2.6.27.19-5.1/include/xen/blki
 +}
 +
 +#endif /* __XEN_BLKIF_H__ */
-diff -purN linux-2.6.27/include/xen/compat_ioctl.h linux-2.6.27.19-5.1/include/xen/compat_ioctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/compat_ioctl.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/compat_ioctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/compat_ioctl.h       Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,45 @@
 +/*
 + * This program is free software; you can redistribute it and/or
@@ -1093865,9 +1093803,9 @@ diff -purN linux-2.6.27/include/xen/compat_ioctl.h linux-2.6.27.19-5.1/include/x
 +      _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch_32))
 +
 +#endif /* __LINUX_XEN_COMPAT_H__ */
-diff -purN linux-2.6.27/include/xen/cpu_hotplug.h linux-2.6.27.19-5.1/include/xen/cpu_hotplug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/cpu_hotplug.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/cpu_hotplug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/cpu_hotplug.h        Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,41 @@
 +#ifndef __XEN_CPU_HOTPLUG_H__
 +#define __XEN_CPU_HOTPLUG_H__
@@ -1093910,9 +1093848,9 @@ diff -purN linux-2.6.27/include/xen/cpu_hotplug.h linux-2.6.27.19-5.1/include/xe
 +#endif /* !defined(CONFIG_HOTPLUG_CPU) */
 +
 +#endif /* __XEN_CPU_HOTPLUG_H__ */
-diff -purN linux-2.6.27/include/xen/driver_util.h linux-2.6.27.19-5.1/include/xen/driver_util.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/driver_util.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/driver_util.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/driver_util.h        Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,10 @@
 +
 +#ifndef __ASM_XEN_DRIVER_UTIL_H__
@@ -1093924,9 +1093862,9 @@ diff -purN linux-2.6.27/include/xen/driver_util.h linux-2.6.27.19-5.1/include/xe
 +extern struct class *get_xen_class(void);
 +
 +#endif /* __ASM_XEN_DRIVER_UTIL_H__ */
-diff -purN linux-2.6.27/include/xen/evtchn.h linux-2.6.27.19-5.1/include/xen/evtchn.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/evtchn.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/evtchn.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/evtchn.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,233 @@
 +/******************************************************************************
 + * evtchn.h
@@ -1094161,9 +1094099,9 @@ diff -purN linux-2.6.27/include/xen/evtchn.h linux-2.6.27.19-5.1/include/xen/evt
 +#endif
 +
 +#endif /* __ASM_EVTCHN_H__ */
-diff -purN linux-2.6.27/include/xen/features.h linux-2.6.27.19-5.1/include/xen/features.h
---- linux-2.6.27/include/xen/features.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/features.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/features.h
+--- a/include/xen/features.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/features.h   Wed May 06 16:56:59 2009 +0100
 @@ -10,6 +10,7 @@
  #define __XEN_FEATURES_H__
  
@@ -1094172,15 +1094110,15 @@ diff -purN linux-2.6.27/include/xen/features.h linux-2.6.27.19-5.1/include/xen/f
  
  void xen_setup_features(void);
  
-@@ -20,4 +21,4 @@ static inline int xen_feature(int flag)
+@@ -20,4 +21,4 @@
        return xen_features[flag];
  }
  
 -#endif /* __ASM_XEN_FEATURES_H__ */
 +#endif /* __XEN_FEATURES_H__ */
-diff -purN linux-2.6.27/include/xen/firmware.h linux-2.6.27.19-5.1/include/xen/firmware.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/firmware.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/firmware.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/firmware.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,10 @@
 +#ifndef __XEN_FIRMWARE_H__
 +#define __XEN_FIRMWARE_H__
@@ -1094192,9 +1094130,9 @@ diff -purN linux-2.6.27/include/xen/firmware.h linux-2.6.27.19-5.1/include/xen/f
 +void copy_edid(void);
 +
 +#endif /* __XEN_FIRMWARE_H__ */
-diff -purN linux-2.6.27/include/xen/gnttab.h linux-2.6.27.19-5.1/include/xen/gnttab.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/gnttab.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/gnttab.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/gnttab.h     Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,165 @@
 +/******************************************************************************
 + * gnttab.h
@@ -1094361,9 +1094299,9 @@ diff -purN linux-2.6.27/include/xen/gnttab.h linux-2.6.27.19-5.1/include/xen/gnt
 +}
 +
 +#endif /* __ASM_GNTTAB_H__ */
-diff -purN linux-2.6.27/include/xen/hvm.h linux-2.6.27.19-5.1/include/xen/hvm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hvm.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hvm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hvm.h        Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,23 @@
 +/* Simple wrappers around HVM functions */
 +#ifndef XEN_HVM_H__
@@ -1094388,9 +1094326,9 @@ diff -purN linux-2.6.27/include/xen/hvm.h linux-2.6.27.19-5.1/include/xen/hvm.h
 +}
 +
 +#endif /* XEN_HVM_H__ */
-diff -purN linux-2.6.27/include/xen/hypercall.h linux-2.6.27.19-5.1/include/xen/hypercall.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hypercall.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hypercall.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hypercall.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,30 @@
 +#ifndef __XEN_HYPERCALL_H__
 +#define __XEN_HYPERCALL_H__
@@ -1094422,9 +1094360,9 @@ diff -purN linux-2.6.27/include/xen/hypercall.h linux-2.6.27.19-5.1/include/xen/
 +#define VOID(expr) ((void)((expr)?:0))
 +
 +#endif /* __XEN_HYPERCALL_H__ */
-diff -purN linux-2.6.27/include/xen/hypervisor_sysfs.h linux-2.6.27.19-5.1/include/xen/hypervisor_sysfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/hypervisor_sysfs.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/hypervisor_sysfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/hypervisor_sysfs.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,30 @@
 +/*
 + *  copyright (c) 2006 IBM Corporation
@@ -1094456,9 +1094394,9 @@ diff -purN linux-2.6.27/include/xen/hypervisor_sysfs.h linux-2.6.27.19-5.1/inclu
 +};
 +
 +#endif /* _HYP_SYSFS_H_ */
-diff -purN linux-2.6.27/include/xen/interface/COPYING linux-2.6.27.19-5.1/include/xen/interface/COPYING
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/COPYING  2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/COPYING
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/COPYING    Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,38 @@
 +XEN NOTICE
 +==========
@@ -1094498,9 +1094436,9 @@ diff -purN linux-2.6.27/include/xen/interface/COPYING linux-2.6.27.19-5.1/includ
 +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.
-diff -purN linux-2.6.27/include/xen/interface/acm.h linux-2.6.27.19-5.1/include/xen/interface/acm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/acm.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/acm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/acm.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,228 @@
 +/*
 + * acm.h: Xen access control module interface defintions
@@ -1094730,9 +1094668,9 @@ diff -purN linux-2.6.27/include/xen/interface/acm.h linux-2.6.27.19-5.1/include/
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/acm_ops.h linux-2.6.27.19-5.1/include/xen/interface/acm_ops.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/acm_ops.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/acm_ops.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/acm_ops.h  Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,159 @@
 +/*
 + * acm_ops.h: Xen access control module hypervisor commands
@@ -1094893,9 +1094831,9 @@ diff -purN linux-2.6.27/include/xen/interface/acm_ops.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/cpuid.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/cpuid.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/cpuid.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/cpuid.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/cpuid.h   Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,68 @@
 +/******************************************************************************
 + * arch-x86/cpuid.h
@@ -1094965,9 +1094903,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/cpuid.h linux-2.6.27.19-5
 +#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD  (1u<<0)
 +
 +#endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/hvm/save.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/hvm/save.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/hvm/save.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/hvm/save.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/hvm/save.h        Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,440 @@
 +/* 
 + * Structure definitions for HVM state that is held by Xen and must
@@ -1095409,9 +1095347,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/hvm/save.h linux-2.6.27.1
 +#define HVM_SAVE_CODE_MAX 15
 +
 +#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-mca.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-mca.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-mca.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-mca.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-mca.h Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,279 @@
 +/******************************************************************************
 + * arch-x86/mca.h
@@ -1095692,9 +1095630,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-mca.h linux-2.6.27.19
 +#endif /* __ASSEMBLY__ */
 +
 +#endif /* __XEN_PUBLIC_ARCH_X86_MCA_H__ */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_32.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_32.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-x86_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-x86_32.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,180 @@
 +/******************************************************************************
 + * xen-x86_32.h
@@ -1095876,9 +1095814,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_32.h linux-2.6.27
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_64.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen-x86_64.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen-x86_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen-x86_64.h      Wed May 06 16:56:59 2009 +0100
 @@ -0,0 +1,212 @@
 +/******************************************************************************
 + * xen-x86_64.h
@@ -1096092,9 +1096030,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen-x86_64.h linux-2.6.27
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86/xen.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86/xen.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86/xen.h     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,207 @@
 +/******************************************************************************
 + * arch-x86/xen.h
@@ -1096303,9 +1096241,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86/xen.h linux-2.6.27.19-5.1
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/arch-x86_32.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86_32.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86_32.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86_32.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86_32.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,27 @@
 +/******************************************************************************
 + * arch-x86_32.h
@@ -1096334,9 +1096272,9 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86_32.h linux-2.6.27.19-5.1/
 + */
 +
 +#include "arch-x86/xen.h"
-diff -purN linux-2.6.27/include/xen/interface/arch-x86_64.h linux-2.6.27.19-5.1/include/xen/interface/arch-x86_64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/arch-x86_64.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/arch-x86_64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/arch-x86_64.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,27 @@
 +/******************************************************************************
 + * arch-x86_64.h
@@ -1096365,10 +1096303,10 @@ diff -purN linux-2.6.27/include/xen/interface/arch-x86_64.h linux-2.6.27.19-5.1/
 + */
 +
 +#include "arch-x86/xen.h"
-diff -purN linux-2.6.27/include/xen/interface/callback.h linux-2.6.27.19-5.1/include/xen/interface/callback.h
---- linux-2.6.27/include/xen/interface/callback.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/callback.h       2009-03-25 16:11:52.000000000 +0000
-@@ -86,6 +86,8 @@ struct callback_register {
+diff -r 9608d5473017 include/xen/interface/callback.h
+--- a/include/xen/interface/callback.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/callback.h Wed May 06 16:57:00 2009 +0100
+@@ -86,6 +86,8 @@
        uint16_t flags;
        xen_callback_t address;
  };
@@ -1096377,7 +1096315,7 @@ diff -purN linux-2.6.27/include/xen/interface/callback.h linux-2.6.27.19-5.1/inc
  
  /*
   * Unregister a callback.
-@@ -98,5 +100,22 @@ struct callback_unregister {
+@@ -98,5 +100,22 @@
      uint16_t type;
      uint16_t _unused;
  };
@@ -1096400,9 +1096338,9 @@ diff -purN linux-2.6.27/include/xen/interface/callback.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/dom0_ops.h linux-2.6.27.19-5.1/include/xen/interface/dom0_ops.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/dom0_ops.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/dom0_ops.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/dom0_ops.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,120 @@
 +/******************************************************************************
 + * dom0_ops.h
@@ -1096524,9 +1096462,9 @@ diff -purN linux-2.6.27/include/xen/interface/dom0_ops.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/domctl.h linux-2.6.27.19-5.1/include/xen/interface/domctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/domctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/domctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/domctl.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,680 @@
 +/******************************************************************************
 + * domctl.h
@@ -1097208,13 +1097146,14 @@ diff -purN linux-2.6.27/include/xen/interface/domctl.h linux-2.6.27.19-5.1/inclu
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/elfnote.h linux-2.6.27.19-5.1/include/xen/interface/elfnote.h
---- linux-2.6.27/include/xen/interface/elfnote.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/elfnote.h        2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/elfnote.h
+--- a/include/xen/interface/elfnote.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/elfnote.h  Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * elfnote.h
   *
   * Definitions used for the Xen ELF notes.
-  *
++ *
 + * 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
@@ -1097232,10 +1097171,9 @@ diff -purN linux-2.6.27/include/xen/interface/elfnote.h linux-2.6.27.19-5.1/incl
 + * 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.
-+ *
+  *
   * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
   */
 @@ -10,7 +28,7 @@
  #define __XEN_PUBLIC_ELFNOTE_H__
  
@@ -1097334,13 +1097272,14 @@ diff -purN linux-2.6.27/include/xen/interface/elfnote.h linux-2.6.27.19-5.1/incl
  #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
  
  /*
-diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.1/include/xen/interface/event_channel.h
---- linux-2.6.27/include/xen/interface/event_channel.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/event_channel.h  2009-03-25 16:11:52.000000000 +0000
-@@ -3,14 +3,39 @@
+diff -r 9608d5473017 include/xen/interface/event_channel.h
+--- a/include/xen/interface/event_channel.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/event_channel.h    Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * event_channel.h
   *
   * Event channels between domains.
-  *
++ *
 + * 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
@@ -1097358,10 +1097297,10 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
 + * 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.
-+ *
+  *
   * Copyright (c) 2003-2004, K A Fraser.
   */
+@@ -9,8 +27,15 @@
  #ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
  #define __XEN_PUBLIC_EVENT_CHANNEL_H__
  
@@ -1097378,7 +1097317,7 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  
  /*
   * EVTCHNOP_alloc_unbound: Allocate a port in domain <dom> and mark as
-@@ -20,13 +45,14 @@ DEFINE_GUEST_HANDLE(evtchn_port_t);
+@@ -20,13 +45,14 @@
   *  1. If the caller is unprivileged then <dom> must be DOMID_SELF.
   *  2. <rdom> may be DOMID_SELF, allowing loopback connections.
   */
@@ -1097398,7 +1097337,7 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  
  /*
   * EVTCHNOP_bind_interdomain: Construct an interdomain event channel between
-@@ -39,29 +65,35 @@ struct evtchn_alloc_unbound {
+@@ -39,29 +65,35 @@
   */
  #define EVTCHNOP_bind_interdomain 0
  struct evtchn_bind_interdomain {
@@ -1097448,7 +1097387,7 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  
  /*
   * EVTCHNOP_bind_pirq: Bind a local event channel to PIRQ <irq>.
-@@ -69,15 +101,16 @@ struct evtchn_bind_virq {
+@@ -69,15 +101,16 @@
   *  1. A physical IRQ may be bound to at most one event channel per domain.
   *  2. Only a sufficiently-privileged domain may bind to a physical IRQ.
   */
@@ -1097471,7 +1097410,7 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  
  /*
   * EVTCHNOP_bind_ipi: Bind a local event channel to receive events.
-@@ -85,33 +118,36 @@ struct evtchn_bind_pirq {
+@@ -85,33 +118,36 @@
   *  1. The allocated event channel is bound to the specified vcpu. The binding
   *     may not be changed.
   */
@@ -1097518,7 +1097457,7 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  
  /*
   * EVTCHNOP_status: Get the current status of the communication channel which
-@@ -121,75 +157,109 @@ struct evtchn_send {
+@@ -121,75 +157,109 @@
   *  2. Only a sufficiently-privileged domain may obtain the status of an event
   *     channel for which <dom> is not DOMID_SELF.
   */
@@ -1097615,20 +1097554,6 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
  };
 +typedef struct evtchn_unmask evtchn_unmask_t;
  
--struct evtchn_op {
--      uint32_t cmd; /* EVTCHNOP_* */
--      union {
--              struct evtchn_alloc_unbound    alloc_unbound;
--              struct evtchn_bind_interdomain bind_interdomain;
--              struct evtchn_bind_virq        bind_virq;
--              struct evtchn_bind_pirq        bind_pirq;
--              struct evtchn_bind_ipi         bind_ipi;
--              struct evtchn_close            close;
--              struct evtchn_send             send;
--              struct evtchn_status           status;
--              struct evtchn_bind_vcpu        bind_vcpu;
--              struct evtchn_unmask           unmask;
--      } u;
 +/*
 + * EVTCHNOP_reset: Close all event channels associated with specified domain.
 + * NOTES:
@@ -1097639,15 +1097564,27 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
 +struct evtchn_reset {
 +    /* IN parameters. */
 +    domid_t dom;
- };
--DEFINE_GUEST_HANDLE_STRUCT(evtchn_op);
++};
 +typedef struct evtchn_reset evtchn_reset_t;
 +
 +/*
 + * Argument to event_channel_op_compat() hypercall. Superceded by new
 + * event_channel_op() hypercall since 0x00030202.
 + */
-+struct evtchn_op {
+ struct evtchn_op {
+-      uint32_t cmd; /* EVTCHNOP_* */
+-      union {
+-              struct evtchn_alloc_unbound    alloc_unbound;
+-              struct evtchn_bind_interdomain bind_interdomain;
+-              struct evtchn_bind_virq        bind_virq;
+-              struct evtchn_bind_pirq        bind_pirq;
+-              struct evtchn_bind_ipi         bind_ipi;
+-              struct evtchn_close            close;
+-              struct evtchn_send             send;
+-              struct evtchn_status           status;
+-              struct evtchn_bind_vcpu        bind_vcpu;
+-              struct evtchn_unmask           unmask;
+-      } u;
 +    uint32_t cmd; /* EVTCHNOP_* */
 +    union {
 +        struct evtchn_alloc_unbound    alloc_unbound;
@@ -1097661,7 +1097598,8 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
 +        struct evtchn_bind_vcpu        bind_vcpu;
 +        struct evtchn_unmask           unmask;
 +    } u;
-+};
+ };
+-DEFINE_GUEST_HANDLE_STRUCT(evtchn_op);
 +DEFINE_XEN_GUEST_HANDLE_STRUCT(evtchn_op);
 +typedef struct evtchn_op evtchn_op_t;
 +DEFINE_XEN_GUEST_HANDLE(evtchn_op_t);
@@ -1097677,13 +1097615,14 @@ diff -purN linux-2.6.27/include/xen/interface/event_channel.h linux-2.6.27.19-5.
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/features.h linux-2.6.27.19-5.1/include/xen/interface/features.h
---- linux-2.6.27/include/xen/interface/features.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/features.h       2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/features.h
+--- a/include/xen/interface/features.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/features.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * features.h
   *
   * Feature flags, reported by XENVER_get_features.
-  *
++ *
 + * 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
@@ -1097701,10 +1097640,9 @@ diff -purN linux-2.6.27/include/xen/interface/features.h linux-2.6.27.19-5.1/inc
 + * 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.
-+ *
+  *
   * Copyright (c) 2006, Keir Fraser <keir@xensource.com>
   */
 @@ -41,6 +59,25 @@
  /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
  #define XENFEAT_mmu_pt_update_preserve_ad  5
@@ -1097731,10 +1097669,10 @@ diff -purN linux-2.6.27/include/xen/interface/features.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/include/xen/interface/grant_table.h
---- linux-2.6.27/include/xen/interface/grant_table.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/grant_table.h    2009-03-25 16:11:52.000000000 +0000
-@@ -100,6 +100,7 @@ struct grant_entry {
+diff -r 9608d5473017 include/xen/interface/grant_table.h
+--- a/include/xen/interface/grant_table.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/grant_table.h      Wed May 06 16:57:00 2009 +0100
+@@ -100,6 +100,7 @@
       */
      uint32_t frame;
  };
@@ -1097742,7 +1097680,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * Type of grant entry.
-@@ -118,6 +119,7 @@ struct grant_entry {
+@@ -118,6 +119,7 @@
   *  GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST]
   *  GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN]
   *  GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN]
@@ -1097750,7 +1097688,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
   */
  #define _GTF_readonly       (2)
  #define GTF_readonly        (1U<<_GTF_readonly)
-@@ -125,6 +127,12 @@ struct grant_entry {
+@@ -125,6 +127,12 @@
  #define GTF_reading         (1U<<_GTF_reading)
  #define _GTF_writing        (4)
  #define GTF_writing         (1U<<_GTF_writing)
@@ -1097763,7 +1097701,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * Subflags for GTF_accept_transfer:
-@@ -185,7 +193,9 @@ struct gnttab_map_grant_ref {
+@@ -185,7 +193,9 @@
      grant_handle_t handle;
      uint64_t dev_bus_addr;
  };
@@ -1097774,7 +1097712,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings
-@@ -207,7 +217,9 @@ struct gnttab_unmap_grant_ref {
+@@ -207,7 +217,9 @@
      /* OUT parameters. */
      int16_t  status;              /* GNTST_* */
  };
@@ -1097785,7 +1097723,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_setup_table: Set up a grant table for <dom> comprising at least
-@@ -225,9 +237,11 @@ struct gnttab_setup_table {
+@@ -225,9 +237,11 @@
      uint32_t nr_frames;
      /* OUT parameters. */
      int16_t  status;              /* GNTST_* */
@@ -1097799,7 +1097737,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_dump_table: Dump the contents of the grant table to the
-@@ -240,7 +254,9 @@ struct gnttab_dump_table {
+@@ -240,7 +254,9 @@
      /* OUT parameters. */
      int16_t status;               /* GNTST_* */
  };
@@ -1097810,7 +1097748,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_transfer_grant_ref: Transfer <frame> to a foreign domain. The
-@@ -253,13 +269,16 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_dump_t
+@@ -253,13 +269,16 @@
  #define GNTTABOP_transfer                4
  struct gnttab_transfer {
      /* IN parameters. */
@@ -1097829,7 +1097767,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_copy: Hypervisor based copy
-@@ -285,22 +304,23 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_transf
+@@ -285,22 +304,23 @@
  #define GNTCOPY_dest_gref         (1<<_GNTCOPY_dest_gref)
  
  #define GNTTABOP_copy                 5
@@ -1097869,7 +1097807,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  /*
   * GNTTABOP_query_size: Query the current and maximum sizes of the shared
-@@ -318,10 +338,36 @@ struct gnttab_query_size {
+@@ -318,10 +338,36 @@
      uint32_t max_nr_frames;
      int16_t  status;              /* GNTST_* */
  };
@@ -1097908,7 +1097846,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
   */
   /* Map the grant entry for access by I/O devices. */
  #define _GNTMAP_device_map      (0)
-@@ -349,6 +395,13 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -349,6 +395,13 @@
  #define GNTMAP_contains_pte     (1<<_GNTMAP_contains_pte)
  
  /*
@@ -1097922,7 +1097860,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
   * Values for error status returns. All errors are -ve.
   */
  #define GNTST_okay             (0)  /* Normal return.                        */
-@@ -361,7 +414,8 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -361,7 +414,8 @@
  #define GNTST_no_device_space  (-7) /* Out of space in I/O MMU.              */
  #define GNTST_permission_denied (-8) /* Not enough privilege for operation.  */
  #define GNTST_bad_page         (-9) /* Specified page was invalid for op.    */
@@ -1097932,7 +1097870,7 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
  
  #define GNTTABOP_error_msgs {                   \
      "okay",                                     \
-@@ -374,7 +428,18 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_
+@@ -374,7 +428,18 @@
      "no spare translation slot in the I/O MMU", \
      "permission denied",                        \
      "bad page",                                 \
@@ -1097952,9 +1097890,9 @@ diff -purN linux-2.6.27/include/xen/interface/grant_table.h linux-2.6.27.19-5.1/
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/hvm/e820.h linux-2.6.27.19-5.1/include/xen/interface/hvm/e820.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/e820.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/e820.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/e820.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,34 @@
 +
 +/*
@@ -1097990,9 +1097928,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/e820.h linux-2.6.27.19-5.1/inc
 +#define HVM_BELOW_4G_MMIO_LENGTH    ((1ULL << 32) - HVM_BELOW_4G_MMIO_START)
 +
 +#endif /* __XEN_PUBLIC_HVM_E820_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_info_table.h linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_info_table.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_info_table.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/hvm_info_table.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/hvm_info_table.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,41 @@
 +/******************************************************************************
 + * hvm/hvm_info_table.h
@@ -1098035,9 +1097973,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_info_table.h linux-2.6.27.
 +};
 +
 +#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_op.h linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_op.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/hvm_op.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/hvm_op.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/hvm_op.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,131 @@
 +/*
 + * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1098170,9 +1098108,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/hvm_op.h linux-2.6.27.19-5.1/i
 +#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
 +
 +#endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/ioreq.h linux-2.6.27.19-5.1/include/xen/interface/hvm/ioreq.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/ioreq.h      2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/ioreq.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/ioreq.h        Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,127 @@
 +/*
 + * ioreq.h: I/O request definitions for device models
@@ -1098301,9 +1098239,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/ioreq.h linux-2.6.27.19-5.1/in
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/hvm/params.h linux-2.6.27.19-5.1/include/xen/interface/hvm/params.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/params.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/params.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/params.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,105 @@
 +/*
 + * Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1098410,9 +1098348,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/params.h linux-2.6.27.19-5.1/i
 +#define HVM_NR_PARAMS          15
 +
 +#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/save.h linux-2.6.27.19-5.1/include/xen/interface/hvm/save.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/save.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/save.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/save.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,88 @@
 +/* 
 + * hvm/save.h
@@ -1098502,9 +1098440,9 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/save.h linux-2.6.27.19-5.1/inc
 +#endif
 +
 +#endif /* __XEN_PUBLIC_HVM_SAVE_H__ */
-diff -purN linux-2.6.27/include/xen/interface/hvm/vmx_assist.h linux-2.6.27.19-5.1/include/xen/interface/hvm/vmx_assist.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/hvm/vmx_assist.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/hvm/vmx_assist.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/hvm/vmx_assist.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,122 @@
 +/*
 + * vmx_assist.h: Context definitions for the VMXASSIST world switch.
@@ -1098628,13 +1098566,14 @@ diff -purN linux-2.6.27/include/xen/interface/hvm/vmx_assist.h linux-2.6.27.19-5
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/include/xen/interface/io/blkif.h
---- linux-2.6.27/include/xen/interface/io/blkif.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/blkif.h       2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/blkif.h
+--- a/include/xen/interface/io/blkif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/blkif.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * blkif.h
   *
   * Unified block-device I/O interface for Xen guest OSes.
-  *
++ *
 + * 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
@@ -1098652,10 +1098591,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
 + * 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.
-+ *
+  *
   * Copyright (c) 2003-2004, Keir Fraser
   */
 @@ -24,8 +42,10 @@
   * rsp_event appropriately (e.g., using RING_FINAL_CHECK_FOR_RESPONSES()).
   */
@@ -1098669,7 +1098607,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
  
  /*
   * REQUEST CODES.
-@@ -34,7 +54,7 @@ typedef uint64_t blkif_sector_t;
+@@ -34,7 +54,7 @@
  #define BLKIF_OP_WRITE             1
  /*
   * Recognised only if "feature-barrier" is present in backend xenbus info.
@@ -1098678,7 +1098616,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
   * requests are likely to succeed or fail. Either way, a barrier request
   * may fail at any time with BLKIF_RSP_EOPNOTSUPP if it is unsupported by
   * the underlying block-device hardware. The boolean simply indicates whether
-@@ -43,33 +63,54 @@ typedef uint64_t blkif_sector_t;
+@@ -43,33 +63,54 @@
   * create the "feature-barrier" node!
   */
  #define BLKIF_OP_WRITE_BARRIER     2
@@ -1098708,14 +1098646,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
   */
  #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
  
-+struct blkif_request_segment {
-+    grant_ref_t gref;        /* reference to I/O buffer frame        */
-+    /* @first_sect: first sector in frame to transfer (inclusive).   */
-+    /* @last_sect: last sector in frame to transfer (inclusive).     */
-+    uint8_t     first_sect, last_sect;
-+};
-+
- struct blkif_request {
+-struct blkif_request {
 -      uint8_t        operation;    /* BLKIF_OP_???                         */
 -      uint8_t        nr_segments;  /* number of segments                   */
 -      blkif_vdev_t   handle;       /* only for read/write requests         */
@@ -1098727,15 +1098658,23 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
 -              /* @last_sect: last sector in frame to transfer (inclusive).     */
 -              uint8_t     first_sect, last_sect;
 -      } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
++struct blkif_request_segment {
++    grant_ref_t gref;        /* reference to I/O buffer frame        */
++    /* @first_sect: first sector in frame to transfer (inclusive).   */
++    /* @last_sect: last sector in frame to transfer (inclusive).     */
++    uint8_t     first_sect, last_sect;
+ };
++struct blkif_request {
 +    uint8_t        operation;    /* BLKIF_OP_???                         */
 +    uint8_t        nr_segments;  /* number of segments                   */
 +    blkif_vdev_t   handle;       /* only for read/write requests         */
 +    uint64_t       id;           /* private guest value, echoed in resp  */
 +    blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
 +    struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
- };
++};
 +typedef struct blkif_request blkif_request_t;
++
  struct blkif_response {
 -      uint64_t        id;              /* copied from request */
 -      uint8_t         operation;       /* copied from request */
@@ -1098748,7 +1098687,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
  
  /*
   * STATUS RETURN CODES.
-@@ -92,3 +133,13 @@ DEFINE_RING_TYPES(blkif, struct blkif_re
+@@ -92,3 +133,13 @@
  #define VDISK_READONLY     0x4
  
  #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
@@ -1098762,9 +1098701,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/blkif.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/cdromif.h linux-2.6.27.19-5.1/include/xen/interface/io/cdromif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/cdromif.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/cdromif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/cdromif.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,120 @@
 +/******************************************************************************
 + * cdromif.h
@@ -1098886,13 +1098825,14 @@ diff -purN linux-2.6.27/include/xen/interface/io/cdromif.h linux-2.6.27.19-5.1/i
 +            sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
 +
 +#endif
-diff -purN linux-2.6.27/include/xen/interface/io/console.h linux-2.6.27.19-5.1/include/xen/interface/io/console.h
---- linux-2.6.27/include/xen/interface/io/console.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/console.h     2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/console.h
+--- a/include/xen/interface/io/console.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/console.h       Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * console.h
   *
   * Console I/O interface for Xen guest OSes.
-  *
++ *
 + * 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
@@ -1098910,11 +1098850,10 @@ diff -purN linux-2.6.27/include/xen/interface/io/console.h linux-2.6.27.19-5.1/i
 + * 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.
-+ *
+  *
   * Copyright (c) 2005, Keir Fraser
   */
-@@ -21,3 +39,13 @@ struct xencons_interface {
+@@ -21,3 +39,13 @@
  };
  
  #endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
@@ -1098928,9 +1098867,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/console.h linux-2.6.27.19-5.1/i
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/include/xen/interface/io/fbif.h
---- linux-2.6.27/include/xen/interface/io/fbif.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/fbif.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/fbif.h
+--- a/include/xen/interface/io/fbif.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/fbif.h  Wed May 06 16:57:00 2009 +0100
 @@ -41,12 +41,13 @@
   */
  #define XENFB_TYPE_UPDATE 2
@@ -1098951,7 +1098890,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
  };
  
  /*
-@@ -55,36 +56,58 @@ struct xenfb_update {
+@@ -55,36 +56,58 @@
   */
  #define XENFB_TYPE_RESIZE 3
  
@@ -1098993,7 +1098932,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
   * Frontends should ignore unknown in events.
 - * No in events currently defined.
   */
++
 +/*
 + * Framebuffer refresh period advice
 + * Backend sends it to advise the frontend their preferred period of
@@ -1099012,7 +1098951,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
 +    uint32_t period; /* period of refresh, in ms,
 +                      * XENFB_NO_REFRESH if no refresh is needed */
 +};
-+
  #define XENFB_IN_EVENT_SIZE 40
  
 -union xenfb_in_event {
@@ -1099026,7 +1098965,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
  };
  
  /* shared page */
-@@ -93,41 +116,46 @@ union xenfb_in_event {
+@@ -93,41 +116,46 @@
  #define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE)
  #define XENFB_IN_RING_OFFS 1024
  #define XENFB_IN_RING(page) \
@@ -1099049,13 +1098988,22 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
 -struct xenfb_page {
 -      uint32_t in_cons, in_prod;
 -      uint32_t out_cons, out_prod;
--
++struct xenfb_page
++{
++    uint32_t in_cons, in_prod;
++    uint32_t out_cons, out_prod;
 -      int32_t width;          /* width of the framebuffer (in pixels) */
 -      int32_t height;         /* height of the framebuffer (in pixels) */
 -      uint32_t line_length;   /* length of a row of pixels (in bytes) */
 -      uint32_t mem_length;    /* length of the framebuffer (in bytes) */
 -      uint8_t depth;          /* depth of a pixel (in bits) */
--
++    int32_t width;          /* the width of the framebuffer (in pixels) */
++    int32_t height;         /* the height of the framebuffer (in pixels) */
++    uint32_t line_length;   /* the length of a row of pixels (in bytes) */
++    uint32_t mem_length;    /* the length of the framebuffer (in bytes) */
++    uint8_t depth;          /* the depth of a pixel (in bits) */
 -      /*
 -       * Framebuffer page directory
 -       *
@@ -1099069,17 +1099017,6 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
 -       * expansion.
 -       */
 -      unsigned long pd[256];
-+struct xenfb_page
-+{
-+    uint32_t in_cons, in_prod;
-+    uint32_t out_cons, out_prod;
-+
-+    int32_t width;          /* the width of the framebuffer (in pixels) */
-+    int32_t height;         /* the height of the framebuffer (in pixels) */
-+    uint32_t line_length;   /* the length of a row of pixels (in bytes) */
-+    uint32_t mem_length;    /* the length of the framebuffer (in bytes) */
-+    uint8_t depth;          /* the depth of a pixel (in bits) */
-+
 +    /*
 +     * Framebuffer page directory
 +     *
@@ -1099100,7 +1099037,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
  };
  
  /*
-@@ -141,3 +169,13 @@ struct xenfb_page {
+@@ -141,3 +169,13 @@
  #endif
  
  #endif
@@ -1099114,9 +1099051,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/fbif.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/fsif.h linux-2.6.27.19-5.1/include/xen/interface/io/fsif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/fsif.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/fsif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/fsif.h  Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,191 @@
 +/******************************************************************************
 + * fsif.h
@@ -1099309,9 +1099246,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/fsif.h linux-2.6.27.19-5.1/incl
 +
 +
 +#endif
-diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/include/xen/interface/io/kbdif.h
---- linux-2.6.27/include/xen/interface/io/kbdif.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/kbdif.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/kbdif.h
+--- a/include/xen/interface/io/kbdif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/kbdif.h Wed May 06 16:57:00 2009 +0100
 @@ -45,34 +45,38 @@
   */
  #define XENKBD_TYPE_POS     4
@@ -1099321,34 +1099258,30 @@ diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/inc
 -      int32_t rel_x;          /* relative X motion */
 -      int32_t rel_y;          /* relative Y motion */
 -      int32_t rel_z;          /* relative Z motion (wheel) */
--};
--
--struct xenkbd_key {
--      uint8_t type;           /* XENKBD_TYPE_KEY */
--      uint8_t pressed;        /* 1 if pressed; 0 otherwise */
--      uint32_t keycode;       /* KEY_* from linux/input.h */
--};
--
--struct xenkbd_position {
--      uint8_t type;           /* XENKBD_TYPE_POS */
--      int32_t abs_x;          /* absolute X position (in FB pixels) */
--      int32_t abs_y;          /* absolute Y position (in FB pixels) */
--      int32_t rel_z;          /* relative Z motion (wheel) */
 +struct xenkbd_motion
 +{
 +    uint8_t type;        /* XENKBD_TYPE_MOTION */
 +    int32_t rel_x;       /* relative X motion */
 +    int32_t rel_y;       /* relative Y motion */
 +    int32_t rel_z;       /* relative Z motion (wheel) */
-+};
-+
+ };
+-struct xenkbd_key {
+-      uint8_t type;           /* XENKBD_TYPE_KEY */
+-      uint8_t pressed;        /* 1 if pressed; 0 otherwise */
+-      uint32_t keycode;       /* KEY_* from linux/input.h */
 +struct xenkbd_key
 +{
 +    uint8_t type;         /* XENKBD_TYPE_KEY */
 +    uint8_t pressed;      /* 1 if pressed; 0 otherwise */
 +    uint32_t keycode;     /* KEY_* from linux/input.h */
-+};
-+
+ };
+-struct xenkbd_position {
+-      uint8_t type;           /* XENKBD_TYPE_POS */
+-      int32_t abs_x;          /* absolute X position (in FB pixels) */
+-      int32_t abs_y;          /* absolute Y position (in FB pixels) */
+-      int32_t rel_z;          /* relative Z motion (wheel) */
 +struct xenkbd_position
 +{
 +    uint8_t type;        /* XENKBD_TYPE_POS */
@@ -1099375,7 +1099308,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/inc
  };
  
  /* Out events (frontend -> backend) */
-@@ -85,9 +89,10 @@ union xenkbd_in_event {
+@@ -85,9 +89,10 @@
  
  #define XENKBD_OUT_EVENT_SIZE 40
  
@@ -1099389,7 +1099322,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/inc
  };
  
  /* shared page */
-@@ -96,21 +101,32 @@ union xenkbd_out_event {
+@@ -96,21 +101,32 @@
  #define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE)
  #define XENKBD_IN_RING_OFFS 1024
  #define XENKBD_IN_RING(page) \
@@ -1099429,13 +1099362,14 @@ diff -purN linux-2.6.27/include/xen/interface/io/kbdif.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/include/xen/interface/io/netif.h
---- linux-2.6.27/include/xen/interface/io/netif.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/netif.h       2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/io/netif.h
+--- a/include/xen/interface/io/netif.h Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/netif.h Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * netif.h
   *
   * Unified network-device I/O interface for Xen guest OSes.
-  *
++ *
 + * 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
@@ -1099453,10 +1099387,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
 + * 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.
-+ *
+  *
   * Copyright (c) 2003-2004, Keir Fraser
   */
 @@ -47,18 +65,21 @@
  #define _NETTXF_extra_info     (3)
  #define  NETTXF_extra_info     (1U<<_NETTXF_extra_info)
@@ -1099483,14 +1099416,17 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
  
  /* netif_extra_info flags. */
  #define _XEN_NETIF_EXTRA_FLAG_MORE (0)
-@@ -71,49 +92,68 @@ struct xen_netif_tx_request {
+@@ -71,49 +92,68 @@
   * This structure needs to fit within both netif_tx_request and
   * netif_rx_response for compatibility.
   */
 -struct xen_netif_extra_info {
 -      uint8_t type;  /* XEN_NETIF_EXTRA_TYPE_* */
 -      uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
--
++struct netif_extra_info {
++    uint8_t type;  /* XEN_NETIF_EXTRA_TYPE_* */
++    uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
 -      union {
 -              struct {
 -                      /*
@@ -1099498,28 +1099434,6 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
 -                       * example, for TCP this is just the path MSS.
 -                       */
 -                      uint16_t size;
--
--                      /*
--                       * GSO type. This determines the protocol of
--                       * the packet and any extra features required
--                       * to segment the packet properly.
--                       */
--                      uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
--
--                      /* Future expansion. */
--                      uint8_t pad;
--
--                      /*
--                       * GSO features. This specifies any extra GSO
--                       * features required to process this packet,
--                       * such as ECN support for TCPv4.
--                       */
--                      uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
--              } gso;
-+struct netif_extra_info {
-+    uint8_t type;  /* XEN_NETIF_EXTRA_TYPE_* */
-+    uint8_t flags; /* XEN_NETIF_EXTRA_FLAG_* */
-+
 +    union {
 +        /*
 +         * XEN_NETIF_EXTRA_TYPE_GSO:
@@ -1099530,23 +1099444,40 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
 +             * is just the path MSS.
 +             */
 +            uint16_t size;
-+
+-                      /*
+-                       * GSO type. This determines the protocol of
+-                       * the packet and any extra features required
+-                       * to segment the packet properly.
+-                       */
+-                      uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
 +            /*
 +             * GSO type. This determines the protocol of the packet and any
 +             * extra features required to segment the packet properly.
 +             */
 +            uint8_t type; /* XEN_NETIF_GSO_TYPE_* */
-+
+-                      /* Future expansion. */
+-                      uint8_t pad;
 +            /* Future expansion. */
 +            uint8_t pad;
-+
+-                      /*
+-                       * GSO features. This specifies any extra GSO
+-                       * features required to process this packet,
+-                       * such as ECN support for TCPv4.
+-                       */
+-                      uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
+-              } gso;
 +            /*
 +             * GSO features. This specifies any extra GSO features required
 +             * to process this packet, such as ECN support for TCPv4.
 +             */
 +            uint16_t features; /* XEN_NETIF_GSO_FEAT_* */
 +        } gso;
-+
+-              uint16_t pad[3];
+-      } u;
 +        /*
 +         * XEN_NETIF_EXTRA_TYPE_MCAST_{ADD,DEL}:
 +         * Backend advertises availability via 'feature-multicast-control'
@@ -1099561,9 +1099492,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
 +        struct {
 +            uint8_t addr[6]; /* Address to add/remove. */
 +        } mcast;
--              uint16_t pad[3];
--      } u;
++
 +        uint16_t pad[3];
 +    } u;
  };
@@ -1099589,7 +1099518,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
  
  /* Packet data has been validated against protocol checksum. */
  #define _NETRXF_data_validated (0)
-@@ -131,23 +171,34 @@ struct xen_netif_rx_request {
+@@ -131,23 +171,34 @@
  #define _NETRXF_extra_info     (3)
  #define  NETRXF_extra_info     (1U<<_NETRXF_extra_info)
  
@@ -1099625,7 +1099554,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
  
  #define NETIF_RSP_DROPPED         -2
  #define NETIF_RSP_ERROR           -1
-@@ -156,3 +207,13 @@ DEFINE_RING_TYPES(xen_netif_rx,
+@@ -156,3 +207,13 @@
  #define NETIF_RSP_NULL             1
  
  #endif
@@ -1099639,9 +1099568,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/netif.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/pciif.h linux-2.6.27.19-5.1/include/xen/interface/io/pciif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/pciif.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/pciif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/pciif.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,101 @@
 +/*
 + * PCI Backend/Frontend Common Data Structures & Macros
@@ -1099744,9 +1099673,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/pciif.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/protocols.h linux-2.6.27.19-5.1/include/xen/interface/io/protocols.h
---- linux-2.6.27/include/xen/interface/io/protocols.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/protocols.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/protocols.h
+--- a/include/xen/interface/io/protocols.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/protocols.h     Wed May 06 16:57:00 2009 +0100
 @@ -1,10 +1,31 @@
 +/******************************************************************************
 + * protocols.h
@@ -1099789,13 +1099718,14 @@ diff -purN linux-2.6.27/include/xen/interface/io/protocols.h linux-2.6.27.19-5.1
  #else
  # error arch fixup needed here
  #endif
-diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/include/xen/interface/io/ring.h
---- linux-2.6.27/include/xen/interface/io/ring.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/ring.h        2009-03-25 16:11:52.000000000 +0000
-@@ -3,16 +3,42 @@
+diff -r 9608d5473017 include/xen/interface/io/ring.h
+--- a/include/xen/interface/io/ring.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/ring.h  Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * ring.h
   *
   * Shared producer-consumer ring macros.
-  *
++ *
 + * 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
@@ -1099813,10 +1099743,10 @@ diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/incl
 + * 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.
-+ *
+  *
   * Tim Deegan and Andrew Warfield November 2004.
   */
+@@ -9,10 +27,18 @@
  #ifndef __XEN_PUBLIC_IO_RING_H__
  #define __XEN_PUBLIC_IO_RING_H__
  
@@ -1099836,7 +1099766,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/incl
  #define __RD4(_x)  (((_x) & 0x0000000c) ? __RD2((_x)>>2)<<2    : __RD2(_x))
  #define __RD8(_x)  (((_x) & 0x000000f0) ? __RD4((_x)>>4)<<4    : __RD4(_x))
  #define __RD16(_x) (((_x) & 0x0000ff00) ? __RD8((_x)>>8)<<8    : __RD8(_x))
-@@ -25,73 +51,76 @@ typedef unsigned int RING_IDX;
+@@ -25,73 +51,76 @@
   * power of two (so we can mask with (size-1) to loop around).
   */
  #define __RING_SIZE(_s, _sz) \
@@ -1099957,7 +1099887,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/incl
  
  /*
   * Macros for manipulating rings.
-@@ -109,86 +138,94 @@ struct __name##_back_ring {                                              \
+@@ -109,86 +138,94 @@
   */
  
  /* Initialising empty rings */
@@ -1100096,7 +1100026,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/incl
  } while (0)
  
  /*
-@@ -221,40 +258,50 @@ struct __name##_back_ring {                                              \
+@@ -221,40 +258,50 @@
   *  field appropriately.
   */
  
@@ -1100175,9 +1100105,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/ring.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/tpmif.h linux-2.6.27.19-5.1/include/xen/interface/io/tpmif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/tpmif.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/tpmif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/tpmif.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,77 @@
 +/******************************************************************************
 + * tpmif.h
@@ -1100256,9 +1100186,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/tpmif.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/vscsiif.h linux-2.6.27.19-5.1/include/xen/interface/io/vscsiif.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/vscsiif.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/vscsiif.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/io/vscsiif.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,105 @@
 +/******************************************************************************
 + * vscsiif.h
@@ -1100365,13 +1100295,14 @@ diff -purN linux-2.6.27/include/xen/interface/io/vscsiif.h linux-2.6.27.19-5.1/i
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/include/xen/interface/io/xenbus.h
---- linux-2.6.27/include/xen/interface/io/xenbus.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/xenbus.h      2009-03-25 16:11:52.000000000 +0000
-@@ -3,42 +3,78 @@
+diff -r 9608d5473017 include/xen/interface/io/xenbus.h
+--- a/include/xen/interface/io/xenbus.h        Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/xenbus.h        Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * xenbus.h
   *
   * Xenbus protocol details.
-  *
++ *
 + * 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
@@ -1100389,10 +1100320,10 @@ diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/in
 + * 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.
-+ *
+  *
   * Copyright (C) 2005 XenSource Ltd.
   */
+@@ -9,36 +27,54 @@
  #ifndef _XEN_PUBLIC_IO_XENBUS_H
  #define _XEN_PUBLIC_IO_XENBUS_H
  
@@ -1100423,7 +1100354,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/in
 + */
 +enum xenbus_state {
 +    XenbusStateUnknown       = 0,
-+
 +    XenbusStateInitialising  = 1,
 +
 +    /*
@@ -1100450,7 +1100381,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/in
 +     * Reconfiguring: The device is being reconfigured.
 +     */
 +    XenbusStateReconfiguring = 7,
++
 +    XenbusStateReconfigured  = 8
  };
 +typedef enum xenbus_state XenbusState;
@@ -1100471,9 +1100402,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/xenbus.h linux-2.6.27.19-5.1/in
 + * indent-tabs-mode: nil
   * End:
   */
-diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/include/xen/interface/io/xs_wire.h
---- linux-2.6.27/include/xen/interface/io/xs_wire.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/io/xs_wire.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/io/xs_wire.h
+--- a/include/xen/interface/io/xs_wire.h       Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/io/xs_wire.h       Wed May 06 16:57:00 2009 +0100
 @@ -1,6 +1,25 @@
  /*
   * Details of the "wire" protocol between Xen Store Daemon and client
@@ -1100500,7 +1100431,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/i
   * Copyright (C) 2005 Rusty Russell IBM Corporation
   */
  
-@@ -26,7 +45,9 @@ enum xsd_sockmsg_type
+@@ -26,7 +45,9 @@
      XS_SET_PERMS,
      XS_WATCH_EVENT,
      XS_ERROR,
@@ -1100511,7 +1100442,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/i
  };
  
  #define XS_WRITE_NONE "NONE"
-@@ -40,7 +61,12 @@ struct xsd_errors
+@@ -40,7 +61,12 @@
      const char *errstring;
  };
  #define XSD_ERROR(x) { x, #x }
@@ -1100525,7 +1100456,7 @@ diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/i
      XSD_ERROR(EINVAL),
      XSD_ERROR(EACCES),
      XSD_ERROR(EEXIST),
-@@ -84,4 +110,21 @@ struct xenstore_domain_interface {
+@@ -84,4 +110,21 @@
      XENSTORE_RING_IDX rsp_cons, rsp_prod;
  };
  
@@ -1100547,9 +1100478,9 @@ diff -purN linux-2.6.27/include/xen/interface/io/xs_wire.h linux-2.6.27.19-5.1/i
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/kexec.h linux-2.6.27.19-5.1/include/xen/interface/kexec.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/kexec.h  2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/kexec.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/kexec.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,168 @@
 +/******************************************************************************
 + * kexec.h - Public portion
@@ -1100719,13 +1100650,14 @@ diff -purN linux-2.6.27/include/xen/interface/kexec.h linux-2.6.27.19-5.1/includ
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/include/xen/interface/memory.h
---- linux-2.6.27/include/xen/interface/memory.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/memory.h 2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/memory.h
+--- a/include/xen/interface/memory.h   Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/memory.h   Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * memory.h
   *
   * Memory reservation and information.
-  *
++ *
 + * 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
@@ -1100743,10 +1100675,9 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
 + * 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.
-+ *
+  *
   * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
   */
 @@ -10,13 +28,28 @@
  #define __XEN_PUBLIC_MEMORY_H__
  
@@ -1100778,7 +1100709,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  struct xen_memory_reservation {
  
      /*
-@@ -29,19 +62,18 @@ struct xen_memory_reservation {
+@@ -29,19 +62,18 @@
       *   OUT: GMFN bases of extents that were allocated
       *   (NB. This command also updates the mach_to_phys translation table)
       */
@@ -1100805,7 +1100736,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  
      /*
       * Domain whose reservation is being changed.
-@@ -50,7 +82,52 @@ struct xen_memory_reservation {
+@@ -50,7 +82,52 @@
      domid_t        domid;
  
  };
@@ -1100859,19 +1100790,19 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  
  /*
   * Returns the maximum machine frame number of mapped RAM in this system.
-@@ -68,6 +145,11 @@ DEFINE_GUEST_HANDLE_STRUCT(xen_memory_re
+@@ -66,6 +143,11 @@
+  */
+ #define XENMEM_current_reservation  3
  #define XENMEM_maximum_reservation  4
- /*
++
++/*
 + * Returns the maximum GPFN in use by the guest, or -ve errcode on failure.
 + */
 +#define XENMEM_maximum_gpfn         14
-+
-+/*
+ /*
   * Returns a list of MFN bases of 2MB extents comprising the machine_to_phys
-  * mapping table. Architectures which do not have a m2p table do not implement
-  * this command.
-@@ -86,7 +168,7 @@ struct xen_machphys_mfn_list {
+@@ -86,7 +168,7 @@
       * any large discontiguities in the machine address space, 2MB gaps in
       * the machphys table will be represented by an MFN base of zero.
       */
@@ -1100880,7 +1100811,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  
      /*
       * Number of extents written to the above array. This will be smaller
-@@ -94,7 +176,23 @@ struct xen_machphys_mfn_list {
+@@ -94,7 +176,23 @@
       */
      unsigned int nr_extents;
  };
@@ -1100905,7 +1100836,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  
  /*
   * Sets the GPFN at which a particular page appears in the specified guest's
-@@ -109,15 +207,34 @@ struct xen_add_to_physmap {
+@@ -109,15 +207,34 @@
      /* Source mapping space. */
  #define XENMAPSPACE_shared_info 0 /* shared info page */
  #define XENMAPSPACE_grant_table 1 /* grant table page */
@@ -1100943,7 +1100874,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
  
  /*
   * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
-@@ -129,17 +246,72 @@ struct xen_translate_gpfn_list {
+@@ -129,17 +246,72 @@
      domid_t domid;
  
      /* Length of list. */
@@ -1100960,7 +1100891,8 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
       */
 -    GUEST_HANDLE(ulong) mfn_list;
 +    XEN_GUEST_HANDLE(xen_pfn_t) mfn_list;
-+};
+ };
+-DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
 +DEFINE_XEN_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
 +typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t;
 +DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t);
@@ -1101004,8 +1100936,7 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
 +struct xen_foreign_memory_map {
 +    domid_t domid;
 +    struct xen_memory_map map;
- };
--DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
++};
 +typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
 +DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
  
@@ -1101020,9 +1100951,9 @@ diff -purN linux-2.6.27/include/xen/interface/memory.h linux-2.6.27.19-5.1/inclu
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/nmi.h linux-2.6.27.19-5.1/include/xen/interface/nmi.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/nmi.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/nmi.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/nmi.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,78 @@
 +/******************************************************************************
 + * nmi.h
@@ -1101102,9 +1101033,9 @@ diff -purN linux-2.6.27/include/xen/interface/nmi.h linux-2.6.27.19-5.1/include/
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/physdev.h linux-2.6.27.19-5.1/include/xen/interface/physdev.h
---- linux-2.6.27/include/xen/interface/physdev.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/physdev.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/physdev.h
+--- a/include/xen/interface/physdev.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/physdev.h  Wed May 06 16:57:00 2009 +0100
 @@ -24,7 +24,7 @@
  /*
   * Prototype for this hypercall is:
@@ -1101251,7 +1101182,7 @@ diff -purN linux-2.6.27/include/xen/interface/physdev.h linux-2.6.27.19-5.1/incl
 +    uint32_t irq;
 +    /* IN or OUT */
 +    uint32_t vector;
-+};
+ };
 +typedef struct physdev_irq physdev_irq_t;
 +DEFINE_XEN_GUEST_HANDLE(physdev_irq_t);
 +
@@ -1101306,7 +1101237,7 @@ diff -purN linux-2.6.27/include/xen/interface/physdev.h linux-2.6.27.19-5.1/incl
 +    /* IN */
 +    uint8_t bus;
 +    uint8_t devfn;
- };
++};
 +typedef struct physdev_restore_msi physdev_restore_msi_t;
 +DEFINE_XEN_GUEST_HANDLE(physdev_restore_msi_t);
  
@@ -1101377,9 +1101308,9 @@ diff -purN linux-2.6.27/include/xen/interface/physdev.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/platform.h linux-2.6.27.19-5.1/include/xen/interface/platform.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/platform.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/platform.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/platform.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,357 @@
 +/******************************************************************************
 + * platform.h
@@ -1101738,13 +1101669,14 @@ diff -purN linux-2.6.27/include/xen/interface/platform.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/include/xen/interface/sched.h
---- linux-2.6.27/include/xen/interface/sched.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/sched.h  2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/sched.h
+--- a/include/xen/interface/sched.h    Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/sched.h    Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * sched.h
   *
   * Scheduler state interactions
-  *
++ *
 + * 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
@@ -1101762,10 +1101694,9 @@ diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/includ
 + * 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.
-+ *
+  *
   * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
   */
 @@ -13,17 +31,17 @@
  
  /*
@@ -1101798,7 +1101729,7 @@ diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/includ
  
  /*
   * Poll a set of event-channel ports. Return when one or more are pending. An
-@@ -58,11 +78,27 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_shutdow
+@@ -58,11 +78,27 @@
   */
  #define SCHEDOP_poll        3
  struct sched_poll {
@@ -1101828,7 +1101759,7 @@ diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/includ
  
  /*
   * Reason codes for SCHEDOP_shutdown. These may be interpreted by control
-@@ -75,3 +111,13 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_poll);
+@@ -75,3 +111,13 @@
  #define SHUTDOWN_crash      3  /* Tell controller we've crashed.             */
  
  #endif /* __XEN_PUBLIC_SCHED_H__ */
@@ -1101842,9 +1101773,9 @@ diff -purN linux-2.6.27/include/xen/interface/sched.h linux-2.6.27.19-5.1/includ
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/sysctl.h linux-2.6.27.19-5.1/include/xen/interface/sysctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/sysctl.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/sysctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/sysctl.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,308 @@
 +/******************************************************************************
 + * sysctl.h
@@ -1102154,9 +1102085,9 @@ diff -purN linux-2.6.27/include/xen/interface/sysctl.h linux-2.6.27.19-5.1/inclu
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/trace.h linux-2.6.27.19-5.1/include/xen/interface/trace.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/trace.h  2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/trace.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/trace.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,205 @@
 +/******************************************************************************
 + * include/public/trace.h
@@ -1102363,9 +1102294,9 @@ diff -purN linux-2.6.27/include/xen/interface/trace.h linux-2.6.27.19-5.1/includ
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/vcpu.h linux-2.6.27.19-5.1/include/xen/interface/vcpu.h
---- linux-2.6.27/include/xen/interface/vcpu.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/vcpu.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/vcpu.h
+--- a/include/xen/interface/vcpu.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/vcpu.h     Wed May 06 16:57:00 2009 +0100
 @@ -29,9 +29,9 @@
  
  /*
@@ -1102460,7 +1102391,7 @@ diff -purN linux-2.6.27/include/xen/interface/vcpu.h linux-2.6.27.19-5.1/include
  
  /* VCPU is currently running on a physical CPU. */
  #define RUNSTATE_running  0
-@@ -108,47 +110,54 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_runstate
+@@ -108,47 +110,54 @@
   * Register a shared memory area from which the guest may obtain its own
   * runstate information without needing to execute a hypercall.
   * Notes:
@@ -1102535,7 +1102466,7 @@ diff -purN linux-2.6.27/include/xen/interface/vcpu.h linux-2.6.27.19-5.1/include
  
  /* Flags to VCPUOP_set_singleshot_timer. */
   /* Require the timeout to be in the future (return -ETIME if it's passed). */
-@@ -161,13 +170,48 @@ DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_sing
+@@ -161,13 +170,48 @@
   * structure in a convenient place, such as in a per-cpu data area.
   * The pointer need not be page aligned, but the structure must not
   * cross a page boundary.
@@ -1102586,13 +1102517,14 @@ diff -purN linux-2.6.27/include/xen/interface/vcpu.h linux-2.6.27.19-5.1/include
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/version.h linux-2.6.27.19-5.1/include/xen/interface/version.h
---- linux-2.6.27/include/xen/interface/version.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/version.h        2009-03-25 16:11:52.000000000 +0000
-@@ -3,6 +3,24 @@
+diff -r 9608d5473017 include/xen/interface/version.h
+--- a/include/xen/interface/version.h  Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/version.h  Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * version.h
   *
   * Xen version, type, and compile information.
-  *
++ *
 + * 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
@@ -1102610,10 +1102542,9 @@ diff -purN linux-2.6.27/include/xen/interface/version.h linux-2.6.27.19-5.1/incl
 + * 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.
-+ *
+  *
   * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
   * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
-  */
 @@ -10,17 +28,18 @@
  #ifndef __XEN_PUBLIC_VERSION_H__
  #define __XEN_PUBLIC_VERSION_H__
@@ -1102636,7 +1102567,7 @@ diff -purN linux-2.6.27/include/xen/interface/version.h linux-2.6.27.19-5.1/incl
  
  /* arg == xen_compile_info_t. */
  #define XENVER_compile_info 2
-@@ -30,31 +49,52 @@ struct xen_compile_info {
+@@ -30,31 +49,52 @@
      char compile_domain[32];
      char compile_date[32];
  };
@@ -1102693,9 +1102624,9 @@ diff -purN linux-2.6.27/include/xen/interface/version.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/xen-compat.h linux-2.6.27.19-5.1/include/xen/interface/xen-compat.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xen-compat.h     2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xen-compat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xen-compat.h       Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,44 @@
 +/******************************************************************************
 + * xen-compat.h
@@ -1102741,13 +1102672,14 @@ diff -purN linux-2.6.27/include/xen/interface/xen-compat.h linux-2.6.27.19-5.1/i
 +#endif
 +
 +#endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */
-diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/xen/interface/xen.h
---- linux-2.6.27/include/xen/interface/xen.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xen.h    2009-03-25 16:11:52.000000000 +0000
-@@ -3,35 +3,70 @@
+diff -r 9608d5473017 include/xen/interface/xen.h
+--- a/include/xen/interface/xen.h      Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/interface/xen.h      Wed May 06 16:57:00 2009 +0100
+@@ -2,6 +2,24 @@
+  * xen.h
   *
   * Guest OS interface to Xen.
-  *
++ *
 + * 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
@@ -1102765,24 +1102697,21 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
 + * 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.
-+ *
+  *
   * Copyright (c) 2004, K A Fraser
   */
+@@ -9,29 +27,46 @@
  #ifndef __XEN_PUBLIC_XEN_H__
  #define __XEN_PUBLIC_XEN_H__
  
--#include <asm/xen/interface.h>
 +#include "xen-compat.h"
 +#ifdef CONFIG_PARAVIRT_XEN
- #include <asm/pvclock-abi.h>
++#include <asm/pvclock-abi.h>
 +#endif
--/*
-- * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
-- */
++
 +#if defined(CONFIG_PARAVIRT_XEN) && !defined(HAVE_XEN_PLATFORM_COMPAT_H)
-+#include <asm/xen/interface.h>
+ #include <asm/xen/interface.h>
+-#include <asm/pvclock-abi.h>
 +#elif defined(__i386__) || defined(__x86_64__)
 +#include "arch-x86/xen.h"
 +#elif defined(__ia64__)
@@ -1102805,15 +1102734,18 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
 +#endif
  
  /*
+- * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
++ * HYPERCALLS
+  */
+-/*
 - * x86_32: EAX = vector; EBX, ECX, EDX, ESI, EDI = args 1, 2, 3, 4, 5.
 - *         EAX = return value
 - *         (argument registers may be clobbered on return)
 - * x86_64: RAX = vector; RDI, RSI, RDX, R10, R8, R9 = args 1, 2, 3, 4, 5, 6.
 - *         RAX = return value
 - *         (argument registers not clobbered on return; RCX, R11 are)
-+ * HYPERCALLS
-  */
-+
+- */
  #define __HYPERVISOR_set_trap_table        0
  #define __HYPERVISOR_mmu_update            1
  #define __HYPERVISOR_set_gdt               2
@@ -1102890,18 +1102822,17 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
   * VIRTUAL INTERRUPTS
   *
   * Virtual interrupts that a guest OS may receive from Xen.
-- */
--#define VIRQ_TIMER      0  /* Timebase update, and/or requested timeout.  */
--#define VIRQ_DEBUG      1  /* Request guest to dump debug info.           */
--#define VIRQ_CONSOLE    2  /* (DOM0) Bytes received on emergency console. */
--#define VIRQ_DOM_EXC    3  /* (DOM0) Exceptional event for some domain.   */
--#define VIRQ_DEBUGGER   6  /* (DOM0) A domain has paused for debugging.   */
 + *
 + * In the side comments, 'V.' denotes a per-VCPU VIRQ while 'G.' denotes a
 + * global VIRQ. The former can be bound once per VCPU and cannot be re-bound.
 + * The latter can be allocated only once per guest: they must initially be
 + * allocated to VCPU0 but can subsequently be re-bound.
-+ */
+  */
+-#define VIRQ_TIMER      0  /* Timebase update, and/or requested timeout.  */
+-#define VIRQ_DEBUG      1  /* Request guest to dump debug info.           */
+-#define VIRQ_CONSOLE    2  /* (DOM0) Bytes received on emergency console. */
+-#define VIRQ_DOM_EXC    3  /* (DOM0) Exceptional event for some domain.   */
+-#define VIRQ_DEBUGGER   6  /* (DOM0) A domain has paused for debugging.   */
 +#define VIRQ_TIMER      0  /* V. Timebase update, and/or requested timeout.  */
 +#define VIRQ_DEBUG      1  /* V. Request guest to dump debug info.           */
 +#define VIRQ_CONSOLE    2  /* G. (DOM0) Bytes received on emergency console. */
@@ -1102985,7 +1102916,7 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
  #endif
  
  /* These are passed as 'flags' to update_va_mapping. They can be ORed. */
-@@ -224,11 +312,24 @@ DEFINE_GUEST_HANDLE_STRUCT(mmuext_op);
+@@ -224,11 +312,24 @@
   */
  #define VMASST_CMD_enable                0
  #define VMASST_CMD_disable               1
@@ -1103011,7 +1102942,7 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
  
  #ifndef __ASSEMBLY__
  
-@@ -267,7 +368,9 @@ struct mmu_update {
+@@ -267,7 +368,9 @@
      uint64_t ptr;       /* Machine address of PTE. */
      uint64_t val;       /* New contents of PTE.    */
  };
@@ -1103022,7 +1102953,7 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
  
  /*
   * Send an array of these to HYPERVISOR_multicall().
-@@ -275,10 +378,16 @@ DEFINE_GUEST_HANDLE_STRUCT(mmu_update);
+@@ -275,10 +378,16 @@
   */
  struct multicall_entry {
      unsigned long op;
@@ -1103040,7 +1102971,7 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
  
  /*
   * Event channel endpoints per domain:
-@@ -287,173 +396,240 @@ DEFINE_GUEST_HANDLE_STRUCT(multicall_ent
+@@ -287,179 +396,251 @@
  #define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64)
  
  struct vcpu_time_info {
@@ -1103209,12 +1103140,6 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
 -       */
 -      unsigned long evtchn_pending[sizeof(unsigned long) * 8];
 -      unsigned long evtchn_mask[sizeof(unsigned long) * 8];
--
--      /*
--       * Wallclock time: updated only by control software. Guests should base
--       * their gettimeofday() syscall on this wallclock-base value.
--       */
--      struct pvclock_wall_clock wc;
 +    /*
 +     * A domain can create "event channels" on which it can send and receive
 +     * asynchronous event notifications. There are three classes of event that
@@ -1103248,7 +1103173,12 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
 +     */
 +    unsigned long evtchn_pending[sizeof(unsigned long) * 8];
 +    unsigned long evtchn_mask[sizeof(unsigned long) * 8];
-+
+-      /*
+-       * Wallclock time: updated only by control software. Guests should base
+-       * their gettimeofday() syscall on this wallclock-base value.
+-       */
+-      struct pvclock_wall_clock wc;
 +    /*
 +     * Wallclock time: updated only by control software. Guests should base
 +     * their gettimeofday() syscall on this wallclock-base value.
@@ -1103411,19 +1103341,18 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
  
  typedef uint8_t xen_domain_handle_t[16];
  
-@@ -461,6 +637,11 @@ typedef uint8_t xen_domain_handle_t[16];
+ /* Turn a plain number into a C unsigned long constant. */
  #define __mk_unsigned_long(x) x ## UL
  #define mk_unsigned_long(x) __mk_unsigned_long(x)
++
 +__DEFINE_XEN_GUEST_HANDLE(uint8,  uint8_t);
 +__DEFINE_XEN_GUEST_HANDLE(uint16, uint16_t);
 +__DEFINE_XEN_GUEST_HANDLE(uint32, uint32_t);
 +__DEFINE_XEN_GUEST_HANDLE(uint64, uint64_t);
-+
  #else /* __ASSEMBLY__ */
  
- /* In assembly code we cannot use C numeric constant suffixes. */
-@@ -468,4 +649,24 @@ typedef uint8_t xen_domain_handle_t[16];
+@@ -468,4 +649,24 @@
  
  #endif /* !__ASSEMBLY__ */
  
@@ -1103448,9 +1103377,9 @@ diff -purN linux-2.6.27/include/xen/interface/xen.h linux-2.6.27.19-5.1/include/
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/xenoprof.h linux-2.6.27.19-5.1/include/xen/interface/xenoprof.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xenoprof.h       2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xenoprof.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xenoprof.h Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,138 @@
 +/******************************************************************************
 + * xenoprof.h
@@ -1103590,9 +1103519,9 @@ diff -purN linux-2.6.27/include/xen/interface/xenoprof.h linux-2.6.27.19-5.1/inc
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/xsm/acm.h linux-2.6.27.19-5.1/include/xen/interface/xsm/acm.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/acm.h        2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/acm.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/acm.h  Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,235 @@
 +/*
 + * acm.h: Xen access control module interface defintions
@@ -1103829,9 +1103758,9 @@ diff -purN linux-2.6.27/include/xen/interface/xsm/acm.h linux-2.6.27.19-5.1/incl
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/xsm/acm_ops.h linux-2.6.27.19-5.1/include/xen/interface/xsm/acm_ops.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/acm_ops.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/acm_ops.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/acm_ops.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,159 @@
 +/*
 + * acm_ops.h: Xen access control module hypervisor commands
@@ -1103992,9 +1103921,9 @@ diff -purN linux-2.6.27/include/xen/interface/xsm/acm_ops.h linux-2.6.27.19-5.1/
 + * indent-tabs-mode: nil
 + * End:
 + */
-diff -purN linux-2.6.27/include/xen/interface/xsm/flask_op.h linux-2.6.27.19-5.1/include/xen/interface/xsm/flask_op.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/interface/xsm/flask_op.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/interface/xsm/flask_op.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/interface/xsm/flask_op.h     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,45 @@
 +/*
 + *  This file contains the flask_op hypercall commands and definitions.
@@ -1104041,9 +1103970,9 @@ diff -purN linux-2.6.27/include/xen/interface/xsm/flask_op.h linux-2.6.27.19-5.1
 +DEFINE_XEN_GUEST_HANDLE(flask_op_t);
 +
 +#endif
-diff -purN linux-2.6.27/include/xen/pcifront.h linux-2.6.27.19-5.1/include/xen/pcifront.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/pcifront.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/pcifront.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/pcifront.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,69 @@
 +/*
 + * PCI Frontend - arch-dependendent declarations
@@ -1104114,9 +1104043,9 @@ diff -purN linux-2.6.27/include/xen/pcifront.h linux-2.6.27.19-5.1/include/xen/p
 +#endif /* __KERNEL__ */
 +
 +#endif /* __XEN_ASM_PCIFRONT_H__ */
-diff -purN linux-2.6.27/include/xen/public/evtchn.h linux-2.6.27.19-5.1/include/xen/public/evtchn.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/evtchn.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/evtchn.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/evtchn.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,88 @@
 +/******************************************************************************
 + * evtchn.h
@@ -1104206,9 +1104135,9 @@ diff -purN linux-2.6.27/include/xen/public/evtchn.h linux-2.6.27.19-5.1/include/
 +      _IOC(_IOC_NONE, 'E', 5, 0)
 +
 +#endif /* __LINUX_PUBLIC_EVTCHN_H__ */
-diff -purN linux-2.6.27/include/xen/public/gntdev.h linux-2.6.27.19-5.1/include/xen/public/gntdev.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/gntdev.h    2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/gntdev.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/gntdev.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,119 @@
 +/******************************************************************************
 + * gntdev.h
@@ -1104329,9 +1104258,9 @@ diff -purN linux-2.6.27/include/xen/public/gntdev.h linux-2.6.27.19-5.1/include/
 +};
 +
 +#endif /* __LINUX_PUBLIC_GNTDEV_H__ */
-diff -purN linux-2.6.27/include/xen/public/privcmd.h linux-2.6.27.19-5.1/include/xen/public/privcmd.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/public/privcmd.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/public/privcmd.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/public/privcmd.h     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,79 @@
 +/******************************************************************************
 + * privcmd.h
@@ -1104412,9 +1104341,9 @@ diff -purN linux-2.6.27/include/xen/public/privcmd.h linux-2.6.27.19-5.1/include
 +      _IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
 +
 +#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
-diff -purN linux-2.6.27/include/xen/sysctl.h linux-2.6.27.19-5.1/include/xen/sysctl.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/sysctl.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/sysctl.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/sysctl.h     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,11 @@
 +#ifndef _XEN_SYSCTL_H
 +#define _XEN_SYSCTL_H
@@ -1104427,9 +1104356,9 @@ diff -purN linux-2.6.27/include/xen/sysctl.h linux-2.6.27.19-5.1/include/xen/sys
 +};
 +
 +#endif /* _XEN_SYSCTL_H */
-diff -purN linux-2.6.27/include/xen/xen_proc.h linux-2.6.27.19-5.1/include/xen/xen_proc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xen_proc.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xen_proc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xen_proc.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,12 @@
 +
 +#ifndef __ASM_XEN_PROC_H__
@@ -1104443,9 +1104372,9 @@ diff -purN linux-2.6.27/include/xen/xen_proc.h linux-2.6.27.19-5.1/include/xen/x
 +      const char *name);
 +
 +#endif /* __ASM_XEN_PROC_H__ */
-diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xenbus.h
---- linux-2.6.27/include/xen/xenbus.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xenbus.h   2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xenbus.h
+--- a/include/xen/xenbus.h     Wed May 06 15:47:13 2009 +0100
++++ b/include/xen/xenbus.h     Wed May 06 16:57:00 2009 +0100
 @@ -39,6 +39,7 @@
  #include <linux/mutex.h>
  #include <linux/completion.h>
@@ -1104454,7 +1104383,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
  #include <xen/interface/xen.h>
  #include <xen/interface/grant_table.h>
  #include <xen/interface/io/xenbus.h>
-@@ -55,8 +56,21 @@ struct xenbus_watch
+@@ -55,8 +56,21 @@
        /* Callback (executed in a process context with no locks held). */
        void (*callback)(struct xenbus_watch *,
                         const char **vec, unsigned int len);
@@ -1104476,7 +1104405,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
  
  /* A xenbus device. */
  struct xenbus_device {
-@@ -83,8 +97,7 @@ struct xenbus_device_id
+@@ -83,8 +97,7 @@
  
  /* A xenbus driver. */
  struct xenbus_driver {
@@ -1104486,7 +1104415,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
        const struct xenbus_device_id *ids;
        int (*probe)(struct xenbus_device *dev,
                     const struct xenbus_device_id *id);
-@@ -94,7 +107,7 @@ struct xenbus_driver {
+@@ -94,7 +107,7 @@
        int (*suspend)(struct xenbus_device *dev);
        int (*suspend_cancel)(struct xenbus_device *dev);
        int (*resume)(struct xenbus_device *dev);
@@ -1104495,7 +1104424,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
        struct device_driver driver;
        int (*read_otherend_details)(struct xenbus_device *dev);
        int (*is_ready)(struct xenbus_device *dev);
-@@ -112,7 +125,6 @@ int __must_check __xenbus_register_front
+@@ -112,7 +125,6 @@
  static inline int __must_check
  xenbus_register_frontend(struct xenbus_driver *drv)
  {
@@ -1104503,7 +1104432,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
        return __xenbus_register_frontend(drv, THIS_MODULE, KBUILD_MODNAME);
  }
  
-@@ -122,7 +134,6 @@ int __must_check __xenbus_register_backe
+@@ -122,7 +134,6 @@
  static inline int __must_check
  xenbus_register_backend(struct xenbus_driver *drv)
  {
@@ -1104511,16 +1104440,16 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
        return __xenbus_register_backend(drv, THIS_MODULE, KBUILD_MODNAME);
  }
  
-@@ -136,8 +147,6 @@ struct xenbus_transaction
+@@ -135,8 +146,6 @@
  /* Nil transaction ID. */
  #define XBT_NIL ((struct xenbus_transaction) { 0 })
--int __init xenbus_dev_init(void);
 -
+-int __init xenbus_dev_init(void);
  char **xenbus_directory(struct xenbus_transaction t,
                        const char *dir, const char *node, unsigned int *num);
- void *xenbus_read(struct xenbus_transaction t,
-@@ -167,7 +176,6 @@ int xenbus_printf(struct xenbus_transact
+@@ -167,7 +176,6 @@
  int xenbus_gather(struct xenbus_transaction t, const char *dir, ...);
  
  /* notifer routines for when the xenstore comes up */
@@ -1104528,7 +1104457,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
  int register_xenstore_notifier(struct notifier_block *nb);
  void unregister_xenstore_notifier(struct notifier_block *nb);
  
-@@ -180,12 +188,9 @@ void xs_suspend_cancel(void);
+@@ -180,12 +188,9 @@
  /* Used by xenbus_dev to borrow kernel's store connection. */
  void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg);
  
@@ -1104541,7 +1104470,7 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
  void xenbus_suspend_cancel(void);
  
  #define XENBUS_IS_ERR_READ(str) ({                    \
-@@ -198,38 +203,132 @@ void xenbus_suspend_cancel(void);
+@@ -198,38 +203,132 @@
  
  #define XENBUS_EXIST_ERR(err) ((err) == -ENOENT || (err) == -ERANGE)
  
@@ -1104680,9 +1104609,9 @@ diff -purN linux-2.6.27/include/xen/xenbus.h linux-2.6.27.19-5.1/include/xen/xen
 +int xenbus_for_each_frontend(void *arg, int (*fn)(struct device *, void *));
 +
  #endif /* _XEN_XENBUS_H */
-diff -purN linux-2.6.27/include/xen/xencons.h linux-2.6.27.19-5.1/include/xen/xencons.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xencons.h  2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xencons.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xencons.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,17 @@
 +#ifndef __ASM_XENCONS_H__
 +#define __ASM_XENCONS_H__
@@ -1104701,9 +1104630,9 @@ diff -purN linux-2.6.27/include/xen/xencons.h linux-2.6.27.19-5.1/include/xen/xe
 +int xencons_ring_send(const char *data, unsigned len);
 +
 +#endif /* __ASM_XENCONS_H__ */
-diff -purN linux-2.6.27/include/xen/xenoprof.h linux-2.6.27.19-5.1/include/xen/xenoprof.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/include/xen/xenoprof.h 2009-03-25 16:11:52.000000000 +0000
+diff -r 9608d5473017 include/xen/xenoprof.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/include/xen/xenoprof.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,42 @@
 +/******************************************************************************
 + * xen/xenoprof.h
@@ -1104747,35 +1104676,35 @@ diff -purN linux-2.6.27/include/xen/xenoprof.h linux-2.6.27.19-5.1/include/xen/x
 +
 +#endif /* CONFIG_XEN */
 +#endif /* __XEN_XENOPROF_H__ */
-diff -purN linux-2.6.27/init/Kconfig linux-2.6.27.19-5.1/init/Kconfig
---- linux-2.6.27/init/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/Kconfig   2009-03-25 16:11:32.000000000 +0000
-@@ -101,6 +101,10 @@ config LOCALVERSION_AUTO
+diff -r 9608d5473017 init/Kconfig
+--- a/init/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/init/Kconfig     Wed May 06 16:57:00 2009 +0100
+@@ -100,6 +100,10 @@
+           $ git rev-parse --verify HEAD
  
          which is done within the script "scripts/setlocalversion".)
++
 +config SUSE_KERNEL
 +      bool
 +      default y
-+
  config SWAP
        bool "Support for paging of anonymous memory (swap)"
-       depends on MMU && BLOCK
-@@ -299,6 +303,13 @@ config CGROUP_NS
+@@ -298,6 +302,13 @@
+           provide hierarchical naming of sets of namespaces,
            for instance virtual servers and checkpoint/restart
            jobs.
++
 +config CGROUP_FREEZER
 +        bool "control group freezer subsystem"
 +        depends on CGROUPS
 +        help
 +          Provides a way to freeze and unfreeze all tasks in a
 +        cgroup.
-+
  config CGROUP_DEVICE
        bool "Device controller for cgroups"
-       depends on CGROUPS && EXPERIMENTAL
-@@ -771,6 +782,13 @@ config PROFILING
+@@ -771,6 +782,13 @@
          Say Y here to enable the extended profiling support mechanisms used
          by profilers such as OProfile.
  
@@ -1104789,7 +1104718,7 @@ diff -purN linux-2.6.27/init/Kconfig linux-2.6.27.19-5.1/init/Kconfig
  config MARKERS
        bool "Activate markers"
        help
-@@ -898,6 +916,16 @@ config STOP_MACHINE
+@@ -898,6 +916,16 @@
        help
          Need stop_machine() primitive.
  
@@ -1104806,9 +1104735,9 @@ diff -purN linux-2.6.27/init/Kconfig linux-2.6.27.19-5.1/init/Kconfig
  source "block/Kconfig"
  
  config PREEMPT_NOTIFIERS
-diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_rd.c
---- linux-2.6.27/init/do_mounts_rd.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/do_mounts_rd.c    2009-03-25 16:11:32.000000000 +0000
+diff -r 9608d5473017 init/do_mounts_rd.c
+--- a/init/do_mounts_rd.c      Wed May 06 15:47:13 2009 +0100
++++ b/init/do_mounts_rd.c      Wed May 06 16:57:00 2009 +0100
 @@ -5,6 +5,7 @@
  #include <linux/ext2_fs.h>
  #include <linux/romfs_fs.h>
@@ -1104817,7 +1104746,7 @@ diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_r
  #include <linux/initrd.h>
  #include <linux/string.h>
  
-@@ -37,6 +38,7 @@ static int __init crd_load(int in_fd, in
+@@ -37,6 +38,7 @@
   * numbers could not be found.
   *
   * We currently check for the following magic numbers:
@@ -1104825,7 +1104754,7 @@ diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_r
   *    minix
   *    ext2
   *    romfs
-@@ -51,6 +53,7 @@ identify_ramdisk_image(int fd, int start
+@@ -51,6 +53,7 @@
        struct ext2_super_block *ext2sb;
        struct romfs_super_block *romfsb;
        struct cramfs_super *cramfsb;
@@ -1104833,7 +1104762,7 @@ diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_r
        int nblocks = -1;
        unsigned char *buf;
  
-@@ -62,6 +65,7 @@ identify_ramdisk_image(int fd, int start
+@@ -62,6 +65,7 @@
        ext2sb = (struct ext2_super_block *) buf;
        romfsb = (struct romfs_super_block *) buf;
        cramfsb = (struct cramfs_super *) buf;
@@ -1104841,10 +1104770,13 @@ diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_r
        memset(buf, 0xe5, size);
  
        /*
-@@ -99,6 +103,18 @@ identify_ramdisk_image(int fd, int start
-               goto done;
-       }
+@@ -96,6 +100,18 @@
+                      "RAMDISK: cramfs filesystem found at block %d\n",
+                      start_block);
+               nblocks = (cramfsb->size + BLOCK_SIZE - 1) >> BLOCK_SIZE_BITS;
++              goto done;
++      }
++
 +      /* squashfs is at block zero too */
 +      if (squashfsb->s_magic == SQUASHFS_MAGIC) {
 +              printk(KERN_NOTICE
@@ -1104854,15 +1104786,12 @@ diff -purN linux-2.6.27/init/do_mounts_rd.c linux-2.6.27.19-5.1/init/do_mounts_r
 +                      nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
 +              else
 +                      nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
-+              goto done;
-+      }
-+
-       /*
-        * Read block 1 to test for minix and ext2 superblock
-        */
-diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
---- linux-2.6.27/init/initramfs.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/initramfs.c       2009-03-25 16:11:32.000000000 +0000
+               goto done;
+       }
+diff -r 9608d5473017 init/initramfs.c
+--- a/init/initramfs.c Wed May 06 15:47:13 2009 +0100
++++ b/init/initramfs.c Wed May 06 16:57:00 2009 +0100
 @@ -6,6 +6,9 @@
  #include <linux/delay.h>
  #include <linux/string.h>
@@ -1104873,7 +1104802,7 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
  
  static __initdata char *message;
  static void __init error(char *x)
-@@ -80,6 +83,12 @@ static __initdata unsigned long body_len
+@@ -80,6 +83,12 @@
  static __initdata uid_t uid;
  static __initdata gid_t gid;
  static __initdata unsigned rdev;
@@ -1104886,7 +1104815,7 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
  
  static void __init parse_header(char *s)
  {
-@@ -113,6 +122,7 @@ static __initdata enum state {
+@@ -113,6 +122,7 @@
        SkipIt,
        GotName,
        CopyFile,
@@ -1104894,7 +1104823,7 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
        GotSymlink,
        Reset
  } state, next_state;
-@@ -257,6 +267,9 @@ static int __init do_name(void)
+@@ -257,6 +267,9 @@
                free_hash();
                return 0;
        }
@@ -1104904,10 +1104833,11 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
        if (dry_run)
                return 0;
        clean_path(collected, mode);
-@@ -289,6 +302,40 @@ static int __init do_name(void)
+@@ -288,6 +301,40 @@
+       }
        return 0;
  }
++
 +#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
 +static int __init do_copy_mem(void)
 +{
@@ -1104941,11 +1104871,10 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
 +#else
 +#define do_copy_mem NULL
 +#endif
-+
  static int __init do_copy(void)
  {
-       if (count >= body_len) {
-@@ -323,6 +370,7 @@ static __initdata int (*actions[])(void)
+@@ -323,6 +370,7 @@
        [SkipIt]        = do_skip,
        [GotName]       = do_name,
        [CopyFile]      = do_copy,
@@ -1104953,7 +1104882,7 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
        [GotSymlink]    = do_symlink,
        [Reset]         = do_reset,
  };
-@@ -560,3 +608,31 @@ static int __init populate_rootfs(void)
+@@ -560,3 +608,31 @@
        return 0;
  }
  rootfs_initcall(populate_rootfs);
@@ -1104985,24 +1104914,25 @@ diff -purN linux-2.6.27/init/initramfs.c linux-2.6.27.19-5.1/init/initramfs.c
 +      return file_mem;
 +}
 +#endif
-diff -purN linux-2.6.27/init/main.c linux-2.6.27.19-5.1/init/main.c
---- linux-2.6.27/init/main.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/init/main.c    2009-03-25 16:11:32.000000000 +0000
-@@ -71,6 +71,10 @@
+diff -r 9608d5473017 init/main.c
+--- a/init/main.c      Wed May 06 15:47:13 2009 +0100
++++ b/init/main.c      Wed May 06 16:57:00 2009 +0100
+@@ -70,6 +70,10 @@
+ #ifdef CONFIG_X86_LOCAL_APIC
  #include <asm/smp.h>
  #endif
++
 +#ifdef        CONFIG_KDB
 +#include <linux/kdb.h>
 +#endif        /* CONFIG_KDB */
-+
  /*
   * This is one of the first .c files built. Error out early if we have compiler
-  * trouble.
-@@ -193,6 +197,26 @@ static const char *panic_later, *panic_p
+@@ -192,6 +196,26 @@
+ static const char *panic_later, *panic_param;
  
  extern struct obs_kernel_param __setup_start[], __setup_end[];
++
 +#ifdef        CONFIG_KDB
 +static int __init kdb_setup(char *str)
 +{
@@ -1105022,11 +1104952,10 @@ diff -purN linux-2.6.27/init/main.c linux-2.6.27.19-5.1/init/main.c
 +
 +__setup("kdb=", kdb_setup);
 +#endif        /* CONFIG_KDB */
-+
  static int __init obsolete_checksetup(char *line)
  {
-       struct obs_kernel_param *p;
-@@ -659,6 +683,14 @@ asmlinkage void __init start_kernel(void
+@@ -659,6 +683,14 @@
        pgtable_cache_init();
        prio_tree_init();
        anon_vma_init();
@@ -1105041,10 +1104970,10 @@ diff -purN linux-2.6.27/init/main.c linux-2.6.27.19-5.1/init/main.c
  #ifdef CONFIG_X86
        if (efi_enabled)
                efi_enter_virtual_mode();
-diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
---- linux-2.6.27/ipc/mqueue.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/mqueue.c   2009-03-25 16:11:43.000000000 +0000
-@@ -498,7 +498,8 @@ static void __do_notify(struct mqueue_in
+diff -r 9608d5473017 ipc/mqueue.c
+--- a/ipc/mqueue.c     Wed May 06 15:47:13 2009 +0100
++++ b/ipc/mqueue.c     Wed May 06 16:57:00 2009 +0100
+@@ -498,7 +498,8 @@
                        sig_i.si_errno = 0;
                        sig_i.si_code = SI_MESGQ;
                        sig_i.si_value = info->notify.sigev_value;
@@ -1105054,7 +1104983,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
                        sig_i.si_uid = current->uid;
  
                        kill_pid_info(info->notify.sigev_signo,
-@@ -647,8 +648,8 @@ static int oflag2acc[O_ACCMODE] = { MAY_
+@@ -647,8 +648,8 @@
        return dentry_open(dentry, mqueue_mnt, oflag);
  }
  
@@ -1105065,7 +1104994,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        struct dentry *dentry;
        struct file *filp;
-@@ -715,7 +716,7 @@ out_putname:
+@@ -715,7 +716,7 @@
        return fd;
  }
  
@@ -1105074,7 +1105003,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        int err;
        char *name;
-@@ -745,7 +746,7 @@ asmlinkage long sys_mq_unlink(const char
+@@ -745,7 +746,7 @@
        err = mnt_want_write(mqueue_mnt);
        if (err)
                goto out_err;
@@ -1105083,7 +1105012,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
        mnt_drop_write(mqueue_mnt);
  out_err:
        dput(dentry);
-@@ -808,9 +809,9 @@ static inline void pipelined_receive(str
+@@ -808,9 +809,9 @@
        sender->state = STATE_READY;
  }
  
@@ -1105096,7 +1105025,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        struct file *filp;
        struct inode *inode;
-@@ -896,9 +897,9 @@ out:
+@@ -896,9 +897,9 @@
        return ret;
  }
  
@@ -1105109,7 +1105038,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        long timeout;
        ssize_t ret;
-@@ -981,8 +982,8 @@ out:
+@@ -981,8 +982,8 @@
   * and he isn't currently owner of notification, will be silently discarded.
   * It isn't explicitly defined in the POSIX.
   */
@@ -1105120,7 +1105049,7 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        int ret;
        struct file *filp;
-@@ -1107,9 +1108,9 @@ out:
+@@ -1107,9 +1108,9 @@
        return ret;
  }
  
@@ -1105133,9 +1105062,9 @@ diff -purN linux-2.6.27/ipc/mqueue.c linux-2.6.27.19-5.1/ipc/mqueue.c
  {
        int ret;
        struct mq_attr mqstat, omqstat;
-diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
---- linux-2.6.27/ipc/msg.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/msg.c      2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/msg.c
+--- a/ipc/msg.c        Wed May 06 15:47:13 2009 +0100
++++ b/ipc/msg.c        Wed May 06 16:57:00 2009 +0100
 @@ -38,6 +38,7 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
@@ -1105144,7 +1105073,7 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  
  #include <asm/current.h>
  #include <asm/uaccess.h>
-@@ -309,11 +310,12 @@ static inline int msg_security(struct ke
+@@ -309,11 +310,12 @@
        return security_msg_queue_associate(msq, msgflg);
  }
  
@@ -1105158,7 +1105087,7 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  
        ns = current->nsproxy->ipc_ns;
  
-@@ -324,7 +326,9 @@ asmlinkage long sys_msgget(key_t key, in
+@@ -324,7 +326,9 @@
        msg_params.key = key;
        msg_params.flg = msgflg;
  
@@ -1105169,7 +1105098,7 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  }
  
  static inline unsigned long
-@@ -466,7 +470,7 @@ out_up:
+@@ -466,7 +470,7 @@
        return err;
  }
  
@@ -1105178,7 +1105107,7 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  {
        struct msg_queue *msq;
        int err, version;
-@@ -723,8 +727,8 @@ out_free:
+@@ -723,8 +727,8 @@
        return err;
  }
  
@@ -1105189,7 +1105118,7 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  {
        long mtype;
  
-@@ -904,8 +908,8 @@ out_unlock:
+@@ -904,8 +908,8 @@
        return msgsz;
  }
  
@@ -1105200,9 +1105129,9 @@ diff -purN linux-2.6.27/ipc/msg.c linux-2.6.27.19-5.1/ipc/msg.c
  {
        long err, mtype;
  
-diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
---- linux-2.6.27/ipc/sem.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/sem.c      2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/sem.c
+--- a/ipc/sem.c        Wed May 06 15:47:13 2009 +0100
++++ b/ipc/sem.c        Wed May 06 16:57:00 2009 +0100
 @@ -83,6 +83,7 @@
  #include <linux/rwsem.h>
  #include <linux/nsproxy.h>
@@ -1105211,7 +1105140,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  
  #include <asm/uaccess.h>
  #include "util.h"
-@@ -308,11 +309,12 @@ static inline int sem_more_checks(struct
+@@ -308,11 +309,12 @@
        return 0;
  }
  
@@ -1105225,7 +1105154,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  
        ns = current->nsproxy->ipc_ns;
  
-@@ -327,7 +329,9 @@ asmlinkage long sys_semget(key_t key, in
+@@ -327,7 +329,9 @@
        sem_params.flg = semflg;
        sem_params.u.nsems = nsems;
  
@@ -1105236,7 +1105165,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  }
  
  /*
-@@ -887,7 +891,7 @@ out_up:
+@@ -887,7 +891,7 @@
        return err;
  }
  
@@ -1105245,7 +1105174,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  {
        int err = -EINVAL;
        int version;
-@@ -923,6 +927,13 @@ asmlinkage long sys_semctl (int semid, i
+@@ -923,6 +927,13 @@
                return -EINVAL;
        }
  }
@@ -1105259,7 +1105188,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  
  /* If the task doesn't already have a undo_list, then allocate one
   * here.  We guarantee there is only one thread using this undo list,
-@@ -1048,8 +1059,8 @@ out:
+@@ -1048,8 +1059,8 @@
        return un;
  }
  
@@ -1105270,7 +1105199,7 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  {
        int error = -EINVAL;
        struct sem_array *sma;
-@@ -1226,7 +1237,8 @@ out_free:
+@@ -1226,7 +1237,8 @@
        return error;
  }
  
@@ -1105280,9 +1105209,9 @@ diff -purN linux-2.6.27/ipc/sem.c linux-2.6.27.19-5.1/ipc/sem.c
  {
        return sys_semtimedop(semid, tsops, nsops, NULL);
  }
-diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
---- linux-2.6.27/ipc/shm.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/shm.c      2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 ipc/shm.c
+--- a/ipc/shm.c        Wed May 06 15:47:13 2009 +0100
++++ b/ipc/shm.c        Wed May 06 16:57:00 2009 +0100
 @@ -39,6 +39,7 @@
  #include <linux/nsproxy.h>
  #include <linux/mount.h>
@@ -1105291,7 +1105220,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  
  #include <asm/uaccess.h>
  
-@@ -440,11 +441,12 @@ static inline int shm_more_checks(struct
+@@ -440,11 +441,12 @@
        return 0;
  }
  
@@ -1105305,7 +1105234,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  
        ns = current->nsproxy->ipc_ns;
  
-@@ -456,7 +458,9 @@ asmlinkage long sys_shmget (key_t key, s
+@@ -456,7 +458,9 @@
        shm_params.flg = shmflg;
        shm_params.u.size = size;
  
@@ -1105316,7 +1105245,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  }
  
  static inline unsigned long copy_shmid_to_user(void __user *buf, struct shmid64_ds *in, int version)
-@@ -565,11 +569,15 @@ static void shm_get_stat(struct ipc_name
+@@ -565,11 +569,15 @@
                        struct hstate *h = hstate_file(shp->shm_file);
                        *rss += pages_per_huge_page(h) * mapping->nrpages;
                } else {
@@ -1105332,7 +1105261,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
                }
  
                total++;
-@@ -621,7 +629,7 @@ out_up:
+@@ -621,7 +629,7 @@
        return err;
  }
  
@@ -1105341,7 +1105270,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  {
        struct shmid_kernel *shp;
        int err, version;
-@@ -941,7 +949,7 @@ out_put_dentry:
+@@ -941,7 +949,7 @@
        goto out_nattch;
  }
  
@@ -1105350,7 +1105279,7 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  {
        unsigned long ret;
        long err;
-@@ -957,7 +965,7 @@ asmlinkage long sys_shmat(int shmid, cha
+@@ -957,7 +965,7 @@
   * detach and kill segment if marked destroyed.
   * The work is done in shm_close.
   */
@@ -1105359,10 +1105288,10 @@ diff -purN linux-2.6.27/ipc/shm.c linux-2.6.27.19-5.1/ipc/shm.c
  {
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma, *next;
-diff -purN linux-2.6.27/ipc/util.c linux-2.6.27.19-5.1/ipc/util.c
---- linux-2.6.27/ipc/util.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/ipc/util.c     2009-03-25 16:11:43.000000000 +0000
-@@ -266,9 +266,17 @@ int ipc_addid(struct ipc_ids* ids, struc
+diff -r 9608d5473017 ipc/util.c
+--- a/ipc/util.c       Wed May 06 15:47:13 2009 +0100
++++ b/ipc/util.c       Wed May 06 16:57:00 2009 +0100
+@@ -266,9 +266,17 @@
        if (ids->in_use >= size)
                return -ENOSPC;
  
@@ -1105381,7 +1105310,7 @@ diff -purN linux-2.6.27/ipc/util.c linux-2.6.27.19-5.1/ipc/util.c
  
        ids->in_use++;
  
-@@ -280,10 +288,6 @@ int ipc_addid(struct ipc_ids* ids, struc
+@@ -280,10 +288,6 @@
                ids->seq = 0;
  
        new->id = ipc_buildid(id, new->seq);
@@ -1105392,9 +1105321,9 @@ diff -purN linux-2.6.27/ipc/util.c linux-2.6.27.19-5.1/ipc/util.c
        return id;
  }
  
-diff -purN linux-2.6.27/kdb/ChangeLog linux-2.6.27.19-5.1/kdb/ChangeLog
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/ChangeLog  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/ChangeLog
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/ChangeLog    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,2012 @@
 +2008-09-30 Jay Lan  <jlan@sgi.com>
 +
@@ -1107408,9 +1107337,9 @@ diff -purN linux-2.6.27/kdb/ChangeLog linux-2.6.27.19-5.1/kdb/ChangeLog
 +      * include/linux/kdbprivate.h: add kdb_initial_cpu.
 +
 +      * include/linux/kdb.h: add kdb_on, bump version to kdb v1.4.
-diff -purN linux-2.6.27/kdb/Makefile linux-2.6.27.19-5.1/kdb/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/Makefile   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/Makefile     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,43 @@
 +#
 +# This file is subject to the terms and conditions of the GNU General Public
@@ -1107455,9 +1107384,9 @@ diff -purN linux-2.6.27/kdb/Makefile linux-2.6.27.19-5.1/kdb/Makefile
 +
 +$(obj)/gen-kdb_cmds.c:        $(src)/kdb_cmds $(wildcard $(TOPDIR)/arch/$(KDB_CMDS)) $(src)/Makefile
 +      $(call cmd,gen-kdb)
-diff -purN linux-2.6.27/kdb/kdb_bp.c linux-2.6.27.19-5.1/kdb/kdb_bp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_bp.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_bp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_bp.c     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,661 @@
 +/*
 + * Kernel Debugger Architecture Independent Breakpoint Handler
@@ -1108120,9 +1108049,9 @@ diff -purN linux-2.6.27/kdb/kdb_bp.c linux-2.6.27.19-5.1/kdb/kdb_bp.c
 +       */
 +      kdba_initbp();
 +}
-diff -purN linux-2.6.27/kdb/kdb_bt.c linux-2.6.27.19-5.1/kdb/kdb_bt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_bt.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_bt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_bt.c     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,180 @@
 +/*
 + * Kernel Debugger Architecture Independent Stack Traceback
@@ -1108304,9 +1108233,9 @@ diff -purN linux-2.6.27/kdb/kdb_bt.c linux-2.6.27.19-5.1/kdb/kdb_bt.c
 +      /* NOTREACHED */
 +      return 0;
 +}
-diff -purN linux-2.6.27/kdb/kdb_cmds linux-2.6.27.19-5.1/kdb/kdb_cmds
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_cmds   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_cmds
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_cmds     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,32 @@
 +# Initial commands for kdb, alter to suit your needs.
 +# These commands are executed in kdb_init() context, no SMP, no
@@ -1108340,9 +1108269,9 @@ diff -purN linux-2.6.27/kdb/kdb_cmds linux-2.6.27.19-5.1/kdb/kdb_cmds
 +  -archkdbcommon
 +  -bta
 +endefcmd
-diff -purN linux-2.6.27/kdb/kdb_id.c linux-2.6.27.19-5.1/kdb/kdb_id.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_id.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_id.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_id.c     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,236 @@
 +/*
 + * Kernel Debugger Architecture Independent Instruction Disassembly
@@ -1108580,9 +1108509,9 @@ diff -purN linux-2.6.27/kdb/kdb_id.c linux-2.6.27.19-5.1/kdb/kdb_id.c
 +      kdb_di.target           = 0;
 +      kdb_di.target2          = 0;
 +}
-diff -purN linux-2.6.27/kdb/kdb_io.c linux-2.6.27.19-5.1/kdb/kdb_io.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdb_io.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdb_io.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdb_io.c     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,857 @@
 +/*
 + * Kernel Debugger Architecture Independent Console I/O handler
@@ -1109441,9 +1109370,9 @@ diff -purN linux-2.6.27/kdb/kdb_io.c linux-2.6.27.19-5.1/kdb/kdb_io.c
 +#endif
 +
 +EXPORT_SYMBOL(kdb_read);
-diff -purN linux-2.6.27/kdb/kdbdereference.c linux-2.6.27.19-5.1/kdb/kdbdereference.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbdereference.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbdereference.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbdereference.c     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,7257 @@
 +/*
 + *
@@ -1116702,9 +1116631,9 @@ diff -purN linux-2.6.27/kdb/kdbdereference.c linux-2.6.27.19-5.1/kdb/kdbderefere
 +      return dividend - (__divdi3(dividend, divisor) * divisor);
 +}
 +#endif /* CONFIG_x86_32 */
-diff -purN linux-2.6.27/kdb/kdbmain.c linux-2.6.27.19-5.1/kdb/kdbmain.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbmain.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbmain.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbmain.c    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,4335 @@
 +/*
 + * Kernel Debugger Architecture Independent Main Code
@@ -1121041,9 +1120970,9 @@ diff -purN linux-2.6.27/kdb/kdbmain.c linux-2.6.27.19-5.1/kdb/kdbmain.c
 +EXPORT_SYMBOL(kdb_printf);
 +EXPORT_SYMBOL(kdb_symbol_print);
 +EXPORT_SYMBOL(kdb_running_process);
-diff -purN linux-2.6.27/kdb/kdbsupport.c linux-2.6.27.19-5.1/kdb/kdbsupport.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/kdbsupport.c       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/kdbsupport.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/kdbsupport.c Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,1154 @@
 +/*
 + * Kernel Debugger Architecture Independent Support Functions
@@ -1122199,9 +1122128,9 @@ diff -purN linux-2.6.27/kdb/kdbsupport.c linux-2.6.27.19-5.1/kdb/kdbsupport.c
 +      BUG_ON(kdb_flags_index <= 0);
 +      kdb_flags = kdb_flags_stack[--kdb_flags_index];
 +}
-diff -purN linux-2.6.27/kdb/modules/Makefile linux-2.6.27.19-5.1/kdb/modules/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/Makefile   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/Makefile     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,14 @@
 +#
 +# This file is subject to the terms and conditions of the GNU General Public
@@ -1122217,9 +1122146,9 @@ diff -purN linux-2.6.27/kdb/modules/Makefile linux-2.6.27.19-5.1/kdb/modules/Mak
 +obj-$(CONFIG_KDB_MODULES) += kdbm_x86.o
 +endif
 +CFLAGS_kdbm_vm.o      += -I $(srctree)/drivers/scsi
-diff -purN linux-2.6.27/kdb/modules/kdbm_debugtypes.c linux-2.6.27.19-5.1/kdb/modules/kdbm_debugtypes.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_debugtypes.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_debugtypes.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_debugtypes.c    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,388 @@
 +/* this one has some additional address validation - untested */
 +/*
@@ -1122609,9 +1122538,9 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_debugtypes.c linux-2.6.27.19-5.1/kdb/mo
 +
 +module_init(kdbm_debuginfo_init);
 +module_exit(kdbm_debuginfo_exit);
-diff -purN linux-2.6.27/kdb/modules/kdbm_pg.c linux-2.6.27.19-5.1/kdb/modules/kdbm_pg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_pg.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_pg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_pg.c    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,688 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1123301,9 +1123230,9 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_pg.c linux-2.6.27.19-5.1/kdb/modules/kd
 +
 +module_init(kdbm_pg_init)
 +module_exit(kdbm_pg_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_sched.c linux-2.6.27.19-5.1/kdb/modules/kdbm_sched.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_sched.c       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_sched.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_sched.c Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,57 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1123362,9 +1123291,9 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_sched.c linux-2.6.27.19-5.1/kdb/modules
 +
 +module_init(kdbm_sched_init)
 +module_exit(kdbm_sched_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_task.c linux-2.6.27.19-5.1/kdb/modules/kdbm_task.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_task.c        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_task.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_task.c  Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,205 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1123571,9 +1123500,9 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_task.c linux-2.6.27.19-5.1/kdb/modules/
 +
 +module_init(kdbm_task_init)
 +module_exit(kdbm_task_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_vm.c linux-2.6.27.19-5.1/kdb/modules/kdbm_vm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_vm.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_vm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_vm.c    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,1036 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1124611,9 +1124540,9 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_vm.c linux-2.6.27.19-5.1/kdb/modules/kd
 +
 +module_init(kdbm_vm_init)
 +module_exit(kdbm_vm_exit)
-diff -purN linux-2.6.27/kdb/modules/kdbm_x86.c linux-2.6.27.19-5.1/kdb/modules/kdbm_x86.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/kdbm_x86.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/kdbm_x86.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/kdbm_x86.c   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,1093 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
@@ -1125708,21 +1125637,21 @@ diff -purN linux-2.6.27/kdb/modules/kdbm_x86.c linux-2.6.27.19-5.1/kdb/modules/k
 +
 +module_init(kdbm_x86_init)
 +module_exit(kdbm_x86_exit)
-diff -purN linux-2.6.27/kdb/modules/lcrash/README linux-2.6.27.19-5.1/kdb/modules/lcrash/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/README      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/README        Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,3 @@
 +
 + These files are copied from lcrash.
 +  The only changes are flagged with "cpw".
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/README linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/README
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/README  2009-03-25 16:11:31.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 kdb/modules/lcrash/asm/README
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/README    Wed May 06 16:57:00 2009 +0100
+@@ -0,0 +1,1 @@
 +This kl_types.h is asm-ia64 version.
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_dump_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_dump_ia64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_dump_ia64.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/asm/kl_dump_ia64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/kl_dump_ia64.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,199 @@
 +/*
 + * $Id: kl_dump_ia64.h 1151 2005-02-23 01:09:12Z tjm $
@@ -1125923,9 +1125852,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_dump_ia64.h linux-2.6.27.19-5.
 +int kl_read_dump_header_ia64(void);
 +
 +#endif /* __KL_DUMP_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_types.h linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/asm/kl_types.h      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/asm/kl_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/asm/kl_types.h        Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,48 @@
 +/*
 + * $Id: kl_types.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1125975,9 +1125904,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/asm/kl_types.h linux-2.6.27.19-5.1/kd
 +#define KL_DUMP_ASM_MAGIC_NUMBER KL_DUMP_MAGIC_NUMBER_IA64
 +
 +#endif /* __ASMIA64_KL_TYPES_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_alloc.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_alloc.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_alloc.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_alloc.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_alloc.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,124 @@
 +/*
 + * $Id: kl_alloc.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1126103,9 +1126032,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_alloc.h linux-2.6.27.19-5.1/kdb/mo
 +#define kl_str_to_block(s, flags) _kl_str_to_block(s, flags, kl_get_ra())
 +
 +#endif /* __KL_ALLOC_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_bfd.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_bfd.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_bfd.h    2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_bfd.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_bfd.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,31 @@
 +/*
 + * $Id: kl_bfd.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1126138,9 +1126067,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_bfd.h linux-2.6.27.19-5.1/kdb/modu
 +int kl_read_bfd_syminfo(maplist_t*);
 +
 +#endif /*  __KL_BFD_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_btnode.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_btnode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_btnode.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_btnode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_btnode.h   Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,95 @@
 +/*
 + * $Id: kl_btnode.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1126237,9 +1126166,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_btnode.h linux-2.6.27.19-5.1/kdb/m
 +      btnode_t *      /* Pointer to current btnode */);
 +
 +#endif /* __KL_BTNODE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_cmp.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_cmp.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_cmp.h    2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_cmp.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_cmp.h      Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,102 @@
 +/*
 + * $Id: kl_cmp.h 1216 2005-07-06 10:03:13Z holzheu $
@@ -1126343,9 +1126272,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_cmp.h linux-2.6.27.19-5.1/kdb/modu
 +int kl_compress_gzip(const unsigned char *old, uint32_t old_size, unsigned char *new, uint32_t new_size);
 +
 +#endif /* __KL_CMP_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_copt.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_copt.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_copt.h   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_copt.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_copt.h     Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,29 @@
 +/*
 + * $Id: kl_copt.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1126376,9 +1126305,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_copt.h linux-2.6.27.19-5.1/kdb/mod
 +int get_copt(int, char **, const char *, char **);
 +
 +#endif /* __KL_COPT_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_debug.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_debug.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_debug.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_debug.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_debug.h    Wed May 06 16:57:00 2009 +0100
 @@ -0,0 +1,168 @@
 +/*
 + * $Id: kl_debug.h 1196 2005-05-17 18:34:12Z tjm $
@@ -1126548,9 +1126477,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_debug.h linux-2.6.27.19-5.1/kdb/mo
 +      uint64_t        /* typenum */);
 +
 +#endif /* __KL_DEBUG_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump.h   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump.h     Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,511 @@
 +/*
 + * $Id: kl_dump.h 1336 2006-10-23 23:27:06Z tjm $
@@ -1127063,9 +1126992,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump.h linux-2.6.27.19-5.1/kdb/mod
 +uint64_t kl_vread_swap_uint64(kaddr_t);
 +
 +#endif /* __KL_DUMP_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_arch.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_arch.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_arch.h      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump_arch.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump_arch.h        Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,124 @@
 +/*
 + * $Id: kl_dump_arch.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1127191,9 +1127120,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_arch.h linux-2.6.27.19-5.1/kd
 +      char *          /* name of struct */);
 +
 +#endif /* __KL_DUMP_ARCH_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_ia64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dump_ia64.h      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dump_ia64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dump_ia64.h        Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,199 @@
 +/*
 + * $Id: kl_dump_ia64.h 1151 2005-02-23 01:09:12Z tjm $
@@ -1127394,9 +1127323,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dump_ia64.h linux-2.6.27.19-5.1/kd
 +int kl_read_dump_header_ia64(void);
 +
 +#endif /* __KL_DUMP_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dwarfs.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dwarfs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_dwarfs.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_dwarfs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_dwarfs.h   Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,27 @@
 +/*
 + * $Id: kl_dwarfs.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1127425,9 +1127354,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_dwarfs.h linux-2.6.27.19-5.1/kdb/m
 +int dw_setup_typeinfo(void);
 +
 +#endif /*  __KL_DWARFS_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_error.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_error.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_error.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_error.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_error.h    Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,266 @@
 +/*
 + * $Id: kl_error.h 1169 2005-03-02 21:38:01Z tjm $
@@ -1127695,9 +1127624,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_error.h linux-2.6.27.19-5.1/kdb/mo
 +uint64_t kl_get_dbg_component(void);
 +
 +#endif /* __KL_ERROR_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_htnode.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_htnode.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_htnode.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_htnode.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_htnode.h   Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,71 @@
 +/*
 + * $Id: kl_htnode.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1127770,9 +1127699,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_htnode.h linux-2.6.27.19-5.1/kdb/m
 +      htnode_t *      /* new htnode pointer*/);
 +
 +#endif /* __KL_HTNODE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_lib.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_lib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_lib.h    2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_lib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_lib.h      Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,65 @@
 +/*
 + * $Id: kl_lib.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1127839,9 +1127768,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_lib.h linux-2.6.27.19-5.1/kdb/modu
 +#include "kl_stringtab.h"
 +
 +#endif /* __KL_LIB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_libutil.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_libutil.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_libutil.h        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_libutil.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_libutil.h  Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,40 @@
 +/*
 + * $Id: kl_libutil.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1127883,9 +1127812,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_libutil.h linux-2.6.27.19-5.1/kdb/
 +void *kl_get_ra(void);
 +
 +#endif /* __KL_LIBUTIL_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem.h    2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_mem.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_mem.h      Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,104 @@
 +/*
 + * $Id: kl_mem.h 1157 2005-02-25 22:04:05Z tjm $
@@ -1127991,9 +1127920,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem.h linux-2.6.27.19-5.1/kdb/modu
 +int     kl_init_virtop(void);
 +
 +#endif /* __KL_MEM_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem_ia64.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem_ia64.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_mem_ia64.h       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_mem_ia64.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_mem_ia64.h Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,149 @@
 +/*
 + * $Id: kl_mem_ia64.h 1250 2006-04-18 18:23:44Z cliffpwickman $
@@ -1128144,9 +1128073,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_mem_ia64.h linux-2.6.27.19-5.1/kdb
 +#define ADDR_TO_NASID(A) (((A) >> (long)(KL_NASID_SHIFT)) & KL_NASID_MASK)
 +
 +#endif /* __KL_MEM_IA64_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_module.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_module.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_module.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_module.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_module.h   Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,69 @@
 +/*
 + * $Id: kl_module.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128217,9 +1128146,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_module.h linux-2.6.27.19-5.1/kdb/m
 +kl_modinfo_t * kl_lkup_modinfo(char*);
 +
 +#endif /* __KL_MODULE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_queue.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_queue.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_queue.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_queue.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_queue.h    Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,89 @@
 +/*
 + * $Id: kl_queue.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128310,9 +1128239,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_queue.h linux-2.6.27.19-5.1/kdb/mo
 +      element_t*              /* ptr to element to remove from list */);
 +
 +#endif /* __KL_QUEUE_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stabs.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stabs.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stabs.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_stabs.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_stabs.h    Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,122 @@
 +/*
 + * $Id: kl_stabs.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128436,9 +1128365,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stabs.h linux-2.6.27.19-5.1/kdb/mo
 +#define CUR_CHAR      G_stab_str.ptr
 +
 +#endif /* __KL_STABS_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stringtab.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stringtab.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_stringtab.h      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_stringtab.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_stringtab.h        Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,68 @@
 +/*
 + * $Id: kl_stringtab.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128508,9 +1128437,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_stringtab.h linux-2.6.27.19-5.1/kd
 +      int             /* flag (K_TEMP/K_PERM)*/);
 +
 +#endif /* __KL_STRINGTAB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_sym.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_sym.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_sym.h    2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_sym.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_sym.h      Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,131 @@
 +/*
 + * $Id: kl_sym.h 1233 2005-09-10 08:01:11Z tjm $
@@ -1128643,9 +1128572,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_sym.h linux-2.6.27.19-5.1/kdb/modu
 +#define KL_SYMBYNAME     (0x04)  /* print symbol sorted by name */
 +
 +#endif /* __KL_SYM_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_task.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_task.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_task.h   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_task.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_task.h     Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,39 @@
 +/*
 + * $Id: kl_task.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128686,9 +1128615,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_task.h linux-2.6.27.19-5.1/kdb/mod
 +int kl_task_size(kaddr_t);
 +
 +#endif /* __KL_TASK_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_typeinfo.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_typeinfo.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_typeinfo.h       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_typeinfo.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_typeinfo.h Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,199 @@
 +/*
 + * $Id: kl_typeinfo.h 1259 2006-04-25 18:33:20Z tjm $
@@ -1128889,9 +1128818,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_typeinfo.h linux-2.6.27.19-5.1/kdb
 +      int             /* flags */);
 +
 +#endif /* __KL_TYPEINFO_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/kl_types.h linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_types.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/kl_types.h  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/kl_types.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/kl_types.h    Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,54 @@
 +/*
 + * $Id: kl_types.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1128947,9 +1128876,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/kl_types.h linux-2.6.27.19-5.1/kdb/mo
 +#include "asm/kl_types.h"
 +
 +#endif /* __KL_TYPES_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/klib.h linux-2.6.27.19-5.1/kdb/modules/lcrash/klib.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/klib.h      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/klib.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/klib.h        Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,480 @@
 +/*
 + * $Id: klib.h 1336 2006-10-23 23:27:06Z tjm $
@@ -1129431,9 +1129360,9 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/klib.h linux-2.6.27.19-5.1/kdb/module
 +void kl_s390tod_to_timeval(uint64_t, struct timeval*);
 +
 +#endif /* __KLIB_H */
-diff -purN linux-2.6.27/kdb/modules/lcrash/lc_eval.h linux-2.6.27.19-5.1/kdb/modules/lcrash/lc_eval.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kdb/modules/lcrash/lc_eval.h   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 kdb/modules/lcrash/lc_eval.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kdb/modules/lcrash/lc_eval.h     Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,225 @@
 +/*
 + * $Id: lc_eval.h 1122 2004-12-21 23:26:23Z tjm $
@@ -1129660,16 +1129589,16 @@ diff -purN linux-2.6.27/kdb/modules/lcrash/lc_eval.h linux-2.6.27.19-5.1/kdb/mod
 +int print_eval_results(node_t *, int);
 +
 +#endif /* __LC_EVAL_H */
-diff -purN linux-2.6.27/kernel/Kconfig.freezer linux-2.6.27.19-5.1/kernel/Kconfig.freezer
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Kconfig.freezer 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/Kconfig.freezer
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/Kconfig.freezer   Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,2 @@
 +config FREEZER
 +      def_bool PM_SLEEP || CGROUP_FREEZER
-diff -purN linux-2.6.27/kernel/Kconfig.preempt linux-2.6.27.19-5.1/kernel/Kconfig.preempt
---- linux-2.6.27/kernel/Kconfig.preempt        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Kconfig.preempt 2009-03-25 16:11:42.000000000 +0000
-@@ -35,6 +35,7 @@ config PREEMPT_VOLUNTARY
+diff -r 9608d5473017 kernel/Kconfig.preempt
+--- a/kernel/Kconfig.preempt   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/Kconfig.preempt   Wed May 06 16:57:01 2009 +0100
+@@ -35,6 +35,7 @@
  
  config PREEMPT
        bool "Preemptible Kernel (Low-Latency Desktop)"
@@ -1129677,10 +1129606,10 @@ diff -purN linux-2.6.27/kernel/Kconfig.preempt linux-2.6.27.19-5.1/kernel/Kconfi
        help
          This option reduces the latency of the kernel by making
          all kernel code (that is not executing in a critical section)
-diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
---- linux-2.6.27/kernel/Makefile       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/Makefile        2009-03-25 16:11:42.000000000 +0000
-@@ -11,8 +11,6 @@ obj-y     = sched.o fork.o exec_domain.o
+diff -r 9608d5473017 kernel/Makefile
+--- a/kernel/Makefile  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/Makefile  Wed May 06 16:57:01 2009 +0100
+@@ -11,8 +11,6 @@
            hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
            notifier.o ksysfs.o pm_qos_params.o sched_clock.o
  
@@ -1129689,7 +1129618,7 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  ifdef CONFIG_FTRACE
  # Do not trace debug files and internal ftrace files
  CFLAGS_REMOVE_lockdep.o = -pg
-@@ -21,9 +19,10 @@ CFLAGS_REMOVE_mutex-debug.o = -pg
+@@ -21,9 +19,10 @@
  CFLAGS_REMOVE_rtmutex-debug.o = -pg
  CFLAGS_REMOVE_cgroup-debug.o = -pg
  CFLAGS_REMOVE_sched_clock.o = -pg
@@ -1129701,7 +1129630,7 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  obj-$(CONFIG_PROFILING) += profile.o
  obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
  obj-$(CONFIG_STACKTRACE) += stacktrace.o
-@@ -48,6 +47,7 @@ obj-$(CONFIG_PROVE_LOCKING) += spinlock.
+@@ -48,6 +47,7 @@
  obj-$(CONFIG_UID16) += uid16.o
  obj-$(CONFIG_MODULES) += module.o
  obj-$(CONFIG_KALLSYMS) += kallsyms.o
@@ -1129709,7 +1129638,7 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  obj-$(CONFIG_PM) += power/
  obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
  obj-$(CONFIG_KEXEC) += kexec.o
-@@ -55,6 +55,7 @@ obj-$(CONFIG_BACKTRACE_SELF_TEST) += bac
+@@ -55,6 +55,7 @@
  obj-$(CONFIG_COMPAT) += compat.o
  obj-$(CONFIG_CGROUPS) += cgroup.o
  obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
@@ -1129717,7 +1129646,7 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  obj-$(CONFIG_CPUSETS) += cpuset.o
  obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o
  obj-$(CONFIG_UTS_NS) += utsname.o
-@@ -64,6 +65,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
+@@ -64,6 +65,7 @@
  obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o
  obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
  obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
@@ -1129725,7 +1129654,7 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
  obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
  obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
-@@ -83,6 +85,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
+@@ -83,6 +85,7 @@
  obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
  obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
  obj-$(CONFIG_MARKERS) += marker.o
@@ -1129733,10 +1129662,10 @@ diff -purN linux-2.6.27/kernel/Makefile linux-2.6.27.19-5.1/kernel/Makefile
  obj-$(CONFIG_LATENCYTOP) += latencytop.o
  obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
  obj-$(CONFIG_FTRACE) += trace/
-diff -purN linux-2.6.27/kernel/acct.c linux-2.6.27.19-5.1/kernel/acct.c
---- linux-2.6.27/kernel/acct.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/acct.c  2009-03-25 16:11:41.000000000 +0000
-@@ -277,7 +277,7 @@ static int acct_on(char *name)
+diff -r 9608d5473017 kernel/acct.c
+--- a/kernel/acct.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/acct.c    Wed May 06 16:57:01 2009 +0100
+@@ -277,7 +277,7 @@
   * should be written. If the filename is NULL, accounting will be
   * shutdown.
   */
@@ -1129745,10 +1129674,10 @@ diff -purN linux-2.6.27/kernel/acct.c linux-2.6.27.19-5.1/kernel/acct.c
  {
        int error;
  
-diff -purN linux-2.6.27/kernel/audit.c linux-2.6.27.19-5.1/kernel/audit.c
---- linux-2.6.27/kernel/audit.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/audit.c 2009-03-25 16:11:40.000000000 +0000
-@@ -1231,8 +1231,7 @@ static inline int audit_expand(struct au
+diff -r 9608d5473017 kernel/audit.c
+--- a/kernel/audit.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/audit.c   Wed May 06 16:57:01 2009 +0100
+@@ -1231,8 +1231,7 @@
   * will be called a second time.  Currently, we assume that a printk
   * can't format message larger than 1024 bytes, so we don't either.
   */
@@ -1129758,17 +1129687,17 @@ diff -purN linux-2.6.27/kernel/audit.c linux-2.6.27.19-5.1/kernel/audit.c
  {
        int len, avail;
        struct sk_buff *skb;
-@@ -1506,3 +1505,6 @@ EXPORT_SYMBOL(audit_log_start);
+@@ -1506,3 +1505,6 @@
  EXPORT_SYMBOL(audit_log_end);
  EXPORT_SYMBOL(audit_log_format);
  EXPORT_SYMBOL(audit_log);
 +EXPORT_SYMBOL_GPL(audit_log_vformat);
 +EXPORT_SYMBOL_GPL(audit_log_untrustedstring);
 +EXPORT_SYMBOL_GPL(audit_log_d_path);
-diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tree.c
---- linux-2.6.27/kernel/audit_tree.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/audit_tree.c    2009-03-25 16:11:42.000000000 +0000
-@@ -24,6 +24,7 @@ struct audit_chunk {
+diff -r 9608d5473017 kernel/audit_tree.c
+--- a/kernel/audit_tree.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/audit_tree.c      Wed May 06 16:57:01 2009 +0100
+@@ -24,6 +24,7 @@
        struct list_head trees;         /* with root here */
        int dead;
        int count;
@@ -1129776,7 +1129705,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        struct rcu_head head;
        struct node {
                struct list_head list;
-@@ -56,7 +57,8 @@ static LIST_HEAD(prune_list);
+@@ -56,7 +57,8 @@
   * tree is refcounted; one reference for "some rules on rules_list refer to
   * it", one for each chunk with pointer to it.
   *
@@ -1129786,7 +1129715,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
   *
   * node.index allows to get from node.list to containing chunk.
   * MSB of that sucker is stolen to mark taggings that we might have to
-@@ -121,6 +123,7 @@ static struct audit_chunk *alloc_chunk(i
+@@ -121,6 +123,7 @@
        INIT_LIST_HEAD(&chunk->hash);
        INIT_LIST_HEAD(&chunk->trees);
        chunk->count = count;
@@ -1129794,7 +1129723,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        for (i = 0; i < count; i++) {
                INIT_LIST_HEAD(&chunk->owners[i].list);
                chunk->owners[i].index = i;
-@@ -129,9 +132,8 @@ static struct audit_chunk *alloc_chunk(i
+@@ -129,9 +132,8 @@
        return chunk;
  }
  
@@ -1129805,7 +1129734,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        int i;
  
        for (i = 0; i < chunk->count; i++) {
-@@ -141,14 +143,16 @@ static void __free_chunk(struct rcu_head
+@@ -141,14 +143,16 @@
        kfree(chunk);
  }
  
@@ -1129826,7 +1129755,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  }
  
  enum {HASH_SIZE = 128};
-@@ -176,7 +180,7 @@ struct audit_chunk *audit_tree_lookup(co
+@@ -176,7 +180,7 @@
  
        list_for_each_entry_rcu(p, list, hash) {
                if (p->watch.inode == inode) {
@@ -1129835,20 +1129764,20 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
                        return p;
                }
        }
-@@ -194,17 +198,49 @@ int audit_tree_match(struct audit_chunk 
+@@ -194,17 +198,49 @@
  
  /* tagging and untagging inodes with trees */
  
 -static void untag_chunk(struct audit_chunk *chunk, struct node *p)
 +static struct audit_chunk *find_chunk(struct node *p)
-+{
+ {
 +      int index = p->index & ~(1U<<31);
 +      p -= index;
 +      return container_of(p, struct audit_chunk, owners[0]);
 +}
 +
 +static void untag_chunk(struct node *p)
- {
++{
 +      struct audit_chunk *chunk = find_chunk(p);
        struct audit_chunk *new;
        struct audit_tree *owner;
@@ -1129887,7 +1129816,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        }
  
        owner = p->owner;
-@@ -221,7 +257,7 @@ static void untag_chunk(struct audit_chu
+@@ -221,7 +257,7 @@
                inotify_evict_watch(&chunk->watch);
                mutex_unlock(&chunk->watch.inode->inotify_mutex);
                put_inotify_watch(&chunk->watch);
@@ -1129896,7 +1129825,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        }
  
        new = alloc_chunk(size);
-@@ -263,7 +299,7 @@ static void untag_chunk(struct audit_chu
+@@ -263,7 +299,7 @@
        inotify_evict_watch(&chunk->watch);
        mutex_unlock(&chunk->watch.inode->inotify_mutex);
        put_inotify_watch(&chunk->watch);
@@ -1129905,7 +1129834,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  
  Fallback:
        // do the best we can
-@@ -277,6 +313,9 @@ Fallback:
+@@ -277,6 +313,9 @@
        put_tree(owner);
        spin_unlock(&hash_lock);
        mutex_unlock(&chunk->watch.inode->inotify_mutex);
@@ -1129915,7 +1129844,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  }
  
  static int create_chunk(struct inode *inode, struct audit_tree *tree)
-@@ -387,13 +426,6 @@ static int tag_chunk(struct inode *inode
+@@ -387,13 +426,6 @@
        return 0;
  }
  
@@ -1129929,7 +1129858,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  static void kill_rules(struct audit_tree *tree)
  {
        struct audit_krule *rule, *next;
-@@ -431,17 +463,10 @@ static void prune_one(struct audit_tree 
+@@ -431,17 +463,10 @@
        spin_lock(&hash_lock);
        while (!list_empty(&victim->chunks)) {
                struct node *p;
@@ -1129939,16 +1129868,16 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
 -              chunk = find_chunk(p);
 -              get_inotify_watch(&chunk->watch);
 -              spin_unlock(&hash_lock);
--
--              untag_chunk(chunk, p);
  
+-              untag_chunk(chunk, p);
+-
 -              put_inotify_watch(&chunk->watch);
 -              spin_lock(&hash_lock);
 +              untag_chunk(p);
        }
        spin_unlock(&hash_lock);
        put_tree(victim);
-@@ -469,7 +494,6 @@ static void trim_marked(struct audit_tre
+@@ -469,7 +494,6 @@
  
        while (!list_empty(&tree->chunks)) {
                struct node *node;
@@ -1129956,7 +1129885,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  
                node = list_entry(tree->chunks.next, struct node, list);
  
-@@ -477,14 +501,7 @@ static void trim_marked(struct audit_tre
+@@ -477,14 +501,7 @@
                if (!(node->index & (1U<<31)))
                        break;
  
@@ -1129972,7 +1129901,7 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
        }
        if (!tree->root && !tree->goner) {
                tree->goner = 1;
-@@ -878,7 +895,7 @@ static void handle_event(struct inotify_
+@@ -878,7 +895,7 @@
  static void destroy_watch(struct inotify_watch *watch)
  {
        struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch);
@@ -1129981,10 +1129910,10 @@ diff -purN linux-2.6.27/kernel/audit_tree.c linux-2.6.27.19-5.1/kernel/audit_tre
  }
  
  static const struct inotify_operations rtree_inotify_ops = {
-diff -purN linux-2.6.27/kernel/auditfilter.c linux-2.6.27.19-5.1/kernel/auditfilter.c
---- linux-2.6.27/kernel/auditfilter.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/auditfilter.c   2009-03-25 16:11:42.000000000 +0000
-@@ -1094,8 +1094,8 @@ static void audit_inotify_unregister(str
+diff -r 9608d5473017 kernel/auditfilter.c
+--- a/kernel/auditfilter.c     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/auditfilter.c     Wed May 06 16:57:01 2009 +0100
+@@ -1094,8 +1094,8 @@
        list_for_each_entry_safe(p, n, in_list, ilist) {
                list_del(&p->ilist);
                inotify_rm_watch(audit_ih, &p->wdata);
@@ -1129995,7 +1129924,7 @@ diff -purN linux-2.6.27/kernel/auditfilter.c linux-2.6.27.19-5.1/kernel/auditfil
        }
  }
  
-@@ -1389,9 +1389,13 @@ static inline int audit_del_rule(struct 
+@@ -1389,9 +1389,13 @@
                                /* Put parent on the inotify un-registration
                                 * list.  Grab a reference before releasing
                                 * audit_filter_mutex, to be released in
@@ -1130012,13 +1129941,14 @@ diff -purN linux-2.6.27/kernel/auditfilter.c linux-2.6.27.19-5.1/kernel/auditfil
                        }
                }
        }
-diff -purN linux-2.6.27/kernel/capability.c linux-2.6.27.19-5.1/kernel/capability.c
---- linux-2.6.27/kernel/capability.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/capability.c    2009-03-25 16:11:41.000000000 +0000
-@@ -33,6 +33,17 @@ EXPORT_SYMBOL(__cap_empty_set);
+diff -r 9608d5473017 kernel/capability.c
+--- a/kernel/capability.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/capability.c      Wed May 06 16:57:01 2009 +0100
+@@ -32,6 +32,17 @@
+ EXPORT_SYMBOL(__cap_empty_set);
  EXPORT_SYMBOL(__cap_full_set);
  EXPORT_SYMBOL(__cap_init_eff_set);
++
 +#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
 +int file_caps_enabled;
 +
@@ -1130029,11 +1129959,10 @@ diff -purN linux-2.6.27/kernel/capability.c linux-2.6.27.19-5.1/kernel/capabilit
 +}
 +__setup("file_caps=", setup_file_caps);
 +#endif
-+
  /*
   * More recent versions of libcap are available from:
-  *
-@@ -348,7 +359,7 @@ EXPORT_SYMBOL(cap_set_effective);
+@@ -348,7 +359,7 @@
   *
   * Returns 0 on success and < 0 on error.
   */
@@ -1130042,7 +1129971,7 @@ diff -purN linux-2.6.27/kernel/capability.c linux-2.6.27.19-5.1/kernel/capabilit
  {
        int ret = 0;
        pid_t pid;
-@@ -425,7 +436,7 @@ asmlinkage long sys_capget(cap_user_head
+@@ -425,7 +436,7 @@
   *
   * Returns 0 on success and < 0 on error.
   */
@@ -1130051,10 +1129980,10 @@ diff -purN linux-2.6.27/kernel/capability.c linux-2.6.27.19-5.1/kernel/capabilit
  {
        struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S];
        unsigned i, tocopy;
-diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
---- linux-2.6.27/kernel/cgroup.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cgroup.c        2009-03-25 16:11:42.000000000 +0000
-@@ -2045,10 +2045,13 @@ int cgroupstats_build(struct cgroupstats
+diff -r 9608d5473017 kernel/cgroup.c
+--- a/kernel/cgroup.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/cgroup.c  Wed May 06 16:57:01 2009 +0100
+@@ -2045,10 +2045,13 @@
        struct cgroup *cgrp;
        struct cgroup_iter it;
        struct task_struct *tsk;
@@ -1130070,7 +1129999,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
                 goto err;
  
        ret = 0;
-@@ -2443,7 +2446,6 @@ static int cgroup_rmdir(struct inode *un
+@@ -2443,7 +2446,6 @@
        list_del(&cgrp->sibling);
        spin_lock(&cgrp->dentry->d_lock);
        d = dget(cgrp->dentry);
@@ -1130078,7 +1130007,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
        spin_unlock(&d->d_lock);
  
        cgroup_d_remove_dir(d);
-@@ -2873,9 +2875,6 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2873,9 +2875,6 @@
   again:
        root = subsys->root;
        if (root == &rootnode) {
@@ -1130088,7 +1130017,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
                mutex_unlock(&cgroup_mutex);
                return 0;
        }
-@@ -2883,7 +2882,11 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2883,7 +2882,11 @@
        parent = task_cgroup(tsk, subsys->subsys_id);
  
        /* Pin the hierarchy */
@@ -1130101,7 +1130030,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
  
        /* Keep the cgroup alive */
        get_css_set(cg);
-@@ -2905,7 +2908,7 @@ int cgroup_clone(struct task_struct *tsk
+@@ -2905,7 +2908,7 @@
        }
  
        /* Create the cgroup directory, which also creates the cgroup */
@@ -1130110,7 +1130039,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
        child = __d_cgrp(dentry);
        dput(dentry);
        if (ret) {
-@@ -3096,7 +3099,7 @@ static void cgroup_release_agent(struct 
+@@ -3096,7 +3099,7 @@
        mutex_unlock(&cgroup_mutex);
  }
  
@@ -1130119,7 +1130048,7 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
  {
        int i;
        char *token;
-@@ -3109,13 +3112,22 @@ static int __init cgroup_disable(char *s
+@@ -3109,13 +3112,22 @@
                        struct cgroup_subsys *ss = subsys[i];
  
                        if (!strcmp(token, ss->name)) {
@@ -1130145,9 +1130074,9 @@ diff -purN linux-2.6.27/kernel/cgroup.c linux-2.6.27.19-5.1/kernel/cgroup.c
 +      return cgroup_turnonoff(str, 0);
 +}
 +__setup("cgroup_enable=", cgroup_enable);
-diff -purN linux-2.6.27/kernel/cgroup_freezer.c linux-2.6.27.19-5.1/kernel/cgroup_freezer.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cgroup_freezer.c        2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/cgroup_freezer.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/cgroup_freezer.c  Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,379 @@
 +/*
 + * cgroup_freezer.c -  control group freezer subsystem
@@ -1130528,10 +1130457,10 @@ diff -purN linux-2.6.27/kernel/cgroup_freezer.c linux-2.6.27.19-5.1/kernel/cgrou
 +      .fork           = freezer_fork,
 +      .exit           = NULL,
 +};
-diff -purN linux-2.6.27/kernel/cpuset.c linux-2.6.27.19-5.1/kernel/cpuset.c
---- linux-2.6.27/kernel/cpuset.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/cpuset.c        2009-03-25 16:11:42.000000000 +0000
-@@ -587,7 +587,6 @@ static int generate_sched_domains(cpumas
+diff -r 9608d5473017 kernel/cpuset.c
+--- a/kernel/cpuset.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/cpuset.c  Wed May 06 16:57:01 2009 +0100
+@@ -587,7 +587,6 @@
        int ndoms;              /* number of sched domains in result */
        int nslot;              /* next empty doms[] cpumask_t slot */
  
@@ -1130539,7 +1130468,7 @@ diff -purN linux-2.6.27/kernel/cpuset.c linux-2.6.27.19-5.1/kernel/cpuset.c
        doms = NULL;
        dattr = NULL;
        csa = NULL;
-@@ -674,10 +673,8 @@ restart:
+@@ -674,10 +673,8 @@
         * Convert <csn, csa> to <ndoms, doms> and populate cpu masks.
         */
        doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
@@ -1130551,24 +1130480,24 @@ diff -purN linux-2.6.27/kernel/cpuset.c linux-2.6.27.19-5.1/kernel/cpuset.c
  
        /*
         * The rest of the code, including the scheduler, can deal with
-@@ -732,6 +729,13 @@ restart:
+@@ -731,6 +728,13 @@
  done:
        kfree(csa);
++
 +      /*
 +       * Fallback to the default domain if kmalloc() failed.
 +       * See comments in partition_sched_domains().
 +       */
 +      if (doms == NULL)
 +              ndoms = 1;
-+
        *domains    = doms;
        *attributes = dattr;
-       return ndoms;
-diff -purN linux-2.6.27/kernel/exec_domain.c linux-2.6.27.19-5.1/kernel/exec_domain.c
---- linux-2.6.27/kernel/exec_domain.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/exec_domain.c   2009-03-25 16:11:40.000000000 +0000
-@@ -188,8 +188,7 @@ get_exec_domain_list(char *page)
+diff -r 9608d5473017 kernel/exec_domain.c
+--- a/kernel/exec_domain.c     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/exec_domain.c     Wed May 06 16:57:01 2009 +0100
+@@ -188,8 +188,7 @@
        return (len);
  }
  
@@ -1130578,9 +1130507,9 @@ diff -purN linux-2.6.27/kernel/exec_domain.c linux-2.6.27.19-5.1/kernel/exec_dom
  {
        u_long old = current->personality;
  
-diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
---- linux-2.6.27/kernel/exit.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/exit.c  2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/exit.c
+--- a/kernel/exit.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/exit.c    Wed May 06 16:57:01 2009 +0100
 @@ -4,6 +4,9 @@
   *  Copyright (C) 1991, 1992  Linus Torvalds
   */
@@ -1130599,7 +1130528,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
-@@ -149,7 +153,10 @@ static void __exit_signal(struct task_st
+@@ -149,7 +153,10 @@
  
  static void delayed_put_task_struct(struct rcu_head *rhp)
  {
@@ -1130611,7 +1130540,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  }
  
  
-@@ -1074,6 +1081,8 @@ NORET_TYPE void do_exit(long code)
+@@ -1074,6 +1081,8 @@
  
        if (group_dead)
                acct_process();
@@ -1130620,7 +1130549,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
        exit_sem(tsk);
        exit_files(tsk);
        exit_fs(tsk);
-@@ -1145,7 +1154,7 @@ NORET_TYPE void complete_and_exit(struct
+@@ -1145,7 +1154,7 @@
  
  EXPORT_SYMBOL(complete_and_exit);
  
@@ -1130629,7 +1130558,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  {
        do_exit((error_code&0xff)<<8);
  }
-@@ -1186,9 +1195,11 @@ do_group_exit(int exit_code)
+@@ -1186,9 +1195,11 @@
   * wait4()-ing process will get the correct exit code - even if this
   * thread is not the thread group leader.
   */
@@ -1130642,7 +1130571,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  }
  
  static struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
-@@ -1675,6 +1686,8 @@ static long do_wait(enum pid_type type, 
+@@ -1675,6 +1686,8 @@
        struct task_struct *tsk;
        int retval;
  
@@ -1130651,7 +1130580,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
        add_wait_queue(&current->signal->wait_chldexit,&wait);
  repeat:
        /*
-@@ -1749,9 +1762,8 @@ end:
+@@ -1749,9 +1762,8 @@
        return retval;
  }
  
@@ -1130663,7 +1130592,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  {
        struct pid *pid = NULL;
        enum pid_type type;
-@@ -1790,8 +1802,8 @@ asmlinkage long sys_waitid(int which, pi
+@@ -1790,8 +1802,8 @@
        return ret;
  }
  
@@ -1130674,7 +1130603,7 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  {
        struct pid *pid = NULL;
        enum pid_type type;
-@@ -1828,7 +1840,7 @@ asmlinkage long sys_wait4(pid_t upid, in
+@@ -1828,7 +1840,7 @@
   * sys_waitpid() remains for compatibility. waitpid() should be
   * implemented by calling sys_wait4() from libc.a.
   */
@@ -1130683,9 +1130612,9 @@ diff -purN linux-2.6.27/kernel/exit.c linux-2.6.27.19-5.1/kernel/exit.c
  {
        return sys_wait4(pid, stat_addr, options, NULL);
  }
-diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
---- linux-2.6.27/kernel/fork.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/fork.c  2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/fork.c
+--- a/kernel/fork.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/fork.c    Wed May 06 16:57:01 2009 +0100
 @@ -58,6 +58,7 @@
  #include <linux/tty.h>
  #include <linux/proc_fs.h>
@@ -1130694,7 +1130623,7 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
  
  #include <asm/pgtable.h>
  #include <asm/pgalloc.h>
-@@ -313,17 +314,20 @@ static int dup_mmap(struct mm_struct *mm
+@@ -313,17 +314,20 @@
                file = tmp->vm_file;
                if (file) {
                        struct inode *inode = file->f_path.dentry->d_inode;
@@ -1130704,15 +1130633,15 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
                        if (tmp->vm_flags & VM_DENYWRITE)
                                atomic_dec(&inode->i_writecount);
 -
--                      /* insert tmp into the share list, just after mpnt */
--                      spin_lock(&file->f_mapping->i_mmap_lock);
 +                      spin_lock(&mapping->i_mmap_lock);
 +                      if (tmp->vm_flags & VM_SHARED)
 +                              mapping->i_mmap_writable++;
-                       tmp->vm_truncate_count = mpnt->vm_truncate_count;
--                      flush_dcache_mmap_lock(file->f_mapping);
++                      tmp->vm_truncate_count = mpnt->vm_truncate_count;
 +                      flush_dcache_mmap_lock(mapping);
-+                      /* insert tmp into the share list, just after mpnt */
+                       /* insert tmp into the share list, just after mpnt */
+-                      spin_lock(&file->f_mapping->i_mmap_lock);
+-                      tmp->vm_truncate_count = mpnt->vm_truncate_count;
+-                      flush_dcache_mmap_lock(file->f_mapping);
                        vma_prio_tree_add(tmp, mpnt);
 -                      flush_dcache_mmap_unlock(file->f_mapping);
 -                      spin_unlock(&file->f_mapping->i_mmap_lock);
@@ -1130721,7 +1130650,7 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
                }
  
                /*
-@@ -862,7 +866,7 @@ static void copy_flags(unsigned long clo
+@@ -862,7 +866,7 @@
        clear_freeze_flag(p);
  }
  
@@ -1130730,7 +1130659,7 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
  {
        current->clear_child_tid = tidptr;
  
-@@ -1139,7 +1143,9 @@ static struct task_struct *copy_process(
+@@ -1139,7 +1143,9 @@
        p->parent_exec_id = p->self_exec_id;
  
        /* ok, now we should be set up.. */
@@ -1130741,7 +1130670,7 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
        p->pdeath_signal = 0;
        p->exit_state = 0;
  
-@@ -1361,6 +1367,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1361,6 +1367,8 @@
        if (!IS_ERR(p)) {
                struct completion vfork;
  
@@ -1130750,7 +1130679,7 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
                nr = task_pid_vnr(p);
  
                if (clone_flags & CLONE_PARENT_SETTID)
-@@ -1558,7 +1566,7 @@ static int unshare_fd(unsigned long unsh
+@@ -1558,7 +1566,7 @@
   * constructed. Here we are modifying the current, active,
   * task_struct.
   */
@@ -1130759,9 +1130688,9 @@ diff -purN linux-2.6.27/kernel/fork.c linux-2.6.27.19-5.1/kernel/fork.c
  {
        int err = 0;
        struct fs_struct *fs, *new_fs = NULL;
-diff -purN linux-2.6.27/kernel/freezer.c linux-2.6.27.19-5.1/kernel/freezer.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/freezer.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/freezer.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/freezer.c Wed May 06 16:57:01 2009 +0100
 @@ -0,0 +1,154 @@
 +/*
 + * kernel/freezer.c - Function to freeze a process
@@ -1130917,10 +1130846,10 @@ diff -purN linux-2.6.27/kernel/freezer.c linux-2.6.27.19-5.1/kernel/freezer.c
 +      return 0;
 +}
 +EXPORT_SYMBOL(thaw_process);
-diff -purN linux-2.6.27/kernel/futex.c linux-2.6.27.19-5.1/kernel/futex.c
---- linux-2.6.27/kernel/futex.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/futex.c 2009-03-25 16:11:40.000000000 +0000
-@@ -1797,9 +1797,8 @@ pi_faulted:
+diff -r 9608d5473017 kernel/futex.c
+--- a/kernel/futex.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/futex.c   Wed May 06 16:57:01 2009 +0100
+@@ -1797,9 +1797,8 @@
   * @head: pointer to the list-head
   * @len: length of the list-head, as userspace expects
   */
@@ -1130932,7 +1130861,7 @@ diff -purN linux-2.6.27/kernel/futex.c linux-2.6.27.19-5.1/kernel/futex.c
  {
        if (!futex_cmpxchg_enabled)
                return -ENOSYS;
-@@ -1820,9 +1819,9 @@ sys_set_robust_list(struct robust_list_h
+@@ -1820,9 +1819,9 @@
   * @head_ptr: pointer to a list-head pointer, the kernel fills it in
   * @len_ptr: pointer to a length field, the kernel fills in the header size
   */
@@ -1130945,7 +1130874,7 @@ diff -purN linux-2.6.27/kernel/futex.c linux-2.6.27.19-5.1/kernel/futex.c
  {
        struct robust_list_head __user *head;
        unsigned long ret;
-@@ -2036,9 +2035,9 @@ long do_futex(u32 __user *uaddr, int op,
+@@ -2036,9 +2035,9 @@
  }
  
  
@@ -1130958,10 +1130887,10 @@ diff -purN linux-2.6.27/kernel/futex.c linux-2.6.27.19-5.1/kernel/futex.c
  {
        struct timespec ts;
        ktime_t t, *tp = NULL;
-diff -purN linux-2.6.27/kernel/hrtimer.c linux-2.6.27.19-5.1/kernel/hrtimer.c
---- linux-2.6.27/kernel/hrtimer.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/hrtimer.c       2009-03-25 16:11:40.000000000 +0000
-@@ -1084,7 +1084,7 @@ ktime_t hrtimer_get_remaining(const stru
+diff -r 9608d5473017 kernel/hrtimer.c
+--- a/kernel/hrtimer.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/hrtimer.c Wed May 06 16:57:01 2009 +0100
+@@ -1084,7 +1084,7 @@
  }
  EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
  
@@ -1130970,7 +1130899,7 @@ diff -purN linux-2.6.27/kernel/hrtimer.c linux-2.6.27.19-5.1/kernel/hrtimer.c
  /**
   * hrtimer_get_next_event - get the time until next expiry event
   *
-@@ -1560,8 +1560,8 @@ out:
+@@ -1560,8 +1560,8 @@
        return ret;
  }
  
@@ -1130981,10 +1130910,10 @@ diff -purN linux-2.6.27/kernel/hrtimer.c linux-2.6.27.19-5.1/kernel/hrtimer.c
  {
        struct timespec tu;
  
-diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
---- linux-2.6.27/kernel/irq/chip.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/chip.c      2009-03-25 16:11:40.000000000 +0000
-@@ -78,6 +78,7 @@ void dynamic_irq_cleanup(unsigned int ir
+diff -r 9608d5473017 kernel/irq/chip.c
+--- a/kernel/irq/chip.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/chip.c        Wed May 06 16:57:01 2009 +0100
+@@ -78,6 +78,7 @@
        desc->chip_data = NULL;
        desc->handle_irq = handle_bad_irq;
        desc->chip = &no_irq_chip;
@@ -1130992,7 +1130921,7 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
        spin_unlock_irqrestore(&desc->lock, flags);
  }
  
-@@ -323,7 +324,7 @@ handle_simple_irq(unsigned int irq, stru
+@@ -323,7 +324,7 @@
  
        action_ret = handle_IRQ_event(irq, action);
        if (!noirqdebug)
@@ -1131001,7 +1130930,7 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
  
        spin_lock(&desc->lock);
        desc->status &= ~IRQ_INPROGRESS;
-@@ -369,7 +370,7 @@ handle_level_irq(unsigned int irq, struc
+@@ -369,7 +370,7 @@
  
        action_ret = handle_IRQ_event(irq, action);
        if (!noirqdebug)
@@ -1131010,7 +1130939,7 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
  
        spin_lock(&desc->lock);
        desc->status &= ~IRQ_INPROGRESS;
-@@ -422,7 +423,7 @@ handle_fasteoi_irq(unsigned int irq, str
+@@ -422,7 +423,7 @@
  
        action_ret = handle_IRQ_event(irq, action);
        if (!noirqdebug)
@@ -1131019,7 +1130948,7 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
  
        spin_lock(&desc->lock);
        desc->status &= ~IRQ_INPROGRESS;
-@@ -502,7 +503,7 @@ handle_edge_irq(unsigned int irq, struct
+@@ -502,7 +503,7 @@
                spin_unlock(&desc->lock);
                action_ret = handle_IRQ_event(irq, action);
                if (!noirqdebug)
@@ -1131028,7 +1130957,7 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
                spin_lock(&desc->lock);
  
        } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
-@@ -531,7 +532,7 @@ handle_percpu_irq(unsigned int irq, stru
+@@ -531,7 +532,7 @@
  
        action_ret = handle_IRQ_event(irq, desc->action);
        if (!noirqdebug)
@@ -1131037,9 +1130966,9 @@ diff -purN linux-2.6.27/kernel/irq/chip.c linux-2.6.27.19-5.1/kernel/irq/chip.c
  
        if (desc->chip->eoi)
                desc->chip->eoi(irq);
-diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handle.c
---- linux-2.6.27/kernel/irq/handle.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/handle.c    2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/irq/handle.c
+--- a/kernel/irq/handle.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/handle.c      Wed May 06 16:57:01 2009 +0100
 @@ -15,6 +15,7 @@
  #include <linux/random.h>
  #include <linux/interrupt.h>
@@ -1131048,7 +1130977,7 @@ diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handl
  
  #include "internals.h"
  
-@@ -130,6 +131,9 @@ irqreturn_t handle_IRQ_event(unsigned in
+@@ -130,6 +131,9 @@
  {
        irqreturn_t ret, retval = IRQ_NONE;
        unsigned int status = 0;
@@ -1131058,16 +1130987,16 @@ diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handl
  
        handle_dynamic_tick(action);
  
-@@ -148,6 +152,8 @@ irqreturn_t handle_IRQ_event(unsigned in
+@@ -147,6 +151,8 @@
+       if (status & IRQF_SAMPLE_RANDOM)
                add_interrupt_randomness(irq);
        local_irq_disable();
-+      trace_irq_exit(retval);
 +
++      trace_irq_exit(retval);
        return retval;
  }
-@@ -181,7 +187,7 @@ unsigned int __do_IRQ(unsigned int irq)
+@@ -181,7 +187,7 @@
                if (likely(!(desc->status & IRQ_DISABLED))) {
                        action_ret = handle_IRQ_event(irq, desc->action);
                        if (!noirqdebug)
@@ -1131076,7 +1131005,7 @@ diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handl
                }
                desc->chip->end(irq);
                return 1;
-@@ -235,7 +241,7 @@ unsigned int __do_IRQ(unsigned int irq)
+@@ -235,7 +241,7 @@
  
                action_ret = handle_IRQ_event(irq, action);
                if (!noirqdebug)
@@ -1131085,10 +1131014,10 @@ diff -purN linux-2.6.27/kernel/irq/handle.c linux-2.6.27.19-5.1/kernel/irq/handl
  
                spin_lock(&desc->lock);
                if (likely(!(desc->status & IRQ_PENDING)))
-diff -purN linux-2.6.27/kernel/irq/manage.c linux-2.6.27.19-5.1/kernel/irq/manage.c
---- linux-2.6.27/kernel/irq/manage.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/manage.c    2009-03-25 16:11:40.000000000 +0000
-@@ -89,7 +89,14 @@ int irq_set_affinity(unsigned int irq, c
+diff -r 9608d5473017 kernel/irq/manage.c
+--- a/kernel/irq/manage.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/manage.c      Wed May 06 16:57:01 2009 +0100
+@@ -89,7 +89,14 @@
        set_balance_irq_affinity(irq, cpumask);
  
  #ifdef CONFIG_GENERIC_PENDING_IRQ
@@ -1131104,10 +1131033,11 @@ diff -purN linux-2.6.27/kernel/irq/manage.c linux-2.6.27.19-5.1/kernel/irq/manag
  #else
        desc->affinity = cpumask;
        desc->chip->set_affinity(irq, cpumask);
-@@ -110,6 +117,17 @@ int irq_select_affinity(unsigned int irq
+@@ -109,6 +116,17 @@
+               return 0;
  
        cpus_and(mask, cpu_online_map, irq_default_affinity);
++
 +      /*
 +       * Preserve the affinity that was previously set, but make
 +       * sure one of the targets is online.
@@ -1131118,14 +1131048,13 @@ diff -purN linux-2.6.27/kernel/irq/manage.c linux-2.6.27.19-5.1/kernel/irq/manag
 +              else
 +                      irq_desc[irq].status &= ~IRQ_AFFINITY_SET;
 +      }
-+
        irq_desc[irq].affinity = mask;
        irq_desc[irq].chip->set_affinity(irq, mask);
-diff -purN linux-2.6.27/kernel/irq/spurious.c linux-2.6.27.19-5.1/kernel/irq/spurious.c
---- linux-2.6.27/kernel/irq/spurious.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/irq/spurious.c  2009-03-25 16:11:40.000000000 +0000
-@@ -171,8 +171,19 @@ static inline int try_misrouted_irq(unsi
+diff -r 9608d5473017 kernel/irq/spurious.c
+--- a/kernel/irq/spurious.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/irq/spurious.c    Wed May 06 16:57:01 2009 +0100
+@@ -171,8 +171,19 @@
  }
  
  void note_interrupt(unsigned int irq, struct irq_desc *desc,
@@ -1131146,7 +1131075,7 @@ diff -purN linux-2.6.27/kernel/irq/spurious.c linux-2.6.27.19-5.1/kernel/irq/spu
        if (unlikely(action_ret != IRQ_HANDLED)) {
                /*
                 * If we are seeing only the odd spurious IRQ caused by
-@@ -182,7 +193,7 @@ void note_interrupt(unsigned int irq, st
+@@ -182,7 +193,7 @@
                 */
                if (time_after(jiffies, desc->last_unhandled + HZ/10))
                        desc->irqs_unhandled = 1;
@@ -1131155,9 +1131084,9 @@ diff -purN linux-2.6.27/kernel/irq/spurious.c linux-2.6.27.19-5.1/kernel/irq/spu
                        desc->irqs_unhandled++;
                desc->last_unhandled = jiffies;
                if (unlikely(action_ret != IRQ_NONE))
-diff -purN linux-2.6.27/kernel/itimer.c linux-2.6.27.19-5.1/kernel/itimer.c
---- linux-2.6.27/kernel/itimer.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/itimer.c        2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/itimer.c
+--- a/kernel/itimer.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/itimer.c  Wed May 06 16:57:01 2009 +0100
 @@ -12,6 +12,7 @@
  #include <linux/time.h>
  #include <linux/posix-timers.h>
@@ -1131166,7 +1131095,7 @@ diff -purN linux-2.6.27/kernel/itimer.c linux-2.6.27.19-5.1/kernel/itimer.c
  
  #include <asm/uaccess.h>
  
-@@ -109,7 +110,7 @@ int do_getitimer(int which, struct itime
+@@ -109,7 +110,7 @@
        return 0;
  }
  
@@ -1131175,25 +1131104,25 @@ diff -purN linux-2.6.27/kernel/itimer.c linux-2.6.27.19-5.1/kernel/itimer.c
  {
        int error = -EFAULT;
        struct itimerval get_buffer;
-@@ -132,6 +133,8 @@ enum hrtimer_restart it_real_fn(struct h
+@@ -131,6 +132,8 @@
+ {
        struct signal_struct *sig =
                container_of(timer, struct signal_struct, real_timer);
-+      trace_timer_itimer_expired(sig);
 +
++      trace_timer_itimer_expired(sig);
        kill_pid_info(SIGALRM, SEND_SIG_PRIV, sig->leader_pid);
  
-       return HRTIMER_NORESTART;
-@@ -157,6 +160,8 @@ int do_setitimer(int which, struct itime
+@@ -156,6 +159,8 @@
+       if (!timeval_valid(&value->it_value) ||
            !timeval_valid(&value->it_interval))
                return -EINVAL;
-+      trace_timer_itimer_set(which, value);
 +
++      trace_timer_itimer_set(which, value);
        switch (which) {
        case ITIMER_REAL:
- again:
-@@ -273,9 +278,8 @@ unsigned int alarm_setitimer(unsigned in
+@@ -273,9 +278,8 @@
        return it_old.it_value.tv_sec;
  }
  
@@ -1131205,10 +1131134,10 @@ diff -purN linux-2.6.27/kernel/itimer.c linux-2.6.27.19-5.1/kernel/itimer.c
  {
        struct itimerval set_buffer, get_buffer;
        int error;
-diff -purN linux-2.6.27/kernel/kallsyms.c linux-2.6.27.19-5.1/kernel/kallsyms.c
---- linux-2.6.27/kernel/kallsyms.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kallsyms.c      2009-03-25 16:11:40.000000000 +0000
-@@ -479,3 +479,25 @@ __initcall(kallsyms_init);
+diff -r 9608d5473017 kernel/kallsyms.c
+--- a/kernel/kallsyms.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kallsyms.c        Wed May 06 16:57:01 2009 +0100
+@@ -479,3 +479,25 @@
  
  EXPORT_SYMBOL(__print_symbol);
  EXPORT_SYMBOL_GPL(sprint_symbol);
@@ -1131234,9 +1131163,9 @@ diff -purN linux-2.6.27/kernel/kallsyms.c linux-2.6.27.19-5.1/kernel/kallsyms.c
 +      }
 +}
 +#endif        /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
---- linux-2.6.27/kernel/kexec.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kexec.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/kexec.c
+--- a/kernel/kexec.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kexec.c   Wed May 06 16:57:01 2009 +0100
 @@ -30,6 +30,7 @@
  #include <linux/pm.h>
  #include <linux/cpu.h>
@@ -1131261,7 +1131190,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  
  /* vmcoreinfo stuff */
  unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
-@@ -351,13 +359,26 @@ static int kimage_is_destination_range(s
+@@ -351,13 +359,26 @@
        return 0;
  }
  
@@ -1131289,7 +1131218,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                pages->mapping = NULL;
                set_page_private(pages, order);
                count = 1 << order;
-@@ -421,10 +442,10 @@ static struct page *kimage_alloc_normal_
+@@ -421,10 +442,10 @@
        do {
                unsigned long pfn, epfn, addr, eaddr;
  
@@ -1131302,7 +1131231,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                epfn  = pfn + count;
                addr  = pfn << PAGE_SHIFT;
                eaddr = epfn << PAGE_SHIFT;
-@@ -458,6 +479,7 @@ static struct page *kimage_alloc_normal_
+@@ -458,6 +479,7 @@
        return pages;
  }
  
@@ -1131310,7 +1131239,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
                                                      unsigned int order)
  {
-@@ -511,7 +533,7 @@ static struct page *kimage_alloc_crash_c
+@@ -511,7 +533,7 @@
                }
                /* If I don't overlap any segments I have found my hole! */
                if (i == image->nr_segments) {
@@ -1131319,7 +1131248,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                        break;
                }
        }
-@@ -538,6 +560,13 @@ struct page *kimage_alloc_control_pages(
+@@ -538,6 +560,13 @@
  
        return pages;
  }
@@ -1131333,7 +1131262,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  
  static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
  {
-@@ -553,7 +582,7 @@ static int kimage_add_entry(struct kimag
+@@ -553,7 +582,7 @@
                        return -ENOMEM;
  
                ind_page = page_address(page);
@@ -1131342,7 +1131271,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                image->entry = ind_page;
                image->last_entry = ind_page +
                                      ((PAGE_SIZE/sizeof(kimage_entry_t)) - 1);
-@@ -612,13 +641,13 @@ static void kimage_terminate(struct kima
+@@ -612,13 +641,13 @@
  #define for_each_kimage_entry(image, ptr, entry) \
        for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE); \
                ptr = (entry & IND_INDIRECTION)? \
@@ -1131358,18 +1131287,18 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
        kimage_free_pages(page);
  }
  
-@@ -630,6 +659,10 @@ static void kimage_free(struct kimage *i
+@@ -629,6 +658,10 @@
        if (!image)
                return;
++
 +#ifdef CONFIG_XEN
 +      xen_machine_kexec_unload(image);
 +#endif
-+
        kimage_free_extra_pages(image);
        for_each_kimage_entry(image, ptr, entry) {
-               if (entry & IND_INDIRECTION) {
-@@ -705,7 +738,7 @@ static struct page *kimage_alloc_page(st
+@@ -705,7 +738,7 @@
         * have a match.
         */
        list_for_each_entry(page, &image->dest_pages, lru) {
@@ -1131378,7 +1131307,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                if (addr == destination) {
                        list_del(&page->lru);
                        return page;
-@@ -716,16 +749,16 @@ static struct page *kimage_alloc_page(st
+@@ -716,16 +749,16 @@
                kimage_entry_t *old;
  
                /* Allocate a page, if we run out of memory give up */
@@ -1131398,7 +1131327,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  
                /* If it is the destination page we want use it */
                if (addr == destination)
-@@ -748,7 +781,7 @@ static struct page *kimage_alloc_page(st
+@@ -748,7 +781,7 @@
                        struct page *old_page;
  
                        old_addr = *old & PAGE_MASK;
@@ -1131407,7 +1131336,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                        copy_highpage(page, old_page);
                        *old = addr | (*old & ~PAGE_MASK);
  
-@@ -804,7 +837,7 @@ static int kimage_load_normal_segment(st
+@@ -804,7 +837,7 @@
                        result  = -ENOMEM;
                        goto out;
                }
@@ -1131416,7 +1131345,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                                                                << PAGE_SHIFT);
                if (result < 0)
                        goto out;
-@@ -836,6 +869,7 @@ out:
+@@ -836,6 +869,7 @@
        return result;
  }
  
@@ -1131424,7 +1131353,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  static int kimage_load_crash_segment(struct kimage *image,
                                        struct kexec_segment *segment)
  {
-@@ -858,7 +892,7 @@ static int kimage_load_crash_segment(str
+@@ -858,7 +892,7 @@
                char *ptr;
                size_t uchunk, mchunk;
  
@@ -1131433,7 +1131362,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                if (!page) {
                        result  = -ENOMEM;
                        goto out;
-@@ -907,6 +941,13 @@ static int kimage_load_segment(struct ki
+@@ -907,6 +941,13 @@
  
        return result;
  }
@@ -1131447,7 +1131376,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  
  /*
   * Exec Kernel system call: for obvious reasons only root may call it.
-@@ -933,9 +974,8 @@ struct kimage *kexec_crash_image;
+@@ -933,9 +974,8 @@
  
  static DEFINE_MUTEX(kexec_mutex);
  
@@ -1131459,7 +1131388,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  {
        struct kimage **dest_image, *image;
        int result;
-@@ -1011,6 +1051,13 @@ asmlinkage long sys_kexec_load(unsigned 
+@@ -1011,6 +1051,13 @@
                }
                kimage_terminate(image);
        }
@@ -1131473,7 +1131402,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
        /* Install the new kernel, and  Uninstall the old */
        image = xchg(dest_image, image);
  
-@@ -1073,9 +1120,19 @@ void crash_kexec(struct pt_regs *regs)
+@@ -1073,9 +1120,19 @@
        if (mutex_trylock(&kexec_mutex)) {
                if (kexec_crash_image) {
                        struct pt_regs fixed_regs;
@@ -1131493,7 +1131422,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
                        machine_kexec(kexec_crash_image);
                }
                mutex_unlock(&kexec_mutex);
-@@ -1136,6 +1193,30 @@ void crash_save_cpu(struct pt_regs *regs
+@@ -1136,6 +1193,30 @@
        final_note(buf);
  }
  
@@ -1131524,7 +1131453,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  static int __init crash_notes_memory_init(void)
  {
        /* Allocate memory for saving cpu registers. */
-@@ -1145,11 +1226,15 @@ static int __init crash_notes_memory_ini
+@@ -1145,11 +1226,15 @@
                " states failed\n");
                return -ENOMEM;
        }
@@ -1131540,7 +1131469,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  /*
   * parsing the "crashkernel" commandline
   *
-@@ -1312,7 +1397,7 @@ int __init parse_crashkernel(char                 *cm
+@@ -1312,7 +1397,7 @@
  
        return 0;
  }
@@ -1131549,7 +1131478,7 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
  
  
  void crash_save_vmcoreinfo(void)
-@@ -1369,7 +1454,18 @@ static int __init crash_save_vmcoreinfo_
+@@ -1369,7 +1454,18 @@
  
        VMCOREINFO_SYMBOL(init_uts_ns);
        VMCOREINFO_SYMBOL(node_online_map);
@@ -1131568,10 +1131497,10 @@ diff -purN linux-2.6.27/kernel/kexec.c linux-2.6.27.19-5.1/kernel/kexec.c
        VMCOREINFO_SYMBOL(_stext);
  
  #ifndef CONFIG_NEED_MULTIPLE_NODES
-diff -purN linux-2.6.27/kernel/ksysfs.c linux-2.6.27.19-5.1/kernel/ksysfs.c
---- linux-2.6.27/kernel/ksysfs.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/ksysfs.c        2009-03-25 16:11:40.000000000 +0000
-@@ -104,6 +104,23 @@ static struct bin_attribute notes_attr =
+diff -r 9608d5473017 kernel/ksysfs.c
+--- a/kernel/ksysfs.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/ksysfs.c  Wed May 06 16:57:01 2009 +0100
+@@ -104,6 +104,23 @@
  struct kobject *kernel_kobj;
  EXPORT_SYMBOL_GPL(kernel_kobj);
  
@@ -1131595,7 +1131524,7 @@ diff -purN linux-2.6.27/kernel/ksysfs.c linux-2.6.27.19-5.1/kernel/ksysfs.c
  static struct attribute * kernel_attrs[] = {
  #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
        &uevent_seqnum_attr.attr,
-@@ -114,6 +131,7 @@ static struct attribute * kernel_attrs[]
+@@ -114,6 +131,7 @@
        &kexec_crash_loaded_attr.attr,
        &vmcoreinfo_attr.attr,
  #endif
@@ -1131603,9 +1131532,9 @@ diff -purN linux-2.6.27/kernel/ksysfs.c linux-2.6.27.19-5.1/kernel/ksysfs.c
        NULL
  };
  
-diff -purN linux-2.6.27/kernel/kthread.c linux-2.6.27.19-5.1/kernel/kthread.c
---- linux-2.6.27/kernel/kthread.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/kthread.c       2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/kthread.c
+--- a/kernel/kthread.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/kthread.c Wed May 06 16:57:01 2009 +0100
 @@ -13,6 +13,7 @@
  #include <linux/file.h>
  #include <linux/module.h>
@@ -1131614,7 +1131543,7 @@ diff -purN linux-2.6.27/kernel/kthread.c linux-2.6.27.19-5.1/kernel/kthread.c
  
  #define KTHREAD_NICE_LEVEL (-5)
  
-@@ -206,6 +207,8 @@ int kthread_stop(struct task_struct *k)
+@@ -206,6 +207,8 @@
        /* It could exit after stop_info.k set, but before wake_up_process. */
        get_task_struct(k);
  
@@ -1131623,19 +1131552,19 @@ diff -purN linux-2.6.27/kernel/kthread.c linux-2.6.27.19-5.1/kernel/kthread.c
        /* Must init completion *before* thread sees kthread_stop_info.k */
        init_completion(&kthread_stop_info.done);
        smp_wmb();
-@@ -221,6 +224,8 @@ int kthread_stop(struct task_struct *k)
+@@ -220,6 +223,8 @@
+       kthread_stop_info.k = NULL;
        ret = kthread_stop_info.err;
        mutex_unlock(&kthread_stop_lock);
-+      trace_sched_kthread_stop_ret(ret);
 +
++      trace_sched_kthread_stop_ret(ret);
        return ret;
  }
- EXPORT_SYMBOL(kthread_stop);
-diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
---- linux-2.6.27/kernel/marker.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/marker.c        2009-03-25 16:11:42.000000000 +0000
-@@ -103,11 +103,11 @@ void marker_probe_cb(const struct marker
+diff -r 9608d5473017 kernel/marker.c
+--- a/kernel/marker.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/marker.c  Wed May 06 16:57:01 2009 +0100
+@@ -103,11 +103,11 @@
        char ptype;
  
        /*
@@ -1131651,7 +1131580,7 @@ diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
        ptype = mdata->ptype;
        if (likely(!ptype)) {
                marker_probe_func *func;
-@@ -145,7 +145,7 @@ void marker_probe_cb(const struct marker
+@@ -145,7 +145,7 @@
                        va_end(args);
                }
        }
@@ -1131660,7 +1131589,7 @@ diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
  }
  EXPORT_SYMBOL_GPL(marker_probe_cb);
  
-@@ -162,7 +162,7 @@ void marker_probe_cb_noarg(const struct 
+@@ -162,7 +162,7 @@
        va_list args;   /* not initialized */
        char ptype;
  
@@ -1131669,7 +1131598,7 @@ diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
        ptype = mdata->ptype;
        if (likely(!ptype)) {
                marker_probe_func *func;
-@@ -195,7 +195,7 @@ void marker_probe_cb_noarg(const struct 
+@@ -195,7 +195,7 @@
                        multi[i].func(multi[i].probe_private, call_private,
                                mdata->format, &args);
        }
@@ -1131678,7 +1131607,7 @@ diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
  }
  EXPORT_SYMBOL_GPL(marker_probe_cb_noarg);
  
-@@ -560,7 +560,7 @@ static int set_marker(struct marker_entr
+@@ -560,7 +560,7 @@
   * Disable a marker and its probe callback.
   * Note: only waiting an RCU period after setting elem->call to the empty
   * function insures that the original callback is not used anymore. This insured
@@ -1131687,9 +1131616,9 @@ diff -purN linux-2.6.27/kernel/marker.c linux-2.6.27.19-5.1/kernel/marker.c
   */
  static void disable_marker(struct marker *elem)
  {
-diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
---- linux-2.6.27/kernel/module.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/module.c        2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/module.c
+--- a/kernel/module.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/module.c  Wed May 06 16:57:01 2009 +0100
 @@ -46,6 +46,8 @@
  #include <asm/cacheflush.h>
  #include <linux/license.h>
@@ -1131699,10 +1131628,11 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  
  #if 0
  #define DEBUGP printk
-@@ -60,6 +62,20 @@
+@@ -59,6 +61,20 @@
  /* If this is set, the section belongs in the init part of the module */
  #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
++
 +/* Allow unsupported modules switch. */
 +#ifdef UNSUPPORTED_MODULES
 +int unsupported = UNSUPPORTED_MODULES;
@@ -1131716,11 +1131646,10 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
 +      return 1;
 +}
 +__setup("unsupported=", unsupported_setup);
-+
  /* List of modules, protected by module_mutex or preempt_disable
   * (add/delete uses stop_machine). */
- static DEFINE_MUTEX(module_mutex);
-@@ -543,17 +559,28 @@ static char last_unloaded_module[MODULE_
+@@ -543,17 +559,28 @@
  
  #ifdef CONFIG_MODULE_UNLOAD
  /* Init the unload section of the module. */
@@ -1131751,7 +1131680,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  }
  
  /* modules using other modules */
-@@ -633,6 +660,10 @@ static void module_unload_free(struct mo
+@@ -633,6 +660,10 @@
                        }
                }
        }
@@ -1131762,7 +1131691,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  }
  
  #ifdef CONFIG_MODULE_FORCE_UNLOAD
-@@ -691,7 +722,7 @@ unsigned int module_refcount(struct modu
+@@ -691,7 +722,7 @@
  {
        unsigned int i, total = 0;
  
@@ -1131771,7 +1131700,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
                total += local_read(&mod->ref[i].count);
        return total;
  }
-@@ -715,8 +746,8 @@ static void wait_for_zero_refcount(struc
+@@ -715,8 +746,8 @@
        mutex_lock(&module_mutex);
  }
  
@@ -1131782,7 +1131711,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  {
        struct module *mod;
        char name[MODULE_NAME_LEN];
-@@ -784,6 +815,7 @@ sys_delete_module(const char __user *nam
+@@ -784,6 +815,7 @@
        mutex_lock(&module_mutex);
        /* Store the name of the last unloaded module for diagnostic purposes */
        strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
@@ -1131790,7 +1131719,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        free_module(mod);
  
   out:
-@@ -879,8 +911,9 @@ static inline int use_module(struct modu
+@@ -879,8 +911,9 @@
        return strong_try_module_get(b) == 0;
  }
  
@@ -1131801,7 +1131730,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  }
  #endif /* CONFIG_MODULE_UNLOAD */
  
-@@ -908,10 +941,36 @@ static struct module_attribute initstate
+@@ -908,10 +941,36 @@
        .show = show_initstate,
  };
  
@@ -1131838,7 +1131767,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  #ifdef CONFIG_MODULE_UNLOAD
        &refcnt,
  #endif
-@@ -1173,7 +1232,7 @@ static void free_notes_attrs(struct modu
+@@ -1173,7 +1232,7 @@
                while (i-- > 0)
                        sysfs_remove_bin_file(notes_attrs->dir,
                                              &notes_attrs->attrs[i]);
@@ -1131847,7 +1131776,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        }
        kfree(notes_attrs);
  }
-@@ -1415,6 +1474,8 @@ static int __unlink_module(void *_mod)
+@@ -1415,6 +1474,8 @@
  /* Free a module, remove from lists, etc (must hold module_mutex). */
  static void free_module(struct module *mod)
  {
@@ -1131856,7 +1131785,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        /* Delete from various lists */
        stop_machine(__unlink_module, mod, NULL);
        remove_notes_attrs(mod);
-@@ -1783,6 +1844,33 @@ static inline void add_kallsyms(struct m
+@@ -1783,6 +1844,33 @@
  }
  #endif /* CONFIG_KALLSYMS */
  
@@ -1131890,7 +1131819,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  static void *module_alloc_update_bounds(unsigned long size)
  {
        void *ret = module_alloc(size);
-@@ -1806,6 +1894,7 @@ static noinline struct module *load_modu
+@@ -1806,6 +1894,7 @@
        Elf_Ehdr *hdr;
        Elf_Shdr *sechdrs;
        char *secstrings, *args, *modmagic, *strtab = NULL;
@@ -1131898,7 +1131827,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        unsigned int i;
        unsigned int symindex = 0;
        unsigned int strindex = 0;
-@@ -1831,6 +1920,9 @@ static noinline struct module *load_modu
+@@ -1831,6 +1920,9 @@
  #endif
        unsigned int markersindex;
        unsigned int markersstringsindex;
@@ -1131908,7 +1131837,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        struct module *mod;
        long err = 0;
        void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
-@@ -1960,6 +2052,14 @@ static noinline struct module *load_modu
+@@ -1960,6 +2052,14 @@
                goto free_hdr;
        }
  
@@ -1131923,7 +1131852,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        /* Now copy in args */
        args = strndup_user(uargs, ~0UL >> 1);
        if (IS_ERR(args)) {
-@@ -2039,7 +2139,9 @@ static noinline struct module *load_modu
+@@ -2039,7 +2139,9 @@
        mod = (void *)sechdrs[modindex].sh_addr;
  
        /* Now we've moved module, initialize linked lists, etc. */
@@ -1131934,7 +1131863,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  
        /* add kobject, so we can reference it. */
        err = mod_sysfs_init(mod);
-@@ -2117,6 +2219,11 @@ static noinline struct module *load_modu
+@@ -2117,6 +2219,11 @@
        markersindex = find_sec(hdr, sechdrs, secstrings, "__markers");
        markersstringsindex = find_sec(hdr, sechdrs, secstrings,
                                        "__markers_strings");
@@ -1131946,7 +1131875,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  
        /* Now do relocations. */
        for (i = 1; i < hdr->e_shnum; i++) {
-@@ -2144,6 +2251,12 @@ static noinline struct module *load_modu
+@@ -2144,6 +2251,12 @@
        mod->num_markers =
                sechdrs[markersindex].sh_size / sizeof(*mod->markers);
  #endif
@@ -1131959,7 +1131888,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  
          /* Find duplicate symbols */
        err = verify_export_symbols(mod);
-@@ -2162,11 +2275,17 @@ static noinline struct module *load_modu
+@@ -2162,11 +2275,17 @@
  
        add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
  
@@ -1131978,7 +1131907,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        err = module_finalize(hdr, sechdrs, mod);
        if (err < 0)
                goto cleanup;
-@@ -2219,6 +2338,26 @@ static noinline struct module *load_modu
+@@ -2219,6 +2338,26 @@
        add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
        add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
  
@@ -1132005,16 +1131934,16 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        /* Size of section 0 is 0, so this works well if no unwind info. */
        mod->unwind_info = unwind_add_table(mod,
                                            (void *)sechdrs[unwindex].sh_addr,
-@@ -2227,6 +2366,8 @@ static noinline struct module *load_modu
+@@ -2226,6 +2365,8 @@
        /* Get rid of temporary copy */
        vfree(hdr);
-+      trace_kernel_module_load(mod);
 +
++      trace_kernel_module_load(mod);
        /* Done! */
        return mod;
-@@ -2257,10 +2398,8 @@ static noinline struct module *load_modu
+@@ -2257,10 +2398,8 @@
  }
  
  /* This is where the real work happens */
@@ -1132027,7 +1131956,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  {
        struct module *mod;
        int ret = 0;
-@@ -2469,12 +2608,23 @@ out:
+@@ -2469,12 +2608,23 @@
        return -ERANGE;
  }
  
@@ -1132052,7 +1131981,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        list_for_each_entry(mod, &modules, list) {
                if (symnum < mod->num_symtab) {
                        *value = mod->symtab[symnum].st_value;
-@@ -2483,12 +2633,14 @@ int module_get_kallsym(unsigned int symn
+@@ -2483,12 +2633,14 @@
                                KSYM_NAME_LEN);
                        strlcpy(module_name, mod->name, MODULE_NAME_LEN);
                        *exported = is_exported(name, mod);
@@ -1132069,7 +1131998,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
        return -ERANGE;
  }
  
-@@ -2556,6 +2708,12 @@ static char *module_flags(struct module 
+@@ -2556,6 +2708,12 @@
                        buf[bx++] = 'P';
                if (mod->taints & TAINT_FORCED_MODULE)
                        buf[bx++] = 'F';
@@ -1132082,7 +1132011,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
                /*
                 * TAINT_FORCED_RMMOD: could be added.
                 * TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
-@@ -2696,6 +2854,7 @@ void print_modules(void)
+@@ -2696,6 +2854,7 @@
        if (last_unloaded_module[0])
                printk(" [last unloaded: %s]", last_unloaded_module);
        printk("\n");
@@ -1132090,7 +1132019,7 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
  }
  
  #ifdef CONFIG_MODVERSIONS
-@@ -2717,3 +2876,50 @@ void module_update_markers(void)
+@@ -2717,3 +2876,50 @@
        mutex_unlock(&module_mutex);
  }
  #endif
@@ -1132141,9 +1132070,9 @@ diff -purN linux-2.6.27/kernel/module.c linux-2.6.27.19-5.1/kernel/module.c
 +      return found;
 +}
 +#endif
-diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
---- linux-2.6.27/kernel/panic.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/panic.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/panic.c
+--- a/kernel/panic.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/panic.c   Wed May 06 16:57:01 2009 +0100
 @@ -21,6 +21,9 @@
  #include <linux/debug_locks.h>
  #include <linux/random.h>
@@ -1132154,7 +1132083,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
  
  int panic_on_oops;
  int tainted;
-@@ -82,12 +85,18 @@ NORET_TYPE void panic(const char * fmt, 
+@@ -82,12 +85,18 @@
        printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
        bust_spinlocks(0);
  
@@ -1132174,7 +1132103,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
  
  #ifdef CONFIG_SMP
        /*
-@@ -100,6 +109,8 @@ NORET_TYPE void panic(const char * fmt, 
+@@ -100,6 +109,8 @@
  
        atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
  
@@ -1132183,7 +1132112,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
        if (!panic_blink)
                panic_blink = no_blink;
  
-@@ -109,6 +120,12 @@ NORET_TYPE void panic(const char * fmt, 
+@@ -109,6 +120,12 @@
                 * We can't use the "normal" timers since we just panicked..
                 */
                printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
@@ -1132196,7 +1132125,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
                for (i = 0; i < panic_timeout*1000; ) {
                        touch_nmi_watchdog();
                        i += panic_blink(i);
-@@ -133,6 +150,12 @@ NORET_TYPE void panic(const char * fmt, 
+@@ -133,6 +150,12 @@
        disabled_wait(caller);
  #endif
        local_irq_enable();
@@ -1132209,7 +1132138,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
        for (i = 0;;) {
                touch_softlockup_watchdog();
                i += panic_blink(i);
-@@ -155,6 +178,9 @@ EXPORT_SYMBOL(panic);
+@@ -155,6 +178,9 @@
   *  'U' - Userspace-defined naughtiness.
   *  'A' - ACPI table overridden.
   *  'W' - Taint on warning.
@@ -1132219,7 +1132148,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
   *
   *    The string is overwritten by the next call to print_taint().
   */
-@@ -163,7 +189,7 @@ const char *print_tainted(void)
+@@ -163,7 +189,7 @@
  {
        static char buf[20];
        if (tainted) {
@@ -1132228,7 +1132157,7 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
                        tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
                        tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
                        tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
-@@ -173,7 +199,10 @@ const char *print_tainted(void)
+@@ -173,7 +199,10 @@
                        tainted & TAINT_USER ? 'U' : ' ',
                        tainted & TAINT_DIE ? 'D' : ' ',
                        tainted & TAINT_OVERRIDDEN_ACPI_TABLE ? 'A' : ' ',
@@ -1132240,10 +1132169,10 @@ diff -purN linux-2.6.27/kernel/panic.c linux-2.6.27.19-5.1/kernel/panic.c
        }
        else
                snprintf(buf, sizeof(buf), "Not tainted");
-diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-timers.c
---- linux-2.6.27/kernel/posix-timers.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/posix-timers.c  2009-03-25 16:11:40.000000000 +0000
-@@ -463,10 +463,9 @@ static void release_posix_timer(struct k
+diff -r 9608d5473017 kernel/posix-timers.c
+--- a/kernel/posix-timers.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/posix-timers.c    Wed May 06 16:57:01 2009 +0100
+@@ -463,10 +463,9 @@
  
  /* Create a POSIX.1b interval timer. */
  
@@ -1132257,7 +1132186,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        int error = 0;
        struct k_itimer *new_timer = NULL;
-@@ -682,8 +681,8 @@ common_timer_get(struct k_itimer *timr, 
+@@ -682,8 +681,8 @@
  }
  
  /* Get the time remaining on a POSIX.1b interval timer. */
@@ -1132268,7 +1132197,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct k_itimer *timr;
        struct itimerspec cur_setting;
-@@ -712,8 +711,7 @@ sys_timer_gettime(timer_t timer_id, stru
+@@ -712,8 +711,7 @@
   * the call back to do_schedule_next_timer().  So all we need to do is
   * to pick up the frozen overrun.
   */
@@ -1132278,7 +1132207,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct k_itimer *timr;
        int overrun;
-@@ -783,10 +781,9 @@ common_timer_set(struct k_itimer *timr, 
+@@ -783,10 +781,9 @@
  }
  
  /* Set a POSIX.1b interval timer */
@@ -1132292,7 +1132221,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct k_itimer *timr;
        struct itimerspec new_spec, old_spec;
-@@ -839,8 +836,7 @@ static inline int timer_delete_hook(stru
+@@ -839,8 +836,7 @@
  }
  
  /* Delete a POSIX.1b interval timer. */
@@ -1132302,7 +1132231,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct k_itimer *timer;
        unsigned long flags;
-@@ -930,8 +926,8 @@ int do_posix_clock_nonanosleep(const clo
+@@ -930,8 +926,8 @@
  }
  EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep);
  
@@ -1132313,7 +1132242,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct timespec new_tp;
  
-@@ -943,8 +939,8 @@ asmlinkage long sys_clock_settime(const 
+@@ -943,8 +939,8 @@
        return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp));
  }
  
@@ -1132324,7 +1132253,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct timespec kernel_tp;
        int error;
-@@ -960,8 +956,8 @@ sys_clock_gettime(const clockid_t which_
+@@ -960,8 +956,8 @@
  
  }
  
@@ -1132335,7 +1132264,7 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct timespec rtn_tp;
        int error;
-@@ -990,10 +986,9 @@ static int common_nsleep(const clockid_t
+@@ -990,10 +986,9 @@
                                 which_clock);
  }
  
@@ -1132349,13 +1132278,14 @@ diff -purN linux-2.6.27/kernel/posix-timers.c linux-2.6.27.19-5.1/kernel/posix-t
  {
        struct timespec t;
  
-diff -purN linux-2.6.27/kernel/power/disk.c linux-2.6.27.19-5.1/kernel/power/disk.c
---- linux-2.6.27/kernel/power/disk.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/disk.c    2009-03-25 16:11:41.000000000 +0000
-@@ -71,6 +71,14 @@ void hibernation_set_ops(struct platform
+diff -r 9608d5473017 kernel/power/disk.c
+--- a/kernel/power/disk.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/disk.c      Wed May 06 16:57:01 2009 +0100
+@@ -70,6 +70,14 @@
        mutex_unlock(&pm_mutex);
  }
++
 +static bool entering_platform_hibernation;
 +
 +bool system_entering_hibernation(void)
@@ -1132363,11 +1132293,10 @@ diff -purN linux-2.6.27/kernel/power/disk.c linux-2.6.27.19-5.1/kernel/power/dis
 +      return entering_platform_hibernation;
 +}
 +EXPORT_SYMBOL_GPL(system_entering_hibernation);
-+
  #ifdef CONFIG_PM_DEBUG
  static void hibernation_debug_sleep(void)
- {
-@@ -415,6 +423,7 @@ int hibernation_platform_enter(void)
+@@ -415,6 +423,7 @@
        if (error)
                goto Close;
  
@@ -1132375,7 +1132304,7 @@ diff -purN linux-2.6.27/kernel/power/disk.c linux-2.6.27.19-5.1/kernel/power/dis
        suspend_console();
        ftrace_save = __ftrace_enabled_save();
        error = device_suspend(PMSG_HIBERNATE);
-@@ -450,6 +459,7 @@ int hibernation_platform_enter(void)
+@@ -450,6 +459,7 @@
   Finish:
        hibernation_ops->finish();
   Resume_devices:
@@ -1132383,13 +1132312,15 @@ diff -purN linux-2.6.27/kernel/power/disk.c linux-2.6.27.19-5.1/kernel/power/dis
        device_resume(PMSG_RESTORE);
        __ftrace_enabled_restore(ftrace_save);
        resume_console();
-diff -purN linux-2.6.27/kernel/power/process.c linux-2.6.27.19-5.1/kernel/power/process.c
---- linux-2.6.27/kernel/power/process.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/process.c 2009-03-25 16:11:41.000000000 +0000
-@@ -28,121 +28,6 @@ static inline int freezeable(struct task
+diff -r 9608d5473017 kernel/power/process.c
+--- a/kernel/power/process.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/process.c   Wed May 06 16:57:01 2009 +0100
+@@ -26,121 +26,6 @@
+           (p->exit_state != 0))
+               return 0;
        return 1;
- }
+-}
+-
 -/*
 - * freezing is complete, mark current process as frozen
 - */
@@ -1132503,12 +1132434,10 @@ diff -purN linux-2.6.27/kernel/power/process.c linux-2.6.27.19-5.1/kernel/power/
 -              recalc_sigpending_and_wake(p);
 -              spin_unlock_irqrestore(&p->sighand->siglock, flags);
 -      }
--}
--
+ }
  static int try_to_freeze_tasks(bool sig_only)
- {
-       struct task_struct *g, *p;
-@@ -250,6 +135,9 @@ static void thaw_tasks(bool nosig_only)
+@@ -250,6 +135,9 @@
                if (nosig_only && should_send_signal(p))
                        continue;
  
@@ -1132518,14 +1132447,14 @@ diff -purN linux-2.6.27/kernel/power/process.c linux-2.6.27.19-5.1/kernel/power/
                thaw_process(p);
        } while_each_thread(g, p);
        read_unlock(&tasklist_lock);
-@@ -264,4 +152,3 @@ void thaw_processes(void)
+@@ -264,4 +152,3 @@
        printk("done.\n");
  }
  
 -EXPORT_SYMBOL(refrigerator);
-diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power/snapshot.c
---- linux-2.6.27/kernel/power/snapshot.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/power/snapshot.c        2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/power/snapshot.c
+--- a/kernel/power/snapshot.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/power/snapshot.c  Wed May 06 16:57:01 2009 +0100
 @@ -25,6 +25,7 @@
  #include <linux/syscalls.h>
  #include <linux/console.h>
@@ -1132534,7 +1132463,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  
  #include <asm/uaccess.h>
  #include <asm/mmu_context.h>
-@@ -192,12 +193,6 @@ static void *chain_alloc(struct chain_al
+@@ -192,12 +193,6 @@
        return ret;
  }
  
@@ -1132547,7 +1132476,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  /**
   *    Data types related to memory bitmaps.
   *
-@@ -233,7 +228,7 @@ static void chain_free(struct chain_allo
+@@ -233,7 +228,7 @@
  #define BM_BITS_PER_BLOCK     (PAGE_SIZE << 3)
  
  struct bm_block {
@@ -1132556,7 +1132485,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
        unsigned long start_pfn;        /* pfn represented by the first bit */
        unsigned long end_pfn;  /* pfn represented by the last bit plus 1 */
        unsigned long *data;    /* bitmap representing pages */
-@@ -244,24 +239,15 @@ static inline unsigned long bm_block_bit
+@@ -244,24 +239,15 @@
        return bb->end_pfn - bb->start_pfn;
  }
  
@@ -1132582,7 +1132511,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
        struct linked_page *p_list;     /* list of pages used to store zone
                                         * bitmap objects and bitmap block
                                         * objects
-@@ -273,11 +259,7 @@ struct memory_bitmap {
+@@ -273,11 +259,7 @@
  
  static void memory_bm_position_reset(struct memory_bitmap *bm)
  {
@@ -1132595,18 +1132524,17 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
        bm->cur.bit = 0;
  }
  
-@@ -285,151 +267,184 @@ static void memory_bm_free(struct memory
+@@ -285,151 +267,184 @@
  
  /**
   *    create_bm_block_list - create a list of block bitmap objects
-- */
--
--static inline struct bm_block *
--create_bm_block_list(unsigned int nr_blocks, struct chain_allocator *ca)
 + *    @nr_blocks - number of blocks to allocate
 + *    @list - list to put the allocated blocks into
 + *    @ca - chain allocator to be used for allocating memory
-+ */
+  */
+-
+-static inline struct bm_block *
+-create_bm_block_list(unsigned int nr_blocks, struct chain_allocator *ca)
 +static int create_bm_block_list(unsigned long pages,
 +                              struct list_head *list,
 +                              struct chain_allocator *ca)
@@ -1132620,65 +1132548,67 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
                bb = chain_alloc(ca, sizeof(struct bm_block));
                if (!bb)
 -                      return NULL;
--
--              bb->next = bblist;
--              bblist = bb;
 +                      return -ENOMEM;
 +              list_add(&bb->hook, list);
-       }
--      return bblist;
-+
-+      return 0;
- }
++      }
  
+-              bb->next = bblist;
+-              bblist = bb;
++      return 0;
++}
++
 +struct mem_extent {
 +      struct list_head hook;
 +      unsigned long start;
 +      unsigned long end;
 +};
 +
- /**
-- *    create_zone_bm_list - create a list of zone bitmap objects
++/**
 + *    free_mem_extents - free a list of memory extents
 + *    @list - list of extents to empty
-  */
++ */
 +static void free_mem_extents(struct list_head *list)
 +{
 +      struct mem_extent *ext, *aux;
--static inline struct zone_bitmap *
--create_zone_bm_list(unsigned int nr_zones, struct chain_allocator *ca)
++
 +      list_for_each_entry_safe(ext, aux, list, hook) {
 +              list_del(&ext->hook);
 +              kfree(ext);
-+      }
-+}
-+
-+/**
+       }
+-      return bblist;
+ }
+ /**
+- *    create_zone_bm_list - create a list of zone bitmap objects
 + *    create_mem_extents - create a list of memory extents representing
 + *                         contiguous ranges of PFNs
 + *    @list - list to put the extents into
 + *    @gfp_mask - mask to use for memory allocations
-+ */
+  */
 +static int create_mem_extents(struct list_head *list, gfp_t gfp_mask)
- {
--      struct zone_bitmap *zbmlist = NULL;
++{
 +      struct zone *zone;
  
+-static inline struct zone_bitmap *
+-create_zone_bm_list(unsigned int nr_zones, struct chain_allocator *ca)
+-{
+-      struct zone_bitmap *zbmlist = NULL;
++      INIT_LIST_HEAD(list);
 -      while (nr_zones-- > 0) {
 -              struct zone_bitmap *zbm;
-+      INIT_LIST_HEAD(list);
++      for_each_zone(zone) {
++              unsigned long zone_start, zone_end;
++              struct mem_extent *ext, *cur, *aux;
  
 -              zbm = chain_alloc(ca, sizeof(struct zone_bitmap));
 -              if (!zbm)
 -                      return NULL;
-+      for_each_zone(zone) {
-+              unsigned long zone_start, zone_end;
-+              struct mem_extent *ext, *cur, *aux;
-+
 +              if (!populated_zone(zone))
 +                      continue;
-+
+-              zbm->next = zbmlist;
+-              zbmlist = zbm;
 +              zone_start = zone->zone_start_pfn;
 +              zone_end = zone->zone_start_pfn + zone->spanned_pages;
 +
@@ -1132700,9 +1132630,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 +                      list_add_tail(&new_ext->hook, &ext->hook);
 +                      continue;
 +              }
--              zbm->next = zbmlist;
--              zbmlist = zbm;
++
 +              /* Merge this zone's range of PFNs with the existing one */
 +              if (zone_start < ext->start)
 +                      ext->start = zone_start;
@@ -1132749,30 +1132677,53 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -      for_each_zone(zone)
 -              if (populated_zone(zone))
 -                      nr++;
--
++      error = create_mem_extents(&mem_extents, gfp_mask);
++      if (error)
++              return error;
 -      /* Allocate the list of zones bitmap objects */
 -      zone_bm = create_zone_bm_list(nr, &ca);
 -      bm->zone_bm_list = zone_bm;
 -      if (!zone_bm) {
 -              chain_free(&ca, PG_UNSAFE_CLEAR);
 -              return -ENOMEM;
--      }
-+      error = create_mem_extents(&mem_extents, gfp_mask);
-+      if (error)
-+              return error;
--      /* Initialize the zone bitmap objects */
--      for_each_zone(zone) {
--              unsigned long pfn;
 +      list_for_each_entry(ext, &mem_extents, hook) {
 +              struct bm_block *bb;
 +              unsigned long pfn = ext->start;
 +              unsigned long pages = ext->end - ext->start;
++
++              bb = list_entry(bm->blocks.prev, struct bm_block, hook);
++
++              error = create_bm_block_list(pages, bm->blocks.prev, &ca);
++              if (error)
++                      goto Error;
++
++              list_for_each_entry_continue(bb, &bm->blocks, hook) {
++                      bb->data = get_image_page(gfp_mask, safe_needed);
++                      if (!bb->data) {
++                              error = -ENOMEM;
++                              goto Error;
++                      }
++
++                      bb->start_pfn = pfn;
++                      if (pages >= BM_BITS_PER_BLOCK) {
++                              pfn += BM_BITS_PER_BLOCK;
++                              pages -= BM_BITS_PER_BLOCK;
++                      } else {
++                              /* This is executed only once in the loop */
++                              pfn += pages;
++                      }
++                      bb->end_pfn = pfn;
++              }
+       }
  
+-      /* Initialize the zone bitmap objects */
+-      for_each_zone(zone) {
+-              unsigned long pfn;
+-
 -              if (!populated_zone(zone))
 -                      continue;
-+              bb = list_entry(bm->blocks.prev, struct bm_block, hook);
+-
 -              zone_bm->start_pfn = zone->zone_start_pfn;
 -              zone_bm->end_pfn = zone->zone_start_pfn + zone->spanned_pages;
 -              /* Allocate the list of bitmap block objects */
@@ -1132782,10 +1132733,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -              zone_bm->cur_block = bb;
 -              if (!bb)
 -                      goto Free;
-+              error = create_bm_block_list(pages, bm->blocks.prev, &ca);
-+              if (error)
-+                      goto Error;
+-
 -              nr = zone->spanned_pages;
 -              pfn = zone->zone_start_pfn;
 -              /* Initialize the bitmap block objects */
@@ -1132796,30 +1132744,20 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -                      bb->data = ptr;
 -                      if (!ptr)
 -                              goto Free;
-+              list_for_each_entry_continue(bb, &bm->blocks, hook) {
-+                      bb->data = get_image_page(gfp_mask, safe_needed);
-+                      if (!bb->data) {
-+                              error = -ENOMEM;
-+                              goto Error;
-+                      }
-                       bb->start_pfn = pfn;
+-
+-                      bb->start_pfn = pfn;
 -                      if (nr >= BM_BITS_PER_BLOCK) {
-+                      if (pages >= BM_BITS_PER_BLOCK) {
-                               pfn += BM_BITS_PER_BLOCK;
+-                              pfn += BM_BITS_PER_BLOCK;
 -                              nr -= BM_BITS_PER_BLOCK;
-+                              pages -= BM_BITS_PER_BLOCK;
-                       } else {
-                               /* This is executed only once in the loop */
+-                      } else {
+-                              /* This is executed only once in the loop */
 -                              pfn += nr;
-+                              pfn += pages;
-                       }
-                       bb->end_pfn = pfn;
+-                      }
+-                      bb->end_pfn = pfn;
 -                      bb = bb->next;
-               }
+-              }
 -              zone_bm = zone_bm->next;
-       }
-+
+-      }
        bm->p_list = ca.chain;
        memory_bm_position_reset(bm);
 -      return 0;
@@ -1132867,7 +1132805,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  }
  
  /**
-@@ -437,38 +452,33 @@ static void memory_bm_free(struct memory
+@@ -437,38 +452,33 @@
   *    to given pfn.  The cur_zone_bm member of @bm and the cur_block member
   *    of @bm->cur_zone_bm are updated.
   */
@@ -1132885,25 +1132823,25 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -              /* We don't assume that the zones are sorted by pfns */
 -              while (pfn < zone_bm->start_pfn || pfn >= zone_bm->end_pfn) {
 -                      zone_bm = zone_bm->next;
--
--                      if (!zone_bm)
--                              return -EFAULT;
--              }
--              bm->cur.zone_bm = zone_bm;
--      }
--      /* Check if the pfn corresponds to the current bitmap block */
--      bb = zone_bm->cur_block;
 +      /*
 +       * Check if the pfn corresponds to the current bitmap block and find
 +       * the block where it fits if this is not the case.
 +       */
 +      bb = bm->cur.block;
-       if (pfn < bb->start_pfn)
--              bb = zone_bm->bm_blocks;
++      if (pfn < bb->start_pfn)
 +              list_for_each_entry_continue_reverse(bb, &bm->blocks, hook)
 +                      if (pfn >= bb->start_pfn)
 +                              break;
-+
+-                      if (!zone_bm)
+-                              return -EFAULT;
+-              }
+-              bm->cur.zone_bm = zone_bm;
+-      }
+-      /* Check if the pfn corresponds to the current bitmap block */
+-      bb = zone_bm->cur_block;
+-      if (pfn < bb->start_pfn)
+-              bb = zone_bm->bm_blocks;
 +      if (pfn >= bb->end_pfn)
 +              list_for_each_entry_continue(bb, &bm->blocks, hook)
 +                      if (pfn >= bb->start_pfn && pfn < bb->end_pfn)
@@ -1132924,7 +1132862,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
        *bit_nr = pfn;
        *addr = bb->data;
        return 0;
-@@ -530,29 +540,21 @@ static int memory_bm_test_bit(struct mem
+@@ -530,29 +540,21 @@
  
  static unsigned long memory_bm_next_pfn(struct memory_bitmap *bm)
  {
@@ -1132940,7 +1132878,11 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -                      bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
 -                      if (bit < bm_block_bits(bb))
 -                              goto Return_pfn;
--
++              bit = bm->cur.bit;
++              bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
++              if (bit < bm_block_bits(bb))
++                      goto Return_pfn;
 -                      bb = bb->next;
 -                      bm->cur.block = bb;
 -                      bm->cur.bit = 0;
@@ -1132952,11 +1132894,6 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
 -                      bm->cur.bit = 0;
 -              }
 -      } while (zone_bm);
-+              bit = bm->cur.bit;
-+              bit = find_next_bit(bb->data, bm_block_bits(bb), bit);
-+              if (bit < bm_block_bits(bb))
-+                      goto Return_pfn;
-+
 +              bb = list_entry(bb->hook.next, struct bm_block, hook);
 +              bm->cur.block = bb;
 +              bm->cur.bit = 0;
@@ -1132965,7 +1132902,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
        memory_bm_position_reset(bm);
        return BM_END_OF_MAP;
  
-@@ -808,8 +810,7 @@ static unsigned int count_free_highmem_p
+@@ -808,8 +810,7 @@
   *    We should save the page if it isn't Nosave or NosaveFree, or Reserved,
   *    and it isn't a part of a free chunk of pages.
   */
@@ -1132975,7 +1132912,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  {
        struct page *page;
  
-@@ -817,6 +818,8 @@ static struct page *saveable_highmem_pag
+@@ -817,6 +818,8 @@
                return NULL;
  
        page = pfn_to_page(pfn);
@@ -1132984,7 +1132921,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  
        BUG_ON(!PageHighMem(page));
  
-@@ -846,13 +849,16 @@ unsigned int count_highmem_pages(void)
+@@ -846,13 +849,16 @@
                mark_free_pages(zone);
                max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages;
                for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++)
@@ -1133003,7 +1132940,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  #endif /* CONFIG_HIGHMEM */
  
  /**
-@@ -863,8 +869,7 @@ static inline void *saveable_highmem_pag
+@@ -863,8 +869,7 @@
   *    of pages statically defined as 'unsaveable', and it isn't a part of
   *    a free chunk of pages.
   */
@@ -1133013,7 +1132950,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  {
        struct page *page;
  
-@@ -872,6 +877,8 @@ static struct page *saveable_page(unsign
+@@ -872,6 +877,8 @@
                return NULL;
  
        page = pfn_to_page(pfn);
@@ -1133022,7 +1132959,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  
        BUG_ON(PageHighMem(page));
  
-@@ -903,7 +910,7 @@ unsigned int count_data_pages(void)
+@@ -903,7 +910,7 @@
                mark_free_pages(zone);
                max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages;
                for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++)
@@ -1133031,7 +1132968,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
                                n++;
        }
        return n;
-@@ -944,7 +951,7 @@ static inline struct page *
+@@ -944,7 +951,7 @@
  page_is_saveable(struct zone *zone, unsigned long pfn)
  {
        return is_highmem(zone) ?
@@ -1133040,7 +1132977,7 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  }
  
  static void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
-@@ -975,7 +982,7 @@ static void copy_data_page(unsigned long
+@@ -975,7 +982,7 @@
        }
  }
  #else
@@ -1133049,9 +1132986,9 @@ diff -purN linux-2.6.27/kernel/power/snapshot.c linux-2.6.27.19-5.1/kernel/power
  
  static inline void copy_data_page(unsigned long dst_pfn, unsigned long src_pfn)
  {
-diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
---- linux-2.6.27/kernel/printk.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/printk.c        2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/printk.c
+--- a/kernel/printk.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/printk.c  Wed May 06 16:57:01 2009 +0100
 @@ -32,6 +32,8 @@
  #include <linux/security.h>
  #include <linux/bootmem.h>
@@ -1133061,7 +1132998,7 @@ diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
  
  #include <asm/uaccess.h>
  
-@@ -421,11 +423,40 @@ out:
+@@ -421,10 +423,39 @@
        return error;
  }
  
@@ -1133070,7 +1133007,7 @@ diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
  {
        return do_syslog(type, buf, len);
  }
++
 +#ifdef CONFIG_DEBUG_KERNEL
 +/* Its very handy to be able to view the syslog buffer during debug.
 + * But do_syslog() uses locks so it cannot be used during debugging.
@@ -1133099,23 +1133036,22 @@ diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
 +      syslog_data[3] = log_buf + log_end;
 +}
 +#endif        /* CONFIG_KDB */
-+
  /*
   * Call the console drivers on a range of log_buf
-  */
-@@ -782,11 +813,6 @@ EXPORT_SYMBOL(vprintk);
+@@ -781,11 +812,6 @@
+ EXPORT_SYMBOL(vprintk);
  
  #else
+-
 -asmlinkage long sys_syslog(int type, char __user *buf, int len)
 -{
 -      return -ENOSYS;
 -}
--
  static void call_console_drivers(unsigned start, unsigned end)
  {
- }
-@@ -1343,3 +1369,46 @@ bool printk_timed_ratelimit(unsigned lon
+@@ -1343,3 +1369,46 @@
  }
  EXPORT_SYMBOL(printk_timed_ratelimit);
  #endif
@@ -1133162,10 +1133098,10 @@ diff -purN linux-2.6.27/kernel/printk.c linux-2.6.27.19-5.1/kernel/printk.c
 +}
 +EXPORT_SYMBOL(printk_dev_hash);
 +#endif
-diff -purN linux-2.6.27/kernel/ptrace.c linux-2.6.27.19-5.1/kernel/ptrace.c
---- linux-2.6.27/kernel/ptrace.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/ptrace.c        2009-03-25 16:11:41.000000000 +0000
-@@ -545,7 +545,7 @@ struct task_struct *ptrace_get_task_stru
+diff -r 9608d5473017 kernel/ptrace.c
+--- a/kernel/ptrace.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/ptrace.c  Wed May 06 16:57:01 2009 +0100
+@@ -545,7 +545,7 @@
  #define arch_ptrace_attach(child)     do { } while (0)
  #endif
  
@@ -1133174,7 +1133110,7 @@ diff -purN linux-2.6.27/kernel/ptrace.c linux-2.6.27.19-5.1/kernel/ptrace.c
  {
        struct task_struct *child;
        long ret;
-@@ -554,6 +554,38 @@ asmlinkage long sys_ptrace(long request,
+@@ -554,6 +554,38 @@
         * This lock_kernel fixes a subtle race with suid exec
         */
        lock_kernel();
@@ -1133213,10 +1133149,10 @@ diff -purN linux-2.6.27/kernel/ptrace.c linux-2.6.27.19-5.1/kernel/ptrace.c
        if (request == PTRACE_TRACEME) {
                ret = ptrace_traceme();
                if (!ret)
-diff -purN linux-2.6.27/kernel/relay.c linux-2.6.27.19-5.1/kernel/relay.c
---- linux-2.6.27/kernel/relay.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/relay.c 2009-03-25 16:11:41.000000000 +0000
-@@ -664,8 +664,10 @@ int relay_late_setup_files(struct rchan 
+diff -r 9608d5473017 kernel/relay.c
+--- a/kernel/relay.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/relay.c   Wed May 06 16:57:01 2009 +0100
+@@ -664,8 +664,10 @@
  
        mutex_lock(&relay_channels_mutex);
        /* Is chan already set up? */
@@ -1133228,9 +1133164,9 @@ diff -purN linux-2.6.27/kernel/relay.c linux-2.6.27.19-5.1/kernel/relay.c
        chan->has_base_filename = 1;
        chan->parent = parent;
        curr_cpu = get_cpu();
-diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
---- linux-2.6.27/kernel/sched.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sched.c
+--- a/kernel/sched.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched.c   Wed May 06 16:57:01 2009 +0100
 @@ -71,6 +71,8 @@
  #include <linux/debugfs.h>
  #include <linux/ctype.h>
@@ -1133240,7 +1133176,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  
  #include <asm/tlb.h>
  #include <asm/irq_regs.h>
-@@ -263,12 +265,10 @@ struct task_group {
+@@ -263,12 +265,10 @@
        unsigned long shares;
  #endif
  
@@ -1133253,7 +1133189,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  
        struct rcu_head rcu;
        struct list_head list;
-@@ -454,14 +454,12 @@ struct rt_rq {
+@@ -454,14 +454,12 @@
        /* Nests inside the rq lock: */
        spinlock_t rt_runtime_lock;
  
@@ -1133268,7 +1133204,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  };
  
  #ifdef CONFIG_SMP
-@@ -533,9 +531,8 @@ struct rq {
+@@ -533,9 +531,8 @@
        /* list of leaf cfs_rq on this cpu: */
        struct list_head leaf_cfs_rq_list;
  #endif
@@ -1133279,7 +1133215,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  
        /*
         * This is part of a global counter where only the total sum
-@@ -1918,6 +1915,7 @@ unsigned long wait_task_inactive(struct 
+@@ -1918,6 +1915,7 @@
                 * just go back and repeat.
                 */
                rq = task_rq_lock(p, &flags);
@@ -1133287,7 +1133223,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
                running = task_running(rq, p);
                on_rq = p->se.on_rq;
                ncsw = 0;
-@@ -2107,6 +2105,28 @@ find_idlest_cpu(struct sched_group *grou
+@@ -2107,6 +2105,28 @@
        return idlest;
  }
  
@@ -1133316,7 +1133252,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  /*
   * sched_balance_self: balance the current task (running on cpu) in domains
   * that have the 'flag' flag set. In practice, this is SD_BALANCE_FORK and
-@@ -2118,11 +2138,17 @@ find_idlest_cpu(struct sched_group *grou
+@@ -2118,10 +2138,16 @@
   *
   * preempt must be disabled.
   */
@@ -1133327,14 +1133263,13 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        struct task_struct *t = current;
        struct sched_domain *tmp, *sd = NULL;
++
 +      if (affinity_load_balancing && !cpus_full(t->cpus_allowed))
 +              return find_idlest_cpu_nodomain(t, cpu);
-+
        for_each_domain(cpu, tmp) {
                /*
-                * If power savings logic is enabled for a domain, stop there.
-@@ -2282,9 +2308,7 @@ out_activate:
+@@ -2282,9 +2308,7 @@
        success = 1;
  
  out_running:
@@ -1133345,7 +1133280,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        check_preempt_curr(rq, p);
  
        p->state = TASK_RUNNING;
-@@ -2417,9 +2441,7 @@ void wake_up_new_task(struct task_struct
+@@ -2417,9 +2441,7 @@
                p->sched_class->task_new(rq, p);
                inc_nr_running(rq);
        }
@@ -1133356,7 +1133291,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        check_preempt_curr(rq, p);
  #ifdef CONFIG_SMP
        if (p->sched_class->task_wake_up)
-@@ -2592,11 +2614,7 @@ context_switch(struct rq *rq, struct tas
+@@ -2592,11 +2614,7 @@
        struct mm_struct *mm, *oldmm;
  
        prepare_task_switch(rq, prev, next);
@@ -1133369,7 +1133304,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        mm = next->mm;
        oldmm = prev->active_mm;
        /*
-@@ -2836,6 +2854,7 @@ static void sched_migrate_task(struct ta
+@@ -2836,6 +2854,7 @@
            || unlikely(!cpu_active(dest_cpu)))
                goto out;
  
@@ -1133377,7 +1133312,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        /* force the process onto the specified CPU */
        if (migrate_task(p, dest_cpu, &req)) {
                /* Need to wait for migration thread (might exit: take ref). */
-@@ -4426,12 +4445,9 @@ need_resched_nonpreemptible:
+@@ -4426,12 +4445,9 @@
        if (sched_feat(HRTICK))
                hrtick_clear(rq);
  
@@ -1133391,7 +1133326,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        clear_tsk_need_resched(prev);
  
        if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
-@@ -4556,8 +4572,8 @@ EXPORT_SYMBOL(default_wake_function);
+@@ -4556,8 +4572,8 @@
   * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns
   * zero in this (rare) case, and we handle it by continuing to scan the queue.
   */
@@ -1133402,7 +1133337,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        wait_queue_t *curr, *next;
  
-@@ -4942,7 +4958,7 @@ int can_nice(const struct task_struct *p
+@@ -4942,7 +4958,7 @@
   * sys_setpriority is a more generic, but much slower function that
   * does similar things.
   */
@@ -1133411,7 +1133346,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        long nice, retval;
  
-@@ -5233,8 +5249,8 @@ do_sched_setscheduler(pid_t pid, int pol
+@@ -5233,8 +5249,8 @@
   * @policy: new policy.
   * @param: structure containing the new RT priority.
   */
@@ -1133422,7 +1133357,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        /* negative values for policy are not valid */
        if (policy < 0)
-@@ -5248,7 +5264,7 @@ sys_sched_setscheduler(pid_t pid, int po
+@@ -5248,7 +5264,7 @@
   * @pid: the pid in question.
   * @param: structure containing the new RT priority.
   */
@@ -1133431,7 +1133366,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        return do_sched_setscheduler(pid, -1, param);
  }
-@@ -5257,7 +5273,7 @@ asmlinkage long sys_sched_setparam(pid_t
+@@ -5257,7 +5273,7 @@
   * sys_sched_getscheduler - get the policy (scheduling class) of a thread
   * @pid: the pid in question.
   */
@@ -1133440,7 +1133375,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        struct task_struct *p;
        int retval;
-@@ -5282,7 +5298,7 @@ asmlinkage long sys_sched_getscheduler(p
+@@ -5282,7 +5298,7 @@
   * @pid: the pid in question.
   * @param: structure containing the RT priority.
   */
@@ -1133449,7 +1133384,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        struct sched_param lp;
        struct task_struct *p;
-@@ -5390,8 +5406,8 @@ static int get_user_cpu_mask(unsigned lo
+@@ -5390,8 +5406,8 @@
   * @len: length in bytes of the bitmask pointed to by user_mask_ptr
   * @user_mask_ptr: user-space pointer to the new cpu mask
   */
@@ -1133460,7 +1133395,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        cpumask_t new_mask;
        int retval;
-@@ -5435,8 +5451,8 @@ out_unlock:
+@@ -5435,8 +5451,8 @@
   * @len: length in bytes of the bitmask pointed to by user_mask_ptr
   * @user_mask_ptr: user-space pointer to hold the current cpu mask
   */
@@ -1133471,7 +1133406,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        int ret;
        cpumask_t mask;
-@@ -5460,7 +5476,7 @@ asmlinkage long sys_sched_getaffinity(pi
+@@ -5460,7 +5476,7 @@
   * This function yields the current CPU to other tasks. If there are no
   * other threads running on this CPU then this function will return.
   */
@@ -1133480,7 +1133415,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        struct rq *rq = this_rq_lock();
  
-@@ -5601,7 +5617,7 @@ long __sched io_schedule_timeout(long ti
+@@ -5601,7 +5617,7 @@
   * this syscall returns the maximum rt_priority that can be used
   * by a given scheduling class.
   */
@@ -1133489,7 +1133424,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        int ret = -EINVAL;
  
-@@ -5626,7 +5642,7 @@ asmlinkage long sys_sched_get_priority_m
+@@ -5626,7 +5642,7 @@
   * this syscall returns the minimum rt_priority that can be used
   * by a given scheduling class.
   */
@@ -1133498,7 +1133433,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        int ret = -EINVAL;
  
-@@ -5651,8 +5667,8 @@ asmlinkage long sys_sched_get_priority_m
+@@ -5651,8 +5667,8 @@
   * this syscall writes the default timeslice value of a given process
   * into the user-space timespec buffer. A value of '0' means infinity.
   */
@@ -1133509,7 +1133444,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  {
        struct task_struct *p;
        unsigned int time_slice;
-@@ -6052,8 +6068,9 @@ static void move_task_off_dead_cpu(int d
+@@ -6052,8 +6068,9 @@
  
        do {
                /* On same node? */
@@ -1133521,7 +1133456,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
                dest_cpu = any_online_cpu(mask);
  
                /* On any allowed CPU? */
-@@ -6500,7 +6517,9 @@ migration_call(struct notifier_block *nf
+@@ -6500,7 +6517,9 @@
                        req = list_entry(rq->migration_queue.next,
                                         struct migration_req, list);
                        list_del_init(&req->list);
@@ -1133531,7 +1133466,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
                }
                spin_unlock_irq(&rq->lock);
                break;
-@@ -6802,15 +6821,17 @@ cpu_attach_domain(struct sched_domain *s
+@@ -6802,15 +6821,17 @@
        struct sched_domain *tmp;
  
        /* Remove the sched domains which do not contribute to scheduling. */
@@ -1133551,47 +1133486,50 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
        }
  
        if (sd && sd_degenerate(sd)) {
-@@ -7059,9 +7080,9 @@ static int cpu_to_allnodes_group(int cpu
+@@ -7059,9 +7080,9 @@
                                 struct sched_group **sg, cpumask_t *nodemask)
  {
        int group;
-+      node_to_cpumask_ptr(pnodemask, cpu_to_node(cpu));
+-
 -      *nodemask = node_to_cpumask(cpu_to_node(cpu));
 -      cpus_and(*nodemask, *nodemask, *cpu_map);
++      node_to_cpumask_ptr(pnodemask, cpu_to_node(cpu));
++
 +      cpus_and(*nodemask, *pnodemask, *cpu_map);
        group = first_cpu(*nodemask);
  
        if (sg)
-@@ -7111,9 +7132,9 @@ static void free_sched_groups(const cpum
+@@ -7111,9 +7132,9 @@
  
                for (i = 0; i < nr_node_ids; i++) {
                        struct sched_group *oldsg, *sg = sched_group_nodes[i];
-+                      node_to_cpumask_ptr(pnodemask, i);
+-
 -                      *nodemask = node_to_cpumask(i);
 -                      cpus_and(*nodemask, *nodemask, *cpu_map);
++                      node_to_cpumask_ptr(pnodemask, i);
++
 +                      cpus_and(*nodemask, *pnodemask, *cpu_map);
                        if (cpus_empty(*nodemask))
                                continue;
  
-@@ -7612,8 +7633,14 @@ static struct sched_domain_attr *dattr_c
+@@ -7612,8 +7633,14 @@
   */
  static cpumask_t fallback_doms;
  
 -void __attribute__((weak)) arch_update_cpu_topology(void)
+-{
 +/*
 + * arch_update_cpu_topology lets virtualized architectures update the
 + * cpu core maps. It is supposed to return 1 if the topology changed
 + * or 0 if it stayed the same.
 + */
 +int __attribute__((weak)) arch_update_cpu_topology(void)
- {
++{
 +      return 0;
  }
  
  /*
-@@ -7692,13 +7719,14 @@ static int dattrs_equal(struct sched_dom
+@@ -7692,13 +7719,14 @@
   *
   * The passed in 'doms_new' should be kmalloc'd. This routine takes
   * ownership of it and will kfree it when done with it. If the caller
@@ -1133613,7 +1133551,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
   *
   * Call with hotplug lock held
   */
-@@ -7706,17 +7734,21 @@ void partition_sched_domains(int ndoms_n
+@@ -7706,17 +7734,21 @@
                             struct sched_domain_attr *dattr_new)
  {
        int i, j, n;
@@ -1133636,7 +1133574,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
                        if (cpus_equal(doms_cur[i], doms_new[j])
                            && dattrs_equal(dattr_cur, i, dattr_new, j))
                                goto match1;
-@@ -7736,7 +7768,7 @@ match1:
+@@ -7736,7 +7768,7 @@
  
        /* Build new domains */
        for (i = 0; i < ndoms_new; i++) {
@@ -1133645,7 +1133583,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
                        if (cpus_equal(doms_new[i], doms_cur[j])
                            && dattrs_equal(dattr_new, i, dattr_cur, j))
                                goto match2;
-@@ -8322,7 +8354,7 @@ void normalize_rt_tasks(void)
+@@ -8322,7 +8354,7 @@
  
  #endif /* CONFIG_MAGIC_SYSRQ */
  
@@ -1133654,7 +1133592,7 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
  /*
   * These functions are only useful for the IA64 MCA handling.
   *
-@@ -9263,3 +9295,94 @@ struct cgroup_subsys cpuacct_subsys = {
+@@ -9263,3 +9295,94 @@
        .subsys_id = cpuacct_subsys_id,
  };
  #endif        /* CONFIG_CGROUP_CPUACCT */
@@ -1133749,10 +1133687,10 @@ diff -purN linux-2.6.27/kernel/sched.c linux-2.6.27.19-5.1/kernel/sched.c
 +EXPORT_SYMBOL(kdb_runqueue);
 +
 +#endif        /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/sched_clock.c linux-2.6.27.19-5.1/kernel/sched_clock.c
---- linux-2.6.27/kernel/sched_clock.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_clock.c   2009-03-25 16:11:40.000000000 +0000
-@@ -124,7 +124,7 @@ static u64 __update_sched_clock(struct s
+diff -r 9608d5473017 kernel/sched_clock.c
+--- a/kernel/sched_clock.c     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_clock.c     Wed May 06 16:57:01 2009 +0100
+@@ -124,7 +124,7 @@
  
        clock = scd->tick_gtod + delta;
        min_clock = wrap_max(scd->tick_gtod, scd->clock);
@@ -1133761,7 +1133699,7 @@ diff -purN linux-2.6.27/kernel/sched_clock.c linux-2.6.27.19-5.1/kernel/sched_cl
  
        clock = wrap_max(clock, min_clock);
        clock = wrap_min(clock, max_clock);
-@@ -227,6 +227,9 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_sleep
+@@ -227,6 +227,9 @@
   */
  void sched_clock_idle_wakeup_event(u64 delta_ns)
  {
@@ -1133771,10 +1133709,10 @@ diff -purN linux-2.6.27/kernel/sched_clock.c linux-2.6.27.19-5.1/kernel/sched_cl
        sched_clock_tick();
        touch_softlockup_watchdog();
  }
-diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fair.c
---- linux-2.6.27/kernel/sched_fair.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_fair.c    2009-03-25 16:11:40.000000000 +0000
-@@ -141,6 +141,49 @@ static inline struct sched_entity *paren
+diff -r 9608d5473017 kernel/sched_fair.c
+--- a/kernel/sched_fair.c      Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_fair.c      Wed May 06 16:57:01 2009 +0100
+@@ -141,6 +141,49 @@
        return se->parent;
  }
  
@@ -1133824,19 +1133762,19 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  #else /* CONFIG_FAIR_GROUP_SCHED */
  
  static inline struct rq *rq_of(struct cfs_rq *cfs_rq)
-@@ -191,6 +234,11 @@ static inline struct sched_entity *paren
+@@ -189,6 +232,11 @@
+ static inline struct sched_entity *parent_entity(struct sched_entity *se)
+ {
        return NULL;
- }
++}
++
 +static inline void
 +find_matching_se(struct sched_entity **se, struct sched_entity **pse)
 +{
-+}
-+
- #endif        /* CONFIG_FAIR_GROUP_SCHED */
+ }
  
-@@ -334,7 +382,7 @@ int sched_nr_latency_handler(struct ctl_
+ #endif        /* CONFIG_FAIR_GROUP_SCHED */
+@@ -334,7 +382,7 @@
  #endif
  
  /*
@@ -1133845,7 +1133783,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
   */
  static inline unsigned long
  calc_delta_weight(unsigned long delta, struct sched_entity *se)
-@@ -348,15 +396,13 @@ calc_delta_weight(unsigned long delta, s
+@@ -348,15 +396,13 @@
  }
  
  /*
@@ -1133864,7 +1133802,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  
        return delta;
  }
-@@ -386,84 +432,26 @@ static u64 __sched_period(unsigned long 
+@@ -386,84 +432,26 @@
   * We calculate the wall-time slice from the period by taking a part
   * proportional to the weight.
   *
@@ -1133874,26 +1133812,32 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
  {
 -      return calc_delta_weight(__sched_period(cfs_rq->nr_running), se);
--}
--
--/*
-- * We calculate the vruntime slice of a to be inserted task
-- *
-- * vs = s*rw/w = p
-- */
--static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
--{
-       unsigned long nr_running = cfs_rq->nr_running;
--      if (!se->on_rq)
++      unsigned long nr_running = cfs_rq->nr_running;
++
 +      if (unlikely(!se->on_rq))
-               nr_running++;
--      return __sched_period(nr_running);
++              nr_running++;
++
 +      return calc_delta_weight(__sched_period(nr_running), se);
  }
  
  /*
+  * We calculate the vruntime slice of a to be inserted task
+  *
+- * vs = s*rw/w = p
++ * vs = s/w
+  */
+-static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
++static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se)
+ {
+-      unsigned long nr_running = cfs_rq->nr_running;
+-
+-      if (!se->on_rq)
+-              nr_running++;
+-
+-      return __sched_period(nr_running);
+-}
+-
+-/*
 - * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in
 - * that it favours >=0 over <0.
 - *
@@ -1133902,14 +1133846,11 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
 - *     0 --------+-------
 - *             .'
 - *    19     .'
-+ * We calculate the vruntime slice of a to be inserted task
-  *
-+ * vs = s/w
-  */
+- *
+- */
 -static unsigned long
 -calc_delta_asym(unsigned long delta, struct sched_entity *se)
-+static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se)
- {
+-{
 -      struct load_weight lw = {
 -              .weight = NICE_0_LOAD,
 -              .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT)
@@ -1133956,7 +1133897,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  }
  
  /*
-@@ -683,7 +671,7 @@ place_entity(struct cfs_rq *cfs_rq, stru
+@@ -683,7 +671,7 @@
         * stays open at the end.
         */
        if (initial && sched_feat(START_DEBIT))
@@ -1133965,7 +1133906,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  
        if (!initial) {
                /* sleeps upto a single latency don't count. */
-@@ -1280,9 +1268,7 @@ static unsigned long wakeup_gran(struct 
+@@ -1280,9 +1268,7 @@
         * More easily preempt - nice tasks, while not making it harder for
         * + nice tasks.
         */
@@ -1133976,7 +1133917,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
                gran = calc_delta_fair(sysctl_sched_wakeup_granularity, se);
  
        return gran;
-@@ -1307,7 +1293,7 @@ wakeup_preempt_entity(struct sched_entit
+@@ -1307,7 +1293,7 @@
  {
        s64 gran, vdiff = curr->vruntime - se->vruntime;
  
@@ -1133985,10 +1133926,12 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
                return -1;
  
        gran = wakeup_gran(curr);
-@@ -1317,17 +1303,6 @@ wakeup_preempt_entity(struct sched_entit
-       return 0;
- }
+@@ -1315,17 +1301,6 @@
+               return 1;
  
+       return 0;
+-}
+-
 -/* return depth at which a sched entity is present in the hierarchy */
 -static inline int depth_se(struct sched_entity *se)
 -{
@@ -1133998,12 +1133941,10 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
 -              depth++;
 -
 -      return depth;
--}
--
+ }
  /*
-  * Preempt the current task with a newly woken task if needed:
-  */
-@@ -1336,7 +1311,6 @@ static void check_preempt_wakeup(struct 
+@@ -1336,7 +1311,6 @@
        struct task_struct *curr = rq->curr;
        struct cfs_rq *cfs_rq = task_cfs_rq(curr);
        struct sched_entity *se = &curr->se, *pse = &p->se;
@@ -1134011,7 +1133952,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  
        if (unlikely(rt_prio(p->prio))) {
                update_rq_clock(rq);
-@@ -1360,34 +1334,19 @@ static void check_preempt_wakeup(struct 
+@@ -1360,34 +1334,19 @@
        if (!sched_feat(WAKEUP_PREEMPT))
                return;
  
@@ -1134033,16 +1133974,16 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
 -              se_depth--;
 -              se = parent_entity(se);
 -      }
--
--      while (pse_depth > se_depth) {
--              pse_depth--;
--              pse = parent_entity(pse);
--      }
 +              if (wakeup_preempt_entity(se, pse) == 1) {
 +                      resched_task(curr);
 +                      break;
 +              }
  
+-      while (pse_depth > se_depth) {
+-              pse_depth--;
+-              pse = parent_entity(pse);
+-      }
+-
 -      while (!is_same_group(se, pse)) {
                se = parent_entity(se);
                pse = parent_entity(pse);
@@ -1134053,7 +1133994,7 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
  }
  
  static struct task_struct *pick_next_task_fair(struct rq *rq)
-@@ -1451,7 +1410,7 @@ __load_balance_iterator(struct cfs_rq *c
+@@ -1451,7 +1410,7 @@
                next = next->next;
        } while (next != &cfs_rq->tasks && !entity_is_task(se));
  
@@ -1134062,10 +1134003,10 @@ diff -purN linux-2.6.27/kernel/sched_fair.c linux-2.6.27.19-5.1/kernel/sched_fai
                return NULL;
  
        cfs_rq->balance_iterator = next;
-diff -purN linux-2.6.27/kernel/sched_features.h linux-2.6.27.19-5.1/kernel/sched_features.h
---- linux-2.6.27/kernel/sched_features.h       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_features.h        2009-03-25 16:11:42.000000000 +0000
-@@ -5,7 +5,7 @@ SCHED_FEAT(START_DEBIT, 1)
+diff -r 9608d5473017 kernel/sched_features.h
+--- a/kernel/sched_features.h  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_features.h  Wed May 06 16:57:01 2009 +0100
+@@ -5,7 +5,7 @@
  SCHED_FEAT(AFFINE_WAKEUPS, 1)
  SCHED_FEAT(CACHE_HOT_BUDDY, 1)
  SCHED_FEAT(SYNC_WAKEUPS, 1)
@@ -1134074,10 +1134015,10 @@ diff -purN linux-2.6.27/kernel/sched_features.h linux-2.6.27.19-5.1/kernel/sched
  SCHED_FEAT(DOUBLE_TICK, 0)
  SCHED_FEAT(ASYM_GRAN, 1)
  SCHED_FEAT(LB_BIAS, 1)
-diff -purN linux-2.6.27/kernel/sched_rt.c linux-2.6.27.19-5.1/kernel/sched_rt.c
---- linux-2.6.27/kernel/sched_rt.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_rt.c      2009-03-25 16:11:40.000000000 +0000
-@@ -102,12 +102,12 @@ static void dequeue_rt_entity(struct sch
+diff -r 9608d5473017 kernel/sched_rt.c
+--- a/kernel/sched_rt.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_rt.c        Wed May 06 16:57:02 2009 +0100
+@@ -102,12 +102,12 @@
  
  static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
  {
@@ -1134094,9 +1134035,9 @@ diff -purN linux-2.6.27/kernel/sched_rt.c linux-2.6.27.19-5.1/kernel/sched_rt.c
                if (rt_rq->highest_prio < curr->prio)
                        resched_task(curr);
        }
-diff -purN linux-2.6.27/kernel/sched_stats.h linux-2.6.27.19-5.1/kernel/sched_stats.h
---- linux-2.6.27/kernel/sched_stats.h  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sched_stats.h   2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sched_stats.h
+--- a/kernel/sched_stats.h     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sched_stats.h     Wed May 06 16:57:02 2009 +0100
 @@ -9,7 +9,7 @@
  static int show_schedstat(struct seq_file *seq, void *v)
  {
@@ -1134106,9 +1134047,9 @@ diff -purN linux-2.6.27/kernel/sched_stats.h linux-2.6.27.19-5.1/kernel/sched_st
        char *mask_str = kmalloc(mask_len, GFP_KERNEL);
  
        if (mask_str == NULL)
-diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
---- linux-2.6.27/kernel/signal.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/signal.c        2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/signal.c
+--- a/kernel/signal.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/signal.c  Wed May 06 16:57:02 2009 +0100
 @@ -27,6 +27,7 @@
  #include <linux/freezer.h>
  #include <linux/pid_namespace.h>
@@ -1134117,7 +1134058,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  
  #include <asm/param.h>
  #include <asm/uaccess.h>
-@@ -803,6 +804,8 @@ static int send_signal(int sig, struct s
+@@ -803,6 +804,8 @@
        struct sigpending *pending;
        struct sigqueue *q;
  
@@ -1134126,7 +1134067,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
        assert_spin_locked(&t->sighand->siglock);
        if (!prepare_signal(sig, t))
                return 0;
-@@ -1141,7 +1144,8 @@ static int kill_something_info(int sig, 
+@@ -1141,7 +1144,8 @@
                struct task_struct * p;
  
                for_each_process(p) {
@@ -1134136,7 +1134077,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
                                int err = group_send_sig_info(sig, info, p);
                                ++count;
                                if (err != -EPERM)
-@@ -1936,7 +1940,7 @@ EXPORT_SYMBOL(unblock_all_signals);
+@@ -1936,7 +1940,7 @@
   * System call entry points.
   */
  
@@ -1134145,7 +1134086,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        struct restart_block *restart = &current_thread_info()->restart_block;
        return restart->fn(restart);
-@@ -1989,8 +1993,8 @@ int sigprocmask(int how, sigset_t *set, 
+@@ -1989,8 +1993,8 @@
        return error;
  }
  
@@ -1134156,7 +1134097,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        int error = -EINVAL;
        sigset_t old_set, new_set;
-@@ -2049,8 +2053,7 @@ out:
+@@ -2049,8 +2053,7 @@
        return error;
  }     
  
@@ -1134166,7 +1134107,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        return do_sigpending(set, sigsetsize);
  }
-@@ -2121,11 +2124,9 @@ int copy_siginfo_to_user(siginfo_t __use
+@@ -2121,11 +2124,9 @@
  
  #endif
  
@@ -1134181,7 +1134122,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        int ret, sig;
        sigset_t these;
-@@ -2198,8 +2199,7 @@ sys_rt_sigtimedwait(const sigset_t __use
+@@ -2198,8 +2199,7 @@
        return ret;
  }
  
@@ -1134191,7 +1134132,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        struct siginfo info;
  
-@@ -2258,7 +2258,7 @@ static int do_tkill(pid_t tgid, pid_t pi
+@@ -2258,7 +2258,7 @@
   *  exists but it's not belonging to the target process anymore. This
   *  method solves the problem of threads exiting and PIDs getting reused.
   */
@@ -1134200,7 +1134141,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        /* This is only valid for single tasks */
        if (pid <= 0 || tgid <= 0)
-@@ -2270,8 +2270,7 @@ asmlinkage long sys_tgkill(pid_t tgid, p
+@@ -2270,8 +2270,7 @@
  /*
   *  Send a signal to only one task, even if it's a CLONE_THREAD task.
   */
@@ -1134210,7 +1134151,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        /* This is only valid for single tasks */
        if (pid <= 0)
-@@ -2280,8 +2279,8 @@ sys_tkill(pid_t pid, int sig)
+@@ -2280,8 +2279,8 @@
        return do_tkill(0, pid, sig);
  }
  
@@ -1134221,7 +1134162,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        siginfo_t info;
  
-@@ -2409,8 +2408,7 @@ out:
+@@ -2409,8 +2408,7 @@
  
  #ifdef __ARCH_WANT_SYS_SIGPENDING
  
@@ -1134231,7 +1134172,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        return do_sigpending(set, sizeof(*set));
  }
-@@ -2421,8 +2419,8 @@ sys_sigpending(old_sigset_t __user *set)
+@@ -2421,8 +2419,8 @@
  /* Some platforms have their own version with special arguments others
     support only sys_rt_sigprocmask.  */
  
@@ -1134242,7 +1134183,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        int error;
        old_sigset_t old_set, new_set;
-@@ -2472,11 +2470,10 @@ out:
+@@ -2472,11 +2470,10 @@
  #endif /* __ARCH_WANT_SYS_SIGPROCMASK */
  
  #ifdef __ARCH_WANT_SYS_RT_SIGACTION
@@ -1134258,7 +1134199,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        struct k_sigaction new_sa, old_sa;
        int ret = -EINVAL;
-@@ -2506,15 +2503,13 @@ out:
+@@ -2506,15 +2503,13 @@
  /*
   * For backwards compatibility.  Functionality superseded by sigprocmask.
   */
@@ -1134276,7 +1134217,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        int old;
  
-@@ -2534,8 +2529,7 @@ sys_ssetmask(int newmask)
+@@ -2534,8 +2529,7 @@
  /*
   * For backwards compatibility.  Functionality superseded by sigaction.
   */
@@ -1134286,7 +1134227,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        struct k_sigaction new_sa, old_sa;
        int ret;
-@@ -2552,8 +2546,7 @@ sys_signal(int sig, __sighandler_t handl
+@@ -2552,8 +2546,7 @@
  
  #ifdef __ARCH_WANT_SYS_PAUSE
  
@@ -1134296,7 +1134237,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        current->state = TASK_INTERRUPTIBLE;
        schedule();
-@@ -2563,7 +2556,7 @@ sys_pause(void)
+@@ -2563,7 +2556,7 @@
  #endif
  
  #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
@@ -1134305,7 +1134246,7 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
  {
        sigset_t newset;
  
-@@ -2597,3 +2590,52 @@ void __init signals_init(void)
+@@ -2597,3 +2590,52 @@
  {
        sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
  }
@@ -1134358,10 +1134299,10 @@ diff -purN linux-2.6.27/kernel/signal.c linux-2.6.27.19-5.1/kernel/signal.c
 +              kdb_printf("Signal %d is sent to process %d.\n", sig, t->pid);
 +}
 +#endif        /* CONFIG_KDB */
-diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
---- linux-2.6.27/kernel/smp.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/smp.c   2009-03-25 16:11:40.000000000 +0000
-@@ -287,7 +287,7 @@ static void quiesce_dummy(void *unused)
+diff -r 9608d5473017 kernel/smp.c
+--- a/kernel/smp.c     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/smp.c     Wed May 06 16:57:02 2009 +0100
+@@ -287,7 +287,7 @@
   * If a faster scheme can be made, we could go back to preferring stack based
   * data -- the data allocation/free is non-zero cost.
   */
@@ -1134370,7 +1134311,7 @@ diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
  {
        struct call_single_data data;
        int cpu;
-@@ -295,7 +295,7 @@ static void smp_call_function_mask_quies
+@@ -295,7 +295,7 @@
        data.func = quiesce_dummy;
        data.info = NULL;
  
@@ -1134379,7 +1134320,7 @@ diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
                data.flags = CSD_FLAG_WAIT;
                generic_exec_single(cpu, &data);
        }
-@@ -323,7 +323,6 @@ int smp_call_function_mask(cpumask_t mas
+@@ -323,7 +323,6 @@
  {
        struct call_function_data d;
        struct call_function_data *data = NULL;
@@ -1134387,7 +1134328,7 @@ diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
        unsigned long flags;
        int cpu, num_cpus;
        int slowpath = 0;
-@@ -332,9 +331,8 @@ int smp_call_function_mask(cpumask_t mas
+@@ -332,9 +331,8 @@
        WARN_ON(irqs_disabled());
  
        cpu = smp_processor_id();
@@ -1134399,7 +1134340,7 @@ diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
        num_cpus = cpus_weight(mask);
  
        /*
-@@ -377,7 +375,7 @@ int smp_call_function_mask(cpumask_t mas
+@@ -377,7 +375,7 @@
        if (wait) {
                csd_flag_wait(&data->csd);
                if (unlikely(slowpath))
@@ -1134408,9 +1134349,9 @@ diff -purN linux-2.6.27/kernel/smp.c linux-2.6.27.19-5.1/kernel/smp.c
        }
  
        return 0;
-diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
---- linux-2.6.27/kernel/softirq.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/softirq.c       2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/softirq.c
+--- a/kernel/softirq.c Wed May 06 15:47:13 2009 +0100
++++ b/kernel/softirq.c Wed May 06 16:57:02 2009 +0100
 @@ -21,6 +21,7 @@
  #include <linux/rcupdate.h>
  #include <linux/smp.h>
@@ -1134419,7 +1134360,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
  
  #include <asm/irq.h>
  /*
-@@ -187,6 +188,8 @@ asmlinkage void __do_softirq(void)
+@@ -187,6 +188,8 @@
        __u32 pending;
        int max_restart = MAX_SOFTIRQ_RESTART;
        int cpu;
@@ -1134428,7 +1134369,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
  
        pending = local_softirq_pending();
        account_system_vtime(current);
-@@ -205,7 +208,9 @@ restart:
+@@ -205,7 +208,9 @@
  
        do {
                if (pending & 1) {
@@ -1134438,7 +1134379,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
                        rcu_bh_qsctr_inc(cpu);
                }
                h++;
-@@ -225,6 +230,7 @@ restart:
+@@ -225,6 +230,7 @@
  
        account_system_vtime(current);
        _local_bh_enable();
@@ -1134446,7 +1134387,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
  }
  
  #ifndef __ARCH_HAS_DO_SOFTIRQ
-@@ -297,6 +303,7 @@ void irq_exit(void)
+@@ -297,6 +303,7 @@
   */
  inline void raise_softirq_irqoff(unsigned int nr)
  {
@@ -1134454,7 +1134395,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
        __raise_softirq_irqoff(nr);
  
        /*
-@@ -383,7 +390,9 @@ static void tasklet_action(struct softir
+@@ -383,7 +390,9 @@
                        if (!atomic_read(&t->count)) {
                                if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
                                        BUG();
@@ -1134464,7 +1134405,7 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
                                tasklet_unlock(t);
                                continue;
                        }
-@@ -418,7 +427,9 @@ static void tasklet_hi_action(struct sof
+@@ -418,7 +427,9 @@
                        if (!atomic_read(&t->count)) {
                                if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
                                        BUG();
@@ -1134474,10 +1134415,10 @@ diff -purN linux-2.6.27/kernel/softirq.c linux-2.6.27.19-5.1/kernel/softirq.c
                                tasklet_unlock(t);
                                continue;
                        }
-diff -purN linux-2.6.27/kernel/spinlock.c linux-2.6.27.19-5.1/kernel/spinlock.c
---- linux-2.6.27/kernel/spinlock.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/spinlock.c      2009-03-25 16:11:42.000000000 +0000
-@@ -121,7 +121,11 @@ unsigned long __lockfunc _read_lock_irqs
+diff -r 9608d5473017 kernel/spinlock.c
+--- a/kernel/spinlock.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/spinlock.c        Wed May 06 16:57:02 2009 +0100
+@@ -121,7 +121,11 @@
        local_irq_save(flags);
        preempt_disable();
        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
@@ -1134489,7 +1134430,7 @@ diff -purN linux-2.6.27/kernel/spinlock.c linux-2.6.27.19-5.1/kernel/spinlock.c
        return flags;
  }
  EXPORT_SYMBOL(_read_lock_irqsave);
-@@ -151,7 +155,11 @@ unsigned long __lockfunc _write_lock_irq
+@@ -151,7 +155,11 @@
        local_irq_save(flags);
        preempt_disable();
        rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
@@ -1134501,10 +1134442,10 @@ diff -purN linux-2.6.27/kernel/spinlock.c linux-2.6.27.19-5.1/kernel/spinlock.c
        return flags;
  }
  EXPORT_SYMBOL(_write_lock_irqsave);
-diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
---- linux-2.6.27/kernel/sys.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sys.c   2009-03-25 16:11:41.000000000 +0000
-@@ -137,7 +137,7 @@ out:
+diff -r 9608d5473017 kernel/sys.c
+--- a/kernel/sys.c     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sys.c     Wed May 06 16:57:02 2009 +0100
+@@ -137,7 +137,7 @@
        return error;
  }
  
@@ -1134513,7 +1134454,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *g, *p;
        struct user_struct *user;
-@@ -201,7 +201,7 @@ out:
+@@ -201,7 +201,7 @@
   * has been offset by 20 (ie it returns 40..1 instead of -20..19)
   * to stay compatible.
   */
@@ -1134522,7 +1134463,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *g, *p;
        struct user_struct *user;
-@@ -347,7 +347,8 @@ EXPORT_SYMBOL_GPL(kernel_power_off);
+@@ -347,7 +347,8 @@
   *
   * reboot doesn't sync: do that yourself before calling this.
   */
@@ -1134532,7 +1134473,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        char buffer[256];
  
-@@ -470,7 +471,7 @@ void ctrl_alt_del(void)
+@@ -470,7 +471,7 @@
   * SMP: There are not races, the GIDs are checked only by filesystem
   *      operations (as far as semantic preservation is concerned).
   */
@@ -1134541,7 +1134482,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_rgid = current->gid;
        int old_egid = current->egid;
-@@ -519,7 +520,7 @@ asmlinkage long sys_setregid(gid_t rgid,
+@@ -519,7 +520,7 @@
   *
   * SMP: Same implicit races as above.
   */
@@ -1134550,7 +1134491,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_egid = current->egid;
        int retval;
-@@ -589,7 +590,7 @@ static int set_user(uid_t new_ruid, int 
+@@ -589,7 +590,7 @@
   * 100% compatible with BSD.  A program which uses just setuid() will be
   * 100% compatible with POSIX with saved IDs. 
   */
@@ -1134559,7 +1134500,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_ruid, old_euid, old_suid, new_ruid, new_euid;
        int retval;
-@@ -651,7 +652,7 @@ asmlinkage long sys_setreuid(uid_t ruid,
+@@ -651,7 +652,7 @@
   * will allow a root program to temporarily drop privileges and be able to
   * regain them by swapping the real and effective uid.  
   */
@@ -1134568,7 +1134509,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_euid = current->euid;
        int old_ruid, old_suid, new_suid;
-@@ -690,7 +691,7 @@ asmlinkage long sys_setuid(uid_t uid)
+@@ -690,7 +691,7 @@
   * This function implements a generic ability to update ruid, euid,
   * and suid.  This allows you to implement the 4.4 compatible seteuid().
   */
@@ -1134577,7 +1134518,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_ruid = current->uid;
        int old_euid = current->euid;
-@@ -733,7 +734,7 @@ asmlinkage long sys_setresuid(uid_t ruid
+@@ -733,7 +734,7 @@
        return security_task_post_setuid(old_ruid, old_euid, old_suid, LSM_SETID_RES);
  }
  
@@ -1134586,7 +1134527,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int retval;
  
-@@ -747,7 +748,7 @@ asmlinkage long sys_getresuid(uid_t __us
+@@ -747,7 +748,7 @@
  /*
   * Same as above, but for rgid, egid, sgid.
   */
@@ -1134595,7 +1134536,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int retval;
  
-@@ -784,7 +785,7 @@ asmlinkage long sys_setresgid(gid_t rgid
+@@ -784,7 +785,7 @@
        return 0;
  }
  
@@ -1134604,7 +1134545,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int retval;
  
-@@ -802,7 +803,7 @@ asmlinkage long sys_getresgid(gid_t __us
+@@ -802,7 +803,7 @@
   * whatever uid it wants to). It normally shadows "euid", except when
   * explicitly set by setfsuid() or for access..
   */
@@ -1134613,7 +1134554,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_fsuid;
  
-@@ -831,7 +832,7 @@ asmlinkage long sys_setfsuid(uid_t uid)
+@@ -831,7 +832,7 @@
  /*
   * Samma pÃ¥ svenska..
   */
@@ -1134622,7 +1134563,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int old_fsgid;
  
-@@ -853,7 +854,7 @@ asmlinkage long sys_setfsgid(gid_t gid)
+@@ -853,7 +854,7 @@
        return old_fsgid;
  }
  
@@ -1134631,7 +1134572,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        /*
         *      In the SMP world we might just be unlucky and have one of
-@@ -903,7 +904,7 @@ asmlinkage long sys_times(struct tms __u
+@@ -903,7 +904,7 @@
   * Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
   * LBT 04.03.94
   */
@@ -1134640,7 +1134581,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *p;
        struct task_struct *group_leader = current->group_leader;
-@@ -974,7 +975,7 @@ out:
+@@ -974,7 +975,7 @@
        return err;
  }
  
@@ -1134649,7 +1134590,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *p;
        struct pid *grp;
-@@ -1004,14 +1005,14 @@ out:
+@@ -1004,14 +1005,14 @@
  
  #ifdef __ARCH_WANT_SYS_GETPGRP
  
@@ -1134666,7 +1134607,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *p;
        struct pid *sid;
-@@ -1039,7 +1040,7 @@ out:
+@@ -1039,7 +1040,7 @@
        return retval;
  }
  
@@ -1134675,7 +1134616,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct task_struct *group_leader = current->group_leader;
        struct pid *sid = task_pid(group_leader);
-@@ -1245,7 +1246,7 @@ int set_current_groups(struct group_info
+@@ -1245,7 +1246,7 @@
  
  EXPORT_SYMBOL(set_current_groups);
  
@@ -1134684,7 +1134625,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int i = 0;
  
-@@ -1278,7 +1279,7 @@ out:
+@@ -1278,7 +1279,7 @@
   *    without another task interfering.
   */
   
@@ -1134693,7 +1134634,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct group_info *group_info;
        int retval;
-@@ -1328,7 +1329,7 @@ EXPORT_SYMBOL(in_egroup_p);
+@@ -1328,7 +1329,7 @@
  
  DECLARE_RWSEM(uts_sem);
  
@@ -1134702,7 +1134643,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int errno = 0;
  
-@@ -1339,7 +1340,7 @@ asmlinkage long sys_newuname(struct new_
+@@ -1339,7 +1340,7 @@
        return errno;
  }
  
@@ -1134711,7 +1134652,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int errno;
        char tmp[__NEW_UTS_LEN];
-@@ -1361,7 +1362,7 @@ asmlinkage long sys_sethostname(char __u
+@@ -1361,7 +1362,7 @@
  
  #ifdef __ARCH_WANT_SYS_GETHOSTNAME
  
@@ -1134720,7 +1134661,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int i, errno;
  
-@@ -1384,7 +1385,7 @@ asmlinkage long sys_gethostname(char __u
+@@ -1384,7 +1385,7 @@
   * Only setdomainname; getdomainname can be implemented by calling
   * uname()
   */
@@ -1134729,7 +1134670,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int errno;
        char tmp[__NEW_UTS_LEN];
-@@ -1405,7 +1406,7 @@ asmlinkage long sys_setdomainname(char _
+@@ -1405,7 +1406,7 @@
        return errno;
  }
  
@@ -1134738,7 +1134679,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        if (resource >= RLIM_NLIMITS)
                return -EINVAL;
-@@ -1424,7 +1425,8 @@ asmlinkage long sys_getrlimit(unsigned i
+@@ -1424,7 +1425,8 @@
   *    Back compatibility for getrlimit. Needed for some apps.
   */
   
@@ -1134748,7 +1134689,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct rlimit x;
        if (resource >= RLIM_NLIMITS)
-@@ -1442,7 +1444,7 @@ asmlinkage long sys_old_getrlimit(unsign
+@@ -1442,7 +1444,7 @@
  
  #endif
  
@@ -1134757,7 +1134698,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        struct rlimit new_rlim, *old_rlim;
        unsigned long it_prof_secs;
-@@ -1618,7 +1620,7 @@ int getrusage(struct task_struct *p, int
+@@ -1618,7 +1620,7 @@
        return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0;
  }
  
@@ -1134766,7 +1134707,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN &&
            who != RUSAGE_THREAD)
-@@ -1626,14 +1628,14 @@ asmlinkage long sys_getrusage(int who, s
+@@ -1626,14 +1628,14 @@
        return getrusage(current, who, ru);
  }
  
@@ -1134784,7 +1134725,7 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        long error = 0;
  
-@@ -1734,8 +1736,8 @@ asmlinkage long sys_prctl(int option, un
+@@ -1734,8 +1736,8 @@
        return error;
  }
  
@@ -1134795,10 +1134736,10 @@ diff -purN linux-2.6.27/kernel/sys.c linux-2.6.27.19-5.1/kernel/sys.c
  {
        int err = 0;
        int cpu = raw_smp_processor_id();
-diff -purN linux-2.6.27/kernel/sys_ni.c linux-2.6.27.19-5.1/kernel/sys_ni.c
---- linux-2.6.27/kernel/sys_ni.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sys_ni.c        2009-03-25 16:11:40.000000000 +0000
-@@ -125,6 +125,7 @@ cond_syscall(sys_vm86old);
+diff -r 9608d5473017 kernel/sys_ni.c
+--- a/kernel/sys_ni.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sys_ni.c  Wed May 06 16:57:02 2009 +0100
+@@ -125,6 +125,7 @@
  cond_syscall(sys_vm86);
  cond_syscall(compat_sys_ipc);
  cond_syscall(compat_sys_sysctl);
@@ -1134806,10 +1134747,10 @@ diff -purN linux-2.6.27/kernel/sys_ni.c linux-2.6.27.19-5.1/kernel/sys_ni.c
  
  /* arch-specific weak syscall entries */
  cond_syscall(sys_pciconfig_read);
-diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
---- linux-2.6.27/kernel/sysctl.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sysctl.c        2009-03-25 16:11:40.000000000 +0000
-@@ -179,6 +179,9 @@ extern struct ctl_table random_table[];
+diff -r 9608d5473017 kernel/sysctl.c
+--- a/kernel/sysctl.c  Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sysctl.c  Wed May 06 16:57:02 2009 +0100
+@@ -179,6 +179,9 @@
  #ifdef CONFIG_INOTIFY_USER
  extern struct ctl_table inotify_table[];
  #endif
@@ -1134819,16 +1134760,16 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  
  #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
  int sysctl_legacy_va_layout;
-@@ -234,6 +237,8 @@ static int min_wakeup_granularity_ns;                      
+@@ -233,6 +236,8 @@
+ static int min_wakeup_granularity_ns;                 /* 0 usecs */
  static int max_wakeup_granularity_ns = NSEC_PER_SEC;  /* 1 second */
  #endif
-+extern int affinity_load_balancing;
 +
++extern int affinity_load_balancing;
  static struct ctl_table kern_table[] = {
  #ifdef CONFIG_SCHED_DEBUG
-       {
-@@ -547,6 +552,16 @@ static struct ctl_table kern_table[] = {
+@@ -547,6 +552,16 @@
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
@@ -1134845,7 +1134786,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
        {
                .ctl_name       = KERN_RANDOM,
                .procname       = "random",
-@@ -658,6 +673,7 @@ static struct ctl_table kern_table[] = {
+@@ -658,6 +673,7 @@
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
@@ -1134853,7 +1134794,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
        {
                .procname       = "nmi_watchdog",
                .data           = &nmi_watchdog_enabled,
-@@ -666,6 +682,7 @@ static struct ctl_table kern_table[] = {
+@@ -666,11 +682,20 @@
                .proc_handler   = &proc_nmi_enabled,
        },
  #endif
@@ -1134861,22 +1134802,20 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  #if defined(CONFIG_X86)
        {
                .ctl_name       = KERN_PANIC_ON_NMI,
-@@ -676,6 +693,14 @@ static struct ctl_table kern_table[] = {
-               .proc_handler   = &proc_dointvec,
-       },
-       {
-+              .ctl_name       = KERN_PANIC_ON_IO_NMI,
-+              .procname       = "panic_on_io_nmi",
-+              .data           = &panic_on_io_nmi,
+               .procname       = "panic_on_unrecovered_nmi",
+               .data           = &panic_on_unrecovered_nmi,
 +              .maxlen         = sizeof(int),
 +              .mode           = 0644,
 +              .proc_handler   = &proc_dointvec,
 +      },
 +      {
-               .ctl_name       = KERN_BOOTLOADER_TYPE,
-               .procname       = "bootloader_type",
-               .data           = &bootloader_type,
-@@ -710,6 +735,14 @@ static struct ctl_table kern_table[] = {
++              .ctl_name       = KERN_PANIC_ON_IO_NMI,
++              .procname       = "panic_on_io_nmi",
++              .data           = &panic_on_io_nmi,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec,
+@@ -710,6 +735,14 @@
                .proc_handler   = &proc_dointvec,
        },
  #endif
@@ -1134891,7 +1134830,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  #if defined(CONFIG_S390) && defined(CONFIG_SMP)
        {
                .ctl_name       = KERN_SPIN_RETRY,
-@@ -720,7 +753,7 @@ static struct ctl_table kern_table[] = {
+@@ -720,7 +753,7 @@
                .proc_handler   = &proc_dointvec,
        },
  #endif
@@ -1134900,7 +1134839,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
        {
                .procname       = "acpi_video_flags",
                .data           = &acpi_realmode_flags,
-@@ -851,6 +884,16 @@ static struct ctl_table kern_table[] = {
+@@ -851,6 +884,16 @@
   * NOTE: do not add new entries to this table unless you have read
   * Documentation/sysctl/ctl_unnumbered.txt
   */
@@ -1134917,7 +1134856,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
        { .ctl_name = 0 }
  };
  
-@@ -1176,6 +1219,14 @@ static struct ctl_table vm_table[] = {
+@@ -1176,6 +1219,14 @@
                .extra2         = &one,
        },
  #endif
@@ -1134932,7 +1134871,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  /*
   * NOTE: do not add new entries to this table unless you have read
   * Documentation/sysctl/ctl_unnumbered.txt
-@@ -1313,6 +1364,13 @@ static struct ctl_table fs_table[] = {
+@@ -1313,6 +1364,13 @@
                .child          = inotify_table,
        },
  #endif        
@@ -1134946,7 +1134885,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  #endif
        {
                .ctl_name       = KERN_SETUID_DUMPABLE,
-@@ -1506,6 +1564,33 @@ void register_sysctl_root(struct ctl_tab
+@@ -1506,6 +1564,33 @@
        spin_unlock(&sysctl_lock);
  }
  
@@ -1134980,7 +1134919,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  #ifdef CONFIG_SYSCTL_SYSCALL
  /* Perform the actual read/write of a sysctl table entry. */
  static int do_sysctl_strategy(struct ctl_table_root *root,
-@@ -1604,7 +1689,7 @@ int do_sysctl(int __user *name, int nlen
+@@ -1604,7 +1689,7 @@
        return error;
  }
  
@@ -1134989,7 +1134928,7 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  {
        struct __sysctl_args tmp;
        int error;
-@@ -2915,7 +3000,7 @@ int sysctl_ms_jiffies(struct ctl_table *
+@@ -2915,7 +3000,7 @@
  #else /* CONFIG_SYSCTL_SYSCALL */
  
  
@@ -1134998,9 +1134937,9 @@ diff -purN linux-2.6.27/kernel/sysctl.c linux-2.6.27.19-5.1/kernel/sysctl.c
  {
        struct __sysctl_args tmp;
        int error;
-diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_check.c
---- linux-2.6.27/kernel/sysctl_check.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/sysctl_check.c  2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/sysctl_check.c
+--- a/kernel/sysctl_check.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/sysctl_check.c    Wed May 06 16:57:02 2009 +0100
 @@ -4,6 +4,7 @@
  #include <linux/sunrpc/debug.h>
  #include <linux/string.h>
@@ -1135009,7 +1134948,7 @@ diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_
  
  struct trans_ctl_table {
        int                     ctl_name;
-@@ -104,6 +105,10 @@ static const struct trans_ctl_table tran
+@@ -104,6 +105,10 @@
        { KERN_MAX_LOCK_DEPTH,          "max_lock_depth" },
        { KERN_NMI_WATCHDOG,            "nmi_watchdog" },
        { KERN_PANIC_ON_NMI,            "panic_on_unrecovered_nmi" },
@@ -1135020,7 +1134959,7 @@ diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_
        {}
  };
  
-@@ -893,6 +898,14 @@ static const struct trans_ctl_table tran
+@@ -893,6 +898,14 @@
        {}
  };
  
@@ -1135035,7 +1134974,7 @@ diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_
  static const struct trans_ctl_table trans_arlan_conf_table0[] = {
        { 1,    "spreadingCode" },
        { 2,    "channelNumber" },
-@@ -1228,6 +1241,9 @@ static const struct trans_ctl_table tran
+@@ -1228,6 +1241,9 @@
        { CTL_BUS,      "bus",          trans_bus_table },
        { CTL_ABI,      "abi" },
        /* CTL_CPU not used */
@@ -1135045,10 +1134984,10 @@ diff -purN linux-2.6.27/kernel/sysctl_check.c linux-2.6.27.19-5.1/kernel/sysctl_
        { CTL_ARLAN,    "arlan",        trans_arlan_table },
        { CTL_S390DBF,  "s390dbf",      trans_s390dbf_table },
        { CTL_SUNRPC,   "sunrpc",       trans_sunrpc_table },
-diff -purN linux-2.6.27/kernel/taskstats.c linux-2.6.27.19-5.1/kernel/taskstats.c
---- linux-2.6.27/kernel/taskstats.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/taskstats.c     2009-03-25 16:11:42.000000000 +0000
-@@ -433,6 +433,12 @@ static int taskstats_user_cmd(struct sk_
+diff -r 9608d5473017 kernel/taskstats.c
+--- a/kernel/taskstats.c       Wed May 06 15:47:13 2009 +0100
++++ b/kernel/taskstats.c       Wed May 06 16:57:02 2009 +0100
+@@ -433,6 +433,12 @@
        struct taskstats *stats;
        size_t size;
        cpumask_t mask;
@@ -1135061,7 +1135000,7 @@ diff -purN linux-2.6.27/kernel/taskstats.c linux-2.6.27.19-5.1/kernel/taskstats.
  
        rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask);
        if (rc < 0)
-@@ -463,7 +469,7 @@ static int taskstats_user_cmd(struct sk_
+@@ -463,7 +469,7 @@
                if (!stats)
                        goto err;
  
@@ -1135070,7 +1135009,7 @@ diff -purN linux-2.6.27/kernel/taskstats.c linux-2.6.27.19-5.1/kernel/taskstats.
                if (rc < 0)
                        goto err;
        } else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) {
-@@ -472,12 +478,15 @@ static int taskstats_user_cmd(struct sk_
+@@ -472,12 +478,15 @@
                if (!stats)
                        goto err;
  
@@ -1135087,10 +1135026,62 @@ diff -purN linux-2.6.27/kernel/taskstats.c linux-2.6.27.19-5.1/kernel/taskstats.
        return send_reply(rep_skb, info->snd_pid);
  err:
        nlmsg_free(rep_skb);
-diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/time/timekeeping.c
---- linux-2.6.27/kernel/time/timekeeping.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/time/timekeeping.c      2009-03-25 16:11:40.000000000 +0000
-@@ -46,6 +46,9 @@ struct timespec xtime __attribute__ ((al
+diff -r 9608d5473017 kernel/time.c
+--- a/kernel/time.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/time.c    Wed May 06 16:57:02 2009 +0100
+@@ -59,7 +59,7 @@
+  * why not move it into the appropriate arch directory (for those
+  * architectures that need it).
+  */
+-asmlinkage long sys_time(time_t __user * tloc)
++SYSCALL_DEFINE1(time, time_t __user *, tloc)
+ {
+       time_t i = get_seconds();
+@@ -77,7 +77,7 @@
+  * architectures that need it).
+  */
+-asmlinkage long sys_stime(time_t __user *tptr)
++SYSCALL_DEFINE1(stime, time_t __user *, tptr)
+ {
+       struct timespec tv;
+       int err;
+@@ -97,8 +97,8 @@
+ #endif /* __ARCH_WANT_SYS_TIME */
+-asmlinkage long sys_gettimeofday(struct timeval __user *tv,
+-                               struct timezone __user *tz)
++SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
++              struct timezone __user *, tz)
+ {
+       if (likely(tv != NULL)) {
+               struct timeval ktv;
+@@ -182,8 +182,8 @@
+       return 0;
+ }
+-asmlinkage long sys_settimeofday(struct timeval __user *tv,
+-                              struct timezone __user *tz)
++SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
++              struct timezone __user *, tz)
+ {
+       struct timeval user_tv;
+       struct timespec new_ts;
+@@ -203,7 +203,7 @@
+       return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
+ }
+-asmlinkage long sys_adjtimex(struct timex __user *txc_p)
++SYSCALL_DEFINE1(adjtimex, struct timex __user *, txc_p)
+ {
+       struct timex txc;               /* Local copy of parameter */
+       int ret;
+diff -r 9608d5473017 kernel/time/timekeeping.c
+--- a/kernel/time/timekeeping.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/time/timekeeping.c        Wed May 06 16:57:02 2009 +0100
+@@ -46,6 +46,9 @@
  struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
  static unsigned long total_sleep_time;                /* seconds */
  
@@ -1135100,7 +1135091,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  static struct timespec xtime_cache __attribute__ ((aligned (16)));
  void update_xtime_cache(u64 nsec)
  {
-@@ -58,27 +61,23 @@ struct clocksource *clock;
+@@ -58,27 +61,23 @@
  
  #ifdef CONFIG_GENERIC_TIME
  /**
@@ -1135123,11 +1135114,12 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  
 -      /* read clocksource: */
        cycle_now = clocksource_read(clock);
--
--      /* calculate the delta since the last update_wall_time: */
-       cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
++      cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
 +      clock->cycle_last = cycle_now;
  
+-      /* calculate the delta since the last update_wall_time: */
+-      cycle_delta = (cycle_now - clock->cycle_last) & clock->mask;
+-
 -      /* convert to nanoseconds: */
 -      ns_offset = cyc2ns(clock, cycle_delta);
 -
@@ -1135137,16 +1135129,16 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  }
  
  /**
-@@ -89,14 +88,25 @@ static inline s64 __get_nsec_offset(void
+@@ -89,14 +88,25 @@
   */
  void getnstimeofday(struct timespec *ts)
  {
 +      cycle_t cycle_now, cycle_delta;
        unsigned long seq;
        s64 nsecs;
-+      WARN_ON(timekeeping_suspended);
 +
++      WARN_ON(timekeeping_suspended);
        do {
                seq = read_seqbegin(&xtime_lock);
  
@@ -1135164,7 +1135156,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  
        } while (read_seqretry(&xtime_lock, seq));
  
-@@ -129,22 +139,22 @@ EXPORT_SYMBOL(do_gettimeofday);
+@@ -129,22 +139,22 @@
   */
  int do_settimeofday(struct timespec *tv)
  {
@@ -1135186,15 +1135178,15 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
 +      ts_delta.tv_sec = tv->tv_sec - xtime.tv_sec;
 +      ts_delta.tv_nsec = tv->tv_nsec - xtime.tv_nsec;
 +      wall_to_monotonic = timespec_sub(wall_to_monotonic, ts_delta);
-+
-+      xtime = *tv;
  
 -      set_normalized_timespec(&xtime, sec, nsec);
 -      set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
++      xtime = *tv;
++
        update_xtime_cache(0);
  
        clock->error = 0;
-@@ -170,22 +180,17 @@ EXPORT_SYMBOL(do_settimeofday);
+@@ -170,22 +180,17 @@
  static void change_clocksource(void)
  {
        struct clocksource *new;
@@ -1135220,7 +1135212,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
        clock->error = 0;
        clock->xtime_nsec = 0;
        clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH);
-@@ -200,8 +205,8 @@ static void change_clocksource(void)
+@@ -200,8 +205,8 @@
         */
  }
  #else
@@ -1135230,7 +1135222,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  #endif
  
  /**
-@@ -261,12 +266,8 @@ void __init timekeeping_init(void)
+@@ -261,12 +266,8 @@
        write_sequnlock_irqrestore(&xtime_lock, flags);
  }
  
@@ -1135243,7 +1135235,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
  
  /**
   * timekeeping_resume - Resumes the generic timekeeping subsystem.
-@@ -292,8 +293,6 @@ static int timekeeping_resume(struct sys
+@@ -292,8 +293,6 @@
                wall_to_monotonic.tv_sec -= sleep_length;
                total_sleep_time += sleep_length;
        }
@@ -1135252,7 +1135244,7 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
        update_xtime_cache(0);
        /* re-base the last cycle value */
        clock->cycle_last = 0;
-@@ -319,8 +318,7 @@ static int timekeeping_suspend(struct sy
+@@ -319,8 +318,7 @@
        timekeeping_suspend_time = read_persistent_clock();
  
        write_seqlock_irqsave(&xtime_lock, flags);
@@ -1135262,74 +1135254,23 @@ diff -purN linux-2.6.27/kernel/time/timekeeping.c linux-2.6.27.19-5.1/kernel/tim
        timekeeping_suspended = 1;
        write_sequnlock_irqrestore(&xtime_lock, flags);
  
-@@ -461,10 +459,10 @@ void update_wall_time(void)
+@@ -461,10 +459,10 @@
         */
        while (offset >= clock->cycle_interval) {
                /* accumulate one interval */
--              clock->xtime_nsec += clock->xtime_interval;
--              clock->cycle_last += clock->cycle_interval;
-               offset -= clock->cycle_interval;
++              offset -= clock->cycle_interval;
 +              clock->cycle_last += clock->cycle_interval;
-+              clock->xtime_nsec += clock->xtime_interval;
++
+               clock->xtime_nsec += clock->xtime_interval;
+-              clock->cycle_last += clock->cycle_interval;
+-              offset -= clock->cycle_interval;
+-
                if (clock->xtime_nsec >= (u64)NSEC_PER_SEC << clock->shift) {
                        clock->xtime_nsec -= (u64)NSEC_PER_SEC << clock->shift;
                        xtime.tv_sec++;
-diff -purN linux-2.6.27/kernel/time.c linux-2.6.27.19-5.1/kernel/time.c
---- linux-2.6.27/kernel/time.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/time.c  2009-03-25 16:11:42.000000000 +0000
-@@ -59,7 +59,7 @@ EXPORT_SYMBOL(sys_tz);
-  * why not move it into the appropriate arch directory (for those
-  * architectures that need it).
-  */
--asmlinkage long sys_time(time_t __user * tloc)
-+SYSCALL_DEFINE1(time, time_t __user *, tloc)
- {
-       time_t i = get_seconds();
-@@ -77,7 +77,7 @@ asmlinkage long sys_time(time_t __user *
-  * architectures that need it).
-  */
--asmlinkage long sys_stime(time_t __user *tptr)
-+SYSCALL_DEFINE1(stime, time_t __user *, tptr)
- {
-       struct timespec tv;
-       int err;
-@@ -97,8 +97,8 @@ asmlinkage long sys_stime(time_t __user 
- #endif /* __ARCH_WANT_SYS_TIME */
--asmlinkage long sys_gettimeofday(struct timeval __user *tv,
--                               struct timezone __user *tz)
-+SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
-+              struct timezone __user *, tz)
- {
-       if (likely(tv != NULL)) {
-               struct timeval ktv;
-@@ -182,8 +182,8 @@ int do_sys_settimeofday(struct timespec 
-       return 0;
- }
--asmlinkage long sys_settimeofday(struct timeval __user *tv,
--                              struct timezone __user *tz)
-+SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv,
-+              struct timezone __user *, tz)
- {
-       struct timeval user_tv;
-       struct timespec new_ts;
-@@ -203,7 +203,7 @@ asmlinkage long sys_settimeofday(struct 
-       return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
- }
--asmlinkage long sys_adjtimex(struct timex __user *txc_p)
-+SYSCALL_DEFINE1(adjtimex, struct timex __user *, txc_p)
- {
-       struct timex txc;               /* Local copy of parameter */
-       int ret;
-diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
---- linux-2.6.27/kernel/timer.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/timer.c 2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/timer.c
+--- a/kernel/timer.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/timer.c   Wed May 06 16:57:02 2009 +0100
 @@ -37,12 +37,14 @@
  #include <linux/delay.h>
  #include <linux/tick.h>
@@ -1135345,80 +1135286,92 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  
  u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
  
-@@ -112,27 +114,8 @@ timer_set_base(struct timer_list *timer,
+@@ -112,6 +114,44 @@
                                      tbase_get_deferrable(timer->base));
  }
  
--/**
-- * __round_jiffies - function to round jiffies to a full second
-- * @j: the time in (absolute) jiffies that should be rounded
-- * @cpu: the processor number on which the timeout will happen
-- *
-- * __round_jiffies() rounds an absolute time in the future (in jiffies)
-- * up or down to (approximately) full seconds. This is useful for timers
-- * for which the exact time they fire does not matter too much, as long as
-- * they fire approximately every X seconds.
-- *
-- * By rounding these timers to whole seconds, all such timers will fire
-- * at the same time, rather than at various times spread out. The goal
-- * of this is to have the CPU wake up less, which saves power.
-- *
-- * The exact rounding is skewed for each processor to avoid all
-- * processors firing at the exact same time, which could lead
-- * to lock contention or spurious cache line bouncing.
-- *
-- * The return value is the rounded version of the @j parameter.
-- */
--unsigned long __round_jiffies(unsigned long j, int cpu)
 +static unsigned long round_jiffies_common(unsigned long j, int cpu,
 +              bool force_up)
- {
-       int rem;
-       unsigned long original = j;
-@@ -154,8 +137,9 @@ unsigned long __round_jiffies(unsigned l
-        * due to delays of the timer irq, long irq off times etc etc) then
-        * we should round down to the whole second, not up. Use 1/4th second
-        * as cutoff for this rounding as an extreme upper bound for this.
++{
++      int rem;
++      unsigned long original = j;
++
++      /*
++       * We don't want all cpus firing their timers at once hitting the
++       * same lock or cachelines, so we skew each extra cpu with an extra
++       * 3 jiffies. This 3 jiffies came originally from the mm/ code which
++       * already did this.
++       * The skew is done by adding 3*cpunr, then round, then subtract this
++       * extra offset again.
++       */
++      j += cpu * 3;
++
++      rem = j % HZ;
++
++      /*
++       * If the target jiffie is just after a whole second (which can happen
++       * due to delays of the timer irq, long irq off times etc etc) then
++       * we should round down to the whole second, not up. Use 1/4th second
++       * as cutoff for this rounding as an extreme upper bound for this.
 +       * But never round down if @force_up is set.
-        */
--      if (rem < HZ/4) /* round down */
++       */
 +      if (rem < HZ/4 && !force_up) /* round down */
-               j = j - rem;
-       else /* round up */
-               j = j - rem + HZ;
-@@ -167,6 +151,31 @@ unsigned long __round_jiffies(unsigned l
-               return original;
-       return j;
- }
++              j = j - rem;
++      else /* round up */
++              j = j - rem + HZ;
 +
-+/**
-+ * __round_jiffies - function to round jiffies to a full second
-+ * @j: the time in (absolute) jiffies that should be rounded
-+ * @cpu: the processor number on which the timeout will happen
-+ *
-+ * __round_jiffies() rounds an absolute time in the future (in jiffies)
-+ * up or down to (approximately) full seconds. This is useful for timers
-+ * for which the exact time they fire does not matter too much, as long as
-+ * they fire approximately every X seconds.
-+ *
-+ * By rounding these timers to whole seconds, all such timers will fire
-+ * at the same time, rather than at various times spread out. The goal
-+ * of this is to have the CPU wake up less, which saves power.
-+ *
-+ * The exact rounding is skewed for each processor to avoid all
-+ * processors firing at the exact same time, which could lead
-+ * to lock contention or spurious cache line bouncing.
-+ *
-+ * The return value is the rounded version of the @j parameter.
-+ */
-+unsigned long __round_jiffies(unsigned long j, int cpu)
-+{
-+      return round_jiffies_common(j, cpu, false);
++      /* now that we have rounded, subtract the extra skew again */
++      j -= cpu * 3;
++
++      if (j <= jiffies) /* rounding ate our timeout entirely; */
++              return original;
++      return j;
 +}
++
+ /**
+  * __round_jiffies - function to round jiffies to a full second
+  * @j: the time in (absolute) jiffies that should be rounded
+@@ -134,38 +174,7 @@
+  */
+ unsigned long __round_jiffies(unsigned long j, int cpu)
+ {
+-      int rem;
+-      unsigned long original = j;
+-
+-      /*
+-       * We don't want all cpus firing their timers at once hitting the
+-       * same lock or cachelines, so we skew each extra cpu with an extra
+-       * 3 jiffies. This 3 jiffies came originally from the mm/ code which
+-       * already did this.
+-       * The skew is done by adding 3*cpunr, then round, then subtract this
+-       * extra offset again.
+-       */
+-      j += cpu * 3;
+-
+-      rem = j % HZ;
+-
+-      /*
+-       * If the target jiffie is just after a whole second (which can happen
+-       * due to delays of the timer irq, long irq off times etc etc) then
+-       * we should round down to the whole second, not up. Use 1/4th second
+-       * as cutoff for this rounding as an extreme upper bound for this.
+-       */
+-      if (rem < HZ/4) /* round down */
+-              j = j - rem;
+-      else /* round up */
+-              j = j - rem + HZ;
+-
+-      /* now that we have rounded, subtract the extra skew again */
+-      j -= cpu * 3;
+-
+-      if (j <= jiffies) /* rounding ate our timeout entirely; */
+-              return original;
+-      return j;
++      return round_jiffies_common(j, cpu, false);
+ }
  EXPORT_SYMBOL_GPL(__round_jiffies);
  
- /**
-@@ -191,13 +200,10 @@ EXPORT_SYMBOL_GPL(__round_jiffies);
+@@ -191,13 +200,10 @@
   */
  unsigned long __round_jiffies_relative(unsigned long j, int cpu)
  {
@@ -1135436,7 +1135389,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  }
  EXPORT_SYMBOL_GPL(__round_jiffies_relative);
  
-@@ -218,7 +224,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relati
+@@ -218,7 +224,7 @@
   */
  unsigned long round_jiffies(unsigned long j)
  {
@@ -1135445,10 +1135398,11 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  }
  EXPORT_SYMBOL_GPL(round_jiffies);
  
-@@ -243,6 +249,71 @@ unsigned long round_jiffies_relative(uns
+@@ -242,6 +248,71 @@
+       return __round_jiffies_relative(j, raw_smp_processor_id());
  }
  EXPORT_SYMBOL_GPL(round_jiffies_relative);
++
 +/**
 + * __round_jiffies_up - function to round jiffies up to a full second
 + * @j: the time in (absolute) jiffies that should be rounded
@@ -1135513,11 +1135467,10 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
 +      return __round_jiffies_up_relative(j, raw_smp_processor_id());
 +}
 +EXPORT_SYMBOL_GPL(round_jiffies_up_relative);
-+
  
  static inline void set_running_timer(struct tvec_base *base,
-                                       struct timer_list *timer)
-@@ -288,6 +359,7 @@ static void internal_add_timer(struct tv
+@@ -288,6 +359,7 @@
                i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
                vec = base->tv5.vec + i;
        }
@@ -1135525,7 +1135478,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
        /*
         * Timers are FIFO:
         */
-@@ -812,7 +884,7 @@ static inline void __run_timers(struct t
+@@ -812,7 +884,7 @@
        spin_unlock_irq(&base->lock);
  }
  
@@ -1135534,7 +1135487,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  /*
   * Find out when the next timer event is due to happen. This
   * is used on S/390 to stop all activity when a cpus is idle.
-@@ -1066,6 +1138,7 @@ void do_timer(unsigned long ticks)
+@@ -1066,6 +1138,7 @@
  {
        jiffies_64 += ticks;
        update_times(ticks);
@@ -1135542,7 +1135495,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  }
  
  #ifdef __ARCH_WANT_SYS_ALARM
-@@ -1074,7 +1147,7 @@ void do_timer(unsigned long ticks)
+@@ -1074,7 +1147,7 @@
   * For backwards compatibility?  This can be done in libc so Alpha
   * and all newer ports shouldn't need it.
   */
@@ -1135551,7 +1135504,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        return alarm_setitimer(seconds);
  }
-@@ -1097,7 +1170,7 @@ asmlinkage unsigned long sys_alarm(unsig
+@@ -1097,7 +1170,7 @@
   *
   * This is SMP safe as current->tgid does not change.
   */
@@ -1135560,7 +1135513,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        return task_tgid_vnr(current);
  }
-@@ -1108,7 +1181,7 @@ asmlinkage long sys_getpid(void)
+@@ -1108,7 +1181,7 @@
   * value of ->real_parent under rcu_read_lock(), see
   * release_task()->call_rcu(delayed_put_task_struct).
   */
@@ -1135569,7 +1135522,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        int pid;
  
-@@ -1119,25 +1192,25 @@ asmlinkage long sys_getppid(void)
+@@ -1119,25 +1192,25 @@
        return pid;
  }
  
@@ -1135599,7 +1135552,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        /* Only we change this so SMP safe */
        return  current->egid;
-@@ -1147,7 +1220,9 @@ asmlinkage long sys_getegid(void)
+@@ -1147,7 +1220,9 @@
  
  static void process_timeout(unsigned long __data)
  {
@@ -1135610,7 +1135563,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  }
  
  /**
-@@ -1253,7 +1328,7 @@ signed long __sched schedule_timeout_uni
+@@ -1253,7 +1328,7 @@
  EXPORT_SYMBOL(schedule_timeout_uninterruptible);
  
  /* Thread ID - the internal kernel "pid" */
@@ -1135619,7 +1135572,7 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        return task_pid_vnr(current);
  }
-@@ -1345,7 +1420,7 @@ out:
+@@ -1345,7 +1420,7 @@
        return 0;
  }
  
@@ -1135628,10 +1135581,10 @@ diff -purN linux-2.6.27/kernel/timer.c linux-2.6.27.19-5.1/kernel/timer.c
  {
        struct sysinfo val;
  
-diff -purN linux-2.6.27/kernel/trace/Kconfig linux-2.6.27.19-5.1/kernel/trace/Kconfig
---- linux-2.6.27/kernel/trace/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/Kconfig   2009-03-25 16:11:40.000000000 +0000
-@@ -18,7 +18,6 @@ config TRACING
+diff -r 9608d5473017 kernel/trace/Kconfig
+--- a/kernel/trace/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/Kconfig     Wed May 06 16:57:02 2009 +0100
+@@ -18,7 +18,6 @@
  config FTRACE
        bool "Kernel Function Tracer"
        depends on HAVE_FTRACE
@@ -1135639,7 +1135592,7 @@ diff -purN linux-2.6.27/kernel/trace/Kconfig linux-2.6.27.19-5.1/kernel/trace/Kc
        select TRACING
        select CONTEXT_SWITCH_TRACER
        help
-@@ -79,6 +78,7 @@ config SYSPROF_TRACER
+@@ -79,6 +78,7 @@
        bool "Sysprof Tracer"
        depends on X86
        select TRACING
@@ -1135647,7 +1135600,7 @@ diff -purN linux-2.6.27/kernel/trace/Kconfig linux-2.6.27.19-5.1/kernel/trace/Kc
        help
          This tracer provides the trace needed by the 'Sysprof' userspace
          tool.
-@@ -103,7 +103,8 @@ config CONTEXT_SWITCH_TRACER
+@@ -103,7 +103,8 @@
          all switching of tasks.
  
  config DYNAMIC_FTRACE
@@ -1135657,9 +1135610,9 @@ diff -purN linux-2.6.27/kernel/trace/Kconfig linux-2.6.27.19-5.1/kernel/trace/Kc
        depends on FTRACE
        depends on HAVE_DYNAMIC_FTRACE
        default y
-diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/kernel/trace/trace_sched_switch.c
---- linux-2.6.27/kernel/trace/trace_sched_switch.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/trace_sched_switch.c      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/trace/trace_sched_switch.c
+--- a/kernel/trace/trace_sched_switch.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/trace_sched_switch.c        Wed May 06 16:57:02 2009 +0100
 @@ -9,8 +9,8 @@
  #include <linux/debugfs.h>
  #include <linux/kallsyms.h>
@@ -1135670,7 +1135623,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
  
  #include "trace.h"
  
-@@ -19,16 +19,17 @@ static int __read_mostly   tracer_enabled;
+@@ -19,15 +19,16 @@
  static atomic_t                       sched_ref;
  
  static void
@@ -1135684,14 +1135637,13 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
        unsigned long flags;
        long disabled;
        int cpu;
++
 +      if (!atomic_read(&sched_ref))
 +              return;
-+
        tracing_record_cmdline(prev);
        tracing_record_cmdline(next);
-@@ -37,95 +38,42 @@ sched_switch_func(void *private, void *_
+@@ -37,93 +38,40 @@
  
        local_irq_save(flags);
        cpu = raw_smp_processor_id();
@@ -1135710,7 +1135662,9 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
 -static notrace void
 -sched_switch_callback(void *probe_data, void *call_data,
 -                    const char *format, va_list *args)
--{
++static void
++probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee)
+ {
 -      struct task_struct *prev;
 -      struct task_struct *next;
 -      struct rq *__rq;
@@ -1135733,11 +1135687,10 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
 -      sched_switch_func(probe_data, __rq, prev, next);
 -}
 -
- static void
+-static void
 -wakeup_func(void *private, void *__rq, struct task_struct *wakee, struct
 -                      task_struct *curr)
-+probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee)
- {
+-{
 -      struct trace_array **ptr = private;
 -      struct trace_array *tr = *ptr;
        struct trace_array_cpu *data;
@@ -1135765,8 +1135718,8 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
  
        atomic_dec(&data->disabled);
        local_irq_restore(flags);
- }
+-}
+-
 -static notrace void
 -wake_up_callback(void *probe_data, void *call_data,
 -               const char *format, va_list *args)
@@ -1135790,12 +1135743,10 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
 -      tracing_record_cmdline(curr);
 -
 -      wakeup_func(probe_data, __rq, task, curr);
--}
--
+ }
  static void sched_switch_reset(struct trace_array *tr)
- {
-       int cpu;
-@@ -140,60 +88,40 @@ static int tracing_sched_register(void)
+@@ -140,60 +88,40 @@
  {
        int ret;
  
@@ -1135867,9 +1135818,9 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_switch.c linux-2.6.27.19-5.1/ke
  }
  
  static void tracing_start_sched_switch(void)
-diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/kernel/trace/trace_sched_wakeup.c
---- linux-2.6.27/kernel/trace/trace_sched_wakeup.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/trace/trace_sched_wakeup.c      2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/trace/trace_sched_wakeup.c
+--- a/kernel/trace/trace_sched_wakeup.c        Wed May 06 15:47:13 2009 +0100
++++ b/kernel/trace/trace_sched_wakeup.c        Wed May 06 16:57:02 2009 +0100
 @@ -15,7 +15,7 @@
  #include <linux/kallsyms.h>
  #include <linux/uaccess.h>
@@ -1135879,7 +1135830,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
  
  #include "trace.h"
  
-@@ -112,18 +112,18 @@ static int report_latency(cycle_t delta)
+@@ -112,17 +112,17 @@
  }
  
  static void notrace
@@ -1135895,13 +1135846,12 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
        unsigned long flags;
        long disabled;
        int cpu;
-+      tracing_record_cmdline(prev);
 +
++      tracing_record_cmdline(prev);
        if (unlikely(!tracer_enabled))
                return;
-@@ -140,11 +140,11 @@ wakeup_sched_switch(void *private, void 
+@@ -140,11 +140,11 @@
                return;
  
        /* The task we are waiting for is waking up */
@@ -1135915,7 +1135865,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
        if (likely(disabled != 1))
                goto out;
  
-@@ -155,7 +155,7 @@ wakeup_sched_switch(void *private, void 
+@@ -155,7 +155,7 @@
        if (unlikely(!tracer_enabled || next != wakeup_task))
                goto out_unlock;
  
@@ -1135924,7 +1135874,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
  
        /*
         * usecs conversion is slow so we try to delay the conversion
-@@ -174,39 +174,14 @@ wakeup_sched_switch(void *private, void 
+@@ -174,39 +174,14 @@
        t0 = nsecs_to_usecs(T0);
        t1 = nsecs_to_usecs(T1);
  
@@ -1135967,7 +1135917,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
  }
  
  static void __wakeup_reset(struct trace_array *tr)
-@@ -240,19 +215,24 @@ static void wakeup_reset(struct trace_ar
+@@ -240,19 +215,24 @@
  }
  
  static void
@@ -1135996,7 +1135946,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
        if (unlikely(disabled != 1))
                goto out;
  
-@@ -264,7 +244,7 @@ wakeup_check_start(struct trace_array *t
+@@ -264,7 +244,7 @@
                goto out_locked;
  
        /* reset the trace */
@@ -1136005,7 +1135955,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
  
        wakeup_cpu = task_cpu(p);
        wakeup_prio = p->prio;
-@@ -274,74 +254,37 @@ wakeup_check_start(struct trace_array *t
+@@ -274,74 +254,37 @@
  
        local_save_flags(flags);
  
@@ -1136089,7 +1136039,7 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
                        " probe to kernel_sched_schedule\n");
                goto fail_deprobe_wake_new;
        }
-@@ -363,28 +306,18 @@ static void start_wakeup_tracer(struct t
+@@ -363,28 +306,18 @@
  
        return;
  fail_deprobe_wake_new:
@@ -1136123,9 +1136073,9 @@ diff -purN linux-2.6.27/kernel/trace/trace_sched_wakeup.c linux-2.6.27.19-5.1/ke
  }
  
  static void wakeup_tracer_init(struct trace_array *tr)
-diff -purN linux-2.6.27/kernel/tracepoint.c linux-2.6.27.19-5.1/kernel/tracepoint.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/tracepoint.c    2009-03-25 16:11:40.000000000 +0000
+diff -r 9608d5473017 kernel/tracepoint.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/tracepoint.c      Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,476 @@
 +/*
 + * Copyright (C) 2008 Mathieu Desnoyers
@@ -1136603,9 +1136553,9 @@ diff -purN linux-2.6.27/kernel/tracepoint.c linux-2.6.27.19-5.1/kernel/tracepoin
 +      iter->tracepoint = NULL;
 +}
 +EXPORT_SYMBOL_GPL(tracepoint_iter_reset);
-diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
---- linux-2.6.27/kernel/uid16.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/uid16.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/uid16.c
+--- a/kernel/uid16.c   Wed May 06 15:47:13 2009 +0100
++++ b/kernel/uid16.c   Wed May 06 16:57:02 2009 +0100
 @@ -17,7 +17,7 @@
  
  #include <asm/uaccess.h>
@@ -1136615,7 +1136565,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_chown(filename, low2highuid(user), low2highgid(group));
        /* avoid REGPARM breakage on x86: */
-@@ -25,7 +25,7 @@ asmlinkage long sys_chown16(const char _
+@@ -25,7 +25,7 @@
        return ret;
  }
  
@@ -1136624,7 +1136574,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_lchown(filename, low2highuid(user), low2highgid(group));
        /* avoid REGPARM breakage on x86: */
-@@ -33,7 +33,7 @@ asmlinkage long sys_lchown16(const char 
+@@ -33,7 +33,7 @@
        return ret;
  }
  
@@ -1136633,7 +1136583,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_fchown(fd, low2highuid(user), low2highgid(group));
        /* avoid REGPARM breakage on x86: */
-@@ -41,7 +41,7 @@ asmlinkage long sys_fchown16(unsigned in
+@@ -41,7 +41,7 @@
        return ret;
  }
  
@@ -1136642,7 +1136592,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setregid(low2highgid(rgid), low2highgid(egid));
        /* avoid REGPARM breakage on x86: */
-@@ -49,7 +49,7 @@ asmlinkage long sys_setregid16(old_gid_t
+@@ -49,7 +49,7 @@
        return ret;
  }
  
@@ -1136651,7 +1136601,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setgid(low2highgid(gid));
        /* avoid REGPARM breakage on x86: */
-@@ -57,7 +57,7 @@ asmlinkage long sys_setgid16(old_gid_t g
+@@ -57,7 +57,7 @@
        return ret;
  }
  
@@ -1136660,7 +1136610,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid));
        /* avoid REGPARM breakage on x86: */
-@@ -65,7 +65,7 @@ asmlinkage long sys_setreuid16(old_uid_t
+@@ -65,7 +65,7 @@
        return ret;
  }
  
@@ -1136669,7 +1136619,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setuid(low2highuid(uid));
        /* avoid REGPARM breakage on x86: */
-@@ -73,7 +73,7 @@ asmlinkage long sys_setuid16(old_uid_t u
+@@ -73,7 +73,7 @@
        return ret;
  }
  
@@ -1136678,7 +1136628,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid),
                                 low2highuid(suid));
-@@ -82,7 +82,7 @@ asmlinkage long sys_setresuid16(old_uid_
+@@ -82,7 +82,7 @@
        return ret;
  }
  
@@ -1136687,7 +1136637,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        int retval;
  
-@@ -93,7 +93,7 @@ asmlinkage long sys_getresuid16(old_uid_
+@@ -93,7 +93,7 @@
        return retval;
  }
  
@@ -1136696,7 +1136646,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid),
                                 low2highgid(sgid));
-@@ -102,7 +102,8 @@ asmlinkage long sys_setresgid16(old_gid_
+@@ -102,7 +102,8 @@
        return ret;
  }
  
@@ -1136706,7 +1136656,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        int retval;
  
-@@ -113,7 +114,7 @@ asmlinkage long sys_getresgid16(old_gid_
+@@ -113,7 +114,7 @@
        return retval;
  }
  
@@ -1136715,7 +1136665,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setfsuid(low2highuid(uid));
        /* avoid REGPARM breakage on x86: */
-@@ -121,7 +122,7 @@ asmlinkage long sys_setfsuid16(old_uid_t
+@@ -121,7 +122,7 @@
        return ret;
  }
  
@@ -1136724,7 +1136674,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        long ret = sys_setfsgid(low2highgid(gid));
        /* avoid REGPARM breakage on x86: */
-@@ -159,7 +160,7 @@ static int groups16_from_user(struct gro
+@@ -159,7 +160,7 @@
        return 0;
  }
  
@@ -1136733,7 +1136683,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        int i = 0;
  
-@@ -183,7 +184,7 @@ out:
+@@ -183,7 +184,7 @@
        return i;
  }
  
@@ -1136742,7 +1136692,7 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        struct group_info *group_info;
        int retval;
-@@ -208,22 +209,22 @@ asmlinkage long sys_setgroups16(int gids
+@@ -208,22 +209,22 @@
        return retval;
  }
  
@@ -1136769,9 +1136719,9 @@ diff -purN linux-2.6.27/kernel/uid16.c linux-2.6.27.19-5.1/kernel/uid16.c
  {
        return high2lowgid(current->egid);
  }
-diff -purN linux-2.6.27/kernel/unwind.c linux-2.6.27.19-5.1/kernel/unwind.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/unwind.c        2009-03-25 16:11:41.000000000 +0000
+diff -r 9608d5473017 kernel/unwind.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/unwind.c  Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,1303 @@
 +/*
 + * Copyright (C) 2002-2006 Novell, Inc.
@@ -1138076,9 +1138026,9 @@ diff -purN linux-2.6.27/kernel/unwind.c linux-2.6.27.19-5.1/kernel/unwind.c
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(unwind_to_user);
-diff -purN linux-2.6.27/kernel/utrace.c linux-2.6.27.19-5.1/kernel/utrace.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/utrace.c        2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 kernel/utrace.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/kernel/utrace.c  Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,2495 @@
 +/*
 + * utrace infrastructure interface for debugging user processes
@@ -1140575,10 +1140525,10 @@ diff -purN linux-2.6.27/kernel/utrace.c linux-2.6.27.19-5.1/kernel/utrace.c
 +                         utrace->report ? " (report)" : "",
 +                         utrace->interrupt ? " (interrupt)" : "");
 +}
-diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
---- linux-2.6.27/kernel/wait.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/kernel/wait.c  2009-03-25 16:11:40.000000000 +0000
-@@ -101,6 +101,15 @@ prepare_to_wait_exclusive(wait_queue_hea
+diff -r 9608d5473017 kernel/wait.c
+--- a/kernel/wait.c    Wed May 06 15:47:13 2009 +0100
++++ b/kernel/wait.c    Wed May 06 16:57:02 2009 +0100
+@@ -101,6 +101,15 @@
  }
  EXPORT_SYMBOL(prepare_to_wait_exclusive);
  
@@ -1140594,7 +1140544,7 @@ diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
  void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
  {
        unsigned long flags;
-@@ -127,6 +136,39 @@ void finish_wait(wait_queue_head_t *q, w
+@@ -127,6 +136,39 @@
  }
  EXPORT_SYMBOL(finish_wait);
  
@@ -1140634,7 +1140584,7 @@ diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
  int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
  {
        int ret = default_wake_function(wait, mode, sync, key);
-@@ -144,8 +186,7 @@ int wake_bit_function(wait_queue_t *wait
+@@ -144,8 +186,7 @@
                = container_of(wait, struct wait_bit_queue, wait);
  
        if (wait_bit->key.flags != key->flags ||
@@ -1140644,15 +1140594,15 @@ diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
                return 0;
        else
                return autoremove_wake_function(wait, mode, sync, key);
-@@ -187,17 +228,20 @@ int __sched
+@@ -187,17 +228,20 @@
  __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
                        int (*action)(void *), unsigned mode)
  {
 -      int ret = 0;
--
-       do {
++      do {
 +              int ret;
-+
+-      do {
                prepare_to_wait_exclusive(wq, &q->wait, mode);
 -              if (test_bit(q->key.bit_nr, q->key.flags)) {
 -                      if ((ret = (*action)(q->key.flags)))
@@ -1140672,10 +1140622,10 @@ diff -purN linux-2.6.27/kernel/wait.c linux-2.6.27.19-5.1/kernel/wait.c
  }
  EXPORT_SYMBOL(__wait_on_bit_lock);
  
-diff -purN linux-2.6.27/lib/Kconfig.debug linux-2.6.27.19-5.1/lib/Kconfig.debug
---- linux-2.6.27/lib/Kconfig.debug     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/Kconfig.debug      2009-03-25 16:11:43.000000000 +0000
-@@ -548,6 +548,24 @@ config FRAME_POINTER
+diff -r 9608d5473017 lib/Kconfig.debug
+--- a/lib/Kconfig.debug        Wed May 06 15:47:13 2009 +0100
++++ b/lib/Kconfig.debug        Wed May 06 16:57:02 2009 +0100
+@@ -548,6 +548,24 @@
          some architectures or if you use external debuggers.
          If you don't debug the kernel, you can say N.
  
@@ -1140700,7 +1140650,7 @@ diff -purN linux-2.6.27/lib/Kconfig.debug linux-2.6.27.19-5.1/lib/Kconfig.debug
  config BOOT_PRINTK_DELAY
        bool "Delay each boot printk message by N milliseconds"
        depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
-@@ -676,13 +694,15 @@ config FAULT_INJECTION_STACKTRACE_FILTER
+@@ -676,13 +694,15 @@
        depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
        depends on !X86_64
        select STACKTRACE
@@ -1140718,7 +1140668,7 @@ diff -purN linux-2.6.27/lib/Kconfig.debug linux-2.6.27.19-5.1/lib/Kconfig.debug
        select KALLSYMS
        select KALLSYMS_ALL
        select STACKTRACE
-@@ -752,6 +772,61 @@ menuconfig BUILD_DOCSRC
+@@ -752,6 +772,61 @@
  
          Say N if you are unsure.
  
@@ -1140780,10 +1140730,10 @@ diff -purN linux-2.6.27/lib/Kconfig.debug linux-2.6.27.19-5.1/lib/Kconfig.debug
  source "samples/Kconfig"
  
  source "lib/Kconfig.kgdb"
-diff -purN linux-2.6.27/lib/Makefile linux-2.6.27.19-5.1/lib/Makefile
---- linux-2.6.27/lib/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/Makefile   2009-03-25 16:11:43.000000000 +0000
-@@ -19,7 +19,8 @@ lib-$(CONFIG_SMP) += cpumask.o
+diff -r 9608d5473017 lib/Makefile
+--- a/lib/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/lib/Makefile     Wed May 06 16:57:02 2009 +0100
+@@ -19,7 +19,8 @@
  lib-y += kobject.o kref.o klist.o
  
  obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
@@ -1140793,7 +1140743,7 @@ diff -purN linux-2.6.27/lib/Makefile linux-2.6.27.19-5.1/lib/Makefile
  
  ifeq ($(CONFIG_DEBUG_KOBJECT),y)
  CFLAGS_kobject.o += -DDEBUG
-@@ -80,6 +81,8 @@ obj-$(CONFIG_HAVE_LMB) += lmb.o
+@@ -80,6 +81,8 @@
  
  obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o
  
@@ -1140802,21 +1140752,21 @@ diff -purN linux-2.6.27/lib/Makefile linux-2.6.27.19-5.1/lib/Makefile
  hostprogs-y   := gen_crc32table
  clean-files   := crc32table.h
  
-diff -purN linux-2.6.27/lib/bug.c linux-2.6.27.19-5.1/lib/bug.c
---- linux-2.6.27/lib/bug.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/bug.c      2009-03-25 16:11:43.000000000 +0000
-@@ -41,6 +41,10 @@
+diff -r 9608d5473017 lib/bug.c
+--- a/lib/bug.c        Wed May 06 15:47:13 2009 +0100
++++ b/lib/bug.c        Wed May 06 16:57:02 2009 +0100
+@@ -40,6 +40,10 @@
+ #include <linux/kernel.h>
  #include <linux/bug.h>
  #include <linux/sched.h>
++
 +#ifdef CONFIG_KDB
 +#include <linux/kdb.h>
 +#endif
-+
  extern const struct bug_entry __start___bug_table[], __stop___bug_table[];
  
- #ifdef CONFIG_MODULES
-@@ -162,5 +166,9 @@ enum bug_trap_type report_bug(unsigned l
+@@ -162,5 +166,9 @@
                       "[verbose debug info unavailable]\n",
                       (void *)bugaddr);
  
@@ -1140826,13 +1140776,14 @@ diff -purN linux-2.6.27/lib/bug.c linux-2.6.27.19-5.1/lib/bug.c
 +
        return BUG_TRAP_TYPE_BUG;
  }
-diff -purN linux-2.6.27/lib/cpumask.c linux-2.6.27.19-5.1/lib/cpumask.c
---- linux-2.6.27/lib/cpumask.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/cpumask.c  2009-03-25 16:11:42.000000000 +0000
-@@ -15,6 +15,15 @@ int __next_cpu(int n, const cpumask_t *s
+diff -r 9608d5473017 lib/cpumask.c
+--- a/lib/cpumask.c    Wed May 06 15:47:13 2009 +0100
++++ b/lib/cpumask.c    Wed May 06 16:57:02 2009 +0100
+@@ -14,6 +14,15 @@
+       return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
  }
  EXPORT_SYMBOL(__next_cpu);
++
 +int cpumask_next_and(int n, const cpumask_t *srcp, const cpumask_t *andp)
 +{
 +      while ((n = next_cpu_nr(n, *srcp)) < nr_cpu_ids)
@@ -1140841,13 +1140792,12 @@ diff -purN linux-2.6.27/lib/cpumask.c linux-2.6.27.19-5.1/lib/cpumask.c
 +      return n;
 +}
 +EXPORT_SYMBOL(cpumask_next_and);
-+
  #if NR_CPUS > 64
  int __next_cpu_nr(int n, const cpumask_t *srcp)
- {
-diff -purN linux-2.6.27/lib/dynamic_printk.c linux-2.6.27.19-5.1/lib/dynamic_printk.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/dynamic_printk.c   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/dynamic_printk.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/dynamic_printk.c     Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,420 @@
 +/*
 + * lib/dynamic_printk.c
@@ -1141269,10 +1141219,10 @@ diff -purN linux-2.6.27/lib/dynamic_printk.c linux-2.6.27.19-5.1/lib/dynamic_pri
 +}
 +/* Use early_param(), so we can get debug output as early as possible */
 +early_param("dynamic_printk", dynamic_printk_setup);
-diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
---- linux-2.6.27/lib/idr.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/idr.c      2009-03-25 16:11:43.000000000 +0000
-@@ -121,7 +121,7 @@ int idr_pre_get(struct idr *idp, gfp_t g
+diff -r 9608d5473017 lib/idr.c
+--- a/lib/idr.c        Wed May 06 15:47:13 2009 +0100
++++ b/lib/idr.c        Wed May 06 16:57:02 2009 +0100
+@@ -121,7 +121,7 @@
  {
        while (idp->id_free_cnt < IDR_FREE_MAX) {
                struct idr_layer *new;
@@ -1141281,7 +1141231,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                if (new == NULL)
                        return (0);
                move_to_free_list(idp, new);
-@@ -185,6 +185,7 @@ static int sub_alloc(struct idr *idp, in
+@@ -185,6 +185,7 @@
                        new = get_from_free_list(idp);
                        if (!new)
                                return -1;
@@ -1141289,7 +1141239,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                        rcu_assign_pointer(p->ary[m], new);
                        p->count++;
                }
-@@ -210,6 +211,7 @@ build_up:
+@@ -210,6 +211,7 @@
        if (unlikely(!p)) {
                if (!(p = get_from_free_list(idp)))
                        return -1;
@@ -1141297,7 +1141247,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                layers = 1;
        }
        /*
-@@ -218,8 +220,14 @@ build_up:
+@@ -218,8 +220,14 @@
         */
        while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
                layers++;
@@ -1141313,7 +1141263,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                if (!(new = get_from_free_list(idp))) {
                        /*
                         * The allocation failed.  If we built part of
-@@ -237,6 +245,7 @@ build_up:
+@@ -237,6 +245,7 @@
                }
                new->ary[0] = p;
                new->count = 1;
@@ -1141321,7 +1141271,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                if (p->bitmap == IDR_FULL)
                        __set_bit(0, &new->bitmap);
                p = new;
-@@ -493,17 +502,21 @@ void *idr_find(struct idr *idp, int id)
+@@ -493,17 +502,21 @@
        int n;
        struct idr_layer *p;
  
@@ -1141344,7 +1141294,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
                p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
        }
        return((void *)p);
-@@ -582,8 +595,11 @@ void *idr_replace(struct idr *idp, void 
+@@ -582,8 +595,11 @@
        int n;
        struct idr_layer *p, *old_p;
  
@@ -1141357,7 +1141307,7 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
  
        id &= MAX_ID_MASK;
  
-@@ -607,16 +623,10 @@ void *idr_replace(struct idr *idp, void 
+@@ -607,16 +623,10 @@
  }
  EXPORT_SYMBOL(idr_replace);
  
@@ -1141375,10 +1141325,10 @@ diff -purN linux-2.6.27/lib/idr.c linux-2.6.27.19-5.1/lib/idr.c
  }
  
  /**
-diff -purN linux-2.6.27/lib/parser.c linux-2.6.27.19-5.1/lib/parser.c
---- linux-2.6.27/lib/parser.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/parser.c   2009-03-25 16:11:42.000000000 +0000
-@@ -111,6 +111,19 @@ int match_token(char *s, match_table_t t
+diff -r 9608d5473017 lib/parser.c
+--- a/lib/parser.c     Wed May 06 15:47:13 2009 +0100
++++ b/lib/parser.c     Wed May 06 16:57:02 2009 +0100
+@@ -111,6 +111,19 @@
  }
  
  /**
@@ -1141398,7 +1141348,7 @@ diff -purN linux-2.6.27/lib/parser.c linux-2.6.27.19-5.1/lib/parser.c
   * match_number: scan a number in the given base from a substring_t
   * @s: substring to be scanned
   * @result: resulting integer on success
-@@ -221,6 +234,7 @@ char *match_strdup(const substring_t *s)
+@@ -221,6 +234,7 @@
  }
  
  EXPORT_SYMBOL(match_token);
@@ -1141406,10 +1141356,10 @@ diff -purN linux-2.6.27/lib/parser.c linux-2.6.27.19-5.1/lib/parser.c
  EXPORT_SYMBOL(match_int);
  EXPORT_SYMBOL(match_octal);
  EXPORT_SYMBOL(match_hex);
-diff -purN linux-2.6.27/lib/percpu_counter.c linux-2.6.27.19-5.1/lib/percpu_counter.c
---- linux-2.6.27/lib/percpu_counter.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/percpu_counter.c   2009-03-25 16:11:42.000000000 +0000
-@@ -52,7 +52,7 @@ EXPORT_SYMBOL(__percpu_counter_add);
+diff -r 9608d5473017 lib/percpu_counter.c
+--- a/lib/percpu_counter.c     Wed May 06 15:47:13 2009 +0100
++++ b/lib/percpu_counter.c     Wed May 06 16:57:02 2009 +0100
+@@ -52,7 +52,7 @@
   * Add up all the per-cpu counts, return the result.  This is a more accurate
   * but much slower version of percpu_counter_read_positive()
   */
@@ -1141418,7 +1141368,7 @@ diff -purN linux-2.6.27/lib/percpu_counter.c linux-2.6.27.19-5.1/lib/percpu_coun
  {
        s64 ret;
        int cpu;
-@@ -62,11 +62,9 @@ s64 __percpu_counter_sum(struct percpu_c
+@@ -62,11 +62,9 @@
        for_each_online_cpu(cpu) {
                s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
                ret += *pcount;
@@ -1141432,10 +1141382,10 @@ diff -purN linux-2.6.27/lib/percpu_counter.c linux-2.6.27.19-5.1/lib/percpu_coun
  
        spin_unlock(&fbc->lock);
        return ret;
-diff -purN linux-2.6.27/lib/scatterlist.c linux-2.6.27.19-5.1/lib/scatterlist.c
---- linux-2.6.27/lib/scatterlist.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/scatterlist.c      2009-03-25 16:11:43.000000000 +0000
-@@ -395,7 +395,7 @@ void sg_miter_stop(struct sg_mapping_ite
+diff -r 9608d5473017 lib/scatterlist.c
+--- a/lib/scatterlist.c        Wed May 06 15:47:13 2009 +0100
++++ b/lib/scatterlist.c        Wed May 06 16:57:02 2009 +0100
+@@ -395,7 +395,7 @@
                        WARN_ON(!irqs_disabled());
                        kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ);
                } else
@@ -1141444,9 +1141394,9 @@ diff -purN linux-2.6.27/lib/scatterlist.c linux-2.6.27.19-5.1/lib/scatterlist.c
  
                miter->page = NULL;
                miter->addr = NULL;
-diff -purN linux-2.6.27/lib/string_helpers.c linux-2.6.27.19-5.1/lib/string_helpers.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/string_helpers.c   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/string_helpers.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/string_helpers.c     Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,64 @@
 +/*
 + * Helpers for formatting and printing strings
@@ -1141512,9 +1141462,9 @@ diff -purN linux-2.6.27/lib/string_helpers.c linux-2.6.27.19-5.1/lib/string_help
 +      return 0;
 +}
 +EXPORT_SYMBOL(string_get_size);
-diff -purN linux-2.6.27/lib/swiotlb-xen.c linux-2.6.27.19-5.1/lib/swiotlb-xen.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/lib/swiotlb-xen.c      2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 lib/swiotlb-xen.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/lib/swiotlb-xen.c        Wed May 06 16:57:02 2009 +0100
 @@ -0,0 +1,783 @@
 +/*
 + * Dynamic DMA mapping support.
@@ -1142299,27 +1142249,26 @@ diff -purN linux-2.6.27/lib/swiotlb-xen.c linux-2.6.27.19-5.1/lib/swiotlb-xen.c
 +EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
 +EXPORT_SYMBOL(swiotlb_dma_mapping_error);
 +EXPORT_SYMBOL(swiotlb_dma_supported);
-diff -purN linux-2.6.27/mm/Kconfig linux-2.6.27.19-5.1/mm/Kconfig
---- linux-2.6.27/mm/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/Kconfig     2009-03-25 16:11:30.000000000 +0000
-@@ -128,12 +128,9 @@ config SPARSEMEM_VMEMMAP
+diff -r 9608d5473017 mm/Kconfig
+--- a/mm/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/mm/Kconfig       Wed May 06 16:57:02 2009 +0100
+@@ -128,11 +128,8 @@
  config MEMORY_HOTPLUG
        bool "Allow for memory hot-add"
        depends on SPARSEMEM || X86_64_ACPI_NUMA
 -      depends on HOTPLUG && !HIBERNATION && ARCH_ENABLE_MEMORY_HOTPLUG
 +      depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG
        depends on (IA64 || X86 || PPC64 || SUPERH || S390)
+-
 -comment "Memory hotplug is currently incompatible with Software Suspend"
 -      depends on SPARSEMEM && HOTPLUG && HIBERNATION
--
  config MEMORY_HOTPLUG_SPARSE
        def_bool y
-       depends on SPARSEMEM && MEMORY_HOTPLUG
-diff -purN linux-2.6.27/mm/Makefile linux-2.6.27.19-5.1/mm/Makefile
---- linux-2.6.27/mm/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/Makefile    2009-03-25 16:11:31.000000000 +0000
-@@ -11,7 +11,7 @@ obj-y                        := bootmem.o filemap.o mempool.o
+diff -r 9608d5473017 mm/Makefile
+--- a/mm/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/mm/Makefile      Wed May 06 16:57:02 2009 +0100
+@@ -11,7 +11,7 @@
                           maccess.o page_alloc.o page-writeback.o pdflush.o \
                           readahead.o swap.o truncate.o vmscan.o \
                           prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
@@ -1142328,10 +1142277,10 @@ diff -purN linux-2.6.27/mm/Makefile linux-2.6.27.19-5.1/mm/Makefile
  
  obj-$(CONFIG_PROC_PAGE_MONITOR) += pagewalk.o
  obj-$(CONFIG_BOUNCE)  += bounce.o
-diff -purN linux-2.6.27/mm/bounce.c linux-2.6.27.19-5.1/mm/bounce.c
---- linux-2.6.27/mm/bounce.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/bounce.c    2009-03-25 16:11:31.000000000 +0000
-@@ -267,7 +267,7 @@ void blk_queue_bounce(struct request_que
+diff -r 9608d5473017 mm/bounce.c
+--- a/mm/bounce.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/bounce.c      Wed May 06 16:57:02 2009 +0100
+@@ -267,7 +267,7 @@
        /*
         * Data-less bio, nothing to bounce
         */
@@ -1142340,9 +1142289,9 @@ diff -purN linux-2.6.27/mm/bounce.c linux-2.6.27.19-5.1/mm/bounce.c
                return;
  
        /*
-diff -purN linux-2.6.27/mm/fadvise.c linux-2.6.27.19-5.1/mm/fadvise.c
---- linux-2.6.27/mm/fadvise.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/fadvise.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/fadvise.c
+--- a/mm/fadvise.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/fadvise.c     Wed May 06 16:57:02 2009 +0100
 @@ -24,7 +24,7 @@
   * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could
   * deactivate the pages and clear PG_Referenced.
@@ -1142352,7 +1142301,7 @@ diff -purN linux-2.6.27/mm/fadvise.c linux-2.6.27.19-5.1/mm/fadvise.c
  {
        struct file *file = fget(fd);
        struct address_space *mapping;
-@@ -126,12 +126,26 @@ out:
+@@ -126,12 +126,26 @@
        fput(file);
        return ret;
  }
@@ -1142380,9 +1142329,9 @@ diff -purN linux-2.6.27/mm/fadvise.c linux-2.6.27.19-5.1/mm/fadvise.c
 +#endif
  
  #endif
-diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
---- linux-2.6.27/mm/filemap.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/filemap.c   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/filemap.c
+--- a/mm/filemap.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/filemap.c     Wed May 06 16:57:02 2009 +0100
 @@ -34,6 +34,7 @@
  #include <linux/hardirq.h> /* for BUG_ON(!in_atomic()) only */
  #include <linux/memcontrol.h>
@@ -1142391,7 +1142340,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  /*
   * FIXME: remove all knowledge of the buffer layer from the core VM
-@@ -134,6 +135,7 @@ void __remove_from_page_cache(struct pag
+@@ -134,6 +135,7 @@
                dec_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE);
        }
  }
@@ -1142399,7 +1142348,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  void remove_from_page_cache(struct page *page)
  {
-@@ -145,6 +147,7 @@ void remove_from_page_cache(struct page 
+@@ -145,6 +147,7 @@
        __remove_from_page_cache(page);
        spin_unlock_irq(&mapping->tree_lock);
  }
@@ -1142407,7 +1142356,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  static int sync_page(void *word)
  {
-@@ -179,6 +182,7 @@ static int sync_page(void *word)
+@@ -179,6 +182,7 @@
        if (mapping && mapping->a_ops && mapping->a_ops->sync_page)
                mapping->a_ops->sync_page(page);
        io_schedule();
@@ -1142415,7 +1142364,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
        return 0;
  }
  
-@@ -209,7 +213,7 @@ int __filemap_fdatawrite_range(struct ad
+@@ -209,7 +213,7 @@
        int ret;
        struct writeback_control wbc = {
                .sync_mode = sync_mode,
@@ -1142424,7 +1142373,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
                .range_start = start,
                .range_end = end,
        };
-@@ -497,6 +501,7 @@ int add_to_page_cache_lru(struct page *p
+@@ -497,6 +501,7 @@
                lru_cache_add(page);
        return ret;
  }
@@ -1142432,20 +1142381,20 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  #ifdef CONFIG_NUMA
  struct page *__page_cache_alloc(gfp_t gfp)
-@@ -510,12 +515,6 @@ struct page *__page_cache_alloc(gfp_t gf
+@@ -509,12 +514,6 @@
+ }
  EXPORT_SYMBOL(__page_cache_alloc);
  #endif
+-
 -static int __sleep_on_page_lock(void *word)
 -{
 -      io_schedule();
 -      return 0;
 -}
--
  /*
   * In order to wait for pages to become available there must be
-  * waitqueues associated with pages. By using a hash table of
-@@ -542,12 +541,30 @@ void wait_on_page_bit(struct page *page,
+@@ -542,11 +541,29 @@
  {
        DEFINE_WAIT_BIT(wait, &page->flags, bit_nr);
  
@@ -1142456,7 +1142405,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
 +      trace_wait_on_page_end(page, bit_nr);
  }
  EXPORT_SYMBOL(wait_on_page_bit);
++
 +/*
 + * If PageWaiters was found to be set at unlock time, __wake_page_waiters
 + * should be called to actually perform the wakeup of waiters.
@@ -1142472,11 +1142421,10 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
 +      smp_mb__after_clear_bit();
 +      wake_up_page(page, PG_locked);
 +}
-+
  /**
   * unlock_page - unlock a locked page
-  * @page: the page
-@@ -564,11 +581,10 @@ EXPORT_SYMBOL(wait_on_page_bit);
+@@ -564,11 +581,10 @@
   */
  void unlock_page(struct page *page)
  {
@@ -1142492,7 +1142440,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  }
  EXPORT_SYMBOL(unlock_page);
  
-@@ -598,22 +614,59 @@ EXPORT_SYMBOL(end_page_writeback);
+@@ -598,22 +614,59 @@
   * chances are that on the second loop, the block layer's plug list is empty,
   * so sync_page() will then return in state TASK_UNINTERRUPTIBLE.
   */
@@ -1142516,7 +1142464,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
 -int __lock_page_killable(struct page *page)
 +int  __lock_page_killable(struct page *page)
-+{
+ {
 +      wait_queue_head_t *wq = page_waitqueue(page);
 +      DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
 +      int err = 0;
@@ -1142536,7 +1142484,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
 +}
 +
 +void  __wait_on_page_locked(struct page *page)
- {
++{
 +      wait_queue_head_t *wq = page_waitqueue(page);
        DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);
  
@@ -1142558,7 +1142506,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  /**
   * __lock_page_nosync - get a lock on the page, without calling sync_page()
-@@ -622,11 +675,18 @@ int __lock_page_killable(struct page *pa
+@@ -622,11 +675,18 @@
   * Variant of lock_page that does not require the caller to hold a reference
   * on the page's mapping.
   */
@@ -1142580,7 +1142528,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  }
  
  /**
-@@ -796,6 +856,7 @@ repeat:
+@@ -796,6 +856,7 @@
        rcu_read_unlock();
        return ret;
  }
@@ -1142588,7 +1142536,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  /**
   * find_get_pages_contig - gang contiguous pagecache lookup
-@@ -1304,7 +1365,8 @@ generic_file_aio_read(struct kiocb *iocb
+@@ -1304,7 +1365,8 @@
                        goto out; /* skip atime */
                size = i_size_read(inode);
                if (pos < size) {
@@ -1142598,7 +1142546,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
                        if (!retval) {
                                retval = mapping->a_ops->direct_IO(READ, iocb,
                                                        iov, pos, nr_segs);
-@@ -1353,7 +1415,7 @@ do_readahead(struct address_space *mappi
+@@ -1353,7 +1415,7 @@
        return 0;
  }
  
@@ -1142607,7 +1142555,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  {
        ssize_t ret;
        struct file *file;
-@@ -1372,6 +1434,13 @@ asmlinkage ssize_t sys_readahead(int fd,
+@@ -1372,6 +1434,13 @@
        }
        return ret;
  }
@@ -1142621,7 +1142569,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  #ifdef CONFIG_MMU
  /**
-@@ -1760,12 +1829,12 @@ int should_remove_suid(struct dentry *de
+@@ -1760,12 +1829,12 @@
  }
  EXPORT_SYMBOL(should_remove_suid);
  
@@ -1142636,7 +1142584,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  }
  
  int file_remove_suid(struct file *file)
-@@ -1780,7 +1849,7 @@ int file_remove_suid(struct file *file)
+@@ -1780,7 +1849,7 @@
        if (killpriv)
                error = security_inode_killpriv(dentry);
        if (!error && killsuid)
@@ -1142645,7 +1142593,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
        return error;
  }
-@@ -2026,7 +2095,7 @@ int pagecache_write_begin(struct file *f
+@@ -2026,7 +2095,7 @@
                struct inode *inode = mapping->host;
                struct page *page;
  again:
@@ -1142654,7 +1142602,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
                *pagep = page;
                if (!page)
                        return -ENOMEM;
-@@ -2110,18 +2179,10 @@ generic_file_direct_write(struct kiocb *
+@@ -2110,18 +2179,10 @@
        if (count != ocount)
                *nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);
  
@@ -1142674,7 +1142622,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
        if (written)
                goto out;
  
-@@ -2190,19 +2251,24 @@ EXPORT_SYMBOL(generic_file_direct_write)
+@@ -2190,19 +2251,24 @@
   * Find or create a page at the given pagecache position. Return the locked
   * page. This function is specifically for buffered writes.
   */
@@ -1142702,7 +1142650,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
        if (unlikely(status)) {
                page_cache_release(page);
                if (status == -EEXIST)
-@@ -2211,7 +2277,7 @@ repeat:
+@@ -2211,7 +2277,7 @@
        }
        return page;
  }
@@ -1142711,7 +1142659,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
  static ssize_t generic_perform_write_2copy(struct file *file,
                                struct iov_iter *i, loff_t pos)
-@@ -2256,7 +2322,7 @@ static ssize_t generic_perform_write_2co
+@@ -2256,7 +2322,7 @@
                        break;
                }
  
@@ -1142720,7 +1142668,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
                if (!page) {
                        status = -ENOMEM;
                        break;
-@@ -2488,7 +2554,7 @@ generic_file_buffered_write(struct kiocb
+@@ -2488,7 +2554,7 @@
  
        if (likely(status >= 0)) {
                written += status;
@@ -1142729,7 +1142677,7 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
                /*
                 * For now, when the user asks for O_SYNC, we'll actually give
-@@ -2506,8 +2572,22 @@ generic_file_buffered_write(struct kiocb
+@@ -2506,8 +2572,22 @@
         * to buffered writes (block instantiation inside i_size).  So we sync
         * the file data here, to try to honour O_DIRECT expectations.
         */
@@ -1142754,10 +1142702,10 @@ diff -purN linux-2.6.27/mm/filemap.c linux-2.6.27.19-5.1/mm/filemap.c
  
        return written ? written : status;
  }
-diff -purN linux-2.6.27/mm/fremap.c linux-2.6.27.19-5.1/mm/fremap.c
---- linux-2.6.27/mm/fremap.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/fremap.c    2009-03-25 16:11:30.000000000 +0000
-@@ -118,8 +118,8 @@ static int populate_range(struct mm_stru
+diff -r 9608d5473017 mm/fremap.c
+--- a/mm/fremap.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/fremap.c      Wed May 06 16:57:02 2009 +0100
+@@ -118,8 +118,8 @@
   * and the vma's default protection is used. Arbitrary protections
   * might be implemented in the future.
   */
@@ -1142768,9 +1142716,9 @@ diff -purN linux-2.6.27/mm/fremap.c linux-2.6.27.19-5.1/mm/fremap.c
  {
        struct mm_struct *mm = current->mm;
        struct address_space *mapping;
-diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
---- linux-2.6.27/mm/hugetlb.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/hugetlb.c   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/hugetlb.c
+--- a/mm/hugetlb.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/hugetlb.c     Wed May 06 16:57:02 2009 +0100
 @@ -17,6 +17,7 @@
  #include <linux/mutex.h>
  #include <linux/bootmem.h>
@@ -1142779,7 +1142727,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  
  #include <asm/page.h>
  #include <asm/pgtable.h>
-@@ -353,11 +354,26 @@ static int vma_has_reserves(struct vm_ar
+@@ -353,10 +354,25 @@
        return 0;
  }
  
@@ -1142799,14 +1142747,13 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
                        unsigned long addr, unsigned long sz)
  {
        int i;
++
 +      if (unlikely(sz > MAX_ORDER_NR_PAGES))
 +              return clear_gigantic_page(page, addr, sz);
-+
        might_sleep();
        for (i = 0; i < sz/PAGE_SIZE; i++) {
-               cond_resched();
-@@ -365,12 +381,32 @@ static void clear_huge_page(struct page 
+@@ -365,11 +381,31 @@
        }
  }
  
@@ -1142832,14 +1142779,13 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  {
        int i;
        struct hstate *h = hstate_vma(vma);
++
 +      if (unlikely(pages_per_huge_page(h) > MAX_ORDER_NR_PAGES))
 +              return copy_gigantic_page(dst, src, addr, vma);
-+
        might_sleep();
        for (i = 0; i < pages_per_huge_page(h); i++) {
-               cond_resched();
-@@ -455,6 +491,9 @@ static void update_and_free_page(struct 
+@@ -455,6 +491,9 @@
  {
        int i;
  
@@ -1142849,7 +1142795,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        h->nr_huge_pages--;
        h->nr_huge_pages_node[page_to_nid(page)]--;
        for (i = 0; i < pages_per_huge_page(h); i++) {
-@@ -489,6 +528,7 @@ static void free_huge_page(struct page *
+@@ -489,6 +528,7 @@
        int nid = page_to_nid(page);
        struct address_space *mapping;
  
@@ -1142857,7 +1142803,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        mapping = (struct address_space *) page_private(page);
        set_page_private(page, 0);
        BUG_ON(page_count(page));
-@@ -556,8 +596,10 @@ static struct page *alloc_fresh_huge_pag
+@@ -556,8 +596,10 @@
  {
        struct page *page;
  
@@ -1142870,7 +1142816,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  
        page = alloc_pages_node(nid,
                htlb_alloc_mask|__GFP_COMP|__GFP_THISNODE|
-@@ -566,11 +608,13 @@ static struct page *alloc_fresh_huge_pag
+@@ -566,11 +608,13 @@
        if (page) {
                if (arch_prepare_hugepage(page)) {
                        __free_pages(page, huge_page_order(h));
@@ -1142886,7 +1142832,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        return page;
  }
  
-@@ -654,7 +698,8 @@ static struct page *alloc_buddy_huge_pag
+@@ -654,7 +698,8 @@
        spin_lock(&hugetlb_lock);
        if (h->surplus_huge_pages >= h->nr_overcommit_huge_pages) {
                spin_unlock(&hugetlb_lock);
@@ -1142896,7 +1142842,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        } else {
                h->nr_huge_pages++;
                h->surplus_huge_pages++;
-@@ -692,7 +737,8 @@ static struct page *alloc_buddy_huge_pag
+@@ -692,7 +737,8 @@
                __count_vm_event(HTLB_BUDDY_PGALLOC_FAIL);
        }
        spin_unlock(&hugetlb_lock);
@@ -1142906,7 +1142852,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        return page;
  }
  
-@@ -931,6 +977,7 @@ static struct page *alloc_huge_page(stru
+@@ -931,6 +977,7 @@
  
        vma_commit_reservation(h, vma, addr);
  
@@ -1142914,7 +1142860,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        return page;
  }
  
-@@ -969,6 +1016,14 @@ found:
+@@ -969,6 +1016,14 @@
        return 1;
  }
  
@@ -1142929,7 +1142875,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  /* Put bootmem huge pages into the standard lists after mem_map is up */
  static void __init gather_bootmem_prealloc(void)
  {
-@@ -979,7 +1034,7 @@ static void __init gather_bootmem_preall
+@@ -979,7 +1034,7 @@
                struct hstate *h = m->hstate;
                __ClearPageReserved(page);
                WARN_ON(page_count(page) != 1);
@@ -1142938,7 +1142884,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
                prep_new_huge_page(h, page, page_to_nid(page));
        }
  }
-@@ -1455,6 +1510,28 @@ int hugetlb_overcommit_handler(struct ct
+@@ -1455,6 +1510,28 @@
  
  #endif /* CONFIG_SYSCTL */
  
@@ -1142967,7 +1142913,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  int hugetlb_report_meminfo(char *buf)
  {
        struct hstate *h = &default_hstate;
-@@ -1752,6 +1829,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1752,6 +1829,7 @@
                                        struct page *page,
                                        unsigned long address)
  {
@@ -1142975,7 +1142921,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        struct vm_area_struct *iter_vma;
        struct address_space *mapping;
        struct prio_tree_iter iter;
-@@ -1761,7 +1839,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1761,7 +1839,7 @@
         * vm_pgoff is in PAGE_SIZE units, hence the different calculation
         * from page cache lookup which is in HPAGE_SIZE units.
         */
@@ -1142984,7 +1142930,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        pgoff = ((address - vma->vm_start) >> PAGE_SHIFT)
                + (vma->vm_pgoff >> PAGE_SHIFT);
        mapping = (struct address_space *)page_private(page);
-@@ -1780,7 +1858,7 @@ int unmap_ref_private(struct mm_struct *
+@@ -1780,7 +1858,7 @@
                 */
                if (!is_vma_resv_set(iter_vma, HPAGE_RESV_OWNER))
                        unmap_hugepage_range(iter_vma,
@@ -1142993,7 +1142939,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
                                page);
        }
  
-@@ -2103,7 +2181,7 @@ int follow_hugetlb_page(struct mm_struct
+@@ -2103,7 +2181,7 @@
  same_page:
                if (pages) {
                        get_page(page);
@@ -1143002,7 +1142948,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
                }
  
                if (vmas)
-@@ -2165,11 +2243,12 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2165,11 +2243,12 @@
                                        long from, long to,
                                        struct vm_area_struct *vma)
  {
@@ -1143017,7 +1142963,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  
        /*
         * Shared mappings base their reservation on the number of pages that
-@@ -2181,8 +2260,10 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2181,8 +2260,10 @@
                chg = region_chg(&inode->i_mapping->private_list, from, to);
        else {
                struct resv_map *resv_map = resv_map_alloc();
@@ -1143030,7 +1142976,7 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
  
                chg = to - from;
  
-@@ -2190,26 +2271,34 @@ int hugetlb_reserve_pages(struct inode *
+@@ -2190,26 +2271,34 @@
                set_vma_resv_flags(vma, HPAGE_RESV_OWNER);
        }
  
@@ -1143072,10 +1143018,10 @@ diff -purN linux-2.6.27/mm/hugetlb.c linux-2.6.27.19-5.1/mm/hugetlb.c
        spin_lock(&inode->i_lock);
        inode->i_blocks -= blocks_per_huge_page(h);
        spin_unlock(&inode->i_lock);
-diff -purN linux-2.6.27/mm/internal.h linux-2.6.27.19-5.1/mm/internal.h
---- linux-2.6.27/mm/internal.h 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/internal.h  2009-03-25 16:11:31.000000000 +0000
-@@ -17,6 +17,7 @@ void free_pgtables(struct mmu_gather *tl
+diff -r 9608d5473017 mm/internal.h
+--- a/mm/internal.h    Wed May 06 15:47:13 2009 +0100
++++ b/mm/internal.h    Wed May 06 16:57:02 2009 +0100
+@@ -17,6 +17,7 @@
                unsigned long floor, unsigned long ceiling);
  
  extern void prep_compound_page(struct page *page, unsigned long order);
@@ -1143083,7 +1143029,7 @@ diff -purN linux-2.6.27/mm/internal.h linux-2.6.27.19-5.1/mm/internal.h
  
  static inline void set_page_count(struct page *page, int v)
  {
-@@ -53,6 +54,34 @@ static inline unsigned long page_order(s
+@@ -53,6 +54,34 @@
  }
  
  /*
@@ -1143118,10 +1143064,11 @@ diff -purN linux-2.6.27/mm/internal.h linux-2.6.27.19-5.1/mm/internal.h
   * FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node,
   * so all functions starting at paging_init should be marked __init
   * in those cases. SPARSEMEM, however, allows for memory hotplug,
-@@ -64,6 +93,16 @@ static inline unsigned long page_order(s
+@@ -63,6 +92,16 @@
+ #else
  #define __paginginit __init
  #endif
++
 +#define ALLOC_HARDER          0x01 /* try to alloc harder */
 +#define ALLOC_HIGH            0x02 /* __GFP_HIGH set */
 +#define ALLOC_WMARK_MIN               0x04 /* use pages_min watermark */
@@ -1143131,14 +1143078,13 @@ diff -purN linux-2.6.27/mm/internal.h linux-2.6.27.19-5.1/mm/internal.h
 +#define ALLOC_CPUSET          0x40 /* check for correct cpuset */
 +
 +int gfp_to_alloc_flags(gfp_t gfp_mask);
-+
  /* Memory initialisation debug and verification */
  enum mminit_level {
-       MMINIT_WARNING,
-diff -purN linux-2.6.27/mm/madvise.c linux-2.6.27.19-5.1/mm/madvise.c
---- linux-2.6.27/mm/madvise.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/madvise.c   2009-03-25 16:11:31.000000000 +0000
-@@ -239,12 +239,30 @@ madvise_vma(struct vm_area_struct *vma, 
+diff -r 9608d5473017 mm/madvise.c
+--- a/mm/madvise.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/madvise.c     Wed May 06 16:57:02 2009 +0100
+@@ -239,12 +239,30 @@
                break;
  
        default:
@@ -1143170,7 +1143116,7 @@ diff -purN linux-2.6.27/mm/madvise.c linux-2.6.27.19-5.1/mm/madvise.c
  /*
   * The madvise(2) system call.
   *
-@@ -281,7 +299,7 @@ madvise_vma(struct vm_area_struct *vma, 
+@@ -281,7 +299,7 @@
   *  -EBADF  - map exists, but area maps something that isn't a file.
   *  -EAGAIN - a kernel resource was temporarily unavailable.
   */
@@ -1143179,20 +1143125,20 @@ diff -purN linux-2.6.27/mm/madvise.c linux-2.6.27.19-5.1/mm/madvise.c
  {
        unsigned long end, tmp;
        struct vm_area_struct * vma, *prev;
-@@ -290,6 +308,9 @@ asmlinkage long sys_madvise(unsigned lon
+@@ -289,6 +307,9 @@
+       int error = -EINVAL;
        int write;
        size_t len;
++
 +      if (!madvise_behavior_valid(behavior))
 +              return error;
-+
        write = madvise_need_mmap_write(behavior);
        if (write)
-               down_write(&current->mm->mmap_sem);
-diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
---- linux-2.6.27/mm/memcontrol.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memcontrol.c        2009-03-25 16:11:30.000000000 +0000
-@@ -59,7 +59,7 @@ struct mem_cgroup_stat_cpu {
+diff -r 9608d5473017 mm/memcontrol.c
+--- a/mm/memcontrol.c  Wed May 06 15:47:13 2009 +0100
++++ b/mm/memcontrol.c  Wed May 06 16:57:02 2009 +0100
+@@ -59,7 +59,7 @@
  } ____cacheline_aligned_in_smp;
  
  struct mem_cgroup_stat {
@@ -1143201,7 +1143147,7 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
  };
  
  /*
-@@ -143,6 +143,7 @@ struct mem_cgroup {
+@@ -143,6 +143,7 @@
        struct mem_cgroup_stat stat;
  };
  static struct mem_cgroup init_mem_cgroup;
@@ -1143209,7 +1143155,7 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
  
  /*
   * We use the lower bit of the page->page_cgroup pointer as a bit spin
-@@ -1097,23 +1098,54 @@ static void free_mem_cgroup_per_zone_inf
+@@ -1097,23 +1098,54 @@
  static struct mem_cgroup *mem_cgroup_alloc(void)
  {
        struct mem_cgroup *mem;
@@ -1143218,14 +1143164,11 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
  
 -      if (sizeof(*mem) < PAGE_SIZE)
 -              mem = kmalloc(sizeof(*mem), GFP_KERNEL);
--      else
 +      if (sizeof(*mem) > PAGE_SIZE) {
-               mem = vmalloc(sizeof(*mem));
--
--      if (mem)
++              mem = vmalloc(sizeof(*mem));
 +              if (!mem)
 +                      goto out;
-               memset(mem, 0, sizeof(*mem));
++              memset(mem, 0, sizeof(*mem));
 +      } else
 +              mem = kzalloc(sizeof(*mem), GFP_KERNEL);
 +
@@ -1143244,12 +1143187,17 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
 +              goto out_mem;
 +
 +      mem->stat.cpustat = cpustat;
-       return mem;
++      return mem;
 +
 +out_mem:
 +      if (is_vmalloc_addr(mem))
 +              vfree(mem);
-+      else
+       else
+-              mem = vmalloc(sizeof(*mem));
+-
+-      if (mem)
+-              memset(mem, 0, sizeof(*mem));
+-      return mem;
 +              kfree(mem);
 +out:
 +      return NULL;
@@ -1143258,20 +1143206,21 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
  static void mem_cgroup_free(struct mem_cgroup *mem)
  {
 -      if (sizeof(*mem) < PAGE_SIZE)
--              kfree(mem);
 +      if (is_vmalloc_addr(mem->stat.cpustat))
 +              vfree(mem->stat.cpustat);
-       else
++      else
 +              kfree(mem->stat.cpustat);
 +
 +      if (is_vmalloc_addr(mem))
-               vfree(mem);
++              vfree(mem);
 +      else
-+              kfree(mem);
+               kfree(mem);
+-      else
+-              vfree(mem);
  }
  
  
-@@ -1125,6 +1157,7 @@ mem_cgroup_create(struct cgroup_subsys *
+@@ -1125,6 +1157,7 @@
  
        if (unlikely((cont->parent) == NULL)) {
                mem = &init_mem_cgroup;
@@ -1143279,29 +1143228,28 @@ diff -purN linux-2.6.27/mm/memcontrol.c linux-2.6.27.19-5.1/mm/memcontrol.c
                page_cgroup_cache = KMEM_CACHE(page_cgroup, SLAB_PANIC);
        } else {
                mem = mem_cgroup_alloc();
-@@ -1208,4 +1241,5 @@ struct cgroup_subsys mem_cgroup_subsys =
+@@ -1208,4 +1241,5 @@
        .populate = mem_cgroup_populate,
        .attach = mem_cgroup_move_task,
        .early_init = 0,
 +      .disabled = 1,
  };
-diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
---- linux-2.6.27/mm/memory.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memory.c    2009-03-25 16:11:30.000000000 +0000
-@@ -61,9 +61,12 @@
+diff -r 9608d5473017 mm/memory.c
+--- a/mm/memory.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/memory.c      Wed May 06 16:57:02 2009 +0100
+@@ -61,8 +61,11 @@
  
  #include <linux/swapops.h>
  #include <linux/elf.h>
 +#include <trace/memory.h>
  
  #include "internal.h"
-+#include <trace/swap.h>
 +
++#include <trace/swap.h>
  #ifndef CONFIG_NEED_MULTIPLE_NODES
  /* use the per-pgdat data instead for discontigmem - mbligh */
- unsigned long max_mapnr;
-@@ -443,6 +446,12 @@ struct page *vm_normal_page(struct vm_ar
+@@ -443,6 +446,12 @@
  {
        unsigned long pfn;
  
@@ -1143314,7 +1143262,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
        if (HAVE_PTE_SPECIAL) {
                if (likely(!pte_special(pte))) {
                        VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
-@@ -471,7 +480,14 @@ struct page *vm_normal_page(struct vm_ar
+@@ -471,7 +480,14 @@
                }
        }
  
@@ -1143329,7 +1143277,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
  
        /*
         * NOTE! We still have PageReserved() pages in the page tables.
-@@ -742,8 +758,14 @@ static unsigned long zap_pte_range(struc
+@@ -742,8 +758,14 @@
                                     page->index > details->last_index))
                                        continue;
                        }
@@ -1143346,7 +1143294,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
                        tlb_remove_tlb_entry(tlb, pte, addr);
                        if (unlikely(!page))
                                continue;
-@@ -855,11 +877,11 @@ static unsigned long unmap_page_range(st
+@@ -855,11 +877,11 @@
        return addr;
  }
  
@@ -1143362,7 +1143310,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
  #endif
  
  /**
-@@ -993,6 +1015,7 @@ unsigned long zap_page_range(struct vm_a
+@@ -993,6 +1015,7 @@
                tlb_finish_mmu(tlb, address, end);
        return end;
  }
@@ -1143370,7 +1143318,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
  
  /**
   * zap_vma_ptes - remove ptes mapping the vma
-@@ -1190,6 +1213,26 @@ int get_user_pages(struct task_struct *t
+@@ -1190,6 +1213,26 @@
                        continue;
                }
  
@@ -1143397,10 +1143345,11 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
                if (!vma || (vma->vm_flags & (VM_IO | VM_PFNMAP))
                                || !(vm_flags & vma->vm_flags))
                        return i ? : -EFAULT;
-@@ -1268,6 +1311,95 @@ int get_user_pages(struct task_struct *t
+@@ -1267,6 +1310,95 @@
+       return i;
  }
  EXPORT_SYMBOL(get_user_pages);
++
 +static int zeromap_pte_range(struct mm_struct *mm, pmd_t *pmd,
 +                      unsigned long addr, unsigned long end, pgprot_t prot)
 +{
@@ -1143489,11 +1143438,10 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
 +      } while (pgd++, addr = next, addr != end);
 +      return err;
 +}
-+
  pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
                        spinlock_t **ptl)
- {
-@@ -1854,7 +1986,6 @@ gotten:
+@@ -1854,7 +1986,6 @@
  
        if (unlikely(anon_vma_prepare(vma)))
                goto oom;
@@ -1143501,7 +1143449,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
        new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address);
        if (!new_page)
                goto oom;
-@@ -2286,6 +2417,7 @@ static int do_swap_page(struct mm_struct
+@@ -2286,6 +2417,7 @@
                /* Had to read the page from swap area: Major fault */
                ret = VM_FAULT_MAJOR;
                count_vm_event(PGMAJFAULT);
@@ -1143509,7 +1143457,7 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
        }
  
        if (mem_cgroup_charge(page, mm, GFP_KERNEL)) {
-@@ -2679,31 +2811,46 @@ unlock:
+@@ -2679,31 +2811,46 @@
  int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
                unsigned long address, int write_access)
  {
@@ -1143565,10 +1143513,10 @@ diff -purN linux-2.6.27/mm/memory.c linux-2.6.27.19-5.1/mm/memory.c
  
  #ifndef __PAGETABLE_PUD_FOLDED
  /*
-diff -purN linux-2.6.27/mm/memory_hotplug.c linux-2.6.27.19-5.1/mm/memory_hotplug.c
---- linux-2.6.27/mm/memory_hotplug.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/memory_hotplug.c    2009-03-25 16:11:31.000000000 +0000
-@@ -323,11 +323,11 @@ int __remove_pages(struct zone *zone, un
+diff -r 9608d5473017 mm/memory_hotplug.c
+--- a/mm/memory_hotplug.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/memory_hotplug.c      Wed May 06 16:57:02 2009 +0100
+@@ -323,11 +323,11 @@
        BUG_ON(phys_start_pfn & ~PAGE_SECTION_MASK);
        BUG_ON(nr_pages % PAGES_PER_SECTION);
  
@@ -1143582,10 +1143530,10 @@ diff -purN linux-2.6.27/mm/memory_hotplug.c linux-2.6.27.19-5.1/mm/memory_hotplu
                ret = __remove_section(zone, __pfn_to_section(pfn));
                if (ret)
                        break;
-diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
---- linux-2.6.27/mm/mempolicy.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mempolicy.c 2009-03-25 16:11:31.000000000 +0000
-@@ -1059,10 +1059,9 @@ static int copy_nodes_to_user(unsigned l
+diff -r 9608d5473017 mm/mempolicy.c
+--- a/mm/mempolicy.c   Wed May 06 15:47:13 2009 +0100
++++ b/mm/mempolicy.c   Wed May 06 16:57:02 2009 +0100
+@@ -1059,10 +1059,9 @@
        return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0;
  }
  
@@ -1143599,7 +1143547,7 @@ diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
  {
        nodemask_t nodes;
        int err;
-@@ -1082,8 +1081,8 @@ asmlinkage long sys_mbind(unsigned long 
+@@ -1082,8 +1081,8 @@
  }
  
  /* Set the process memory policy */
@@ -1143610,7 +1143558,7 @@ diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
  {
        int err;
        nodemask_t nodes;
-@@ -1101,9 +1100,9 @@ asmlinkage long sys_set_mempolicy(int mo
+@@ -1101,9 +1100,9 @@
        return do_set_mempolicy(mode, flags, &nodes);
  }
  
@@ -1143623,7 +1143571,7 @@ diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
  {
        struct mm_struct *mm;
        struct task_struct *task;
-@@ -1171,10 +1170,9 @@ out:
+@@ -1171,10 +1170,9 @@
  
  
  /* Retrieve NUMA policy */
@@ -1143637,10 +1143585,10 @@ diff -purN linux-2.6.27/mm/mempolicy.c linux-2.6.27.19-5.1/mm/mempolicy.c
  {
        int err;
        int uninitialized_var(pval);
-diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
---- linux-2.6.27/mm/migrate.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/migrate.c   2009-03-25 16:11:30.000000000 +0000
-@@ -65,6 +65,7 @@ int isolate_lru_page(struct page *page, 
+diff -r 9608d5473017 mm/migrate.c
+--- a/mm/migrate.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/migrate.c     Wed May 06 16:57:02 2009 +0100
+@@ -65,6 +65,7 @@
        }
        return ret;
  }
@@ -1143648,7 +1143596,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
  
  /*
   * migrate_prep() needs to be called before we start compiling a list of pages
-@@ -82,6 +83,7 @@ int migrate_prep(void)
+@@ -82,6 +83,7 @@
  
        return 0;
  }
@@ -1143656,7 +1143604,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
  
  static inline void move_to_lru(struct page *page)
  {
-@@ -116,6 +118,7 @@ int putback_lru_pages(struct list_head *
+@@ -116,6 +118,7 @@
        }
        return count;
  }
@@ -1143664,7 +1143612,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
  
  /*
   * Restore a potential migration pte to a working pte entry
-@@ -741,7 +744,26 @@ unlock:
+@@ -741,7 +744,26 @@
                 * restored.
                 */
                list_del(&page->lru);
@@ -1143692,7 +1143640,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
        }
  
  move_newpage:
-@@ -813,6 +835,17 @@ int migrate_pages(struct list_head *from
+@@ -813,6 +835,17 @@
                        }
                }
        }
@@ -1143710,7 +1143658,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
        rc = 0;
  out:
        if (!swapwrite)
-@@ -825,6 +858,7 @@ out:
+@@ -825,6 +858,7 @@
  
        return nr_failed + retry;
  }
@@ -1143718,7 +1143666,7 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
  
  #ifdef CONFIG_NUMA
  /*
-@@ -979,10 +1013,10 @@ set_status:
+@@ -979,10 +1013,10 @@
   * Move a list of pages in the address space of the currently executing
   * process.
   */
@@ -1143733,10 +1143681,10 @@ diff -purN linux-2.6.27/mm/migrate.c linux-2.6.27.19-5.1/mm/migrate.c
  {
        int err = 0;
        int i;
-diff -purN linux-2.6.27/mm/mincore.c linux-2.6.27.19-5.1/mm/mincore.c
---- linux-2.6.27/mm/mincore.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mincore.c   2009-03-25 16:11:31.000000000 +0000
-@@ -177,8 +177,8 @@ none_mapped:
+diff -r 9608d5473017 mm/mincore.c
+--- a/mm/mincore.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/mincore.c     Wed May 06 16:57:02 2009 +0100
+@@ -177,8 +177,8 @@
   *            mapped
   *  -EAGAIN - A kernel resource was temporarily unavailable.
   */
@@ -1143747,10 +1143695,10 @@ diff -purN linux-2.6.27/mm/mincore.c linux-2.6.27.19-5.1/mm/mincore.c
  {
        long retval;
        unsigned long pages;
-diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
---- linux-2.6.27/mm/mlock.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mlock.c     2009-03-25 16:11:31.000000000 +0000
-@@ -130,7 +130,7 @@ static int do_mlock(unsigned long start,
+diff -r 9608d5473017 mm/mlock.c
+--- a/mm/mlock.c       Wed May 06 15:47:13 2009 +0100
++++ b/mm/mlock.c       Wed May 06 16:57:02 2009 +0100
+@@ -130,7 +130,7 @@
        return error;
  }
  
@@ -1143759,7 +1143707,7 @@ diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
  {
        unsigned long locked;
        unsigned long lock_limit;
-@@ -156,7 +156,7 @@ asmlinkage long sys_mlock(unsigned long 
+@@ -156,7 +156,7 @@
        return error;
  }
  
@@ -1143768,7 +1143716,7 @@ diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
  {
        int ret;
  
-@@ -193,7 +193,7 @@ out:
+@@ -193,7 +193,7 @@
        return 0;
  }
  
@@ -1143777,7 +1143725,7 @@ diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
  {
        unsigned long lock_limit;
        int ret = -EINVAL;
-@@ -219,7 +219,7 @@ out:
+@@ -219,7 +219,7 @@
        return ret;
  }
  
@@ -1143786,10 +1143734,10 @@ diff -purN linux-2.6.27/mm/mlock.c linux-2.6.27.19-5.1/mm/mlock.c
  {
        int ret;
  
-diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
---- linux-2.6.27/mm/mmap.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mmap.c      2009-03-25 16:11:31.000000000 +0000
-@@ -85,6 +85,7 @@ int sysctl_overcommit_memory = OVERCOMMI
+diff -r 9608d5473017 mm/mmap.c
+--- a/mm/mmap.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/mmap.c        Wed May 06 16:57:02 2009 +0100
+@@ -85,6 +85,7 @@
  int sysctl_overcommit_ratio = 50;     /* default is 50% */
  int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
  atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
@@ -1143797,7 +1143745,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
  
  /*
   * Check that a process has enough memory to allocate a new virtual
-@@ -244,7 +245,7 @@ static struct vm_area_struct *remove_vma
+@@ -244,7 +245,7 @@
        return next;
  }
  
@@ -1143806,7 +1143754,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
  {
        unsigned long rlim, retval;
        unsigned long newbrk, oldbrk;
-@@ -1290,6 +1291,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1290,6 +1291,8 @@
  
  full_search:
        for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
@@ -1143815,7 +1143763,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
                /* At this point:  (!vma || addr < vma->vm_end). */
                if (TASK_SIZE - len < addr) {
                        /*
-@@ -1304,15 +1307,23 @@ full_search:
+@@ -1304,15 +1307,23 @@
                        }
                        return -ENOMEM;
                }
@@ -1143842,7 +1143790,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
                addr = vma->vm_end;
        }
  }
-@@ -1370,34 +1381,51 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1370,34 +1381,51 @@
  
        /* make sure it can fit in the remaining address space */
        if (addr > len) {
@@ -1143904,7 +1143852,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
        } while (len < vma->vm_start);
  
  bottomup:
-@@ -1620,6 +1648,19 @@ int expand_upwards(struct vm_area_struct
+@@ -1620,6 +1648,19 @@
        /* Somebody else might have raced and expanded it already */
        if (address > vma->vm_end) {
                unsigned long size, grow;
@@ -1143924,7 +1143872,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
  
                size = address - vma->vm_start;
                grow = (address - vma->vm_end) >> PAGE_SHIFT;
-@@ -1628,6 +1669,7 @@ int expand_upwards(struct vm_area_struct
+@@ -1628,6 +1669,7 @@
                if (!error)
                        vma->vm_end = address;
        }
@@ -1143932,14 +1143880,14 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
        anon_vma_unlock(vma);
        return error;
  }
-@@ -1664,7 +1706,21 @@ static inline int expand_downwards(struc
+@@ -1664,7 +1706,21 @@
        /* Somebody else might have raced and expanded it already */
        if (address < vma->vm_start) {
                unsigned long size, grow;
 +              struct vm_area_struct *prev_vma;
-+
-+              find_vma_prev(vma->vm_mm, address, &prev_vma);
  
++              find_vma_prev(vma->vm_mm, address, &prev_vma);
++
 +              error = -ENOMEM;
 +              if (prev_vma) {
 +                      unsigned long guard;
@@ -1143954,7 +1143902,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
                size = vma->vm_end - address;
                grow = (vma->vm_start - address) >> PAGE_SHIFT;
  
-@@ -1674,6 +1730,7 @@ static inline int expand_downwards(struc
+@@ -1674,6 +1730,7 @@
                        vma->vm_pgoff -= grow;
                }
        }
@@ -1143962,7 +1143910,7 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
        anon_vma_unlock(vma);
        return error;
  }
-@@ -1927,7 +1984,7 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -1927,7 +1984,7 @@
  
  EXPORT_SYMBOL(do_munmap);
  
@@ -1143971,10 +1143919,10 @@ diff -purN linux-2.6.27/mm/mmap.c linux-2.6.27.19-5.1/mm/mmap.c
  {
        int ret;
        struct mm_struct *mm = current->mm;
-diff -purN linux-2.6.27/mm/mmzone.c linux-2.6.27.19-5.1/mm/mmzone.c
---- linux-2.6.27/mm/mmzone.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mmzone.c    2009-03-25 16:11:31.000000000 +0000
-@@ -22,6 +22,10 @@ struct pglist_data *next_online_pgdat(st
+diff -r 9608d5473017 mm/mmzone.c
+--- a/mm/mmzone.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/mmzone.c      Wed May 06 16:57:02 2009 +0100
+@@ -22,6 +22,10 @@
                return NULL;
        return NODE_DATA(nid);
  }
@@ -1143985,10 +1143933,10 @@ diff -purN linux-2.6.27/mm/mmzone.c linux-2.6.27.19-5.1/mm/mmzone.c
  
  /*
   * next_zone - helper magic for for_each_zone()
-diff -purN linux-2.6.27/mm/mprotect.c linux-2.6.27.19-5.1/mm/mprotect.c
---- linux-2.6.27/mm/mprotect.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mprotect.c  2009-03-25 16:11:31.000000000 +0000
-@@ -219,8 +219,8 @@ fail:
+diff -r 9608d5473017 mm/mprotect.c
+--- a/mm/mprotect.c    Wed May 06 15:47:13 2009 +0100
++++ b/mm/mprotect.c    Wed May 06 16:57:02 2009 +0100
+@@ -219,8 +219,8 @@
        return error;
  }
  
@@ -1143999,7 +1143947,7 @@ diff -purN linux-2.6.27/mm/mprotect.c linux-2.6.27.19-5.1/mm/mprotect.c
  {
        unsigned long vm_flags, nstart, end, tmp, reqprot;
        struct vm_area_struct *vma, *prev;
-@@ -294,6 +294,11 @@ sys_mprotect(unsigned long start, size_t
+@@ -294,6 +294,11 @@
                if (error)
                        goto out;
  
@@ -1144011,10 +1143959,10 @@ diff -purN linux-2.6.27/mm/mprotect.c linux-2.6.27.19-5.1/mm/mprotect.c
                tmp = vma->vm_end;
                if (tmp > end)
                        tmp = end;
-diff -purN linux-2.6.27/mm/mremap.c linux-2.6.27.19-5.1/mm/mremap.c
---- linux-2.6.27/mm/mremap.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/mremap.c    2009-03-25 16:11:31.000000000 +0000
-@@ -418,9 +418,9 @@ out_nc:
+diff -r 9608d5473017 mm/mremap.c
+--- a/mm/mremap.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/mremap.c      Wed May 06 16:57:02 2009 +0100
+@@ -418,9 +418,9 @@
        return ret;
  }
  
@@ -1144027,9 +1143975,9 @@ diff -purN linux-2.6.27/mm/mremap.c linux-2.6.27.19-5.1/mm/mremap.c
  {
        unsigned long ret;
  
-diff -purN linux-2.6.27/mm/msync.c linux-2.6.27.19-5.1/mm/msync.c
---- linux-2.6.27/mm/msync.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/msync.c     2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/msync.c
+--- a/mm/msync.c       Wed May 06 15:47:13 2009 +0100
++++ b/mm/msync.c       Wed May 06 16:57:02 2009 +0100
 @@ -28,7 +28,7 @@
   * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to
   * applications.
@@ -1144039,10 +1143987,10 @@ diff -purN linux-2.6.27/mm/msync.c linux-2.6.27.19-5.1/mm/msync.c
  {
        unsigned long end;
        struct mm_struct *mm = current->mm;
-diff -purN linux-2.6.27/mm/nommu.c linux-2.6.27.19-5.1/mm/nommu.c
---- linux-2.6.27/mm/nommu.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/nommu.c     2009-03-25 16:11:31.000000000 +0000
-@@ -355,7 +355,7 @@ EXPORT_SYMBOL(vm_insert_page);
+diff -r 9608d5473017 mm/nommu.c
+--- a/mm/nommu.c       Wed May 06 15:47:13 2009 +0100
++++ b/mm/nommu.c       Wed May 06 16:57:02 2009 +0100
+@@ -355,7 +355,7 @@
   *  to a regular file.  in this case, the unmapping will need
   *  to invoke file system routines that need the global lock.
   */
@@ -1144051,7 +1143999,7 @@ diff -purN linux-2.6.27/mm/nommu.c linux-2.6.27.19-5.1/mm/nommu.c
  {
        struct mm_struct *mm = current->mm;
  
-@@ -1170,7 +1170,7 @@ int do_munmap(struct mm_struct *mm, unsi
+@@ -1170,7 +1170,7 @@
  }
  EXPORT_SYMBOL(do_munmap);
  
@@ -1144060,7 +1144008,7 @@ diff -purN linux-2.6.27/mm/nommu.c linux-2.6.27.19-5.1/mm/nommu.c
  {
        int ret;
        struct mm_struct *mm = current->mm;
-@@ -1261,9 +1261,9 @@ unsigned long do_mremap(unsigned long ad
+@@ -1261,9 +1261,9 @@
  }
  EXPORT_SYMBOL(do_mremap);
  
@@ -1144073,10 +1144021,10 @@ diff -purN linux-2.6.27/mm/nommu.c linux-2.6.27.19-5.1/mm/nommu.c
  {
        unsigned long ret;
  
-diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writeback.c
---- linux-2.6.27/mm/page-writeback.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page-writeback.c    2009-03-25 16:11:31.000000000 +0000
-@@ -66,7 +66,7 @@ static inline long sync_writeback_pages(
+diff -r 9608d5473017 mm/page-writeback.c
+--- a/mm/page-writeback.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/page-writeback.c      Wed May 06 16:57:02 2009 +0100
+@@ -66,7 +66,7 @@
  /*
   * Start background writeback (via pdflush) at this percentage
   */
@@ -1144085,7 +1144033,7 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
  
  /*
   * free highmem will not be subtracted from the total free memory
-@@ -77,7 +77,7 @@ int vm_highmem_is_dirtyable;
+@@ -77,7 +77,7 @@
  /*
   * The generator of dirty data starts writeback at this percentage
   */
@@ -1144094,7 +1144042,7 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
  
  /*
   * The interval between `kupdate'-style writebacks, in jiffies
-@@ -872,9 +872,11 @@ int write_cache_pages(struct address_spa
+@@ -872,9 +872,11 @@
        int done = 0;
        struct pagevec pvec;
        int nr_pages;
@@ -1144107,7 +1144055,7 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
        int range_whole = 0;
  
        if (wbc->nonblocking && bdi_write_congested(bdi)) {
-@@ -884,82 +886,146 @@ int write_cache_pages(struct address_spa
+@@ -884,82 +886,146 @@
  
        pagevec_init(&pvec, 0);
        if (wbc->range_cyclic) {
@@ -1144136,14 +1144084,14 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
 +      done_index = index;
 +      while (!done && (index <= end)) {
 +              int i;
-+
+-              scanned = 1;
 +              nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
 +                            PAGECACHE_TAG_DIRTY,
 +                            min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1);
 +              if (nr_pages == 0)
 +                      break;
--              scanned = 1;
++
                for (i = 0; i < nr_pages; i++) {
                        struct page *page = pvec.pages[i];
  
@@ -1144197,22 +1144145,22 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
  
 -                      if (wbc->sync_mode != WB_SYNC_NONE)
 -                              wait_on_page_writeback(page);
--
--                      if (PageWriteback(page) ||
--                          !clear_page_dirty_for_io(page)) {
--                              unlock_page(page);
--                              continue;
 +                      if (PageWriteback(page)) {
 +                              if (wbc->sync_mode != WB_SYNC_NONE)
 +                                      wait_on_page_writeback(page);
 +                              else
 +                                      goto continue_unlock;
-                       }
++                      }
  
+-                      if (PageWriteback(page) ||
+-                          !clear_page_dirty_for_io(page)) {
+-                              unlock_page(page);
+-                              continue;
+-                      }
 +                      BUG_ON(PageWriteback(page));
 +                      if (!clear_page_dirty_for_io(page))
 +                              goto continue_unlock;
-+
                        ret = (*writepage)(page, wbc, data);
  
 -                      if (unlikely(ret == AOP_WRITEPAGE_ACTIVATE)) {
@@ -1144286,9 +1144234,9 @@ diff -purN linux-2.6.27/mm/page-writeback.c linux-2.6.27.19-5.1/mm/page-writebac
  
        if (wbc->range_cont)
                wbc->range_start = index << PAGE_CACHE_SHIFT;
-diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
---- linux-2.6.27/mm/page_alloc.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_alloc.c        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/page_alloc.c
+--- a/mm/page_alloc.c  Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_alloc.c  Wed May 06 16:57:02 2009 +0100
 @@ -51,6 +51,8 @@
  #include <asm/div64.h>
  #include "internal.h"
@@ -1144298,7 +1144246,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
  /*
   * Array of node states.
   */
-@@ -118,7 +120,10 @@ static char * const zone_names[MAX_NR_ZO
+@@ -118,7 +120,10 @@
         "Movable",
  };
  
@@ -1144309,28 +1144257,11 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
  
  unsigned long __meminitdata nr_kernel_pages;
  unsigned long __meminitdata nr_all_pages;
-@@ -268,24 +273,39 @@ void prep_compound_page(struct page *pag
+@@ -268,24 +273,39 @@
  {
        int i;
        int nr_pages = 1 << order;
-+
-+      set_compound_page_dtor(page, free_compound_page);
-+      set_compound_order(page, order);
-+      __SetPageHead(page);
-+      for (i = 1; i < nr_pages; i++) {
-+              struct page *p = page + i;
-+
-+              __SetPageTail(p);
-+              p->first_page = page;
-+      }
-+}
-+
-+#ifdef CONFIG_HUGETLBFS
-+void prep_compound_gigantic_page(struct page *page, unsigned long order)
-+{
-+      int i;
-+      int nr_pages = 1 << order;
-       struct page *p = page + 1;
+-      struct page *p = page + 1;
  
        set_compound_page_dtor(page, free_compound_page);
        set_compound_order(page, order);
@@ -1144338,22 +1144269,40 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 -      for (i = 1; i < nr_pages; i++, p++) {
 -              if (unlikely((i & (MAX_ORDER_NR_PAGES - 1)) == 0))
 -                      p = pfn_to_page(page_to_pfn(page) + i);
-+      for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
++      for (i = 1; i < nr_pages; i++) {
++              struct page *p = page + i;
++
                __SetPageTail(p);
                p->first_page = page;
        }
  }
-+#endif
  
- static void destroy_compound_page(struct page *page, unsigned long order)
+-static void destroy_compound_page(struct page *page, unsigned long order)
++#ifdef CONFIG_HUGETLBFS
++void prep_compound_gigantic_page(struct page *page, unsigned long order)
  {
        int i;
        int nr_pages = 1 << order;
--      struct page *p = page + 1;
+       struct page *p = page + 1;
++
++      set_compound_page_dtor(page, free_compound_page);
++      set_compound_order(page, order);
++      __SetPageHead(page);
++      for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
++              __SetPageTail(p);
++              p->first_page = page;
++      }
++}
++#endif
++
++static void destroy_compound_page(struct page *page, unsigned long order)
++{
++      int i;
++      int nr_pages = 1 << order;
  
        if (unlikely(compound_order(page) != order))
                bad_page(page);
-@@ -293,9 +313,8 @@ static void destroy_compound_page(struct
+@@ -293,9 +313,8 @@
        if (unlikely(!PageHead(page)))
                        bad_page(page);
        __ClearPageHead(page);
@@ -1144365,7 +1144314,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
  
                if (unlikely(!PageTail(p) |
                                (p->first_page != page)))
-@@ -514,6 +533,14 @@ static void __free_pages_ok(struct page 
+@@ -514,6 +533,14 @@
        int i;
        int reserved = 0;
  
@@ -1144380,10 +1144329,11 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
        for (i = 0 ; i < (1 << order) ; ++i)
                reserved += free_pages_check(page + i);
        if (reserved)
-@@ -974,6 +1001,14 @@ static void free_hot_cold_page(struct pa
+@@ -973,6 +1000,14 @@
+       struct zone *zone = page_zone(page);
        struct per_cpu_pages *pcp;
        unsigned long flags;
++
 +#ifdef CONFIG_XEN
 +      if (PageForeign(page)) {
 +              PageForeignDestructor(page, 0);
@@ -1144391,11 +1144341,10 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 +      }
 +#endif
 +      trace_page_free(page, 0);
-+
        if (PageAnon(page))
                page->mapping = NULL;
-       if (free_pages_check(page))
-@@ -1103,14 +1138,6 @@ failed:
+@@ -1103,14 +1138,6 @@
        return NULL;
  }
  
@@ -1144410,7 +1144359,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
  #ifdef CONFIG_FAIL_PAGE_ALLOC
  
  static struct fail_page_alloc_attr {
-@@ -1223,7 +1250,7 @@ int zone_watermark_ok(struct zone *z, in
+@@ -1223,7 +1250,7 @@
        if (alloc_flags & ALLOC_HARDER)
                min -= min / 4;
  
@@ -1144419,19 +1144368,20 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
                return 0;
        for (o = 0; o < order; o++) {
                /* At the next order, this order's pages become unavailable */
-@@ -1412,8 +1439,10 @@ zonelist_scan:
+@@ -1412,8 +1439,10 @@
                }
  
                page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask);
 -              if (page)
+-                      break;
 +              if (page) {
 +                      page->reserve = !!(alloc_flags & ALLOC_NO_WATERMARKS);
-                       break;
++                      break;
 +              }
  this_zone_full:
                if (NUMA_BUILD)
                        zlc_mark_zone_full(zonelist, z);
-@@ -1435,6 +1464,47 @@ try_next_zone:
+@@ -1435,6 +1464,47 @@
  }
  
  /*
@@ -1144479,7 +1144429,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
   * This is the 'heart' of the zoned buddy allocator.
   */
  struct page *
-@@ -1449,7 +1519,7 @@ __alloc_pages_internal(gfp_t gfp_mask, u
+@@ -1449,7 +1519,7 @@
        struct reclaim_state reclaim_state;
        struct task_struct *p = current;
        int do_retry;
@@ -1144488,7 +1144438,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
        unsigned long did_some_progress;
        unsigned long pages_reclaimed = 0;
  
-@@ -1492,49 +1562,33 @@ restart:
+@@ -1492,55 +1562,43 @@
         * OK, we're below the kswapd watermark and have kicked background
         * reclaim. Now things get more complex, so set up alloc_flags according
         * to how we want to proceed.
@@ -1144497,7 +1144447,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 -       * cannot run direct reclaim, or if the caller has realtime scheduling
 -       * policy or is asking for __GFP_HIGH memory.  GFP_ATOMIC requests will
 -       * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH).
-        */
+-       */
 -      alloc_flags = ALLOC_WMARK_MIN;
 -      if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
 -              alloc_flags |= ALLOC_HARDER;
@@ -1144505,8 +1144455,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 -              alloc_flags |= ALLOC_HIGH;
 -      if (wait)
 -              alloc_flags |= ALLOC_CPUSET;
-+      alloc_flags = gfp_to_alloc_flags(gfp_mask);
+-
 -      /*
 -       * Go through the zonelist again. Let __GFP_HIGH and allocations
 -       * coming from realtime tasks go deeper into reserves.
@@ -1144515,6 +1144464,9 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 -       * Ignore cpuset if GFP_ATOMIC (!wait) rather than fail alloc.
 -       * See also cpuset_zone_allowed() comment in kernel/cpuset.c.
 -       */
++       */
++      alloc_flags = gfp_to_alloc_flags(gfp_mask);
++
 +      /* This is the last chance, in general, before the goto nopage. */
        page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist,
 -                                              high_zoneidx, alloc_flags);
@@ -1144555,18 +1144507,17 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
                }
                goto nopage;
        }
-@@ -1543,6 +1597,10 @@ nofail_alloc:
-       if (!wait)
-               goto nopage;
  
-+      /* Avoid recursion of direct reclaim */
-+      if (p->flags & PF_MEMALLOC)
+       /* Atomic allocations - we can't balance anything */
+       if (!wait)
 +              goto nopage;
 +
-       cond_resched();
++      /* Avoid recursion of direct reclaim */
++      if (p->flags & PF_MEMALLOC)
+               goto nopage;
  
-       /* We now go into synchronous reclaim */
-@@ -1631,13 +1689,20 @@ nofail_alloc:
+       cond_resched();
+@@ -1631,13 +1689,20 @@
  
  nopage:
        if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
@@ -1144589,7 +1144540,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
        return page;
  }
  EXPORT_SYMBOL(__alloc_pages_internal);
-@@ -1896,9 +1961,9 @@ void show_free_areas(void)
+@@ -1896,9 +1961,9 @@
                        "\n",
                        zone->name,
                        K(zone_page_state(zone, NR_FREE_PAGES)),
@@ -1144602,7 +1144553,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
                        K(zone_page_state(zone, NR_ACTIVE)),
                        K(zone_page_state(zone, NR_INACTIVE)),
                        K(zone->present_pages),
-@@ -4139,7 +4204,7 @@ static void calculate_totalreserve_pages
+@@ -4139,7 +4204,7 @@
                        }
  
                        /* we treat pages_high as reserved pages. */
@@ -1144611,7 +1144562,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
  
                        if (max > zone->present_pages)
                                max = zone->present_pages;
-@@ -4189,14 +4254,15 @@ static void setup_per_zone_lowmem_reserv
+@@ -4189,14 +4254,15 @@
  }
  
  /**
@@ -1144622,22 +1144573,24 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
   * with respect to min_free_kbytes.
   */
 -void setup_per_zone_pages_min(void)
-+static void __setup_per_zone_pages_min(void)
- {
+-{
 -      unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
++static void __setup_per_zone_pages_min(void)
++{
 +      unsigned pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
 +      unsigned pages_emerg = var_free_kbytes >> (PAGE_SHIFT - 10);
        unsigned long lowmem_pages = 0;
        struct zone *zone;
        unsigned long flags;
-@@ -4208,11 +4274,13 @@ void setup_per_zone_pages_min(void)
+@@ -4208,11 +4274,13 @@
        }
  
        for_each_zone(zone) {
 -              u64 tmp;
-+              u64 tmp, tmp_emerg;
+-
 -              spin_lock_irqsave(&zone->lru_lock, flags);
++              u64 tmp, tmp_emerg;
++
 +              spin_lock_irqsave(&zone->lock, flags);
                tmp = (u64)pages_min * zone->present_pages;
                do_div(tmp, lowmem_pages);
@@ -1144646,7 +1144599,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
                if (is_highmem(zone)) {
                        /*
                         * __GFP_HIGH and PF_MEMALLOC allocations usually don't
-@@ -4231,24 +4299,92 @@ void setup_per_zone_pages_min(void)
+@@ -4231,23 +4299,91 @@
                        if (min_pages > 128)
                                min_pages = 128;
                        zone->pages_min = min_pages;
@@ -1144670,7 +1144623,7 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
        /* update totalreserve_pages */
        calculate_totalreserve_pages();
  }
++
 +void setup_per_zone_pages_min(void)
 +{
 +      unsigned long flags;
@@ -1144736,11 +1144689,10 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
 +      return err;
 +}
 +EXPORT_SYMBOL_GPL(adjust_memalloc_reserve);
-+
  /*
   * Initialise min_free_kbytes.
-  *
-@@ -4284,7 +4420,7 @@ static int __init init_per_zone_pages_mi
+@@ -4284,7 +4420,7 @@
                min_free_kbytes = 128;
        if (min_free_kbytes > 65536)
                min_free_kbytes = 65536;
@@ -1144749,9 +1144701,9 @@ diff -purN linux-2.6.27/mm/page_alloc.c linux-2.6.27.19-5.1/mm/page_alloc.c
        setup_per_zone_lowmem_reserve();
        return 0;
  }
-diff -purN linux-2.6.27/mm/page_io.c linux-2.6.27.19-5.1/mm/page_io.c
---- linux-2.6.27/mm/page_io.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_io.c   2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/page_io.c
+--- a/mm/page_io.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_io.c     Wed May 06 16:57:03 2009 +0100
 @@ -17,6 +17,8 @@
  #include <linux/bio.h>
  #include <linux/swapops.h>
@@ -1144761,7 +1144713,7 @@ diff -purN linux-2.6.27/mm/page_io.c linux-2.6.27.19-5.1/mm/page_io.c
  #include <asm/pgtable.h>
  
  static struct bio *get_swap_bio(gfp_t gfp_flags, pgoff_t index,
-@@ -97,11 +99,23 @@ int swap_writepage(struct page *page, st
+@@ -97,11 +99,23 @@
  {
        struct bio *bio;
        int ret = 0, rw = WRITE;
@@ -1144785,7 +1144737,7 @@ diff -purN linux-2.6.27/mm/page_io.c linux-2.6.27.19-5.1/mm/page_io.c
        bio = get_swap_bio(GFP_NOIO, page_private(page), page,
                                end_swap_bio_write);
        if (bio == NULL) {
-@@ -114,19 +128,61 @@ int swap_writepage(struct page *page, st
+@@ -114,19 +128,61 @@
                rw |= (1 << BIO_RW_SYNC);
        count_vm_event(PSWPOUT);
        set_page_writeback(page);
@@ -1144847,10 +1144799,10 @@ diff -purN linux-2.6.27/mm/page_io.c linux-2.6.27.19-5.1/mm/page_io.c
        bio = get_swap_bio(GFP_KERNEL, page_private(page), page,
                                end_swap_bio_read);
        if (bio == NULL) {
-diff -purN linux-2.6.27/mm/page_isolation.c linux-2.6.27.19-5.1/mm/page_isolation.c
---- linux-2.6.27/mm/page_isolation.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/page_isolation.c    2009-03-25 16:11:31.000000000 +0000
-@@ -130,10 +130,11 @@ int test_pages_isolated(unsigned long st
+diff -r 9608d5473017 mm/page_isolation.c
+--- a/mm/page_isolation.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/page_isolation.c      Wed May 06 16:57:03 2009 +0100
+@@ -130,10 +130,11 @@
                if (page && get_pageblock_migratetype(page) != MIGRATE_ISOLATE)
                        break;
        }
@@ -1144864,10 +1144816,10 @@ diff -purN linux-2.6.27/mm/page_isolation.c linux-2.6.27.19-5.1/mm/page_isolatio
        spin_lock_irqsave(&zone->lock, flags);
        ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn);
        spin_unlock_irqrestore(&zone->lock, flags);
-diff -purN linux-2.6.27/mm/pdflush.c linux-2.6.27.19-5.1/mm/pdflush.c
---- linux-2.6.27/mm/pdflush.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/pdflush.c   2009-03-25 16:11:30.000000000 +0000
-@@ -223,6 +223,7 @@ int pdflush_operation(void (*fn)(unsigne
+diff -r 9608d5473017 mm/pdflush.c
+--- a/mm/pdflush.c     Wed May 06 15:47:13 2009 +0100
++++ b/mm/pdflush.c     Wed May 06 16:57:03 2009 +0100
+@@ -223,6 +223,7 @@
  
        return ret;
  }
@@ -1144875,9 +1144827,9 @@ diff -purN linux-2.6.27/mm/pdflush.c linux-2.6.27.19-5.1/mm/pdflush.c
  
  static void start_one_pdflush_thread(void)
  {
-diff -purN linux-2.6.27/mm/reserve.c linux-2.6.27.19-5.1/mm/reserve.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/reserve.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/reserve.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/mm/reserve.c     Wed May 06 16:57:03 2009 +0100
 @@ -0,0 +1,637 @@
 +/*
 + * Memory reserve management.
@@ -1145516,9 +1145468,9 @@ diff -purN linux-2.6.27/mm/reserve.c linux-2.6.27.19-5.1/mm/reserve.c
 +      __free_pages(page, order);
 +      mem_reserve_pages_charge(res, -(1 << order));
 +}
-diff -purN linux-2.6.27/mm/rmap.c linux-2.6.27.19-5.1/mm/rmap.c
---- linux-2.6.27/mm/rmap.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/rmap.c      2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/rmap.c
+--- a/mm/rmap.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/rmap.c        Wed May 06 16:57:03 2009 +0100
 @@ -55,7 +55,33 @@
  
  struct kmem_cache *anon_vma_cachep;
@@ -1145554,7 +1145506,7 @@ diff -purN linux-2.6.27/mm/rmap.c linux-2.6.27.19-5.1/mm/rmap.c
  int anon_vma_prepare(struct vm_area_struct *vma)
  {
        struct anon_vma *anon_vma = vma->anon_vma;
-@@ -63,20 +89,17 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -63,20 +89,17 @@
        might_sleep();
        if (unlikely(!anon_vma)) {
                struct mm_struct *mm = vma->vm_mm;
@@ -1145579,7 +1145531,7 @@ diff -purN linux-2.6.27/mm/rmap.c linux-2.6.27.19-5.1/mm/rmap.c
  
                /* page_table_lock to protect against threads */
                spin_lock(&mm->page_table_lock);
-@@ -87,8 +110,7 @@ int anon_vma_prepare(struct vm_area_stru
+@@ -87,8 +110,7 @@
                }
                spin_unlock(&mm->page_table_lock);
  
@@ -1145589,9 +1145541,9 @@ diff -purN linux-2.6.27/mm/rmap.c linux-2.6.27.19-5.1/mm/rmap.c
                if (unlikely(allocated))
                        anon_vma_free(allocated);
        }
-diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
---- linux-2.6.27/mm/slab.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slab.c      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/slab.c
+--- a/mm/slab.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/slab.c        Wed May 06 16:57:03 2009 +0100
 @@ -116,6 +116,8 @@
  #include      <asm/tlbflush.h>
  #include      <asm/page.h>
@@ -1145601,7 +1145553,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  /*
   * DEBUG      - 1 for kmem_cache_create() to honour; SLAB_RED_ZONE & SLAB_POISON.
   *              0 for faster, smaller code (especially in the critical paths).
-@@ -264,7 +266,8 @@ struct array_cache {
+@@ -264,7 +266,8 @@
        unsigned int avail;
        unsigned int limit;
        unsigned int batchcount;
@@ -1145611,7 +1145563,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        spinlock_t lock;
        void *entry[];  /*
                         * Must have this definition in here for the proper
-@@ -760,6 +763,27 @@ static inline struct array_cache *cpu_ca
+@@ -760,6 +763,27 @@
        return cachep->array[smp_processor_id()];
  }
  
@@ -1145639,7 +1145591,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  static inline struct kmem_cache *__find_general_cachep(size_t size,
                                                        gfp_t gfpflags)
  {
-@@ -959,6 +983,7 @@ static struct array_cache *alloc_arrayca
+@@ -959,6 +983,7 @@
                nc->limit = entries;
                nc->batchcount = batchcount;
                nc->touched = 0;
@@ -1145647,7 +1145599,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
                spin_lock_init(&nc->lock);
        }
        return nc;
-@@ -1661,7 +1686,8 @@ __initcall(cpucache_init);
+@@ -1661,7 +1686,8 @@
   * did not request dmaable memory, we might get it, but that
   * would be relatively rare and ignorable.
   */
@@ -1145657,7 +1145609,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  {
        struct page *page;
        int nr_pages;
-@@ -1683,6 +1709,7 @@ static void *kmem_getpages(struct kmem_c
+@@ -1683,6 +1709,7 @@
        if (!page)
                return NULL;
  
@@ -1145665,7 +1145617,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        nr_pages = (1 << cachep->gfporder);
        if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
                add_zone_page_state(page_zone(page),
-@@ -2103,6 +2130,7 @@ static int __init_refok setup_cpu_cache(
+@@ -2103,6 +2130,7 @@
        cpu_cache_get(cachep)->limit = BOOT_CPUCACHE_ENTRIES;
        cpu_cache_get(cachep)->batchcount = 1;
        cpu_cache_get(cachep)->touched = 0;
@@ -1145673,7 +1145625,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        cachep->batchcount = 1;
        cachep->limit = BOOT_CPUCACHE_ENTRIES;
        return 0;
-@@ -2608,7 +2636,7 @@ static struct slab *alloc_slabmgmt(struc
+@@ -2608,7 +2636,7 @@
        if (OFF_SLAB(cachep)) {
                /* Slab management obj is off-slab. */
                slabp = kmem_cache_alloc_node(cachep->slabp_cache,
@@ -1145682,7 +1145634,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
                if (!slabp)
                        return NULL;
        } else {
-@@ -2757,6 +2785,7 @@ static int cache_grow(struct kmem_cache 
+@@ -2757,6 +2785,7 @@
        size_t offset;
        gfp_t local_flags;
        struct kmem_list3 *l3;
@@ -1145690,7 +1145642,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  
        /*
         * Be lazy and only check for valid flags here,  keeping it out of the
-@@ -2795,7 +2824,7 @@ static int cache_grow(struct kmem_cache 
+@@ -2795,7 +2824,7 @@
         * 'nodeid'.
         */
        if (!objp)
@@ -1145699,7 +1145651,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        if (!objp)
                goto failed;
  
-@@ -2812,6 +2841,8 @@ static int cache_grow(struct kmem_cache 
+@@ -2812,6 +2841,8 @@
        if (local_flags & __GFP_WAIT)
                local_irq_disable();
        check_irq_off();
@@ -1145708,7 +1145660,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        spin_lock(&l3->list_lock);
  
        /* Make slab active. */
-@@ -2946,7 +2977,8 @@ bad:
+@@ -2946,7 +2977,8 @@
  #define check_slabp(x,y) do { } while(0)
  #endif
  
@@ -1145718,7 +1145670,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  {
        int batchcount;
        struct kmem_list3 *l3;
-@@ -2956,6 +2988,8 @@ static void *cache_alloc_refill(struct k
+@@ -2956,6 +2988,8 @@
  retry:
        check_irq_off();
        node = numa_node_id();
@@ -1145727,7 +1145679,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        ac = cpu_cache_get(cachep);
        batchcount = ac->batchcount;
        if (!ac->touched && batchcount > BATCHREFILL_LIMIT) {
-@@ -3023,11 +3057,14 @@ alloc_done:
+@@ -3023,11 +3057,14 @@
  
        if (unlikely(!ac->avail)) {
                int x;
@@ -1145743,7 +1145695,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
                        return NULL;
  
                if (!ac->avail)         /* objects refilled by interrupt? */
-@@ -3182,17 +3219,18 @@ static inline void *____cache_alloc(stru
+@@ -3182,17 +3219,18 @@
  {
        void *objp;
        struct array_cache *ac;
@@ -1145764,7 +1145716,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        }
        return objp;
  }
-@@ -3236,7 +3274,7 @@ static void *fallback_alloc(struct kmem_
+@@ -3236,7 +3274,7 @@
        struct zone *zone;
        enum zone_type high_zoneidx = gfp_zone(flags);
        void *obj = NULL;
@@ -1145773,7 +1145725,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  
        if (flags & __GFP_THISNODE)
                return NULL;
-@@ -3272,10 +3310,11 @@ retry:
+@@ -3272,10 +3310,11 @@
                if (local_flags & __GFP_WAIT)
                        local_irq_enable();
                kmem_flagcheck(cache, flags);
@@ -1145786,7 +1145738,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
                        /*
                         * Insert into the appropriate per node queues
                         */
-@@ -3314,6 +3353,9 @@ static void *____cache_alloc_node(struct
+@@ -3314,6 +3353,9 @@
        l3 = cachep->nodelists[nodeid];
        BUG_ON(!l3);
  
@@ -1145796,7 +1145748,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
  retry:
        check_irq_off();
        spin_lock(&l3->list_lock);
-@@ -3351,6 +3393,7 @@ retry:
+@@ -3351,6 +3393,7 @@
  
  must_grow:
        spin_unlock(&l3->list_lock);
@@ -1145804,7 +1145756,7 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
        x = cache_grow(cachep, flags | GFP_THISNODE, nodeid, NULL);
        if (x)
                goto retry;
-@@ -3803,6 +3846,81 @@ const char *kmem_cache_name(struct kmem_
+@@ -3803,6 +3846,81 @@
  EXPORT_SYMBOL_GPL(kmem_cache_name);
  
  /*
@@ -1145886,9 +1145838,9 @@ diff -purN linux-2.6.27/mm/slab.c linux-2.6.27.19-5.1/mm/slab.c
   * This initializes kmem_list3 or resizes various caches for all nodes.
   */
  static int alloc_kmemlist(struct kmem_cache *cachep)
-diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
---- linux-2.6.27/mm/slob.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slob.c      2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/slob.c
+--- a/mm/slob.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/slob.c        Wed May 06 16:57:03 2009 +0100
 @@ -66,6 +66,7 @@
  #include <linux/rcupdate.h>
  #include <linux/list.h>
@@ -1145897,7 +1145849,7 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
  
  /*
   * slob_block has a field 'units', which indicates size of block if +ve,
-@@ -183,6 +184,11 @@ struct slob_rcu {
+@@ -183,6 +184,11 @@
  static DEFINE_SPINLOCK(slob_lock);
  
  /*
@@ -1145909,7 +1145861,7 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
   * Encode the given size and next info into a free slob block s.
   */
  static void set_slob(slob_t *s, slobidx_t size, slob_t *next)
-@@ -232,7 +238,7 @@ static int slob_last(slob_t *s)
+@@ -232,7 +238,7 @@
  
  static void *slob_new_page(gfp_t gfp, int order, int node)
  {
@@ -1145918,16 +1145870,16 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
  
  #ifdef CONFIG_NUMA
        if (node != -1)
-@@ -244,6 +250,8 @@ static void *slob_new_page(gfp_t gfp, in
+@@ -243,6 +249,8 @@
        if (!page)
                return NULL;
-+      slob_reserve = page->reserve;
 +
++      slob_reserve = page->reserve;
        return page_address(page);
  }
-@@ -309,6 +317,11 @@ static void *slob_alloc(size_t size, gfp
+@@ -309,6 +317,11 @@
        slob_t *b = NULL;
        unsigned long flags;
  
@@ -1145939,7 +1145891,7 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
        if (size < SLOB_BREAK1)
                slob_list = &free_slob_small;
        else if (size < SLOB_BREAK2)
-@@ -347,6 +360,7 @@ static void *slob_alloc(size_t size, gfp
+@@ -347,6 +360,7 @@
        }
        spin_unlock_irqrestore(&slob_lock, flags);
  
@@ -1145947,7 +1145899,7 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
        /* Not enough space: must allocate a new page */
        if (!b) {
                b = slob_new_page(gfp & ~__GFP_ZERO, 0, node);
-@@ -645,3 +659,70 @@ void __init kmem_cache_init(void)
+@@ -645,3 +659,70 @@
  {
        slob_ready = 1;
  }
@@ -1146018,9 +1145970,9 @@ diff -purN linux-2.6.27/mm/slob.c linux-2.6.27.19-5.1/mm/slob.c
 +      return pages;
 +}
 +EXPORT_SYMBOL_GPL(kmalloc_estimate_bytes);
-diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
---- linux-2.6.27/mm/slub.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/slub.c      2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/slub.c
+--- a/mm/slub.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/slub.c        Wed May 06 16:57:03 2009 +0100
 @@ -23,6 +23,7 @@
  #include <linux/kallsyms.h>
  #include <linux/memory.h>
@@ -1146029,7 +1145981,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  
  /*
   * Lock order:
-@@ -1106,7 +1107,8 @@ static void setup_object(struct kmem_cac
+@@ -1106,7 +1107,8 @@
                s->ctor(object);
  }
  
@@ -1146039,16 +1145991,16 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  {
        struct page *page;
        void *start;
-@@ -1120,6 +1122,8 @@ static struct page *new_slab(struct kmem
+@@ -1119,6 +1121,8 @@
+               flags & (GFP_RECLAIM_MASK | GFP_CONSTRAINT_MASK), node);
        if (!page)
                goto out;
-+      *reserve = page->reserve;
 +
++      *reserve = page->reserve;
        inc_slabs_node(s, page_to_nid(page), page->objects);
        page->slab = s;
-       page->flags |= 1 << PG_slab;
-@@ -1503,10 +1507,20 @@ static void *__slab_alloc(struct kmem_ca
+@@ -1503,10 +1507,20 @@
  {
        void **object;
        struct page *new;
@@ -1146069,7 +1146021,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
        if (!c->page)
                goto new_slab;
  
-@@ -1520,8 +1534,8 @@ load_freelist:
+@@ -1520,8 +1534,8 @@
        object = c->page->freelist;
        if (unlikely(!object))
                goto another_slab;
@@ -1146080,7 +1146032,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  
        c->freelist = object[c->offset];
        c->page->inuse = c->page->objects;
-@@ -1543,16 +1557,18 @@ new_slab:
+@@ -1543,16 +1557,18 @@
                goto load_freelist;
        }
  
@@ -1146100,7 +1146052,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
                stat(c, ALLOC_SLAB);
                if (c->page)
                        flush_slab(s, c);
-@@ -1562,10 +1578,21 @@ new_slab:
+@@ -1562,9 +1578,20 @@
                goto load_freelist;
        }
        return NULL;
@@ -1146111,7 +1146063,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
 +      if (PageSlubDebug(c->page) &&
 +                      !alloc_debug_processing(s, c->page, object, addr))
                goto another_slab;
++
 +      /*
 +       * Avoid the slub fast path in slab_alloc() by not setting
 +       * c->freelist and the fast path in slab_free() by making
@@ -1146120,11 +1146072,10 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
 +       * We use this for for debug and reserve checks which need
 +       * to be done for each allocation.
 +       */
-+
        c->page->inuse++;
        c->page->freelist = object[c->offset];
-       c->node = -1;
-@@ -2078,10 +2105,11 @@ static struct kmem_cache_node *early_kme
+@@ -2078,10 +2105,11 @@
        struct page *page;
        struct kmem_cache_node *n;
        unsigned long flags;
@@ -1146137,10 +1146088,11 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  
        BUG_ON(!page);
        if (page_to_nid(page) != node) {
-@@ -2371,6 +2399,42 @@ const char *kmem_cache_name(struct kmem_
+@@ -2370,6 +2398,42 @@
+       return s->name;
  }
  EXPORT_SYMBOL(kmem_cache_name);
++
 +/*
 + * Calculate the upper bound of pages required to sequentially allocate
 + * @objects objects from @cachep.
@@ -1146176,11 +1146128,10 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
 +      return pages;
 +}
 +EXPORT_SYMBOL_GPL(kmem_alloc_estimate);
-+
  static void list_slab_objects(struct kmem_cache *s, struct page *page,
                                                        const char *text)
- {
-@@ -2662,6 +2726,7 @@ void *__kmalloc(size_t size, gfp_t flags
+@@ -2662,6 +2726,7 @@
  }
  EXPORT_SYMBOL(__kmalloc);
  
@@ -1146188,7 +1146139,7 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
  {
        struct page *page = alloc_pages_node(node, flags | __GFP_COMP,
-@@ -2673,7 +2738,6 @@ static void *kmalloc_large_node(size_t s
+@@ -2673,7 +2738,6 @@
                return NULL;
  }
  
@@ -1146196,10 +1146147,12 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
  void *__kmalloc_node(size_t size, gfp_t flags, int node)
  {
        struct kmem_cache *s;
-@@ -2748,6 +2812,57 @@ void kfree(const void *x)
+@@ -2746,6 +2810,57 @@
+       slab_free(page->slab, page, object, __builtin_return_address(0));
+ }
  EXPORT_SYMBOL(kfree);
- /*
++
++/*
 + * Calculate the upper bound of pages required to sequentially allocate
 + * @count objects of @size bytes from kmalloc given @flags.
 + */
@@ -1146249,15 +1146202,13 @@ diff -purN linux-2.6.27/mm/slub.c linux-2.6.27.19-5.1/mm/slub.c
 +      return pages;
 +}
 +EXPORT_SYMBOL_GPL(kmalloc_estimate_bytes);
-+
-+/*
+ /*
   * kmem_cache_shrink removes empty slabs from the partial lists and sorts
-  * the remaining slabs by the number of items in use. The slabs with the
-  * most items in use come first. New allocations will then fill those up
-diff -purN linux-2.6.27/mm/swap.c linux-2.6.27.19-5.1/mm/swap.c
---- linux-2.6.27/mm/swap.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swap.c      2009-03-25 16:11:30.000000000 +0000
-@@ -244,7 +244,6 @@ void lru_add_drain(void)
+diff -r 9608d5473017 mm/swap.c
+--- a/mm/swap.c        Wed May 06 15:47:13 2009 +0100
++++ b/mm/swap.c        Wed May 06 16:57:03 2009 +0100
+@@ -244,7 +244,6 @@
        put_cpu();
  }
  
@@ -1146265,10 +1146216,11 @@ diff -purN linux-2.6.27/mm/swap.c linux-2.6.27.19-5.1/mm/swap.c
  static void lru_add_drain_per_cpu(struct work_struct *dummy)
  {
        lru_add_drain();
-@@ -258,18 +257,6 @@ int lru_add_drain_all(void)
+@@ -257,18 +256,6 @@
+ {
        return schedule_on_each_cpu(lru_add_drain_per_cpu);
  }
+-
 -#else
 -
 -/*
@@ -1146280,13 +1146232,12 @@ diff -purN linux-2.6.27/mm/swap.c linux-2.6.27.19-5.1/mm/swap.c
 -      return 0;
 -}
 -#endif
--
  /*
   * Batched page_cache_release().  Decrement the reference count on all the
-  * passed pages.  If it fell to zero then remove the page from the LRU and
-diff -purN linux-2.6.27/mm/swap_state.c linux-2.6.27.19-5.1/mm/swap_state.c
---- linux-2.6.27/mm/swap_state.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swap_state.c        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 mm/swap_state.c
+--- a/mm/swap_state.c  Wed May 06 15:47:13 2009 +0100
++++ b/mm/swap_state.c  Wed May 06 16:57:03 2009 +0100
 @@ -27,8 +27,8 @@
   */
  static const struct address_space_operations swap_aops = {
@@ -1146298,9 +1146249,9 @@ diff -purN linux-2.6.27/mm/swap_state.c linux-2.6.27.19-5.1/mm/swap_state.c
        .migratepage    = migrate_page,
  };
  
-diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
---- linux-2.6.27/mm/swapfile.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/swapfile.c  2009-03-25 16:11:30.000000000 +0000
+diff -r 9608d5473017 mm/swapfile.c
+--- a/mm/swapfile.c    Wed May 06 15:47:13 2009 +0100
++++ b/mm/swapfile.c    Wed May 06 16:57:03 2009 +0100
 @@ -13,6 +13,10 @@
  #include <linux/swap.h>
  #include <linux/vmalloc.h>
@@ -1146320,7 +1146271,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
  
  static DEFINE_SPINLOCK(swap_lock);
  static unsigned int nr_swapfiles;
-@@ -1013,6 +1018,14 @@ static void destroy_swap_extents(struct 
+@@ -1013,6 +1018,14 @@
                list_del(&se->list);
                kfree(se);
        }
@@ -1146335,7 +1146286,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
  }
  
  /*
-@@ -1087,7 +1100,9 @@ add_swap_extent(struct swap_info_struct 
+@@ -1087,7 +1100,9 @@
   */
  static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
  {
@@ -1146346,7 +1146297,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
        unsigned blocks_per_page;
        unsigned long page_no;
        unsigned blkbits;
-@@ -1098,13 +1113,22 @@ static int setup_swap_extents(struct swa
+@@ -1098,10 +1113,19 @@
        int nr_extents = 0;
        int ret;
  
@@ -1146354,9 +1146305,9 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
        if (S_ISBLK(inode->i_mode)) {
                ret = add_swap_extent(sis, 0, sis->max, 0);
                *span = sis->pages;
-               goto done;
-       }
++              goto done;
++      }
++
 +      if (mapping->a_ops->swapon) {
 +              ret = mapping->a_ops->swapon(swap_file);
 +              if (!ret) {
@@ -1146364,13 +1146315,10 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
 +                      ret = add_swap_extent(sis, 0, sis->max, 0);
 +                      *span = sis->pages;
 +              }
-+              goto done;
-+      }
-+
-       blkbits = inode->i_blkbits;
-       blocks_per_page = PAGE_SIZE >> blkbits;
+               goto done;
+       }
  
-@@ -1204,7 +1228,7 @@ int page_queue_congested(struct page *pa
+@@ -1204,7 +1228,7 @@
  }
  #endif
  
@@ -1146379,7 +1146327,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
  {
        struct swap_info_struct * p = NULL;
        unsigned short *swap_map;
-@@ -1321,6 +1345,7 @@ asmlinkage long sys_swapoff(const char _
+@@ -1321,6 +1345,7 @@
        swap_map = p->swap_map;
        p->swap_map = NULL;
        p->flags = 0;
@@ -1146387,7 +1146335,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
        spin_unlock(&swap_lock);
        mutex_unlock(&swapon_mutex);
        vfree(swap_map);
-@@ -1448,7 +1473,7 @@ __initcall(procswaps_init);
+@@ -1448,7 +1473,7 @@
   *
   * The swapon system call
   */
@@ -1146396,7 +1146344,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
  {
        struct swap_info_struct * p;
        char *name = NULL;
-@@ -1677,7 +1702,7 @@ asmlinkage long sys_swapon(const char __
+@@ -1677,7 +1702,7 @@
        else
                p->prio = --least_priority;
        p->swap_map = swap_map;
@@ -1146405,7 +1146353,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
        nr_swap_pages += nr_good_pages;
        total_swap_pages += nr_good_pages;
  
-@@ -1700,6 +1725,7 @@ asmlinkage long sys_swapon(const char __
+@@ -1700,6 +1725,7 @@
        } else {
                swap_info[prev].next = p - swap_info;
        }
@@ -1146413,7 +1146361,7 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
        spin_unlock(&swap_lock);
        mutex_unlock(&swapon_mutex);
        error = 0;
-@@ -1750,6 +1776,24 @@ void si_swapinfo(struct sysinfo *val)
+@@ -1750,6 +1776,24 @@
        spin_unlock(&swap_lock);
  }
  
@@ -1146438,10 +1146386,11 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
  /*
   * Verify that a swap entry is valid and increment its swap map count.
   *
-@@ -1798,6 +1842,38 @@ get_swap_info_struct(unsigned type)
+@@ -1797,6 +1841,38 @@
+ {
        return &swap_info[type];
  }
++
 +struct swap_info_struct *page_swap_info(struct page *page)
 +{
 +      swp_entry_t swap = { .val = page_private(page) };
@@ -1146473,14 +1146422,13 @@ diff -purN linux-2.6.27/mm/swapfile.c linux-2.6.27.19-5.1/mm/swapfile.c
 +      return swp_offset(swap);
 +}
 +EXPORT_SYMBOL_GPL(__page_file_index);
-+
  /*
   * swap_lock prevents swap_map being freed. Don't grab an extra
-  * reference on the swaphandle, it doesn't matter if it becomes unused.
-diff -purN linux-2.6.27/mm/thrash.c linux-2.6.27.19-5.1/mm/thrash.c
---- linux-2.6.27/mm/thrash.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/thrash.c    2009-03-25 16:11:31.000000000 +0000
-@@ -31,6 +31,9 @@ void grab_swap_token(void)
+diff -r 9608d5473017 mm/thrash.c
+--- a/mm/thrash.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/thrash.c      Wed May 06 16:57:03 2009 +0100
+@@ -31,6 +31,9 @@
        int current_interval;
  
        global_faults++;
@@ -1146490,10 +1146438,10 @@ diff -purN linux-2.6.27/mm/thrash.c linux-2.6.27.19-5.1/mm/thrash.c
  
        current_interval = global_faults - current->mm->faultstamp;
  
-diff -purN linux-2.6.27/mm/vmstat.c linux-2.6.27.19-5.1/mm/vmstat.c
---- linux-2.6.27/mm/vmstat.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/mm/vmstat.c    2009-03-25 16:11:31.000000000 +0000
-@@ -692,9 +692,9 @@ static void zoneinfo_show_print(struct s
+diff -r 9608d5473017 mm/vmstat.c
+--- a/mm/vmstat.c      Wed May 06 15:47:13 2009 +0100
++++ b/mm/vmstat.c      Wed May 06 16:57:03 2009 +0100
+@@ -692,9 +692,9 @@
                   "\n        spanned  %lu"
                   "\n        present  %lu",
                   zone_page_state(zone, NR_FREE_PAGES),
@@ -1146506,10 +1146454,10 @@ diff -purN linux-2.6.27/mm/vmstat.c linux-2.6.27.19-5.1/mm/vmstat.c
                   zone->pages_scanned,
                   zone->nr_scan_active, zone->nr_scan_inactive,
                   zone->spanned_pages,
-diff -purN linux-2.6.27/net/8021q/vlan.c linux-2.6.27.19-5.1/net/8021q/vlan.c
---- linux-2.6.27/net/8021q/vlan.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan.c       2009-03-25 16:11:02.000000000 +0000
-@@ -394,6 +394,7 @@ static void vlan_transfer_features(struc
+diff -r 9608d5473017 net/8021q/vlan.c
+--- a/net/8021q/vlan.c Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan.c Wed May 06 16:57:03 2009 +0100
+@@ -394,6 +394,7 @@
  
        vlandev->features &= ~dev->vlan_features;
        vlandev->features |= dev->features & dev->vlan_features;
@@ -1146517,9 +1146465,9 @@ diff -purN linux-2.6.27/net/8021q/vlan.c linux-2.6.27.19-5.1/net/8021q/vlan.c
  
        if (old_features != vlandev->features)
                netdev_features_change(vlandev);
-diff -purN linux-2.6.27/net/8021q/vlan_core.c linux-2.6.27.19-5.1/net/8021q/vlan_core.c
---- linux-2.6.27/net/8021q/vlan_core.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan_core.c  2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/8021q/vlan_core.c
+--- a/net/8021q/vlan_core.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan_core.c    Wed May 06 16:57:03 2009 +0100
 @@ -3,11 +3,20 @@
  #include <linux/if_vlan.h>
  #include "vlan.h"
@@ -1146542,7 +1146490,7 @@ diff -purN linux-2.6.27/net/8021q/vlan_core.c linux-2.6.27.19-5.1/net/8021q/vlan
  
        if (skb_bond_should_drop(skb)) {
                dev_kfree_skb_any(skb);
-@@ -15,23 +24,35 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
+@@ -15,23 +24,35 @@
        }
  
        skb->vlan_tci = vlan_tci;
@@ -1146587,7 +1146535,7 @@ diff -purN linux-2.6.27/net/8021q/vlan_core.c linux-2.6.27.19-5.1/net/8021q/vlan
        switch (skb->pkt_type) {
        case PACKET_BROADCAST:
                break;
-@@ -43,13 +64,12 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
+@@ -43,13 +64,12 @@
                 * This allows the VLAN to have a different MAC than the
                 * underlying device, and still route correctly. */
                if (!compare_ether_addr(eth_hdr(skb)->h_dest,
@@ -1146603,10 +1146551,10 @@ diff -purN linux-2.6.27/net/8021q/vlan_core.c linux-2.6.27.19-5.1/net/8021q/vlan
  
  struct net_device *vlan_dev_real_dev(const struct net_device *dev)
  {
-diff -purN linux-2.6.27/net/8021q/vlan_dev.c linux-2.6.27.19-5.1/net/8021q/vlan_dev.c
---- linux-2.6.27/net/8021q/vlan_dev.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/8021q/vlan_dev.c   2009-03-25 16:11:02.000000000 +0000
-@@ -607,6 +607,7 @@ static int vlan_dev_init(struct net_devi
+diff -r 9608d5473017 net/8021q/vlan_dev.c
+--- a/net/8021q/vlan_dev.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/8021q/vlan_dev.c     Wed May 06 16:57:03 2009 +0100
+@@ -607,6 +607,7 @@
                      (1<<__LINK_STATE_PRESENT);
  
        dev->features |= real_dev->features & real_dev->vlan_features;
@@ -1146614,10 +1146562,10 @@ diff -purN linux-2.6.27/net/8021q/vlan_dev.c linux-2.6.27.19-5.1/net/8021q/vlan_
  
        /* ipv6 shared card related stuff */
        dev->dev_id = real_dev->dev_id;
-diff -purN linux-2.6.27/net/Kconfig linux-2.6.27.19-5.1/net/Kconfig
---- linux-2.6.27/net/Kconfig   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/Kconfig    2009-03-25 16:11:00.000000000 +0000
-@@ -190,6 +190,7 @@ source "net/lapb/Kconfig"
+diff -r 9608d5473017 net/Kconfig
+--- a/net/Kconfig      Wed May 06 15:47:13 2009 +0100
++++ b/net/Kconfig      Wed May 06 16:57:04 2009 +0100
+@@ -190,6 +190,7 @@
  source "net/econet/Kconfig"
  source "net/wanrouter/Kconfig"
  source "net/sched/Kconfig"
@@ -1146625,7 +1146573,7 @@ diff -purN linux-2.6.27/net/Kconfig linux-2.6.27.19-5.1/net/Kconfig
  
  menu "Network testing"
  
-@@ -248,4 +249,7 @@ endmenu
+@@ -248,4 +249,7 @@
  source "net/rfkill/Kconfig"
  source "net/9p/Kconfig"
  
@@ -1146633,10 +1146581,10 @@ diff -purN linux-2.6.27/net/Kconfig linux-2.6.27.19-5.1/net/Kconfig
 +      def_bool n
 +
  endif   # if NET
-diff -purN linux-2.6.27/net/Makefile linux-2.6.27.19-5.1/net/Makefile
---- linux-2.6.27/net/Makefile  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/Makefile   2009-03-25 16:11:02.000000000 +0000
-@@ -55,6 +55,9 @@ obj-$(CONFIG_NETLABEL)               += netlabel/
+diff -r 9608d5473017 net/Makefile
+--- a/net/Makefile     Wed May 06 15:47:13 2009 +0100
++++ b/net/Makefile     Wed May 06 16:57:04 2009 +0100
+@@ -55,6 +55,9 @@
  obj-$(CONFIG_IUCV)            += iucv/
  obj-$(CONFIG_RFKILL)          += rfkill/
  obj-$(CONFIG_NET_9P)          += 9p/
@@ -1146646,10 +1146594,10 @@ diff -purN linux-2.6.27/net/Makefile linux-2.6.27.19-5.1/net/Makefile
  
  ifeq ($(CONFIG_NET),y)
  obj-$(CONFIG_SYSCTL)          += sysctl_net.o
-diff -purN linux-2.6.27/net/atm/svc.c linux-2.6.27.19-5.1/net/atm/svc.c
---- linux-2.6.27/net/atm/svc.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/atm/svc.c  2009-03-25 16:11:02.000000000 +0000
-@@ -293,7 +293,10 @@ static int svc_listen(struct socket *soc
+diff -r 9608d5473017 net/atm/svc.c
+--- a/net/atm/svc.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/atm/svc.c    Wed May 06 16:57:04 2009 +0100
+@@ -293,7 +293,10 @@
                error = -EINVAL;
                goto out;
        }
@@ -1146661,7 +1146609,7 @@ diff -purN linux-2.6.27/net/atm/svc.c linux-2.6.27.19-5.1/net/atm/svc.c
        set_bit(ATM_VF_WAITING, &vcc->flags);
        prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
        sigd_enq(vcc,as_listen,NULL,NULL,&vcc->local);
-@@ -307,6 +310,7 @@ static int svc_listen(struct socket *soc
+@@ -307,6 +310,7 @@
                goto out;
        }
        set_bit(ATM_VF_LISTEN,&vcc->flags);
@@ -1146669,10 +1146617,10 @@ diff -purN linux-2.6.27/net/atm/svc.c linux-2.6.27.19-5.1/net/atm/svc.c
        sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT;
        error = -sk->sk_err;
  out:
-diff -purN linux-2.6.27/net/bluetooth/hidp/core.c linux-2.6.27.19-5.1/net/bluetooth/hidp/core.c
---- linux-2.6.27/net/bluetooth/hidp/core.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/bluetooth/hidp/core.c      2009-03-25 16:11:00.000000000 +0000
-@@ -684,6 +684,10 @@ static const struct {
+diff -r 9608d5473017 net/bluetooth/hidp/core.c
+--- a/net/bluetooth/hidp/core.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/bluetooth/hidp/core.c        Wed May 06 16:57:04 2009 +0100
+@@ -684,6 +684,10 @@
  } hidp_blacklist[] = {
        /* Apple wireless Mighty Mouse */
        { 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
@@ -1146683,10 +1146631,10 @@ diff -purN linux-2.6.27/net/bluetooth/hidp/core.c linux-2.6.27.19-5.1/net/blueto
  
        { }     /* Terminating entry */
  };
-diff -purN linux-2.6.27/net/bridge/br_if.c linux-2.6.27.19-5.1/net/bridge/br_if.c
---- linux-2.6.27/net/bridge/br_if.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/bridge/br_if.c     2009-03-25 16:11:02.000000000 +0000
-@@ -271,6 +271,11 @@ int br_add_bridge(const char *name)
+diff -r 9608d5473017 net/bridge/br_if.c
+--- a/net/bridge/br_if.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/bridge/br_if.c       Wed May 06 16:57:04 2009 +0100
+@@ -271,6 +271,11 @@
        if (!dev)
                return -ENOMEM;
  
@@ -1146698,7 +1146646,7 @@ diff -purN linux-2.6.27/net/bridge/br_if.c linux-2.6.27.19-5.1/net/bridge/br_if.
        rtnl_lock();
        if (strchr(dev->name, '%')) {
                ret = dev_alloc_name(dev, dev->name);
-@@ -287,6 +292,8 @@ int br_add_bridge(const char *name)
+@@ -287,6 +292,8 @@
                unregister_netdevice(dev);
   out:
        rtnl_unlock();
@@ -1146707,7 +1146655,7 @@ diff -purN linux-2.6.27/net/bridge/br_if.c linux-2.6.27.19-5.1/net/bridge/br_if.
        return ret;
  
  out_free:
-@@ -318,6 +325,8 @@ int br_del_bridge(const char *name)
+@@ -318,6 +325,8 @@
                del_br(netdev_priv(dev));
  
        rtnl_unlock();
@@ -1146716,10 +1146664,10 @@ diff -purN linux-2.6.27/net/bridge/br_if.c linux-2.6.27.19-5.1/net/bridge/br_if.
        return ret;
  }
  
-diff -purN linux-2.6.27/net/can/af_can.c linux-2.6.27.19-5.1/net/can/af_can.c
---- linux-2.6.27/net/can/af_can.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/can/af_can.c       2009-03-25 16:11:02.000000000 +0000
-@@ -319,23 +319,52 @@ static struct dev_rcv_lists *find_dev_rc
+diff -r 9608d5473017 net/can/af_can.c
+--- a/net/can/af_can.c Wed May 06 15:47:13 2009 +0100
++++ b/net/can/af_can.c Wed May 06 16:57:04 2009 +0100
+@@ -319,23 +319,52 @@
        return n ? d : NULL;
  }
  
@@ -1146779,7 +1146727,7 @@ diff -purN linux-2.6.27/net/can/af_can.c linux-2.6.27.19-5.1/net/can/af_can.c
  
        /* reduce condition testing at receive time */
        *can_id &= *mask;
-@@ -348,15 +377,19 @@ static struct hlist_head *find_rcv_list(
+@@ -348,15 +377,19 @@
        if (!(*mask))
                return &d->rx[RX_ALL];
  
@@ -1146807,7 +1146755,7 @@ diff -purN linux-2.6.27/net/can/af_can.c linux-2.6.27.19-5.1/net/can/af_can.c
        }
  
        /* default: filter via can_id/can_mask */
-@@ -589,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv
+@@ -589,7 +622,10 @@
                }
        }
  
@@ -1146819,9 +1146767,9 @@ diff -purN linux-2.6.27/net/can/af_can.c linux-2.6.27.19-5.1/net/can/af_can.c
        if (can_id & CAN_EFF_FLAG) {
                hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
                        if (r->can_id == can_id) {
-diff -purN linux-2.6.27/net/can/bcm.c linux-2.6.27.19-5.1/net/can/bcm.c
---- linux-2.6.27/net/can/bcm.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/can/bcm.c  2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/can/bcm.c
+--- a/net/can/bcm.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/can/bcm.c    Wed May 06 16:57:04 2009 +0100
 @@ -64,10 +64,11 @@
  #define BCM_CAN_DLC_MASK 0x0F /* clean private flags in can_dlc by masking */
  
@@ -1146837,27 +1146785,26 @@ diff -purN linux-2.6.27/net/can/bcm.c linux-2.6.27.19-5.1/net/can/bcm.c
  static __initdata const char banner[] = KERN_INFO
        "can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n";
  
-diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
---- linux-2.6.27/net/core/dev.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/dev.c 2009-03-25 16:11:01.000000000 +0000
-@@ -127,9 +127,16 @@
+diff -r 9608d5473017 net/core/dev.c
+--- a/net/core/dev.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/core/dev.c   Wed May 06 16:57:04 2009 +0100
+@@ -127,8 +127,15 @@
  #include <linux/in.h>
  #include <linux/jhash.h>
  #include <linux/random.h>
 +#include <trace/net.h>
  
  #include "net-sysfs.h"
++
 +#if defined(CONFIG_XEN) || defined(CONFIG_PARAVIRT_XEN)
 +#include <net/ip.h>
 +#include <linux/tcp.h>
 +#include <linux/udp.h>
 +#endif
-+
  /*
   *    The list of packet types we will receive (as opposed to discard)
-  *    and the routines to invoke.
-@@ -922,7 +929,11 @@ int dev_change_name(struct net_device *d
+@@ -922,7 +929,11 @@
        else if (__dev_get_by_name(net, newname))
                return -EEXIST;
        else
@@ -1146869,7 +1146816,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
  
  rollback:
        err = device_rename(&dev->dev, dev->name);
-@@ -1729,6 +1740,58 @@ static struct netdev_queue *dev_pick_tx(
+@@ -1729,6 +1740,58 @@
        return netdev_get_tx_queue(dev, queue_index);
  }
  
@@ -1146928,20 +1146875,20 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
  /**
   *    dev_queue_xmit - transmit a buffer
   *    @skb: buffer to transmit
-@@ -1761,6 +1824,12 @@ int dev_queue_xmit(struct sk_buff *skb)
+@@ -1760,6 +1823,12 @@
+       struct netdev_queue *txq;
        struct Qdisc *q;
        int rc = -ENOMEM;
++
 +      /* If a checksum-deferred packet is forwarded to a device that needs a
 +       * checksum, correct the pointers and force checksumming.
 +       */
 +      if (skb_checksum_setup(skb))
 +              goto out_kfree_skb;
-+
        /* GSO will handle the following emulations directly. */
        if (netif_needs_gso(dev, skb))
-               goto gso;
-@@ -1790,6 +1859,7 @@ int dev_queue_xmit(struct sk_buff *skb)
+@@ -1790,6 +1859,7 @@
        }
  
  gso:
@@ -1146949,7 +1146896,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
        /* Disable soft irqs for various locks below. Also
         * stops preemption for RCU.
         */
-@@ -2164,6 +2234,30 @@ void netif_nit_deliver(struct sk_buff *s
+@@ -2164,6 +2234,30 @@
        rcu_read_unlock();
  }
  
@@ -1146980,7 +1146927,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
  /**
   *    netif_receive_skb - process receive buffer from network
   *    @skb: buffer to process
-@@ -2186,10 +2280,26 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2186,10 +2280,26 @@
        struct net_device *null_or_orig;
        int ret = NET_RX_DROP;
        __be16 type;
@@ -1147008,7 +1146955,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
  
        if (!skb->tstamp.tv64)
                net_timestamp(skb);
-@@ -2208,6 +2318,7 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2208,6 +2318,7 @@
  
        __get_cpu_var(netdev_rx_stat).total++;
  
@@ -1147016,10 +1146963,11 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
        skb_reset_network_header(skb);
        skb_reset_transport_header(skb);
        skb->mac_len = skb->network_header - skb->mac_header;
-@@ -2227,6 +2338,22 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2226,6 +2337,22 @@
+               goto ncls;
        }
  #endif
++
 +#ifdef CONFIG_XEN
 +      switch (skb->ip_summed) {
 +      case CHECKSUM_UNNECESSARY:
@@ -1147035,11 +1146983,10 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
 +
 +      if (skb_emergency(skb))
 +              goto skip_taps;
-+
        list_for_each_entry_rcu(ptype, &ptype_all, list) {
                if (ptype->dev == null_or_orig || ptype->dev == skb->dev ||
-                   ptype->dev == orig_dev) {
-@@ -2236,19 +2363,23 @@ int netif_receive_skb(struct sk_buff *sk
+@@ -2236,19 +2363,23 @@
                }
        }
  
@@ -1147051,10 +1146998,10 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
 +              goto unlock;
  ncls:
  #endif
++
 +      if (!skb_emergency_protocol(skb))
 +              goto drop;
-+
        skb = handle_bridge(skb, &pt_prev, &ret, orig_dev);
        if (!skb)
 -              goto out;
@@ -1147066,7 +1147013,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
  
        type = skb->protocol;
        list_for_each_entry_rcu(ptype,
-@@ -2265,6 +2396,7 @@ ncls:
+@@ -2265,6 +2396,7 @@
        if (pt_prev) {
                ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
        } else {
@@ -1147074,7 +1147021,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
                kfree_skb(skb);
                /* Jamal, now you will not able to escape explaining
                 * me how you were going to use this. :-)
-@@ -2272,8 +2404,10 @@ ncls:
+@@ -2272,8 +2404,10 @@
                ret = NET_RX_DROP;
        }
  
@@ -1147086,7 +1147033,7 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
        return ret;
  }
  
-@@ -3990,7 +4124,7 @@ int register_netdevice(struct net_device
+@@ -3990,7 +4124,7 @@
                dev->features &= ~NETIF_F_TSO;
        }
        if (dev->features & NETIF_F_UFO) {
@@ -1147095,23 +1147042,23 @@ diff -purN linux-2.6.27/net/core/dev.c linux-2.6.27.19-5.1/net/core/dev.c
                        printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no "
                                        "NETIF_F_HW_CSUM feature.\n",
                                                        dev->name);
-diff -purN linux-2.6.27/net/core/filter.c linux-2.6.27.19-5.1/net/core/filter.c
---- linux-2.6.27/net/core/filter.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/filter.c      2009-03-25 16:11:01.000000000 +0000
-@@ -81,6 +81,9 @@ int sk_filter(struct sock *sk, struct sk
+diff -r 9608d5473017 net/core/filter.c
+--- a/net/core/filter.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/core/filter.c        Wed May 06 16:57:04 2009 +0100
+@@ -80,6 +80,9 @@
+ {
        int err;
        struct sk_filter *filter;
++
 +      if (skb_emergency(skb) && !sk_has_memalloc(sk))
 +              return -ENOMEM;
-+
        err = security_sock_rcv_skb(sk, skb);
        if (err)
-               return err;
-diff -purN linux-2.6.27/net/core/scm.c linux-2.6.27.19-5.1/net/core/scm.c
---- linux-2.6.27/net/core/scm.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/scm.c 2009-03-25 16:11:01.000000000 +0000
-@@ -75,6 +75,7 @@ static int scm_fp_copy(struct cmsghdr *c
+diff -r 9608d5473017 net/core/scm.c
+--- a/net/core/scm.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/core/scm.c   Wed May 06 16:57:04 2009 +0100
+@@ -75,6 +75,7 @@
                if (!fpl)
                        return -ENOMEM;
                *fplp = fpl;
@@ -1147119,7 +1147066,7 @@ diff -purN linux-2.6.27/net/core/scm.c linux-2.6.27.19-5.1/net/core/scm.c
                fpl->count = 0;
        }
        fpp = &fpl->fp[fpl->count];
-@@ -106,9 +107,25 @@ void __scm_destroy(struct scm_cookie *sc
+@@ -106,9 +107,25 @@
  
        if (fpl) {
                scm->fp = NULL;
@@ -1147148,7 +1147095,7 @@ diff -purN linux-2.6.27/net/core/scm.c linux-2.6.27.19-5.1/net/core/scm.c
        }
  }
  
-@@ -284,6 +301,7 @@ struct scm_fp_list *scm_fp_dup(struct sc
+@@ -284,6 +301,7 @@
  
        new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);
        if (new_fpl) {
@@ -1147156,10 +1147103,10 @@ diff -purN linux-2.6.27/net/core/scm.c linux-2.6.27.19-5.1/net/core/scm.c
                for (i=fpl->count-1; i>=0; i--)
                        get_file(fpl->fp[i]);
                memcpy(new_fpl, fpl, sizeof(*fpl));
-diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
---- linux-2.6.27/net/core/skbuff.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/skbuff.c      2009-03-25 16:11:01.000000000 +0000
-@@ -73,17 +73,13 @@ static struct kmem_cache *skbuff_fclone_
+diff -r 9608d5473017 net/core/skbuff.c
+--- a/net/core/skbuff.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/core/skbuff.c        Wed May 06 16:57:04 2009 +0100
+@@ -73,17 +73,13 @@
  static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
                                  struct pipe_buffer *buf)
  {
@@ -1147179,7 +1147126,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  }
  
  static int sock_pipe_buf_steal(struct pipe_inode_info *pipe,
-@@ -177,23 +173,29 @@ EXPORT_SYMBOL(skb_truesize_bug);
+@@ -177,23 +173,29 @@
   *    %GFP_ATOMIC.
   */
  struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
@@ -1147192,12 +1147139,12 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        u8 *data;
 +      int emergency = 0;
 +      int memalloc = sk_memalloc_socks();
-+
+-      cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
 +      size = SKB_DATA_ALIGN(size);
 +      cache = (flags & SKB_ALLOC_FCLONE)
 +              ? skbuff_fclone_cache : skbuff_head_cache;
--      cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
++
 +      if (memalloc && (flags & SKB_ALLOC_RX))
 +              gfp_mask |= __GFP_MEMALLOC;
  
@@ -1147214,7 +1147161,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        if (!data)
                goto nodata;
  
-@@ -203,6 +205,9 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -203,6 +205,9 @@
         * the tail pointer in struct sk_buff!
         */
        memset(skb, 0, offsetof(struct sk_buff, tail));
@@ -1147224,7 +1147171,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        skb->truesize = size + sizeof(struct sk_buff);
        atomic_set(&skb->users, 1);
        skb->head = data;
-@@ -219,7 +224,7 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -219,7 +224,7 @@
        shinfo->ip6_frag_id = 0;
        shinfo->frag_list = NULL;
  
@@ -1147233,7 +1147180,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                struct sk_buff *child = skb + 1;
                atomic_t *fclone_ref = (atomic_t *) (child + 1);
  
-@@ -227,6 +232,9 @@ struct sk_buff *__alloc_skb(unsigned int
+@@ -227,6 +232,9 @@
                atomic_set(fclone_ref, 1);
  
                child->fclone = SKB_FCLONE_UNAVAILABLE;
@@ -1147243,7 +1147190,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        }
  out:
        return skb;
-@@ -255,7 +263,7 @@ struct sk_buff *__netdev_alloc_skb(struc
+@@ -255,13 +263,62 @@
        int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
        struct sk_buff *skb;
  
@@ -1147252,10 +1147199,10 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        if (likely(skb)) {
                skb_reserve(skb, NET_SKB_PAD);
                skb->dev = dev;
-@@ -263,6 +271,55 @@ struct sk_buff *__netdev_alloc_skb(struc
+       }
        return skb;
  }
++
 +struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
 +{
 +      int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
@@ -1147304,11 +1147251,10 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
 +#endif
 +}
 +EXPORT_SYMBOL(skb_add_rx_frag);
-+
  /**
   *    dev_alloc_skb - allocate an skbuff for receiving
-  *    @length: length to allocate
-@@ -311,21 +368,38 @@ static void skb_clone_fraglist(struct sk
+@@ -311,21 +368,38 @@
                skb_get(list);
  }
  
@@ -1147350,7 +1147296,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        }
  }
  
-@@ -446,6 +520,9 @@ static void __copy_skb_header(struct sk_
+@@ -446,6 +520,9 @@
  #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
        new->ipvs_property      = old->ipvs_property;
  #endif
@@ -1147360,7 +1147306,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        new->protocol           = old->protocol;
        new->mark               = old->mark;
        __nf_copy(new, old);
-@@ -478,6 +555,10 @@ static struct sk_buff *__skb_clone(struc
+@@ -478,6 +555,10 @@
        n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
        n->cloned = 1;
        n->nohdr = 0;
@@ -1147371,7 +1147317,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        n->destructor = NULL;
        C(iif);
        C(tail);
-@@ -539,6 +620,9 @@ struct sk_buff *skb_clone(struct sk_buff
+@@ -539,6 +620,9 @@
                n->fclone = SKB_FCLONE_CLONE;
                atomic_inc(fclone_ref);
        } else {
@@ -1147381,7 +1147327,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                n = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
                if (!n)
                        return NULL;
-@@ -570,6 +654,14 @@ static void copy_skb_header(struct sk_bu
+@@ -570,6 +654,14 @@
        skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
  }
  
@@ -1147396,7 +1147342,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  /**
   *    skb_copy        -       create private copy of an sk_buff
   *    @skb: buffer to copy
-@@ -590,15 +682,17 @@ static void copy_skb_header(struct sk_bu
+@@ -590,15 +682,17 @@
  struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
  {
        int headerlen = skb->data - skb->head;
@@ -1147416,7 +1147362,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        if (!n)
                return NULL;
  
-@@ -633,12 +727,14 @@ struct sk_buff *pskb_copy(struct sk_buff
+@@ -633,12 +727,14 @@
        /*
         *      Allocate the copy buffer
         */
@@ -1147433,7 +1147379,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        if (!n)
                goto out;
  
-@@ -657,8 +753,9 @@ struct sk_buff *pskb_copy(struct sk_buff
+@@ -657,8 +753,9 @@
                int i;
  
                for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
@@ -1147445,7 +1147391,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                }
                skb_shinfo(n)->nr_frags = i;
        }
-@@ -706,7 +803,11 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -706,7 +803,11 @@
  
        size = SKB_DATA_ALIGN(size);
  
@@ -1147458,7 +1147404,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        if (!data)
                goto nodata;
  
-@@ -721,7 +822,7 @@ int pskb_expand_head(struct sk_buff *skb
+@@ -721,7 +822,7 @@
               sizeof(struct skb_shared_info));
  
        for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
@@ -1147467,7 +1147413,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  
        if (skb_shinfo(skb)->frag_list)
                skb_clone_fraglist(skb);
-@@ -800,8 +901,8 @@ struct sk_buff *skb_copy_expand(const st
+@@ -800,8 +901,8 @@
        /*
         *      Allocate the copy buffer
         */
@@ -1147478,7 +1147424,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        int oldheadroom = skb_headroom(skb);
        int head_copy_len, head_copy_off;
        int off;
-@@ -990,7 +1091,7 @@ drop_pages:
+@@ -990,7 +1091,7 @@
                skb_shinfo(skb)->nr_frags = i;
  
                for (; i < nfrags; i++)
@@ -1147487,7 +1147433,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  
                if (skb_shinfo(skb)->frag_list)
                        skb_drop_fraglist(skb);
-@@ -1159,7 +1260,7 @@ pull_pages:
+@@ -1159,7 +1260,7 @@
        k = 0;
        for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
                if (skb_shinfo(skb)->frags[i].size <= eat) {
@@ -1147496,7 +1147442,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                        eat -= skb_shinfo(skb)->frags[i].size;
                } else {
                        skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
-@@ -1262,9 +1363,19 @@ fault:
+@@ -1262,9 +1363,19 @@
   */
  static void sock_spd_release(struct splice_pipe_desc *spd, unsigned int i)
  {
@@ -1147518,7 +1147464,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  }
  
  /*
-@@ -1272,16 +1383,23 @@ static void sock_spd_release(struct spli
+@@ -1272,16 +1383,23 @@
   */
  static inline int spd_fill_page(struct splice_pipe_desc *spd, struct page *page,
                                unsigned int len, unsigned int offset,
@@ -1147544,7 +1147490,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
        return 0;
  }
  
-@@ -1297,7 +1415,7 @@ static inline void __segment_seek(struct
+@@ -1297,7 +1415,7 @@
  static inline int __splice_segment(struct page *page, unsigned int poff,
                                   unsigned int plen, unsigned int *off,
                                   unsigned int *len, struct sk_buff *skb,
@@ -1147553,7 +1147499,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  {
        if (!*len)
                return 1;
-@@ -1320,7 +1438,7 @@ static inline int __splice_segment(struc
+@@ -1320,7 +1438,7 @@
                /* the linear region may spread across several pages  */
                flen = min_t(unsigned int, flen, PAGE_SIZE - poff);
  
@@ -1147562,7 +1147508,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                        return 1;
  
                __segment_seek(&page, &poff, &plen, flen);
-@@ -1347,7 +1465,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1347,7 +1465,7 @@
        if (__splice_segment(virt_to_page(skb->data),
                             (unsigned long) skb->data & (PAGE_SIZE - 1),
                             skb_headlen(skb),
@@ -1147571,7 +1147517,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                return 1;
  
        /*
-@@ -1357,7 +1475,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1357,7 +1475,7 @@
                const skb_frag_t *f = &skb_shinfo(skb)->frags[seg];
  
                if (__splice_segment(f->page, f->page_offset, f->size,
@@ -1147580,7 +1147526,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                        return 1;
        }
  
-@@ -1370,7 +1488,7 @@ static int __skb_splice_bits(struct sk_b
+@@ -1370,7 +1488,7 @@
   * the frag list, if such a thing exists. We'd probably need to recurse to
   * handle that cleanly.
   */
@@ -1147589,7 +1147535,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                    struct pipe_inode_info *pipe, unsigned int tlen,
                    unsigned int flags)
  {
-@@ -1383,16 +1501,6 @@ int skb_splice_bits(struct sk_buff *__sk
+@@ -1383,16 +1501,6 @@
                .ops = &sock_pipe_buf_ops,
                .spd_release = sock_spd_release,
        };
@@ -1147606,7 +1147552,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  
        /*
         * __skb_splice_bits() only fails if the output has no room left,
-@@ -1416,15 +1524,9 @@ int skb_splice_bits(struct sk_buff *__sk
+@@ -1416,15 +1524,9 @@
        }
  
  done:
@@ -1147623,7 +1147569,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
  
                /*
                 * Drop the socket lock, otherwise we have reverse
-@@ -1908,6 +2010,7 @@ static inline void skb_split_no_header(s
+@@ -1908,6 +2010,7 @@
                        skb_shinfo(skb1)->frags[k] = skb_shinfo(skb)->frags[i];
  
                        if (pos < len) {
@@ -1147631,7 +1147577,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                                /* Split frag.
                                 * We have two variants in this case:
                                 * 1. Move all the frag to the second
-@@ -1916,7 +2019,7 @@ static inline void skb_split_no_header(s
+@@ -1916,7 +2019,7 @@
                                 *    where splitting is expensive.
                                 * 2. Split is accurately. We make this.
                                 */
@@ -1147640,7 +1147586,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                                skb_shinfo(skb1)->frags[0].page_offset += len - pos;
                                skb_shinfo(skb1)->frags[0].size -= len - pos;
                                skb_shinfo(skb)->frags[i].size  = len - pos;
-@@ -2001,10 +2104,10 @@ unsigned int skb_seq_read(unsigned int c
+@@ -2001,10 +2104,10 @@
                return 0;
  
  next_skb:
@@ -1147653,27 +1147599,27 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                return block_limit - abs_offset;
        }
  
-@@ -2039,13 +2142,14 @@ next_skb:
+@@ -2039,13 +2142,14 @@
                st->frag_data = NULL;
        }
  
 -      if (st->cur_skb->next) {
--              st->cur_skb = st->cur_skb->next;
 +      if (st->root_skb == st->cur_skb &&
 +          skb_shinfo(st->root_skb)->frag_list) {
 +              st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
++              st->frag_idx = 0;
++              goto next_skb;
++      } else if (st->cur_skb->next) {
+               st->cur_skb = st->cur_skb->next;
                st->frag_idx = 0;
-               goto next_skb;
+-              goto next_skb;
 -      } else if (st->root_skb == st->cur_skb &&
 -                 skb_shinfo(st->root_skb)->frag_list) {
 -              st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
-+      } else if (st->cur_skb->next) {
-+              st->cur_skb = st->cur_skb->next;
-+              st->frag_idx = 0;
                goto next_skb;
        }
  
-@@ -2246,7 +2350,8 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -2246,7 +2350,8 @@
                if (hsize > len || !sg)
                        hsize = len;
  
@@ -1147683,7 +1147629,7 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                if (unlikely(!nskb))
                        goto err;
  
-@@ -2284,7 +2389,7 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -2284,7 +2389,7 @@
                        BUG_ON(i >= nfrags);
  
                        *frag = skb_shinfo(skb)->frags[i];
@@ -1147692,9 +1147638,9 @@ diff -purN linux-2.6.27/net/core/skbuff.c linux-2.6.27.19-5.1/net/core/skbuff.c
                        size = frag->size;
  
                        if (pos < offset) {
-diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
---- linux-2.6.27/net/core/sock.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/core/sock.c        2009-03-25 16:11:01.000000000 +0000
+diff -r 9608d5473017 net/core/sock.c
+--- a/net/core/sock.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/core/sock.c  Wed May 06 16:57:04 2009 +0100
 @@ -110,6 +110,7 @@
  #include <linux/tcp.h>
  #include <linux/init.h>
@@ -1147703,7 +1147649,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
  
  #include <asm/uaccess.h>
  #include <asm/system.h>
-@@ -211,6 +212,121 @@ __u32 sysctl_rmem_default __read_mostly 
+@@ -211,6 +212,121 @@
  /* Maximal space eaten by iovec or ancilliary data plus some space */
  int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
  
@@ -1147825,7 +1147771,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
  static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
  {
        struct timeval tv;
-@@ -281,7 +397,7 @@ int sock_queue_rcv_skb(struct sock *sk, 
+@@ -281,7 +397,7 @@
        if (err)
                goto out;
  
@@ -1147834,7 +1147780,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
                err = -ENOBUFS;
                goto out;
        }
-@@ -324,7 +440,7 @@ int sk_receive_skb(struct sock *sk, stru
+@@ -324,7 +440,7 @@
                 */
                mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);
  
@@ -1147843,7 +1147789,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
  
                mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
        } else
-@@ -695,6 +811,8 @@ int sock_getsockopt(struct socket *sock,
+@@ -695,6 +811,8 @@
        if (len < 0)
                return -EINVAL;
  
@@ -1147852,7 +1147798,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
        switch(optname) {
        case SO_DEBUG:
                v.val = sock_flag(sk, SOCK_DBG);
-@@ -957,6 +1075,7 @@ void sk_free(struct sock *sk)
+@@ -957,6 +1075,7 @@
  {
        struct sk_filter *filter;
  
@@ -1147860,7 +1147806,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
        if (sk->sk_destruct)
                sk->sk_destruct(sk);
  
-@@ -1106,6 +1225,12 @@ void __init sk_init(void)
+@@ -1106,6 +1225,12 @@
                sysctl_wmem_max = 131071;
                sysctl_rmem_max = 131071;
        }
@@ -1147873,7 +1147819,7 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
  }
  
  /*
-@@ -1371,7 +1496,7 @@ static void __release_sock(struct sock *
+@@ -1371,7 +1496,7 @@
                        struct sk_buff *next = skb->next;
  
                        skb->next = NULL;
@@ -1147882,9 +1147828,9 @@ diff -purN linux-2.6.27/net/core/sock.c linux-2.6.27.19-5.1/net/core/sock.c
  
                        /*
                         * We are in process context here with softirqs
-diff -purN linux-2.6.27/net/dcb/Kconfig linux-2.6.27.19-5.1/net/dcb/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/Kconfig        2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/dcb/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/Kconfig  Wed May 06 16:57:04 2009 +0100
 @@ -0,0 +1,12 @@
 +config DCB
 +        tristate "Data Center Bridging support"
@@ -1147898,14 +1147844,14 @@ diff -purN linux-2.6.27/net/dcb/Kconfig linux-2.6.27.19-5.1/net/dcb/Kconfig
 +        (dcbnl) for Data Center Bridging capable devices.
 +
 +        If unsure, say N.
-diff -purN linux-2.6.27/net/dcb/Makefile linux-2.6.27.19-5.1/net/dcb/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/Makefile       2009-03-25 16:11:02.000000000 +0000
-@@ -0,0 +1 @@
+diff -r 9608d5473017 net/dcb/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/Makefile Wed May 06 16:57:04 2009 +0100
+@@ -0,0 +1,1 @@
 +obj-$(CONFIG_DCB) += dcbnl.o
-diff -purN linux-2.6.27/net/dcb/dcbnl.c linux-2.6.27.19-5.1/net/dcb/dcbnl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/dcb/dcbnl.c        2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/dcb/dcbnl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/dcb/dcbnl.c  Wed May 06 16:57:04 2009 +0100
 @@ -0,0 +1,1087 @@
 +/*
 + * This is the Data Center Bridging configuration interface.
@@ -1148994,10 +1148940,10 @@ diff -purN linux-2.6.27/net/dcb/dcbnl.c linux-2.6.27.19-5.1/net/dcb/dcbnl.c
 +module_exit(dcbnl_exit);
 +
 +
-diff -purN linux-2.6.27/net/ieee80211/Kconfig linux-2.6.27.19-5.1/net/ieee80211/Kconfig
---- linux-2.6.27/net/ieee80211/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ieee80211/Kconfig  2009-03-25 16:11:02.000000000 +0000
-@@ -46,7 +46,6 @@ config IEEE80211_CRYPT_CCMP
+diff -r 9608d5473017 net/ieee80211/Kconfig
+--- a/net/ieee80211/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/net/ieee80211/Kconfig    Wed May 06 16:57:04 2009 +0100
+@@ -46,7 +46,6 @@
        tristate "IEEE 802.11i CCMP support"
        depends on IEEE80211
        select CRYPTO
@@ -1149005,9 +1148951,9 @@ diff -purN linux-2.6.27/net/ieee80211/Kconfig linux-2.6.27.19-5.1/net/ieee80211/
        ---help---
        Include software based cipher suites in support of IEEE 802.11i
        (aka TGi, WPA, WPA2, WPA-PSK, etc.) for use with CCMP enabled
-diff -purN linux-2.6.27/net/ipv4/devinet.c linux-2.6.27.19-5.1/net/ipv4/devinet.c
---- linux-2.6.27/net/ipv4/devinet.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/devinet.c     2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/devinet.c
+--- a/net/ipv4/devinet.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/devinet.c       Wed May 06 16:57:04 2009 +0100
 @@ -61,6 +61,7 @@
  #include <net/ip_fib.h>
  #include <net/rtnetlink.h>
@@ -1149016,7 +1148962,7 @@ diff -purN linux-2.6.27/net/ipv4/devinet.c linux-2.6.27.19-5.1/net/ipv4/devinet.
  
  static struct ipv4_devconf ipv4_devconf = {
        .data = {
-@@ -257,6 +258,7 @@ static void __inet_del_ifa(struct in_dev
+@@ -257,6 +258,7 @@
                struct in_ifaddr **ifap1 = &ifa1->ifa_next;
  
                while ((ifa = *ifap1) != NULL) {
@@ -1149024,7 +1148970,7 @@ diff -purN linux-2.6.27/net/ipv4/devinet.c linux-2.6.27.19-5.1/net/ipv4/devinet.
                        if (!(ifa->ifa_flags & IFA_F_SECONDARY) &&
                            ifa1->ifa_scope <= ifa->ifa_scope)
                                last_prim = ifa;
-@@ -363,6 +365,7 @@ static int __inet_insert_ifa(struct in_i
+@@ -363,6 +365,7 @@
                        }
                        ifa->ifa_flags |= IFA_F_SECONDARY;
                }
@@ -1149032,9 +1148978,9 @@ diff -purN linux-2.6.27/net/ipv4/devinet.c linux-2.6.27.19-5.1/net/ipv4/devinet.
        }
  
        if (!(ifa->ifa_flags & IFA_F_SECONDARY)) {
-diff -purN linux-2.6.27/net/ipv4/inet_fragment.c linux-2.6.27.19-5.1/net/ipv4/inet_fragment.c
---- linux-2.6.27/net/ipv4/inet_fragment.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/inet_fragment.c       2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/inet_fragment.c
+--- a/net/ipv4/inet_fragment.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/inet_fragment.c Wed May 06 16:57:04 2009 +0100
 @@ -19,6 +19,7 @@
  #include <linux/random.h>
  #include <linux/skbuff.h>
@@ -1149043,7 +1148989,7 @@ diff -purN linux-2.6.27/net/ipv4/inet_fragment.c linux-2.6.27.19-5.1/net/ipv4/in
  
  #include <net/inet_frag.h>
  
-@@ -74,6 +75,8 @@ void inet_frags_init_net(struct netns_fr
+@@ -74,6 +75,8 @@
        nf->nqueues = 0;
        atomic_set(&nf->mem, 0);
        INIT_LIST_HEAD(&nf->lru_list);
@@ -1149052,9 +1148998,9 @@ diff -purN linux-2.6.27/net/ipv4/inet_fragment.c linux-2.6.27.19-5.1/net/ipv4/in
  }
  EXPORT_SYMBOL(inet_frags_init_net);
  
-diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_fragment.c
---- linux-2.6.27/net/ipv4/ip_fragment.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/ip_fragment.c 2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/ip_fragment.c
+--- a/net/ipv4/ip_fragment.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/ip_fragment.c   Wed May 06 16:57:04 2009 +0100
 @@ -42,6 +42,8 @@
  #include <linux/udp.h>
  #include <linux/inet.h>
@@ -1149064,7 +1149010,7 @@ diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_f
  
  /* NOTE. Logic of IP defragmentation is parallel to corresponding IPv6
   * code now. If you change something here, _PLEASE_ update ipv6/reassembly.c
-@@ -599,6 +601,64 @@ int ip_defrag(struct sk_buff *skb, u32 u
+@@ -599,6 +601,64 @@
  }
  
  #ifdef CONFIG_SYSCTL
@@ -1149129,7 +1149075,7 @@ diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_f
  static int zero;
  
  static struct ctl_table ip4_frags_ns_ctl_table[] = {
-@@ -608,7 +668,8 @@ static struct ctl_table ip4_frags_ns_ctl
+@@ -608,7 +668,8 @@
                .data           = &init_net.ipv4.frags.high_thresh,
                .maxlen         = sizeof(int),
                .mode           = 0644,
@@ -1149139,7 +1149085,7 @@ diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_f
        },
        {
                .ctl_name       = NET_IPV4_IPFRAG_LOW_THRESH,
-@@ -711,6 +772,8 @@ static inline void ip4_frags_ctl_registe
+@@ -711,6 +772,8 @@
  
  static int ipv4_frags_init_net(struct net *net)
  {
@@ -1149148,7 +1149094,7 @@ diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_f
        /*
         * Fragment cache limits. We will commit 256K at one time. Should we
         * cross that limit we will prune down to 192K. This should cope with
-@@ -728,11 +791,31 @@ static int ipv4_frags_init_net(struct ne
+@@ -728,11 +791,31 @@
  
        inet_frags_init_net(&net->ipv4.frags);
  
@@ -1149181,10 +1149127,10 @@ diff -purN linux-2.6.27/net/ipv4/ip_fragment.c linux-2.6.27.19-5.1/net/ipv4/ip_f
        ip4_frags_ns_ctl_unregister(net);
        inet_frags_exit_net(&net->ipv4.frags, &ip4_frags);
  }
-diff -purN linux-2.6.27/net/ipv4/ipconfig.c linux-2.6.27.19-5.1/net/ipv4/ipconfig.c
---- linux-2.6.27/net/ipv4/ipconfig.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/ipconfig.c    2009-03-25 16:11:03.000000000 +0000
-@@ -1272,6 +1272,9 @@ __be32 __init root_nfs_parse_addr(char *
+diff -r 9608d5473017 net/ipv4/ipconfig.c
+--- a/net/ipv4/ipconfig.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/ipconfig.c      Wed May 06 16:57:04 2009 +0100
+@@ -1272,6 +1272,9 @@
  static int __init ip_auto_config(void)
  {
        __be32 addr;
@@ -1149194,7 +1149140,7 @@ diff -purN linux-2.6.27/net/ipv4/ipconfig.c linux-2.6.27.19-5.1/net/ipv4/ipconfi
  
  #ifdef CONFIG_PROC_FS
        proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops);
-@@ -1308,9 +1311,6 @@ static int __init ip_auto_config(void)
+@@ -1308,9 +1311,6 @@
  #endif
            ic_first_dev->next) {
  #ifdef IPCONFIG_DYNAMIC
@@ -1149204,13 +1149150,14 @@ diff -purN linux-2.6.27/net/ipv4/ipconfig.c linux-2.6.27.19-5.1/net/ipv4/ipconfi
                if (ic_dynamic() < 0) {
                        ic_close_devs();
  
-diff -purN linux-2.6.27/net/ipv4/netfilter/Kconfig linux-2.6.27.19-5.1/net/ipv4/netfilter/Kconfig
---- linux-2.6.27/net/ipv4/netfilter/Kconfig    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/Kconfig     2009-03-25 16:11:03.000000000 +0000
-@@ -111,6 +111,20 @@ config IP_NF_MATCH_ADDRTYPE
+diff -r 9608d5473017 net/ipv4/netfilter/Kconfig
+--- a/net/ipv4/netfilter/Kconfig       Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/Kconfig       Wed May 06 16:57:04 2009 +0100
+@@ -110,6 +110,20 @@
          If you want to compile it as a module, say M here and read
          <file:Documentation/kbuild/modules.txt>.  If unsure, say `N'.
++
 +config IP_NF_MATCH_IPV4OPTIONS
 +      tristate  'IPV4OPTIONS match support'
 +      depends on IP_NF_IPTABLES
@@ -1149224,14 +1149171,13 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/Kconfig linux-2.6.27.19-5.1/net/ipv4/
 +        If you want to compile it as a module, say M here and read
 +        Documentation/modules.txt.  If unsure, say 'N'.
 +
-+
  # `filter', generic and specific targets
  config IP_NF_FILTER
-       tristate "Packet filtering"
-diff -purN linux-2.6.27/net/ipv4/netfilter/Makefile linux-2.6.27.19-5.1/net/ipv4/netfilter/Makefile
---- linux-2.6.27/net/ipv4/netfilter/Makefile   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/Makefile    2009-03-25 16:11:03.000000000 +0000
-@@ -50,6 +50,7 @@ obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
+diff -r 9608d5473017 net/ipv4/netfilter/Makefile
+--- a/net/ipv4/netfilter/Makefile      Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/Makefile      Wed May 06 16:57:04 2009 +0100
+@@ -50,6 +50,7 @@
  obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
  obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
  obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
@@ -1149239,10 +1149185,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/Makefile linux-2.6.27.19-5.1/net/ipv4
  
  # targets
  obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
-diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_LOG.c linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_LOG.c
---- linux-2.6.27/net/ipv4/netfilter/ipt_LOG.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_LOG.c   2009-03-25 16:11:03.000000000 +0000
-@@ -410,12 +410,12 @@ ipt_log_packet(unsigned int pf,
+diff -r 9608d5473017 net/ipv4/netfilter/ipt_LOG.c
+--- a/net/ipv4/netfilter/ipt_LOG.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/ipt_LOG.c     Wed May 06 16:57:04 2009 +0100
+@@ -410,12 +410,12 @@
                printk("MAC=");
                if (skb->dev && skb->dev->hard_header_len
                    && skb->mac_header != skb->network_header) {
@@ -1149260,9 +1149206,9 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_LOG.c linux-2.6.27.19-5.1/net/ipv
                } else
                        printk(" ");
        }
-diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_ipv4options.c linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_ipv4options.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/ipt_ipv4options.c   2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/netfilter/ipt_ipv4options.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/ipv4/netfilter/ipt_ipv4options.c     Wed May 06 16:57:04 2009 +0100
 @@ -0,0 +1,175 @@
 +/*
 +  This is a module which is used to match ipv4 options.
@@ -1149439,10 +1149385,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/ipt_ipv4options.c linux-2.6.27.19-5.1
 +
 +module_init(init);
 +module_exit(fini);
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
---- linux-2.6.27/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2009-03-25 16:11:03.000000000 +0000
-@@ -150,10 +150,12 @@ static unsigned int ipv4_conntrack_defra
+diff -r 9608d5473017 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c   Wed May 06 16:57:04 2009 +0100
+@@ -150,10 +150,12 @@
                                          const struct net_device *out,
                                          int (*okfn)(struct sk_buff *))
  {
@@ -1149455,10 +1149401,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c linux-2.6
  
        /* Gather fragments. */
        if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_tcp.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_tcp.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_tcp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_tcp.c  2009-03-25 16:11:03.000000000 +0000
-@@ -75,6 +75,9 @@ tcp_manip_pkt(struct sk_buff *skb,
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_proto_tcp.c
+--- a/net/ipv4/netfilter/nf_nat_proto_tcp.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_proto_tcp.c    Wed May 06 16:57:04 2009 +0100
+@@ -75,6 +75,9 @@
        if (hdrsize < sizeof(*hdr))
                return true;
  
@@ -1149468,10 +1149414,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_tcp.c linux-2.6.27.19-5.
        inet_proto_csum_replace4(&hdr->check, skb, oldip, newip, 1);
        inet_proto_csum_replace2(&hdr->check, skb, oldport, newport, 0);
        return true;
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_udp.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_udp.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_udp.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_proto_udp.c  2009-03-25 16:11:03.000000000 +0000
-@@ -60,6 +60,10 @@ udp_manip_pkt(struct sk_buff *skb,
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_proto_udp.c
+--- a/net/ipv4/netfilter/nf_nat_proto_udp.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_proto_udp.c    Wed May 06 16:57:04 2009 +0100
+@@ -60,6 +60,10 @@
                newport = tuple->dst.u.udp.port;
                portptr = &hdr->dest;
        }
@@ -1149482,10 +1149428,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_proto_udp.c linux-2.6.27.19-5.
        if (hdr->check || skb->ip_summed == CHECKSUM_PARTIAL) {
                inet_proto_csum_replace4(&hdr->check, skb, oldip, newip, 1);
                inet_proto_csum_replace2(&hdr->check, skb, *portptr, newport,
-diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_snmp_basic.c
---- linux-2.6.27/net/ipv4/netfilter/nf_nat_snmp_basic.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/netfilter/nf_nat_snmp_basic.c 2009-03-25 16:11:03.000000000 +0000
-@@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(
+diff -r 9608d5473017 net/ipv4/netfilter/nf_nat_snmp_basic.c
+--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c   Wed May 06 16:57:04 2009 +0100
+@@ -742,6 +742,7 @@
                        *obj = kmalloc(sizeof(struct snmp_object) + len,
                                       GFP_ATOMIC);
                        if (*obj == NULL) {
@@ -1149493,10 +1149439,10 @@ diff -purN linux-2.6.27/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.27.19-5
                                kfree(id);
                                if (net_ratelimit())
                                        printk("OOM in bsalg (%d)\n", __LINE__);
-diff -purN linux-2.6.27/net/ipv4/proc.c linux-2.6.27.19-5.1/net/ipv4/proc.c
---- linux-2.6.27/net/ipv4/proc.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/proc.c        2009-03-25 16:11:03.000000000 +0000
-@@ -237,43 +237,45 @@ static const struct snmp_mib snmp4_net_l
+diff -r 9608d5473017 net/ipv4/proc.c
+--- a/net/ipv4/proc.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/proc.c  Wed May 06 16:57:04 2009 +0100
+@@ -237,43 +237,45 @@
        SNMP_MIB_SENTINEL
  };
  
@@ -1149546,16 +1149492,6 @@ diff -purN linux-2.6.27/net/ipv4/proc.c linux-2.6.27.19-5.1/net/ipv4/proc.c
 -                              snmp_fold_field((void **) net->mib.icmpmsg_statistics,
 -                              out[j]));
 -              seq_putc(seq, '\n');
--      }
--      if (count) {
--              seq_printf(seq, "\nIcmpMsg:");
--              for (j = 0; j < count; ++j)
--                      seq_printf(seq, " %sType%u", out[j] & 0x100 ? "Out" :
--                              "In", out[j] & 0xff);
--              seq_printf(seq, "\nIcmpMsg:");
--              for (j = 0; j < count; ++j)
--                      seq_printf(seq, " %lu", snmp_fold_field((void **)
--                              net->mib.icmpmsg_statistics, out[j]));
 +              val = snmp_fold_field((void **) net->mib.icmpmsg_statistics, i);
 +              if (val) {
 +                      type[count] = i;
@@ -1149566,13 +1149502,23 @@ diff -purN linux-2.6.27/net/ipv4/proc.c linux-2.6.27.19-5.1/net/ipv4/proc.c
 +                      count = 0;
 +              }
        }
+-      if (count) {
+-              seq_printf(seq, "\nIcmpMsg:");
+-              for (j = 0; j < count; ++j)
+-                      seq_printf(seq, " %sType%u", out[j] & 0x100 ? "Out" :
+-                              "In", out[j] & 0xff);
+-              seq_printf(seq, "\nIcmpMsg:");
+-              for (j = 0; j < count; ++j)
+-                      seq_printf(seq, " %lu", snmp_fold_field((void **)
+-                              net->mib.icmpmsg_statistics, out[j]));
+-      }
 +      icmpmsg_put_line(seq, vals, type, count);
  
  #undef PERLINE
  }
-diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
---- linux-2.6.27/net/ipv4/route.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/route.c       2009-03-25 16:11:03.000000000 +0000
+diff -r 9608d5473017 net/ipv4/route.c
+--- a/net/ipv4/route.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/route.c Wed May 06 16:57:04 2009 +0100
 @@ -107,6 +107,7 @@
  #ifdef CONFIG_SYSCTL
  #include <linux/sysctl.h>
@@ -1149581,19 +1149527,21 @@ diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
  
  #define RT_FL_TOS(oldflp) \
      ((u32)(oldflp->fl4_tos & (IPTOS_RT_MASK | RTO_ONLINK)))
-@@ -269,6 +270,8 @@ static inline int rt_genid(struct net *n
+@@ -268,6 +269,8 @@
+ {
        return atomic_read(&net->ipv4.rt_genid);
  }
-+static struct mem_reserve ipv4_route_reserve;
 +
++static struct mem_reserve ipv4_route_reserve;
  #ifdef CONFIG_PROC_FS
  struct rt_cache_iter_state {
-       struct seq_net_private p;
-@@ -393,6 +396,62 @@ static int rt_cache_seq_show(struct seq_
+@@ -391,6 +394,62 @@
+               seq_printf(seq, "%*s\n", 127 - len, "");
+       }
        return 0;
- }
++}
++
 +static struct mutex ipv4_route_lock;
 +
 +static int proc_dointvec_route(struct ctl_table *table, int write,
@@ -1149648,12 +1149596,10 @@ diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
 +      mutex_unlock(&ipv4_route_lock);
 +
 +      return ret;
-+}
-+
+ }
  static const struct seq_operations rt_cache_seq_ops = {
-       .start  = rt_cache_seq_start,
-       .next   = rt_cache_seq_next,
-@@ -2991,7 +3050,8 @@ static ctl_table ipv4_route_table[] = {
+@@ -2991,7 +3050,8 @@
                .data           = &ip_rt_max_size,
                .maxlen         = sizeof(int),
                .mode           = 0644,
@@ -1149663,7 +1149609,7 @@ diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
        },
        {
                /*  Deprecated. Use gc_min_interval_ms */
-@@ -3270,6 +3330,15 @@ int __init ip_rt_init(void)
+@@ -3270,6 +3330,15 @@
        ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
        ip_rt_max_size = (rt_hash_mask + 1) * 16;
  
@@ -1149679,10 +1149625,10 @@ diff -purN linux-2.6.27/net/ipv4/route.c linux-2.6.27.19-5.1/net/ipv4/route.c
        devinet_init();
        ip_fib_init();
  
-diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
---- linux-2.6.27/net/ipv4/tcp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp.c 2009-03-25 16:11:03.000000000 +0000
-@@ -518,8 +518,13 @@ static int tcp_splice_data_recv(read_des
+diff -r 9608d5473017 net/ipv4/tcp.c
+--- a/net/ipv4/tcp.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp.c   Wed May 06 16:57:04 2009 +0100
+@@ -518,8 +518,13 @@
                                unsigned int offset, size_t len)
  {
        struct tcp_splice_state *tss = rd_desc->arg.data;
@@ -1149697,7 +1149643,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
  }
  
  static int __tcp_splice_read(struct sock *sk, struct tcp_splice_state *tss)
-@@ -527,6 +532,7 @@ static int __tcp_splice_read(struct sock
+@@ -527,6 +532,7 @@
        /* Store TCP splice context information in read_descriptor_t. */
        read_descriptor_t rd_desc = {
                .arg.data = tss,
@@ -1149705,7 +1149651,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
        };
  
        return tcp_read_sock(sk, &rd_desc, tcp_splice_data_recv);
-@@ -576,10 +582,6 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -576,10 +582,6 @@
                else if (!ret) {
                        if (spliced)
                                break;
@@ -1149716,7 +1149662,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
                        if (sock_flag(sk, SOCK_DONE))
                                break;
                        if (sk->sk_err) {
-@@ -597,6 +599,10 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -597,6 +599,10 @@
                                        ret = -ENOTCONN;
                                break;
                        }
@@ -1149727,7 +1149673,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
                        if (!timeo) {
                                ret = -EAGAIN;
                                break;
-@@ -611,11 +617,13 @@ ssize_t tcp_splice_read(struct socket *s
+@@ -611,11 +617,13 @@
                tss.len -= ret;
                spliced += ret;
  
@@ -1149742,7 +1149688,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
                    signal_pending(current))
                        break;
        }
-@@ -635,7 +643,8 @@ struct sk_buff *sk_stream_alloc_skb(stru
+@@ -635,7 +643,8 @@
        /* The TCP header must be at least 32-bit aligned.  */
        size = ALIGN(size, 4);
  
@@ -1149752,7 +1149698,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
        if (skb) {
                if (sk_wmem_schedule(sk, skb->truesize)) {
                        /*
-@@ -1157,7 +1166,7 @@ static void tcp_prequeue_process(struct 
+@@ -1157,7 +1166,7 @@
         * necessary */
        local_bh_disable();
        while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
@@ -1149761,7 +1149707,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
        local_bh_enable();
  
        /* Clear memory counter. */
-@@ -2381,7 +2390,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2381,7 +2390,7 @@
        unsigned int seq;
        __be32 delta;
        unsigned int oldlen;
@@ -1149770,7 +1149716,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
  
        if (!pskb_may_pull(skb, sizeof(*th)))
                goto out;
-@@ -2397,10 +2406,13 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2397,10 +2406,13 @@
        oldlen = (u16)~skb->len;
        __skb_pull(skb, thlen);
  
@@ -1149785,7 +1149731,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
  
                if (unlikely(type &
                             ~(SKB_GSO_TCPV4 |
-@@ -2411,7 +2423,6 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2411,7 +2423,6 @@
                             !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))))
                        goto out;
  
@@ -1149793,7 +1149739,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
                skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss);
  
                segs = NULL;
-@@ -2422,8 +2433,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2422,8 +2433,7 @@
        if (IS_ERR(segs))
                goto out;
  
@@ -1149803,7 +1149749,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
  
        skb = segs;
        th = tcp_hdr(skb);
-@@ -2439,7 +2449,7 @@ struct sk_buff *tcp_tso_segment(struct s
+@@ -2439,7 +2449,7 @@
                             csum_fold(csum_partial(skb_transport_header(skb),
                                                    thlen, skb->csum));
  
@@ -1149812,10 +1149758,10 @@ diff -purN linux-2.6.27/net/ipv4/tcp.c linux-2.6.27.19-5.1/net/ipv4/tcp.c
                skb = skb->next;
                th = tcp_hdr(skb);
  
-diff -purN linux-2.6.27/net/ipv4/tcp_input.c linux-2.6.27.19-5.1/net/ipv4/tcp_input.c
---- linux-2.6.27/net/ipv4/tcp_input.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_input.c   2009-03-25 16:11:02.000000000 +0000
-@@ -3936,19 +3936,19 @@ static void tcp_ofo_queue(struct sock *s
+diff -r 9608d5473017 net/ipv4/tcp_input.c
+--- a/net/ipv4/tcp_input.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_input.c     Wed May 06 16:57:05 2009 +0100
+@@ -3936,19 +3936,19 @@
  static int tcp_prune_ofo_queue(struct sock *sk);
  static int tcp_prune_queue(struct sock *sk);
  
@@ -1149839,7 +1149785,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_input.c linux-2.6.27.19-5.1/net/ipv4/tcp_in
                                return -1;
                }
        }
-@@ -4003,7 +4003,7 @@ static void tcp_data_queue(struct sock *
+@@ -4003,7 +4003,7 @@
                if (eaten <= 0) {
  queue_and_out:
                        if (eaten < 0 &&
@@ -1149848,7 +1149794,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_input.c linux-2.6.27.19-5.1/net/ipv4/tcp_in
                                goto drop;
  
                        skb_set_owner_r(skb, sk);
-@@ -4074,7 +4074,7 @@ drop:
+@@ -4074,7 +4074,7 @@
  
        TCP_ECN_check_ce(tp, skb);
  
@@ -1149857,10 +1149803,10 @@ diff -purN linux-2.6.27/net/ipv4/tcp_input.c linux-2.6.27.19-5.1/net/ipv4/tcp_in
                goto drop;
  
        /* Disable header prediction. */
-diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_output.c
---- linux-2.6.27/net/ipv4/tcp_output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_output.c  2009-03-25 16:11:03.000000000 +0000
-@@ -357,6 +357,17 @@ struct tcp_out_options {
+diff -r 9608d5473017 net/ipv4/tcp_output.c
+--- a/net/ipv4/tcp_output.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_output.c    Wed May 06 16:57:05 2009 +0100
+@@ -357,6 +357,17 @@
        __u32 tsval, tsecr;     /* need to include OPTION_TS */
  };
  
@@ -1149878,33 +1149824,33 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
  static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
                              const struct tcp_out_options *opts,
                              __u8 **md5_hash) {
-@@ -371,6 +382,12 @@ static void tcp_options_write(__be32 *pt
+@@ -369,6 +380,12 @@
+               ptr += 4;
+       } else {
                *md5_hash = NULL;
-       }
++      }
++
 +      if (unlikely(opts->mss)) {
 +              *ptr++ = htonl((TCPOPT_MSS << 24) |
 +                             (TCPOLEN_MSS << 16) |
 +                             opts->mss);
-+      }
-+
-       if (likely(OPTION_TS & opts->options)) {
-               if (unlikely(OPTION_SACK_ADVERTISE & opts->options)) {
-                       *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
-@@ -387,12 +404,6 @@ static void tcp_options_write(__be32 *pt
-               *ptr++ = htonl(opts->tsecr);
        }
  
+       if (likely(OPTION_TS & opts->options)) {
+@@ -385,12 +402,6 @@
+               }
+               *ptr++ = htonl(opts->tsval);
+               *ptr++ = htonl(opts->tsecr);
+-      }
+-
 -      if (unlikely(opts->mss)) {
 -              *ptr++ = htonl((TCPOPT_MSS << 24) |
 -                             (TCPOLEN_MSS << 16) |
 -                             opts->mss);
--      }
--
+       }
        if (unlikely(OPTION_SACK_ADVERTISE & opts->options &&
-                    !(OPTION_TS & opts->options))) {
-               *ptr++ = htonl((TCPOPT_NOP << 24) |
-@@ -2148,7 +2159,8 @@ void tcp_send_fin(struct sock *sk)
+@@ -2148,7 +2159,8 @@
        } else {
                /* Socket is locked, keep trying until memory is available. */
                for (;;) {
@@ -1149914,7 +1149860,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
                        if (skb)
                                break;
                        yield();
-@@ -2174,7 +2186,7 @@ void tcp_send_active_reset(struct sock *
+@@ -2174,7 +2186,7 @@
        struct sk_buff *skb;
  
        /* NOTE: No TCP options attached and we never retransmit this. */
@@ -1149923,7 +1149869,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        if (!skb) {
                NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTFAILED);
                return;
-@@ -2242,7 +2254,8 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2242,7 +2254,8 @@
        struct tcp_md5sig_key *md5;
        __u8 *md5_hash_location;
  
@@ -1149933,7 +1149879,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        if (skb == NULL)
                return NULL;
  
-@@ -2266,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2266,6 +2279,11 @@
        }
  
        memset(&opts, 0, sizeof(opts));
@@ -1149945,7 +1149891,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        TCP_SKB_CB(skb)->when = tcp_time_stamp;
        tcp_header_size = tcp_synack_options(sk, req,
                                             dst_metric(dst, RTAX_ADVMSS),
-@@ -2292,11 +2310,6 @@ struct sk_buff *tcp_make_synack(struct s
+@@ -2292,11 +2310,6 @@
  
        /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
        th->window = htons(min(req->rcv_wnd, 65535U));
@@ -1149957,7 +1149903,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
        th->doff = (tcp_header_size >> 2);
        TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
-@@ -2482,7 +2495,7 @@ void tcp_send_ack(struct sock *sk)
+@@ -2482,7 +2495,7 @@
         * tcp_transmit_skb() will set the ownership to this
         * sock.
         */
@@ -1149966,7 +1149912,7 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        if (buff == NULL) {
                inet_csk_schedule_ack(sk);
                inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN;
-@@ -2517,7 +2530,7 @@ static int tcp_xmit_probe_skb(struct soc
+@@ -2517,7 +2530,7 @@
        struct sk_buff *skb;
  
        /* We don't queue it, tcp_transmit_skb() sets ownership. */
@@ -1149975,10 +1149921,10 @@ diff -purN linux-2.6.27/net/ipv4/tcp_output.c linux-2.6.27.19-5.1/net/ipv4/tcp_o
        if (skb == NULL)
                return -1;
  
-diff -purN linux-2.6.27/net/ipv4/tcp_timer.c linux-2.6.27.19-5.1/net/ipv4/tcp_timer.c
---- linux-2.6.27/net/ipv4/tcp_timer.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/tcp_timer.c   2009-03-25 16:11:03.000000000 +0000
-@@ -201,7 +201,7 @@ static void tcp_delack_timer(unsigned lo
+diff -r 9608d5473017 net/ipv4/tcp_timer.c
+--- a/net/ipv4/tcp_timer.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/tcp_timer.c     Wed May 06 16:57:05 2009 +0100
+@@ -201,7 +201,7 @@
                NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSCHEDULERFAILED);
  
                while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
@@ -1149987,10 +1149933,10 @@ diff -purN linux-2.6.27/net/ipv4/tcp_timer.c linux-2.6.27.19-5.1/net/ipv4/tcp_ti
  
                tp->ucopy.memory = 0;
        }
-diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
---- linux-2.6.27/net/ipv4/udp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/udp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -302,7 +302,7 @@ static struct sock *__udp4_lib_lookup(st
+diff -r 9608d5473017 net/ipv4/udp.c
+--- a/net/ipv4/udp.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/udp.c   Wed May 06 16:57:05 2009 +0100
+@@ -302,7 +302,7 @@
        return result;
  }
  
@@ -1149999,7 +1149945,7 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
                                             __be16 loc_port, __be32 loc_addr,
                                             __be16 rmt_port, __be32 rmt_addr,
                                             int dif)
-@@ -314,7 +314,8 @@ static inline struct sock *udp_v4_mcast_
+@@ -314,7 +314,8 @@
        sk_for_each_from(s, node) {
                struct inet_sock *inet = inet_sk(s);
  
@@ -1150009,7 +1149955,7 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
                    (inet->daddr && inet->daddr != rmt_addr)            ||
                    (inet->dport != rmt_port && inet->dport)            ||
                    (inet->rcv_saddr && inet->rcv_saddr != loc_addr)    ||
-@@ -958,9 +959,11 @@ static int __udp_queue_rcv_skb(struct so
+@@ -958,9 +959,11 @@
  
        if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
                /* Note that an ENOMEM error is charged twice */
@@ -1150022,7 +1149968,7 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
                goto drop;
        }
  
-@@ -1097,15 +1100,16 @@ static int __udp4_lib_mcast_deliver(stru
+@@ -1097,15 +1100,16 @@
        read_lock(&udp_hash_lock);
        sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]);
        dif = skb->dev->ifindex;
@@ -1150042,7 +1149988,7 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
                        if (sknext)
                                skb1 = skb_clone(skb, GFP_ATOMIC);
  
-@@ -1170,7 +1174,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, 
+@@ -1170,7 +1174,7 @@
                   int proto)
  {
        struct sock *sk;
@@ -1150051,7 +1149997,7 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
        unsigned short ulen;
        struct rtable *rt = (struct rtable*)skb->dst;
        __be32 saddr = ip_hdr(skb)->saddr;
-@@ -1183,6 +1187,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, 
+@@ -1183,6 +1187,7 @@
        if (!pskb_may_pull(skb, sizeof(struct udphdr)))
                goto drop;              /* No space for header. */
  
@@ -1150059,10 +1150005,10 @@ diff -purN linux-2.6.27/net/ipv4/udp.c linux-2.6.27.19-5.1/net/ipv4/udp.c
        ulen = ntohs(uh->len);
        if (ulen > skb->len)
                goto short_packet;
-diff -purN linux-2.6.27/net/ipv4/xfrm4_output.c linux-2.6.27.19-5.1/net/ipv4/xfrm4_output.c
---- linux-2.6.27/net/ipv4/xfrm4_output.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv4/xfrm4_output.c        2009-03-25 16:11:03.000000000 +0000
-@@ -81,7 +81,7 @@ static int xfrm4_output_finish(struct sk
+diff -r 9608d5473017 net/ipv4/xfrm4_output.c
+--- a/net/ipv4/xfrm4_output.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv4/xfrm4_output.c  Wed May 06 16:57:05 2009 +0100
+@@ -81,7 +81,7 @@
  #endif
  
        skb->protocol = htons(ETH_P_IP);
@@ -1150071,9 +1150017,9 @@ diff -purN linux-2.6.27/net/ipv4/xfrm4_output.c linux-2.6.27.19-5.1/net/ipv4/xfr
  }
  
  int xfrm4_output(struct sk_buff *skb)
-diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrconf.c
---- linux-2.6.27/net/ipv6/addrconf.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/addrconf.c    2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/addrconf.c
+--- a/net/ipv6/addrconf.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/addrconf.c      Wed May 06 16:57:05 2009 +0100
 @@ -85,6 +85,7 @@
  
  #include <linux/proc_fs.h>
@@ -1150082,16 +1150028,16 @@ diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrcon
  
  /* Set to 3 to get tracing... */
  #define ACONF_DEBUG 2
-@@ -653,6 +654,8 @@ ipv6_add_addr(struct inet6_dev *idev, co
+@@ -652,6 +653,8 @@
+       in6_dev_hold(idev);
        /* For caller */
        in6_ifa_hold(ifa);
-+      trace_ipv6_addr_add(ifa);
 +
++      trace_ipv6_addr_add(ifa);
        /* Add to big hash table */
        hash = ipv6_addr_hash(addr);
-@@ -2167,6 +2170,7 @@ static int inet6_addr_del(struct net *ne
+@@ -2167,6 +2170,7 @@
                        in6_ifa_hold(ifp);
                        read_unlock_bh(&idev->lock);
  
@@ -1150099,7 +1150045,7 @@ diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrcon
                        ipv6_del_addr(ifp);
  
                        /* If the last address is deleted administratively,
-@@ -2777,6 +2781,7 @@ static void addrconf_dad_start(struct in
+@@ -2777,6 +2781,7 @@
        spin_lock_bh(&ifp->lock);
  
        if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
@@ -1150107,7 +1150053,7 @@ diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrcon
            idev->cnf.accept_dad < 1 ||
            !(ifp->flags&IFA_F_TENTATIVE) ||
            ifp->flags & IFA_F_NODAD) {
-@@ -2874,6 +2879,7 @@ static void addrconf_dad_completed(struc
+@@ -2874,6 +2879,7 @@
        if (ifp->idev->cnf.forwarding == 0 &&
            ifp->idev->cnf.rtr_solicits > 0 &&
            (dev->flags&IFF_LOOPBACK) == 0 &&
@@ -1150115,10 +1150061,10 @@ diff -purN linux-2.6.27/net/ipv6/addrconf.c linux-2.6.27.19-5.1/net/ipv6/addrcon
            (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
                /*
                 *      If a host as already performed a random delay
-diff -purN linux-2.6.27/net/ipv6/af_inet6.c linux-2.6.27.19-5.1/net/ipv6/af_inet6.c
---- linux-2.6.27/net/ipv6/af_inet6.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/af_inet6.c    2009-03-25 16:11:02.000000000 +0000
-@@ -839,14 +839,6 @@ static int inet6_net_init(struct net *ne
+diff -r 9608d5473017 net/ipv6/af_inet6.c
+--- a/net/ipv6/af_inet6.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/af_inet6.c      Wed May 06 16:57:05 2009 +0100
+@@ -839,14 +839,6 @@
        int err = 0;
  
        net->ipv6.sysctl.bindv6only = 0;
@@ -1150133,10 +1150079,10 @@ diff -purN linux-2.6.27/net/ipv6/af_inet6.c linux-2.6.27.19-5.1/net/ipv6/af_inet
        net->ipv6.sysctl.icmpv6_time = 1*HZ;
  
  #ifdef CONFIG_PROC_FS
-diff -purN linux-2.6.27/net/ipv6/ip6_fib.c linux-2.6.27.19-5.1/net/ipv6/ip6_fib.c
---- linux-2.6.27/net/ipv6/ip6_fib.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_fib.c     2009-03-25 16:11:02.000000000 +0000
-@@ -298,6 +298,10 @@ static void fib6_dump_end(struct netlink
+diff -r 9608d5473017 net/ipv6/ip6_fib.c
+--- a/net/ipv6/ip6_fib.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_fib.c       Wed May 06 16:57:05 2009 +0100
+@@ -298,6 +298,10 @@
        struct fib6_walker_t *w = (void*)cb->args[2];
  
        if (w) {
@@ -1150147,7 +1150093,7 @@ diff -purN linux-2.6.27/net/ipv6/ip6_fib.c linux-2.6.27.19-5.1/net/ipv6/ip6_fib.
                cb->args[2] = 0;
                kfree(w);
        }
-@@ -330,15 +334,12 @@ static int fib6_dump_table(struct fib6_t
+@@ -330,15 +334,12 @@
                read_lock_bh(&table->tb6_lock);
                res = fib6_walk_continue(w);
                read_unlock_bh(&table->tb6_lock);
@@ -1150167,10 +1150113,10 @@ diff -purN linux-2.6.27/net/ipv6/ip6_fib.c linux-2.6.27.19-5.1/net/ipv6/ip6_fib.
        return res;
  }
  
-diff -purN linux-2.6.27/net/ipv6/ip6_flowlabel.c linux-2.6.27.19-5.1/net/ipv6/ip6_flowlabel.c
---- linux-2.6.27/net/ipv6/ip6_flowlabel.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_flowlabel.c       2009-03-25 16:11:02.000000000 +0000
-@@ -323,17 +323,21 @@ static struct ip6_flowlabel *
+diff -r 9608d5473017 net/ipv6/ip6_flowlabel.c
+--- a/net/ipv6/ip6_flowlabel.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_flowlabel.c Wed May 06 16:57:05 2009 +0100
+@@ -323,17 +323,21 @@
  fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval,
          int optlen, int *err_p)
  {
@@ -1150179,12 +1150125,12 @@ diff -purN linux-2.6.27/net/ipv6/ip6_flowlabel.c linux-2.6.27.19-5.1/net/ipv6/ip
        int olen;
        int addr_type;
        int err;
++
 +      olen = optlen - CMSG_ALIGN(sizeof(*freq));
 +      err = -EINVAL;
 +      if (olen > 64 * 1024)
 +              goto done;
-+
        err = -ENOMEM;
        fl = kzalloc(sizeof(*fl), GFP_KERNEL);
        if (fl == NULL)
@@ -1150194,10 +1150140,10 @@ diff -purN linux-2.6.27/net/ipv6/ip6_flowlabel.c linux-2.6.27.19-5.1/net/ipv6/ip
        if (olen > 0) {
                struct msghdr msg;
                struct flowi flowi;
-diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_output.c
---- linux-2.6.27/net/ipv6/ip6_output.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/ip6_output.c  2009-03-25 16:11:02.000000000 +0000
-@@ -1091,6 +1091,18 @@ static inline int ip6_ufo_append_data(st
+diff -r 9608d5473017 net/ipv6/ip6_output.c
+--- a/net/ipv6/ip6_output.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/ip6_output.c    Wed May 06 16:57:05 2009 +0100
+@@ -1091,6 +1091,18 @@
        return err;
  }
  
@@ -1150216,7 +1150162,7 @@ diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_o
  int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
        int offset, int len, int odd, struct sk_buff *skb),
        void *from, int length, int transhdrlen,
-@@ -1116,17 +1128,37 @@ int ip6_append_data(struct sock *sk, int
+@@ -1116,17 +1128,37 @@
                 * setup for corking
                 */
                if (opt) {
@@ -1150264,7 +1150210,7 @@ diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_o
                        /* need source address above miyazawa*/
                }
                dst_hold(&rt->u.dst);
-@@ -1153,8 +1185,7 @@ int ip6_append_data(struct sock *sk, int
+@@ -1153,8 +1185,7 @@
        } else {
                rt = (struct rt6_info *)inet->cork.dst;
                fl = &inet->cork.fl;
@@ -1150274,7 +1150220,7 @@ diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_o
                transhdrlen = 0;
                exthdrlen = 0;
                mtu = inet->cork.fragsize;
-@@ -1393,9 +1424,15 @@ error:
+@@ -1393,9 +1424,15 @@
  
  static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
  {
@@ -1150293,10 +1150239,10 @@ diff -purN linux-2.6.27/net/ipv6/ip6_output.c linux-2.6.27.19-5.1/net/ipv6/ip6_o
        if (inet->cork.dst) {
                dst_release(inet->cork.dst);
                inet->cork.dst = NULL;
-diff -purN linux-2.6.27/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c linux-2.6.27.19-5.1/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
---- linux-2.6.27/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 2009-03-25 16:11:02.000000000 +0000
-@@ -49,8 +49,8 @@ static bool icmpv6_pkt_to_tuple(const st
+diff -r 9608d5473017 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c   Wed May 06 16:57:05 2009 +0100
+@@ -49,8 +49,8 @@
  static const u_int8_t invmap[] = {
        [ICMPV6_ECHO_REQUEST - 128]     = ICMPV6_ECHO_REPLY + 1,
        [ICMPV6_ECHO_REPLY - 128]       = ICMPV6_ECHO_REQUEST + 1,
@@ -1150307,9 +1150253,9 @@ diff -purN linux-2.6.27/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c linux-2.6
  };
  
  static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple,
-diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reassembly.c
---- linux-2.6.27/net/ipv6/reassembly.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/reassembly.c  2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/reassembly.c
+--- a/net/ipv6/reassembly.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/reassembly.c    Wed May 06 16:57:05 2009 +0100
 @@ -41,6 +41,7 @@
  #include <linux/random.h>
  #include <linux/jhash.h>
@@ -1150318,7 +1150264,7 @@ diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reass
  
  #include <net/sock.h>
  #include <net/snmp.h>
-@@ -632,6 +633,64 @@ static struct inet6_protocol frag_protoc
+@@ -632,6 +633,64 @@
  };
  
  #ifdef CONFIG_SYSCTL
@@ -1150383,7 +1150329,7 @@ diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reass
  static struct ctl_table ip6_frags_ns_ctl_table[] = {
        {
                .ctl_name       = NET_IPV6_IP6FRAG_HIGH_THRESH,
-@@ -639,7 +698,8 @@ static struct ctl_table ip6_frags_ns_ctl
+@@ -639,7 +698,8 @@
                .data           = &init_net.ipv6.frags.high_thresh,
                .maxlen         = sizeof(int),
                .mode           = 0644,
@@ -1150393,7 +1150339,7 @@ diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reass
        },
        {
                .ctl_name       = NET_IPV6_IP6FRAG_LOW_THRESH,
-@@ -748,17 +808,39 @@ static inline void ip6_frags_sysctl_unre
+@@ -748,17 +808,39 @@
  
  static int ipv6_frags_init_net(struct net *net)
  {
@@ -1150434,9 +1150380,9 @@ diff -purN linux-2.6.27/net/ipv6/reassembly.c linux-2.6.27.19-5.1/net/ipv6/reass
        ip6_frags_ns_sysctl_unregister(net);
        inet_frags_exit_net(&net->ipv6.frags, &ip6_frags);
  }
-diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
---- linux-2.6.27/net/ipv6/route.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/route.c       2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/ipv6/route.c
+--- a/net/ipv6/route.c Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/route.c Wed May 06 16:57:05 2009 +0100
 @@ -37,6 +37,7 @@
  #include <linux/mroute6.h>
  #include <linux/init.h>
@@ -1150445,7 +1150391,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
  #include <linux/nsproxy.h>
-@@ -2473,6 +2474,64 @@ int ipv6_sysctl_rtcache_flush(ctl_table 
+@@ -2473,6 +2474,64 @@
                return -EINVAL;
  }
  
@@ -1150510,7 +1150456,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
  ctl_table ipv6_route_table_template[] = {
        {
                .procname       =       "flush",
-@@ -2495,7 +2554,8 @@ ctl_table ipv6_route_table_template[] = 
+@@ -2495,7 +2554,8 @@
                .data           =       &init_net.ipv6.sysctl.ip6_rt_max_size,
                .maxlen         =       sizeof(int),
                .mode           =       0644,
@@ -1150520,7 +1150466,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
        },
        {
                .ctl_name       =       NET_IPV6_ROUTE_GC_MIN_INTERVAL,
-@@ -2583,6 +2643,8 @@ struct ctl_table *ipv6_route_sysctl_init
+@@ -2583,6 +2643,8 @@
                table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss;
        }
  
@@ -1150529,7 +1150475,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
        return table;
  }
  #endif
-@@ -2611,10 +2673,8 @@ static int ip6_route_net_init(struct net
+@@ -2611,10 +2673,8 @@
        net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
                                               sizeof(*net->ipv6.ip6_prohibit_entry),
                                               GFP_KERNEL);
@@ -1150542,7 +1150488,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
        net->ipv6.ip6_prohibit_entry->u.dst.path =
                (struct dst_entry *)net->ipv6.ip6_prohibit_entry;
        net->ipv6.ip6_prohibit_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
-@@ -2622,16 +2682,30 @@ static int ip6_route_net_init(struct net
+@@ -2622,15 +2682,29 @@
        net->ipv6.ip6_blk_hole_entry = kmemdup(&ip6_blk_hole_entry_template,
                                               sizeof(*net->ipv6.ip6_blk_hole_entry),
                                               GFP_KERNEL);
@@ -1150557,7 +1150503,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
                (struct dst_entry *)net->ipv6.ip6_blk_hole_entry;
        net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
  #endif
++
 +      net->ipv6.sysctl.flush_delay = 0;
 +      net->ipv6.sysctl.ip6_rt_max_size = 4096;
 +      net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
@@ -1150574,11 +1150520,10 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
 +                      net->ipv6.sysctl.ip6_rt_max_size);
 +      if (ret)
 +              goto out_reserve_fail;
-+
  #ifdef CONFIG_PROC_FS
        proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
-       proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
-@@ -2642,6 +2716,15 @@ static int ip6_route_net_init(struct net
+@@ -2642,6 +2716,15 @@
  out:
        return ret;
  
@@ -1150594,7 +1150539,7 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
  out_ip6_dst_ops:
        release_net(net->ipv6.ip6_dst_ops->dst_net);
        kfree(net->ipv6.ip6_dst_ops);
-@@ -2654,6 +2737,7 @@ static void ip6_route_net_exit(struct ne
+@@ -2654,6 +2737,7 @@
        proc_net_remove(net, "ipv6_route");
        proc_net_remove(net, "rt6_stats");
  #endif
@@ -1150602,10 +1150547,10 @@ diff -purN linux-2.6.27/net/ipv6/route.c linux-2.6.27.19-5.1/net/ipv6/route.c
        kfree(net->ipv6.ip6_null_entry);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
        kfree(net->ipv6.ip6_prohibit_entry);
-diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv6.c
---- linux-2.6.27/net/ipv6/tcp_ipv6.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/tcp_ipv6.c    2009-03-25 16:11:02.000000000 +0000
-@@ -582,7 +582,8 @@ static int tcp_v6_md5_do_add(struct sock
+diff -r 9608d5473017 net/ipv6/tcp_ipv6.c
+--- a/net/ipv6/tcp_ipv6.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/tcp_ipv6.c      Wed May 06 16:57:05 2009 +0100
+@@ -582,7 +582,8 @@
        } else {
                /* reallocate new list if current one is full. */
                if (!tp->md5sig_info) {
@@ -1150615,7 +1150560,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
                        if (!tp->md5sig_info) {
                                kfree(newkey);
                                return -ENOMEM;
-@@ -595,7 +596,8 @@ static int tcp_v6_md5_do_add(struct sock
+@@ -595,7 +596,8 @@
                }
                if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) {
                        keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) *
@@ -1150625,7 +1150570,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
  
                        if (!keys) {
                                tcp_free_md5sig_pool();
-@@ -719,7 +721,8 @@ static int tcp_v6_parse_md5_keys (struct
+@@ -719,7 +721,8 @@
                struct tcp_sock *tp = tcp_sk(sk);
                struct tcp_md5sig_info *p;
  
@@ -1150635,7 +1150580,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
                if (!p)
                        return -ENOMEM;
  
-@@ -952,6 +955,7 @@ static void tcp_v6_send_reset(struct soc
+@@ -952,6 +955,7 @@
  #ifdef CONFIG_TCP_MD5SIG
        struct tcp_md5sig_key *key;
  #endif
@@ -1150643,7 +1150588,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
  
        if (th->rst)
                return;
-@@ -969,13 +973,16 @@ static void tcp_v6_send_reset(struct soc
+@@ -969,13 +973,16 @@
                tot_len += TCPOLEN_MD5SIG_ALIGNED;
  #endif
  
@@ -1150661,7 +1150606,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
        if (buff == NULL)
                return;
  
-@@ -1063,7 +1070,7 @@ static void tcp_v6_send_ack(struct sk_bu
+@@ -1063,7 +1070,7 @@
  #endif
  
        buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
@@ -1150670,7 +1150615,7 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
        if (buff == NULL)
                return;
  
-@@ -1087,7 +1094,7 @@ static void tcp_v6_send_ack(struct sk_bu
+@@ -1087,7 +1094,7 @@
                *topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
                                (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
                *topt++ = htonl(tcp_time_stamp);
@@ -1150679,10 +1150624,10 @@ diff -purN linux-2.6.27/net/ipv6/tcp_ipv6.c linux-2.6.27.19-5.1/net/ipv6/tcp_ipv
        }
  
  #ifdef CONFIG_TCP_MD5SIG
-diff -purN linux-2.6.27/net/ipv6/udp.c linux-2.6.27.19-5.1/net/ipv6/udp.c
---- linux-2.6.27/net/ipv6/udp.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/ipv6/udp.c 2009-03-25 16:11:02.000000000 +0000
-@@ -313,7 +313,7 @@ drop:
+diff -r 9608d5473017 net/ipv6/udp.c
+--- a/net/ipv6/udp.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/ipv6/udp.c   Wed May 06 16:57:05 2009 +0100
+@@ -313,7 +313,7 @@
        return -1;
  }
  
@@ -1150691,7 +1150636,7 @@ diff -purN linux-2.6.27/net/ipv6/udp.c linux-2.6.27.19-5.1/net/ipv6/udp.c
                                      __be16 loc_port, struct in6_addr *loc_addr,
                                      __be16 rmt_port, struct in6_addr *rmt_addr,
                                      int dif)
-@@ -325,7 +325,7 @@ static struct sock *udp_v6_mcast_next(st
+@@ -325,7 +325,7 @@
        sk_for_each_from(s, node) {
                struct inet_sock *inet = inet_sk(s);
  
@@ -1150700,7 +1150645,7 @@ diff -purN linux-2.6.27/net/ipv6/udp.c linux-2.6.27.19-5.1/net/ipv6/udp.c
                        continue;
  
                if (s->sk_hash == num && s->sk_family == PF_INET6) {
-@@ -368,14 +368,14 @@ static int __udp6_lib_mcast_deliver(stru
+@@ -368,14 +368,14 @@
        read_lock(&udp_hash_lock);
        sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]);
        dif = inet6_iif(skb);
@@ -1150717,19 +1150662,19 @@ diff -purN linux-2.6.27/net/ipv6/udp.c linux-2.6.27.19-5.1/net/ipv6/udp.c
                                        uh->source, saddr, dif))) {
                struct sk_buff *buff = skb_clone(skb, GFP_ATOMIC);
                if (buff) {
-diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.c
---- linux-2.6.27/net/iucv/af_iucv.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/iucv/af_iucv.c     2009-03-25 16:11:00.000000000 +0000
-@@ -8,6 +8,8 @@
+diff -r 9608d5473017 net/iucv/af_iucv.c
+--- a/net/iucv/af_iucv.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/iucv/af_iucv.c       Wed May 06 16:57:05 2009 +0100
+@@ -7,6 +7,8 @@
+  *
   *  Author(s):        Jennifer Hunt <jenhunt@us.ibm.com>
   */
-+#define KMSG_COMPONENT "af_iucv"
 +
++#define KMSG_COMPONENT "af_iucv"
  #include <linux/module.h>
  #include <linux/types.h>
- #include <linux/list.h>
-@@ -616,6 +618,8 @@ static int iucv_sock_sendmsg(struct kioc
+@@ -616,6 +618,8 @@
        struct iucv_sock *iucv = iucv_sk(sk);
        struct sk_buff *skb;
        struct iucv_message txmsg;
@@ -1150738,7 +1150683,7 @@ diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.
        int err;
  
        err = sock_error(sk);
-@@ -651,8 +655,15 @@ static int iucv_sock_sendmsg(struct kioc
+@@ -651,8 +655,15 @@
                err = iucv_message_send(iucv->path, &txmsg, 0, 0,
                                        (void *) skb->data, skb->len);
                if (err) {
@@ -1150756,7 +1150701,7 @@ diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.
                        skb_unlink(skb, &iucv->send_skb_q);
                        err = -EPIPE;
                        goto fail;
-@@ -778,6 +789,8 @@ static int iucv_sock_recvmsg(struct kioc
+@@ -778,6 +789,8 @@
  
        target = sock_rcvlowat(sk, flags & MSG_WAITALL, len);
  
@@ -1150765,7 +1150710,7 @@ diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.
        skb = skb_recv_datagram(sk, flags, noblock, &err);
        if (!skb) {
                if (sk->sk_shutdown & RCV_SHUTDOWN)
-@@ -825,9 +838,7 @@ static int iucv_sock_recvmsg(struct kioc
+@@ -825,9 +838,7 @@
                                iucv_process_message_q(sk);
                        spin_unlock_bh(&iucv->message_q.lock);
                }
@@ -1150776,7 +1150721,7 @@ diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.
  
  done:
        return err ? : copied;
-@@ -1190,7 +1201,8 @@ static int __init afiucv_init(void)
+@@ -1190,7 +1201,8 @@
        int err;
  
        if (!MACHINE_IS_VM) {
@@ -1150786,19 +1150731,19 @@ diff -purN linux-2.6.27/net/iucv/af_iucv.c linux-2.6.27.19-5.1/net/iucv/af_iucv.
                err = -EPROTONOSUPPORT;
                goto out;
        }
-diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
---- linux-2.6.27/net/iucv/iucv.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/iucv/iucv.c        2009-03-25 16:11:00.000000000 +0000
-@@ -30,6 +30,8 @@
+diff -r 9608d5473017 net/iucv/iucv.c
+--- a/net/iucv/iucv.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/iucv/iucv.c  Wed May 06 16:57:05 2009 +0100
+@@ -29,6 +29,8 @@
+  * along with this program; if not, write to the Free Software
   * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
-+#define KMSG_COMPONENT "iucv"
 +
++#define KMSG_COMPONENT "iucv"
  #include <linux/module.h>
  #include <linux/moduleparam.h>
- #include <linux/spinlock.h>
-@@ -424,8 +426,8 @@ static void iucv_declare_cpu(void *data)
+@@ -424,8 +426,8 @@
                        err = "Paging or storage error";
                        break;
                }
@@ -1150809,7 +1150754,7 @@ diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
                return;
        }
  
-@@ -514,6 +516,7 @@ static int iucv_enable(void)
+@@ -514,6 +516,7 @@
        size_t alloc_size;
        int cpu, rc;
  
@@ -1150817,7 +1150762,7 @@ diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
        rc = -ENOMEM;
        alloc_size = iucv_max_pathid * sizeof(struct iucv_path);
        iucv_path_table = kzalloc(alloc_size, GFP_KERNEL);
-@@ -521,19 +524,17 @@ static int iucv_enable(void)
+@@ -521,19 +524,17 @@
                goto out;
        /* Declare per cpu buffers. */
        rc = -EIO;
@@ -1150832,27 +1150777,27 @@ diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
        return 0;
 -
 -out_path:
--      put_online_cpus();
--      kfree(iucv_path_table);
- out:
++out:
 +      kfree(iucv_path_table);
 +      iucv_path_table = NULL;
-+      put_online_cpus();
+       put_online_cpus();
+-      kfree(iucv_path_table);
+-out:
        return rc;
  }
  
-@@ -548,8 +549,9 @@ static void iucv_disable(void)
+@@ -548,8 +549,9 @@
  {
        get_online_cpus();
        on_each_cpu(iucv_retrieve_cpu, NULL, 1);
--      put_online_cpus();
-       kfree(iucv_path_table);
++      kfree(iucv_path_table);
 +      iucv_path_table = NULL;
-+      put_online_cpus();
+       put_online_cpus();
+-      kfree(iucv_path_table);
  }
  
  static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
-@@ -586,10 +588,14 @@ static int __cpuinit iucv_cpu_notify(str
+@@ -586,10 +588,14 @@
        case CPU_ONLINE_FROZEN:
        case CPU_DOWN_FAILED:
        case CPU_DOWN_FAILED_FROZEN:
@@ -1150867,7 +1150812,7 @@ diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
                cpumask = iucv_buffer_cpumask;
                cpu_clear(cpu, cpumask);
                if (cpus_empty(cpumask))
-@@ -1572,7 +1578,7 @@ static void iucv_external_interrupt(u16 
+@@ -1572,7 +1578,7 @@
        BUG_ON(p->iptype  < 0x01 || p->iptype > 0x09);
        work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
        if (!work) {
@@ -1150876,10 +1150821,10 @@ diff -purN linux-2.6.27/net/iucv/iucv.c linux-2.6.27.19-5.1/net/iucv/iucv.c
                return;
        }
        memcpy(&work->data, p, sizeof(work->data));
-diff -purN linux-2.6.27/net/key/af_key.c linux-2.6.27.19-5.1/net/key/af_key.c
---- linux-2.6.27/net/key/af_key.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/key/af_key.c       2009-03-25 16:11:01.000000000 +0000
-@@ -2051,7 +2051,6 @@ static int pfkey_xfrm_policy2msg(struct 
+diff -r 9608d5473017 net/key/af_key.c
+--- a/net/key/af_key.c Wed May 06 15:47:13 2009 +0100
++++ b/net/key/af_key.c Wed May 06 16:57:05 2009 +0100
+@@ -2051,7 +2051,6 @@
                        req_size += socklen * 2;
                } else {
                        size -= 2*socklen;
@@ -1150887,10 +1150832,10 @@ diff -purN linux-2.6.27/net/key/af_key.c linux-2.6.27.19-5.1/net/key/af_key.c
                }
                rq = (void*)skb_put(skb, req_size);
                pol->sadb_x_policy_len += req_size/8;
-diff -purN linux-2.6.27/net/mac80211/Kconfig linux-2.6.27.19-5.1/net/mac80211/Kconfig
---- linux-2.6.27/net/mac80211/Kconfig  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/Kconfig   2009-03-25 16:11:01.000000000 +0000
-@@ -3,7 +3,6 @@ config MAC80211
+diff -r 9608d5473017 net/mac80211/Kconfig
+--- a/net/mac80211/Kconfig     Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/Kconfig     Wed May 06 16:57:05 2009 +0100
+@@ -3,7 +3,6 @@
        select CRYPTO
        select CRYPTO_ECB
        select CRYPTO_ARC4
@@ -1150898,10 +1150843,10 @@ diff -purN linux-2.6.27/net/mac80211/Kconfig linux-2.6.27.19-5.1/net/mac80211/Kc
        select CRC32
        select WIRELESS_EXT
        select CFG80211
-diff -purN linux-2.6.27/net/mac80211/debugfs_netdev.c linux-2.6.27.19-5.1/net/mac80211/debugfs_netdev.c
---- linux-2.6.27/net/mac80211/debugfs_netdev.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/debugfs_netdev.c  2009-03-25 16:11:02.000000000 +0000
-@@ -537,6 +537,7 @@ static int netdev_notify(struct notifier
+diff -r 9608d5473017 net/mac80211/debugfs_netdev.c
+--- a/net/mac80211/debugfs_netdev.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/debugfs_netdev.c    Wed May 06 16:57:05 2009 +0100
+@@ -537,6 +537,7 @@
  {
        struct net_device *dev = ndev;
        struct dentry *dir;
@@ -1150909,7 +1150854,7 @@ diff -purN linux-2.6.27/net/mac80211/debugfs_netdev.c linux-2.6.27.19-5.1/net/ma
        struct ieee80211_sub_if_data *sdata;
        char buf[10+IFNAMSIZ];
  
-@@ -549,10 +550,19 @@ static int netdev_notify(struct notifier
+@@ -549,10 +550,19 @@
        if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
                return 0;
  
@@ -1150920,21 +1150865,21 @@ diff -purN linux-2.6.27/net/mac80211/debugfs_netdev.c linux-2.6.27.19-5.1/net/ma
 +       * handle here.
 +       */
 +      sdata = netdev_priv(dev);
--      sprintf(buf, "netdev:%s", dev->name);
-       dir = sdata->debugfsdir;
++
++      dir = sdata->debugfsdir;
 +
 +      if (!dir)
 +              return 0;
-+
-+      sprintf(buf, "netdev:%s", dev->name);
+       sprintf(buf, "netdev:%s", dev->name);
+-      dir = sdata->debugfsdir;
        if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
                printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
                       "dir to %s\n", buf);
-diff -purN linux-2.6.27/net/mac80211/debugfs_sta.c linux-2.6.27.19-5.1/net/mac80211/debugfs_sta.c
---- linux-2.6.27/net/mac80211/debugfs_sta.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/debugfs_sta.c     2009-03-25 16:11:02.000000000 +0000
-@@ -200,7 +200,7 @@ static ssize_t sta_agg_status_write(stru
+diff -r 9608d5473017 net/mac80211/debugfs_sta.c
+--- a/net/mac80211/debugfs_sta.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/debugfs_sta.c       Wed May 06 16:57:05 2009 +0100
+@@ -200,7 +200,7 @@
                /* toggle Rx aggregation command */
                tid_num = tid_num - 100;
                if (tid_static_rx[tid_num] == 1) {
@@ -1150943,10 +1150888,10 @@ diff -purN linux-2.6.27/net/mac80211/debugfs_sta.c linux-2.6.27.19-5.1/net/mac80
                        ieee80211_sta_stop_rx_ba_session(dev, da, tid_num, 0,
                                        WLAN_REASON_QSTA_REQUIRE_SETUP);
                        sta->ampdu_mlme.tid_state_rx[tid_num] |=
-diff -purN linux-2.6.27/net/mac80211/ieee80211_i.h linux-2.6.27.19-5.1/net/mac80211/ieee80211_i.h
---- linux-2.6.27/net/mac80211/ieee80211_i.h    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/ieee80211_i.h     2009-03-25 16:11:02.000000000 +0000
-@@ -117,6 +117,10 @@ struct ieee80211_sta_bss {
+diff -r 9608d5473017 net/mac80211/ieee80211_i.h
+--- a/net/mac80211/ieee80211_i.h       Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/ieee80211_i.h       Wed May 06 16:57:05 2009 +0100
+@@ -117,6 +117,10 @@
         * otherwise, you probably don't want to use them. */
        int has_erp_value;
        u8 erp_value;
@@ -1150957,7 +1150902,7 @@ diff -purN linux-2.6.27/net/mac80211/ieee80211_i.h linux-2.6.27.19-5.1/net/mac80
  };
  
  static inline u8 *bss_mesh_cfg(struct ieee80211_sta_bss *bss)
-@@ -310,6 +314,9 @@ struct ieee80211_if_sta {
+@@ -310,6 +314,9 @@
                IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED,
                IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED,
                IEEE80211_MESH_UP
@@ -1150967,7 +1150912,7 @@ diff -purN linux-2.6.27/net/mac80211/ieee80211_i.h linux-2.6.27.19-5.1/net/mac80
        } state;
        size_t ssid_len;
        u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
-@@ -363,6 +370,7 @@ struct ieee80211_if_sta {
+@@ -363,6 +370,7 @@
  #define IEEE80211_STA_REQ_SCAN 0
  #define IEEE80211_STA_REQ_AUTH 1
  #define IEEE80211_STA_REQ_RUN  2
@@ -1150975,13 +1150920,15 @@ diff -purN linux-2.6.27/net/mac80211/ieee80211_i.h linux-2.6.27.19-5.1/net/mac80
  
  #define IEEE80211_AUTH_ALG_OPEN BIT(0)
  #define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1)
-diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlme.c
---- linux-2.6.27/net/mac80211/mlme.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/mlme.c    2009-03-25 16:11:02.000000000 +0000
-@@ -658,6 +658,36 @@ static void ieee80211_send_auth(struct n
-       ieee80211_sta_tx(dev, skb, encrypt);
- }
+diff -r 9608d5473017 net/mac80211/mlme.c
+--- a/net/mac80211/mlme.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/mlme.c      Wed May 06 16:57:05 2009 +0100
+@@ -656,6 +656,36 @@
+               memcpy(skb_put(skb, extra_len), extra, extra_len);
  
+       ieee80211_sta_tx(dev, skb, encrypt);
++}
++
 +static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata,
 +                                 struct ieee80211_if_sta *ifsta)
 +{
@@ -1151010,12 +1150957,10 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
 +                               ifsta->ssid, ifsta->ssid_len);
 +
 +      mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT);
-+}
-+
+ }
  
- static void ieee80211_authenticate(struct net_device *dev,
-                                  struct ieee80211_if_sta *ifsta)
-@@ -1958,7 +1988,7 @@ static void ieee80211_rx_mgmt_deauth(str
+@@ -1958,7 +1988,7 @@
        if (ifsta->state == IEEE80211_AUTHENTICATE ||
            ifsta->state == IEEE80211_ASSOCIATE ||
            ifsta->state == IEEE80211_ASSOCIATED) {
@@ -1151024,7 +1150969,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
                mod_timer(&ifsta->timer, jiffies +
                                      IEEE80211_RETRY_AUTH_INTERVAL);
        }
-@@ -2559,8 +2589,7 @@ static void ieee80211_rx_bss_info(struct
+@@ -2559,8 +2589,7 @@
                                  struct ieee80211_mgmt *mgmt,
                                  size_t len,
                                  struct ieee80211_rx_status *rx_status,
@@ -1151034,7 +1150979,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
  {
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
        int freq, clen;
-@@ -2569,6 +2598,7 @@ static void ieee80211_rx_bss_info(struct
+@@ -2569,6 +2598,7 @@
        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
        u64 beacon_timestamp, rx_timestamp;
        struct ieee80211_channel *channel;
@@ -1151042,7 +1150987,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
        DECLARE_MAC_BUF(mac);
        DECLARE_MAC_BUF(mac2);
  
-@@ -2728,15 +2758,14 @@ static void ieee80211_rx_bss_info(struct
+@@ -2728,15 +2758,14 @@
        bss->signal = rx_status->signal;
        bss->noise = rx_status->noise;
        bss->qual = rx_status->qual;
@@ -1151061,7 +1151006,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
                ieee80211_rx_bss_put(local, bss);
                return;
        }
-@@ -2891,6 +2920,8 @@ static void ieee80211_rx_mgmt_probe_resp
+@@ -2891,6 +2920,8 @@
  {
        size_t baselen;
        struct ieee802_11_elems elems;
@@ -1151070,7 +1151015,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
  
        baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
        if (baselen > len)
-@@ -2899,7 +2930,17 @@ static void ieee80211_rx_mgmt_probe_resp
+@@ -2899,7 +2930,17 @@
        ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen,
                                &elems);
  
@@ -1151089,7 +1151034,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
  }
  
  
-@@ -2923,7 +2964,7 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -2923,7 +2964,7 @@
  
        ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems);
  
@@ -1151098,7 +1151043,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
  
        sdata = IEEE80211_DEV_TO_SUB_IF(dev);
        if (sdata->vif.type != IEEE80211_IF_TYPE_STA)
-@@ -3361,7 +3402,8 @@ void ieee80211_sta_work(struct work_stru
+@@ -3361,7 +3402,8 @@
                mesh_path_start_discovery(dev);
  #endif
  
@@ -1151108,7 +1151053,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
            ifsta->state != IEEE80211_ASSOCIATE &&
            test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
                if (ifsta->scan_ssid_len)
-@@ -3381,6 +3423,10 @@ void ieee80211_sta_work(struct work_stru
+@@ -3381,6 +3423,10 @@
        switch (ifsta->state) {
        case IEEE80211_DISABLED:
                break;
@@ -1151119,7 +1151064,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
        case IEEE80211_AUTHENTICATE:
                ieee80211_authenticate(dev, ifsta);
                break;
-@@ -3541,8 +3587,18 @@ static int ieee80211_sta_config_auth(str
+@@ -3541,8 +3587,18 @@
                                               selected->ssid_len);
                ieee80211_sta_set_bssid(dev, selected->bssid);
                ieee80211_sta_def_wmm_params(dev, selected, 0);
@@ -1151139,7 +1151084,7 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
                ieee80211_sta_reset_auth(dev, ifsta);
                return 0;
        } else {
-@@ -3553,6 +3609,7 @@ static int ieee80211_sta_config_auth(str
+@@ -3553,6 +3609,7 @@
                                ieee80211_sta_start_scan(dev, ifsta->ssid,
                                                         ifsta->ssid_len);
                        ifsta->state = IEEE80211_AUTHENTICATE;
@@ -1151147,10 +1151092,10 @@ diff -purN linux-2.6.27/net/mac80211/mlme.c linux-2.6.27.19-5.1/net/mac80211/mlm
                        set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
                } else
                        ifsta->state = IEEE80211_DISABLED;
-diff -purN linux-2.6.27/net/mac80211/tx.c linux-2.6.27.19-5.1/net/mac80211/tx.c
---- linux-2.6.27/net/mac80211/tx.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/tx.c      2009-03-25 16:11:02.000000000 +0000
-@@ -1335,8 +1335,10 @@ int ieee80211_master_start_xmit(struct s
+diff -r 9608d5473017 net/mac80211/tx.c
+--- a/net/mac80211/tx.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/tx.c        Wed May 06 16:57:05 2009 +0100
+@@ -1335,8 +1335,10 @@
                        if (is_multicast_ether_addr(hdr->addr3))
                                memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
                        else
@@ -1151162,10 +1151107,10 @@ diff -purN linux-2.6.27/net/mac80211/tx.c linux-2.6.27.19-5.1/net/mac80211/tx.c
                        if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
                                IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.sta,
                                                             fwded_frames);
-diff -purN linux-2.6.27/net/mac80211/wext.c linux-2.6.27.19-5.1/net/mac80211/wext.c
---- linux-2.6.27/net/mac80211/wext.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/mac80211/wext.c    2009-03-25 16:11:01.000000000 +0000
-@@ -804,7 +804,7 @@ static int ieee80211_ioctl_siwfrag(struc
+diff -r 9608d5473017 net/mac80211/wext.c
+--- a/net/mac80211/wext.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/mac80211/wext.c      Wed May 06 16:57:05 2009 +0100
+@@ -804,7 +804,7 @@
         * configure it here */
  
        if (local->ops->set_frag_threshold)
@@ -1151174,13 +1151119,16 @@ diff -purN linux-2.6.27/net/mac80211/wext.c linux-2.6.27.19-5.1/net/mac80211/wex
                        local_to_hw(local),
                        local->fragmentation_threshold);
  
-diff -purN linux-2.6.27/net/netfilter/Kconfig linux-2.6.27.19-5.1/net/netfilter/Kconfig
---- linux-2.6.27/net/netfilter/Kconfig 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/Kconfig  2009-03-25 16:11:02.000000000 +0000
-@@ -278,6 +278,21 @@ config NF_CONNTRACK_TFTP
-         To compile it as a module, choose M here.  If unsure, say N.
+diff -r 9608d5473017 net/netfilter/Kconfig
+--- a/net/netfilter/Kconfig    Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/Kconfig    Wed May 06 16:57:05 2009 +0100
+@@ -275,6 +275,21 @@
+         on how restrictive your ruleset is.
+         If you are using a tftp client behind -j SNAT or -j MASQUERADING
+         you will need this.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
 +config NF_CONNTRACK_SLP
 +      tristate "SLP protocol support"
 +      depends on NF_CONNTRACK
@@ -1151193,16 +1151141,13 @@ diff -purN linux-2.6.27/net/netfilter/Kconfig linux-2.6.27.19-5.1/net/netfilter/
 +        originating broadcast SLP queries and the corresponding
 +        responses. It relies on correct IP address configuration, specifically
 +        netmask and broadcast address.
-+
-+        To compile it as a module, choose M here.  If unsure, say N.
-+
- config NF_CT_NETLINK
-       tristate 'Connection tracking netlink interface'
-       depends on NF_CONNTRACK
-diff -purN linux-2.6.27/net/netfilter/Makefile linux-2.6.27.19-5.1/net/netfilter/Makefile
---- linux-2.6.27/net/netfilter/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/Makefile 2009-03-25 16:11:02.000000000 +0000
-@@ -33,6 +33,7 @@ obj-$(CONFIG_NF_CONNTRACK_PPTP) += nf_co
+         To compile it as a module, choose M here.  If unsure, say N.
+diff -r 9608d5473017 net/netfilter/Makefile
+--- a/net/netfilter/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/Makefile   Wed May 06 16:57:05 2009 +0100
+@@ -33,6 +33,7 @@
  obj-$(CONFIG_NF_CONNTRACK_SANE) += nf_conntrack_sane.o
  obj-$(CONFIG_NF_CONNTRACK_SIP) += nf_conntrack_sip.o
  obj-$(CONFIG_NF_CONNTRACK_TFTP) += nf_conntrack_tftp.o
@@ -1151210,10 +1151155,10 @@ diff -purN linux-2.6.27/net/netfilter/Makefile linux-2.6.27.19-5.1/net/netfilter
  
  # generic X tables 
  obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
-diff -purN linux-2.6.27/net/netfilter/core.c linux-2.6.27.19-5.1/net/netfilter/core.c
---- linux-2.6.27/net/netfilter/core.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/core.c   2009-03-25 16:11:02.000000000 +0000
-@@ -184,9 +184,12 @@ next_hook:
+diff -r 9608d5473017 net/netfilter/core.c
+--- a/net/netfilter/core.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/core.c     Wed May 06 16:57:05 2009 +0100
+@@ -184,9 +184,12 @@
                ret = 1;
                goto unlock;
        } else if (verdict == NF_DROP) {
@@ -1151226,10 +1151171,10 @@ diff -purN linux-2.6.27/net/netfilter/core.c linux-2.6.27.19-5.1/net/netfilter/c
                if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn,
                              verdict >> NF_VERDICT_BITS))
                        goto next_hook;
-diff -purN linux-2.6.27/net/netfilter/nf_conntrack_pptp.c linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_pptp.c
---- linux-2.6.27/net/netfilter/nf_conntrack_pptp.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_pptp.c      2009-03-25 16:11:02.000000000 +0000
-@@ -65,7 +65,7 @@ void
+diff -r 9608d5473017 net/netfilter/nf_conntrack_pptp.c
+--- a/net/netfilter/nf_conntrack_pptp.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/nf_conntrack_pptp.c        Wed May 06 16:57:05 2009 +0100
+@@ -65,7 +65,7 @@
                             struct nf_conntrack_expect *exp) __read_mostly;
  EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_expectfn);
  
@@ -1151238,9 +1151183,9 @@ diff -purN linux-2.6.27/net/netfilter/nf_conntrack_pptp.c linux-2.6.27.19-5.1/ne
  /* PptpControlMessageType names */
  const char *const pptp_msg_name[] = {
        "UNKNOWN_MESSAGE",
-diff -purN linux-2.6.27/net/netfilter/nf_conntrack_slp.c linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_slp.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/nf_conntrack_slp.c       2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/netfilter/nf_conntrack_slp.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/netfilter/nf_conntrack_slp.c Wed May 06 16:57:05 2009 +0100
 @@ -0,0 +1,132 @@
 +/*
 + *      NetBIOS name service broadcast connection tracking helper
@@ -1151374,10 +1151319,10 @@ diff -purN linux-2.6.27/net/netfilter/nf_conntrack_slp.c linux-2.6.27.19-5.1/net
 +
 +module_init(nf_conntrack_slp_init);
 +module_exit(nf_conntrack_slp_fini);
-diff -purN linux-2.6.27/net/netfilter/xt_iprange.c linux-2.6.27.19-5.1/net/netfilter/xt_iprange.c
---- linux-2.6.27/net/netfilter/xt_iprange.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/xt_iprange.c     2009-03-25 16:11:02.000000000 +0000
-@@ -67,7 +67,7 @@ iprange_mt4(const struct sk_buff *skb, c
+diff -r 9608d5473017 net/netfilter/xt_iprange.c
+--- a/net/netfilter/xt_iprange.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/xt_iprange.c       Wed May 06 16:57:06 2009 +0100
+@@ -67,7 +67,7 @@
        if (info->flags & IPRANGE_SRC) {
                m  = ntohl(iph->saddr) < ntohl(info->src_min.ip);
                m |= ntohl(iph->saddr) > ntohl(info->src_max.ip);
@@ -1151386,7 +1151331,7 @@ diff -purN linux-2.6.27/net/netfilter/xt_iprange.c linux-2.6.27.19-5.1/net/netfi
                if (m) {
                        pr_debug("src IP " NIPQUAD_FMT " NOT in range %s"
                                 NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
-@@ -81,7 +81,7 @@ iprange_mt4(const struct sk_buff *skb, c
+@@ -81,7 +81,7 @@
        if (info->flags & IPRANGE_DST) {
                m  = ntohl(iph->daddr) < ntohl(info->dst_min.ip);
                m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip);
@@ -1151395,7 +1151340,7 @@ diff -purN linux-2.6.27/net/netfilter/xt_iprange.c linux-2.6.27.19-5.1/net/netfi
                if (m) {
                        pr_debug("dst IP " NIPQUAD_FMT " NOT in range %s"
                                 NIPQUAD_FMT "-" NIPQUAD_FMT "\n",
-@@ -123,14 +123,14 @@ iprange_mt6(const struct sk_buff *skb, c
+@@ -123,14 +123,14 @@
        if (info->flags & IPRANGE_SRC) {
                m  = iprange_ipv6_sub(&iph->saddr, &info->src_min.in6) < 0;
                m |= iprange_ipv6_sub(&iph->saddr, &info->src_max.in6) > 0;
@@ -1151412,10 +1151357,10 @@ diff -purN linux-2.6.27/net/netfilter/xt_iprange.c linux-2.6.27.19-5.1/net/netfi
                if (m)
                        return false;
        }
-diff -purN linux-2.6.27/net/netfilter/xt_sctp.c linux-2.6.27.19-5.1/net/netfilter/xt_sctp.c
---- linux-2.6.27/net/netfilter/xt_sctp.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/netfilter/xt_sctp.c        2009-03-25 16:11:02.000000000 +0000
-@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb,
+diff -r 9608d5473017 net/netfilter/xt_sctp.c
+--- a/net/netfilter/xt_sctp.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/netfilter/xt_sctp.c  Wed May 06 16:57:06 2009 +0100
+@@ -105,7 +105,7 @@
  
        switch (chunk_match_type) {
        case SCTP_CHUNK_MATCH_ALL:
@@ -1151424,9 +1151369,9 @@ diff -purN linux-2.6.27/net/netfilter/xt_sctp.c linux-2.6.27.19-5.1/net/netfilte
        case SCTP_CHUNK_MATCH_ANY:
                return false;
        case SCTP_CHUNK_MATCH_ONLY:
-diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af_packet.c
---- linux-2.6.27/net/packet/af_packet.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/packet/af_packet.c 2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 net/packet/af_packet.c
+--- a/net/packet/af_packet.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/packet/af_packet.c   Wed May 06 16:57:06 2009 +0100
 @@ -77,6 +77,7 @@
  #include <linux/poll.h>
  #include <linux/module.h>
@@ -1151435,7 +1151380,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
  
  #ifdef CONFIG_INET
  #include <net/inet_common.h>
-@@ -175,6 +176,7 @@ struct packet_sock {
+@@ -175,6 +176,7 @@
  #endif
        struct packet_type      prot_hook;
        spinlock_t              bind_lock;
@@ -1151443,7 +1151388,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
        unsigned int            running:1,      /* prot_hook is attached*/
                                auxdata:1,
                                origdev:1;
-@@ -220,13 +222,13 @@ static void *packet_lookup_frame(struct 
+@@ -220,13 +222,13 @@
        h.raw = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size);
        switch (po->tp_version) {
        case TPACKET_V1:
@@ -1151461,7 +1151406,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
                        return NULL;
                break;
        }
-@@ -1068,6 +1070,7 @@ static int packet_create(struct net *net
+@@ -1068,6 +1070,7 @@
         */
  
        spin_lock_init(&po->bind_lock);
@@ -1151469,7 +1151414,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
        po->prot_hook.func = packet_rcv;
  
        if (sock->type == SOCK_PACKET)
-@@ -1863,6 +1866,7 @@ static int packet_set_ring(struct sock *
+@@ -1863,6 +1866,7 @@
        synchronize_net();
  
        err = -EBUSY;
@@ -1151477,7 +1151422,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
        if (closing || atomic_read(&po->mapped) == 0) {
                err = 0;
  #define XC(a, b) ({ __typeof__ ((a)) __t; __t = (a); (a) = (b); __t; })
-@@ -1884,6 +1888,7 @@ static int packet_set_ring(struct sock *
+@@ -1884,6 +1888,7 @@
                if (atomic_read(&po->mapped))
                        printk(KERN_DEBUG "packet_mmap: vma is busy: %d\n", atomic_read(&po->mapped));
        }
@@ -1151485,7 +1151430,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
  
        spin_lock(&po->bind_lock);
        if (was_running && !po->running) {
-@@ -1916,7 +1921,7 @@ static int packet_mmap(struct file *file
+@@ -1916,7 +1921,7 @@
  
        size = vma->vm_end - vma->vm_start;
  
@@ -1151494,7 +1151439,7 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
        if (po->pg_vec == NULL)
                goto out;
        if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE)
-@@ -1939,7 +1944,7 @@ static int packet_mmap(struct file *file
+@@ -1939,7 +1944,7 @@
        err = 0;
  
  out:
@@ -1151503,10 +1151448,10 @@ diff -purN linux-2.6.27/net/packet/af_packet.c linux-2.6.27.19-5.1/net/packet/af
        return err;
  }
  #endif
-diff -purN linux-2.6.27/net/rfkill/rfkill.c linux-2.6.27.19-5.1/net/rfkill/rfkill.c
---- linux-2.6.27/net/rfkill/rfkill.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/rfkill/rfkill.c    2009-03-25 16:11:00.000000000 +0000
-@@ -117,6 +117,7 @@ static void rfkill_led_trigger_activate(
+diff -r 9608d5473017 net/rfkill/rfkill.c
+--- a/net/rfkill/rfkill.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/rfkill/rfkill.c      Wed May 06 16:57:06 2009 +0100
+@@ -117,6 +117,7 @@
  
  static void notify_rfkill_state_change(struct rfkill *rfkill)
  {
@@ -1151514,7 +1151459,7 @@ diff -purN linux-2.6.27/net/rfkill/rfkill.c linux-2.6.27.19-5.1/net/rfkill/rfkil
        blocking_notifier_call_chain(&rfkill_notifier_list,
                        RFKILL_STATE_CHANGED,
                        rfkill);
-@@ -204,10 +205,8 @@ static int rfkill_toggle_radio(struct rf
+@@ -204,10 +205,8 @@
                        rfkill->state = state;
        }
  
@@ -1151526,13 +1151471,14 @@ diff -purN linux-2.6.27/net/rfkill/rfkill.c linux-2.6.27.19-5.1/net/rfkill/rfkil
  
        return retval;
  }
-diff -purN linux-2.6.27/net/sched/Kconfig linux-2.6.27.19-5.1/net/sched/Kconfig
---- linux-2.6.27/net/sched/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/Kconfig      2009-03-25 16:11:02.000000000 +0000
-@@ -106,6 +106,15 @@ config NET_SCH_PRIO
+diff -r 9608d5473017 net/sched/Kconfig
+--- a/net/sched/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/Kconfig        Wed May 06 16:57:06 2009 +0100
+@@ -105,6 +105,15 @@
          To compile this code as a module, choose M here: the
          module will be called sch_prio.
++
 +config NET_SCH_MULTIQ
 +      tristate "Hardware Multiqueue-aware Multi Band Queuing (MULTIQ)"
 +      ---help---
@@ -1151541,11 +1151487,10 @@ diff -purN linux-2.6.27/net/sched/Kconfig linux-2.6.27.19-5.1/net/sched/Kconfig
 +
 +        To compile this code as a module, choose M here: the
 +        module will be called sch_multiq.
-+
  config NET_SCH_RED
        tristate "Random Early Detection (RED)"
-       ---help---
-@@ -476,6 +485,17 @@ config NET_ACT_SIMP
+@@ -476,6 +485,17 @@
          To compile this code as a module, choose M here: the
          module will be called simple.
  
@@ -1151563,10 +1151508,10 @@ diff -purN linux-2.6.27/net/sched/Kconfig linux-2.6.27.19-5.1/net/sched/Kconfig
  config NET_CLS_IND
        bool "Incoming device classification"
        depends on NET_CLS_U32 || NET_CLS_FW
-diff -purN linux-2.6.27/net/sched/Makefile linux-2.6.27.19-5.1/net/sched/Makefile
---- linux-2.6.27/net/sched/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/Makefile     2009-03-25 16:11:02.000000000 +0000
-@@ -14,6 +14,7 @@ obj-$(CONFIG_NET_ACT_IPT)    += act_ipt.o
+diff -r 9608d5473017 net/sched/Makefile
+--- a/net/sched/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/Makefile       Wed May 06 16:57:06 2009 +0100
+@@ -14,6 +14,7 @@
  obj-$(CONFIG_NET_ACT_NAT)     += act_nat.o
  obj-$(CONFIG_NET_ACT_PEDIT)   += act_pedit.o
  obj-$(CONFIG_NET_ACT_SIMP)    += act_simple.o
@@ -1151574,7 +1151519,7 @@ diff -purN linux-2.6.27/net/sched/Makefile linux-2.6.27.19-5.1/net/sched/Makefil
  obj-$(CONFIG_NET_SCH_FIFO)    += sch_fifo.o
  obj-$(CONFIG_NET_SCH_CBQ)     += sch_cbq.o
  obj-$(CONFIG_NET_SCH_HTB)     += sch_htb.o
-@@ -26,6 +27,7 @@ obj-$(CONFIG_NET_SCH_SFQ)    += sch_sfq.o
+@@ -26,6 +27,7 @@
  obj-$(CONFIG_NET_SCH_TBF)     += sch_tbf.o
  obj-$(CONFIG_NET_SCH_TEQL)    += sch_teql.o
  obj-$(CONFIG_NET_SCH_PRIO)    += sch_prio.o
@@ -1151582,9 +1151527,9 @@ diff -purN linux-2.6.27/net/sched/Makefile linux-2.6.27.19-5.1/net/sched/Makefil
  obj-$(CONFIG_NET_SCH_ATM)     += sch_atm.o
  obj-$(CONFIG_NET_SCH_NETEM)   += sch_netem.o
  obj-$(CONFIG_NET_CLS_U32)     += cls_u32.o
-diff -purN linux-2.6.27/net/sched/act_skbedit.c linux-2.6.27.19-5.1/net/sched/act_skbedit.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/act_skbedit.c        2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/sched/act_skbedit.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/sched/act_skbedit.c  Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,203 @@
 +/*
 + * Copyright (c) 2008, Intel Corporation.
@@ -1151789,10 +1151734,10 @@ diff -purN linux-2.6.27/net/sched/act_skbedit.c linux-2.6.27.19-5.1/net/sched/ac
 +
 +module_init(skbedit_init_module);
 +module_exit(skbedit_cleanup_module);
-diff -purN linux-2.6.27/net/sched/cls_u32.c linux-2.6.27.19-5.1/net/sched/cls_u32.c
---- linux-2.6.27/net/sched/cls_u32.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/cls_u32.c    2009-03-25 16:11:02.000000000 +0000
-@@ -637,8 +637,9 @@ static int u32_change(struct tcf_proto *
+diff -r 9608d5473017 net/sched/cls_u32.c
+--- a/net/sched/cls_u32.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/cls_u32.c      Wed May 06 16:57:06 2009 +0100
+@@ -637,8 +637,9 @@
                                break;
  
                n->next = *ins;
@@ -1151803,10 +1151748,10 @@ diff -purN linux-2.6.27/net/sched/cls_u32.c linux-2.6.27.19-5.1/net/sched/cls_u3
  
                *arg = (unsigned long)n;
                return 0;
-diff -purN linux-2.6.27/net/sched/sch_generic.c linux-2.6.27.19-5.1/net/sched/sch_generic.c
---- linux-2.6.27/net/sched/sch_generic.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_generic.c        2009-03-25 16:11:02.000000000 +0000
-@@ -319,6 +319,7 @@ struct Qdisc_ops noop_qdisc_ops __read_m
+diff -r 9608d5473017 net/sched/sch_generic.c
+--- a/net/sched/sch_generic.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/sch_generic.c  Wed May 06 16:57:06 2009 +0100
+@@ -319,6 +319,7 @@
  
  static struct netdev_queue noop_netdev_queue = {
        .qdisc          =       &noop_qdisc,
@@ -1151814,7 +1151759,7 @@ diff -purN linux-2.6.27/net/sched/sch_generic.c linux-2.6.27.19-5.1/net/sched/sc
  };
  
  struct Qdisc noop_qdisc = {
-@@ -344,6 +345,7 @@ static struct Qdisc_ops noqueue_qdisc_op
+@@ -344,6 +345,7 @@
  static struct Qdisc noqueue_qdisc;
  static struct netdev_queue noqueue_netdev_queue = {
        .qdisc          =       &noqueue_qdisc,
@@ -1151822,10 +1151767,10 @@ diff -purN linux-2.6.27/net/sched/sch_generic.c linux-2.6.27.19-5.1/net/sched/sc
  };
  
  static struct Qdisc noqueue_qdisc = {
-diff -purN linux-2.6.27/net/sched/sch_htb.c linux-2.6.27.19-5.1/net/sched/sch_htb.c
---- linux-2.6.27/net/sched/sch_htb.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_htb.c    2009-03-25 16:11:02.000000000 +0000
-@@ -924,6 +924,7 @@ static struct sk_buff *htb_dequeue(struc
+diff -r 9608d5473017 net/sched/sch_htb.c
+--- a/net/sched/sch_htb.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/sched/sch_htb.c      Wed May 06 16:57:06 2009 +0100
+@@ -924,6 +924,7 @@
                }
        }
        sch->qstats.overlimits++;
@@ -1151833,9 +1151778,9 @@ diff -purN linux-2.6.27/net/sched/sch_htb.c linux-2.6.27.19-5.1/net/sched/sch_ht
        qdisc_watchdog_schedule(&q->watchdog, next_event);
  fin:
        return skb;
-diff -purN linux-2.6.27/net/sched/sch_multiq.c linux-2.6.27.19-5.1/net/sched/sch_multiq.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sched/sch_multiq.c 2009-03-25 16:11:02.000000000 +0000
+diff -r 9608d5473017 net/sched/sch_multiq.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/net/sched/sch_multiq.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,474 @@
 +/*
 + * Copyright (c) 2008, Intel Corporation.
@@ -1152311,13 +1152256,14 @@ diff -purN linux-2.6.27/net/sched/sch_multiq.c linux-2.6.27.19-5.1/net/sched/sch
 +module_exit(multiq_module_exit)
 +
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/net/sctp/input.c linux-2.6.27.19-5.1/net/sctp/input.c
---- linux-2.6.27/net/sctp/input.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/input.c       2009-03-25 16:11:03.000000000 +0000
-@@ -249,6 +249,19 @@ int sctp_rcv(struct sk_buff *skb)
+diff -r 9608d5473017 net/sctp/input.c
+--- a/net/sctp/input.c Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/input.c Wed May 06 16:57:06 2009 +0100
+@@ -248,6 +248,19 @@
+        * so check if it is busy.
         */
        sctp_bh_lock_sock(sk);
++
 +      if (sk != rcvr->sk) {
 +              /* Our cached sk is different from the rcvr->sk.  This is
 +               * because migrate()/accept() may have moved the association
@@ -1152330,14 +1152276,13 @@ diff -purN linux-2.6.27/net/sctp/input.c linux-2.6.27.19-5.1/net/sctp/input.c
 +              sk = rcvr->sk;
 +              sctp_bh_lock_sock(sk);
 +      }
-+
        if (sock_owned_by_user(sk)) {
                SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG);
-               sctp_add_backlog(sk, skb);
-diff -purN linux-2.6.27/net/sctp/output.c linux-2.6.27.19-5.1/net/sctp/output.c
---- linux-2.6.27/net/sctp/output.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/output.c      2009-03-25 16:11:03.000000000 +0000
-@@ -324,14 +324,16 @@ append:
+diff -r 9608d5473017 net/sctp/output.c
+--- a/net/sctp/output.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/output.c        Wed May 06 16:57:06 2009 +0100
+@@ -324,14 +324,16 @@
        switch (chunk->chunk_hdr->type) {
            case SCTP_CID_DATA:
                retval = sctp_packet_append_data(packet, chunk);
@@ -1152356,7 +1152301,7 @@ diff -purN linux-2.6.27/net/sctp/output.c linux-2.6.27.19-5.1/net/sctp/output.c
                break;
            case SCTP_CID_COOKIE_ECHO:
                packet->has_cookie_echo = 1;
-@@ -470,7 +472,6 @@ int sctp_packet_transmit(struct sctp_pac
+@@ -470,7 +472,6 @@
                        } else
                                chunk->resent = 1;
  
@@ -1152364,10 +1152309,10 @@ diff -purN linux-2.6.27/net/sctp/output.c linux-2.6.27.19-5.1/net/sctp/output.c
                        has_data = 1;
                }
  
-diff -purN linux-2.6.27/net/sctp/outqueue.c linux-2.6.27.19-5.1/net/sctp/outqueue.c
---- linux-2.6.27/net/sctp/outqueue.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/outqueue.c    2009-03-25 16:11:03.000000000 +0000
-@@ -929,7 +929,6 @@ static int sctp_outq_flush(struct sctp_o
+diff -r 9608d5473017 net/sctp/outqueue.c
+--- a/net/sctp/outqueue.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/outqueue.c      Wed May 06 16:57:06 2009 +0100
+@@ -929,7 +929,6 @@
                }
  
                /* Finally, transmit new packets.  */
@@ -1152375,7 +1152320,7 @@ diff -purN linux-2.6.27/net/sctp/outqueue.c linux-2.6.27.19-5.1/net/sctp/outqueu
                while ((chunk = sctp_outq_dequeue_data(q)) != NULL) {
                        /* RFC 2960 6.5 Every DATA chunk MUST carry a valid
                         * stream identifier.
-@@ -1028,7 +1027,7 @@ static int sctp_outq_flush(struct sctp_o
+@@ -1028,7 +1027,7 @@
                        list_add_tail(&chunk->transmitted_list,
                                      &transport->transmitted);
  
@@ -1152384,10 +1152329,10 @@ diff -purN linux-2.6.27/net/sctp/outqueue.c linux-2.6.27.19-5.1/net/sctp/outqueu
  
                        q->empty = 0;
  
-diff -purN linux-2.6.27/net/sctp/sm_statefuns.c linux-2.6.27.19-5.1/net/sctp/sm_statefuns.c
---- linux-2.6.27/net/sctp/sm_statefuns.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/sm_statefuns.c        2009-03-25 16:11:03.000000000 +0000
-@@ -3635,6 +3635,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(c
+diff -r 9608d5473017 net/sctp/sm_statefuns.c
+--- a/net/sctp/sm_statefuns.c  Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/sm_statefuns.c  Wed May 06 16:57:06 2009 +0100
+@@ -3635,6 +3635,7 @@
  {
        struct sctp_chunk *chunk = arg;
        struct sctp_fwdtsn_hdr *fwdtsn_hdr;
@@ -1152395,7 +1152340,7 @@ diff -purN linux-2.6.27/net/sctp/sm_statefuns.c linux-2.6.27.19-5.1/net/sctp/sm_
        __u16 len;
        __u32 tsn;
  
-@@ -3664,6 +3665,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(c
+@@ -3664,6 +3665,12 @@
        if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
                goto discard_noforce;
  
@@ -1152408,7 +1152353,7 @@ diff -purN linux-2.6.27/net/sctp/sm_statefuns.c linux-2.6.27.19-5.1/net/sctp/sm_
        sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
        if (len > sizeof(struct sctp_fwdtsn_hdr))
                sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-@@ -3695,6 +3702,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_f
+@@ -3695,6 +3702,7 @@
  {
        struct sctp_chunk *chunk = arg;
        struct sctp_fwdtsn_hdr *fwdtsn_hdr;
@@ -1152416,23 +1152361,23 @@ diff -purN linux-2.6.27/net/sctp/sm_statefuns.c linux-2.6.27.19-5.1/net/sctp/sm_
        __u16 len;
        __u32 tsn;
  
-@@ -3724,6 +3732,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_f
+@@ -3723,6 +3731,12 @@
+        */
        if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)
                goto gen_shutdown;
++
 +      /* Silently discard the chunk if stream-id is not valid */
 +      sctp_walk_fwdtsn(skip, chunk) {
 +              if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams)
 +                      goto gen_shutdown;
 +      }
-+
        sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
        if (len > sizeof(struct sctp_fwdtsn_hdr))
-               sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
-diff -purN linux-2.6.27/net/sctp/ulpevent.c linux-2.6.27.19-5.1/net/sctp/ulpevent.c
---- linux-2.6.27/net/sctp/ulpevent.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sctp/ulpevent.c    2009-03-25 16:11:03.000000000 +0000
-@@ -701,7 +701,7 @@ struct sctp_ulpevent *sctp_ulpevent_make
+diff -r 9608d5473017 net/sctp/ulpevent.c
+--- a/net/sctp/ulpevent.c      Wed May 06 15:47:13 2009 +0100
++++ b/net/sctp/ulpevent.c      Wed May 06 16:57:06 2009 +0100
+@@ -701,7 +701,7 @@
        if (rx_count >= asoc->base.sk->sk_rcvbuf) {
  
                if ((asoc->base.sk->sk_userlocks & SOCK_RCVBUF_LOCK) ||
@@ -1152441,9 +1152386,9 @@ diff -purN linux-2.6.27/net/sctp/ulpevent.c linux-2.6.27.19-5.1/net/sctp/ulpeven
                        goto fail;
        }
  
-diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
---- linux-2.6.27/net/socket.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/socket.c   2009-03-25 16:11:01.000000000 +0000
+diff -r 9608d5473017 net/socket.c
+--- a/net/socket.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/socket.c     Wed May 06 16:57:06 2009 +0100
 @@ -96,6 +96,7 @@
  
  #include <net/sock.h>
@@ -1152452,7 +1152397,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  
  static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
  static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
-@@ -575,6 +576,7 @@ int sock_sendmsg(struct socket *sock, st
+@@ -575,6 +576,7 @@
        ret = __sock_sendmsg(&iocb, sock, msg, size);
        if (-EIOCBQUEUED == ret)
                ret = wait_on_sync_kiocb(&iocb);
@@ -1152460,7 +1152405,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
        return ret;
  }
  
-@@ -654,10 +656,12 @@ int sock_recvmsg(struct socket *sock, st
+@@ -654,10 +656,12 @@
        int ret;
  
        init_sync_kiocb(&iocb, NULL);
@@ -1152473,7 +1152418,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
        return ret;
  }
  
-@@ -1216,7 +1220,7 @@ int sock_create_kern(int family, int typ
+@@ -1216,7 +1220,7 @@
        return __sock_create(&init_net, family, type, protocol, res, 1);
  }
  
@@ -1152482,7 +1152427,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        int retval;
        struct socket *sock;
-@@ -1244,6 +1248,7 @@ asmlinkage long sys_socket(int family, i
+@@ -1244,6 +1248,7 @@
        if (retval < 0)
                goto out_release;
  
@@ -1152490,7 +1152435,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  out:
        /* It may be already another descriptor 8) Not kernel problem. */
        return retval;
-@@ -1257,8 +1262,8 @@ out_release:
+@@ -1257,8 +1262,8 @@
   *    Create a pair of connected sockets.
   */
  
@@ -1152501,7 +1152446,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock1, *sock2;
        int fd1, fd2, err;
-@@ -1365,7 +1370,7 @@ out_fd:
+@@ -1365,7 +1370,7 @@
   *    the protocol layer (having also checked the address is ok).
   */
  
@@ -1152510,7 +1152455,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct sockaddr_storage address;
-@@ -1394,7 +1399,7 @@ asmlinkage long sys_bind(int fd, struct 
+@@ -1394,7 +1399,7 @@
   *    ready for listening.
   */
  
@@ -1152519,7 +1152464,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        int err, fput_needed;
-@@ -1567,8 +1572,8 @@ asmlinkage long sys_paccept(int fd, stru
+@@ -1567,8 +1572,8 @@
  #endif
  #endif
  
@@ -1152530,7 +1152475,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        return do_accept(fd, upeer_sockaddr, upeer_addrlen, 0);
  }
-@@ -1585,8 +1590,8 @@ asmlinkage long sys_accept(int fd, struc
+@@ -1585,8 +1590,8 @@
   *    include the -EINPROGRESS status for such sockets.
   */
  
@@ -1152541,7 +1152486,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct sockaddr_storage address;
-@@ -1617,8 +1622,8 @@ out:
+@@ -1617,8 +1622,8 @@
   *    name to user space.
   */
  
@@ -1152552,7 +1152497,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct sockaddr_storage address;
-@@ -1648,8 +1653,8 @@ out:
+@@ -1648,8 +1653,8 @@
   *    name to user space.
   */
  
@@ -1152563,7 +1152508,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct sockaddr_storage address;
-@@ -1680,9 +1685,9 @@ asmlinkage long sys_getpeername(int fd, 
+@@ -1680,9 +1685,9 @@
   *    the protocol.
   */
  
@@ -1152576,7 +1152521,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct sockaddr_storage address;
-@@ -1725,7 +1730,8 @@ out:
+@@ -1725,7 +1730,8 @@
   *    Send a datagram down a socket.
   */
  
@@ -1152586,7 +1152531,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        return sys_sendto(fd, buff, len, flags, NULL, 0);
  }
-@@ -1736,9 +1742,9 @@ asmlinkage long sys_send(int fd, void __
+@@ -1736,9 +1742,9 @@
   *    sender address from kernel to user space.
   */
  
@@ -1152599,7 +1152544,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct socket *sock;
        struct iovec iov;
-@@ -1790,8 +1796,8 @@ asmlinkage long sys_recv(int fd, void __
+@@ -1790,8 +1796,8 @@
   *    to pass the user mode parameter for the protocols to sort out.
   */
  
@@ -1152610,7 +1152555,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        int err, fput_needed;
        struct socket *sock;
-@@ -1824,8 +1830,8 @@ out_put:
+@@ -1824,8 +1830,8 @@
   *    to pass a user mode parameter for the protocols to sort out.
   */
  
@@ -1152621,7 +1152566,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        int err, fput_needed;
        struct socket *sock;
-@@ -1854,7 +1860,7 @@ out_put:
+@@ -1854,7 +1860,7 @@
   *    Shutdown a socket.
   */
  
@@ -1152630,7 +1152575,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        int err, fput_needed;
        struct socket *sock;
-@@ -1880,7 +1886,7 @@ asmlinkage long sys_shutdown(int fd, int
+@@ -1880,7 +1886,7 @@
   *    BSD sendmsg interface
   */
  
@@ -1152639,7 +1152584,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct compat_msghdr __user *msg_compat =
            (struct compat_msghdr __user *)msg;
-@@ -1986,8 +1992,8 @@ out:
+@@ -1986,8 +1992,8 @@
   *    BSD recvmsg interface
   */
  
@@ -1152650,7 +1152595,7 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        struct compat_msghdr __user *msg_compat =
            (struct compat_msghdr __user *)msg;
-@@ -2110,7 +2116,7 @@ static const unsigned char nargs[19]={
+@@ -2110,7 +2116,7 @@
   *  it is set by the callees.
   */
  
@@ -1152659,19 +1152604,19 @@ diff -purN linux-2.6.27/net/socket.c linux-2.6.27.19-5.1/net/socket.c
  {
        unsigned long a[6];
        unsigned long a0, a1;
-@@ -2130,6 +2136,8 @@ asmlinkage long sys_socketcall(int call,
+@@ -2129,6 +2135,8 @@
        a0 = a[0];
        a1 = a[1];
-+      trace_socket_call(call, a0);
 +
++      trace_socket_call(call, a0);
        switch (call) {
        case SYS_SOCKET:
-               err = sys_socket(a0, a1, a[2]);
-diff -purN linux-2.6.27/net/sunrpc/auth_generic.c linux-2.6.27.19-5.1/net/sunrpc/auth_generic.c
---- linux-2.6.27/net/sunrpc/auth_generic.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/auth_generic.c      2009-03-25 16:11:01.000000000 +0000
-@@ -133,13 +133,29 @@ static int
+diff -r 9608d5473017 net/sunrpc/auth_generic.c
+--- a/net/sunrpc/auth_generic.c        Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/auth_generic.c        Wed May 06 16:57:06 2009 +0100
+@@ -133,13 +133,29 @@
  generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
  {
        struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base);
@@ -1152703,10 +1152648,10 @@ diff -purN linux-2.6.27/net/sunrpc/auth_generic.c linux-2.6.27.19-5.1/net/sunrpc
  }
  
  void __init rpc_init_generic_auth(void)
-diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rpcb_clnt.c
---- linux-2.6.27/net/sunrpc/rpcb_clnt.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/rpcb_clnt.c 2009-03-25 16:11:00.000000000 +0000
-@@ -469,6 +469,28 @@ static struct rpc_task *rpcb_call_async(
+diff -r 9608d5473017 net/sunrpc/rpcb_clnt.c
+--- a/net/sunrpc/rpcb_clnt.c   Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/rpcb_clnt.c   Wed May 06 16:57:06 2009 +0100
+@@ -469,6 +469,28 @@
        return rpc_run_task(&task_setup_data);
  }
  
@@ -1152735,7 +1152680,7 @@ diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rp
  /**
   * rpcb_getport_async - obtain the port for a given RPC service on a given host
   * @task: task that is waiting for portmapper request
-@@ -478,10 +500,10 @@ static struct rpc_task *rpcb_call_async(
+@@ -478,10 +500,10 @@
   */
  void rpcb_getport_async(struct rpc_task *task)
  {
@@ -1152748,7 +1152693,7 @@ diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rp
        struct rpc_clnt *rpcb_clnt;
        static struct rpcbind_args *map;
        struct rpc_task *child;
-@@ -490,13 +512,13 @@ void rpcb_getport_async(struct rpc_task 
+@@ -490,12 +512,12 @@
        size_t salen;
        int status;
  
@@ -1152758,14 +1152703,13 @@ diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rp
        dprintk("RPC: %5u %s(%s, %u, %u, %d)\n",
                task->tk_pid, __func__,
                clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot);
+-
 -      /* Autobind on cloned rpc clients is discouraged */
 -      BUG_ON(clnt->cl_parent != clnt);
--
        /* Put self on the wait queue to ensure we get notified if
         * some other task is already attempting to bind the port */
-       rpc_sleep_on(&xprt->binding, task, NULL);
-@@ -558,7 +580,7 @@ void rpcb_getport_async(struct rpc_task 
+@@ -558,7 +580,7 @@
                status = -ENOMEM;
                dprintk("RPC: %5u %s: no memory available\n",
                        task->tk_pid, __func__);
@@ -1152774,15 +1152718,15 @@ diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rp
        }
        map->r_prog = clnt->cl_prog;
        map->r_vers = clnt->cl_vers;
-@@ -578,11 +600,13 @@ void rpcb_getport_async(struct rpc_task 
+@@ -578,11 +600,13 @@
                        task->tk_pid, __func__);
                return;
        }
--      rpc_put_task(child);
--      task->tk_xprt->stat.bind_count++;
++
 +      xprt->stat.bind_count++;
-+      rpc_put_task(child);
+       rpc_put_task(child);
+-
+-      task->tk_xprt->stat.bind_count++;
        return;
  
 +bailout_release_client:
@@ -1152790,10 +1152734,10 @@ diff -purN linux-2.6.27/net/sunrpc/rpcb_clnt.c linux-2.6.27.19-5.1/net/sunrpc/rp
  bailout_nofree:
        rpcb_wake_rpcbind_waiters(xprt, status);
        task->tk_status = status;
-diff -purN linux-2.6.27/net/sunrpc/sched.c linux-2.6.27.19-5.1/net/sunrpc/sched.c
---- linux-2.6.27/net/sunrpc/sched.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/sched.c     2009-03-25 16:11:00.000000000 +0000
-@@ -729,7 +729,10 @@ struct rpc_buffer {
+diff -r 9608d5473017 net/sunrpc/sched.c
+--- a/net/sunrpc/sched.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/sched.c       Wed May 06 16:57:06 2009 +0100
+@@ -729,7 +729,10 @@
  void *rpc_malloc(struct rpc_task *task, size_t size)
  {
        struct rpc_buffer *buf;
@@ -1152805,7 +1152749,7 @@ diff -purN linux-2.6.27/net/sunrpc/sched.c linux-2.6.27.19-5.1/net/sunrpc/sched.
  
        size += sizeof(struct rpc_buffer);
        if (size <= RPC_BUFFER_MAXSIZE)
-@@ -800,6 +803,8 @@ static void rpc_init_task(struct rpc_tas
+@@ -800,6 +803,8 @@
                kref_get(&task->tk_client->cl_kref);
                if (task->tk_client->cl_softrtry)
                        task->tk_flags |= RPC_TASK_SOFT;
@@ -1152814,7 +1152758,7 @@ diff -purN linux-2.6.27/net/sunrpc/sched.c linux-2.6.27.19-5.1/net/sunrpc/sched.
        }
  
        if (task->tk_ops->rpc_call_prepare != NULL)
-@@ -825,7 +830,7 @@ static void rpc_init_task(struct rpc_tas
+@@ -825,7 +830,7 @@
  static struct rpc_task *
  rpc_alloc_task(void)
  {
@@ -1152823,10 +1152767,10 @@ diff -purN linux-2.6.27/net/sunrpc/sched.c linux-2.6.27.19-5.1/net/sunrpc/sched.
  }
  
  /*
-diff -purN linux-2.6.27/net/sunrpc/svcsock.c linux-2.6.27.19-5.1/net/sunrpc/svcsock.c
---- linux-2.6.27/net/sunrpc/svcsock.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/svcsock.c   2009-03-25 16:11:01.000000000 +0000
-@@ -1171,7 +1171,11 @@ int svc_addsock(struct svc_serv *serv,
+diff -r 9608d5473017 net/sunrpc/svcsock.c
+--- a/net/sunrpc/svcsock.c     Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/svcsock.c     Wed May 06 16:57:06 2009 +0100
+@@ -1171,7 +1171,11 @@
        else if (so->state > SS_UNCONNECTED)
                err = -EISCONN;
        else {
@@ -1152839,7 +1152783,7 @@ diff -purN linux-2.6.27/net/sunrpc/svcsock.c linux-2.6.27.19-5.1/net/sunrpc/svcs
                if (svsk) {
                        struct sockaddr_storage addr;
                        struct sockaddr *sin = (struct sockaddr *)&addr;
-@@ -1184,7 +1188,8 @@ int svc_addsock(struct svc_serv *serv,
+@@ -1184,7 +1188,8 @@
                        spin_unlock_bh(&serv->sv_lock);
                        svc_xprt_received(&svsk->sk_xprt);
                        err = 0;
@@ -1152849,10 +1152793,10 @@ diff -purN linux-2.6.27/net/sunrpc/svcsock.c linux-2.6.27.19-5.1/net/sunrpc/svcs
        }
        if (err) {
                sockfd_put(so);
-diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xprtsock.c
---- linux-2.6.27/net/sunrpc/xprtsock.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/sunrpc/xprtsock.c  2009-03-25 16:11:01.000000000 +0000
-@@ -1445,6 +1445,55 @@ static inline void xs_reclassify_socket6
+diff -r 9608d5473017 net/sunrpc/xprtsock.c
+--- a/net/sunrpc/xprtsock.c    Wed May 06 15:47:13 2009 +0100
++++ b/net/sunrpc/xprtsock.c    Wed May 06 16:57:06 2009 +0100
+@@ -1445,6 +1445,55 @@
  }
  #endif
  
@@ -1152908,7 +1152852,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
  {
        struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
-@@ -1469,6 +1518,8 @@ static void xs_udp_finish_connecting(str
+@@ -1469,6 +1518,8 @@
                transport->sock = sock;
                transport->inet = sk;
  
@@ -1152917,7 +1152861,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
                write_unlock_bh(&sk->sk_callback_lock);
        }
        xs_udp_do_set_buffer_size(xprt);
-@@ -1486,11 +1537,15 @@ static void xs_udp_connect_worker4(struc
+@@ -1486,10 +1537,14 @@
                container_of(work, struct sock_xprt, connect_worker.work);
        struct rpc_xprt *xprt = &transport->xprt;
        struct socket *sock = transport->sock;
@@ -1152926,14 +1152870,13 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  
        if (xprt->shutdown || !xprt_bound(xprt))
                goto out;
++
 +      if (xprt->swapper)
 +              current->flags |= PF_MEMALLOC;
-+
        /* Start by resetting any existing state */
        xs_close(xprt);
-@@ -1513,6 +1568,7 @@ static void xs_udp_connect_worker4(struc
+@@ -1513,6 +1568,7 @@
  out:
        xprt_wake_pending_tasks(xprt, status);
        xprt_clear_connecting(xprt);
@@ -1152941,7 +1152884,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  }
  
  /**
-@@ -1527,11 +1583,15 @@ static void xs_udp_connect_worker6(struc
+@@ -1527,10 +1583,14 @@
                container_of(work, struct sock_xprt, connect_worker.work);
        struct rpc_xprt *xprt = &transport->xprt;
        struct socket *sock = transport->sock;
@@ -1152950,14 +1152893,13 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  
        if (xprt->shutdown || !xprt_bound(xprt))
                goto out;
++
 +      if (xprt->swapper)
 +              current->flags |= PF_MEMALLOC;
-+
        /* Start by resetting any existing state */
        xs_close(xprt);
-@@ -1554,6 +1614,7 @@ static void xs_udp_connect_worker6(struc
+@@ -1554,6 +1614,7 @@
  out:
        xprt_wake_pending_tasks(xprt, status);
        xprt_clear_connecting(xprt);
@@ -1152965,7 +1152907,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  }
  
  /*
-@@ -1613,6 +1674,8 @@ static int xs_tcp_finish_connecting(stru
+@@ -1613,6 +1674,8 @@
                write_unlock_bh(&sk->sk_callback_lock);
        }
  
@@ -1152974,7 +1152916,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
        /* Tell the socket layer to start connecting... */
        xprt->stat.connect_count++;
        xprt->stat.connect_start = jiffies;
-@@ -1631,11 +1694,15 @@ static void xs_tcp_connect_worker4(struc
+@@ -1631,10 +1694,14 @@
                container_of(work, struct sock_xprt, connect_worker.work);
        struct rpc_xprt *xprt = &transport->xprt;
        struct socket *sock = transport->sock;
@@ -1152983,14 +1152925,13 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  
        if (xprt->shutdown || !xprt_bound(xprt))
                goto out;
++
 +      if (xprt->swapper)
 +              current->flags |= PF_MEMALLOC;
-+
        if (!sock) {
                /* start from scratch */
-               if ((err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) {
-@@ -1677,6 +1744,7 @@ out:
+@@ -1677,6 +1744,7 @@
        xprt_wake_pending_tasks(xprt, status);
  out_clear:
        xprt_clear_connecting(xprt);
@@ -1152998,7 +1152939,7 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  }
  
  /**
-@@ -1691,11 +1759,15 @@ static void xs_tcp_connect_worker6(struc
+@@ -1691,10 +1759,14 @@
                container_of(work, struct sock_xprt, connect_worker.work);
        struct rpc_xprt *xprt = &transport->xprt;
        struct socket *sock = transport->sock;
@@ -1153007,14 +1152948,13 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  
        if (xprt->shutdown || !xprt_bound(xprt))
                goto out;
++
 +      if (xprt->swapper)
 +              current->flags |= PF_MEMALLOC;
-+
        if (!sock) {
                /* start from scratch */
-               if ((err = sock_create_kern(PF_INET6, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) {
-@@ -1736,6 +1808,7 @@ out:
+@@ -1736,6 +1808,7 @@
        xprt_wake_pending_tasks(xprt, status);
  out_clear:
        xprt_clear_connecting(xprt);
@@ -1153022,10 +1152962,10 @@ diff -purN linux-2.6.27/net/sunrpc/xprtsock.c linux-2.6.27.19-5.1/net/sunrpc/xpr
  }
  
  /**
-diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.c
---- linux-2.6.27/net/unix/af_unix.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/unix/af_unix.c     2009-03-25 16:11:00.000000000 +0000
-@@ -827,7 +827,8 @@ static int unix_bind(struct socket *sock
+diff -r 9608d5473017 net/unix/af_unix.c
+--- a/net/unix/af_unix.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/unix/af_unix.c       Wed May 06 16:57:06 2009 +0100
+@@ -827,7 +827,8 @@
                err = mnt_want_write(nd.path.mnt);
                if (err)
                        goto out_mknod_dput;
@@ -1153035,7 +1152975,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
                mnt_drop_write(nd.path.mnt);
                if (err)
                        goto out_mknod_dput;
-@@ -1300,14 +1301,23 @@ static void unix_destruct_fds(struct sk_
+@@ -1300,14 +1301,23 @@
        sock_wfree(skb);
  }
  
@@ -1153062,7 +1153002,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
  }
  
  /*
-@@ -1332,6 +1342,7 @@ static int unix_dgram_sendmsg(struct kio
+@@ -1332,6 +1342,7 @@
  
        if (NULL == siocb->scm)
                siocb->scm = &tmp_scm;
@@ -1153070,7 +1153010,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
        err = scm_send(sock, msg, siocb->scm);
        if (err < 0)
                return err;
-@@ -1366,8 +1377,11 @@ static int unix_dgram_sendmsg(struct kio
+@@ -1366,8 +1377,11 @@
                goto out;
  
        memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
@@ -1153084,7 +1153024,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
        unix_get_secdata(siocb->scm, skb);
  
        skb_reset_transport_header(skb);
-@@ -1479,6 +1493,7 @@ static int unix_stream_sendmsg(struct ki
+@@ -1479,6 +1493,7 @@
  
        if (NULL == siocb->scm)
                siocb->scm = &tmp_scm;
@@ -1153092,7 +1153032,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
        err = scm_send(sock, msg, siocb->scm);
        if (err < 0)
                return err;
-@@ -1536,8 +1551,13 @@ static int unix_stream_sendmsg(struct ki
+@@ -1536,8 +1551,13 @@
                size = min_t(int, size, skb_tailroom(skb));
  
                memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
@@ -1153108,7 +1153048,7 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
  
                if ((err = memcpy_fromiovec(skb_put(skb,size), msg->msg_iov, size)) != 0) {
                        kfree_skb(skb);
-@@ -2211,7 +2231,7 @@ static int unix_net_init(struct net *net
+@@ -2211,7 +2231,7 @@
  #endif
        error = 0;
  out:
@@ -1153117,9 +1153057,9 @@ diff -purN linux-2.6.27/net/unix/af_unix.c linux-2.6.27.19-5.1/net/unix/af_unix.
  }
  
  static void unix_net_exit(struct net *net)
-diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.c
---- linux-2.6.27/net/unix/garbage.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/net/unix/garbage.c     2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 net/unix/garbage.c
+--- a/net/unix/garbage.c       Wed May 06 15:47:13 2009 +0100
++++ b/net/unix/garbage.c       Wed May 06 16:57:06 2009 +0100
 @@ -80,6 +80,7 @@
  #include <linux/file.h>
  #include <linux/proc_fs.h>
@@ -1153136,7 +1153076,7 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
  
  unsigned int unix_tot_inflight;
  
-@@ -186,8 +188,17 @@ static void scan_inflight(struct sock *x
+@@ -186,8 +188,17 @@
                                 */
                                struct sock *sk = unix_get_socket(*fp++);
                                if (sk) {
@@ -1153156,7 +1153096,7 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
                                }
                        }
                        if (hit && hitlist != NULL) {
-@@ -249,24 +260,29 @@ static void inc_inflight_move_tail(struc
+@@ -249,24 +260,29 @@
  {
        atomic_long_inc(&u->inflight);
        /*
@@ -1153172,19 +1153112,19 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
                list_move_tail(&u->link, &gc_candidates);
  }
  
--/* The external entry point: unix_gc() */
 +static bool gc_in_progress = false;
--void unix_gc(void)
++
 +void wait_for_unix_gc(void)
- {
--      static bool gc_in_progress = false;
++{
 +      wait_event(unix_gc_wait, gc_in_progress == false);
 +}
-+/* The external entry point: unix_gc() */
-+void unix_gc(void)
-+{
++
+ /* The external entry point: unix_gc() */
+-
+ void unix_gc(void)
+ {
+-      static bool gc_in_progress = false;
+-
        struct unix_sock *u;
        struct unix_sock *next;
        struct sk_buff_head hitlist;
@@ -1153193,7 +1153133,7 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
  
        spin_lock(&unix_gc_lock);
  
-@@ -282,10 +298,14 @@ void unix_gc(void)
+@@ -282,10 +298,14 @@
         *
         * Holding unix_gc_lock will protect these candidates from
         * being detached, and hence from gaining an external
@@ -1153212,7 +1153152,7 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
         */
        list_for_each_entry_safe(u, next, &gc_inflight_list, link) {
                long total_refs;
-@@ -299,6 +319,7 @@ void unix_gc(void)
+@@ -299,6 +319,7 @@
                if (total_refs == inflight_refs) {
                        list_move_tail(&u->link, &gc_candidates);
                        u->gc_candidate = 1;
@@ -1153220,7 +1153160,7 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
                }
        }
  
-@@ -325,14 +346,24 @@ void unix_gc(void)
+@@ -325,12 +346,22 @@
                list_move(&cursor, &u->link);
  
                if (atomic_long_read(&u->inflight) > 0) {
@@ -1153232,8 +1153172,8 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
                }
        }
        list_del(&cursor);
-       /*
++
++      /*
 +       * not_cycle_list contains those sockets which do not make up a
 +       * cycle.  Restore these to the inflight list.
 +       */
@@ -1153242,12 +1153182,10 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
 +              u->gc_candidate = 0;
 +              list_move_tail(&u->link, &gc_inflight_list);
 +      }
-+
-+      /*
+       /*
         * Now gc_candidates contains only garbage.  Restore original
-        * inflight counters for these as well, and remove the skbuffs
-        * which are creating the cycle(s).
-@@ -351,6 +382,7 @@ void unix_gc(void)
+@@ -351,6 +382,7 @@
        /* All candidates should have been detached by now. */
        BUG_ON(!list_empty(&gc_candidates));
        gc_in_progress = false;
@@ -1153255,9 +1153193,9 @@ diff -purN linux-2.6.27/net/unix/garbage.c linux-2.6.27.19-5.1/net/unix/garbage.
  
   out:
        spin_unlock(&unix_gc_lock);
-diff -purN linux-2.6.27/perfmon/Makefile linux-2.6.27.19-5.1/perfmon/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/Makefile       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/Makefile Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,13 @@
 +#
 +# Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
@@ -1153272,9 +1153210,9 @@ diff -purN linux-2.6.27/perfmon/Makefile linux-2.6.27.19-5.1/perfmon/Makefile
 +      perfmon_control.o
 +
 +obj-$(CONFIG_PERFMON_DEBUG_FS) +=  perfmon_debugfs.o
-diff -purN linux-2.6.27/perfmon/perfmon_activate.c linux-2.6.27.19-5.1/perfmon/perfmon_activate.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_activate.c     2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_activate.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_activate.c       Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,265 @@
 +/*
 + * perfmon_activate.c: perfmon2 start/stop functions
@@ -1153541,9 +1153479,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_activate.c linux-2.6.27.19-5.1/perfmon/p
 +       */
 +      return 0;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_attach.c linux-2.6.27.19-5.1/perfmon/perfmon_attach.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_attach.c       2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_attach.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_attach.c Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,474 @@
 +/*
 + * perfmon_attach.c: perfmon2 load/unload functions
@@ -1154019,9 +1153957,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_attach.c linux-2.6.27.19-5.1/perfmon/per
 +      if (free_ok)
 +              pfm_free_context(ctx);
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_control.c linux-2.6.27.19-5.1/perfmon/perfmon_control.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_control.c      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_control.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_control.c        Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,310 @@
 +/*
 + * perfmon_control.c: perfmon2 ioctl interface
@@ -1154333,9 +1154271,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_control.c linux-2.6.27.19-5.1/perfmon/pe
 +#endif
 +      return ret;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_ctx.c linux-2.6.27.19-5.1/perfmon/perfmon_ctx.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_ctx.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_ctx.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_ctx.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,314 @@
 +/*
 + * perfmon_ctx.c: perfmon2 context functions
@@ -1154651,9 +1154589,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_ctx.c linux-2.6.27.19-5.1/perfmon/perfmo
 +      }
 +      return 0;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_ctxsw.c linux-2.6.27.19-5.1/perfmon/perfmon_ctxsw.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_ctxsw.c        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_ctxsw.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_ctxsw.c  Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,342 @@
 +/*
 + * perfmon_cxtsw.c: perfmon2 context switch code
@@ -1154997,9 +1154935,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_ctxsw.c linux-2.6.27.19-5.1/perfmon/perf
 +      pfm_stats_inc(ctxswin_count);
 +      pfm_stats_add(ctxswin_ns, sched_clock() - now);
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_debugfs.c linux-2.6.27.19-5.1/perfmon/perfmon_debugfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_debugfs.c      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_debugfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_debugfs.c        Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,168 @@
 +/*
 + * perfmon_debugfs.c: perfmon2 statistics interface to debugfs
@@ -1155169,9 +1155107,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_debugfs.c linux-2.6.27.19-5.1/perfmon/pe
 +      }
 +      return -1;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_dfl_smpl.c linux-2.6.27.19-5.1/perfmon/perfmon_dfl_smpl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_dfl_smpl.c     2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_dfl_smpl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_dfl_smpl.c       Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,298 @@
 +/*
 + * Copyright (c) 1999-2006 Hewlett-Packard Development Company, L.P.
@@ -1155471,9 +1155409,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_dfl_smpl.c linux-2.6.27.19-5.1/perfmon/p
 +
 +module_init(pfm_dfl_fmt_init_module);
 +module_exit(pfm_dfl_fmt_cleanup_module);
-diff -purN linux-2.6.27/perfmon/perfmon_file.c linux-2.6.27.19-5.1/perfmon/perfmon_file.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_file.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_file.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_file.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,751 @@
 +/*
 + * perfmon_file.c: perfmon2 file input/output functions
@@ -1156226,9 +1156164,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_file.c linux-2.6.27.19-5.1/perfmon/perfm
 +      put_unused_fd(fd);
 +      return ret;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_fmt.c linux-2.6.27.19-5.1/perfmon/perfmon_fmt.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_fmt.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_fmt.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_fmt.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,219 @@
 +/*
 + * perfmon_fmt.c: perfmon2 sampling buffer format management
@@ -1156449,9 +1156387,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_fmt.c linux-2.6.27.19-5.1/perfmon/perfmo
 +              pfm_sysfs_add_fmt(entry);
 +      }
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_hotplug.c linux-2.6.27.19-5.1/perfmon/perfmon_hotplug.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_hotplug.c      2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_hotplug.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_hotplug.c        Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,151 @@
 +/*
 + * perfmon_hotplug.c: handling of CPU hotplug
@@ -1156604,9 +1156542,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_hotplug.c linux-2.6.27.19-5.1/perfmon/pe
 +      return ret;
 +}
 +#endif /* CONFIG_HOTPLUG_CPU */
-diff -purN linux-2.6.27/perfmon/perfmon_init.c linux-2.6.27.19-5.1/perfmon/perfmon_init.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_init.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_init.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_init.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,134 @@
 +/*
 + * perfmon.c: perfmon2 global initialization functions
@@ -1156742,9 +1156680,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_init.c linux-2.6.27.19-5.1/perfmon/perfm
 + * compiled in.
 + */
 +subsys_initcall(pfm_init);
-diff -purN linux-2.6.27/perfmon/perfmon_intr.c linux-2.6.27.19-5.1/perfmon/perfmon_intr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_intr.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_intr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_intr.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,648 @@
 +/*
 + * perfmon_intr.c: perfmon2 interrupt handling
@@ -1157394,9 +1157332,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_intr.c linux-2.6.27.19-5.1/perfmon/perfm
 +}
 +EXPORT_SYMBOL(pfm_interrupt_handler);
 +
-diff -purN linux-2.6.27/perfmon/perfmon_msg.c linux-2.6.27.19-5.1/perfmon/perfmon_msg.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_msg.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_msg.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_msg.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,229 @@
 +/*
 + * perfmon_msg.c: perfmon2 notification message queue management
@@ -1157627,9 +1157565,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_msg.c linux-2.6.27.19-5.1/perfmon/perfmo
 +              ctx->msgq_tail & PFM_MSGQ_MASK,
 +              m->type);
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_pmu.c linux-2.6.27.19-5.1/perfmon/perfmon_pmu.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_pmu.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_pmu.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_pmu.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,590 @@
 +/*
 + * perfmon_pmu.c: perfmon2 PMU configuration management
@@ -1158221,9 +1158159,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_pmu.c linux-2.6.27.19-5.1/perfmon/perfmo
 +      }
 +      spin_unlock(&pfm_pmu_acq_lock);
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_priv.h linux-2.6.27.19-5.1/perfmon/perfmon_priv.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_priv.h 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_priv.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_priv.h   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,207 @@
 +/*
 + * Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
@@ -1158432,9 +1158370,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_priv.h linux-2.6.27.19-5.1/perfmon/perfm
 +#endif /* CONFIG_PERFMON */
 +
 +#endif /* __PERFMON_PRIV_H__ */
-diff -purN linux-2.6.27/perfmon/perfmon_res.c linux-2.6.27.19-5.1/perfmon/perfmon_res.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_res.c  2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_res.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_res.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,450 @@
 +/*
 + * perfmon_res.c:  perfmon2 resource allocations
@@ -1158886,9 +1158824,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_res.c linux-2.6.27.19-5.1/perfmon/perfmo
 +      spin_unlock_irqrestore(&pfm_res_lock, flags);
 +      return strlen(buf);
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_rw.c linux-2.6.27.19-5.1/perfmon/perfmon_rw.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_rw.c   2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_rw.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_rw.c     Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,733 @@
 +/*
 + * perfmon.c: perfmon2 PMC/PMD read/write system calls
@@ -1159623,9 +1159561,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_rw.c linux-2.6.27.19-5.1/perfmon/perfmon
 +error:
 +      return ret;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_sets.c linux-2.6.27.19-5.1/perfmon/perfmon_sets.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_sets.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_sets.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_sets.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,873 @@
 +/*
 + * perfmon_sets.c: perfmon2 event sets and multiplexing functions
@@ -1160500,9 +1160438,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_sets.c linux-2.6.27.19-5.1/perfmon/perfm
 +      }
 +      return 0;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_smpl.c linux-2.6.27.19-5.1/perfmon/perfmon_smpl.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_smpl.c 2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_smpl.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_smpl.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,865 @@
 +/*
 + * perfmon_smpl.c: perfmon2 sampling management
@@ -1161369,9 +1161307,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_smpl.c linux-2.6.27.19-5.1/perfmon/perfm
 +      pfm_smpl_fmt_put(f);
 +      return ret;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_syscalls.c linux-2.6.27.19-5.1/perfmon/perfmon_syscalls.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_syscalls.c     2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_syscalls.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_syscalls.c       Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,1060 @@
 +/*
 + * perfmon_syscalls.c: perfmon2 system call interface
@@ -1162433,9 +1162371,9 @@ diff -purN linux-2.6.27/perfmon/perfmon_syscalls.c linux-2.6.27.19-5.1/perfmon/p
 +      pfm_release_ctx_from_fd(&cookie);
 +      return ret;
 +}
-diff -purN linux-2.6.27/perfmon/perfmon_sysfs.c linux-2.6.27.19-5.1/perfmon/perfmon_sysfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/perfmon/perfmon_sysfs.c        2009-03-25 16:11:31.000000000 +0000
+diff -r 9608d5473017 perfmon/perfmon_sysfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/perfmon/perfmon_sysfs.c  Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,515 @@
 +/*
 + * perfmon_sysfs.c: perfmon2 sysfs interface
@@ -1162952,33 +1162890,33 @@ diff -purN linux-2.6.27/perfmon/perfmon_sysfs.c linux-2.6.27.19-5.1/perfmon/perf
 +      kobject_del(pfm_kernel_kobj);
 +      return ret;
 +}
-diff -purN linux-2.6.27/samples/Kconfig linux-2.6.27.19-5.1/samples/Kconfig
---- linux-2.6.27/samples/Kconfig       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/Kconfig        2009-03-25 16:11:42.000000000 +0000
-@@ -13,6 +13,12 @@ config SAMPLE_MARKERS
+diff -r 9608d5473017 samples/Kconfig
+--- a/samples/Kconfig  Wed May 06 15:47:13 2009 +0100
++++ b/samples/Kconfig  Wed May 06 16:57:06 2009 +0100
+@@ -12,6 +12,12 @@
+       depends on MARKERS && m
        help
          This build markers example modules.
++
 +config SAMPLE_TRACEPOINTS
 +      tristate "Build tracepoints examples -- loadable modules only"
 +      depends on TRACEPOINTS && m
 +      help
 +        This build tracepoints example modules.
-+
  config SAMPLE_KOBJECT
        tristate "Build kobject examples"
-       help
-diff -purN linux-2.6.27/samples/Makefile linux-2.6.27.19-5.1/samples/Makefile
---- linux-2.6.27/samples/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/Makefile       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/Makefile
+--- a/samples/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/samples/Makefile Wed May 06 16:57:06 2009 +0100
 @@ -1,3 +1,3 @@
  # Makefile for Linux samples code
  
 -obj-$(CONFIG_SAMPLES) += markers/ kobject/ kprobes/
 +obj-$(CONFIG_SAMPLES) += markers/ kobject/ kprobes/ tracepoints/
-diff -purN linux-2.6.27/samples/tracepoints/Makefile linux-2.6.27.19-5.1/samples/tracepoints/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/Makefile   2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/Makefile     Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,6 @@
 +# builds the tracepoint example kernel modules;
 +# then to use one (as root):  insmod <module_name.ko>
@@ -1162986,9 +1162924,9 @@ diff -purN linux-2.6.27/samples/tracepoints/Makefile linux-2.6.27.19-5.1/samples
 +obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-sample.o
 +obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-probe-sample.o
 +obj-$(CONFIG_SAMPLE_TRACEPOINTS) += tracepoint-probe-sample2.o
-diff -purN linux-2.6.27/samples/tracepoints/tp-samples-trace.h linux-2.6.27.19-5.1/samples/tracepoints/tp-samples-trace.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tp-samples-trace.h 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tp-samples-trace.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tp-samples-trace.h   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,13 @@
 +#ifndef _TP_SAMPLES_TRACE_H
 +#define _TP_SAMPLES_TRACE_H
@@ -1163003,9 +1162941,9 @@ diff -purN linux-2.6.27/samples/tracepoints/tp-samples-trace.h linux-2.6.27.19-5
 +      TPPROTO(void),
 +      TPARGS());
 +#endif
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample.c  2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-probe-sample.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-probe-sample.c    Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,56 @@
 +/*
 + * tracepoint-probe-sample.c
@@ -1163063,9 +1163001,9 @@ diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample.c linux-2.6.
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Mathieu Desnoyers");
 +MODULE_DESCRIPTION("Tracepoint Probes Samples");
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample2.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample2.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-probe-sample2.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-probe-sample2.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-probe-sample2.c   Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,43 @@
 +/*
 + * tracepoint-probe-sample2.c
@@ -1163110,9 +1163048,9 @@ diff -purN linux-2.6.27/samples/tracepoints/tracepoint-probe-sample2.c linux-2.6
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Mathieu Desnoyers");
 +MODULE_DESCRIPTION("Tracepoint Probes Samples");
-diff -purN linux-2.6.27/samples/tracepoints/tracepoint-sample.c linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-sample.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/samples/tracepoints/tracepoint-sample.c        2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 samples/tracepoints/tracepoint-sample.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/samples/tracepoints/tracepoint-sample.c  Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,53 @@
 +/* tracepoint-sample.c
 + *
@@ -1163167,13 +1163105,15 @@ diff -purN linux-2.6.27/samples/tracepoints/tracepoint-sample.c linux-2.6.27.19-
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("Mathieu Desnoyers");
 +MODULE_DESCRIPTION("Tracepoint example");
-diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makefile.build
---- linux-2.6.27/scripts/Makefile.build        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.build 2009-03-25 16:11:43.000000000 +0000
-@@ -73,6 +73,20 @@ ifndef obj
- $(warning kbuild: Makefile.build is included improperly)
- endif
+diff -r 9608d5473017 scripts/Makefile.build
+--- a/scripts/Makefile.build   Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.build   Wed May 06 16:57:06 2009 +0100
+@@ -71,6 +71,20 @@
  
+ ifndef obj
+ $(warning kbuild: Makefile.build is included improperly)
++endif
++
 +ifeq ($(CONFIG_XEN),y)
 +$(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build
 +      @echo '  Updating $@'
@@ -1163186,12 +1163126,10 @@ diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makef
 +single-used-m         := $(filter-out $(xen-single-used-m),$(single-used-m))
 +
 +-include $(objtree)/scripts/Makefile.xen
-+endif
-+
- # ===========================================================================
+ endif
  
- ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
-@@ -153,12 +167,19 @@ $(obj)/%.i: $(src)/%.c FORCE
+ # ===========================================================================
+@@ -153,12 +167,19 @@
  
  quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
  cmd_cc_symtypes_c        = \
@@ -1163213,7 +1163151,7 @@ diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makef
  
  # C (.c) files
  # The C file is compiled and updated dependency information is generated.
-@@ -187,7 +208,12 @@ cmd_modversions =                                                 \
+@@ -187,7 +208,12 @@
        if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then     \
                $(CPP) -D__GENKSYMS__ $(c_flags) $<                     \
                | $(GENKSYMS) $(if $(KBUILD_SYMTYPES),                  \
@@ -1163227,7 +1163165,7 @@ diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makef
                > $(@D)/.tmp_$(@F:.o=.ver);                             \
                                                                        \
                $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F)              \
-@@ -211,12 +237,14 @@ endef
+@@ -211,12 +237,14 @@
  # Built-in and composite module parts
  $(obj)/%.o: $(src)/%.c FORCE
        $(call cmd,force_checksrc)
@@ -1163242,7 +1163180,7 @@ diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makef
        $(call if_changed_rule,cc_o_c)
        @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
  
-@@ -339,6 +367,18 @@ $(multi-used-m) : %.o: $(multi-objs-m) F
+@@ -339,6 +367,18 @@
  
  targets += $(multi-used-y) $(multi-used-m)
  
@@ -1163261,23 +1163199,23 @@ diff -purN linux-2.6.27/scripts/Makefile.build linux-2.6.27.19-5.1/scripts/Makef
  
  # Descending
  # ---------------------------------------------------------------------------
-diff -purN linux-2.6.27/scripts/Makefile.lib linux-2.6.27.19-5.1/scripts/Makefile.lib
---- linux-2.6.27/scripts/Makefile.lib  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.lib   2009-03-25 16:11:43.000000000 +0000
-@@ -17,6 +17,12 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
+diff -r 9608d5473017 scripts/Makefile.lib
+--- a/scripts/Makefile.lib     Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.lib     Wed May 06 16:57:06 2009 +0100
+@@ -16,6 +16,12 @@
+ # Filter out objects already built-in
  
  lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
++
 +# Remove objects forcibly disabled
 +
 +obj-y := $(filter-out $(disabled-obj-y),$(obj-y))
 +obj-m := $(filter-out $(disabled-obj-y),$(obj-m))
 +lib-y := $(filter-out $(disabled-obj-y),$(lib-y))
-+
  
  # Handle objects in subdirs
- # ---------------------------------------------------------------------------
-@@ -96,6 +102,14 @@ basename_flags = -D"KBUILD_BASENAME=KBUI
+@@ -96,6 +102,14 @@
  modname_flags  = $(if $(filter 1,$(words $(modname))),\
                   -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
  
@@ -1163292,7 +1163230,7 @@ diff -purN linux-2.6.27/scripts/Makefile.lib linux-2.6.27.19-5.1/scripts/Makefil
  orig_c_flags   = $(KBUILD_CFLAGS) $(ccflags-y) $(CFLAGS_$(basetarget).o)
  _c_flags       = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
  _a_flags       = $(KBUILD_AFLAGS) $(asflags-y) $(AFLAGS_$(basetarget).o)
-@@ -121,7 +135,8 @@ endif
+@@ -121,7 +135,8 @@
  
  c_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
                 $(__c_flags) $(modkern_cflags) \
@@ -1163302,10 +1163240,10 @@ diff -purN linux-2.6.27/scripts/Makefile.lib linux-2.6.27.19-5.1/scripts/Makefil
  
  a_flags        = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
                 $(__a_flags) $(modkern_aflags)
-diff -purN linux-2.6.27/scripts/Makefile.modpost linux-2.6.27.19-5.1/scripts/Makefile.modpost
---- linux-2.6.27/scripts/Makefile.modpost      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.modpost       2009-03-25 16:11:43.000000000 +0000
-@@ -88,7 +88,9 @@ modpost = scripts/mod/modpost           
+diff -r 9608d5473017 scripts/Makefile.modpost
+--- a/scripts/Makefile.modpost Wed May 06 15:47:13 2009 +0100
++++ b/scripts/Makefile.modpost Wed May 06 16:57:06 2009 +0100
+@@ -88,7 +88,9 @@
   $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
   $(if $(CONFIG_MARKERS),-M $(markersfile))     \
   $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
@@ -1163316,9 +1163254,9 @@ diff -purN linux-2.6.27/scripts/Makefile.modpost linux-2.6.27.19-5.1/scripts/Mak
  
  quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
        cmd_modpost = $(modpost) -s
-diff -purN linux-2.6.27/scripts/Makefile.xen.awk linux-2.6.27.19-5.1/scripts/Makefile.xen.awk
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/Makefile.xen.awk       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/Makefile.xen.awk
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/Makefile.xen.awk Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,34 @@
 +BEGIN {
 +      is_rule = 0
@@ -1163354,9 +1163292,9 @@ diff -purN linux-2.6.27/scripts/Makefile.xen.awk linux-2.6.27.19-5.1/scripts/Mak
 +      print $0
 +      next
 +}
-diff -purN linux-2.6.27/scripts/basic/Makefile linux-2.6.27.19-5.1/scripts/basic/Makefile
---- linux-2.6.27/scripts/basic/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/basic/Makefile 2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/basic/Makefile
+--- a/scripts/basic/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/scripts/basic/Makefile   Wed May 06 16:57:06 2009 +0100
 @@ -9,7 +9,7 @@
  # fixdep:      Used to generate dependency information during build process
  # docproc:     Used in Documentation/DocBook
@@ -1163366,9 +1163304,9 @@ diff -purN linux-2.6.27/scripts/basic/Makefile linux-2.6.27.19-5.1/scripts/basic
  always                := $(hostprogs-y)
  
  # fixdep is needed to compile other host programs
-diff -purN linux-2.6.27/scripts/basic/hash.c linux-2.6.27.19-5.1/scripts/basic/hash.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/basic/hash.c   2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/basic/hash.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/basic/hash.c     Wed May 06 16:57:06 2009 +0100
 @@ -0,0 +1,64 @@
 +/*
 + * Copyright (C) 2008 Red Hat, Inc., Jason Baron <jbaron@redhat.com>
@@ -1163434,10 +1163372,10 @@ diff -purN linux-2.6.27/scripts/basic/hash.c linux-2.6.27.19-5.1/scripts/basic/h
 +      exit(0);
 +}
 +
-diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/genksyms/genksyms.c
---- linux-2.6.27/scripts/genksyms/genksyms.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/genksyms/genksyms.c    2009-03-25 16:11:43.000000000 +0000
-@@ -42,7 +42,8 @@ static FILE *debugfile;
+diff -r 9608d5473017 scripts/genksyms/genksyms.c
+--- a/scripts/genksyms/genksyms.c      Wed May 06 15:47:13 2009 +0100
++++ b/scripts/genksyms/genksyms.c      Wed May 06 16:57:07 2009 +0100
+@@ -42,7 +42,8 @@
  int cur_line = 1;
  char *cur_filename;
  
@@ -1163447,7 +1163385,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  static const char *arch = "";
  static const char *mod_prefix = "";
  
-@@ -58,6 +59,8 @@ static const char *const symbol_type_nam
+@@ -58,6 +59,8 @@
  
  static int equal_list(struct string_list *a, struct string_list *b);
  static void print_list(FILE * f, struct string_list *list);
@@ -1163456,7 +1163394,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  
  /*----------------------------------------------------------------------*/
  
-@@ -151,27 +154,83 @@ struct symbol *find_symbol(const char *n
+@@ -151,25 +154,81 @@
  
        for (sym = symtab[h]; sym; sym = sym->hash_next)
                if (map_to_ns(sym->type) == map_to_ns(ns) &&
@@ -1163530,8 +1163468,8 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
 +                      }
 +                      break;
                }
-       }
++      }
++
 +      if (sym) {
 +              struct symbol **psym;
 +
@@ -1163542,12 +1163480,10 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
 +                      }
 +              }
 +              --nsyms;
-+      }
-+
+       }
        sym = xmalloc(sizeof(*sym));
-       sym->name = name;
-       sym->type = type;
-@@ -183,6 +242,10 @@ struct symbol *add_symbol(const char *na
+@@ -183,6 +242,10 @@
        sym->hash_next = symtab[h];
        symtab[h] = sym;
  
@@ -1163558,10 +1163494,12 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
        if (flag_debug) {
                fprintf(debugfile, "Defn for %s %s == <",
                        symbol_type_name[type], name);
-@@ -196,6 +259,18 @@ struct symbol *add_symbol(const char *na
-       return sym;
- }
+@@ -194,6 +257,18 @@
  
+       ++nsyms;
+       return sym;
++}
++
 +struct symbol *add_symbol(const char *name, enum symbol_type type,
 +                        struct string_list *defn, int is_extern)
 +{
@@ -1163572,15 +1163510,15 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
 +                                  struct string_list *defn, int is_extern)
 +{
 +      return __add_symbol(name, type, defn, is_extern, 1);
-+}
-+
+ }
  /*----------------------------------------------------------------------*/
+@@ -234,6 +309,90 @@
+       }
  
- void free_node(struct string_list *node)
-@@ -236,6 +311,90 @@ static int equal_list(struct string_list
        return !a && !b;
- }
++}
++
 +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 +
 +struct string_list *read_node(FILE *f)
@@ -1163663,12 +1163601,10 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
 +              subsym->is_override = is_override;
 +              free_node(sym);
 +      }
-+}
-+
+ }
  static void print_node(FILE * f, struct string_list *list)
- {
-       if (list->tag != SYM_NORMAL) {
-@@ -311,6 +470,7 @@ static unsigned long expand_and_crc_sym(
+@@ -311,6 +470,7 @@
  
                case SYM_TYPEDEF:
                        subsym = find_symbol(cur->string, cur->tag);
@@ -1163676,20 +1163612,20 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
                        if (subsym->expansion_trail) {
                                if (flag_dump_defs)
                                        fprintf(debugfile, "%s ", cur->string);
-@@ -347,9 +507,22 @@ static unsigned long expand_and_crc_sym(
+@@ -347,9 +507,22 @@
                                t = n;
  
                                n = xmalloc(sizeof(*n));
 -                              n->string = xstrdup("{ UNKNOWN }");
 +                              n->string = xstrdup("{");
-+                              n->tag = SYM_NORMAL;
-+                              n->next = t;
+                               n->tag = SYM_NORMAL;
+                               n->next = t;
 +                              t = n;
 +
 +                              n = xmalloc(sizeof(*n));
 +                              n->string = xstrdup("UNKNOWN");
-                               n->tag = SYM_NORMAL;
-                               n->next = t;
++                              n->tag = SYM_NORMAL;
++                              n->next = t;
 +                              t = n;
 +
 +                              n = xmalloc(sizeof(*n));
@@ -1163700,7 +1163636,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  
                                subsym =
                                    add_symbol(cur->string, cur->tag, n, 0);
-@@ -397,20 +570,44 @@ void export_symbol(const char *name)
+@@ -397,20 +570,44 @@
                error_with_pos("export undefined symbol %s", name);
        else {
                unsigned long crc;
@@ -1163745,7 +1163681,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  
                if (flag_dump_defs)
                        fputs(">\n", debugfile);
-@@ -421,13 +618,26 @@ void export_symbol(const char *name)
+@@ -421,13 +618,26 @@
  }
  
  /*----------------------------------------------------------------------*/
@@ -1163774,7 +1163710,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  
                va_start(args, fmt);
                vfprintf(stderr, fmt, args);
-@@ -445,7 +655,10 @@ static void genksyms_usage(void)
+@@ -445,7 +655,10 @@
              "  -a, --arch            Select architecture\n"
              "  -d, --debug           Increment the debug level (repeatable)\n"
              "  -D, --dump            Dump expanded symbol defs (for debugging only)\n"
@@ -1163786,7 +1163722,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
              "  -w, --warnings        Enable warnings\n"
              "  -q, --quiet           Disable warnings (default)\n"
              "  -h, --help            Print this message\n"
-@@ -454,7 +667,10 @@ static void genksyms_usage(void)
+@@ -454,7 +667,10 @@
              "  -a                    Select architecture\n"
              "  -d                    Increment the debug level (repeatable)\n"
              "  -D                    Dump expanded symbol defs (for debugging only)\n"
@@ -1163798,7 +1163734,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
              "  -w                    Enable warnings\n"
              "  -q                    Disable warnings (default)\n"
              "  -h                    Print this message\n"
-@@ -465,7 +681,7 @@ static void genksyms_usage(void)
+@@ -465,7 +681,7 @@
  
  int main(int argc, char **argv)
  {
@@ -1163807,7 +1163743,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
        int o;
  
  #ifdef __GNU_LIBRARY__
-@@ -475,16 +691,19 @@ int main(int argc, char **argv)
+@@ -475,16 +691,19 @@
                {"warnings", 0, 0, 'w'},
                {"quiet", 0, 0, 'q'},
                {"dump", 0, 0, 'D'},
@@ -1163829,7 +1163765,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
  #endif                                /* __GNU_LIBRARY__ */
                switch (o) {
                case 'a':
-@@ -505,6 +724,14 @@ int main(int argc, char **argv)
+@@ -505,6 +724,14 @@
                case 'D':
                        flag_dump_defs = 1;
                        break;
@@ -1163844,21 +1163780,21 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
                case 'T':
                        flag_dump_types = 1;
                        dumpfile = fopen(optarg, "w");
-@@ -513,6 +740,13 @@ int main(int argc, char **argv)
+@@ -512,6 +739,13 @@
+                               perror(optarg);
                                return 1;
                        }
-                       break;
++                      break;
 +              case 'o':
 +                      flag_override = 1;
 +                      break;
 +              case 'p':
 +                      flag_override = 1;
 +                      flag_preserve = 1;
-+                      break;
+                       break;
                case 'h':
                        genksyms_usage();
-                       return 0;
-@@ -533,12 +767,17 @@ int main(int argc, char **argv)
+@@ -533,12 +767,17 @@
                /* setlinebuf(debugfile); */
        }
  
@@ -1163876,10 +1163812,10 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.c linux-2.6.27.19-5.1/scripts/
                        if (sym->type != SYM_NORMAL) {
                                putc(symbol_type_name[sym->type][0], dumpfile);
                                putc('#', dumpfile);
-diff -purN linux-2.6.27/scripts/genksyms/genksyms.h linux-2.6.27.19-5.1/scripts/genksyms/genksyms.h
---- linux-2.6.27/scripts/genksyms/genksyms.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/genksyms/genksyms.h    2009-03-25 16:11:43.000000000 +0000
-@@ -29,6 +29,10 @@ enum symbol_type {
+diff -r 9608d5473017 scripts/genksyms/genksyms.h
+--- a/scripts/genksyms/genksyms.h      Wed May 06 15:47:13 2009 +0100
++++ b/scripts/genksyms/genksyms.h      Wed May 06 16:57:07 2009 +0100
+@@ -29,6 +29,10 @@
        SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION
  };
  
@@ -1163890,7 +1163826,7 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.h linux-2.6.27.19-5.1/scripts/
  struct string_list {
        struct string_list *next;
        enum symbol_type tag;
-@@ -43,6 +47,9 @@ struct symbol {
+@@ -43,6 +47,9 @@
        struct symbol *expansion_trail;
        struct symbol *visited;
        int is_extern;
@@ -1163900,13 +1163836,14 @@ diff -purN linux-2.6.27/scripts/genksyms/genksyms.h linux-2.6.27.19-5.1/scripts/
  };
  
  typedef struct string_list **yystype;
-diff -purN linux-2.6.27/scripts/kconfig/Makefile linux-2.6.27.19-5.1/scripts/kconfig/Makefile
---- linux-2.6.27/scripts/kconfig/Makefile      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kconfig/Makefile       2009-03-25 16:11:43.000000000 +0000
-@@ -61,6 +61,22 @@ allnoconfig: $(obj)/conf
+diff -r 9608d5473017 scripts/kconfig/Makefile
+--- a/scripts/kconfig/Makefile Wed May 06 15:47:13 2009 +0100
++++ b/scripts/kconfig/Makefile Wed May 06 16:57:07 2009 +0100
+@@ -60,6 +60,22 @@
  allmodconfig: $(obj)/conf
        $< -m $(Kconfig)
++
 +UNAME_RELEASE := $(shell uname -r)
 +CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
 +                                    /lib/modules/$(UNAME_RELEASE)/.config \
@@ -1163922,14 +1163859,13 @@ diff -purN linux-2.6.27/scripts/kconfig/Makefile linux-2.6.27.19-5.1/scripts/kco
 +      esac &&                                                 \
 +      echo -e "Cloning configuration file $(CLONECONFIG)\n"
 +      $(Q)$< -D .config.running arch/$(SRCARCH)/Kconfig
-+
  defconfig: $(obj)/conf
  ifeq ($(KBUILD_DEFCONFIG),)
-       $< -d $(Kconfig)
-diff -purN linux-2.6.27/scripts/kernel-doc linux-2.6.27.19-5.1/scripts/kernel-doc
---- linux-2.6.27/scripts/kernel-doc    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kernel-doc     2009-03-25 16:11:43.000000000 +0000
-@@ -1758,6 +1758,40 @@ sub reset_state {
+diff -r 9608d5473017 scripts/kernel-doc
+--- a/scripts/kernel-doc       Wed May 06 15:47:13 2009 +0100
++++ b/scripts/kernel-doc       Wed May 06 16:57:07 2009 +0100
+@@ -1758,6 +1758,40 @@
      $state = 0;
  }
  
@@ -1163970,7 +1163906,7 @@ diff -purN linux-2.6.27/scripts/kernel-doc linux-2.6.27.19-5.1/scripts/kernel-do
  sub process_state3_function($$) {
      my $x = shift;
      my $file = shift;
-@@ -1774,7 +1808,10 @@ sub process_state3_function($$) {
+@@ -1774,7 +1808,10 @@
        $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
        $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
        $prototype =~ s@^\s+@@gos; # strip leading spaces
@@ -1163982,9 +1163918,9 @@ diff -purN linux-2.6.27/scripts/kernel-doc linux-2.6.27.19-5.1/scripts/kernel-do
        reset_state();
      }
  }
-diff -purN linux-2.6.27/scripts/kmsg-doc linux-2.6.27.19-5.1/scripts/kmsg-doc
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/kmsg-doc       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/kmsg-doc
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/scripts/kmsg-doc Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,477 @@
 +#!/usr/bin/perl -w
 +#
@@ -1164463,10 +1164399,10 @@ diff -purN linux-2.6.27/scripts/kmsg-doc linux-2.6.27.19-5.1/scripts/kmsg-doc
 +}
 +
 +exit($errors);
-diff -purN linux-2.6.27/scripts/mkcompile_h linux-2.6.27.19-5.1/scripts/mkcompile_h
---- linux-2.6.27/scripts/mkcompile_h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mkcompile_h    2009-03-25 16:11:43.000000000 +0000
-@@ -60,16 +60,9 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
+diff -r 9608d5473017 scripts/mkcompile_h
+--- a/scripts/mkcompile_h      Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mkcompile_h      Wed May 06 16:57:07 2009 +0100
+@@ -60,16 +60,9 @@
    echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
  
    echo \#define LINUX_COMPILE_TIME \"`date +%T`\"
@@ -1164486,9 +1164422,9 @@ diff -purN linux-2.6.27/scripts/mkcompile_h linux-2.6.27.19-5.1/scripts/mkcompil
  
    echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
  ) > .tmpcompile
-diff -purN linux-2.6.27/scripts/mksysmap linux-2.6.27.19-5.1/scripts/mksysmap
---- linux-2.6.27/scripts/mksysmap      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mksysmap       2009-03-25 16:11:43.000000000 +0000
+diff -r 9608d5473017 scripts/mksysmap
+--- a/scripts/mksysmap Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mksysmap Wed May 06 16:57:07 2009 +0100
 @@ -41,5 +41,5 @@
  # so we just ignore them to let readprofile continue to work.
  # (At least sparc64 has __crc_ in the middle).
@@ -1164496,10 +1164432,10 @@ diff -purN linux-2.6.27/scripts/mksysmap linux-2.6.27.19-5.1/scripts/mksysmap
 -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2
 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\(L2\ 2\)' > $2
  
-diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/modpost.c
---- linux-2.6.27/scripts/mod/modpost.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/mod/modpost.c  2009-03-25 16:11:43.000000000 +0000
-@@ -86,7 +86,8 @@ static int is_vmlinux(const char *modnam
+diff -r 9608d5473017 scripts/mod/modpost.c
+--- a/scripts/mod/modpost.c    Wed May 06 15:47:13 2009 +0100
++++ b/scripts/mod/modpost.c    Wed May 06 16:57:07 2009 +0100
+@@ -86,7 +86,8 @@
                myname = modname;
  
        return (strcmp(myname, "vmlinux") == 0) ||
@@ -1164509,7 +1164445,7 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
  }
  
  void *do_nofail(void *ptr, const char *expr)
-@@ -1545,6 +1546,48 @@ static void get_markers(struct elf_info 
+@@ -1545,6 +1546,48 @@
                }
  }
  
@@ -1164558,7 +1164494,7 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
  static void read_symbols(char *modname)
  {
        const char *symname;
-@@ -1726,6 +1769,21 @@ static void add_header(struct buffer *b,
+@@ -1726,6 +1769,21 @@
        buf_printf(b, "};\n");
  }
  
@@ -1164580,21 +1164516,21 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
  /**
   * Record CRCs for unresolved symbols
   **/
-@@ -1866,6 +1924,13 @@ static void write_if_changed(struct buff
+@@ -1864,6 +1922,13 @@
+               exit(1);
+       }
        fclose(file);
- }
++}
++
 +void read_supported(const char *fname)
 +{
 +      supported_file = grab_file(fname, &supported_size);
 +      if (!supported_file)
 +              ; /* ignore error */
-+}
-+
+ }
  /* parse Module.symvers file. line format:
-  * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
-  **/
-@@ -2050,12 +2115,13 @@ int main(int argc, char **argv)
+@@ -2050,12 +2115,13 @@
        char *dump_write = NULL;
        char *markers_read = NULL;
        char *markers_write = NULL;
@@ -1164609,7 +1164545,7 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
                switch (opt) {
                case 'i':
                        kernel_read = optarg;
-@@ -2099,11 +2165,16 @@ int main(int argc, char **argv)
+@@ -2099,11 +2165,16 @@
                        case 'K':
                                markers_read = optarg;
                                break;
@@ -1164626,7 +1164562,7 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
        if (kernel_read)
                read_dump(kernel_read, 1);
        if (module_read)
-@@ -2135,6 +2206,8 @@ int main(int argc, char **argv)
+@@ -2135,6 +2206,8 @@
                buf.pos = 0;
  
                add_header(&buf, mod);
@@ -1164635,10 +1164571,10 @@ diff -purN linux-2.6.27/scripts/mod/modpost.c linux-2.6.27.19-5.1/scripts/mod/mo
                err |= add_versions(&buf, mod);
                add_depends(&buf, mod, modules);
                add_moddevtable(&buf, mod);
-diff -purN linux-2.6.27/scripts/package/builddeb linux-2.6.27.19-5.1/scripts/package/builddeb
---- linux-2.6.27/scripts/package/builddeb      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/package/builddeb       2009-03-25 16:11:43.000000000 +0000
-@@ -15,15 +15,18 @@ set -e
+diff -r 9608d5473017 scripts/package/builddeb
+--- a/scripts/package/builddeb Wed May 06 15:47:13 2009 +0100
++++ b/scripts/package/builddeb Wed May 06 16:57:07 2009 +0100
+@@ -15,15 +15,18 @@
  version=$KERNELRELEASE
  revision=`cat .version`
  tmpdir="$objtree/debian/tmp"
@@ -1164658,7 +1164594,7 @@ diff -purN linux-2.6.27/scripts/package/builddeb linux-2.6.27.19-5.1/scripts/pac
  if [ "$ARCH" == "um" ] ; then
        mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
  fi
-@@ -107,6 +110,7 @@ Standards-Version: 3.6.1
+@@ -107,6 +110,7 @@
  
  Package: $packagename
  Provides: kernel-image-$version, linux-image-$version
@@ -1164666,7 +1164602,7 @@ diff -purN linux-2.6.27/scripts/package/builddeb linux-2.6.27.19-5.1/scripts/pac
  Architecture: any
  Description: Linux kernel, version $version
   This package contains the Linux kernel, modules and corresponding other
-@@ -118,8 +122,24 @@ fi
+@@ -118,8 +122,24 @@
  chown -R root:root "$tmpdir"
  chmod -R go-w "$tmpdir"
  
@@ -1164692,10 +1164628,10 @@ diff -purN linux-2.6.27/scripts/package/builddeb linux-2.6.27.19-5.1/scripts/pac
  dpkg --build "$tmpdir" ..
  
  exit 0
-diff -purN linux-2.6.27/scripts/package/mkspec linux-2.6.27.19-5.1/scripts/package/mkspec
---- linux-2.6.27/scripts/package/mkspec        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/scripts/package/mkspec 2009-03-25 16:11:43.000000000 +0000
-@@ -64,8 +64,10 @@ fi
+diff -r 9608d5473017 scripts/package/mkspec
+--- a/scripts/package/mkspec   Wed May 06 15:47:13 2009 +0100
++++ b/scripts/package/mkspec   Wed May 06 16:57:07 2009 +0100
+@@ -64,8 +64,10 @@
  echo "%install"
  echo "%ifarch ia64"
  echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'
@@ -1164706,20 +1164642,21 @@ diff -purN linux-2.6.27/scripts/package/mkspec linux-2.6.27.19-5.1/scripts/packa
  echo "%endif"
  
  echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
-@@ -92,5 +94,6 @@ echo "%files"
+@@ -92,5 +94,6 @@
  echo '%defattr (-, root, root)'
  echo "%dir /lib/modules"
  echo "/lib/modules/$KERNELRELEASE"
 +echo "/lib/firmware"
  echo "/boot/*"
  echo ""
-diff -purN linux-2.6.27/security/Kconfig linux-2.6.27.19-5.1/security/Kconfig
---- linux-2.6.27/security/Kconfig      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/Kconfig       2009-03-25 16:11:42.000000000 +0000
-@@ -51,6 +51,15 @@ config SECURITY
+diff -r 9608d5473017 security/Kconfig
+--- a/security/Kconfig Wed May 06 15:47:13 2009 +0100
++++ b/security/Kconfig Wed May 06 16:57:07 2009 +0100
+@@ -50,6 +50,15 @@
+         model will be used.
  
          If you are unsure how to answer this question, answer N.
++
 +config SECURITY_DEFAULT
 +      string "Default security module"
 +      depends on SECURITY
@@ -1164728,11 +1164665,10 @@ diff -purN linux-2.6.27/security/Kconfig linux-2.6.27.19-5.1/security/Kconfig
 +          This determines the security module used if the security=
 +          boot parmater is not provided.  If a security module is not
 +          specified the first module to register will be used.
-+
  config SECURITY_NETWORK
        bool "Socket and Networking Security Hooks"
-       depends on SECURITY
-@@ -117,6 +126,7 @@ config SECURITY_DEFAULT_MMAP_MIN_ADDR
+@@ -117,6 +126,7 @@
  
  source security/selinux/Kconfig
  source security/smack/Kconfig
@@ -1164740,10 +1164676,10 @@ diff -purN linux-2.6.27/security/Kconfig linux-2.6.27.19-5.1/security/Kconfig
  
  endmenu
  
-diff -purN linux-2.6.27/security/Makefile linux-2.6.27.19-5.1/security/Makefile
---- linux-2.6.27/security/Makefile     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/Makefile      2009-03-25 16:11:42.000000000 +0000
-@@ -14,5 +14,6 @@ obj-$(CONFIG_SECURITY)                       += security.o c
+diff -r 9608d5473017 security/Makefile
+--- a/security/Makefile        Wed May 06 15:47:13 2009 +0100
++++ b/security/Makefile        Wed May 06 16:57:07 2009 +0100
+@@ -14,5 +14,6 @@
  # Must precede capability.o in order to stack properly.
  obj-$(CONFIG_SECURITY_SELINUX)                += selinux/built-in.o
  obj-$(CONFIG_SECURITY_SMACK)          += smack/built-in.o
@@ -1164751,9 +1164687,9 @@ diff -purN linux-2.6.27/security/Makefile linux-2.6.27.19-5.1/security/Makefile
 +obj-$(CONFIG_SECURITY_APPARMOR)         += commoncap.o apparmor/
 + obj-$(CONFIG_SECURITY_ROOTPLUG)              += root_plug.o
  obj-$(CONFIG_CGROUP_DEVICE)           += device_cgroup.o
-diff -purN linux-2.6.27/security/apparmor/Kconfig linux-2.6.27.19-5.1/security/apparmor/Kconfig
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/Kconfig      2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/Kconfig
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/Kconfig        Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,42 @@
 +config SECURITY_APPARMOR
 +      bool "AppArmor support"
@@ -1164797,9 +1164733,9 @@ diff -purN linux-2.6.27/security/apparmor/Kconfig linux-2.6.27.19-5.1/security/a
 +        parameters are difficult to employ.
 +
 +        If you are unsure how to answer this question, answer N.
-diff -purN linux-2.6.27/security/apparmor/Makefile linux-2.6.27.19-5.1/security/apparmor/Makefile
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/Makefile     2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/Makefile
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/Makefile       Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,18 @@
 +# Makefile for AppArmor Linux Security Module
 +#
@@ -1164819,9 +1164755,9 @@ diff -purN linux-2.6.27/security/apparmor/Makefile linux-2.6.27.19-5.1/security/
 +      $(call cmd,make-caps)
 +$(obj)/af_names.h : $(srctree)/include/linux/socket.h
 +      $(call cmd,make-af)
-diff -purN linux-2.6.27/security/apparmor/apparmor.h linux-2.6.27.19-5.1/security/apparmor/apparmor.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/apparmor.h   2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/apparmor.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/apparmor.h     Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,403 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1165226,9 +1165162,9 @@ diff -purN linux-2.6.27/security/apparmor/apparmor.h linux-2.6.27.19-5.1/securit
 +                                         unsigned int start);
 +
 +#endif  /* __APPARMOR_H */
-diff -purN linux-2.6.27/security/apparmor/apparmorfs.c linux-2.6.27.19-5.1/security/apparmor/apparmorfs.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/apparmorfs.c 2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/apparmorfs.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/apparmorfs.c   Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,281 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1165511,9 +1165447,9 @@ diff -purN linux-2.6.27/security/apparmor/apparmorfs.c linux-2.6.27.19-5.1/secur
 +
 +fs_initcall(create_apparmorfs);
 +
-diff -purN linux-2.6.27/security/apparmor/inline.h linux-2.6.27.19-5.1/security/apparmor/inline.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/inline.h     2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/inline.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/inline.h       Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,250 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1165765,9 +1165701,9 @@ diff -purN linux-2.6.27/security/apparmor/inline.h linux-2.6.27.19-5.1/security/
 +}
 +
 +#endif /* __INLINE_H__ */
-diff -purN linux-2.6.27/security/apparmor/list.c linux-2.6.27.19-5.1/security/apparmor/list.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/list.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/list.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/list.c Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,174 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1165943,9 +1165879,9 @@ diff -purN linux-2.6.27/security/apparmor/list.c linux-2.6.27.19-5.1/security/ap
 +      .stop =         p_stop,
 +      .show =         seq_show_profile,
 +};
-diff -purN linux-2.6.27/security/apparmor/locking.txt linux-2.6.27.19-5.1/security/apparmor/locking.txt
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/locking.txt  2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/locking.txt
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/locking.txt    Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,68 @@
 +Locking in AppArmor
 +===================
@@ -1166015,9 +1165951,9 @@ diff -purN linux-2.6.27/security/apparmor/locking.txt linux-2.6.27.19-5.1/securi
 +dead task A.  The kernel should not be taking a dead task's task_lock
 +at the same time the task is being freed by task rcu cleanup other wise
 +the task would not be out of its quiescent period.
-diff -purN linux-2.6.27/security/apparmor/lsm.c linux-2.6.27.19-5.1/security/apparmor/lsm.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/lsm.c        2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/lsm.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/lsm.c  Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,1033 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1167052,9 +1166988,9 @@ diff -purN linux-2.6.27/security/apparmor/lsm.c linux-2.6.27.19-5.1/security/app
 +MODULE_DESCRIPTION("AppArmor process confinement");
 +MODULE_AUTHOR("Novell/Immunix, http://bugs.opensuse.org");
 +MODULE_LICENSE("GPL");
-diff -purN linux-2.6.27/security/apparmor/main.c linux-2.6.27.19-5.1/security/apparmor/main.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/main.c       2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/main.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/main.c Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,1689 @@
 +/*
 + *    Copyright (C) 2002-2007 Novell/SUSE
@@ -1168745,9 +1168681,9 @@ diff -purN linux-2.6.27/security/apparmor/main.c linux-2.6.27.19-5.1/security/ap
 +      }
 +      rcu_assign_pointer(task->security, new_cxt);
 +}
-diff -purN linux-2.6.27/security/apparmor/match.c linux-2.6.27.19-5.1/security/apparmor/match.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/match.c      2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/match.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/match.c        Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,364 @@
 +/*
 + *    Copyright (C) 2007 Novell/SUSE
@@ -1169113,9 +1169049,9 @@ diff -purN linux-2.6.27/security/apparmor/match.c linux-2.6.27.19-5.1/security/a
 +      return 0;
 +}
 +
-diff -purN linux-2.6.27/security/apparmor/match.h linux-2.6.27.19-5.1/security/apparmor/match.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/match.h      2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/match.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/match.h        Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,87 @@
 +/*
 + *    Copyright (C) 2007 Novell/SUSE
@@ -1169204,9 +1169140,9 @@ diff -purN linux-2.6.27/security/apparmor/match.h linux-2.6.27.19-5.1/security/a
 +}
 +
 +#endif /* __MATCH_H */
-diff -purN linux-2.6.27/security/apparmor/module_interface.c linux-2.6.27.19-5.1/security/apparmor/module_interface.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/module_interface.c   2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/module_interface.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/module_interface.c     Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,967 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1170175,9 +1170111,9 @@ diff -purN linux-2.6.27/security/apparmor/module_interface.c linux-2.6.27.19-5.1
 +              task_unlock(task);
 +      }
 +}
-diff -purN linux-2.6.27/security/apparmor/procattr.c linux-2.6.27.19-5.1/security/apparmor/procattr.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/apparmor/procattr.c   2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/apparmor/procattr.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/security/apparmor/procattr.c     Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,195 @@
 +/*
 + *    Copyright (C) 1998-2007 Novell/SUSE
@@ -1170374,10 +1170310,10 @@ diff -purN linux-2.6.27/security/apparmor/procattr.c linux-2.6.27.19-5.1/securit
 +      aa_put_profile(new_profile);
 +      return 0;
 +}
-diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capability.c
---- linux-2.6.27/security/capability.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/capability.c  2009-03-25 16:11:42.000000000 +0000
-@@ -155,52 +155,56 @@ static int cap_inode_init_security(struc
+diff -r 9608d5473017 security/capability.c
+--- a/security/capability.c    Wed May 06 15:47:13 2009 +0100
++++ b/security/capability.c    Wed May 06 16:57:07 2009 +0100
+@@ -155,52 +155,56 @@
  }
  
  static int cap_inode_create(struct inode *inode, struct dentry *dentry,
@@ -1170444,7 +1170380,7 @@ diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capab
  {
        return 0;
  }
-@@ -216,7 +220,8 @@ static int cap_inode_permission(struct i
+@@ -216,7 +220,8 @@
        return 0;
  }
  
@@ -1170454,7 +1170390,7 @@ diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capab
  {
        return 0;
  }
-@@ -230,17 +235,20 @@ static void cap_inode_delete(struct inod
+@@ -230,17 +235,20 @@
  {
  }
  
@@ -1170478,19 +1170414,19 @@ diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capab
  {
        return 0;
  }
-@@ -335,6 +343,11 @@ static int cap_dentry_open(struct file *
+@@ -333,6 +341,11 @@
+ static int cap_dentry_open(struct file *file)
+ {
        return 0;
- }
++}
++
 +static int cap_path_permission(struct path *path, int mask)
 +{
 +      return security_inode_permission(path->dentry->d_inode, mask);
-+}
-+
+ }
  static int cap_task_create(unsigned long clone_flags)
- {
-       return 0;
-@@ -889,6 +902,7 @@ void security_fixup_ops(struct security_
+@@ -889,6 +902,7 @@
        set_to_cap_if_null(ops, file_send_sigiotask);
        set_to_cap_if_null(ops, file_receive);
        set_to_cap_if_null(ops, dentry_open);
@@ -1170498,10 +1170434,10 @@ diff -purN linux-2.6.27/security/capability.c linux-2.6.27.19-5.1/security/capab
        set_to_cap_if_null(ops, task_create);
        set_to_cap_if_null(ops, task_alloc_security);
        set_to_cap_if_null(ops, task_free_security);
-diff -purN linux-2.6.27/security/commoncap.c linux-2.6.27.19-5.1/security/commoncap.c
---- linux-2.6.27/security/commoncap.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/commoncap.c   2009-03-25 16:11:42.000000000 +0000
-@@ -279,10 +279,13 @@ static int get_file_caps(struct linux_bi
+diff -r 9608d5473017 security/commoncap.c
+--- a/security/commoncap.c     Wed May 06 15:47:13 2009 +0100
++++ b/security/commoncap.c     Wed May 06 16:57:07 2009 +0100
+@@ -279,10 +279,13 @@
        struct vfs_cap_data vcaps;
        struct inode *inode;
  
@@ -1170510,15 +1170446,15 @@ diff -purN linux-2.6.27/security/commoncap.c linux-2.6.27.19-5.1/security/common
 +      bprm_clear_caps(bprm);
 +
 +      if (!file_caps_enabled)
-+              return 0;
-+
-+      if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
                return 0;
 -      }
++
++      if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
++              return 0;
  
        dentry = dget(bprm->file->f_dentry);
        inode = dentry->d_inode;
-@@ -411,8 +414,9 @@ int cap_bprm_secureexec (struct linux_bi
+@@ -411,8 +414,9 @@
                current->egid != current->gid);
  }
  
@@ -1170530,7 +1170466,7 @@ diff -purN linux-2.6.27/security/commoncap.c linux-2.6.27.19-5.1/security/common
  {
        if (!strcmp(name, XATTR_NAME_CAPS)) {
                if (!capable(CAP_SETFCAP))
-@@ -425,7 +429,8 @@ int cap_inode_setxattr(struct dentry *de
+@@ -425,7 +429,8 @@
        return 0;
  }
  
@@ -1170540,10 +1170476,10 @@ diff -purN linux-2.6.27/security/commoncap.c linux-2.6.27.19-5.1/security/common
  {
        if (!strcmp(name, XATTR_NAME_CAPS)) {
                if (!capable(CAP_SETFCAP))
-diff -purN linux-2.6.27/security/device_cgroup.c linux-2.6.27.19-5.1/security/device_cgroup.c
---- linux-2.6.27/security/device_cgroup.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/device_cgroup.c       2009-03-25 16:11:42.000000000 +0000
-@@ -543,6 +543,9 @@ int devcgroup_inode_mknod(int mode, dev_
+diff -r 9608d5473017 security/device_cgroup.c
+--- a/security/device_cgroup.c Wed May 06 15:47:13 2009 +0100
++++ b/security/device_cgroup.c Wed May 06 16:57:07 2009 +0100
+@@ -543,6 +543,9 @@
        struct dev_cgroup *dev_cgroup;
        struct dev_whitelist_item *wh;
  
@@ -1170553,10 +1170489,10 @@ diff -purN linux-2.6.27/security/device_cgroup.c linux-2.6.27.19-5.1/security/de
        rcu_read_lock();
  
        dev_cgroup = task_devcgroup(current);
-diff -purN linux-2.6.27/security/keys/internal.h linux-2.6.27.19-5.1/security/keys/internal.h
---- linux-2.6.27/security/keys/internal.h      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/internal.h       2009-03-25 16:11:42.000000000 +0000
-@@ -107,6 +107,7 @@ extern key_ref_t search_process_keyrings
+diff -r 9608d5473017 security/keys/internal.h
+--- a/security/keys/internal.h Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/internal.h Wed May 06 16:57:07 2009 +0100
+@@ -107,6 +107,7 @@
  
  extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);
  
@@ -1170564,10 +1170500,10 @@ diff -purN linux-2.6.27/security/keys/internal.h linux-2.6.27.19-5.1/security/ke
  extern int install_thread_keyring(struct task_struct *tsk);
  extern int install_process_keyring(struct task_struct *tsk);
  
-diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys/keyctl.c
---- linux-2.6.27/security/keys/keyctl.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/keyctl.c 2009-03-25 16:11:42.000000000 +0000
-@@ -54,11 +54,11 @@ static int key_get_type_from_user(char *
+diff -r 9608d5473017 security/keys/keyctl.c
+--- a/security/keys/keyctl.c   Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/keyctl.c   Wed May 06 16:57:07 2009 +0100
+@@ -54,11 +54,11 @@
   * - returns the new key's serial number
   * - implements add_key()
   */
@@ -1170584,7 +1170520,7 @@ diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys
  {
        key_ref_t keyring_ref, key_ref;
        char type[32], *description;
-@@ -146,10 +146,10 @@ asmlinkage long sys_add_key(const char _
+@@ -146,10 +146,10 @@
   *   - if the _callout_info string is empty, it will be rendered as "-"
   * - implements request_key()
   */
@@ -1170599,7 +1170535,7 @@ diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys
  {
        struct key_type *ktype;
        struct key *key;
-@@ -270,6 +270,7 @@ long keyctl_join_session_keyring(const c
+@@ -270,6 +270,7 @@
  
        /* join the session */
        ret = join_session_keyring(name);
@@ -1170607,7 +1170543,7 @@ diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys
  
   error:
        return ret;
-@@ -1152,8 +1153,8 @@ long keyctl_get_security(key_serial_t ke
+@@ -1152,8 +1153,8 @@
  /*
   * the key control system call
   */
@@ -1170618,10 +1170554,10 @@ diff -purN linux-2.6.27/security/keys/keyctl.c linux-2.6.27.19-5.1/security/keys
  {
        switch (option) {
        case KEYCTL_GET_KEYRING_ID:
-diff -purN linux-2.6.27/security/keys/process_keys.c linux-2.6.27.19-5.1/security/keys/process_keys.c
---- linux-2.6.27/security/keys/process_keys.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/process_keys.c   2009-03-25 16:11:42.000000000 +0000
-@@ -40,7 +40,7 @@ struct key_user root_key_user = {
+diff -r 9608d5473017 security/keys/process_keys.c
+--- a/security/keys/process_keys.c     Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/process_keys.c     Wed May 06 16:57:07 2009 +0100
+@@ -40,7 +40,7 @@
  /*
   * install user and user session keyrings for a particular UID
   */
@@ -1170630,23 +1170566,23 @@ diff -purN linux-2.6.27/security/keys/process_keys.c linux-2.6.27.19-5.1/securit
  {
        struct user_struct *user = tsk->user;
        struct key *uid_keyring, *session_keyring;
-diff -purN linux-2.6.27/security/keys/request_key.c linux-2.6.27.19-5.1/security/keys/request_key.c
---- linux-2.6.27/security/keys/request_key.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/keys/request_key.c    2009-03-25 16:11:42.000000000 +0000
-@@ -74,6 +74,10 @@ static int call_sbin_request_key(struct 
+diff -r 9608d5473017 security/keys/request_key.c
+--- a/security/keys/request_key.c      Wed May 06 15:47:13 2009 +0100
++++ b/security/keys/request_key.c      Wed May 06 16:57:07 2009 +0100
+@@ -73,6 +73,10 @@
+       int ret, i;
  
        kenter("{%d},{%d},%s", key->serial, authkey->serial, op);
++
 +      ret = install_user_keyrings(tsk);
 +      if (ret < 0)
 +              goto error_alloc;
-+
        /* allocate a new session keyring */
        sprintf(desc, "_req.%u", key->serial);
-diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/security.c
---- linux-2.6.27/security/security.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/security.c    2009-03-25 16:11:42.000000000 +0000
+diff -r 9608d5473017 security/security.c
+--- a/security/security.c      Wed May 06 15:47:13 2009 +0100
++++ b/security/security.c      Wed May 06 16:57:07 2009 +0100
 @@ -18,7 +18,7 @@
  #include <linux/security.h>
  
@@ -1170656,7 +1170592,7 @@ diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/securit
  
  /* things that live in capability.c */
  extern struct security_operations default_security_ops;
-@@ -358,72 +358,81 @@ int security_inode_init_security(struct 
+@@ -358,72 +358,81 @@
  }
  EXPORT_SYMBOL(security_inode_init_security);
  
@@ -1170758,7 +1170694,7 @@ diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/securit
  }
  
  int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
-@@ -440,11 +449,12 @@ int security_inode_permission(struct ino
+@@ -440,11 +449,12 @@
        return security_ops->inode_permission(inode, mask);
  }
  
@@ -1170773,7 +1170709,7 @@ diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/securit
  }
  EXPORT_SYMBOL_GPL(security_inode_setattr);
  
-@@ -462,41 +472,48 @@ void security_inode_delete(struct inode 
+@@ -462,41 +472,48 @@
        security_ops->inode_delete(inode);
  }
  
@@ -1170834,10 +1170770,12 @@ diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/securit
  }
  
  int security_inode_need_killpriv(struct dentry *dentry)
-@@ -599,6 +616,15 @@ int security_dentry_open(struct file *fi
+@@ -597,6 +614,15 @@
+ int security_dentry_open(struct file *file)
+ {
        return security_ops->dentry_open(file);
- }
++}
++
 +int security_path_permission(struct path *path, int mask)
 +{
 +      struct inode *inode = path->dentry->d_inode;
@@ -1170845,15 +1170783,13 @@ diff -purN linux-2.6.27/security/security.c linux-2.6.27.19-5.1/security/securit
 +              return 0;
 +
 +      return security_ops->path_permission(path, mask);
-+}
-+
+ }
  int security_task_create(unsigned long clone_flags)
- {
-       return security_ops->task_create(clone_flags);
-diff -purN linux-2.6.27/security/selinux/avc.c linux-2.6.27.19-5.1/security/selinux/avc.c
---- linux-2.6.27/security/selinux/avc.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/selinux/avc.c 2009-03-25 16:11:42.000000000 +0000
-@@ -337,7 +337,7 @@ static struct avc_node *avc_alloc_node(v
+diff -r 9608d5473017 security/selinux/avc.c
+--- a/security/selinux/avc.c   Wed May 06 15:47:13 2009 +0100
++++ b/security/selinux/avc.c   Wed May 06 16:57:07 2009 +0100
+@@ -337,7 +337,7 @@
  {
        struct avc_node *node;
  
@@ -1170862,19 +1170798,20 @@ diff -purN linux-2.6.27/security/selinux/avc.c linux-2.6.27.19-5.1/security/seli
        if (!node)
                goto out;
  
-diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/selinux/hooks.c
---- linux-2.6.27/security/selinux/hooks.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/selinux/hooks.c       2009-03-25 16:11:42.000000000 +0000
-@@ -1811,40 +1811,16 @@ static int selinux_capable(struct task_s
+diff -r 9608d5473017 security/selinux/hooks.c
+--- a/security/selinux/hooks.c Wed May 06 15:47:13 2009 +0100
++++ b/security/selinux/hooks.c Wed May 06 16:57:07 2009 +0100
+@@ -1811,40 +1811,16 @@
  
  static int selinux_sysctl_get_sid(ctl_table *table, u16 tclass, u32 *sid)
  {
 -      int buflen, rc;
 -      char *buffer, *path, *end;
+-
+-      rc = -ENOMEM;
 +      char *buffer, *path;
 +      int rc = -ENOMEM;
--      rc = -ENOMEM;
++
        buffer = (char *)__get_free_page(GFP_KERNEL);
        if (!buffer)
                goto out;
@@ -1170911,7 +1170848,7 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
        free_page((unsigned long)buffer);
  out:
        return rc;
-@@ -2566,64 +2542,79 @@ static int selinux_inode_init_security(s
+@@ -2566,64 +2542,79 @@
        return 0;
  }
  
@@ -1170923,15 +1170860,18 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  }
  
 -static int selinux_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry)
+-{
+-      int rc;
+-
+-      rc = secondary_ops->inode_link(old_dentry, dir, new_dentry);
 +static int selinux_inode_link(struct dentry *old_dentry,
 +                            struct vfsmount *old_mnt,
 +                            struct inode *dir,
 +                            struct dentry *new_dentry,
 +                            struct vfsmount *new_mnt)
- {
-       int rc;
--      rc = secondary_ops->inode_link(old_dentry, dir, new_dentry);
++{
++      int rc;
++
 +      rc = secondary_ops->inode_link(old_dentry, old_mnt, dir, new_dentry,
 +                                     new_mnt);
        if (rc)
@@ -1170940,12 +1170880,15 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  }
  
 -static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry)
+-{
+-      int rc;
+-
+-      rc = secondary_ops->inode_unlink(dir, dentry);
 +static int selinux_inode_unlink(struct inode *dir, struct dentry *dentry,
 +                              struct vfsmount *mnt)
- {
-       int rc;
--      rc = secondary_ops->inode_unlink(dir, dentry);
++{
++      int rc;
++
 +      rc = secondary_ops->inode_unlink(dir, dentry, mnt);
        if (rc)
                return rc;
@@ -1170974,12 +1170917,15 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  }
  
 -static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
+-{
+-      int rc;
+-
+-      rc = secondary_ops->inode_mknod(dir, dentry, mode, dev);
 +static int selinux_inode_mknod(struct inode *dir, struct dentry *dentry,
 +                             struct vfsmount *mnt, int mode, dev_t dev)
- {
-       int rc;
--      rc = secondary_ops->inode_mknod(dir, dentry, mode, dev);
++{
++      int rc;
++
 +      rc = secondary_ops->inode_mknod(dir, dentry, mnt, mode, dev);
        if (rc)
                return rc;
@@ -1171004,22 +1170950,25 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  {
        return dentry_has_perm(current, NULL, dentry, FILE__READ);
  }
-@@ -2655,11 +2646,12 @@ static int selinux_inode_permission(stru
+@@ -2655,11 +2646,12 @@
                               open_file_mask_to_av(inode->i_mode, mask), NULL);
  }
  
 -static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
+-{
+-      int rc;
+-
+-      rc = secondary_ops->inode_setattr(dentry, iattr);
 +static int selinux_inode_setattr(struct dentry *dentry, struct vfsmount *mnt,
 +                               struct iattr *iattr)
- {
-       int rc;
--      rc = secondary_ops->inode_setattr(dentry, iattr);
++{
++      int rc;
++
 +      rc = secondary_ops->inode_setattr(dentry, mnt, iattr);
        if (rc)
                return rc;
  
-@@ -2697,8 +2689,9 @@ static int selinux_inode_setotherxattr(s
+@@ -2697,8 +2689,9 @@
        return dentry_has_perm(current, NULL, dentry, FILE__SETATTR);
  }
  
@@ -1171031,7 +1170980,7 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  {
        struct task_security_struct *tsec = current->security;
        struct inode *inode = dentry->d_inode;
-@@ -2752,7 +2745,8 @@ static int selinux_inode_setxattr(struct
+@@ -2752,7 +2745,8 @@
                            &ad);
  }
  
@@ -1171041,7 +1170990,7 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
                                        const void *value, size_t size,
                                        int flags)
  {
-@@ -2778,17 +2772,21 @@ static void selinux_inode_post_setxattr(
+@@ -2778,17 +2772,21 @@
        return;
  }
  
@@ -1171066,10 +1171015,10 @@ diff -purN linux-2.6.27/security/selinux/hooks.c linux-2.6.27.19-5.1/security/se
  {
        if (strcmp(name, XATTR_NAME_SELINUX))
                return selinux_inode_setotherxattr(dentry, name);
-diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/smack/smack_lsm.c
---- linux-2.6.27/security/smack/smack_lsm.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/security/smack/smack_lsm.c     2009-03-25 16:11:42.000000000 +0000
-@@ -432,8 +432,9 @@ static int smack_inode_init_security(str
+diff -r 9608d5473017 security/smack/smack_lsm.c
+--- a/security/smack/smack_lsm.c       Wed May 06 15:47:13 2009 +0100
++++ b/security/smack/smack_lsm.c       Wed May 06 16:57:07 2009 +0100
+@@ -432,8 +432,9 @@
   *
   * Returns 0 if access is permitted, an error code otherwise
   */
@@ -1171081,7 +1171030,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        int rc;
        char *isp;
-@@ -453,11 +454,13 @@ static int smack_inode_link(struct dentr
+@@ -453,11 +454,13 @@
   * smack_inode_unlink - Smack check on inode deletion
   * @dir: containing directory object
   * @dentry: file to unlink
@@ -1171096,7 +1171045,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        struct inode *ip = dentry->d_inode;
        int rc;
-@@ -479,11 +482,13 @@ static int smack_inode_unlink(struct ino
+@@ -479,11 +482,13 @@
   * smack_inode_rmdir - Smack check on directory deletion
   * @dir: containing directory object
   * @dentry: directory to unlink
@@ -1171111,7 +1171060,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        int rc;
  
-@@ -504,8 +509,10 @@ static int smack_inode_rmdir(struct inod
+@@ -504,8 +509,10 @@
   * smack_inode_rename - Smack check on rename
   * @old_inode: the old directory
   * @old_dentry: unused
@@ -1171122,7 +1171071,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
   *
   * Read and write access is required on both the old and
   * new directories.
-@@ -514,8 +521,10 @@ static int smack_inode_rmdir(struct inod
+@@ -514,8 +521,10 @@
   */
  static int smack_inode_rename(struct inode *old_inode,
                              struct dentry *old_dentry,
@@ -1171134,7 +1171083,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        int rc;
        char *isp;
-@@ -559,7 +568,8 @@ static int smack_inode_permission(struct
+@@ -559,7 +568,8 @@
   *
   * Returns 0 if access is permitted, an error code otherwise
   */
@@ -1171144,7 +1171093,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        /*
         * Need to allow for clearing the setuid bit.
-@@ -585,17 +595,20 @@ static int smack_inode_getattr(struct vf
+@@ -585,17 +595,20 @@
  /**
   * smack_inode_setxattr - Smack check for setting xattrs
   * @dentry: the object
@@ -1171167,7 +1171116,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        int rc = 0;
  
-@@ -605,7 +618,8 @@ static int smack_inode_setxattr(struct d
+@@ -605,7 +618,8 @@
                if (!capable(CAP_MAC_ADMIN))
                        rc = -EPERM;
        } else
@@ -1171177,7 +1171126,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  
        if (rc == 0)
                rc = smk_curacc(smk_of_inode(dentry->d_inode), MAY_WRITE);
-@@ -616,6 +630,7 @@ static int smack_inode_setxattr(struct d
+@@ -616,6 +630,7 @@
  /**
   * smack_inode_post_setxattr - Apply the Smack update approved above
   * @dentry: object
@@ -1171185,7 +1171134,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
   * @name: attribute name
   * @value: attribute value
   * @size: attribute size
-@@ -624,7 +639,8 @@ static int smack_inode_setxattr(struct d
+@@ -624,7 +639,8 @@
   * Set the pointer in the inode blob to the entry found
   * in the master label list.
   */
@@ -1171195,7 +1171144,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
                                      const void *value, size_t size, int flags)
  {
        struct inode_smack *isp;
-@@ -657,11 +673,14 @@ static void smack_inode_post_setxattr(st
+@@ -657,11 +673,14 @@
  /*
   * smack_inode_getxattr - Smack check on getxattr
   * @dentry: the object
@@ -1171211,7 +1171160,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        return smk_curacc(smk_of_inode(dentry->d_inode), MAY_READ);
  }
-@@ -669,13 +688,16 @@ static int smack_inode_getxattr(struct d
+@@ -669,13 +688,16 @@
  /*
   * smack_inode_removexattr - Smack check on removexattr
   * @dentry: the object
@@ -1171229,7 +1171178,7 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  {
        int rc = 0;
  
-@@ -685,7 +707,7 @@ static int smack_inode_removexattr(struc
+@@ -685,7 +707,7 @@
                if (!capable(CAP_MAC_ADMIN))
                        rc = -EPERM;
        } else
@@ -1171238,10 +1171187,10 @@ diff -purN linux-2.6.27/security/smack/smack_lsm.c linux-2.6.27.19-5.1/security/
  
        if (rc == 0)
                rc = smk_curacc(smk_of_inode(dentry->d_inode), MAY_WRITE);
-diff -purN linux-2.6.27/sound/core/control.c linux-2.6.27.19-5.1/sound/core/control.c
---- linux-2.6.27/sound/core/control.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/core/control.c   2009-03-25 16:10:57.000000000 +0000
-@@ -1427,12 +1427,12 @@ static int snd_ctl_dev_disconnect(struct
+diff -r 9608d5473017 sound/core/control.c
+--- a/sound/core/control.c     Wed May 06 15:47:13 2009 +0100
++++ b/sound/core/control.c     Wed May 06 16:57:07 2009 +0100
+@@ -1427,12 +1427,12 @@
        cardnum = card->number;
        snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
  
@@ -1171256,10 +1171205,10 @@ diff -purN linux-2.6.27/sound/core/control.c linux-2.6.27.19-5.1/sound/core/cont
  
        if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
                                         card, -1)) < 0)
-diff -purN linux-2.6.27/sound/drivers/mtpav.c linux-2.6.27.19-5.1/sound/drivers/mtpav.c
---- linux-2.6.27/sound/drivers/mtpav.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/drivers/mtpav.c  2009-03-25 16:10:55.000000000 +0000
-@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(str
+diff -r 9608d5473017 sound/drivers/mtpav.c
+--- a/sound/drivers/mtpav.c    Wed May 06 15:47:13 2009 +0100
++++ b/sound/drivers/mtpav.c    Wed May 06 16:57:07 2009 +0100
+@@ -706,7 +706,6 @@
        mtp_card->card = card;
        mtp_card->irq = -1;
        mtp_card->share_irq = 0;
@@ -1171267,19 +1171216,19 @@ diff -purN linux-2.6.27/sound/drivers/mtpav.c linux-2.6.27.19-5.1/sound/drivers/
        mtp_card->inmidistate = 0;
        mtp_card->outmidihwport = 0xffffffff;
        init_timer(&mtp_card->timer);
-@@ -715,6 +714,8 @@ static int __devinit snd_mtpav_probe(str
+@@ -714,6 +713,8 @@
+       mtp_card->timer.data = (unsigned long) mtp_card;
  
        card->private_free = snd_mtpav_free;
-+      mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
 +
++      mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
        err = snd_mtpav_get_ISA(mtp_card);
        if (err < 0)
-               goto __error;
-diff -purN linux-2.6.27/sound/pci/Kconfig linux-2.6.27.19-5.1/sound/pci/Kconfig
---- linux-2.6.27/sound/pci/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/Kconfig      2009-03-25 16:10:55.000000000 +0000
-@@ -517,6 +517,14 @@ config SND_HDA_HWDEP
+diff -r 9608d5473017 sound/pci/Kconfig
+--- a/sound/pci/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/Kconfig        Wed May 06 16:57:07 2009 +0100
+@@ -517,6 +517,14 @@
          This interface can be used for out-of-band communication
          with codecs for debugging purposes.
  
@@ -1171294,10 +1171243,11 @@ diff -purN linux-2.6.27/sound/pci/Kconfig linux-2.6.27.19-5.1/sound/pci/Kconfig
  config SND_HDA_CODEC_REALTEK
        bool "Build Realtek HD-audio codec support"
        depends on SND_HDA_INTEL
-@@ -557,6 +565,14 @@ config SND_HDA_CODEC_ATIHDMI
+@@ -556,6 +564,14 @@
+       help
          Say Y here to include ATI HDMI HD-audio codec support in
          snd-hda-intel driver, such as ATI RS600 HDMI.
++
 +config SND_HDA_CODEC_NVHDMI
 +      bool "Build NVIDIA HDMI HD-audio codec support"
 +      depends on SND_HDA_INTEL
@@ -1171305,14 +1171255,13 @@ diff -purN linux-2.6.27/sound/pci/Kconfig linux-2.6.27.19-5.1/sound/pci/Kconfig
 +      help
 +        Say Y here to include NVIDIA HDMI HD-audio codec support in
 +        snd-hda-intel driver, such as NVIDIA MCP78 HDMI.
-+
  config SND_HDA_CODEC_CONEXANT
        bool "Build Conexant HD-audio codec support"
-       depends on SND_HDA_INTEL
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106.h linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106.h
---- linux-2.6.27/sound/pci/ca0106/ca0106.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106.h      2009-03-25 16:10:56.000000000 +0000
-@@ -686,7 +686,7 @@ struct snd_ca0106 {
+diff -r 9608d5473017 sound/pci/ca0106/ca0106.h
+--- a/sound/pci/ca0106/ca0106.h        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106.h        Wed May 06 16:57:07 2009 +0100
+@@ -686,7 +686,7 @@
        spinlock_t emu_lock;
  
        struct snd_ac97 *ac97;
@@ -1171321,7 +1171270,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106.h linux-2.6.27.19-5.1/sound/pci/
  
        struct snd_ca0106_channel playback_channels[4];
        struct snd_ca0106_channel capture_channels[4];
-@@ -703,6 +703,11 @@ struct snd_ca0106 {
+@@ -703,6 +703,11 @@
        struct snd_ca_midi midi2;
  
        u16 spi_dac_reg[16];
@@ -1171333,7 +1171282,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106.h linux-2.6.27.19-5.1/sound/pci/
  };
  
  int snd_ca0106_mixer(struct snd_ca0106 *emu);
-@@ -721,3 +726,11 @@ int snd_ca0106_i2c_write(struct snd_ca01
+@@ -721,3 +726,11 @@
  
  int snd_ca0106_spi_write(struct snd_ca0106 * emu,
                                   unsigned int data);
@@ -1171345,10 +1171294,10 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106.h linux-2.6.27.19-5.1/sound/pci/
 +#define snd_ca0106_mixer_suspend(chip)        do { } while (0)
 +#define snd_ca0106_mixer_resume(chip) do { } while (0)
 +#endif
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_main.c
---- linux-2.6.27/sound/pci/ca0106/ca0106_main.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_main.c 2009-03-25 16:10:56.000000000 +0000
-@@ -305,9 +305,15 @@ static struct snd_pcm_hardware snd_ca010
+diff -r 9608d5473017 sound/pci/ca0106/ca0106_main.c
+--- a/sound/pci/ca0106/ca0106_main.c   Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106_main.c   Wed May 06 16:57:07 2009 +0100
+@@ -305,9 +305,15 @@
                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                 SNDRV_PCM_INFO_MMAP_VALID),
        .formats =              SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
@@ -1171364,7 +1171313,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
        .rate_max =             192000,
        .channels_min =         2,
        .channels_max =         2,
-@@ -848,15 +854,18 @@ static int snd_ca0106_pcm_trigger_playba
+@@ -848,15 +854,18 @@
          struct snd_pcm_substream *s;
        u32 basic = 0;
        u32 extended = 0;
@@ -1171386,7 +1171335,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
                break;
        }
          snd_pcm_group_for_each_entry(s, substream) {
-@@ -866,22 +875,32 @@ static int snd_ca0106_pcm_trigger_playba
+@@ -866,22 +875,32 @@
                runtime = s->runtime;
                epcm = runtime->private_data;
                channel = epcm->channel_id;
@@ -1171427,7 +1171376,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
                break;
        default:
                result = -EINVAL;
-@@ -1104,21 +1123,13 @@ static int snd_ca0106_ac97(struct snd_ca
+@@ -1104,21 +1123,13 @@
        return snd_ac97_mixer(pbus, &ac97, &chip->ac97);
  }
  
@@ -1171454,7 +1171403,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
        }
        if (chip->irq >= 0)
                free_irq(chip->irq, chip);
-@@ -1204,15 +1215,14 @@ static irqreturn_t snd_ca0106_interrupt(
+@@ -1204,15 +1215,14 @@
        return IRQ_HANDLED;
  }
  
@@ -1171473,7 +1171422,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
                return err;
    
        pcm->private_data = emu;
-@@ -1239,7 +1249,6 @@ static int __devinit snd_ca0106_pcm(stru
+@@ -1239,7 +1249,6 @@
        pcm->info_flags = 0;
        pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
        strcpy(pcm->name, "CA0106");
@@ -1171481,7 +1171430,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  
        for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; 
            substream; 
-@@ -1261,8 +1270,7 @@ static int __devinit snd_ca0106_pcm(stru
+@@ -1261,8 +1270,7 @@
                        return err;
        }
    
@@ -1171491,7 +1171440,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
    
        return 0;
  }
-@@ -1302,89 +1310,10 @@ static unsigned int i2c_adc_init[][2] = 
+@@ -1302,89 +1310,10 @@
        { 0x15, ADC_MUX_LINEIN },  /* ADC Mixer control */
  };
  
@@ -1171583,7 +1171532,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  
        outl(0, chip->port + INTE);
  
-@@ -1402,31 +1331,22 @@ static int __devinit snd_ca0106_create(i
+@@ -1402,31 +1331,22 @@
         *  AN                = 0     (Audio data)
         *  P                 = 0     (Consumer)
         */
@@ -1171630,7 +1171579,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  
          snd_ca0106_ptr_write(chip, PLAYBACK_MUTE, 0, 0x00fc0000);
          snd_ca0106_ptr_write(chip, CAPTURE_MUTE, 0, 0x00fc0000);
-@@ -1434,92 +1354,124 @@ static int __devinit snd_ca0106_create(i
+@@ -1434,92 +1354,124 @@
          /* Write 0x8000 to AC97_REC_GAIN to mute it. */
          outb(AC97_REC_GAIN, chip->port + AC97ADDRESS);
          outw(0x8000, chip->port + AC97DATA);
@@ -1171659,7 +1171608,11 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 -      //snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00); /* Digital out */
 +      /*snd_ca0106_ptr_write(chip, 0x45, 0, 0);*/ /* Analogue out */
 +      /*snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00);*/ /* Digital out */
-+
+-      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000); /* goes to 0x40c80000 when doing SPDIF IN/OUT */
+-      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 1, 0xffffffff); /* (Mute) CAPTURE feedback into PLAYBACK volume. Only lower 16 bits matter. */
+-      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000); /* SPDIF IN Volume */
+-      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000); /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
 +      /* goes to 0x40c80000 when doing SPDIF IN/OUT */
 +      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000);
 +      /* (Mute) CAPTURE feedback into PLAYBACK volume.
@@ -1171670,11 +1171623,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 +      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000);
 +      /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
 +      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000);
--      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 0, 0x40c81000); /* goes to 0x40c80000 when doing SPDIF IN/OUT */
--      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 1, 0xffffffff); /* (Mute) CAPTURE feedback into PLAYBACK volume. Only lower 16 bits matter. */
--      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 2, 0x30300000); /* SPDIF IN Volume */
--      snd_ca0106_ptr_write(chip, CAPTURE_CONTROL, 3, 0x00700000); /* SPDIF IN Volume, 0x70 = (vol & 0x3f) | 0x40 */
++
        snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING1, 0, 0x32765410);
        snd_ca0106_ptr_write(chip, PLAYBACK_ROUTING2, 0, 0x76767676);
        snd_ca0106_ptr_write(chip, CAPTURE_ROUTING1, 0, 0x32765410);
@@ -1171770,10 +1171719,6 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 -                //snd_printk("I2C:array size=0x%x\n", size);
 -              for (n=0; n < size; n++) {
 -                      snd_ca0106_i2c_write(chip, i2c_adc_init[n][0], i2c_adc_init[n][1]);
--              }
--              for (n=0; n < 4; n++) {
--                      chip->i2c_capture_volume[n][0]= 0xcf;
--                      chip->i2c_capture_volume[n][1]= 0xcf;
 +              /* snd_printk("I2C:array size=0x%x\n", size); */
 +              for (n = 0; n < size; n++)
 +                      snd_ca0106_i2c_write(chip, i2c_adc_init[n][0],
@@ -1171782,6 +1171727,10 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 +                      chip->i2c_capture_volume[n][0] = 0xcf;
 +                      chip->i2c_capture_volume[n][1] = 0xcf;
                }
+-              for (n=0; n < 4; n++) {
+-                      chip->i2c_capture_volume[n][0]= 0xcf;
+-                      chip->i2c_capture_volume[n][1]= 0xcf;
+-              }
 -              chip->i2c_capture_source=2; /* Line in */
 -              //snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */
 +              chip->i2c_capture_source = 2; /* Line in */
@@ -1171795,12 +1171744,14 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
                int size, n;
  
                size = ARRAY_SIZE(spi_dac_init);
-@@ -1531,9 +1483,112 @@ static int __devinit snd_ca0106_create(i
+@@ -1531,9 +1483,112 @@
                                chip->spi_dac_reg[reg] = spi_dac_init[n];
                }
        }
 +}
-+
+-      if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
+-                                chip, &ops)) < 0) {
 +static void ca0106_stop_chip(struct snd_ca0106 *chip)
 +{
 +      /* disable interrupts */
@@ -1171816,9 +1171767,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 +       * So we can fix: snd-malloc: Memory leak?  pages not freed = 8
 +       */
 +}
--      if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
--                                chip, &ops)) < 0) {
++
 +static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
 +                                       struct pci_dev *pci,
 +                                       struct snd_ca0106 **rchip)
@@ -1171910,7 +1171859,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
                snd_ca0106_free(chip);
                return err;
        }
-@@ -1630,7 +1685,7 @@ static int __devinit snd_ca0106_probe(st
+@@ -1630,7 +1685,7 @@
        static int dev;
        struct snd_card *card;
        struct snd_ca0106 *chip;
@@ -1171919,23 +1171868,33 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  
        if (dev >= SNDRV_CARDS)
                return -ENODEV;
-@@ -1643,44 +1698,31 @@ static int __devinit snd_ca0106_probe(st
+@@ -1643,44 +1698,31 @@
        if (card == NULL)
                return -ENOMEM;
  
 -      if ((err = snd_ca0106_create(dev, card, pci, &chip)) < 0) {
 -              snd_card_free(card);
 -              return err;
--      }
 +      err = snd_ca0106_create(dev, card, pci, &chip);
 +      if (err < 0)
 +              goto error;
 +      card->private_data = chip;
++
++      for (i = 0; i < 4; i++) {
++              err = snd_ca0106_pcm(chip, i);
++              if (err < 0)
++                      goto error;
+       }
  
 -      if ((err = snd_ca0106_pcm(chip, 0, NULL)) < 0) {
 -              snd_card_free(card);
 -              return err;
--      }
++      if (chip->details->ac97 == 1) {
++              /* The SB0410 and SB0413 do not have an AC97 chip. */
++              err = snd_ca0106_ac97(chip);
++              if (err < 0)
++                      goto error;
+       }
 -      if ((err = snd_ca0106_pcm(chip, 1, NULL)) < 0) {
 -              snd_card_free(card);
 -              return err;
@@ -1171953,21 +1171912,11 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 -                      snd_card_free(card);
 -                      return err;
 -              }
-+      for (i = 0; i < 4; i++) {
-+              err = snd_ca0106_pcm(chip, i);
-+              if (err < 0)
-+                      goto error;
-       }
+-      }
 -      if ((err = snd_ca0106_mixer(chip)) < 0) {
 -              snd_card_free(card);
 -              return err;
-+
-+      if (chip->details->ac97 == 1) {
-+              /* The SB0410 and SB0413 do not have an AC97 chip. */
-+              err = snd_ca0106_ac97(chip);
-+              if (err < 0)
-+                      goto error;
-       }
+-      }
 +      err = snd_ca0106_mixer(chip);
 +      if (err < 0)
 +              goto error;
@@ -1171984,7 +1171933,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
        snd_printdd(" done.\n");
  
  #ifdef CONFIG_PROC_FS
-@@ -1689,14 +1731,17 @@ static int __devinit snd_ca0106_probe(st
+@@ -1689,14 +1731,17 @@
  
        snd_card_set_dev(card, &pci->dev);
  
@@ -1172006,10 +1171955,11 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  }
  
  static void __devexit snd_ca0106_remove(struct pci_dev *pci)
-@@ -1705,6 +1750,59 @@ static void __devexit snd_ca0106_remove(
+@@ -1704,6 +1749,59 @@
+       snd_card_free(pci_get_drvdata(pci));
        pci_set_drvdata(pci, NULL);
  }
++
 +#ifdef CONFIG_PM
 +static int snd_ca0106_suspend(struct pci_dev *pci, pm_message_t state)
 +{
@@ -1172062,11 +1172012,10 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
 +      return 0;
 +}
 +#endif
-+
  // PCI IDs
  static struct pci_device_id snd_ca0106_ids[] = {
-       { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },    /* Audigy LS or Live 24bit */
-@@ -1718,6 +1816,8 @@ static struct pci_driver driver = {
+@@ -1718,6 +1816,8 @@
        .id_table = snd_ca0106_ids,
        .probe = snd_ca0106_probe,
        .remove = __devexit_p(snd_ca0106_remove),
@@ -1172075,9 +1172024,9 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_main.c linux-2.6.27.19-5.1/sound
  };
  
  // initialization of the module
-diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_mixer.c
---- linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c       2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/ca0106/ca0106_mixer.c        2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/ca0106/ca0106_mixer.c
+--- a/sound/pci/ca0106/ca0106_mixer.c  Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/ca0106/ca0106_mixer.c  Wed May 06 16:57:07 2009 +0100
 @@ -75,6 +75,84 @@
  
  #include "ca0106.h"
@@ -1172163,7 +1172112,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
  static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale1, -5175, 25, 1);
  static const DECLARE_TLV_DB_SCALE(snd_ca0106_db_scale2, -10350, 50, 1);
  
-@@ -95,30 +173,12 @@ static int snd_ca0106_shared_spdif_put(s
+@@ -95,30 +173,12 @@
        struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change = 0;
@@ -1172195,7 +1172144,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        }
          return change;
  }
-@@ -154,8 +214,6 @@ static int snd_ca0106_capture_source_put
+@@ -154,8 +214,6 @@
        struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change = 0;
@@ -1172204,7 +1172153,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
  
        val = ucontrol->value.enumerated.item[0] ;
        if (val >= 6)
-@@ -163,9 +221,7 @@ static int snd_ca0106_capture_source_put
+@@ -163,9 +221,7 @@
        change = (emu->capture_source != val);
        if (change) {
                emu->capture_source = val;
@@ -1172215,7 +1172164,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        }
          return change;
  }
-@@ -200,9 +256,7 @@ static int snd_ca0106_i2c_capture_source
+@@ -200,9 +256,7 @@
  {
        struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
        unsigned int source_id;
@@ -1172225,7 +1172174,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        /* If the capture source has changed,
         * update the capture volume from the cached value
         * for the particular source.
-@@ -212,18 +266,7 @@ static int snd_ca0106_i2c_capture_source
+@@ -212,18 +266,7 @@
                return -EINVAL;
        change = (emu->i2c_capture_source != source_id);
        if (change) {
@@ -1172245,7 +1172194,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        }
          return change;
  }
-@@ -271,7 +314,6 @@ static int snd_ca0106_capture_mic_line_i
+@@ -271,7 +314,6 @@
        struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change = 0;
@@ -1172253,7 +1172202,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
  
        val = ucontrol->value.enumerated.item[0] ;
        if (val > 1)
-@@ -279,18 +321,7 @@ static int snd_ca0106_capture_mic_line_i
+@@ -279,18 +321,7 @@
        change = (emu->capture_mic_line_in != val);
        if (change) {
                emu->capture_mic_line_in = val;
@@ -1172273,7 +1172222,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        }
          return change;
  }
-@@ -359,8 +390,8 @@ static int snd_ca0106_spdif_put(struct s
+@@ -359,8 +390,8 @@
              (ucontrol->value.iec958.status[3] << 24);
        change = val != emu->spdif_bits[idx];
        if (change) {
@@ -1172283,7 +1172232,7 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
        }
          return change;
  }
-@@ -773,3 +804,50 @@ int __devinit snd_ca0106_mixer(struct sn
+@@ -773,3 +804,50 @@
          return 0;
  }
  
@@ -1172334,10 +1172283,10 @@ diff -purN linux-2.6.27/sound/pci/ca0106/ca0106_mixer.c linux-2.6.27.19-5.1/soun
 +              ca0106_set_capture_mic_line_in(chip);
 +}
 +#endif /* CONFIG_PM */
-diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sound/pci/emu10k1/emu10k1_main.c
---- linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/emu10k1/emu10k1_main.c       2009-03-25 16:10:56.000000000 +0000
-@@ -1451,6 +1451,7 @@ static struct snd_emu_chip_details emu_c
+diff -r 9608d5473017 sound/pci/emu10k1/emu10k1_main.c
+--- a/sound/pci/emu10k1/emu10k1_main.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/emu10k1/emu10k1_main.c Wed May 06 16:57:07 2009 +0100
+@@ -1451,6 +1451,7 @@
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
@@ -1172345,7 +1172294,7 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        /* Tested by shane-alsa@cm.nu 5th Nov 2005 */
        /* The 0x20061102 does have SB0350 written on it
-@@ -1464,6 +1465,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1464,6 +1465,7 @@
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
@@ -1172353,7 +1172302,7 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,
         .driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]", 
-@@ -1473,6 +1475,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1473,6 +1475,7 @@
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
@@ -1172361,7 +1172310,7 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,
         .driver = "Audigy2", .name = "Audigy 2 ZS [2001]", 
-@@ -1482,6 +1485,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1482,6 +1485,7 @@
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
@@ -1172369,7 +1172318,7 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        /* Audigy 2 */
        /* Tested by James@superbug.co.uk 3rd July 2005 */
-@@ -1519,6 +1523,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1519,6 +1523,7 @@
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
@@ -1172377,7 +1172326,7 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,
         .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", 
-@@ -1538,6 +1543,7 @@ static struct snd_emu_chip_details emu_c
+@@ -1538,6 +1543,7 @@
         .ca0102_chip = 1,
         .ca0151_chip = 1,
         .spdif_bug = 1,
@@ -1172385,10 +1172334,10 @@ diff -purN linux-2.6.27/sound/pci/emu10k1/emu10k1_main.c linux-2.6.27.19-5.1/sou
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00531102,
         .driver = "Audigy", .name = "Audigy 1 [SB0090]", 
-diff -purN linux-2.6.27/sound/pci/hda/Makefile linux-2.6.27.19-5.1/sound/pci/hda/Makefile
---- linux-2.6.27/sound/pci/hda/Makefile        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/Makefile 2009-03-25 16:10:56.000000000 +0000
-@@ -5,6 +5,7 @@ snd-hda-intel-y := hda_intel.o
+diff -r 9608d5473017 sound/pci/hda/Makefile
+--- a/sound/pci/hda/Makefile   Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/Makefile   Wed May 06 16:57:07 2009 +0100
+@@ -5,6 +5,7 @@
  snd-hda-intel-y += hda_codec.o
  snd-hda-intel-$(CONFIG_PROC_FS) += hda_proc.o
  snd-hda-intel-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
@@ -1172396,16 +1172345,16 @@ diff -purN linux-2.6.27/sound/pci/hda/Makefile linux-2.6.27.19-5.1/sound/pci/hda
  snd-hda-intel-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o
  snd-hda-intel-$(CONFIG_SND_HDA_CODEC_REALTEK) += patch_realtek.o
  snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CMEDIA) += patch_cmedia.o
-@@ -14,5 +15,6 @@ snd-hda-intel-$(CONFIG_SND_HDA_CODEC_SI3
+@@ -14,5 +15,6 @@
  snd-hda-intel-$(CONFIG_SND_HDA_CODEC_ATIHDMI) += patch_atihdmi.o
  snd-hda-intel-$(CONFIG_SND_HDA_CODEC_CONEXANT) += patch_conexant.o
  snd-hda-intel-$(CONFIG_SND_HDA_CODEC_VIA) += patch_via.o
 +snd-hda-intel-$(CONFIG_SND_HDA_CODEC_NVHDMI) += patch_nvhdmi.o
  
  obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
-diff -purN linux-2.6.27/sound/pci/hda/hda_beep.c linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.c       2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_beep.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/hda_beep.c Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,142 @@
 +/*
 + * Digital Beep Input Interface for HD-audio codec
@@ -1172549,9 +1172498,9 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_beep.c linux-2.6.27.19-5.1/sound/pci/h
 +              kfree(beep);
 +      }
 +}
-diff -purN linux-2.6.27/sound/pci/hda/hda_beep.h linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.h
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_beep.h       2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_beep.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/hda_beep.h Wed May 06 16:57:07 2009 +0100
 @@ -0,0 +1,45 @@
 +/*
 + * Digital Beep Input Interface for HD-audio codec
@@ -1172598,20 +1172547,20 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_beep.h linux-2.6.27.19-5.1/sound/pci/h
 +#define snd_hda_detach_beep_device(...)
 +#endif
 +#endif
-diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.c
---- linux-2.6.27/sound/pci/hda/hda_codec.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.c      2009-03-25 16:10:56.000000000 +0000
-@@ -94,6 +94,9 @@ static const struct hda_codec_preset *hd
+diff -r 9608d5473017 sound/pci/hda/hda_codec.c
+--- a/sound/pci/hda/hda_codec.c        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_codec.c        Wed May 06 16:57:08 2009 +0100
+@@ -93,6 +93,9 @@
+ #endif
  #ifdef CONFIG_SND_HDA_CODEC_VIA
        snd_hda_preset_via,
- #endif
++#endif
 +#ifdef CONFIG_SND_HDA_CODEC_NVHDMI
 +      snd_hda_preset_nvhdmi,
-+#endif
+ #endif
        NULL
  };
-@@ -956,15 +959,6 @@ void snd_hda_codec_resume_amp(struct hda
+@@ -956,15 +959,6 @@
  }
  #endif /* SND_HDA_NEEDS_RESUME */
  
@@ -1172627,7 +1172576,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
  /* volume */
  int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol,
                                  struct snd_ctl_elem_info *uinfo)
-@@ -973,6 +967,7 @@ int snd_hda_mixer_amp_volume_info(struct
+@@ -973,6 +967,7 @@
        u16 nid = get_amp_nid(kcontrol);
        u8 chs = get_amp_channels(kcontrol);
        int dir = get_amp_direction(kcontrol);
@@ -1172635,7 +1172584,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        u32 caps;
  
        caps = query_amp_caps(codec, nid, dir);
-@@ -984,6 +979,8 @@ int snd_hda_mixer_amp_volume_info(struct
+@@ -984,11 +979,39 @@
                       kcontrol->id.name);
                return -EINVAL;
        }
@@ -1172644,10 +1172593,10 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count = chs == 3 ? 2 : 1;
        uinfo->value.integer.min = 0;
-@@ -991,6 +988,32 @@ int snd_hda_mixer_amp_volume_info(struct
+       uinfo->value.integer.max = caps;
        return 0;
- }
++}
++
 +
 +static inline unsigned int
 +read_amp_value(struct hda_codec *codec, hda_nid_t nid,
@@ -1172672,12 +1172621,10 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
 +              val += ofs;
 +      return snd_hda_codec_amp_update(codec, nid, ch, dir, idx,
 +                                      HDA_AMP_VOLMASK, val);
-+}
-+
+ }
  int snd_hda_mixer_amp_volume_get(struct snd_kcontrol *kcontrol,
-                                struct snd_ctl_elem_value *ucontrol)
- {
-@@ -999,14 +1022,13 @@ int snd_hda_mixer_amp_volume_get(struct 
+@@ -999,14 +1022,13 @@
        int chs = get_amp_channels(kcontrol);
        int dir = get_amp_direction(kcontrol);
        int idx = get_amp_index(kcontrol);
@@ -1172695,7 +1172642,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        return 0;
  }
  
-@@ -1018,18 +1040,17 @@ int snd_hda_mixer_amp_volume_put(struct 
+@@ -1018,18 +1040,17 @@
        int chs = get_amp_channels(kcontrol);
        int dir = get_amp_direction(kcontrol);
        int idx = get_amp_index(kcontrol);
@@ -1172717,7 +1172664,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        snd_hda_power_down(codec);
        return change;
  }
-@@ -1040,6 +1061,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kco
+@@ -1040,6 +1061,7 @@
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        hda_nid_t nid = get_amp_nid(kcontrol);
        int dir = get_amp_direction(kcontrol);
@@ -1172725,7 +1172672,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        u32 caps, val1, val2;
  
        if (size < 4 * sizeof(unsigned int))
-@@ -1048,6 +1070,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kco
+@@ -1048,6 +1070,7 @@
        val2 = (caps & AC_AMPCAP_STEP_SIZE) >> AC_AMPCAP_STEP_SIZE_SHIFT;
        val2 = (val2 + 1) * 25;
        val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT);
@@ -1172733,7 +1172680,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        val1 = ((int)val1) * ((int)val2);
        if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv))
                return -EFAULT;
-@@ -1430,6 +1453,29 @@ static unsigned int convert_to_spdif_sta
+@@ -1430,6 +1453,29 @@
        return sbits;
  }
  
@@ -1172763,7 +1172710,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
  static int snd_hda_spdif_default_put(struct snd_kcontrol *kcontrol,
                                     struct snd_ctl_elem_value *ucontrol)
  {
-@@ -1448,14 +1494,8 @@ static int snd_hda_spdif_default_put(str
+@@ -1448,14 +1494,8 @@
        change = codec->spdif_ctls != val;
        codec->spdif_ctls = val;
  
@@ -1172780,7 +1172727,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
  
        mutex_unlock(&codec->spdif_mutex);
        return change;
-@@ -1487,9 +1527,7 @@ static int snd_hda_spdif_out_switch_put(
+@@ -1487,9 +1527,7 @@
        change = codec->spdif_ctls != val;
        if (change) {
                codec->spdif_ctls = val;
@@ -1172791,7 +1172738,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
                /* unmute amp switch (if any) */
                if ((get_wcaps(codec, nid) & AC_WCAP_OUT_AMP) &&
                    (val & AC_DIG1_ENABLE))
-@@ -2355,6 +2393,66 @@ int snd_hda_check_board_config(struct hd
+@@ -2355,6 +2393,66 @@
  }
  
  /**
@@ -1172858,7 +1172805,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
   * snd_hda_add_new_ctls - create controls from the array
   * @codec: the HDA codec
   * @knew: the array of struct snd_kcontrol_new
-@@ -2583,14 +2681,31 @@ static void setup_dig_out_stream(struct 
+@@ -2583,14 +2681,31 @@
                                 unsigned int stream_tag, unsigned int format)
  {
        /* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
@@ -1172896,7 +1172843,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
  }
  
  /*
-@@ -2602,7 +2717,7 @@ int snd_hda_multi_out_dig_open(struct hd
+@@ -2602,7 +2717,7 @@
        mutex_lock(&codec->spdif_mutex);
        if (mout->dig_out_used == HDA_DIG_ANALOG_DUP)
                /* already opened as analog dup; reset it once */
@@ -1172905,7 +1172852,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
        mout->dig_out_used = HDA_DIG_EXCLUSIVE;
        mutex_unlock(&codec->spdif_mutex);
        return 0;
-@@ -2697,7 +2812,7 @@ int snd_hda_multi_out_analog_prepare(str
+@@ -2697,7 +2812,7 @@
                                             stream_tag, format);
                } else {
                        mout->dig_out_used = 0;
@@ -1172914,7 +1172861,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
                }
        }
        mutex_unlock(&codec->spdif_mutex);
-@@ -2748,7 +2863,7 @@ int snd_hda_multi_out_analog_cleanup(str
+@@ -2748,7 +2863,7 @@
                                                     mout->extra_out_nid[i]);
        mutex_lock(&codec->spdif_mutex);
        if (mout->dig_out_nid && mout->dig_out_used == HDA_DIG_ANALOG_DUP) {
@@ -1172923,10 +1172870,10 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.c linux-2.6.27.19-5.1/sound/pci/
                mout->dig_out_used = 0;
        }
        mutex_unlock(&codec->spdif_mutex);
-diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.h
---- linux-2.6.27/sound/pci/hda/hda_codec.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_codec.h      2009-03-25 16:10:56.000000000 +0000
-@@ -90,6 +90,14 @@ enum {
+diff -r 9608d5473017 sound/pci/hda/hda_codec.h
+--- a/sound/pci/hda/hda_codec.h        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_codec.h        Wed May 06 16:57:08 2009 +0100
+@@ -90,6 +90,14 @@
  #define AC_VERB_GET_CONFIG_DEFAULT            0x0f1c
  /* f20: AFG/MFG */
  #define AC_VERB_GET_SUBSYSTEM_ID              0x0f20
@@ -1172941,7 +1172888,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  
  /*
   * SET verbs
-@@ -121,7 +129,14 @@ enum {
+@@ -121,7 +129,14 @@
  #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1    0x71d
  #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2    0x71e
  #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3    0x71f
@@ -1172956,7 +1172903,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  
  /*
   * Parameter IDs
-@@ -143,6 +158,7 @@ enum {
+@@ -143,6 +158,7 @@
  #define AC_PAR_GPIO_CAP                       0x11
  #define AC_PAR_AMP_OUT_CAP            0x12
  #define AC_PAR_VOL_KNB_CAP            0x13
@@ -1172964,7 +1172911,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  
  /*
   * AC_VERB_PARAMETERS results (32bit)
-@@ -171,6 +187,8 @@ enum {
+@@ -171,6 +187,8 @@
  #define AC_WCAP_DIGITAL                       (1<<9)  /* digital I/O */
  #define AC_WCAP_POWER                 (1<<10) /* power control */
  #define AC_WCAP_LR_SWAP                       (1<<11) /* L/R swap */
@@ -1172973,7 +1172920,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  #define AC_WCAP_DELAY                 (0xf<<16)
  #define AC_WCAP_DELAY_SHIFT           16
  #define AC_WCAP_TYPE                  (0xf<<20)
-@@ -206,9 +224,20 @@ enum {
+@@ -206,9 +224,20 @@
  /* Input converter SDI select */
  #define AC_SDI_SELECT                 (0xf<<0)
  
@@ -1172995,7 +1172942,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  
  /* Pin widget capabilies */
  #define AC_PINCAP_IMP_SENSE           (1<<0)  /* impedance sense capable */
-@@ -222,6 +251,10 @@ enum {
+@@ -222,6 +251,10 @@
   *       but is marked reserved in the Intel HDA specification.
   */
  #define AC_PINCAP_LR_SWAP             (1<<7)  /* L/R swap */
@@ -1173006,7 +1172953,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  #define AC_PINCAP_VREF                        (0x37<<8)
  #define AC_PINCAP_VREF_SHIFT          8
  #define AC_PINCAP_EAPD                        (1<<16) /* EAPD capable */
-@@ -272,6 +305,22 @@ enum {
+@@ -272,6 +305,22 @@
  #define AC_KNBCAP_NUM_STEPS           (0x7f<<0)
  #define AC_KNBCAP_DELTA                       (1<<7)
  
@@ -1173029,7 +1172976,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  /*
   * Control Parameters
   */
-@@ -317,18 +366,44 @@ enum {
+@@ -317,17 +366,43 @@
  #define AC_PINCTL_OUT_EN              (1<<6)
  #define AC_PINCTL_HP_EN                       (1<<7)
  
@@ -1173045,7 +1172992,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  #define AC_EAPDBTL_BALANCED           (1<<0)
  #define AC_EAPDBTL_EAPD                       (1<<1)
  #define AC_EAPDBTL_LR_SWAP            (1<<2)
++
 +/* HDMI ELD data */
 +#define AC_ELDD_ELD_VALID             (1<<31)
 +#define AC_ELDD_ELD_DATA              0xff
@@ -1173073,11 +1173020,10 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
 +/* Converter channel <-> HDMI slot mapping */
 +#define AC_CVTMAP_HDMI_SLOT           (0xf<<0) /* HDMI slot number */
 +#define AC_CVTMAP_CHAN                        (0xf<<4) /* converter channel number */
-+
  /* configuration default - 32bit */
  #define AC_DEFCFG_SEQUENCE            (0xf<<0)
- #define AC_DEFCFG_DEF_ASSOC           (0xf<<4)
-@@ -449,6 +524,7 @@ enum {
+@@ -449,6 +524,7 @@
   */
  
  struct hda_bus;
@@ -1173085,7 +1173031,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  struct hda_codec;
  struct hda_pcm;
  struct hda_pcm_stream;
-@@ -634,6 +710,9 @@ struct hda_codec {
+@@ -634,6 +710,9 @@
        /* codec specific info */
        void *spec;
  
@@ -1173095,7 +1173041,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
        /* widget capabilities cache */
        unsigned int num_nodes;
        hda_nid_t start_nid;
-@@ -646,9 +725,15 @@ struct hda_codec {
+@@ -646,9 +725,15 @@
        unsigned int spdif_status;      /* IEC958 status bits */
        unsigned short spdif_ctls;      /* SPDIF control bits */
        unsigned int spdif_in_enable;   /* SPDIF input enable? */
@@ -1173111,9 +1173057,9 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_codec.h linux-2.6.27.19-5.1/sound/pci/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        unsigned int power_on :1;       /* current (global) power-state */
        unsigned int power_transition :1; /* power-state in transition */
-diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/hda/hda_intel.c
---- linux-2.6.27/sound/pci/hda/hda_intel.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_intel.c      2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_intel.c
+--- a/sound/pci/hda/hda_intel.c        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_intel.c        Wed May 06 16:57:08 2009 +0100
 @@ -45,6 +45,7 @@
  #include <linux/slab.h>
  #include <linux/pci.h>
@@ -1173122,7 +1173068,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  #include <sound/core.h>
  #include <sound/initval.h>
  #include "hda_codec.h"
-@@ -222,9 +223,9 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO
+@@ -222,9 +223,9 @@
  #define RIRB_INT_OVERRUN      0x04
  #define RIRB_INT_MASK         0x05
  
@@ -1173135,7 +1173081,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  
  /* SD_CTL bits */
  #define SD_CTL_STREAM_RESET   0x01    /* stream reset bit */
-@@ -286,6 +287,11 @@ enum {
+@@ -286,6 +287,11 @@
  #define INTEL_SCH_HDA_DEVC      0x78
  #define INTEL_SCH_HDA_DEVC_NOSNOOP       (0x1<<11)
  
@@ -1173147,7 +1173093,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  
  /*
   */
-@@ -317,6 +323,12 @@ struct azx_dev {
+@@ -317,6 +323,12 @@
        unsigned int running :1;
        unsigned int irq_pending :1;
        unsigned int irq_ignore :1;
@@ -1173160,7 +1173106,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  };
  
  /* CORB/RIRB */
-@@ -379,12 +391,16 @@ struct azx {
+@@ -379,12 +391,16 @@
        unsigned int polling_mode :1;
        unsigned int msi :1;
        unsigned int irq_pending_warned :1;
@@ -1173177,7 +1173123,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  };
  
  /* driver types */
-@@ -398,6 +414,7 @@ enum {
+@@ -398,6 +414,7 @@
        AZX_DRIVER_ULI,
        AZX_DRIVER_NVIDIA,
        AZX_DRIVER_TERA,
@@ -1173185,7 +1173131,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  };
  
  static char *driver_short_names[] __devinitdata = {
-@@ -818,6 +835,11 @@ static void azx_int_clear(struct azx *ch
+@@ -818,6 +835,11 @@
  /* start a stream */
  static void azx_stream_start(struct azx *chip, struct azx_dev *azx_dev)
  {
@@ -1173197,7 +1173143,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
        /* enable SIE */
        azx_writeb(chip, INTCTL,
                   azx_readb(chip, INTCTL) | (1 << azx_dev->index));
-@@ -1151,7 +1173,8 @@ static int azx_setup_controller(struct a
+@@ -1151,7 +1173,8 @@
  
        /* enable the position buffer */
        if (chip->position_fix == POS_FIX_POSBUF ||
@@ -1173207,7 +1173153,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
                if (!(azx_readl(chip, DPLBASE) & ICH6_DPLBASE_ENABLE))
                        azx_writel(chip, DPLBASE,
                                (u32)chip->posbuf.addr | ICH6_DPLBASE_ENABLE);
-@@ -1169,23 +1192,26 @@ static int azx_setup_controller(struct a
+@@ -1169,16 +1192,18 @@
   * Codec initialization
   */
  
@@ -1173223,8 +1173169,8 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
 +/* number of codec slots for each chipset: 0 = default slots (i.e. 4) */
 +static unsigned int azx_max_codecs[AZX_NUM_DRIVERS] __devinitdata = {
        [AZX_DRIVER_TERA] = 1,
- };
++};
++
 +/* number of slots to probe as default
 + * this can be different from azx_max_codecs[] -- e.g. some boards
 + * report wrongly the non-existing 4th slot availability
@@ -1173232,10 +1173178,10 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
 +static unsigned int azx_default_codecs[AZX_NUM_DRIVERS] __devinitdata = {
 +      [AZX_DRIVER_ICH] = 3,
 +      [AZX_DRIVER_ATI] = 3,
-+};
-+
+ };
  static int __devinit azx_codec_create(struct azx *chip, const char *model,
-                                     unsigned int codec_probe_mask)
+@@ -1186,6 +1211,7 @@
  {
        struct hda_bus_template bus_temp;
        int c, codecs, audio_codecs, err;
@@ -1173243,7 +1173189,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  
        memset(&bus_temp, 0, sizeof(bus_temp));
        bus_temp.private_data = chip;
-@@ -1201,8 +1227,17 @@ static int __devinit azx_codec_create(st
+@@ -1201,8 +1227,17 @@
        if (err < 0)
                return err;
  
@@ -1173262,7 +1173208,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
                if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
                        struct hda_codec *codec;
                        err = snd_hda_codec_new(chip->bus, c, &codec);
-@@ -1215,7 +1250,7 @@ static int __devinit azx_codec_create(st
+@@ -1215,7 +1250,7 @@
        }
        if (!audio_codecs) {
                /* probe additional slots if no codec is found */
@@ -1173271,7 +1173217,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
                        if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
                                err = snd_hda_codec_new(chip->bus, c, NULL);
                                if (err < 0)
-@@ -1507,13 +1542,71 @@ static int azx_pcm_trigger(struct snd_pc
+@@ -1507,13 +1542,71 @@
        return 0;
  }
  
@@ -1173345,7 +1173291,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
                /* use the position buffer */
                pos = le32_to_cpu(*azx_dev->posbuf);
        } else {
-@@ -1559,6 +1652,8 @@ static int azx_position_ok(struct azx *c
+@@ -1559,6 +1652,8 @@
                        chip->position_fix = POS_FIX_POSBUF;
        }
  
@@ -1173354,7 +1173300,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
        if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
                return 0; /* NG - it's below the period boundary */
        return 1; /* OK, it's fine */
-@@ -1670,7 +1765,7 @@ static int __devinit create_codec_pcm(st
+@@ -1670,7 +1765,7 @@
                snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &azx_pcm_ops);
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
                                              snd_dma_pci_data(chip->pci),
@@ -1173363,7 +1173309,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
        chip->pcm[cpcm->device] = pcm;
        return 0;
  }
-@@ -1890,12 +1985,36 @@ static int azx_resume(struct pci_dev *pc
+@@ -1890,11 +1985,35 @@
  
  
  /*
@@ -1173394,13 +1173340,12 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  static int azx_free(struct azx *chip)
  {
        int i;
-+      azx_notifier_unregister(chip);
 +
++      azx_notifier_unregister(chip);
        if (chip->initialized) {
                azx_clear_irq_pending(chip);
-               for (i = 0; i < chip->num_streams; i++)
-@@ -1946,6 +2065,15 @@ static int __devinit check_position_fix(
+@@ -1946,6 +2065,15 @@
  {
        const struct snd_pci_quirk *q;
  
@@ -1173416,7 +1173361,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
        if (fix == POS_FIX_AUTO) {
                q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
                if (q) {
-@@ -1969,6 +2097,8 @@ static struct snd_pci_quirk probe_mask_l
+@@ -1969,6 +2097,8 @@
        SND_PCI_QUIRK(0x1014, 0x05b7, "Thinkpad Z60", 0x01),
        SND_PCI_QUIRK(0x17aa, 0x2010, "Thinkpad X/T/R60", 0x01),
        SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X/T/R61", 0x01),
@@ -1173425,7 +1173370,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
        {}
  };
  
-@@ -2250,6 +2380,7 @@ static int __devinit azx_probe(struct pc
+@@ -2250,6 +2380,7 @@
        pci_set_drvdata(pci, card);
        chip->running = 1;
        power_down_all_codecs(chip);
@@ -1173433,9 +1173378,9 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_intel.c linux-2.6.27.19-5.1/sound/pci/
  
        dev++;
        return err;
-diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/hda/hda_local.h
---- linux-2.6.27/sound/pci/hda/hda_local.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_local.h      2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/hda_local.h
+--- a/sound/pci/hda/hda_local.h        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_local.h        Wed May 06 16:57:08 2009 +0100
 @@ -26,8 +26,10 @@
  /*
   * for mixer controls
@@ -1173448,7 +1173393,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/
  /* mono volume with index (index=0,1,...) (channel=1,2) */
  #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \
        { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx,  \
-@@ -288,6 +290,9 @@ static inline int snd_hda_codec_proc_new
+@@ -288,6 +290,9 @@
  int snd_hda_check_board_config(struct hda_codec *codec, int num_configs,
                               const char **modelnames,
                               const struct snd_pci_quirk *pci_list);
@@ -1173458,7 +1173403,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/
  int snd_hda_add_new_ctls(struct hda_codec *codec,
                         struct snd_kcontrol_new *knew);
  
-@@ -368,12 +373,15 @@ int snd_hda_parse_pin_def_config(struct 
+@@ -368,12 +373,15 @@
  #define AMP_OUT_UNMUTE        0xb000
  #define AMP_OUT_ZERO  0xb000
  /* pinctl values */
@@ -1173480,7 +1173425,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/
  
  /*
   * get widget capabilities
-@@ -418,4 +426,14 @@ int snd_hda_check_amp_list_power(struct 
+@@ -418,4 +426,14 @@
                                 hda_nid_t nid);
  #endif /* CONFIG_SND_HDA_POWER_SAVE */
  
@@ -1173495,19 +1173440,19 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_local.h linux-2.6.27.19-5.1/sound/pci/
 +#define get_amp_offset(kc)    (((kc)->private_value >> 23) & 0x3f)
 +
  #endif /* __SOUND_HDA_LOCAL_H */
-diff -purN linux-2.6.27/sound/pci/hda/hda_patch.h linux-2.6.27.19-5.1/sound/pci/hda/hda_patch.h
---- linux-2.6.27/sound/pci/hda/hda_patch.h     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_patch.h      2009-03-25 16:10:56.000000000 +0000
-@@ -18,3 +18,5 @@ extern struct hda_codec_preset snd_hda_p
+diff -r 9608d5473017 sound/pci/hda/hda_patch.h
+--- a/sound/pci/hda/hda_patch.h        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_patch.h        Wed May 06 16:57:08 2009 +0100
+@@ -18,3 +18,5 @@
  extern struct hda_codec_preset snd_hda_preset_conexant[];
  /* VIA codecs */
  extern struct hda_codec_preset snd_hda_preset_via[];
 +/* NVIDIA HDMI codecs */
 +extern struct hda_codec_preset snd_hda_preset_nvhdmi[];
-diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/hda/hda_proc.c
---- linux-2.6.27/sound/pci/hda/hda_proc.c      2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/hda_proc.c       2009-03-25 16:10:56.000000000 +0000
-@@ -216,7 +216,7 @@ static void print_pin_caps(struct snd_in
+diff -r 9608d5473017 sound/pci/hda/hda_proc.c
+--- a/sound/pci/hda/hda_proc.c Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/hda_proc.c Wed May 06 16:57:08 2009 +0100
+@@ -216,7 +216,7 @@
        unsigned int caps, val;
  
        caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
@@ -1173516,7 +1173461,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/h
        if (caps & AC_PINCAP_IN)
                snd_iprintf(buffer, " IN");
        if (caps & AC_PINCAP_OUT)
-@@ -229,6 +229,13 @@ static void print_pin_caps(struct snd_in
+@@ -229,6 +229,13 @@
                snd_iprintf(buffer, " Detect");
        if (caps & AC_PINCAP_BALANCE)
                snd_iprintf(buffer, " Balanced");
@@ -1173530,7 +1173475,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/h
        if (caps & AC_PINCAP_LR_SWAP)
                snd_iprintf(buffer, " R/L");
        if (caps & AC_PINCAP_TRIG_REQ)
-@@ -478,6 +485,8 @@ static void print_gpio(struct snd_info_b
+@@ -478,6 +485,8 @@
                    (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0,
                    (gpio & AC_GPIO_WAKE) ? 1 : 0);
        max = gpio & AC_GPIO_IO_COUNT;
@@ -1173539,7 +1173484,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/h
        enable = snd_hda_codec_read(codec, nid, 0,
                                    AC_VERB_GET_GPIO_MASK, 0);
        direction = snd_hda_codec_read(codec, nid, 0,
-@@ -552,9 +561,15 @@ static void print_codec_info(struct snd_
+@@ -552,9 +561,15 @@
  
                snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid,
                            get_wid_type_name(wid_type), wid_caps);
@@ -1173558,7 +1173503,7 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/h
                        snd_iprintf(buffer, " Mono");
                if (wid_caps & AC_WCAP_DIGITAL)
                        snd_iprintf(buffer, " Digital");
-@@ -566,6 +581,8 @@ static void print_codec_info(struct snd_
+@@ -566,6 +581,8 @@
                        snd_iprintf(buffer, " Stripe");
                if (wid_caps & AC_WCAP_LR_SWAP)
                        snd_iprintf(buffer, " R/L");
@@ -1173567,13 +1173512,17 @@ diff -purN linux-2.6.27/sound/pci/hda/hda_proc.c linux-2.6.27.19-5.1/sound/pci/h
                snd_iprintf(buffer, "\n");
  
                /* volume knob is a special widget that always have connection
-diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/pci/hda/patch_analog.c
---- linux-2.6.27/sound/pci/hda/patch_analog.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_analog.c   2009-03-25 16:10:56.000000000 +0000
-@@ -629,6 +629,36 @@ static struct snd_kcontrol_new ad1986a_l
-       HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
-       HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
-       HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
+diff -r 9608d5473017 sound/pci/hda/patch_analog.c
+--- a/sound/pci/hda/patch_analog.c     Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_analog.c     Wed May 06 16:57:08 2009 +0100
+@@ -625,6 +625,36 @@
+ };
+ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = {
++      HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
++      HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
++      HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
++      HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
 +      HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT),
 +      HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT),
 +      HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
@@ -1173600,14 +1173549,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
 +};
 +
 +static struct snd_kcontrol_new ad1986a_samsung_mixers[] = {
-+      HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
-+      HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
-+      HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
-+      HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
-       HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
-       HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT),
-       HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT),
-@@ -917,6 +947,7 @@ enum {
+       HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
+       HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
+       HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
+@@ -917,6 +947,7 @@
        AD1986A_LAPTOP_EAPD,
        AD1986A_LAPTOP_AUTOMUTE,
        AD1986A_ULTRA,
@@ -1173615,7 +1173560,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        AD1986A_MODELS
  };
  
-@@ -927,6 +958,7 @@ static const char *ad1986a_models[AD1986
+@@ -927,6 +958,7 @@
        [AD1986A_LAPTOP_EAPD]   = "laptop-eapd",
        [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute",
        [AD1986A_ULTRA]         = "ultra",
@@ -1173623,7 +1173568,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
  };
  
  static struct snd_pci_quirk ad1986a_cfg_tbl[] = {
-@@ -949,9 +981,9 @@ static struct snd_pci_quirk ad1986a_cfg_
+@@ -949,9 +981,9 @@
        SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD),
        SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK),
        SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP),
@@ -1173636,7 +1173581,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA),
        SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK),
        SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP),
-@@ -1033,6 +1065,17 @@ static int patch_ad1986a(struct hda_code
+@@ -1033,6 +1065,17 @@
                break;
        case AD1986A_LAPTOP_EAPD:
                spec->mixers[0] = ad1986a_laptop_eapd_mixers;
@@ -1173654,7 +1173599,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
                spec->num_init_verbs = 3;
                spec->init_verbs[1] = ad1986a_eapd_init_verbs;
                spec->init_verbs[2] = ad1986a_automic_verbs;
-@@ -1826,9 +1869,14 @@ static hda_nid_t ad1988_capsrc_nids[3] =
+@@ -1826,8 +1869,13 @@
        0x0c, 0x0d, 0x0e
  };
  
@@ -1173662,15 +1173607,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
 +#define AD1988_SPDIF_OUT              0x02
 +#define AD1988_SPDIF_OUT_HDMI 0x0b
  #define AD1988_SPDIF_IN               0x07
++
 +static hda_nid_t ad1989b_slave_dig_outs[2] = {
 +      AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI
 +};
-+
  static struct hda_input_mux ad1988_6stack_capture_source = {
        .num_items = 5,
-       .items = {
-@@ -2143,6 +2191,7 @@ static struct snd_kcontrol_new ad1988_sp
+@@ -2143,6 +2191,7 @@
  
  static struct snd_kcontrol_new ad1989_spdif_out_mixers[] = {
        HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
@@ -1173678,7 +1173622,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        { } /* end */
  };
  
-@@ -2207,6 +2256,8 @@ static struct hda_verb ad1988_6stack_ini
+@@ -2207,6 +2256,8 @@
        {0x34, AC_VERB_SET_CONNECT_SEL, 0x0},
        /* Analog CD Input */
        {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
@@ -1173687,21 +1173631,22 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
  
        { }
  };
-@@ -2247,8 +2298,12 @@ static struct hda_verb ad1988_spdif_init
+@@ -2247,8 +2298,12 @@
  
  /* AD1989 has no ADC -> SPDIF route */
  static struct hda_verb ad1989_spdif_init_verbs[] = {
 -      /* SPDIF out pin */
+-      {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
 +      /* SPDIF-1 out pin */
 +      {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-       {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
++      {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
 +      /* SPDIF-2/HDMI out pin */
 +      {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
 +      {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
        { }
  };
  
-@@ -2336,6 +2391,8 @@ static struct hda_verb ad1988_3stack_ini
+@@ -2336,6 +2391,8 @@
        {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
        {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
        {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
@@ -1173710,7 +1173655,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        { }
  };
  
-@@ -2409,6 +2466,8 @@ static struct hda_verb ad1988_laptop_ini
+@@ -2409,6 +2466,8 @@
        {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
        {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
        {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
@@ -1173719,7 +1173664,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        { }
  };
  
-@@ -2868,6 +2927,7 @@ static struct snd_pci_quirk ad1988_cfg_t
+@@ -2868,6 +2927,7 @@
        SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG),
        SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG),
        SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG),
@@ -1173727,7 +1173672,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        {}
  };
  
-@@ -2975,6 +3035,7 @@ static int patch_ad1988(struct hda_codec
+@@ -2975,6 +3035,7 @@
                                ad1989_spdif_out_mixers;
                        spec->init_verbs[spec->num_init_verbs++] =
                                ad1989_spdif_init_verbs;
@@ -1173735,7 +1173680,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
                } else {
                        spec->mixers[spec->num_mixers++] =
                                ad1988_spdif_out_mixers;
-@@ -3842,6 +3903,17 @@ static const char *ad1884a_models[AD1884
+@@ -3842,6 +3903,17 @@
  
  static struct snd_pci_quirk ad1884a_cfg_tbl[] = {
        SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE),
@@ -1173753,7 +1173698,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD),
        {}
  };
-@@ -3887,6 +3959,14 @@ static int patch_ad1884a(struct hda_code
+@@ -3887,6 +3959,14 @@
                spec->input_mux = &ad1884a_laptop_capture_source;
                codec->patch_ops.unsol_event = ad1884a_hp_unsol_event;
                codec->patch_ops.init = ad1884a_hp_init;
@@ -1173768,7 +1173713,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
                break;
        case AD1884A_MOBILE:
                spec->mixers[0] = ad1884a_mobile_mixers;
-@@ -3911,7 +3991,7 @@ static int patch_ad1884a(struct hda_code
+@@ -3911,7 +3991,7 @@
  
  
  /*
@@ -1173777,7 +1173722,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
   *
   * port-A - front hp-out
   * port-B - front mic-in
-@@ -3948,6 +4028,18 @@ static struct hda_input_mux ad1882_captu
+@@ -3948,6 +4028,18 @@
        },
  };
  
@@ -1173796,39 +1173741,80 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
  static struct snd_kcontrol_new ad1882_base_mixers[] = {
        HDA_CODEC_VOLUME("Front Playback Volume", 0x04, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Surround Playback Volume", 0x03, 0x0, HDA_OUTPUT),
-@@ -3957,16 +4049,7 @@ static struct snd_kcontrol_new ad1882_ba
+@@ -3957,6 +4049,40 @@
        HDA_CODEC_MUTE("Front Playback Switch", 0x12, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x13, 1, 0x0, HDA_OUTPUT),
--      HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
--      HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
--      HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
--      HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT),
--      HDA_CODEC_VOLUME("Line Playback Volume", 0x20, 0x04, HDA_INPUT),
--      HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x04, HDA_INPUT),
--      HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT),
--      HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
--      HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
--      HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
-+
-       HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
-       HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
-       HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
-@@ -3999,6 +4082,35 @@ static struct snd_kcontrol_new ad1882_ba
-       { } /* end */
- };
++
++      HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
++      HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
++      HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
++      HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
++      HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
++      HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT),
++      HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x0d, 0x0, HDA_OUTPUT),
++      {
++              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++              /* The multiple "Capture Source" controls confuse alsamixer
++               * So call somewhat different..
++               */
++              /* .name = "Capture Source", */
++              .name = "Input Source",
++              .count = 2,
++              .info = ad198x_mux_enum_info,
++              .get = ad198x_mux_enum_get,
++              .put = ad198x_mux_enum_put,
++      },
++      /* SPDIF controls */
++      HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
++      {
++              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++              .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
++              /* identical with ad1983 */
++              .info = ad1983_spdif_route_info,
++              .get = ad1983_spdif_route_get,
++              .put = ad1983_spdif_route_put,
++      },
++      { } /* end */
++};
++
 +static struct snd_kcontrol_new ad1882_loopback_mixers[] = {
-+      HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
-+      HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
-+      HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
-+      HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT),
-+      HDA_CODEC_VOLUME("Line Playback Volume", 0x20, 0x04, HDA_INPUT),
-+      HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x04, HDA_INPUT),
-+      HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT),
-+      HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
-+      HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
-+      HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
+       HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x20, 0x00, HDA_INPUT),
+       HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
+@@ -3967,35 +4093,21 @@
+       HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT),
+       HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
+       HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
+-      HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x0d, 0x0, HDA_OUTPUT),
+-      {
+-              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+-              /* The multiple "Capture Source" controls confuse alsamixer
+-               * So call somewhat different..
+-               */
+-              /* .name = "Capture Source", */
+-              .name = "Input Source",
+-              .count = 2,
+-              .info = ad198x_mux_enum_info,
+-              .get = ad198x_mux_enum_get,
+-              .put = ad198x_mux_enum_put,
+-      },
+-      /* SPDIF controls */
+-      HDA_CODEC_VOLUME("IEC958 Playback Volume", 0x1b, 0x0, HDA_OUTPUT),
+-      {
+-              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+-              .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
+-              /* identical with ad1983 */
+-              .info = ad1983_spdif_route_info,
+-              .get = ad1983_spdif_route_get,
+-              .put = ad1983_spdif_route_put,
+-      },
 +      { } /* end */
 +};
 +
@@ -1173844,13 +1173830,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
 +      HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x07, HDA_INPUT),
 +      HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x07, HDA_INPUT),
 +      HDA_CODEC_VOLUME("Digital Mic Boost", 0x1f, 0x0, HDA_INPUT),
-+      { } /* end */
-+};
-+
- static struct snd_kcontrol_new ad1882_3stack_mixers[] = {
-       HDA_CODEC_MUTE("Surround Playback Switch", 0x15, 0x0, HDA_OUTPUT),
-       HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x17, 1, 0x0, HDA_OUTPUT),
-@@ -4168,9 +4280,16 @@ static int patch_ad1882(struct hda_codec
+       { } /* end */
+ };
+@@ -4168,9 +4280,16 @@
        spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids);
        spec->adc_nids = ad1882_adc_nids;
        spec->capsrc_nids = ad1882_capsrc_nids;
@@ -1173869,7 +1173852,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        spec->num_init_verbs = 1;
        spec->init_verbs[0] = ad1882_init_verbs;
        spec->spdif_route = 0;
-@@ -4187,8 +4306,8 @@ static int patch_ad1882(struct hda_codec
+@@ -4187,8 +4306,8 @@
        switch (board_config) {
        default:
        case AD1882_3STACK:
@@ -1173880,7 +1173863,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
                spec->channel_mode = ad1882_modes;
                spec->num_channel_mode = ARRAY_SIZE(ad1882_modes);
                spec->need_dac_fix = 1;
-@@ -4196,8 +4315,8 @@ static int patch_ad1882(struct hda_codec
+@@ -4196,8 +4315,8 @@
                spec->multiout.num_dacs = 1;
                break;
        case AD1882_6STACK:
@@ -1173891,7 +1173874,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
                break;
        }
        return 0;
-@@ -4220,6 +4339,7 @@ struct hda_codec_preset snd_hda_preset_a
+@@ -4220,6 +4339,7 @@
        { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a },
        { .id = 0x11d41988, .name = "AD1988", .patch = patch_ad1988 },
        { .id = 0x11d4198b, .name = "AD1988B", .patch = patch_ad1988 },
@@ -1173899,10 +1173882,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_analog.c linux-2.6.27.19-5.1/sound/p
        { .id = 0x11d4989a, .name = "AD1989A", .patch = patch_ad1988 },
        { .id = 0x11d4989b, .name = "AD1989B", .patch = patch_ad1988 },
        {} /* terminator */
-diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/pci/hda/patch_atihdmi.c
---- linux-2.6.27/sound/pci/hda/patch_atihdmi.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_atihdmi.c  2009-03-25 16:10:56.000000000 +0000
-@@ -35,6 +35,9 @@ struct atihdmi_spec {
+diff -r 9608d5473017 sound/pci/hda/patch_atihdmi.c
+--- a/sound/pci/hda/patch_atihdmi.c    Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_atihdmi.c    Wed May 06 16:57:08 2009 +0100
+@@ -35,6 +35,9 @@
        struct hda_pcm pcm_rec;
  };
  
@@ -1173912,7 +1173895,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
  static struct hda_verb atihdmi_basic_init[] = {
        /* enable digital output on pin widget */
        { 0x03, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
-@@ -60,8 +63,9 @@ static int atihdmi_init(struct hda_codec
+@@ -60,8 +63,9 @@
  {
        snd_hda_sequence_write(codec, atihdmi_basic_init);
        /* SI codec requires to unmute the pin */
@@ -1173924,7 +1173907,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
                                    AMP_OUT_UNMUTE);
        return 0;
  }
-@@ -92,15 +96,29 @@ static int atihdmi_dig_playback_pcm_prep
+@@ -92,15 +96,29 @@
                                            struct snd_pcm_substream *substream)
  {
        struct atihdmi_spec *spec = codec->spec;
@@ -1173957,7 +1173940,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
        .ops = {
                .open = atihdmi_dig_playback_pcm_open,
                .close = atihdmi_dig_playback_pcm_close,
-@@ -112,6 +130,7 @@ static int atihdmi_build_pcms(struct hda
+@@ -112,6 +130,7 @@
  {
        struct atihdmi_spec *spec = codec->spec;
        struct hda_pcm *info = &spec->pcm_rec;
@@ -1173965,21 +1173948,21 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
  
        codec->num_pcms = 1;
        codec->pcm_info = info;
-@@ -120,6 +139,13 @@ static int atihdmi_build_pcms(struct hda
+@@ -119,6 +138,13 @@
+       info->name = "ATI HDMI";
        info->pcm_type = HDA_PCM_TYPE_HDMI;
        info->stream[SNDRV_PCM_STREAM_PLAYBACK] = atihdmi_pcm_digital_playback;
++
 +      /* FIXME: we must check ELD and change the PCM parameters dynamically
 +       */
 +      chans = get_wcaps(codec, CVT_NID);
 +      chans = (chans & AC_WCAP_CHAN_CNT_EXT) >> 13;
 +      chans = ((chans << 1) | 1) + 1;
 +      info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max = chans;
-+
        return 0;
  }
-@@ -147,9 +173,11 @@ static int patch_atihdmi(struct hda_code
+@@ -147,9 +173,11 @@
  
        spec->multiout.num_dacs = 0;      /* no analog */
        spec->multiout.max_channels = 2;
@@ -1173994,7 +1173977,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
  
        codec->patch_ops = atihdmi_patch_ops;
  
-@@ -164,6 +192,7 @@ struct hda_codec_preset snd_hda_preset_a
+@@ -164,6 +192,7 @@
        { .id = 0x10027919, .name = "ATI RS600 HDMI", .patch = patch_atihdmi },
        { .id = 0x1002791a, .name = "ATI RS690/780 HDMI", .patch = patch_atihdmi },
        { .id = 0x1002aa01, .name = "ATI R6xx HDMI", .patch = patch_atihdmi },
@@ -1174002,10 +1173985,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_atihdmi.c linux-2.6.27.19-5.1/sound/
        { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_atihdmi },
        { .id = 0x17e80047, .name = "Chrontel HDMI",  .patch = patch_atihdmi },
        {} /* terminator */
-diff -purN linux-2.6.27/sound/pci/hda/patch_conexant.c linux-2.6.27.19-5.1/sound/pci/hda/patch_conexant.c
---- linux-2.6.27/sound/pci/hda/patch_conexant.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_conexant.c 2009-03-25 16:10:56.000000000 +0000
-@@ -1470,6 +1470,7 @@ static struct snd_pci_quirk cxt5047_cfg_
+diff -r 9608d5473017 sound/pci/hda/patch_conexant.c
+--- a/sound/pci/hda/patch_conexant.c   Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_conexant.c   Wed May 06 16:57:08 2009 +0100
+@@ -1470,6 +1470,7 @@
        SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP),
        SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP),
        SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP),
@@ -1174013,9 +1173996,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_conexant.c linux-2.6.27.19-5.1/sound
        SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD),
        {}
  };
-diff -purN linux-2.6.27/sound/pci/hda/patch_nvhdmi.c linux-2.6.27.19-5.1/sound/pci/hda/patch_nvhdmi.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_nvhdmi.c   2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_nvhdmi.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/pci/hda/patch_nvhdmi.c     Wed May 06 16:57:08 2009 +0100
 @@ -0,0 +1,165 @@
 +/*
 + * Universal Interface for Intel High Definition Audio Codec
@@ -1174182,10 +1174165,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_nvhdmi.c linux-2.6.27.19-5.1/sound/p
 +      { .id = 0x10de0007, .name = "NVIDIA MCP7A HDMI", .patch = patch_nvhdmi },
 +      {} /* terminator */
 +};
-diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/pci/hda/patch_realtek.c
---- linux-2.6.27/sound/pci/hda/patch_realtek.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_realtek.c  2009-03-25 16:10:56.000000000 +0000
-@@ -72,6 +72,7 @@ enum {
+diff -r 9608d5473017 sound/pci/hda/patch_realtek.c
+--- a/sound/pci/hda/patch_realtek.c    Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_realtek.c    Wed May 06 16:57:08 2009 +0100
+@@ -72,6 +72,7 @@
  enum {
        ALC260_BASIC,
        ALC260_HP,
@@ -1174193,7 +1174176,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC260_HP_3013,
        ALC260_FUJITSU_S702X,
        ALC260_ACER,
-@@ -100,6 +101,9 @@ enum {
+@@ -100,6 +101,9 @@
        ALC262_BENQ_T31,
        ALC262_ULTRA,
        ALC262_LENOVO_3000,
@@ -1174203,7 +1174186,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC262_AUTO,
        ALC262_MODEL_LAST /* last tag */
  };
-@@ -110,6 +114,8 @@ enum {
+@@ -110,6 +114,8 @@
        ALC268_3ST,
        ALC268_TOSHIBA,
        ALC268_ACER,
@@ -1174212,7 +1174195,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC268_DELL,
        ALC268_ZEPTO,
  #ifdef CONFIG_SND_DEBUG
-@@ -122,8 +128,10 @@ enum {
+@@ -122,8 +128,10 @@
  /* ALC269 models */
  enum {
        ALC269_BASIC,
@@ -1174223,7 +1174206,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC269_AUTO,
        ALC269_MODEL_LAST /* last tag */
  };
-@@ -169,6 +177,13 @@ enum {
+@@ -169,6 +177,13 @@
        ALC663_ASUS_G71V,
        ALC663_ASUS_H13,
        ALC663_ASUS_G50V,
@@ -1174237,7 +1174220,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC662_AUTO,
        ALC662_MODEL_LAST,
  };
-@@ -200,18 +215,21 @@ enum {
+@@ -200,18 +215,21 @@
        ALC883_ACER,
        ALC883_ACER_ASPIRE,
        ALC883_MEDION,
@@ -1174261,7 +1174244,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        ALC883_AUTO,
        ALC883_MODEL_LAST,
  };
-@@ -291,6 +309,13 @@ struct alc_spec {
+@@ -291,6 +309,13 @@
        /* for PLL fix */
        hda_nid_t pll_nid;
        unsigned int pll_coef_idx, pll_coef_bit;
@@ -1174275,7 +1174258,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  };
  
  /*
-@@ -398,7 +423,7 @@ static int alc_ch_mode_put(struct snd_kc
+@@ -398,7 +423,7 @@
  
  /*
   * Control the mode of pin widget settings via the mixer.  "pc" is used
@@ -1174284,7 +1174267,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   * being part of a format specifier.  Maximum allowed length of a value is
   * 63 characters plus NULL terminator.
   *
-@@ -429,7 +454,7 @@ static unsigned char alc_pin_mode_values
+@@ -429,7 +454,7 @@
  #define ALC_PIN_DIR_IN_NOMICBIAS    0x03
  #define ALC_PIN_DIR_INOUT_NOMICBIAS 0x04
  
@@ -1174293,7 +1174276,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   * For each direction the minimum and maximum values are given.
   */
  static signed char alc_pin_mode_dir_info[5][2] = {
-@@ -502,7 +527,7 @@ static int alc_pin_mode_put(struct snd_k
+@@ -502,7 +527,7 @@
                                          AC_VERB_SET_PIN_WIDGET_CONTROL,
                                          alc_pin_mode_values[val]);
  
@@ -1174302,7 +1174285,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                 * for the requested pin mode.  Enum values of 2 or less are
                 * input modes.
                 *
-@@ -707,7 +732,7 @@ static void setup_preset(struct alc_spec
+@@ -707,7 +732,7 @@
             i++)
                spec->init_verbs[spec->num_init_verbs++] =
                        preset->init_verbs[i];
@@ -1174311,7 +1174294,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        spec->channel_mode = preset->channel_mode;
        spec->num_channel_mode = preset->num_channel_mode;
        spec->need_dac_fix = preset->need_dac_fix;
-@@ -718,7 +743,7 @@ static void setup_preset(struct alc_spec
+@@ -718,7 +743,7 @@
        spec->multiout.dac_nids = preset->dac_nids;
        spec->multiout.dig_out_nid = preset->dig_out_nid;
        spec->multiout.hp_nid = preset->hp_nid;
@@ -1174320,7 +1174303,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        spec->num_mux_defs = preset->num_mux_defs;
        if (!spec->num_mux_defs)
                spec->num_mux_defs = 1;
-@@ -806,6 +831,31 @@ static void alc_sku_automute(struct hda_
+@@ -806,6 +831,31 @@
                            spec->jack_present ? 0 : PIN_OUT);
  }
  
@@ -1174352,19 +1174335,20 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  /* unsolicited event for HP jack sensing */
  static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
  {
-@@ -813,10 +863,17 @@ static void alc_sku_unsol_event(struct h
+@@ -813,10 +863,17 @@
                res >>= 28;
        else
                res >>= 26;
 -      if (res != ALC880_HP_EVENT)
 -              return;
+-
 +      if (res == ALC880_HP_EVENT)
 +              alc_sku_automute(codec);
 +
 +      if (res == ALC880_MIC_EVENT)
 +              alc_mic_automute(codec);
 +}
++
 +static void alc_inithook(struct hda_codec *codec)
 +{
        alc_sku_automute(codec);
@@ -1174372,7 +1174356,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  /* additional initialization for ALC888 variants */
-@@ -855,7 +912,7 @@ static void alc_subsystem_id(struct hda_
+@@ -855,7 +912,7 @@
        if ((ass != codec->bus->pci->subsystem_device) && (ass & 1))
                goto do_sku;
  
@@ -1174381,7 +1174365,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         * 31~30        : port conetcivity
         * 29~21        : reserve
         * 20           : PCBEEP input
-@@ -912,6 +969,7 @@ do_sku:
+@@ -912,6 +969,7 @@
                case 0x10ec0267:
                case 0x10ec0268:
                case 0x10ec0269:
@@ -1174389,7 +1174373,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                case 0x10ec0660:
                case 0x10ec0662:
                case 0x10ec0663:
-@@ -940,13 +998,14 @@ do_sku:
+@@ -940,13 +998,14 @@
                case 0x10ec0882:
                case 0x10ec0883:
                case 0x10ec0885:
@@ -1174405,7 +1174389,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                        snd_hda_codec_write(codec, 0x20, 0,
                                            AC_VERB_SET_PROC_COEF,
                                            tmp | 0x2010);
-@@ -961,7 +1020,7 @@ do_sku:
+@@ -961,7 +1020,7 @@
                        tmp = snd_hda_codec_read(codec, 0x20, 0,
                                                 AC_VERB_GET_PROC_COEF, 0);
                        snd_hda_codec_write(codec, 0x20, 0,
@@ -1174414,7 +1174398,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                        snd_hda_codec_write(codec, 0x20, 0,
                                            AC_VERB_SET_PROC_COEF,
                                            tmp | 0x3000);
-@@ -970,7 +1029,7 @@ do_sku:
+@@ -970,7 +1029,7 @@
        default:
                break;
        }
@@ -1174423,10 +1174407,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* is laptop or Desktop and enable the function "Mute internal speaker
         * when the external headphone out jack is plugged"
         */
-@@ -1002,10 +1061,20 @@ do_sku:
+@@ -1002,10 +1061,20 @@
                else
                        return;
        }
+-
+-      snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
+-                          AC_VERB_SET_UNSOLICITED_ENABLE,
+-                          AC_USRSP_EN | ALC880_HP_EVENT);
 +      if (spec->autocfg.hp_pins[0])
 +              snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
 +                      AC_VERB_SET_UNSOLICITED_ENABLE,
@@ -1174440,14 +1174428,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +                      AC_VERB_SET_UNSOLICITED_ENABLE,
 +                      AC_USRSP_EN | ALC880_MIC_EVENT);
 +#endif /* disabled */
--      snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
--                          AC_VERB_SET_UNSOLICITED_ENABLE,
--                          AC_USRSP_EN | ALC880_HP_EVENT);
++
        spec->unsol_event = alc_sku_unsol_event;
  }
  
-@@ -1296,7 +1365,7 @@ static struct snd_kcontrol_new alc880_si
+@@ -1296,7 +1365,7 @@
   *
   * The system also has a pair of internal speakers, and a headphone jack.
   * These are both connected to Line2 on the codec, hence to DAC 02.
@@ -1174456,7 +1174441,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   * There is a variable resistor to control the speaker or headphone
   * volume. This is a hardware-only device without a software API.
   *
-@@ -1554,6 +1623,7 @@ static const char *alc_slave_vols[] = {
+@@ -1554,6 +1623,7 @@
        "Speaker Playback Volume",
        "Mono Playback Volume",
        "Line-Out Playback Volume",
@@ -1174464,7 +1174449,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        NULL,
  };
  
-@@ -1824,7 +1894,7 @@ static struct hda_verb alc880_pin_6stack
+@@ -1824,7 +1894,7 @@
        {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
@@ -1174473,7 +1174458,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { }
  };
  
-@@ -1869,7 +1939,7 @@ static struct hda_verb alc880_uniwill_in
+@@ -1869,7 +1939,7 @@
  
  /*
  * Uniwill P53
@@ -1174482,7 +1174467,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   */
  static struct hda_verb alc880_uniwill_p53_init_verbs[] = {
        {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -1968,7 +2038,7 @@ static void alc880_uniwill_p53_hp_automu
+@@ -1968,7 +2038,7 @@
  static void alc880_uniwill_p53_dcvol_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1174491,7 +1174476,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x21, 0,
                                     AC_VERB_GET_VOLUME_KNOB_CONTROL, 0);
        present &= HDA_AMP_VOLMASK;
-@@ -2050,7 +2120,7 @@ static struct hda_verb alc880_pin_asus_i
+@@ -2050,7 +2120,7 @@
        {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
@@ -1174500,7 +1174485,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { }
  };
  
-@@ -2667,6 +2737,8 @@ static int alc_build_pcms(struct hda_cod
+@@ -2667,6 +2737,8 @@
                        info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture);
                        info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid;
                }
@@ -1174509,7 +1174494,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        }
  
        /* If the use of more than one ADC is requested for the current
-@@ -2722,6 +2794,64 @@ static void alc_free(struct hda_codec *c
+@@ -2722,6 +2794,64 @@
        codec->spec = NULL; /* to be sure */
  }
  
@@ -1174574,7 +1174559,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  /*
   */
  static struct hda_codec_ops alc_patch_ops = {
-@@ -2730,6 +2860,9 @@ static struct hda_codec_ops alc_patch_op
+@@ -2730,6 +2860,9 @@
        .init = alc_init,
        .free = alc_free,
        .unsol_event = alc_unsol_event,
@@ -1174584,7 +1174569,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        .check_power_status = alc_check_power_status,
  #endif
-@@ -3683,7 +3816,7 @@ static void alc880_auto_init_multi_out(s
+@@ -3683,7 +3816,7 @@
  {
        struct alc_spec *spec = codec->spec;
        int i;
@@ -1174593,7 +1174578,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
        for (i = 0; i < spec->autocfg.line_outs; i++) {
                hda_nid_t nid = spec->autocfg.line_out_pins[i];
-@@ -3776,6 +3909,7 @@ static int alc880_parse_auto_config(stru
+@@ -3776,6 +3909,7 @@
        spec->num_mux_defs = 1;
        spec->input_mux = &spec->private_imux;
  
@@ -1174601,7 +1174586,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -3787,7 +3921,7 @@ static void alc880_auto_init(struct hda_
+@@ -3787,7 +3921,7 @@
        alc880_auto_init_extra_out(codec);
        alc880_auto_init_analog_input(codec);
        if (spec->unsol_event)
@@ -1174610,7 +1174595,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  /*
-@@ -4026,13 +4160,13 @@ static void alc260_hp_master_update(stru
+@@ -4026,13 +4160,13 @@
        struct alc_spec *spec = codec->spec;
        unsigned int val = spec->master_sw ? PIN_HP : 0;
        /* change HP and line-out pins */
@@ -1174627,7 +1174612,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                            val);
  }
  
-@@ -4111,7 +4245,7 @@ static struct snd_kcontrol_new alc260_hp
+@@ -4111,7 +4245,7 @@
                .info = snd_ctl_boolean_mono_info,
                .get = alc260_hp_master_sw_get,
                .put = alc260_hp_master_sw_put,
@@ -1174636,7 +1174621,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        },
        HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT),
-@@ -4124,6 +4258,33 @@ static struct snd_kcontrol_new alc260_hp
+@@ -4124,6 +4258,33 @@
        { } /* end */
  };
  
@@ -1174670,7 +1174655,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  static struct hda_verb alc260_hp_3013_unsol_verbs[] = {
        {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
        {},
-@@ -4137,7 +4298,7 @@ static void alc260_hp_3013_automute(stru
+@@ -4137,7 +4298,7 @@
        present = snd_hda_codec_read(codec, 0x15, 0,
                                     AC_VERB_GET_PIN_SENSE, 0);
        spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0;
@@ -1174679,7 +1174664,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static void alc260_hp_3013_unsol_event(struct hda_codec *codec,
-@@ -4147,7 +4308,30 @@ static void alc260_hp_3013_unsol_event(s
+@@ -4147,7 +4308,30 @@
                alc260_hp_3013_automute(codec);
  }
  
@@ -1174711,7 +1174696,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   * HP jack = 0x14, CD audio =  0x16, internal speaker = 0x10.
   */
  static struct snd_kcontrol_new alc260_fujitsu_mixer[] = {
-@@ -4478,7 +4662,7 @@ static struct hda_verb alc260_fujitsu_in
+@@ -4478,7 +4662,7 @@
        {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
        {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  
@@ -1174720,7 +1174705,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         * when acting as an output.
         */
        {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4503,14 +4687,14 @@ static struct hda_verb alc260_fujitsu_in
+@@ -4503,14 +4687,14 @@
         * stage.
         */
        {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -1174737,7 +1174722,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         * in (on mic1 pin)
         */
        {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
-@@ -4564,7 +4748,7 @@ static struct hda_verb alc260_acer_init_
+@@ -4564,7 +4748,7 @@
        {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
        {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  
@@ -1174746,7 +1174731,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         * bus when acting as outputs.
         */
        {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4675,6 +4859,20 @@ static void alc260_replacer_672v_unsol_e
+@@ -4675,6 +4859,20 @@
                  alc260_replacer_672v_automute(codec);
  }
  
@@ -1174767,7 +1174752,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  /* Test configuration for debugging, modelled after the ALC880 test
   * configuration.
   */
-@@ -4686,7 +4884,7 @@ static hda_nid_t alc260_test_adc_nids[2]
+@@ -4686,7 +4884,7 @@
        0x04, 0x05,
  };
  /* For testing the ALC260, each input MUX needs its own definition since
@@ -1174776,7 +1174761,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
   * is NID 0x04.
   */
  static struct hda_input_mux alc260_test_capture_sources[2] = {
-@@ -4769,7 +4967,7 @@ static struct snd_kcontrol_new alc260_te
+@@ -4769,7 +4967,7 @@
  
        /* Switches to allow the digital IO pins to be enabled.  The datasheet
         * is ambigious as to which NID is which; testing on laptops which
@@ -1174785,7 +1174770,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         */
        ALC_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x03, 0x01),
        ALC_SPDIF_CTRL_SWITCH("SPDIF Capture Switch", 0x06, 0x01),
-@@ -4805,7 +5003,7 @@ static struct hda_verb alc260_test_init_
+@@ -4805,7 +5003,7 @@
        {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
        {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  
@@ -1174794,7 +1174779,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
         * OUT1 sum bus when acting as an output.
         */
        {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
-@@ -4876,7 +5074,7 @@ static struct hda_verb alc260_test_init_
+@@ -4876,7 +5074,7 @@
   */
  
  static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
@@ -1174803,7 +1174788,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  {
        hda_nid_t nid_vol;
        unsigned long vol_val, sw_val;
-@@ -4897,11 +5095,15 @@ static int alc260_add_playback_controls(
+@@ -4897,11 +5095,15 @@
                sw_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
        } else
                return 0; /* N/A */
@@ -1174824,7 +1174809,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        snprintf(name, sizeof(name), "%s Playback Switch", pfx);
        err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val);
        if (err < 0)
-@@ -4915,6 +5117,7 @@ static int alc260_auto_create_multi_out_
+@@ -4915,6 +5117,7 @@
  {
        hda_nid_t nid;
        int err;
@@ -1174832,7 +1174817,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
        spec->multiout.num_dacs = 1;
        spec->multiout.dac_nids = spec->private_dac_nids;
-@@ -4922,21 +5125,22 @@ static int alc260_auto_create_multi_out_
+@@ -4922,21 +5125,22 @@
  
        nid = cfg->line_out_pins[0];
        if (nid) {
@@ -1174858,7 +1174843,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                if (err < 0)
                        return err;
        }
-@@ -5003,7 +5207,7 @@ static void alc260_auto_init_multi_out(s
+@@ -5003,7 +5207,7 @@
                int pin_type = get_pin_type(spec->autocfg.line_out_type);
                alc260_auto_set_output_and_unmute(codec, nid, pin_type, 0);
        }
@@ -1174867,7 +1174852,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        nid = spec->autocfg.speaker_pins[0];
        if (nid)
                alc260_auto_set_output_and_unmute(codec, nid, PIN_OUT, 0);
-@@ -5045,7 +5249,7 @@ static struct hda_verb alc260_volume_ini
+@@ -5045,7 +5249,7 @@
        {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
        {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1174876,7 +1174861,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
         * mixer widget
         * Note: PASD motherboards uses the Line In 2 as the input for
-@@ -5074,7 +5278,7 @@ static struct hda_verb alc260_volume_ini
+@@ -5074,7 +5278,7 @@
        {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
        {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
@@ -1174885,7 +1174870,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { }
  };
  
-@@ -5124,6 +5328,7 @@ static int alc260_parse_auto_config(stru
+@@ -5124,6 +5328,7 @@
        }
        spec->num_mixers++;
  
@@ -1174893,7 +1174878,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -5134,7 +5339,7 @@ static void alc260_auto_init(struct hda_
+@@ -5134,7 +5339,7 @@
        alc260_auto_init_multi_out(codec);
        alc260_auto_init_analog_input(codec);
        if (spec->unsol_event)
@@ -1174902,7 +1174887,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  #ifdef CONFIG_SND_HDA_POWER_SAVE
-@@ -5155,6 +5360,7 @@ static const char *alc260_models[ALC260_
+@@ -5155,6 +5360,7 @@
        [ALC260_BASIC]          = "basic",
        [ALC260_HP]             = "hp",
        [ALC260_HP_3013]        = "hp-3013",
@@ -1174910,7 +1174895,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC260_FUJITSU_S702X]  = "fujitsu",
        [ALC260_ACER]           = "acer",
        [ALC260_WILL]           = "will",
-@@ -5172,7 +5378,7 @@ static struct snd_pci_quirk alc260_cfg_t
+@@ -5172,7 +5378,7 @@
        SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013),
        SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013),
        SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013),
@@ -1174919,10 +1174904,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x103c, 0x3013, "HP", ALC260_HP_3013),
        SND_PCI_QUIRK(0x103c, 0x3014, "HP", ALC260_HP),
        SND_PCI_QUIRK(0x103c, 0x3015, "HP", ALC260_HP),
-@@ -5218,6 +5424,22 @@ static struct alc_config_preset alc260_p
+@@ -5217,6 +5423,22 @@
+               .input_mux = &alc260_capture_source,
                .unsol_event = alc260_hp_unsol_event,
                .init_hook = alc260_hp_automute,
-       },
++      },
 +      [ALC260_HP_DC7600] = {
 +              .mixers = { alc260_hp_dc7600_mixer,
 +                          alc260_input_mixer,
@@ -1174938,11 +1174924,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              .input_mux = &alc260_capture_source,
 +              .unsol_event = alc260_hp_3012_unsol_event,
 +              .init_hook = alc260_hp_3012_automute,
-+      },
+       },
        [ALC260_HP_3013] = {
                .mixers = { alc260_hp_3013_mixer,
-                           alc260_input_mixer,
-@@ -5933,7 +6155,7 @@ static struct hda_verb alc882_targa_verb
+@@ -5933,7 +6155,7 @@
  
        {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1174951,7 +1174936,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
        {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
        {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -5949,7 +6171,7 @@ static struct hda_verb alc882_targa_verb
+@@ -5949,7 +6171,7 @@
  static void alc882_targa_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1174960,7 +1174945,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x14, 0,
                                     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
-@@ -5975,7 +6197,7 @@ static struct hda_verb alc882_asus_a7j_v
+@@ -5975,7 +6197,7 @@
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1174969,7 +1174954,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
        {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
-@@ -5993,7 +6215,7 @@ static struct hda_verb alc882_asus_a7m_v
+@@ -5993,7 +6215,7 @@
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1174978,7 +1174963,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
        {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */
-@@ -6319,7 +6541,7 @@ static struct alc_config_preset alc882_p
+@@ -6319,7 +6541,7 @@
                .channel_mode = alc882_3ST_6ch_modes,
                .need_dac_fix = 1,
                .input_mux = &alc882_capture_source,
@@ -1174987,7 +1174972,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC882_ASUS_A7M] = {
                .mixers = { alc882_asus_a7m_mixer, alc882_chmode_mixer },
                .init_verbs = { alc882_init_verbs, alc882_eapd_verbs,
-@@ -6332,14 +6554,14 @@ static struct alc_config_preset alc882_p
+@@ -6332,14 +6554,14 @@
                .channel_mode = alc880_threestack_modes,
                .need_dac_fix = 1,
                .input_mux = &alc882_capture_source,
@@ -1175004,7 +1174989,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        PINFIX_ABIT_AW9D_MAX
  };
  
-@@ -6527,7 +6749,7 @@ static void alc882_auto_init(struct hda_
+@@ -6527,7 +6749,7 @@
        alc882_auto_init_analog_input(codec);
        alc882_auto_init_input_src(codec);
        if (spec->unsol_event)
@@ -1175013,7 +1174998,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */
-@@ -6554,16 +6776,20 @@ static int patch_alc882(struct hda_codec
+@@ -6554,16 +6776,20 @@
                        board_config = ALC885_MACPRO;
                        break;
                case 0x106b1000: /* iMac 24 */
@@ -1175035,7 +1175020,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                                alc_free(codec);
                                return patch_alc883(codec);
                        }
-@@ -6718,6 +6944,23 @@ static struct hda_input_mux alc883_fujit
+@@ -6718,6 +6944,23 @@
        },
  };
  
@@ -1175059,22 +1175044,26 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  #define alc883_mux_enum_info alc_mux_enum_info
  #define alc883_mux_enum_get alc_mux_enum_get
  /* ALC883 has the ALC882-type input selection */
-@@ -7032,13 +7275,11 @@ static struct snd_kcontrol_new alc883_3S
+@@ -7032,13 +7275,11 @@
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
 -      HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
 -      HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
+-      {
+-              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+-              /* .name = "Capture Source", */
+-              .name = "Input Source",
 -              .count = 2,
++      {
++              .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
++              /* .name = "Capture Source", */
++              .name = "Input Source",
 +              .count = 1,
                .info = alc883_mux_enum_info,
                .get = alc883_mux_enum_get,
                .put = alc883_mux_enum_put,
-@@ -7256,7 +7497,7 @@ static struct snd_kcontrol_new alc883_me
+@@ -7256,7 +7497,7 @@
                .put = alc883_mux_enum_put,
        },
        { } /* end */
@@ -1175083,10 +1175072,17 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
  static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
        HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
-@@ -7283,6 +7524,87 @@ static struct snd_kcontrol_new alc883_ac
-       { } /* end */
- };
+@@ -7276,6 +7517,87 @@
+               /* .name = "Capture Source", */
+               .name = "Input Source",
+               .count = 2,
++              .info = alc883_mux_enum_info,
++              .get = alc883_mux_enum_get,
++              .put = alc883_mux_enum_put,
++      },
++      { } /* end */
++};
++
 +static struct snd_kcontrol_new alc888_lenovo_sky_mixer[] = {
 +      HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
 +      HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -1175161,17 +1175157,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              /* .name = "Capture Source", */
 +              .name = "Input Source",
 +              .count = 1,
-+              .info = alc883_mux_enum_info,
-+              .get = alc883_mux_enum_get,
-+              .put = alc883_mux_enum_put,
-+      },
-+      { } /* end */
-+};
-+
- static struct snd_kcontrol_new alc883_chmode_mixer[] = {
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-@@ -7296,7 +7618,7 @@ static struct snd_kcontrol_new alc883_ch
+               .info = alc883_mux_enum_info,
+               .get = alc883_mux_enum_get,
+               .put = alc883_mux_enum_put,
+@@ -7296,7 +7618,7 @@
  
  static struct hda_verb alc883_init_verbs[] = {
        /* ADC1: mute amp left and right */
@@ -1175180,7 +1175169,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
        /* ADC2: mute amp left and right */
        {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-@@ -7361,14 +7683,14 @@ static struct hda_verb alc883_init_verbs
+@@ -7361,14 +7683,14 @@
        /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
        /* Input mixer2 */
        {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1175201,7 +1175190,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { }
  };
  
-@@ -7468,7 +7790,7 @@ static struct hda_verb alc883_tagra_verb
+@@ -7468,7 +7790,7 @@
  
        {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
@@ -1175210,10 +1175199,13 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
        {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */
        {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
-@@ -7518,6 +7840,18 @@ static struct hda_verb alc883_haier_w66_
-       { } /* end */
- };
+@@ -7515,6 +7837,18 @@
+       {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+       {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+       {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
++      { } /* end */
++};
++
 +static struct hda_verb alc888_lenovo_sky_verbs[] = {
 +      {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
 +      {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
@@ -1175223,13 +1175215,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 +      {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
 +      {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
-+      { } /* end */
-+};
-+
- static struct hda_verb alc888_3st_hp_verbs[] = {
-       {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},  /* Front: output 0 (0x0c) */
-       {0x16, AC_VERB_SET_CONNECT_SEL, 0x01},  /* Rear : output 1 (0x0d) */
-@@ -7555,7 +7889,7 @@ static struct hda_channel_mode alc888_3s
+       { } /* end */
+ };
+@@ -7555,7 +7889,7 @@
  static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1175238,7 +1175227,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x1b, 0,
                                     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
-@@ -7568,7 +7902,7 @@ static void alc888_lenovo_ms7195_front_a
+@@ -7568,7 +7902,7 @@
  static void alc888_lenovo_ms7195_rca_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1175247,7 +1175236,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x14, 0,
                                     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7598,7 +7932,7 @@ static struct hda_verb alc883_medion_md2
+@@ -7598,7 +7932,7 @@
  static void alc883_medion_md2_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1175256,7 +1175245,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x14, 0,
                                     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7753,7 +8087,7 @@ static void alc883_lenovo_101e_unsol_eve
+@@ -7753,7 +8087,7 @@
  static void alc883_acer_aspire_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1175265,7 +1175254,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x14, 0,
                                     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
-@@ -7790,7 +8124,7 @@ static struct hda_verb alc883_acer_eapd_
+@@ -7790,7 +8124,7 @@
  static void alc888_6st_dell_front_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1175274,39 +1175263,17 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        present = snd_hda_codec_read(codec, 0x1b, 0,
                                AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
        snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
-@@ -7814,31 +8148,75 @@ static void alc888_6st_dell_unsol_event(
+@@ -7812,6 +8146,50 @@
+               alc888_6st_dell_front_automute(codec);
+               break;
        }
- }
--/*
-- * generic initialization of ADC, input mixers and output mixers
-- */
--static struct hda_verb alc883_auto_init_verbs[] = {
--      /*
--       * Unmute ADC0-2 and set the default input to mic-in
--       */
--      {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
--      {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
--      {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
--      {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
--
--      /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
--       * mixer widget
--       * Note: PASD motherboards uses the Line In 2 as the input for
--       * front panel mic (mic 2)
--       */
--      /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
--      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
--      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
--      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
--      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
--      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
++}
++
 +static void alc888_lenovo_sky_front_automute(struct hda_codec *codec)
 +{
 +      unsigned int mute;
 +      unsigned int present;
--      /*
++
 +      snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0);
 +      present = snd_hda_codec_read(codec, 0x1b, 0,
 +                                   AC_VERB_GET_PIN_SENSE, 0);
@@ -1175344,40 +1175311,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +{
 +      if ((res >> 26) == ALC880_HP_EVENT)
 +              alc888_lenovo_sky_front_automute(codec);
-+}
-+
-+/*
-+ * generic initialization of ADC, input mixers and output mixers
-+ */
-+static struct hda_verb alc883_auto_init_verbs[] = {
-+      /*
-+       * Unmute ADC0-2 and set the default input to mic-in
-+       */
-+      {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
-+      {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+      {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
-+      {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+
-+      /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
-+       * mixer widget
-+       * Note: PASD motherboards uses the Line In 2 as the input for
-+       * front panel mic (mic 2)
-+       */
-+      /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */
-+      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-+      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
-+      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
-+      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
-+      {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
-+
-+      /*
-        * Set up output mixers (0x0c - 0x0f)
-        */
-       /* set vol=0 to output mixers */
-@@ -7898,6 +8276,105 @@ static struct snd_kcontrol_new alc883_ca
+ }
+ /*
+@@ -7897,6 +8275,105 @@
+       },
        { } /* end */
  };
++
 +static struct hda_verb alc888_asus_m90v_verbs[] = {
 +      {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
 +      {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
@@ -1175476,11 +1175417,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +{
 +      alc883_eee1601_speaker_automute(codec);
 +}
-+
  #ifdef CONFIG_SND_HDA_POWER_SAVE
  #define alc883_loopbacks      alc880_loopbacks
- #endif
-@@ -7927,6 +8404,7 @@ static const char *alc883_models[ALC883_
+@@ -7927,6 +8404,7 @@
        [ALC883_LENOVO_101E_2ch] = "lenovo-101e",
        [ALC883_LENOVO_NB0763]  = "lenovo-nb0763",
        [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig",
@@ -1175488,7 +1175428,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC883_HAIER_W66]      = "haier-w66",
        [ALC888_3ST_HP]         = "3stack-hp",
        [ALC888_6ST_DELL]       = "6stack-dell",
-@@ -7940,20 +8418,24 @@ static const char *alc883_models[ALC883_
+@@ -7940,20 +8418,24 @@
  static struct snd_pci_quirk alc883_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE),
@@ -1175514,7 +1175454,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch),
        SND_PCI_QUIRK(0x1458, 0xa002, "MSI", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1462, 0x0349, "MSI", ALC883_TARGA_2ch_DIG),
-@@ -7984,12 +8466,16 @@ static struct snd_pci_quirk alc883_cfg_t
+@@ -7984,12 +8466,16 @@
        SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD),
        SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
        SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
@@ -1175531,7 +1175471,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
        SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
-@@ -8128,7 +8614,7 @@ static struct alc_config_preset alc883_p
+@@ -8128,7 +8614,7 @@
                .input_mux = &alc883_capture_source,
                .unsol_event = alc883_medion_md2_unsol_event,
                .init_hook = alc883_medion_md2_automute,
@@ -1175540,10 +1175480,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC883_LAPTOP_EAPD] = {
                .mixers = { alc883_base_mixer },
                .init_verbs = { alc883_init_verbs, alc882_eapd_verbs },
-@@ -8245,6 +8731,49 @@ static struct alc_config_preset alc883_p
+@@ -8244,6 +8730,49 @@
+               .input_mux = &alc883_fujitsu_pi2515_capture_source,
                .unsol_event = alc883_2ch_fujitsu_pi2515_unsol_event,
                .init_hook = alc883_2ch_fujitsu_pi2515_automute,
-       },
++      },
 +      [ALC888_LENOVO_SKY] = {
 +              .mixers = { alc888_lenovo_sky_mixer, alc883_chmode_mixer },
 +              .init_verbs = { alc883_init_verbs, alc888_lenovo_sky_verbs},
@@ -1175586,11 +1175527,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              .input_mux = &alc883_asus_eee1601_capture_source,
 +              .unsol_event = alc883_eee1601_unsol_event,
 +              .init_hook = alc883_eee1601_inithook,
-+      },
+       },
  };
  
-@@ -8354,7 +8883,7 @@ static void alc883_auto_init(struct hda_
+@@ -8354,7 +8883,7 @@
        alc883_auto_init_analog_input(codec);
        alc883_auto_init_input_src(codec);
        if (spec->unsol_event)
@@ -1175599,7 +1175539,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static int patch_alc883(struct hda_codec *codec)
-@@ -8398,8 +8927,13 @@ static int patch_alc883(struct hda_codec
+@@ -8398,8 +8927,13 @@
  
        switch (codec->vendor_id) {
        case 0x10ec0888:
@@ -1175615,21 +1175555,21 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                break;
        case 0x10ec0889:
                spec->stream_name_analog = "ALC889 Analog";
-@@ -8452,6 +8986,13 @@ static int patch_alc883(struct hda_codec
+@@ -8451,6 +8985,13 @@
  #define alc262_modes          alc260_modes
  #define alc262_capture_source alc882_capture_source
++
 +static hda_nid_t alc262_dmic_adc_nids[1] = {
 +      /* ADC0 */
 +      0x09
 +};
 +
 +static hda_nid_t alc262_dmic_capsrc_nids[1] = { 0x22 };
-+
  static struct snd_kcontrol_new alc262_base_mixer[] = {
        HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
-       HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
-@@ -8833,10 +9374,10 @@ static struct hda_verb alc262_init_verbs
+@@ -8833,10 +9374,10 @@
        {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
        {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
        {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
@@ -1175642,7 +1175582,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* FIXME: use matrix-type input source selection */
        /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
        /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
-@@ -8858,6 +9399,12 @@ static struct hda_verb alc262_init_verbs
+@@ -8858,6 +9399,12 @@
        { }
  };
  
@@ -1175655,10 +1175595,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  static struct hda_verb alc262_hippo_unsol_verbs[] = {
        {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
-@@ -8884,6 +9431,91 @@ static struct hda_verb alc262_sony_unsol
+@@ -8883,6 +9430,91 @@
+       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
        {}
  };
++
 +static struct hda_input_mux alc262_dmic_capture_source = {
 +      .num_items = 2,
 +      .items = {
@@ -1175743,14 +1175684,15 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      alc262_toshiba_s06_speaker_automute(codec);
 +      alc262_dmic_automute(codec);
 +}
-+
  /* mute/unmute internal speaker according to the hp jack and mute state */
  static void alc262_hippo_automute(struct hda_codec *codec)
- {
-@@ -8948,6 +9580,41 @@ static void alc262_hippo1_unsol_event(st
+@@ -8946,6 +9578,41 @@
+               return;
+       alc262_hippo1_automute(codec);
  }
- /*
++
++/*
 + * nec model
 + *  0x15 = headphone
 + *  0x16 = internal speaker
@@ -1175784,18 +1175726,13 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
 +      {}
 +};
-+
-+/*
+ /*
   * fujitsu model
-  *  0x14 = headphone/spdif-out, 0x15 = internal speaker,
-  *  0x1b = port replicator headphone out
-@@ -9179,9 +9846,28 @@ static struct snd_kcontrol_new alc262_le
+@@ -9179,6 +9846,25 @@
        { } /* end */
  };
  
--/* additional init verbs for Benq laptops */
--static struct hda_verb alc262_EAPD_verbs[] = {
--      {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
 +static struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = {
 +      HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol),
 +      {
@@ -1175815,13 +1175752,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      { } /* end */
 +};
 +
-+/* additional init verbs for Benq laptops */
-+static struct hda_verb alc262_EAPD_verbs[] = {
-+      {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
-       {0x20, AC_VERB_SET_PROC_COEF,  0x3070},
-       {}
- };
-@@ -9427,7 +10113,7 @@ static struct hda_verb alc262_volume_ini
+ /* additional init verbs for Benq laptops */
+ static struct hda_verb alc262_EAPD_verbs[] = {
+       {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
+@@ -9427,7 +10113,7 @@
        {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
        {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
        {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
@@ -1175830,7 +1175764,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* set up input amps for analog loopback */
        /* Amp Indices: DAC = 0, mixer = 1 */
        {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-@@ -9482,7 +10168,7 @@ static struct hda_verb alc262_HP_BPC_ini
+@@ -9482,7 +10168,7 @@
        {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
        {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
          {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)},
@@ -1175839,7 +1175773,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /*
         * Set up output mixers (0x0c - 0x0e)
         */
-@@ -9643,6 +10329,24 @@ static struct hda_verb alc262_HP_BPC_Wil
+@@ -9643,6 +10329,24 @@
        { }
  };
  
@@ -1175864,7 +1175798,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
  #define alc262_loopbacks      alc880_loopbacks
  #endif
-@@ -9693,6 +10397,7 @@ static int alc262_parse_auto_config(stru
+@@ -9693,6 +10397,7 @@
        if (err < 0)
                return err;
  
@@ -1175872,7 +1175806,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -9711,7 +10416,7 @@ static void alc262_auto_init(struct hda_
+@@ -9711,7 +10416,7 @@
        alc262_auto_init_analog_input(codec);
        alc262_auto_init_input_src(codec);
        if (spec->unsol_event)
@@ -1175881,7 +1175815,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  /*
-@@ -9729,13 +10434,17 @@ static const char *alc262_models[ALC262_
+@@ -9729,13 +10434,17 @@
        [ALC262_BENQ_ED8]       = "benq",
        [ALC262_BENQ_T31]       = "benq-t31",
        [ALC262_SONY_ASSAMD]    = "sony-assamd",
@@ -1175899,14 +1175833,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC),
        SND_PCI_QUIRK(0x103c, 0x12ff, "HP xw4550", ALC262_HP_BPC),
        SND_PCI_QUIRK(0x103c, 0x1306, "HP xw8600", ALC262_HP_BPC),
-@@ -9763,12 +10472,16 @@ static struct snd_pci_quirk alc262_cfg_t
+@@ -9763,12 +10472,16 @@
        SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD),
        SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
        SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
--      SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
 +      SND_PCI_QUIRK(0x104d, 0x9033, "Sony VAIO VGN-SR19XN",
-                     ALC262_SONY_ASSAMD),
-+      SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
++                    ALC262_SONY_ASSAMD),
+       SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
+-                    ALC262_SONY_ASSAMD),
 +                    ALC262_TOSHIBA_RX1),
 +      SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
        SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
@@ -1175917,7 +1175851,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000),
        SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8),
        SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31),
-@@ -9918,7 +10631,7 @@ static struct alc_config_preset alc262_p
+@@ -9918,7 +10631,7 @@
                .input_mux = &alc262_capture_source,
                .unsol_event = alc262_hippo_unsol_event,
                .init_hook = alc262_hippo_automute,
@@ -1175926,7 +1175860,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC262_ULTRA] = {
                .mixers = { alc262_ultra_mixer, alc262_ultra_capture_mixer },
                .init_verbs = { alc262_ultra_verbs },
-@@ -9946,6 +10659,53 @@ static struct alc_config_preset alc262_p
+@@ -9946,6 +10659,53 @@
                .input_mux = &alc262_fujitsu_capture_source,
                .unsol_event = alc262_lenovo_3000_unsol_event,
        },
@@ -1175980,7 +1175914,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  };
  
  static int patch_alc262(struct hda_codec *codec)
-@@ -10004,7 +10764,7 @@ static int patch_alc262(struct hda_codec
+@@ -10004,7 +10764,7 @@
        spec->stream_name_analog = "ALC262 Analog";
        spec->stream_analog_playback = &alc262_pcm_analog_playback;
        spec->stream_analog_capture = &alc262_pcm_analog_capture;
@@ -1175989,7 +1175923,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        spec->stream_name_digital = "ALC262 Digital";
        spec->stream_digital_playback = &alc262_pcm_digital_playback;
        spec->stream_digital_capture = &alc262_pcm_digital_capture;
-@@ -10040,7 +10800,7 @@ static int patch_alc262(struct hda_codec
+@@ -10040,7 +10800,7 @@
        if (!spec->loopback.amplist)
                spec->loopback.amplist = alc262_loopbacks;
  #endif
@@ -1175998,7 +1175932,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 0;
  }
  
-@@ -10049,7 +10809,7 @@ static int patch_alc262(struct hda_codec
+@@ -10049,7 +10809,7 @@
   */
  #define ALC268_DIGOUT_NID     ALC880_DIGOUT_NID
  #define alc268_modes          alc260_modes
@@ -1176007,26 +1175941,39 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  static hda_nid_t alc268_dac_nids[2] = {
        /* front, hp */
        0x02, 0x03
-@@ -10109,6 +10869,14 @@ static struct hda_verb alc268_toshiba_ve
+@@ -10107,6 +10867,14 @@
+ static struct hda_verb alc268_toshiba_verbs[] = {
+       {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
        { } /* end */
- };
++};
++
 +static struct hda_input_mux alc268_acer_lc_capture_source = {
 +      .num_items = 2,
 +      .items = {
 +              { "i-Mic", 0x6 },
 +              { "E-Mic", 0x0 },
 +      },
-+};
-+
+ };
  /* Acer specific */
- /* bind volumes of both NID 0x02 and 0x03 */
- static struct hda_bind_ctls alc268_acer_bind_master_vol = {
-@@ -10161,6 +10929,21 @@ static int alc268_acer_master_sw_put(str
+@@ -10161,7 +10929,7 @@
        return change;
  }
  
+-static struct snd_kcontrol_new alc268_acer_mixer[] = {
 +static struct snd_kcontrol_new alc268_acer_aspire_one_mixer[] = {
+       /* output mixer control */
+       HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+       {
+@@ -10172,9 +10940,50 @@
+               .put = alc268_acer_master_sw_put,
+               .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
+       },
++      HDA_CODEC_VOLUME("Mic Boost Capture Volume", 0x18, 0, HDA_INPUT),
++      { }
++};
++
++static struct snd_kcontrol_new alc268_acer_mixer[] = {
 +      /* output mixer control */
 +      HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
 +      {
@@ -1176037,17 +1175984,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              .put = alc268_acer_master_sw_put,
 +              .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
 +      },
-+      HDA_CODEC_VOLUME("Mic Boost Capture Volume", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
 +      { }
 +};
 +
- static struct snd_kcontrol_new alc268_acer_mixer[] = {
-       /* output mixer control */
-       HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
-@@ -10178,6 +10961,32 @@ static struct snd_kcontrol_new alc268_ac
-       { }
- };
 +static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = {
 +      /* output mixer control */
 +      HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
@@ -1176071,13 +1176013,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
 +      {0x23, AC_VERB_SET_CONNECT_SEL, 0x06},
 +      {0x23, AC_VERB_SET_AMP_GAIN_MUTE, 0xa017},
-+      { }
-+};
-+
- static struct hda_verb alc268_acer_verbs[] = {
-       {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* internal dmic? */
-       {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
-@@ -10185,7 +10994,6 @@ static struct hda_verb alc268_acer_verbs
+       { }
+ };
+@@ -10185,7 +10994,6 @@
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
        {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
@@ -1176085,10 +1176024,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
        { }
  };
-@@ -10212,6 +11020,47 @@ static void alc268_acer_init_hook(struct
+@@ -10210,6 +11018,47 @@
+ static void alc268_acer_init_hook(struct hda_codec *codec)
+ {
        alc268_acer_automute(codec, 1);
- }
++}
++
 +/* toggle speaker-output according to the hp-jack state */
 +static void alc268_aspire_one_speaker_automute(struct hda_codec *codec)
 +{
@@ -1176128,12 +1176069,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +{
 +      alc268_aspire_one_speaker_automute(codec);
 +      alc268_acer_mic_automute(codec);
-+}
-+
+ }
  static struct snd_kcontrol_new alc268_dell_mixer[] = {
-       /* output mixer control */
-       HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
-@@ -10360,7 +11209,7 @@ static struct hda_verb alc268_base_init_
+@@ -10360,7 +11209,7 @@
        {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  
        /* Unmute Selector 23h,24h and set the default input to mic-in */
@@ -1176142,23 +1176081,23 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x23, AC_VERB_SET_CONNECT_SEL, 0x00},
        {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x24, AC_VERB_SET_CONNECT_SEL, 0x00},
-@@ -10460,6 +11309,15 @@ static struct hda_input_mux alc268_acer_
-       .num_items = 3,
-       .items = {
-               { "Mic", 0x0 },
+@@ -10457,6 +11306,15 @@
+ };
+ static struct hda_input_mux alc268_acer_capture_source = {
++      .num_items = 3,
++      .items = {
++              { "Mic", 0x0 },
 +              { "Internal Mic", 0x1 },
 +              { "Line", 0x2 },
 +      },
 +};
 +
 +static struct hda_input_mux alc268_acer_dmic_capture_source = {
-+      .num_items = 3,
-+      .items = {
-+              { "Mic", 0x0 },
-               { "Internal Mic", 0x6 },
-               { "Line", 0x2 },
-       },
-@@ -10559,7 +11417,7 @@ static int alc268_auto_create_multi_out_
+       .num_items = 3,
+       .items = {
+               { "Mic", 0x0 },
+@@ -10559,7 +11417,7 @@
  
        nid = cfg->line_out_pins[0];
        if (nid)
@@ -1176167,7 +1176106,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
        nid = cfg->speaker_pins[0];
        if (nid == 0x1d) {
-@@ -10581,7 +11439,7 @@ static int alc268_auto_create_multi_out_
+@@ -10581,7 +11439,7 @@
                if (err < 0)
                        return err;
        }
@@ -1176176,7 +1176115,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  /* create playback/capture controls for input pins */
-@@ -10602,7 +11460,7 @@ static int alc268_auto_create_analog_inp
+@@ -10602,7 +11460,7 @@
                case 0x1a:
                        idx1 = 2;       /* Line In */
                        break;
@@ -1176185,7 +1176124,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                        idx1 = 3;       /* CD */
                        break;
                case 0x12:
-@@ -10614,7 +11472,7 @@ static int alc268_auto_create_analog_inp
+@@ -10614,7 +11472,7 @@
                }
                imux->items[imux->num_items].label = auto_pin_cfg_labels[i];
                imux->items[imux->num_items].index = idx1;
@@ -1176194,7 +1176133,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        }
        return 0;
  }
-@@ -10644,11 +11502,11 @@ static void alc268_auto_init_mono_speake
+@@ -10644,11 +11502,11 @@
        }
  
        dac_vol1 = dac_vol2 = 0xb000 | 0x40;    /* set max volume  */
@@ -1176208,7 +1176147,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                dac_vol2 = AMP_OUT_ZERO;
        else if (hp_nid == 0x15)
                dac_vol1 = AMP_OUT_ZERO;
-@@ -10712,6 +11570,7 @@ static int alc268_parse_auto_config(stru
+@@ -10712,6 +11570,7 @@
        if (err < 0)
                return err;
  
@@ -1176216,7 +1176155,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -10728,7 +11587,7 @@ static void alc268_auto_init(struct hda_
+@@ -10728,7 +11587,7 @@
        alc268_auto_init_mono_speaker_out(codec);
        alc268_auto_init_analog_input(codec);
        if (spec->unsol_event)
@@ -1176225,7 +1176164,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  /*
-@@ -10739,6 +11598,8 @@ static const char *alc268_models[ALC268_
+@@ -10739,6 +11598,8 @@
        [ALC268_3ST]            = "3stack",
        [ALC268_TOSHIBA]        = "toshiba",
        [ALC268_ACER]           = "acer",
@@ -1176234,7 +1176173,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC268_DELL]           = "dell",
        [ALC268_ZEPTO]          = "zepto",
  #ifdef CONFIG_SND_DEBUG
-@@ -10753,11 +11614,14 @@ static struct snd_pci_quirk alc268_cfg_t
+@@ -10753,11 +11614,14 @@
        SND_PCI_QUIRK(0x1025, 0x012e, "Acer Aspire 5310", ALC268_ACER),
        SND_PCI_QUIRK(0x1025, 0x0130, "Acer Extensa 5210", ALC268_ACER),
        SND_PCI_QUIRK(0x1025, 0x0136, "Acer Aspire 5315", ALC268_ACER),
@@ -1176249,7 +1176188,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA),
        SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER),
        SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1),
-@@ -10830,6 +11694,40 @@ static struct alc_config_preset alc268_p
+@@ -10830,6 +11694,40 @@
                .unsol_event = alc268_acer_unsol_event,
                .init_hook = alc268_acer_init_hook,
        },
@@ -1176290,7 +1176229,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC268_DELL] = {
                .mixers = { alc268_dell_mixer, alc268_beep_mixer },
                .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
-@@ -10974,7 +11872,7 @@ static int patch_alc268(struct hda_codec
+@@ -10974,7 +11872,7 @@
        codec->patch_ops = alc_patch_ops;
        if (board_config == ALC268_AUTO)
                spec->init_hook = alc268_auto_init;
@@ -1176299,7 +1176238,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 0;
  }
  
-@@ -10990,6 +11888,14 @@ static hda_nid_t alc269_adc_nids[1] = {
+@@ -10990,6 +11888,14 @@
        0x08,
  };
  
@@ -1176314,7 +1176253,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  static struct hda_input_mux alc269_eeepc_dmic_capture_source = {
        .num_items = 2,
        .items = {
-@@ -11016,6 +11922,8 @@ static struct snd_kcontrol_new alc269_ba
+@@ -11016,6 +11922,8 @@
        HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
@@ -1176323,10 +1176262,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
-@@ -11025,6 +11933,28 @@ static struct snd_kcontrol_new alc269_ba
+@@ -11023,6 +11931,28 @@
+       HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT),
        { } /* end */
- };
++};
++
 +static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = {
 +      /* output mixer control */
 +      HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
@@ -1176347,19 +1176288,16 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x04, HDA_INPUT),
 +      HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x04, HDA_INPUT),
 +      { }
-+};
-+
+ };
  /* bind volumes of both NID 0x0c and 0x0d */
- static struct hda_bind_ctls alc269_epc_bind_vol = {
-       .ops = &snd_hda_bind_vol,
-@@ -11065,78 +11995,84 @@ static struct snd_kcontrol_new alc269_ca
+@@ -11065,78 +11995,84 @@
  static struct snd_kcontrol_new alc269_epc_capture_mixer[] = {
        HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-+      HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
-       { } /* end */
- };
+-      { } /* end */
+-};
+-
 -/*
 - * generic initialization of ADC, input mixers and output mixers
 - */
@@ -1176387,14 +1176325,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 -      /* set vol=0 to output mixers */
 -      {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
 -      {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
-+/* FSC amilo */
-+static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
-+      HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
-+      HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
-+      HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
-+      { } /* end */
-+};
+-
 -      /* set up input amps for analog loopback */
 -      /* Amp Indices: DAC = 0, mixer = 1 */
 -      {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1176403,44 +1176334,74 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 -      {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
 -      {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
 -      {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
+-
+-      {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+-      {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+-      {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+-      {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+-      {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+-      {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+-      {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+-
+-      {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+-      {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+-      {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-      {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-      {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-      {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-      {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+-
+-      {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
+-      {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+-
+-      /* FIXME: use matrix-type input source selection */
+-      /* Mixer elements: 0x18, 19, 1a, 1b, 1d, 0b */
+-      /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
+-      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+-      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
+-      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
+-      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
+-
+-      /* set EAPD */
+-      {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
+-      {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
+-      { }
+-};
++      HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
++      { } /* end */
++};
++
++/* FSC amilo */
++static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
++      HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
++      HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
++      HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
++      { } /* end */
++};
++
 +/* beep control */
 +static struct snd_kcontrol_new alc269_beep_mixer[] = {
 +      HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT),
 +      HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT),
 +      { } /* end */
 +};
--      {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
++
 +static struct hda_verb alc269_quanta_fl1_verbs[] = {
 +      {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
 +      {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
-       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
--      {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
--      {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
--      {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
--      {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
--      {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
++      {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
 +      {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
 +      {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
 +      {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
 +      { }
 +};
--      {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
--      {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
--      {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
--      {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
--      {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
--      {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
--      {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
++
 +/* toggle speaker-output according to the hp-jack state */
 +static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec)
 +{
 +      unsigned int present;
 +      unsigned char bits;
--      {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
--      {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
++
 +      present = snd_hda_codec_read(codec, 0x15, 0,
 +                      AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
 +      bits = present ? AMP_IN_MUTE(0) : 0;
@@ -1176448,24 +1176409,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +                      AMP_IN_MUTE(0), bits);
 +      snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
 +                      AMP_IN_MUTE(0), bits);
--      /* FIXME: use matrix-type input source selection */
--      /* Mixer elements: 0x18, 19, 1a, 1b, 1d, 0b */
--      /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */
--      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
--      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
--      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
--      {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
++
 +      snd_hda_codec_write(codec, 0x20, 0,
 +                      AC_VERB_SET_COEF_INDEX, 0x0c);
 +      snd_hda_codec_write(codec, 0x20, 0,
 +                      AC_VERB_SET_PROC_COEF, 0x680);
--      /* set EAPD */
--      {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
--      {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
--      { }
--};
++
 +      snd_hda_codec_write(codec, 0x20, 0,
 +                      AC_VERB_SET_COEF_INDEX, 0x0c);
 +      snd_hda_codec_write(codec, 0x20, 0,
@@ -1176499,7 +1176448,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
  static struct hda_verb alc269_eeepc_dmic_init_verbs[] = {
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
-@@ -11163,42 +12099,42 @@ static struct hda_verb alc269_eeepc_amic
+@@ -11163,42 +12099,42 @@
  static void alc269_speaker_automute(struct hda_codec *codec)
  {
        unsigned int present;
@@ -1176555,7 +1176504,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  {
        if ((res >> 26) == ALC880_HP_EVENT)
                alc269_speaker_automute(codec);
-@@ -11215,7 +12151,7 @@ static void alc269_eeepc_dmic_inithook(s
+@@ -11215,7 +12151,7 @@
  
  /* unsolicited event for HP jack sensing */
  static void alc269_eeepc_amic_unsol_event(struct hda_codec *codec,
@@ -1176564,10 +1176513,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  {
        if ((res >> 26) == ALC880_HP_EVENT)
                alc269_speaker_automute(codec);
-@@ -11230,6 +12166,76 @@ static void alc269_eeepc_amic_inithook(s
+@@ -11229,6 +12165,76 @@
+       alc269_speaker_automute(codec);
        alc269_eeepc_amic_automute(codec);
  }
++
 +/*
 + * generic initialization of ADC, input mixers and output mixers
 + */
@@ -1176637,11 +1176587,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
 +      { }
 +};
-+
  /* add playback controls from the parsed DAC table */
  static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec,
-                                            const struct auto_pin_cfg *cfg)
-@@ -11311,8 +12317,26 @@ static int alc269_auto_create_multi_out_
+@@ -11311,8 +12317,26 @@
        return 0;
  }
  
@@ -1176670,7 +1176619,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
  #ifdef CONFIG_SND_HDA_POWER_SAVE
  #define alc269_loopbacks      alc880_loopbacks
-@@ -11330,7 +12354,7 @@ static int alc269_auto_create_multi_out_
+@@ -11330,7 +12354,7 @@
  static int alc269_parse_auto_config(struct hda_codec *codec)
  {
        struct alc_spec *spec = codec->spec;
@@ -1176679,17 +1176628,18 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        static hda_nid_t alc269_ignore[] = { 0x1d, 0 };
  
        err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
-@@ -11353,9 +12377,20 @@ static int alc269_parse_auto_config(stru
+@@ -11352,10 +12376,21 @@
        if (spec->kctl_alloc)
                spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
++
 +      /* create a beep mixer control if the pin 0x1d isn't assigned */
 +      for (i = 0; i < ARRAY_SIZE(spec->autocfg.input_pins); i++)
 +              if (spec->autocfg.input_pins[i] == 0x1d)
 +                      break;
 +      if (i >= ARRAY_SIZE(spec->autocfg.input_pins))
 +              spec->mixers[spec->num_mixers++] = alc269_beep_mixer;
-+
        spec->init_verbs[spec->num_init_verbs++] = alc269_init_verbs;
        spec->num_mux_defs = 1;
        spec->input_mux = &spec->private_imux;
@@ -1176700,7 +1176650,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
        err = alc_auto_add_mic_boost(codec);
        if (err < 0)
-@@ -11364,6 +12399,7 @@ static int alc269_parse_auto_config(stru
+@@ -11364,6 +12399,7 @@
        spec->mixers[spec->num_mixers] = alc269_capture_mixer;
        spec->num_mixers++;
  
@@ -1176708,7 +1176658,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -11380,21 +12416,29 @@ static void alc269_auto_init(struct hda_
+@@ -11380,21 +12416,29 @@
        alc269_auto_init_hp_out(codec);
        alc269_auto_init_analog_input(codec);
        if (spec->unsol_event)
@@ -1176740,7 +1176690,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {}
  };
  
-@@ -11409,6 +12453,18 @@ static struct alc_config_preset alc269_p
+@@ -11409,6 +12453,18 @@
                .channel_mode = alc269_modes,
                .input_mux = &alc269_capture_source,
        },
@@ -1176759,7 +1176709,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        [ALC269_ASUS_EEEPC_P703] = {
                .mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer },
                .init_verbs = { alc269_init_verbs,
-@@ -11435,6 +12491,20 @@ static struct alc_config_preset alc269_p
+@@ -11435,6 +12491,20 @@
                .unsol_event = alc269_eeepc_dmic_unsol_event,
                .init_hook = alc269_eeepc_dmic_inithook,
        },
@@ -1176780,7 +1176730,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  };
  
  static int patch_alc269(struct hda_codec *codec)
-@@ -11488,6 +12558,7 @@ static int patch_alc269(struct hda_codec
+@@ -11488,6 +12558,7 @@
  
        spec->adc_nids = alc269_adc_nids;
        spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids);
@@ -1176788,7 +1176738,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  
        codec->patch_ops = alc_patch_ops;
        if (board_config == ALC269_AUTO)
-@@ -11689,7 +12760,7 @@ static struct snd_kcontrol_new alc861_to
+@@ -11689,7 +12760,7 @@
        HDA_CODEC_MUTE("Master Playback Switch", 0x03, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT),
@@ -1176797,7 +1176747,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
          /*Capture mixer control */
        HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-@@ -11832,20 +12903,20 @@ static struct hda_verb alc861_base_init_
+@@ -11832,20 +12903,20 @@
        /* route front mic to ADC1*/
        {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
        {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1176821,7 +1176771,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute Stereo Mixer 15 */
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -11901,13 +12972,13 @@ static struct hda_verb alc861_threestack
+@@ -11901,13 +12972,13 @@
        {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -1176837,7 +1176787,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute Stereo Mixer 15 */
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -11963,13 +13034,13 @@ static struct hda_verb alc861_uniwill_m3
+@@ -11963,13 +13034,13 @@
        {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -1176853,7 +1176803,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute Stereo Mixer 15 */
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12034,7 +13105,7 @@ static struct hda_verb alc861_asus_init_
+@@ -12034,7 +13105,7 @@
          {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
        {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
          {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
@@ -1176862,7 +1176812,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute Stereo Mixer 15 */
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12071,20 +13142,20 @@ static struct hda_verb alc861_auto_init_
+@@ -12071,20 +13142,20 @@
         */
        /* {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, */
        {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1176886,7 +1176836,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        /* Unmute Stereo Mixer 15 */
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
-@@ -12431,6 +13502,7 @@ static int alc861_parse_auto_config(stru
+@@ -12431,6 +13502,7 @@
        spec->mixers[spec->num_mixers] = alc861_capture_mixer;
        spec->num_mixers++;
  
@@ -1176894,7 +1176844,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -12442,7 +13514,7 @@ static void alc861_auto_init(struct hda_
+@@ -12442,7 +13514,7 @@
        alc861_auto_init_hp_out(codec);
        alc861_auto_init_analog_input(codec);
        if (spec->unsol_event)
@@ -1176903,7 +1176853,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  #ifdef CONFIG_SND_HDA_POWER_SAVE
-@@ -12659,7 +13731,7 @@ static int patch_alc861(struct hda_codec
+@@ -12659,7 +13731,7 @@
        if (!spec->loopback.amplist)
                spec->loopback.amplist = alc861_loopbacks;
  #endif
@@ -1176912,7 +1176862,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 0;
  }
  
-@@ -12913,7 +13985,7 @@ static struct snd_kcontrol_new alc861vd_
+@@ -12913,7 +13985,7 @@
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
@@ -1176921,7 +1176871,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { } /* end */
  };
  
-@@ -13058,7 +14130,7 @@ static struct hda_verb alc861vd_lenovo_u
+@@ -13058,7 +14130,7 @@
        {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
        {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
        {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
@@ -1176930,7 +1176880,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {}
  };
  
-@@ -13120,7 +14192,7 @@ static struct hda_verb alc861vd_dallas_v
+@@ -13120,7 +14192,7 @@
        {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
        {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
        {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
@@ -1176939,7 +1176889,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
-@@ -13145,7 +14217,7 @@ static struct hda_verb alc861vd_dallas_v
+@@ -13145,7 +14217,7 @@
        {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
  
        {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
@@ -1176948,7 +1176898,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
  
        { } /* end */
-@@ -13304,7 +14376,7 @@ static struct alc_config_preset alc861vd
+@@ -13304,7 +14376,7 @@
                .input_mux = &alc861vd_hp_capture_source,
                .unsol_event = alc861vd_dallas_unsol_event,
                .init_hook = alc861vd_dallas_automute,
@@ -1176957,7 +1176907,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  };
  
  /*
-@@ -13542,6 +14614,7 @@ static int alc861vd_parse_auto_config(st
+@@ -13542,6 +14614,7 @@
        if (err < 0)
                return err;
  
@@ -1176965,7 +1176915,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -13554,7 +14627,7 @@ static void alc861vd_auto_init(struct hd
+@@ -13554,7 +14627,7 @@
        alc861vd_auto_init_analog_input(codec);
        alc861vd_auto_init_input_src(codec);
        if (spec->unsol_event)
@@ -1176974,7 +1176924,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static int patch_alc861vd(struct hda_codec *codec)
-@@ -13883,13 +14956,120 @@ static struct snd_kcontrol_new alc662_ee
+@@ -13883,13 +14956,120 @@
        { } /* end */
  };
  
@@ -1177096,7 +1177046,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { } /* end */
  };
  
-@@ -14074,17 +15254,84 @@ static struct hda_verb alc663_auto_init_
+@@ -14074,14 +15254,81 @@
  };
  
  static struct hda_verb alc663_m51va_init_verbs[] = {
@@ -1177113,9 +1177063,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
        {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
        {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
-       {}
- };
++      {}
++};
++
 +static struct hda_verb alc663_21jd_amic_init_verbs[] = {
 +      {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
 +      {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
@@ -1177179,13 +1177129,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
 +      {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
 +      {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
-+      {}
-+};
-+
- static struct hda_verb alc663_g71v_init_verbs[] = {
-       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
-       /* {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, */
-@@ -14110,6 +15357,14 @@ static struct hda_verb alc663_g50v_init_
+       {}
+ };
+@@ -14110,6 +15357,14 @@
        {}
  };
  
@@ -1177200,20 +1177147,20 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  /* capture mixer elements */
  static struct snd_kcontrol_new alc662_capture_mixer[] = {
        HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-@@ -14129,6 +15384,12 @@ static struct snd_kcontrol_new alc662_ca
-       { } /* end */
- };
-+static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
-+      HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-+      HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
+@@ -14126,6 +15381,12 @@
+               .get = alc662_mux_enum_get,
+               .put = alc662_mux_enum_put,
+       },
 +      { } /* end */
 +};
 +
- static void alc662_lenovo_101e_ispeaker_automute(struct hda_codec *codec)
- {
-       unsigned int present;
-@@ -14209,12 +15470,12 @@ static void alc662_eeepc_ep20_automute(s
++static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
++      HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
++      HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
+       { } /* end */
+ };
+@@ -14209,12 +15470,12 @@
        if (present) {
                /* mute internal speaker */
                snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
@@ -1177228,17 +1177175,18 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        }
  }
  
-@@ -14237,11 +15498,108 @@ static void alc663_m51va_speaker_automut
+@@ -14237,11 +15498,108 @@
        unsigned char bits;
  
        present = snd_hda_codec_read(codec, 0x21, 0,
 -                                   AC_VERB_GET_PIN_SENSE, 0)
 -              & AC_PINSENSE_PRESENCE;
-+                      AC_VERB_GET_PIN_SENSE, 0)
-+                      & AC_PINSENSE_PRESENCE;
-       bits = present ? HDA_AMP_MUTE : 0;
+-      bits = present ? HDA_AMP_MUTE : 0;
 -      snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
 -                               HDA_AMP_MUTE, bits);
++                      AC_VERB_GET_PIN_SENSE, 0)
++                      & AC_PINSENSE_PRESENCE;
++      bits = present ? HDA_AMP_MUTE : 0;
 +      snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
 +                              AMP_IN_MUTE(0), bits);
 +      snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
@@ -1177341,7 +1177289,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static void alc663_m51va_mic_automute(struct hda_codec *codec)
-@@ -14249,16 +15607,16 @@ static void alc663_m51va_mic_automute(st
+@@ -14249,16 +15607,16 @@
        unsigned int present;
  
        present = snd_hda_codec_read(codec, 0x18, 0,
@@ -1177364,10 +1177312,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static void alc663_m51va_unsol_event(struct hda_codec *codec,
-@@ -14280,6 +15638,121 @@ static void alc663_m51va_inithook(struct
+@@ -14278,6 +15636,121 @@
+ {
+       alc663_m51va_speaker_automute(codec);
        alc663_m51va_mic_automute(codec);
- }
++}
++
 +/* ***************** Mode1 ******************************/
 +static void alc663_mode1_unsol_event(struct hda_codec *codec,
 +                                         unsigned int res)
@@ -1177481,15 +1177431,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +{
 +      alc663_two_hp_m2_speaker_automute(codec);
 +      alc662_eeepc_mic_automute(codec);
-+}
-+
+ }
  static void alc663_g71v_hp_automute(struct hda_codec *codec)
- {
-       unsigned int present;
-@@ -14350,6 +15823,46 @@ static void alc663_g50v_inithook(struct 
+@@ -14349,6 +15822,46 @@
+       alc663_m51va_speaker_automute(codec);
        alc662_eeepc_mic_automute(codec);
  }
++
 +/* bind hp and internal speaker mute (with plug check) */
 +static int alc662_ecs_master_sw_put(struct snd_kcontrol *kcontrol,
 +                                   struct snd_ctl_elem_value *ucontrol)
@@ -1177529,11 +1177478,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +      HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
 +      { } /* end */
 +};
-+
  #ifdef CONFIG_SND_HDA_POWER_SAVE
  #define alc662_loopbacks      alc880_loopbacks
- #endif
-@@ -14372,21 +15885,68 @@ static const char *alc662_models[ALC662_
+@@ -14372,21 +15885,68 @@
        [ALC662_LENOVO_101E]    = "lenovo-101e",
        [ALC662_ASUS_EEEPC_P701] = "eeepc-p701",
        [ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20",
@@ -1177604,10 +1177552,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        SND_PCI_QUIRK(0x1854, 0x2000, "ASUS H13-2000", ALC663_ASUS_H13),
        SND_PCI_QUIRK(0x1854, 0x2001, "ASUS H13-2001", ALC663_ASUS_H13),
        SND_PCI_QUIRK(0x1854, 0x2002, "ASUS H13-2002", ALC663_ASUS_H13),
-@@ -14477,6 +16037,18 @@ static struct alc_config_preset alc662_p
+@@ -14476,6 +16036,18 @@
+               .input_mux = &alc662_lenovo_101e_capture_source,
                .unsol_event = alc662_eeepc_ep20_unsol_event,
                .init_hook = alc662_eeepc_ep20_inithook,
-       },
++      },
 +      [ALC662_ECS] = {
 +              .mixers = { alc662_ecs_mixer, alc662_capture_mixer },
 +              .init_verbs = { alc662_init_verbs,
@@ -1177619,14 +1177568,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              .input_mux = &alc662_eeepc_capture_source,
 +              .unsol_event = alc662_eeepc_unsol_event,
 +              .init_hook = alc662_eeepc_inithook,
-+      },
+       },
        [ALC663_ASUS_M51VA] = {
                .mixers = { alc663_m51va_mixer, alc662_capture_mixer},
-               .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
-@@ -14524,6 +16096,91 @@ static struct alc_config_preset alc662_p
+@@ -14523,6 +16095,91 @@
+               .input_mux = &alc663_capture_source,
                .unsol_event = alc663_g50v_unsol_event,
                .init_hook = alc663_g50v_inithook,
-       },
++      },
 +      [ALC663_ASUS_MODE1] = {
 +              .mixers = { alc663_m51va_mixer, alc662_auto_capture_mixer },
 +              .init_verbs = { alc662_init_verbs,
@@ -1177711,11 +1177660,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
 +              .input_mux = &alc662_eeepc_capture_source,
 +              .unsol_event = alc663_mode6_unsol_event,
 +              .init_hook = alc663_mode6_inithook,
-+      },
+       },
  };
  
-@@ -14560,15 +16217,15 @@ static int alc662_auto_create_multi_out_
+@@ -14560,15 +16217,15 @@
                                                              HDA_OUTPUT));
                        if (err < 0)
                                return err;
@@ -1177735,7 +1177683,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                                                              HDA_INPUT));
                        if (err < 0)
                                return err;
-@@ -14580,9 +16237,9 @@ static int alc662_auto_create_multi_out_
+@@ -14580,9 +16237,9 @@
                        if (err < 0)
                                return err;
                        sprintf(name, "%s Playback Switch", chname[i]);
@@ -1177748,7 +1177696,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
                        if (err < 0)
                                return err;
                }
-@@ -14777,7 +16434,7 @@ static int alc662_parse_auto_config(stru
+@@ -14777,7 +16434,7 @@
  
        spec->num_mux_defs = 1;
        spec->input_mux = &spec->private_imux;
@@ -1177757,7 +1177705,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
        if (codec->vendor_id == 0x10ec0663)
                spec->init_verbs[spec->num_init_verbs++] =
-@@ -14789,6 +16446,8 @@ static int alc662_parse_auto_config(stru
+@@ -14789,6 +16446,8 @@
  
        spec->mixers[spec->num_mixers] = alc662_capture_mixer;
        spec->num_mixers++;
@@ -1177766,7 +1177714,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        return 1;
  }
  
-@@ -14801,7 +16460,7 @@ static void alc662_auto_init(struct hda_
+@@ -14801,7 +16460,7 @@
        alc662_auto_init_analog_input(codec);
        alc662_auto_init_input_src(codec);
        if (spec->unsol_event)
@@ -1177775,7 +1177723,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
  }
  
  static int patch_alc662(struct hda_codec *codec)
-@@ -14846,6 +16505,9 @@ static int patch_alc662(struct hda_codec
+@@ -14846,6 +16505,9 @@
        if (codec->vendor_id == 0x10ec0663) {
                spec->stream_name_analog = "ALC663 Analog";
                spec->stream_name_digital = "ALC663 Digital";
@@ -1177785,7 +1177733,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        } else {
                spec->stream_name_analog = "ALC662 Analog";
                spec->stream_name_digital = "ALC662 Digital";
-@@ -14883,6 +16545,7 @@ struct hda_codec_preset snd_hda_preset_r
+@@ -14883,6 +16545,7 @@
        { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 },
        { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 },
        { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 },
@@ -1177793,7 +1177741,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
          .patch = patch_alc861 },
        { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
-@@ -14896,10 +16559,15 @@ struct hda_codec_preset snd_hda_preset_r
+@@ -14896,10 +16559,15 @@
        { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
        { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 },
        { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 },
@@ -1177809,9 +1177757,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_realtek.c linux-2.6.27.19-5.1/sound/
        { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 },
        {} /* terminator */
  };
-diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound/pci/hda/patch_sigmatel.c
---- linux-2.6.27/sound/pci/hda/patch_sigmatel.c        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_sigmatel.c 2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_sigmatel.c
+--- a/sound/pci/hda/patch_sigmatel.c   Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_sigmatel.c   Wed May 06 16:57:08 2009 +0100
 @@ -33,8 +33,12 @@
  #include "hda_codec.h"
  #include "hda_local.h"
@@ -1177825,7 +1177773,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  #define STAC_PWR_EVENT                0x20
  #define STAC_HP_EVENT         0x30
  
-@@ -51,7 +55,8 @@ enum {
+@@ -51,7 +55,8 @@
        STAC_9200_DELL_M25,
        STAC_9200_DELL_M26,
        STAC_9200_DELL_M27,
@@ -1177835,7 +1177783,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        STAC_9200_PANASONIC,
        STAC_9200_MODELS
  };
-@@ -61,27 +66,44 @@ enum {
+@@ -61,27 +66,44 @@
        STAC_9205_DELL_M42,
        STAC_9205_DELL_M43,
        STAC_9205_DELL_M44,
@@ -1177852,14 +1177800,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      STAC_DELL_M6_BOTH,
 +      STAC_DELL_EQ,
        STAC_92HD73XX_MODELS
- };
- enum {
-+      STAC_92HD83XXX_REF,
-+      STAC_92HD83XXX_MODELS
 +};
 +
 +enum {
++      STAC_92HD83XXX_REF,
++      STAC_92HD83XXX_MODELS
+ };
+ enum {
        STAC_92HD71BXX_REF,
        STAC_DELL_M4_1,
        STAC_DELL_M4_2,
@@ -1177883,7 +1177831,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        STAC_925x_MODELS
  };
  
-@@ -104,6 +126,7 @@ enum {
+@@ -104,6 +126,7 @@
        STAC_MACBOOK_PRO_V2,
        STAC_IMAC_INTEL,
        STAC_IMAC_INTEL_20,
@@ -1177891,7 +1177839,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        STAC_922X_DELL_D81,
        STAC_922X_DELL_D82,
        STAC_922X_DELL_M81,
-@@ -112,6 +135,7 @@ enum {
+@@ -112,6 +135,7 @@
  };
  
  enum {
@@ -1177899,7 +1177847,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        STAC_D965_REF,
        STAC_D965_3ST,
        STAC_D965_5ST,
-@@ -125,11 +149,14 @@ struct sigmatel_spec {
+@@ -125,11 +149,14 @@
        unsigned int num_mixers;
  
        int board_config;
@@ -1177914,7 +1177862,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        /* gpio lines */
        unsigned int eapd_mask;
-@@ -138,21 +165,28 @@ struct sigmatel_spec {
+@@ -138,20 +165,27 @@
        unsigned int gpio_data;
        unsigned int gpio_mute;
  
@@ -1177937,13 +1177885,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        unsigned int cur_mmux;
        struct hda_multi_out multiout;
        hda_nid_t dac_nids[5];
-+      int volume_offset;
 +
++      int volume_offset;
        /* capture */
        hda_nid_t *adc_nids;
-       unsigned int num_adcs;
-@@ -162,8 +196,14 @@ struct sigmatel_spec {
+@@ -162,8 +196,14 @@
        unsigned int num_dmics;
        hda_nid_t *dmux_nids;
        unsigned int num_dmuxes;
@@ -1177958,7 +1177905,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        /* pin widgets */
        hda_nid_t *pin_nids;
-@@ -180,11 +220,17 @@ struct sigmatel_spec {
+@@ -180,11 +220,17 @@
        unsigned int cur_dmux[2];
        struct hda_input_mux *input_mux;
        unsigned int cur_mux[3];
@@ -1177977,7 +1177924,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        unsigned int aloopback;
  
        struct hda_pcm pcm_rec[2];      /* PCM information */
-@@ -195,6 +241,8 @@ struct sigmatel_spec {
+@@ -195,6 +241,8 @@
        struct snd_kcontrol_new *kctl_alloc;
        struct hda_input_mux private_dimux;
        struct hda_input_mux private_imux;
@@ -1177986,7 +1177933,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        struct hda_input_mux private_mono_mux;
  };
  
-@@ -215,10 +263,19 @@ static hda_nid_t stac92hd73xx_pwr_nids[8
+@@ -215,8 +263,17 @@
        0x0f, 0x10, 0x11
  };
  
@@ -1177996,17 +1177943,15 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +
  static hda_nid_t stac92hd73xx_adc_nids[2] = {
        0x1a, 0x1b
- };
++};
++
 +#define DELL_M6_AMP 2
 +static hda_nid_t stac92hd73xx_amp_nids[3] = {
 +      0x0b, 0x0c, 0x0e
-+};
-+
+ };
  #define STAC92HD73XX_NUM_DMICS        2
- static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = {
-       0x13, 0x14, 0
-@@ -237,6 +294,41 @@ static hda_nid_t stac92hd73xx_dmux_nids[
+@@ -237,6 +294,41 @@
        0x20, 0x21,
  };
  
@@ -1178048,7 +1177993,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static hda_nid_t stac92hd71bxx_pwr_nids[3] = {
        0x0a, 0x0d, 0x0f
  };
-@@ -249,8 +341,12 @@ static hda_nid_t stac92hd71bxx_mux_nids[
+@@ -249,8 +341,12 @@
        0x1a, 0x1b
  };
  
@@ -1178063,7 +1178008,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  };
  
  static hda_nid_t stac92hd71bxx_dac_nids[1] = {
-@@ -262,6 +358,10 @@ static hda_nid_t stac92hd71bxx_dmic_nids
+@@ -262,6 +358,10 @@
        0x18, 0x19, 0
  };
  
@@ -1178074,7 +1178019,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static hda_nid_t stac925x_adc_nids[1] = {
          0x03,
  };
-@@ -299,6 +399,10 @@ static hda_nid_t stac927x_mux_nids[3] = 
+@@ -299,6 +399,10 @@
          0x15, 0x16, 0x17
  };
  
@@ -1178085,7 +1178030,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static hda_nid_t stac927x_dac_nids[6] = {
        0x02, 0x03, 0x04, 0x05, 0x06, 0
  };
-@@ -312,6 +416,11 @@ static hda_nid_t stac927x_dmic_nids[STAC
+@@ -312,6 +416,11 @@
        0x13, 0x14, 0
  };
  
@@ -1178097,26 +1178042,28 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static hda_nid_t stac9205_adc_nids[2] = {
          0x12, 0x13
  };
-@@ -324,6 +433,10 @@ static hda_nid_t stac9205_dmux_nids[1] =
-       0x1d,
- };
+@@ -322,6 +431,10 @@
  
-+static hda_nid_t stac9205_smux_nids[1] = {
-+      0x21,
+ static hda_nid_t stac9205_dmux_nids[1] = {
+       0x1d,
 +};
 +
++static hda_nid_t stac9205_smux_nids[1] = {
++      0x21,
+ };
  #define STAC9205_NUM_DMICS    2
- static hda_nid_t stac9205_dmic_nids[STAC9205_NUM_DMICS + 1] = {
-         0x17, 0x18, 0
-@@ -347,12 +460,18 @@ static hda_nid_t stac922x_pin_nids[10] =
+@@ -347,12 +460,18 @@
  static hda_nid_t stac92hd73xx_pin_nids[13] = {
        0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
        0x0f, 0x10, 0x11, 0x12, 0x13,
 -      0x14, 0x1e, 0x22
-+      0x14, 0x22, 0x23
- };
+-};
+-
 -static hda_nid_t stac92hd71bxx_pin_nids[10] = {
++      0x14, 0x22, 0x23
++};
++
 +static hda_nid_t stac92hd83xxx_pin_nids[14] = {
 +      0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
 +      0x0f, 0x10, 0x11, 0x12, 0x13,
@@ -1178129,7 +1178076,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  };
  
  static hda_nid_t stac927x_pin_nids[14] = {
-@@ -367,6 +486,34 @@ static hda_nid_t stac9205_pin_nids[12] =
+@@ -367,6 +486,34 @@
        0x21, 0x22,
  };
  
@@ -1178164,7 +1178111,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static int stac92xx_dmux_enum_info(struct snd_kcontrol *kcontrol,
                                   struct snd_ctl_elem_info *uinfo)
  {
-@@ -397,6 +544,56 @@ static int stac92xx_dmux_enum_put(struct
+@@ -397,6 +544,56 @@
                        spec->dmux_nids[dmux_idx], &spec->cur_dmux[dmux_idx]);
  }
  
@@ -1178221,10 +1178168,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
  {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-@@ -452,6 +649,41 @@ static int stac92xx_mono_mux_enum_put(st
-                                    spec->mono_nid, &spec->cur_mmux);
- }
+@@ -450,6 +647,41 @@
  
+       return snd_hda_input_mux_put(codec, spec->mono_mux, ucontrol,
+                                    spec->mono_nid, &spec->cur_mmux);
++}
++
 +static int stac92xx_amp_mux_enum_info(struct snd_kcontrol *kcontrol,
 +      struct snd_ctl_elem_info *uinfo)
 +{
@@ -1178258,12 +1178207,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +
 +      return snd_hda_input_mux_put(codec, spec->amp_mux, ucontrol,
 +                                   0, &spec->cur_amux);
-+}
-+
- #define stac92xx_aloopback_info snd_ctl_boolean_mono_info
+ }
  
- static int stac92xx_aloopback_get(struct snd_kcontrol *kcontrol,
-@@ -546,8 +778,8 @@ static struct hda_verb dell_eq_core_init
+ #define stac92xx_aloopback_info snd_ctl_boolean_mono_info
+@@ -546,8 +778,8 @@
        { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
        /* setup audio connections */
        { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -1178274,7 +1178221,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* setup adcs to point to mixer */
        { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
        { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
-@@ -560,9 +792,7 @@ static struct hda_verb dell_eq_core_init
+@@ -560,9 +792,7 @@
  };
  
  static struct hda_verb dell_m6_core_init[] = {
@@ -1178285,7 +1178232,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* setup audio connections */
        { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
        { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
-@@ -628,25 +858,38 @@ static struct hda_verb stac92hd73xx_10ch
+@@ -628,25 +858,38 @@
        {}
  };
  
@@ -1178313,10 +1178260,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-+      {}
- };
+-};
+-
 -#define HD_DISABLE_PORTF 3
++      {}
++};
++
 +#define HD_DISABLE_PORTF 2
  static struct hda_verb stac92hd71bxx_analog_core_init[] = {
        /* start of config #1 */
@@ -1178327,7 +1178276,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* unmute right and left channels for node 0x0f */
        { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        /* start of config #2 */
-@@ -655,10 +898,6 @@ static struct hda_verb stac92hd71bxx_ana
+@@ -655,10 +898,6 @@
        { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
        /* connect headphone jack to dac1 */
        { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
@@ -1178338,7 +1178287,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* unmute right and left channels for nodes 0x0a, 0xd */
        { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
-@@ -668,6 +907,8 @@ static struct hda_verb stac92hd71bxx_ana
+@@ -668,6 +907,8 @@
  static struct hda_verb stac925x_core_init[] = {
        /* set dac0mux for dac converter */
        { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -1178347,7 +1178296,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {}
  };
  
-@@ -690,12 +931,16 @@ static struct hda_verb d965_core_init[] 
+@@ -690,12 +931,16 @@
  static struct hda_verb stac927x_core_init[] = {
        /* set master volume and direct control */      
        { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
@@ -1178364,10 +1178313,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {}
  };
  
-@@ -709,6 +954,31 @@ static struct hda_verb stac9205_core_ini
+@@ -707,6 +952,31 @@
+               .info = stac92xx_mono_mux_enum_info, \
+               .get = stac92xx_mono_mux_enum_get, \
                .put = stac92xx_mono_mux_enum_put, \
-       }
++      }
++
 +#define STAC_AMP_MUX \
 +      { \
 +              .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
@@ -1178391,39 +1178342,29 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              .put = stac92xx_amp_volume_put, \
 +              .tlv = { .c = snd_hda_mixer_amp_tlv }, \
 +              .private_value = HDA_COMPOSE_AMP_VAL(nid, chs, idx, dir) \
-+      }
-+
+       }
  #define STAC_INPUT_SOURCE(cnt) \
-       { \
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-@@ -736,33 +1006,36 @@ static struct snd_kcontrol_new stac9200_
+@@ -736,11 +1006,28 @@
        STAC_INPUT_SOURCE(1),
        HDA_CODEC_VOLUME("Capture Volume", 0x0a, 0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x0a, 0, HDA_OUTPUT),
 -      HDA_CODEC_VOLUME("Capture Mux Volume", 0x0c, 0, HDA_OUTPUT),
-       { } /* end */
- };
+-      { } /* end */
+-};
+-
++      { } /* end */
++};
++
 +#define DELL_M6_MIXER 6
  static struct snd_kcontrol_new stac92hd73xx_6ch_mixer[] = {
--      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
--
--      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
--      HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
--
--      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
--      HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
--
 +      /* start of config #1 */
-       HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
-       HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
--      HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
--      HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
--
-       HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
-       HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
++      HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
++      HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
++
++      HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
++      HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
++
 +      HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
 +      HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
 +
@@ -1178431,12 +1178372,21 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
 +      HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
 +
-       HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
-       HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
++      HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
++      HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
++
+       STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
  
--      HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
--      HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
-+      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
+       HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+@@ -749,6 +1036,18 @@
+       HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
++      { } /* end */
++};
++
++static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = {
++      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 4),
 +
 +      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
 +      HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
@@ -1178444,13 +1178394,47 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
 +      HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
 +
+       HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
+       HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
+@@ -766,8 +1065,8 @@
        { } /* end */
  };
  
-@@ -818,22 +1091,59 @@ static struct snd_kcontrol_new stac92hd7
+-static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = {
+-      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 4),
++static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
++      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 5),
+       HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
+@@ -792,48 +1091,59 @@
        { } /* end */
  };
  
+-static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
+-      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 5),
+-
+-      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x20, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x20, 0x0, HDA_OUTPUT),
+-
+-      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x21, 0x0, HDA_OUTPUT),
+-      HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x21, 0x0, HDA_OUTPUT),
+-
+-      HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
+-      HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
+-
+-      HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
+-      HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),
+-
+-      HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
+-      HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),
+-
+-      HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
+-      HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
+-
+-      HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
+-      HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
 +
 +static struct snd_kcontrol_new stac92hd83xxx_mixer[] = {
 +      HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_OUTPUT),
@@ -1178475,9 +1178459,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      HDA_CODEC_VOLUME("Mic Capture Volume", 0x1b, 0x4, HDA_INPUT),
 +      HDA_CODEC_MUTE("Mic Capture Switch", 0x1b 0x4, HDA_INPUT),
 +      */
-+      { } /* end */
-+};
-+
+       { } /* end */
+ };
  static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
        STAC_INPUT_SOURCE(2),
 +      STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2),
@@ -1178494,6 +1178478,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      /*
        HDA_CODEC_VOLUME("PC Beep Volume", 0x17, 0x2, HDA_INPUT),
        HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT),
+-
+-      HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
+-      HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
 +      */
 +
 +      HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT),
@@ -1178501,9 +1178488,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +
 +      HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT),
 +      HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT),
--      HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
--      HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
++
 +      HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT),
 +      HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT),
 +
@@ -1178512,7 +1178497,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { } /* end */
  };
  
-@@ -843,19 +1153,18 @@ static struct snd_kcontrol_new stac92hd7
+@@ -843,19 +1153,18 @@
  
        HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT),
        HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT),
@@ -1178534,7 +1178519,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { } /* end */
  };
  
-@@ -865,12 +1174,9 @@ static struct snd_kcontrol_new stac9205_
+@@ -865,12 +1174,9 @@
  
        HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT),
@@ -1178547,7 +1178532,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { } /* end */
  };
  
-@@ -879,11 +1185,9 @@ static struct snd_kcontrol_new stac922x_
+@@ -879,11 +1185,9 @@
        STAC_INPUT_SOURCE(2),
        HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT),
@@ -1178559,7 +1178544,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { } /* end */
  };
  
-@@ -894,15 +1198,12 @@ static struct snd_kcontrol_new stac927x_
+@@ -894,15 +1198,12 @@
  
        HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1b, 0x0, HDA_OUTPUT),
@@ -1178575,7 +1178560,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { } /* end */
  };
  
-@@ -915,6 +1216,15 @@ static struct snd_kcontrol_new stac_dmux
+@@ -915,6 +1216,15 @@
        .put = stac92xx_dmux_enum_put,
  };
  
@@ -1178591,7 +1178576,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  static const char *slave_vols[] = {
        "Front Playback Volume",
        "Surround Playback Volume",
-@@ -966,6 +1276,22 @@ static int stac92xx_build_controls(struc
+@@ -966,6 +1276,22 @@
                if (err < 0)
                        return err;
        }
@@ -1178614,7 +1178599,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        if (spec->multiout.dig_out_nid) {
                err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid);
-@@ -977,7 +1303,7 @@ static int stac92xx_build_controls(struc
+@@ -977,7 +1303,7 @@
                        return err;
                spec->multiout.share_spdif = 1;
        }
@@ -1178623,7 +1178608,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
                if (err < 0)
                        return err;
-@@ -988,6 +1314,8 @@ static int stac92xx_build_controls(struc
+@@ -988,6 +1314,8 @@
                unsigned int vmaster_tlv[4];
                snd_hda_set_vmaster_tlv(codec, spec->multiout.dac_nids[0],
                                        HDA_OUTPUT, vmaster_tlv);
@@ -1178632,7 +1178617,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                err = snd_hda_add_vmaster(codec, "Master Playback Volume",
                                          vmaster_tlv, slave_vols);
                if (err < 0)
-@@ -1008,7 +1336,16 @@ static unsigned int ref9200_pin_configs[
+@@ -1008,7 +1336,16 @@
        0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
  };
  
@@ -1178650,7 +1178635,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
      STAC 9200 pin configs for
      102801A8
      102801DE
-@@ -1138,6 +1475,8 @@ static unsigned int *stac9200_brd_tbl[ST
+@@ -1138,6 +1475,8 @@
        [STAC_9200_DELL_M25] = dell9200_m25_pin_configs,
        [STAC_9200_DELL_M26] = dell9200_m26_pin_configs,
        [STAC_9200_DELL_M27] = dell9200_m27_pin_configs,
@@ -1178659,7 +1178644,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_9200_PANASONIC] = ref9200_pin_configs,
  };
  
-@@ -1154,7 +1493,8 @@ static const char *stac9200_models[STAC_
+@@ -1154,7 +1493,8 @@
        [STAC_9200_DELL_M25] = "dell-m25",
        [STAC_9200_DELL_M26] = "dell-m26",
        [STAC_9200_DELL_M27] = "dell-m27",
@@ -1178669,7 +1178654,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_9200_PANASONIC] = "panasonic",
  };
  
-@@ -1224,11 +1564,9 @@ static struct snd_pci_quirk stac9200_cfg
+@@ -1224,11 +1564,9 @@
        /* Panasonic */
        SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC),
        /* Gateway machines needs EAPD to be set on resume */
@@ -1178684,21 +1178669,23 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* OQO Mobile */
        SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO),
        {} /* terminator */
-@@ -1239,44 +1577,85 @@ static unsigned int ref925x_pin_configs[
+@@ -1239,44 +1577,85 @@
        0x90a70320, 0x02214210, 0x01019020, 0x9033032e,
  };
  
 -static unsigned int stac925x_MA6_pin_configs[8] = {
 -      0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
 -      0x90a70320, 0x90100211, 0x400003f1, 0x9033032e,
-+static unsigned int stac925xM1_pin_configs[8] = {
-+      0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
-+      0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
- };
+-};
+-
 -static unsigned int stac925x_PA6_pin_configs[8] = {
 -      0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021,
 -      0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e,
++static unsigned int stac925xM1_pin_configs[8] = {
++      0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
++      0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
++};
++
 +static unsigned int stac925xM1_2_pin_configs[8] = {
 +      0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020,
 +      0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e,
@@ -1178787,7 +1178774,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {} /* terminator */
  };
  
-@@ -1296,12 +1675,19 @@ static unsigned int dell_m6_pin_configs[
+@@ -1296,12 +1675,19 @@
  
  static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
        [STAC_92HD73XX_REF]     = ref92hd73xx_pin_configs,
@@ -1178809,7 +1178796,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  };
  
  static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
-@@ -1309,56 +1695,108 @@ static struct snd_pci_quirk stac92hd73xx
+@@ -1309,56 +1695,108 @@
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                                "DFI LanParty", STAC_92HD73XX_REF),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
@@ -1178832,6 +1178819,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +                              "unknown Dell", STAC_DELL_M6_AMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271,
 -                              "unknown Dell", STAC_DELL_M6),
+-      {} /* terminator */
+-};
+-
+-static unsigned int ref92hd71bxx_pin_configs[10] = {
 +                              "unknown Dell", STAC_DELL_M6_DMIC),
 +      SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0272,
 +                              "unknown Dell", STAC_DELL_M6_DMIC),
@@ -1178861,27 +1178852,30 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      /* SigmaTel reference board */
 +      SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
 +                    "DFI LanParty", STAC_92HD83XXX_REF),
-       {} /* terminator */
- };
--static unsigned int ref92hd71bxx_pin_configs[10] = {
++      {} /* terminator */
++};
++
 +static unsigned int ref92hd71bxx_pin_configs[11] = {
        0x02214030, 0x02a19040, 0x01a19020, 0x01014010,
 -      0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
 -      0x90a000f0, 0x01452050,
+-};
+-
+-static unsigned int dell_m4_1_pin_configs[10] = {
 +      0x0181302e, 0x01014010, 0x01019020, 0x90a000f0,
 +      0x90a000f0, 0x01452050, 0x01452050,
- };
--static unsigned int dell_m4_1_pin_configs[10] = {
++};
++
 +static unsigned int dell_m4_1_pin_configs[11] = {
        0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110,
        0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
 -      0x40f000f0, 0x4f0000f0,
-+      0x40f000f0, 0x4f0000f0, 0x4f0000f0,
- };
+-};
+-
 -static unsigned int dell_m4_2_pin_configs[10] = {
++      0x40f000f0, 0x4f0000f0, 0x4f0000f0,
++};
++
 +static unsigned int dell_m4_2_pin_configs[11] = {
        0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
        0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
@@ -1178932,7 +1178926,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
                                "unknown Dell", STAC_DELL_M4_1),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0234,
-@@ -1381,6 +1819,8 @@ static struct snd_pci_quirk stac92hd71bx
+@@ -1381,6 +1819,8 @@
                                "unknown Dell", STAC_DELL_M4_2),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264,
                                "unknown Dell", STAC_DELL_M4_2),
@@ -1178941,7 +1178935,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {} /* terminator */
  };
  
-@@ -1477,6 +1917,11 @@ static unsigned int intel_mac_v5_pin_con
+@@ -1477,6 +1917,11 @@
        0x400000fc, 0x400000fb,
  };
  
@@ -1178953,7 +1178947,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
  static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
        [STAC_D945_REF] = ref922x_pin_configs,
-@@ -1495,6 +1940,7 @@ static unsigned int *stac922x_brd_tbl[ST
+@@ -1495,6 +1940,7 @@
        [STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs,
        [STAC_IMAC_INTEL] = intel_mac_v2_pin_configs,
        [STAC_IMAC_INTEL_20] = intel_mac_v3_pin_configs,
@@ -1178961,7 +1178955,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_922X_DELL_D81] = dell_922x_d81_pin_configs,
        [STAC_922X_DELL_D82] = dell_922x_d82_pin_configs,       
        [STAC_922X_DELL_M81] = dell_922x_m81_pin_configs,
-@@ -1518,6 +1964,7 @@ static const char *stac922x_models[STAC_
+@@ -1518,6 +1964,7 @@
        [STAC_MACBOOK_PRO_V2]   = "macbook-pro",
        [STAC_IMAC_INTEL] = "imac-intel",
        [STAC_IMAC_INTEL_20] = "imac-intel-20",
@@ -1178969,7 +1178963,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_922X_DELL_D81] = "dell-d81",
        [STAC_922X_DELL_D82] = "dell-d82",
        [STAC_922X_DELL_M81] = "dell-m81",
-@@ -1581,6 +2028,9 @@ static struct snd_pci_quirk stac922x_cfg
+@@ -1581,6 +2028,9 @@
                      "Intel D945P", STAC_D945GTP3),
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0707,
                      "Intel D945P", STAC_D945GTP5),
@@ -1178979,7 +1178973,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        /* other systems  */
        /* Apple Intel Mac (Mac Mini, MacBook, MacBook Pro...) */
        SND_PCI_QUIRK(0x8384, 0x7680,
-@@ -1604,6 +2054,33 @@ static struct snd_pci_quirk stac922x_cfg
+@@ -1604,6 +2054,33 @@
                      "unknown Dell", STAC_922X_DELL_D81),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d7,
                      "Dell XPS M1210", STAC_922X_DELL_M82),
@@ -1179013,7 +1179007,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {} /* terminator */
  };
  
-@@ -1636,6 +2113,7 @@ static unsigned int dell_3st_pin_configs
+@@ -1636,6 +2113,7 @@
  };
  
  static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
@@ -1179021,7 +1179015,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_D965_REF]  = ref927x_pin_configs,
        [STAC_D965_3ST]  = d965_3st_pin_configs,
        [STAC_D965_5ST]  = d965_5st_pin_configs,
-@@ -1644,6 +2122,7 @@ static unsigned int *stac927x_brd_tbl[ST
+@@ -1644,6 +2122,7 @@
  };
  
  static const char *stac927x_models[STAC_927X_MODELS] = {
@@ -1179029,7 +1179023,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        [STAC_D965_REF]         = "ref",
        [STAC_D965_3ST]         = "3stack",
        [STAC_D965_5ST]         = "5stack",
-@@ -1751,6 +2230,7 @@ static unsigned int *stac9205_brd_tbl[ST
+@@ -1751,6 +2230,7 @@
        [STAC_9205_DELL_M42] = dell_9205_m42_pin_configs,
        [STAC_9205_DELL_M43] = dell_9205_m43_pin_configs,
        [STAC_9205_DELL_M44] = dell_9205_m44_pin_configs,
@@ -1179037,7 +1179031,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  };
  
  static const char *stac9205_models[STAC_9205_MODELS] = {
-@@ -1758,12 +2238,14 @@ static const char *stac9205_models[STAC_
+@@ -1758,12 +2238,14 @@
        [STAC_9205_DELL_M42] = "dell-m42",
        [STAC_9205_DELL_M43] = "dell-m43",
        [STAC_9205_DELL_M44] = "dell-m44",
@@ -1179052,7 +1179046,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f1,
                      "unknown Dell", STAC_9205_DELL_M42),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f2,
-@@ -1794,6 +2276,8 @@ static struct snd_pci_quirk stac9205_cfg
+@@ -1794,6 +2276,8 @@
                      "Dell Inspiron", STAC_9205_DELL_M44),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
                      "Dell Vostro 1500", STAC_9205_DELL_M42),
@@ -1179061,7 +1179055,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        {} /* terminator */
  };
  
-@@ -1867,6 +2351,8 @@ static int stac92xx_playback_pcm_open(st
+@@ -1867,6 +2351,8 @@
                                      struct snd_pcm_substream *substream)
  {
        struct sigmatel_spec *spec = codec->spec;
@@ -1179070,7 +1179064,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream,
                                             hinfo);
  }
-@@ -1919,7 +2405,6 @@ static int stac92xx_dig_playback_pcm_pre
+@@ -1919,7 +2405,6 @@
                                             stream_tag, format, substream);
  }
  
@@ -1179078,14 +1179072,15 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  /*
   * Analog capture callbacks
   */
-@@ -1930,9 +2415,14 @@ static int stac92xx_capture_pcm_prepare(
+@@ -1930,9 +2415,14 @@
                                        struct snd_pcm_substream *substream)
  {
        struct sigmatel_spec *spec = codec->spec;
-+      hda_nid_t nid = spec->adc_nids[substream->number];
+-
 -      snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number],
 -                                   stream_tag, 0, format);
++      hda_nid_t nid = spec->adc_nids[substream->number];
++
 +      if (spec->powerdown_adcs) {
 +              msleep(40);
 +              snd_hda_codec_write_cache(codec, nid, 0,
@@ -1179095,13 +1179090,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return 0;
  }
  
-@@ -1941,8 +2431,12 @@ static int stac92xx_capture_pcm_cleanup(
+@@ -1941,8 +2431,12 @@
                                        struct snd_pcm_substream *substream)
  {
        struct sigmatel_spec *spec = codec->spec;
-+      hda_nid_t nid = spec->adc_nids[substream->number];
+-
 -      snd_hda_codec_cleanup_stream(codec, spec->adc_nids[substream->number]);
++      hda_nid_t nid = spec->adc_nids[substream->number];
++
 +      snd_hda_codec_cleanup_stream(codec, nid);
 +      if (spec->powerdown_adcs)
 +              snd_hda_codec_write_cache(codec, nid, 0,
@@ -1179109,7 +1179105,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return 0;
  }
  
-@@ -2009,6 +2503,8 @@ static int stac92xx_build_pcms(struct hd
+@@ -2009,6 +2503,8 @@
  
        info->name = "STAC92xx Analog";
        info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback;
@@ -1179118,7 +1179114,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture;
        info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0];
        info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs;
-@@ -2069,7 +2565,7 @@ static int stac92xx_hp_switch_get(struct
+@@ -2069,7 +2565,7 @@
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
  
@@ -1179127,18 +1179123,19 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return 0;
  }
  
-@@ -2078,8 +2574,9 @@ static int stac92xx_hp_switch_put(struct
+@@ -2078,8 +2574,9 @@
  {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
-+      int nid = kcontrol->private_value;
+-
 -      spec->hp_switch = ucontrol->value.integer.value[0];
++      int nid = kcontrol->private_value;
++
 +      spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
  
        /* check to be sure that the ports are upto date with
         * switch changes
-@@ -2193,6 +2690,8 @@ enum {
+@@ -2193,6 +2690,8 @@
        STAC_CTL_WIDGET_VOL,
        STAC_CTL_WIDGET_MUTE,
        STAC_CTL_WIDGET_MONO_MUX,
@@ -1179147,7 +1179144,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        STAC_CTL_WIDGET_HP_SWITCH,
        STAC_CTL_WIDGET_IO_SWITCH,
        STAC_CTL_WIDGET_CLFE_SWITCH
-@@ -2202,13 +2701,18 @@ static struct snd_kcontrol_new stac92xx_
+@@ -2202,13 +2701,18 @@
        HDA_CODEC_VOLUME(NULL, 0, 0, 0),
        HDA_CODEC_MUTE(NULL, 0, 0, 0),
        STAC_MONO_MUX,
@@ -1179167,7 +1179164,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  {
        struct snd_kcontrol_new *knew;
  
-@@ -2227,15 +2731,33 @@ static int stac92xx_add_control(struct s
+@@ -2227,13 +2731,31 @@
        }
  
        knew = &spec->kctl_alloc[spec->num_kctl_used];
@@ -1179181,8 +1179178,8 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        knew->private_value = val;
        spec->num_kctl_used++;
        return 0;
- }
++}
++
 +static inline int stac92xx_add_control_idx(struct sigmatel_spec *spec,
 +                                         int type, int idx, const char *name,
 +                                         unsigned long val)
@@ -1179198,23 +1179195,22 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +                                     const char *name, unsigned long val)
 +{
 +      return stac92xx_add_control_idx(spec, type, 0, name, val);
-+}
-+
+ }
  /* flag inputs as additional dynamic lineouts */
- static int stac92xx_add_dyn_out_pins(struct hda_codec *codec, struct auto_pin_cfg *cfg)
- {
-@@ -2379,14 +2901,34 @@ static int stac92xx_auto_fill_dac_nids(s
+@@ -2379,14 +2901,34 @@
  }
  
  /* create volume control/switch for the given prefx type */
 -static int create_controls(struct sigmatel_spec *spec, const char *pfx, hda_nid_t nid, int chs)
+-{
 +static int create_controls(struct hda_codec *codec, const char *pfx,
 +                         hda_nid_t nid, int chs)
- {
++{
 +      struct sigmatel_spec *spec = codec->spec;
        char name[32];
        int err;
++
 +      if (!spec->check_volume_offset) {
 +              unsigned int caps, step, nums, db_scale;
 +              caps = query_amp_caps(codec, nid, HDA_OUTPUT);
@@ -1179231,7 +1179227,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +                      spec->volume_offset = nums / 2;
 +              spec->check_volume_offset = 1;
 +      }
-+
        sprintf(name, "%s Playback Volume", pfx);
        err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, name,
 -                                 HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT));
@@ -1179240,7 +1179236,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        if (err < 0)
                return err;
        sprintf(name, "%s Playback Switch", pfx);
-@@ -2427,7 +2969,7 @@ static int stac92xx_auto_create_multi_ou
+@@ -2427,7 +2969,7 @@
        static const char *chname[4] = {
                "Front", "Surround", NULL /*CLFE*/, "Side"
        };
@@ -1179249,31 +1179245,38 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        int i, err;
  
        struct sigmatel_spec *spec = codec->spec;
-@@ -2442,10 +2984,10 @@ static int stac92xx_auto_create_multi_ou
+@@ -2442,10 +2984,10 @@
  
                if (i == 2) {
                        /* Center/LFE */
 -                      err = create_controls(spec, "Center", nid, 1);
-+                      err = create_controls(codec, "Center", nid, 1);
-                       if (err < 0)
-                               return err;
+-                      if (err < 0)
+-                              return err;
 -                      err = create_controls(spec, "LFE", nid, 2);
++                      err = create_controls(codec, "Center", nid, 1);
++                      if (err < 0)
++                              return err;
 +                      err = create_controls(codec, "LFE", nid, 2);
                        if (err < 0)
                                return err;
  
-@@ -2461,16 +3003,21 @@ static int stac92xx_auto_create_multi_ou
+@@ -2461,16 +3003,21 @@
                        }
  
                } else {
 -                      err = create_controls(spec, chname[i], nid, 3);
-+                      err = create_controls(codec, chname[i], nid, 3);
-                       if (err < 0)
-                               return err;
-               }
-       }
+-                      if (err < 0)
+-                              return err;
+-              }
+-      }
+-
 -      if (cfg->hp_outs > 1) {
++                      err = create_controls(codec, chname[i], nid, 3);
++                      if (err < 0)
++                              return err;
++              }
++      }
++
 +      if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
 +          cfg->hp_outs == 1 && !spec->multiout.hp_nid)
 +              spec->multiout.hp_nid = nid;
@@ -1179287,7 +1179290,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                if (err < 0)
                        return err;
        }
-@@ -2563,13 +3110,13 @@ static int stac92xx_auto_create_hp_ctls(
+@@ -2563,13 +3110,13 @@
                static const char *pfxs[] = {
                        "Speaker", "External Speaker", "Speaker2",
                };
@@ -1179303,7 +1179306,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                                      spec->multiout.hp_nid, 3);
                if (err < 0)
                        return err;
-@@ -2579,8 +3126,8 @@ static int stac92xx_auto_create_hp_ctls(
+@@ -2579,8 +3126,8 @@
  }
  
  /* labels for mono mux outputs */
@@ -1179314,44 +1179317,31 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  };
  
  /* create mono mux for mono out on capable codecs */
-@@ -2609,27 +3156,174 @@ static int stac92xx_auto_create_mono_out
-                               "Mono Mux", spec->mono_nid);
- }
+@@ -2607,6 +3154,153 @@
  
--/* labels for dmic mux inputs */
--static const char *stac92xx_dmic_labels[5] = {
--      "Analog Inputs", "Digital Mic 1", "Digital Mic 2",
--      "Digital Mic 3", "Digital Mic 4"
+       return stac92xx_add_control(spec, STAC_CTL_WIDGET_MONO_MUX,
+                               "Mono Mux", spec->mono_nid);
++}
++
 +/* labels for amp mux outputs */
 +static const char *stac92xx_amp_labels[3] = {
 +      "Front Microphone", "Microphone", "Line In",
- };
--/* create playback/capture controls for input pins on dmic capable codecs */
--static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec,
--                                              const struct auto_pin_cfg *cfg)
++};
++
 +/* create amp out controls mux on capable codecs */
 +static int stac92xx_auto_create_amp_output_ctls(struct hda_codec *codec)
- {
-       struct sigmatel_spec *spec = codec->spec;
--      struct hda_input_mux *dimux = &spec->private_dimux;
--      hda_nid_t con_lst[HDA_MAX_NUM_INPUTS];
--      int err, i, j;
--      char name[32];
++{
++      struct sigmatel_spec *spec = codec->spec;
 +      struct hda_input_mux *amp_mux = &spec->private_amp_mux;
 +      int i, err;
--      dimux->items[dimux->num_items].label = stac92xx_dmic_labels[0];
--      dimux->items[dimux->num_items].index = 0;
--      dimux->num_items++;
++
 +      for (i = 0; i < spec->num_amps; i++) {
 +              amp_mux->items[amp_mux->num_items].label =
 +                                      stac92xx_amp_labels[i];
 +              amp_mux->items[amp_mux->num_items].index = i;
 +              amp_mux->num_items++;
 +      }
--      for (i = 0; i < spec->num_dmics; i++) {
++
 +      if (spec->num_amps > 1) {
 +              err = stac92xx_add_control(spec, STAC_CTL_WIDGET_AMP_MUX,
 +                      "Amp Selector Capture Switch", 0);
@@ -1179478,41 +1179468,19 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      }
 +
 +      return 0;
-+}
-+
-+/* labels for dmic mux inputs */
-+static const char *stac92xx_dmic_labels[5] = {
-+      "Analog Inputs", "Digital Mic 1", "Digital Mic 2",
-+      "Digital Mic 3", "Digital Mic 4"
-+};
-+
-+/* create playback/capture controls for input pins on dmic capable codecs */
-+static int stac92xx_auto_create_dmic_input_ctls(struct hda_codec *codec,
-+                                              const struct auto_pin_cfg *cfg)
-+{
-+      struct sigmatel_spec *spec = codec->spec;
-+      struct hda_input_mux *dimux = &spec->private_dimux;
-+      hda_nid_t con_lst[HDA_MAX_NUM_INPUTS];
-+      int err, i, j;
-+      char name[32];
-+
-+      dimux->items[dimux->num_items].label = stac92xx_dmic_labels[0];
-+      dimux->items[dimux->num_items].index = 0;
-+      dimux->num_items++;
-+
-+      for (i = 0; i < spec->num_dmics; i++) {
-               hda_nid_t nid;
-               int index;
-               int num_cons;
-@@ -2656,16 +3350,19 @@ static int stac92xx_auto_create_dmic_inp
+ }
+ /* labels for dmic mux inputs */
+@@ -2656,16 +3350,19 @@
                        }
                continue;
  found:
 -              wcaps = get_wcaps(codec, nid);
+-
+-              if (wcaps & AC_WCAP_OUT_AMP) {
 +              wcaps = get_wcaps(codec, nid) &
 +                      (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP);
--              if (wcaps & AC_WCAP_OUT_AMP) {
++
 +              if (wcaps) {
                        sprintf(name, "%s Capture Volume",
                                stac92xx_dmic_labels[dimux->num_items]);
@@ -1179527,7 +1179495,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                        if (err < 0)
                                return err;
                }
-@@ -2789,8 +3486,8 @@ static int stac92xx_parse_auto_config(st
+@@ -2789,8 +3486,8 @@
                hp_speaker_swap = 1;
        }
        if (spec->autocfg.mono_out_pin) {
@@ -1179538,7 +1179506,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                u32 caps = query_amp_caps(codec,
                                spec->autocfg.mono_out_pin, dir);
                hda_nid_t conn_list[1];
-@@ -2812,21 +3509,26 @@ static int stac92xx_parse_auto_config(st
+@@ -2812,21 +3509,26 @@
                                                !(wcaps & AC_WCAP_LR_SWAP))
                                        spec->mono_nid = conn_list[0];
                }
@@ -1179555,6 +1179523,8 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 -                              "Mono Playback Volume",
 -                              HDA_COMPOSE_AMP_VAL(spec->autocfg.mono_out_pin,
 -                                      1, 0, dir));
+-                      if (err < 0)
+-                              return err;
 +              if (dir) {
 +                      hda_nid_t nid = spec->autocfg.mono_out_pin;
 +
@@ -1179563,8 +1179533,8 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +                      err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE,
 +                              "Mono Playback Switch",
 +                              HDA_COMPOSE_AMP_VAL(nid, 1, 0, dir));
-                       if (err < 0)
-                               return err;
++                      if (err < 0)
++                              return err;
 +                      /* check for volume support for the amp */
 +                      if ((caps & AC_AMPCAP_NUM_STEPS)
 +                                      >> AC_AMPCAP_NUM_STEPS_SHIFT) {
@@ -1179578,7 +1179548,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                }
  
                stac92xx_auto_set_pinctl(codec, spec->autocfg.mono_out_pin,
-@@ -2835,14 +3537,45 @@ static int stac92xx_parse_auto_config(st
+@@ -2835,14 +3537,45 @@
  
        if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
                return err;
@@ -1179586,13 +1179556,17 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      if (spec->multiout.num_dacs == 0) {
                if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0)
                        return err;
+-
+-      err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);
+-
+-      if (err < 0)
+-              return err;
 +              err = stac92xx_auto_create_multi_out_ctls(codec,
 +                                                        &spec->autocfg);
 +              if (err < 0)
 +                      return err;
 +      }
--      err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);
++
 +      /* setup analog beep controls */
 +      if (spec->anabeep_nid > 0) {
 +              err = stac92xx_auto_create_beep_ctls(codec,
@@ -1179600,9 +1179574,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              if (err < 0)
 +                      return err;
 +      }
--      if (err < 0)
--              return err;
++
 +      /* setup digital beep controls and input device */
 +#ifdef CONFIG_SND_HDA_INPUT_BEEP
 +      if (spec->digbeep_nid > 0) {
@@ -1179628,7 +1179600,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        if (hp_speaker_swap == 1) {
                /* Restore the hp_outs and line_outs */
-@@ -2872,11 +3605,25 @@ static int stac92xx_parse_auto_config(st
+@@ -2872,11 +3605,25 @@
                if (err < 0)
                        return err;
        }
@@ -1179656,7 +1179628,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        spec->multiout.max_channels = spec->multiout.num_dacs * 2;
        if (spec->multiout.max_channels > 2)
-@@ -2884,17 +3631,17 @@ static int stac92xx_parse_auto_config(st
+@@ -2884,17 +3631,17 @@
  
        if (spec->autocfg.dig_out_pin)
                spec->multiout.dig_out_nid = dig_out;
@@ -1179678,7 +1179650,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return 1;
  }
  
-@@ -2959,7 +3706,7 @@ static int stac9200_auto_create_lfe_ctls
+@@ -2959,7 +3706,7 @@
        }
  
        if (lfe_pin) {
@@ -1179687,20 +1179659,20 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                if (err < 0)
                        return err;
        }
-@@ -2984,6 +3731,12 @@ static int stac9200_parse_auto_config(st
+@@ -2983,6 +3730,12 @@
        if ((err = stac9200_auto_create_lfe_ctls(codec, &spec->autocfg)) < 0)
                return err;
++
 +      if (spec->num_muxes > 0) {
 +              err = stac92xx_auto_create_mux_input_ctls(codec);
 +              if (err < 0)
 +                      return err;
 +      }
-+
        if (spec->autocfg.dig_out_pin)
                spec->multiout.dig_out_nid = 0x05;
-       if (spec->autocfg.dig_in_pin)
-@@ -3066,14 +3819,34 @@ static void stac92xx_power_down(struct h
+@@ -3066,13 +3819,33 @@
                                        AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
  }
  
@@ -1179715,7 +1179687,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        int i;
  
        snd_hda_sequence_write(codec, spec->init);
++
 +      /* power down adcs initially */
 +      if (spec->powerdown_adcs)
 +              for (i = 0; i < spec->num_adcs; i++)
@@ -1179731,11 +1179703,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +      if (!spec->eapd_switch)
 +              gpio |= spec->eapd_mask;
 +      stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio);
-+
        /* set up pins */
        if (spec->hp_detect) {
-               /* Enable unsolicited responses on the HP widget */
-@@ -3095,48 +3868,61 @@ static int stac92xx_init(struct hda_code
+@@ -3095,48 +3868,61 @@
        for (i = 0; i < AUTO_PIN_LAST; i++) {
                hda_nid_t nid = cfg->input_pins[i];
                if (nid) {
@@ -1179760,13 +1179731,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        for (i = 0; i < spec->num_dmics; i++)
                stac92xx_auto_set_pinctl(codec, spec->dmic_nids[i],
                                        AC_PINCTL_IN_EN);
-+      if (cfg->dig_out_pin)
-+              stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
-+                                       AC_PINCTL_OUT_EN);
-+      if (cfg->dig_in_pin)
-+              stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
-+                                       AC_PINCTL_IN_EN);
-       for (i = 0; i < spec->num_pwrs; i++)  {
+-      for (i = 0; i < spec->num_pwrs; i++)  {
 -              int event = is_nid_hp_pin(cfg, spec->pwr_nids[i])
 -                                      ? STAC_HP_EVENT : STAC_PWR_EVENT;
 -              int pinctl = snd_hda_codec_read(codec, spec->pwr_nids[i],
@@ -1179774,6 +1179739,32 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 -              int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i],
 -                                      0, AC_VERB_GET_CONFIG_DEFAULT, 0);
 -              def_conf = get_defcfg_connect(def_conf);
+-              /* outputs are only ports capable of power management
+-               * any attempts on powering down a input port cause the
+-               * referenced VREF to act quirky.
+-               */
+-              if (pinctl & AC_PINCTL_IN_EN)
+-                      continue;
+-              /* skip any ports that don't have jacks since presence
+-               * detection is useless */
+-              if (def_conf && def_conf != AC_JACK_PORT_FIXED)
+-                      continue;
+-              enable_pin_detect(codec, spec->pwr_nids[i], event | i);
+-              codec->patch_ops.unsol_event(codec, (event | i) << 26);
+-      }
+-      if (spec->dac_list)
+-              stac92xx_power_down(codec);
+       if (cfg->dig_out_pin)
+               stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
+                                        AC_PINCTL_OUT_EN);
+       if (cfg->dig_in_pin)
+               stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
+                                        AC_PINCTL_IN_EN);
+-
+-      stac_gpio_set(codec, spec->gpio_mask,
+-                                      spec->gpio_dir, spec->gpio_data);
+-
++      for (i = 0; i < spec->num_pwrs; i++)  {
 +              hda_nid_t nid = spec->pwr_nids[i];
 +              int pinctl, def_conf;
 +              int event = STAC_PWR_EVENT;
@@ -1179783,42 +1179774,31 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +
 +              pinctl = snd_hda_codec_read(codec, nid, 0,
 +                                          AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
-               /* outputs are only ports capable of power management
-                * any attempts on powering down a input port cause the
-                * referenced VREF to act quirky.
-                */
-               if (pinctl & AC_PINCTL_IN_EN)
-                       continue;
++              /* outputs are only ports capable of power management
++               * any attempts on powering down a input port cause the
++               * referenced VREF to act quirky.
++               */
++              if (pinctl & AC_PINCTL_IN_EN)
++                      continue;
 +              def_conf = snd_hda_codec_read(codec, nid, 0,
 +                                            AC_VERB_GET_CONFIG_DEFAULT, 0);
 +              def_conf = get_defcfg_connect(def_conf);
-               /* skip any ports that don't have jacks since presence
-                * detection is useless */
--              if (def_conf && def_conf != AC_JACK_PORT_FIXED)
++              /* skip any ports that don't have jacks since presence
++               * detection is useless */
 +              if (def_conf != AC_JACK_PORT_COMPLEX) {
 +                      if (def_conf != AC_JACK_PORT_NONE)
 +                              stac_toggle_power_map(codec, nid, 1);
-                       continue;
++                      continue;
 +              }
-               enable_pin_detect(codec, spec->pwr_nids[i], event | i);
-               codec->patch_ops.unsol_event(codec, (event | i) << 26);
-       }
-       if (spec->dac_list)
-               stac92xx_power_down(codec);
--      if (cfg->dig_out_pin)
--              stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin,
--                                       AC_PINCTL_OUT_EN);
--      if (cfg->dig_in_pin)
--              stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin,
--                                       AC_PINCTL_IN_EN);
--
--      stac_gpio_set(codec, spec->gpio_mask,
--                                      spec->gpio_dir, spec->gpio_data);
--
++              enable_pin_detect(codec, spec->pwr_nids[i], event | i);
++              codec->patch_ops.unsol_event(codec, (event | i) << 26);
++      }
++      if (spec->dac_list)
++              stac92xx_power_down(codec);
        return 0;
  }
  
-@@ -3158,6 +3944,7 @@ static void stac92xx_free(struct hda_cod
+@@ -3158,6 +3944,7 @@
                kfree(spec->bios_pin_configs);
  
        kfree(spec);
@@ -1179826,7 +1179806,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  }
  
  static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
-@@ -3218,11 +4005,30 @@ static int get_hp_pin_presence(struct hd
+@@ -3218,11 +4005,30 @@
        return 0;
  }
  
@@ -1179858,7 +1179838,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        int i, presence;
  
        presence = 0;
-@@ -3233,75 +4039,109 @@ static void stac92xx_hp_detect(struct hd
+@@ -3233,75 +4039,109 @@
        for (i = 0; i < cfg->hp_outs; i++) {
                if (presence)
                        break;
@@ -1179921,16 +1179901,20 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  } 
  
 -static void stac92xx_pin_sense(struct hda_codec *codec, int idx)
-+static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
-+                                int enable)
- {
-       struct sigmatel_spec *spec = codec->spec;
+-{
+-      struct sigmatel_spec *spec = codec->spec;
 -      hda_nid_t nid = spec->pwr_nids[idx];
 -      int presence, val;
 -      val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0)
 -                                                      & 0x000000ff;
 -      presence = get_hp_pin_presence(codec, nid);
 -      idx = 1 << idx;
+-
+-      if (presence)
++static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
++                                int enable)
++{
++      struct sigmatel_spec *spec = codec->spec;
 +      unsigned int idx, val;
 +
 +      for (idx = 0; idx < spec->num_pwrs; idx++) {
@@ -1179945,8 +1179929,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              idx = spec->pwr_mapping[idx];
 +      else
 +              idx = 1 << idx;
--      if (presence)
++
 +      val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff;
 +      if (enable)
                val &= ~idx;
@@ -1179988,7 +1179971,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        }
  }
  
-@@ -3375,7 +4215,8 @@ static int patch_stac9200(struct hda_cod
+@@ -3375,7 +4215,8 @@
        spec->num_adcs = 1;
        spec->num_pwrs = 0;
  
@@ -1179998,7 +1179981,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
            spec->board_config == STAC_9200_OQO)
                spec->init = stac9200_eapd_init;
        else
-@@ -3410,12 +4251,22 @@ static int patch_stac925x(struct hda_cod
+@@ -3410,12 +4251,22 @@
        codec->spec = spec;
        spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
        spec->pin_nids = stac925x_pin_nids;
@@ -1180023,7 +1180006,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                                      "using BIOS defaults\n");
                err = stac92xx_save_bios_config_regs(codec);
                if (err < 0) {
-@@ -3478,9 +4329,9 @@ static struct hda_input_mux stac92hd73xx
+@@ -3478,9 +4329,9 @@
        .num_items = 4,
        .items = {
                { "Analog Inputs", 0x0b },
@@ -1180034,7 +1180017,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        }
  };
  
-@@ -3495,6 +4346,7 @@ static int patch_stac92hd73xx(struct hda
+@@ -3495,6 +4346,7 @@
                return -ENOMEM;
  
        codec->spec = spec;
@@ -1180042,7 +1180025,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        spec->num_pins = ARRAY_SIZE(stac92hd73xx_pin_nids);
        spec->pin_nids = stac92hd73xx_pin_nids;
        spec->board_config = snd_hda_check_board_config(codec,
-@@ -3546,53 +4398,72 @@ again:
+@@ -3546,53 +4398,72 @@
        spec->aloopback_mask = 0x01;
        spec->aloopback_shift = 8;
  
@@ -1180089,21 +1180072,23 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              case STAC_DELL_M6_AMIC: /* Analog Mics */
                        stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
                        spec->num_dmics = 0;
-+                      spec->private_dimux.num_items = 1;
-                       break;
+-                      break;
 -              case 0x10280271: /* Digital Mics */
 -              case 0x10280272:
 -                      spec->init = dell_m6_core_init;
 -                      /* fall-through */
 -              case 0x10280254:
 -              case 0x10280255:
++                      spec->private_dimux.num_items = 1;
++                      break;
 +              case STAC_DELL_M6_DMIC: /* Digital Mics */
                        stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
                        spec->num_dmics = 1;
-+                      spec->private_dimux.num_items = 2;
-                       break;
+-                      break;
 -              case 0x10280256: /* Both */
 -              case 0x10280057:
++                      spec->private_dimux.num_items = 2;
++                      break;
 +              case STAC_DELL_M6_BOTH: /* Both */
                        stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
                        stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
@@ -1180114,9 +1180099,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                break;
        default:
                spec->num_dmics = STAC92HD73XX_NUM_DMICS;
+-      }
 +              spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids);
 +              spec->eapd_switch = 1;
-       }
++      }
 +      if (spec->board_config > STAC_92HD73XX_REF) {
 +              /* GPIO0 High = Enable EAPD */
 +              spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
@@ -1180132,10 +1180118,14 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        if (!err) {
                if (spec->board_config < 0) {
-@@ -3609,11 +4480,160 @@ again:
+@@ -3609,10 +4480,159 @@
                return err;
        }
  
+-      codec->patch_ops = stac92xx_patch_ops;
+-
+-      return 0;
+-}
 +      if (spec->board_config == STAC_92HD73XX_NO_JD)
 +              spec->hp_detect = 0;
 +
@@ -1180227,11 +1180217,11 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              return err;
 +      }
 +
-       codec->patch_ops = stac92xx_patch_ops;
-       return 0;
- }
++      codec->patch_ops = stac92xx_patch_ops;
++
++      return 0;
++}
++
 +#ifdef SND_HDA_NEEDS_RESUME
 +static void stac92hd71xx_set_power_state(struct hda_codec *codec, int pwr)
 +{
@@ -1180289,11 +1180279,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              { "Digital Mic 2", 0x03 },
 +      }
 +};
-+
  static int patch_stac92hd71bxx(struct hda_codec *codec)
  {
-       struct sigmatel_spec *spec;
-@@ -3624,9 +4644,12 @@ static int patch_stac92hd71bxx(struct hd
+@@ -3624,9 +4644,12 @@
                return -ENOMEM;
  
        codec->spec = spec;
@@ -1180306,21 +1180295,21 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        spec->board_config = snd_hda_check_board_config(codec,
                                                        STAC_92HD71BXX_MODELS,
                                                        stac92hd71bxx_models,
-@@ -3646,6 +4669,13 @@ again:
+@@ -3644,6 +4667,13 @@
+       } else {
+               spec->pin_configs = stac92hd71bxx_brd_tbl[spec->board_config];
                stac92xx_set_config_regs(codec);
-       }
++      }
++
 +      if (spec->board_config > STAC_92HD71BXX_REF) {
 +              /* GPIO0 = EAPD */
 +              spec->gpio_mask = 0x01;
 +              spec->gpio_dir = 0x01;
 +              spec->gpio_data = 0x01;
-+      }
-+
+       }
        switch (codec->vendor_id) {
-       case 0x111d76b6: /* 4 Port without Analog Mixer */
-       case 0x111d76b7:
-@@ -3653,47 +4683,101 @@ again:
+@@ -3653,47 +4683,101 @@
        case 0x111d76b5:
                spec->mixer = stac92hd71bxx_mixer;
                spec->init = stac92hd71bxx_core_init;
@@ -1180370,10 +1180359,12 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
 +              spec->dinput_mux = &spec->private_dimux;
                spec->mixer = stac92hd71bxx_analog_mixer;
                spec->init = stac92hd71bxx_analog_core_init;
-+              codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
-       }
+-      }
+-
 -      spec->aloopback_mask = 0x20;
++              codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
++      }
++
 +      spec->aloopback_mask = 0x50;
        spec->aloopback_shift = 0;
  
@@ -1180430,16 +1180421,16 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        err = stac92xx_parse_auto_config(codec, 0x21, 0x23);
        if (!err) {
-@@ -3711,8 +4795,6 @@ again:
+@@ -3710,8 +4794,6 @@
+               stac92xx_free(codec);
                return err;
        }
--      codec->patch_ops = stac92xx_patch_ops;
 -
+-      codec->patch_ops = stac92xx_patch_ops;
        return 0;
  };
-@@ -3854,10 +4936,14 @@ static int patch_stac927x(struct hda_cod
+@@ -3854,10 +4936,14 @@
                stac92xx_set_config_regs(codec);
        }
  
@@ -1180454,7 +1180445,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        spec->dac_list = stac927x_dac_nids;
        spec->multiout.dac_nids = spec->dac_nids;
  
-@@ -3900,9 +4986,11 @@ static int patch_stac927x(struct hda_cod
+@@ -3900,9 +4986,11 @@
                spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
                break;
        default:
@@ -1180469,7 +1180460,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                spec->num_dmics = 0;
  
                spec->init = stac927x_core_init;
-@@ -3912,6 +5000,7 @@ static int patch_stac927x(struct hda_cod
+@@ -3912,6 +5000,7 @@
        spec->num_pwrs = 0;
        spec->aloopback_mask = 0x40;
        spec->aloopback_shift = 0;
@@ -1180477,7 +1180468,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
  
        err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
        if (!err) {
-@@ -3942,6 +5031,10 @@ static int patch_stac927x(struct hda_cod
+@@ -3942,6 +5031,10 @@
         */
        codec->bus->needs_damn_long_delay = 1;
  
@@ -1180488,7 +1180479,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        return 0;
  }
  
-@@ -3974,10 +5067,13 @@ static int patch_stac9205(struct hda_cod
+@@ -3974,10 +5067,13 @@
                stac92xx_set_config_regs(codec);
        }
  
@@ -1180502,7 +1180493,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        spec->dmic_nids = stac9205_dmic_nids;
        spec->num_dmics = STAC9205_NUM_DMICS;
        spec->dmux_nids = stac9205_dmux_nids;
-@@ -3989,6 +5085,9 @@ static int patch_stac9205(struct hda_cod
+@@ -3989,6 +5085,9 @@
  
        spec->aloopback_mask = 0x40;
        spec->aloopback_shift = 0;
@@ -1180512,7 +1180503,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        spec->multiout.dac_nids = spec->dac_nids;
        
        switch (spec->board_config){
-@@ -3998,7 +5097,7 @@ static int patch_stac9205(struct hda_cod
+@@ -3998,7 +5097,7 @@
                stac92xx_set_config_reg(codec, 0x20, 0x1c410030);
  
                /* Enable unsol response for GPIO4/Dock HP connection */
@@ -1180521,17 +1180512,17 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
                        AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x10);
                snd_hda_codec_write_cache(codec, codec->afg, 0,
                                          AC_VERB_SET_UNSOLICITED_ENABLE,
-@@ -4013,6 +5112,9 @@ static int patch_stac9205(struct hda_cod
+@@ -4012,6 +5111,9 @@
+                * GPIO3 Low = DRM
                 */
                spec->gpio_data = 0x01;
-               break;
++              break;
 +      case STAC_9205_REF:
 +              /* SPDIF-In enabled */
-+              break;
+               break;
        default:
                /* GPIO0 High = EAPD */
-               spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
-@@ -4332,6 +5434,8 @@ struct hda_codec_preset snd_hda_preset_s
+@@ -4332,6 +5434,8 @@
        { .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 },
        { .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 },
        { .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
@@ -1180540,9 +1180531,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_sigmatel.c linux-2.6.27.19-5.1/sound
        { .id = 0x111d7608, .name = "92HD75B2X5", .patch = patch_stac92hd71bxx},
        { .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
        { .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
-diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/hda/patch_via.c
---- linux-2.6.27/sound/pci/hda/patch_via.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/hda/patch_via.c      2009-03-25 16:10:56.000000000 +0000
+diff -r 9608d5473017 sound/pci/hda/patch_via.c
+--- a/sound/pci/hda/patch_via.c        Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/hda/patch_via.c        Wed May 06 16:57:08 2009 +0100
 @@ -1,10 +1,10 @@
  /*
   * Universal Interface for Intel High Definition Audio Codec
@@ -1180605,7 +1180596,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  #define IS_VT1708B_4CH_VENDORID(x)    ((x) >= 0x1106e724 && (x) <= 0x1106e727)
 +#define IS_VT1708S_VENDORID(x)                ((x) >= 0x11060397 && (x) <= 0x11067397)
 +#define IS_VT1702_VENDORID(x)         ((x) >= 0x11060398 && (x) <= 0x11067398)
-+
 +enum VIA_HDA_CODEC {
 +      UNKNOWN = -1,
 +      VT1708,
@@ -1180647,13 +1180638,13 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +              codec_type = UNKNOWN;
 +      return codec_type;
 +};
++
 +#define VIA_HP_EVENT          0x01
 +#define VIA_GPIO_EVENT                0x02
  
  enum {
        VIA_CTL_WIDGET_VOL,
-@@ -77,12 +139,54 @@ enum {
+@@ -77,11 +139,53 @@
  };
  
  enum {
@@ -1180663,7 +1180654,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        AUTO_SEQ_CENLFE,
        AUTO_SEQ_SIDE
  };
++
 +#define get_amp_nid(kc)       ((kc)->private_value & 0xffff)
 +
 +/* Some VT1708S based boards gets the micboost setting wrong, so we have
@@ -1180705,11 +1180696,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +      }
 +      return 0;
 +}
-+
  static struct snd_kcontrol_new vt1708_control_templates[] = {
        HDA_CODEC_VOLUME(NULL, 0, 0, 0),
-       HDA_CODEC_MUTE(NULL, 0, 0, 0),
-@@ -94,7 +198,8 @@ struct via_spec {
+@@ -94,7 +198,8 @@
        struct snd_kcontrol_new *mixers[3];
        unsigned int num_mixers;
  
@@ -1180719,7 +1180709,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        char *stream_name_analog;
        struct hda_pcm_stream *stream_analog_playback;
-@@ -106,6 +211,7 @@ struct via_spec {
+@@ -106,6 +211,7 @@
  
        /* playback */
        struct hda_multi_out multiout;
@@ -1180727,7 +1180717,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        /* capture */
        unsigned int num_adc_nids;
-@@ -117,15 +223,19 @@ struct via_spec {
+@@ -117,14 +223,18 @@
        unsigned int cur_mux[3];
  
        /* PCM information */
@@ -1180741,18 +1180731,19 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 -      struct hda_input_mux private_imux;
 +      struct hda_input_mux private_imux[2];
        hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
++
 +      /* HP mode source */
 +      const struct hda_input_mux *hp_mux;
 +      unsigned int hp_independent_mode;
-+
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        struct hda_loopback_check loopback;
- #endif
-@@ -146,6 +256,16 @@ static hda_nid_t vt1708B_adc_nids[2] = {
+@@ -144,6 +254,16 @@
+ static hda_nid_t vt1708B_adc_nids[2] = {
+       /* ADC1-2 */
        0x13, 0x14
- };
++};
++
 +static hda_nid_t vt1708S_adc_nids[2] = {
 +      /* ADC1-2 */
 +      0x13, 0x14
@@ -1180761,12 +1180752,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +static hda_nid_t vt1702_adc_nids[3] = {
 +      /* ADC1-2 */
 +      0x12, 0x20, 0x1F
-+};
-+
+ };
  /* add dynamic controls */
- static int via_add_control(struct via_spec *spec, int type, const char *name,
-                          unsigned long val)
-@@ -283,19 +403,108 @@ static int via_mux_enum_put(struct snd_k
+@@ -283,18 +403,107 @@
                return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
                                             0x18, &spec->cur_mux[adc_idx]);
        else if ((IS_VT1709_10CH_VENDORID(vendor_id) ||
@@ -1180787,7 +1180776,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
                                             spec->adc_nids[adc_idx],
                                             &spec->cur_mux[adc_idx]);
  }
++
 +static int via_independent_hp_info(struct snd_kcontrol *kcontrol,
 +                                 struct snd_ctl_elem_info *uinfo)
 +{
@@ -1180873,11 +1180862,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +      },
 +      { } /* end */
 +};
-+
  /* capture mixer elements */
  static struct snd_kcontrol_new vt1708_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_INPUT),
-@@ -380,6 +589,138 @@ static int via_playback_pcm_cleanup(stru
+@@ -380,6 +589,138 @@
        return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
  }
  
@@ -1181016,7 +1181004,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  /*
   * Digital out
   */
-@@ -399,6 +740,21 @@ static int via_dig_playback_pcm_close(st
+@@ -399,6 +740,21 @@
        return snd_hda_multi_out_dig_close(codec, &spec->multiout);
  }
  
@@ -1181038,7 +1181026,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  static int via_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
                                        struct hda_codec *codec,
                                        unsigned int stream_tag,
-@@ -406,8 +762,20 @@ static int via_dig_playback_pcm_prepare(
+@@ -406,8 +762,20 @@
                                        struct snd_pcm_substream *substream)
  {
        struct via_spec *spec = codec->spec;
@@ -1181061,7 +1181049,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  }
  
  /*
-@@ -436,14 +804,14 @@ static int via_capture_pcm_cleanup(struc
+@@ -436,14 +804,14 @@
  }
  
  static struct hda_pcm_stream vt1708_pcm_analog_playback = {
@@ -1181079,7 +1181067,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        },
  };
  
-@@ -515,6 +883,13 @@ static int via_build_controls(struct hda
+@@ -515,6 +883,13 @@
                if (err < 0)
                        return err;
                spec->multiout.share_spdif = 1;
@@ -1181093,7 +1181081,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        }
        if (spec->dig_in_nid) {
                err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
-@@ -580,10 +955,89 @@ static void via_free(struct hda_codec *c
+@@ -580,10 +955,89 @@
        kfree(codec->spec);
  }
  
@@ -1181184,17 +1181172,17 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        /* Lydia Add for EAPD enable */
        if (!spec->dig_in_nid) { /* No Digital In connection */
                if (IS_VT1708_VENDORID(codec->vendor_id)) {
-@@ -611,6 +1065,9 @@ static int via_init(struct hda_codec *co
+@@ -610,6 +1064,9 @@
+       } else /* enable SPDIF-input pin */
                snd_hda_codec_write(codec, spec->autocfg.dig_in_pin, 0,
                                    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN);
++
 +      /* no slave outs */
 +      codec->slave_dig_outs = slave_dig_outs;
-+
        return 0;
  }
-@@ -657,10 +1114,10 @@ static int vt1708_auto_fill_dac_nids(str
+@@ -657,10 +1114,10 @@
                                spec->multiout.dac_nids[i] = 0x12;
                                break;
                        case AUTO_SEQ_SURROUND:
@@ -1181207,7 +1181195,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
                                break;
                        }
                }
-@@ -685,7 +1142,7 @@ static int vt1708_auto_create_multi_out_
+@@ -685,7 +1142,7 @@
                        continue;
                
                if (i != AUTO_SEQ_FRONT)
@@ -1181216,7 +1181204,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
                if (i == AUTO_SEQ_CENLFE) {
                        /* Center/LFE */
-@@ -760,6 +1217,24 @@ static int vt1708_auto_create_multi_out_
+@@ -760,6 +1217,24 @@
        return 0;
  }
  
@@ -1181241,7 +1181229,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  static int vt1708_auto_create_hp_ctls(struct via_spec *spec, hda_nid_t pin)
  {
        int err;
-@@ -780,6 +1255,8 @@ static int vt1708_auto_create_hp_ctls(st
+@@ -780,6 +1255,8 @@
        if (err < 0)
                return err;
  
@@ -1181250,7 +1181238,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        return 0;
  }
  
-@@ -790,7 +1267,7 @@ static int vt1708_auto_create_analog_inp
+@@ -790,7 +1267,7 @@
        static char *labels[] = {
                "Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
        };
@@ -1181259,7 +1181247,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        int i, err, idx = 0;
  
        /* for internal loopback recording select */
-@@ -840,11 +1317,36 @@ static struct hda_amp_list vt1708_loopba
+@@ -840,10 +1317,35 @@
  };
  #endif
  
@@ -1181288,30 +1181276,29 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  {
        struct via_spec *spec = codec->spec;
        int err;
++
 +      /* Add HP and CD pin config connect bit re-config action */
 +      vt1708_set_pinconfig_connect(codec, VT1708_HP_PIN_NID);
 +      vt1708_set_pinconfig_connect(codec, VT1708_CD_PIN_NID);
-+
        err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL);
        if (err < 0)
-               return err;
-@@ -874,9 +1376,12 @@ static int vt1708_parse_auto_config(stru
+@@ -874,9 +1376,12 @@
        if (spec->kctl_alloc)
                spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
  
 -      spec->init_verbs = vt1708_volume_init_verbs;    
 +      spec->init_verbs[spec->num_iverbs++] = vt1708_volume_init_verbs;
-+
-+      spec->input_mux = &spec->private_imux[0];
  
 -      spec->input_mux = &spec->private_imux;
++      spec->input_mux = &spec->private_imux[0];
++
 +      if (spec->hp_mux)
 +              spec->mixers[spec->num_mixers++] = via_hp_mixer;
  
        return 1;
  }
-@@ -897,7 +1402,7 @@ static int patch_vt1708(struct hda_codec
+@@ -897,7 +1402,7 @@
        int err;
  
        /* create a codec specific record */
@@ -1181320,19 +1181307,19 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        if (spec == NULL)
                return -ENOMEM;
  
-@@ -966,6 +1471,11 @@ static struct snd_kcontrol_new vt1709_ca
+@@ -964,6 +1469,11 @@
+               .put = via_mux_enum_put,
+       },
        { } /* end */
- };
++};
++
 +static struct hda_verb vt1709_uniwill_init_verbs[] = {
 +      {0x20, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | VIA_HP_EVENT},
 +      { }
-+};
-+
+ };
  /*
-  * generic initialization of ADC, input mixers and output mixers
-  */
-@@ -1090,11 +1600,11 @@ static int vt1709_auto_fill_dac_nids(str
+@@ -1090,11 +1600,11 @@
                                        break;
                                case AUTO_SEQ_SURROUND:
                                        /* AOW3 */
@@ -1181346,38 +1181333,47 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
                                        break;
                                default:
                                        break;
-@@ -1203,26 +1713,26 @@ static int vt1709_auto_create_multi_out_
+@@ -1203,6 +1713,19 @@
                } else if (i == AUTO_SEQ_SURROUND) {
                        sprintf(name, "%s Playback Volume", chname[i]);
                        err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
--                                            HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
 +                                            HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
-                                                                 HDA_OUTPUT));
-                       if (err < 0)
-                               return err;
-                       sprintf(name, "%s Playback Switch", chname[i]);
-                       err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
--                                            HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
++                                                                HDA_OUTPUT));
++                      if (err < 0)
++                              return err;
++                      sprintf(name, "%s Playback Switch", chname[i]);
++                      err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
 +                                            HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
++                                                                HDA_OUTPUT));
++                      if (err < 0)
++                              return err;
++              } else if (i == AUTO_SEQ_SIDE) {
++                      sprintf(name, "%s Playback Volume", chname[i]);
++                      err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
+                                             HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
                                                                  HDA_OUTPUT));
                        if (err < 0)
-                               return err;
-               } else if (i == AUTO_SEQ_SIDE) {
-                       sprintf(name, "%s Playback Volume", chname[i]);
-                       err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
--                                            HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
-+                                            HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
-                                                                 HDA_OUTPUT));
-                       if (err < 0)
-                               return err;
+@@ -1210,19 +1733,6 @@
                        sprintf(name, "%s Playback Switch", chname[i]);
                        err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
+                                             HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
+-                                                                HDA_OUTPUT));
+-                      if (err < 0)
+-                              return err;
+-              } else if (i == AUTO_SEQ_SIDE) {
+-                      sprintf(name, "%s Playback Volume", chname[i]);
+-                      err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name,
+-                                            HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
+-                                                                HDA_OUTPUT));
+-                      if (err < 0)
+-                              return err;
+-                      sprintf(name, "%s Playback Switch", chname[i]);
+-                      err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name,
 -                                            HDA_COMPOSE_AMP_VAL(0x1a, 3, 0,
-+                                            HDA_COMPOSE_AMP_VAL(0x29, 3, 0,
                                                                  HDA_OUTPUT));
                        if (err < 0)
                                return err;
-@@ -1265,7 +1775,7 @@ static int vt1709_auto_create_analog_inp
+@@ -1265,7 +1775,7 @@
        static char *labels[] = {
                "Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
        };
@@ -1181386,7 +1181382,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        int i, err, idx = 0;
  
        /* for internal loopback recording select */
-@@ -1339,7 +1849,10 @@ static int vt1709_parse_auto_config(stru
+@@ -1339,7 +1849,10 @@
        if (spec->kctl_alloc)
                spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
  
@@ -1181398,7 +1181394,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        return 1;
  }
-@@ -1360,7 +1873,7 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1360,7 +1873,7 @@
        int err;
  
        /* create a codec specific record */
@@ -1181407,7 +1181403,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        if (spec == NULL)
                return -ENOMEM;
  
-@@ -1375,7 +1888,8 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1375,7 +1888,8 @@
                       "Using genenic mode...\n");
        }
  
@@ -1181417,7 +1181413,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        spec->stream_name_analog = "VT1709 Analog";
        spec->stream_analog_playback = &vt1709_10ch_pcm_analog_playback;
-@@ -1396,6 +1910,7 @@ static int patch_vt1709_10ch(struct hda_
+@@ -1396,6 +1910,7 @@
        codec->patch_ops = via_patch_ops;
  
        codec->patch_ops.init = via_auto_init;
@@ -1181425,7 +1181421,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        spec->loopback.amplist = vt1709_loopbacks;
  #endif
-@@ -1451,7 +1966,7 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1451,7 +1966,7 @@
        int err;
  
        /* create a codec specific record */
@@ -1181434,7 +1181430,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        if (spec == NULL)
                return -ENOMEM;
  
-@@ -1466,7 +1981,8 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1466,7 +1981,8 @@
                       "Using genenic mode...\n");
        }
  
@@ -1181444,7 +1181440,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        spec->stream_name_analog = "VT1709 Analog";
        spec->stream_analog_playback = &vt1709_6ch_pcm_analog_playback;
-@@ -1487,6 +2003,7 @@ static int patch_vt1709_6ch(struct hda_c
+@@ -1487,6 +2003,7 @@
        codec->patch_ops = via_patch_ops;
  
        codec->patch_ops.init = via_auto_init;
@@ -1181452,7 +1181448,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        spec->loopback.amplist = vt1709_loopbacks;
  #endif
-@@ -1586,27 +2103,32 @@ static struct hda_verb vt1708B_4ch_volum
+@@ -1586,27 +2103,32 @@
        { }
  };
  
@@ -1181491,7 +1181487,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        },
  };
  
-@@ -1662,10 +2184,10 @@ static int vt1708B_auto_fill_dac_nids(st
+@@ -1662,10 +2184,10 @@
                                spec->multiout.dac_nids[i] = 0x24;
                                break;
                        case AUTO_SEQ_SURROUND:
@@ -1181504,7 +1181500,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
                                break;
                        }
                }
-@@ -1680,7 +2202,7 @@ static int vt1708B_auto_create_multi_out
+@@ -1680,7 +2202,7 @@
  {
        char name[32];
        static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" };
@@ -1181513,7 +1181509,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        hda_nid_t nid, nid_vol = 0;
        int i, err;
  
-@@ -1785,6 +2307,8 @@ static int vt1708B_auto_create_hp_ctls(s
+@@ -1785,6 +2307,8 @@
        if (err < 0)
                return err;
  
@@ -1181522,7 +1181518,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        return 0;
  }
  
-@@ -1795,7 +2319,7 @@ static int vt1708B_auto_create_analog_in
+@@ -1795,7 +2319,7 @@
        static char *labels[] = {
                "Mic", "Front Mic", "Line", "Front Line", "CD", "Aux", NULL
        };
@@ -1181531,7 +1181527,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        int i, err, idx = 0;
  
        /* for internal loopback recording select */
-@@ -1869,7 +2393,10 @@ static int vt1708B_parse_auto_config(str
+@@ -1869,7 +2393,10 @@
        if (spec->kctl_alloc)
                spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
  
@@ -1181543,7 +1181539,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        return 1;
  }
-@@ -1890,7 +2417,7 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1890,7 +2417,7 @@
        int err;
  
        /* create a codec specific record */
@@ -1181552,7 +1181548,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        if (spec == NULL)
                return -ENOMEM;
  
-@@ -1906,7 +2433,8 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1906,7 +2433,8 @@
                       "from BIOS.  Using genenic mode...\n");
        }
  
@@ -1181562,7 +1181558,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        spec->stream_name_analog = "VT1708B Analog";
        spec->stream_analog_playback = &vt1708B_8ch_pcm_analog_playback;
-@@ -1926,6 +2454,7 @@ static int patch_vt1708B_8ch(struct hda_
+@@ -1926,6 +2454,7 @@
        codec->patch_ops = via_patch_ops;
  
        codec->patch_ops.init = via_auto_init;
@@ -1181570,7 +1181566,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        spec->loopback.amplist = vt1708B_loopbacks;
  #endif
-@@ -1939,7 +2468,7 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1939,7 +2468,7 @@
        int err;
  
        /* create a codec specific record */
@@ -1181579,7 +1181575,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
        if (spec == NULL)
                return -ENOMEM;
  
-@@ -1955,7 +2484,8 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1955,7 +2484,8 @@
                       "from BIOS.  Using genenic mode...\n");
        }
  
@@ -1181589,7 +1181585,7 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  
        spec->stream_name_analog = "VT1708B Analog";
        spec->stream_analog_playback = &vt1708B_4ch_pcm_analog_playback;
-@@ -1975,6 +2505,7 @@ static int patch_vt1708B_4ch(struct hda_
+@@ -1975,9 +2505,756 @@
        codec->patch_ops = via_patch_ops;
  
        codec->patch_ops.init = via_auto_init;
@@ -1181597,10 +1181593,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
  #ifdef CONFIG_SND_HDA_POWER_SAVE
        spec->loopback.amplist = vt1708B_loopbacks;
  #endif
-@@ -1982,6 +2513,752 @@ static int patch_vt1708B_4ch(struct hda_
-       return 0;
- }
++
++      return 0;
++}
++
 +/* Patch for VT1708S */
 +
 +/* VT1708S software backdoor based override for buggy hardware micboost
@@ -1182343,14 +1182339,10 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +      response = snd_hda_codec_read(codec, codec->afg, 0, 0xF84, 0);
 +      control = (unsigned char)((response >> 16) & 0x3f);
 +      snd_hda_codec_write(codec,  codec->afg, 0, 0xF82, control);
-+
-+      return 0;
-+}
-+
- /*
-  * patch entries
-  */
-@@ -2022,5 +3299,37 @@ struct hda_codec_preset snd_hda_preset_v
+       return 0;
+ }
+@@ -2022,5 +3299,37 @@
          .patch = patch_vt1708B_4ch},
        { .id = 0x1106E727, .name = "VIA VT1708B 4-Ch",
          .patch = patch_vt1708B_4ch},
@@ -1182388,9 +1182380,9 @@ diff -purN linux-2.6.27/sound/pci/hda/patch_via.c linux-2.6.27.19-5.1/sound/pci/
 +        .patch = patch_vt1702},
        {} /* terminator */
  };
-diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pci/oxygen/virtuoso.c
---- linux-2.6.27/sound/pci/oxygen/virtuoso.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/pci/oxygen/virtuoso.c    2009-03-25 16:10:55.000000000 +0000
+diff -r 9608d5473017 sound/pci/oxygen/virtuoso.c
+--- a/sound/pci/oxygen/virtuoso.c      Wed May 06 15:47:13 2009 +0100
++++ b/sound/pci/oxygen/virtuoso.c      Wed May 06 16:57:08 2009 +0100
 @@ -26,7 +26,7 @@
   * SPI 0 -> 1st PCM1796 (front)
   * SPI 1 -> 2nd PCM1796 (surround)
@@ -1182400,7 +1182392,7 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
   *
   * GPIO 2 -> M0 of CS5381
   * GPIO 3 -> M1 of CS5381
-@@ -142,6 +142,12 @@ struct xonar_data {
+@@ -142,6 +142,12 @@
  static void pcm1796_write(struct oxygen *chip, unsigned int codec,
                          u8 reg, u8 value)
  {
@@ -1182413,7 +1182405,7 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
        /* maps ALSA channel pair number to SPI output */
        static const u8 codec_map[4] = {
                0, 1, 2, 4
-@@ -152,6 +158,7 @@ static void pcm1796_write(struct oxygen 
+@@ -152,6 +158,7 @@
                         (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
                         OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
                         (reg << 8) | value);
@@ -1182421,7 +1182413,7 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
  }
  
  static void cs4398_write(struct oxygen *chip, u8 reg, u8 value)
-@@ -539,6 +546,9 @@ static const DECLARE_TLV_DB_SCALE(cs4362
+@@ -539,6 +546,9 @@
  
  static int xonar_d2_control_filter(struct snd_kcontrol_new *template)
  {
@@ -1182431,7 +1182423,7 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
        if (!strncmp(template->name, "CD Capture ", 11))
                /* CD in is actually connected to the video in pin */
                template->private_value ^= AC97_CD ^ AC97_VIDEO;
-@@ -588,9 +598,8 @@ static const struct oxygen_model xonar_m
+@@ -588,9 +598,8 @@
                .dac_volume_min = 0x0f,
                .dac_volume_max = 0xff,
                .misc_flags = OXYGEN_MISC_MIDI,
@@ -1182443,7 +1182435,7 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
                .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
        },
        [MODEL_D2X] = {
-@@ -619,9 +628,8 @@ static const struct oxygen_model xonar_m
+@@ -619,9 +628,8 @@
                .dac_volume_min = 0x0f,
                .dac_volume_max = 0xff,
                .misc_flags = OXYGEN_MISC_MIDI,
@@ -1182455,10 +1182447,10 @@ diff -purN linux-2.6.27/sound/pci/oxygen/virtuoso.c linux-2.6.27.19-5.1/sound/pc
                .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
        },
        [MODEL_D1] = {
-diff -purN linux-2.6.27/sound/ppc/Kconfig linux-2.6.27.19-5.1/sound/ppc/Kconfig
---- linux-2.6.27/sound/ppc/Kconfig     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/Kconfig      2009-03-25 16:11:00.000000000 +0000
-@@ -48,4 +48,19 @@ config SND_PS3_DEFAULT_START_DELAY
+diff -r 9608d5473017 sound/ppc/Kconfig
+--- a/sound/ppc/Kconfig        Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/Kconfig        Wed May 06 16:57:08 2009 +0100
+@@ -48,4 +48,19 @@
        depends on SND_PS3
        default "2000"
  
@@ -1182478,9 +1182470,9 @@ diff -purN linux-2.6.27/sound/ppc/Kconfig linux-2.6.27.19-5.1/sound/ppc/Kconfig
 +endmenu
 +
  endif # SND_PPC
-diff -purN linux-2.6.27/sound/ppc/Makefile linux-2.6.27.19-5.1/sound/ppc/Makefile
---- linux-2.6.27/sound/ppc/Makefile    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/Makefile     2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 sound/ppc/Makefile
+--- a/sound/ppc/Makefile       Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/Makefile       Wed May 06 16:57:08 2009 +0100
 @@ -4,7 +4,9 @@
  #
  
@@ -1182491,9 +1182483,9 @@ diff -purN linux-2.6.27/sound/ppc/Makefile linux-2.6.27.19-5.1/sound/ppc/Makefil
  obj-$(CONFIG_SND_POWERMAC)    += snd-powermac.o
  obj-$(CONFIG_SND_PS3)         += snd_ps3.o
 +obj-$(CONFIG_SND_PPC_MPC52xx_AC97)    += snd-mpc52xx-ac97.o
-diff -purN linux-2.6.27/sound/ppc/mpc52xx_ac97.c linux-2.6.27.19-5.1/sound/ppc/mpc52xx_ac97.c
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/mpc52xx_ac97.c       2009-03-25 16:11:00.000000000 +0000
+diff -r 9608d5473017 sound/ppc/mpc52xx_ac97.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/sound/ppc/mpc52xx_ac97.c Wed May 06 16:57:08 2009 +0100
 @@ -0,0 +1,807 @@
 +/*
 + * Driver for the PSC of the Freescale MPC52xx configured as AC97 interface
@@ -1183302,10 +1183294,10 @@ diff -purN linux-2.6.27/sound/ppc/mpc52xx_ac97.c linux-2.6.27.19-5.1/sound/ppc/m
 +MODULE_DESCRIPTION(DRV_NAME ": Freescale MPC52xx PSC AC97 driver");
 +MODULE_LICENSE("GPL");
 +
-diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps3.c
---- linux-2.6.27/sound/ppc/snd_ps3.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/snd_ps3.c    2009-03-25 16:11:00.000000000 +0000
-@@ -666,6 +666,7 @@ static int snd_ps3_init_avsetting(struct
+diff -r 9608d5473017 sound/ppc/snd_ps3.c
+--- a/sound/ppc/snd_ps3.c      Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/snd_ps3.c      Wed May 06 16:57:09 2009 +0100
+@@ -666,6 +666,7 @@
        card->avs.avs_audio_width = PS3AV_CMD_AUDIO_WORD_BITS_16;
        card->avs.avs_audio_format = PS3AV_CMD_AUDIO_FORMAT_PCM;
        card->avs.avs_audio_source = PS3AV_CMD_AUDIO_SOURCE_SERIAL;
@@ -1183313,7 +1183305,7 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
  
        ret = snd_ps3_change_avsetting(card);
  
-@@ -685,6 +686,7 @@ static int snd_ps3_set_avsetting(struct 
+@@ -685,6 +686,7 @@
  {
        struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream);
        struct snd_ps3_avsetting_info avs;
@@ -1183321,7 +1183313,7 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
  
        avs = card->avs;
  
-@@ -729,19 +731,92 @@ static int snd_ps3_set_avsetting(struct 
+@@ -729,19 +731,92 @@
                return 1;
        }
  
@@ -1183340,6 +1183332,7 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
 +              snd_ps3_change_avsetting(card);
 +              ret = 0;
        } else
+-              return 1;
 +              ret = 1;
 +
 +      /* check CS non-audio bit and mute accordingly */
@@ -1183349,8 +1183342,8 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
 +              ps3av_audio_mute_analog(0);
 +
 +      return ret;
-+}
-+
+ }
 +/*
 + * SPDIF status bits controls
 + */
@@ -1183388,11 +1183381,11 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
 +{
 +      if (memcmp(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8)) {
 +              memcpy(ps3av_mode_cs_info, ucontrol->value.iec958.status, 8);
-               return 1;
++              return 1;
 +      }
 +      return 0;
- }
++}
++
 +static struct snd_kcontrol_new spdif_ctls[] = {
 +      {
 +              .access = SNDRV_CTL_ELEM_ACCESS_READ,
@@ -1183419,7 +1183412,7 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
  
  
  static int snd_ps3_map_mmio(void)
-@@ -842,7 +917,7 @@ static void snd_ps3_audio_set_base_addr(
+@@ -842,7 +917,7 @@
  
  static int __init snd_ps3_driver_probe(struct ps3_system_bus_device *dev)
  {
@@ -1183428,7 +1183421,7 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
        u64 lpar_addr, lpar_size;
  
        BUG_ON(!firmware_has_feature(FW_FEATURE_PS3_LV1));
-@@ -903,6 +978,15 @@ static int __init snd_ps3_driver_probe(s
+@@ -903,6 +978,15 @@
        strcpy(the_card.card->driver, "PS3");
        strcpy(the_card.card->shortname, "PS3");
        strcpy(the_card.card->longname, "PS3 sound");
@@ -1183444,10 +1183437,10 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.c linux-2.6.27.19-5.1/sound/ppc/snd_ps
        /* create PCM devices instance */
        /* NOTE:this driver works assuming pcm:substream = 1:1 */
        ret = snd_pcm_new(the_card.card,
-diff -purN linux-2.6.27/sound/ppc/snd_ps3.h linux-2.6.27.19-5.1/sound/ppc/snd_ps3.h
---- linux-2.6.27/sound/ppc/snd_ps3.h   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/snd_ps3.h    2009-03-25 16:11:00.000000000 +0000
-@@ -51,6 +51,7 @@ struct snd_ps3_avsetting_info {
+diff -r 9608d5473017 sound/ppc/snd_ps3.h
+--- a/sound/ppc/snd_ps3.h      Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/snd_ps3.h      Wed May 06 16:57:09 2009 +0100
+@@ -51,6 +51,7 @@
        uint32_t avs_audio_width;
        uint32_t avs_audio_format; /* fixed */
        uint32_t avs_audio_source; /* fixed */
@@ -1183455,10 +1183448,10 @@ diff -purN linux-2.6.27/sound/ppc/snd_ps3.h linux-2.6.27.19-5.1/sound/ppc/snd_ps
  };
  /*
   * PS3 audio 'card' instance
-diff -purN linux-2.6.27/sound/ppc/tumbler.c linux-2.6.27.19-5.1/sound/ppc/tumbler.c
---- linux-2.6.27/sound/ppc/tumbler.c   2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/ppc/tumbler.c    2009-03-25 16:11:00.000000000 +0000
-@@ -879,7 +879,8 @@ static struct snd_kcontrol_new snapper_m
+diff -r 9608d5473017 sound/ppc/tumbler.c
+--- a/sound/ppc/tumbler.c      Wed May 06 15:47:13 2009 +0100
++++ b/sound/ppc/tumbler.c      Wed May 06 16:57:09 2009 +0100
+@@ -879,7 +879,8 @@
          .put = tumbler_put_master_switch
        },
        DEFINE_SNAPPER_MIX("PCM Playback Volume", 0, VOL_IDX_PCM),
@@ -1183468,10 +1183461,10 @@ diff -purN linux-2.6.27/sound/ppc/tumbler.c linux-2.6.27.19-5.1/sound/ppc/tumble
        DEFINE_SNAPPER_MIX("Monitor Mix Volume", 0, VOL_IDX_ADC),
        DEFINE_SNAPPER_MONO("Tone Control - Bass", bass),
        DEFINE_SNAPPER_MONO("Tone Control - Treble", treble),
-diff -purN linux-2.6.27/sound/soc/omap/omap-pcm.c linux-2.6.27.19-5.1/sound/soc/omap/omap-pcm.c
---- linux-2.6.27/sound/soc/omap/omap-pcm.c     2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/soc/omap/omap-pcm.c      2009-03-25 16:11:00.000000000 +0000
-@@ -231,7 +231,7 @@ static int omap_pcm_open(struct snd_pcm_
+diff -r 9608d5473017 sound/soc/omap/omap-pcm.c
+--- a/sound/soc/omap/omap-pcm.c        Wed May 06 15:47:13 2009 +0100
++++ b/sound/soc/omap/omap-pcm.c        Wed May 06 16:57:09 2009 +0100
+@@ -231,7 +231,7 @@
        if (ret < 0)
                goto out;
  
@@ -1183480,10 +1183473,10 @@ diff -purN linux-2.6.27/sound/soc/omap/omap-pcm.c linux-2.6.27.19-5.1/sound/soc/
        if (prtd == NULL) {
                ret = -ENOMEM;
                goto out;
-diff -purN linux-2.6.27/sound/sparc/amd7930.c linux-2.6.27.19-5.1/sound/sparc/amd7930.c
---- linux-2.6.27/sound/sparc/amd7930.c 2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/sparc/amd7930.c  2009-03-25 16:10:56.000000000 +0000
-@@ -1108,6 +1108,7 @@ static struct of_device_id amd7930_match
+diff -r 9608d5473017 sound/sparc/amd7930.c
+--- a/sound/sparc/amd7930.c    Wed May 06 15:47:13 2009 +0100
++++ b/sound/sparc/amd7930.c    Wed May 06 16:57:09 2009 +0100
+@@ -1108,6 +1108,7 @@
  };
  
  static struct of_platform_driver amd7930_sbus_driver = {
@@ -1183491,10 +1183484,10 @@ diff -purN linux-2.6.27/sound/sparc/amd7930.c linux-2.6.27.19-5.1/sound/sparc/am
        .name           = "audio",
        .match_table    = amd7930_match,
        .probe          = amd7930_sbus_probe,
-diff -purN linux-2.6.27/sound/sparc/dbri.c linux-2.6.27.19-5.1/sound/sparc/dbri.c
---- linux-2.6.27/sound/sparc/dbri.c    2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/sparc/dbri.c     2009-03-25 16:10:56.000000000 +0000
-@@ -2679,6 +2679,7 @@ static struct of_device_id dbri_match[] 
+diff -r 9608d5473017 sound/sparc/dbri.c
+--- a/sound/sparc/dbri.c       Wed May 06 15:47:13 2009 +0100
++++ b/sound/sparc/dbri.c       Wed May 06 16:57:09 2009 +0100
+@@ -2679,6 +2679,7 @@
  MODULE_DEVICE_TABLE(of, dbri_match);
  
  static struct of_platform_driver dbri_sbus_driver = {
@@ -1183502,10 +1183495,10 @@ diff -purN linux-2.6.27/sound/sparc/dbri.c linux-2.6.27.19-5.1/sound/sparc/dbri.
        .name           = "dbri",
        .match_table    = dbri_match,
        .probe          = dbri_probe,
-diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-device.h linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-device.h
---- linux-2.6.27/sound/usb/caiaq/caiaq-device.h        2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-device.h 2009-03-25 16:10:57.000000000 +0000
-@@ -75,6 +75,7 @@ struct snd_usb_caiaqdev {
+diff -r 9608d5473017 sound/usb/caiaq/caiaq-device.h
+--- a/sound/usb/caiaq/caiaq-device.h   Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/caiaq/caiaq-device.h   Wed May 06 16:57:09 2009 +0100
+@@ -75,6 +75,7 @@
        wait_queue_head_t ep1_wait_queue;
        wait_queue_head_t prepare_wait_queue;
        int spec_received, audio_parm_answer;
@@ -1183513,10 +1183506,10 @@ diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-device.h linux-2.6.27.19-5.1/sound
  
        char vendor_name[CAIAQ_USB_STR_LEN];
        char product_name[CAIAQ_USB_STR_LEN];
-diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-midi.c
---- linux-2.6.27/sound/usb/caiaq/caiaq-midi.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/caiaq/caiaq-midi.c   2009-03-25 16:10:57.000000000 +0000
-@@ -59,6 +59,11 @@ static int snd_usb_caiaq_midi_output_ope
+diff -r 9608d5473017 sound/usb/caiaq/caiaq-midi.c
+--- a/sound/usb/caiaq/caiaq-midi.c     Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/caiaq/caiaq-midi.c     Wed May 06 16:57:09 2009 +0100
+@@ -59,6 +59,11 @@
  
  static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream)
  {
@@ -1183528,7 +1183521,7 @@ diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/u
        return 0;
  }
  
-@@ -69,7 +74,8 @@ static void snd_usb_caiaq_midi_send(stru
+@@ -69,7 +74,8 @@
        
        dev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE;
        dev->midi_out_buf[1] = 0; /* port */
@@ -1183538,7 +1183531,7 @@ diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/u
        
        if (len <= 0)
                return;
-@@ -79,24 +85,24 @@ static void snd_usb_caiaq_midi_send(stru
+@@ -79,24 +85,24 @@
        
        ret = usb_submit_urb(&dev->midi_out_urb, GFP_ATOMIC);
        if (ret < 0)
@@ -1183573,7 +1183566,7 @@ diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/u
  }
  
  
-@@ -161,16 +167,14 @@ int snd_usb_caiaq_midi_init(struct snd_u
+@@ -161,16 +167,14 @@
  void snd_usb_caiaq_midi_output_done(struct urb* urb)
  {
        struct snd_usb_caiaqdev *dev = urb->context;
@@ -1183591,10 +1183584,10 @@ diff -purN linux-2.6.27/sound/usb/caiaq/caiaq-midi.c linux-2.6.27.19-5.1/sound/u
        snd_usb_caiaq_midi_send(dev, dev->midi_out_substream);
  }
  
-diff -purN linux-2.6.27/sound/usb/usbaudio.c linux-2.6.27.19-5.1/sound/usb/usbaudio.c
---- linux-2.6.27/sound/usb/usbaudio.c  2008-10-09 23:13:53.000000000 +0100
-+++ linux-2.6.27.19-5.1/sound/usb/usbaudio.c   2009-03-25 16:10:57.000000000 +0000
-@@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(str
+diff -r 9608d5473017 sound/usb/usbaudio.c
+--- a/sound/usb/usbaudio.c     Wed May 06 15:47:13 2009 +0100
++++ b/sound/usb/usbaudio.c     Wed May 06 16:57:09 2009 +0100
+@@ -2958,6 +2958,7 @@
                return -EINVAL;
        }
        alts = &iface->altsetting[fp->altset_idx];
index 9d75d9ab60539f46929cd3db0dc39a67b76cf7f0..5442b7da72986d1d6b8b1f790dc50c8501d8bab6 100644 (file)
@@ -2,9 +2,9 @@ It turns out that Windows occasionally generates packets in which the
 IP and TCP headers are in different fragments.  Make sure that the
 backends can handle this.
 
-diff -r a5cc4844227e drivers/xen/netback/xenbus.c
---- a/drivers/xen/netback/xenbus.c     Fri Mar 06 16:49:44 2009 +0000
-+++ b/drivers/xen/netback/xenbus.c     Fri Mar 06 16:52:37 2009 +0000
+diff -r 9889d3f55a9c drivers/xen/netback/xenbus.c
+--- a/drivers/xen/netback/xenbus.c     Wed Jun 03 17:35:02 2009 +0100
++++ b/drivers/xen/netback/xenbus.c     Wed Jun 03 17:35:07 2009 +0100
 @@ -109,6 +109,16 @@
                                    "feature-rx-copy-offset", "%d", 1);
                if (err) {
@@ -22,9 +22,9 @@ diff -r a5cc4844227e drivers/xen/netback/xenbus.c
                        goto abort_transaction;
                }
  
-diff -r a5cc4844227e net/core/dev.c
---- a/net/core/dev.c   Fri Mar 06 16:49:44 2009 +0000
-+++ b/net/core/dev.c   Fri Mar 06 16:52:37 2009 +0000
+diff -r 9889d3f55a9c net/core/dev.c
+--- a/net/core/dev.c   Wed Jun 03 17:35:02 2009 +0100
++++ b/net/core/dev.c   Wed Jun 03 17:35:07 2009 +0100
 @@ -1741,6 +1741,18 @@
  }
  
@@ -44,15 +44,20 @@ diff -r a5cc4844227e net/core/dev.c
  inline int skb_checksum_setup(struct sk_buff *skb)
  {
        struct iphdr *iph;
-@@ -1757,7 +1769,7 @@
+@@ -1756,10 +1768,10 @@
+               goto out;
  
        iph = ip_hdr(skb);
++      if (!skb_pull_up_to(skb, iph + 1))
++              goto out;
++
        th = skb_network_header(skb) + 4 * iph->ihl;
 -      if (th >= skb_tail_pointer(skb))
-+      if (!skb_pull_up_to(skb, iph + 1))
-               goto out;
+-              goto out;
+-
        skb->csum_start = th - skb->head;
+       switch (iph->protocol) {
+       case IPPROTO_TCP:
 @@ -1776,7 +1788,7 @@
                goto out;
        }
index fb50d462fca743fa5d06840d55bf2d7b72e48ddd..def0f9cdc011db89cb49b937c1eb8fc9a7874b60 100644 (file)
@@ -1,12 +1,7 @@
-diff -r 656752cbab2a mm/oom_kill.c
---- a/mm/oom_kill.c    Thu Jan 24 14:11:56 2008 +0000
-+++ b/mm/oom_kill.c    Mon Jan 28 14:24:04 2008 +0000
-@@ -25,12 +25,12 @@
- #include <linux/notifier.h>
- #include <linux/memcontrol.h>
- #include <linux/security.h>
- int sysctl_panic_on_oom;
+diff -r 81d702aede32 mm/oom_kill.c
+--- a/mm/oom_kill.c    Thu May 28 09:29:55 2009 +0100
++++ b/mm/oom_kill.c    Thu May 28 09:47:59 2009 +0100
+@@ -32,7 +32,7 @@
  int sysctl_oom_kill_allocating_task;
  int sysctl_oom_dump_tasks;
  static DEFINE_SPINLOCK(zone_scan_mutex);
@@ -15,7 +10,7 @@ diff -r 656752cbab2a mm/oom_kill.c
  
  /**
   * badness - calculate a numeric value for how bad this task has been
-@@ -153,7 +153,7 @@ unsigned long badness(struct task_struct
+@@ -163,7 +163,7 @@
        }
  
  #ifdef DEBUG
@@ -24,35 +19,36 @@ diff -r 656752cbab2a mm/oom_kill.c
        p->pid, p->comm, points);
  #endif
        return points;
-@@ -448,3 +448,4 @@ void out_of_memory(struct zonelist *zone
+@@ -424,6 +424,7 @@
+ {
        unsigned long points = 0;
        struct task_struct *p;
 +      int orig_log_level;
  
-@@ -456,6 +457,9 @@ void out_of_memory(struct zonelist *zone
+       cgroup_lock();
+       read_lock(&tasklist_lock);
+@@ -525,11 +526,15 @@
+       unsigned long points = 0;
+       unsigned long freed = 0;
+       enum oom_constraint constraint;
++      int orig_log_level;
  
-       if (!should_oom_kill() && !force)
+       blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
+       if (freed > 0)
+               /* Got some memory back in the last second. */
                return;
 +
 +      orig_log_level = console_loglevel;
 +      console_loglevel = 7;
  
-       if (printk_ratelimit()) {
-               printk(KERN_WARNING "%s invoked oom-killer: "
-@@ -513,6 +517,8 @@ out:
+       if (sysctl_panic_on_oom == 2)
+               panic("out of memory. Compulsory panic_on_oom is selected.\n");
+@@ -583,6 +588,8 @@
+ out:
        read_unlock(&tasklist_lock);
-       cpuset_unlock();
  
 +      console_loglevel = orig_log_level;
 +
        /*
         * Give "p" a good chance of killing itself before we
         * retry to allocate memory unless "p" is current
-@@ -544,6 +544,7 @@
-       unsigned long points = 0;
-       unsigned long freed = 0;
-       enum oom_constraint constraint;
-+      int orig_log_level;
-       blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
-       if (freed > 0)
index 8c3a34986ac2207cccd408e1f0703a6aea35c971..b58e67e1e6afc59adcb3eeda3de9a6887a0c0b84 100644 (file)
@@ -1,5 +1,10 @@
 hgignore.patch
 
+#
+# Build system integration
+#
+build-system-integration.patch
+
 #
 # Distro patches.
 #
@@ -15,6 +20,9 @@ forward-port-drivers-xen.patch
 # Patches imported from OSS linux-2.6.18-xen tree.
 #
 linux-2.6.18-xen.hg-832.c0f2f398aa3c # x86: Fix interaction of NTP and dom0->xen time updates
+#linux-2.6.18-xen.hg-847.ad4d307bf9ce # net sfc: Update sfc and sfc_resource driver to latest release XXX disabled for 2.6.27-xen port
+#linux-2.6.18-xen.hg-848.ab1d4fbbe4bf # netfront accel: Simplify, document, and fix a theoretical bug in use XXX disabled for 2.6.27-xen port
+#linux-2.6.18-xen.hg-849.3a4410c4504e # sfc_netfront: Only clear tx_skb when ready for netif_wake_queue XXX disabled for 2.6.27-xen port
 
 #
 # Patches reverted from OSS linux-2.6.18-xen tree.
@@ -43,11 +51,6 @@ git-c6cb0e878446c79f42e7833d7bb69ed6bfbb381f.patch # ACPI: EC: Don't trust ECDT
 #
 XenSource
 
-#
-# Build system integration
-#
-build-system-integration.patch
-
 #
 # Update the Xen interface headers.
 #
@@ -59,11 +62,6 @@ xen-interface-xen_pcie_aer_op.patch
 #
 clobber-induction-variable.patch
 
-#
-# 64 bit kernel fixes
-#
-disable-free_init_pages-on-x86_64.patch
-
 #
 # kABI fixes 
 #
@@ -74,6 +72,11 @@ disable-free_init_pages-on-x86_64.patch
 pci-ignore
 CA-14360-loadavg-not-uninterruptible
 revert-xencons-behaviour
+kexec-define-vmcore_elf_check_arch_cross.patch
+
+#
+# Interrupts and event channels
+#
 
 #
 # Device Drivers.
@@ -89,6 +92,7 @@ intel-net-driver-kcompat.patch
 intel-net-driver-conflicting-names.patch
 tg3-3.92n
 tg3-tune-interrupt-load
+tg3-build-without-vlan-support.patch
 bnx2-1.8.2b
 bnx2-tune-interrupt-load
 bnx2-cnic-over-bridge 
@@ -158,6 +162,7 @@ blktap2
 CA-25742-force-shutdown-tapdisk.diff
 CA-24604-blktap-kthread-uevent.diff
 blktap2-spin_lock_init.patch
+CA-27974-fix-shutdown-race.diff
 forward-port-block-drivers.patch
 blktap2-forward-port-sysfs.patch 
 
@@ -237,6 +242,7 @@ bonding-balance-slb-fixes3.patch
 bonding-no-updelay-on-first-active-slave.patch
 debug-dump-skb-info-when-invalid
 bonding-vlan-fixes.patch
+bridge-no-topology-change-when-no-stp.patch
 
 #
 # Debugging.
index 436fccdcca419bbf68fbe80358d6b96a647d4320..251c77b42c520ec55c4705745dadbf281b6200ff 100644 (file)
@@ -1,19 +1,29 @@
-diff -r 726ed97a3591 drivers/net/sfc/kernel_compat.h
---- a/drivers/net/sfc/kernel_compat.h  Mon Sep 15 16:50:09 2008 +0100
-+++ b/drivers/net/sfc/kernel_compat.h  Mon Sep 15 17:43:31 2008 +0100
-@@ -398,6 +398,9 @@
-       #define for_each_cpu_mask(cpu, mask)            \
-               for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
+diff -r f617031729f5 drivers/net/sfc/kernel_compat.h
+--- a/drivers/net/sfc/kernel_compat.h  Wed Apr 01 17:28:17 2009 +0100
++++ b/drivers/net/sfc/kernel_compat.h  Wed Apr 01 17:39:46 2009 +0100
+@@ -54,7 +54,9 @@
+       #define EFX_NEED_RAW_READ_AND_WRITE_FIX yes
  #endif
-+
++#if 0
+ typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *);
++#endif
+ #define skb_mac_header(skb)   (skb)->mac.raw
+ #define skb_network_header(skb) (skb)->nh.raw
+@@ -125,6 +127,9 @@
+       #define __raw_readq efx_raw_readq
+ #endif
 +#undef EFX_NEED_IRQ_HANDLER_T
 +#undef EFX_NEED_HEX_DUMP
++
+ typedef u32 __wsum;
+ #define csum_unfold(x) ((__force __wsum) x)
  
- /**************************************************************************/
-diff -r 726ed97a3591 drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
---- a/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Mon Sep 15 16:50:09 2008 +0100
-+++ b/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Mon Sep 15 17:44:47 2008 +0100
+diff -r f617031729f5 drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
+--- a/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Wed Apr 01 17:28:17 2009 +0100
++++ b/drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h     Wed Apr 01 17:39:46 2009 +0100
 @@ -59,7 +59,7 @@
  # define PRIx64 "llx"
  #endif
@@ -23,12 +33,12 @@ diff -r 726ed97a3591 drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.h
  enum {
        false = 0,
        true = 1
-diff -r 726ed97a3591 drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
---- a/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Mon Sep 15 16:50:09 2008 +0100
-+++ b/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Tue Sep 16 08:22:52 2008 +0100
-@@ -55,7 +55,7 @@
- #define PRIx64 "llx"
+diff -r f617031729f5 drivers/xen/sfc_netback/ci/efhw/common_sysdep.h
+--- a/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Wed Apr 01 17:28:17 2009 +0100
++++ b/drivers/xen/sfc_netback/ci/efhw/common_sysdep.h  Wed Apr 01 17:39:46 2009 +0100
+@@ -59,7 +59,7 @@
+ # define PRIx64 "llx"
+ #endif
  
 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
 +#if 0 && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
index 46a63fa179cffbcc0d49b525ba966ac11c4e0daa..88dec5875e9ebd0b9dc5122fb1bfae11d693070b 100644 (file)
@@ -5460,3 +5460,14 @@ diff -r f82ead960274 drivers/xen/xenbus/xenbus_xs.c
        }
  
        return 0;
+diff -r c265153a105e drivers/cdrom/Makefile
+--- a/drivers/cdrom/Makefile   Wed May 06 13:23:52 2009 +0100
++++ b/drivers/cdrom/Makefile   Wed May 06 14:56:44 2009 +0100
+@@ -9,7 +9,6 @@
+ obj-$(CONFIG_BLK_DEV_SR)      +=              cdrom.o
+ obj-$(CONFIG_PARIDE_PCD)      +=              cdrom.o
+ obj-$(CONFIG_CDROM_PKTCDVD)   +=              cdrom.o
+-obj-$(CONFIG_XEN_BLKDEV_FRONTEND)     +=              cdrom.o
+ obj-$(CONFIG_VIOCD)           += viocd.o      cdrom.o
+ obj-$(CONFIG_GDROM)           += gdrom.o      cdrom.o
diff --git a/master/tg3-build-without-vlan-support.patch b/master/tg3-build-without-vlan-support.patch
new file mode 100644 (file)
index 0000000..4fd6c76
--- /dev/null
@@ -0,0 +1,13 @@
+diff -r f254e5d5ed6d drivers/net/tg3.h
+--- a/drivers/net/tg3.h        Fri Apr 17 17:46:51 2009 +0100
++++ b/drivers/net/tg3.h        Mon Apr 27 17:28:17 2009 +0100
+@@ -2811,9 +2811,7 @@
+       u32                             rx_jumbo_ptr;
+       u32                             rx_pending;
+       u32                             rx_jumbo_pending;
+-#if TG3_VLAN_TAG_USED
+       struct vlan_group               *vlgrp;
+-#endif
+       struct tg3_rx_buffer_desc       *rx_std;
+       struct ring_info                *rx_std_buffers;